aboutsummaryrefslogtreecommitdiffstats
path: root/packet-nntp.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-04-08 07:07:42 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-04-08 07:07:42 +0000
commita831e8f8f2eefe74564ab3356dd7b5bcfd64c449 (patch)
tree8c2187183a707d04b8678a4cbfddb5577187c015 /packet-nntp.c
parent907093903ca0afdc6a9106415d88fc7565a492a7 (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1823 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-nntp.c')
-rw-r--r--packet-nntp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/packet-nntp.c b/packet-nntp.c
index 9a1ae87906..12db6e789a 100644
--- a/packet-nntp.c
+++ b/packet-nntp.c
@@ -2,7 +2,7 @@
* Routines for nntp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-nntp.c,v 1.7 2000/01/07 22:05:34 guy Exp $
+ * $Id: packet-nntp.c,v 1.8 2000/04/08 07:07:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -47,7 +47,9 @@ static int hf_nntp_request = -1;
static gint ett_nntp = -1;
-void
+#define TCP_PORT_NNTP 119
+
+static void
dissect_nntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
gchar *type;
@@ -141,3 +143,9 @@ proto_register_nntp(void)
proto_register_field_array(proto_nntp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_nntp(void)
+{
+ dissector_add("tcp.port", TCP_PORT_NNTP, dissect_nntp);
+}