6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 #define DIRECTION_UPLINK 0
33 #define DIRECTION_DOWNLINK 1
38 #define CHANNEL_TYPE_CCCH 1
39 #define CHANNEL_TYPE_BCCH_BCH 2
40 #define CHANNEL_TYPE_PCCH 3
41 #define CHANNEL_TYPE_SRB 4
42 #define CHANNEL_TYPE_DRB 5
43 #define CHANNEL_TYPE_BCCH_DL_SCH 6
44 #define CHANNEL_TYPE_MCCH 7
45 #define CHANNEL_TYPE_MTCH 8
47 /* UMSequenceNumberLength */
48 #define UM_SN_LENGTH_5_BITS 5
49 #define UM_SN_LENGTH_10_BITS 10
51 /* Info attached to each LTE RLC frame */
52 typedef struct rlc_lte_info
61 guint8 UMSequenceNumberLength
;
65 typedef struct rlc_lte_tap_info
{
66 /* Info from context */
74 guint8 UMSequenceNumberLength
;
77 guint8 loggedInMACFrame
;
78 guint16 sequenceNumber
;
84 guint16 NACKs
[MAX_NACKs
];
90 /* Configure number of PDCP SN bits to use for DRB channels. */
91 void set_rlc_lte_drb_pdcp_seqnum_length(guint16 ueid
, guint8 drbid
, guint8 userplane_seqnum_length
);
94 /*****************************************************************/
95 /* UDP framing format */
96 /* ----------------------- */
97 /* Several people have asked about dissecting RLC by framing */
98 /* PDUs over IP. A suggested format over UDP has been defined */
99 /* and implemented by this dissector, using the definitions */
100 /* below. A link to an example program showing you how to encode */
101 /* these headers and send LTE RLC PDUs on a UDP socket is */
102 /* provided at http://wiki.wireshark.org/RLC-LTE */
104 /* A heuristic dissecter (enabled by a preference) will */
105 /* recognise a signature at the beginning of these frames. */
106 /* Until someone is using this format, suggestions for changes */
108 /*****************************************************************/
111 /* Signature. Rather than try to define a port for this, or make the
112 port number a preference, frames will start with this string (with no
114 #define RLC_LTE_START_STRING "rlc-lte"
116 /* Fixed field. This is followed by the following 1 mandatory field:
118 (where the allowed values are defined above */
120 /* Conditional field. This field is mandatory in case of RLC Unacknowledged mode.
121 The format is to have the tag, followed by the value (there is no length field,
122 it's implicit from the tag). The allowed values are defined above. */
124 #define RLC_LTE_UM_SN_LENGTH_TAG 0x02
127 /* Optional fields. Attaching this info to frames will allow you
128 to show you display/filter/plot/add-custom-columns on these fields, so should
129 be added if available.
130 The format is to have the tag, followed by the value (there is no length field,
131 it's implicit from the tag) */
133 #define RLC_LTE_DIRECTION_TAG 0x03
136 #define RLC_LTE_PRIORITY_TAG 0x04
139 #define RLC_LTE_UEID_TAG 0x05
140 /* 2 bytes, network order */
142 #define RLC_LTE_CHANNEL_TYPE_TAG 0x06
143 /* 2 bytes, network order */
145 #define RLC_LTE_CHANNEL_ID_TAG 0x07
146 /* 2 bytes, network order */
149 /* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU
150 continues until the end of the frame) */
151 #define RLC_LTE_PAYLOAD_TAG 0x01