Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-rlc-lte.h
1/* packet-rlc-lte.h
2 *
3 * Martin Mathieson
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <[email protected]>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef PACKET_RLC_LTE_H
12#define PACKET_RLC_LTE_H
13
14/* rlcMode */
15#define RLC_TM_MODE 1
16#define RLC_UM_MODE 2
17#define RLC_AM_MODE 4
18#define RLC_PREDEF 8
19
20/* direction */
21#define DIRECTION_UPLINK 0
22#define DIRECTION_DOWNLINK 1
23
24/* priority ? */
25
26/* channelType */
27#define CHANNEL_TYPE_CCCH 1
28#define CHANNEL_TYPE_BCCH_BCH 2
29#define CHANNEL_TYPE_PCCH 3
30#define CHANNEL_TYPE_SRB 4
31#define CHANNEL_TYPE_DRB 5
32#define CHANNEL_TYPE_BCCH_DL_SCH 6
33#define CHANNEL_TYPE_MCCH 7
34#define CHANNEL_TYPE_MTCH 8
35
36/* sequenceNumberLength */
37#define UM_SN_LENGTH_5_BITS 5
38#define UM_SN_LENGTH_10_BITS 10
39#define AM_SN_LENGTH_10_BITS 10
40#define AM_SN_LENGTH_16_BITS 16
41
42
43typedef enum rlc_lte_nb_mode {
44 rlc_no_nb_mode = 0,
45 rlc_nb_mode = 1
46} rlc_lte_nb_mode;
47
48
49/* Info attached to each LTE RLC frame */
50typedef struct rlc_lte_info
51{
52 uint8_t rlcMode;
53 uint8_t direction;
54 uint8_t priority;
55 uint8_t sequenceNumberLength;
56 uint16_t ueid;
57 uint16_t channelType;
58 uint16_t channelId; /* for SRB: 1=SRB1, 2=SRB2, 3=SRB1bis; for DRB: DRB ID */
59 uint16_t pduLength;
60 bool extendedLiField;
61 rlc_lte_nb_mode nbMode;
63
64
65/* Configure number of PDCP SN bits to use for DRB channels. */
66void set_rlc_lte_drb_pdcp_seqnum_length(packet_info *pinfo, uint16_t ueid, uint8_t drbid, uint8_t userplane_seqnum_length);
67
68/* Configure LI field for AM DRB channels. */
69void set_rlc_lte_drb_li_field(packet_info *pinfo, uint16_t ueid, uint8_t drbid, bool ul_ext_li_field, bool dl_ext_li_field);
70
71/* Reset UE's bearers */
72void rlc_lte_reset_ue_bearers(packet_info *pinfo, uint16_t ueid);
73
74/**********************************************************************/
75/* UDP framing format */
76/* ----------------------- */
77/* Several people have asked about dissecting RLC by framing */
78/* PDUs over IP. A suggested format over UDP has been defined */
79/* and implemented by this dissector, using the definitions */
80/* below. A link to an example program showing you how to encode */
81/* these headers and send LTE RLC PDUs on a UDP socket is */
82/* provided at https://gitlab.com/wireshark/wireshark/-/wikis/RLC-LTE */
83/* */
84/* A heuristic dissector (enabled by a preference) will */
85/* recognise a signature at the beginning of these frames. */
86/* Until someone is using this format, suggestions for changes */
87/* are welcome. */
88/**********************************************************************/
89
90
91/* Signature. Rather than try to define a port for this, or make the
92 port number a preference, frames will start with this string (with no
93 terminating NULL */
94#define RLC_LTE_START_STRING "rlc-lte"
95
96/* Fixed field. This is followed by the following 1 mandatory field:
97 - rlcMode (1 byte)
98 (where the allowed values are defined above */
99
100/* Conditional field. This field is mandatory in case of RLC Unacknowledged mode.
101 In case of RLC Acknowledged mode, the field is optional (assume 10 bits by default).
102 The format is to have the tag, followed by the value (there is no length field,
103 it's implicit from the tag). The allowed values are defined above. */
104
105#define RLC_LTE_SN_LENGTH_TAG 0x02
106/* 1 byte */
107
108/* Optional fields. Attaching this info to frames will allow you
109 to show you display/filter/plot/add-custom-columns on these fields, so should
110 be added if available.
111 The format is to have the tag, followed by the value (there is no length field,
112 it's implicit from the tag) */
113
114#define RLC_LTE_DIRECTION_TAG 0x03
115/* 1 byte */
116
117#define RLC_LTE_PRIORITY_TAG 0x04
118/* 1 byte */
119
120#define RLC_LTE_UEID_TAG 0x05
121/* 2 bytes, network order */
122
123#define RLC_LTE_CHANNEL_TYPE_TAG 0x06
124/* 2 bytes, network order */
125
126#define RLC_LTE_CHANNEL_ID_TAG 0x07
127/* 2 bytes, network order */
128
129#define RLC_LTE_EXT_LI_FIELD_TAG 0x08
130/* 0 byte, tag presence indicates that AM DRB PDU is using an extended LI field of 15 bits */
131
132#define RLC_LTE_NB_MODE_TAG 0x09
133/* 1 byte containing rlc_lte_nb_mode enum value */
134
135/* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU
136 continues until the end of the frame) */
137#define RLC_LTE_PAYLOAD_TAG 0x01
138
139#endif
140
141/*
142 * Editor modelines - https://www.wireshark.org/tools/modelines.html
143 *
144 * Local variables:
145 * c-basic-offset: 4
146 * tab-width: 8
147 * indent-tabs-mode: nil
148 * End:
149 *
150 * vi: set shiftwidth=4 tabstop=8 expandtab:
151 * :indentSize=4:tabSize=8:noTabs=true:
152 */
Definition packet_info.h:43
Definition packet-rlc-lte.h:51