Wireshark 4.5.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 <[email protected]>
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
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
26
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
37
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
46
47#define ATT_OPCODE_HANDLE_VALUE_NOTIFICATION 0x1B
48#define ATT_OPCODE_HANDLE_VALUE_INDICATION 0x1D
49#define ATT_OPCODE_HANDLE_VALUE_CONFIRMATION 0x1E
50
51typedef 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;
57
58enum attribute_type {
59 ATTRIBUTE_TYPE_SERVICE,
60 ATTRIBUTE_TYPE_CHARACTERISTIC,
61 ATTRIBUTE_TYPE_OTHER
62};
63
64typedef struct _tap_handles_t {
65 uint32_t handle;
67 enum attribute_type attribute_type;
68
75 uint16_t char_decl_handle;
77
78
79extern const value_string btatt_ips_coordinate_system[];
80extern const value_string btatt_ips_uncertainty_stationary_vals[];
81extern const value_string btatt_ips_uncertainty_update_time_vals[];
82extern const value_string btatt_ips_uncertainty_precision_vals[];
83extern const value_string btatt_ips_uncertainty_coordinate_system[];
84extern const value_string tds_organization_id_vals[];
85extern const value_string characteristic_presentation_namespace_description_btsig_vals[];
86
88get_gatt_bluetooth_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
89 bluetooth_data_t *bluetooth_data);
90
91WS_DLL_PUBLIC bool bluetooth_gatt_has_no_parameter(uint8_t opcode);
92WS_DLL_PUBLIC expert_field ei_btatt_invalid_usage;
93
94#endif
95
96/*
97 * Editor modelines - https://www.wireshark.org/tools/modelines.html
98 *
99 * Local variables:
100 * c-basic-offset: 4
101 * tab-width: 8
102 * indent-tabs-mode: nil
103 * End:
104 *
105 * vi: set shiftwidth=4 tabstop=8 expandtab:
106 * :indentSize=4:tabSize=8:noTabs=true:
107 */
Definition packet-bluetooth.h:95
Definition packet-btatt.h:51
Definition packet_info.h:43
Definition packet-btatt.h:64
uint16_t service_handle
Definition packet-btatt.h:74
Definition packet-bluetooth.h:195
Definition value_string.h:25
Definition expert.h:39