| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-umts_rlc.h
1/* packet-umts_rlc.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef PACKET_RLC_H
11#define PACKET_RLC_H
12
13#include <wiretap/wtap.h>
14
15/* Do not change enum order and append only to keep
16 backward compatibility with UDP framing format */
17 enum rlc_mode {
18 RLC_TM,
19 RLC_UM,
20 RLC_AM,
21 RLC_UNKNOWN_MODE
22};
23
24/* Do not change enum order and append only to keep
25 backward compatibility with UDP framing format */
26 enum rlc_li_size {
27 RLC_LI_VARIABLE,
28 RLC_LI_7BITS,
29 RLC_LI_15BITS
30};
31
32#define MAX_RLC_CHANS 64
33 typedef struct rlc_info
34{
35 /* Values in the 'ueid' array should identify users exclusively */
36 /* Preferred content: */
37 /* 1. U-RNTI */
38 /* 2. C-RNC Context (from NBAP) */
39 uint32_t ueid[MAX_RLC_CHANS];
40 uint8_t mode[MAX_RLC_CHANS];
41 uint8_t rbid[MAX_RLC_CHANS];
42 enum rlc_li_size li_size[MAX_RLC_CHANS];
43 bool ciphered[MAX_RLC_CHANS];
44 bool deciphered[MAX_RLC_CHANS];
45} rlc_info;
46
47/* Reset the specified channel's reassembly data, useful for when a sequence
48 * resets on transport channel swap. */
49 void rlc_reset_channel(enum rlc_mode mode, uint8_t rbid, uint8_t dir, uint32_t ueid, struct atm_phdr *atm);
50
51/*****************************************************************/
52/* UDP framing format */
53/* ----------------------- */
54/* Several people have asked about dissecting RLC by framing */
55/* PDUs over IP. A suggested format over UDP has been defined */
56/* and implemented by this dissector, using the definitions */
57/* below. A link to an example program showing you how to encode */
58/* these headers and send RLC PDUs on a UDP socket is provided */
59/* at https://gitlab.com/wireshark/wireshark/-/wikis/RLC */
60/* */
61/* A heuristic dissector (enabled by a preference) will */
62/* recognise a signature at the beginning of these frames. */
63/* Until someone is using this format, suggestions for changes */
64/* are welcome. */
65/*****************************************************************/
66
67
68/* Signature. Rather than try to define a port for this, or make the
69 port number a preference, frames will start with this string (with no
70 terminating NULL */
71#define RLC_START_STRING "umts-rlc"
72
73/* Conditional fields. The channel type or RLC mode should be present.
74 If the channel type is present, the RLC mode will be ignored.
75 If none of them is present, the decoding will be skipped.
76 The RLC mode tag uses the values from the rlc_mode enum. */
77
78#define UMTS_CHANNEL_TYPE_UNSPECIFIED 0
79#define UMTS_CHANNEL_TYPE_PCCH 1
80#define UMTS_CHANNEL_TYPE_CCCH 2
81#define UMTS_CHANNEL_TYPE_DCCH 3
82#define UMTS_CHANNEL_TYPE_PS_DTCH 4
83#define UMTS_CHANNEL_TYPE_CTCH 5
84#define UMTS_CHANNEL_TYPE_BCCH 6
85
86#define RLC_CHANNEL_TYPE_TAG 0x02
87/* 1 byte */
88
89#define RLC_MODE_TAG 0x03
90/* 1 byte, enum rlc_mode value */
91
92/* Optional fields. Attaching this info to frames will allow you
93 to show you display/filter/plot/add-custom-columns on these fields, so should
94 be added if available.
95 The format is to have the tag, followed by the value (there is no length field,
96 it's implicit from the tag) */
97
98#define DIRECTION_UPLINK 0
99#define DIRECTION_DOWNLINK 1
100
101#define RLC_DIRECTION_TAG 0x04
102/* 1 byte */
103
104#define RLC_URNTI_TAG 0x05
105/* 4 bytes, network order */
106
107#define RLC_RADIO_BEARER_ID_TAG 0x06
108/* 1 byte */
109
110#define RLC_LI_SIZE_TAG 0x07
111/* 1 byte, enum rlc_li_size value */
112
113/* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU
114 continues until the end of the frame) */
115#define RLC_PAYLOAD_TAG 0x01
116
117#endif /* PACKET_RLC_H */
atm_phdr
Definition wtap.h:490
rlc_info
Definition packet-umts_rlc.h:34
wtap.h