summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/tcp.h3
-rw-r--r--sys/netinet/udp.h2
-rw-r--r--sys/sys/socket.h9
-rw-r--r--sys/sys/un.h3
4 files changed, 17 insertions, 0 deletions
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h
index 1613301..fb2f810 100644
--- a/sys/netinet/tcp.h
+++ b/sys/netinet/tcp.h
@@ -166,6 +166,9 @@ struct tcphdr {
#define TCP_KEEPINTVL 512 /* L,N interval between keepalives */
#define TCP_KEEPCNT 1024 /* L,N number of keepalives before close */
+/* Start of reserved space for third-party user-settable options. */
+#define TCP_VENDOR SO_VENDOR
+
#define TCP_CA_NAME_MAX 16 /* max congestion control name length */
#define TCPI_OPT_TIMESTAMPS 0x01
diff --git a/sys/netinet/udp.h b/sys/netinet/udp.h
index cea2667..c2d638d 100644
--- a/sys/netinet/udp.h
+++ b/sys/netinet/udp.h
@@ -50,6 +50,8 @@ struct udphdr {
*/
#define UDP_ENCAP 1
+/* Start of reserved space for third-party user-settable options. */
+#define UDP_VENDOR SO_VENDOR
/*
* UDP Encapsulation of IPsec Packets options.
diff --git a/sys/sys/socket.h b/sys/sys/socket.h
index d7c6c79..c29a689 100644
--- a/sys/sys/socket.h
+++ b/sys/sys/socket.h
@@ -143,6 +143,15 @@ typedef __uid_t uid_t;
#endif
/*
+ * Space reserved for new socket options added by third-party vendors.
+ * This range applies to all socket option levels. New socket options
+ * in FreeBSD should always use an option value less than SO_VENDOR.
+ */
+#if __BSD_VISIBLE
+#define SO_VENDOR 0x80000000
+#endif
+
+/*
* Structure used for manipulating linger option.
*/
struct linger {
diff --git a/sys/sys/un.h b/sys/sys/un.h
index 6ab8474..7837e76 100644
--- a/sys/sys/un.h
+++ b/sys/sys/un.h
@@ -57,6 +57,9 @@ struct sockaddr_un {
#define LOCAL_CREDS 2 /* pass credentials to receiver */
#define LOCAL_CONNWAIT 4 /* connects block until accepted */
+/* Start of reserved space for third-party socket options. */
+#define LOCAL_VENDOR SO_VENDOR
+
#ifndef _KERNEL
/* actual length of an initialized sockaddr_un */
OpenPOWER on IntegriCloud