Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

packet-mac-nr.h
1 /* packet-mac-nr.h
2 *
3 * Martin Mathieson
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12 /* radioType */
13 #define FDD_RADIO 1
14 #define TDD_RADIO 2
15
16 /* Direction */
17 #define DIRECTION_UPLINK 0
18 #define DIRECTION_DOWNLINK 1
19
20 /* rntiType */
21 #define NO_RNTI 0
22 #define P_RNTI 1
23 #define RA_RNTI 2
24 #define C_RNTI 3
25 #define SI_RNTI 4
26 #define CS_RNTI 5
27
28 /* Context info attached to each NR MAC frame */
29 typedef struct mac_nr_info
30 {
31 /* Needed for decode */
32 guint8 radioType;
33 guint8 direction;
34 guint8 rntiType;
35
36 /* Extra info to display */
37 guint16 rnti;
38 guint16 ueid;
39
40 /* Will these be include in the ME PHR report? */
41 guint8 phr_type2_pcell;
42 guint8 phr_type2_othercell;
43
44 /* Timing info */
45 guint16 sysframeNumber;
46 guint8 subframeNumber;
47
48 /* Length of DL PDU or UL grant size in bytes */
49 guint16 length;
50
51 } mac_nr_info;
52
53
54 /* Functions to be called from outside this module (e.g. in a plugin, where mac_lte_info
55 isn't available) to get/set per-packet data */
56 WS_DLL_PUBLIC
57 mac_nr_info *get_mac_nr_proto_data(packet_info *pinfo);
58 WS_DLL_PUBLIC
59 void set_mac_nr_proto_data(packet_info *pinfo, mac_nr_info *p_mac_nr_info);
60
61 /*****************************************************************/
62 /* UDP framing format */
63 /* ----------------------- */
64 /* Several people have asked about dissecting MAC by framing */
65 /* PDUs over IP. A suggested format over UDP has been created */
66 /* and implemented by this dissector, using the definitions */
67 /* below. */
68 /* */
69 /* A heuristic dissector (enabled by a preference) will */
70 /* recognise a signature at the beginning of these frames. */
71 /*****************************************************************/
72
73
74 /* Signature. Rather than try to define a port for this, or make the
75 port number a preference, frames will start with this string (with no
76 terminating NULL */
77 #define MAC_NR_START_STRING "mac-nr"
78
79 /* Fixed fields. This is followed by the following 3 mandatory fields:
80 - radioType (1 byte)
81 - direction (1 byte)
82 - rntiType (1 byte)
83 (where the allowed values are defined above */
84
85 /* Optional fields. Attaching this info to frames will allow you
86 to show you display/filter/plot/add-custom-columns on these fields, so should
87 be added if available.
88 The format is to have the tag, followed by the value (there is no length field,
89 it's implicit from the tag) */
90
91 #define MAC_NR_RNTI_TAG 0x02
92 /* 2 bytes, network order */
93
94 #define MAC_NR_UEID_TAG 0x03
95 /* 2 bytes, network order */
96
97 #define MAC_NR_FRAME_SUBFRAME_TAG 0x04
98 /* 2 bytes, network order, SFN is stored in 12 MSB and SF in 4 LSB */
99
100 #define MAC_NR_PHR_TYPE2_PCELL_TAG 0x05
101 /* 1 byte, TRUE/FALSE */
102
103 #define MAC_NR_PHR_TYPE2_OTHERCELL_TAG 0x06
104 /* 1 byte, TRUE/FALSE */
105
106
107 /* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU
108 continues until the end of the frame) */
109 #define MAC_NR_PAYLOAD_TAG 0x01
110
111 /*
112 * Editor modelines - http://www.wireshark.org/tools/modelines.html
113 *
114 * Local variables:
115 * c-basic-offset: 4
116 * tab-width: 8
117 * indent-tabs-mode: nil
118 * End:
119 *
120 * vi: set shiftwidth=4 tabstop=8 expandtab:
121 * :indentSize=4:tabSize=8:noTabs=true:
122 */
_packet_info
Definition: packet_info.h:44
mac_nr_info
Definition: packet-mac-nr.h:29