Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
l2cap.h File Reference
#include <asm/unaligned.h>

Go to the source code of this file.

Data Structures

struct  sockaddr_l2
 
struct  l2cap_options
 
struct  l2cap_conninfo
 
struct  l2cap_hdr
 
struct  l2cap_cmd_hdr
 
struct  l2cap_cmd_rej_unk
 
struct  l2cap_cmd_rej_mtu
 
struct  l2cap_cmd_rej_cid
 
struct  l2cap_conn_req
 
struct  l2cap_conn_rsp
 
struct  l2cap_conf_req
 
struct  l2cap_conf_rsp
 
struct  l2cap_conf_opt
 
struct  l2cap_conf_rfc
 
struct  l2cap_conf_efs
 
struct  l2cap_disconn_req
 
struct  l2cap_disconn_rsp
 
struct  l2cap_info_req
 
struct  l2cap_info_rsp
 
struct  l2cap_create_chan_req
 
struct  l2cap_create_chan_rsp
 
struct  l2cap_move_chan_req
 
struct  l2cap_move_chan_rsp
 
struct  l2cap_move_chan_cfm
 
struct  l2cap_move_chan_cfm_rsp
 
struct  l2cap_conn_param_update_req
 
struct  l2cap_conn_param_update_rsp
 
struct  l2cap_seq_list
 
struct  l2cap_chan
 
struct  l2cap_ops
 
struct  l2cap_conn
 
struct  l2cap_pinfo
 

Macros

#define L2CAP_DEFAULT_MTU   672
 
#define L2CAP_DEFAULT_MIN_MTU   48
 
#define L2CAP_DEFAULT_FLUSH_TO   0xffff
 
#define L2CAP_DEFAULT_TX_WINDOW   63
 
#define L2CAP_DEFAULT_EXT_WINDOW   0x3FFF
 
#define L2CAP_DEFAULT_MAX_TX   3
 
#define L2CAP_DEFAULT_RETRANS_TO   2000 /* 2 seconds */
 
#define L2CAP_DEFAULT_MONITOR_TO   12000 /* 12 seconds */
 
#define L2CAP_DEFAULT_MAX_PDU_SIZE   1009 /* Sized for 3-DH5 packet */
 
#define L2CAP_DEFAULT_ACK_TO   200
 
#define L2CAP_DEFAULT_MAX_SDU_SIZE   0xFFFF
 
#define L2CAP_DEFAULT_SDU_ITIME   0xFFFFFFFF
 
#define L2CAP_DEFAULT_ACC_LAT   0xFFFFFFFF
 
#define L2CAP_BREDR_MAX_PAYLOAD   1019 /* 3-DH5 packet */
 
#define L2CAP_LE_MIN_MTU   23
 
#define L2CAP_DISC_TIMEOUT   msecs_to_jiffies(100)
 
#define L2CAP_DISC_REJ_TIMEOUT   msecs_to_jiffies(5000)
 
#define L2CAP_ENC_TIMEOUT   msecs_to_jiffies(5000)
 
#define L2CAP_CONN_TIMEOUT   msecs_to_jiffies(40000)
 
#define L2CAP_INFO_TIMEOUT   msecs_to_jiffies(4000)
 
#define L2CAP_A2MP_DEFAULT_MTU   670
 
#define L2CAP_OPTIONS   0x01
 
#define L2CAP_CONNINFO   0x02
 
#define L2CAP_LM   0x03
 
#define L2CAP_LM_MASTER   0x0001
 
#define L2CAP_LM_AUTH   0x0002
 
#define L2CAP_LM_ENCRYPT   0x0004
 
#define L2CAP_LM_TRUSTED   0x0008
 
#define L2CAP_LM_RELIABLE   0x0010
 
#define L2CAP_LM_SECURE   0x0020
 
#define L2CAP_COMMAND_REJ   0x01
 
#define L2CAP_CONN_REQ   0x02
 
#define L2CAP_CONN_RSP   0x03
 
#define L2CAP_CONF_REQ   0x04
 
#define L2CAP_CONF_RSP   0x05
 
#define L2CAP_DISCONN_REQ   0x06
 
#define L2CAP_DISCONN_RSP   0x07
 
#define L2CAP_ECHO_REQ   0x08
 
#define L2CAP_ECHO_RSP   0x09
 
#define L2CAP_INFO_REQ   0x0a
 
#define L2CAP_INFO_RSP   0x0b
 
#define L2CAP_CREATE_CHAN_REQ   0x0c
 
#define L2CAP_CREATE_CHAN_RSP   0x0d
 
#define L2CAP_MOVE_CHAN_REQ   0x0e
 
#define L2CAP_MOVE_CHAN_RSP   0x0f
 
#define L2CAP_MOVE_CHAN_CFM   0x10
 
#define L2CAP_MOVE_CHAN_CFM_RSP   0x11
 
#define L2CAP_CONN_PARAM_UPDATE_REQ   0x12
 
#define L2CAP_CONN_PARAM_UPDATE_RSP   0x13
 
#define L2CAP_FEAT_FLOWCTL   0x00000001
 
#define L2CAP_FEAT_RETRANS   0x00000002
 
#define L2CAP_FEAT_BIDIR_QOS   0x00000004
 
#define L2CAP_FEAT_ERTM   0x00000008
 
#define L2CAP_FEAT_STREAMING   0x00000010
 
#define L2CAP_FEAT_FCS   0x00000020
 
#define L2CAP_FEAT_EXT_FLOW   0x00000040
 
#define L2CAP_FEAT_FIXED_CHAN   0x00000080
 
#define L2CAP_FEAT_EXT_WINDOW   0x00000100
 
#define L2CAP_FEAT_UCD   0x00000200
 
#define L2CAP_FCS_NONE   0x00
 
#define L2CAP_FCS_CRC16   0x01
 
#define L2CAP_FC_L2CAP   0x02
 
#define L2CAP_FC_A2MP   0x08
 
#define L2CAP_CTRL_SAR   0xC000
 
#define L2CAP_CTRL_REQSEQ   0x3F00
 
#define L2CAP_CTRL_TXSEQ   0x007E
 
#define L2CAP_CTRL_SUPERVISE   0x000C
 
#define L2CAP_CTRL_RETRANS   0x0080
 
#define L2CAP_CTRL_FINAL   0x0080
 
#define L2CAP_CTRL_POLL   0x0010
 
#define L2CAP_CTRL_FRAME_TYPE   0x0001 /* I- or S-Frame */
 
#define L2CAP_CTRL_TXSEQ_SHIFT   1
 
#define L2CAP_CTRL_SUPER_SHIFT   2
 
#define L2CAP_CTRL_POLL_SHIFT   4
 
#define L2CAP_CTRL_FINAL_SHIFT   7
 
#define L2CAP_CTRL_REQSEQ_SHIFT   8
 
#define L2CAP_CTRL_SAR_SHIFT   14
 
#define L2CAP_EXT_CTRL_TXSEQ   0xFFFC0000
 
#define L2CAP_EXT_CTRL_SAR   0x00030000
 
#define L2CAP_EXT_CTRL_SUPERVISE   0x00030000
 
#define L2CAP_EXT_CTRL_REQSEQ   0x0000FFFC
 
#define L2CAP_EXT_CTRL_POLL   0x00040000
 
#define L2CAP_EXT_CTRL_FINAL   0x00000002
 
#define L2CAP_EXT_CTRL_FRAME_TYPE   0x00000001 /* I- or S-Frame */
 
#define L2CAP_EXT_CTRL_FINAL_SHIFT   1
 
#define L2CAP_EXT_CTRL_REQSEQ_SHIFT   2
 
#define L2CAP_EXT_CTRL_SAR_SHIFT   16
 
#define L2CAP_EXT_CTRL_SUPER_SHIFT   16
 
#define L2CAP_EXT_CTRL_POLL_SHIFT   18
 
#define L2CAP_EXT_CTRL_TXSEQ_SHIFT   18
 
#define L2CAP_SUPER_RR   0x00
 
#define L2CAP_SUPER_REJ   0x01
 
#define L2CAP_SUPER_RNR   0x02
 
#define L2CAP_SUPER_SREJ   0x03
 
#define L2CAP_SAR_UNSEGMENTED   0x00
 
#define L2CAP_SAR_START   0x01
 
#define L2CAP_SAR_END   0x02
 
#define L2CAP_SAR_CONTINUE   0x03
 
#define L2CAP_REJ_NOT_UNDERSTOOD   0x0000
 
#define L2CAP_REJ_MTU_EXCEEDED   0x0001
 
#define L2CAP_REJ_INVALID_CID   0x0002
 
#define L2CAP_HDR_SIZE   4
 
#define L2CAP_ENH_HDR_SIZE   6
 
#define L2CAP_EXT_HDR_SIZE   8
 
#define L2CAP_FCS_SIZE   2
 
#define L2CAP_SDULEN_SIZE   2
 
#define L2CAP_PSMLEN_SIZE   2
 
#define L2CAP_ENH_CTRL_SIZE   2
 
#define L2CAP_EXT_CTRL_SIZE   4
 
#define L2CAP_CMD_HDR_SIZE   4
 
#define L2CAP_PSM_SDP   0x0001
 
#define L2CAP_PSM_RFCOMM   0x0003
 
#define L2CAP_CID_SIGNALING   0x0001
 
#define L2CAP_CID_CONN_LESS   0x0002
 
#define L2CAP_CID_A2MP   0x0003
 
#define L2CAP_CID_LE_DATA   0x0004
 
#define L2CAP_CID_LE_SIGNALING   0x0005
 
#define L2CAP_CID_SMP   0x0006
 
#define L2CAP_CID_DYN_START   0x0040
 
#define L2CAP_CID_DYN_END   0xffff
 
#define L2CAP_CR_SUCCESS   0x0000
 
#define L2CAP_CR_PEND   0x0001
 
#define L2CAP_CR_BAD_PSM   0x0002
 
#define L2CAP_CR_SEC_BLOCK   0x0003
 
#define L2CAP_CR_NO_MEM   0x0004
 
#define L2CAP_CR_BAD_AMP   0x0005
 
#define L2CAP_CS_NO_INFO   0x0000
 
#define L2CAP_CS_AUTHEN_PEND   0x0001
 
#define L2CAP_CS_AUTHOR_PEND   0x0002
 
#define L2CAP_CONF_SUCCESS   0x0000
 
#define L2CAP_CONF_UNACCEPT   0x0001
 
#define L2CAP_CONF_REJECT   0x0002
 
#define L2CAP_CONF_UNKNOWN   0x0003
 
#define L2CAP_CONF_PENDING   0x0004
 
#define L2CAP_CONF_EFS_REJECT   0x0005
 
#define L2CAP_CONF_FLAG_CONTINUATION   0x0001
 
#define L2CAP_CONF_OPT_SIZE   2
 
#define L2CAP_CONF_HINT   0x80
 
#define L2CAP_CONF_MASK   0x7f
 
#define L2CAP_CONF_MTU   0x01
 
#define L2CAP_CONF_FLUSH_TO   0x02
 
#define L2CAP_CONF_QOS   0x03
 
