]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
include: update files with headers from Linux 2.6.37-rc1
authorJan Engelhardt <jengelh@medozas.de>
Fri, 3 Dec 2010 19:15:35 +0000 (20:15 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Fri, 3 Dec 2010 20:35:14 +0000 (21:35 +0100)
Also includes the type change to __u{8,16,32} kernel types already.

18 files changed:
extensions/libxt_SECMARK.c
extensions/libxt_time.c
include/linux/netfilter/xt_CHECKSUM.h
include/linux/netfilter/xt_CT.h
include/linux/netfilter/xt_IDLETIMER.h
include/linux/netfilter/xt_SECMARK.h
include/linux/netfilter/xt_TCPOPTSTRIP.h
include/linux/netfilter/xt_TPROXY.h
include/linux/netfilter/xt_cluster.h
include/linux/netfilter/xt_connlimit.h
include/linux/netfilter/xt_ipvs.h
include/linux/netfilter/xt_physdev.h
include/linux/netfilter/xt_policy.h
include/linux/netfilter/xt_quota.h
include/linux/netfilter/xt_sctp.h
include/linux/netfilter/xt_socket.h [new file with mode: 0644]
include/linux/netfilter/xt_time.h
include/linux/netfilter/xt_u32.h

index 9e231eee7594377892eb6098d8fedef26bc93642..7bf4ff088fc8ecec66d2d01704606616912b78ba 100644 (file)
@@ -40,13 +40,13 @@ static int SECMARK_parse(int c, char **argv, int invert, unsigned int *flags,
                                   "Can't specify --selctx twice");
                info->mode = SECMARK_MODE_SEL;
 
-               if (strlen(optarg) > SECMARK_SELCTX_MAX-1)
+               if (strlen(optarg) > SECMARK_SECCTX_MAX-1)
                        xtables_error(PARAMETER_PROBLEM, PFX
                                   "Maximum length %u exceeded by --selctx"
                                   " parameter (%zu)",
-                                  SECMARK_SELCTX_MAX-1, strlen(optarg));
+                                  SECMARK_SECCTX_MAX-1, strlen(optarg));
 
-               strcpy(info->u.sel.selctx, optarg);
+               strcpy(info->secctx, optarg);
                *flags |= SECMARK_MODE_SEL;
                break;
        default:
