diff options
| author | Harout Hedeshian <harouth@codeaurora.org> | 2014-03-04 07:31:47 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:09:38 -0700 |
| commit | d675b4b3d4f238eab48e1815bbbd1d05dee0dede (patch) | |
| tree | 18969447e8a792b68cc82a26627d8c7bfc84d338 /include | |
| parent | 1afe1dec58534a2efd806e79ef1915d711d19a10 (diff) | |
net: socket: Added notifier chains for socket administrative functions
Allows other areas in the kernel to register notifier callbacks which
get invoked whenever something performs an administrative action on a
socket. This patch adds hooks in socket(), bind(), listen(), accept(),
shutdown().
CRs-Fixed: 626021
Change-Id: I4ae99cb2206d7c4eddba69757335c18d10143045
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/sock.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 2d663ee8494d..fca6e414f844 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2293,4 +2293,15 @@ extern int sysctl_optmem_max; extern __u32 sysctl_wmem_default; extern __u32 sysctl_rmem_default; +/* SOCKEV Notifier Events */ +#define SOCKEV_SOCKET 0x00 +#define SOCKEV_BIND 0x01 +#define SOCKEV_LISTEN 0x02 +#define SOCKEV_ACCEPT 0x03 +#define SOCKEV_CONNECT 0x04 +#define SOCKEV_SHUTDOWN 0x05 + +int sockev_register_notify(struct notifier_block *nb); +int sockev_unregister_notify(struct notifier_block *nb); + #endif /* _SOCK_H */ |
