summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btatt.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-btatt.h
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--epan/dissectors/packet-btatt.h60
1 files changed, 56 insertions, 4 deletions
diff --git a/epan/dissectors/packet-btatt.h b/epan/dissectors/packet-btatt.h
index 3a2e8049..f81c6377 100644
--- a/epan/dissectors/packet-btatt.h
+++ b/epan/dissectors/packet-btatt.h
@@ -14,17 +14,65 @@
#define __PACKET_BTATT_H__
#include <epan/expert.h>
+#include "packet-bluetooth.h"
+
+#define ATT_OPCODE_ERROR_RESPONSE 0x01
+#define ATT_OPCODE_EXCHANGE_MTU_REQUEST 0x02
+#define ATT_OPCODE_EXCHANGE_MTU_RESPONSE 0x03
+#define ATT_OPCODE_FIND_INFORMATION_REQUEST 0x04
+#define ATT_OPCODE_FIND_INFORMATION_RESPONSE 0x05
+#define ATT_OPCODE_FIND_BY_TYPE_VALUE_REQUEST 0x06
+#define ATT_OPCODE_FIND_BY_TYPE_VALUE_RESPONSE 0x07
+
+#define ATT_OPCODE_READ_BY_TYPE_REQUEST 0x08
+#define ATT_OPCODE_READ_BY_TYPE_RESPONSE 0x09
+#define ATT_OPCODE_READ_REQUEST 0x0A
+#define ATT_OPCODE_READ_RESPONSE 0x0B
+#define ATT_OPCODE_READ_BLOB_REQUEST 0x0C
+#define ATT_OPCODE_READ_BLOB_RESPONSE 0x0D
+#define ATT_OPCODE_READ_MULTIPLE_REQUEST 0x0E
+#define ATT_OPCODE_READ_MULTIPLE_RESPONSE 0x0F
+#define ATT_OPCODE_READ_BY_GROUP_TYPE_REQUEST 0x10
+#define ATT_OPCODE_READ_BY_GROUP_TYPE_RESPONSE 0x11
+
+#define ATT_OPCODE_WRITE_REQUEST 0x12
+#define ATT_OPCODE_WRITE_RESPONSE 0x13
+#define ATT_OPCODE_WRITE_PREPARE_REQUEST 0x16
+#define ATT_OPCODE_WRITE_PREPARE_RESPONSE 0x17
+#define ATT_OPCODE_WRITE_EXECUTE_REQUEST 0x18
+#define ATT_OPCODE_WRITE_EXECUTE_RESPONSE 0x19
+#define ATT_OPCODE_WRITE_COMMAND 0x52
+#define ATT_OPCODE_WRITE_SIGNED_COMMAND 0xD2
+
+#define ATT_OPCODE_HANDLE_VALUE_NOTIFICATION 0x1B
+#define ATT_OPCODE_HANDLE_VALUE_INDICATION 0x1D
+#define ATT_OPCODE_HANDLE_VALUE_CONFIRMATION 0x1E
typedef struct _btatt_data_t {
bluetooth_data_t *bluetooth_data;
-
- guint8 opcode;
+ uint8_t opcode;
+ /* ATT handle for currently processed packet (optional) */
+ uint32_t handle;
} btatt_data_t;
+enum attribute_type {
+ ATTRIBUTE_TYPE_SERVICE,
+ ATTRIBUTE_TYPE_CHARACTERISTIC,
+ ATTRIBUTE_TYPE_OTHER
+};
typedef struct _tap_handles_t {
- guint32 handle;
+ uint32_t handle;
bluetooth_uuid_t uuid;
+ enum attribute_type attribute_type;
+
+ /** Store the service and characteristic declaration.
+ *
+ * This allows us to find the parent item service or
+ * characteristic.
+ */
+ uint16_t service_handle;
+ uint16_t char_decl_handle;
} tap_handles_t;
@@ -36,7 +84,11 @@ extern const value_string btatt_ips_uncertainty_coordinate_system[];
extern const value_string tds_organization_id_vals[];
extern const value_string characteristic_presentation_namespace_description_btsig_vals[];
-WS_DLL_PUBLIC gboolean bluetooth_gatt_has_no_parameter(guint8 opcode);
+bluetooth_uuid_t
+get_gatt_bluetooth_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
+ bluetooth_data_t *bluetooth_data);
+
+WS_DLL_PUBLIC bool bluetooth_gatt_has_no_parameter(uint8_t opcode);
WS_DLL_PUBLIC expert_field ei_btatt_invalid_usage;
#endif