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-l2tp.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-l2tp.c')
-rw-r--r-- | packet-l2tp.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/packet-l2tp.c b/packet-l2tp.c index 0969ec003c..2bf2f5636a 100644 --- a/packet-l2tp.c +++ b/packet-l2tp.c @@ -7,7 +7,7 @@ * Laurent Cazalet <laurent.cazalet@mailclub.net> * Thomas Parvais <thomas.parvais@advalvas.be> * - * $Id: packet-l2tp.c,v 1.7 2000/04/05 15:57:04 gram Exp $ + * $Id: packet-l2tp.c,v 1.8 2000/04/08 07:07:24 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -55,7 +55,7 @@ static int hf_l2tp_id =-1; #include "packet.h" #include "resolv.h" - +#define UDP_PORT_L2TP 1701 #define CONTROL_BIT(msg_info) (msg_info & 0x8000) /* Type bit control = 1 data = 0 */ #define LENGTH_BIT(msg_info) (msg_info & 0x4000) /* Length bit = 1 */ @@ -234,7 +234,9 @@ static const char *avptypestr[NUM_AVP_TYPES] = { static gchar textbuffer[200]; -void dissect_l2tp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) + +static void +dissect_l2tp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { proto_tree *l2tp_tree, *l2tp_avp_tree; proto_item *ti, *tf; @@ -695,3 +697,9 @@ proto_register_l2tp(void) proto_register_field_array(proto_l2tp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_l2tp(void) +{ + dissector_add("udp.port", UDP_PORT_L2TP, dissect_l2tp); +} |