Skip to content

Commit 7a6c075

Browse files
committed
Map Linux SO_TIMESTAMP to FreeBSD in ff_syscall_wrapper
Add LINUX_SO_TIMESTAMP (29) to the socket option translation table so that applications using the Linux syscall wrapper can enable packet receive timestamps via setsockopt(fd, SOL_SOCKET, SO_TIMESTAMP, ...).
1 parent d0d8d76 commit 7a6c075

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/ff_syscall_wrapper.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#define LINUX_SO_SNDLOWAT 19
8181
#define LINUX_SO_RCVTIMEO 20
8282
#define LINUX_SO_SNDTIMEO 21
83+
#define LINUX_SO_TIMESTAMP 29
8384
#define LINUX_SO_ACCEPTCONN 30
8485
#define LINUX_SO_PROTOCOL 38
8586

@@ -566,6 +567,8 @@ so_opt_convert(int optname)
566567
return SO_ACCEPTCONN;
567568
case LINUX_SO_PROTOCOL:
568569
return SO_PROTOCOL;
570+
case LINUX_SO_TIMESTAMP:
571+
return SO_TIMESTAMP;
569572
default:
570573
return -1;
571574
}

0 commit comments

Comments
 (0)