sk-tcp: Move TCP socket options from SkOptsEntry to TcpOptsEntry

Currently some TCP socket option information is stored in SkOptsEntry,
which is a little confusing.

SkOptsEntry should only contain socket options that are common to
all sockets.

In this commit move the TCP-specific socket options from SkOptsEntry
to TcpOptsEntry.

Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
This commit is contained in:
Juntong Deng 2024-05-19 12:55:02 +01:00 committed by Andrei Vagin
parent 1cb75c0b1e
commit 9ba9aff77f
4 changed files with 24 additions and 18 deletions

View file

@ -26,9 +26,12 @@ message sk_opts_entry {
optional bool so_reuseport = 17;
optional bool so_broadcast = 18;
optional bool so_keepalive = 19;
/* These three are deprecated, use tcp_opts_entry instead */
optional uint32 tcp_keepcnt = 20;
optional uint32 tcp_keepidle = 21;
optional uint32 tcp_keepintvl = 22;
optional uint32 so_oobinline = 23;
optional uint32 so_linger = 24;

View file

@ -7,6 +7,9 @@ import "opts.proto";
message tcp_opts_entry {
optional bool cork = 1;
optional bool nodelay = 2;
optional uint32 keepcnt = 3;
optional uint32 keepidle = 4;
optional uint32 keepintvl = 5;
}
message tcp_stream_entry {