Get rid of duplicted dissector tables for MTP3 Service indicator and SCCP ssn:s

svn path=/trunk/; revision=16815
This commit is contained in:
Anders Broman 2005-12-16 07:05:50 +00:00
parent 483ec5bd05
commit 8d05164bec
11 changed files with 13 additions and 20 deletions

View File

@ -37,5 +37,5 @@ fix_eol: generate_dissector
del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
copy_files: generate_dissector fix_eol
xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d
xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d
xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y

View File

@ -1635,7 +1635,6 @@ void proto_reg_handoff_h248(void) {
h248_handle = find_dissector("h248");
h248_term_handle = find_dissector("h248term");
dissector_add("m3ua.protocol_data_si", GATEWAY_CONTROL_PROTOCOL_USER_ID, h248_handle);
dissector_add("mtp3.service_indicator", GATEWAY_CONTROL_PROTOCOL_USER_ID, h248_handle);
dissector_add("sctp.ppi", H248_PAYLOAD_PROTOCOL_ID, h248_handle);
}

View File

@ -229,7 +229,6 @@ static void range_delete_callback(guint32 ssn)
{
if (ssn) {
dissector_delete("sccp.ssn", ssn, tcap_handle);
dissector_delete("sua.ssn", ssn, tcap_handle);
}
}
@ -237,7 +236,6 @@ static void range_add_callback(guint32 ssn)
{
if (ssn) {
dissector_add("sccp.ssn", ssn, tcap_handle);
dissector_add("sua.ssn", ssn, tcap_handle);
}
}

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-h248.c */
/* .\packet-h248.c */
/* ../../tools/asn2eth.py -X -b -e -p h248 -c h248.cnf -s packet-h248-template MEGACO.asn */
/* Input file: packet-h248-template.c */
@ -6828,7 +6828,6 @@ void proto_reg_handoff_h248(void) {
h248_handle = find_dissector("h248");
h248_term_handle = find_dissector("h248term");
dissector_add("m3ua.protocol_data_si", GATEWAY_CONTROL_PROTOCOL_USER_ID, h248_handle);
dissector_add("mtp3.service_indicator", GATEWAY_CONTROL_PROTOCOL_USER_ID, h248_handle);
dissector_add("sctp.ppi", H248_PAYLOAD_PROTOCOL_ID, h248_handle);
}

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-h248.h */
/* .\packet-h248.h */
/* ../../tools/asn2eth.py -X -b -e -p h248 -c h248.cnf -s packet-h248-template MEGACO.asn */
/* Input file: packet-h248-template.h */

View File

@ -6828,7 +6828,6 @@ proto_reg_handoff_isup(void)
isup_handle = create_dissector_handle(dissect_isup, proto_isup);
application_isup_handle = create_dissector_handle(dissect_application_isup, proto_isup);
dissector_add("mtp3.service_indicator", MTP3_ISUP_SERVICE_INDICATOR, isup_handle);
dissector_add("m3ua.protocol_data_si", MTP3_ISUP_SERVICE_INDICATOR, isup_handle);
dissector_add_string("media_type","application/isup", application_isup_handle);
dissector_add_string("tali.opcode", "isot", isup_handle);
@ -6868,6 +6867,5 @@ proto_reg_handoff_bicc(void)
bicc_handle = create_dissector_handle(dissect_bicc, proto_bicc);
dissector_add("mtp3.service_indicator", MTP3_BICC_SERVICE_INDICATOR, bicc_handle);
dissector_add("m3ua.protocol_data_si", MTP3_BICC_SERVICE_INDICATOR, bicc_handle);
dissector_add("sctp.ppi", BICC_PAYLOAD_PROTOCOL_ID, bicc_handle);
}

View File

@ -2007,7 +2007,6 @@ proto_register_m3ua(void)
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_m3ua, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
si_dissector_table = register_dissector_table("m3ua.protocol_data_si", "MTP3 Service indicator", FT_UINT8, BASE_HEX);
}
@ -2024,4 +2023,6 @@ proto_reg_handoff_m3ua(void)
m3ua_handle = create_dissector_handle(dissect_m3ua, proto_m3ua);
dissector_add("sctp.ppi", M3UA_PAYLOAD_PROTOCOL_ID, m3ua_handle);
dissector_add("sctp.port", SCTP_PORT_M3UA, m3ua_handle);
si_dissector_table = find_dissector_table("mtp3.service_indicator");
}

View File

@ -2533,7 +2533,6 @@ proto_reg_handoff_sccp(void)
sccp_handle = find_dissector("sccp");
dissector_add("mtp3.service_indicator", SCCP_SI, sccp_handle);
dissector_add("m3ua.protocol_data_si", SCCP_SI, sccp_handle);
dissector_add_string("tali.opcode", "sccp", sccp_handle);
data_handle = find_dissector("data");

View File

@ -328,7 +328,7 @@ static gint ett_sua_return_on_error_bit_and_protocol_class = -1;
static gint ett_sua_protcol_classes = -1;
static dissector_handle_t data_handle;
static dissector_table_t sua_ssn_dissector_table;
static dissector_table_t sccp_ssn_dissector_table;
/* stuff for supporting multiple versions */
typedef enum {
@ -1825,9 +1825,9 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
{
/* Try subdissectors (if we found a valid SSN on the current message) */
if ((dest_ssn == INVALID_SSN ||
!dissector_try_port(sua_ssn_dissector_table, dest_ssn, data_tvb, pinfo, tree))
!dissector_try_port(sccp_ssn_dissector_table, dest_ssn, data_tvb, pinfo, tree))
&& (source_ssn == INVALID_SSN ||
!dissector_try_port(sua_ssn_dissector_table, source_ssn, data_tvb, pinfo, tree)))
!dissector_try_port(sccp_ssn_dissector_table, source_ssn, data_tvb, pinfo, tree)))
{
/* No sub-dissection occured, treat it as raw data */
call_dissector(data_handle, data_tvb, pinfo, sua_tree);
@ -2010,7 +2010,6 @@ proto_register_sua(void)
prefs_register_obsolete_preference(sua_module, "sua_version");
prefs_register_enum_preference(sua_module, "version", "SUA Version", "Version used by Ethereal", &version, options, FALSE);
sua_ssn_dissector_table = register_dissector_table("sua.ssn", "SUA SSN", FT_UINT8, BASE_DEC);
}
void
@ -2023,4 +2022,6 @@ proto_reg_handoff_sua(void)
dissector_add("sctp.port", SCTP_PORT_SUA, sua_handle);
data_handle = find_dissector("data");
sccp_ssn_dissector_table = find_dissector_table("sccp.ssn");
}

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-tcap.c */
/* .\packet-tcap.c */
/* ../../tools/asn2eth.py -X -b -e -p tcap -c tcap.cnf -s packet-tcap-template tcap.asn */
/* Input file: packet-tcap-template.c */
@ -2957,7 +2957,6 @@ static void range_delete_callback(guint32 ssn)
{
if (ssn) {
dissector_delete("sccp.ssn", ssn, tcap_handle);
dissector_delete("sua.ssn", ssn, tcap_handle);
}
}
@ -2965,7 +2964,6 @@ static void range_add_callback(guint32 ssn)
{
if (ssn) {
dissector_add("sccp.ssn", ssn, tcap_handle);
dissector_add("sua.ssn", ssn, tcap_handle);
}
}

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-tcap.h */
/* .\packet-tcap.h */
/* ../../tools/asn2eth.py -X -b -e -p tcap -c tcap.cnf -s packet-tcap-template tcap.asn */
/* Input file: packet-tcap-template.h */