diff options
author | phk <phk@FreeBSD.org> | 2004-01-31 10:40:25 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-01-31 10:40:25 +0000 |
commit | 35592de77bccf63789e2fd7396b81328733450f9 (patch) | |
tree | 541f152b903334a9cf726d3180613df082ab33ba /sys/kern | |
parent | ac460e8a52313c38e9e4e8d52da016ce8df9e8e3 (diff) | |
download | FreeBSD-src-35592de77bccf63789e2fd7396b81328733450f9.zip FreeBSD-src-35592de77bccf63789e2fd7396b81328733450f9.tar.gz |
Introduce the SO_BINTIME option which takes a high-resolution timestamp
at packet arrival.
For benchmarking purposes SO_BINTIME is preferable to SO_TIMEVAL
since it has higher resolution and lower overhead. Simultaneous
use of the two options is possible and they will return consistent
timestamps.
This introduces an extra test and a function call for SO_TIMEVAL, but I have
not been able to measure that.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 3ec3257..f06e48b 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1357,6 +1357,7 @@ sosetopt(so, sopt) case SO_REUSEPORT: case SO_OOBINLINE: case SO_TIMESTAMP: + case SO_BINTIME: case SO_NOSIGPIPE: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); @@ -1555,6 +1556,7 @@ sogetopt(so, sopt) case SO_BROADCAST: case SO_OOBINLINE: case SO_TIMESTAMP: + case SO_BINTIME: case SO_NOSIGPIPE: optval = so->so_options & sopt->sopt_name; integer: |