Page MenuHomeFreeBSD

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

Authored by asomers on Sep 11 2019, 6:59 PM.
Tags
None
Referenced Files
F132323146: D21607.diff
Wed, Oct 15, 9:47 PM
Unknown Object (File)
Wed, Sep 24, 9:31 PM
Unknown Object (File)
Sun, Sep 21, 12:21 AM
Unknown Object (File)
Sat, Sep 20, 8:06 AM
Unknown Object (File)
Aug 30 2025, 2:52 PM
Unknown Object (File)
Aug 30 2025, 2:38 PM
Unknown Object (File)
Aug 25 2025, 11:01 PM
Unknown Object (File)
Aug 16 2025, 8:40 AM
Subscribers

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 - subversion
Lint
Lint Not Applicable
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