diff options
author | Davide Caratti <dcaratti@redhat.com> | 2019-08-30 06:25:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-01 02:44:28 -0400 |
commit | 61723b393292f1e4ea27f8d123384d50b176c29d (patch) | |
tree | 6ccca332feeef8a908c4ec63f865048cde4b88ea /include/net/tcp.h | |
parent | 15a7dea750e0162f273c6e61a94f96944b75b31e (diff) |
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>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 77fe87f7a992..c9a3f9688223 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -2122,6 +2122,9 @@ struct tcp_ulp_ops { | |||
2122 | void (*update)(struct sock *sk, struct proto *p); | 2122 | void (*update)(struct sock *sk, struct proto *p); |
2123 | /* cleanup ulp */ | 2123 | /* cleanup ulp */ |
2124 | void (*release)(struct sock *sk); | 2124 | void (*release)(struct sock *sk); |
2125 | /* diagnostic */ | ||
2126 | int (*get_info)(const struct sock *sk, struct sk_buff *skb); | ||
2127 | size_t (*get_info_size)(const struct sock *sk); | ||
2125 | 2128 | ||
2126 | char name[TCP_ULP_NAME_MAX]; | 2129 | char name[TCP_ULP_NAME_MAX]; |
2127 | struct module *owner; | 2130 | struct module *owner; |