#define L2CAP_CONF_RFC   0x04
 
#define L2CAP_CONF_FCS   0x05
 
#define L2CAP_CONF_EFS   0x06
 
#define L2CAP_CONF_EWS   0x07
 
#define L2CAP_CONF_MAX_SIZE   22
 
#define L2CAP_MODE_BASIC   0x00
 
#define L2CAP_MODE_RETRANS   0x01
 
#define L2CAP_MODE_FLOWCTL   0x02
 
#define L2CAP_MODE_ERTM   0x03
 
#define L2CAP_MODE_STREAMING   0x04
 
#define L2CAP_SERV_NOTRAFIC   0x00
 
#define L2CAP_SERV_BESTEFFORT   0x01
 
#define L2CAP_SERV_GUARANTEED   0x02
 
#define L2CAP_BESTEFFORT_ID   0x01
 
#define L2CAP_MR_SUCCESS   0x0000
 
#define L2CAP_MR_PEND   0x0001
 
#define L2CAP_MR_BAD_ID   0x0002
 
#define L2CAP_MR_SAME_ID   0x0003
 
#define L2CAP_MR_NOT_SUPP   0x0004
 
#define L2CAP_MR_COLLISION   0x0005
 
#define L2CAP_MR_NOT_ALLOWED   0x0006
 
#define L2CAP_MC_CONFIRMED   0x0000
 
#define L2CAP_MC_UNCONFIRMED   0x0001
 
#define L2CAP_IT_CL_MTU   0x0001
 
#define L2CAP_IT_FEAT_MASK   0x0002
 
#define L2CAP_IT_FIXED_CHAN   0x0003
 
#define L2CAP_IR_SUCCESS   0x0000
 
#define L2CAP_IR_NOTSUPP   0x0001
 
#define L2CAP_CONN_PARAM_ACCEPTED   0x0000
 
#define L2CAP_CONN_PARAM_REJECTED   0x0001
 
#define L2CAP_SEQ_LIST_CLEAR   0xFFFF
 
#define L2CAP_SEQ_LIST_TAIL   0x8000
 
#define L2CAP_INFO_CL_MTU_REQ_SENT   0x01
 
#define L2CAP_INFO_FEAT_MASK_REQ_SENT   0x04
 
#define L2CAP_INFO_FEAT_MASK_REQ_DONE   0x08
 
#define L2CAP_CHAN_RAW   1
 
#define L2CAP_CHAN_CONN_LESS   2
 
#define L2CAP_CHAN_CONN_ORIENTED   3
 
#define L2CAP_CHAN_CONN_FIX_A2MP   4
 
#define l2cap_pi(sk)   ((struct l2cap_pinfo *) sk)
 
#define L2CAP_CONF_MAX_CONF_REQ   2
 
#define L2CAP_CONF_MAX_CONF_RSP   2
 
#define __set_chan_timer(c, t)   l2cap_set_timer(c, &c->chan_timer, (t))
 
#define __clear_chan_timer(c)   l2cap_clear_timer(c, &c->chan_timer)
 
#define __clear_retrans_timer(c)   l2cap_clear_timer(c, &c->retrans_timer)
 
#define __clear_monitor_timer(c)   l2cap_clear_timer(c, &c->monitor_timer)
 
#define __set_ack_timer(c)
 
#define __clear_ack_timer(c)   l2cap_clear_timer(c, &c->ack_timer)
 

Enumerations

enum  {
  CONF_REQ_SENT, CONF_INPUT_DONE, CONF_OUTPUT_DONE, CONF_MTU_DONE,
  CONF_MODE_DONE, CONF_CONNECT_PEND, CONF_NO_FCS_RECV, CONF_STATE2_DEVICE,
  CONF_EWS_RECV, CONF_LOC_CONF_PEND, CONF_REM_CONF_PEND, CONF_NOT_COMPLETE
}
 
enum  {
  CONN_SREJ_SENT, CONN_WAIT_F, CONN_SREJ_ACT, CONN_SEND_PBIT,
  CONN_REMOTE_BUSY, CONN_LOCAL_BUSY, CONN_REJ_ACT, CONN_SEND_FBIT,
  CONN_RNR_SENT
}
 
enum  {
  FLAG_ROLE_SWITCH, FLAG_FORCE_ACTIVE, FLAG_FORCE_RELIABLE, FLAG_FLUSHABLE,
  FLAG_EXT_CTRL, FLAG_EFS_ENABLE
}
 
enum  { L2CAP_TX_STATE_XMIT, L2CAP_TX_STATE_WAIT_F }
 
enum  { L2CAP_RX_STATE_RECV, L2CAP_RX_STATE_SREJ_SENT }
 
enum  {
  L2CAP_TXSEQ_EXPECTED, L2CAP_TXSEQ_EXPECTED_SREJ, L2CAP_TXSEQ_UNEXPECTED, L2CAP_TXSEQ_UNEXPECTED_SREJ,
  L2CAP_TXSEQ_DUPLICATE, L2CAP_TXSEQ_DUPLICATE_SREJ, L2CAP_TXSEQ_INVALID, L2CAP_TXSEQ_INVALID_IGNORE
}
 
enum  {
  L2CAP_EV_DATA_REQUEST, L2CAP_EV_LOCAL_BUSY_DETECTED, L2CAP_EV_LOCAL_BUSY_CLEAR, L2CAP_EV_RECV_REQSEQ_AND_FBIT,
  L2CAP_EV_RECV_FBIT, L2CAP_EV_RETRANS_TO, L2CAP_EV_MONITOR_TO, L2CAP_EV_EXPLICIT_POLL,
  L2CAP_EV_RECV_IFRAME, L2CAP_EV_RECV_RR, L2CAP_EV_RECV_REJ, L2CAP_EV_RECV_RNR,
  L2CAP_EV_RECV_SREJ, L2CAP_EV_RECV_FRAME
}
 

