As there are more Procedure codes the hueristics need to be updated.
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 25 Oct 2005 20:29:50 +0000 (20:29 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 25 Oct 2005 20:29:50 +0000 (20:29 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16315 f5534014-38df-0310-8fa8-9805f1628bb7

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

index b52b12963fc2780438c5d36a0cf5358ca003f798..461300206002bed64c9aad111e11a3aaf2cc0dec 100644 (file)
@@ -52,7 +52,8 @@
                offset=(offset&0xfffffff8)+8;   \
        }
 
-
+/* Higest Ranap_ProcedureCode_value, use in heuristics */
+#define RANAP_MAX_PC  42
 
 /* Initialize the protocol and registered fields */
 int proto_ranap = -1;
@@ -1095,7 +1096,7 @@ dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     if (tvb_length(tvb) < 4) { return FALSE; }
     if (tvb_get_guint8(tvb, LENGTH_OFFSET) != (tvb_length(tvb) - 4)) { return FALSE; }
     temp = tvb_get_guint8(tvb, MSG_TYPE_OFFSET);
-    if (temp > 28) { return FALSE; }
+    if (temp > RANAP_MAX_PC) { return FALSE; }
 
     dissect_ranap(tvb, pinfo, tree);
 
index 470c1cbf7e654806b1c403830c943446844680ad..73760bc47e2d616dea128b938833c0b7351abbec 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* ./packet-ranap.c                                                           */
+/* .\packet-ranap.c                                                           */
 /* ../../tools/asn2eth.py -X -e -p ranap -c ranap.cnf -s packet-ranap-template ranap.asn */
 
 /* Input file: packet-ranap-template.c */
@@ -59,7 +59,8 @@
                offset=(offset&0xfffffff8)+8;   \
        }
 
-
+/* Higest Ranap_ProcedureCode_value, use in heuristics */
+#define RANAP_MAX_PC  42
 
 /* Initialize the protocol and registered fields */
 int proto_ranap = -1;
@@ -10732,7 +10733,7 @@ dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     if (tvb_length(tvb) < 4) { return FALSE; }
     if (tvb_get_guint8(tvb, LENGTH_OFFSET) != (tvb_length(tvb) - 4)) { return FALSE; }
     temp = tvb_get_guint8(tvb, MSG_TYPE_OFFSET);
-    if (temp > 28) { return FALSE; }
+    if (temp > RANAP_MAX_PC) { return FALSE; }
 
     dissect_ranap(tvb, pinfo, tree);