]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
src: use NFPROTO_ constants
authorJan Engelhardt <jengelh@medozas.de>
Tue, 18 Nov 2008 11:27:54 +0000 (12:27 +0100)
committerPatrick McHardy <kaber@trash.net>
Tue, 18 Nov 2008 11:27:54 +0000 (12:27 +0100)
Resync netfilter.h from the latest kernel and make use of the new
NFPROTO_ constants that have been introduced.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
78 files changed:
extensions/libip6t_HL.c
extensions/libip6t_LOG.c
extensions/libip6t_REJECT.c
extensions/libip6t_ah.c
extensions/libip6t_dst.c
extensions/libip6t_eui64.c
extensions/libip6t_frag.c
extensions/libip6t_hbh.c
extensions/libip6t_hl.c
extensions/libip6t_icmp6.c
extensions/libip6t_ipv6header.c
extensions/libip6t_mh.c
extensions/libip6t_policy.c
extensions/libip6t_rt.c
extensions/libipt_CLUSTERIP.c
extensions/libipt_DNAT.c
extensions/libipt_ECN.c
extensions/libipt_LOG.c
extensions/libipt_MASQUERADE.c
extensions/libipt_MIRROR.c
extensions/libipt_NETMAP.c
extensions/libipt_REDIRECT.c
extensions/libipt_REJECT.c
extensions/libipt_SAME.c
extensions/libipt_SET.c
extensions/libipt_SNAT.c
extensions/libipt_TTL.c
extensions/libipt_ULOG.c
extensions/libipt_addrtype.c
extensions/libipt_ah.c
extensions/libipt_ecn.c
extensions/libipt_icmp.c
extensions/libipt_policy.c
extensions/libipt_realm.c
extensions/libipt_set.c
extensions/libipt_ttl.c
extensions/libipt_unclean.c
extensions/libxt_CONNMARK.c
extensions/libxt_CONNSECMARK.c
extensions/libxt_DSCP.c
extensions/libxt_MARK.c
extensions/libxt_NFLOG.c
extensions/libxt_NFQUEUE.c
extensions/libxt_NOTRACK.c
extensions/libxt_TCPMSS.c
extensions/libxt_TCPOPTSTRIP.c
extensions/libxt_TOS.c
extensions/libxt_TPROXY.c
extensions/libxt_comment.c
extensions/libxt_connbytes.c
extensions/libxt_connlimit.c
extensions/libxt_connmark.c
extensions/libxt_conntrack.c
extensions/libxt_dccp.c
extensions/libxt_dscp.c
extensions/libxt_esp.c
extensions/libxt_hashlimit.c
extensions/libxt_helper.c
extensions/libxt_iprange.c
extensions/libxt_mac.c
extensions/libxt_multiport.c
extensions/libxt_owner.c
extensions/libxt_physdev.c
extensions/libxt_recent.c
extensions/libxt_sctp.c
extensions/libxt_socket.c
extensions/libxt_state.c
extensions/libxt_tcp.c
extensions/libxt_tcpmss.c
extensions/libxt_tos.c
extensions/libxt_udp.c
include/linux/netfilter.h
include/xtables.h.in
ip6tables.c
iptables.c
libipq/ipq_create_handle.3
libipq/libipq.3
libipq/libipq.c

index e726a945205480137cc20c82bcf06b6c70c3af01..b80642862feed83ca51b2c8628859b63d5b68be7 100644 (file)
@@ -141,7 +141,7 @@ static const struct option HL_opts[] = {
 static struct xtables_target hl_tg6_reg = {
        .name           = "HL",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct ip6t_HL_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip6t_HL_info)),
        .help           = HL_help,
index 07e741c14066976b56dd139357ad0fefa5289570..b75d80634e0a0e8a4ed8e69e7aefc7b3566a254a 100644 (file)
@@ -252,7 +252,7 @@ static void LOG_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target log_tg6_reg = {
     .name          = "LOG",
     .version       = XTABLES_VERSION,
-    .family        = PF_INET6,
+    .family        = NFPROTO_IPV6,
     .size          = XT_ALIGN(sizeof(struct ip6t_log_info)),
     .userspacesize = XT_ALIGN(sizeof(struct ip6t_log_info)),
     .help          = LOG_help,
index 914480914e5bb76f2272f5de5bee1813604466d0..9c6fe7aa044304e8ec385c9e81f40d9c82bdd845 100644 (file)
@@ -133,7 +133,7 @@ static void REJECT_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target reject_tg6_reg = {
        .name = "REJECT",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct ip6t_reject_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip6t_reject_info)),
        .help           = REJECT_help,
index 96b07ef73298385f440876ea365132e1bd7d8c10..9f7cfabf098bb9f76b686f0d045ae854e4051fe5 100644 (file)
@@ -189,7 +189,7 @@ static void ah_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match ah_mt6_reg = {
        .name          = "ah",
        .version       = XTABLES_VERSION,
-       .family        = PF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct ip6t_ah)),
        .userspacesize = XT_ALIGN(sizeof(struct ip6t_ah)),
        .help          = ah_help,
index aff20b7e169e0ea7567ed4e82235df82be42b0bd..dabca0d64e8c70be581164789ba7b4869eb6c2d1 100644 (file)
@@ -224,7 +224,7 @@ static void dst_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match dst_mt6_reg = {
        .name          = "dst",
        .version       = XTABLES_VERSION,
-       .family        = PF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct ip6t_opts)),
        .userspacesize = XT_ALIGN(sizeof(struct ip6t_opts)),
        .help          = dst_help,
index 8754b9365405ff984748f433c171de6dcae996fe..4caa66adeb5eee0db99cce7593849cc52f0a2be0 100644 (file)
@@ -28,7 +28,7 @@ static int eui64_parse(int c, char **argv, int invert, unsigned int *flags,
 static struct xtables_match eui64_mt6_reg = {
        .name           = "eui64",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(int)),
        .userspacesize  = XT_ALIGN(sizeof(int)),
        .help           = eui64_help,
index b651a95ffdda1ee1a01f2875f219af02a4e4de45..1a6e3be83f69625886ea94809221520fc6f232ea 100644 (file)
@@ -234,7 +234,7 @@ static void frag_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match frag_mt6_reg = {
        .name          = "frag",
        .version       = XTABLES_VERSION,
-       .family        = PF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct ip6t_frag)),
        .userspacesize = XT_ALIGN(sizeof(struct ip6t_frag)),
        .help          = frag_help,