Functions

void l2cap_chan_hold (struct l2cap_chan *c)
 
void l2cap_chan_put (struct l2cap_chan *c)
 
int l2cap_init_sockets (void)
 
void l2cap_cleanup_sockets (void)
 
void __l2cap_connect_rsp_defer (struct l2cap_chan *chan)
 
int __l2cap_wait_ack (struct sock *sk)
 
int l2cap_add_psm (struct l2cap_chan *chan, bdaddr_t *src, __le16 psm)
 
int l2cap_add_scid (struct l2cap_chan *chan, __u16 scid)
 
struct l2cap_chanl2cap_chan_create (void)
 
void l2cap_chan_close (struct l2cap_chan *chan, int reason)
 
int l2cap_chan_connect (struct l2cap_chan *chan, __le16 psm, u16 cid, bdaddr_t *dst, u8 dst_type)
 
int l2cap_chan_send (struct l2cap_chan *chan, struct msghdr *msg, size_t len, u32 priority)
 
void l2cap_chan_busy (struct l2cap_chan *chan, int busy)
 
int l2cap_chan_check_security (struct l2cap_chan *chan)
 
void l2cap_chan_set_defaults (struct l2cap_chan *chan)
 
int l2cap_ertm_init (struct l2cap_chan *chan)
 
void l2cap_chan_add (struct l2cap_conn *conn, struct l2cap_chan *chan)
 
void l2cap_chan_del (struct l2cap_chan *chan, int err)
 

Variables

struct l2cap_hdr __packed
 
bool disable_ertm
 

Macro Definition Documentation

#define __clear_ack_timer (   c)    l2cap_clear_timer(c, &c->ack_timer)

Definition at line 720 of file l2cap.h.

#define __clear_chan_timer (   c)    l2cap_clear_timer(c, &c->chan_timer)

Definition at line 715 of file l2cap.h.

#define __clear_monitor_timer (   c)    l2cap_clear_timer(c, &c->monitor_timer)

Definition at line 717 of file l2cap.h.

#define __clear_retrans_timer (   c)    l2cap_clear_timer(c, &c->retrans_timer)

Definition at line 716 of file l2cap.h.

#define __set_ack_timer (   c)
Value:
l2cap_set_timer(c, &chan->ack_timer, \

Definition at line 718 of file l2cap.h.

#define __set_chan_timer (   c,
  t 
)    l2cap_set_timer(c, &c->chan_timer, (t))

Definition at line 714 of file l2cap.h.

#define L2CAP_A2MP_DEFAULT_MTU   670

Definition at line 55 of file l2cap.h.

#define L2CAP_BESTEFFORT_ID   0x01

Definition at line 332 of file l2cap.h.

#define L2CAP_BREDR_MAX_PAYLOAD   1019 /* 3-DH5 packet */

Definition at line 46 of file l2cap.h.

#define L2CAP_CHAN_CONN_FIX_A2MP   4

Definition at line 584 of file l2cap.h.

#define L2CAP_CHAN_CONN_LESS   2

Definition at line 582 of file l2cap.h.

#define L2CAP_CHAN_CONN_ORIENTED   3

Definition at line 583 of file l2cap.h.

#define L2CAP_CHAN_RAW   1

Definition at line 581 of file l2cap.h.

#define L2CAP_CID_A2MP   0x0003

Definition at line 241 of file l2cap.h.

#define L2CAP_CID_CONN_LESS   0x0002

Definition at line 240 of file l2cap.h.

#define L2CAP_CID_DYN_END   0xffff

Definition at line 246 of file l2cap.h.

#define L2CAP_CID_DYN_START   0x0040

Definition at line 245 of file l2cap.h.

#define L2CAP_CID_LE_DATA   0x0004

Definition at line 242 of file l2cap.h.

#define L2CAP_CID_LE_SIGNALING   0x0005

Definition at line 243 of file l2cap.h.

#define L2CAP_CID_SIGNALING   0x0001

Definition at line 239 of file l2cap.h.

#define L2CAP_CID_SMP   0x0006

Definition at line 244 of file l2cap.h.

#define L2CAP_CMD_HDR_SIZE   4

Definition at line 205 of file l2cap.h.

#define L2CAP_COMMAND_REJ   0x01

Definition at line 93 of file l2cap.h.

#define L2CAP_CONF_EFS   0x06

Definition at line 299 of file l2cap.h.

#define L2CAP_CONF_EFS_REJECT   0x0005

Definition at line 279 of file l2cap.h.

#define L2CAP_CONF_EWS   0x07

Definition at line 300 of file l2cap.h.

#define L2CAP_CONF_FCS   0x05

Definition at line 298 of file l2cap.h.

#define L2CAP_CONF_FLAG_CONTINUATION   0x0001

Definition at line 282 of file l2cap.h.

#define L2CAP_CONF_FLUSH_TO   0x02

Definition at line 295 of file l2cap.h.

#define L2CAP_CONF_HINT   0x80

Definition at line 291 of file l2cap.h.

#define L2CAP_CONF_MASK   0x7f

Definition at line 292 of file l2cap.h.

#define L2CAP_CONF_MAX_CONF_REQ   2

Definition at line 610 of file l2cap.h.

#define L2CAP_CONF_MAX_CONF_RSP   2

Definition at line 611 of file l2cap.h.

#define L2CAP_CONF_MAX_SIZE   22

Definition at line 302 of file l2cap.h.

