diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-03-25 15:30:16 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-10-20 17:55:39 +0200 |
commit | 3c341df6d22ec1a4a2541dce9d172af2ec826000 (patch) | |
tree | 7d472db66a39c81dd7a66150ef1b4a2ca4fc16e1 /epan/dissectors/packet-gsm_a_gm.c | |
parent | 902531bd817b46a80d78ee036f0f447d6f080467 (diff) |
WIP: gm: Decode GSM GM MS RA Capabilities IE with RLCMAC CSN1 decoderpespin/racap-tmp
Tested with a sample pcap file containing an GSM GM packet (Attach
Request) with an MS Radio Access Capabilities IE containing several entries.
TODO:
* Check if by dropping the ad-hoc decoder we lose support/features.
* Drop de_gmm_ms_radio_acc_cap and replace it with
de_gmm_ms_radio_acc_cap_rlcmac(), since there are other users of that
function in other protocol dissectors. Then all benefit from the
change. More than 1k lines of code can be dropped.
* Some general clean up required
Change-Id: I096eafcb5ca31d0ad1fa63561f43853ee4e7a40f
Diffstat (limited to 'epan/dissectors/packet-gsm_a_gm.c')
-rw-r--r-- | epan/dissectors/packet-gsm_a_gm.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c index 5c023b1ad3..9be79c87e4 100644 --- a/epan/dissectors/packet-gsm_a_gm.c +++ b/epan/dissectors/packet-gsm_a_gm.c @@ -91,6 +91,7 @@ #include <epan/expert.h> #include <epan/ipproto.h> #include <epan/etypes.h> +#include "packet-gsm_rlcmac.h" #include "packet-ber.h" #include "packet-gsm_a_common.h" #include "packet-e212.h" @@ -609,6 +610,7 @@ static expert_field ei_gsm_a_gm_missing_mandatory_element = EI_INIT; static dissector_handle_t rrc_irat_ho_info_handle; static dissector_handle_t lte_rrc_ue_eutra_cap_handle; static dissector_handle_t nbifom_handle; +static dissector_handle_t rlcmac_racap_handle; static dissector_table_t gprs_sm_pco_subdissector_table; /* GPRS SM PCO PPP Protocols */ @@ -1664,6 +1666,16 @@ static const value_string gsm_a_gm_ec_pch_mon_support_vals[] = { }; guint16 +de_gmm_ms_radio_acc_cap_rlcmac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) +{ + tvbuff_t *payload_tvb; + payload_tvb = tvb_new_subset_length(tvb, offset, len); + + call_dissector(rlcmac_racap_handle, payload_tvb, pinfo, tree); + return len; +} + +guint16 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { guint32 curr_offset; @@ -6372,7 +6384,7 @@ guint16 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_ de_gmm_imeisv_req, /* IMEISV Request */ de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */ de_gmm_ms_net_cap, /* MS Network Capability */ - de_gmm_ms_radio_acc_cap, /* MS Radio Access Capability */ + de_gmm_ms_radio_acc_cap_rlcmac, /* MS Radio Access Capability */ de_gmm_cause, /* GMM Cause */ de_gmm_rai, /* Routing Area Identification */ de_gmm_rai2, /* Routing Area Identification 2 */ @@ -9681,6 +9693,7 @@ proto_reg_handoff_gsm_a_gm(void) rrc_irat_ho_info_handle = find_dissector_add_dependency("rrc.irat.irat_ho_info", proto_a_gm); lte_rrc_ue_eutra_cap_handle = find_dissector_add_dependency("lte-rrc.ue_eutra_cap", proto_a_gm); nbifom_handle = find_dissector_add_dependency("nbifom", proto_a_gm); + rlcmac_racap_handle = find_dissector_add_dependency("gsm_rlcmac_racap", proto_a_gm); } /* |