From: buhr@stat.wisc.edu (Kevin Buhr)
To: Michael J Clark <clarkmic@pobox.upenn.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: TCP/IP stack
Date: 29 Jun 2001 10:32:21 -0500 [thread overview]
Message-ID: <vbau20z9u9m.fsf@mozart.stat.wisc.edu> (raw)
In-Reply-To: <200106281433.f5SEXk800876@pobox.upenn.edu>
In-Reply-To: Michael J Clark's message of "Thu, 28 Jun 2001 10:33:46 -0400 (EDT)"
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>
prev parent reply other threads:[~2001-06-29 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-28 14:33 Michael J Clark
2001-06-28 20:06 ` Matti Aarnio
2001-06-29 15:32 ` Kevin Buhr [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vbau20z9u9m.fsf@mozart.stat.wisc.edu \
--to=buhr@stat.wisc.edu \
--cc=clarkmic@pobox.upenn.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®