Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_input.c
Show First 20 Lines • Show All 1,187 Lines • ▼ Show 20 Lines | if (CHECK_SO_CT(inp->inp_socket, SO_TS_REALTIME_MICRO)) { | ||||
struct bintime boottimebin; | struct bintime boottimebin; | ||||
struct timespec ts, ts1; | struct timespec ts, ts1; | ||||
if ((m->m_flags & (M_PKTHDR | M_TSTMP)) == (M_PKTHDR | | if ((m->m_flags & (M_PKTHDR | M_TSTMP)) == (M_PKTHDR | | ||||
M_TSTMP)) { | M_TSTMP)) { | ||||
mbuf_tstmp2timespec(m, &ts); | mbuf_tstmp2timespec(m, &ts); | ||||
getboottimebin(&boottimebin); | getboottimebin(&boottimebin); | ||||
bintime2timespec(&boottimebin, &ts1); | bintime2timespec(&boottimebin, &ts1); | ||||
timespecadd(&ts, &ts1); | timespecadd(&ts, &ts1, &ts); | ||||
} else { | } else { | ||||
nanotime(&ts); | nanotime(&ts); | ||||
} | } | ||||
*mp = sbcreatecontrol((caddr_t)&ts, sizeof(ts), | *mp = sbcreatecontrol((caddr_t)&ts, sizeof(ts), | ||||
SCM_REALTIME, SOL_SOCKET); | SCM_REALTIME, SOL_SOCKET); | ||||
if (*mp != NULL) { | if (*mp != NULL) { | ||||
mp = &(*mp)->m_next; | mp = &(*mp)->m_next; | ||||
stamped = true; | stamped = true; | ||||
▲ Show 20 Lines • Show All 223 Lines • Show Last 20 Lines |