Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-btatt.h
blobf81c63770bd0f9adf12eb0dede980dee26e3fc72
1 /* packet-btaatt.h
2 * Headers for ATT
4 * Copyright 2015, Michal Labedzki for Tieto Corporation
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #ifndef __PACKET_BTATT_H__
14 #define __PACKET_BTATT_H__
16 #include <epan/expert.h>
17 #include "packet-bluetooth.h"
19 #define ATT_OPCODE_ERROR_RESPONSE 0x01
20 #define ATT_OPCODE_EXCHANGE_MTU_REQUEST 0x02
21 #define ATT_OPCODE_EXCHANGE_MTU_RESPONSE 0x03
22 #define ATT_OPCODE_FIND_INFORMATION_REQUEST 0x04
23 #define ATT_OPCODE_FIND_INFORMATION_RESPONSE 0x05
24 #define ATT_OPCODE_FIND_BY_TYPE_VALUE_REQUEST 0x06
25 #define ATT_OPCODE_FIND_BY_TYPE_VALUE_RESPONSE 0x07
27 #define ATT_OPCODE_READ_BY_TYPE_REQUEST 0x08
28 #define ATT_OPCODE_READ_BY_TYPE_RESPONSE 0x09
29 #define ATT_OPCODE_READ_REQUEST 0x0A
30 #define ATT_OPCODE_READ_RESPONSE 0x0B
31 #define ATT_OPCODE_READ_BLOB_REQUEST 0x0C
32 #define ATT_OPCODE_READ_BLOB_RESPONSE 0x0D
33 #define ATT_OPCODE_READ_MULTIPLE_REQUEST 0x0E
34 #define ATT_OPCODE_READ_MULTIPLE_RESPONSE 0x0F
35 #define ATT_OPCODE_READ_BY_GROUP_TYPE_REQUEST 0x10
36 #define ATT_OPCODE_READ_BY_GROUP_TYPE_RESPONSE 0x11
38 #define ATT_OPCODE_WRITE_REQUEST 0x12
39 #define ATT_OPCODE_WRITE_RESPONSE 0x13
40 #define ATT_OPCODE_WRITE_PREPARE_REQUEST 0x16
41 #define ATT_OPCODE_WRITE_PREPARE_RESPONSE 0x17
42 #define ATT_OPCODE_WRITE_EXECUTE_REQUEST 0x18
43 #define ATT_OPCODE_WRITE_EXECUTE_RESPONSE 0x19
44 #define ATT_OPCODE_WRITE_COMMAND 0x52
45 #define ATT_OPCODE_WRITE_SIGNED_COMMAND 0xD2
47 #define ATT_OPCODE_HANDLE_VALUE_NOTIFICATION 0x1B
48 #define ATT_OPCODE_HANDLE_VALUE_INDICATION 0x1D
49 #define ATT_OPCODE_HANDLE_VALUE_CONFIRMATION 0x1E
51 typedef struct _btatt_data_t {
52 bluetooth_data_t *bluetooth_data;
53 uint8_t opcode;
54 /* ATT handle for currently processed packet (optional) */
55 uint32_t handle;
56 } btatt_data_t;
58 enum attribute_type {
59 ATTRIBUTE_TYPE_SERVICE,
60 ATTRIBUTE_TYPE_CHARACTERISTIC,
61 ATTRIBUTE_TYPE_OTHER
64 typedef struct _tap_handles_t {
65 uint32_t handle;
66 bluetooth_uuid_t uuid;
67 enum attribute_type attribute_type;
69 /** Store the service and characteristic declaration.
71 * This allows us to find the parent item service or
72 * characteristic.
74 uint16_t service_handle;
75 uint16_t char_decl_handle;
76 } tap_handles_t;
79 extern const value_string btatt_ips_coordinate_system[];
80 extern const value_string btatt_ips_uncertainty_stationary_vals[];
81 extern const value_string btatt_ips_uncertainty_update_time_vals[];
82 extern const value_string btatt_ips_uncertainty_precision_vals[];
83 extern const value_string btatt_ips_uncertainty_coordinate_system[];
84 extern const value_string tds_organization_id_vals[];
85 extern const value_string characteristic_presentation_namespace_description_btsig_vals[];
87 bluetooth_uuid_t
88 get_gatt_bluetooth_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
89 bluetooth_data_t *bluetooth_data);
91 WS_DLL_PUBLIC bool bluetooth_gatt_has_no_parameter(uint8_t opcode);
92 WS_DLL_PUBLIC expert_field ei_btatt_invalid_usage;
94 #endif
97 * Editor modelines - https://www.wireshark.org/tools/modelines.html
99 * Local variables:
100 * c-basic-offset: 4
101 * tab-width: 8
102 * indent-tabs-mode: nil
103 * End:
105 * vi: set shiftwidth=4 tabstop=8 expandtab:
106 * :indentSize=4:tabSize=8:noTabs=true: