Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-rlc-nr.h
1/* packet-rlc-nr.h
2 *
3 * Pascal Quantin
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_NR_H
12#define PACKET_RLC_NR_H
13
14/* rlcMode */
15#define RLC_TM_MODE 1
16#define RLC_UM_MODE 2
17#define RLC_AM_MODE 4
18
19/* direction */
20#define DIRECTION_UPLINK 0
21#define DIRECTION_DOWNLINK 1
22
23/* bearerType */
24#define BEARER_TYPE_CCCH 1
25#define BEARER_TYPE_BCCH_BCH 2
26#define BEARER_TYPE_PCCH 3
27#define BEARER_TYPE_SRB 4
28#define BEARER_TYPE_DRB 5
29#define BEARER_TYPE_BCCH_DL_SCH 6
30
31/* sequenceNumberLength */
32#define TM_SN_LENGTH_0_BITS 0
33#define UM_SN_LENGTH_6_BITS 6
34#define UM_SN_LENGTH_12_BITS 12
35#define AM_SN_LENGTH_12_BITS 12
36#define AM_SN_LENGTH_18_BITS 18
37
38/* Info attached to each NR RLC frame */
39typedef struct rlc_nr_info
40{
41 uint8_t rlcMode;
42 uint8_t direction;
43 uint8_t sequenceNumberLength;
44 uint8_t bearerType;
45 uint8_t bearerId;
46 uint16_t ueid;
47 uint16_t pduLength;
49
51{
52 bool active;
53 uint16_t ueid; /* Mandatory */
54 uint8_t drbid; /* Mandatory */
55
56 bool pdcpUlSnLength_present;
57 uint8_t pdcpUlSnLength; /* Part of PDCP config - optional */
58 bool pdcpDlSnLength_present;
59 uint8_t pdcpDlSnLength; /* Part of PDCP config - optional */
60 bool pdcpUlSdap;
61 bool pdcpDlSdap;
62 bool pdcpIntegrityProtection;
63 bool pdcpCipheringDisabled;
64
66
67/* TODO: could probably merge this struct with above */
68typedef struct pdcp_ue_parameters {
69 uint32_t id;
70 uint8_t pdcp_sn_bits_ul;
71 uint8_t pdcp_sn_bits_dl;
72 bool pdcp_sdap_ul;
73 bool pdcp_sdap_dl;
74 bool pdcp_integrity;
75 bool pdcp_ciphering_disabled;
77
78/* Configure DRB PDCP channel properties. */
79void set_rlc_nr_drb_pdcp_mapping(packet_info *pinfo,
80 nr_drb_rlc_pdcp_mapping_t *drb_mapping);
81
82pdcp_bearer_parameters* get_rlc_nr_drb_pdcp_mapping(uint16_t ue_id, uint8_t drb_id);
83
84/*****************************************************************/
85/* UDP framing format */
86/* ----------------------- */
87/* Several people have asked about dissecting RLC by framing */
88/* PDUs over IP. A suggested format over UDP has been defined */
89/* and implemented by this dissector, using the definitions */
90/* below. */
91/* */
92/* A heuristic dissector (enabled by a preference) will */
93/* recognise a signature at the beginning of these frames. */
94/*****************************************************************/
95
96
97/* Signature. Rather than try to define a port for this, or make the
98 port number a preference, frames will start with this string (with no
99 terminating NULL */
100#define RLC_NR_START_STRING "rlc-nr"
101
102/* Fixed field. This is followed by the following 2 mandatory field:
103 - rlcMode (1 byte)
104 - sequenceNumberLength (1 byte)
105 (where the allowed values are defined above) */
106
107/* Optional fields. Attaching this info to frames will allow you
108 to show you display/filter/plot/add-custom-columns on these fields, so should
109 be added if available.
110 The format is to have the tag, followed by the value (there is no length field,
111 it's implicit from the tag) */
112
113#define RLC_NR_DIRECTION_TAG 0x02
114/* 1 byte */
115
116#define RLC_NR_UEID_TAG 0x03
117/* 2 bytes, network order */
118
119#define RLC_NR_BEARER_TYPE_TAG 0x04
120/* 1 byte */
121
122#define RLC_NR_BEARER_ID_TAG 0x05
123/* 1 byte */
124
125/* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU
126 continues until the end of the frame) */
127#define RLC_NR_PAYLOAD_TAG 0x01
128
129#endif
130
131/*
132 * Editor modelines - https://www.wireshark.org/tools/modelines.html
133 *
134 * Local variables:
135 * c-basic-offset: 4
136 * tab-width: 8
137 * indent-tabs-mode: nil
138 * End:
139 *
140 * vi: set shiftwidth=4 tabstop=8 expandtab:
141 * :indentSize=4:tabSize=8:noTabs=true:
142 */
Definition packet_info.h:43
Definition packet-rlc-nr.h:51
Definition packet-rlc-nr.h:68
Definition packet-rlc-nr.h:40