From: erik quanstrom <quanstro@quanstro.net>
To: ash_666@bk.ru, 9fans@9fans.net
Subject: Re: [9fans] [9ans] Question about network protocols
Date: Wed, 28 Oct 2009 16:50:20 -0400 [thread overview]
Message-ID: <a62c75ba424c5d4d68f632be77c6c49f@ladd.quanstro.net> (raw)
In-Reply-To: <<E1N3FMj-00026n-00.ash_666-bk-ru@f266.mail.ru>>
On Wed Oct 28 16:44:36 EDT 2009, ash_666@bk.ru wrote:
> Hi, folks.
> I'm trying to understand how system interact with network protocols, such as tcp, udp and other.
> i'm look through sources in /sys/src/9/ip/ and saw follow:
> - protocol header struct
> - protocl init function
> and so on.
> But i'm grep in plan9.iso and don't find any files, when Tcp4hdr or tcpinit used. How it could be
> used?
> Where i can read about it or, better, where i can see at code, used such functions.
>
> Sorry for english and maybe foolish question.
excellent question. you're running into a little magic
built into the kernel build scripts. port/makedevc
is a script called from the kernel mkfile (these days,
usually pc/mkfile) that builds $kernelconfig.c. this
file has an array called ipprotoinit. if you specifiy
tcp in your kernel config, this array will contain a
reference to tcpinit. here's the array from my kernel
void (*ipprotoinit[])(Fs*) = {
ilinit,
tcpinit,
udpinit,
ipifcinit,
icmpinit,
icmp6init,
nil,
};
this array is referenced in ip/ipgetfs where tcpinit
would typically be called.
i hope that answers the question. it is a bit confusing.
- erik
next parent reply other threads:[~2009-10-28 20:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<E1N3FMj-00026n-00.ash_666-bk-ru@f266.mail.ru>
2009-10-28 20:50 ` erik quanstrom [this message]
[not found] <<E1N3HZO-0006Fj-00.ash_666-bk-ru@f13.mail.ru>
2009-10-28 23:18 ` erik quanstrom
2009-10-28 23:04 [9fans] " ty ty
2009-10-29 17:30 ` [9fans] " matt
-- strict thread matches above, loose matches on Subject: below --
2009-10-28 20:43 ty ty
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=a62c75ba424c5d4d68f632be77c6c49f@ladd.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
--cc=ash_666@bk.ru \
/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;
as well as URLs for NNTP newsgroup(s).