> 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 via email to