<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/sys/socket.2, branch releng/14.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Remove $FreeBSD$: one-line nroff pattern</title>
<updated>2023-08-16T17:55:15+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b2c76c41be32f904179efed29c0ca04d53f3996c'/>
<id>b2c76c41be32f904179efed29c0ca04d53f3996c</id>
<content type='text'>
Remove /^\.\\"\s*\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\.\\"\s*\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>man: add Netlink reference to socket(2)</title>
<updated>2023-01-15T11:27:43+00:00</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-01-14T17:35:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b0286ee504c605027c747e061591535c67032cf5'/>
<id>b0286ee504c605027c747e061591535c67032cf5</id>
<content type='text'>
Reviewed by:	lwhsu, pauamma, gbe
Differential Revision: https://reviews.freebsd.org/D38054
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	lwhsu, pauamma, gbe
Differential Revision: https://reviews.freebsd.org/D38054
</pre>
</div>
</content>
</entry>
<entry>
<title>divert: declare PF_DIVERT domain and stop abusing PF_INET</title>
<updated>2022-08-30T22:09:21+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2022-08-30T22:09:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8624f4347e8133911b0554e816f6bedb56dc5fb3'/>
<id>8624f4347e8133911b0554e816f6bedb56dc5fb3</id>
<content type='text'>
The divert(4) is not a protocol of IPv4.  It is a socket to
intercept packets from ipfw(4) to userland and re-inject them
back.  It can divert and re-inject IPv4 and IPv6 packets today,
but potentially it is not limited to these two protocols.  The
IPPROTO_DIVERT does not belong to known IP protocols, it
doesn't even fit into u_char.  I guess, the implementation of
divert(4) was done the way it is done basically because it was
easier to do it this way, back when protocols for sockets were
intertwined with IP protocols and domains were statically
compiled in.

Moving divert(4) out of inetsw accomplished two important things:

1) IPDIVERT is getting much closer to be not dependent on INET.
   This will be finalized in following changes.
2) Now divert socket no longer aliases with raw IPv4 socket.
   Domain/proto selection code won't need a hack for SOCK_RAW and
   multiple entries in inetsw implementing different flavors of
   raw socket can merge into one without requirement of raw IPv4
   being the last member of dom_protosw.

Differential revision:	https://reviews.freebsd.org/D36379
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The divert(4) is not a protocol of IPv4.  It is a socket to
intercept packets from ipfw(4) to userland and re-inject them
back.  It can divert and re-inject IPv4 and IPv6 packets today,
but potentially it is not limited to these two protocols.  The
IPPROTO_DIVERT does not belong to known IP protocols, it
doesn't even fit into u_char.  I guess, the implementation of
divert(4) was done the way it is done basically because it was
easier to do it this way, back when protocols for sockets were
intertwined with IP protocols and domains were statically
compiled in.

Moving divert(4) out of inetsw accomplished two important things:

1) IPDIVERT is getting much closer to be not dependent on INET.
   This will be finalized in following changes.
2) Now divert socket no longer aliases with raw IPv4 socket.
   Domain/proto selection code won't need a hack for SOCK_RAW and
   multiple entries in inetsw implementing different flavors of
   raw socket can merge into one without requirement of raw IPv4
   being the last member of dom_protosw.

Differential revision:	https://reviews.freebsd.org/D36379
</pre>
</div>
</content>
</entry>
<entry>
<title>socket(2): bring documentation up tp date</title>
<updated>2022-08-26T15:16:15+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2022-08-26T15:16:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a358db5603702d5de5fd75f5bd16bbf7c0ab673f'/>
<id>a358db5603702d5de5fd75f5bd16bbf7c0ab673f</id>
<content type='text'>
o Undocument sockets that are no longer supported, or never were.
o Add AF_HYPERV. Note: PF_HYPERV isn't defined, no typo here.
o Point at ip(4) and ip6(4) instead of unwelcoming "not described here".

Reviewed by:		gbe, markj
Differential revision:	https://reviews.freebsd.org/D36284
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
o Undocument sockets that are no longer supported, or never were.
o Add AF_HYPERV. Note: PF_HYPERV isn't defined, no typo here.
o Point at ip(4) and ip6(4) instead of unwelcoming "not described here".

