📄 l2cap_con.h
字号:
/* * l2cap_con.h -- Implementation of Bluetooth Logical Link Control * and Adaption Protocol (L2CAP), Connection Manager * * Copyright (C) 2000, 2001 Axis Communications AB * * Author: Mattias Agren <mattias.agren@axis.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * Exceptionally, Axis Communications AB grants discretionary and * conditional permissions for additional use of the text contained * in the company's release of the AXIS OpenBT Stack under the * provisions set forth hereunder. * * Provided that, if you use the AXIS OpenBT Stack with other files, * that do not implement functionality as specified in the Bluetooth * System specification, to produce an executable, this does not by * itself cause the resulting executable to be covered by the GNU * General Public License. Your use of that executable is in no way * restricted on account of using the AXIS OpenBT Stack code with it. * * This exception does not however invalidate any other reasons why * the executable file might be covered by the provisions of the GNU * General Public License. * * $Id: l2cap_con.h,v 1.7 2001/04/27 10:16:09 mattiasagren Exp $ * */#ifndef L2CAP_CON_H#define L2CAP_CON_H/****************** INCLUDE FILES SECTION ***********************************/#ifdef __KERNEL__#include <linux/bluetooth/btcommon.h>#include <linux/types.h>#else#include "btcommon.h"#endif/****************** CONSTANT AND MACRO SECTION ******************************//* internal test of connection manager */#define L2CAP_SELFTEST 0/****************** TYPE DEFINITION SECTION *********************************//* con->c_flags */#define FLAG_WAKEMEUP 0x0001 /* wake up con->wq */#define FLAG_RETURNNOW 0x0002 /* return immediately, used when setting up baseband */#define FLAG_DONTSLEEP 0x0004 /* used when e.g ertx_timeout calls disc req *//* con->c_status */#define CSTATUS_SUCCESS 0 /* return status success to upper caller */#define CSTATUS_FAILED 1 /* return status failed to upper caller */#define CSTATUS_RTX_TIMEOUT 2 /* resend request */#define CSTATUS_ERTX_TIMEOUT 3 /* disconnect link */#define CSTATUS_MAX_NO_RTX 4#define CSTATUS_CMDREJECT 5/****************** EXPORTED FUNCTION DECLARATION SECTION *******************//*********************************************************************//*---------------------- INIT AND SHUTDOWN --------------------------*//*********************************************************************/void init_con_list(void);void free_con_list(void);l2cap_con* create_con(u16 hci_hdl, CID lcid, CID rcid);s32 delete_con(l2cap_con *con);void insert_con(l2cap_con *con);void reset_con(l2cap_con* con);l2cap_con* get_first_con(void);l2cap_con* get_next_con(l2cap_con* con);void init_flow(flow *f);/*******************************************************************//*-------------------------- ACTIONS ------------------------------*//*******************************************************************/l2cap_con* get_rcon(CID rcid);l2cap_con* get_lcon(CID lcid);l2cap_con* get_con(BD_ADDR bd, s32 STATE);l2cap_con* get_con_hcihdl(u16 hdl);l2cap_con* check_remote_cid(u16 hdl, CID remote_cid);u16 get_cid(void);void show_con(const u8* head, l2cap_con* con);void show_list(void);s32 count_con(u16 hci_hdl);#if L2CAP_SELFTESTvoid test_conlist(void);s32 remove_rcid(CID rcid);#endifs32 l2cap_sprint_con(u8 *buf, l2cap_con* con);s32 l2cap_sprint_active(u8 *buf);#endif/****************** END OF FILE l2cap_con.h *********************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -