| 1 | #cxx . . $ `<file>/include/linux/netfilter/nfnetlink.h`/ifndef _NFNETLINK_H |
| 2 | #define _NFNETLINK_Hcxx . . $ `include/linux/netfilter/nfnetlink.h:2:9`! |
| 3 | #include <linux/types.h> |
| 4 | #include <linux/netfilter/nfnetlink_compat.h> |
| 5 | |
| 6 | enum nfnetlink_groupscxx . . $ nfnetlink_groups# { |
| 7 | NFNLGRP_NONEcxx . . $ NFNLGRP_NONE., |
| 8 | #define NFNLGRP_NONEcxx . . $ `include/linux/netfilter/nfnetlink.h:8:9`! NFNLGRP_NONE |
| 9 | NFNLGRP_CONNTRACK_NEWcxx . . $ NFNLGRP_CONNTRACK_NEW., |
| 10 | #define NFNLGRP_CONNTRACK_NEWcxx . . $ `include/linux/netfilter/nfnetlink.h:10:9`! NFNLGRP_CONNTRACK_NEW |
| 11 | NFNLGRP_CONNTRACK_UPDATEcxx . . $ NFNLGRP_CONNTRACK_UPDATE., |
| 12 | #define NFNLGRP_CONNTRACK_UPDATEcxx . . $ `include/linux/netfilter/nfnetlink.h:12:9`! NFNLGRP_CONNTRACK_UPDATE |
| 13 | NFNLGRP_CONNTRACK_DESTROYcxx . . $ NFNLGRP_CONNTRACK_DESTROY., |
| 14 | #define NFNLGRP_CONNTRACK_DESTROYcxx . . $ `include/linux/netfilter/nfnetlink.h:14:9`! NFNLGRP_CONNTRACK_DESTROY |
| 15 | NFNLGRP_CONNTRACK_EXP_NEWcxx . . $ NFNLGRP_CONNTRACK_EXP_NEW., |
| 16 | #define NFNLGRP_CONNTRACK_EXP_NEWcxx . . $ `include/linux/netfilter/nfnetlink.h:16:9`! NFNLGRP_CONNTRACK_EXP_NEW |
| 17 | NFNLGRP_CONNTRACK_EXP_UPDATEcxx . . $ NFNLGRP_CONNTRACK_EXP_UPDATE., |
| 18 | #define NFNLGRP_CONNTRACK_EXP_UPDATEcxx . . $ `include/linux/netfilter/nfnetlink.h:18:9`! NFNLGRP_CONNTRACK_EXP_UPDATE |
| 19 | NFNLGRP_CONNTRACK_EXP_DESTROYcxx . . $ NFNLGRP_CONNTRACK_EXP_DESTROY., |
| 20 | #define NFNLGRP_CONNTRACK_EXP_DESTROYcxx . . $ `include/linux/netfilter/nfnetlink.h:20:9`! NFNLGRP_CONNTRACK_EXP_DESTROY |
| 21 | NFNLGRP_NFTABLEScxx . . $ NFNLGRP_NFTABLES., |
| 22 | #define NFNLGRP_NFTABLEScxx . . $ `include/linux/netfilter/nfnetlink.h:22:9`! NFNLGRP_NFTABLES |
| 23 | __NFNLGRP_MAXcxx . . $ __NFNLGRP_MAX., |
| 24 | }; |
| 25 | #define NFNLGRP_MAXcxx . . $ `include/linux/netfilter/nfnetlink.h:25:9`! (__NFNLGRP_MAX - 1) |
| 26 | |
| 27 | /* General form of address family dependent message. |
| 28 | */ |
| 29 | struct nfgenmsgcxx . . $ nfgenmsg# { |
| 30 | __u8cxx . . $ __u8# nfgen_familycxx . . $ nfgenmsg#nfgen_family.; /* AF_xxx */ |
| 31 | __u8cxx . . $ __u8# versioncxx . . $ nfgenmsg#version.; /* nfnetlink version */ |
| 32 | __be16cxx . . $ __be16# res_idcxx . . $ nfgenmsg#res_id.; /* resource id */ |
| 33 | }; |
| 34 | |
| 35 | #define NFNETLINK_V0cxx . . $ `include/linux/netfilter/nfnetlink.h:35:9`! 0 |
| 36 | |
| 37 | /* netfilter netlink message types are split in two pieces: |
| 38 | * 8 bit subsystem, 8bit operation. |
| 39 | */ |
| 40 | |
| 41 | #define NFNL_SUBSYS_IDcxx . . $ `include/linux/netfilter/nfnetlink.h:41:9`!(x) ((x & 0xff00) >> 8) |
| 42 | #define NFNL_MSG_TYPEcxx . . $ `include/linux/netfilter/nfnetlink.h:42:9`!(x) (x & 0x00ff) |
| 43 | |
| 44 | /* No enum here, otherwise __stringify() trick of MODULE_ALIAS_NFNL_SUBSYS() |
| 45 | * won't work anymore */ |
| 46 | #define NFNL_SUBSYS_NONEcxx . . $ `include/linux/netfilter/nfnetlink.h:46:9`! 0 |
| 47 | #define NFNL_SUBSYS_CTNETLINKcxx . . $ `include/linux/netfilter/nfnetlink.h:47:9`! 1 |
| 48 | #define NFNL_SUBSYS_CTNETLINK_EXPcxx . . $ `include/linux/netfilter/nfnetlink.h:48:9`! 2 |
| 49 | #define NFNL_SUBSYS_QUEUEcxx . . $ `include/linux/netfilter/nfnetlink.h:49:9`! 3 |
| 50 | #define NFNL_SUBSYS_ULOGcxx . . $ `include/linux/netfilter/nfnetlink.h:50:9`! 4 |
| 51 | #define NFNL_SUBSYS_OSFcxx . . $ `include/linux/netfilter/nfnetlink.h:51:9`! 5 |
| 52 | #define NFNL_SUBSYS_IPSETcxx . . $ `include/linux/netfilter/nfnetlink.h:52:9`! 6 |
| 53 | #define NFNL_SUBSYS_ACCTcxx . . $ `include/linux/netfilter/nfnetlink.h:53:9`! 7 |
| 54 | #define NFNL_SUBSYS_CTNETLINK_TIMEOUTcxx . . $ `include/linux/netfilter/nfnetlink.h:54:9`! 8 |
| 55 | #define NFNL_SUBSYS_CTHELPERcxx . . $ `include/linux/netfilter/nfnetlink.h:55:9`! 9 |
| 56 | #define NFNL_SUBSYS_NFTABLEScxx . . $ `include/linux/netfilter/nfnetlink.h:56:9`! 10 |
| 57 | #define NFNL_SUBSYS_NFT_COMPATcxx . . $ `include/linux/netfilter/nfnetlink.h:57:9`! 11 |
| 58 | #define NFNL_SUBSYS_COUNTcxx . . $ `include/linux/netfilter/nfnetlink.h:58:9`! 12 |
| 59 | |
| 60 | #ifdef __KERNEL__ |
| 61 | |
| 62 | #include <linux/netlink.h> |
| 63 | #include <linux/capability.h> |
| 64 | #include <net/netlink.h> |
| 65 | |
| 66 | struct nfnl_callback { |
| 67 | int (*call)(struct sock *nl, struct sk_buff *skb, |
| 68 | const struct nlmsghdr *nlh, |
| 69 | const struct nlattr * const cda[]); |
| 70 | int (*call_rcu)(struct sock *nl, struct sk_buff *skb, |
| 71 | const struct nlmsghdr *nlh, |
| 72 | const struct nlattr * const cda[]); |
| 73 | const struct nla_policy *policy; /* netlink attribute policy */ |
| 74 | const u_int16_t attr_count; /* number of nlattr's */ |
| 75 | }; |
| 76 | |
| 77 | struct nfnetlink_subsystem { |
| 78 | const char *name; |
| 79 | __u8 subsys_id; /* nfnetlink subsystem ID */ |
| 80 | __u8 cb_count; /* number of callbacks */ |
| 81 | const struct nfnl_callback *cb; /* callback for individual types */ |
| 82 | }; |
| 83 | |
| 84 | extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n); |
| 85 | extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); |
| 86 | |
| 87 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); |
| 88 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned int group, |
| 89 | int echo, gfp_t flags); |
| 90 | extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); |
| 91 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); |
| 92 | |
| 93 | extern void nfnl_lock(void); |
| 94 | extern void nfnl_unlock(void); |
| 95 | |
| 96 | #define MODULE_ALIAS_NFNL_SUBSYS(subsys) \ |
| 97 | MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys)) |
| 98 | |
| 99 | #endif /* __KERNEL__ */ |
| 100 | |
| 101 | /* Reserved control nfnetlink messages */ |
| 102 | #define NFNL_MSG_BATCH_BEGINcxx . . $ `include/linux/netfilter/nfnetlink.h:102:9`! NLMSG_MIN_TYPEcxx . . $ `<external>/10309334508915867907/netlink.h:117:9`! |
| 103 | #define NFNL_MSG_BATCH_ENDcxx . . $ `include/linux/netfilter/nfnetlink.h:103:9`! NLMSG_MIN_TYPEcxx . . $ `<external>/10309334508915867907/netlink.h:117:9`!+1 |
| 104 | |
| 105 | #endif /* _NFNETLINK_H */ |