diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-04-08 07:07:42 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-04-08 07:07:42 +0000 |
commit | 42107e86146c473a06a11769ef2f5a8bedc1ef88 (patch) | |
tree | 8c2187183a707d04b8678a4cbfddb5577187c015 /packet-srvloc.c | |
parent | 160928a318385aa2fb59af968ab1cd85847ad963 (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.
svn path=/trunk/; revision=1823
Diffstat (limited to 'packet-srvloc.c')
-rw-r--r-- | packet-srvloc.c | 27 |
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); +} + |