| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-btatt.h
1/* packet-btaatt.h
2 * Headers for ATT
3 *
4 * Copyright 2015, Michal Labedzki for Tieto Corporation
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13#ifndef __PACKET_BTATT_H__
14#define __PACKET_BTATT_H__
15
16#include <epan/expert.h>
17#include "packet-bluetooth.h"
18#include "packet-btl2cap.h"
19
20#define ATT_OPCODE_ERROR_RESPONSE 0x01
21#define ATT_OPCODE_EXCHANGE_MTU_REQUEST 0x02
22#define ATT_OPCODE_EXCHANGE_MTU_RESPONSE 0x03
23#define ATT_OPCODE_FIND_INFORMATION_REQUEST 0x04
24#define ATT_OPCODE_FIND_INFORMATION_RESPONSE 0x05
25#define ATT_OPCODE_FIND_BY_TYPE_VALUE_REQUEST 0x06
26#define ATT_OPCODE_FIND_BY_TYPE_VALUE_RESPONSE 0x07
27
28#define ATT_OPCODE_READ_BY_TYPE_REQUEST 0x08
29#define ATT_OPCODE_READ_BY_TYPE_RESPONSE 0x09
30#define ATT_OPCODE_READ_REQUEST 0x0A
31#define ATT_OPCODE_READ_RESPONSE 0x0B
32#define ATT_OPCODE_READ_BLOB_REQUEST 0x0C
33#define ATT_OPCODE_READ_BLOB_RESPONSE 0x0D
34#define ATT_OPCODE_READ_MULTIPLE_REQUEST 0x0E
35#define ATT_OPCODE_READ_MULTIPLE_RESPONSE 0x0F
36#define ATT_OPCODE_READ_BY_GROUP_TYPE_REQUEST 0x10
37#define ATT_OPCODE_READ_BY_GROUP_TYPE_RESPONSE 0x11
38
39#define ATT_OPCODE_WRITE_REQUEST 0x12
40#define ATT_OPCODE_WRITE_RESPONSE 0x13
41#define ATT_OPCODE_WRITE_PREPARE_REQUEST 0x16
42#define ATT_OPCODE_WRITE_PREPARE_RESPONSE 0x17
43#define ATT_OPCODE_WRITE_EXECUTE_REQUEST 0x18
44#define ATT_OPCODE_WRITE_EXECUTE_RESPONSE 0x19
45#define ATT_OPCODE_WRITE_COMMAND 0x52
46#define ATT_OPCODE_WRITE_SIGNED_COMMAND 0xD2
47
48#define ATT_OPCODE_HANDLE_VALUE_NOTIFICATION 0x1B
49#define ATT_OPCODE_HANDLE_VALUE_INDICATION 0x1D
50#define ATT_OPCODE_HANDLE_VALUE_CONFIRMATION 0x1E
51
52 typedef struct _btatt_data_t {
53 btl2cap_data_t *l2cap_data;
54 uint8_t opcode;
55 /* ATT handle for currently processed packet (optional) */
56 uint32_t handle;
57} btatt_data_t;
58
59enum attribute_type {
60 ATTRIBUTE_TYPE_SERVICE,
61 ATTRIBUTE_TYPE_CHARACTERISTIC,
62 ATTRIBUTE_TYPE_OTHER
63};
64
65 typedef struct _tap_handles_t {
66 uint32_t handle;
67 bluetooth_uuid_t uuid;
68 const char* uuid_str;
69 const char* numeric_uuid_str;
70
71 enum attribute_type attribute_type;
72
78 uint16_t service_handle;
79 uint16_t char_decl_handle;
80} tap_handles_t;
81
82
83extern const value_string btatt_ips_coordinate_system[];
84extern const value_string btatt_ips_uncertainty_stationary_vals[];
85extern const value_string btatt_ips_uncertainty_update_time_vals[];
86extern const value_string btatt_ips_uncertainty_precision_vals[];
87extern const value_string btatt_ips_uncertainty_coordinate_system[];
88extern const value_string tds_organization_id_vals[];
89extern const value_string characteristic_presentation_namespace_description_btsig_vals[];
90
91 bluetooth_uuid_t
92get_gatt_bluetooth_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
93 btl2cap_data_t *l2cap_data);
94
95WS_DLL_PUBLIC expert_field ei_btatt_invalid_usage;
96
97#endif
98
99/*
100 * Editor modelines - https://www.wireshark.org/tools/modelines.html
101 *
102 * Local variables:
103 * c-basic-offset: 4
104 * tab-width: 8
105 * indent-tabs-mode: nil
106 * End:
107 *
108 * vi: set shiftwidth=4 tabstop=8 expandtab:
109 * :indentSize=4:tabSize=8:noTabs=true:
110 */
expert.h
_btatt_data_t
Definition packet-btatt.h:52
_btl2cap_data_t
Definition packet-btl2cap.h:45
_packet_info
Definition packet_info.h:43
_tap_handles_t
Definition packet-btatt.h:65
_tap_handles_t::service_handle
uint16_t service_handle
Definition packet-btatt.h:78
_uuid_t
Definition packet-bluetooth.h:195
_value_string
Mapping between a 32-bit integer value and its string representation.
Definition value_string.h:33
expert_field
Definition expert.h:39