1 #ifndef _SOCKEV_H_
2 #define _SOCKEV_H_
3 
4 #include <linux/types.h>
5 #include <linux/netlink.h>
6 #include <linux/socket.h>
7 
8 enum sknetlink_groups {
9 	SKNLGRP_UNICAST,
10 	SKNLGRP_SOCKEV,
11 	__SKNLGRP_MAX
12 };
13 
14 #define SOCKEV_STR_MAX 32
15 
16 /********************************************************************
17 *		Socket operation messages
18 ****/
19 
20 struct sknlsockevmsg {
21 	__u8 event[SOCKEV_STR_MAX];
22 	__u32 pid; /* (struct task_struct*)->pid */
23 	__u16 skfamily; /* (struct socket*)->sk->sk_family */
24 	__u8 skstate; /* (struct socket*)->sk->sk_state */
25 	__u8 skprotocol; /* (struct socket*)->sk->sk_protocol */
26 	__u16 sktype; /* (struct socket*)->sk->sk_type */
27 	__u64 skflags; /* (struct socket*)->sk->sk_flags */
28 };
29 
30 #endif /* _SOCKEV_H_ */
31 
32