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-isakmp.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-isakmp.c')
-rw-r--r-- | packet-isakmp.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packet-isakmp.c b/packet-isakmp.c index 52b46d6da3..177d558200 100644 --- a/packet-isakmp.c +++ b/packet-isakmp.c @@ -2,7 +2,7 @@ * Routines for the Internet Security Association and Key Management Protocol (ISAKMP) * Brad Robel-Forrest <brad.robel-forrest@watchguard.com> * - * $Id: packet-isakmp.c,v 1.12 2000/01/07 22:05:31 guy Exp $ + * $Id: packet-isakmp.c,v 1.13 2000/04/08 07:07:22 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -56,6 +56,8 @@ static gint ett_isakmp = -1; static gint ett_isakmp_flags = -1; static gint ett_isakmp_payload = -1; +#define UDP_PORT_ISAKMP 500 + #define NUM_PROTO_TYPES 5 #define proto2str(t) \ ((t < NUM_PROTO_TYPES) ? prototypestr[t] : "UNKNOWN-PROTO-TYPE") @@ -333,7 +335,8 @@ static struct strfunc { {"Vendor ID", dissect_vid } }; -void dissect_isakmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { +static void +dissect_isakmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { struct isakmp_hdr * hdr = (struct isakmp_hdr *)(pd + offset); guint32 len; @@ -1279,3 +1282,9 @@ proto_register_isakmp(void) /* proto_register_field_array(proto_isakmp, hf, array_length(hf));*/ proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_isakmp(void) +{ + dissector_add("udp.port", UDP_PORT_ISAKMP, dissect_isakmp); +} |