[722] in Zephyr_Bugs
Re: Zephyr stuff
daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Nov 6 14:11:01 1995
Date: Mon, 6 Nov 1995 14:11:49 -0500
From: Greg Hudson <ghudson@MIT.EDU>
To: Dejan Vucinic <dejan@mit1.fnal.gov>
Cc: bug-zephyr@MIT.EDU
In-Reply-To: "[720] in Zephyr_Bugs"
> It should be either PF_INET or PF_UNIX.
I've looked at this issue a little further. In the NetBSD kernel,
when you call socket() (resulting in an socreate()) without a protocol
argument, it calls pffindtype() to find the type. pffindtype() looks
at the "family" member of all of the domains structure for a match
against the family given; the family for inetdomain is AF_INET,
indicating that it's looking for an address family. (isodomain uses
AF_ISO; I didn't look any further.)
On the other hand, the kernel appears to call pffindproto() (which
does the same kind of matching) at least once with a PF_INET argument.
So there's clearly some confusion here as to what the distinction
between address families and protocol families is supposed to be.
From a documentation perspective, AF_INET or AF_UNIX is clearly the
correct argument to pass to socket(), however.