diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2013-10-02 18:04:06 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2013-10-02 18:04:06 +0000 |
commit | 76e8ff1d8dc8d373a21e5c46ea584088c9590a75 (patch) | |
tree | b2140502890b69bdf852793cf592a46dcae18240 /asn1 | |
parent | f7c8ee465e848fe65d6ef6c68ad3b4d289158295 (diff) |
Replace the 3 dissector tables (with a single entry in each) by a direct call to the GSM SMS dissector
svn path=/trunk/; revision=52336
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/gsm_map/gsm_map.cnf | 16 | ||||
-rw-r--r-- | asn1/gsm_map/packet-gsm_map-template.c | 7 |
2 files changed, 10 insertions, 13 deletions
diff --git a/asn1/gsm_map/gsm_map.cnf b/asn1/gsm_map/gsm_map.cnf index 9e03da1e72..0fe659dde8 100644 --- a/asn1/gsm_map/gsm_map.cnf +++ b/asn1/gsm_map/gsm_map.cnf @@ -346,7 +346,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; /* Detailed diagnostic information contains either a SMS-SUBMIT-REPORT or a SMS-DELIVERY-REPORT */ oct = tvb_get_guint8((tvbuff_t*)actx->value_ptr, 0); actx->pinfo->p2p_dir = ((oct & 0x03) == 0) ? P2P_DIR_RECV : P2P_DIR_SENT; - dissector_try_uint(sms_dissector_table, 0, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree); + call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY ForwardSM-Arg @@ -355,7 +355,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; - dissector_try_uint(sms_dissector_table, 0, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree); + call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MO-ForwardSM-Arg @@ -364,7 +364,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; - dissector_try_uint(sms_dissector_table, 0, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree); + call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MO-ForwardSM-Res @@ -373,7 +373,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; - dissector_try_uint(sms_dissector_table, 0, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree); + call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MT-ForwardSM-Arg @@ -382,7 +382,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; - dissector_try_uint(sms_dissector_table, 0, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree); + call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MT-ForwardSM-Res @@ -391,7 +391,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; - dissector_try_uint(sms_dissector_table, 0, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree); + call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MT-ForwardSM-VGCS-Arg @@ -400,7 +400,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; - dissector_try_uint(sms_dissector_table, 0, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree); + call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MT-ForwardSM-VGCS-Res @@ -409,7 +409,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; - dissector_try_uint(sms_dissector_table, 0, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree); + call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY SS-Status VAL_PTR = ¶meter_tvb diff --git a/asn1/gsm_map/packet-gsm_map-template.c b/asn1/gsm_map/packet-gsm_map-template.c index bcc57573ac..d65bb77fde 100644 --- a/asn1/gsm_map/packet-gsm_map-template.c +++ b/asn1/gsm_map/packet-gsm_map-template.c @@ -188,7 +188,7 @@ static expert_field ei_gsm_map_unknown_sequence = EI_INIT; static expert_field ei_gsm_map_unknown_parameter = EI_INIT; static expert_field ei_gsm_map_unknown_invokeData = EI_INIT; -static dissector_table_t sms_dissector_table; /* SMS TPDU */ +static dissector_handle_t gsm_sms_handle; /* SMS TPDU */ static dissector_handle_t data_handle; static dissector_handle_t ranap_handle; static dissector_handle_t dtap_handle; @@ -2208,6 +2208,7 @@ void proto_reg_handoff_gsm_map(void) { data_handle = find_dissector("data"); ranap_handle = find_dissector("ranap"); dtap_handle = find_dissector("gsm_a_dtap"); + gsm_sms_handle = find_dissector("gsm_sms"); map_handle = find_dissector("gsm_map"); oid_add_from_string("itu(0) administration(2) japan(440)","0.2.440" ); @@ -2664,10 +2665,6 @@ void proto_register_gsm_map(void) { expert_gsm_map = expert_register_protocol(proto_gsm_map); expert_register_field_array(expert_gsm_map, ei, array_length(ei)); - sms_dissector_table = register_dissector_table("gsm_map.sms_tpdu", - "GSM SMS TPDU", FT_UINT8, - BASE_DEC); - map_prop_arg_opcode_table = register_dissector_table("gsm_map.prop.arg.opcode", "GSM_MAP Proprietary Arg Opcodes", FT_UINT8, BASE_DEC); map_prop_res_opcode_table = register_dissector_table("gsm_map.prop.res.opcode", "GSM_MAP Proprietary Res Opcodes", FT_UINT8, BASE_DEC); map_prop_err_opcode_table = register_dissector_table("gsm_map.prop.err.opcode", "GSM_MAP Proprietary Err Opcodes", FT_UINT8, BASE_DEC); |