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-bgp.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-bgp.c')
-rw-r--r-- | packet-bgp.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packet-bgp.c b/packet-bgp.c index f394ca81ec..d99c32589d 100644 --- a/packet-bgp.c +++ b/packet-bgp.c @@ -2,7 +2,7 @@ * Routines for BGP packet dissection. * Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org> * - * $Id + * $Id: packet-bgp.c,v 1.21 2000/04/08 07:07:08 guy Exp $ * * Supports: * RFC1771 A Border Gateway Protocol 4 (BGP-4) @@ -68,6 +68,8 @@ #include <arpa/inet.h> #endif +#define TCP_PORT_BGP 179 + static const value_string bgptypevals[] = { { BGP_OPEN, "OPEN Message" }, { BGP_UPDATE, "UPDATE Message" }, @@ -1091,7 +1093,7 @@ dissect_bgp_notification(const u_char *pd, int offset, frame_data *fd, /* * Dissect a BGP packet. */ -void +static void dissect_bgp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { proto_item *ti; /* tree item */ @@ -1266,3 +1268,9 @@ proto_register_bgp(void) proto_bgp = proto_register_protocol("Border Gateway Protocol", "bgp"); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_bgp(void) +{ + dissector_add("tcp.port", TCP_PORT_BGP, dissect_bgp); +} |