index d981f66f0203eb04e38afc0adc9df9532def800e..e07955f812f2fc6ae55a1fcd7d6361842173f97f 100644 (file)
@@ -211,7 +211,7 @@ static void hbh_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match hbh_mt6_reg = {
        .name           = "hbh",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct ip6t_opts)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip6t_opts)),
        .help           = hbh_help,
index b895e3649f7051f1e069dfc4ae064b579ace79e6..1046b2ec06fa7a812f8213c060e2a422ed5e0f24 100644 (file)
@@ -127,7 +127,7 @@ static const struct option hl_opts[] = {
 static struct xtables_match hl_mt6_reg = {
        .name          = "hl",
        .version       = XTABLES_VERSION,
-       .family        = PF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct ip6t_hl_info)),
        .userspacesize = XT_ALIGN(sizeof(struct ip6t_hl_info)),
        .help          = hl_help,
index e60c5bd7e39c62731bfbddb3d81d9126144ae7a8..2b3bd6846be706ee8ec466ac2210e08988f39d63 100644 (file)
@@ -247,7 +247,7 @@ static void icmp6_check(unsigned int flags)
 static struct xtables_match icmp6_mt6_reg = {
        .name           = "icmp6",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct ip6t_icmp)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip6t_icmp)),
        .help           = icmp6_help,
index a3cfc62facbb5494a953314ad58137af4317aa03..63c60bffae4bd5d464fd7c22cd652034944c4d70 100644 (file)
@@ -284,7 +284,7 @@ static void ipv6header_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match ipv6header_mt6_reg = {
        .name           = "ipv6header",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct ip6t_ipv6header_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip6t_ipv6header_info)),
        .help           = ipv6header_help,
index cc7476e55b8810ab1a626498fd1b57cff48c787e..305fadb61548993dcb2f70047e420ff9621d28dc 100644 (file)
@@ -225,7 +225,7 @@ static const struct option mh_opts[] = {
 static struct xtables_match mh_mt6_reg = {
        .name           = "mh",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct ip6t_mh)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip6t_mh)),
        .help           = mh_help,
index 2a64caab4e7513deeedb8ec0d550899cd3ee1693..92e6d0d8e8f98d802b3692b89834676dbc5e896c 100644 (file)
@@ -444,7 +444,7 @@ static void policy_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match policy_mt6_reg = {
        .name           = "policy",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct ip6t_policy_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip6t_policy_info)),
        .help           = policy_help,
index 207f515444ecb539366e16cc169b0affe1b37cec..25e410c286cdc2fcca91d00eb7a61ef2bdc243f9 100644 (file)
@@ -326,7 +326,7 @@ static void rt_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match rt_mt6_reg = {
        .name           = "rt",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct ip6t_rt)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip6t_rt)),
        .help           = rt_help,
index e9789e96e51be0a1d1b0e1ccab6baff1cb25dbcd..7e73b9ec8bc0de50691c3c734cf1efb7a725b4aa 100644 (file)
@@ -233,7 +233,7 @@ static void CLUSTERIP_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target clusterip_tg_reg = {
        .name           = "CLUSTERIP",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)),
        .userspacesize  = offsetof(struct ipt_clusterip_tgt_info, config),
        .help           = CLUSTERIP_help,
index 5608947e17abeb3ca48238a53671cd72898e58d2..da99b7fe4166c9eaa499c338c2e9c9457729ae5a 100644 (file)
@@ -240,7 +240,7 @@ static void DNAT_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target dnat_tg_reg = {
        .name           = "DNAT",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = DNAT_help,
index 0ef480b0ab01f5bee84dfd114483015e1cd19cb6..1336bb9a0e069b76a712642d569909941cf73c70 100644 (file)
@@ -153,7 +153,7 @@ static void ECN_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target ecn_tg_reg = {
        .name           = "ECN",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_ECN_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_ECN_info)),
        .help           = ECN_help,
