| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-btatt.h
1/* packet-btatt.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_READ_MULTIPLE_VARIABLE_REQUEST 0x20
46#define ATT_OPCODE_READ_MULTIPLE_VARIABLE_RESPONSE 0x21
47#define ATT_OPCODE_WRITE_COMMAND 0x52
48#define ATT_OPCODE_WRITE_SIGNED_COMMAND 0xD2
49
50#define ATT_OPCODE_HANDLE_VALUE_NOTIFICATION 0x1B
51#define ATT_OPCODE_MULTIPLE_HANDLE_VALUE_NOTIFICATION 0x23
52#define ATT_OPCODE_HANDLE_VALUE_INDICATION 0x1D
53#define ATT_OPCODE_HANDLE_VALUE_CONFIRMATION 0x1E
54
55 typedef struct _btatt_data_t {
56 btl2cap_data_t *l2cap_data;
57 uint8_t opcode;
58 /* ATT handle for currently processed packet (optional) */
59 uint32_t handle;
60} btatt_data_t;
61
62 enum attribute_type {
63 ATTRIBUTE_TYPE_SERVICE,
64 ATTRIBUTE_TYPE_CHARACTERISTIC,
65 ATTRIBUTE_TYPE_OTHER
66};
67
68 typedef struct _tap_handles_t {
69 uint32_t handle;
70 bluetooth_uuid_t uuid;
71 const char* uuid_str;
72 const char* numeric_uuid_str;
73
74 enum attribute_type attribute_type;
75
81 uint16_t service_handle;
82 uint16_t char_decl_handle;
83} tap_handles_t;
84
85
86 extern const value_string btatt_ips_coordinate_system[];
87 extern const value_string btatt_ips_uncertainty_stationary_vals[];
88 extern const value_string btatt_ips_uncertainty_update_time_vals[];
89 extern const value_string btatt_ips_uncertainty_precision_vals[];
90 extern const value_string btatt_ips_uncertainty_coordinate_system[];
91 extern const value_string tds_organization_id_vals[];
92 extern const value_string characteristic_presentation_namespace_description_btsig_vals[];
93
94bluetooth_uuid_t
95get_gatt_bluetooth_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
96 btl2cap_data_t *l2cap_data);
97
98WS_DLL_PUBLIC expert_field ei_btatt_invalid_usage;
99
100#endif
101
102/*
103 * Editor modelines - https://www.wireshark.org/tools/modelines.html
104 *
105 * Local variables:
106 * c-basic-offset: 4
107 * tab-width: 8
108 * indent-tabs-mode: nil
109 * End:
110 *
111 * vi: set shiftwidth=4 tabstop=8 expandtab:
112 * :indentSize=4:tabSize=8:noTabs=true:
113 */
expert.h
packet_info
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
_btatt_data_t
Definition packet-btatt.h:55
_tap_handles_t
Definition packet-btatt.h:68
_tap_handles_t::service_handle
uint16_t service_handle
Definition packet-btatt.h:81
expert_field
Pairs an expert info index with its associated header field index for registration and display.
Definition expert.h:41
value_string
struct _value_string value_string
Mapping between a 32-bit integer value and its string representation.