5 #include <linux/netlink.h>
6 #include <linux/capability.h>
7 #include <net/netlink.h>
8 #include <uapi/linux/netfilter/nfnetlink.h>
10 struct nfnl_callback
{
11 int (*call
)(struct sock
*nl
, struct sk_buff
*skb
,
12 const struct nlmsghdr
*nlh
,
13 const struct nlattr
* const cda
[]);
14 int (*call_rcu
)(struct sock
*nl
, struct sk_buff
*skb
,
15 const struct nlmsghdr
*nlh
,
16 const struct nlattr
* const cda
[]);
17 int (*call_batch
)(struct sock
*nl
, struct sk_buff
*skb
,
18 const struct nlmsghdr
*nlh
,
19 const struct nlattr
* const cda
[]);
20 const struct nla_policy
*policy
; /* netlink attribute policy */
21 const u_int16_t attr_count
; /* number of nlattr's */
24 struct nfnetlink_subsystem
{
26 __u8 subsys_id
; /* nfnetlink subsystem ID */
27 __u8 cb_count
; /* number of callbacks */
28 const struct nfnl_callback
*cb
; /* callback for individual types */
29 int (*commit
)(struct sk_buff
*skb
);
30 int (*abort
)(struct sk_buff
*skb
);
33 int nfnetlink_subsys_register(const struct nfnetlink_subsystem
*n
);
34 int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem
*n
);
36 int nfnetlink_has_listeners(struct net
*net
, unsigned int group
);
37 struct sk_buff
*nfnetlink_alloc_skb(struct net
*net
, unsigned int size
,
38 u32 dst_portid
, gfp_t gfp_mask
);
39 int nfnetlink_send(struct sk_buff
*skb
, struct net
*net
, u32 portid
,
40 unsigned int group
, int echo
, gfp_t flags
);
41 int nfnetlink_set_err(struct net
*net
, u32 portid
, u32 group
, int error
);
42 int nfnetlink_unicast(struct sk_buff
*skb
, struct net
*net
, u32 portid
,
45 void nfnl_lock(__u8 subsys_id
);
46 void nfnl_unlock(__u8 subsys_id
);
48 #define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
49 MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
51 #endif /* _NFNETLINK_H */
This page took 0.067738 seconds and 5 git commands to generate.