Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
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 <[email protected]>
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
22typedef 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_CENTRAL_PERIPHERAL 1
31#define BTLE_DIR_PERIPHERAL_CENTRAL 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
43typedef struct {
44 btle_AA_category_t aa_category;
45 unsigned crc_checked_at_capture: 1;
46 unsigned crc_valid_at_capture: 1;
47 unsigned mic_checked_at_capture: 1;
48 unsigned mic_valid_at_capture: 1;
49 unsigned direction: 2; /* 0 Unknown, 1 Central -> Peripheral, 2 Peripheral -> Central */
50 unsigned aux_pdu_type_valid: 1;
51 unsigned event_counter_valid: 1;
52 uint8_t pdu_type;
53 uint8_t aux_pdu_type;
54 uint8_t channel;
55 uint8_t phy;
56 uint16_t 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:95
Definition packet-btle.h:43