warning: ISO C does not allow extra ; outside of a function
[obnox/wireshark/wip.git] / packet-iua.c
index 926ddc19b95da91213ba0ab6b31072cd83926c6e..36c7689974e864194257c344ed055dfdb3c71909 100644 (file)
@@ -6,9 +6,9 @@
  *   http://www.ietf.org/internet-drafts/draft-ietf-sigtran-iua-imp-guide-01.txt
  * To do: - provide better handling of length parameters
  *
- * Copyright 2002, Michael Tuexen <Michael.Tuexen[AT]siemens.com>
+ * Copyright 2002, Michael Tuexen <tuexen [AT] fh-muenster.de>
  *
- * $Id: packet-iua.c,v 1.18 2002/12/02 20:04:44 guy Exp $
+ * $Id: packet-iua.c,v 1.22 2003/12/21 05:51:33 jmayer Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -37,6 +37,7 @@
 
 #include <epan/packet.h>
 #include "prefs.h"
+#include "sctpppids.h"
 
 #define NETWORK_BYTE_ORDER          FALSE
 
@@ -787,10 +788,8 @@ dissect_common_header(tvbuff_t *common_header_tvb, packet_info *pinfo, proto_tre
   message_class  = tvb_get_guint8(common_header_tvb, MESSAGE_CLASS_OFFSET);
   message_type   = tvb_get_guint8(common_header_tvb, MESSAGE_TYPE_OFFSET);
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-    col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_class * 256 + message_type, support_IG?message_class_type_acro_ig_values:message_class_type_acro_values, "UNKNOWN"));
-    col_append_str(pinfo->cinfo, COL_INFO, " ");
-  };
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_class * 256 + message_type, support_IG?message_class_type_acro_ig_values:message_class_type_acro_values, "UNKNOWN"));
 
   if (iua_tree) {
     /* add the components of the common header to the protocol tree */
@@ -893,10 +892,9 @@ proto_register_iua(void)
   proto_register_field_array(proto_iua, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
   prefs_register_bool_preference(iua_module, "support_ig", "Support Implementers Guide", "Support Implementers Guide (version 01)", &support_IG);
-};
+}
 
 #define SCTP_PORT_IUA          9900
-#define IUA_PAYLOAD_PROTO_ID   1
 
 void
 proto_reg_handoff_iua(void)
@@ -906,6 +904,6 @@ proto_reg_handoff_iua(void)
   iua_handle  = create_dissector_handle(dissect_iua, proto_iua);
   q931_handle = find_dissector("q931");
 
-  dissector_add("sctp.port", SCTP_PORT_IUA,        iua_handle);
-  dissector_add("sctp.ppi",  IUA_PAYLOAD_PROTO_ID, iua_handle);
+  dissector_add("sctp.port", SCTP_PORT_IUA,           iua_handle);
+  dissector_add("sctp.ppi",  IUA_PAYLOAD_PROTOCOL_ID, iua_handle);
 }