Python Netlink Multicast Communication in Kernels above 4
问题 I was trying to reproduce the example from a previous SO post on a kernel above 4 (4.1): #include <linux/module.h> #include <linux/kernel.h> #include <linux/netlink.h> #include <net/netlink.h> #include <net/net_namespace.h> /* Protocol family, consistent in both kernel prog and user prog. */ #define MYPROTO NETLINK_USERSOCK /* Multicast group, consistent in both kernel prog and user prog. */ #define MYGRP 31 static struct sock *nl_sk = NULL; static void send_to_user(void) { struct sk_buff