index 57c35b05bf0ecaf35e5d095e215e1a49972a6799..d4f5e46f3862b236de501ed6d8db82fc6b3cc9c6 100644 (file)
@@ -254,7 +254,7 @@ static void LOG_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target log_tg_reg = {
     .name          = "LOG",
     .version       = XTABLES_VERSION,
-    .family        = PF_INET,
+    .family        = NFPROTO_IPV4,
     .size          = XT_ALIGN(sizeof(struct ipt_log_info)),
     .userspacesize = XT_ALIGN(sizeof(struct ipt_log_info)),
     .help          = LOG_help,
index 32410c09d39c9f60bd40bb8e1a72644fb57803c4..ffbff580d97f8a41b532a69eea55c95c82587968 100644 (file)
@@ -147,7 +147,7 @@ MASQUERADE_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target masquerade_tg_reg = {
        .name           = "MASQUERADE",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = MASQUERADE_help,
index 0365f4755079295edc5b0fc54dade5d4de020f24..1322f59e93090430584daeccfd41bdd73d761ce5 100644 (file)
@@ -21,7 +21,7 @@ static int MIRROR_parse(int c, char **argv, int invert, unsigned int *flags,
 static struct xtables_target mirror_tg_reg = {
        .name           = "MIRROR",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
        .help           = MIRROR_help,
index 3a5c613bbab5614e18a232a91d888367630e157e..85334bcd79cc5c8b05883aa364bea71376909e1c 100644 (file)
@@ -166,7 +166,7 @@ static void NETMAP_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target netmap_tg_reg = {
        .name           = MODULENAME,
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = NETMAP_help,
index e30c139248a06a16ba2ad013039ccb2b9ff7417b..79e47310a1736ba1ac5b2600ab8da932135e64f7 100644 (file)
@@ -158,7 +158,7 @@ static void REDIRECT_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target redirect_tg_reg = {
        .name           = "REDIRECT",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = REDIRECT_help,
index 5f9407cafacfa40939766fd8da1a7d2334cbf80d..2aeb6dfe6d2c0983212025bf8eeb62fba352d248 100644 (file)
@@ -152,7 +152,7 @@ static void REJECT_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target reject_tg_reg = {
        .name           = "REJECT",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_reject_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_reject_info)),
        .help           = REJECT_help,
index baf5fee5cf7b4cd5bef829be524cc2987dc28235..51507ebdc460e4c312667ec7804490e2d3e20e0c 100644 (file)
@@ -202,7 +202,7 @@ static void SAME_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target same_tg_reg = {
        .name           = "SAME",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_same_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_same_info)),
        .help           = SAME_help,
index fa815714fcd9a6ac7ea6997e0a107373e6e048c6..7bf3510f9d818a42280f14be079560f5a13c5901 100644 (file)
@@ -149,7 +149,7 @@ static void SET_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target set_tg_reg = {
        .name           = "SET",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_set_info_target)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_set_info_target)),
        .help           = SET_help,
index 7d04761b712b3811422efe621549484855fc962d..fbd2a80daddb38f773c709511d57097dd580da5e 100644 (file)
@@ -241,7 +241,7 @@ static void SNAT_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target snat_tg_reg = {
        .name           = "SNAT",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = SNAT_help,
index 9c22ba3a81c7e450b85c9f4f0ece9179ed7c70e9..7939dac52985f02f4c5e1ae06a61bf5b77757971 100644 (file)
@@ -141,7 +141,7 @@ static const struct option TTL_opts[] = {
 static struct xtables_target ttl_tg_reg = {
        .name           = "TTL",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_TTL_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_TTL_info)),
        .help           = TTL_help,
index bec693d0e599fcb2372af1e861b540996a3f6bb0..8c191d043face80f51e1a4f4b12ae5fd12ecd1e2 100644 (file)
@@ -182,7 +182,7 @@ static void ULOG_print(const void *ip, const struct xt_entry_target *target,
 static struct xtables_target ulog_tg_reg = {
        .name           = "ULOG",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_ulog_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_ulog_info)),
        .help           = ULOG_help,
index 97ad8044bbeb936797ca71d16e8211eeaee632c0..e0de799a90dd103d9c9af02445bb1068a61c11a9 100644 (file)
@@ -327,7 +327,7 @@ static const struct option addrtype_opts_v1[] = {
 static struct xtables_match addrtype_mt_reg_v0 = {
        .name           = "addrtype",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_addrtype_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_addrtype_info)),
        .help           = addrtype_help_v0,
@@ -341,7 +341,7 @@ static struct xtables_match addrtype_mt_reg_v0 = {
 static struct xtables_match addrtype_mt_reg_v1 = {
        .name           = "addrtype",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_addrtype_info_v1)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_addrtype_info_v1)),
        .help           = addrtype_help_v1,
index 1f4f397f00461d8fc7c76be5506297f2f5ba0e48..b308053e00f1a48069e1ac059b0f85f9620fdd5d 100644 (file)
@@ -152,7 +152,7 @@ static void ah_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match ah_mt_reg = {
        .name           = "ah",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_ah)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_ah)),
        .help           = ah_help,
index 4dfaac9bc3679866f1e318a4b0de0844ca414819..30eaec21617eea95b382270a524d72488d605127 100644 (file)
@@ -144,7 +144,7 @@ static void ecn_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match ecn_mt_reg = {
     .name          = "ecn",
     .version       = XTABLES_VERSION,
-    .family        = PF_INET,
+    .family        = NFPROTO_IPV4,
     .size          = XT_ALIGN(sizeof(struct ipt_ecn_info)),
     .userspacesize = XT_ALIGN(sizeof(struct ipt_ecn_info)),
     .help          = ecn_help,
index 8faf66f6add145bf5a9b2f5b58e7c43fcfdcc78d..314a122a0f8a4440f01c88a7c69f49e398ad8a2b 100644 (file)
@@ -270,7 +270,7 @@ static void icmp_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match icmp_mt_reg = {
        .name           = "icmp",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_icmp)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_icmp)),
        .help           = icmp_help,
index fc55facc8940aa526d43dfd9d72e0746d7e9487d..0268685021332ff394b1316f2f54a1abaa50b58d 100644 (file)
@@ -410,7 +410,7 @@ static void policy_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match policy_mt_reg = {
        .name           = "policy",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_policy_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_policy_info)),
        .help           = policy_help,
index ba89abf9f429fafe20fdb639a3ac73e82d513b92..38128530803230de6277659fa25a861d433a3c3a 100644 (file)
@@ -237,7 +237,7 @@ static void realm_check(unsigned int flags)
 static struct xtables_match realm_mt_reg = {
        .name           = "realm",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_realm_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_realm_info)),
        .help           = realm_help,
index 1bacddabd893b9581bae66981d338cbc04eeefb1..8aa4d1e7d1819aa46e86e8516eb3e98ddbcd0864 100644 (file)
@@ -138,7 +138,7 @@ static void set_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match set_mt_reg = {
        .name           = "set",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_set_info_match)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_set_info_match)),
        .help           = set_help,
index 25b92063be94a836683a9426a1a35b51d91f66eb..cd93ca0aa63a093266c7ee6bcb964576a4813112 100644 (file)
@@ -150,7 +150,7 @@ static const struct option ttl_opts[] = {
 static struct xtables_match ttl_mt_reg = {
        .name           = "ttl",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct ipt_ttl_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct ipt_ttl_info)),
        .help           = ttl_help,
