We don't use anything from <arpa/inet.h>, so we don't need to include
[obnox/wireshark/wip.git] / packet-sccp.c
index 96c8b6d0e902a8367527f27a9138047830e2a86e..239470c0cdf2756c66af046fc9eeda0686c6c5e6 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright 2002, Jeff Morriss <jeff.morriss[AT]ulticom.com>
  *
- * $Id: packet-sccp.c,v 1.3 2002/03/06 17:56:28 gram Exp $
+ * $Id: packet-sccp.c,v 1.6 2002/08/02 23:36:00 jmayer Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #include <stdio.h>
 #include <stdlib.h>
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
 #include <string.h>
 
 #include "epan/packet.h"
@@ -1464,8 +1456,8 @@ dissect_sccp_optional_parameters(tvbuff_t *tvb, packet_info *pinfo,
 
 
 static void
-dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_item *sccp_item,
-                    proto_tree *sccp_tree, proto_tree *tree)
+dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
+                    proto_tree *tree)
 {
   guint8 message_type;
   guint8 variable_pointer1 = 0, variable_pointer2 = 0, variable_pointer3 = 0;
@@ -1838,7 +1830,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_item *sccp_item,
 static void
 dissect_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-  proto_item *sccp_item = NULL;
+  proto_item *sccp_item;
   proto_tree *sccp_tree = NULL;
 
   /* Make entry in the Protocol column on summary display */
@@ -1849,13 +1841,12 @@ dissect_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      necessary to generate protocol tree items. */
   if (tree) {
     /* create the sccp protocol tree */
-    sccp_item = proto_tree_add_item(tree, proto_sccp, tvb, 0,
-                                   tvb_length(tvb), FALSE);
+    sccp_item = proto_tree_add_item(tree, proto_sccp, tvb, 0, -1, FALSE);
     sccp_tree = proto_item_add_subtree(sccp_item, ett_sccp);
   }
 
   /* dissect the message */
-  dissect_sccp_message(tvb, pinfo, sccp_item, sccp_tree, tree);
+  dissect_sccp_message(tvb, pinfo, sccp_tree, tree);
 }
 
 /* Register the protocol with Ethereal */
@@ -2186,7 +2177,8 @@ proto_register_sccp(void)
     &ett_sccp_calling_pc,
     &ett_sccp_calling_gt,
     &ett_sccp_sequencing_segmenting,
-    &ett_sccp_segmentation
+    &ett_sccp_segmentation,
+    &ett_sccp_ansi_isni_routing_control,
   };
 
   /* Register the protocol name and description */
@@ -2213,4 +2205,3 @@ proto_reg_handoff_sccp(void)
 
   data_handle = find_dissector("data");
 }
-