#define L2CAP_CONF_MTU   0x01

Definition at line 294 of file l2cap.h.

#define L2CAP_CONF_OPT_SIZE   2

Definition at line 289 of file l2cap.h.

#define L2CAP_CONF_PENDING   0x0004

Definition at line 278 of file l2cap.h.

#define L2CAP_CONF_QOS   0x03

Definition at line 296 of file l2cap.h.

#define L2CAP_CONF_REJECT   0x0002

Definition at line 276 of file l2cap.h.

#define L2CAP_CONF_REQ   0x04

Definition at line 96 of file l2cap.h.

#define L2CAP_CONF_RFC   0x04

Definition at line 297 of file l2cap.h.

#define L2CAP_CONF_RSP   0x05

Definition at line 97 of file l2cap.h.

#define L2CAP_CONF_SUCCESS   0x0000

Definition at line 274 of file l2cap.h.

#define L2CAP_CONF_UNACCEPT   0x0001

Definition at line 275 of file l2cap.h.

#define L2CAP_CONF_UNKNOWN   0x0003

Definition at line 277 of file l2cap.h.

#define L2CAP_CONN_PARAM_ACCEPTED   0x0000

Definition at line 418 of file l2cap.h.

#define L2CAP_CONN_PARAM_REJECTED   0x0001

Definition at line 419 of file l2cap.h.

#define L2CAP_CONN_PARAM_UPDATE_REQ   0x12

Definition at line 110 of file l2cap.h.

#define L2CAP_CONN_PARAM_UPDATE_RSP   0x13

Definition at line 111 of file l2cap.h.

#define L2CAP_CONN_REQ   0x02

Definition at line 94 of file l2cap.h.

#define L2CAP_CONN_RSP   0x03

Definition at line 95 of file l2cap.h.

#define L2CAP_CONN_TIMEOUT   msecs_to_jiffies(40000)

Definition at line 52 of file l2cap.h.

#define L2CAP_CONNINFO   0x02

Definition at line 78 of file l2cap.h.

#define L2CAP_CR_BAD_AMP   0x0005

Definition at line 254 of file l2cap.h.

#define L2CAP_CR_BAD_PSM   0x0002

Definition at line 251 of file l2cap.h.

#define L2CAP_CR_NO_MEM   0x0004

Definition at line 253 of file l2cap.h.

#define L2CAP_CR_PEND   0x0001

Definition at line 250 of file l2cap.h.

#define L2CAP_CR_SEC_BLOCK   0x0003

Definition at line 252 of file l2cap.h.

#define L2CAP_CR_SUCCESS   0x0000

Definition at line 249 of file l2cap.h.

#define L2CAP_CREATE_CHAN_REQ   0x0c

Definition at line 104 of file l2cap.h.

#define L2CAP_CREATE_CHAN_RSP   0x0d

Definition at line 105 of file l2cap.h.

#define L2CAP_CS_AUTHEN_PEND   0x0001

Definition at line 258 of file l2cap.h.

#define L2CAP_CS_AUTHOR_PEND   0x0002

Definition at line 259 of file l2cap.h.

#define L2CAP_CS_NO_INFO   0x0000

Definition at line 257 of file l2cap.h.

#define L2CAP_CTRL_FINAL   0x0080

Definition at line 140 of file l2cap.h.

#define L2CAP_CTRL_FINAL_SHIFT   7

Definition at line 147 of file l2cap.h.

#define L2CAP_CTRL_FRAME_TYPE   0x0001 /* I- or S-Frame */

Definition at line 142 of file l2cap.h.

#define L2CAP_CTRL_POLL   0x0010

Definition at line 141 of file l2cap.h.

#define L2CAP_CTRL_POLL_SHIFT   4

Definition at line 146 of file l2cap.h.

#define L2CAP_CTRL_REQSEQ   0x3F00

Definition at line 135 of file l2cap.h.

#define L2CAP_CTRL_REQSEQ_SHIFT   8

Definition at line 148 of file l2cap.h.

#define L2CAP_CTRL_RETRANS   0x0080

Definition at line 139 of file l2cap.h.

#define L2CAP_CTRL_SAR   0xC000

Definition at line 134 of file l2cap.h.

#define L2CAP_CTRL_SAR_SHIFT   14

Definition at line 149 of file l2cap.h.

#define L2CAP_CTRL_SUPER_SHIFT   2

Definition at line 145 of file l2cap.h.

#define L2CAP_CTRL_SUPERVISE   0x000C

Definition at line 137 of file l2cap.h.

#define L2CAP_CTRL_TXSEQ   0x007E

Definition at line 136 of file l2cap.h.

#define L2CAP_CTRL_TXSEQ_SHIFT   1

Definition at line 144 of file l2cap.h.

#define L2CAP_DEFAULT_ACC_LAT   0xFFFFFFFF

Definition at line 45 of file l2cap.h.

#define L2CAP_DEFAULT_ACK_TO   200

Definition at line 42 of file l2cap.h.

#define L2CAP_DEFAULT_EXT_WINDOW   0x3FFF

Definition at line 37 of file l2cap.h.

#define L2CAP_DEFAULT_FLUSH_TO   0xffff

Definition at line 35 of file l2cap.h.

#define L2CAP_DEFAULT_MAX_PDU_SIZE   1009 /* Sized for 3-DH5 packet */

Definition at line 41 of file l2cap.h.

#define L2CAP_DEFAULT_MAX_SDU_SIZE   0xFFFF

Definition at line 43 of file l2cap.h.

#define L2CAP_DEFAULT_MAX_TX   3

Definition at line 38 of file l2cap.h.

