aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ah.h33
-rw-r--r--include/net/bluetooth/bluetooth.h2
-rw-r--r--include/net/cfg80211.h40
-rw-r--r--include/net/compat.h14
-rw-r--r--include/net/dn_dev.h12
-rw-r--r--include/net/dn_fib.h3
-rw-r--r--include/net/dn_nsp.h24
-rw-r--r--include/net/dst.h23
-rw-r--r--include/net/fib_rules.h9
-rw-r--r--include/net/gen_stats.h4
-rw-r--r--include/net/genetlink.h12
-rw-r--r--include/net/if_inet6.h24
-rw-r--r--include/net/inet6_hashtables.h4
-rw-r--r--include/net/inet_hashtables.h16
-rw-r--r--include/net/inet_sock.h36
-rw-r--r--include/net/inet_timewait_sock.h2
-rw-r--r--include/net/inetpeer.h3
-rw-r--r--include/net/ip.h27
-rw-r--r--include/net/ip6_fib.h15
-rw-r--r--include/net/ip6_route.h3
-rw-r--r--include/net/ip_fib.h25
-rw-r--r--include/net/ip_vs.h6
-rw-r--r--include/net/ipip.h25
-rw-r--r--include/net/ipv6.h12
-rw-r--r--include/net/iw_handler.h26
-rw-r--r--include/net/mac80211.h32
-rw-r--r--include/net/neighbour.h18
-rw-r--r--include/net/net_namespace.h6
-rw-r--r--include/net/netfilter/nf_conntrack_ecache.h3
-rw-r--r--include/net/netfilter/nf_conntrack_expect.h6
-rw-r--r--include/net/netfilter/nf_conntrack_extend.h6
-rw-r--r--include/net/netfilter/nf_conntrack_helper.h3
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h3
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h3
-rw-r--r--include/net/netfilter/nf_conntrack_tuple.h12
-rw-r--r--include/net/netfilter/nf_nat.h15
-rw-r--r--include/net/netfilter/nf_nat_protocol.h3
-rw-r--r--include/net/phonet/phonet.h1
-rw-r--r--include/net/phonet/pn_dev.h6
-rw-r--r--include/net/pkt_cls.h24
-rw-r--r--include/net/pkt_sched.h3
-rw-r--r--include/net/protocol.h7
-rw-r--r--include/net/red.h6
-rw-r--r--include/net/route.h12
-rw-r--r--include/net/rtnetlink.h3
-rw-r--r--include/net/sch_generic.h30
-rw-r--r--include/net/scm.h9
-rw-r--r--include/net/sctp/sctp.h3
-rw-r--r--include/net/sock.h32
-rw-r--r--include/net/tc_act/tc_skbedit.h2
-rw-r--r--include/net/tcp.h6
-rw-r--r--include/net/udp.h13
-rw-r--r--include/net/wext.h49
-rw-r--r--include/net/xfrm.h30
54 files changed, 379 insertions, 367 deletions
diff --git a/include/net/ah.h b/include/net/ah.h
index ae1c322..f0129f7 100644
--- a/include/net/ah.h
+++ b/include/net/ah.h
@@ -1,43 +1,20 @@
#ifndef _NET_AH_H
#define _NET_AH_H
-#include <linux/crypto.h>
-#include <net/xfrm.h>
+#include <linux/skbuff.h>
/* This is the maximum truncated ICV length that we know of. */
#define MAX_AH_AUTH_LEN 12
-struct ah_data
-{
- u8 *work_icv;
+struct crypto_ahash;
+
+struct ah_data {
int icv_full_len;
int icv_trunc_len;
- struct crypto_hash *tfm;
+ struct crypto_ahash *ahash;
};
-static inline int ah_mac_digest(struct ah_data *ahp, struct sk_buff *skb,
- u8 *auth_data)
-{
- struct hash_desc desc;
- int err;
-
- desc.tfm = ahp->tfm;
- desc.flags = 0;
-
- memset(auth_data, 0, ahp->icv_trunc_len);
- err = crypto_hash_init(&desc);
- if (unlikely(err))
- goto out;
- err = skb_icv_walk(skb, &desc, 0, skb->len, crypto_hash_update);
- if (unlikely(err))
- goto out;
- err = crypto_hash_final(&desc, ahp->work_icv);
-
-out:
- return err;
-}
-
struct ip_auth_hdr;
static inline struct ip_auth_hdr *ip_auth_hdr(const struct sk_buff *skb)
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 718394e..04a6908 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -121,7 +121,7 @@ struct bt_sock_list {
rwlock_t lock;
};
-int bt_sock_register(int proto, struct net_proto_family *ops);
+int bt_sock_register(int proto, const struct net_proto_family *ops);
int bt_sock_unregister(int proto);
void bt_sock_link(struct bt_sock_list *l, struct sock *s);
void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 3d874c6..ff67865 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1142,6 +1142,9 @@ struct wiphy {
u32 frag_threshold;
u32 rts_threshold;
+ char fw_version[ETHTOOL_BUSINFO_LEN];
+ u32 hw_version;
+
/* If multiple wiphys are registered and you're handed e.g.
* a regular netdev with assigned ieee80211_ptr, you won't
* know whether it points to a wiphy your driver has registered
@@ -1171,6 +1174,10 @@ struct wiphy {
struct net *_net;
#endif
+#ifdef CONFIG_CFG80211_WEXT
+ const struct iw_handler_def *wext;
+#endif
+
char priv[0] __attribute__((__aligned__(NETDEV_ALIGN)));
};
@@ -1345,7 +1352,7 @@ struct wireless_dev {
struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES];
struct cfg80211_internal_bss *current_bss; /* associated / joined */
-#ifdef CONFIG_WIRELESS_EXT
+#ifdef CONFIG_CFG80211_WEXT
/* wext data */
struct {
struct cfg80211_ibss_params ibss;
@@ -1802,30 +1809,45 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
* @dev: network device
* @buf: deauthentication frame (header + body)
* @len: length of the frame data
- * @cookie: cookie from ->deauth if called within that callback,
- * %NULL otherwise
*
* This function is called whenever deauthentication has been processed in
* station mode. This includes both received deauthentication frames and
* locally generated ones. This function may sleep.
*/
-void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len,
- void *cookie);
+void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
+
+/**
+ * __cfg80211_send_deauth - notification of processed deauthentication
+ * @dev: network device
+ * @buf: deauthentication frame (header + body)
+ * @len: length of the frame data
+ *
+ * Like cfg80211_send_deauth(), but doesn't take the wdev lock.
+ */
+void __cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
/**
* cfg80211_send_disassoc - notification of processed disassociation
* @dev: network device
* @buf: disassociation response frame (header + body)
* @len: length of the frame data
- * @cookie: cookie from ->disassoc if called within that callback,
- * %NULL otherwise
*
* This function is called whenever disassociation has been processed in
* station mode. This includes both received disassociation frames and locally
* generated ones. This function may sleep.
*/
-void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len,
- void *cookie);
+void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len);
+
+/**
+ * __cfg80211_send_disassoc - notification of processed disassociation
+ * @dev: network device
+ * @buf: disassociation response frame (header + body)
+ * @len: length of the frame data
+ *
+ * Like cfg80211_send_disassoc(), but doesn't take the wdev lock.
+ */
+void __cfg80211_send_disassoc(struct net_device *dev, const u8 *buf,
+ size_t len);
/**
* cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP)
diff --git a/include/net/compat.h b/include/net/compat.h
index 7c30028..3c7d4e3 100644
--- a/include/net/compat.h
+++ b/include/net/compat.h
@@ -18,6 +18,11 @@ struct compat_msghdr {
compat_uint_t msg_flags;
};
+struct compat_mmsghdr {
+ struct compat_msghdr msg_hdr;
+ compat_uint_t msg_len;
+};
+
struct compat_cmsghdr {
compat_size_t cmsg_len;
compat_int_t cmsg_level;
@@ -28,13 +33,20 @@ extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *);
extern int compat_sock_get_timestampns(struct sock *, struct timespec __user *);
#else /* defined(CONFIG_COMPAT) */
-#define compat_msghdr msghdr /* to avoid compiler warnings */
+/*
+ * To avoid compiler warnings:
+ */
+#define compat_msghdr msghdr
+#define compat_mmsghdr mmsghdr
#endif /* defined(CONFIG_COMPAT) */
extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *);
extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int);
extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned);
extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned);
+extern asmlinkage long compat_sys_recvmmsg(int, struct compat_mmsghdr __user *,
+ unsigned, unsigned,
+ struct timespec __user *);
extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *);
extern int put_cmsg_compat(struct msghdr*, int, int, int, void *);
diff --git a/include/net/dn_dev.h b/include/net/dn_dev.h
index cee4682..28966ca 100644
--- a/include/net/dn_dev.h
+++ b/include/net/dn_dev.h
@@ -97,16 +97,14 @@ struct dn_dev {
unsigned long uptime; /* Time device went up in jiffies */
};
-struct dn_short_packet
-{
+struct dn_short_packet {
__u8 msgflg;
__le16 dstnode;
__le16 srcnode;
__u8 forward;
} __attribute__((packed));
-struct dn_long_packet
-{
+struct dn_long_packet {
__u8 msgflg;
__u8 d_area;
__u8 d_subarea;
@@ -122,8 +120,7 @@ struct dn_long_packet
/*------------------------- DRP - Routing messages ---------------------*/
-struct endnode_hello_message
-{
+struct endnode_hello_message {
__u8 msgflg;
__u8 tiver[3];
__u8 id[6];
@@ -138,8 +135,7 @@ struct endnode_hello_message
__u8 data[2];
} __attribute__((packed));
-struct rtnode_hello_message
-{
+struct rtnode_hello_message {
__u8 msgflg;
__u8 tiver[3];
__u8 id[6];
diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
index c378be7..52da6c3 100644
--- a/include/net/dn_fib.h
+++ b/include/net/dn_fib.h
@@ -4,8 +4,7 @@
/* WARNING: The ordering of these elements must match ordering
* of RTA_* rtnetlink attribute numbers.
*/
-struct dn_kern_rta
-{
+struct dn_kern_rta {
void *rta_dst;
void *rta_src;
int *rta_iif;
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h
index 96e816b..17d43d2 100644
--- a/include/net/dn_nsp.h
+++ b/include/net/dn_nsp.h
@@ -70,30 +70,26 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int nobl
/* Data Messages (data segment/interrupt/link service) */
-struct nsp_data_seg_msg
-{
+struct nsp_data_seg_msg {
__u8 msgflg;
__le16 dstaddr;
__le16 srcaddr;
} __attribute__((packed));
-struct nsp_data_opt_msg
-{
+struct nsp_data_opt_msg {
__le16 acknum;
__le16 segnum;
__le16 lsflgs;
} __attribute__((packed));
-struct nsp_data_opt_msg1
-{
+struct nsp_data_opt_msg1 {
__le16 acknum;
__le16 segnum;
} __attribute__((packed));
/* Acknowledgment Message (data/other data) */
-struct nsp_data_ack_msg
-{
+struct nsp_data_ack_msg {
__u8 msgflg;
__le16 dstaddr;
__le16 srcaddr;
@@ -101,16 +97,14 @@ struct nsp_data_ack_msg
} __attribute__((packed));
/* Connect Acknowledgment Message */
-struct nsp_conn_ack_msg
-{
+struct nsp_conn_ack_msg {
__u8 msgflg;
__le16 dstaddr;
} __attribute__((packed));
/* Connect Initiate/Retransmit Initiate/Connect Confirm */
-struct nsp_conn_init_msg
-{
+struct nsp_conn_init_msg {
__u8 msgflg;
#define NSP_CI 0x18 /* Connect Initiate */
#define NSP_RCI 0x68 /* Retrans. Conn Init */
@@ -126,8 +120,7 @@ struct nsp_conn_init_msg
} __attribute__((packed));
/* Disconnect Initiate/Disconnect Confirm */
-struct nsp_disconn_init_msg
-{
+struct nsp_disconn_init_msg {
__u8 msgflg;
__le16 dstaddr;
__le16 srcaddr;
@@ -136,8 +129,7 @@ struct nsp_disconn_init_msg
-struct srcobj_fmt
-{
+struct srcobj_fmt {
__u8 format;
__u8 task;
__le16 grpcode;
diff --git a/include/net/dst.h b/include/net/dst.h
index 5a900dd..387cb3c 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -36,8 +36,7 @@
struct sk_buff;
-struct dst_entry
-{
+struct dst_entry {
struct rcu_head rcu_head;
struct dst_entry *child;
struct net_device *dev;
@@ -111,6 +110,12 @@ dst_metric(const struct dst_entry *dst, int metric)
return dst->metrics[metric-1];
}
+static inline u32
+dst_feature(const struct dst_entry *dst, u32 feature)
+{
+ return (dst ? dst_metric(dst, RTAX_FEATURES) & feature : 0);
+}
+
static inline u32 dst_mtu(const struct dst_entry *dst)
{
u32 mtu = dst_metric(dst, RTAX_MTU);
@@ -136,7 +141,7 @@ static inline void set_dst_metric_rtt(struct dst_entry *dst, int metric,
static inline u32
dst_allfrag(const struct dst_entry *dst)
{
- int ret = dst_metric(dst, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG;
+ int ret = dst_feature(dst, RTAX_FEATURE_ALLFRAG);
/* Yes, _exactly_. This is paranoia. */
barrier();
return ret;
@@ -222,11 +227,19 @@ static inline void dst_confirm(struct dst_entry *dst)
neigh_confirm(dst->neighbour);
}
-static inline void dst_negative_advice(struct dst_entry **dst_p)
+static inline void dst_negative_advice(struct dst_entry **dst_p,
+ struct sock *sk)
{
struct dst_entry * dst = *dst_p;
- if (dst && dst->ops->negative_advice)
+ if (dst && dst->ops->negative_advice) {
*dst_p = dst->ops->negative_advice(dst);
+
+ if (dst != *dst_p) {
+ extern void sk_reset_txq(struct sock *sk);
+
+ sk_reset_txq(sk);
+ }
+ }
}
static inline void dst_link_failure(struct sk_buff *skb)
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index ca4b2e8..2cd707b 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -7,8 +7,7 @@
#include <net/flow.h>
#include <net/rtnetlink.h>
-struct fib_rule
-{
+struct fib_rule {
struct list_head list;
atomic_t refcnt;
int ifindex;
@@ -25,15 +24,13 @@ struct fib_rule
struct net * fr_net;
};
-struct fib_lookup_arg
-{
+struct fib_lookup_arg {
void *lookup_ptr;
void *result;
struct fib_rule *rule;
};
-struct fib_rules_ops
-{
+struct fib_rules_ops {
int family;
struct list_head list;
int rule_size;
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h
index c148855..fa15771 100644
--- a/include/net/gen_stats.h
+++ b/include/net/gen_stats.h
@@ -6,8 +6,7 @@
#include <linux/rtnetlink.h>
#include <linux/pkt_sched.h>
-struct gnet_dump
-{
+struct gnet_dump {
spinlock_t * lock;
struct sk_buff * skb;
struct nlattr * tail;
@@ -30,6 +29,7 @@ extern int gnet_stats_start_copy_compat(struct sk_buff *skb, int type,
extern int gnet_stats_copy_basic(struct gnet_dump *d,
struct gnet_stats_basic_packed *b);
extern int gnet_stats_copy_rate_est(struct gnet_dump *d,
+ const struct gnet_stats_basic_packed *b,
struct gnet_stats_rate_est *r);
extern int gnet_stats_copy_queue(struct gnet_dump *d,
struct gnet_stats_queue *q);
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 2a1c068..eb551ba 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -13,8 +13,7 @@
* @list: list entry for linking
* @family: pointer to family, need not be set before registering
*/
-struct genl_multicast_group
-{
+struct genl_multicast_group {
struct genl_family *family; /* private */
struct list_head list; /* private */
char name[GENL_NAMSIZ];
@@ -35,8 +34,7 @@ struct genl_multicast_group
* @family_list: family list
* @mcast_groups: multicast groups list
*/
-struct genl_family
-{
+struct genl_family {
unsigned int id;
unsigned int hdrsize;
char name[GENL_NAMSIZ];
@@ -58,8 +56,7 @@ struct genl_family
* @userhdr: user specific header
* @attrs: netlink attributes
*/
-struct genl_info
-{
+struct genl_info {
u32 snd_seq;
u32 snd_pid;
struct nlmsghdr * nlhdr;
@@ -102,8 +99,7 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net)
* @done: completion callback for dumps
* @ops_list: operations list
*/
-struct genl_ops
-{
+struct genl_ops {
u8 cmd;
unsigned int flags;
const struct nla_policy *policy;
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 38b7813..e9d69d1 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -32,8 +32,7 @@
#ifdef __KERNEL__
-struct inet6_ifaddr
-{
+struct inet6_ifaddr {
struct in6_addr addr;
__u32 prefix_len;
@@ -67,8 +66,7 @@ struct inet6_ifaddr
int dead;
};
-struct ip6_sf_socklist
-{
+struct ip6_sf_socklist {
unsigned int sl_max;
unsigned int sl_count;
struct in6_addr sl_addr[0];
@@ -79,8 +77,7 @@ struct ip6_sf_socklist
#define IP6_SFBLOCK 10 /* allocate this many at once */
-struct ipv6_mc_socklist
-{
+struct ipv6_mc_socklist {
struct in6_addr addr;
int ifindex;
struct ipv6_mc_socklist *next;
@@ -89,8 +86,7 @@ struct ipv6_mc_socklist
struct ip6_sf_socklist *sflist;
};
-struct ip6_sf_list
-{
+struct ip6_sf_list {
struct ip6_sf_list *sf_next;
struct in6_addr sf_addr;
unsigned long sf_count[2]; /* include/exclude counts */
@@ -105,8 +101,7 @@ struct ip6_sf_list
#define MAF_NOREPORT 0x08
#define MAF_GSQUERY 0x10
-struct ifmcaddr6
-{
+struct ifmcaddr6 {
struct in6_addr mca_addr;
struct inet6_dev *idev;
struct ifmcaddr6 *next;
@@ -126,15 +121,13 @@ struct ifmcaddr6
/* Anycast stuff */
-struct ipv6_ac_socklist
-{
+struct ipv6_ac_socklist {
struct in6_addr acl_addr;
int acl_ifindex;
struct ipv6_ac_socklist *acl_next;
};
-struct ifacaddr6
-{
+struct ifacaddr6 {
struct in6_addr aca_addr;
struct inet6_dev *aca_idev;
struct rt6_info *aca_rt;
@@ -157,8 +150,7 @@ struct ipv6_devstat {
DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg);
};
-struct inet6_dev
-{
+struct inet6_dev {
struct net_device *dev;
struct inet6_ifaddr *addr_list;
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index 22c73a7..92838d3 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -46,8 +46,8 @@ static inline int inet6_sk_ehashfn(const struct sock *sk)
const struct ipv6_pinfo *np = inet6_sk(sk);
const struct in6_addr *laddr = &np->rcv_saddr;
const struct in6_addr *faddr = &np->daddr;
- const __u16 lport = inet->num;
- const __be16 fport = inet->dport;
+ const __u16 lport = inet->inet_num;
+ const __be16 fport = inet->inet_dport;
struct net *net = sock_net(sk);
return inet6_ehashfn(net, laddr, lport, faddr, fport);
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index d522dcf..5b698b3 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -125,7 +125,7 @@ struct inet_hashinfo {
*/
struct inet_ehash_bucket *ehash;
spinlock_t *ehash_locks;
- unsigned int ehash_size;
+ unsigned int ehash_mask;
unsigned int ehash_locks_mask;
/* Ok, let's try this, I give up, we do need a local binding
@@ -158,7 +158,7 @@ static inline struct inet_ehash_bucket *inet_ehash_bucket(
struct inet_hashinfo *hashinfo,
unsigned int hash)
{
- return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)];
+ return &hashinfo->ehash[hash & hashinfo->ehash_mask];
}
static inline spinlock_t *inet_ehash_lockp(
@@ -241,7 +241,7 @@ static inline int inet_lhashfn(struct net *net, const unsigned short num)
static inline int inet_sk_listen_hashfn(const struct sock *sk)
{
- return inet_lhashfn(sock_net(sk), inet_sk(sk)->num);
+ return inet_lhashfn(sock_net(sk), inet_sk(sk)->inet_num);
}
/* Caller must disable local BH processing. */
@@ -301,8 +301,8 @@ typedef __u64 __bitwise __addrpair;
#endif /* __BIG_ENDIAN */
#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
(((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
- ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \
- ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
+ ((*((__addrpair *)&(inet_sk(__sk)->inet_daddr))) == (__cookie)) && \
+ ((*((__portpair *)&(inet_sk(__sk)->inet_dport))) == (__ports)) && \
(!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
#define INET_TW_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
(((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
@@ -313,9 +313,9 @@ typedef __u64 __bitwise __addrpair;
#define INET_ADDR_COOKIE(__name, __saddr, __daddr)
#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif) \
(((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
- (inet_sk(__sk)->daddr == (__saddr)) && \
- (inet_sk(__sk)->rcv_saddr == (__daddr)) && \
- ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
+ (inet_sk(__sk)->inet_daddr == (__saddr)) && \
+ (inet_sk(__sk)->inet_rcv_saddr == (__daddr)) && \
+ ((*((__portpair *)&(inet_sk(__sk)->inet_dport))) == (__ports)) && \
(!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
#define INET_TW_MATCH(__sk, __net, __hash,__cookie, __saddr, __daddr, __ports, __dif) \
(((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 47004f3..bd4c53f 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -93,14 +93,14 @@ struct rtable;
*
* @sk - ancestor class
* @pinet6 - pointer to IPv6 control block
- * @daddr - Foreign IPv4 addr
- * @rcv_saddr - Bound local IPv4 addr
- * @dport - Destination port
- * @num - Local port
- * @saddr - Sending source
+ * @inet_daddr - Foreign IPv4 addr
+ * @inet_rcv_saddr - Bound local IPv4 addr
+ * @inet_dport - Destination port
+ * @inet_num - Local port
+ * @inet_saddr - Sending source
* @uc_ttl - Unicast TTL
- * @sport - Source port
- * @id - ID counter for DF pkts
+ * @inet_sport - Source port
+ * @inet_id - ID counter for DF pkts
* @tos - TOS
* @mc_ttl - Multicasting TTL
* @is_icsk - is this an inet_connection_sock?
@@ -115,16 +115,16 @@ struct inet_sock {
struct ipv6_pinfo *pinet6;
#endif
/* Socket demultiplex comparisons on incoming packets. */
- __be32 daddr;
- __be32 rcv_saddr;
- __be16 dport;
- __u16 num;
- __be32 saddr;
+ __be32 inet_daddr;
+ __be32 inet_rcv_saddr;
+ __be16 inet_dport;
+ __u16 inet_num;
+ __be32 inet_saddr;
__s16 uc_ttl;
__u16 cmsg_flags;
struct ip_options *opt;
- __be16 sport;
- __u16 id;
+ __be16 inet_sport;
+ __u16 inet_id;
__u8 tos;
__u8 mc_ttl;
__u8 pmtudisc;
@@ -190,10 +190,10 @@ static inline unsigned int inet_ehashfn(struct net *net,
static inline int inet_sk_ehashfn(const struct sock *sk)
{
const struct inet_sock *inet = inet_sk(sk);
- const __be32 laddr = inet->rcv_saddr;
- const __u16 lport = inet->num;
- const __be32 faddr = inet->daddr;
- const __be16 fport = inet->dport;
+ const __be32 laddr = inet->inet_rcv_saddr;
+ const __u16 lport = inet->inet_num;
+ const __be32 faddr = inet->inet_daddr;
+ const __be16 fport = inet->inet_dport;
struct net *net = sock_net(sk);
return inet_ehashfn(net, laddr, lport, faddr, fport);
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index f93ad90..773b10f 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -194,7 +194,7 @@ static inline struct inet_timewait_sock *inet_twsk(const struct sock *sk)
static inline __be32 inet_rcv_saddr(const struct sock *sk)
{
return likely(sk->sk_state != TCP_TIME_WAIT) ?
- inet_sk(sk)->rcv_saddr : inet_twsk(sk)->tw_rcv_saddr;
+ inet_sk(sk)->inet_rcv_saddr : inet_twsk(sk)->tw_rcv_saddr;
}
extern void inet_twsk_put(struct inet_timewait_sock *tw);
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 15e1f8fe..35ad7b9 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -13,8 +13,7 @@
#include <linux/spinlock.h>
#include <asm/atomic.h>
-struct inet_peer
-{
+struct inet_peer {
/* group together avl_left,avl_right,v4daddr to speedup lookups */
struct inet_peer *avl_left, *avl_right;
__be32 v4daddr; /* peer's address */
diff --git a/include/net/ip.h b/include/net/ip.h
index 2f47e54..e6b9d12 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -33,8 +33,7 @@
struct sock;
-struct inet_skb_parm
-{
+struct inet_skb_parm {
struct ip_options opt; /* Compiled IP options */
unsigned char flags;
@@ -50,8 +49,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
return ip_hdr(skb)->ihl * 4;
}
-struct ipcm_cookie
-{
+struct ipcm_cookie {
__be32 addr;
int oif;
struct ip_options *opt;
@@ -60,8 +58,7 @@ struct ipcm_cookie
#define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb))
-struct ip_ra_chain
-{
+struct ip_ra_chain {
struct ip_ra_chain *next;
struct sock *sk;
void (*destructor)(struct sock *);
@@ -159,8 +156,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
unsigned int len);
-struct ipv4_config
-{
+struct ipv4_config {
int log_martians;
int no_pmtu_disc;
};
@@ -240,8 +236,8 @@ static inline void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, str
* does not change, they drop every other packet in
* a TCP stream using header compression.
*/
- iph->id = (sk && inet_sk(sk)->daddr) ?
- htons(inet_sk(sk)->id++) : 0;
+ iph->id = (sk && inet_sk(sk)->inet_daddr) ?
+ htons(inet_sk(sk)->inet_id++) : 0;
} else
__ip_select_ident(iph, dst, 0);
}
@@ -249,9 +245,9 @@ static inline void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, str
static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst, struct sock *sk, int more)
{
if (iph->frag_off & htons(IP_DF)) {
- if (sk && inet_sk(sk)->daddr) {
- iph->id = htons(inet_sk(sk)->id);
- inet_sk(sk)->id += 1 + more;
+ if (sk && inet_sk(sk)->inet_daddr) {
+ iph->id = htons(inet_sk(sk)->inet_id);
+ inet_sk(sk)->inet_id += 1 + more;
} else
iph->id = 0;
} else
@@ -317,7 +313,7 @@ static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, ch
static __inline__ void inet_reset_saddr(struct sock *sk)
{
- inet_sk(sk)->rcv_saddr = inet_sk(sk)->saddr = 0;
+ inet_sk(sk)->inet_rcv_saddr = inet_sk(sk)->inet_saddr = 0;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
if (sk->sk_family == PF_INET6) {
struct ipv6_pinfo *np = inet6_sk(sk);
@@ -336,8 +332,7 @@ extern int ip_call_ra_chain(struct sk_buff *skb);
* Functions provided by ip_fragment.c
*/
-enum ip_defrag_users
-{
+enum ip_defrag_users {
IP_DEFRAG_LOCAL_DELIVER,
IP_DEFRAG_CALL_RA_CHAIN,
IP_DEFRAG_CONNTRACK_IN,
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 15b492a..2578081 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -30,8 +30,7 @@
struct rt6_info;
-struct fib6_config
-{
+struct fib6_config {
u32 fc_table;
u32 fc_metric;
int fc_dst_len;
@@ -51,8 +50,7 @@ struct fib6_config
struct nl_info fc_nlinfo;
};
-struct fib6_node
-{
+struct fib6_node {
struct fib6_node *parent;
struct fib6_node *left;
struct fib6_node *right;
@@ -78,16 +76,14 @@ struct fib6_node
*
*/
-struct rt6key
-{
+struct rt6key {
struct in6_addr addr;
int plen;
};
struct fib6_table;
-struct rt6_info
-{
+struct rt6_info {
union {
struct dst_entry dst;
} u;
@@ -127,8 +123,7 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
return ((struct rt6_info *)dst)->rt6i_idev;
}
-struct fib6_walker_t
-{
+struct fib6_walker_t {
struct fib6_walker_t *prev, *next;
struct fib6_node *root, *node;
struct rt6_info *leaf;
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 0e1b8ae..4a808de 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -103,8 +103,7 @@ extern void rt6_pmtu_discovery(struct in6_addr *daddr,
struct netlink_callback;
-struct rt6_rtnl_dump_arg
-{
+struct rt6_rtnl_dump_arg {
struct sk_buff *skb;
struct netlink_callback *cb;
struct net *net;
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 4d22fab..c93f94e 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -144,18 +144,21 @@ struct fib_table {
struct hlist_node tb_hlist;
u32 tb_id;
int tb_default;
- int (*tb_lookup)(struct fib_table *tb, const struct flowi *flp, struct fib_result *res);
- int (*tb_insert)(struct fib_table *, struct fib_config *);
- int (*tb_delete)(struct fib_table *, struct fib_config *);
- int (*tb_dump)(struct fib_table *table, struct sk_buff *skb,
- struct netlink_callback *cb);
- int (*tb_flush)(struct fib_table *table);
- void (*tb_select_default)(struct fib_table *table,
- const struct flowi *flp, struct fib_result *res);
-
unsigned char tb_data[0];
};
+extern int fib_table_lookup(struct fib_table *tb, const struct flowi *flp,
+ struct fib_result *res);
+extern int fib_table_insert(struct fib_table *, struct fib_config *);
+extern int fib_table_delete(struct fib_table *, struct fib_config *);
+extern int fib_table_dump(struct fib_table *table, struct sk_buff *skb,
+ struct netlink_callback *cb);
+extern int fib_table_flush(struct fib_table *table);
+extern void fib_table_select_default(struct fib_table *table,
+ const struct flowi *flp,
+ struct fib_result *res);
+
+
#ifndef CONFIG_IP_MULTIPLE_TABLES
#define TABLE_LOCAL_INDEX 0
@@ -182,11 +185,11 @@ static inline int fib_lookup(struct net *net, const struct flowi *flp,
struct fib_table *table;
table = fib_get_table(net, RT_TABLE_LOCAL);
- if (!table->tb_lookup(table, flp, res))
+ if (!fib_table_lookup(table, flp, res))
return 0;
table = fib_get_table(net, RT_TABLE_MAIN);
- if (!table->tb_lookup(table, flp, res))
+ if (!fib_table_lookup(table, flp, res))
return 0;
return -ENETUNREACH;
}
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 98978e7..8dc3296 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -251,8 +251,7 @@ struct ip_vs_estimator {
u32 outbps;
};
-struct ip_vs_stats
-{
+struct ip_vs_stats {
struct ip_vs_stats_user ustats; /* statistics */
struct ip_vs_estimator est; /* estimator */
@@ -518,8 +517,7 @@ struct ip_vs_scheduler {
/*
* The application module object (a.k.a. app incarnation)
*/
-struct ip_vs_app
-{
+struct ip_vs_app {
struct list_head a_list; /* member in app list */
int type; /* IP_VS_APP_TYPE_xxx */
char *name; /* application module name */
diff --git a/include/net/ipip.h b/include/net/ipip.h
index 87acf8f..11e8513 100644
--- a/include/net/ipip.h
+++ b/include/net/ipip.h
@@ -7,8 +7,15 @@
/* Keep error state on tunnel for 30 sec */
#define IPTUNNEL_ERR_TIMEO (30*HZ)
-struct ip_tunnel
-{
+/* 6rd prefix/relay information */
+struct ip_tunnel_6rd_parm {
+ struct in6_addr prefix;
+ __be32 relay_prefix;
+ u16 prefixlen;
+ u16 relay_prefixlen;
+};
+
+struct ip_tunnel {
struct ip_tunnel *next;
struct net_device *dev;
@@ -23,15 +30,19 @@ struct ip_tunnel
struct ip_tunnel_parm parms;
+ /* for SIT */
+#ifdef CONFIG_IPV6_SIT_6RD
+ struct ip_tunnel_6rd_parm ip6rd;
+#endif
struct ip_tunnel_prl_entry *prl; /* potential router list */
unsigned int prl_count; /* # of entries in PRL */
};
-struct ip_tunnel_prl_entry
-{
+struct ip_tunnel_prl_entry {
struct ip_tunnel_prl_entry *next;
__be32 addr;
u16 flags;
+ struct rcu_head rcu_head;
};
#define IPTUNNEL_XMIT() do { \
@@ -42,9 +53,9 @@ struct ip_tunnel_prl_entry
ip_select_ident(iph, &rt->u.dst, NULL); \
\
err = ip_local_out(skb); \
- if (net_xmit_eval(err) == 0) { \
- stats->tx_bytes += pkt_len; \
- stats->tx_packets++; \
+ if (likely(net_xmit_eval(err) == 0)) { \
+ txq->tx_bytes += pkt_len; \
+ txq->tx_packets++; \
} else { \
stats->tx_errors++; \
stats->tx_aborted_errors++; \
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 8c31d8a..92db861 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -160,8 +160,7 @@ extern struct ctl_path net_ipv6_ctl_path[];
#define ICMP6MSGIN_INC_STATS_BH(net, idev, field) \
_DEVINC(net, icmpv6msg, _BH, idev, field)
-struct ip6_ra_chain
-{
+struct ip6_ra_chain {
struct ip6_ra_chain *next;
struct sock *sk;
int sel;
@@ -176,8 +175,7 @@ extern rwlock_t ip6_ra_lock;
ancillary data and passed to IPv6.
*/
-struct ipv6_txoptions
-{
+struct ipv6_txoptions {
/* Length of this structure */
int tot_len;
@@ -194,8 +192,7 @@ struct ipv6_txoptions
/* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */
};
-struct ip6_flowlabel
-{
+struct ip6_flowlabel {
struct ip6_flowlabel *next;
__be32 label;
atomic_t users;
@@ -212,8 +209,7 @@ struct ip6_flowlabel
#define IPV6_FLOWINFO_MASK cpu_to_be32(0x0FFFFFFF)
#define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF)
-struct ipv6_fl_socklist
-{
+struct ipv6_fl_socklist {
struct ipv6_fl_socklist *next;
struct ip6_flowlabel *fl;
};
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h
index e9054a2..b2b98f3 100644
--- a/include/net/iw_handler.h
+++ b/include/net/iw_handler.h
@@ -300,8 +300,7 @@
* This struct is also my long term insurance. I can add new fields here
* without breaking the prototype of iw_handler...
*/
-struct iw_request_info
-{
+struct iw_request_info {
__u16 cmd; /* Wireless Extension command */
__u16 flags; /* More to come ;-) */
};
@@ -321,20 +320,20 @@ typedef int (*iw_handler)(struct net_device *dev, struct iw_request_info *info,
* shared by all driver instances... Same for the members...
* This will be linked from net_device in <linux/netdevice.h>
*/
-struct iw_handler_def
-{
- /* Number of handlers defined (more precisely, index of the
- * last defined handler + 1) */
- __u16 num_standard;
- __u16 num_private;
- /* Number of private arg description */
- __u16 num_private_args;
+struct iw_handler_def {
/* Array of handlers for standard ioctls
* We will call dev->wireless_handlers->standard[ioctl - SIOCSIWCOMMIT]
*/
const iw_handler * standard;
+ /* Number of handlers defined (more precisely, index of the
+ * last defined handler + 1) */
+ __u16 num_standard;
+#ifdef CONFIG_WEXT_PRIV
+ __u16 num_private;
+ /* Number of private arg description */
+ __u16 num_private_args;
/* Array of handlers for private ioctls
* Will call dev->wireless_handlers->private[ioctl - SIOCIWFIRSTPRIV]
*/
@@ -344,6 +343,7 @@ struct iw_handler_def
* can put it in any order you want and should not leave holes...
* We will automatically export that to user space... */
const struct iw_priv_args * private_args;
+#endif
/* New location of get_wireless_stats, to de-bloat struct net_device.
* The old pointer in struct net_device will be gradually phased
@@ -370,8 +370,7 @@ struct iw_handler_def
/*
* Describe how a standard IOCTL looks like.
*/
-struct iw_ioctl_description
-{
+struct iw_ioctl_description {
__u8 header_type; /* NULL, iw_point or other */
__u8 token_type; /* Future */
__u16 token_size; /* Granularity of payload */
@@ -393,8 +392,7 @@ struct iw_ioctl_description
/*
* Instance specific spy data, i.e. addresses spied and quality for them.
*/
-struct iw_spy_data
-{
+struct iw_spy_data {
/* --- Standard spy support --- */
int spy_number;
u_char spy_address[IW_MAX_SPY][ETH_ALEN];
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c75b960..c42c4a8 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1665,11 +1665,11 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw);
* header if %RX_FLAG_RADIOTAP is set in the @status flags.
*
* This function may not be called in IRQ context. Calls to this function
- * for a single hardware must be synchronized against each other. Calls
- * to this function and ieee80211_rx_irqsafe() may not be mixed for a
- * single hardware.
+ * for a single hardware must be synchronized against each other. Calls to
+ * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be
+ * mixed for a single hardware.
*
- * Note that right now, this function must be called with softirqs disabled.
+ * In process context use instead ieee80211_rx_ni().
*
* @hw: the hardware this frame came in on
* @skb: the buffer to receive, owned by mac80211 after this call
@@ -1682,8 +1682,8 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
* Like ieee80211_rx() but can be called in IRQ context
* (internally defers to a tasklet.)
*
- * Calls to this function and ieee80211_rx() may not be mixed for a
- * single hardware.
+ * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not
+ * be mixed for a single hardware.
*
* @hw: the hardware this frame came in on
* @skb: the buffer to receive, owned by mac80211 after this call
@@ -1691,6 +1691,26 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb);
/**
+ * ieee80211_rx_ni - receive frame (in process context)
+ *
+ * Like ieee80211_rx() but can be called in process context
+ * (internally disables bottom halves).
+ *
+ * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may
+ * not be mixed for a single hardware.
+ *
+ * @hw: the hardware this frame came in on
+ * @skb: the buffer to receive, owned by mac80211 after this call
+ */
+static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
+ struct sk_buff *skb)
+{
+ local_bh_disable();
+ ieee80211_rx(hw, skb);
+ local_bh_enable();
+}
+
+/**
* ieee80211_tx_status - transmit status callback
*
* Call this function for all transmitted frames after they have been
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 3817fda..db8e96d 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -37,8 +37,7 @@
struct neighbour;
-struct neigh_parms
-{
+struct neigh_parms {
#ifdef CONFIG_NET_NS
struct net *net;
#endif
@@ -70,8 +69,7 @@ struct neigh_parms
int locktime;
};
-struct neigh_statistics
-{
+struct neigh_statistics {
unsigned long allocs; /* number of allocated neighs */
unsigned long destroys; /* number of destroyed neighs */
unsigned long hash_grows; /* number of hash resizes */
@@ -97,8 +95,7 @@ struct neigh_statistics
preempt_enable(); \
} while (0)
-struct neighbour
-{
+struct neighbour {
struct neighbour *next;
struct neigh_table *tbl;
struct neigh_parms *parms;
@@ -122,8 +119,7 @@ struct neighbour
u8 primary_key[0];
};
-struct neigh_ops
-{
+struct neigh_ops {
int family;
void (*solicit)(struct neighbour *, struct sk_buff*);
void (*error_report)(struct neighbour *, struct sk_buff*);
@@ -133,8 +129,7 @@ struct neigh_ops
int (*queue_xmit)(struct sk_buff*);
};
-struct pneigh_entry
-{
+struct pneigh_entry {
struct pneigh_entry *next;
#ifdef CONFIG_NET_NS
struct net *net;
@@ -149,8 +144,7 @@ struct pneigh_entry
*/
-struct neigh_table
-{
+struct neigh_table {
struct neigh_table *next;
int family;
int entry_size;
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index a120284..0addd45 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -28,6 +28,10 @@ struct ctl_table_header;
struct net_generic;
struct sock;
+
+#define NETDEV_HASHBITS 8
+#define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS)
+
struct net {
atomic_t count; /* To decided when the network
* namespace should be freed.
@@ -80,7 +84,7 @@ struct net {
#ifdef CONFIG_XFRM
struct netns_xfrm xfrm;
#endif
-#ifdef CONFIG_WIRELESS_EXT
+#ifdef CONFIG_WEXT_CORE
struct sk_buff_head wext_nlevents;
#endif
struct net_generic *gen;
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h
index 4f20d58..475facc 100644
--- a/include/net/netfilter/nf_conntrack_ecache.h
+++ b/include/net/netfilter/nf_conntrack_ecache.h
@@ -13,8 +13,7 @@
#include <net/netfilter/nf_conntrack_extend.h>
/* Connection tracking event types */
-enum ip_conntrack_events
-{
+enum ip_conntrack_events {
IPCT_NEW = 0, /* new conntrack */
IPCT_RELATED = 1, /* related conntrack */
IPCT_DESTROY = 2, /* destroyed conntrack */
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h
index a965280..9a2b9cb 100644
--- a/include/net/netfilter/nf_conntrack_expect.h
+++ b/include/net/netfilter/nf_conntrack_expect.h
@@ -9,8 +9,7 @@
extern unsigned int nf_ct_expect_hsize;
extern unsigned int nf_ct_expect_max;
-struct nf_conntrack_expect
-{
+struct nf_conntrack_expect {
/* Conntrack expectation list member */
struct hlist_node lnode;
@@ -64,8 +63,7 @@ static inline struct net *nf_ct_exp_net(struct nf_conntrack_expect *exp)
#endif
}
-struct nf_conntrack_expect_policy
-{
+struct nf_conntrack_expect_policy {
unsigned int max_expected;
unsigned int timeout;
};
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
index 7f8fc5d..e192dc1 100644
--- a/include/net/netfilter/nf_conntrack_extend.h
+++ b/include/net/netfilter/nf_conntrack_extend.h
@@ -3,8 +3,7 @@
#include <net/netfilter/nf_conntrack.h>
-enum nf_ct_ext_id
-{
+enum nf_ct_ext_id {
NF_CT_EXT_HELPER,
NF_CT_EXT_NAT,
NF_CT_EXT_ACCT,
@@ -65,8 +64,7 @@ __nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp);
#define NF_CT_EXT_F_PREALLOC 0x0001
-struct nf_ct_ext_type
-{
+struct nf_ct_ext_type {
/* Destroys relationships (can be NULL). */
void (*destroy)(struct nf_conn *ct);
/* Called when realloacted (can be NULL).
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h
index 1b70680..d015de9 100644
--- a/include/net/netfilter/nf_conntrack_helper.h
+++ b/include/net/netfilter/nf_conntrack_helper.h
@@ -16,8 +16,7 @@ struct module;
#define NF_CT_HELPER_NAME_LEN 16
-struct nf_conntrack_helper
-{
+struct nf_conntrack_helper {
struct hlist_node hnode; /* Internal use. */
const char *name; /* name of the module */
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index 9f99d36..a754761 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -16,8 +16,7 @@
#include <linux/seq_file.h>
#include <net/netfilter/nf_conntrack.h>
-struct nf_conntrack_l3proto
-{
+struct nf_conntrack_l3proto {
/* L3 Protocol Family number. ex) PF_INET */
u_int16_t l3proto;
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index 3767fb4..ca6dcf3 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -15,8 +15,7 @@
struct seq_file;
-struct nf_conntrack_l4proto
-{
+struct nf_conntrack_l4proto {
/* L3 Protocol number. */
u_int16_t l3proto;
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
index 2628c15..4ee44c8 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -26,8 +26,7 @@
/* The protocol-specific manipulable parts of the tuple: always in
network order! */
-union nf_conntrack_man_proto
-{
+union nf_conntrack_man_proto {
/* Add other protocols here. */
__be16 all;
@@ -52,8 +51,7 @@ union nf_conntrack_man_proto
};
/* The manipulable part of the tuple. */
-struct nf_conntrack_man
-{
+struct nf_conntrack_man {
union nf_inet_addr u3;
union nf_conntrack_man_proto u;
/* Layer 3 protocol */
@@ -61,8 +59,7 @@ struct nf_conntrack_man
};
/* This contains the information to distinguish a connection. */
-struct nf_conntrack_tuple
-{
+struct nf_conntrack_tuple {
struct nf_conntrack_man src;
/* These are the parts of the tuple which are fixed. */
@@ -100,8 +97,7 @@ struct nf_conntrack_tuple
} dst;
};
-struct nf_conntrack_tuple_mask
-{
+struct nf_conntrack_tuple_mask {
struct {
union nf_inet_addr u3;
union nf_conntrack_man_proto u;
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h
index 8df0b7f..f5f09f0 100644
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -5,8 +5,7 @@
#define NF_NAT_MAPPING_TYPE_MAX_NAMELEN 16
-enum nf_nat_manip_type
-{
+enum nf_nat_manip_type {
IP_NAT_MANIP_SRC,
IP_NAT_MANIP_DST
};
@@ -30,8 +29,7 @@ struct nf_nat_seq {
};
/* Single range specification. */
-struct nf_nat_range
-{
+struct nf_nat_range {
/* Set to OR of flags above. */
unsigned int flags;
@@ -43,8 +41,7 @@ struct nf_nat_range
};
/* For backwards compat: don't use in modern code. */
-struct nf_nat_multi_range_compat
-{
+struct nf_nat_multi_range_compat {
unsigned int rangesize; /* Must be 1. */
/* hangs off end. */
@@ -57,8 +54,7 @@ struct nf_nat_multi_range_compat
#include <net/netfilter/nf_conntrack_extend.h>
/* per conntrack: nat application helper private data */
-union nf_conntrack_nat_help
-{
+union nf_conntrack_nat_help {
/* insert nat helper private data here */
struct nf_nat_pptp nat_pptp_info;
};
@@ -66,8 +62,7 @@ union nf_conntrack_nat_help
struct nf_conn;
/* The structure embedded in the conntrack structure. */
-struct nf_conn_nat
-{
+struct nf_conn_nat {
struct hlist_node bysource;
struct nf_nat_seq seq[IP_CT_DIR_MAX];
struct nf_conn *ct;
diff --git a/include/net/netfilter/nf_nat_protocol.h b/include/net/netfilter/nf_nat_protocol.h
index f3662c4..c398017 100644
--- a/include/net/netfilter/nf_nat_protocol.h
+++ b/include/net/netfilter/nf_nat_protocol.h
@@ -6,8 +6,7 @@
struct nf_nat_range;
-struct nf_nat_protocol
-{
+struct nf_nat_protocol {
/* Protocol number. */
unsigned int protonum;
diff --git a/include/net/phonet/phonet.h b/include/net/phonet/phonet.h
index d43f71b..fdb05fa 100644
--- a/include/net/phonet/phonet.h
+++ b/include/net/phonet/phonet.h
@@ -47,6 +47,7 @@ static inline struct pn_sock *pn_sk(struct sock *sk)
extern const struct proto_ops phonet_dgram_ops;
struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *sa);
+void pn_deliver_sock_broadcast(struct net *net, struct sk_buff *skb);
void phonet_get_local_port_range(int *min, int *max);
void pn_sock_hash(struct sock *sk);
void pn_sock_unhash(struct sock *sk);
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h
index 44c923c..afa7def 100644
--- a/include/net/phonet/pn_dev.h
+++ b/include/net/phonet/pn_dev.h
@@ -47,6 +47,12 @@ u8 phonet_address_get(struct net_device *dev, u8 addr);
int phonet_address_lookup(struct net *net, u8 addr);
void phonet_address_notify(int event, struct net_device *dev, u8 addr);
+int phonet_route_add(struct net_device *dev, u8 daddr);
+int phonet_route_del(struct net_device *dev, u8 daddr);
+void rtm_phonet_notify(int event, struct net_device *dev, u8 dst);
+struct net_device *phonet_route_get(struct net *net, u8 daddr);
+struct net_device *phonet_route_output(struct net *net, u8 daddr);
+
#define PN_NO_ADDR 0xff
extern const struct file_operations pn_sock_seq_fops;
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index d1ca314..3dd210d 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -7,8 +7,7 @@
/* Basic packet classifier frontend definitions. */
-struct tcf_walker
-{
+struct tcf_walker {
int stop;
int skip;
int count;
@@ -61,8 +60,7 @@ tcf_unbind_filter(struct tcf_proto *tp, struct tcf_result *r)
tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
}
-struct tcf_exts
-{
+struct tcf_exts {
#ifdef CONFIG_NET_CLS_ACT
struct tc_action *action;
#endif
@@ -71,8 +69,7 @@ struct tcf_exts
/* Map to export classifier specific extension TLV types to the
* generic extensions API. Unsupported extensions must be set to 0.
*/
-struct tcf_ext_map
-{
+struct tcf_ext_map {
int action;
int police;
};
@@ -143,8 +140,7 @@ extern int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts,
/**
* struct tcf_pkt_info - packet information
*/
-struct tcf_pkt_info
-{
+struct tcf_pkt_info {
unsigned char * ptr;
int nexthdr;
};
@@ -162,8 +158,7 @@ struct tcf_ematch_ops;
* @datalen: length of the ematch specific configuration data
* @data: ematch specific data
*/
-struct tcf_ematch
-{
+struct tcf_ematch {
struct tcf_ematch_ops * ops;
unsigned long data;
unsigned int datalen;
@@ -211,8 +206,7 @@ static inline int tcf_em_early_end(struct tcf_ematch *em, int result)
* @hdr: ematch tree header supplied by userspace
* @matches: array of ematches
*/
-struct tcf_ematch_tree
-{
+struct tcf_ematch_tree {
struct tcf_ematch_tree_hdr hdr;
struct tcf_ematch * matches;
@@ -230,8 +224,7 @@ struct tcf_ematch_tree
* @owner: owner, must be set to THIS_MODULE
* @link: link to previous/next ematch module (internal use)
*/
-struct tcf_ematch_ops
-{
+struct tcf_ematch_ops {
int kind;
int datalen;
int (*change)(struct tcf_proto *, void *,
@@ -302,8 +295,7 @@ static inline int tcf_em_tree_match(struct sk_buff *skb,
#else /* CONFIG_NET_EMATCH */
-struct tcf_ematch_tree
-{
+struct tcf_ematch_tree {
};
#define tcf_em_tree_validate(tp, tb, t) ((void)(t), 0)
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index f911ec7..2d56726 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -5,8 +5,7 @@
#include <linux/ktime.h>
#include <net/sch_generic.h>
-struct qdisc_walker
-{
+struct qdisc_walker {
int stop;
int skip;
int count;
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 60249e5..f1effdd 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -47,8 +47,7 @@ struct net_protocol {
};
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
-struct inet6_protocol
-{
+struct inet6_protocol {
int (*handler)(struct sk_buff *skb);
void (*err_handler)(struct sk_buff *skb,
@@ -83,10 +82,6 @@ struct inet_protosw {
struct proto *prot;
const struct proto_ops *ops;
- int capability; /* Which (if any) capability do
- * we need to use this socket
- * interface?
- */
char no_check; /* checksum on rcv/xmit/none? */
unsigned char flags; /* See INET_PROTOSW_* below. */
};
diff --git a/include/net/red.h b/include/net/red.h
index 3cf31d4..995108e 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -90,8 +90,7 @@
#define RED_STAB_SIZE 256
#define RED_STAB_MASK (RED_STAB_SIZE - 1)
-struct red_stats
-{
+struct red_stats {
u32 prob_drop; /* Early probability drops */
u32 prob_mark; /* Early probability marks */
u32 forced_drop; /* Forced drops, qavg > max_thresh */
@@ -101,8 +100,7 @@ struct red_stats
u32 backlog;
};
-struct red_parms
-{
+struct red_parms {
/* Parameters */
u32 qth_min; /* Min avg length threshold: A scaled */
u32 qth_max; /* Max avg length threshold: A scaled */
diff --git a/include/net/route.h b/include/net/route.h
index 40f6346..cfb4c07 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -49,10 +49,8 @@
struct fib_nh;
struct inet_peer;
-struct rtable
-{
- union
- {
+struct rtable {
+ union {
struct dst_entry dst;
} u;
@@ -77,16 +75,14 @@ struct rtable
struct inet_peer *peer; /* long-living peer info */
};
-struct ip_rt_acct
-{
+struct ip_rt_acct {
__u32 o_bytes;
__u32 o_packets;
__u32 i_bytes;
__u32 i_packets;
};
-struct rt_cache_stat
-{
+struct rt_cache_stat {
unsigned int in_hit;
unsigned int in_slow_tot;
unsigned int in_slow_mc;
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index c3aa044d..cd5af1f 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -61,7 +61,8 @@ struct rtnl_link_ops {
int (*changelink)(struct net_device *dev,
struct nlattr *tb[],
struct nlattr *data[]);
- void (*dellink)(struct net_device *dev);
+ void (*dellink)(struct net_device *dev,
+ struct list_head *head);
size_t (*get_size)(const struct net_device *dev);
int (*fill_info)(struct sk_buff *skb,
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index c33180d..dad558b 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -15,16 +15,14 @@ struct qdisc_walker;
struct tcf_walker;
struct module;
-struct qdisc_rate_table
-{
+struct qdisc_rate_table {
struct tc_ratespec rate;
u32 data[256];
struct qdisc_rate_table *next;
int refcnt;
};
-enum qdisc_state_t
-{
+enum qdisc_state_t {
__QDISC_STATE_RUNNING,
__QDISC_STATE_SCHED,
__QDISC_STATE_DEACTIVATED,
@@ -37,8 +35,7 @@ struct qdisc_size_table {
u16 data[];
};
-struct Qdisc
-{
+struct Qdisc {
int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev);
struct sk_buff * (*dequeue)(struct Qdisc *dev);
unsigned flags;
@@ -78,8 +75,7 @@ struct Qdisc
struct gnet_stats_queue qstats;
};
-struct Qdisc_class_ops
-{
+struct Qdisc_class_ops {
/* Child qdisc manipulation */
struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *);
int (*graft)(struct Qdisc *, unsigned long cl,
@@ -108,8 +104,7 @@ struct Qdisc_class_ops
struct gnet_dump *);
};
-struct Qdisc_ops
-{
+struct Qdisc_ops {
struct Qdisc_ops *next;
const struct Qdisc_class_ops *cl_ops;
char id[IFNAMSIZ];
@@ -133,14 +128,12 @@ struct Qdisc_ops
};
-struct tcf_result
-{
+struct tcf_result {
unsigned long class;
u32 classid;
};
-struct tcf_proto_ops
-{
+struct tcf_proto_ops {
struct tcf_proto_ops *next;
char kind[IFNAMSIZ];
@@ -164,8 +157,7 @@ struct tcf_proto_ops
struct module *owner;
};
-struct tcf_proto
-{
+struct tcf_proto {
/* Fast access part */
struct tcf_proto *next;
void *root;
@@ -261,14 +253,12 @@ extern struct Qdisc_ops noop_qdisc_ops;
extern struct Qdisc_ops pfifo_fast_ops;
extern struct Qdisc_ops mq_qdisc_ops;
-struct Qdisc_class_common
-{
+struct Qdisc_class_common {
u32 classid;
struct hlist_node hnode;
};
-struct Qdisc_class_hash
-{
+struct Qdisc_class_hash {
struct hlist_head *hash;
unsigned int hashsize;
unsigned int hashmask;
diff --git a/include/net/scm.h b/include/net/scm.h
index cf48c80..8360e47 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -12,15 +12,13 @@
*/
#define SCM_MAX_FD 255
-struct scm_fp_list
-{
+struct scm_fp_list {
struct list_head list;
int count;
struct file *fp[SCM_MAX_FD];
};
-struct scm_cookie
-{
+struct scm_cookie {
struct ucred creds; /* Skb credentials */
struct scm_fp_list *fp; /* Passed files */
#ifdef CONFIG_SECURITY_NETWORK
@@ -88,8 +86,7 @@ static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct sc
static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg,
struct scm_cookie *scm, int flags)
{
- if (!msg->msg_control)
- {
+ if (!msg->msg_control) {
if (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp)
msg->msg_flags |= MSG_CTRUNC;
scm_destroy(scm);
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 8a6d529..78740ec 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -227,8 +227,7 @@ DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics);
#endif /* !TEST_FRAME */
/* sctp mib definitions */
-enum
-{
+enum {
SCTP_MIB_NUM = 0,
SCTP_MIB_CURRESTAB, /* CurrEstab */
SCTP_MIB_ACTIVEESTABS, /* ActiveEstabs */
diff --git a/include/net/sock.h b/include/net/sock.h
index 9f96394..55de3bd 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -107,6 +107,7 @@ struct net;
* @skc_node: main hash linkage for various protocol lookup tables
* @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol
* @skc_refcnt: reference count
+ * @skc_tx_queue_mapping: tx queue number for this connection
* @skc_hash: hash value used with various protocol lookup tables
* @skc_family: network address family
* @skc_state: Connection state
@@ -128,6 +129,7 @@ struct sock_common {
struct hlist_nulls_node skc_nulls_node;
};
atomic_t skc_refcnt;
+ int skc_tx_queue_mapping;
unsigned int skc_hash;
unsigned short skc_family;
@@ -215,6 +217,7 @@ struct sock {
#define sk_node __sk_common.skc_node
#define sk_nulls_node __sk_common.skc_nulls_node
#define sk_refcnt __sk_common.skc_refcnt
+#define sk_tx_queue_mapping __sk_common.skc_tx_queue_mapping
#define sk_copy_start __sk_common.skc_hash
#define sk_hash __sk_common.skc_hash
@@ -504,6 +507,8 @@ enum sock_flags {
SOCK_TIMESTAMPING_SOFTWARE, /* %SOF_TIMESTAMPING_SOFTWARE */
SOCK_TIMESTAMPING_RAW_HARDWARE, /* %SOF_TIMESTAMPING_RAW_HARDWARE */
SOCK_TIMESTAMPING_SYS_HARDWARE, /* %SOF_TIMESTAMPING_SYS_HARDWARE */
+ SOCK_FASYNC, /* fasync() active */
+ SOCK_RXQ_OVFL,
};
static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
@@ -1092,8 +1097,29 @@ static inline void sock_put(struct sock *sk)
extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb,
const int nested);
+static inline void sk_tx_queue_set(struct sock *sk, int tx_queue)
+{
+ sk->sk_tx_queue_mapping = tx_queue;
+}
+
+static inline void sk_tx_queue_clear(struct sock *sk)
+{
+ sk->sk_tx_queue_mapping = -1;
+}
+
+static inline int sk_tx_queue_get(const struct sock *sk)
+{
+ return sk->sk_tx_queue_mapping;
+}
+
+static inline bool sk_tx_queue_recorded(const struct sock *sk)
+{
+ return (sk && sk->sk_tx_queue_mapping >= 0);
+}
+
static inline void sk_set_socket(struct sock *sk, struct socket *sock)
{
+ sk_tx_queue_clear(sk);
sk->sk_socket = sock;
}
@@ -1150,6 +1176,7 @@ __sk_dst_set(struct sock *sk, struct dst_entry *dst)
{
struct dst_entry *old_dst;
+ sk_tx_queue_clear(sk);
old_dst = sk->sk_dst_cache;
sk->sk_dst_cache = dst;
dst_release(old_dst);
@@ -1168,6 +1195,7 @@ __sk_dst_reset(struct sock *sk)
{
struct dst_entry *old_dst;
+ sk_tx_queue_clear(sk);
old_dst = sk->sk_dst_cache;
sk->sk_dst_cache = NULL;
dst_release(old_dst);
@@ -1396,7 +1424,7 @@ static inline unsigned long sock_wspace(struct sock *sk)
static inline void sk_wake_async(struct sock *sk, int how, int band)
{
- if (sk->sk_socket && sk->sk_socket->fasync_list)
+ if (sock_flag(sk, SOCK_FASYNC))
sock_wake_async(sk->sk_socket, how, band);
}
@@ -1492,6 +1520,8 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
sk->sk_stamp = kt;
}
+extern void sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, struct sk_buff *skb);
+
/**
* sock_tx_timestamp - checks whether the outgoing packet is to be time stamped
* @msg: outgoing packet
diff --git a/include/net/tc_act/tc_skbedit.h b/include/net/tc_act/tc_skbedit.h
index 6abb3ed..e103fe0 100644
--- a/include/net/tc_act/tc_skbedit.h
+++ b/include/net/tc_act/tc_skbedit.h
@@ -26,7 +26,9 @@ struct tcf_skbedit {
struct tcf_common common;
u32 flags;
u32 priority;
+ u32 mark;
u16 queue_mapping;
+ /* XXX: 16-bit pad here? */
};
#define to_skbedit(pc) \
container_of(pc, struct tcf_skbedit, common)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 03a49c7..bf20f88 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -359,8 +359,7 @@ TCP_ECN_create_request(struct request_sock *req, struct tcphdr *th)
inet_rsk(req)->ecn_ok = 1;
}
-enum tcp_tw_status
-{
+enum tcp_tw_status {
TCP_TW_SUCCESS = 0,
TCP_TW_RST = 1,
TCP_TW_ACK = 2,
@@ -409,7 +408,8 @@ extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk,
extern void tcp_parse_options(struct sk_buff *skb,
struct tcp_options_received *opt_rx,
- int estab);
+ int estab,
+ struct dst_entry *dst);
extern u8 *tcp_parse_md5sig_option(struct tcphdr *th);
diff --git a/include/net/udp.h b/include/net/udp.h
index f98abd2..22aa2e7 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -54,12 +54,19 @@ struct udp_hslot {
struct hlist_nulls_head head;
spinlock_t lock;
} __attribute__((aligned(2 * sizeof(long))));
+
struct udp_table {
- struct udp_hslot hash[UDP_HTABLE_SIZE];
+ struct udp_hslot *hash;
+ unsigned int mask;
+ unsigned int log;
};
extern struct udp_table udp_table;
-extern void udp_table_init(struct udp_table *);
-
+extern void udp_table_init(struct udp_table *, const char *);
+static inline struct udp_hslot *udp_hashslot(struct udp_table *table,
+ struct net *net, unsigned num)
+{
+ return &table->hash[udp_hashfn(net, num, table->mask)];
+}
/* Note: this must match 'valbool' in sock_setsockopt */
#define UDP_CSUM_NOXMIT 1
diff --git a/include/net/wext.h b/include/net/wext.h
index 3f2b94d..4f6e742 100644
--- a/include/net/wext.h
+++ b/include/net/wext.h
@@ -1,29 +1,19 @@
#ifndef __NET_WEXT_H
#define __NET_WEXT_H
-/*
- * wireless extensions interface to the core code
- */
+#include <net/iw_handler.h>
struct net;
-#ifdef CONFIG_WIRELESS_EXT
-extern int wext_proc_init(struct net *net);
-extern void wext_proc_exit(struct net *net);
+#ifdef CONFIG_WEXT_CORE
extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
void __user *arg);
extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
unsigned long arg);
+
extern struct iw_statistics *get_wireless_stats(struct net_device *dev);
+extern int call_commit_handler(struct net_device *dev);
#else
-static inline int wext_proc_init(struct net *net)
-{
- return 0;
-}
-static inline void wext_proc_exit(struct net *net)
-{
- return;
-}
static inline int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
void __user *arg)
{
@@ -36,4 +26,35 @@ static inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
}
#endif
+#ifdef CONFIG_WEXT_PROC
+extern int wext_proc_init(struct net *net);
+extern void wext_proc_exit(struct net *net);
+#else
+static inline int wext_proc_init(struct net *net)
+{
+ return 0;
+}
+static inline void wext_proc_exit(struct net *net)
+{
+ return;
+}
+#endif
+
+#ifdef CONFIG_WEXT_PRIV
+int ioctl_private_call(struct net_device *dev, struct iwreq *iwr,
+ unsigned int cmd, struct iw_request_info *info,
+ iw_handler handler);
+int compat_private_call(struct net_device *dev, struct iwreq *iwr,
+ unsigned int cmd, struct iw_request_info *info,
+ iw_handler handler);
+int iw_handler_get_private(struct net_device * dev,
+ struct iw_request_info * info,
+ union iwreq_data * wrqu,
+ char * extra);
+#else
+#define ioctl_private_call NULL
+#define compat_private_call NULL
+#endif
+
+
#endif /* __NET_WEXT_H */
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 223e90a..7f38ef5 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -121,8 +121,7 @@ struct xfrm_state_walk {
};
/* Full description of state of transformer. */
-struct xfrm_state
-{
+struct xfrm_state {
#ifdef CONFIG_NET_NS
struct net *xs_net;
#endif
@@ -237,8 +236,7 @@ enum {
};
/* callback structure passed from either netlink or pfkey */
-struct km_event
-{
+struct km_event {
union {
u32 hard;
u32 proto;
@@ -313,8 +311,7 @@ extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo);
extern void xfrm_state_delete_tunnel(struct xfrm_state *x);
-struct xfrm_type
-{
+struct xfrm_type {
char *description;
struct module *owner;
__u8 proto;
@@ -420,8 +417,7 @@ static inline struct xfrm_mode *xfrm_ip2inner_mode(struct xfrm_state *x, int ipp
return x->inner_mode_iaf;
}
-struct xfrm_tmpl
-{
+struct xfrm_tmpl {
/* id in template is interpreted as:
* daddr - destination of tunnel, may be zero for transport mode.
* spi - zero to acquire spi. Not zero if spi is static, then
@@ -468,8 +464,7 @@ struct xfrm_policy_walk {
u32 seq;
};
-struct xfrm_policy
-{
+struct xfrm_policy {
#ifdef CONFIG_NET_NS
struct net *xp_net;
#endif
@@ -538,8 +533,7 @@ struct xfrm_migrate {
/* default seq threshold size */
#define XFRM_AE_SEQT_SIZE 2
-struct xfrm_mgr
-{
+struct xfrm_mgr {
struct list_head list;
char *id;
int (*notify)(struct xfrm_state *x, struct km_event *c);
@@ -626,8 +620,7 @@ struct xfrm_spi_skb_cb {
#define XFRM_SPI_SKB_CB(__skb) ((struct xfrm_spi_skb_cb *)&((__skb)->cb[0]))
/* Audit Information */
-struct xfrm_audit
-{
+struct xfrm_audit {
u32 secid;
uid_t loginuid;
u32 sessionid;
@@ -871,8 +864,7 @@ static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ct
* bundles differing by session id. All the bundles grow from a parent
* policy rule.
*/
-struct xfrm_dst
-{
+struct xfrm_dst {
union {
struct dst_entry dst;
struct rtable rt;
@@ -907,8 +899,7 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev);
-struct sec_path
-{
+struct sec_path {
atomic_t refcnt;
int len;
struct xfrm_state *xvec[XFRM_MAX_DEPTH];
@@ -1500,9 +1491,6 @@ struct scatterlist;
typedef int (icv_update_fn_t)(struct hash_desc *, struct scatterlist *,
unsigned int);
-extern int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *tfm,
- int offset, int len, icv_update_fn_t icv_update);
-
static inline int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b,
int family)
{