aboutsummaryrefslogtreecommitdiffstats
path: root/packet-srvloc.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-04-08 07:07:42 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-04-08 07:07:42 +0000
commita831e8f8f2eefe74564ab3356dd7b5bcfd64c449 (patch)
tree8c2187183a707d04b8678a4cbfddb5577187c015 /packet-srvloc.c
parent907093903ca0afdc6a9106415d88fc7565a492a7 (diff)
Move calls to "dissector_add()" out of the register routines for TCP and
UDP and into the handoff registration routines for the protocols in question. Make the dissectors for those protocols static if they're not called outside the dissector's source file. Get rid of header files if all they did was declare dissectors that are now static; remove declarations of now-static dissectors from header files that do more than just declare the dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1823 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-srvloc.c')
-rw-r--r--packet-srvloc.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/packet-srvloc.c b/packet-srvloc.c
index a88bdb3a18..dea077c72e 100644
--- a/packet-srvloc.c
+++ b/packet-srvloc.c
@@ -6,7 +6,7 @@
* In particular I have not had an opportunity to see how it
* responds to SRVLOC over TCP.
*
- * $Id: packet-srvloc.c,v 1.6 2000/01/22 02:00:24 guy Exp $
+ * $Id: packet-srvloc.c,v 1.7 2000/04/08 07:07:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -59,14 +59,17 @@
#include "packet.h"
#include "packet-ipv6.h"
-int proto_srvloc = -1;
-int hf_srvloc_version = -1;
-int hf_srvloc_function = -1;
-int hf_srvloc_flags = -1;
-int hf_srvloc_error = -1;
+static int proto_srvloc = -1;
+static int hf_srvloc_version = -1;
+static int hf_srvloc_function = -1;
+static int hf_srvloc_flags = -1;
+static int hf_srvloc_error = -1;
static gint ett_srvloc = -1;
-gint ett_srvloc_flags = -1;
+static gint ett_srvloc_flags = -1;
+
+#define TCP_PORT_SRVLOC 427
+#define UDP_PORT_SRVLOC 427
/* Define function types */
@@ -173,7 +176,7 @@ dissect_authblk(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
/* Packet dissection routine called by tcp & udp when port 427 detected */
-void
+static void
dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_item *ti, *tf;
@@ -430,3 +433,11 @@ proto_register_srvloc(void)
proto_register_field_array(proto_srvloc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
};
+
+void
+proto_reg_handoff_srvloc(void)
+{
+ dissector_add("tcp.port", TCP_PORT_SRVLOC, dissect_srvloc);
+ dissector_add("udp.port", UDP_PORT_SRVLOC, dissect_srvloc);
+}
+