#define L2CAP_DEFAULT_MIN_MTU   48

Definition at line 34 of file l2cap.h.

#define L2CAP_DEFAULT_MONITOR_TO   12000 /* 12 seconds */

Definition at line 40 of file l2cap.h.

#define L2CAP_DEFAULT_MTU   672

Definition at line 33 of file l2cap.h.

#define L2CAP_DEFAULT_RETRANS_TO   2000 /* 2 seconds */

Definition at line 39 of file l2cap.h.

#define L2CAP_DEFAULT_SDU_ITIME   0xFFFFFFFF

Definition at line 44 of file l2cap.h.

#define L2CAP_DEFAULT_TX_WINDOW   63

Definition at line 36 of file l2cap.h.

#define L2CAP_DISC_REJ_TIMEOUT   msecs_to_jiffies(5000)

Definition at line 50 of file l2cap.h.

#define L2CAP_DISC_TIMEOUT   msecs_to_jiffies(100)

Definition at line 49 of file l2cap.h.

#define L2CAP_DISCONN_REQ   0x06

Definition at line 98 of file l2cap.h.

#define L2CAP_DISCONN_RSP   0x07

Definition at line 99 of file l2cap.h.

#define L2CAP_ECHO_REQ   0x08

Definition at line 100 of file l2cap.h.

#define L2CAP_ECHO_RSP   0x09

Definition at line 101 of file l2cap.h.

#define L2CAP_ENC_TIMEOUT   msecs_to_jiffies(5000)

Definition at line 51 of file l2cap.h.

#define L2CAP_ENH_CTRL_SIZE   2

Definition at line 197 of file l2cap.h.

#define L2CAP_ENH_HDR_SIZE   6

Definition at line 191 of file l2cap.h.

#define L2CAP_EXT_CTRL_FINAL   0x00000002

Definition at line 158 of file l2cap.h.

#define L2CAP_EXT_CTRL_FINAL_SHIFT   1

Definition at line 161 of file l2cap.h.

#define L2CAP_EXT_CTRL_FRAME_TYPE   0x00000001 /* I- or S-Frame */

Definition at line 159 of file l2cap.h.

#define L2CAP_EXT_CTRL_POLL   0x00040000

Definition at line 157 of file l2cap.h.

#define L2CAP_EXT_CTRL_POLL_SHIFT   18

Definition at line 165 of file l2cap.h.

#define L2CAP_EXT_CTRL_REQSEQ   0x0000FFFC

Definition at line 155 of file l2cap.h.

#define L2CAP_EXT_CTRL_REQSEQ_SHIFT   2

Definition at line 162 of file l2cap.h.

#define L2CAP_EXT_CTRL_SAR   0x00030000

Definition at line 153 of file l2cap.h.

#define L2CAP_EXT_CTRL_SAR_SHIFT   16

Definition at line 163 of file l2cap.h.

#define L2CAP_EXT_CTRL_SIZE   4

Definition at line 198 of file l2cap.h.

#define L2CAP_EXT_CTRL_SUPER_SHIFT   16

Definition at line 164 of file l2cap.h.

#define L2CAP_EXT_CTRL_SUPERVISE   0x00030000

Definition at line 154 of file l2cap.h.

#define L2CAP_EXT_CTRL_TXSEQ   0xFFFC0000

Definition at line 152 of file l2cap.h.

#define L2CAP_EXT_CTRL_TXSEQ_SHIFT   18

Definition at line 166 of file l2cap.h.

#define L2CAP_EXT_HDR_SIZE   8

Definition at line 192 of file l2cap.h.

#define L2CAP_FC_A2MP   0x08

Definition at line 131 of file l2cap.h.

#define L2CAP_FC_L2CAP   0x02

Definition at line 130 of file l2cap.h.

#define L2CAP_FCS_CRC16   0x01

Definition at line 127 of file l2cap.h.

#define L2CAP_FCS_NONE   0x00

Definition at line 126 of file l2cap.h.

#define L2CAP_FCS_SIZE   2

Definition at line 194 of file l2cap.h.

#define L2CAP_FEAT_BIDIR_QOS   0x00000004

Definition at line 116 of file l2cap.h.

#define L2CAP_FEAT_ERTM   0x00000008

Definition at line 117 of file l2cap.h.

#define L2CAP_FEAT_EXT_FLOW   0x00000040

Definition at line 120 of file l2cap.h.

#define L2CAP_FEAT_EXT_WINDOW   0x00000100

Definition at line 122 of file l2cap.h.

#define L2CAP_FEAT_FCS   0x00000020

Definition at line 119 of file l2cap.h.

#define L2CAP_FEAT_FIXED_CHAN   0x00000080

Definition at line 121 of file l2cap.h.

#define L2CAP_FEAT_FLOWCTL   0x00000001

Definition at line 114 of file l2cap.h.

#define L2CAP_FEAT_RETRANS   0x00000002

Definition at line 115 of file l2cap.h.

#define L2CAP_FEAT_STREAMING   0x00000010

Definition at line 118 of file l2cap.h.

#define L2CAP_FEAT_UCD   0x00000200

Definition at line 123 of file l2cap.h.

#define L2CAP_HDR_SIZE   4

Definition at line 190 of file l2cap.h.

#define L2CAP_INFO_CL_MTU_REQ_SENT   0x01

Definition at line 577 of file l2cap.h.

#define L2CAP_INFO_FEAT_MASK_REQ_DONE   0x08

Definition at line 579 of file l2cap.h.

#define L2CAP_INFO_FEAT_MASK_REQ_SENT   0x04

Definition at line 578 of file l2cap.h.

#define L2CAP_INFO_REQ   0x0a

