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-sap.c | |
parent | 160928a318385aa2fb59af968ab1cd85847ad963 (diff) | |
download | wireshark-42107e86146c473a06a11769ef2f5a8bedc1ef88.tar.gz |
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-sap.c')
-rw-r--r-- | packet-sap.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packet-sap.c b/packet-sap.c index 76788a3952..adfd4c163f 100644 --- a/packet-sap.c +++ b/packet-sap.c @@ -4,7 +4,7 @@ * * Heikki Vatiainen <hessu@cs.tut.fi> * - * $Id: packet-sap.c,v 1.5 2000/02/15 21:03:07 gram Exp $ + * $Id: packet-sap.c,v 1.6 2000/04/08 07:07:35 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -45,6 +45,8 @@ #include "packet-ipv6.h" #include "packet-sdp.h" +#define UDP_PORT_SAP 9875 + #define MCAST_SAP_VERSION_MASK 0xE0 /* 3 bits for SAP version*/ #define MCAST_SAP_VERSION_SHIFT 5 /* Right shift 5 bits to get the version */ #define MCAST_SAP_VER0 0 /* Version 0 */ @@ -124,7 +126,8 @@ static gint ett_sap_flags = -1; static gint ett_sap_auth = -1; static gint ett_sap_authf = -1; -void dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) +static void +dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { int sap_version, is_ipv6, is_del, is_enc, is_comp, addr_len; guint8 auth_len; @@ -316,3 +319,9 @@ void proto_register_sap(void) proto_register_field_array(proto_sap, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_sap(void) +{ + dissector_add("udp.port", UDP_PORT_SAP, dissect_sap); +} |