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

asomers created this revision.Sep 11 2019, 6:59 PM
kib added a comment.Sep 11 2019, 7:16 PM

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

asomers updated this revision to Diff 61944.Sep 11 2019, 7:26 PM

Explicitly state that a timestamp may not be returned

yuripv added a subscriber: yuripv.Sep 11 2019, 7:33 PM
yuripv added inline comments.
lib/libc/sys/getsockopt.2
31 ↗(On Diff #61944)

Typo: September.

asomers updated this revision to Diff 61946.Sep 11 2019, 7:37 PM

Fix typo

kib accepted this revision.Sep 11 2019, 7:42 PM
This revision is now accepted and ready to land.Sep 11 2019, 7:42 PM
This revision was automatically updated to reflect the committed changes.