aboutsummaryrefslogtreecommitdiffstats
path: root/packet-telnet.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-07-29 05:47:07 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-07-29 05:47:07 +0000
commit7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3 (patch)
tree3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-telnet.c
parent6f1d3a3be830da628246f7cea77fe9c491470d17 (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. svn path=/trunk/; revision=402
Diffstat (limited to 'packet-telnet.c')
-rw-r--r--packet-telnet.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/packet-telnet.c b/packet-telnet.c
index 0f8d120496..b1bbbdf10f 100644
--- a/packet-telnet.c
+++ b/packet-telnet.c
@@ -2,7 +2,7 @@
* Routines for telnet packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-telnet.c,v 1.3 1999/07/07 22:51:55 gram Exp $
+ * $Id: packet-telnet.c,v 1.4 1999/07/29 05:47:05 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -44,6 +44,8 @@
#include "packet.h"
#include "etypes.h"
+static int proto_telnet = -1;
+
/* Some defines for Telnet */
#define TN_IAC 255
@@ -331,8 +333,7 @@ dissect_telnet(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, i
memcpy(rr, pd + offset, max_data);
- ti = proto_tree_add_text(tree, offset, END_OF_FRAME,
- "Telnet Protocol");
+ ti = proto_tree_add_item(tree, proto_telnet, offset, END_OF_FRAME, NULL);
telnet_tree = proto_item_add_subtree(ti, ETT_TELNET);
i1 = i2 = i3 = 0;
@@ -374,8 +375,14 @@ dissect_telnet(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, i
}
+void
+proto_register_telnet(void)
+{
+/* static hf_register_info hf[] = {
+ { &variable,
+ { "Name", "telnet.abbreviation", TYPE, VALS_POINTER }},
+ };*/
-
-
-
-
+ proto_telnet = proto_register_protocol("Telnet", "telnet");
+ /* proto_register_field_array(proto_telnet, hf, array_length(hf));*/
+}