1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
diff -ru libmnl-1.0.4-org/configure libmnl-1.0.4/configure
--- libmnl-1.0.4-org/configure 2022-08-26 00:52:31.000000000 +0100
+++ libmnl-1.0.4/configure 2022-08-26 00:48:21.000000000 +0100
@@ -11529,10 +11529,10 @@
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-case "$host" in
-*-*-linux* | *-*-uclinux*) ;;
-*) as_fn_error $? "Linux only, dude!" "$LINENO" 5;;
-esac
+#case "$host" in
+#*-*-linux* | *-*-uclinux*) ;;
+#*) as_fn_error $? "Linux only, dude!" "$LINENO" 5;;
+#esac
regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT"
regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
diff -ru libmnl-1.0.4-org/examples/netfilter/nfct-daemon.c libmnl-1.0.4/examples/netfilter/nfct-daemon.c
--- libmnl-1.0.4-org/examples/netfilter/nfct-daemon.c 2022-08-26 00:52:31.000000000 +0100
+++ libmnl-1.0.4/examples/netfilter/nfct-daemon.c 2022-08-26 00:42:15.000000000 +0100
@@ -21,6 +21,9 @@
#include <sys/queue.h>
+// /usr/src/linux-headers-5.18.0-4-common/arch/alpha/include/uapi/asm/socket.h
+#define SO_RCVBUFFORCE 0x100b
+
struct nstats {
LIST_ENTRY(nstats) list;
Only in libmnl-1.0.4/examples/netfilter: nfct-daemon.c~
diff -ru libmnl-1.0.4-org/examples/rtnl/rtnl-link-dump.c libmnl-1.0.4/examples/rtnl/rtnl-link-dump.c
--- libmnl-1.0.4-org/examples/rtnl/rtnl-link-dump.c 2022-08-26 00:52:31.000000000 +0100
+++ libmnl-1.0.4/examples/rtnl/rtnl-link-dump.c 2022-08-26 00:43:39.000000000 +0100
@@ -10,6 +10,9 @@
#include <linux/if_link.h>
#include <linux/rtnetlink.h>
+// /usr/src/linux-headers-5.18.0-4-common/include/linux/socket.h
+#define AF_PACKET 17 /* Packet family */
+
static int data_attr_cb(const struct nlattr *attr, void *data)
{
const struct nlattr **tb = data;
diff -ru libmnl-1.0.4-org/examples/rtnl/rtnl-link-dump2.c libmnl-1.0.4/examples/rtnl/rtnl-link-dump2.c
--- libmnl-1.0.4-org/examples/rtnl/rtnl-link-dump2.c 2022-08-26 00:52:31.000000000 +0100
+++ libmnl-1.0.4/examples/rtnl/rtnl-link-dump2.c 2022-08-26 00:43:32.000000000 +0100
@@ -9,6 +9,9 @@
#include <linux/if_link.h>
#include <linux/rtnetlink.h>
+// /usr/src/linux-headers-5.18.0-4-common/include/linux/socket.h
+#define AF_PACKET 17 /* Packet family */
+
static int data_attr_cb(const struct nlattr *attr, void *data)
{
/* skip unsupported attribute in user-space */
diff -ru libmnl-1.0.4-org/examples/rtnl/rtnl-link-dump3.c libmnl-1.0.4/examples/rtnl/rtnl-link-dump3.c
--- libmnl-1.0.4-org/examples/rtnl/rtnl-link-dump3.c 2022-08-26 00:52:31.000000000 +0100
+++ libmnl-1.0.4/examples/rtnl/rtnl-link-dump3.c 2022-08-26 00:44:19.000000000 +0100
@@ -9,6 +9,9 @@
#include <linux/if_link.h>
#include <linux/rtnetlink.h>
+// /usr/src/linux-headers-5.18.0-4-common/include/linux/socket.h
+#define AF_PACKET 17 /* Packet family */
+
static int data_cb(const struct nlmsghdr *nlh, void *data)
{
struct ifinfomsg *ifm = mnl_nlmsg_get_payload(nlh);
diff -ru libmnl-1.0.4-org/src/socket.c libmnl-1.0.4/src/socket.c
--- libmnl-1.0.4-org/src/socket.c 2022-08-26 00:52:31.000000000 +0100
+++ libmnl-1.0.4/src/socket.c 2022-08-26 00:45:30.000000000 +0100
@@ -16,6 +16,9 @@
#include <errno.h>
#include "internal.h"
+//defined in /usr/src/linux-headers-5.18.0-4-common/include/linux/socket.h
+#define AF_NETLINK 16
+
/**
* \mainpage
*
|