Definition at line 102 of file l2cap.h.

#define L2CAP_INFO_RSP   0x0b

Definition at line 103 of file l2cap.h.

#define L2CAP_INFO_TIMEOUT   msecs_to_jiffies(4000)

Definition at line 53 of file l2cap.h.

#define L2CAP_IR_NOTSUPP   0x0001

Definition at line 404 of file l2cap.h.

#define L2CAP_IR_SUCCESS   0x0000

Definition at line 403 of file l2cap.h.

#define L2CAP_IT_CL_MTU   0x0001

Definition at line 398 of file l2cap.h.

#define L2CAP_IT_FEAT_MASK   0x0002

Definition at line 399 of file l2cap.h.

#define L2CAP_IT_FIXED_CHAN   0x0003

Definition at line 400 of file l2cap.h.

#define L2CAP_LE_MIN_MTU   23

Definition at line 47 of file l2cap.h.

#define L2CAP_LM   0x03

Definition at line 84 of file l2cap.h.

#define L2CAP_LM_AUTH   0x0002

Definition at line 86 of file l2cap.h.

#define L2CAP_LM_ENCRYPT   0x0004

Definition at line 87 of file l2cap.h.

#define L2CAP_LM_MASTER   0x0001

Definition at line 85 of file l2cap.h.

#define L2CAP_LM_RELIABLE   0x0010

Definition at line 89 of file l2cap.h.

#define L2CAP_LM_SECURE   0x0020

Definition at line 90 of file l2cap.h.

#define L2CAP_LM_TRUSTED   0x0008

Definition at line 88 of file l2cap.h.

#define L2CAP_MC_CONFIRMED   0x0000

Definition at line 390 of file l2cap.h.

#define L2CAP_MC_UNCONFIRMED   0x0001

Definition at line 391 of file l2cap.h.

#define L2CAP_MODE_BASIC   0x00

Definition at line 313 of file l2cap.h.

#define L2CAP_MODE_ERTM   0x03

Definition at line 316 of file l2cap.h.

#define L2CAP_MODE_FLOWCTL   0x02

Definition at line 315 of file l2cap.h.

#define L2CAP_MODE_RETRANS   0x01

Definition at line 314 of file l2cap.h.

#define L2CAP_MODE_STREAMING   0x04

Definition at line 317 of file l2cap.h.

#define L2CAP_MOVE_CHAN_CFM   0x10

Definition at line 108 of file l2cap.h.

#define L2CAP_MOVE_CHAN_CFM_RSP   0x11

Definition at line 109 of file l2cap.h.

#define L2CAP_MOVE_CHAN_REQ   0x0e

Definition at line 106 of file l2cap.h.

#define L2CAP_MOVE_CHAN_RSP   0x0f

Definition at line 107 of file l2cap.h.

#define L2CAP_MR_BAD_ID   0x0002

Definition at line 379 of file l2cap.h.

#define L2CAP_MR_COLLISION   0x0005

Definition at line 382 of file l2cap.h.

#define L2CAP_MR_NOT_ALLOWED   0x0006

Definition at line 383 of file l2cap.h.

#define L2CAP_MR_NOT_SUPP   0x0004

Definition at line 381 of file l2cap.h.

#define L2CAP_MR_PEND   0x0001

Definition at line 378 of file l2cap.h.

#define L2CAP_MR_SAME_ID   0x0003

Definition at line 380 of file l2cap.h.

#define L2CAP_MR_SUCCESS   0x0000

Definition at line 377 of file l2cap.h.

#define L2CAP_OPTIONS   0x01

Definition at line 67 of file l2cap.h.

#define l2cap_pi (   sk)    ((struct l2cap_pinfo *) sk)

Definition at line 587 of file l2cap.h.

#define L2CAP_PSM_RFCOMM   0x0003

Definition at line 236 of file l2cap.h.

#define L2CAP_PSM_SDP   0x0001

Definition at line 235 of file l2cap.h.

#define L2CAP_PSMLEN_SIZE   2

Definition at line 196 of file l2cap.h.

#define L2CAP_REJ_INVALID_CID   0x0002

Definition at line 183 of file l2cap.h.

#define L2CAP_REJ_MTU_EXCEEDED   0x0001

Definition at line 182 of file l2cap.h.

#define L2CAP_REJ_NOT_UNDERSTOOD   0x0000

Definition at line 181 of file l2cap.h.

#define L2CAP_SAR_CONTINUE   0x03

Definition at line 178 of file l2cap.h.

#define L2CAP_SAR_END   0x02

Definition at line 177 of file l2cap.h.

#define L2CAP_SAR_START   0x01

Definition at line 176 of file l2cap.h.

#define L2CAP_SAR_UNSEGMENTED   0x00

Definition at line 175 of file l2cap.h.

#define L2CAP_SDULEN_SIZE   2

Definition at line 195 of file l2cap.h.

#define L2CAP_SEQ_LIST_CLEAR   0xFFFF

Definition at line 429 of file l2cap.h.

#define L2CAP_SEQ_LIST_TAIL   0x8000

Definition at line 430 of file l2cap.h.

#define L2CAP_SERV_BESTEFFORT   0x01

Definition at line 329 of file l2cap.h.

#define L2CAP_SERV_GUARANTEED   0x02

Definition at line 330 of file l2cap.h.

#define L2CAP_SERV_NOTRAFIC   0x00

Definition at line 328 of file l2cap.h.

#define L2CAP_SUPER_REJ   0x01

Definition at line 170 of file l2cap.h.

#define L2CAP_SUPER_RNR   0x02

Definition at line 171 of file l2cap.h.

