Files
Tejaswi Tanikella f7f2e20b55 net: Add snapshot of sockev module
This is a snapshot of the sockev module taken as of msm-4.4
commit 33193859886dd87 ("net: core: Send only BIND and LISTEN events.").

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: 1078373
Change-Id: If72b7c9a127d3861d276b681b052be3619bc6562
Acked-by: Manoj Basapathi <manojbm@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
2018-03-12 02:39:53 -07:00

32 lines
726 B
C

#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_ */