Date: Thu, 12 Sep 2013 13:47:57 +0900 (JST) From: Masato Asou <asou@soum.co.jp> To: freebsd-questions@freebsd.org Subject: PF_xxx or AF_xxx? comment of dom_family in sys/uipc_domain.h Message-ID: <20130912.134757.123817297.asou@soum.co.jp>
index | next in thread | raw e-mail
Hi,
I have a little question.
In manual SOCKET(2) describes as follows.
The domain argument specifies a communications domain within which commu-
nication will take place; this selects the protocol family which should
be used. These families are defined in the include file <sys/socket.h>.
The currently understood formats are:
PF_LOCAL Host-internal protocols, formerly called PF_UNIX,
PF_UNIX Host-internal protocols, deprecated, use PF_LOCAL,
PF_INET Internet version 4 protocols,
However, comment of dom_fammily in /usr/src/sys/sys/uipc_domain.h as
follows.
struct domain {
int dom_family; /* AF_xxx */
The dom_fammily was used in function /usr/src/sys/kern/uipc_domain.c:
pffindtype() as follows.
struct protosw *
pffindtype(int family, int type)
{
struct domain *dp;
struct protosw *pr;
for (dp = domains; dp; dp = dp->dom_next)
if (dp->dom_family == family)
goto found;
The argument domain of SOCKET(2) passed to the argument family of
function pffindtype(). If SOCKET(2) is correct, described as
/* PF_xxx */ instead /* AF_xxx */ in sys/uipc_domain.h?
I know PF_xxx is equals AF_xxx defined in sys/socket.h.
I don't believe this is serious mistake.
Regards,
--
ASOU Masato
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130912.134757.123817297.asou>