index 968e0342aabc398b5dd5f0fef3dbbd111b026c8c..50a3ec309c9a8bcf6f50fd4e2a9601c29c62282e 100644 (file)
@@ -18,7 +18,7 @@ static int unclean_parse(int c, char **argv, int invert, unsigned int *flags,
 static struct xtables_match unclean_mt_reg = {
        .name           = "unclean",
        .version        = XTABLES_VERSION,
-       .family         = PF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
        .help           = unclean_help,
index 9f83111e5af08deddfc86fb5f335180c2219bdb5..2ad2759119321b86e0df34a7e54878aa4e3b67fc 100644 (file)
@@ -399,7 +399,7 @@ connmark_tg_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target connmark_target = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "CONNMARK",
        .revision       = 0,
        .version        = XTABLES_VERSION,
@@ -415,7 +415,7 @@ static struct xtables_target connmark_target = {
 };
 
 static struct xtables_target connmark_target6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "CONNMARK",
        .revision       = 0,
        .version        = XTABLES_VERSION,
@@ -434,7 +434,7 @@ static struct xtables_target connmark_tg_reg = {
        .version        = XTABLES_VERSION,
        .name           = "CONNMARK",
        .revision       = 1,
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
        .help           = connmark_tg_help,
@@ -450,7 +450,7 @@ static struct xtables_target connmark_tg6_reg = {
        .version        = XTABLES_VERSION,
        .name           = "CONNMARK",
        .revision       = 1,
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
        .help           = connmark_tg_help,
index 2c425cb8081387dd2af37742abba2833839ec88f..05dbf70df53acd5498a30262d43837e8de08e9e5 100644 (file)
@@ -107,7 +107,7 @@ CONNSECMARK_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target connsecmark_target = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "CONNSECMARK",
        .version        = XTABLES_VERSION,
        .revision       = 0,
@@ -122,7 +122,7 @@ static struct xtables_target connsecmark_target = {
 };
 
 static struct xtables_target connsecmark_target6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "CONNSECMARK",
        .version        = XTABLES_VERSION,
        .revision       = 0,
index 17bad1698a43f71ec99be0ab6d00b03db1de8f9d..6625db119ee6ae618fc704c11359cb2b387280b9 100644 (file)
@@ -131,7 +131,7 @@ static void DSCP_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target dscp_target = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "DSCP",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_DSCP_info)),
@@ -145,7 +145,7 @@ static struct xtables_target dscp_target = {
 };
 
 static struct xtables_target dscp_target6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "DSCP",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_DSCP_info)),
index 8184976464b5a69243aeb01a0a33e8baed064a48..95bce89aab6d49654bf700361dae3409a3a94f37 100644 (file)
@@ -276,7 +276,7 @@ static void mark_tg_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target mark_target_v0 = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "MARK",
        .version        = XTABLES_VERSION,
        .revision       = 0,
@@ -291,7 +291,7 @@ static struct xtables_target mark_target_v0 = {
 };
 
 static struct xtables_target mark_target_v1 = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "MARK",
        .version        = XTABLES_VERSION,
        .revision       = 1,
@@ -306,7 +306,7 @@ static struct xtables_target mark_target_v1 = {
 };
 
 static struct xtables_target mark_target6_v0 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "MARK",
        .version        = XTABLES_VERSION,
        .revision       = 0,
index e5b6719c02404fb05fbb39bb3446418d7fe3090a..fe22e981b35ffc99f723331e0ddfa8340360ad56 100644 (file)
@@ -139,7 +139,7 @@ static void NFLOG_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target nflog_target = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "NFLOG",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_nflog_info)),
@@ -153,7 +153,7 @@ static struct xtables_target nflog_target = {
 };
 
 static struct xtables_target nflog_target6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "NFLOG",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_nflog_info)),
index d0b171a58232f4e53b44a07a4bad5a8a46f4bd4b..7daed18e995d4969fbf819f31d018243cf422670 100644 (file)
@@ -79,7 +79,7 @@ static void NFQUEUE_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target nfqueue_target = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "NFQUEUE",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_NFQ_info)),
@@ -92,7 +92,7 @@ static struct xtables_target nfqueue_target = {
 };
 
 static struct xtables_target nfqueue_target6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "NFQUEUE",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_NFQ_info)),
index ab54b47be939a40dd182a30527c12fb01b297d43..ef266543dd66724c6456942b2ceab65c102849ce 100644 (file)
@@ -20,7 +20,7 @@ NOTRACK_parse(int c, char **argv, int invert, unsigned int *flags,
 }
 
 static struct xtables_target notrack_target = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "NOTRACK",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(0),
@@ -30,7 +30,7 @@ static struct xtables_target notrack_target = {
 };
 
 static struct xtables_target notrack_target6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "NOTRACK",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(0),
index bffd260d247945189a7c1281f7745feadda829ba..2227eb48d16344522b1970549da2b59870d10780 100644 (file)
@@ -119,7 +119,7 @@ static void TCPMSS_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target tcpmss_target = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "TCPMSS",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_info)),
@@ -133,7 +133,7 @@ static struct xtables_target tcpmss_target = {
 };
 
 static struct xtables_target tcpmss_target6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "TCPMSS",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_info)),
index a00c82b7c30e9851acd541dbe304db2b5242b0e1..758f84765e5b5bc617dbff936eccae00bb5ad225 100644 (file)
@@ -179,7 +179,7 @@ tcpoptstrip_tg_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target tcpoptstrip_tg_reg = {
        .version       = XTABLES_VERSION,
        .name          = "TCPOPTSTRIP",
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
        .help          = tcpoptstrip_tg_help,
@@ -194,7 +194,7 @@ static struct xtables_target tcpoptstrip_tg_reg = {
 static struct xtables_target tcpoptstrip_tg6_reg = {
        .version       = XTABLES_VERSION,
        .name          = "TCPOPTSTRIP",
-       .family        = AF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
        .help          = tcpoptstrip_tg_help,
index 55a7172967acdb1593b4036e3c7c5fb6a73523ce..c185681737db5a5889d76d3c64b62e0769c94c3e 100644 (file)
@@ -209,7 +209,7 @@ static struct xtables_target tos_tg_reg_v0 = {
        .version       = XTABLES_VERSION,
        .name          = "TOS",
        .revision      = 0,
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct xt_tos_target_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)),
        .help          = tos_tg_help_v0,
@@ -224,7 +224,7 @@ static struct xtables_target tos_tg_reg = {
        .version       = XTABLES_VERSION,
        .name          = "TOS",
        .revision      = 1,
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct xt_tos_target_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)),
        .help          = tos_tg_help,
@@ -238,7 +238,7 @@ static struct xtables_target tos_tg_reg = {
 static struct xtables_target tos_tg6_reg = {
        .version       = XTABLES_VERSION,
        .name          = "TOS",
-       .family        = AF_INET6,
+       .family        = NFPROTO_IPV6,
        .revision      = 1,
        .size          = XT_ALIGN(sizeof(struct xt_tos_target_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)),
index 0f910f40504e581d0ba492bbf3fc249f8172e80a..d4b5c0a9f8122862e244c30686618777ab48a7c7 100644 (file)
@@ -133,7 +133,7 @@ static void tproxy_tg_save(const void *ip, const struct xt_entry_target *target)
 
 static struct xtables_target tproxy_tg_reg = {
        .name          = "TPROXY",
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .version       = XTABLES_VERSION,
        .size          = XT_ALIGN(sizeof(struct xt_tproxy_target_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tproxy_target_info)),
index b02f09b6331109b87e251bd00d45d95d88055ada..a7f96d4f00ca92e37b33ba7207f65f4d8af4b62a 100644 (file)
@@ -88,7 +88,7 @@ comment_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match comment_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "comment",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_comment_info)),
@@ -102,7 +102,7 @@ static struct xtables_match comment_match = {
 };
 
 static struct xtables_match comment_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "comment",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_comment_info)),
