History log of /src/lib/libsys/socket.2 (Results 1 – 25 of 54)
Revision Date Author Comments
# d0474eda 02-Feb-2026 Artem Bunichev <tembun@bk.ru>

socket.2: Cross-reference netintro(4)

netintro(4) is a great manual page that provides a basic introduction to
network facilities, I think it is well worth mentioning in the
socket(2).

I also think

socket.2: Cross-reference netintro(4)

netintro(4) is a great manual page that provides a basic introduction to
network facilities, I think it is well worth mentioning in the
socket(2).

I also think we can incorporate this reference somewhere in the text as
well, but I'm not sure, maybe the reference in the SEE ALSO section
would be enough.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55032

show more ...


# 2c6bee2b 21-Jan-2026 Artem Bunichev <tembun@bk.ru>

socket.2: Cross-reference protocol families

While here, make wider use of Dv for socket types and protocol families
and reference fcntl(2) flags for the `type` argument values.

MFC after: 3 days
R

socket.2: Cross-reference protocol families

While here, make wider use of Dv for socket types and protocol families
and reference fcntl(2) flags for the `type` argument values.

MFC after: 3 days
Reviewed by: glebius, ziaee
Differential Revision: https://reviews.freebsd.org/D54434

show more ...


# ad13fd5a 14-Oct-2025 Maxim Konovalov <maxim@FreeBSD.org>

socket.2: spell


# 86d17239 14-Oct-2025 Gleb Smirnoff <glebius@FreeBSD.org>

socket(2): refactor the manual page

Create a chapter on every important socket type: stream, datagram,
seqpacket. Always list what protocol families do support what kinds of
sockets. Improve some

socket(2): refactor the manual page

Create a chapter on every important socket type: stream, datagram,
seqpacket. Always list what protocol families do support what kinds of
sockets. Improve some statements possessing language from the
specification [1]. Reduce some statements that are mostly specific to
TCP. Provide more external links and references to various important
syscalls that can be used on sockets.

Add a paragrph on non-blocking mode.

The big factual change is documentation of SOCK_SEQPACKET. In FreeBSD 15
this socket now fully follows the specification and is a stream socket
with record boundaries.

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html#tag_16_10_06

Differential Revision: https://reviews.freebsd.org/D52771

show more ...


# 663a5715 14-Oct-2025 Gleb Smirnoff <glebius@FreeBSD.org>

sockets: add PF_HYPERV alias

Just make it like all other sockets that have PF_FOO -> AF_FOO alias.


# efadb5c2 17-May-2025 Ricardo Branco <rbranco@suse.de>

Add manpages for O_CLOFORK flag and others

Reviewed by: kib
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/1698


# 6e1fc011 15-Oct-2024 Graham Percival <gperciva@tarsnap.com>

manuals: Fix "unusual .Xr" warnings with a script

These were reported by `mandoc -T lint ...` as warnings:
- unusual Xr order
- unusual Xr punctuation

Fixes made by script in https://github.com/Tar

manuals: Fix "unusual .Xr" warnings with a script

These were reported by `mandoc -T lint ...` as warnings:
- unusual Xr order
- unusual Xr punctuation

Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts

Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1464

show more ...


# 8269e767 14-Nov-2023 Brooks Davis <brooks@FreeBSD.org>

libsys: relocate implementations and manpages

Remove core system call implementations and documentation to lib/libsys
and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>.
Update paths

libsys: relocate implementations and manpages

Remove core system call implementations and documentation to lib/libsys
and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>.
Update paths to allow libc to find them in their new home.

Reviewed by: kib, emaste, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/908

show more ...


# dc36d6f9 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl s

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# b2c76c41 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line nroff pattern

Remove /^\.\\"\s*\$FreeBSD\$$\n/


# b0286ee5 14-Jan-2023 Alexander V. Chernikov <melifaro@FreeBSD.org>

man: add Netlink reference to socket(2)

Reviewed by: lwhsu, pauamma, gbe
Differential Revision: https://reviews.freebsd.org/D38054


# 8624f434 30-Aug-2022 Gleb Smirnoff <glebius@FreeBSD.org>

divert: declare PF_DIVERT domain and stop abusing PF_INET

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 dive

divert: declare PF_DIVERT domain and stop abusing PF_INET

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

show more ...


# a358db56 26-Aug-2022 Gleb Smirnoff <glebius@FreeBSD.org>

socket(2): bring documentation up tp date

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)

socket(2): bring documentation up tp date

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

show more ...


# c8b8b38e 19-Aug-2018 Mateusz Piotrowski <0mp@FreeBSD.org>

Document socket control message routines for ancillary data access (CMSG_DATA).

PR: 227777
Reviewed by: bcr, eadler
Approved by: mat (mentor), manpages (bcr)
Obtained from: OpenBSD
Differential Rev

Document socket control message routines for ancillary data access (CMSG_DATA).

PR: 227777
Reviewed by: bcr, eadler
Approved by: mat (mentor), manpages (bcr)
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D15215

show more ...


# df633e60 10-Jun-2017 Mark Johnston <markj@FreeBSD.org>

Remove an inaccuracy from socket.2.

SOCK_SEQPACKET is implemented for several protocols.

MFC after: 1 week


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

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

Renumber copyright clause 4

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 <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

show more ...


# 310d2ce0 18-Aug-2016 Kevin Lo <kevlo@FreeBSD.org>

Remove <sys/types.h> from the SYNOPSIS.


# 775a7684 24-Jun-2014 Garrett Wollman <wollman@FreeBSD.org>

Catch up with many years of changes:

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

Catch up with many years of changes:

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

show more ...


# c2e3c52e 19-Mar-2013 Jilles Tjoelker <jilles@FreeBSD.org>

Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.

This change allows creating file descriptors with close-on-exec set in some
situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in soc

Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.

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

show more ...


# 0ff48e71 07-Dec-2012 Kevin Lo <kevlo@FreeBSD.org>

Document that socket(2) may fail with EAFNOSUPPORT if the family cannot
be found.

Reviewed by: glebius
Obtained from: NetBSD


# f3cac808 05-Jan-2009 Tom Rhodes <trhodes@FreeBSD.org>

Note that the protocol argument can be set to 0.

PR: 127890
Reviewed by: rwatson


# 20425850 04-Aug-2008 Tom Rhodes <trhodes@FreeBSD.org>

Add EPERM to the ERRORS section.

PR: 125746


# 6b2bbb04 29-Jun-2008 David Schultz <das@FreeBSD.org>

Make it clearer that it is possible to disable the generation of
SIGPIPE for individual sockets (PR: kern/118626).

While here, s/insure/ensure/.


# c879ae35 09-Jan-2007 Warner Losh <imp@FreeBSD.org>

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


# 1a0a9345 02-Jul-2004 Ruslan Ermilov <ru@FreeBSD.org>

Mechanically kill hard sentence breaks.


123