Reviewed by:		gbe, markj
Differential revision:	https://reviews.freebsd.org/D36284
</pre>
</div>
</content>
</entry>
<entry>
<title>Document socket control message routines for ancillary data access (CMSG_DATA).</title>
<updated>2018-08-19T17:42:49+00:00</updated>
<author>
<name>Mateusz Piotrowski</name>
<email>0mp@FreeBSD.org</email>
</author>
<published>2018-08-19T17:42:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c8b8b38e5f605f3c85bd7c8723b147734905565a'/>
<id>c8b8b38e5f605f3c85bd7c8723b147734905565a</id>
<content type='text'>
PR:		227777
Reviewed by:	bcr, eadler
Approved by:	mat (mentor), manpages (bcr)
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D15215
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR:		227777
Reviewed by:	bcr, eadler
Approved by:	mat (mentor), manpages (bcr)
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D15215
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove an inaccuracy from socket.2.</title>
<updated>2017-06-10T21:07:55+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2017-06-10T21:07:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=df633e60c9371a5f832991b3d56d6bb8f54fc58a'/>
<id>df633e60c9371a5f832991b3d56d6bb8f54fc58a</id>
<content type='text'>
SOCK_SEQPACKET is implemented for several protocols.

MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SOCK_SEQPACKET is implemented for several protocols.

MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Renumber copyright clause 4</title>
<updated>2017-02-28T23:42:47+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2017-02-28T23:42:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fbbd9655e5107c68e4e0146ff22b73d7350475bc'/>
<id>fbbd9655e5107c68e4e0146ff22b73d7350475bc</id>
<content type='text'>
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann &lt;jschauma@stevens.edu&gt;
Pull Request:	https://github.com/freebsd/freebsd/pull/96
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann &lt;jschauma@stevens.edu&gt;
Pull Request:	https://github.com/freebsd/freebsd/pull/96
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove &lt;sys/types.h&gt; from the SYNOPSIS.</title>
<updated>2016-08-18T06:39:09+00:00</updated>
<author>
<name>Kevin Lo</name>
<email>kevlo@FreeBSD.org</email>
</author>
<published>2016-08-18T06:39:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=310d2ce0f6835de3754d8f7f1da304c66440ffd3'/>
<id>310d2ce0f6835de3754d8f7f1da304c66440ffd3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Catch up with many years of changes:</title>
<updated>2014-06-24T20:23:18+00:00</updated>
<author>
<name>Garrett Wollman</name>
<email>wollman@FreeBSD.org</email>
</author>
<published>2014-06-24T20:23:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=775a76844f0ef1ebf74308211d5a23310c9fab01'/>
<id>775a76844f0ef1ebf74308211d5a23310c9fab01</id>
<content type='text'>
o Document PF_LOCAL as being an alias for PF_UNIX
o Document POSIX standardization of this interface using AF_*
  constants rather than PF_* constants, and note the three particular
  families which POSIX standardizes.
o Note anticipated POSIX standardization of SOCK_CLOEXEC.
o Delete from listing protocol families that FreeBSD doesn't support
  (in some cases, like PF_PUP, has never supported).
o Add to listing some current protocol families that have been
  introduced in the last decade or so.
o Document the correspondence of PF_* and AF_* constants.

We should probably change the documentation to make the AF_* constants
primary, but this commit does not do so.

Reviewed by:	kevlo@
MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
o Document PF_LOCAL as being an alias for PF_UNIX
o Document POSIX standardization of this interface using AF_*
  constants rather than PF_* constants, and note the three particular
  families which POSIX standardizes.
o Note anticipated POSIX standardization of SOCK_CLOEXEC.
o Delete from listing protocol families that FreeBSD doesn't support
  (in some cases, like PF_PUP, has never supported).
o Add to listing some current protocol families that have been
  introduced in the last decade or so.
o Document the correspondence of PF_* and AF_* constants.

We should probably change the documentation to make the AF_* constants
primary, but this commit does not do so.

Reviewed by:	kevlo@
MFC after:	1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.</title>
<updated>2013-03-19T20:58:17+00:00</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2013-03-19T20:58:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c2e3c52e0d10026daec4e18f1d5c8ac55839f985'/>
<id>c2e3c52e0d10026daec4e18f1d5c8ac55839f985</id>
<content type='text'>
This change allows creating file descriptors with close-on-exec set in some
situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and
socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes file
descriptors (SCM_RIGHTS) atomically close-on-exec.

The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD.
MSG_CMSG_CLOEXEC is the first free bit for MSG_*.

The SOCK_* flags are not passed to MAC because this may cause incorrect
failures and can be done later via fcntl() anyway. On the other hand, audit
is expected to cope with the new flags.

For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags
argument.

Reviewed by:	kib
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change allows creating file descriptors with close-on-exec set in some
situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and
socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes file
descriptors (SCM_RIGHTS) atomically close-on-exec.

The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD.
MSG_CMSG_CLOEXEC is the first free bit for MSG_*.

The SOCK_* flags are not passed to MAC because this may cause incorrect
failures and can be done later via fcntl() anyway. On the other hand, audit
is expected to cope with the new flags.

For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags
argument.

Reviewed by:	kib
</pre>
</div>
</content>
</entry>
</feed>
