Loading include/uapi/linux/Kbuild +1 −0 Original line number Diff line number Diff line Loading @@ -399,6 +399,7 @@ header-y += signalfd.h header-y += snmp.h header-y += sock_diag.h header-y += socket.h header-y += sockev.h header-y += sockios.h header-y += som.h header-y += sonet.h Loading include/uapi/linux/netlink.h +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,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 Loading include/uapi/linux/sockev.h 0 → 100644 +31 −0 Original line number Diff line number Diff line #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_ */ net/Kconfig +9 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,15 @@ config BPF_JIT packet sniffing (libpcap/tcpdump). Note : Admin should enable this feature changing /proc/sys/net/core/bpf_jit_enable config SOCKEV_NLMCAST bool "Enable SOCKEV Netlink Multicast" default n ---help--- Default client for SOCKEV notifier events. Sends multicast netlink messages whenever the socket event notifier is invoked. Enable if user space entities need to be notified of socket events without having to poll /proc menu "Network testing" config NET_PKTGEN Loading net/core/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,4 @@ obj-$(CONFIG_TRACEPOINTS) += net-traces.o obj-$(CONFIG_NET_DROP_MONITOR) += drop_monitor.o obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += timestamping.o obj-$(CONFIG_NETPRIO_CGROUP) += netprio_cgroup.o obj-$(CONFIG_SOCKEV_NLMCAST) += sockev_nlmcast.o No newline at end of file Loading
include/uapi/linux/Kbuild +1 −0 Original line number Diff line number Diff line Loading @@ -399,6 +399,7 @@ header-y += signalfd.h header-y += snmp.h header-y += sock_diag.h header-y += socket.h header-y += sockev.h header-y += sockios.h header-y += som.h header-y += sonet.h Loading
include/uapi/linux/netlink.h +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,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 Loading
include/uapi/linux/sockev.h 0 → 100644 +31 −0 Original line number Diff line number Diff line #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_ */
net/Kconfig +9 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,15 @@ config BPF_JIT packet sniffing (libpcap/tcpdump). Note : Admin should enable this feature changing /proc/sys/net/core/bpf_jit_enable config SOCKEV_NLMCAST bool "Enable SOCKEV Netlink Multicast" default n ---help--- Default client for SOCKEV notifier events. Sends multicast netlink messages whenever the socket event notifier is invoked. Enable if user space entities need to be notified of socket events without having to poll /proc menu "Network testing" config NET_PKTGEN Loading
net/core/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,4 @@ obj-$(CONFIG_TRACEPOINTS) += net-traces.o obj-$(CONFIG_NET_DROP_MONITOR) += drop_monitor.o obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += timestamping.o obj-$(CONFIG_NETPRIO_CGROUP) += netprio_cgroup.o obj-$(CONFIG_SOCKEV_NLMCAST) += sockev_nlmcast.o No newline at end of file