index 08670919a4dffc2fefd3fb492363bcda8d3794cb..b77ba38b1edb403cec89ad21fa2e39d9cee56484 100644 (file)
@@ -180,7 +180,7 @@ static void connbytes_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match connbytes_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "connbytes",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connbytes_info)),
@@ -194,7 +194,7 @@ static struct xtables_match connbytes_match = {
 };
 
 static struct xtables_match connbytes_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "connbytes",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connbytes_info)),
index 7a2fb4520e870a5993c46485ce528a3ab1b75447..65de19364291b3cfba8949f8695674987030de3a 100644 (file)
@@ -74,7 +74,7 @@ static int connlimit_parse(int c, char **argv, int invert, unsigned int *flags,
 
                *flags |= 0x2;
                i = strtoul(argv[optind-1], &err, 0);
-               if (family == AF_INET6) {
+               if (family == NFPROTO_IPV6) {
                        if (i > 128 || *err != '\0')
                                exit_error(PARAMETER_PROBLEM,
                                        "--connlimit-mask must be between "
@@ -103,7 +103,7 @@ static int connlimit_parse4(int c, char **argv, int invert,
                             struct xt_entry_match **match)
 {
        return connlimit_parse(c, argv, invert, flags,
-              (void *)(*match)->data, AF_INET);
+              (void *)(*match)->data, NFPROTO_IPV4);
 }
 
 static int connlimit_parse6(int c, char **argv, int invert,
@@ -111,7 +111,7 @@ static int connlimit_parse6(int c, char **argv, int invert,
                             struct xt_entry_match **match)
 {
        return connlimit_parse(c, argv, invert, flags,
-              (void *)(*match)->data, AF_INET6);
+              (void *)(*match)->data, NFPROTO_IPV6);
 }
 
 static void connlimit_check(unsigned int flags)
@@ -179,7 +179,7 @@ static void connlimit_save6(const void *ip, const struct xt_entry_match *match)
 
 static struct xtables_match connlimit_match = {
        .name          = "connlimit",
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .version       = XTABLES_VERSION,
        .size          = XT_ALIGN(sizeof(struct xt_connlimit_info)),
        .userspacesize = offsetof(struct xt_connlimit_info, data),
@@ -194,7 +194,7 @@ static struct xtables_match connlimit_match = {
 
 static struct xtables_match connlimit_match6 = {
        .name          = "connlimit",
-       .family        = AF_INET6,
+       .family        = NFPROTO_IPV6,
        .version       = XTABLES_VERSION,
        .size          = XT_ALIGN(sizeof(struct xt_connlimit_info)),
        .userspacesize = offsetof(struct xt_connlimit_info, data),
index 2358f68d570413965ef45ae24e92b650fe24f9a9..bc7ef45bc05c5f0f9dc8c63b7ae5ed9f05d2a42c 100644 (file)
@@ -164,7 +164,7 @@ connmark_mt_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match connmark_mt_reg_v0 = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "connmark",
        .revision       = 0,
        .version        = XTABLES_VERSION,
@@ -179,7 +179,7 @@ static struct xtables_match connmark_mt_reg_v0 = {
 };
 
 static struct xtables_match connmark_mt6_reg_v0 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "connmark",
        .revision       = 0,
        .version        = XTABLES_VERSION,
@@ -197,7 +197,7 @@ static struct xtables_match connmark_mt_reg = {
        .version        = XTABLES_VERSION,
        .name           = "connmark",
        .revision       = 1,
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_mtinfo1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_mtinfo1)),
        .help           = connmark_mt_help,
@@ -212,7 +212,7 @@ static struct xtables_match connmark_mt6_reg = {
        .version        = XTABLES_VERSION,
        .name           = "connmark",
        .revision       = 1,
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_mtinfo1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_mtinfo1)),
        .help           = connmark_mt_help,
index 1e5f141a85c997bd82f6089f4d9d33743a7d3834..3cec9dd47d03dd11147304da4be9f9597ca28ad4 100644 (file)
@@ -753,7 +753,7 @@ conntrack_dump_addr(const union nf_inet_addr *addr,
                     const union nf_inet_addr *mask,
                     unsigned int family, bool numeric)
 {
-       if (family == AF_INET) {
+       if (family == NFPROTO_IPV4) {
                if (!numeric && addr->ip == 0) {
                        printf("anywhere ");
                        return;
@@ -762,7 +762,7 @@ conntrack_dump_addr(const union nf_inet_addr *addr,
                        printf("%s ", ipaddr_to_numeric(&addr->in));
                else
                        printf("%s ", ipaddr_to_anyname(&addr->in));
-       } else if (family == AF_INET6) {
+       } else if (family == NFPROTO_IPV6) {
                if (!numeric && addr->ip6[0] == 0 && addr->ip6[1] == 0 &&
                    addr->ip6[2] == 0 && addr->ip6[3] == 0) {
                        printf("anywhere ");
@@ -1003,14 +1003,14 @@ static void
 conntrack_mt_print(const void *ip, const struct xt_entry_match *match,
                    int numeric)
 {
-       conntrack_dump((const void *)match->data, "", AF_INET, numeric);
+       conntrack_dump((const void *)match->data, "", NFPROTO_IPV4, numeric);
 }
 
 static void
 conntrack_mt6_print(const void *ip, const struct xt_entry_match *match,
                     int numeric)
 {
-       conntrack_dump((const void *)match->data, "", AF_INET6, numeric);
+       conntrack_dump((const void *)match->data, "", NFPROTO_IPV6, numeric);
 }
 
 static void conntrack_save(const void *ip, const struct xt_entry_match *match)
@@ -1021,20 +1021,20 @@ static void conntrack_save(const void *ip, const struct xt_entry_match *match)
 static void conntrack_mt_save(const void *ip,
                               const struct xt_entry_match *match)
 {
-       conntrack_dump((const void *)match->data, "--", AF_INET, true);
+       conntrack_dump((const void *)match->data, "--", NFPROTO_IPV4, true);
 }
 
 static void conntrack_mt6_save(const void *ip,
                                const struct xt_entry_match *match)
 {
-       conntrack_dump((const void *)match->data, "--", AF_INET6, true);
+       conntrack_dump((const void *)match->data, "--", NFPROTO_IPV6, true);
 }
 
 static struct xtables_match conntrack_match = {
        .version       = XTABLES_VERSION,
        .name          = "conntrack",
        .revision      = 0,
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct xt_conntrack_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_conntrack_info)),
        .help          = conntrack_mt_help,
@@ -1049,7 +1049,7 @@ static struct xtables_match conntrack_mt_reg = {
        .version       = XTABLES_VERSION,
        .name          = "conntrack",
        .revision      = 1,
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo1)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo1)),
        .help          = conntrack_mt_help,
@@ -1064,7 +1064,7 @@ static struct xtables_match conntrack_mt6_reg = {
        .version       = XTABLES_VERSION,
        .name          = "conntrack",
        .revision      = 1,
-       .family        = AF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo1)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo1)),
        .help          = conntrack_mt_help,
index e33ddc3524c1d0281fa00cf90b621cac32436683..24bf6f7fd965c58108478bdf2b761af54cd6fda9 100644 (file)
@@ -337,7 +337,7 @@ static void dccp_save(const void *ip, const struct xt_entry_match *match)
 
 static struct xtables_match dccp_match = {
        .name           = "dccp",
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dccp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_dccp_info)),
@@ -351,7 +351,7 @@ static struct xtables_match dccp_match = {
 
 static struct xtables_match dccp_match6 = {
        .name           = "dccp",
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dccp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_dccp_info)),
index 42ca71d2db17b5047a6d972496829bd412906834..307d8009c8d46056bdeaaa3aed1264653780787b 100644 (file)
@@ -143,7 +143,7 @@ static void dscp_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match dscp_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "dscp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dscp_info)),
@@ -157,7 +157,7 @@ static struct xtables_match dscp_match = {
 };
 
 static struct xtables_match dscp_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "dscp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dscp_info)),
index 06da33e3851f6406a0516ce44f1ba4d18125150d..524449a2f2ae14fe43eb7b2d5c16d5e7484db84b 100644 (file)
@@ -149,7 +149,7 @@ static void esp_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match esp_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "esp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_esp)),
@@ -163,7 +163,7 @@ static struct xtables_match esp_match = {
 };
 
 static struct xtables_match esp_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "esp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_esp)),
index 3960417b212a11d328e5b5a21d0095e0e57f99f4..1c506852321d8c87a72b2de479dec95d66aa15bf 100644 (file)
@@ -663,7 +663,7 @@ hashlimit_mt6_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match hashlimit_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "hashlimit",
        .version        = XTABLES_VERSION,
        .revision       = 0,
@@ -679,7 +679,7 @@ static struct xtables_match hashlimit_match = {
 };
 
 static struct xtables_match hashlimit_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "hashlimit",
        .version        = XTABLES_VERSION,
        .revision       = 0,
@@ -698,7 +698,7 @@ static struct xtables_match hashlimit_mt_reg = {
        .version        = XTABLES_VERSION,
        .name           = "hashlimit",
        .revision       = 1,
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct xt_hashlimit_mtinfo1)),
        .userspacesize  = offsetof(struct xt_hashlimit_mtinfo1, hinfo),
        .help           = hashlimit_mt_help,
@@ -714,7 +714,7 @@ static struct xtables_match hashlimit_mt6_reg = {
        .version        = XTABLES_VERSION,
        .name           = "hashlimit",
        .revision       = 1,
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct xt_hashlimit_mtinfo1)),
        .userspacesize  = offsetof(struct xt_hashlimit_mtinfo1, hinfo),
        .help           = hashlimit_mt_help,
index e8f1635d3a1866e213a14771998e213e02a2abac..b60c9826b4d384d9777ccd72bea7f3da34bd76cf 100644 (file)
@@ -69,7 +69,7 @@ static void helper_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match helper_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "helper",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_helper_info)),
@@ -82,7 +82,7 @@ static struct xtables_match helper_match = {
 };
 
 static struct xtables_match helper_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "helper",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_helper_info)),
