mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-28 22:54:14 +08:00
lib: Provide data structures for Add/Remove Advertising
This patch provides data structures and opcodes for the Add/Remove Advertising commands and the Advertising Added/Removed events.
This commit is contained in:
parent
289e8c4898
commit
32c93510e8
33
lib/mgmt.h
33
lib/mgmt.h
@ -484,6 +484,29 @@ struct mgmt_rp_read_adv_features {
|
||||
uint8_t instance[0];
|
||||
} __packed;
|
||||
|
||||
#define MGMT_OP_ADD_ADVERTISING 0x003E
|
||||
struct mgmt_cp_add_advertising {
|
||||
uint8_t instance;
|
||||
uint32_t flags;
|
||||
uint16_t duration;
|
||||
uint16_t timeout;
|
||||
uint8_t adv_data_len;
|
||||
uint8_t scan_rsp_len;
|
||||
uint8_t data[0];
|
||||
} __packed;
|
||||
struct mgmt_rp_add_advertising {
|
||||
uint8_t instance;
|
||||
} __packed;
|
||||
|
||||
#define MGMT_OP_REMOVE_ADVERTISING 0x003F
|
||||
struct mgmt_cp_remove_advertising {
|
||||
uint8_t instance;
|
||||
} __packed;
|
||||
#define MGMT_REMOVE_ADVERTISING_SIZE 1
|
||||
struct mgmt_rp_remove_advertising {
|
||||
uint8_t instance;
|
||||
} __packed;
|
||||
|
||||
#define MGMT_EV_CMD_COMPLETE 0x0001
|
||||
struct mgmt_ev_cmd_complete {
|
||||
uint16_t opcode;
|
||||
@ -686,6 +709,16 @@ struct mgmt_ev_local_oob_data_updated {
|
||||
uint8_t eir[0];
|
||||
} __packed;
|
||||
|
||||
#define MGMT_EV_ADVERTISING_ADDED 0x0023
|
||||
struct mgmt_ev_advertising_added {
|
||||
uint8_t instance;
|
||||
} __packed;
|
||||
|
||||
#define MGMT_EV_ADVERTISING_REMOVED 0x0024
|
||||
struct mgmt_ev_advertising_removed {
|
||||
uint8_t instance;
|
||||
} __packed;
|
||||
|
||||
static const char *mgmt_op[] = {
|
||||
"<0x0000>",
|
||||
"Read Version",
|
||||
|
Loading…
Reference in New Issue
Block a user