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-http.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-http.c')
-rw-r--r-- | packet-http.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packet-http.c b/packet-http.c index 0369af143b..085e6bb8b1 100644 --- a/packet-http.c +++ b/packet-http.c @@ -3,7 +3,7 @@ * * Guy Harris <guy@alum.mit.edu> * - * $Id: packet-http.c,v 1.16 2000/02/23 20:55:33 guy Exp $ + * $Id: packet-http.c,v 1.17 2000/04/08 07:07:17 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -54,6 +54,11 @@ static int hf_http_request = -1; static gint ett_http = -1; +#define TCP_PORT_HTTP 80 +#define TCP_PORT_PROXY_HTTP 3128 +#define TCP_PORT_PROXY_ADMIN_HTTP 3132 +#define TCP_ALT_PORT_HTTP 8080 + static int is_http_request_or_reply(const u_char *data, int linelen, http_type_t *type); void dissect_http(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) @@ -285,3 +290,12 @@ proto_register_http(void) proto_register_field_array(proto_http, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_http(void) +{ + dissector_add("tcp.port", TCP_PORT_HTTP, dissect_http); + dissector_add("tcp.port", TCP_ALT_PORT_HTTP, dissect_http); + dissector_add("tcp.port", TCP_PORT_PROXY_HTTP, dissect_http); + dissector_add("tcp.port", TCP_PORT_PROXY_ADMIN_HTTP, dissect_http); +} |