index ee87a6fc5334958d5a39fc62ce1460283dc5096d..09e9fb7f01f1e4efb26efa511286fda9a6ff9a25 100644 (file)
@@ -348,7 +348,7 @@ static struct xtables_match iprange_match = {
        .version       = XTABLES_VERSION,
        .name          = "iprange",
        .revision      = 0,
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct ipt_iprange_info)),
        .userspacesize = XT_ALIGN(sizeof(struct ipt_iprange_info)),
        .help          = iprange_mt_help,
@@ -363,7 +363,7 @@ static struct xtables_match iprange_mt_reg = {
        .version        = XTABLES_VERSION,
        .name           = "iprange",
        .revision       = 1,
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(sizeof(struct xt_iprange_mtinfo)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_iprange_mtinfo)),
        .help           = iprange_mt_help,
@@ -378,7 +378,7 @@ static struct xtables_match iprange_mt6_reg = {
        .version        = XTABLES_VERSION,
        .name           = "iprange",
        .revision       = 1,
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(struct xt_iprange_mtinfo)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_iprange_mtinfo)),
        .help           = iprange_mt_help,
index 2fe5e7b420d080fb6e595611f4d5cd71ca460d41..f4128c0180ac45d9505af83644ce47f0f7fcc9e2 100644 (file)
@@ -112,7 +112,7 @@ static void mac_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match mac_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "mac",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_mac_info)),
@@ -126,7 +126,7 @@ static struct xtables_match mac_match = {
 };
 
 static struct xtables_match mac_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "mac",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_mac_info)),
