diff options
-rw-r--r-- | epan/dissectors/packet-diameter_3gpp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-diameter_3gpp.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_a_common.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-gtpv2.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-nas_5gs.c | 66 | ||||
-rw-r--r-- | epan/dissectors/packet-nas_eps.c | 30 |
6 files changed, 84 insertions, 31 deletions
diff --git a/epan/dissectors/packet-diameter_3gpp.c b/epan/dissectors/packet-diameter_3gpp.c index ad6989c5d5..a5baa77ab8 100644 --- a/epan/dissectors/packet-diameter_3gpp.c +++ b/epan/dissectors/packet-diameter_3gpp.c @@ -2530,7 +2530,7 @@ dissect_diameter_3gpp_v2x_permission(tvbuff_t *tvb, packet_info *pinfo _U_, prot * 7.3.230 Core-Network-Restrictions * AVP Code: 1704 Core-Network-Restrictions */ -static int +int dissect_diameter_3gpp_core_network_restrictions(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data) { static const int *flags[] = { diff --git a/epan/dissectors/packet-diameter_3gpp.h b/epan/dissectors/packet-diameter_3gpp.h index 73db2ef08b..07b1be2a0d 100644 --- a/epan/dissectors/packet-diameter_3gpp.h +++ b/epan/dissectors/packet-diameter_3gpp.h @@ -69,6 +69,8 @@ static const value_string diameter_3gpp_termination_cause_vals[] = { { 0, NULL } }; +int dissect_diameter_3gpp_core_network_restrictions(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, void* data); + /* * Editor modelines * diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h index 34b15f491c..33eb75aa5d 100644 --- a/epan/dissectors/packet-gsm_a_common.h +++ b/epan/dissectors/packet-gsm_a_common.h @@ -799,6 +799,7 @@ guint16 de_esm_ext_eps_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _ void nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len); +guint16 de_nas_5gs_mm_ue_radio_cap_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, guint32 offset, guint len, gchar* add_string _U_, int string_len _U_); guint16 de_nas_5gs_cmn_s_nssai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_); guint16 de_nas_5gs_sm_qos_rules(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_); guint16 de_nas_5gs_sm_qos_flow_des(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_); @@ -1796,6 +1797,7 @@ typedef enum DE_NAS_5GS_MM_UE_STATUS, /* 9.11.3.56 UE status */ DE_NAS_5GS_MM_UL_DATA_STATUS, /* 9.11.3.57 Uplink data status */ DE_NAS_5GS_MM_CP_SERVICE_TYPE, /* 9.11.3.65 Control plane service type*/ + DE_NAS_5GS_MM_UE_RADIO_CAP_ID, /* 9.11.3.68 UE radio capability ID*/ DE_NAS_5GS_MM_NONE /* NONE */} nas_5gs_mm_elem_idx_t; diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index dc61b655c4..c3cbf30d56 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -1,7 +1,7 @@ /* packet-gtpv2.c * * Routines for GTPv2 dissection - * Copyright 2009 - 2019, Anders Broman <anders.broman [at] ericsson.com> + * Copyright 2009 - 2020, Anders Broman <anders.broman [at] ericsson.com> * * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> @@ -4761,7 +4761,8 @@ dissect_gtpv2_mm_context_eps_qq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre If Length of Core Network Restrictions is zero, then the field of Core Network Restrictions in octets "(l+2) to (l+5)" shall not be present. */ - proto_tree_add_expert_format(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, offset, ie_len, "The rest of the IE not dissected yet"); + tvbuff_t *new_tvb = tvb_new_subset_length(tvb, offset, ie_len); + dissect_diameter_3gpp_core_network_restrictions(new_tvb, pinfo, tree, NULL); offset += ie_len; } @@ -4769,12 +4770,14 @@ dissect_gtpv2_mm_context_eps_qq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre return; } - /* (l+6) Length of UE Radio Capability ID hf_gtpv2_mm_context_ue_radio_cap_len*/ + /* (l+6) Length of UE Radio Capability ID */ proto_tree_add_item_ret_uint(tree, hf_gtpv2_mm_context_ue_radio_cap_len, tvb, offset, 1, ENC_BIG_ENDIAN, &ie_len); offset += 1; if (ie_len) { - /* (l+7) to z UE Radio Capability ID */ - proto_tree_add_expert_format(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, offset, ie_len, "The rest of the IE not dissected yet"); + /* (l+7) to z UE Radio Capability ID + * The UE Radio Capability ID is specified in the clause 9.9.3.60 of 3GPP TS24.301 + */ + de_nas_5gs_mm_ue_radio_cap_id(tvb, tree, pinfo, offset, ie_len, NULL, 0); offset += ie_len; } if (offset < (gint)length){ diff --git a/epan/dissectors/packet-nas_5gs.c b/epan/dissectors/packet-nas_5gs.c index e65b5b8795..0ef602f4bb 100644 --- a/epan/dissectors/packet-nas_5gs.c +++ b/epan/dissectors/packet-nas_5gs.c @@ -418,6 +418,7 @@ static int hf_nas_5gs_os_app_id = -1; static int hf_nas_5gs_mm_len_of_rej_s_nssai = -1; static int hf_nas_5gs_mm_rej_s_nssai_cause = -1; static int hf_nas_5gs_mm_cp_service_type = -1; +static int hf_nas_5gs_mm_ue_radio_cap_id = -1; static expert_field ei_nas_5gs_extraneous_data = EI_INIT; static expert_field ei_nas_5gs_unknown_pd = EI_INIT; @@ -2509,37 +2510,40 @@ de_nas_5gs_mm_ul_data_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo } /* - * 9.11.3.58 Non-3GPP NW provided policies - * See subclause 10.5.5.37 in 3GPP TS 24.008 [12]. + * 9.11.3.58 Void + * 9.11.3.59 Void + * 9.11.3.60 Void + * 9.11.3.61 Void + * 9.11.3.62 Void + * 9.11.3.63 Void + * 9.11.3.64 Void */ - /* - * 9.11.3.59 EPS bearer context status - * See subclause 9.9.2.1 in 3GPP TS 24.301 [15]. - */ - - /* - * 9.11.3.60 Extended DRX parameters - * See subclause 10.5.5.32 in 3GPP TS 24.008 [12]. +/* + * 9.11.3.68 UE radio capability ID */ +/* + * The UE radio capability ID contents contain the UE radio capability ID as specified in 3GPP TS 23.003 + * with each digit coded in BCD, starting with the first digit coded in bits 4 to 1 of octet 3, + * the second digit coded in bits 8 to 5 of octet 3, and so on. If the UE radio capability ID contains + * an odd number of digits, bits 8 to 5 of the last octet (octet n) shall be coded as "1111". +*/ - /* - * 9.11.3.61 Mobile station classmark 2 - * See subclause 10.5.1.6 in 3GPP TS 24.008 [12]. - */ +guint16 +de_nas_5gs_mm_ue_radio_cap_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, + guint32 offset, guint len, + gchar* add_string _U_, int string_len _U_) +{ + int curr_offset; + const char* digit_str; - /* - * 9.11.3.62 Supported codec list - * See subclause 10.5.4.32 in 3GPP TS 24.008 [12]. - */ + curr_offset = offset; - /* - * 9.11.3.63 MA PDU session information -*/ + digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, curr_offset, len, NULL, FALSE); + proto_tree_add_string(tree, hf_nas_5gs_mm_ue_radio_cap_id, tvb, 0, -1, digit_str); -/* - * 9.11.3.64 CAG information list - */ + return len; +} /* @@ -3851,6 +3855,7 @@ typedef enum DE_NAS_5GS_MM_UE_STATUS, /* 9.11.3.56 UE status */ DE_NAS_5GS_MM_UL_DATA_STATUS, /* 9.11.3.57 Uplink data status */ DE_NAS_5GS_MM_CP_SERVICE_TYPE, /* 9.11.3.65 Control plane service type*/ + DE_NAS_5GS_MM_UE_RADIO_CAP_ID, /* 9.11.3.68 UE radio capability ID*/ DE_NAS_5GS_MM_NONE /* NONE */ } nas_5gs_mm_elem_idx_t; @@ -3923,6 +3928,7 @@ static const value_string nas_5gs_mm_elem_strings[] = { { DE_NAS_5GS_MM_UE_STATUS, "UE status" }, /* 9.11.3.56 UE status*/ { DE_NAS_5GS_MM_UL_DATA_STATUS, "Uplink data status" }, /* 9.11.3.57 Uplink data status*/ { DE_NAS_5GS_MM_CP_SERVICE_TYPE, "Control plane service type" }, /* 9.11.3.65 Control plane service type*/ + { DE_NAS_5GS_MM_UE_RADIO_CAP_ID, "UE radio capability ID" }, /* 9.11.3.68 UE radio capability ID*/ { 0, NULL } }; @@ -4000,6 +4006,9 @@ guint16(*nas_5gs_mm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pi de_nas_5gs_mm_ue_status, /* 9.11.3.56 UE status*/ de_nas_5gs_mm_ul_data_status, /* 9.11.3.57 Uplink data status*/ de_nas_5gs_mm_cp_service_type, /* 9.11.3.65 Control plane service type*/ + de_nas_5gs_mm_cp_service_type, /* 9.11.3.65 Control plane service type*/ + de_nas_5gs_mm_ue_radio_cap_id, /* 9.11.3.68 UE radio capability ID*/ + NULL, /* NONE */ }; @@ -4307,7 +4316,9 @@ nas_5gs_mm_registration_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL); /* 6A T3324 value GPRS timer 3 9.11.2.5 O TLV 3 */ + ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value"); /* 67 UE radio capability ID UE radio capability ID 9.11.3.68 O TLV 3-n */ + ELEM_OPT_TLV(0x67, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL); /* 35 Requested mapped NSSAI Mapped NSSAI 9.11.3.31B O TLV 3-42 */ /* 48 Additional information requested Additional information requested 9.11.3.12A O TLV 3 */ @@ -4391,6 +4402,7 @@ nas_5gs_mm_registration_accept(tvbuff_t *tvb, proto_tree *tree, packet_info *pin /* 6A T3324 value GPRS timer 3 9.11.2.5 O TLV 3 */ ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value"); /* 67 UE radio capability ID UE radio capability ID 9.11.3.yy O TLV 3-n */ + ELEM_OPT_TLV(0x67, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL); /* 68 UE radio capability ID deletion indication UE radio capability ID deletion indication 9.11.3.69 O TV 1 */ EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data); @@ -4725,6 +4737,7 @@ nas_5gs_mm_conf_upd_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, ELEM_OPT_TLV(0x6c, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3447"); /* 44 CAG information list CAG information list 9.11.3.64 O TLV-E 3-n */ /* 67 UE radio capability ID UE radio capability ID 9.11.3.yy O TLV 3-n */ + ELEM_OPT_TLV(0x67, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL); /* 68 UE radio capability ID deletion indication UE radio capability ID deletion indication 9.11.3.69 O TV 1 */ EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data); @@ -8503,6 +8516,11 @@ proto_register_nas_5gs(void) FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_cp_service_type_vals), 0x0f, NULL, HFILL } }, + { &hf_nas_5gs_mm_ue_radio_cap_id, + { "UE radio capability ID", "nas_5gs.mm.ue_radio_cap_id", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, }; guint i; diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c index f55a4032b1..97f517bc7f 100644 --- a/epan/dissectors/packet-nas_eps.c +++ b/epan/dissectors/packet-nas_eps.c @@ -1,7 +1,7 @@ /* packet-nas_eps.c * Routines for Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS) dissection * - * Copyright 2008 - 2017, Anders Broman <anders.broman@ericsson.com> + * Copyright 2008 - 2020, Anders Broman <anders.broman@ericsson.com> * * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> @@ -884,6 +884,14 @@ static const value_string nas_emm_elem_strings[] = { { DE_EMM_ADD_INFO_REQ, "Additional information requested" }, /* 9.9.3.55 Additional information requested */ { DE_EMM_CIPH_KEY_DATA, "Ciphering key data" }, /* 9.9.3.56 Ciphering key data */ { DE_EMM_N1_UE_NETWORK_CAP, "N1 UE network capability" }, /* 9.9.3.57 N1 UE network capability */ +/* + * 9.9.3.58 UE radio capability ID availability + * 9.9.3.59 UE radio capability ID request + * 9.9.3.60 UE radio capability ID + * 9.9.3.61 UE radio capability ID deletion indication + * 9.9.3.62 WUS assistance information + */ + { 0, NULL } }; value_string_ext nas_emm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_emm_elem_strings); @@ -2832,6 +2840,18 @@ de_emm_n1_ue_network_cap(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_ return 1; } + +/* + * 9.9.3.58 UE radio capability ID availability + * 9.9.3.59 UE radio capability ID request + * 9.9.3.60 UE radio capability ID + * See subclause 9.11.3.65 in 3GPP TS 24.501 + * 9.9.3.61 UE radio capability ID deletion indication + * See subclause 9.11.3.zz in 3GPP TS 24.501 + * 9.9.3.62 WUS assistance information + */ + + /* * 9.9.4 EPS Session Management (ESM) information elements */ @@ -4047,6 +4067,14 @@ guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, g de_emm_add_info_req, /* 9.9.3.55 Additional information requested */ de_emm_ciph_key_data, /* 9.9.3.56 Ciphering key data */ de_emm_n1_ue_network_cap, /* 9.9.3.57 N1 UE network capability */ +/* + * 9.9.3.58 UE radio capability ID availability + * 9.9.3.59 UE radio capability ID request + * 9.9.3.60 UE radio capability ID + * 9.9.3.61 UE radio capability ID deletion indication + * 9.9.3.62 WUS assistance information + */ + NULL, /* NONE */ }; |