Date: Thu, 19 Jun 2014 14:18:26 +0200 From: Erik Trulsson <Erik.Trulsson.1013@student.uu.se> To: Kevin Lo <kevlo@FreeBSD.org> Cc: freebsd-standards@FreeBSD.org Subject: Re: Is AF_UNIX really deprecated? Message-ID: <20140619141826.14853fw0x3yysf0y@webmail.uu.se> In-Reply-To: <20140619054743.GA33893@ns.kevlo.org> References: <20140619054743.GA33893@ns.kevlo.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Kevin Lo <kevlo@FreeBSD.org>: > Hi, > > IEEE Std 1003.1g-2000 and later POSIX standards [1] do not include > AF_LOCAL and mention only AF_UNIX, but according to socket(2) man page it > mentions AF_UNIX is deprecated, use AF_LOCAL instead. > > I'd like to add support -f local to netstat(1), I'm wondering if AF_UNIX > is really deprecated. > > [1] > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html > > Thanks, > Kevin From what I can see the socket(2) manpage does not say anything at all about AF_UNIX - it talks about PF_UNIX and PF_LOCAL - which happen to have the same values as the corresponding AF_ defines. (It is also worth mentioning that AF_UNIX and AF_LOCAL have the same value, so on FreeBSD (and Linux for that matter) it does not matter which of those four you use - they all have the same numerical value.) Historically there seems to have been quite a bit of confusion over which variant to use (with the _LOCAL variant probably being older than _UNIX) but as you note the latest POSIX standard only mentions AF_UNIX so I suggest you use that one. (It is also perhaps worth mentioning that the socket(2) manpage has preferred PF_LOCAL over PF_UNIX for more than a decade now. I suspect neither is going away any time soon.)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140619141826.14853fw0x3yysf0y>