xref: /openbsd/usr.sbin/tcpdump/gtp.h (revision 1568fe7e)
1 /*	$OpenBSD: gtp.h,v 1.1 2009/11/04 09:43:11 jsing Exp $ */
2 /*
3  * Copyright (c) 2009 Joel Sing <jsing@openbsd.org>
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 #ifndef __GTP_H_DEFINED
19 #define __GTP_H_DEFINED
20 
21 #define GTP_VERSION_0			0
22 #define GTP_VERSION_1			1
23 #define GTP_VERSION_2			2
24 
25 #define GTP_VERSION_MASK		0x07 << 5
26 #define GTP_VERSION_SHIFT		5
27 
28 #define GTP_V0_PROTO			0
29 #define GTP_V0_PRIME_PROTO		1
30 #define GTP_V1_CTRL_PROTO		2
31 #define GTP_V1_USER_PROTO		3
32 #define GTP_V1_PRIME_PROTO		4
33 
34 #define GTPV0_PORT			3386
35 
36 #define GTPV1_C_PORT			2123
37 #define GTPV1_U_PORT			2152
38 #define GTPV1_PRIME_PORT		3386
39 
40 #define GTPV0_HDR_PROTO_TYPE		1 << 4
41 #define GTPV0_HDR_SNN			1 << 0
42 
43 #define GTPV0_IE_TYPE_MASK		1 << 7
44 #define GTPV0_IE_VALUE_MASK		~GTPV1_IE_TYPE_MASK
45 
46 /*
47  * GTPv0 Message Types.
48  */
49 #define GTPV0_ECHO_REQUEST			1
50 #define GTPV0_ECHO_RESPONSE			2
51 #define GTPV0_VERSION_NOT_SUPPORTED		3
52 #define GTPV0_NODE_ALIVE_REQUEST		4
53 #define GTPV0_NODE_ALIVE_RESPONSE		5
54 #define GTPV0_REDIRECTION_REQUEST		6
55 #define GTPV0_REDIRECTION_RESPONSE		7
56 #define GTPV0_CREATE_PDP_CONTEXT_REQUEST	16
57 #define GTPV0_CREATE_PDP_CONTEXT_RESPONSE	17
58 #define GTPV0_UPDATE_PDP_CONTEXT_REQUEST	18
59 #define GTPV0_UPDATE_PDP_CONTEXT_RESPONSE	19
60 #define GTPV0_DELETE_PDP_CONTEXT_REQUEST	20
61 #define GTPV0_DELETE_PDP_CONTEXT_RESPONSE	21
62 #define GTPV0_CREATE_AA_PDP_CONTEXT_REQUEST	22
63 #define GTPV0_CREATE_AA_PDP_CONTEXT_RESPONSE	23
64 #define GTPV0_DELETE_AA_PDP_CONTEXT_REQUEST	24
65 #define GTPV0_DELETE_AA_PDP_CONTEXT_RESPONSE	25
66 #define GTPV0_ERROR_INDICATION			26
67 #define GTPV0_PDU_NOTIFICATION_REQUEST		27
68 #define GTPV0_PDU_NOTIFICATION_RESPONSE		28
69 #define GTPV0_PDU_NOTIFICATION_REJECT_REQUEST	29
70 #define GTPV0_PDU_NOTIFICATION_REJECT_RESPONSE	30
71 #define GTPV0_SEND_ROUTEING_INFO_REQUEST	32
72 #define GTPV0_SEND_ROUTEING_INFO_RESPONSE	33
73 #define GTPV0_FAILURE_REPORT_REQUEST		34
74 #define GTPV0_FAILURE_REPORT_RESPONSE		35
75 #define GTPV0_MS_GPRS_PRESENT_REQUEST		36
76 #define GTPV0_MS_GPRS_PRESENT_RESPONSE		37
77 #define GTPV0_IDENTIFICATION_REQUEST		48
78 #define GTPV0_IDENTIFICATION_RESPONSE		49
79 #define GTPV0_SGSN_CONTEXT_REQUEST		50
80 #define GTPV0_SGSN_CONTEXT_RESPONSE		51
81 #define GTPV0_SGSN_CONTEXT_ACKNOWLEDGE		52
82 #define GTPV0_DATA_RECORD_TRANSFER_REQUEST	240
83 #define GTPV0_DATA_RECORD_TRANSFER_RESPONSE	241
84 #define GTPV0_T_PDU				255
85 
86 /*
87  * GTPv0 Information Elements.
88  */
89 #define GTPV0_TV_CAUSE				1
90 #define   GTPV0_TV_CAUSE_LENGTH			2
91 #define GTPV0_TV_IMSI				2
92 #define   GTPV0_TV_IMSI_LENGTH			9
93 #define GTPV0_TV_RAI				3
94 #define   GTPV0_TV_RAI_LENGTH			7
95 #define GTPV0_TV_TLLI				4
96 #define   GTPV0_TV_TLLI_LENGTH			5
97 #define GTPV0_TV_PTMSI				5
98 #define   GTPV0_TV_PTMSI_LENGTH			5
99 #define GTPV0_TV_QOS				6
100 #define   GTPV0_TV_QOS_LENGTH			4
101 #define GTPV0_TV_REORDER			8
102 #define   GTPV0_TV_REORDER_LENGTH		2
103 #define GTPV0_TV_AUTH_TRIPLET			9
104 #define   GTPV0_TV_AUTH_TRIPLET_LENGTH		29
105 #define GTPV0_TV_MAP_CAUSE			11
106 #define   GTPV0_TV_MAP_CAUSE_LENGTH		2
107 #define GTPV0_TV_PTMSI_SIGNATURE		12
108 #define   GTPV0_TV_PTMSI_SIGNATURE_LENGTH	4
109 #define GTPV0_TV_MS_VALIDATED			13
110 #define   GTPV0_TV_MS_VALIDATED_LENGTH		2
111 #define GTPV0_TV_RECOVERY			14
112 #define   GTPV0_TV_RECOVERY_LENGTH		2
113 #define GTPV0_TV_SELECTION_MODE			15
114 #define   GTPV0_TV_SELECTION_MODE_LENGTH	2
115 #define GTPV0_TV_FLOW_LABEL_DATA_I		16
116 #define   GTPV0_TV_FLOW_LABEL_DATA_I_LENGTH	3
117 #define GTPV0_TV_FLOW_LABEL_SIGNALLING		17
118 #define   GTPV0_TV_FLOW_LABEL_SIGNALLING_LENGTH	3
119 #define GTPV0_TV_FLOW_LABEL_DATA_II		18
120 #define   GTPV0_TV_FLOW_LABEL_DATA_II_LENGTH	4
121 #define GTPV0_TV_PACKET_XFER_CMD		126
122 #define   GTPV0_TV_PACKET_XFER_CMD_LENGTH	2
123 #define GTPV0_TV_CHARGING_ID			127
124 #define   GTPV0_TV_CHARGING_ID_LENGTH		5
125 
126 #define GTPV0_TLV_END_USER_ADDRESS		128
127 #define GTPV0_TLV_MM_CONTEXT			129
128 #define GTPV0_TLV_PDP_CONTEXT			130
129 #define GTPV0_TLV_ACCESS_POINT_NAME		131
130 #define GTPV0_TLV_PROTOCOL_CONFIG_OPTIONS	132
131 #define GTPV0_TLV_GSN_ADDRESS			133
132 #define GTPV0_TLV_MS_ISDN			134
133 #define GTPV0_TLV_RELEASED_PACKETS		249
134 #define GTPV0_TLV_CANCELLED_PACKETS		250
135 #define GTPV0_TLV_CHARGING_GATEWAY_ADDRESS	251
136 #define GTPV0_TLV_DATA_RECORD_PACKET		252
137 #define GTPV0_TLV_REQUESTS_RESPONDED		253
138 #define GTPV0_TLV_RECOMMENDED_NODE		254
139 #define GTPV0_TLV_PRIVATE_EXTENSION		255
140 
141 /*
142  * GTP Version 1.
143  */
144 
145 #define GTPV1_HDR_PROTO_TYPE		1 << 4
146 #define GTPV1_HDR_RSVD			1 << 3
147 #define GTPV1_HDR_EH_FLAG		1 << 2
148 #define GTPV1_HDR_SN_FLAG		1 << 1
149 #define GTPV1_HDR_NPDU_FLAG		1 << 0
150 
151 /*
152  * GTPv1 Extended Headers.
153  */
154 #define GTPV1_HDR_EXT			(GTPV1_HDR_EH_FLAG | \
155 					 GTPV1_HDR_SN_FLAG | \
156 					 GTPV1_HDR_NPDU_FLAG)
157 
158 #define GTPV1_EH_NONE			0x00
159 #define GTPV1_EH_MBMS_SUPPORT		0x01
160 #define GTPV1_EH_MSI_CHANGE_RPT		0x02
161 #define GTPV1_EH_PDCP_PDU_NO		0xc0
162 #define GTPV1_EH_SUSPEND_REQUEST	0xc1
163 #define GTPV1_EH_SUSPEND_RESPONSE	0xc2
164 
165 #define GTPV1_IE_TYPE_MASK		1 << 7
166 #define GTPV1_IE_VALUE_MASK		~GTPV1_IE_TYPE_MASK
167 
168 #define GTPV1_CAUSE_VALUE_MASK		3 << 6
169 #define GTPV1_CAUSE_REQUEST		0x00
170 #define GTPV1_CAUSE_ACCEPTANCE		0x80
171 #define GTPV1_CAUSE_REJECTION		0xc0
172 
173 /*
174  * GTPv1 Message Types.
175  */
176 #define GTPV1_ECHO_REQUEST			1
177 #define GTPV1_ECHO_RESPONSE			2
178 #define GTPV1_VERSION_NOT_SUPPORTED		3
179 #define GTPV1_NODE_ALIVE_REQUEST		4
180 #define GTPV1_NODE_ALIVE_RESPONSE		5
181 #define GTPV1_REDIRECTION_REQUEST		6
182 #define GTPV1_REDIRECTION_RESPONSE		7
183 #define GTPV1_CREATE_PDP_REQUEST		16
184 #define GTPV1_CREATE_PDP_RESPONSE		17
185 #define GTPV1_UPDATE_PDP_REQUEST		18
186 #define GTPV1_UPDATE_PDP_RESPONSE		19
187 #define GTPV1_DELETE_PDP_REQUEST		20
188 #define GTPV1_DELETE_PDP_RESPONSE		21
189 #define GTPV1_INIT_PDP_ACTIVATE_REQUEST		22
190 #define GTPV1_INIT_PDP_ACTIVATE_RESPONSE	23
191 #define GTPV1_ERROR_INDICATION			26
192 #define GTPV1_PDU_NOTIFICATION_REQUEST		27
193 #define GTPV1_PDU_NOTIFICATION_RESPONSE		28
194 #define GTPV1_PDU_NOTIFICATION_REJECT_REQUEST	29
195 #define GTPV1_PDU_NOTIFICATION_REJECT_RESPONSE	30
196 #define GTPV1_SUPPORT_EXT_HEADER_NOTIFICATION	31
197 #define GTPV1_SEND_ROUTEING_INFO_REQUEST	32
198 #define GTPV1_SEND_ROUTEING_INFO_RESPONSE	33
199 #define GTPV1_FAILURE_REPORT_REQUEST		34
200 #define GTPV1_FAILURE_REPORT_RESPONSE		35
201 #define GTPV1_NOTE_MS_GPRS_PRESENT_REQUEST	36
202 #define GTPV1_NOTE_MS_GPRS_PRESENT_RESPONSE	37
203 #define GTPV1_IDENTIFICATION_REQUEST		48
204 #define GTPV1_IDENTIFICATION_RESPONSE		49
205 #define GTPV1_SGSN_CONTEXT_REQUEST		50
206 #define GTPV1_SGSN_CONTEXT_RESPONSE		51
207 #define GTPV1_SGSN_CONTEXT_ACKNOWLEDGE		52
208 #define GTPV1_FORWARD_RELOCATION_REQUEST	53
209 #define GTPV1_FORWARD_RELOCATION_RESPONSE	54
210 #define GTPV1_FORWARD_RELOCATION_COMPLETE	55
211 #define GTPV1_RELOCATION_CANCEL_REQUEST		56
212 #define GTPV1_RELOCATION_CANCEL_RESPONSE	57
213 #define GTPV1_FORWARD_SRNS_CONTEXT		58
214 #define GTPV1_FORWARD_RELOCATION_COMPLETE_ACK	59
215 #define GTPV1_FORWARD_SRNS_CONTEXT_ACK		60
216 #define GTPV1_RAN_INFORMATION_RELAY		70
217 #define GTPV1_MBMS_NOTIFICATION_REQUEST		96
218 #define GTPV1_MBMS_NOTIFICATION_RESPONSE	97
219 #define GTPV1_MBMS_NOTIFICATION_REJECT_REQUEST	98
220 #define GTPV1_MBMS_NOTIFICATION_REJECT_RESPONSE	99
221 #define GTPV1_CREATE_MBMS_CONTEXT_REQUEST	100
222 #define GTPV1_CREATE_MBMS_CONTEXT_RESPONSE	101
223 #define GTPV1_UPDATE_MBMS_CONTEXT_REQUEST	102
224 #define GTPV1_UPDATE_MBMS_CONTEXT_RESPONSE	103
225 #define GTPV1_DELETE_MBMS_CONTEXT_REQUEST	104
226 #define GTPV1_DELETE_MBMS_CONTEXT_RESPONSE	105
227 #define GTPV1_MBMS_REGISTRATION_REQUEST		112
228 #define GTPV1_MBMS_REGISTRATION_RESPONSE	113
229 #define GTPV1_MBMS_DEREGISTRATION_REQUEST	114
230 #define GTPV1_MBMS_DEREGISTRATION_RESPONSE	115
231 #define GTPV1_MBMS_SESSION_START_REQUEST	116
232 #define GTPV1_MBMS_SESSION_START_RESPONSE	117
233 #define GTPV1_MBMS_SESSION_STOP_REQUEST		118
234 #define GTPV1_MBMS_SESSION_STOP_RESPONSE	119
235 #define GTPV1_MBMS_SESSION_UPDATE_REQUEST	120
236 #define GTPV1_MBMS_SESSION_UPDATE_RESPONSE	121
237 #define GTPV1_MS_INFO_CHANGE_REQUEST		128
238 #define GTPV1_MS_INFO_CHANGE_RESPONSE		129
239 #define GTPV1_DATA_RECORD_XFER_REQUEST		240
240 #define GTPV1_DATA_RECORD_XFER_RESPONSE		241
241 #define GTPV1_G_PDU				255
242 
243 /*
244  * GTPv1 Information Elements.
245  */
246 #define GTPV1_TV_CAUSE				1
247 #define   GTPV1_TV_CAUSE_LENGTH			2
248 #define GTPV1_TV_IMSI				2
249 #define   GTPV1_TV_IMSI_LENGTH			9
250 #define GTPV1_TV_RAI				3
251 #define   GTPV1_TV_RAI_LENGTH			7
252 #define GTPV1_TV_TLLI				4
253 #define   GTPV1_TV_TLLI_LENGTH			5
254 #define GTPV1_TV_PTMSI				5
255 #define   GTPV1_TV_PTMSI_LENGTH			6
256 #define GTPV1_TV_REORDER			8
257 #define   GTPV1_TV_REORDER_LENGTH		2
258 #define GTPV1_TV_AUTH				9
259 #define   GTPV1_TV_AUTH_LENGTH			29
260 #define GTPV1_TV_MAP_CAUSE			11
261 #define   GTPV1_TV_MAP_CAUSE_LENGTH		2
262 #define GTPV1_TV_PTMSI_SIGNATURE		12
263 #define   GTPV1_TV_PTMSI_SIGNATURE_LENGTH	4
264 #define GTPV1_TV_MS_VALIDATED			13
265 #define   GTPV1_TV_MS_VALIDATED_LENGTH		2
266 #define GTPV1_TV_RECOVERY			14
267 #define   GTPV1_TV_RECOVERY_LENGTH		2
268 #define GTPV1_TV_SELECTION_MODE			15
269 #define   GTPV1_TV_SELECTION_MODE_LENGTH	2
270 #define GTPV1_TV_TEID_DATA_I			16
271 #define   GTPV1_TV_TEID_DATA_I_LENGTH		5
272 #define GTPV1_TV_TEID_CTRL			17
273 #define   GTPV1_TV_TEID_CTRL_LENGTH		5
274 #define GTPV1_TV_TEID_DATA_II			18
275 #define   GTPV1_TV_TEID_DATA_II_LENGTH		6
276 #define GTPV1_TV_TEARDOWN			19
277 #define   GTPV1_TV_TEARDOWN_LENGTH		2
278 #define GTPV1_TV_NSAPI				20
279 #define   GTPV1_TV_NSAPI_LENGTH			2
280 #define GTPV1_TV_RANAP				21
281 #define   GTPV1_TV_RANAP_LENGTH			2
282 #define GTPV1_TV_RAB_CONTEXT			22
283 #define   GTPV1_TV_RAB_CONTEXT_LENGTH		10
284 #define GTPV1_TV_RADIO_PRIORITY_SMS		23
285 #define   GTPV1_TV_RADIO_PRI_SMS_LENGTH		2
286 #define GTPV1_TV_RADIO_PRIORITY			24
287 #define   GTPV1_TV_RADIO_PRI_LENGTH		2
288 #define GTPV1_TV_PACKET_FLOW_ID			25
289 #define   GTPV1_TV_PACKET_FLOW_ID_LENGTH	3
290 #define GTPV1_TV_CHARGING			26
291 #define   GTPV1_TV_CHARGING_LENGTH		3
292 #define GTPV1_TV_TRACE_REFERENCE		27
293 #define   GTPV1_TV_TRACE_REFERENCE_LENGTH	3
294 #define GTPV1_TV_TRACE_TYPE			28
295 #define   GTPV1_TV_TRACE_TYPE_LENGTH		3
296 #define GTPV1_TV_MSNRR				29
297 #define   GTPV1_TV_MSNRR_LENGTH			2
298 #define GTPV1_TV_PACKET_XFER_CMD		126
299 #define   GTPV1_TV_PACKET_XFER_CMD_LENGTH	2
300 #define GTPV1_TV_CHARGING_ID			127
301 #define   GTPV1_TV_CHARGING_ID_LENGTH		5
302 
303 #define GTPV1_TLV_END_USER_ADDRESS		128
304 #define GTPV1_TLV_MM_CONTEXT			129
305 #define GTPV1_TLV_PDP_CONTEXT			130
306 #define GTPV1_TLV_ACCESS_POINT_NAME		131
307 #define GTPV1_TLV_PROTOCOL_CONFIG_OPTIONS	132
308 #define GTPV1_TLV_GSN_ADDRESS			133
309 #define GTPV1_TLV_MSISDN			134
310 #define GTPV1_TLV_QOS_PROFILE			135
311 #define GTPV1_TLV_AUTHENTICATION		136
312 #define GTPV1_TLV_TRAFFIC_FLOW			137
313 #define GTPV1_TLV_TARGET_IDENTIFICATION		138
314 #define GTPV1_TLV_UTRAN_CONTAINER		139
315 #define GTPV1_TLV_RAB_SETUP_INFORMATION		140
316 #define GTPV1_TLV_EXT_HEADER_TYPE_LIST		141
317 #define GTPV1_TLV_TRIGGER_ID			142
318 #define GTPV1_TLV_OMC_IDENTITY			143
319 #define GTPV1_TLV_RAN_CONTAINER			144
320 #define GTPV1_TLV_PDP_CONTEXT_PRIORITIZATION	145
321 #define GTPV1_TLV_ADDITIONAL_RAB_SETUP_INFO	146
322 #define GTPV1_TLV_SGSN_NUMBER			147
323 #define GTPV1_TLV_COMMON_FLAGS			148
324 #define GTPV1_TLV_APN_RESTRICTION		149
325 #define GTPV1_TLV_RADIO_PRIORITY_LCS		150
326 #define GTPV1_TLV_RAT_TYPE			151
327 #define GTPV1_TLV_USER_LOCATION_INFO		152
328 #define GTPV1_TLV_MS_TIME_ZONE			153
329 #define GTPV1_TLV_IMEI_SV			154
330 #define GTPV1_TLV_CAMEL_CHARGING_CONTAINER	155
331 #define GTPV1_TLV_MBMS_UE_CONTEXT		156
332 #define GTPV1_TLV_TMGI				157
333 #define GTPV1_TLV_RIM_ROUTING_ADDRESS		158
334 #define GTPV1_TLV_MBMS_PROTOCOL_CONFIG_OPTIONS	159
335 #define GTPV1_TLV_MBMS_SERVICE_AREA		160
336 #define GTPV1_TLV_SOURCE_RNC_PDCP_CONTEXT_INFO	161
337 #define GTPV1_TLV_ADDITIONAL_TRACE_INFO		162
338 #define GTPV1_TLV_HOP_COUNTER			163
339 #define GTPV1_TLV_SELECTED_PLMN_ID		164
340 #define GTPV1_TLV_MBMS_SESSION_IDENTIFIER	165
341 #define GTPV1_TLV_MBMS_2G_3G_INDICATOR		166
342 #define GTPV1_TLV_ENHANCED_NSAPI		167
343 #define GTPV1_TLV_MBMS_SESSION_DURATION		168
344 #define GTPV1_TLV_ADDITIONAL_MBMS_TRACE_INFO	169
345 #define GTPV1_TLV_MBMS_SESSION_REPITITION_NO	170
346 #define GTPV1_TLV_MBMS_TIME_TO_DATA_TRANSFER	171
347 #define GTPV1_TLV_PS_HANDOVER_REQUEST_CONTEXT	172
348 #define GTPV1_TLV_BSS_CONTAINER			173
349 #define GTPV1_TLV_CELL_IDENTIFICATION		174
350 #define GTPV1_TLV_PDU_NUMBERS			175
351 #define GTPV1_TLV_BSSGP_CAUSE			176
352 #define GTPV1_TLV_REQUIRED_MBMS_BEARER_CAP	177
353 #define GTPV1_TLV_RIM_ROUTING_ADDRESS_DISC	178
354 #define GTPV1_TLV_LIST_OF_SETUP_PFCS		179
355 #define GTPV1_TLV_PS_HANDOVER_XID_PARAMETERS	180
356 #define GTPV1_TLV_MS_INFO_CHANGE_REPORTING	181
357 #define GTPV1_TLV_DIRECT_TUNNEL_FLAGS		182
358 #define GTPV1_TLV_CORRELATION_ID		183
359 #define GTPV1_TLV_BEARER_CONTROL_MODE		184
360 #define GTPV1_TLV_MBMS_FLOW_IDENTIFIER		185
361 
362 #define GTPV1_TLV_RELEASED_PACKETS		249
363 #define GTPV1_TLV_CANCELLED_PACKETS		250
364 #define GTPV1_TLV_CHARGING_GATEWAY_ADDRESS	251
365 #define GTPV1_TLV_DATA_RECORD_PACKET		252
366 #define GTPV1_TLV_REQUESTS_RESPONDED		253
367 #define GTPV1_TLV_ADDRESS_OF_RECOMMENDED_NODE	254
368 
369 #define GTPV1_TLV_PRIVATE_EXTENSION		255
370 
371 struct gtp_v0_hdr {
372 	u_int8_t flags;
373 	u_int8_t msgtype;
374 	u_int16_t length;
375 	u_int16_t seqno;
376 	u_int16_t flow;
377 	u_int8_t npduno;
378 	u_int8_t spare1;
379 	u_int8_t spare2;
380 	u_int8_t spare3;
381 	u_int64_t tid;
382 } __packed;
383 
384 struct gtp_v0_prime_hdr {
385 	u_int8_t flags;
386 	u_int8_t msgtype;
387 	u_int16_t length;
388 	u_int16_t seqno;
389 } __packed;
390 
391 struct gtp_v1_hdr {
392 	u_int8_t flags;
393 	u_int8_t msgtype;
394 	u_int16_t length;
395 	u_int32_t teid;
396 } __packed;
397 
398 struct gtp_v1_hdr_ext {
399 	struct gtp_v1_hdr gh;
400 	u_int16_t seqno;
401 	u_int8_t npduno;
402 	u_int8_t nexthdr;
403 } __packed;
404 
405 struct gtp_v1_prime_hdr {
406 	u_int8_t flags;
407 	u_int8_t msgtype;
408 	u_int16_t length;
409 	u_int16_t seqno;
410 } __packed;
411 
412 static struct tok gtp_type[] = {
413         { 0,    "GTPv0" },
414         { 1,    "GTPv0'" },
415         { 2,    "GTPv1-C" },
416         { 3,    "GTPv1-U" },
417         { 4,    "GTPv1'" }
418 };
419 
420 static const char *gtp_rat_type[] = {
421         NULL, "UTRAN", "GERAN", "WLAN", "GAN", "HSPA Evolution"
422 };
423 
424 static const char *gtp_packet_xfer_cmd[] = {
425 	NULL, "Send Data Record", "Send Duplicated Record",
426 	"Cancel Data Record", "Release Data Record"
427 };
428 
429 static const char *mbms_2g3g_indicator[] = {
430 	"2G Only", "3G Only", "2G and 3G"
431 };
432 
433 static const char *ms_info_change_rpt[] = {
434 	"Stop Reporting", "Start Reporting CGI/SAI", "Start Reporting RAI"
435 };
436 
437 #endif
438