Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177581075
D16791.1794794154.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D16791.1794794154.diff
View Options
Index: lib/libc/sys/getsockopt.2
===================================================================
--- lib/libc/sys/getsockopt.2
+++ lib/libc/sys/getsockopt.2
@@ -28,7 +28,7 @@
.\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95
.\" $FreeBSD$
.\"
-.Dd May 9, 2018
+.Dd August 18, 2018
.Dt GETSOCKOPT 2
.Os
.Sh NAME
@@ -172,6 +172,7 @@
.It Dv SO_TIMESTAMP Ta "enables reception of a timestamp with datagrams"
.It Dv SO_BINTIME Ta "enables reception of a timestamp with datagrams"
.It Dv SO_ACCEPTCONN Ta "get listening status of the socket (get only)"
+.It Dv SO_DOMAIN Ta "get the domain of the socket (get only)"
.It Dv SO_TYPE Ta "get the type of the socket (get only)"
.It Dv SO_PROTOCOL Ta "get the protocol number for the socket (get only)"
.It Dv SO_PROTOTYPE Ta "SunOS alias for the Linux SO_PROTOCOL (get only)"
Index: sys/kern/uipc_socket.c
===================================================================
--- sys/kern/uipc_socket.c
+++ sys/kern/uipc_socket.c
@@ -3008,6 +3008,10 @@
error = sooptcopyout(sopt, &optval, sizeof optval);
break;
+ case SO_DOMAIN:
+ optval = so->so_proto->pr_domain->dom_family;
+ goto integer;
+
case SO_TYPE:
optval = so->so_type;
goto integer;
Index: sys/sys/socket.h
===================================================================
--- sys/sys/socket.h
+++ sys/sys/socket.h
@@ -171,6 +171,7 @@
#define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */
#define SO_TS_CLOCK 0x1017 /* clock type used for SO_TIMESTAMP */
#define SO_MAX_PACING_RATE 0x1018 /* socket's max TX pacing rate (Linux name) */
+#define SO_DOMAIN 0x1019 /* get socket domain */
#endif
#if __BSD_VISIBLE
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 1:55 AM (5 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41754939
Default Alt Text
D16791.1794794154.diff (1 KB)
Attached To
Mode
D16791: Add support for SO_DOMAIN in getsockopt()
Attached
Detach File
Event Timeline