1 /* Routines for UMTS RLC disassembly
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 /* Do not change enum order and append only to keep
28 backward compatibility with UDP framing format */
36 /* Do not change enum order and append only to keep
37 backward compatibility with UDP framing format */
44 #define MAX_RLC_CHANS 64
45 typedef struct rlc_info
47 guint32 urnti
[MAX_RLC_CHANS
];
48 guint8 mode
[MAX_RLC_CHANS
];
49 guint8 rbid
[MAX_RLC_CHANS
];
50 enum rlc_li_size li_size
[MAX_RLC_CHANS
];
51 gboolean ciphered
[MAX_RLC_CHANS
];
52 gboolean deciphered
[MAX_RLC_CHANS
];
55 /* Reset the specified channel's reassembly data, useful for when a sequence
56 * resets on transport channel swap. */
57 void rlc_reset_channel(enum rlc_mode mode
, guint8 rbid
, guint8 dir
, guint32 urnti
);
59 /* Tells other functions if this packet is ciphered or not */
60 gboolean
rlc_is_ciphered(packet_info
* pinfo
);
62 /*****************************************************************/
63 /* UDP framing format */
64 /* ----------------------- */
65 /* Several people have asked about dissecting RLC by framing */
66 /* PDUs over IP. A suggested format over UDP has been defined */
67 /* and implemented by this dissector, using the definitions */
68 /* below. A link to an example program showing you how to encode */
69 /* these headers and send RLC PDUs on a UDP socket is provided */
70 /* at http://wiki.wireshark.org/RLC */
72 /* A heuristic dissecter (enabled by a preference) will */
73 /* recognise a signature at the beginning of these frames. */
74 /* Until someone is using this format, suggestions for changes */
76 /*****************************************************************/
79 /* Signature. Rather than try to define a port for this, or make the
80 port number a preference, frames will start with this string (with no
82 #define RLC_START_STRING "umts-rlc"
84 /* Conditional fields. The channel type or RLC mode should be present.
85 If the channel type is present, the RLC mode will be ignored.
86 If none of them is present, the decoding will be skipped.
87 The RLC mode tag uses the values from the rlc_mode enum. */
89 #define UMTS_CHANNEL_TYPE_UNSPECIFIED 0
90 #define UMTS_CHANNEL_TYPE_PCCH 1
91 #define UMTS_CHANNEL_TYPE_CCCH 2
92 #define UMTS_CHANNEL_TYPE_DCCH 3
93 #define UMTS_CHANNEL_TYPE_PS_DTCH 4
94 #define UMTS_CHANNEL_TYPE_CTCH 5
95 #define UMTS_CHANNEL_TYPE_BCCH 6
97 #define RLC_CHANNEL_TYPE_TAG 0x02
100 #define RLC_MODE_TAG 0x03
101 /* 1 byte, enum rlc_mode value */
103 /* Optional fields. Attaching this info to frames will allow you
104 to show you display/filter/plot/add-custom-columns on these fields, so should
105 be added if available.
106 The format is to have the tag, followed by the value (there is no length field,
107 it's implicit from the tag) */
109 #define DIRECTION_UPLINK 0
110 #define DIRECTION_DOWNLINK 1
112 #define RLC_DIRECTION_TAG 0x04
115 #define RLC_URNTI_TAG 0x05
116 /* 4 bytes, network order */
118 #define RLC_RADIO_BEARER_ID_TAG 0x06
121 #define RLC_LI_SIZE_TAG 0x07
122 /* 1 byte, enum rlc_li_size value */
124 /* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU
125 continues until the end of the frame) */
126 #define RLC_PAYLOAD_TAG 0x01
128 #endif /* PACKET_RLC_H */