Skip to content

Commit

Permalink
feat(socket): add support set socket option SO_MARK
Browse files Browse the repository at this point in the history
```
sock:setoption('mark', 0x8000)
```

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Mar 13, 2024
1 parent 557b319 commit c625d4c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ static struct sock_opt optsets[] = {
{"keepalive", SOL_SOCKET, SO_KEEPALIVE, sockopt_set_boolean},
{"sndbuf", SOL_SOCKET, SO_SNDBUF, sockopt_set_int},
{"rcvbuf", SOL_SOCKET, SO_RCVBUF, sockopt_set_int},
{"mark", SOL_SOCKET, SO_MARK, sockopt_set_int},
{"bindtodevice", SOL_SOCKET, SO_BINDTODEVICE, sockopt_set_bindtodevice},
{"tcp_keepidle", SOL_TCP, TCP_KEEPIDLE, sockopt_set_int},
{"tcp_keepintvl", SOL_TCP, TCP_KEEPINTVL, sockopt_set_int},
Expand Down

0 comments on commit c625d4c

Please sign in to comment.