@@ -66,7 +66,7 @@ static void print_secmark(const struct xt_secmark_target_info *info)
 {
        switch (info->mode) {
        case SECMARK_MODE_SEL:
-               printf("selctx %s ", info->u.sel.selctx);\
+               printf("selctx %s ", info->secctx);
                break;
        
        default:
index 9f12266b4538eff5f4880ba8d466ed996eced89d..5462d9304e320b7b9a3613ed515b58ccd23c8c4b 100644 (file)
@@ -20,6 +20,7 @@
 #include <time.h>
 #include <limits.h>
 
+#include <linux/types.h>
 #include <linux/netfilter/xt_time.h>
 #include <xtables.h>
 
index 3b4fb77acef68cc52a995bef89a90765da2670fc..9a2e4661654ec4e915530129e9ec1ab7253ec36c 100644 (file)
@@ -6,8 +6,10 @@
  *
  * This software is distributed under GNU GPL v2, 1991
 */
-#ifndef _IPT_CHECKSUM_TARGET_H
-#define _IPT_CHECKSUM_TARGET_H
+#ifndef _XT_CHECKSUM_TARGET_H
+#define _XT_CHECKSUM_TARGET_H
+
+#include <linux/types.h>
 
 #define XT_CHECKSUM_OP_FILL    0x01    /* fill in checksum in IP header */
 
@@ -15,4 +17,4 @@ struct xt_CHECKSUM_info {
        __u8 operation; /* bitset of operations */
 };
 
-#endif /* _IPT_CHECKSUM_TARGET_H */
+#endif /* _XT_CHECKSUM_TARGET_H */
index 1b564106891dbc9e4aa181f7bb95bc471202dadc..fbf4c56585547a20839aaaf334e2eb25726f7650 100644 (file)
@@ -4,11 +4,11 @@
 #define XT_CT_NOTRACK  0x1
 
 struct xt_ct_target_info {
-       u_int16_t       flags;
-       u_int16_t       zone;
-       u_int32_t       ct_events;
-       u_int32_t       exp_events;
-       char            helper[16];
+       __u16 flags;
+       __u16 zone;
+       __u32 ct_events;
+       __u32 exp_events;
+       char helper[16];
 
        /* Used internally by the kernel */
        struct nf_conn  *ct __attribute__((aligned(8)));
index 3e1aa1be942ef2297637d0bf4a778eec605d7040..208ae938733143ce0ba2117378423d443a3d8312 100644 (file)
@@ -39,7 +39,7 @@ struct idletimer_tg_info {
        char label[MAX_IDLETIMER_LABEL_SIZE];
 
        /* for kernel module internal use only */
-       struct idletimer_tg *timer __attribute((aligned(8)));
+       struct idletimer_tg *timer __attribute__((aligned(8)));
 };
 
 #endif
index 6fcd3448b18631f04e081cde470f85218dd7f9b8..989092bd6274b44585ccc0faf4f005a0d7b909b7 100644 (file)
  * packets are being marked for.
  */
 #define SECMARK_MODE_SEL       0x01            /* SELinux */
-#define SECMARK_SELCTX_MAX     256
-
-struct xt_secmark_target_selinux_info {
-       __u32 selsid;
-       char selctx[SECMARK_SELCTX_MAX];
-};
+#define SECMARK_SECCTX_MAX     256
 
 struct xt_secmark_target_info {
        __u8 mode;
-       union {
-               struct xt_secmark_target_selinux_info sel;
-       } u;
+       __u32 secid;
+       char secctx[SECMARK_SECCTX_MAX];
 };
 
 #endif /*_XT_SECMARK_H_target */
index 2db543214ff59b57b644c5abc1163086ef8ca732..342ef14b1761017c52072f83c4ad1ef134f3b4a0 100644 (file)
@@ -7,7 +7,7 @@
        (((1U << (idx & 31)) & bmap[(idx) >> 5]) != 0)
 
 struct xt_tcpoptstrip_target_info {
-       u_int32_t strip_bmap[8];
+       __u32 strip_bmap[8];
 };
 
 #endif /* _XT_TCPOPTSTRIP_H */
index 152e8f97132b1a213271075c16c3ac0b2ce9895d..8097e0b4c15e78f42e75df6dcae2ed1b9e9eed2e 100644 (file)
@@ -1,14 +1,21 @@
-#ifndef _XT_TPROXY_H_target
-#define _XT_TPROXY_H_target
+#ifndef _XT_TPROXY_H
+#define _XT_TPROXY_H
 
 /* TPROXY target is capable of marking the packet to perform
  * redirection. We can get rid of that whenever we get support for
  * mutliple targets in the same rule. */
 struct xt_tproxy_target_info {
-       u_int32_t mark_mask;
-       u_int32_t mark_value;
+       __u32 mark_mask;
+       __u32 mark_value;
        __be32 laddr;
        __be16 lport;
 };
 
-#endif /* _XT_TPROXY_H_target */
+struct xt_tproxy_target_info_v1 {
+       __u32 mark_mask;
+       __u32 mark_value;
+       union nf_inet_addr laddr;
+       __be16 lport;
+};
+
+#endif /* _XT_TPROXY_H */
index 886682656f098db6df2dd5cd0327cd5a76c5b6c1..66cfa3c782ac5963b4d857c0dc00bfe420b2370e 100644 (file)
@@ -6,10 +6,10 @@ enum xt_cluster_flags {
 };
 
 struct xt_cluster_match_info {
-       u_int32_t               total_nodes;
-       u_int32_t               node_mask;
-       u_int32_t               hash_seed;
-       u_int32_t               flags;
+       __u32 total_nodes;
+       __u32 node_mask;
+       __u32 hash_seed;
+       __u32 flags;
 };
 
 #define XT_CLUSTER_NODES_MAX   32
index 9ba54e48acd2288b856714194ff2508cf9e3a615..7e3284bcbd2bd118470cbd5b9fc9ec955ad9ccea 100644 (file)
@@ -6,10 +6,12 @@ struct xt_connlimit_data;
 struct xt_connlimit_info {
        union {
                union nf_inet_addr mask;
+#ifndef __KERNEL__
                union {
                        __be32 v4_mask;
                        __be32 v6_mask[4];
                };
+#endif
        };
        unsigned int limit, inverse;
 
index 1167aeb7a34793ff288aff2b7190a966378e5080..eff34ac1880883f70d88282a8ac881a1e8bff8a5 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _XT_IPVS_H
 #define _XT_IPVS_H
 
+#include <linux/types.h>
+
 enum {
        XT_IPVS_IPVS_PROPERTY = 1 << 0, /* all other options imply this one */
        XT_IPVS_PROTO =         1 << 1,
index 7d53660a2aa8954654d987b09c18587ea31185c4..8555e399886d09259fe8d8daa1e688a063983499 100644 (file)
@@ -3,6 +3,9 @@
 
 #include <linux/types.h>
 
+#ifdef __KERNEL__
+#include <linux/if.h>
+#endif
 
 #define XT_PHYSDEV_OP_IN               0x01
 #define XT_PHYSDEV_OP_OUT              0x02
index d246eac81f8dff40df8d1d66966cf3aaa2407166..be8ead05c3164a7ae258ee1b4b7f4e25dc82d183 100644 (file)
@@ -26,19 +26,30 @@ struct xt_policy_spec {
                        reqid:1;
 };
 
+#ifndef __KERNEL__
 union xt_policy_addr {
        struct in_addr  a4;
        struct in6_addr a6;
 };
+#endif
 
 struct xt_policy_elem {
        union {
+#ifdef __KERNEL__
+               struct {
+                       union nf_inet_addr saddr;
+                       union nf_inet_addr smask;
+                       union nf_inet_addr daddr;
+                       union nf_inet_addr dmask;
+               };
+#else
                struct {
                        union xt_policy_addr saddr;
                        union xt_policy_addr smask;
                        union xt_policy_addr daddr;
                        union xt_policy_addr dmask;
                };
+#endif
        };
        __be32                  spi;
        __u32           reqid;
index b0d28c659ab75c7a87aa9e4cb956c516bf5aeaf1..8bda65f0bc92b70a1f8d069b3452f8a8f6bf85cd 100644 (file)
@@ -9,9 +9,9 @@ enum xt_quota_flags {
 struct xt_quota_priv;
 
 struct xt_quota_info {
-       u_int32_t               flags;
-       u_int32_t               pad;
-       aligned_u64             quota;
+       __u32 flags;
+       __u32 pad;
+       aligned_u64 quota;
 
        /* Used internally by the kernel */
        struct xt_quota_priv    *master;
index a501e6196905d082c81a2d546523933d65de7168..29287be696a2673a6edea49c71c1774e4f12970c 100644 (file)
@@ -66,7 +66,7 @@ struct xt_sctp_info {
 
 #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \
        __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap))
-static __inline__ bool
+static inline bool
 __sctp_chunkmap_is_clear(const __u32 *chunkmap, unsigned int n)
 {
        unsigned int i;
@@ -78,7 +78,7 @@ __sctp_chunkmap_is_clear(const __u32 *chunkmap, unsigned int n)
 
 #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \
        __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap))
-static __inline__ bool
+static inline bool
 __sctp_chunkmap_is_all_set(const __u32 *chunkmap, unsigned int n)
 {
        unsigned int i;
diff --git a/include/linux/netfilter/xt_socket.h b/include/linux/netfilter/xt_socket.h
new file mode 100644 (file)
index 0000000..6f475b8
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _XT_SOCKET_H
+#define _XT_SOCKET_H
+
+enum {
+       XT_SOCKET_TRANSPARENT = 1 << 0,
+};
+
+struct xt_socket_mtinfo1 {
+       __u8 flags;
+};
+
+#endif /* _XT_SOCKET_H */
index 14b6df412c9fa1674267be11f0c3ca698b5411aa..b8bd4568efdb944bfb00c817326bce333a60267a 100644 (file)
@@ -2,13 +2,13 @@
 #define _XT_TIME_H 1
 
 struct xt_time_info {
-       u_int32_t date_start;
-       u_int32_t date_stop;
-       u_int32_t daytime_start;
-       u_int32_t daytime_stop;
-       u_int32_t monthdays_match;
-       u_int8_t weekdays_match;
-       u_int8_t flags;
+       __u32 date_start;
+       __u32 date_stop;
+       __u32 daytime_start;
+       __u32 daytime_stop;
+       __u32 monthdays_match;
+       __u8 weekdays_match;
+       __u8 flags;
 };
 
 enum {
index 9947f56cdbddc6021b15c5e0a7641a39e1ef43f3..e8c3d8722baef7895f426e5cd7f7e9be60a58059 100644 (file)
@@ -9,13 +9,13 @@ enum xt_u32_ops {
 };
 
 struct xt_u32_location_element {
-       u_int32_t number;
-       u_int8_t nextop;
+       __u32 number;
+       __u8 nextop;
 };
 
 struct xt_u32_value_element {
-       u_int32_t min;
-       u_int32_t max;
+       __u32 min;
+       __u32 max;
 };
 
 /*
@@ -27,14 +27,14 @@ struct xt_u32_value_element {
 struct xt_u32_test {
        struct xt_u32_location_element location[XT_U32_MAXSIZE+1];
        struct xt_u32_value_element value[XT_U32_MAXSIZE+1];
-       u_int8_t nnums;
-       u_int8_t nvalues;
+       __u8 nnums;
+       __u8 nvalues;
 };
 
 struct xt_u32 {
        struct xt_u32_test tests[XT_U32_MAXSIZE+1];
-       u_int8_t ntests;
-       u_int8_t invert;
+       __u8 ntests;
+       __u8 invert;
 };
 
 #endif /* _XT_U32_H */