diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-07-29 05:47:07 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-07-29 05:47:07 +0000 |
commit | 58d1dbf1eaaf8b1b10b6f8280b77c43e63bc22b2 (patch) | |
tree | 3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-nntp.c | |
parent | 2c76c5f80357503a8290e43f9bae69dc026ac54b (diff) |
Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also
added packet-clip.c to the Nmake makefile.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@402 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-nntp.c')
-rw-r--r-- | packet-nntp.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packet-nntp.c b/packet-nntp.c index d4fd4900aa..01dd9da4d5 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.2 1999/07/07 22:51:49 gram Exp $ + * $Id: packet-nntp.c,v 1.3 1999/07/29 05:47:00 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -43,6 +43,8 @@ extern packet_info pi; +static int proto_nntp = -1; + void dissect_nntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int max_data) { @@ -77,8 +79,7 @@ dissect_nntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int if (tree) { - ti = proto_tree_add_text(tree, offset, END_OF_FRAME, - "Network News Transfer Protocol"); + ti = proto_tree_add_item(tree, proto_nntp, offset, END_OF_FRAME, NULL); nntp_tree = proto_item_add_subtree(ti, ETT_NNTP); /* @@ -106,3 +107,15 @@ dissect_nntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int } } } + +void +proto_register_nntp(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "nntp.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_nntp = proto_register_protocol("Network News Transfer Protocol", "nntp"); + /* proto_register_field_array(proto_nntp, hf, array_length(hf));*/ +} |