Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to Distinguish between a reset packet and a normal packet

Reply
Thread Tools Display Modes

How to Distinguish between a reset packet and a normal packet

 
 
sairam
Guest
Posts: n/a

 
      03-23-2007, 03:09 AM
How Distinguish between a Reset Packet and a normal Data or Ack or
Request packet.

 
Reply With Quote
 
 
 
 
Dan N
Guest
Posts: n/a

 
      03-23-2007, 05:18 AM
On Thu, 22 Mar 2007 21:09:45 -0700, sairam wrote:

> How Distinguish between a Reset Packet and a normal Data or Ack or
> Request packet.


That's a pretty vague question. In what context? What protocol are you
talking about?

If you're talking about TCP, in a reset packet, the RST bit in the header
is set. In an Ack packet the ACK bit is set.

Dan

 
Reply With Quote
 
sairam
Guest
Posts: n/a

 
      03-23-2007, 09:14 AM

Dan N wrote:
> On Thu, 22 Mar 2007 21:09:45 -0700, sairam wrote:
>
> > How Distinguish between a Reset Packet and a normal Data or Ack or
> > Request packet.

>
> That's a pretty vague question. In what context? What protocol are you
> talking about?
>
> If you're talking about TCP, in a reset packet, the RST bit in the header
> is set. In an Ack packet the ACK bit is set.
>
> Dan


Iam talking in the sense of programming, when received a packet in my
program it strips off all the header content, then how can I know the
packet is a RST packet

Sairam

 
Reply With Quote
 
Matthias Fassl
Guest
Posts: n/a

 
      03-25-2007, 10:33 AM
sairam wrote:
> Dan N wrote:
>> On Thu, 22 Mar 2007 21:09:45 -0700, sairam wrote:
>>
>>> How Distinguish between a Reset Packet and a normal Data or Ack or
>>> Request packet.

>> That's a pretty vague question. In what context? What protocol are you
>> talking about?
>>
>> If you're talking about TCP, in a reset packet, the RST bit in the header
>> is set. In an Ack packet the ACK bit is set.
>>
>> Dan

>
> Iam talking in the sense of programming, when received a packet in my
> program it strips off all the header content, then how can I know the
> packet is a RST packet


http://www.networksorcery.com/enp/protocol/tcp.htm

You just have to check if the RST bit (which is, i think, the 142 bit
in the tcp header) is 1 or 0.

Matthias

 
Reply With Quote
 
Dan N
Guest
Posts: n/a

 
      03-27-2007, 04:03 AM
On Fri, 23 Mar 2007 03:14:47 -0700, sairam wrote:

> Iam talking in the sense of programming, when received a packet in my
> program it strips off all the header content, then how can I know the
> packet is a RST packet


You should think in terms of a stream of data, not in terms of the
underlying protocol. When you get a read of zero bytes, then you know
that the stream has ended. The applications level doesn't know about
reset packets.

Dan

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows file server RST (reset) packet disconnecting Linux & Mac u pj_servadmin Windows Networking 0 11-07-2006 06:54 PM
Packet Collisions Chris Stolworthy Network Routers 5 03-06-2006 10:10 PM
Receiver sensitivity- Packet Detection v/s Packet capture Vinay Wireless Internet 1 10-14-2005 01:50 AM
MN-510 packet loss with MN-500 Ron Broadband Hardware 1 01-25-2004 02:08 PM
packet loss; what's acceptable/normal Marc Onrust Linux Networking 1 08-31-2003 08:23 AM



1 2 3 4 5 6 7 8 9 10 11