diff options
| author | Harout Hedeshian <harouth@codeaurora.org> | 2014-03-04 09:16:53 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:09:38 -0700 |
| commit | 274f3cfdd0a0a14a73b510405cc6fc91abee74e0 (patch) | |
| tree | a80ad016828f45b889cc78ae7692afb965dc1bcb /include/uapi/linux | |
| parent | d675b4b3d4f238eab48e1815bbbd1d05dee0dede (diff) | |
net: sockev: Initial Commit
Added module which subscribes to socket notifier events. Notifier events
are then converted to a multicast netlink message for user space
applications to consume.
CRs-Fixed: 626021
Change-Id: Id5c6808d972b69f5f065d7fba9094e75c6ad0b2c
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/uapi/linux')
| -rw-r--r-- | include/uapi/linux/Kbuild | 1 | ||||
| -rw-r--r-- | include/uapi/linux/netlink.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/sockev.h | 31 |
3 files changed, 33 insertions, 1 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 50d6bb3ac207..2c718ee3ff5d 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -385,6 +385,7 @@ header-y += smiapp.h header-y += snmp.h header-y += sock_diag.h header-y += socket.h +header-y += sockev.h header-y += sockios.h header-y += sonet.h header-y += sonypi.h diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h index f095155d8749..ee4581d652f4 100644 --- a/include/uapi/linux/netlink.h +++ b/include/uapi/linux/netlink.h @@ -27,7 +27,7 @@ #define NETLINK_ECRYPTFS 19 #define NETLINK_RDMA 20 #define NETLINK_CRYPTO 21 /* Crypto layer */ - +#define NETLINK_SOCKEV 22 /* Socket Administrative Events */ #define NETLINK_INET_DIAG NETLINK_SOCK_DIAG #define MAX_LINKS 32 diff --git a/include/uapi/linux/sockev.h b/include/uapi/linux/sockev.h new file mode 100644 index 000000000000..fe6f35a2adf6 --- /dev/null +++ b/include/uapi/linux/sockev.h @@ -0,0 +1,31 @@ +#ifndef _SOCKEV_H_ +#define _SOCKEV_H_ + +#include <linux/types.h> +#include <linux/netlink.h> +#include <linux/socket.h> + +enum sknetlink_groups { + SKNLGRP_UNICAST, + SKNLGRP_SOCKEV, + __SKNLGRP_MAX +}; + +#define SOCKEV_STR_MAX 32 + +/******************************************************************** +* Socket operation messages +****/ + +struct sknlsockevmsg { + __u8 event[SOCKEV_STR_MAX]; + __u32 pid; /* (struct task_struct*)->pid */ + __u16 skfamily; /* (struct socket*)->sk->sk_family */ + __u8 skstate; /* (struct socket*)->sk->sk_state */ + __u8 skprotocol; /* (struct socket*)->sk->sk_protocol */ + __u16 sktype; /* (struct socket*)->sk->sk_type */ + __u64 skflags; /* (struct socket*)->sk->sk_flags */ +}; + +#endif /* _SOCKEV_H_ */ + |