index 6efd642800a08fd3510fb482e7518af30d685165..2552bbd8951826dfc4e06f1f66e6c519e1e3cc9d 100644 (file)
@@ -507,7 +507,7 @@ static void multiport_save6_v1(const void *ip_void,
 }
 
 static struct xtables_match multiport_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "multiport",
        .revision       = 0,
        .version        = XTABLES_VERSION,
@@ -522,7 +522,7 @@ static struct xtables_match multiport_match = {
 };
 
 static struct xtables_match multiport_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "multiport",
        .revision       = 0,
        .version        = XTABLES_VERSION,
@@ -537,7 +537,7 @@ static struct xtables_match multiport_match6 = {
 };
 
 static struct xtables_match multiport_match_v1 = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "multiport",
        .version        = XTABLES_VERSION,
        .revision       = 1,
@@ -552,7 +552,7 @@ static struct xtables_match multiport_match_v1 = {
 };
 
 static struct xtables_match multiport_match6_v1 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "multiport",
        .version        = XTABLES_VERSION,
        .revision       = 1,
index 7cad35c347779c3583a89cca11c48e11c2271a27..298075e91fe00ffbf24d95a9211f72dc0bec3963 100644 (file)
@@ -532,7 +532,7 @@ static struct xtables_match owner_mt_reg_v0 = {
        .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 0,
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct ipt_owner_info)),
        .userspacesize = XT_ALIGN(sizeof(struct ipt_owner_info)),
        .help          = owner_mt_help_v0,
@@ -547,7 +547,7 @@ static struct xtables_match owner_mt6_reg_v0 = {
        .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 0,
-       .family        = AF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct ip6t_owner_info)),
        .userspacesize = XT_ALIGN(sizeof(struct ip6t_owner_info)),
        .help          = owner_mt6_help_v0,
@@ -562,7 +562,7 @@ static struct xtables_match owner_mt_reg = {
        .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 1,
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct xt_owner_match_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_owner_match_info)),
        .help          = owner_mt_help,
@@ -577,7 +577,7 @@ static struct xtables_match owner_mt6_reg = {
        .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 1,
-       .family        = AF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct xt_owner_match_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_owner_match_info)),
        .help          = owner_mt_help,
index a40cdf7297857053f6f9653c06362856f8ba0c19..0572aba9c40341b2ba823d74947e43fe863da780 100644 (file)
@@ -163,7 +163,7 @@ static void physdev_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match physdev_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "physdev",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_physdev_info)),
@@ -177,7 +177,7 @@ static struct xtables_match physdev_match = {
 };
 
 static struct xtables_match physdev_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "physdev",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_physdev_info)),
index 59a3ca89baf7a070c723d67257dedb5f2bf3de39..1ae90133703bdddc5d43275e31bcd05eaf841d13 100644 (file)
@@ -215,7 +215,7 @@ static void recent_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match recent_mt_reg = {
     .name          = "recent",
     .version       = XTABLES_VERSION,
-    .family        = PF_INET,
+    .family        = NFPROTO_IPV4,
     .size          = XT_ALIGN(sizeof(struct xt_recent_mtinfo)),
     .userspacesize = XT_ALIGN(sizeof(struct xt_recent_mtinfo)),
     .help          = recent_help,
@@ -231,7 +231,7 @@ static struct xtables_match recent_mt6_reg = {
        .version       = XTABLES_VERSION,
        .name          = "recent",
        .revision      = 0,
-       .family        = PF_INET6,
+       .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct xt_recent_mtinfo)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_recent_mtinfo)),
        .help          = recent_help,
index 5bd06a376397fb0c8084b7b50c6308d97ef6e39d..37a6423ef01b7168e428353331dca00b06a122e2 100644 (file)
@@ -510,7 +510,7 @@ static void sctp_save(const void *ip, const struct xt_entry_match *match)
 
 static struct xtables_match sctp_match = {
        .name           = "sctp",
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_sctp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_sctp_info)),
@@ -524,7 +524,7 @@ static struct xtables_match sctp_match = {
 
 static struct xtables_match sctp_match6 = {
        .name           = "sctp",
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_sctp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_sctp_info)),
index 26ac9e33627667a2dafccc510b59b885327f7660..eebc7c55b49edecd1498d8d4b81dcb9dc1432530 100644 (file)
@@ -25,7 +25,7 @@ static void socket_mt_check(unsigned int flags)
 static struct xtables_match socket_mt_reg = {
        .name          = "socket",
        .version       = XTABLES_VERSION,
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(0),
        .userspacesize = XT_ALIGN(0),
        .parse         = socket_mt_parse,
index 3af2e482231e67b9c4fa5647335b41a9fb1ae6aa..95d7db5733abaa1cbf195e29587e8cb6f0721e42 100644 (file)
@@ -136,7 +136,7 @@ static void state_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match state_match = { 
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "state",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_state_info)),
@@ -150,7 +150,7 @@ static struct xtables_match state_match = {
 };
 
 static struct xtables_match state_match6 = { 
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "state",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_state_info)),
index a720ba4ee75a5a903fa0995bcd491db1d23c84a3..14d8c1868067bf97fba0ea6edcc021f51ec67545 100644 (file)
@@ -378,7 +378,7 @@ static void tcp_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match tcp_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "tcp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcp)),
@@ -392,7 +392,7 @@ static struct xtables_match tcp_match = {
 };
 
 static struct xtables_match tcp_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "tcp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcp)),
