net/bluetooth/bnep/bnep.h
Source file repositories/reference/linux-study-clean/net/bluetooth/bnep/bnep.h
File Facts
- System
- Linux kernel
- Corpus path
net/bluetooth/bnep/bnep.h- Extension
.h- Size
- 3656 bytes
- Lines
- 174
- 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.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/crc32.hnet/bluetooth/bluetooth.h
Detected Declarations
struct bnep_setup_conn_reqstruct bnep_set_filter_reqstruct bnep_control_rspstruct bnep_ext_hdrstruct bnep_connadd_reqstruct bnep_conndel_reqstruct bnep_conninfostruct bnep_connlist_reqstruct bnep_proto_filterstruct bnep_sessionfunction bnep_mc_hash
Annotated Snippet
struct bnep_setup_conn_req {
__u8 type;
__u8 ctrl;
__u8 uuid_size;
__u8 service[];
} __packed;
struct bnep_set_filter_req {
__u8 type;
__u8 ctrl;
__be16 len;
__u8 list[];
} __packed;
struct bnep_control_rsp {
__u8 type;
__u8 ctrl;
__be16 resp;
} __packed;
struct bnep_ext_hdr {
__u8 type;
__u8 len;
__u8 data[];
} __packed;
/* BNEP ioctl defines */
#define BNEPCONNADD _IOW('B', 200, int)
#define BNEPCONNDEL _IOW('B', 201, int)
#define BNEPGETCONNLIST _IOR('B', 210, int)
#define BNEPGETCONNINFO _IOR('B', 211, int)
#define BNEPGETSUPPFEAT _IOR('B', 212, int)
#define BNEP_SETUP_RESPONSE 0
#define BNEP_SETUP_RSP_SENT 10
struct bnep_connadd_req {
int sock; /* Connected socket */
__u32 flags;
__u16 role;
char device[16]; /* Name of the Ethernet device */
};
struct bnep_conndel_req {
__u32 flags;
__u8 dst[ETH_ALEN];
};
struct bnep_conninfo {
__u32 flags;
__u16 role;
__u16 state;
__u8 dst[ETH_ALEN];
char device[16];
};
struct bnep_connlist_req {
__u32 cnum;
struct bnep_conninfo __user *ci;
};
struct bnep_proto_filter {
__u16 start;
__u16 end;
};
int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock);
int bnep_del_connection(struct bnep_conndel_req *req);
int bnep_get_connlist(struct bnep_connlist_req *req);
int bnep_get_conninfo(struct bnep_conninfo *ci);
/* BNEP sessions */
struct bnep_session {
struct list_head list;
unsigned int role;
unsigned long state;
unsigned long flags;
atomic_t terminate;
struct task_struct *task;
struct ethhdr eh;
struct msghdr msg;
struct bnep_proto_filter proto_filter[BNEP_MAX_PROTO_FILTERS];
unsigned long long mc_filter;
struct socket *sock;
struct net_device *dev;
};
Annotation
- Immediate include surface: `linux/types.h`, `linux/crc32.h`, `net/bluetooth/bluetooth.h`.
- Detected declarations: `struct bnep_setup_conn_req`, `struct bnep_set_filter_req`, `struct bnep_control_rsp`, `struct bnep_ext_hdr`, `struct bnep_connadd_req`, `struct bnep_conndel_req`, `struct bnep_conninfo`, `struct bnep_connlist_req`, `struct bnep_proto_filter`, `struct bnep_session`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.