MSWSP: add ids for another unknown Property Set
[wireshark-wip.git] / epan / dissectors / packet-pdcp-lte.h
blobed4f3b1d1b682d2548290889dbca4f63399fb597
1 /* packet-pdcp-lte.h
3 * Martin Mathieson
4 * $Id$
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.
26 #include "packet-rohc.h"
28 /* Direction */
29 #define DIRECTION_UPLINK 0
30 #define DIRECTION_DOWNLINK 1
32 enum pdcp_plane
34 SIGNALING_PLANE = 1,
35 USER_PLANE = 2
38 typedef enum LogicalChannelType
40 Channel_DCCH=1,
41 Channel_BCCH=2,
42 Channel_CCCH=3,
43 Channel_PCCH=4
44 } LogicalChannelType;
46 typedef enum
48 BCH_TRANSPORT=1,
49 DLSCH_TRANSPORT=2
50 } BCCHTransportType;
52 #define PDCP_SN_LENGTH_5_BITS 5
53 #define PDCP_SN_LENGTH_7_BITS 7
54 #define PDCP_SN_LENGTH_12_BITS 12
55 #define PDCP_SN_LENGTH_15_BITS 15
57 enum security_integrity_algorithm_e { eia0, eia1, eia2, eia3 };
58 enum security_ciphering_algorithm_e { eea0, eea1, eea2 };
60 typedef struct pdcp_security_info_t
62 guint32 configuration_frame;
63 gboolean seen_next_ul_pdu;
64 enum security_integrity_algorithm_e integrity;
65 enum security_ciphering_algorithm_e ciphering;
66 } pdcp_security_info_t;
69 /* Info attached to each LTE PDCP/RoHC packet */
70 typedef struct pdcp_lte_info
72 /* Channel info is needed for RRC parsing */
73 guint8 direction;
74 guint16 ueid;
75 LogicalChannelType channelType;
76 guint16 channelId;
77 BCCHTransportType BCCHTransport;
79 /* Details of PDCP header */
80 gboolean no_header_pdu;
81 enum pdcp_plane plane;
82 guint8 seqnum_length;
84 /* RoHC settings */
85 rohc_info rohc;
87 guint8 is_retx;
88 } pdcp_lte_info;
92 /*****************************************************************/
93 /* UDP framing format */
94 /* ----------------------- */
95 /* Several people have asked about dissecting PDCP by framing */
96 /* PDUs over IP. A suggested format over UDP has been defined */
97 /* and implemented by this dissector, using the definitions */
98 /* below. A link to an example program showing you how to encode */
99 /* these headers and send LTE PDCP PDUs on a UDP socket is */
100 /* provided at http://wiki.wireshark.org/PDCP-LTE */
101 /* */
102 /* A heuristic dissecter (enabled by a preference) will */
103 /* recognise a signature at the beginning of these frames. */
104 /* Until someone is using this format, suggestions for changes */
105 /* are welcome. */
106 /*****************************************************************/
109 /* Signature. Rather than try to define a port for this, or make the
110 port number a preference, frames will start with this string (with no
111 terminating NULL */
112 #define PDCP_LTE_START_STRING "pdcp-lte"
114 /* Fixed fields. This is followed by the following 3 mandatory fields:
115 - no_header_pdu (1 byte)
116 - plane (1 byte)
117 - rohc_compression ( byte)
118 (where the allowed values are defined above) */
120 /* Conditional field. This field is mandatory in case of User Plane PDCP PDU.
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 PDCP_LTE_SEQNUM_LENGTH_TAG 0x02
125 /* 1 byte */
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 PDCP_LTE_DIRECTION_TAG 0x03
134 /* 1 byte */
136 #define PDCP_LTE_LOG_CHAN_TYPE_TAG 0x04
137 /* 1 byte */
139 #define PDCP_LTE_BCCH_TRANSPORT_TYPE_TAG 0x05
140 /* 1 byte */
142 #define PDCP_LTE_ROHC_IP_VERSION_TAG 0x06
143 /* 2 bytes, network order */
145 #define PDCP_LTE_ROHC_CID_INC_INFO_TAG 0x07
146 /* 1 byte */
148 #define PDCP_LTE_ROHC_LARGE_CID_PRES_TAG 0x08
149 /* 1 byte */
151 #define PDCP_LTE_ROHC_MODE_TAG 0x09
152 /* 1 byte */
154 #define PDCP_LTE_ROHC_RND_TAG 0x0A
155 /* 1 byte */
157 #define PDCP_LTE_ROHC_UDP_CHECKSUM_PRES_TAG 0x0B
158 /* 1 byte */
160 #define PDCP_LTE_ROHC_PROFILE_TAG 0x0C
161 /* 2 bytes, network order */
163 #define PDCP_LTE_CHANNEL_ID_TAG 0x0D
164 /* 2 bytes, network order */
166 #define PDCP_LTE_UEID_TAG 0x0E
167 /* 2 bytes, network order */
169 /* PDCP PDU. Following this tag comes the actual PDCP PDU (there is no length, the PDU
170 continues until the end of the frame) */
171 #define PDCP_LTE_PAYLOAD_TAG 0x01
175 /* Function to configure ciphering & integrity algorithms */
176 void set_pdcp_lte_security_algorithms(guint16 ueid, pdcp_security_info_t *security_info);