Subject: RE: regarding sending of a reset packet....

From: Robin Uyeshiro <[email-masked]>
Date: Tue, 5 Mar 2002 10:06:15 -0800

I think the top of page 65 of RFC 793 applies:
 
SEGMENT ARRIVES

If the state is CLOSED (i.e., TCB does not exist) then

all data in the incoming segment is discarded. An incoming

segment containing a RST is discarded. An incoming segment not

containing a RST causes a RST to be sent in response. The

acknowledgment and sequence field values are selected to make the

reset sequence acceptable to the TCP that sent the offending

segment.

If the ACK bit is off, sequence number zero is used,

<SEQ=0><ACK=SEG.SEQ+SEG.LEN><CTL=RST,ACK>

If the ACK bit is on,

<SEQ=SEG.ACK><CTL=RST>

Return.

-----Original Message-----
From: bhaskar [mailto:[email-masked]]
Sent: Monday, March 04, 2002 6:58 PM
To: [email-masked]
Subject: regarding sending of a reset packet....

hi,
 
  in the case of segment arrives ( rfc 793 pg. no 64 ),  when tcp is in the
closed state, if a reset packet has to be sent out,
  the rfc specifies the cases when the ack flag is set in the incoming
packet. 
  
  what happens if a syn flag is set or a fin is set along with ack in the
incoming packet... what should be the sequence number in that case of the
outgoing reset packet ?? 
 
  to elaborate my doubt,
 
  suppose for an incoming packet of tcp length 60 and ack num is 500, let us
suppose, and the flags set are ack, and syn. what should be the sequence
number of the reset packet that has to be sent out.  since the syn occupies
one sequence number, should the seq. no be 60 + 500 + 1 or just 60 + 500.
 
thanx in advance,
uday.