version 1.197, 2009/12/29 03:48:18 |
version 1.209.2.1.4.3, 2017/07/21 03:55:56 |
Line 92 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 92 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <sys/kauth.h> |
#include <sys/kauth.h> |
#include <sys/mutex.h> |
#include <sys/mutex.h> |
#include <sys/condvar.h> |
#include <sys/condvar.h> |
|
#include <sys/kthread.h> |
|
|
#ifdef COMPAT_50 |
#ifdef COMPAT_50 |
#include <compat/sys/time.h> |
#include <compat/sys/time.h> |
#include <compat/sys/socket.h> |
#include <compat/sys/socket.h> |
#endif |
#endif |
|
|
#include <uvm/uvm.h> |
#include <uvm/uvm_extern.h> |
|
#include <uvm/uvm_loan.h> |
|
#include <uvm/uvm_page.h> |
|
|
MALLOC_DEFINE(M_SOOPTS, "soopts", "socket options"); |
MALLOC_DEFINE(M_SOOPTS, "soopts", "socket options"); |
MALLOC_DEFINE(M_SONAME, "soname", "socket name"); |
MALLOC_DEFINE(M_SONAME, "soname", "socket name"); |
Line 133 EVCNT_ATTACH_STATIC(sosend_kvalimit); |
|
Line 136 EVCNT_ATTACH_STATIC(sosend_kvalimit); |
|
|
|
#endif /* SOSEND_COUNTERS */ |
#endif /* SOSEND_COUNTERS */ |
|
|
static struct callback_entry sokva_reclaimerentry; |
|
|
|
#if defined(SOSEND_NO_LOAN) || defined(MULTIPROCESSOR) |
#if defined(SOSEND_NO_LOAN) || defined(MULTIPROCESSOR) |
int sock_loan_thresh = -1; |
int sock_loan_thresh = -1; |
#else |
#else |
Line 142 int sock_loan_thresh = 4096; |
|
Line 143 int sock_loan_thresh = 4096; |
|
#endif |
#endif |
|
|
static kmutex_t so_pendfree_lock; |
static kmutex_t so_pendfree_lock; |
static struct mbuf *so_pendfree; |
static struct mbuf *so_pendfree = NULL; |
|
|
#ifndef SOMAXKVA |
#ifndef SOMAXKVA |
#define SOMAXKVA (16 * 1024 * 1024) |
#define SOMAXKVA (16 * 1024 * 1024) |
Line 155 static kauth_listener_t socket_listener; |
|
Line 156 static kauth_listener_t socket_listener; |
|
|
|
#define SOCK_LOAN_CHUNK 65536 |
#define SOCK_LOAN_CHUNK 65536 |
|
|
static size_t sodopendfree(void); |
static void sopendfree_thread(void *); |
static size_t sodopendfreel(void); |
static kcondvar_t pendfree_thread_cv; |
|
static lwp_t *sopendfree_lwp; |
|
|
static void sysctl_kern_somaxkva_setup(void); |
static void sysctl_kern_somaxkva_setup(void); |
static struct sysctllog *socket_sysctllog; |
static struct sysctllog *socket_sysctllog; |
Line 168 sokvareserve(struct socket *so, vsize_t |
|
Line 170 sokvareserve(struct socket *so, vsize_t |
|
|
|
mutex_enter(&so_pendfree_lock); |
mutex_enter(&so_pendfree_lock); |
while (socurkva + len > somaxkva) { |
while (socurkva + len > somaxkva) { |
size_t freed; |
|
|
|
/* |
|
* try to do pendfree. |
|
*/ |
|
|
|
freed = sodopendfreel(); |
|
|
|
/* |
|
* if some kva was freed, try again. |
|
*/ |
|
|
|
if (freed) |
|
continue; |
|
|
|
SOSEND_COUNTER_INCR(&sosend_kvalimit); |
SOSEND_COUNTER_INCR(&sosend_kvalimit); |
error = cv_wait_sig(&socurkva_cv, &so_pendfree_lock); |
error = cv_wait_sig(&socurkva_cv, &so_pendfree_lock); |
if (error) { |
if (error) { |
Line 210 sokvaunreserve(vsize_t len) |
|
Line 197 sokvaunreserve(vsize_t len) |
|
*/ |
*/ |
|
|
vaddr_t |
vaddr_t |
sokvaalloc(vsize_t len, struct socket *so) |
sokvaalloc(vaddr_t sva, vsize_t len, struct socket *so) |
{ |
{ |
vaddr_t lva; |
vaddr_t lva; |
|
|
Line 225 sokvaalloc(vsize_t len, struct socket *s |
|
Line 212 sokvaalloc(vsize_t len, struct socket *s |
|
* allocate kva. |
* allocate kva. |
*/ |
*/ |
|
|
lva = uvm_km_alloc(kernel_map, len, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA); |
lva = uvm_km_alloc(kernel_map, len, atop(sva) & uvmexp.colormask, |
|
UVM_KMF_COLORMATCH | UVM_KMF_VAONLY | UVM_KMF_WAITVA); |
if (lva == 0) { |
if (lva == 0) { |
sokvaunreserve(len); |
sokvaunreserve(len); |
return (0); |
return (0); |
Line 275 sodoloanfree(struct vm_page **pgs, void |
|
Line 263 sodoloanfree(struct vm_page **pgs, void |
|
sokvafree(sva, len); |
sokvafree(sva, len); |
} |
} |
|
|
static size_t |
|
sodopendfree(void) |
|
{ |
|
size_t rv; |
|
|
|
if (__predict_true(so_pendfree == NULL)) |
|
return 0; |
|
|
|
mutex_enter(&so_pendfree_lock); |
|
rv = sodopendfreel(); |
|
mutex_exit(&so_pendfree_lock); |
|
|
|
return rv; |
|
} |
|
|
|
/* |
/* |
* sodopendfreel: free mbufs on "pendfree" list. |
* sopendfree_thread: free mbufs on "pendfree" list. |
* unlock and relock so_pendfree_lock when freeing mbufs. |
* unlock and relock so_pendfree_lock when freeing mbufs. |
* |
|
* => called with so_pendfree_lock held. |
|
*/ |
*/ |
|
|
static size_t |
static void |
sodopendfreel(void) |
sopendfree_thread(void *v) |
{ |
{ |
struct mbuf *m, *next; |
struct mbuf *m, *next; |
size_t rv = 0; |
size_t rv; |
|
|
KASSERT(mutex_owned(&so_pendfree_lock)); |
|
|
|
while (so_pendfree != NULL) { |
mutex_enter(&so_pendfree_lock); |
m = so_pendfree; |
|
so_pendfree = NULL; |
|
mutex_exit(&so_pendfree_lock); |
|
|
|
for (; m != NULL; m = next) { |
for (;;) { |
next = m->m_next; |
rv = 0; |
KASSERT((~m->m_flags & (M_EXT|M_EXT_PAGES)) == 0); |
while (so_pendfree != NULL) { |
KASSERT(m->m_ext.ext_refcnt == 0); |
m = so_pendfree; |
|
so_pendfree = NULL; |
|
mutex_exit(&so_pendfree_lock); |
|
|
|
for (; m != NULL; m = next) { |
|
next = m->m_next; |
|
KASSERT((~m->m_flags & (M_EXT|M_EXT_PAGES)) == 0); |
|
KASSERT(m->m_ext.ext_refcnt == 0); |
|
|
|
rv += m->m_ext.ext_size; |
|
sodoloanfree(m->m_ext.ext_pgs, m->m_ext.ext_buf, |
|
m->m_ext.ext_size); |
|
pool_cache_put(mb_cache, m); |
|
} |
|
|
rv += m->m_ext.ext_size; |
mutex_enter(&so_pendfree_lock); |
sodoloanfree(m->m_ext.ext_pgs, m->m_ext.ext_buf, |
|
m->m_ext.ext_size); |
|
pool_cache_put(mb_cache, m); |
|
} |
} |
|
if (rv) |
mutex_enter(&so_pendfree_lock); |
cv_broadcast(&socurkva_cv); |
|
cv_wait(&pendfree_thread_cv, &so_pendfree_lock); |
} |
} |
|
panic("sopendfree_thread"); |
return (rv); |
/* NOTREACHED */ |
} |
} |
|
|
void |
void |
Line 343 soloanfree(struct mbuf *m, void *buf, si |
|
Line 320 soloanfree(struct mbuf *m, void *buf, si |
|
mutex_enter(&so_pendfree_lock); |
mutex_enter(&so_pendfree_lock); |
m->m_next = so_pendfree; |
m->m_next = so_pendfree; |
so_pendfree = m; |
so_pendfree = m; |
cv_broadcast(&socurkva_cv); |
cv_signal(&pendfree_thread_cv); |
mutex_exit(&so_pendfree_lock); |
mutex_exit(&so_pendfree_lock); |
} |
} |
|
|
Line 373 sosend_loan(struct socket *so, struct ui |
|
Line 350 sosend_loan(struct socket *so, struct ui |
|
|
|
KASSERT(npgs <= M_EXT_MAXPAGES); |
KASSERT(npgs <= M_EXT_MAXPAGES); |
|
|
lva = sokvaalloc(len, so); |
lva = sokvaalloc(sva, len, so); |
if (lva == 0) |
if (lva == 0) |
return 0; |
return 0; |
|
|
Line 406 sosend_loan(struct socket *so, struct ui |
|
Line 383 sosend_loan(struct socket *so, struct ui |
|
return (space); |
return (space); |
} |
} |
|
|
static int |
|
sokva_reclaim_callback(struct callback_entry *ce, void *obj, void *arg) |
|
{ |
|
|
|
KASSERT(ce == &sokva_reclaimerentry); |
|
KASSERT(obj == NULL); |
|
|
|
sodopendfree(); |
|
if (!vm_map_starved_p(kernel_map)) { |
|
return CALLBACK_CHAIN_ABORT; |
|
} |
|
return CALLBACK_CHAIN_CONTINUE; |
|
} |
|
|
|
struct mbuf * |
struct mbuf * |
getsombuf(struct socket *so, int type) |
getsombuf(struct socket *so, int type) |
{ |
{ |
Line 452 socket_listener_cb(kauth_cred_t cred, ka |
|
Line 415 socket_listener_cb(kauth_cred_t cred, ka |
|
case KAUTH_REQ_NETWORK_SOCKET_DROP: { |
case KAUTH_REQ_NETWORK_SOCKET_DROP: { |
/* Normal users can only drop their own connections. */ |
/* Normal users can only drop their own connections. */ |
struct socket *so = (struct socket *)arg1; |
struct socket *so = (struct socket *)arg1; |
uid_t sockuid = so->so_uidinfo->ui_uid; |
|
|
|
if (sockuid == kauth_cred_getuid(cred) || |
if (so->so_cred && proc_uidmatch(cred, so->so_cred) == 0) |
sockuid == kauth_cred_geteuid(cred)) |
|
result = KAUTH_RESULT_ALLOW; |
result = KAUTH_RESULT_ALLOW; |
|
|
break; |
break; |
Line 463 socket_listener_cb(kauth_cred_t cred, ka |
|
Line 424 socket_listener_cb(kauth_cred_t cred, ka |
|
|
|
case KAUTH_REQ_NETWORK_SOCKET_OPEN: |
case KAUTH_REQ_NETWORK_SOCKET_OPEN: |
/* We allow "raw" routing/bluetooth sockets to anyone. */ |
/* We allow "raw" routing/bluetooth sockets to anyone. */ |
if ((u_long)arg1 == PF_ROUTE || (u_long)arg1 == PF_BLUETOOTH) |
if ((u_long)arg1 == PF_ROUTE || (u_long)arg1 == PF_OROUTE |
|
|| (u_long)arg1 == PF_BLUETOOTH) { |
result = KAUTH_RESULT_ALLOW; |
result = KAUTH_RESULT_ALLOW; |
else { |
} else { |
/* Privileged, let secmodel handle this. */ |
/* Privileged, let secmodel handle this. */ |
if ((u_long)arg2 == SOCK_RAW) |
if ((u_long)arg2 == SOCK_RAW) |
break; |
break; |
|
|
mutex_init(&so_pendfree_lock, MUTEX_DEFAULT, IPL_VM); |
mutex_init(&so_pendfree_lock, MUTEX_DEFAULT, IPL_VM); |
softnet_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE); |
softnet_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE); |
cv_init(&socurkva_cv, "sokva"); |
cv_init(&socurkva_cv, "sokva"); |
|
cv_init(&pendfree_thread_cv, "sopendfr"); |
soinit2(); |
soinit2(); |
|
|
/* Set the initial adjusted socket buffer size. */ |
/* Set the initial adjusted socket buffer size. */ |
if (sb_max_set(sb_max)) |
if (sb_max_set(sb_max)) |
panic("bad initial sb_max value: %lu", sb_max); |
panic("bad initial sb_max value: %lu", sb_max); |
|
|
callback_register(&vm_map_to_kernel(kernel_map)->vmk_reclaim_callback, |
|
&sokva_reclaimerentry, NULL, sokva_reclaim_callback); |
|
|
|
socket_listener = kauth_listen_scope(KAUTH_SCOPE_NETWORK, |
socket_listener = kauth_listen_scope(KAUTH_SCOPE_NETWORK, |
socket_listener_cb, NULL); |
socket_listener_cb, NULL); |
} |
} |
|
|
|
void |
|
soinit1(void) |
|
{ |
|
int error = kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, |
|
sopendfree_thread, NULL, &sopendfree_lwp, "sopendfree"); |
|
if (error) |
|
panic("soinit1 %d", error); |
|
} |
|
|
/* |
/* |
* Socket operation routines. |
* Socket operation routines. |
* These routines are called by the routines in |
* These routines are called by the routines in |
Line 563 socreate(int dom, struct socket **aso, i |
|
Line 532 socreate(int dom, struct socket **aso, i |
|
#endif |
#endif |
uid = kauth_cred_geteuid(l->l_cred); |
uid = kauth_cred_geteuid(l->l_cred); |
so->so_uidinfo = uid_find(uid); |
so->so_uidinfo = uid_find(uid); |
so->so_egid = kauth_cred_getegid(l->l_cred); |
|
so->so_cpid = l->l_proc->p_pid; |
so->so_cpid = l->l_proc->p_pid; |
if (lockso != NULL) { |
if (lockso != NULL) { |
/* Caller wants us to share a lock. */ |
/* Caller wants us to share a lock. */ |
Line 582 socreate(int dom, struct socket **aso, i |
|
Line 550 socreate(int dom, struct socket **aso, i |
|
sofree(so); |
sofree(so); |
return error; |
return error; |
} |
} |
|
so->so_cred = kauth_cred_dup(l->l_cred); |
sounlock(so); |
sounlock(so); |
*aso = so; |
*aso = so; |
return 0; |
return 0; |
Line 597 fsocreate(int domain, struct socket **so |
|
Line 566 fsocreate(int domain, struct socket **so |
|
struct socket *so; |
struct socket *so; |
struct file *fp; |
struct file *fp; |
int fd, error; |
int fd, error; |
|
int flags = type & SOCK_FLAGS_MASK; |
|
|
|
type &= ~SOCK_FLAGS_MASK; |
if ((error = fd_allocfile(&fp, &fd)) != 0) |
if ((error = fd_allocfile(&fp, &fd)) != 0) |
return (error); |
return error; |
fp->f_flag = FREAD|FWRITE; |
fd_set_exclose(l, fd, (flags & SOCK_CLOEXEC) != 0); |
|
fp->f_flag = FREAD|FWRITE|((flags & SOCK_NONBLOCK) ? FNONBLOCK : 0)| |
|
((flags & SOCK_NOSIGPIPE) ? FNOSIGPIPE : 0); |
fp->f_type = DTYPE_SOCKET; |
fp->f_type = DTYPE_SOCKET; |
fp->f_ops = &socketops; |
fp->f_ops = &socketops; |
error = socreate(domain, &so, type, protocol, l, NULL); |
error = socreate(domain, &so, type, protocol, l, NULL); |
Line 612 fsocreate(int domain, struct socket **so |
|
Line 585 fsocreate(int domain, struct socket **so |
|
fp->f_data = so; |
fp->f_data = so; |
fd_affix(curproc, fp, fd); |
fd_affix(curproc, fp, fd); |
*fdout = fd; |
*fdout = fd; |
|
if (flags & SOCK_NONBLOCK) |
|
so->so_state |= SS_NBIO; |
} |
} |
return error; |
return error; |
} |
} |
Line 752 soclose(struct socket *so) |
|
Line 727 soclose(struct socket *so) |
|
goto drop; |
goto drop; |
} |
} |
if (so->so_options & SO_LINGER) { |
if (so->so_options & SO_LINGER) { |
if ((so->so_state & SS_ISDISCONNECTING) && so->so_nbio) |
if ((so->so_state & (SS_ISDISCONNECTING|SS_NBIO)) == |
|
(SS_ISDISCONNECTING|SS_NBIO)) |
goto drop; |
goto drop; |
while (so->so_state & SS_ISCONNECTED) { |
while (so->so_state & SS_ISCONNECTED) { |
error = sowait(so, true, so->so_linger * hz); |
error = sowait(so, true, so->so_linger * hz); |
Line 771 soclose(struct socket *so) |
|
Line 747 soclose(struct socket *so) |
|
discard: |
discard: |
if (so->so_state & SS_NOFDREF) |
if (so->so_state & SS_NOFDREF) |
panic("soclose: NOFDREF"); |
panic("soclose: NOFDREF"); |
|
kauth_cred_free(so->so_cred); |
so->so_state |= SS_NOFDREF; |
so->so_state |= SS_NOFDREF; |
sofree(so); |
sofree(so); |
return (error); |
return (error); |
Line 873 sodisconnect(struct socket *so) |
|
Line 850 sodisconnect(struct socket *so) |
|
error = (*so->so_proto->pr_usrreq)(so, PRU_DISCONNECT, |
error = (*so->so_proto->pr_usrreq)(so, PRU_DISCONNECT, |
NULL, NULL, NULL, NULL); |
NULL, NULL, NULL, NULL); |
} |
} |
sodopendfree(); |
|
return (error); |
return (error); |
} |
} |
|
|
Line 906 sosend(struct socket *so, struct mbuf *a |
|
Line 882 sosend(struct socket *so, struct mbuf *a |
|
short wakeup_state = 0; |
short wakeup_state = 0; |
|
|
p = l->l_proc; |
p = l->l_proc; |
sodopendfree(); |
|
clen = 0; |
clen = 0; |
|
|
/* |
/* |
Line 973 sosend(struct socket *so, struct mbuf *a |
|
Line 948 sosend(struct socket *so, struct mbuf *a |
|
} |
} |
if (space < resid + clen && |
if (space < resid + clen && |
(atomic || space < so->so_snd.sb_lowat || space < clen)) { |
(atomic || space < so->so_snd.sb_lowat || space < clen)) { |
if (so->so_nbio) { |
if ((so->so_state & SS_NBIO) || (flags & MSG_NBIO)) { |
error = EWOULDBLOCK; |
error = EWOULDBLOCK; |
goto release; |
goto release; |
} |
} |
Line 1023 sosend(struct socket *so, struct mbuf *a |
|
Line 998 sosend(struct socket *so, struct mbuf *a |
|
} |
} |
if (resid >= MINCLSIZE && space >= MCLBYTES) { |
if (resid >= MINCLSIZE && space >= MCLBYTES) { |
SOSEND_COUNTER_INCR(&sosend_copy_big); |
SOSEND_COUNTER_INCR(&sosend_copy_big); |
m_clget(m, M_WAIT); |
m_clget(m, M_DONTWAIT); |
if ((m->m_flags & M_EXT) == 0) |
if ((m->m_flags & M_EXT) == 0) |
goto nopages; |
goto nopages; |
mlen = MCLBYTES; |
mlen = MCLBYTES; |
Line 1159 soreceive(struct socket *so, struct mbuf |
|
Line 1134 soreceive(struct socket *so, struct mbuf |
|
{ |
{ |
struct lwp *l = curlwp; |
struct lwp *l = curlwp; |
struct mbuf *m, **mp, *mt; |
struct mbuf *m, **mp, *mt; |
int atomic, flags, len, error, s, offset, moff, type, orig_resid; |
size_t len, offset, moff, orig_resid; |
|
int atomic, flags, error, s, type; |
const struct protosw *pr; |
const struct protosw *pr; |
struct mbuf *nextrecord; |
struct mbuf *nextrecord; |
int mbuf_removed = 0; |
int mbuf_removed = 0; |
Line 1182 soreceive(struct socket *so, struct mbuf |
|
Line 1158 soreceive(struct socket *so, struct mbuf |
|
else |
else |
flags = 0; |
flags = 0; |
|
|
if ((flags & MSG_DONTWAIT) == 0) |
|
sodopendfree(); |
|
|
|
if (flags & MSG_OOB) { |
if (flags & MSG_OOB) { |
m = m_get(M_WAIT, MT_DATA); |
m = m_get(M_WAIT, MT_DATA); |
solock(so); |
solock(so); |
Line 1195 soreceive(struct socket *so, struct mbuf |
|
Line 1168 soreceive(struct socket *so, struct mbuf |
|
goto bad; |
goto bad; |
do { |
do { |
error = uiomove(mtod(m, void *), |
error = uiomove(mtod(m, void *), |
(int) min(uio->uio_resid, m->m_len), uio); |
MIN(uio->uio_resid, m->m_len), uio); |
m = m_free(m); |
m = m_free(m); |
} while (uio->uio_resid > 0 && error == 0 && m); |
} while (uio->uio_resid > 0 && error == 0 && m); |
bad: |
bad: |
Line 1272 soreceive(struct socket *so, struct mbuf |
|
Line 1245 soreceive(struct socket *so, struct mbuf |
|
} |
} |
if (uio->uio_resid == 0) |
if (uio->uio_resid == 0) |
goto release; |
goto release; |
if (so->so_nbio || (flags & MSG_DONTWAIT)) { |
if ((so->so_state & SS_NBIO) || |
|
(flags & (MSG_DONTWAIT|MSG_NBIO))) { |
error = EWOULDBLOCK; |
error = EWOULDBLOCK; |
goto release; |
goto release; |
} |
} |
Line 1377 soreceive(struct socket *so, struct mbuf |
|
Line 1351 soreceive(struct socket *so, struct mbuf |
|
type == SCM_RIGHTS) { |
type == SCM_RIGHTS) { |
sounlock(so); |
sounlock(so); |
splx(s); |
splx(s); |
error = (*dom->dom_externalize)(cm, l); |
error = (*dom->dom_externalize)(cm, l, |
|
(flags & MSG_CMSG_CLOEXEC) ? |
|
O_CLOEXEC : 0); |
s = splsoftnet(); |
s = splsoftnet(); |
solock(so); |
solock(so); |
} |
} |
Line 1446 soreceive(struct socket *so, struct mbuf |
|
Line 1422 soreceive(struct socket *so, struct mbuf |
|
SBLASTMBUFCHK(&so->so_rcv, "soreceive uiomove"); |
SBLASTMBUFCHK(&so->so_rcv, "soreceive uiomove"); |
sounlock(so); |
sounlock(so); |
splx(s); |
splx(s); |
error = uiomove(mtod(m, char *) + moff, (int)len, uio); |
error = uiomove(mtod(m, char *) + moff, len, uio); |
s = splsoftnet(); |
s = splsoftnet(); |
solock(so); |
solock(so); |
if (error != 0) { |
if (error != 0) { |
Line 1730 sosetopt1(struct socket *so, const struc |
|
Line 1706 sosetopt1(struct socket *so, const struc |
|
case SO_REUSEPORT: |
case SO_REUSEPORT: |
case SO_OOBINLINE: |
case SO_OOBINLINE: |
case SO_TIMESTAMP: |
case SO_TIMESTAMP: |
|
case SO_NOSIGPIPE: |
#ifdef SO_OTIMESTAMP |
#ifdef SO_OTIMESTAMP |
case SO_OTIMESTAMP: |
case SO_OTIMESTAMP: |
#endif |
#endif |
Line 1930 sogetopt1(struct socket *so, struct sock |
|
Line 1907 sogetopt1(struct socket *so, struct sock |
|
case SO_BROADCAST: |
case SO_BROADCAST: |
case SO_OOBINLINE: |
case SO_OOBINLINE: |
case SO_TIMESTAMP: |
case SO_TIMESTAMP: |
|
case SO_NOSIGPIPE: |
#ifdef SO_OTIMESTAMP |
#ifdef SO_OTIMESTAMP |
case SO_OTIMESTAMP: |
case SO_OTIMESTAMP: |
#endif |
#endif |