Page MenuHomeFreeBSD

getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable
ClosedPublic

Authored by asomers on Sep 11 2019, 6:59 PM.

Details

Summary

getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable

When SO_TIMESTAMP is set, the kernel will attempt to attach a timestamp as
ancillary data to each IP datagram that is received on the socket. However,
it may fail, for example due to insufficient memory. In that case the
packet will still be received but not timestamp will be attached.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

May be add explicit language to the man page saying that resource shortage might prevent allocating the timestamp ? I believe it will be appreciated.

Explicitly state that a timestamp may not be returned

yuripv added inline comments.
lib/libc/sys/getsockopt.2
31 ↗(On Diff #61944)

Typo: September.

This revision is now accepted and ready to land.Sep 11 2019, 7:42 PM