index 59218b82f2c5532851b2f0026b1852b12e040996..14be9194e5f6c33163fea7a070bb6176806f7ae2 100644 (file)
@@ -119,7 +119,7 @@ static void tcpmss_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match tcpmss_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "tcpmss",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
@@ -133,7 +133,7 @@ static struct xtables_match tcpmss_match = {
 };
 
 static struct xtables_match tcpmss_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "tcpmss",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
index 92f7d8477456ed1e15b854eeb225b8a50f01e60d..9f8d6fa35635ea292cbc9cbafcda9a8184b76e7f 100644 (file)
@@ -140,7 +140,7 @@ static void tos_mt_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match tos_mt_reg_v0 = {
        .version       = XTABLES_VERSION,
        .name          = "tos",
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .revision      = 0,
        .size          = XT_ALIGN(sizeof(struct ipt_tos_info)),
        .userspacesize = XT_ALIGN(sizeof(struct ipt_tos_info)),
@@ -155,7 +155,7 @@ static struct xtables_match tos_mt_reg_v0 = {
 static struct xtables_match tos_mt_reg = {
        .version       = XTABLES_VERSION,
        .name          = "tos",
-       .family        = AF_INET,
+       .family        = NFPROTO_IPV4,
        .revision      = 1,
        .size          = XT_ALIGN(sizeof(struct xt_tos_match_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tos_match_info)),
@@ -170,7 +170,7 @@ static struct xtables_match tos_mt_reg = {
 static struct xtables_match tos_mt6_reg = {
        .version       = XTABLES_VERSION,
        .name          = "tos",
-       .family        = AF_INET6,
+       .family        = NFPROTO_IPV6,
        .revision      = 1,
        .size          = XT_ALIGN(sizeof(struct xt_tos_match_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tos_match_info)),
index 37e3036cd2fa47eb3ce4ec4b195e784ab38b5425..f64fd1cf8d913a4e89e9ed7d4e86bb8f07567c0b 100644 (file)
@@ -191,7 +191,7 @@ static void udp_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match udp_match = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .name           = "udp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_udp)),
@@ -205,7 +205,7 @@ static struct xtables_match udp_match = {
 };
 
 static struct xtables_match udp_match6 = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .name           = "udp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_udp)),
index 4196a5115a806b639d15ef8703940bbe65a7531d..dc7ac577728d9d35229892ddd9c857705d4be18f 100644 (file)
@@ -36,6 +36,16 @@ enum nf_inet_hooks {
        NF_INET_NUMHOOKS
 };
 
+enum {
+       NFPROTO_UNSPEC =  0,
+       NFPROTO_IPV4   =  2,
+       NFPROTO_ARP    =  3,
+       NFPROTO_BRIDGE =  7,
+       NFPROTO_IPV6   = 10,
+       NFPROTO_DECNET = 12,
+       NFPROTO_NUMPROTO,
+};
+
 union nf_inet_addr {
        __u32           all[4];
        __be32          ip;
index 51cb67dcb199f445aee856545aacd3349c56450f..8327c4262cb3e58a314116cd94099d0c5e153f57 100644 (file)
@@ -4,8 +4,10 @@
 #include <sys/socket.h> /* PF_* */
 #include <sys/types.h>
 #include <stdbool.h>
+#include <netinet/in.h>
 #include <net/if.h>
 #include <linux/types.h>
+#include <linux/netfilter.h>
 #include <linux/netfilter/x_tables.h>
 
 #ifndef IPPROTO_SCTP
index 989f3bcf74fcd0523e8e83abf262cf8a3212cc41..293ba37f2e2a6c37aa08eb533612cae8b68b5b8e 100644 (file)
@@ -199,7 +199,7 @@ struct pprot {
 };
 
 struct afinfo afinfo = {
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .libprefix      = "libip6t_",
        .ipproto        = IPPROTO_IPV6,
        .kmod           = "ip6_tables",
index 7efd3cf80181ff3db25520b31cfd29a36ce8ab9b..2c6b4dcc6a14c0e16407a3c584804913c7f58172 100644 (file)
@@ -201,7 +201,7 @@ struct pprot {
 };
 
 struct afinfo afinfo = {
-       .family         = AF_INET,
+       .family         = NFPROTO_IPV4,
        .libprefix      = "libipt_",
        .ipproto        = IPPROTO_IP,
        .kmod           = "ip_tables",
index c833e884001e1a163eb67d1c56abca4123a24beb..784027768fbe2c5323d4afce01b9b8c4121c3532 100644 (file)
@@ -46,7 +46,7 @@ for forward compatibility.
 The
 .I protocol
 parameter is used to specify the protocol of the packets to be queued.
-Valid values are PF_INET for IPv4 and PF_INET6 for IPv6.  Currently, 
+Valid values are NFPROTO_IPV4 for IPv4 and NFPROTO_IPV6 for IPv6. Currently,
 only one protocol may be queued at a time for a handle.
 .PP
 The
index c2295c1d563521140fcb59b54dd41c4c8ce6c0b4..9dafa4a87655b8967d49ce5a079ef9d0532c7ce3 100644 (file)
@@ -187,7 +187,7 @@ int main(int argc, char **argv)
        unsigned char buf[BUFSIZE];
        struct ipq_handle *h;
        
-       h = ipq_create_handle(0, PF_INET);
+       h = ipq_create_handle(0, NFPROTO_IPV4);
        if (!h)
                die(h);
                
index 658af9755dc1af03bf6070b4ec9732ba622ac864..495fce1645cb0db78ae6be77bb5e164627f10517 100644 (file)
@@ -217,9 +217,9 @@ struct ipq_handle *ipq_create_handle(u_int32_t flags, u_int32_t protocol)
        
        memset(h, 0, sizeof(struct ipq_handle));
        
-        if (protocol == PF_INET)
+        if (protocol == NFPROTO_IPV4)
                 h->fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_FIREWALL);
-        else if (protocol == PF_INET6)
+        else if (protocol == NFPROTO_IPV6)
                 h->fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_IP6_FW);
         else {
                ipq_errno = IPQ_ERR_PROTOCOL;