From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] accept in dial(2) Date: Tue, 17 Aug 2004 17:03:06 +0100 From: rog@vitanuova.com In-Reply-To: <766d57de8595663bf37db32ddf91abc7@plan9.ucalgary.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: d5602e7a-eacd-11e9-9e20-41e7f4b1d025 > the listen one, i believe. it's interesting that neither the "accept" nor "reject" messages used by accept(2) and reject(2) are documented in ip(3). i guess this is because IP doesn't use accept/reject, hence things have got a bit mucky, because it'll work whichever one you use! from the way the messages are used (in /sys/src/libc/9sys/announce.c) it looks as if the correct fd to use is that returned from announce (which wouldn't have been my guess!), as the message contains the name of the connection number to accept or reject, which wouldn't be necessary were the newly opened control file used for the message (this would know its connection number implicitly, so the extra argument would be redundant). i imagine there should be a place for the protocol required of /net to be documented, so that if someone comes to implement a new protocol, they know what is necessary. at the moment ip(3) is as good as it gets. certainly dial(2) should probably be more explicit, and it looks like the example there might be wrong. i'm sure others know better than this!