diff options
-rw-r--r-- | asn1/ansi_map/ansi_map.cnf | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ansi_a.c | 76 | ||||
-rw-r--r-- | epan/dissectors/packet-ansi_map.c | 4 |
3 files changed, 38 insertions, 44 deletions
diff --git a/asn1/ansi_map/ansi_map.cnf b/asn1/ansi_map/ansi_map.cnf index 2772b9f1a6..3a1477b4ee 100644 --- a/asn1/ansi_map/ansi_map.cnf +++ b/asn1/ansi_map/ansi_map.cnf @@ -449,6 +449,8 @@ #.TYPE_ATTR # Dont't put the bytes after the name in the display +CDMA2000HandoffInvokeIOSData TYPE = FT_NONE DISPLAY = BASE_DEC STRINGS = NULL +CDMA2000HandoffResponseIOSData TYPE = FT_NONE DISPLAY = BASE_DEC STRINGS = NULL InterMSCCircuitID TYPE = FT_NONE DISPLAY = BASE_DEC STRINGS = NULL MobileIdentificationNumber TYPE = FT_NONE DISPLAY = BASE_DEC STRINGS = NULL MobileStationMIN TYPE = FT_NONE DISPLAY = BASE_DEC STRINGS = NULL diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c index fbfd4b399c..0967d37d68 100644 --- a/epan/dissectors/packet-ansi_a.c +++ b/epan/dissectors/packet-ansi_a.c @@ -658,6 +658,7 @@ static int proto_a_dtap = -1; const ext_value_string_t *ansi_a_bsmap_strings = NULL; const ext_value_string_t *ansi_a_dtap_strings = NULL; const ext_value_string_t *ansi_a_elem_1_strings = NULL; +static int ansi_a_elem_1_max = 0; static int ansi_a_tap = -1; @@ -11570,55 +11571,44 @@ dissect_cdma2000_a1_elements(tvbuff_t *tvb, _U_ packet_info *pinfo, proto_tree * guint32 curr_offset; guint32 consumed; guint curr_len; + gint idx; + guint8 oct; curr_offset = offset; curr_len = len; - /* 0x22 IS-95 Channel Identity */ - ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, ""); - /* 0x09 IS-2000 Channel Identity */ - ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, ""); - /* 0x0f IS-2000 Non-Negotiable Service */ - ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, ""); - /* 0x62 IS-95/IS-2000 Cause Value */ - ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE, ""); - /* 0x10 Extended Handoff Direction Parameters */ - ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS, ""); - /* 0x16 Hard Handoff Parameters */ - ELEM_OPT_TLV(ANSI_A_E_HHO_PARAMS, ""); - /* 0x11 IS-2000 Mobile Capabilities */ - ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, ""); - /* 0x0e IS-2000 Service Configuration Record */ - ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, ""); - - /* 0x14 PDSN IP Address */ - switch (global_a_variant) + /* + * require at least 2 octets for T(ype) and L(ength) + */ + while (curr_len > 1) { - case A_VARIANT_IOS401: - ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR, ""); - break; - case A_VARIANT_IOS501: - ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR, ""); - break; + /* + * peeking at T(ype) + */ + oct = tvb_get_guint8(tvb, curr_offset); + + for (idx=0; idx < ansi_a_elem_1_max; idx++) + { + if (oct == (guint8) ansi_a_elem_1_strings[idx].value) + { + ELEM_OPT_TLV(idx, ""); + break; + } + } + + if (idx == ansi_a_elem_1_max) + { + /* + * didn't recognize the T(ype) + * assuming it is in TLV form, step over + */ + consumed = 2 + tvb_get_guint8(tvb, curr_offset + 1); + curr_offset += consumed; + curr_len -= consumed; + } } - /* 0x18 Protocol Type */ - ELEM_OPT_TLV(ANSI_A_E_PTYPE, ""); - ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, ""); - /* 0x2a Service Option List */ - ELEM_OPT_TLV(ANSI_A_E_SO_LIST, ""); - /* Source RNC to Target RNC Transparent Container */ - ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC, ""); - /* 0x3a Target RNC to source RNC Transparent Container */ - ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC, ""); - /* Slot Cycle Index */ - ELEM_OPT_TLV(ANSI_A_E_SCI, ""); /* XXX TV used elswhere?? */ - ELEM_OPT_TLV(ANSI_A_E_ACC_NET_ID, "");/* XXX TV used elswhere?? */ - ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, ""); - /* 0x2a Service Option List ( XX in Response this is mentioned last - * need to repeat it here? - */ - ELEM_OPT_TLV(ANSI_A_E_SO_LIST, ""); + EXTRANEOUS_DATA_CHECK(curr_len, 0); } /* GENERIC DISSECTOR FUNCTIONS */ @@ -12224,12 +12214,14 @@ proto_reg_handoff_ansi_a(void) ansi_a_bsmap_strings = ansi_a_ios501_bsmap_strings; ansi_a_dtap_strings = ansi_a_ios501_dtap_strings; ansi_a_elem_1_strings = ansi_a_ios501_elem_1_strings; + ansi_a_elem_1_max = MAX_IOS501_NUM_ELEM_1; break; default: ansi_a_bsmap_strings = ansi_a_ios401_bsmap_strings; ansi_a_dtap_strings = ansi_a_ios401_dtap_strings; ansi_a_elem_1_strings = ansi_a_ios401_elem_1_strings; + ansi_a_elem_1_max = MAX_IOS401_NUM_ELEM_1; break; } } diff --git a/epan/dissectors/packet-ansi_map.c b/epan/dissectors/packet-ansi_map.c index ef6d345a96..a9366fec34 100644 --- a/epan/dissectors/packet-ansi_map.c +++ b/epan/dissectors/packet-ansi_map.c @@ -17045,7 +17045,7 @@ void proto_register_ansi_map(void) { "ansi_map.AlertCode", HFILL }}, { &hf_ansi_map_cdma2000HandoffInvokeIOSData, { "cdma2000HandoffInvokeIOSData", "ansi_map.cdma2000HandoffInvokeIOSData", - FT_BYTES, BASE_HEX, NULL, 0, + FT_NONE, BASE_DEC, NULL, 0, "ansi_map.CDMA2000HandoffInvokeIOSData", HFILL }}, { &hf_ansi_map_cdmaBandClassList, { "cdmaBandClassList", "ansi_map.cdmaBandClassList", @@ -17165,7 +17165,7 @@ void proto_register_ansi_map(void) { "ansi_map.BSMCStatus", HFILL }}, { &hf_ansi_map_cdma2000HandoffResponseIOSData, { "cdma2000HandoffResponseIOSData", "ansi_map.cdma2000HandoffResponseIOSData", - FT_BYTES, BASE_HEX, NULL, 0, + FT_NONE, BASE_DEC, NULL, 0, "ansi_map.CDMA2000HandoffResponseIOSData", HFILL }}, { &hf_ansi_map_cdmaCodeChannelList, { "cdmaCodeChannelList", "ansi_map.cdmaCodeChannelList", |