]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
sockaddr-struct.3, sockaddr_in-struct.3: Document sockaddr_in
authorAlejandro Colomar <alx.manpages@gmail.com>
Thu, 24 Feb 2022 23:24:09 +0000 (00:24 +0100)
committerAlejandro Colomar <alx.manpages@gmail.com>
Fri, 25 Feb 2022 11:53:25 +0000 (12:53 +0100)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
man3/sockaddr-struct.3
man3/sockaddr_in-struct.3 [new file with mode: 0644]

index 272b938a1a9c8671035d147323df30118e4c5607..d85841d524ed5c01fb46ea2ee7a019e293404f84 100644 (file)
@@ -1,6 +1,7 @@
 .TH SOCKADDR 3 2022-02-24 Linux "Linux Programmer's Manual"
 .SH NAME
-sockaddr, sockaddr_storage, sockaddr_un, socklen_t \- socket address
+sockaddr, sockaddr_storage, sockaddr_in, sockaddr_un, socklen_t,
+\- socket address
 .SH SYNOPSIS
 .nf
 .B #include <sys/socket.h>
@@ -17,6 +18,16 @@ sockaddr, sockaddr_storage, sockaddr_un, socklen_t \- socket address
 .BR typedef " /* ... */ " socklen_t;
 .PP
 .fi
+.SS Internet domain sockets
+.nf
+.B #include <netinet/in.h>
+.PP
+.B struct sockaddr_in {
+.BR "    sa_family_t    sin_family;" "  /* " AF_INET " */"
+.BR "    in_port_t      sin_port;" "    /* Port number */"
+.BR "    struct in_addr sin_addr;" "    /* IP address */"
+.B };
+.fi
 .SS UNIX domain sockets
 .nf
 .B #include <sys/un.h>
@@ -45,6 +56,10 @@ structures and used to access its fields.
 Describes the length of a socket address.
 According to POSIX,
 this shall be an integer type of at least 32 bits.
+.SS Internet domain sockets
+.TP
+.I sockaddr_in
+Describes an Internet domain socket address.
 .SS UNIX domain sockets
 .TP
 .I sockaddr_un
@@ -61,6 +76,9 @@ is also defined in
 .BR connect (2),
 .BR getpeername (2),
 .BR getsockname (2),
+.BR getsockopt (2),
+.BR sendto (2),
+.BR setsockopt (2),
 .BR socket (2),
 .BR socketpair (2),
 .BR getaddrinfo (3),
diff --git a/man3/sockaddr_in-struct.3 b/man3/sockaddr_in-struct.3
new file mode 100644 (file)
index 0000000..6977e52
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sockaddr-struct.3