include/net/bluetooth/mgmt.h
Source file repositories/reference/linux-study-clean/include/net/bluetooth/mgmt.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/bluetooth/mgmt.h- Extension
.h- Size
- 30022 bytes
- Lines
- 1195
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct mgmt_hdrstruct mgmt_tlvstruct mgmt_addr_infostruct mgmt_rp_read_versionstruct mgmt_rp_read_commandsstruct mgmt_rp_read_index_liststruct mgmt_rp_read_infostruct mgmt_modestruct mgmt_cp_set_discoverablestruct mgmt_cp_set_dev_classstruct mgmt_cp_set_local_namestruct mgmt_cp_add_uuidstruct mgmt_cp_remove_uuidstruct mgmt_link_key_infostruct mgmt_cp_load_link_keysstruct mgmt_ltk_infostruct mgmt_cp_load_long_term_keysstruct mgmt_cp_disconnectstruct mgmt_rp_disconnectstruct mgmt_rp_get_connectionsstruct mgmt_cp_pin_code_replystruct mgmt_rp_pin_code_replystruct mgmt_cp_pin_code_neg_replystruct mgmt_cp_set_io_capabilitystruct mgmt_cp_pair_devicestruct mgmt_rp_pair_devicestruct mgmt_cp_unpair_devicestruct mgmt_rp_unpair_devicestruct mgmt_cp_user_confirm_replystruct mgmt_rp_user_confirm_replystruct mgmt_cp_user_confirm_neg_replystruct mgmt_cp_user_passkey_replystruct mgmt_rp_user_passkey_replystruct mgmt_cp_user_passkey_neg_replystruct mgmt_rp_read_local_oob_datastruct mgmt_cp_add_remote_oob_datastruct mgmt_cp_add_remote_oob_ext_datastruct mgmt_cp_remove_remote_oob_datastruct mgmt_cp_start_discoverystruct mgmt_cp_stop_discoverystruct mgmt_cp_confirm_namestruct mgmt_rp_confirm_namestruct mgmt_cp_block_devicestruct mgmt_cp_unblock_devicestruct mgmt_cp_set_device_idstruct mgmt_cp_set_static_addressstruct mgmt_cp_set_scan_paramsstruct mgmt_cp_set_privacy
Annotated Snippet
struct mgmt_hdr {
__le16 opcode;
__le16 index;
__le16 len;
} __packed;
struct mgmt_tlv {
/* New members MUST be added within the __struct_group() macro below. */
__struct_group(mgmt_tlv_hdr, __hdr, __packed,
__le16 type;
__u8 length;
);
__u8 value[];
} __packed;
static_assert(offsetof(struct mgmt_tlv, value) == sizeof(struct mgmt_tlv_hdr),
"struct member likely outside of __struct_group()");
struct mgmt_addr_info {
bdaddr_t bdaddr;
__u8 type;
} __packed;
#define MGMT_ADDR_INFO_SIZE 7
#define MGMT_OP_READ_VERSION 0x0001
#define MGMT_READ_VERSION_SIZE 0
struct mgmt_rp_read_version {
__u8 version;
__le16 revision;
} __packed;
#define MGMT_OP_READ_COMMANDS 0x0002
#define MGMT_READ_COMMANDS_SIZE 0
struct mgmt_rp_read_commands {
__le16 num_commands;
__le16 num_events;
__le16 opcodes[];
} __packed;
#define MGMT_OP_READ_INDEX_LIST 0x0003
#define MGMT_READ_INDEX_LIST_SIZE 0
struct mgmt_rp_read_index_list {
__le16 num_controllers;
__le16 index[];
} __packed;
/* Reserve one extra byte for names in management messages so that they
* are always guaranteed to be nul-terminated */
#define MGMT_MAX_NAME_LENGTH (HCI_MAX_NAME_LENGTH + 1)
#define MGMT_MAX_SHORT_NAME_LENGTH (HCI_MAX_SHORT_NAME_LENGTH + 1)
#define MGMT_SETTING_POWERED BIT(0)
#define MGMT_SETTING_CONNECTABLE BIT(1)
#define MGMT_SETTING_FAST_CONNECTABLE BIT(2)
#define MGMT_SETTING_DISCOVERABLE BIT(3)
#define MGMT_SETTING_BONDABLE BIT(4)
#define MGMT_SETTING_LINK_SECURITY BIT(5)
#define MGMT_SETTING_SSP BIT(6)
#define MGMT_SETTING_BREDR BIT(7)
#define MGMT_SETTING_HS BIT(8)
#define MGMT_SETTING_LE BIT(9)
#define MGMT_SETTING_ADVERTISING BIT(10)
#define MGMT_SETTING_SECURE_CONN BIT(11)
#define MGMT_SETTING_DEBUG_KEYS BIT(12)
#define MGMT_SETTING_PRIVACY BIT(13)
#define MGMT_SETTING_CONFIGURATION BIT(14)
#define MGMT_SETTING_STATIC_ADDRESS BIT(15)
#define MGMT_SETTING_PHY_CONFIGURATION BIT(16)
#define MGMT_SETTING_WIDEBAND_SPEECH BIT(17)
#define MGMT_SETTING_CIS_CENTRAL BIT(18)
#define MGMT_SETTING_CIS_PERIPHERAL BIT(19)
#define MGMT_SETTING_ISO_BROADCASTER BIT(20)
#define MGMT_SETTING_ISO_SYNC_RECEIVER BIT(21)
#define MGMT_SETTING_LL_PRIVACY BIT(22)
#define MGMT_SETTING_PAST_SENDER BIT(23)
#define MGMT_SETTING_PAST_RECEIVER BIT(24)
#define MGMT_OP_READ_INFO 0x0004
#define MGMT_READ_INFO_SIZE 0
struct mgmt_rp_read_info {
bdaddr_t bdaddr;
__u8 version;
__le16 manufacturer;
__le32 supported_settings;
__le32 current_settings;
__u8 dev_class[3];
__u8 name[MGMT_MAX_NAME_LENGTH];
__u8 short_name[MGMT_MAX_SHORT_NAME_LENGTH];
} __packed;
struct mgmt_mode {
Annotation
- Detected declarations: `struct mgmt_hdr`, `struct mgmt_tlv`, `struct mgmt_addr_info`, `struct mgmt_rp_read_version`, `struct mgmt_rp_read_commands`, `struct mgmt_rp_read_index_list`, `struct mgmt_rp_read_info`, `struct mgmt_mode`, `struct mgmt_cp_set_discoverable`, `struct mgmt_cp_set_dev_class`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
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.