Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d0e7a63 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: Add snapshot of sockev module"

parents 53c5b113 c76c5f05
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,3 +18,4 @@ ifneq ($(VSERVICES_SUPPORT), "")
include include/linux/Kbuild.vservices
endif
header-y += okl4-link-shbuf.h
header-y += sockev.h
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
#define NETLINK_RDMA		20
#define NETLINK_CRYPTO		21	/* Crypto layer */
#define NETLINK_SMC		22	/* SMC monitoring */

#define NETLINK_SOCKEV		23	/* Socket Administrative Events */
#define NETLINK_INET_DIAG	NETLINK_SOCK_DIAG

#define MAX_LINKS 32		
+33 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */

#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_ */
+9 −0
Original line number Diff line number Diff line
@@ -329,6 +329,15 @@ config NET_FLOW_LIMIT
	  with many clients some protection against DoS by a single (spoofed)
	  flow that greatly exceeds average workload.

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
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ obj-$(CONFIG_CGROUP_NET_PRIO) += netprio_cgroup.o
obj-$(CONFIG_CGROUP_NET_CLASSID) += netclassid_cgroup.o
obj-$(CONFIG_LWTUNNEL) += lwtunnel.o
obj-$(CONFIG_LWTUNNEL_BPF) += lwt_bpf.o
obj-$(CONFIG_SOCKEV_NLMCAST) += sockev_nlmcast.o
obj-$(CONFIG_DST_CACHE) += dst_cache.o
obj-$(CONFIG_HWBM) += hwbm.o
obj-$(CONFIG_NET_DEVLINK) += devlink.o
Loading