net: socket: Add SO_TIMESTAMPING socket option

This can be used to activate the network packet statistics
collection. Note that we do not have resources to calculate
each network packet transit times but we collect average times
instead.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2019-05-30 18:33:59 +08:00
commit eef7625660
2 changed files with 21 additions and 0 deletions

View file

@ -732,6 +732,9 @@ static inline char *inet_ntop(sa_family_t family, const void *src, char *dst,
/** sockopt: Async error (ignored, for compatibility) */
#define SO_ERROR 4
/** sockopt: Timestamp TX packets */
#define SO_TIMESTAMPING 37
/* Socket options for IPPROTO_TCP level */
/** sockopt: Disable TCP buffering (ignored, for compatibility) */
#define TCP_NODELAY 1