diff options
Diffstat (limited to 'packet-tftp.c')
-rw-r--r-- | packet-tftp.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packet-tftp.c b/packet-tftp.c index 221ef1ae9e..fd68155888 100644 --- a/packet-tftp.c +++ b/packet-tftp.c @@ -3,7 +3,7 @@ * * Richard Sharpe <rsharpe@ns.aus.com> * - * $Id: packet-tftp.c,v 1.4 1999/07/07 22:51:56 gram Exp $ + * $Id: packet-tftp.c,v 1.5 1999/07/29 05:47:06 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -41,6 +41,8 @@ #include <glib.h> #include "packet.h" +static int proto_tftp = -1; + #define RRQ 1 #define WRQ 2 #define DATA 3 @@ -88,8 +90,7 @@ dissect_tftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_text(tree, offset, END_OF_FRAME, - "Trivial File Transfer Protocol"); + ti = proto_tree_add_item(tree, proto_tftp, offset, END_OF_FRAME, NULL); tftp_tree = proto_item_add_subtree(ti, ETT_TFTP); switch (i1 = pntohs(pd+offset)) { @@ -142,3 +143,15 @@ dissect_tftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) } } + +void +proto_register_tftp(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "tftp.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_tftp = proto_register_protocol("Trivial File Transfer Protocol", "tftp"); + /* proto_register_field_array(proto_tftp, hf, array_length(hf));*/ +} |