xref: /OK3568_Linux_fs/buildroot/package/libnfnetlink/0002-include-Sync-with-kernel-headers.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 7a1a07c0028a1c88cd7716a058697c552a563b24 Mon Sep 17 00:00:00 2001
2From: Felix Janda <felix.janda@posteo.de>
3Date: Sat, 16 May 2015 14:49:07 +0200
4Subject: include: Sync with kernel headers
5
6Signed-off-by: Felix Janda <felix.janda@posteo.de>
7Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
8
9[Retrieved from:
10https://git.netfilter.org/libnfnetlink/commit/?id=7a1a07c0028a1c88cd7716a058697c552a563b24]
11Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
12---
13 include/libnfnetlink/linux_nfnetlink.h        | 44 ++++-----------------------
14 include/libnfnetlink/linux_nfnetlink_compat.h | 12 ++++----
15 2 files changed, 12 insertions(+), 44 deletions(-)
16
17diff --git a/include/libnfnetlink/linux_nfnetlink.h b/include/libnfnetlink/linux_nfnetlink.h
18index 76a8550..44a38d6 100644
19--- a/include/libnfnetlink/linux_nfnetlink.h
20+++ b/include/libnfnetlink/linux_nfnetlink.h
21@@ -25,9 +25,9 @@ enum nfnetlink_groups {
22 /* General form of address family dependent message.
23  */
24 struct nfgenmsg {
25-	u_int8_t  nfgen_family;		/* AF_xxx */
26-	u_int8_t  version;		/* nfnetlink version */
27-	u_int16_t    res_id;		/* resource id */
28+	__u8  nfgen_family;		/* AF_xxx */
29+	__u8  version;		/* nfnetlink version */
30+	__be16    res_id;		/* resource id */
31 };
32
33 #define NFNETLINK_V0	0
34@@ -46,40 +46,8 @@ struct nfgenmsg {
35 #define NFNL_SUBSYS_CTNETLINK_EXP	2
36 #define NFNL_SUBSYS_QUEUE		3
37 #define NFNL_SUBSYS_ULOG		4
38-#define NFNL_SUBSYS_COUNT		5
39+#define NFNL_SUBSYS_OSF			5
40+#define NFNL_SUBSYS_IPSET		6
41+#define NFNL_SUBSYS_COUNT		7
42
43-#ifdef __KERNEL__
44-
45-#include <linux/netlink.h>
46-#include <linux/capability.h>
47-#include <net/netlink.h>
48-
49-struct nfnl_callback
50-{
51-	int (*call)(struct sock *nl, struct sk_buff *skb,
52-		struct nlmsghdr *nlh, struct nlattr *cda[]);
53-	const struct nla_policy *policy;	/* netlink attribute policy */
54-	const u_int16_t attr_count;		/* number of nlattr's */
55-};
56-
57-struct nfnetlink_subsystem
58-{
59-	const char *name;
60-	__u8 subsys_id;			/* nfnetlink subsystem ID */
61-	__u8 cb_count;			/* number of callbacks */
62-	const struct nfnl_callback *cb;	/* callback for individual types */
63-};
64-
65-extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
66-extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
67-
68-extern int nfnetlink_has_listeners(unsigned int group);
69-extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
70-			  int echo);
71-extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
72-
73-#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
74-	MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
75-
76-#endif	/* __KERNEL__ */
77 #endif	/* _NFNETLINK_H */
78diff --git a/include/libnfnetlink/linux_nfnetlink_compat.h b/include/libnfnetlink/linux_nfnetlink_compat.h
79index e145176..74b9e55 100644
80--- a/include/libnfnetlink/linux_nfnetlink_compat.h
81+++ b/include/libnfnetlink/linux_nfnetlink_compat.h
82@@ -1,6 +1,8 @@
83 #ifndef _NFNETLINK_COMPAT_H
84 #define _NFNETLINK_COMPAT_H
85-#ifndef __KERNEL__
86+
87+#include <linux/types.h>
88+
89 /* Old nfnetlink macros for userspace */
90
91 /* nfnetlink groups: Up to 32 maximum */
92@@ -18,10 +20,9 @@
93  * ! nfnetlink use the same attributes methods. - J. Schulist.
94  */
95
96-struct nfattr
97-{
98-	u_int16_t nfa_len;
99-	u_int16_t nfa_type;	/* we use 15 bits for the type, and the highest
100+struct nfattr {
101+	__u16 nfa_len;
102+	__u16 nfa_type;	/* we use 15 bits for the type, and the highest
103 				 * bit to indicate whether the payload is nested */
104 };
105
106@@ -57,5 +58,4 @@ struct nfattr
107         + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
108 #define NFM_PAYLOAD(n)  NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
109
110-#endif /* ! __KERNEL__ */
111 #endif /* _NFNETLINK_COMPAT_H */
112--
113cgit v1.2.3
114
115