*
* Copyright 2002, Jeff Morriss <jeff.morriss[AT]ulticom.com>
*
- * $Id: packet-sccp.c,v 1.12 2003/09/04 14:30:18 tuexen Exp $
+ * $Id: packet-sccp.c,v 1.16 2003/11/06 09:28:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
{ 0x0c, "Reserved for international use (ITU only)" },
{ 0x0d, "Broadband ISDN edge-to-edge applications (ITU only)" },
{ 0x0e, "TC test responder (ITU only)" },
+ { 0x8e, "RANAP" },
+ { 0xfc, "IOS" },
+ { 0xfe, "BSSAP/BSAP" },
{ 0, NULL } };
static dissector_handle_t data_handle;
static dissector_table_t sccp_ssn_dissector_table;
+static heur_dissector_list_t heur_subdissector_list;
+
static void
dissect_sccp_unknown_message(tvbuff_t *message_tvb, proto_tree *sccp_tree)
{
tree)))
return;
+ /* try heuristic subdissector list to see if there are any takers */
+ if (dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, tree))
+ {
+ return;
+ }
+
/* No sub-dissection occured, treat it as raw data */
call_dissector(data_handle, tvb, pinfo, tree);
}
proto_tree *sccp_tree = NULL;
/* Make entry in the Protocol column on summary display */
- switch(mtp3_standard) {
- case ITU_STANDARD:
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "SCCP (Int. ITU)");
- break;
- case ANSI_STANDARD:
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "SCCP (ANSI)");
- break;
- case CHINESE_ITU_STANDARD:
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "SCCP (Chin. ITU)");
- break;
- };
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ switch(mtp3_standard) {
+ case ITU_STANDARD:
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SCCP (Int. ITU)");
+ break;
+ case ANSI_STANDARD:
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SCCP (ANSI)");
+ break;
+ case CHINESE_ITU_STANDARD:
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SCCP (Chin. ITU)");
+ break;
+ };
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
proto_sccp = proto_register_protocol("Signalling Connection Control Part",
"SCCP", "sccp");
+ register_dissector("sccp", dissect_sccp, proto_sccp);
+
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sccp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
sccp_ssn_dissector_table = register_dissector_table("sccp.ssn", "SCCP SSN", FT_UINT8, BASE_DEC);
+ register_heur_dissector_list("sccp", &heur_subdissector_list);
}
void
{
dissector_handle_t sccp_handle;
- sccp_handle = create_dissector_handle(dissect_sccp, proto_sccp);
+ sccp_handle = find_dissector("sccp");
dissector_add("mtp3.service_indicator", SCCP_SI, sccp_handle);
dissector_add("m3ua.protocol_data_si", SCCP_SI, sccp_handle);