#define L2CAP_SUPER_RR   0x00

Definition at line 169 of file l2cap.h.

#define L2CAP_SUPER_SREJ   0x03

Definition at line 172 of file l2cap.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
CONF_REQ_SENT 
CONF_INPUT_DONE 
CONF_OUTPUT_DONE 
CONF_MTU_DONE 
CONF_MODE_DONE 
CONF_CONNECT_PEND 
CONF_NO_FCS_RECV 
CONF_STATE2_DEVICE 
CONF_EWS_RECV 
CONF_LOC_CONF_PEND 
CONF_REM_CONF_PEND 
CONF_NOT_COMPLETE 

Definition at line 595 of file l2cap.h.

anonymous enum
Enumerator:
CONN_SREJ_SENT 
CONN_WAIT_F 
CONN_SREJ_ACT 
CONN_SEND_PBIT 
CONN_REMOTE_BUSY 
CONN_LOCAL_BUSY 
CONN_REJ_ACT 
CONN_SEND_FBIT 
CONN_RNR_SENT 

Definition at line 613 of file l2cap.h.

anonymous enum
Enumerator:
FLAG_ROLE_SWITCH 
FLAG_FORCE_ACTIVE 
FLAG_FORCE_RELIABLE 
FLAG_FLUSHABLE 
FLAG_EXT_CTRL 
FLAG_EFS_ENABLE 

Definition at line 626 of file l2cap.h.

anonymous enum
Enumerator:
L2CAP_TX_STATE_XMIT 
L2CAP_TX_STATE_WAIT_F 

Definition at line 635 of file l2cap.h.

anonymous enum
Enumerator:
L2CAP_RX_STATE_RECV 
L2CAP_RX_STATE_SREJ_SENT 

Definition at line 640 of file l2cap.h.

anonymous enum
Enumerator:
L2CAP_TXSEQ_EXPECTED 
L2CAP_TXSEQ_EXPECTED_SREJ 
L2CAP_TXSEQ_UNEXPECTED 
L2CAP_TXSEQ_UNEXPECTED_SREJ 
L2CAP_TXSEQ_DUPLICATE 
L2CAP_TXSEQ_DUPLICATE_SREJ 
L2CAP_TXSEQ_INVALID 
L2CAP_TXSEQ_INVALID_IGNORE 

Definition at line 645 of file l2cap.h.

anonymous enum
Enumerator:
L2CAP_EV_DATA_REQUEST 
L2CAP_EV_LOCAL_BUSY_DETECTED 
L2CAP_EV_LOCAL_BUSY_CLEAR 
L2CAP_EV_RECV_REQSEQ_AND_FBIT 
L2CAP_EV_RECV_FBIT 
L2CAP_EV_RETRANS_TO 
L2CAP_EV_MONITOR_TO 
L2CAP_EV_EXPLICIT_POLL 
L2CAP_EV_RECV_IFRAME 
L2CAP_EV_RECV_RR 
L2CAP_EV_RECV_REJ 
L2CAP_EV_RECV_RNR 
L2CAP_EV_RECV_SREJ 
L2CAP_EV_RECV_FRAME 

Definition at line 656 of file l2cap.h.

Function Documentation

void __l2cap_connect_rsp_defer ( struct l2cap_chan chan)

Definition at line 3270 of file l2cap_core.c.

int __l2cap_wait_ack ( struct sock sk)

Definition at line 1579 of file l2cap_core.c.

int l2cap_add_psm ( struct l2cap_chan chan,
bdaddr_t *  src,
__le16  psm 
)

Definition at line 122 of file l2cap_core.c.

int l2cap_add_scid ( struct l2cap_chan chan,
__u16  scid 
)

Definition at line 155 of file l2cap_core.c.

void l2cap_chan_add ( struct l2cap_conn conn,
struct l2cap_chan chan 
)

Definition at line 514 of file l2cap_core.c.

void l2cap_chan_busy ( struct l2cap_chan chan,
int  busy 
)

Definition at line 4495 of file l2cap_core.c.

int l2cap_chan_check_security ( struct l2cap_chan chan)

Definition at line 662 of file l2cap_core.c.

void l2cap_chan_close ( struct l2cap_chan chan,
int  reason 
)

Definition at line 571 of file l2cap_core.c.

int l2cap_chan_connect ( struct l2cap_chan chan,
__le16  psm,
u16  cid,
bdaddr_t *  dst,
u8  dst_type 
)

Definition at line 1440 of file l2cap_core.c.

struct l2cap_chan* l2cap_chan_create ( void  )
read

Definition at line 391 of file l2cap_core.c.

void l2cap_chan_del ( struct l2cap_chan chan,
int  err 
)

Definition at line 521 of file l2cap_core.c.

void l2cap_chan_hold ( struct l2cap_chan c)

Definition at line 432 of file l2cap_core.c.

void l2cap_chan_put ( struct l2cap_chan c)

Definition at line 439 of file l2cap_core.c.

int l2cap_chan_send ( struct l2cap_chan chan,
struct msghdr msg,
size_t  len,
u32  priority 
)

Definition at line 2158 of file l2cap_core.c.

void l2cap_chan_set_defaults ( struct l2cap_chan chan)

Definition at line 446 of file l2cap_core.c.

void l2cap_cleanup_sockets ( void  )

Definition at line 1280 of file l2cap_sock.c.

int l2cap_ertm_init ( struct l2cap_chan chan)

Definition at line 2735 of file l2cap_core.c.

int l2cap_init_sockets ( void  )

Definition at line 1250 of file l2cap_sock.c.

Variable Documentation

bool disable_ertm

Definition at line 42 of file l2cap_core.c.