PageRenderTime 61ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 3ms

/epan/dissectors/packet-gtp.c

https://github.com/labx-technologies-llc/wireshark
C | 9445 lines | 7201 code | 1112 blank | 1132 comment | 318 complexity | f1cd73c8f2c7cc48f57bd0e3f69b39be MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  1. /* packet-gtp.c
  2. *
  3. * $Id$
  4. *
  5. * Routines for GTP dissection
  6. * Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
  7. * Nicolas Balkota <balkota@mac.com>
  8. *
  9. * Updates and corrections:
  10. * Copyright 2006 - 2009, Anders Broman <anders.broman@ericsson.com>
  11. *
  12. * Added Bearer control mode dissection:
  13. * Copyright 2011, Grzegorz Szczytowski <grzegorz.szczytowski@gmail.com>
  14. *
  15. * Updates and corrections:
  16. * Copyright 2011-2013, Anders Broman <anders.broman@ericsson.com>
  17. *
  18. * PDCP PDU number extension header support added by Martin Isaksson <martin.isaksson@ericsson.com>
  19. *
  20. * Control Plane Request-Response tracking code Largely based on similar routines in
  21. * packet-ldap.c by Ronnie Sahlberg
  22. * Added by Kari Tiirikainen <kari.tiirikainen@nsn.com>
  23. *
  24. * Wireshark - Network traffic analyzer
  25. * By Gerald Combs <gerald@wireshark.org>
  26. * Copyright 1998 Gerald Combs
  27. *
  28. * This program is free software; you can redistribute it and/or
  29. * modify it under the terms of the GNU General Public License
  30. * as published by the Free Software Foundation; either version 2
  31. * of the License, or (at your option) any later version.
  32. *
  33. * This program is distributed in the hope that it will be useful,
  34. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  35. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  36. * GNU General Public License for more details.
  37. *
  38. * You should have received a copy of the GNU General Public License
  39. * along with this program; if not, write to the Free Software
  40. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  41. *
  42. * GTP v0: 3GPP TS 09.60
  43. *
  44. * http://www.3gpp.org/ftp/Specs/html-info/0960.htm
  45. *
  46. * GTP v1: 3GPP TS 29.060
  47. *
  48. * http://www.3gpp.org/ftp/Specs/html-info/29060.htm
  49. *
  50. * GTP': 3GPP TS 32.295
  51. *
  52. * http://www.3gpp.org/ftp/Specs/html-info/32295.htm
  53. */
  54. #include "config.h"
  55. #include <epan/conversation.h>
  56. #include <epan/packet.h>
  57. #include <epan/prefs.h>
  58. #include <epan/expert.h>
  59. #include <epan/sminmpec.h>
  60. #include <epan/asn1.h>
  61. #include <epan/tap.h>
  62. #include "packet-ppp.h"
  63. #include "packet-radius.h"
  64. #include "packet-bssap.h"
  65. #include "packet-gsm_a_common.h"
  66. #include "packet-gsm_map.h"
  67. #include "packet-gprscdr.h"
  68. #include "packet-per.h"
  69. #include "packet-ranap.h"
  70. #include "packet-bssgp.h"
  71. #include "packet-e212.h"
  72. #include "packet-gtp.h"
  73. static dissector_table_t ppp_subdissector_table;
  74. static dissector_table_t gtp_priv_ext_dissector_table;
  75. static dissector_table_t gtp_cdr_fmt_dissector_table;
  76. #define GTPv0_PORT 3386
  77. #define GTPv1C_PORT 2123 /* 3G Control PDU */
  78. #define GTPv1U_PORT 2152 /* 3G T-PDU */
  79. #define GTPv0_HDR_LENGTH 20
  80. #define GTPv1_HDR_LENGTH 12
  81. #define GTP_PRIME_HDR_LENGTH 6
  82. /* to check compliance with ETSI */
  83. #define GTP_MANDATORY 1
  84. #define GTP_OPTIONAL 2
  85. #define GTP_CONDITIONAL 4
  86. #define GTP_TPDU_AS_NONE -1
  87. #define GTP_TPDU_AS_TPDU 0
  88. #define GTP_TPDU_AS_SYNC 2
  89. static gboolean g_gtp_over_tcp = TRUE;
  90. static guint g_gtpv0_port = GTPv0_PORT;
  91. static guint g_gtpv1c_port = GTPv1C_PORT;
  92. static guint g_gtpv1u_port = GTPv1U_PORT;
  93. void proto_reg_handoff_gtp(void);
  94. static int proto_gtp = -1;
  95. /*KTi*/
  96. static int hf_gtp_ie_id = -1;
  97. static int hf_gtp_response_in = -1;
  98. static int hf_gtp_response_to = -1;
  99. static int hf_gtp_time = -1;
  100. static int hf_gtp_apn = -1;
  101. static int hf_gtp_cause = -1;
  102. static int hf_gtp_chrg_char = -1;
  103. static int hf_gtp_chrg_char_s = -1;
  104. static int hf_gtp_chrg_char_n = -1;
  105. static int hf_gtp_chrg_char_p = -1;
  106. static int hf_gtp_chrg_char_f = -1;
  107. static int hf_gtp_chrg_char_h = -1;
  108. static int hf_gtp_chrg_char_r = -1;
  109. static int hf_gtp_chrg_id = -1;
  110. static int hf_gtp_chrg_ipv4 = -1;
  111. static int hf_gtp_chrg_ipv6 = -1;
  112. static int hf_gtp_ext_flow_label = -1;
  113. static int hf_gtp_ext_id = -1;
  114. static int hf_gtp_ext_val = -1;
  115. static int hf_gtp_ext_hdr = -1;
  116. static int hf_gtp_ext_hdr_next = -1;
  117. static int hf_gtp_ext_hdr_length = -1;
  118. static int hf_gtp_ext_hdr_pdcpsn = -1;
  119. static int hf_gtp_ext_hdr_udp_port = -1;
  120. static int hf_gtp_flags = -1;
  121. static int hf_gtp_flags_ver = -1;
  122. static int hf_gtp_prime_flags_ver = -1;
  123. static int hf_gtp_flags_pt = -1;
  124. static int hf_gtp_flags_spare1 = -1;
  125. static int hf_gtp_flags_hdr_length = -1;
  126. static int hf_gtp_flags_snn = -1;
  127. static int hf_gtp_flags_spare2 = -1;
  128. static int hf_gtp_flags_e = -1;
  129. static int hf_gtp_flags_s = -1;
  130. static int hf_gtp_flags_pn = -1;
  131. static int hf_gtp_flow_ii = -1;
  132. static int hf_gtp_flow_label = -1;
  133. static int hf_gtp_flow_sig = -1;
  134. static int hf_gtp_gsn_addr_len = -1;
  135. static int hf_gtp_gsn_addr_type = -1;
  136. static int hf_gtp_gsn_ipv4 = -1;
  137. static int hf_gtp_gsn_ipv6 = -1;
  138. static int hf_gtp_imsi = -1;
  139. static int hf_gtp_length = -1;
  140. static int hf_gtp_map_cause = -1;
  141. static int hf_gtp_message_type = -1;
  142. static int hf_gtp_ms_reason = -1;
  143. static int hf_gtp_ms_valid = -1;
  144. static int hf_gtp_npdu_number = -1;
  145. static int hf_gtp_node_ipv4 = -1;
  146. static int hf_gtp_node_ipv6 = -1;
  147. static int hf_gtp_nsapi = -1;
  148. static int hf_gtp_ptmsi = -1;
  149. static int hf_gtp_ptmsi_sig = -1;
  150. static int hf_gtp_qos_version = -1;
  151. static int hf_gtp_qos_spare1 = -1;
  152. static int hf_gtp_qos_delay = -1;
  153. static int hf_gtp_qos_mean = -1;
  154. static int hf_gtp_qos_peak = -1;
  155. static int hf_gtp_qos_spare2 = -1;
  156. static int hf_gtp_qos_precedence = -1;
  157. static int hf_gtp_qos_spare3 = -1;
  158. static int hf_gtp_qos_reliability = -1;
  159. static int hf_gtp_qos_al_ret_priority = -1;
  160. static int hf_gtp_qos_traf_class = -1;
  161. static int hf_gtp_qos_del_order = -1;
  162. static int hf_gtp_qos_del_err_sdu = -1;
  163. static int hf_gtp_qos_max_sdu_size = -1;
  164. static int hf_gtp_qos_max_ul = -1;
  165. static int hf_gtp_qos_max_dl = -1;
  166. static int hf_gtp_qos_res_ber = -1;
  167. static int hf_gtp_qos_sdu_err_ratio = -1;
  168. static int hf_gtp_qos_trans_delay = -1;
  169. static int hf_gtp_qos_traf_handl_prio = -1;
  170. static int hf_gtp_qos_guar_ul = -1;
  171. static int hf_gtp_qos_guar_dl = -1;
  172. static int hf_gtp_qos_src_stat_desc = -1;
  173. static int hf_gtp_qos_sig_ind = -1;
  174. static int hf_gtp_qos_arp_pvi = -1;
  175. static int hf_gtp_qos_arp_pl = -1;
  176. static int hf_gtp_qos_arp_pci = -1;
  177. static int hf_gtp_qos_qci = -1;
  178. static int hf_gtp_qos_ul_mbr = -1;
  179. static int hf_gtp_qos_dl_mbr = -1;
  180. static int hf_gtp_qos_ul_gbr = -1;
  181. static int hf_gtp_qos_dl_gbr = -1;
  182. static int hf_gtp_qos_ul_apn_ambr = -1;
  183. static int hf_gtp_qos_dl_apn_ambr = -1;
  184. static int hf_gtp_pkt_flow_id = -1;
  185. static int hf_gtp_rab_gtpu_dn = -1;
  186. static int hf_gtp_rab_gtpu_up = -1;
  187. static int hf_gtp_rab_pdu_dn = -1;
  188. static int hf_gtp_rab_pdu_up = -1;
  189. static int hf_gtp_rai_rac = -1;
  190. static int hf_gtp_rai_lac = -1;
  191. static int hf_gtp_tac = -1;
  192. static int hf_gtp_eci = -1;
  193. static int hf_gtp_ranap_cause = -1;
  194. static int hf_gtp_recovery = -1;
  195. static int hf_gtp_reorder = -1;
  196. static int hf_gtp_rnc_ipv4 = -1;
  197. static int hf_gtp_rnc_ipv6 = -1;
  198. static int hf_gtp_rp = -1;
  199. static int hf_gtp_rp_nsapi = -1;
  200. static int hf_gtp_rp_sms = -1;
  201. static int hf_gtp_rp_spare = -1;
  202. static int hf_gtp_sel_mode = -1;
  203. static int hf_gtp_seq_number = -1;
  204. static int hf_gtp_sndcp_number = -1;
  205. static int hf_gtp_tear_ind = -1;
  206. static int hf_gtp_teid = -1;
  207. static int hf_gtp_teid_cp = -1;
  208. static int hf_gtp_ulink_teid_cp = -1;
  209. static int hf_gtp_teid_data = -1;
  210. static int hf_gtp_ulink_teid_data = -1;
  211. static int hf_gtp_teid_ii = -1;
  212. static int hf_gtp_tft_code = -1;
  213. static int hf_gtp_tft_spare = -1;
  214. static int hf_gtp_tft_number = -1;
  215. static int hf_gtp_tft_eval = -1;
  216. static int hf_gtp_tid = -1;
  217. static int hf_gtp_tlli = -1;
  218. static int hf_gtp_tr_comm = -1;
  219. static int hf_gtp_trace_ref = -1;
  220. static int hf_gtp_trace_type = -1;
  221. static int hf_gtp_user_addr_pdp_org = -1;
  222. static int hf_gtp_user_addr_pdp_type = -1;
  223. static int hf_gtp_user_ipv4 = -1;
  224. static int hf_gtp_user_ipv6 = -1;
  225. static int hf_gtp_security_mode = -1;
  226. static int hf_gtp_no_of_vectors = -1;
  227. static int hf_gtp_cipher_algorithm = -1;
  228. static int hf_gtp_cksn_ksi = -1;
  229. static int hf_gtp_cksn = -1;
  230. static int hf_gtp_ksi = -1;
  231. static int hf_gtp_ext_length = -1;
  232. static int hf_gtp_utran_field = -1;
  233. static int hf_gtp_ext_apn_res = -1;
  234. static int hf_gtp_ext_rat_type = -1;
  235. static int hf_gtp_ext_geo_loc_type = -1;
  236. static int hf_gtp_ext_sac = -1;
  237. static int hf_gtp_ext_imeisv = -1;
  238. static int hf_gtp_target_rnc_id = -1;
  239. static int hf_gtp_target_ext_rnc_id = -1;
  240. static int hf_gtp_bssgp_cause = -1;
  241. static int hf_gtp_bssgp_ra_discriminator = -1;
  242. static int hf_gtp_sapi = -1;
  243. static int hf_gtp_xid_par_len = -1;
  244. static int hf_gtp_earp_pvi = -1;
  245. static int hf_gtp_earp_pl = -1;
  246. static int hf_gtp_earp_pci = -1;
  247. static int hf_gtp_cdr_app = -1;
  248. static int hf_gtp_cdr_rel = -1;
  249. static int hf_gtp_cdr_ver = -1;
  250. static int hf_gtp_cmn_flg_ppc = -1;
  251. static int hf_gtp_cmn_flg_mbs_srv_type = -1;
  252. static int hf_gtp_cmn_flg_mbs_ran_pcd_rdy = -1;
  253. static int hf_gtp_cmn_flg_mbs_cnt_inf = -1;
  254. static int hf_gtp_cmn_flg_nrsn = -1;
  255. static int hf_gtp_cmn_flg_no_qos_neg = -1;
  256. static int hf_gtp_cmn_flg_upgrd_qos_sup = -1;
  257. static int hf_gtp_cmn_flg_dual_addr_bearer_flg = -1;
  258. static int hf_gtp_tmgi = -1;
  259. static int hf_gtp_mbms_ses_dur_days = -1;
  260. static int hf_gtp_mbms_ses_dur_s = -1;
  261. static int hf_gtp_no_of_mbms_sa_codes = -1;
  262. static int hf_gtp_mbms_sa_code = -1;
  263. static int hf_gtp_mbs_2g_3g_ind = -1;
  264. static int hf_gtp_time_2_dta_tr = -1;
  265. static int hf_gtp_ext_ei = -1;
  266. static int hf_gtp_ext_gcsi = -1;
  267. static int hf_gtp_ext_dti = -1;
  268. static int hf_gtp_ra_prio_lcs = -1;
  269. static int hf_gtp_bcm = -1;
  270. static int hf_gtp_fqdn = -1;
  271. static int hf_gtp_rim_routing_addr = -1;
  272. static int hf_gtp_mbms_flow_id = -1;
  273. static int hf_gtp_mbms_dist_indic = -1;
  274. static int hf_gtp_ext_apn_ambr_ul = -1;
  275. static int hf_gtp_ext_apn_ambr_dl = -1;
  276. static int hf_gtp_ext_sub_ue_ambr_ul = -1;
  277. static int hf_gtp_ext_sub_ue_ambr_dl = -1;
  278. static int hf_gtp_ext_auth_ue_ambr_ul = -1;
  279. static int hf_gtp_ext_auth_ue_ambr_dl = -1;
  280. static int hf_gtp_ext_auth_apn_ambr_ul = -1;
  281. static int hf_gtp_ext_auth_apn_ambr_dl = -1;
  282. static int hf_gtp_ext_ggsn_back_off_time_units = -1;
  283. static int hf_gtp_ext_ggsn_back_off_timer = -1;
  284. static int hf_gtp_higher_br_16mb_flg = -1;
  285. static int hf_gtp_max_mbr_apn_ambr_ul = -1;
  286. static int hf_gtp_max_mbr_apn_ambr_dl = -1;
  287. /* Initialize the subtree pointers */
  288. static gint ett_gtp = -1;
  289. static gint ett_gtp_flags = -1;
  290. static gint ett_gtp_ext = -1;
  291. static gint ett_gtp_ext_hdr = -1;
  292. static gint ett_gtp_qos = -1;
  293. static gint ett_gtp_qos_arp = -1;
  294. static gint ett_gtp_flow_ii = -1;
  295. static gint ett_gtp_rp = -1;
  296. static gint ett_gtp_pkt_flow_id = -1;
  297. static gint ett_gtp_trip = -1;
  298. static gint ett_gtp_quint = -1;
  299. static gint ett_gtp_proto = -1;
  300. static gint ett_gtp_gsn_addr = -1;
  301. static gint ett_gtp_tft = -1;
  302. static gint ett_gtp_tft_pf = -1;
  303. static gint ett_gtp_tft_flags = -1;
  304. static gint ett_gtp_rab_setup = -1;
  305. static gint ett_gtp_hdr_list = -1;
  306. static gint ett_gtp_node_addr = -1;
  307. static gint ett_gtp_rel_pack = -1;
  308. static gint ett_gtp_can_pack = -1;
  309. static gint ett_gtp_data_resp = -1;
  310. static gint ett_gtp_net_cap = -1;
  311. static gint ett_gtp_tmgi = -1;
  312. static gint ett_gtp_cdr_ver = -1;
  313. static gint ett_gtp_cdr_dr = -1;
  314. static gint ett_gtp_uli_rai = -1;
  315. static gboolean g_gtp_etsi_order = FALSE;
  316. static gint dissect_tpdu_as = -1;
  317. static const enum_val_t gtp_decode_tpdu_as[] = {
  318. {"none", "None", GTP_TPDU_AS_NONE},
  319. {"tpdu", "TPDU", GTP_TPDU_AS_TPDU},
  320. {"sync", "SYNC", GTP_TPDU_AS_SYNC},
  321. {NULL, NULL, 0}
  322. };
  323. static int gtp_tap = -1;
  324. static int gtpv1_tap = -1;
  325. /* Definition of flags masks */
  326. #define GTP_VER_MASK 0xE0
  327. static const true_false_string gtp_hdr_length_vals = {
  328. "6-Octet Header",
  329. "20-Octet Header"
  330. };
  331. static const value_string ver_types[] = {
  332. {0, "GTP release 97/98 version"},
  333. {1, "GTP release 99 version"},
  334. {2, "GTPv2-C"},
  335. {3, "None"},
  336. {4, "None"},
  337. {5, "None"},
  338. {6, "None"},
  339. {7, "None"},
  340. {0, NULL}
  341. };
  342. static const value_string pt_types[] = {
  343. {0, "GTP'"},
  344. {1, "GTP"},
  345. {0, NULL}
  346. };
  347. #define GTP_PT_MASK 0x10
  348. #define GTP_SPARE1_MASK 0x0E
  349. #define GTP_SPARE2_MASK 0x08
  350. #define GTP_E_MASK 0x04
  351. #define GTP_S_MASK 0x02
  352. #define GTP_SNN_MASK 0x01
  353. #define GTP_PN_MASK 0x01
  354. #define GTP_EXT_HDR_NO_MORE_EXT_HDRS 0x00
  355. #define GTP_EXT_HDR_MBMS_SUPPORT_IND 0x01
  356. #define GTP_EXT_HDR_MS_INFO_CHG_REP_SUPP_IND 0x02
  357. #define GTP_EXT_HDR_UDP_PORT 0x40
  358. #define GTP_EXT_HDR_PDCP_SN 0xC0
  359. #define GTP_EXT_HDR_SUSPEND_REQ 0xC1
  360. #define GTP_EXT_HDR_SUSPEND_RESP 0xC2
  361. static const value_string next_extension_header_fieldvals[] = {
  362. {GTP_EXT_HDR_NO_MORE_EXT_HDRS, "No more extension headers"},
  363. {GTP_EXT_HDR_MBMS_SUPPORT_IND, "MBMS support indication"},
  364. {GTP_EXT_HDR_MS_INFO_CHG_REP_SUPP_IND, "MS Info Change Reporting support indication"},
  365. {GTP_EXT_HDR_UDP_PORT, "UDP Port number"},
  366. {GTP_EXT_HDR_PDCP_SN, "PDCP PDU number"},
  367. {GTP_EXT_HDR_SUSPEND_REQ, "Suspend Request"},
  368. {GTP_EXT_HDR_SUSPEND_RESP, "Suspend Response"},
  369. {0, NULL}
  370. };
  371. /* Definition of 3G charging characteristics masks */
  372. #define GTP_MASK_CHRG_CHAR_S 0xF000
  373. #define GTP_MASK_CHRG_CHAR_N 0x0800
  374. #define GTP_MASK_CHRG_CHAR_P 0x0400
  375. #define GTP_MASK_CHRG_CHAR_F 0x0200
  376. #define GTP_MASK_CHRG_CHAR_H 0x0100
  377. #define GTP_MASK_CHRG_CHAR_R 0x00FF
  378. /* Traffic Flow Templates mask */
  379. #define GTPv1_TFT_CODE_MASK 0xE0
  380. #define GTPv1_TFT_SPARE_MASK 0x10
  381. #define GTPv1_TFT_NUMBER_MASK 0x0F
  382. /* Definition of GSN Address masks */
  383. #define GTP_EXT_GSN_ADDR_TYPE_MASK 0xC0
  384. #define GTP_EXT_GSN_ADDR_LEN_MASK 0x3F
  385. /* Definition of QoS masks */
  386. #define GTP_EXT_QOS_SPARE1_MASK 0xC0
  387. #define GTP_EXT_QOS_DELAY_MASK 0x38
  388. #define GTP_EXT_QOS_RELIABILITY_MASK 0x07
  389. #define GTP_EXT_QOS_PEAK_MASK 0xF0
  390. #define GTP_EXT_QOS_SPARE2_MASK 0x08
  391. #define GTP_EXT_QOS_PRECEDENCE_MASK 0x07
  392. #define GTP_EXT_QOS_SPARE3_MASK 0xE0
  393. #define GTP_EXT_QOS_MEAN_MASK 0x1F
  394. #define GTP_EXT_QOS_TRAF_CLASS_MASK 0xE0
  395. #define GTP_EXT_QOS_DEL_ORDER_MASK 0x18
  396. #define GTP_EXT_QOS_DEL_ERR_SDU_MASK 0x07
  397. #define GTP_EXT_QOS_RES_BER_MASK 0xF0
  398. #define GTP_EXT_QOS_SDU_ERR_RATIO_MASK 0x0F
  399. #define GTP_EXT_QOS_TRANS_DELAY_MASK 0xFC
  400. #define GTP_EXT_QOS_TRAF_HANDL_PRIORITY_MASK 0x03
  401. #define GTP_EXT_QOS_SRC_STAT_DESC_MASK 0x0F
  402. #define GTP_EXT_QOS_SIG_IND_MASK 0x10
  403. /* Definition of Radio Priority's masks */
  404. #define GTPv1_EXT_RP_NSAPI_MASK 0xF0
  405. #define GTPv1_EXT_RP_SPARE_MASK 0x08
  406. #define GTPv1_EXT_RP_MASK 0x07
  407. static const value_string gtp_message_type[] = {
  408. {GTP_MSG_UNKNOWN, "For future use"},
  409. {GTP_MSG_ECHO_REQ, "Echo request"},
  410. {GTP_MSG_ECHO_RESP, "Echo response"},
  411. {GTP_MSG_VER_NOT_SUPP, "Version not supported"},
  412. {GTP_MSG_NODE_ALIVE_REQ, "Node alive request"},
  413. {GTP_MSG_NODE_ALIVE_RESP, "Node alive response"},
  414. {GTP_MSG_REDIR_REQ, "Redirection request"},
  415. {GTP_MSG_REDIR_RESP, "Redirection response"},
  416. /*
  417. * 8-15 For future use. Shall not be sent. If received,
  418. * shall be treated as an Unknown message.
  419. */
  420. #if 0
  421. { 8, "Unknown message(For future use)"},
  422. { 9, "Unknown message(For future use)"},
  423. { 10, "Unknown message(For future use)"},
  424. { 11, "Unknown message(For future use)"},
  425. { 12, "Unknown message(For future use)"},
  426. { 13, "Unknown message(For future use)"},
  427. { 14, "Unknown message(For future use)"},
  428. { 15, "Unknown message(For future use)"},
  429. #endif
  430. {GTP_MSG_CREATE_PDP_REQ, "Create PDP context request"},
  431. {GTP_MSG_CREATE_PDP_RESP, "Create PDP context response"},
  432. {GTP_MSG_UPDATE_PDP_REQ, "Update PDP context request"},
  433. {GTP_MSG_UPDATE_PDP_RESP, "Update PDP context response"},
  434. {GTP_MSG_DELETE_PDP_REQ, "Delete PDP context request"},
  435. {GTP_MSG_DELETE_PDP_RESP, "Delete PDP context response"},
  436. {GTP_MSG_INIT_PDP_CONTEXT_ACT_REQ, "Initiate PDP Context Activation Request"},
  437. {GTP_MSG_INIT_PDP_CONTEXT_ACT_RESP, "Initiate PDP Context Activation Response"},
  438. /*
  439. * 24-25 For future use. Shall not be sent. If received,
  440. * shall be treated as an Unknown message.
  441. */
  442. {GTP_MSG_DELETE_AA_PDP_REQ, "Delete AA PDP Context Request"},
  443. {GTP_MSG_DELETE_AA_PDP_RESP, "Delete AA PDP Context Response"},
  444. {GTP_MSG_ERR_IND, "Error indication"},
  445. {GTP_MSG_PDU_NOTIFY_REQ, "PDU notification request"},
  446. {GTP_MSG_PDU_NOTIFY_RESP, "PDU notification response"},
  447. {GTP_MSG_PDU_NOTIFY_REJ_REQ, "PDU notification reject request"},
  448. {GTP_MSG_PDU_NOTIFY_REJ_RESP, "PDU notification reject response"},
  449. {GTP_MSG_SUPP_EXT_HDR, "Supported extension header notification"},
  450. {GTP_MSG_SEND_ROUT_INFO_REQ, "Send routing information for GPRS request"},
  451. {GTP_MSG_SEND_ROUT_INFO_RESP, "Send routing information for GPRS response"},
  452. {GTP_MSG_FAIL_REP_REQ, "Failure report request"},
  453. {GTP_MSG_FAIL_REP_RESP, "Failure report response"},
  454. {GTP_MSG_MS_PRESENT_REQ, "Note MS GPRS present request"},
  455. {GTP_MSG_MS_PRESENT_RESP, "Note MS GPRS present response"},
  456. /* 38-47 For future use. Shall not be sent. If received,
  457. * shall be treated as an Unknown message.
  458. */
  459. #if 0
  460. { 38, "Unknown message(For future use)"},
  461. { 39, "Unknown message(For future use)"},
  462. { 40, "Unknown message(For future use)"},
  463. { 41, "Unknown message(For future use)"},
  464. { 42, "Unknown message(For future use)"},
  465. { 43, "Unknown message(For future use)"},
  466. { 44, "Unknown message(For future use)"},
  467. { 45, "Unknown message(For future use)"},
  468. { 46, "Unknown message(For future use)"},
  469. { 47, "Unknown message(For future use)"},
  470. #endif
  471. {GTP_MSG_IDENT_REQ, "Identification request"},
  472. {GTP_MSG_IDENT_RESP, "Identification response"},
  473. {GTP_MSG_SGSN_CNTXT_REQ, "SGSN context request"},
  474. {GTP_MSG_SGSN_CNTXT_RESP, "SGSN context response"},
  475. {GTP_MSG_SGSN_CNTXT_ACK, "SGSN context acknowledgement"},
  476. {GTP_MSG_FORW_RELOC_REQ, "Forward relocation request"},
  477. {GTP_MSG_FORW_RELOC_RESP, "Forward relocation response"},
  478. {GTP_MSG_FORW_RELOC_COMP, "Forward relocation complete"},
  479. {GTP_MSG_RELOC_CANCEL_REQ, "Relocation cancel request"},
  480. {GTP_MSG_RELOC_CANCEL_RESP, "Relocation cancel response"},
  481. {GTP_MSG_FORW_SRNS_CNTXT, "Forward SRNS context"},
  482. {GTP_MSG_FORW_RELOC_ACK, "Forward relocation complete acknowledge"},
  483. {GTP_MSG_FORW_SRNS_CNTXT_ACK, "Forward SRNS context acknowledge"},
  484. /* 61-69 For future use. Shall not be sent. If received,
  485. * shall be treated as an Unknown message.
  486. */
  487. #if 0
  488. { 61, "Unknown message(For future use)"},
  489. { 62, "Unknown message(For future use)"},
  490. { 63, "Unknown message(For future use)"},
  491. { 64, "Unknown message(For future use)"},
  492. { 65, "Unknown message(For future use)"},
  493. { 66, "Unknown message(For future use)"},
  494. { 67, "Unknown message(For future use)"},
  495. { 68, "Unknown message(For future use)"},
  496. { 69, "Unknown message(For future use)"},
  497. #endif
  498. {GTP_MSG_RAN_INFO_RELAY, "RAN Information Relay"},
  499. /* 71-95 For future use. Shall not be sent. If received,
  500. * shall be treated as an Unknown message.
  501. */
  502. #if 0
  503. { 71, "Unknown message(For future use)"},
  504. { 72, "Unknown message(For future use)"},
  505. { 73, "Unknown message(For future use)"},
  506. { 74, "Unknown message(For future use)"},
  507. { 75, "Unknown message(For future use)"},
  508. { 76, "Unknown message(For future use)"},
  509. { 77, "Unknown message(For future use)"},
  510. { 78, "Unknown message(For future use)"},
  511. { 79, "Unknown message(For future use)"},
  512. { 80, "Unknown message(For future use)"},
  513. { 81, "Unknown message(For future use)"},
  514. { 82, "Unknown message(For future use)"},
  515. { 83, "Unknown message(For future use)"},
  516. { 84, "Unknown message(For future use)"},
  517. { 85, "Unknown message(For future use)"},
  518. { 86, "Unknown message(For future use)"},
  519. { 87, "Unknown message(For future use)"},
  520. { 88, "Unknown message(For future use)"},
  521. { 89, "Unknown message(For future use)"},
  522. { 90, "Unknown message(For future use)"},
  523. { 91, "Unknown message(For future use)"},
  524. { 92, "Unknown message(For future use)"},
  525. { 93, "Unknown message(For future use)"},
  526. { 94, "Unknown message(For future use)"},
  527. { 95, "Unknown message(For future use)"},
  528. #endif
  529. {GTP_MBMS_NOTIFY_REQ, "MBMS Notification Request"},
  530. {GTP_MBMS_NOTIFY_RES, "MBMS Notification Response"},
  531. {GTP_MBMS_NOTIFY_REJ_REQ, "MBMS Notification Reject Request"},
  532. {GTP_MBMS_NOTIFY_REJ_RES, "MBMS Notification Reject Response"},
  533. {GTP_CREATE_MBMS_CNTXT_REQ, "Create MBMS Context Request"},
  534. {GTP_CREATE_MBMS_CNTXT_RES, "Create MBMS Context Response"},
  535. {GTP_UPD_MBMS_CNTXT_REQ, "Update MBMS Context Request"},
  536. {GTP_UPD_MBMS_CNTXT_RES, "Update MBMS Context Response"},
  537. {GTP_DEL_MBMS_CNTXT_REQ, "Delete MBMS Context Request"},
  538. {GTP_DEL_MBMS_CNTXT_RES, "Delete MBMS Context Response"},
  539. /* 106 - 111 For future use. Shall not be sent. If received,
  540. * shall be treated as an Unknown message.
  541. */
  542. #if 0
  543. { 106, "Unknown message(For future use)"},
  544. { 107, "Unknown message(For future use)"},
  545. { 108, "Unknown message(For future use)"},
  546. { 109, "Unknown message(For future use)"},
  547. { 110, "Unknown message(For future use)"},
  548. { 111, "Unknown message(For future use)"},
  549. #endif
  550. {GTP_MBMS_REG_REQ, "MBMS Registration Request"},
  551. {GTP_MBMS_REG_RES, "MBMS Registration Response"},
  552. {GTP_MBMS_DE_REG_REQ, "MBMS De-Registration Request"},
  553. {GTP_MBMS_DE_REG_RES, "MBMS De-Registration Response"},
  554. {GTP_MBMS_SES_START_REQ, "MBMS Session Start Request"},
  555. {GTP_MBMS_SES_START_RES, "MBMS Session Start Response"},
  556. {GTP_MBMS_SES_STOP_REQ, "MBMS Session Stop Request"},
  557. {GTP_MBMS_SES_STOP_RES, "MBMS Session Stop Response"},
  558. {GTP_MBMS_SES_UPD_REQ, "MBMS Session Update Request"},
  559. {GTP_MBMS_SES_UPD_RES, "MBMS Session Update Response"},
  560. /* 122-127 For future use. Shall not be sent.
  561. * If received, shall be treated as an Unknown message.
  562. */
  563. #if 0
  564. { 122, "Unknown message(For future use)"},
  565. { 123, "Unknown message(For future use)"},
  566. { 124, "Unknown message(For future use)"},
  567. { 125, "Unknown message(For future use)"},
  568. { 126, "Unknown message(For future use)"},
  569. { 127, "Unknown message(For future use)"},
  570. #endif
  571. {GTP_MS_INFO_CNG_NOT_REQ, "MS Info Change Notification Request"},
  572. {GTP_MS_INFO_CNG_NOT_RES, "MS Info Change Notification Response"},
  573. /* 130-239 For future use. Shall not be sent. If received,
  574. * shall be treated as an Unknown message.
  575. */
  576. #if 0
  577. { 130, "Unknown message(For future use)"},
  578. { 131, "Unknown message(For future use)"},
  579. { 132, "Unknown message(For future use)"},
  580. { 133, "Unknown message(For future use)"},
  581. { 134, "Unknown message(For future use)"},
  582. { 135, "Unknown message(For future use)"},
  583. { 136, "Unknown message(For future use)"},
  584. { 137, "Unknown message(For future use)"},
  585. { 138, "Unknown message(For future use)"},
  586. { 139, "Unknown message(For future use)"},
  587. { 140, "Unknown message(For future use)"},
  588. { 141, "Unknown message(For future use)"},
  589. { 142, "Unknown message(For future use)"},
  590. { 143, "Unknown message(For future use)"},
  591. { 144, "Unknown message(For future use)"},
  592. { 145, "Unknown message(For future use)"},
  593. { 146, "Unknown message(For future use)"},
  594. { 147, "Unknown message(For future use)"},
  595. { 148, "Unknown message(For future use)"},
  596. { 149, "Unknown message(For future use)"},
  597. { 150, "Unknown message(For future use)"},
  598. { 151, "Unknown message(For future use)"},
  599. { 152, "Unknown message(For future use)"},
  600. { 153, "Unknown message(For future use)"},
  601. { 154, "Unknown message(For future use)"},
  602. { 155, "Unknown message(For future use)"},
  603. { 156, "Unknown message(For future use)"},
  604. { 157, "Unknown message(For future use)"},
  605. { 158, "Unknown message(For future use)"},
  606. { 159, "Unknown message(For future use)"},
  607. #endif
  608. {GTP_MSG_DATA_TRANSF_REQ, "Data record transfer request"},
  609. {GTP_MSG_DATA_TRANSF_RESP, "Data record transfer response"},
  610. /* 242-253 For future use. Shall not be sent. If received,
  611. * shall be treated as an Unknown message.
  612. */
  613. #if 0
  614. { 242, "Unknown message(For future use)"},
  615. { 243, "Unknown message(For future use)"},
  616. { 244, "Unknown message(For future use)"},
  617. { 245, "Unknown message(For future use)"},
  618. { 246, "Unknown message(For future use)"},
  619. { 247, "Unknown message(For future use)"},
  620. { 248, "Unknown message(For future use)"},
  621. { 249, "Unknown message(For future use)"},
  622. { 250, "Unknown message(For future use)"},
  623. { 251, "Unknown message(For future use)"},
  624. { 252, "Unknown message(For future use)"},
  625. { 253, "Unknown message(For future use)"},
  626. #endif
  627. {GTP_MSG_END_MARKER, "End Marker"},
  628. {GTP_MSG_TPDU, "T-PDU"},
  629. {0, NULL}
  630. };
  631. static value_string_ext gtp_message_type_ext = VALUE_STRING_EXT_INIT(gtp_message_type);
  632. /* definitions of fields in extension header */
  633. #define GTP_EXT_CAUSE 0x01
  634. #define GTP_EXT_IMSI 0x02
  635. #define GTP_EXT_RAI 0x03
  636. #define GTP_EXT_TLLI 0x04
  637. #define GTP_EXT_PTMSI 0x05
  638. #define GTP_EXT_QOS_GPRS 0x06
  639. #define GTP_EXT_REORDER 0x08
  640. #define GTP_EXT_AUTH_TRI 0x09
  641. #define GTP_EXT_MAP_CAUSE 0x0B
  642. #define GTP_EXT_PTMSI_SIG 0x0C
  643. #define GTP_EXT_MS_VALID 0x0D
  644. #define GTP_EXT_RECOVER 0x0E
  645. #define GTP_EXT_SEL_MODE 0x0F
  646. #define GTP_EXT_16 0x10
  647. #define GTP_EXT_FLOW_LABEL 0x10
  648. #define GTP_EXT_TEID 0x10 /* 0xFF10 3G */
  649. #define GTP_EXT_17 0x11
  650. #define GTP_EXT_FLOW_SIG 0x11
  651. #define GTP_EXT_TEID_CP 0x11 /* 0xFF11 3G */
  652. #define GTP_EXT_18 0x12
  653. #define GTP_EXT_FLOW_II 0x12
  654. #define GTP_EXT_TEID_II 0x12 /* 0xFF12 3G */
  655. #define GTP_EXT_19 0x13 /* 19 TV Teardown Ind 7.7.16 */
  656. #define GTP_EXT_MS_REASON 0x13 /* same as 0x1D GTPv1_EXT_MS_REASON */
  657. #define GTP_EXT_TEAR_IND 0x13 /* 0xFF13 3G */
  658. #define GTP_EXT_NSAPI 0x14 /* 3G */
  659. #define GTP_EXT_RANAP_CAUSE 0x15 /* 3G */
  660. #define GTP_EXT_RAB_CNTXT 0x16 /* 3G */
  661. #define GTP_EXT_RP_SMS 0x17 /* 3G */
  662. #define GTP_EXT_RP 0x18 /* 3G */
  663. #define GTP_EXT_PKT_FLOW_ID 0x19 /* 3G */
  664. #define GTP_EXT_CHRG_CHAR 0x1A /* 3G */
  665. #define GTP_EXT_TRACE_REF 0x1B /* 3G */
  666. #define GTP_EXT_TRACE_TYPE 0x1C /* 3G */
  667. #define GTPv1_EXT_MS_REASON 0x1D /* 3G 29 TV MS Not Reachable Reason 7.7.25A */
  668. /* 117-126 Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33]) */
  669. #define GTP_EXT_TR_COMM 0x7E /* charging */
  670. #define GTP_EXT_CHRG_ID 0x7F /* 127 TV Charging ID 7.7.26 */
  671. #define GTP_EXT_USER_ADDR 0x80
  672. #define GTP_EXT_MM_CNTXT 0x81
  673. #define GTP_EXT_PDP_CNTXT 0x82
  674. #define GTP_EXT_APN 0x83
  675. #define GTP_EXT_PROTO_CONF 0x84
  676. #define GTP_EXT_GSN_ADDR 0x85
  677. #define GTP_EXT_MSISDN 0x86
  678. #define GTP_EXT_QOS_UMTS 0x87 /* 3G */
  679. #define GTP_EXT_AUTH_QUI 0x88 /* 3G */
  680. #define GTP_EXT_TFT 0x89 /* 3G */
  681. #define GTP_EXT_TARGET_ID 0x8A /* 3G */
  682. #define GTP_EXT_UTRAN_CONT 0x8B /* 3G */
  683. #define GTP_EXT_RAB_SETUP 0x8C /* 3G */
  684. #define GTP_EXT_HDR_LIST 0x8D /* 3G */
  685. #define GTP_EXT_TRIGGER_ID 0x8E /* 3G 142 7.7.41 */
  686. #define GTP_EXT_OMC_ID 0x8F /* 3G 143 TLV OMC Identity 7.7.42 */
  687. #define GTP_EXT_RAN_TR_CONT 0x90 /* 3G 144 TLV RAN Transparent Container 7.7.43 */
  688. #define GTP_EXT_PDP_CONT_PRIO 0x91 /* 3G 145 TLV PDP Context Prioritization 7.7.45 */
  689. #define GTP_EXT_ADD_RAB_SETUP_INF 0x92 /* 3G 146 TLV Additional RAB Setup Information 7.7.45A */
  690. #define GTP_EXT_SSGN_NO 0x93 /* 3G 147 TLV SGSN Number 7.7.47 */
  691. #define GTP_EXT_COMMON_FLGS 0x94 /* 3G 148 TLV Common Flags 7.7.48 */
  692. #define GTP_EXT_APN_RES 0x95 /* 3G 149 */
  693. #define GTP_EXT_RA_PRIO_LCS 0x96 /* 3G 150 TLV Radio Priority LCS 7.7.25B */
  694. #define GTP_EXT_RAT_TYPE 0x97 /* 3G 151 TLV RAT Type 7.7.50 */
  695. #define GTP_EXT_USR_LOC_INF 0x98 /* 3G 152 TLV User Location Information 7.7.51 */
  696. #define GTP_EXT_MS_TIME_ZONE 0x99 /* 3G 153 TLV MS Time Zone 7.7.52 */
  697. #define GTP_EXT_IMEISV 0x9A /* 3G 154 TLV IMEI(SV) 7.7.53 */
  698. #define GTP_EXT_CAMEL_CHG_INF_CON 0x9B /* 3G 155 TLV CAMEL Charging Information Container 7.7.54 */
  699. #define GTP_EXT_MBMS_UE_CTX 0x9C /* 3G 156 TLV MBMS UE Context 7.7.55 */
  700. #define GTP_EXT_TMGI 0x9D /* 3G 157 TLV Temporary Mobile Group Identity (TMGI) 7.7.56 */
  701. #define GTP_EXT_RIM_RA 0x9E /* 3G 158 TLV RIM Routing Address 7.7.57 */
  702. #define GTP_EXT_MBMS_PROT_CONF_OPT 0x9F /* 3G 159 TLV MBMS Protocol Configuration Options 7.7.58 */
  703. #define GTP_EXT_MBMS_SA 0xA0 /* 3G 160 TLV MBMS Service Area 7.7.60 */
  704. #define GTP_EXT_SRC_RNC_PDP_CTX_INF 0xA1 /* 3G 161 TLV Source RNC PDCP context info 7.7.61 */
  705. #define GTP_EXT_ADD_TRS_INF 0xA2 /* 3G 162 TLV Additional Trace Info 7.7.62 */
  706. #define GTP_EXT_HOP_COUNT 0xA3 /* 3G 163 TLV Hop Counter 7.7.63 */
  707. #define GTP_EXT_SEL_PLMN_ID 0xA4 /* 3G 164 TLV Selected PLMN ID 7.7.64 */
  708. #define GTP_EXT_MBMS_SES_ID 0xA5 /* 3G 165 TLV MBMS Session Identifier 7.7.65 */
  709. #define GTP_EXT_MBMS_2G_3G_IND 0xA6 /* 3G 166 TLV MBMS 2G/3G Indicator 7.7.66 */
  710. #define GTP_EXT_ENH_NSAPI 0xA7 /* 3G 167 TLV Enhanced NSAPI 7.7.67 */
  711. #define GTP_EXT_MBMS_SES_DUR 0xA8 /* 3G 168 TLV MBMS Session Duration 7.7.59 */
  712. #define GTP_EXT_ADD_MBMS_TRS_INF 0xA9 /* 3G 169 TLV Additional MBMS Trace Info 7.7.68 */
  713. #define GTP_EXT_MBMS_SES_ID_REP_NO 0xAA /* 3G 170 TLV MBMS Session Identity Repetition Number 7.7.69 */
  714. #define GTP_EXT_MBMS_TIME_TO_DATA_TR 0xAB /* 3G 171 TLV MBMS Time To Data Transfer 7.7.70 */
  715. #define GTP_EXT_PS_HO_REQ_CTX 0xAC /* 3G 172 TLV PS Handover Request Context 7.7.71 */
  716. #define GTP_EXT_BSS_CONT 0xAD /* 3G 173 TLV BSS Container 7.7.72 */
  717. #define GTP_EXT_CELL_ID 0xAE /* 3G 174 TLV Cell Identification 7.7.73 */
  718. #define GTP_EXT_PDU_NO 0xAF /* 3G 175 TLV PDU Numbers 7.7.74 */
  719. #define GTP_EXT_BSSGP_CAUSE 0xB0 /* 3G 176 TLV BSSGP Cause 7.7.75 */
  720. #define GTP_EXT_REQ_MBMS_BEARER_CAP 0xB1 /* 3G 177 TLV Required MBMS bearer capabilities 7.7.76 */
  721. #define GTP_EXT_RIM_ROUTING_ADDR_DISC 0xB2 /* 3G 178 TLV RIM Routing Address Discriminator 7.7.77 */
  722. #define GTP_EXT_LIST_OF_SETUP_PFCS 0xB3 /* 3G 179 TLV List of set-up PFCs 7.7.78 */
  723. #define GTP_EXT_PS_HANDOVER_XIP_PAR 0xB4 /* 3G 180 TLV PS Handover XID Parameters 7.7.79 */
  724. #define GTP_EXT_MS_INF_CHG_REP_ACT 0xB5 /* 3G 181 TLV MS Info Change Reporting Action 7.7.80 */
  725. #define GTP_EXT_DIRECT_TUNNEL_FLGS 0xB6 /* 3G 182 TLV Direct Tunnel Flags 7.7.81 */
  726. #define GTP_EXT_CORRELATION_ID 0xB7 /* 3G 183 TLV Correlation-ID 7.7.82 */
  727. #define GTP_EXT_BEARER_CONTROL_MODE 0xB8 /* 3G 184 TLV Bearer Control Mode 7.7.83 */
  728. #define GTP_EXT_MBMS_FLOW_ID 0xB9 /* 3G 185 TLV MBMS Flow Identifier 7.7.84 */
  729. #define GTP_EXT_MBMS_IP_MCAST_DIST 0xBA /* 3G 186 TLV MBMS IP Multicast Distribution 7.7.85 */
  730. #define GTP_EXT_MBMS_DIST_ACK 0xBB /* 3G 187 TLV MBMS Distribution Acknowledgement 7.7.86 */
  731. #define GTP_EXT_RELIABLE_IRAT_HO_INF 0xBC /* 3G 188 TLV Reliable INTER RAT HANDOVER INFO 7.7.87 */
  732. #define GTP_EXT_RFSP_INDEX 0xBD /* 3G 189 TLV RFSP Index 7.7.88 */
  733. #define GTP_EXT_FQDN 0xBE /* 3G 190 TLV Fully Qualified Domain Name (FQDN) 7.7.90 */
  734. #define GTP_EXT_EVO_ALLO_RETE_P1 0xBF /* 3G 191 TLV Evolved Allocation/Retention Priority I 7.7.91 */
  735. #define GTP_EXT_EVO_ALLO_RETE_P2 0xC0 /* 3G 192 TLV Evolved Allocation/Retention Priority II 7.7.92 */
  736. #define GTP_EXT_EXTENDED_COMMON_FLGS 0xC1 /* 3G 193 TLV Extended Common Flags 7.7.93 */
  737. #define GTP_EXT_UCI 0xC2 /* 3G 194 TLV User CSG Information (UCI) 7.7.94 */
  738. #define GTP_EXT_CSG_INF_REP_ACT 0xC3 /* 3G 195 TLV CSG Information Reporting Action 7.7.95 */
  739. #define GTP_EXT_CSG_ID 0xC4 /* 3G 196 TLV CSG ID 7.7.96 */
  740. #define GTP_EXT_CMI 0xC5 /* 3G 197 TLV CSG Membership Indication (CMI) 7.7.97 */
  741. #define GTP_EXT_AMBR 0xC6 /* 3G 198 TLV Aggregate Maximum Bit Rate (AMBR) 7.7.98 */
  742. #define GTP_EXT_UE_NETWORK_CAP 0xC7 /* 3G 199 TLV UE Network Capability 7.7.99 */
  743. #define GTP_EXT_UE_AMBR 0xC8 /* 3G 200 TLV UE-AMBR 7.7.100 */
  744. #define GTP_EXT_APN_AMBR_WITH_NSAPI 0xC9 /* 3G 201 TLV APN-AMBR with NSAPI 7.7.101 */
  745. #define GTP_EXT_GGSN_BACK_OFF_TIME 0xCA /* 3G 202 TLV GGSN Back-Off Time 7.7.102 */
  746. #define GTP_EXT_SIG_PRI_IND 0xCB /* 3G 203 TLV Signalling Priority Indication 7.7.103 */
  747. #define GTP_EXT_SIG_PRI_IND_W_NSAPI 0xCC /* 3G 204 TLV Signalling Priority Indication with NSAPI 7.7.104 */
  748. #define GTP_EXT_HIGHER_BR_16MB_FLG 0xCD /* 3G 205 TLV Higher bitrates than 16 Mbps flag 7.7.105 */
  749. #define GTP_EXT_MAX_MBR_APN_AMBR 0xCE /* 3G 206 TLV Max MBR/APN-AMBR 7.7.106 */
  750. #define GTP_EXT_ADD_MM_CTX_SRVCC 0xCF /* 3G 207 TLV Additional MM context for SRVCC 7.7.107 */
  751. #define GTP_EXT_ADD_FLGS_SRVCC 0xD0 /* 3G 208 TLV Additional flags for SRVCC 7.7.108 */
  752. #define GTP_EXT_STN_SR 0xD1 /* 3G 209 TLV STN-SR 7.7.109 */
  753. #define GTP_EXT_C_MSISDN 0xD2 /* 3G 210 TLV C-MSISDN 7.7.110 */
  754. #define GTP_EXT_EXT_RANAP_CAUSE 0xD3 /* 3G 211 TLV Extended RANAP Cause 7.7.111 */
  755. /* 212-238 TLV Spare. For future use. */
  756. /* 239-250 Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33])*/
  757. #define GTP_EXT_C1 0xC1
  758. #define GTP_EXT_C2 0xC2
  759. #define GTP_EXT_REL_PACK 0xF9 /* charging */
  760. #define GTP_EXT_CAN_PACK 0xFA /* charging */
  761. #define GTP_EXT_CHRG_ADDR 0xFB /* 3G 251 TLV Charging Gateway Address 7.7.44 */
  762. /* 252-254 Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33])*/
  763. #define GTP_EXT_DATA_REQ 0xFC /* charging */
  764. #define GTP_EXT_DATA_RESP 0xFD /* charging */
  765. #define GTP_EXT_NODE_ADDR 0xFE /* charging */
  766. #define GTP_EXT_PRIV_EXT 0xFF
  767. static const value_string gtp_val[] = {
  768. {GTP_EXT_CAUSE, "Cause of operation"},
  769. {GTP_EXT_IMSI, "IMSI"},
  770. {GTP_EXT_RAI, "Routing Area Identity"},
  771. {GTP_EXT_TLLI, "Temporary Logical Link Identity"},
  772. {GTP_EXT_PTMSI, "Packet TMSI"},
  773. /* 6 */ {GTP_EXT_QOS_GPRS, "Quality of Service"},
  774. /* 6-7 Spare */
  775. /* 8 */ {GTP_EXT_REORDER, "Reorder required"},
  776. /* 9 */ {GTP_EXT_AUTH_TRI, "Authentication triplets"},
  777. /* 10 Spare */
  778. /* 11 */ {GTP_EXT_MAP_CAUSE, "MAP cause"},
  779. /* 12 */ {GTP_EXT_PTMSI_SIG, "P-TMSI signature"},
  780. /* 13 */ {GTP_EXT_MS_VALID, "MS validated"},
  781. /* 14 */ {GTP_EXT_RECOVER, "Recovery"},
  782. /* 15 */ {GTP_EXT_SEL_MODE, "Selection mode"},
  783. /* 16 */ {GTP_EXT_16, "Flow label data I"},
  784. /* 16 */ /* ??? {GTP_EXT_FLOW_LABEL, "Flow label data I"}, */
  785. /* 16 */ /* ??? {GTP_EXT_TEID, "Tunnel Endpoint Identifier Data I"}, */ /* 3G */
  786. {GTP_EXT_17, "Flow label signalling"},
  787. /* ??? {GTP_EXT_FLOW_SIG, "Flow label signalling"}, */
  788. /* ??? {GTP_EXT_TEID_CP, "Tunnel Endpoint Identifier Data Control Plane"}, */ /* 3G */
  789. {GTP_EXT_18, "Flow label data II"},
  790. /* ??? {GTP_EXT_FLOW_II, "Flow label data II"}, */
  791. /* ??? {GTP_EXT_TEID_II, "Tunnel Endpoint Identifier Data II"}, */ /* 3G */
  792. {GTP_EXT_19, "MS not reachable reason"},
  793. /* ??? {GTP_EXT_MS_REASON, "MS not reachable reason"}, */
  794. /* ??? {GTP_EXT_TEAR_IND, "Teardown ID"}, */ /* 3G */
  795. {GTP_EXT_NSAPI, "NSAPI"}, /* 3G */
  796. {GTP_EXT_RANAP_CAUSE, "RANAP cause"}, /* 3G */
  797. {GTP_EXT_RAB_CNTXT, "RAB context"}, /* 3G */
  798. {GTP_EXT_RP_SMS, "Radio Priority for MO SMS"}, /* 3G */
  799. {GTP_EXT_RP, "Radio Priority"}, /* 3G */
  800. {GTP_EXT_PKT_FLOW_ID, "Packet Flow ID"}, /* 3G */
  801. {GTP_EXT_CHRG_CHAR, "Charging characteristics"}, /* 3G */
  802. {GTP_EXT_TRACE_REF, "Trace references"}, /* 3G */
  803. {GTP_EXT_TRACE_TYPE, "Trace type"}, /* 3G */
  804. /* 29 */ {GTPv1_EXT_MS_REASON, "MS not reachable reason"}, /* 3G */
  805. /* 117-126 Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33]) */
  806. /* 126 */ {GTP_EXT_TR_COMM, "Packet transfer command"}, /* charging */
  807. /* 127 */ {GTP_EXT_CHRG_ID, "Charging ID"},
  808. {GTP_EXT_USER_ADDR, "End user address"},
  809. {GTP_EXT_MM_CNTXT, "MM context"},
  810. {GTP_EXT_PDP_CNTXT, "PDP context"},
  811. {GTP_EXT_APN, "Access Point Name"},
  812. {GTP_EXT_PROTO_CONF, "Protocol configuration options"},
  813. {GTP_EXT_GSN_ADDR, "GSN address"},
  814. {GTP_EXT_MSISDN, "MS international PSTN/ISDN number"},
  815. {GTP_EXT_QOS_UMTS, "Quality of service (UMTS)"}, /* 3G */
  816. {GTP_EXT_AUTH_QUI, "Authentication quintuplets"}, /* 3G */
  817. {GTP_EXT_TFT, "Traffic Flow Template (TFT)"}, /* 3G */
  818. {GTP_EXT_TARGET_ID, "Target (RNC) identification"}, /* 3G */
  819. {GTP_EXT_UTRAN_CONT, "UTRAN transparent field"}, /* 3G */
  820. {GTP_EXT_RAB_SETUP, "RAB setup information"}, /* 3G */
  821. {GTP_EXT_HDR_LIST, "Extension Header Types List"}, /* 3G */
  822. {GTP_EXT_TRIGGER_ID, "Trigger Id"}, /* 3G */
  823. {GTP_EXT_OMC_ID, "OMC Identity"}, /* 3G */
  824. {GTP_EXT_RAN_TR_CONT, "RAN Transparent Container"}, /* 7.7.43 */
  825. {GTP_EXT_PDP_CONT_PRIO, "PDP Context Prioritization"}, /* 7.7.45 */
  826. {GTP_EXT_ADD_RAB_SETUP_INF, "Additional RAB Setup Information"}, /* 7.7.45A */
  827. {GTP_EXT_SSGN_NO, "SGSN Number"}, /* 7.7.47 */
  828. {GTP_EXT_COMMON_FLGS, "Common Flags"}, /* 7.7.48 */
  829. {GTP_EXT_APN_RES, "APN Restriction"}, /* 3G */
  830. {GTP_EXT_RA_PRIO_LCS, "Radio Priority LCS"}, /* 7.7.25B */
  831. {GTP_EXT_RAT_TYPE, "RAT Type"}, /* 3G */
  832. {GTP_EXT_USR_LOC_INF, "User Location Information"}, /* 7.7.51 */
  833. {GTP_EXT_MS_TIME_ZONE, "MS Time Zone"}, /* 7.7.52 */
  834. {GTP_EXT_IMEISV, "IMEI(SV)"}, /* 3G */
  835. {GTP_EXT_CAMEL_CHG_INF_CON, "CAMEL Charging Information Container"}, /* 7.7.54 */
  836. {GTP_EXT_MBMS_UE_CTX, "MBMS UE Context"}, /* 7.7.55 */
  837. {GTP_EXT_TMGI, "Temporary Mobile Group Identity (TMGI)"}, /* 7.7.56 */
  838. {GTP_EXT_RIM_RA, "RIM Routing Address"}, /* 7.7.57 */
  839. {GTP_EXT_MBMS_PROT_CONF_OPT, "MBMS Protocol Configuration Options"}, /* 7.7.58 */
  840. {GTP_EXT_MBMS_SA, "MBMS Service Area"}, /* 7.7.60 */
  841. {GTP_EXT_SRC_RNC_PDP_CTX_INF, "Source RNC PDCP context info"}, /* 7.7.61 */
  842. {GTP_EXT_ADD_TRS_INF, "Additional Trace Info"}, /* 7.7.62 */
  843. {GTP_EXT_HOP_COUNT, "Hop Counter"}, /* 7.7.63 */
  844. {GTP_EXT_SEL_PLMN_ID, "Selected PLMN ID"}, /* 7.7.64 */
  845. {GTP_EXT_MBMS_SES_ID, "MBMS Session Identifier"}, /* 7.7.65 */
  846. {GTP_EXT_MBMS_2G_3G_IND, "MBMS 2G/3G Indicator"}, /* 7.7.66 */
  847. {GTP_EXT_ENH_NSAPI, "Enhanced NSAPI"}, /* 7.7.67 */
  848. {GTP_EXT_MBMS_SES_DUR, "MBMS Session Duration"}, /* 7.7.59 */
  849. {GTP_EXT_ADD_MBMS_TRS_INF, "Additional MBMS Trace Info"}, /* 7.7.68 */
  850. {GTP_EXT_MBMS_SES_ID_REP_NO, "MBMS Session Identity Repetition Number"}, /* 7.7.69 */
  851. {GTP_EXT_MBMS_TIME_TO_DATA_TR, "MBMS Time To Data Transfer"}, /* 7.7.70 */
  852. {GTP_EXT_PS_HO_REQ_CTX, "PS Handover Request Context"}, /* 7.7.71 */
  853. {GTP_EXT_BSS_CONT, "BSS Container"}, /* 7.7.72 */
  854. {GTP_EXT_CELL_ID, "Cell Identification"}, /* 7.7.73 */
  855. {GTP_EXT_PDU_NO, "PDU Numbers"}, /* 7.7.74 */
  856. {GTP_EXT_BSSGP_CAUSE, "BSSGP Cause"}, /* 7.7.75 */
  857. {GTP_EXT_REQ_MBMS_BEARER_CAP, "Required MBMS bearer capabilities"}, /* 7.7.76 */
  858. {GTP_EXT_RIM_ROUTING_ADDR_DISC, "RIM Routing Address Discriminator"}, /* 7.7.77 */
  859. {GTP_EXT_LIST_OF_SETUP_PFCS, "List of set-up PFCs"}, /* 7.7.78 */
  860. /* 180 */ {GTP_EXT_PS_HANDOVER_XIP_PAR, " PS Handover XID Parameters"}, /* 7.7.79 */
  861. /* 181 */ {GTP_EXT_MS_INF_CHG_REP_ACT, "MS Info Change Reporting Action"}, /* 7.7.80 */
  862. /* 182 */ {GTP_EXT_DIRECT_TUNNEL_FLGS, "Direct Tunnel Flags"}, /* 7.7.81 */
  863. /* 183 */ {GTP_EXT_CORRELATION_ID, "Correlation-ID"}, /* 7.7.82 */
  864. /* 184 */ {GTP_EXT_BEARER_CONTROL_MODE, "Bearer Control Mode"}, /* 7.7.83 */
  865. /* 185 */ {GTP_EXT_MBMS_FLOW_ID, "MBMS Flow Identifier"}, /* 7.7.84 */
  866. /* 186 */ {GTP_EXT_MBMS_IP_MCAST_DIST, "MBMS IP Multicast Distribution"}, /* 7.7.85 */
  867. /* 187 */ {GTP_EXT_MBMS_DIST_ACK, "MBMS Distribution Acknowledgement"}, /* 7.7.86 */
  868. /* 188 */ {GTP_EXT_RELIABLE_IRAT_HO_INF, "Reliable INTER RAT HANDOVER INFO"}, /* 7.7.87 */
  869. /* 189 */ {GTP_EXT_RFSP_INDEX, "RFSP Index"}, /* 7.7.88 */
  870. /* 190 */ {GTP_EXT_FQDN, "Fully Qualified Domain Name (FQDN)"}, /* 7.7.90 */
  871. /* 191 */ {GTP_EXT_EVO_ALLO_RETE_P1, "Evolved Allocation/Retention Priority I"}, /* 7.7.91 */
  872. /* 192 */ {GTP_EXT_EVO_ALLO_RETE_P2, "Evolved Allocation/Retention Priority II"}, /* 7.7.92 */
  873. /* 193 */ {GTP_EXT_EXTENDED_COMMON_FLGS, "Extended Common Flags"}, /* 7.7.93 */
  874. /* 194 */ {GTP_EXT_UCI, "User CSG Information (UCI)"}, /* 7.7.94 */
  875. /* 195 */ {GTP_EXT_CSG_INF_REP_ACT, "CSG Information Reporting Action"}, /* 7.7.95 */
  876. /* 196 */ {GTP_EXT_CSG_ID, "CSG ID"}, /* 7.7.96 */
  877. /* 197 */ {GTP_EXT_CMI, "CSG Membership Indication (CMI)"}, /* 7.7.97 */
  878. /* 198 */ {GTP_EXT_AMBR, "Aggregate Maximum Bit Rate (AMBR)"}, /* 7.7.98 */
  879. /* 199 */ {GTP_EXT_UE_NETWORK_CAP, "UE Network Capability"}, /* 7.7.99 */
  880. /* 200 */ {GTP_EXT_UE_AMBR, "UE-AMBR"}, /* 7.7.100 */
  881. /* 201 */ {GTP_EXT_APN_AMBR_WITH_NSAPI, "APN-AMBR with NSAPI"}, /* 7.7.101 */
  882. /* 202 */ {GTP_EXT_GGSN_BACK_OFF_TIME, "GGSN Back-Off Time"}, /* 7.7.102 */
  883. /* 203 */ {GTP_EXT_SIG_PRI_IND, "Signalling Priority Indication"}, /* 7.7.103 */
  884. /* 204 */ {GTP_EXT_SIG_PRI_IND_W_NSAPI, "Signalling Priority Indication with NSAPI"}, /* 7.7.104 */
  885. /* 205 */ {GTP_EXT_HIGHER_BR_16MB_FLG, "Higher bitrates than 16 Mbps flag"}, /* 7.7.105 */
  886. /* 206 */ {GTP_EXT_MAX_MBR_APN_AMBR, "Max MBR/APN-AMBR"}, /* 7.7.106 */
  887. /* 207 */ {GTP_EXT_ADD_MM_CTX_SRVCC, "Additional MM context for SRVCC"}, /* 7.7.107 */
  888. /* 208 */ {GTP_EXT_ADD_FLGS_SRVCC, "Additional flags for SRVCC"}, /* 7.7.108 */
  889. /* 209 */ {GTP_EXT_STN_SR, "STN-SR"}, /* 7.7.109 */
  890. /* 210 */ {GTP_EXT_C_MSISDN, "C-MSISDN"}, /* 7.7.110 */
  891. /* 211 */ {GTP_EXT_EXT_RANAP_CAUSE, "Extended RANAP Cause"}, /* 7.7.111 */
  892. /* 212-238 TLV Spare. For future use. */
  893. /* 239-250 Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33]) */
  894. /* 249 */ {GTP_EXT_REL_PACK, "Sequence numbers of released packets IE"}, /* charging */
  895. /* 250 */ {GTP_EXT_CAN_PACK, "Sequence numbers of canceled packets IE"}, /* charging */
  896. /* 251 */ {GTP_EXT_CHRG_ADDR, "Charging Gateway address"}, /* 7.7.44 */
  897. /* 252-254 Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33]) */
  898. /* 252 */ {GTP_EXT_DATA_REQ, "Data record packet"}, /* charging */
  899. /* 253 */ {GTP_EXT_DATA_RESP, "Requests responded"}, /* charging */
  900. /* 254 */ {GTP_EXT_NODE_ADDR, "Address of recommended node"}, /* charging */
  901. /* 255 */ {GTP_EXT_PRIV_EXT, "Private Extension"},
  902. {0, NULL}
  903. };
  904. static value_string_ext gtp_val_ext = VALUE_STRING_EXT_INIT(gtp_val);
  905. /* It seems like some IE's are renamed in gtpv1 at least reading
  906. * 3GPP TS 29.060 version 6.11.0 Release 6
  907. */
  908. static const value_string gtpv1_val[] = {
  909. /* 1 */ {GTP_EXT_CAUSE, "Cause of operation"},
  910. /* 2 */ {GTP_EXT_IMSI, "IMSI"},
  911. /* 3 */ {GTP_EXT_RAI, "Routing Area Identity"},
  912. /* 4 */ {GTP_EXT_TLLI, "Temporary Logical Link Identity"},
  913. /* 5 */ {GTP_EXT_PTMSI, "Packet TMSI"},
  914. /* 6 */ {GTP_EXT_QOS_GPRS,

Large files files are truncated, but you can click here to view the full file