Wireshark  4.3.0
The Wireshark network protocol analyzer
packet-btle.h
1 /* packet-btle.h
2  * Structures for determining the dissection context for BTLE.
3  *
4  * Copyright 2014, Christopher D. Kilgour, techie at whiterocker dot com
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 #ifndef __PACKET_BTLE_H__
13 #define __PACKET_BTLE_H__
14 
15 #include "packet-bluetooth.h"
16 
17 /*
18  * These structures are meant to support the provision of contextual
19  * metadata to the BTLE dissector.
20  */
21 
22 typedef enum {
23  E_AA_NO_COMMENT = 0,
24  E_AA_MATCHED,
25  E_AA_BIT_ERRORS,
26  E_AA_ILLEGAL
27 } btle_AA_category_t;
28 
29 #define BTLE_DIR_UNKNOWN 0
30 #define BTLE_DIR_MASTER_SLAVE 1
31 #define BTLE_DIR_SLAVE_MASTER 2
32 
33 #define BTLE_PDU_TYPE_UNKNOWN 0 /* Unknown physical channel PDU */
34 #define BTLE_PDU_TYPE_ADVERTISING 1 /* Advertising physical channel PDU */
35 #define BTLE_PDU_TYPE_DATA 2 /* Data physical channel PDU */
36 #define BTLE_PDU_TYPE_CONNECTEDISO 3 /* Connected isochronous physical channel PDU */
37 #define BTLE_PDU_TYPE_BROADCASTISO 4 /* Broadcast isochronous physical channel PDU */
38 
39 #define LE_1M_PHY 0
40 #define LE_2M_PHY 1
41 #define LE_CODED_PHY 2
42 
43 typedef struct {
44  btle_AA_category_t aa_category;
45  guint crc_checked_at_capture: 1;
46  guint crc_valid_at_capture: 1;
47  guint mic_checked_at_capture: 1;
48  guint mic_valid_at_capture: 1;
49  guint direction: 2; /* 0 Unknown, 1 Master -> Slave, 2 Slave -> Master */
50  guint aux_pdu_type_valid: 1;
51  guint event_counter_valid: 1;
52  guint8 pdu_type;
53  guint8 aux_pdu_type;
54  guint8 channel;
55  guint8 phy;
56  guint16 event_counter;
57 
58  union {
59  void *data;
60  bluetooth_data_t *bluetooth_data;
61  } previous_protocol_data;
63 
64 #endif /* __PACKET_BTLE_H__ */
65 
66 /*
67  * Editor modelines - https://www.wireshark.org/tools/modelines.html
68  *
69  * Local variables:
70  * c-basic-offset: 4
71  * tab-width: 8
72  * indent-tabs-mode: nil
73  * End:
74  *
75  * vi: set shiftwidth=4 tabstop=8 expandtab:
76  * :indentSize=4:tabSize=8:noTabs=true:
77  */
Definition: packet-bluetooth.h:96
Definition: packet-btle.h:43