aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sock_diag.h
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2015-12-15 22:30:03 -0500
committerDavid S. Miller <davem@davemloft.net>2015-12-15 23:26:51 -0500
commit64be0aed59ad519d6f2160868734f7e278290ac1 (patch)
treeb260bf31b69ecc73f490d13151cb795901ecbb36 /include/linux/sock_diag.h
parentb613f56ec9baf30edf5d9d607b822532a273dad7 (diff)
net: diag: Add the ability to destroy a socket.
This patch adds a SOCK_DESTROY operation, a destroy function pointer to sock_diag_handler, and a diag_destroy function pointer. It does not include any implementation code. Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/sock_diag.h')
-rw-r--r--include/linux/sock_diag.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
index fddebc617469..4018b48f2b3b 100644
--- a/include/linux/sock_diag.h
+++ b/include/linux/sock_diag.h
@@ -15,6 +15,7 @@ struct sock_diag_handler {
15 __u8 family; 15 __u8 family;
16 int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh); 16 int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh);
17 int (*get_info)(struct sk_buff *skb, struct sock *sk); 17 int (*get_info)(struct sk_buff *skb, struct sock *sk);
18 int (*destroy)(struct sk_buff *skb, struct nlmsghdr *nlh);
18}; 19};
19 20
20int sock_diag_register(const struct sock_diag_handler *h); 21int sock_diag_register(const struct sock_diag_handler *h);
@@ -68,4 +69,5 @@ bool sock_diag_has_destroy_listeners(const struct sock *sk)
68} 69}
69void sock_diag_broadcast_destroy(struct sock *sk); 70void sock_diag_broadcast_destroy(struct sock *sk);
70 71
72int sock_diag_destroy(struct sock *sk, int err);
71#endif 73#endif