diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-05-10 11:08:51 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-05-16 11:06:13 +0300 |
commit | 88552decd5b2e997e038064201b2c76b599386ac (patch) | |
tree | ad002dc69d6da1f0c302179b311835ca6fa36c54 | |
parent | 7730177e50a140fe3004ca256c3a5910c394d5fe (diff) | |
download | bluez-hcidump-88552decd5b2e997e038064201b2c76b599386ac.tar.gz |
lib: Add definitions for AMP Assoc data
Definitions are needed for decoding A2MP Assoc Rsp.
-rw-r--r-- | lib/a2mp.h | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -142,6 +142,44 @@ struct a2mp_disconn_rsp { #define A2MP_STATUS_PHYS_LINK_EXISTS 0x05 #define A2MP_STATUS_SECURITY_VIOLATION 0x06 +#define A2MP_MAC_ADDR_TYPE 1 +#define A2MP_PREF_CHANLIST_TYPE 2 +#define A2MP_CONNECTED_CHAN 3 +#define A2MP_PAL_CAP_TYPE 4 +#define A2MP_PAL_VER_INFO 5 + +struct a2mp_tlv { + uint8_t type; + uint16_t len; + uint8_t val[0]; +} __attribute__ ((packed)); + +struct a2mp_pal_ver { + uint8_t ver; + uint16_t company_id; + uint16_t sub_ver; +} __attribute__ ((packed)); + +struct a2mp_country_triplet { + union { + struct { + uint8_t first_channel; + uint8_t num_channels; + int8_t max_power; + } __attribute__ ((packed)) chans; + struct { + uint8_t reg_extension_id; + uint8_t reg_class; + uint8_t coverage_class; + } __attribute__ ((packed)) ext; + }; +} __attribute__ ((packed)); + +struct a2mp_chan_list { + uint8_t country_code[3]; + struct a2mp_country_triplet triplets[0]; +} __attribute__ ((packed)); + #ifdef __cplusplus } #endif |