iproute2: ss: add support to expose various inet sockopts
Subsystems (2)
PATCH v2 1/1 iproute2: ss: add support to expose various inet sockopts
This commit adds support to expose the following inet socket options:
-- recverr
-- is_icsk
-- freebind
-- hdrincl
-- mc_loop
-- transparent
-- mc_all
-- nodefrag
-- bind_address_no_port
-- recverr_rfc4884
-- defer_connect
with the option --inet-sockopt. The individual option is only shown when set.
---v1->v2:
- Change the output to only display sockopts that are set.
include/uapi/linux/inet_diag.h | 18 ++++++++++++++ misc/ss.c | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+)
include/uapi/linux/inet_diag.h +18 -0
@@ -160,6 +160,7 @@ enum {INET_DIAG_ULP_INFO ,INET_DIAG_SK_BPF_STORAGES ,INET_DIAG_CGROUP_ID , +INET_DIAG_SOCKOPT , __INET_DIAG_MAX, };
@@ -183,6 +184,23 @@ struct inet_diag_meminfo {__u32 idiag_tmem; }; +/* INET_DIAG_SOCKOPT */ + +struct inet_diag_sockopt { +__u8 recverr:1 , + is_icsk:1 , + freebind:1 , + hdrincl:1 , + mc_loop:1 , + transparent:1 , + mc_all:1 , + nodefrag:1 ; +__u8 bind_address_no_port:1 , + recverr_rfc4884:1 , + defer_connect:1 , + unused:5 ; +}; +/* INET_DIAG_VEGASINFO */ struct tcpvegas_info {
misc/ss.c +43 -0
79 lines not on this page · raw message
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
Quoted 6 lines · Wei Wang
This commit adds support to expose the following inet socket options:
-- recverr
--is_icsk
-- freebind
-- hdrincl
--mc_loop
Quoted 9 lines
-- transparent
--mc_all
-- nodefrag
--bind_address_no_port
--recverr_rfc4884
--defer_connect
with the option --inet-sockopt. The individual option is only shown when set.
[...]
Thanks for your work. It would be nice if you could update the man page for the new option.