include/net/bluetooth/rfcomm.h

Source file repositories/reference/linux-study-clean/include/net/bluetooth/rfcomm.h

File Facts

System
Linux kernel
Corpus path
include/net/bluetooth/rfcomm.h
Extension
.h
Size
9253 bytes
Lines
373
Domain
Networking Core
Bucket
Sockets, Protocols, Packet Path, And Network Policy
Inferred role
Networking Core: implementation source
Status
source implementation candidate

Why This File Exists

Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.

Dependency Surface

Detected Declarations

Annotated Snippet

struct rfcomm_hdr {
	u8 addr;
	u8 ctrl;
	u8 len;    /* Actual size can be 2 bytes */
} __packed;

struct rfcomm_cmd {
	u8 addr;
	u8 ctrl;
	u8 len;
	u8 fcs;
} __packed;

struct rfcomm_mcc {
	u8 type;
	u8 len;
} __packed;

struct rfcomm_pn {
	u8  dlci;
	u8  flow_ctrl;
	u8  priority;
	u8  ack_timer;
	__le16 mtu;
	u8  max_retrans;
	u8  credits;
} __packed;

struct rfcomm_rpn {
	u8  dlci;
	u8  bit_rate;
	u8  line_settings;
	u8  flow_ctrl;
	u8  xon_char;
	u8  xoff_char;
	__le16 param_mask;
} __packed;

struct rfcomm_rls {
	u8  dlci;
	u8  status;
} __packed;

struct rfcomm_msc {
	u8  dlci;
	u8  v24_sig;
} __packed;

/* ---- Core structures, flags etc ---- */

struct rfcomm_session {
	struct list_head list;
	struct socket   *sock;
	struct timer_list timer;
	unsigned long    state;
	unsigned long    flags;
	int              initiator;

	/* Default DLC parameters */
	int    cfc;
	uint   mtu;

	struct list_head dlcs;
};

struct rfcomm_dlc {
	struct list_head      list;
	struct rfcomm_session *session;
	struct sk_buff_head   tx_queue;
	struct timer_list     timer;

	struct mutex  lock;
	unsigned long state;
	unsigned long flags;
	refcount_t    refcnt;
	u8            dlci;
	u8            addr;
	u8            priority;
	u8            v24_sig;
	u8            remote_v24_sig;
	u8            mscex;
	u8            out;
	u8            sec_level;
	u8            role_switch;
	u32           defer_setup;

	uint          mtu;
	uint          cfc;
	uint          rx_credits;
	uint          tx_credits;

Annotation

Implementation Notes