mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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>
This commit is contained in:
committed by
David S. Miller
parent
b613f56ec9
commit
64be0aed59
@@ -15,6 +15,7 @@ struct sock_diag_handler {
|
||||
__u8 family;
|
||||
int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh);
|
||||
int (*get_info)(struct sk_buff *skb, struct sock *sk);
|
||||
int (*destroy)(struct sk_buff *skb, struct nlmsghdr *nlh);
|
||||
};
|
||||
|
||||
int sock_diag_register(const struct sock_diag_handler *h);
|
||||
@@ -68,4 +69,5 @@ bool sock_diag_has_destroy_listeners(const struct sock *sk)
|
||||
}
|
||||
void sock_diag_broadcast_destroy(struct sock *sk);
|
||||
|
||||
int sock_diag_destroy(struct sock *sk, int err);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user