diff options
Diffstat (limited to 'net-libs/libpcap')
-rw-r--r-- | net-libs/libpcap/ChangeLog | 5 | ||||
-rw-r--r-- | net-libs/libpcap/Manifest | 10 | ||||
-rw-r--r-- | net-libs/libpcap/files/mgmt.h | 521 |
3 files changed, 9 insertions, 527 deletions
diff --git a/net-libs/libpcap/ChangeLog b/net-libs/libpcap/ChangeLog index 267c70c6b3bd..93fe2f950e2e 100644 --- a/net-libs/libpcap/ChangeLog +++ b/net-libs/libpcap/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for net-libs/libpcap # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/ChangeLog,v 1.201 2014/08/16 15:29:08 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/ChangeLog,v 1.202 2014/08/16 15:37:51 jer Exp $ + + 16 Aug 2014; Jeroen Roovers <jer@gentoo.org> files/mgmt.h: + Strip unneeded declarations from header file. 16 Aug 2014; Jeroen Roovers <jer@gentoo.org> libpcap-1.6.1-r1.ebuild, +files/mgmt.h: diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest index 3df64517f899..9b2988cd4c99 100644 --- a/net-libs/libpcap/Manifest +++ b/net-libs/libpcap/Manifest @@ -6,7 +6,7 @@ AUX libpcap-1.3.0-canusb.patch 290 SHA256 3518dc59be25c3092df6e133694b4d4372552f AUX libpcap-1.3.0-fix-systems-without-ipv6-support.patch 13183 SHA256 14973d5dc09e036281cf507ca7fead8bf352e17dcb949a90942d58e5affda29c SHA512 cdf61a8dfe2cba0a8f3bf84a749c48eb3e75e634880f86acf7225793c921577137eca7579812c0c38a6e128cca58214d0eb614b11ec47d5f6d25d53557d49185 WHIRLPOOL 49c7ac019e969bb18f384e11b77b986417da5d2e4b5986624efe8e4555982c629a68705c1a72c0761552acd7523653ffde426fcc9bbd61aa15a44bb4a38a2417 AUX libpcap-1.6.1-configure.patch 395 SHA256 dd61d36cfc89bd5c5f67f4b91cde2063f874de8e1456f5e8f426d3faa4109916 SHA512 e9a4ddf9d4102b1b6e450a7a5c9c1e00ea08edfa2d04772d877a209e2292dae14531b51b2c25a80b6bd2a00a76bcfa4d7e4672b399a2c9b7f1f5ff931da70ee6 WHIRLPOOL f6370b1e55411ad906c152fc03201dcccc57b1568efb25d58439956980ccba4fb4f4b8a4fcbe6188782970a81ea790bd71b8855ae3c95b3333a63848271529e8 AUX libpcap-1.6.1-prefix-solaris.patch 807 SHA256 c5bd1a5e0945e6ad06c4455045cf50f251ba6d2ba0386c6bdb20f809c5afffcd SHA512 af76d741784d123d7c2534c85018a102736889f0456420c5ae4b53b6568ec3054de30c4ce755ff6f9ae83abefd2275b379794e5a7cac65ef483ca676bf8883b3 WHIRLPOOL 1049da0979b52c71d783e5979e4b3ea0776f609725c1c288a6c75e8afe102db85f58af1d3f31249c7938d818e68bb569ef18f2c54dcb121b87fbe3c00a089cc3 -AUX mgmt.h 12695 SHA256 9154bca70941ea2b36d91c9eed1ab70ba9b2c6018f770b21f668b88bf2ae1c1c SHA512 5696ac0b2d3b926dd4d9e3ab3e77b2339e27cc654c13742946dda4d419b3b5edb9ac65f3969ff21a3ff2b544f0df4b37058e1240d187261c59692614ec187acd WHIRLPOOL 37ff1294a689c16d9ceab72aff3fd55f774fdcab5e8de97b1a557f19144e376b13208826b3b3cf91026b20a531af2c3cd888dcff82445983c43e324ea94a0a03 +AUX mgmt.h 1066 SHA256 fda9bf6721c986db93a084049c796b8de4f6a9ac7a21406bf22c68ebb9427729 SHA512 071ed2d22ed122e060be4c7dfcfbc6d8b019f47900560a40128c0af18bd7d45c16b7043681c000ccbfd681295a0811d68b18b675deb7f63fe4a2035bee4309eb WHIRLPOOL eb70d761b195326c29f6475f8312f16d019f69f2a213d4f9ab9fde306a18d77f88834fbd57d958fc3460a047487f67c79b71632f0a123b8e24a16b0a75d106b4 DIST libpcap-1.3.0.tar.gz 608967 SHA256 41cbd9ed68383afd9f1fda279cb78427d36879d9e34ee707e31a16a1afd872b9 SHA512 c023abb3da7b9f62835fa04ca43b50203d7e3da7b624d09a693c8b02fd531c3845e1c86cbc587ae02816614133f5342585f6a2985fdaf92889fcfaca7bfb8908 WHIRLPOOL 774897ce4dcd1655945313a145399da9db0063967ce246e1c7beb21f038ee4c5bcfe2b4ec7b08316a013fdb33b50781f5195bf169a2ca6f84ddc2bf5bca78f15 DIST libpcap-1.4.0.tar.gz 619045 SHA256 7c6a2a4f71e8ab09804e6b4fb3aff998c5583108ac42c0e2967eee8e1dbc7406 SHA512 b7662867c6449c603a65c37e63ce881260dee80989ccb5b71b1e55fa437fb18ac9bb123a7b8ed68302baf4511b97bca40d9f08dea7b0dd0eb6a2ac4a7b73cf15 WHIRLPOOL d070b6dc298baa2474e5a268b3541f614dc7dc35463af57f5a8d9b4b4c453d4e8f0106a7d9ce7f77e632ddf76e6b738ee5a81198ca57fe701ad1bb95359e37c2 DIST libpcap-1.5.1.tar.gz 640233 SHA256 259db4fe1e9f0b6b9c43a057ec5916dec7d0a821b00d6d6c4dff7db2445fa7e4 SHA512 c2b8b4771127278b7986650961efa0745789a33e717866a5ee4ee84333b7592738b12be12c1113075a5bf9e8edd03b3f6e6b3c018ef29383834608af5153ed39 WHIRLPOOL f3401ac2bbe717d8e96127f2ad87d9e13bb01430cf1e1c3e82a3606b32481059368b027fcba426f9c9ad688d0f5cc866a1d71369ca34421cff2937dadef3fd6c @@ -19,12 +19,12 @@ EBUILD libpcap-1.5.1.ebuild 1927 SHA256 9acf40ba967273bc39454d9969d8270665717485 EBUILD libpcap-1.5.2.ebuild 1929 SHA256 ddf7061afe1e92c2489f0ade8833b1b637e0a4a01bc391cac6e3050be2257a2b SHA512 2e4a1ac2e710776fd72778f6dc83f466f7cf88c4047f23182fa037503bf3c0c4c4a2cae20b68ac7bc125f0197ec73135794e5debf3295a1afcdcb3d5681cb58b WHIRLPOOL cedc2b280b002c78c32c5c783cd8a5655ed163d0ca07b5ce3c993811b570f04f6a377a3ad2e9ddb167a4727d2db7a9ac0a8b45cee8d68b459626d3ba55947f88 EBUILD libpcap-1.5.3.ebuild 1914 SHA256 c629a5968a6402ca06a67eb04ea1d77504e93957e1b22c1c81a2741636b30d48 SHA512 adad8e4eea73f4885dd31f08904a70559ec0fd4886fc649d2425435e1183326a320cc115bd2f4e600e6ae43b2a68c5f56d7d62a1034fb27a424df5c26bba50fc WHIRLPOOL e4ff1117f34abaf2b4c83dc6849fa3df358287feee5bde71dac341114add5ce209866e7ffc56c17faa0b058b3c335e633c346b468c9f87d349671c6592f0baa0 EBUILD libpcap-1.6.1-r1.ebuild 1794 SHA256 02572d824b8deb5d03ab9aeee939da814d367db5c7ae3bfd310e3a60dafd3d8c SHA512 6d27263b151e46274710954704cf54f31a2dcca501e8213e112e91f27d0c9c5bb189578615006e2efe3c630af9ac19d7cc2675bc955ecdad6355cfd83b72d32e WHIRLPOOL 3eaec112df80c3e99ebe4c254d0e223ef68bac045aaa578c6f04852282d923d9233721fd43fc757c37c6359a3790a1456025da8d1cf166acf475079598706c63 -MISC ChangeLog 27837 SHA256 68eeada0c61929fc9d2e984e6b95f7b4d97b36cb5bf959544245aca8b5a495a5 SHA512 1ce076bbfd6d726d710c14f3be79752883564d9eec073b7881c6bef5b851539ea645bfc35046e615e427f56172e626bdda394082bee7000ac61321754f46a13e WHIRLPOOL bee2d473799a44dfb86ebfec5118a63633f241d8d406eabe812842e2bae96f50bfb369e3cc9a0c23391d56c432eedbb59c6aec583158fbc1c84327385cc81a98 +MISC ChangeLog 27947 SHA256 279a1750c46305f1247d4cd9ecb83118f8370f4ac7049782486b43a95c92cdd0 SHA512 8189d1c3f9cec7a2e9c7dd279cb4c863b72df2d8e0d28f1413bbcd1617eae9eceb9ba9bdd16ffda33a26bd0ff1aad4b69d42f3feadfdc62571a57bc9304bc868 WHIRLPOOL b13180c89d53fcf3d17fd0d3e7b96e91611f36e73a358bb2c613611d18e3d12d3c41d77b27f63d68ed9c11e18b364d9ffdf10239414f969feda78508b3f054db MISC metadata.xml 423 SHA256 d12419de9bd641cf78030dc7bdb2789c2c932f91ba9687a6073961eb8ff09e4f SHA512 61b591b21bd46a8ae6a20fde2d5cbe6f68250ce7616b11b55b3a270474fe1ac3b4aefcd3c98e9e6470a036ef3c685b3575464de81349137fdf7cd8082ea2d695 WHIRLPOOL a08d3ed4833b2725f68ad8fcca878047a6b7a36188462204dec1fe7f528b6ad4c8698bed8a87a03e52fe5ea7e30fd8464a881408c179e2d7ef085f511aad4475 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iEYEAREIAAYFAlPveMUACgkQVWmRsqeSphOOPQCfW1Co1oa5jsiLam6stYHePa91 -TWMAnRRQJ4fk8CUcurPNUHnF60LhQgWK -=iIb+ +iEYEAREIAAYFAlPvetAACgkQVWmRsqeSphO/TgCeJnTe+haQBEQ3eJ8eeA7A1ZnO +LgoAn0oZIT3isNHvZ0TkF/fQT/OHucvQ +=WFUx -----END PGP SIGNATURE----- diff --git a/net-libs/libpcap/files/mgmt.h b/net-libs/libpcap/files/mgmt.h index a58915b2e25c..d7fc9c8956aa 100644 --- a/net-libs/libpcap/files/mgmt.h +++ b/net-libs/libpcap/files/mgmt.h @@ -25,530 +25,9 @@ #define __packed __attribute__((packed)) #endif -#define MGMT_INDEX_NONE 0xFFFF - -#define MGMT_STATUS_SUCCESS 0x00 -#define MGMT_STATUS_UNKNOWN_COMMAND 0x01 -#define MGMT_STATUS_NOT_CONNECTED 0x02 -#define MGMT_STATUS_FAILED 0x03 -#define MGMT_STATUS_CONNECT_FAILED 0x04 -#define MGMT_STATUS_AUTH_FAILED 0x05 -#define MGMT_STATUS_NOT_PAIRED 0x06 -#define MGMT_STATUS_NO_RESOURCES 0x07 -#define MGMT_STATUS_TIMEOUT 0x08 -#define MGMT_STATUS_ALREADY_CONNECTED 0x09 -#define MGMT_STATUS_BUSY 0x0a -#define MGMT_STATUS_REJECTED 0x0b -#define MGMT_STATUS_NOT_SUPPORTED 0x0c -#define MGMT_STATUS_INVALID_PARAMS 0x0d -#define MGMT_STATUS_DISCONNECTED 0x0e -#define MGMT_STATUS_NOT_POWERED 0x0f -#define MGMT_STATUS_CANCELLED 0x10 -#define MGMT_STATUS_INVALID_INDEX 0x11 - struct mgmt_hdr { uint16_t opcode; uint16_t index; uint16_t len; } __packed; #define MGMT_HDR_SIZE 6 - -struct mgmt_addr_info { - bdaddr_t bdaddr; - uint8_t type; -} __packed; - -#define MGMT_OP_READ_VERSION 0x0001 -struct mgmt_rp_read_version { - uint8_t version; - uint16_t revision; -} __packed; - -#define MGMT_OP_READ_COMMANDS 0x0002 -struct mgmt_rp_read_commands { - uint16_t num_commands; - uint16_t num_events; - uint16_t opcodes[0]; -} __packed; - -#define MGMT_OP_READ_INDEX_LIST 0x0003 -struct mgmt_rp_read_index_list { - uint16_t num_controllers; - uint16_t index[0]; -} __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 (10 + 1) - -#define MGMT_SETTING_POWERED 0x00000001 -#define MGMT_SETTING_CONNECTABLE 0x00000002 -#define MGMT_SETTING_FAST_CONNECTABLE 0x00000004 -#define MGMT_SETTING_DISCOVERABLE 0x00000008 -#define MGMT_SETTING_PAIRABLE 0x00000010 -#define MGMT_SETTING_LINK_SECURITY 0x00000020 -#define MGMT_SETTING_SSP 0x00000040 -#define MGMT_SETTING_BREDR 0x00000080 -#define MGMT_SETTING_HS 0x00000100 -#define MGMT_SETTING_LE 0x00000200 - -#define MGMT_OP_READ_INFO 0x0004 -struct mgmt_rp_read_info { - bdaddr_t bdaddr; - uint8_t version; - uint16_t manufacturer; - uint32_t supported_settings; - uint32_t current_settings; - uint8_t dev_class[3]; - uint8_t name[MGMT_MAX_NAME_LENGTH]; - uint8_t short_name[MGMT_MAX_SHORT_NAME_LENGTH]; -} __packed; - -struct mgmt_mode { - uint8_t val; -} __packed; - -#define MGMT_OP_SET_POWERED 0x0005 - -#define MGMT_OP_SET_DISCOVERABLE 0x0006 -struct mgmt_cp_set_discoverable { - uint8_t val; - uint16_t timeout; -} __packed; - -#define MGMT_OP_SET_CONNECTABLE 0x0007 - -#define MGMT_OP_SET_FAST_CONNECTABLE 0x0008 - -#define MGMT_OP_SET_PAIRABLE 0x0009 - -#define MGMT_OP_SET_LINK_SECURITY 0x000A - -#define MGMT_OP_SET_SSP 0x000B - -#define MGMT_OP_SET_HS 0x000C - -#define MGMT_OP_SET_LE 0x000D - -#define MGMT_OP_SET_DEV_CLASS 0x000E -struct mgmt_cp_set_dev_class { - uint8_t major; - uint8_t minor; -} __packed; - -#define MGMT_OP_SET_LOCAL_NAME 0x000F -struct mgmt_cp_set_local_name { - uint8_t name[MGMT_MAX_NAME_LENGTH]; - uint8_t short_name[MGMT_MAX_SHORT_NAME_LENGTH]; -} __packed; - -#define MGMT_OP_ADD_UUID 0x0010 -struct mgmt_cp_add_uuid { - uint8_t uuid[16]; - uint8_t svc_hint; -} __packed; - -#define MGMT_OP_REMOVE_UUID 0x0011 -struct mgmt_cp_remove_uuid { - uint8_t uuid[16]; -} __packed; - -struct mgmt_link_key_info { - struct mgmt_addr_info addr; - uint8_t type; - uint8_t val[16]; - uint8_t pin_len; -} __packed; - -#define MGMT_OP_LOAD_LINK_KEYS 0x0012 -struct mgmt_cp_load_link_keys { - uint8_t debug_keys; - uint16_t key_count; - struct mgmt_link_key_info keys[0]; -} __packed; - -struct mgmt_ltk_info { - struct mgmt_addr_info addr; - uint8_t authenticated; - uint8_t master; - uint8_t enc_size; - uint16_t ediv; - uint8_t rand[8]; - uint8_t val[16]; -} __packed; - -#define MGMT_OP_LOAD_LONG_TERM_KEYS 0x0013 -struct mgmt_cp_load_long_term_keys { - uint16_t key_count; - struct mgmt_ltk_info keys[0]; -} __packed; - -#define MGMT_OP_DISCONNECT 0x0014 -struct mgmt_cp_disconnect { - struct mgmt_addr_info addr; -} __packed; -struct mgmt_rp_disconnect { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_GET_CONNECTIONS 0x0015 -struct mgmt_rp_get_connections { - uint16_t conn_count; - struct mgmt_addr_info addr[0]; -} __packed; - -#define MGMT_OP_PIN_CODE_REPLY 0x0016 -struct mgmt_cp_pin_code_reply { - struct mgmt_addr_info addr; - uint8_t pin_len; - uint8_t pin_code[16]; -} __packed; - -#define MGMT_OP_PIN_CODE_NEG_REPLY 0x0017 -struct mgmt_cp_pin_code_neg_reply { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_SET_IO_CAPABILITY 0x0018 -struct mgmt_cp_set_io_capability { - uint8_t io_capability; -} __packed; - -#define MGMT_OP_PAIR_DEVICE 0x0019 -struct mgmt_cp_pair_device { - struct mgmt_addr_info addr; - uint8_t io_cap; -} __packed; -struct mgmt_rp_pair_device { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_CANCEL_PAIR_DEVICE 0x001A - -#define MGMT_OP_UNPAIR_DEVICE 0x001B -struct mgmt_cp_unpair_device { - struct mgmt_addr_info addr; - uint8_t disconnect; -} __packed; -struct mgmt_rp_unpair_device { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_USER_CONFIRM_REPLY 0x001C -struct mgmt_cp_user_confirm_reply { - struct mgmt_addr_info addr; -} __packed; -struct mgmt_rp_user_confirm_reply { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x001D - -#define MGMT_OP_USER_PASSKEY_REPLY 0x001E -struct mgmt_cp_user_passkey_reply { - struct mgmt_addr_info addr; - uint32_t passkey; -} __packed; -struct mgmt_rp_user_passkey_reply { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_USER_PASSKEY_NEG_REPLY 0x001F -struct mgmt_cp_user_passkey_neg_reply { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_READ_LOCAL_OOB_DATA 0x0020 -struct mgmt_rp_read_local_oob_data { - uint8_t hash[16]; - uint8_t randomizer[16]; -} __packed; - -#define MGMT_OP_ADD_REMOTE_OOB_DATA 0x0021 -struct mgmt_cp_add_remote_oob_data { - struct mgmt_addr_info addr; - uint8_t hash[16]; - uint8_t randomizer[16]; -} __packed; - -#define MGMT_OP_REMOVE_REMOTE_OOB_DATA 0x0022 -struct mgmt_cp_remove_remote_oob_data { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_START_DISCOVERY 0x0023 -struct mgmt_cp_start_discovery { - uint8_t type; -} __packed; - -#define MGMT_OP_STOP_DISCOVERY 0x0024 -struct mgmt_cp_stop_discovery { - uint8_t type; -} __packed; - -#define MGMT_OP_CONFIRM_NAME 0x0025 -struct mgmt_cp_confirm_name { - struct mgmt_addr_info addr; - uint8_t name_known; -} __packed; -struct mgmt_rp_confirm_name { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_BLOCK_DEVICE 0x0026 -struct mgmt_cp_block_device { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_UNBLOCK_DEVICE 0x0027 -struct mgmt_cp_unblock_device { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_OP_SET_DEVICE_ID 0x0028 -struct mgmt_cp_set_device_id { - uint16_t source; - uint16_t vendor; - uint16_t product; - uint16_t version; -} __packed; - -#define MGMT_EV_CMD_COMPLETE 0x0001 -struct mgmt_ev_cmd_complete { - uint16_t opcode; - uint8_t status; - uint8_t data[0]; -} __packed; - -#define MGMT_EV_CMD_STATUS 0x0002 -struct mgmt_ev_cmd_status { - uint16_t opcode; - uint8_t status; -} __packed; - -#define MGMT_EV_CONTROLLER_ERROR 0x0003 -struct mgmt_ev_controller_error { - uint8_t error_code; -} __packed; - -#define MGMT_EV_INDEX_ADDED 0x0004 - -#define MGMT_EV_INDEX_REMOVED 0x0005 - -#define MGMT_EV_NEW_SETTINGS 0x0006 - -#define MGMT_EV_CLASS_OF_DEV_CHANGED 0x0007 -struct mgmt_ev_class_of_dev_changed { - uint8_t class_of_dev[3]; -} __packed; - -#define MGMT_EV_LOCAL_NAME_CHANGED 0x0008 -struct mgmt_ev_local_name_changed { - uint8_t name[MGMT_MAX_NAME_LENGTH]; - uint8_t short_name[MGMT_MAX_SHORT_NAME_LENGTH]; -} __packed; - -#define MGMT_EV_NEW_LINK_KEY 0x0009 -struct mgmt_ev_new_link_key { - uint8_t store_hint; - struct mgmt_link_key_info key; -} __packed; - -#define MGMT_EV_NEW_LONG_TERM_KEY 0x000A -struct mgmt_ev_new_long_term_key { - uint8_t store_hint; - struct mgmt_ltk_info key; -} __packed; - -#define MGMT_EV_DEVICE_CONNECTED 0x000B -struct mgmt_ev_device_connected { - struct mgmt_addr_info addr; - uint32_t flags; - uint16_t eir_len; - uint8_t eir[0]; -} __packed; - -#define MGMT_EV_DEVICE_DISCONNECTED 0x000C -struct mgmt_ev_device_disconnected { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_EV_CONNECT_FAILED 0x000D -struct mgmt_ev_connect_failed { - struct mgmt_addr_info addr; - uint8_t status; -} __packed; - -#define MGMT_EV_PIN_CODE_REQUEST 0x000E -struct mgmt_ev_pin_code_request { - struct mgmt_addr_info addr; - uint8_t secure; -} __packed; - -#define MGMT_EV_USER_CONFIRM_REQUEST 0x000F -struct mgmt_ev_user_confirm_request { - struct mgmt_addr_info addr; - uint8_t confirm_hint; - uint32_t value; -} __packed; - -#define MGMT_EV_USER_PASSKEY_REQUEST 0x0010 -struct mgmt_ev_user_passkey_request { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_EV_AUTH_FAILED 0x0011 -struct mgmt_ev_auth_failed { - struct mgmt_addr_info addr; - uint8_t status; -} __packed; - -#define MGMT_DEV_FOUND_CONFIRM_NAME 0x01 -#define MGMT_DEV_FOUND_LEGACY_PAIRING 0x02 - -#define MGMT_EV_DEVICE_FOUND 0x0012 -struct mgmt_ev_device_found { - struct mgmt_addr_info addr; - int8_t rssi; - uint32_t flags; - uint16_t eir_len; - uint8_t eir[0]; -} __packed; - -#define MGMT_EV_DISCOVERING 0x0013 -struct mgmt_ev_discovering { - uint8_t type; - uint8_t discovering; -} __packed; - -#define MGMT_EV_DEVICE_BLOCKED 0x0014 -struct mgmt_ev_device_blocked { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_EV_DEVICE_UNBLOCKED 0x0015 -struct mgmt_ev_device_unblocked { - struct mgmt_addr_info addr; -} __packed; - -#define MGMT_EV_DEVICE_UNPAIRED 0x0016 -struct mgmt_ev_device_unpaired { - struct mgmt_addr_info addr; -} __packed; - -static const char *mgmt_op[] = { - "<0x0000>", - "Read Version", - "Read Commands", - "Read Index List", - "Read Controller Info", - "Set Powered", - "Set Discoverable", - "Set Connectable", - "Set Fast Connectable", /* 0x0008 */ - "Set Pairable", - "Set Link Security", - "Set Secure Simple Pairing", - "Set High Speed", - "Set Low Energy", - "Set Dev Class", - "Set Local Name", - "Add UUID", /* 0x0010 */ - "Remove UUID", - "Load Link Keys", - "Load Long Term Keys", - "Disconnect", - "Get Connections", - "PIN Code Reply", - "PIN Code Neg Reply", - "Set IO Capability", /* 0x0018 */ - "Pair Device", - "Cancel Pair Device", - "Unpair Device", - "User Confirm Reply", - "User Confirm Neg Reply", - "User Passkey Reply", - "User Passkey Neg Reply", - "Read Local OOB Data", /* 0x0020 */ - "Add Remote OOB Data", - "Remove Remove OOB Data", - "Start Discovery", - "Stop Discovery", - "Confirm Name", - "Block Device", - "Unblock Device", - "Set Device ID", -}; - -static const char *mgmt_ev[] = { - "<0x0000>", - "Command Complete", - "Command Status", - "Controller Error", - "Index Added", - "Index Removed", - "New Settings", - "Class of Device Changed", - "Local Name Changed", /* 0x0008 */ - "New Link Key", - "New Long Term Key", - "Device Connected", - "Device Disconnected", - "Connect Failed", - "PIN Code Request", - "User Confirm Request", - "User Passkey Request", /* 0x0010 */ - "Authentication Failed", - "Device Found", - "Discovering", - "Device Blocked", - "Device Unblocked", - "Device Unpaired", -}; - -static const char *mgmt_status[] = { - "Success", - "Unknown Command", - "Not Connected", - "Failed", - "Connect Failed", - "Authentication Failed", - "Not Paired", - "No Resources", - "Timeout", - "Already Connected", - "Busy", - "Rejected", - "Not Supported", - "Invalid Parameters", - "Disconnected", - "Not Powered", - "Cancelled", - "Invalid Index", -}; - -#ifndef NELEM -#define NELEM(x) (sizeof(x) / sizeof((x)[0])) -#endif - -static inline const char *mgmt_opstr(uint16_t op) -{ - if (op >= NELEM(mgmt_op)) - return "<unknown opcode>"; - return mgmt_op[op]; -} - -static inline const char *mgmt_evstr(uint16_t ev) -{ - if (ev >= NELEM(mgmt_ev)) - return "<unknown event>"; - return mgmt_ev[ev]; -} - -static inline const char *mgmt_errstr(uint8_t status) -{ - if (status >= NELEM(mgmt_status)) - return "<unknown status>"; - return mgmt_status[status]; -} |