summaryrefslogtreecommitdiffstats
path: root/share/man/man4/unix.4
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-06-15 13:31:23 +0000
committerru <ru@FreeBSD.org>2005-06-15 13:31:23 +0000
commit10fbbd3d56c4c76b1ca79d19b6f335ed48ec24da (patch)
tree58b1b51ae0cee4af458796860e303ff0d40670bc /share/man/man4/unix.4
parentca97309c812e566ddd642101a047711625b810c1 (diff)
downloadFreeBSD-src-10fbbd3d56c4c76b1ca79d19b6f335ed48ec24da.zip
FreeBSD-src-10fbbd3d56c4c76b1ca79d19b6f335ed48ec24da.tar.gz
Assorted markup fixes and minor wordsmithing.
Approved by: re
Diffstat (limited to 'share/man/man4/unix.4')
-rw-r--r--share/man/man4/unix.440
1 files changed, 28 insertions, 12 deletions
diff --git a/share/man/man4/unix.4 b/share/man/man4/unix.4
index c556185..8a27de2 100644
--- a/share/man/man4/unix.4
+++ b/share/man/man4/unix.4
@@ -94,10 +94,14 @@ can be calculated by the macro
defined in
.In sys/un.h .
The
-.Ar sun_path
-field must be terminated by a NUL character to be used with
+.Va sun_path
+field must be terminated by a
+.Dv NUL
+character to be used with
.Fn SUN_LEN ,
-but the terminating NUL is
+but the terminating
+.Dv NUL
+is
.Em not
part of the address.
.Pp
@@ -195,7 +199,6 @@ or
.Xr listen 2 )
under different effective credentials.
.Pp
-
.Tn UNIX
domain sockets support a number of socket options which can be set with
.Xr setsockopt 2
@@ -207,13 +210,21 @@ This option may be enabled on a
.Dv SOCK_DGRAM
or a
.Dv SOCK_STREAM
-socket. This option provides a mechanism for the receiver to
+socket.
+This option provides a mechanism for the receiver to
receive the credentials of the process as a
.Xr recvmsg 2
-control message. The msg_control field in the msghdr structure points
-to a buffer that contains a cmsghdr structure followed by a variable
-length sockcred structure, defined in
-.Pa \*[Lt]sys/socket.h\*[Gt]
+control message.
+The
+.Va msg_control
+field in the
+.Vt msghdr
+structure points to a buffer that contains a
+.Vt cmsghdr
+structure followed by a variable length
+.Vt sockcred
+structure, defined in
+.In sys/socket.h
as follows:
.Bd -literal
struct sockcred {
@@ -228,22 +239,27 @@ struct sockcred {
.Pp
The
.Fn SOCKCREDSIZE
-macro computes the size of the sockcred structure for a specified number
+macro computes the size of the
+.Vt sockcred
+structure for a specified number
of groups.
-The cmsghdr fields have the following values:
+The
+.Vt cmsghdr
+fields have the following values:
.Bd -literal
cmsg_len = sizeof(struct cmsghdr) + SOCKCREDSIZE(ngroups)
cmsg_level = SOL_SOCKET
cmsg_type = SCM_CREDS
.Ed
.It Dv LOCAL_CONNWAIT
-Used with
+Used with
.Dv SOCK_STREAM
sockets, this option causes the
.Xr connect 2
function to block until
.Xr accept 2
has been called on the listening socket.
+.El
.Sh SEE ALSO
.Xr socket 2 ,
.Xr intro 4
OpenPOWER on IntegriCloud