diff options
author | Michael Mann <mmann78@netscape.net> | 2014-09-06 08:44:23 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-09-09 01:25:36 +0000 |
commit | 80407a46df538011c1dcea96714c401a4078a697 (patch) | |
tree | f62b063004ba6a8946c552c6a3180cb8f417cd83 /epan/dissectors/packet-rsh.c | |
parent | 124923b02f3113a1f2aeae205417a18828671850 (diff) |
Eliminate proto_tree_add_text from some of the dissectors.
Other minor cleanups while in the area.
Change-Id: I99096ade9c69a4c148962d45bb6b0bd775040ba1
Reviewed-on: https://code.wireshark.org/review/4020
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-rsh.c')
-rw-r--r-- | epan/dissectors/packet-rsh.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rsh.c b/epan/dissectors/packet-rsh.c index c5436229fe..ccb2ee0286 100644 --- a/epan/dissectors/packet-rsh.c +++ b/epan/dissectors/packet-rsh.c @@ -56,6 +56,8 @@ static int hf_rsh_stderr_port = -1; static int hf_rsh_client_username = -1; static int hf_rsh_server_username = -1; static int hf_rsh_command = -1; +static int hf_rsh_client_server_data = -1; +static int hf_rsh_server_client_data = -1; /* Initialize the subtree pointers */ static gint ett_rsh = -1; @@ -344,13 +346,13 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(pinfo->destport == RSH_PORT){ /* Packet going to the server */ /* offset = 0 since the whole packet is data */ - proto_tree_add_text(rsh_tree, tvb, 0, -1, "Client -> Server Data"); + proto_tree_add_item(rsh_tree, hf_rsh_client_server_data, tvb, 0, -1, ENC_NA); col_append_str(pinfo->cinfo, COL_INFO, "Client -> Server data"); } else { /* This packet must be going back to the client */ /* offset = 0 since the whole packet is data */ - proto_tree_add_text(rsh_tree, tvb, 0, -1, "Server -> Client Data"); + proto_tree_add_item(rsh_tree, hf_rsh_server_client_data, tvb, 0, -1, ENC_NA); col_append_str(pinfo->cinfo, COL_INFO, "Server -> Client Data"); } @@ -380,7 +382,15 @@ proto_register_rsh(void) { &hf_rsh_command, { "Command to execute", "rsh.command", FT_STRINGZ, BASE_NONE, NULL, 0, - "Command client is requesting the server to run", HFILL } } + "Command client is requesting the server to run", HFILL } }, + + { &hf_rsh_client_server_data, { "Client -> Server Data", "rsh.client_server_data", + FT_BYTES, BASE_NONE, NULL, 0, + NULL, HFILL } }, + + { &hf_rsh_server_client_data, { "Server -> Client Data", "rsh.server_client_data", + FT_BYTES, BASE_NONE, NULL, 0, + NULL, HFILL } }, }; |