aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rlogin.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-09-30 23:14:43 +0000
committerGuy Harris <guy@alum.mit.edu>2001-09-30 23:14:43 +0000
commit1e937e5c0af17b1924220894a8af35f9c77bd391 (patch)
tree4d941f8e93763aa024f7bd2213eb53d955c23776 /packet-rlogin.c
parent5feac9e72abe8084512bdd36959c748bcd9ed2aa (diff)
downloadwireshark-1e937e5c0af17b1924220894a8af35f9c77bd391.tar.gz
wireshark-1e937e5c0af17b1924220894a8af35f9c77bd391.tar.bz2
wireshark-1e937e5c0af17b1924220894a8af35f9c77bd391.zip
The length of an NBSS message can be bigger than 64K, so make the
variable that holds it an "int" rather than a "guint16". Further strengthen the heuristics the NBSS dissector uses to distinguish NBSS messages from continuations of NBSS messages. If an frame contains an NBSS continuation, put the protocol tree item for the continuation data under an NBSS protocol tree item. Have the TCP dissector supply information to subdissectors via a "struct tcpinfo" pointed to by "pinfo->private"; move the urgent pointer value from a global variable into that structure, and add a Boolean flag that indicates whether the data it's handing to a subdissector is reassembled data or not. Make the NBSS dissector check for continuations only in non-reassembled data. Fix the computation, in the TCP dissector, of the offset into the tvbuff handed to the subdissector of the first byte of stuff that needs further reassembly, and fix the computation of the sequence number corresponding to that byte. svn path=/trunk/; revision=3984
Diffstat (limited to 'packet-rlogin.c')
-rw-r--r--packet-rlogin.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/packet-rlogin.c b/packet-rlogin.c
index 6bc2e4cb5e..c93f096d65 100644
--- a/packet-rlogin.c
+++ b/packet-rlogin.c
@@ -2,7 +2,7 @@
* Routines for unix rlogin packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-rlogin.c,v 1.19 2001/09/03 10:33:06 guy Exp $
+ * $Id: packet-rlogin.c,v 1.20 2001/09/30 23:14:43 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -178,7 +178,7 @@ rlogin_state_machine( rlogin_hash_entry_t *hash_info, tvbuff_t *tvb,
}
static void rlogin_display( rlogin_hash_entry_t *hash_info, tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree)
+ packet_info *pinfo, proto_tree *tree, struct tcpinfo *tcpinfo)
{
/* Display the proto tree */
int offset = 0;
@@ -198,10 +198,10 @@ static void rlogin_display( rlogin_hash_entry_t *hash_info, tvbuff_t *tvb,
if ( length == 0) /* exit if no captured data */
return;
- if ( tcp_urgent_pointer && /* if control message */
- length >= tcp_urgent_pointer) { /* and it's in this frame */
+ if ( tcpinfo->urgent_pointer && /* if control message */
+ length >= tcpinfo->urgent_pointer) { /* and it's in this frame */
- int urgent_offset = tcp_urgent_pointer - 1;
+ int urgent_offset = tcpinfo->urgent_pointer - 1;
guint8 Temp = tvb_get_guint8(tvb, urgent_offset);
if (urgent_offset > offset) /* check for data in front */
@@ -335,6 +335,7 @@ static void rlogin_display( rlogin_hash_entry_t *hash_info, tvbuff_t *tvb,
static void
dissect_rlogin(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
+ struct tcpinfo *tcpinfo = pinfo->private;
conversation_t *conversation;
rlogin_hash_entry_t *hash_info;
gint ti_offset;
@@ -375,7 +376,7 @@ dissect_rlogin(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ( tvb_get_guint8(tvb, 0) == '\0')
strcat( temp, "Start Handshake");
- else if ( tcp_urgent_pointer)
+ else if ( tcpinfo->urgent_pointer)
strcat( temp, "Control Message");
else { /* check for terminal info */
@@ -405,7 +406,7 @@ dissect_rlogin(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
rlogin_state_machine( hash_info, tvb, pinfo);
if ( tree) /* if proto tree, decode data */
- rlogin_display( hash_info, tvb, pinfo, tree);
+ rlogin_display( hash_info, tvb, pinfo, tree, tcpinfo);
}