tcp: ulp: add functions to dump ulp-specific information
authorDavide Caratti <dcaratti@redhat.com>
Fri, 30 Aug 2019 10:25:48 +0000 (12:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Sep 2019 06:44:28 +0000 (23:44 -0700)
commit61723b393292f1e4ea27f8d123384d50b176c29d
tree6ccca332feeef8a908c4ec63f865048cde4b88ea
parent15a7dea750e0162f273c6e61a94f96944b75b31e
tcp: ulp: add functions to dump ulp-specific information

currently, only getsockopt(TCP_ULP) can be invoked to know if a ULP is on
top of a TCP socket. Extend idiag_get_aux() and idiag_get_aux_size(),
introduced by commit b37e88407c1d ("inet_diag: allow protocols to provide
additional data"), to report the ULP name and other information that can
be made available by the ULP through optional functions.

Users having CAP_NET_ADMIN privileges will then be able to retrieve this
information through inet_diag_handler, if they specify INET_DIAG_INFO in
the request.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
include/uapi/linux/inet_diag.h
net/ipv4/tcp_diag.c