diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2005-09-27 21:14:10 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2005-09-27 21:14:10 +0000 |
commit | d96e8533f9674fffa7a5a148af89885c8f7adc2c (patch) | |
tree | 992025e5535fd1f56ec0bab1f28c3ebd8424d8d0 | |
parent | a51c47afb96354671c9ab3a7a90433e9950155fa (diff) |
Notes
-rw-r--r-- | sys/kern/uipc_socket.c | 17 | ||||
-rw-r--r-- | sys/sys/socket.h | 3 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index ee2a752afada..b1a4fa24bf65 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1681,6 +1681,7 @@ sosetopt(so, sopt) break; } break; + case SO_LABEL: #ifdef MAC error = sooptcopyin(sopt, &extmac, sizeof extmac, @@ -1693,6 +1694,7 @@ sosetopt(so, sopt) error = EOPNOTSUPP; #endif break; + default: error = ENOPROTOOPT; break; @@ -1820,6 +1822,7 @@ integer: tv.tv_usec = (optval % hz) * tick; error = sooptcopyout(sopt, &tv, sizeof tv); break; + case SO_LABEL: #ifdef MAC error = sooptcopyin(sopt, &extmac, sizeof(extmac), @@ -1835,6 +1838,7 @@ integer: error = EOPNOTSUPP; #endif break; + case SO_PEERLABEL: #ifdef MAC error = sooptcopyin(sopt, &extmac, sizeof(extmac), @@ -1850,6 +1854,19 @@ integer: error = EOPNOTSUPP; #endif break; + + case SO_LISTENQLIMIT: + optval = so->so_qlimit; + goto integer; + + case SO_LISTENQLEN: + optval = so->so_qlen; + goto integer; + + case SO_LISTENINCQLEN: + optval = so->so_incqlen; + goto integer; + default: error = ENOPROTOOPT; break; diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 176343d6aee0..bb00346ee081 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -133,6 +133,9 @@ typedef __uid_t uid_t; #if __BSD_VISIBLE #define SO_LABEL 0x1009 /* socket's MAC label */ #define SO_PEERLABEL 0x1010 /* socket's peer's MAC label */ +#define SO_LISTENQLIMIT 0x1011 /* socket's backlog limit */ +#define SO_LISTENQLEN 0x1012 /* socket's complete queue length */ +#define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */ #endif /* |