diff options
author | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-12 12:56:23 +0000 |
---|---|---|
committer | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-12 12:56:23 +0000 |
commit | 60ac4e87b21c5b1502ac9670ce69a4d4157aab6e (patch) | |
tree | 97cb5495513f67957c03ce4425f6fb89fde48024 /packet-rsh.c | |
parent | 7810e860d6b2fee640e546f1c9a2db55bc1b10a8 (diff) |
- add HAVE_CONFIG_H
- add display filters
svn path=/trunk/; revision=2263
Diffstat (limited to 'packet-rsh.c')
-rw-r--r-- | packet-rsh.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/packet-rsh.c b/packet-rsh.c index df3d8498cb..9491001385 100644 --- a/packet-rsh.c +++ b/packet-rsh.c @@ -4,7 +4,7 @@ * Robert Tsai <rtsai@netapp.com> * Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu> * - * $Id: packet-rsh.c,v 1.1 2000/08/12 05:41:01 guy Exp $ + * $Id: packet-rsh.c,v 1.2 2000/08/12 12:56:23 deniel Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -28,7 +28,9 @@ * */ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -38,6 +40,8 @@ #include "packet.h" static int proto_rsh = -1; +static int hf_rsh_response = -1; +static int hf_rsh_request = -1; static gint ett_rsh = -1; #define TCP_PORT_RSH 514 @@ -83,6 +87,13 @@ dissect_rsh(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) data = lineend; } + if (pi.match_port == pi.destport) + proto_tree_add_boolean_hidden(rsh_tree, + hf_rsh_request, NullTVB, 0, 0, 1); + else + proto_tree_add_boolean_hidden(rsh_tree, + hf_rsh_response, NullTVB, 0, 0, 1); + if (data < dataend) old_dissect_data(&pd[offset], offset, fd, rsh_tree); } @@ -91,11 +102,24 @@ dissect_rsh(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) void proto_register_rsh(void) { + + static hf_register_info hf[] = { + { &hf_rsh_response, + { "Response", "rsh.response", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "TRUE if rsh response" }}, + { &hf_rsh_request, + { "Request", "rsh.request", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "TRUE if rsh request" }}, + }; + static gint *ett[] = { &ett_rsh, }; proto_rsh = proto_register_protocol("Remote Shell", "rsh"); + proto_register_field_array(proto_rsh, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } |