From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 28 Oct 2009 19:18:46 -0400 To: ash_666@bk.ru, 9fans@9fans.net Message-ID: <1717612ffe01d5455e373892072a77a6@brasstown.quanstro.net> In-Reply-To: <> References: <> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] [9ans] Question about network protocols Topicbox-Message-UUID: 932ed99a-ead5-11e9-9d60-3106f5b1d025 > 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