2 * Structures for determining the dissection context for Bluetooth mesh.
4 * Copyright 2019, Piotr Winiarczyk <wino45@gmail.com>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __PACKET_BTMESH_H__
13 #define __PACKET_BTMESH_H__
15 #include <epan/packet.h>
17 #define BTMESH_NONCE_TYPE_NETWORK 0x00
18 #define BTMESH_NONCE_TYPE_APPLICATION 0x01
19 #define BTMESH_NONCE_TYPE_DEVICE 0x02
20 #define BTMESH_NONCE_TYPE_PROXY 0x03
22 #define BTMESH_ADDRESS_UNASSIGNED 0x00
23 #define BTMESH_ADDRESS_UNICAST 0x01
24 #define BTMESH_ADDRESS_VIRTUAL 0x02
25 #define BTMESH_ADDRESS_GROUP 0x03
28 E_BTMESH_TR_UNKNOWN = 0,
35 E_BTMESH_PROXY_SIDE_UNKNOWN = 0,
36 E_BTMESH_PROXY_SIDE_SERVER,
37 E_BTMESH_PROXY_SIDE_CLIENT,
38 E_BTMESH_PROXY_SIDE_LAST
39 } btle_mesh_proxy_side_t;
42 btle_mesh_tr_t transport;
45 } btle_mesh_transport_ctx_t;
52 guint32 access_address;
53 btle_mesh_proxy_side_t proxy_side;
54 } btle_mesh_proxy_ctx_t;
60 guint8 seq_src_buf[5];
61 guint8 ivindex_buf[4];
62 guint8 net_nonce_type;
63 guint32 net_key_iv_index_hash;
68 gint32 label_uuid_idx;
69 guint32 seg; /* Segmentation */
71 guint8 app_nonce_type;
74 } network_decryption_ctx_t;
76 tvbuff_t *btmesh_network_find_key_and_decrypt(tvbuff_t *tvb, packet_info *pinfo, guint8 **decrypted_data, int *enc_data_len, network_decryption_ctx_t *dec_ctx);
78 #endif /* __PACKET_BTMESH_H__ */
81 * Editor modelines - https://www.wireshark.org/tools/modelines.html
86 * indent-tabs-mode: nil
89 * vi: set shiftwidth=4 tabstop=8 expandtab:
90 * :indentSize=4:tabSize=8:noTabs=true: