forked from osmocom/wireshark
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
This commit is contained in:
parent
f7c8ee465e
commit
76e8ff1d8d
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -44,7 +44,7 @@ void proto_reg_handoff_card_app_toolkit(void);
|
|||
|
||||
static int proto_cat = -1;
|
||||
|
||||
static dissector_table_t sms_dissector_table; /* SMS TPDU */
|
||||
static dissector_handle_t gsm_sms_handle; /* SMS TPDU */
|
||||
|
||||
static int hf_cat_tlv = -1;
|
||||
|
||||
|
@ -976,7 +976,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
case 0x0b: /* sms tpdu */
|
||||
new_tvb = tvb_new_subset(tvb, pos, len, len);
|
||||
if (new_tvb) {
|
||||
dissector_try_uint(sms_dissector_table, 0, new_tvb, pinfo, elem_tree);
|
||||
call_dissector_only(gsm_sms_handle, new_tvb, pinfo, elem_tree, NULL);
|
||||
}
|
||||
break;
|
||||
case 0x0d: /* text string */
|
||||
|
@ -1673,7 +1673,5 @@ proto_register_card_app_toolkit(void)
|
|||
void
|
||||
proto_reg_handoff_card_app_toolkit(void)
|
||||
{
|
||||
sms_dissector_table =
|
||||
register_dissector_table("etsi_cat.sms_tpdu",
|
||||
"ETSI CAT SMS TPDU", FT_UINT8, BASE_DEC);
|
||||
gsm_sms_handle = find_dissector("gsm_sms");
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ static gint ett_rp_msg = -1;
|
|||
|
||||
static char a_bigbuf[1024];
|
||||
|
||||
static dissector_table_t sms_dissector_table; /* SMS TPDU */
|
||||
static dissector_handle_t gsm_sms_handle; /* SMS TPDU */
|
||||
|
||||
static proto_tree *g_tree;
|
||||
|
||||
|
@ -159,7 +159,7 @@ de_rp_user_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off
|
|||
*/
|
||||
tpdu_tvb = tvb_new_subset(tvb, curr_offset, len, len);
|
||||
|
||||
dissector_try_uint(sms_dissector_table, 0, tpdu_tvb, pinfo, g_tree);
|
||||
call_dissector_only(gsm_sms_handle, tpdu_tvb, pinfo, g_tree, NULL);
|
||||
|
||||
curr_offset += len;
|
||||
|
||||
|
@ -563,10 +563,6 @@ proto_register_gsm_a_rp(void)
|
|||
|
||||
proto_register_field_array(proto_a_rp, hf, array_length(hf));
|
||||
|
||||
sms_dissector_table =
|
||||
register_dissector_table("gsm_a.sms_tpdu", "GSM SMS TPDU",
|
||||
FT_UINT8, BASE_DEC);
|
||||
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
register_dissector("gsm_a_rp", dissect_rp, proto_a_rp);
|
||||
|
@ -580,5 +576,5 @@ proto_reg_handoff_gsm_a_rp(void)
|
|||
gsm_a_rp_handle = create_dissector_handle(dissect_rp, proto_a_rp);
|
||||
/* Dissect messages embedded in SIP */
|
||||
dissector_add_string("media_type","application/vnd.3gpp.sms", gsm_a_rp_handle);
|
||||
|
||||
gsm_sms_handle = find_dissector("gsm_sms");
|
||||
}
|
||||
|
|
|
@ -2384,7 +2384,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;
|
||||
|
@ -5190,7 +5190,7 @@ dissect_gsm_map_er_SM_DeliveryFailureCause(gboolean implicit_tag _U_, tvbuff_t *
|
|||
/* 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);
|
||||
|
||||
|
||||
|
||||
|
@ -6223,7 +6223,7 @@ dissect_gsm_map_sm_MO_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_
|
|||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
@ -6248,7 +6248,7 @@ dissect_gsm_map_sm_MO_ForwardSM_Res(gboolean implicit_tag _U_, tvbuff_t *tvb _U_
|
|||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
@ -6279,7 +6279,7 @@ dissect_gsm_map_sm_MT_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_
|
|||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
@ -6304,7 +6304,7 @@ dissect_gsm_map_sm_MT_ForwardSM_Res(gboolean implicit_tag _U_, tvbuff_t *tvb _U_
|
|||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
@ -6489,7 +6489,7 @@ dissect_gsm_map_sm_MT_ForwardSM_VGCS_Arg(gboolean implicit_tag _U_, tvbuff_t *tv
|
|||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
@ -6543,7 +6543,7 @@ dissect_gsm_map_sm_MT_ForwardSM_VGCS_Res(gboolean implicit_tag _U_, tvbuff_t *tv
|
|||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
@ -17396,7 +17396,7 @@ dissect_gsm_old_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
@ -20056,6 +20056,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" );
|
||||
|
@ -26586,7 +26587,7 @@ void proto_register_gsm_map(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-gsm_map-hfarr.c ---*/
|
||||
#line 2607 "../../asn1/gsm_map/packet-gsm_map-template.c"
|
||||
#line 2608 "../../asn1/gsm_map/packet-gsm_map-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -27230,7 +27231,7 @@ void proto_register_gsm_map(void) {
|
|||
&ett_gsm_map_ericsson_EnhancedCheckIMEI_Arg,
|
||||
|
||||
/*--- End of included file: packet-gsm_map-ettarr.c ---*/
|
||||
#line 2638 "../../asn1/gsm_map/packet-gsm_map-template.c"
|
||||
#line 2639 "../../asn1/gsm_map/packet-gsm_map-template.c"
|
||||
};
|
||||
|
||||
static ei_register_info ei[] = {
|
||||
|
@ -27260,10 +27261,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);
|
||||
|
@ -27332,7 +27329,7 @@ void proto_register_gsm_map(void) {
|
|||
|
||||
|
||||
/*--- End of included file: packet-gsm_map-dis-tab.c ---*/
|
||||
#line 2678 "../../asn1/gsm_map/packet-gsm_map-template.c"
|
||||
#line 2675 "../../asn1/gsm_map/packet-gsm_map-template.c"
|
||||
oid_add_from_string("ericsson-gsm-Map-Ext","1.2.826.0.1249.58.1.0" );
|
||||
oid_add_from_string("accessTypeNotAllowed-id","1.3.12.2.1107.3.66.1.2");
|
||||
/*oid_add_from_string("map-ac networkLocUp(1) version3(3)","0.4.0.0.1.0.1.3" );
|
||||
|
|
|
@ -3782,7 +3782,7 @@ proto_register_gsm_sms(void)
|
|||
"Whether the dissector should reassemble SMS spanning multiple packets",
|
||||
&reassemble_sms);
|
||||
|
||||
/* register_dissector("gsm_sms", dissect_gsm_sms, proto_gsm_sms); */
|
||||
register_dissector("gsm_sms", dissect_gsm_sms, proto_gsm_sms);
|
||||
|
||||
/* GSM SMS UD dissector initialization routines */
|
||||
register_init_routine (gsm_sms_defragment_init);
|
||||
|
@ -3792,11 +3792,4 @@ proto_register_gsm_sms(void)
|
|||
void
|
||||
proto_reg_handoff_gsm_sms(void)
|
||||
{
|
||||
dissector_handle_t gsm_sms_handle;
|
||||
|
||||
gsm_sms_handle = create_dissector_handle(dissect_gsm_sms, proto_gsm_sms);
|
||||
|
||||
dissector_add_uint("gsm_a.sms_tpdu", 0, gsm_sms_handle);
|
||||
dissector_add_uint("gsm_map.sms_tpdu", 0, gsm_sms_handle);
|
||||
dissector_add_uint("etsi_cat.sms_tpdu", 0, gsm_sms_handle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue