net/ethernet: add timestamp for socket packet

add timestamp for socket packet

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
gaohedong
2025-02-16 17:35:04 +08:00
committed by Xiang Xiao
parent 3949a87d36
commit 81f42cb2cf
6 changed files with 151 additions and 60 deletions
+4 -1
View File
@@ -212,7 +212,7 @@
#define SO_TYPE 15 /* Reports the socket type (get only).
* return: int
*/
#define SO_TIMESTAMP 16 /* Generates a timestamp for each incoming packet
#define SO_TIMESTAMP 16 /* Generates a timestamp in us for each incoming packet
* arg: integer value
*/
#define SO_BINDTODEVICE 17 /* Bind this socket to a specific network device.
@@ -220,6 +220,9 @@
#define SO_PEERCRED 18 /* Return the credentials of the peer process
* connected to this socket.
*/
#define SO_TIMESTAMPNS 20 /* Generates a timestamp in ns for each incoming packet
* arg: integer value
*/
/* The options are unsupported but included for compatibility
* and portability