Add a heuristic table to SUA (SUA and SCCP should share the same table) to heuristically
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 29 Jun 2006 20:39:53 +0000 (20:39 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 29 Jun 2006 20:39:53 +0000 (20:39 +0000)
dissect RANAP ower SUA.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18616 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/ranap/packet-ranap-template.c
epan/dissectors/packet-ranap.c
epan/dissectors/packet-sua.c

index f8eb34ad15347c9e8f8e13b1610a9c6ba7a3301d..6cef14974aa207c28d110af31ed4e362016c1b09 100644 (file)
@@ -1129,6 +1129,7 @@ void proto_reg_handoff_ranap(void) {
        * is or isn't enabled
        */
        heur_dissector_add("sccp", dissect_sccp_ranap_heur, proto_ranap); 
+       heur_dissector_add("sua", dissect_sccp_ranap_heur, proto_ranap); 
 
 
 }
index b00ad0b681b212c677aaffffe919f61cb3f0ae92..b983f7dd519bbdf94ed5f9825f035eb03450b472 100644 (file)
@@ -10803,6 +10803,7 @@ void proto_reg_handoff_ranap(void) {
        * is or isn't enabled
        */
        heur_dissector_add("sccp", dissect_sccp_ranap_heur, proto_ranap); 
+       heur_dissector_add("sua", dissect_sccp_ranap_heur, proto_ranap); 
 
 
 }
@@ -12888,7 +12889,7 @@ void proto_register_ranap(void) {
         "PrivateIE-Field/value", HFILL }},
 
 /*--- End of included file: packet-ranap-hfarr.c ---*/
-#line 1149 "packet-ranap-template.c"
+#line 1150 "packet-ranap-template.c"
   };
 
   /* List of subtrees */
@@ -13157,7 +13158,7 @@ void proto_register_ranap(void) {
     &ett_ranap_PrivateIE_Field,
 
 /*--- End of included file: packet-ranap-ettarr.c ---*/
-#line 1156 "packet-ranap-template.c"
+#line 1157 "packet-ranap-template.c"
   };
 
   /* Register protocol */
index 8341631372ef2d8b4a9ea2372407a3ffbe559243..3ab61d851e40bc666769487458f926e9ba8c5a7e 100644 (file)
@@ -329,6 +329,7 @@ static gint ett_sua_protcol_classes = -1;
 
 static dissector_handle_t data_handle;
 static dissector_table_t sccp_ssn_dissector_table;
+static heur_dissector_list_t heur_subdissector_list;
 
 /* stuff for supporting multiple versions */
 typedef enum {
@@ -1829,6 +1830,10 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
        && (source_ssn == INVALID_SSN ||
        !dissector_try_port(sccp_ssn_dissector_table, source_ssn, data_tvb, pinfo, tree)))
     {
+               /* try heuristic subdissector list to see if there are any takers */
+               if (dissector_try_heuristic(heur_subdissector_list, data_tvb, pinfo, tree)) {
+                       return;
+               }
       /* No sub-dissection occured, treat it as raw data */
       call_dissector(data_handle, data_tvb, pinfo, sua_tree);
     }
@@ -2010,6 +2015,8 @@ proto_register_sua(void)
   prefs_register_obsolete_preference(sua_module, "sua_version");
   prefs_register_enum_preference(sua_module, "version", "SUA Version", "Version used by Wireshark", &version, options, FALSE);
 
+  register_heur_dissector_list("sua", &heur_subdissector_list);
+
 }
 
 void