From: an7 <an3h0ny@yahoo.fr>
To: linux-kernel@vger.kernel.org
Subject: Network implementation
Date: Mon, 20 Oct 2003 11:23:23 +0200 (CEST) [thread overview]
Message-ID: <20031020092323.82601.qmail@web11103.mail.yahoo.com> (raw)
Hi, i am a french engineer who has some work to do on
TCP/IP implementation in the linux kernel.
I have three questions on it :
1) What are the advantages of using a ring buffer for
receiving and queuing packets ?
2) in tcp_minisocks.c in linux i get, in the function
which handles segment arrival in FIN_WAIT_2 state :
if (th->syn && !before(TCP_SKB_CB(skb)->seq,
tw->rcv_nxt))
goto kill_with_rst;
Just to confirm : in the state FIN_WAIT_2 a SYN
segment is automatically killed by a RST, unless its
sequence number is superior to the waited sequence
number. But in this case , what happens ? I think the
RFC tells to send a ACK. Am i right ?
3) the function tcp_recv_skb() (tcp.c)
struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq,
u32 *off)
1383 {
1384 struct sk_buff *skb;
1385 u32 offset;
1386
1387 skb_queue_walk(&sk->receive_queue, skb) {
1388 offset = seq -
TCP_SKB_CB(skb)->seq;
1389 if (skb->h.th->syn)
1390 offset--;
1391 if (offset < skb->len ||
skb->h.th->fin) {
1392 *off = offset;
1393 return skb;
1394 }
1395 }
1396 return NULL;
1397 }
I just can't understand the role of offset (and thus,
i can't undersand why it is decremented with a syn
segment, and why we can return the skb structure when
we have an offset inferior to the skb len, or a FIN
segment)
Could you help please ?
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
reply other threads:[~2003-10-20 9:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20031020092323.82601.qmail@web11103.mail.yahoo.com \
--to=an3h0ny@yahoo.fr \
--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®