linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* TCP/IP stack
@ 2001-06-28 14:33 Michael J Clark
  2001-06-28 20:06 ` Matti Aarnio
  2001-06-29 15:32 ` Kevin Buhr
  0 siblings, 2 replies; 3+ messages in thread
From: Michael J Clark @ 2001-06-28 14:33 UTC (permalink / raw)
  To: linux-kernel

hey guys,

I have been reading through TCP/IP Illustrated Vol 2 and the linux 
source.  I am having a heck of a time finding where it sees a SYN packet 
and check to see if the desitination port is open.  In the book it looks 
like it happens in tcp_input where it looks for the PCB for a segment.  
Any pointers would be greatly appeciated.

Mike

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: TCP/IP stack
  2001-06-28 14:33 TCP/IP stack Michael J Clark
@ 2001-06-28 20:06 ` Matti Aarnio
  2001-06-29 15:32 ` Kevin Buhr
  1 sibling, 0 replies; 3+ messages in thread
From: Matti Aarnio @ 2001-06-28 20:06 UTC (permalink / raw)
  To: Michael J Clark; +Cc: linux-kernel, rgooch

  Richard, should there be (is there?)  linux-networking-faq, or can this
  be put into the  linux-kernel  faq ?

On Thu, Jun 28, 2001 at 10:33:46AM -0400, Michael J Clark wrote:
> hey guys,
> 
> I have been reading through TCP/IP Illustrated Vol 2 and the linux 
> source.

   That book describes  BSD  implementation.

   Linux code has been written completely independently, and using
   fundamentally different base structure -- instead of PCBs containing
   chains of segments, Linux has  SKBs  with entire segment contiguous
   in it.

   Function, and structure names are different, naturally.

> Mike

/Matti Aarnio

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: TCP/IP stack
  2001-06-28 14:33 TCP/IP stack Michael J Clark
  2001-06-28 20:06 ` Matti Aarnio
@ 2001-06-29 15:32 ` Kevin Buhr
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Buhr @ 2001-06-29 15:32 UTC (permalink / raw)
  To: Michael J Clark; +Cc: linux-kernel

Michael J Clark <clarkmic@pobox.upenn.edu> writes:
> 
> I have been reading through TCP/IP Illustrated Vol 2 and the linux 
> source.  I am having a heck of a time finding where it sees a SYN packet 
> and check to see if the desitination port is open.  In the book it looks 
> like it happens in tcp_input where it looks for the PCB for a segment.  
> Any pointers would be greatly appeciated.

In 2.2.19 (since I have the source handy), this processing is done in
"linux/net/ipv4/tcp_input.c" in function "tcp_rcv_state_process".  If
a SYN packet arrives and the socket is in state TCP_LISTEN, the
address-family-specific "conn_request" function is called.  For IPv4,
this is "tcp_v4_conn_request" in "tcp_ipv4.c".

On the other hand, if a SYN packet is sent to a TCP_CLOSE socket,
"tcp_rcv_state_process" returns 1.  This is an indication to the
caller ("tcp_v4_do_rcv" in "tcp_ipv4.c", in the case of IPv4) to send
a RST packet.

Kevin <buhr@stat.wisc.edu>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-29 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-28 14:33 TCP/IP stack Michael J Clark
2001-06-28 20:06 ` Matti Aarnio
2001-06-29 15:32 ` Kevin Buhr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).