include/net/bluetooth/hci_core.h
Source file repositories/reference/linux-study-clean/include/net/bluetooth/hci_core.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/bluetooth/hci_core.h- Extension
.h- Size
- 69695 bytes
- Lines
- 2513
- 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/idr.hlinux/leds.hlinux/rculist.hlinux/spinlock.hlinux/srcu.hnet/bluetooth/hci.hnet/bluetooth/hci_drv.hnet/bluetooth/hci_sync.hnet/bluetooth/hci_sock.hnet/bluetooth/coredump.h
Detected Declarations
struct inquiry_datastruct inquiry_entrystruct discovery_statestruct hci_conn_hashstruct bdaddr_liststruct codec_liststruct bdaddr_list_with_irkstruct bdaddr_list_with_flagsstruct bt_uuidstruct blocked_keystruct smp_csrkstruct smp_ltkstruct smp_irkstruct link_keystruct oob_datastruct adv_infostruct tx_queuestruct monitored_devicestruct adv_patternstruct adv_rssi_thresholdsstruct adv_monitorstruct hci_devstruct hci_connstruct hci_linkstruct hci_chanstruct hci_conn_paramsstruct hci_cbstruct hci_mgmt_handlerstruct hci_mgmt_chanenum suspend_tasksenum suspended_stateenum hci_conn_flagsenum conn_reasonsfunction sco_connect_indfunction sco_recv_scodatafunction iso_connect_indfunction iso_recvfunction discovery_initfunction hci_discovery_filter_clearfunction inquiry_cache_emptyfunction inquiry_cache_agefunction inquiry_entry_agefunction hci_conn_ssp_enabledfunction hci_conn_sc_enabledfunction hci_conn_hash_addfunction hci_conn_hash_delfunction hci_conn_numfunction hci_conn_count
Annotated Snippet
struct inquiry_data {
bdaddr_t bdaddr;
__u8 pscan_rep_mode;
__u8 pscan_period_mode;
__u8 pscan_mode;
__u8 dev_class[3];
__le16 clock_offset;
__s8 rssi;
__u8 ssp_mode;
};
struct inquiry_entry {
struct list_head all; /* inq_cache.all */
struct list_head list; /* unknown or resolve */
enum {
NAME_NOT_KNOWN,
NAME_NEEDED,
NAME_PENDING,
NAME_KNOWN,
} name_state;
__u32 timestamp;
struct inquiry_data data;
};
struct discovery_state {
int type;
enum {
DISCOVERY_STOPPED,
DISCOVERY_STARTING,
DISCOVERY_FINDING,
DISCOVERY_RESOLVING,
DISCOVERY_STOPPING,
} state;
struct list_head all; /* All devices found during inquiry */
struct list_head unknown; /* Name state not known */
struct list_head resolve; /* Name needs to be resolved */
__u32 timestamp;
bdaddr_t last_adv_addr;
u8 last_adv_addr_type;
s8 last_adv_rssi;
u32 last_adv_flags;
u8 last_adv_data[HCI_MAX_EXT_AD_LENGTH];
u8 last_adv_data_len;
bool report_invalid_rssi;
bool result_filtering;
bool limited;
s8 rssi;
u16 uuid_count;
u8 (*uuids)[16];
unsigned long name_resolve_timeout;
spinlock_t lock;
};
#define SUSPEND_NOTIFIER_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */
enum suspend_tasks {
SUSPEND_PAUSE_DISCOVERY,
SUSPEND_UNPAUSE_DISCOVERY,
SUSPEND_PAUSE_ADVERTISING,
SUSPEND_UNPAUSE_ADVERTISING,
SUSPEND_SCAN_DISABLE,
SUSPEND_SCAN_ENABLE,
SUSPEND_DISCONNECTING,
SUSPEND_POWERING_DOWN,
SUSPEND_PREPARE_NOTIFIER,
SUSPEND_SET_ADV_FILTER,
__SUSPEND_NUM_TASKS
};
enum suspended_state {
BT_RUNNING = 0,
BT_SUSPEND_DISCONNECT,
BT_SUSPEND_CONFIGURE_WAKE,
};
struct hci_conn_hash {
struct list_head list;
unsigned int acl_num;
unsigned int sco_num;
unsigned int cis_num;
unsigned int bis_num;
unsigned int pa_num;
unsigned int le_num;
unsigned int le_num_peripheral;
};
Annotation
- Immediate include surface: `linux/idr.h`, `linux/leds.h`, `linux/rculist.h`, `linux/spinlock.h`, `linux/srcu.h`, `net/bluetooth/hci.h`, `net/bluetooth/hci_drv.h`, `net/bluetooth/hci_sync.h`.
- Detected declarations: `struct inquiry_data`, `struct inquiry_entry`, `struct discovery_state`, `struct hci_conn_hash`, `struct bdaddr_list`, `struct codec_list`, `struct bdaddr_list_with_irk`, `struct bdaddr_list_with_flags`, `struct bt_uuid`, `struct blocked_key`.
- 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.