diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-25 16:47:14 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-25 16:47:14 -0800 |
| commit | 9a6008b6b8e208abbbc4abf5a02672cfcefdf7a3 (patch) | |
| tree | b5d36621999982fc0fe5c6e8185b57313989a844 /include/linux | |
| parent | 0bfe221f282f6050b0e999efa9840f67b4fc4d86 (diff) | |
| parent | 7e09b9794abf7b1be3375cc64841bbbe5ea2882e (diff) | |
Merge bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/crypto.h | 8 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack.h | 57 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack_tftp.h | 2 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ipt_conntrack.h | 23 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ipt_multiport.h | 1 |
5 files changed, 62 insertions, 29 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 4626d40e8c6e..387da6a3e58c 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -16,6 +16,7 @@ #ifndef _LINUX_CRYPTO_H #define _LINUX_CRYPTO_H +#include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/types.h> @@ -121,7 +122,14 @@ int crypto_unregister_alg(struct crypto_alg *alg); /* * Algorithm query interface. */ +#ifdef CONFIG_CRYPTO int crypto_alg_available(const char *name, u32 flags); +#else +static inline int crypto_alg_available(const char *name, u32 flags) +{ + return 0; +} +#endif /* * Transforms: user-instantiated objects which encapsulate algorithms diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 675a01a13398..138421138944 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h @@ -122,33 +122,6 @@ do { \ #define IP_NF_ASSERT(x) #endif -struct ip_conntrack_expect -{ - /* Internal linked list (global expectation list) */ - struct list_head list; - - /* We expect this tuple, with the following mask */ - struct ip_conntrack_tuple tuple, mask; - - /* Function to call after setup and insertion */ - void (*expectfn)(struct ip_conntrack *new, - struct ip_conntrack_expect *this); - - /* The conntrack of the master connection */ - struct ip_conntrack *master; - - /* Timer function; deletes the expectation. */ - struct timer_list timeout; - -#ifdef CONFIG_IP_NF_NAT_NEEDED - /* This is the original per-proto part, used to map the - * expected connection the way the recipient expects. */ - union ip_conntrack_manip_proto saved_proto; - /* Direction relative to the master connection. */ - enum ip_conntrack_dir dir; -#endif -}; - struct ip_conntrack_counter { u_int64_t packets; @@ -206,6 +179,33 @@ struct ip_conntrack struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; }; +struct ip_conntrack_expect +{ + /* Internal linked list (global expectation list) */ + struct list_head list; + + /* We expect this tuple, with the following mask */ + struct ip_conntrack_tuple tuple, mask; + + /* Function to call after setup and insertion */ + void (*expectfn)(struct ip_conntrack *new, + struct ip_conntrack_expect *this); + + /* The conntrack of the master connection */ + struct ip_conntrack *master; + + /* Timer function; deletes the expectation. */ + struct timer_list timeout; + +#ifdef CONFIG_IP_NF_NAT_NEEDED + /* This is the original per-proto part, used to map the + * expected connection the way the recipient expects. */ + union ip_conntrack_manip_proto saved_proto; + /* Direction relative to the master connection. */ + enum ip_conntrack_dir dir; +#endif +}; + static inline struct ip_conntrack * tuplehash_to_ctrack(const struct ip_conntrack_tuple_hash *hash) { @@ -301,6 +301,7 @@ struct ip_conntrack_stat #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) +#ifdef CONFIG_IP_NF_NAT_NEEDED static inline int ip_nat_initialized(struct ip_conntrack *conntrack, enum ip_nat_manip_type manip) { @@ -308,5 +309,7 @@ static inline int ip_nat_initialized(struct ip_conntrack *conntrack, return test_bit(IPS_SRC_NAT_DONE_BIT, &conntrack->status); return test_bit(IPS_DST_NAT_DONE_BIT, &conntrack->status); } +#endif /* CONFIG_IP_NF_NAT_NEEDED */ + #endif /* __KERNEL__ */ #endif /* _IP_CONNTRACK_H */ diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tftp.h b/include/linux/netfilter_ipv4/ip_conntrack_tftp.h index 50fbafdf9ed5..cde9729aa173 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_tftp.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_tftp.h @@ -13,7 +13,7 @@ struct tftphdr { #define TFTP_OPCODE_ACK 4 #define TFTP_OPCODE_ERROR 5 -unsigned int (*ip_nat_tftp_hook)(struct sk_buff **pskb, +extern unsigned int (*ip_nat_tftp_hook)(struct sk_buff **pskb, enum ip_conntrack_info ctinfo, struct ip_conntrack_expect *exp); diff --git a/include/linux/netfilter_ipv4/ipt_conntrack.h b/include/linux/netfilter_ipv4/ipt_conntrack.h index 5f2e91151ad2..413c5658bd3a 100644 --- a/include/linux/netfilter_ipv4/ipt_conntrack.h +++ b/include/linux/netfilter_ipv4/ipt_conntrack.h @@ -22,11 +22,32 @@ #define IPT_CONNTRACK_STATUS 0x40 #define IPT_CONNTRACK_EXPIRES 0x80 +/* This is exposed to userspace, so remains frozen in time. */ +struct ip_conntrack_old_tuple +{ + struct { + __u32 ip; + union { + __u16 all; + } u; + } src; + + struct { + __u32 ip; + union { + __u16 all; + } u; + + /* The protocol. */ + u16 protonum; + } dst; +}; + struct ipt_conntrack_info { unsigned int statemask, statusmask; - struct ip_conntrack_tuple tuple[IP_CT_DIR_MAX]; + struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX]; struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX]; unsigned long expires_min, expires_max; diff --git a/include/linux/netfilter_ipv4/ipt_multiport.h b/include/linux/netfilter_ipv4/ipt_multiport.h index 1b7c85072799..e6b6fff811df 100644 --- a/include/linux/netfilter_ipv4/ipt_multiport.h +++ b/include/linux/netfilter_ipv4/ipt_multiport.h @@ -25,5 +25,6 @@ struct ipt_multiport_v1 u_int8_t count; /* Number of ports */ u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */ u_int8_t pflags[IPT_MULTI_PORTS]; /* Port flags */ + u_int8_t invert; /* Invert flag */ }; #endif /*_IPT_MULTIPORT_H*/ |
