diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-07-04 22:41:29 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-07-05 00:06:38 +0000 |
commit | fdd87a1e41db7039b0af5bb15f40b83db1ca3a96 (patch) | |
tree | 19399810a2f169f6ef068233049252ee81ae5e41 /epan/dissectors/packet-nas_eps.c | |
parent | 308a538addd816431732d6f0ac35f7d2bdc76712 (diff) |
Network-Based IP Flow Mobility (NBIFOM) dissector
Based on 3GPP 24.161 V13.1.0
Change-Id: I7bf635c862bf7e0b73fd05bc8a55c900d1f4dd87
Reviewed-on: https://code.wireshark.org/review/16291
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-nas_eps.c')
-rw-r--r-- | epan/dissectors/packet-nas_eps.c | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c index 73c527d46a..7852177435 100644 --- a/epan/dissectors/packet-nas_eps.c +++ b/epan/dissectors/packet-nas_eps.c @@ -50,6 +50,7 @@ static int proto_nas_eps = -1; /* Dissector handles */ static dissector_handle_t gsm_a_dtap_handle; static dissector_handle_t lpp_handle; +static dissector_handle_t nbifom_handle; /* Forward declaration */ static void disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset); @@ -219,6 +220,7 @@ static int hf_nas_eps_esm_pdn_ipv6_if_id = -1; static int hf_nas_eps_esm_eplmnc = -1; static int hf_nas_eps_esm_ratc = -1; static int hf_nas_eps_esm_linked_bearer_id = -1; +static int hf_nas_eps_esm_nbifom_cont = -1; static int hf_nas_eps_esm_remote_ue_context_list_nb_ue_contexts = -1; static int hf_nas_eps_esm_remote_ue_context_list_ue_context_len = -1; static int hf_nas_eps_esm_remote_ue_context_list_ue_context_nb_user_id = -1; @@ -2905,9 +2907,20 @@ static const value_string nas_eps_esm_request_type_values[] = { */ /* * 9.9.4.19 NBIFOM container - * See subclause 10.5.6.24 in 3GPP TS 24.008 - * packet-gsm_a_gm.c */ +static guint16 +de_esm_nbifom_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) +{ + if (nbifom_handle) { + tvbuff_t *nbifom_tvb = tvb_new_subset_length(tvb, offset, len); + + call_dissector(nbifom_handle, nbifom_tvb, pinfo, tree); + } else { + proto_tree_add_item(tree, hf_nas_eps_esm_nbifom_cont, tvb, offset, len, ENC_NA); + } + + return len; +} /* * 9.9.4.20 Remote UE context list @@ -3334,7 +3347,7 @@ guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, g NULL, /* 9.9.4.16 Traffic flow template */ NULL, /* 9.9.4.17 Transaction identifier */ NULL, /* 9.9.4.18 WLAN offload acceptability */ - NULL, /* 9.9.4.19 NBIFOM container */ + de_esm_nbifom_cont, /* 9.9.4.19 NBIFOM container */ de_esm_remote_ue_context_list, /* 9.9.4.20 Remote UE context list */ de_esm_pkmf_address, /* 9.9.4.21 PKMF address */ de_esm_hdr_compr_config, /* 9.9.4.22 Header compression configuration */ @@ -4460,7 +4473,7 @@ nas_esm_act_ded_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */ ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL ); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -4488,7 +4501,7 @@ nas_esm_act_ded_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */ ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL ); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -4541,7 +4554,7 @@ nas_esm_act_ded_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info /* C- WLAN offload indication WLAN offload indication 9.9.4.18 O TV 1 */ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication"); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -4644,7 +4657,7 @@ nas_esm_act_def_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info /* C- WLAN offload indication WLAN offload indication 9.9.4.18 O TV 1 */ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication"); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 66 Header compression configuration Header compression configuration 9.9.4.22 O TLV 3-TBD */ ELEM_OPT_TLV(0x66, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG, NULL); /* 9- Control plane only indication Control plane only indication 9.9.4.23 O TV 1 */ @@ -4682,7 +4695,7 @@ nas_esm_bearer_res_all_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, /* 6B Re-attempt indicator Re-attempt indicator 9.9.4.13A O TLV 3 */ ELEM_OPT_TLV(0x6B, NAS_PDU_TYPE_ESM, DE_ESM_RE_ATTEMPT_IND, NULL); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -4725,7 +4738,7 @@ nas_esm_bearer_res_all_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, /* C- Device properties Device properties 9.9.2.0A O TV 1 */ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -4756,7 +4769,7 @@ nas_esm_bearer_res_mod_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, /* 6B Re-attempt indicator Re-attempt indicator 9.9.4.13A O TLV 3 */ ELEM_OPT_TLV(0x6B, NAS_PDU_TYPE_ESM, DE_ESM_RE_ATTEMPT_IND, NULL); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -4799,7 +4812,7 @@ nas_esm_bearer_res_mod_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, /* C- Device properties Device properties 9.9.2.0A O TV 1 */ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 66 Header compression configuration Header compression configuration 9.9.4.22 O TLV 3-TBD */ ELEM_OPT_TLV(0x66, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ @@ -4858,7 +4871,7 @@ nas_esm_deact_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *p /* C- WLAN offload indication WLAN offload indication 9.9.4.18 O TV 1 */ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication"); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -4964,7 +4977,7 @@ nas_esm_mod_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pin /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */ ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL ); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -4991,7 +5004,7 @@ nas_esm_mod_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pin /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */ ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL ); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -5035,7 +5048,7 @@ nas_esm_mod_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pin /* C- WLAN offload indication WLAN offload indication 9.9.4.18 O TV 1 */ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication"); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 66 Header compression configuration Header compression configuration 9.9.4.22 O TLV 3-TBD */ ELEM_OPT_TLV(0x66, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ @@ -5089,7 +5102,7 @@ nas_esm_pdn_con_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 /* 6B Re-attempt indicator Re-attempt indicator 9.9.4.13A O TLV 3 */ ELEM_OPT_TLV(0x6B, NAS_PDU_TYPE_ESM, DE_ESM_RE_ATTEMPT_IND, NULL); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL); @@ -5136,7 +5149,7 @@ nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 /* C- Device properties Device properties 9.9.2.0A O TV 1 */ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL); /* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */ - ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL); + ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL); /* 66 Header compression configuration Header compression configuration 9.9.4.22 O TLV 3-TBD */ ELEM_OPT_TLV(0x66, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG, NULL); /* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */ @@ -6568,6 +6581,11 @@ proto_register_nas_eps(void) FT_UINT8,BASE_DEC, VALS(nas_eps_esm_linked_bearer_id_vals), 0x0, NULL, HFILL } }, + { &hf_nas_eps_esm_nbifom_cont, + { "NBIFOM container content","nas_eps.esm.nbifom_cont", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, { &hf_nas_eps_esm_remote_ue_context_list_nb_ue_contexts, { "Number of remote UE contexts","nas_eps.esm.remote_ue_context_list.nb_ue_contexts", FT_UINT8, BASE_DEC, NULL, 0x0, @@ -6934,6 +6952,7 @@ proto_reg_handoff_nas_eps(void) { gsm_a_dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_nas_eps); lpp_handle = find_dissector_add_dependency("lpp", proto_nas_eps); + nbifom_handle = find_dissector_add_dependency("nbifom", proto_nas_eps); } /* |