mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
94d0ec58e6
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
43 lines
1.5 KiB
C
43 lines
1.5 KiB
C
#ifndef _NFNETLINK_H
|
|
#define _NFNETLINK_H
|
|
|
|
|
|
#include <linux/netlink.h>
|
|
#include <linux/capability.h>
|
|
#include <net/netlink.h>
|
|
#include <uapi/linux/netfilter/nfnetlink.h>
|
|
|
|
struct nfnl_callback {
|
|
int (*call)(struct sock *nl, struct sk_buff *skb,
|
|
const struct nlmsghdr *nlh,
|
|
const struct nlattr * const cda[]);
|
|
int (*call_rcu)(struct sock *nl, struct sk_buff *skb,
|
|
const struct nlmsghdr *nlh,
|
|
const struct nlattr * const cda[]);
|
|
const struct nla_policy *policy; /* netlink attribute policy */
|
|
const u_int16_t attr_count; /* number of nlattr's */
|
|
};
|
|
|
|
struct nfnetlink_subsystem {
|
|
const char *name;
|
|
__u8 subsys_id; /* nfnetlink subsystem ID */
|
|
__u8 cb_count; /* number of callbacks */
|
|
const struct nfnl_callback *cb; /* callback for individual types */
|
|
};
|
|
|
|
extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
|
|
extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
|
|
|
|
extern int nfnetlink_has_listeners(struct net *net, unsigned int group);
|
|
extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned int group,
|
|
int echo, gfp_t flags);
|
|
extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error);
|
|
extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags);
|
|
|
|
extern void nfnl_lock(void);
|
|
extern void nfnl_unlock(void);
|
|
|
|
#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
|
|
MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
|
|
|
|
#endif /* _NFNETLINK_H */
|