9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
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 19:18:46 -0400	[thread overview]
Message-ID: <1717612ffe01d5455e373892072a77a6@brasstown.quanstro.net> (raw)
In-Reply-To: <<E1N3HZO-0006Fj-00.ash_666-bk-ru@f13.mail.ru>>

> 1) as i understand, protocol initialization occurs in ipgetfs, which not used anywhere, except
> ipattach function in same file (devip.c). ipattach, in turn, member of ipdevtab struct and latter
> isn't used anywhere too (i haven't found any with grep).
> It seems me strange, but at this point i assume, theese actions take place at system start up (this
> not true, i think).

on boot, ip will be typically be attached by the boot process.

> 3) with your reference on ipgetfs i'm googled presentation [1], a little explaining to me the
> mechanism of choice.
> name = netmkaddr("133.137.166.17", "udp", "echo");
> netmkaddr takes the text name of protocol and, as i saw in sources, and passes it to fprint, which
> call vfprint, which, in turn, call dofmt. As i understand, dofmt is some internal machinery for
> parse format string and decide to use the appropriate protocol. But I did not see where a
> connection is opened or something like that.
> Is my assumption about fprint and dofmt true?

dofmt is part of the print library.  netmkaddr returns
a cannonical address as a text string.  this address can
be passed to dial(2) to make a connection.

netmkaddr doesn't have any knowledge of specific
protocols.  if you were to add a new connection type
tomorrow, netmkaddr wouldn't need any modification.
dial wouldn't either.

at this point, you should probablly be reading the
man pages for these things.  there on the cd and
online at plan9.bell-labs.com.

- erik



       reply	other threads:[~2009-10-28 23:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<E1N3HZO-0006Fj-00.ash_666-bk-ru@f13.mail.ru>
2009-10-28 23:18 ` erik quanstrom [this message]
2009-10-28 23:04 [9fans] " ty ty
2009-10-29 17:30 ` [9fans] " matt
     [not found] <<E1N3FMj-00026n-00.ash_666-bk-ru@f266.mail.ru>
2009-10-28 20:50 ` erik quanstrom
  -- 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=1717612ffe01d5455e373892072a77a6@brasstown.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).