aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/arp.h8
-rw-r--r--include/net/bluetooth/hci.h11
-rw-r--r--include/net/bluetooth/hci_core.h18
-rw-r--r--include/net/cipso_ipv4.h5
-rw-r--r--include/net/dst.h2
-rw-r--r--include/net/flow.h10
-rw-r--r--include/net/genetlink.h18
-rw-r--r--include/net/icmp.h2
-rw-r--r--include/net/inet_connection_sock.h6
-rw-r--r--include/net/inet_hashtables.h56
-rw-r--r--include/net/inet_sock.h34
-rw-r--r--include/net/inet_timewait_sock.h10
-rw-r--r--include/net/inetpeer.h4
-rw-r--r--include/net/ip.h10
-rw-r--r--include/net/ip_fib.h28
-rw-r--r--include/net/ip_mp_alg.h4
-rw-r--r--include/net/ip_vs.h68
-rw-r--r--include/net/ipv6.h6
-rw-r--r--include/net/irda/irlan_common.h10
-rw-r--r--include/net/irda/irlap_frame.h31
-rw-r--r--include/net/irda/irlmp.h2
-rw-r--r--include/net/netlabel.h8
-rw-r--r--include/net/netlink.h12
-rw-r--r--include/net/route.h24
-rw-r--r--include/net/sock.h1
-rw-r--r--include/net/xfrm.h26
26 files changed, 261 insertions, 153 deletions
diff --git a/include/net/arp.h b/include/net/arp.h
index 643bded9f557..6a3d9a7d302b 100644
--- a/include/net/arp.h
+++ b/include/net/arp.h
@@ -12,15 +12,15 @@ extern struct neigh_table arp_tbl;
12extern void arp_init(void); 12extern void arp_init(void);
13extern int arp_find(unsigned char *haddr, struct sk_buff *skb); 13extern int arp_find(unsigned char *haddr, struct sk_buff *skb);
14extern int arp_ioctl(unsigned int cmd, void __user *arg); 14extern int arp_ioctl(unsigned int cmd, void __user *arg);
15extern void arp_send(int type, int ptype, u32 dest_ip, 15extern void arp_send(int type, int ptype, __be32 dest_ip,
16 struct net_device *dev, u32 src_ip, 16 struct net_device *dev, __be32 src_ip,
17 unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); 17 unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th);
18extern int arp_bind_neighbour(struct dst_entry *dst); 18extern int arp_bind_neighbour(struct dst_entry *dst);
19extern int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir); 19extern int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir);
20extern void arp_ifdown(struct net_device *dev); 20extern void arp_ifdown(struct net_device *dev);
21 21
22extern struct sk_buff *arp_create(int type, int ptype, u32 dest_ip, 22extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
23 struct net_device *dev, u32 src_ip, 23 struct net_device *dev, __be32 src_ip,
24 unsigned char *dest_hw, unsigned char *src_hw, 24 unsigned char *dest_hw, unsigned char *src_hw,
25 unsigned char *target_hw); 25 unsigned char *target_hw);
26extern void arp_xmit(struct sk_buff *skb); 26extern void arp_xmit(struct sk_buff *skb);
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index b2bdb1aa0429..10a3eec191fd 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -44,12 +44,13 @@
44#define HCI_NOTIFY_VOICE_SETTING 3 44#define HCI_NOTIFY_VOICE_SETTING 3
45 45
46/* HCI device types */ 46/* HCI device types */
47#define HCI_VHCI 0 47#define HCI_VIRTUAL 0
48#define HCI_USB 1 48#define HCI_USB 1
49#define HCI_PCCARD 2 49#define HCI_PCCARD 2
50#define HCI_UART 3 50#define HCI_UART 3
51#define HCI_RS232 4 51#define HCI_RS232 4
52#define HCI_PCI 5 52#define HCI_PCI 5
53#define HCI_SDIO 6
53 54
54/* HCI device quirks */ 55/* HCI device quirks */
55enum { 56enum {
@@ -296,6 +297,7 @@ struct hci_cp_host_buffer_size {
296 297
297/* Link Control */ 298/* Link Control */
298#define OGF_LINK_CTL 0x01 299#define OGF_LINK_CTL 0x01
300
299#define OCF_CREATE_CONN 0x0005 301#define OCF_CREATE_CONN 0x0005
300struct hci_cp_create_conn { 302struct hci_cp_create_conn {
301 bdaddr_t bdaddr; 303 bdaddr_t bdaddr;
@@ -306,6 +308,11 @@ struct hci_cp_create_conn {
306 __u8 role_switch; 308 __u8 role_switch;
307} __attribute__ ((packed)); 309} __attribute__ ((packed));
308 310
311#define OCF_CREATE_CONN_CANCEL 0x0008
312struct hci_cp_create_conn_cancel {
313 bdaddr_t bdaddr;
314} __attribute__ ((packed));
315
309#define OCF_ACCEPT_CONN_REQ 0x0009 316#define OCF_ACCEPT_CONN_REQ 0x0009
310struct hci_cp_accept_conn_req { 317struct hci_cp_accept_conn_req {
311 bdaddr_t bdaddr; 318 bdaddr_t bdaddr;
@@ -339,6 +346,8 @@ struct hci_cp_inquiry {
339 346
340#define OCF_INQUIRY_CANCEL 0x0002 347#define OCF_INQUIRY_CANCEL 0x0002
341 348
349#define OCF_EXIT_PERIODIC_INQ 0x0004
350
342#define OCF_LINK_KEY_REPLY 0x000B 351#define OCF_LINK_KEY_REPLY 0x000B
343struct hci_cp_link_key_reply { 352struct hci_cp_link_key_reply {
344 bdaddr_t bdaddr; 353 bdaddr_t bdaddr;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index d84855fe7336..df22efcfcc0b 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -72,6 +72,9 @@ struct hci_dev {
72 __u8 type; 72 __u8 type;
73 bdaddr_t bdaddr; 73 bdaddr_t bdaddr;
74 __u8 features[8]; 74 __u8 features[8];
75 __u8 hci_ver;
76 __u16 hci_rev;
77 __u16 manufacturer;
75 __u16 voice_setting; 78 __u16 voice_setting;
76 79
77 __u16 pkt_type; 80 __u16 pkt_type;
@@ -165,6 +168,10 @@ struct hci_conn {
165 struct timer_list disc_timer; 168 struct timer_list disc_timer;
166 struct timer_list idle_timer; 169 struct timer_list idle_timer;
167 170
171 struct work_struct work;
172
173 struct device dev;
174
168 struct hci_dev *hdev; 175 struct hci_dev *hdev;
169 void *l2cap_data; 176 void *l2cap_data;
170 void *sco_data; 177 void *sco_data;
@@ -309,10 +316,13 @@ static inline void hci_conn_put(struct hci_conn *conn)
309 if (atomic_dec_and_test(&conn->refcnt)) { 316 if (atomic_dec_and_test(&conn->refcnt)) {
310 unsigned long timeo; 317 unsigned long timeo;
311 if (conn->type == ACL_LINK) { 318 if (conn->type == ACL_LINK) {
312 timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT);
313 if (!conn->out)
314 timeo *= 2;
315 del_timer(&conn->idle_timer); 319 del_timer(&conn->idle_timer);
320 if (conn->state == BT_CONNECTED) {
321 timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT);
322 if (!conn->out)
323 timeo *= 2;
324 } else
325 timeo = msecs_to_jiffies(10);
316 } else 326 } else
317 timeo = msecs_to_jiffies(10); 327 timeo = msecs_to_jiffies(10);
318 mod_timer(&conn->disc_timer, jiffies + timeo); 328 mod_timer(&conn->disc_timer, jiffies + timeo);
@@ -412,6 +422,8 @@ static inline int hci_recv_frame(struct sk_buff *skb)
412 422
413int hci_register_sysfs(struct hci_dev *hdev); 423int hci_register_sysfs(struct hci_dev *hdev);
414void hci_unregister_sysfs(struct hci_dev *hdev); 424void hci_unregister_sysfs(struct hci_dev *hdev);
425void hci_conn_add_sysfs(struct hci_conn *conn);
426void hci_conn_del_sysfs(struct hci_conn *conn);
415 427
416#define SET_HCIDEV_DEV(hdev, pdev) ((hdev)->parent = (pdev)) 428#define SET_HCIDEV_DEV(hdev, pdev) ((hdev)->parent = (pdev))
417 429
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
index 2d72496c2029..718b4d9c891f 100644
--- a/include/net/cipso_ipv4.h
+++ b/include/net/cipso_ipv4.h
@@ -128,7 +128,9 @@ extern int cipso_v4_rbm_strictvalid;
128 128
129#ifdef CONFIG_NETLABEL 129#ifdef CONFIG_NETLABEL
130int cipso_v4_doi_add(struct cipso_v4_doi *doi_def); 130int cipso_v4_doi_add(struct cipso_v4_doi *doi_def);
131int cipso_v4_doi_remove(u32 doi, void (*callback) (struct rcu_head * head)); 131int cipso_v4_doi_remove(u32 doi,
132 struct netlbl_audit *audit_info,
133 void (*callback) (struct rcu_head * head));
132struct cipso_v4_doi *cipso_v4_doi_getdef(u32 doi); 134struct cipso_v4_doi *cipso_v4_doi_getdef(u32 doi);
133int cipso_v4_doi_walk(u32 *skip_cnt, 135int cipso_v4_doi_walk(u32 *skip_cnt,
134 int (*callback) (struct cipso_v4_doi *doi_def, void *arg), 136 int (*callback) (struct cipso_v4_doi *doi_def, void *arg),
@@ -143,6 +145,7 @@ static inline int cipso_v4_doi_add(struct cipso_v4_doi *doi_def)
143} 145}
144 146
145static inline int cipso_v4_doi_remove(u32 doi, 147static inline int cipso_v4_doi_remove(u32 doi,
148 struct netlbl_audit *audit_info,
146 void (*callback) (struct rcu_head * head)) 149 void (*callback) (struct rcu_head * head))
147{ 150{
148 return 0; 151 return 0;
diff --git a/include/net/dst.h b/include/net/dst.h
index a8d825f90305..e156e38e4ac3 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -84,7 +84,7 @@ struct dst_entry
84struct dst_ops 84struct dst_ops
85{ 85{
86 unsigned short family; 86 unsigned short family;
87 unsigned short protocol; 87 __be16 protocol;
88 unsigned gc_thresh; 88 unsigned gc_thresh;
89 89
90 int (*gc)(void); 90 int (*gc)(void);
diff --git a/include/net/flow.h b/include/net/flow.h
index 3ca210ec1379..ddf5f3ca1720 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -16,8 +16,8 @@ struct flowi {
16 16
17 union { 17 union {
18 struct { 18 struct {
19 __u32 daddr; 19 __be32 daddr;
20 __u32 saddr; 20 __be32 saddr;
21 __u32 fwmark; 21 __u32 fwmark;
22 __u8 tos; 22 __u8 tos;
23 __u8 scope; 23 __u8 scope;
@@ -56,8 +56,8 @@ struct flowi {
56#define FLOWI_FLAG_MULTIPATHOLDROUTE 0x01 56#define FLOWI_FLAG_MULTIPATHOLDROUTE 0x01
57 union { 57 union {
58 struct { 58 struct {
59 __u16 sport; 59 __be16 sport;
60 __u16 dport; 60 __be16 dport;
61 } ports; 61 } ports;
62 62
63 struct { 63 struct {
@@ -73,7 +73,7 @@ struct flowi {
73 __u8 objname[16]; /* Not zero terminated */ 73 __u8 objname[16]; /* Not zero terminated */
74 } dnports; 74 } dnports;
75 75
76 __u32 spi; 76 __be32 spi;
77 77
78#ifdef CONFIG_IPV6_MIP6 78#ifdef CONFIG_IPV6_MIP6
79 struct { 79 struct {
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 4a38d85e4e25..b619314218a6 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -169,4 +169,22 @@ static inline int genlmsg_len(const struct genlmsghdr *gnlh)
169 return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN); 169 return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN);
170} 170}
171 171
172/**
173 * genlmsg_msg_size - length of genetlink message not including padding
174 * @payload: length of message payload
175 */
176static inline int genlmsg_msg_size(int payload)
177{
178 return GENL_HDRLEN + payload;
179}
180
181/**
182 * genlmsg_total_size - length of genetlink message including padding
183 * @payload: length of message payload
184 */
185static inline int genlmsg_total_size(int payload)
186{
187 return NLMSG_ALIGN(genlmsg_msg_size(payload));
188}
189
172#endif /* __NET_GENERIC_NETLINK_H */ 190#endif /* __NET_GENERIC_NETLINK_H */
diff --git a/include/net/icmp.h b/include/net/icmp.h
index 05f8ff7d9316..dc09474efcf3 100644
--- a/include/net/icmp.h
+++ b/include/net/icmp.h
@@ -38,7 +38,7 @@ struct dst_entry;
38struct net_proto_family; 38struct net_proto_family;
39struct sk_buff; 39struct sk_buff;
40 40
41extern void icmp_send(struct sk_buff *skb_in, int type, int code, u32 info); 41extern void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info);
42extern int icmp_rcv(struct sk_buff *skb); 42extern int icmp_rcv(struct sk_buff *skb);
43extern int icmp_ioctl(struct sock *sk, int cmd, unsigned long arg); 43extern int icmp_ioctl(struct sock *sk, int cmd, unsigned long arg);
44extern void icmp_init(struct net_proto_family *ops); 44extern void icmp_init(struct net_proto_family *ops);
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index de4e83b6da4b..0bcf9f237e1f 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -238,9 +238,9 @@ extern struct sock *inet_csk_accept(struct sock *sk, int flags, int *err);
238 238
239extern struct request_sock *inet_csk_search_req(const struct sock *sk, 239extern struct request_sock *inet_csk_search_req(const struct sock *sk,
240 struct request_sock ***prevp, 240 struct request_sock ***prevp,
241 const __u16 rport, 241 const __be16 rport,
242 const __u32 raddr, 242 const __be32 raddr,
243 const __u32 laddr); 243 const __be32 laddr);
244extern int inet_csk_bind_conflict(const struct sock *sk, 244extern int inet_csk_bind_conflict(const struct sock *sk,
245 const struct inet_bind_bucket *tb); 245 const struct inet_bind_bucket *tb);
246extern int inet_csk_get_port(struct inet_hashinfo *hashinfo, 246extern int inet_csk_get_port(struct inet_hashinfo *hashinfo,
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index b4491c9e2a5a..a9eb2eaf094e 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -272,42 +272,56 @@ static inline int inet_iif(const struct sk_buff *skb)
272} 272}
273 273
274extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo, 274extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo,
275 const u32 daddr, 275 const __be32 daddr,
276 const unsigned short hnum, 276 const unsigned short hnum,
277 const int dif); 277 const int dif);
278 278
279static inline struct sock *inet_lookup_listener(struct inet_hashinfo *hashinfo, 279static inline struct sock *inet_lookup_listener(struct inet_hashinfo *hashinfo,
280 u32 daddr, u16 dport, int dif) 280 __be32 daddr, __be16 dport, int dif)
281{ 281{
282 return __inet_lookup_listener(hashinfo, daddr, ntohs(dport), dif); 282 return __inet_lookup_listener(hashinfo, daddr, ntohs(dport), dif);
283} 283}
284 284
285/* Socket demux engine toys. */ 285/* Socket demux engine toys. */
286/* What happens here is ugly; there's a pair of adjacent fields in
287 struct inet_sock; __be16 dport followed by __u16 num. We want to
288 search by pair, so we combine the keys into a single 32bit value
289 and compare with 32bit value read from &...->dport. Let's at least
290 make sure that it's not mixed with anything else...
291 On 64bit targets we combine comparisons with pair of adjacent __be32
292 fields in the same way.
293*/
294typedef __u32 __bitwise __portpair;
286#ifdef __BIG_ENDIAN 295#ifdef __BIG_ENDIAN
287#define INET_COMBINED_PORTS(__sport, __dport) \ 296#define INET_COMBINED_PORTS(__sport, __dport) \
288 (((__u32)(__sport) << 16) | (__u32)(__dport)) 297 ((__force __portpair)(((__force __u32)(__be16)(__sport) << 16) | (__u32)(__dport)))
289#else /* __LITTLE_ENDIAN */ 298#else /* __LITTLE_ENDIAN */
290#define INET_COMBINED_PORTS(__sport, __dport) \ 299#define INET_COMBINED_PORTS(__sport, __dport) \
291 (((__u32)(__dport) << 16) | (__u32)(__sport)) 300 ((__force __portpair)(((__u32)(__dport) << 16) | (__force __u32)(__be16)(__sport)))
292#endif 301#endif
293 302
294#if (BITS_PER_LONG == 64) 303#if (BITS_PER_LONG == 64)
304typedef __u64 __bitwise __addrpair;
295#ifdef __BIG_ENDIAN 305#ifdef __BIG_ENDIAN
296#define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ 306#define INET_ADDR_COOKIE(__name, __saddr, __daddr) \
297 const __u64 __name = (((__u64)(__saddr)) << 32) | ((__u64)(__daddr)); 307 const __addrpair __name = (__force __addrpair) ( \
308 (((__force __u64)(__be32)(__saddr)) << 32) | \
309 ((__force __u64)(__be32)(__daddr)));
298#else /* __LITTLE_ENDIAN */ 310#else /* __LITTLE_ENDIAN */
299#define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ 311#define INET_ADDR_COOKIE(__name, __saddr, __daddr) \
300 const __u64 __name = (((__u64)(__daddr)) << 32) | ((__u64)(__saddr)); 312 const __addrpair __name = (__force __addrpair) ( \
313 (((__force __u64)(__be32)(__daddr)) << 32) | \
314 ((__force __u64)(__be32)(__saddr)));
301#endif /* __BIG_ENDIAN */ 315#endif /* __BIG_ENDIAN */
302#define INET_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ 316#define INET_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
303 (((__sk)->sk_hash == (__hash)) && \ 317 (((__sk)->sk_hash == (__hash)) && \
304 ((*((__u64 *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \ 318 ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \
305 ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 319 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
306 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 320 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
307#define INET_TW_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ 321#define INET_TW_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
308 (((__sk)->sk_hash == (__hash)) && \ 322 (((__sk)->sk_hash == (__hash)) && \
309 ((*((__u64 *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \ 323 ((*((__addrpair *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \
310 ((*((__u32 *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 324 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \
311 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 325 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
312#else /* 32-bit arch */ 326#else /* 32-bit arch */
313#define INET_ADDR_COOKIE(__name, __saddr, __daddr) 327#define INET_ADDR_COOKIE(__name, __saddr, __daddr)
@@ -315,13 +329,13 @@ static inline struct sock *inet_lookup_listener(struct inet_hashinfo *hashinfo,
315 (((__sk)->sk_hash == (__hash)) && \ 329 (((__sk)->sk_hash == (__hash)) && \
316 (inet_sk(__sk)->daddr == (__saddr)) && \ 330 (inet_sk(__sk)->daddr == (__saddr)) && \
317 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \ 331 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \
318 ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 332 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
319 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 333 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
320#define INET_TW_MATCH(__sk, __hash,__cookie, __saddr, __daddr, __ports, __dif) \ 334#define INET_TW_MATCH(__sk, __hash,__cookie, __saddr, __daddr, __ports, __dif) \
321 (((__sk)->sk_hash == (__hash)) && \ 335 (((__sk)->sk_hash == (__hash)) && \
322 (inet_twsk(__sk)->tw_daddr == (__saddr)) && \ 336 (inet_twsk(__sk)->tw_daddr == (__saddr)) && \
323 (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \ 337 (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \
324 ((*((__u32 *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 338 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \
325 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 339 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
326#endif /* 64-bit arch */ 340#endif /* 64-bit arch */
327 341
@@ -333,12 +347,12 @@ static inline struct sock *inet_lookup_listener(struct inet_hashinfo *hashinfo,
333 */ 347 */
334static inline struct sock * 348static inline struct sock *
335 __inet_lookup_established(struct inet_hashinfo *hashinfo, 349 __inet_lookup_established(struct inet_hashinfo *hashinfo,
336 const u32 saddr, const u16 sport, 350 const __be32 saddr, const __be16 sport,
337 const u32 daddr, const u16 hnum, 351 const __be32 daddr, const u16 hnum,
338 const int dif) 352 const int dif)
339{ 353{
340 INET_ADDR_COOKIE(acookie, saddr, daddr) 354 INET_ADDR_COOKIE(acookie, saddr, daddr)
341 const __u32 ports = INET_COMBINED_PORTS(sport, hnum); 355 const __portpair ports = INET_COMBINED_PORTS(sport, hnum);
342 struct sock *sk; 356 struct sock *sk;
343 const struct hlist_node *node; 357 const struct hlist_node *node;
344 /* Optimize here for direct hit, only listening connections can 358 /* Optimize here for direct hit, only listening connections can
@@ -370,8 +384,8 @@ hit:
370 384
371static inline struct sock * 385static inline struct sock *
372 inet_lookup_established(struct inet_hashinfo *hashinfo, 386 inet_lookup_established(struct inet_hashinfo *hashinfo,
373 const u32 saddr, const u16 sport, 387 const __be32 saddr, const __be16 sport,
374 const u32 daddr, const u16 dport, 388 const __be32 daddr, const __be16 dport,
375 const int dif) 389 const int dif)
376{ 390{
377 return __inet_lookup_established(hashinfo, saddr, sport, daddr, 391 return __inet_lookup_established(hashinfo, saddr, sport, daddr,
@@ -379,8 +393,8 @@ static inline struct sock *
379} 393}
380 394
381static inline struct sock *__inet_lookup(struct inet_hashinfo *hashinfo, 395static inline struct sock *__inet_lookup(struct inet_hashinfo *hashinfo,
382 const u32 saddr, const u16 sport, 396 const __be32 saddr, const __be16 sport,
383 const u32 daddr, const u16 dport, 397 const __be32 daddr, const __be16 dport,
384 const int dif) 398 const int dif)
385{ 399{
386 u16 hnum = ntohs(dport); 400 u16 hnum = ntohs(dport);
@@ -390,8 +404,8 @@ static inline struct sock *__inet_lookup(struct inet_hashinfo *hashinfo,
390} 404}
391 405
392static inline struct sock *inet_lookup(struct inet_hashinfo *hashinfo, 406static inline struct sock *inet_lookup(struct inet_hashinfo *hashinfo,
393 const u32 saddr, const u16 sport, 407 const __be32 saddr, const __be16 sport,
394 const u32 daddr, const u16 dport, 408 const __be32 daddr, const __be16 dport,
395 const int dif) 409 const int dif)
396{ 410{
397 struct sock *sk; 411 struct sock *sk;
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index f6242710f2ff..ce6da97bc848 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -36,7 +36,7 @@
36 * @ts_needaddr - Need to record addr of outgoing dev 36 * @ts_needaddr - Need to record addr of outgoing dev
37 */ 37 */
38struct ip_options { 38struct ip_options {
39 __u32 faddr; 39 __be32 faddr;
40 unsigned char optlen; 40 unsigned char optlen;
41 unsigned char srr; 41 unsigned char srr;
42 unsigned char rr; 42 unsigned char rr;
@@ -62,9 +62,9 @@ struct inet_request_sock {
62 u16 inet6_rsk_offset; 62 u16 inet6_rsk_offset;
63 /* 2 bytes hole, try to pack */ 63 /* 2 bytes hole, try to pack */
64#endif 64#endif
65 u32 loc_addr; 65 __be32 loc_addr;
66 u32 rmt_addr; 66 __be32 rmt_addr;
67 u16 rmt_port; 67 __be16 rmt_port;
68 u16 snd_wscale : 4, 68 u16 snd_wscale : 4,
69 rcv_wscale : 4, 69 rcv_wscale : 4,
70 tstamp_ok : 1, 70 tstamp_ok : 1,
@@ -110,15 +110,15 @@ struct inet_sock {
110 struct ipv6_pinfo *pinet6; 110 struct ipv6_pinfo *pinet6;
111#endif 111#endif
112 /* Socket demultiplex comparisons on incoming packets. */ 112 /* Socket demultiplex comparisons on incoming packets. */
113 __u32 daddr; 113 __be32 daddr;
114 __u32 rcv_saddr; 114 __be32 rcv_saddr;
115 __u16 dport; 115 __be16 dport;
116 __u16 num; 116 __u16 num;
117 __u32 saddr; 117 __be32 saddr;
118 __s16 uc_ttl; 118 __s16 uc_ttl;
119 __u16 cmsg_flags; 119 __u16 cmsg_flags;
120 struct ip_options *opt; 120 struct ip_options *opt;
121 __u16 sport; 121 __be16 sport;
122 __u16 id; 122 __u16 id;
123 __u8 tos; 123 __u8 tos;
124 __u8 mc_ttl; 124 __u8 mc_ttl;
@@ -129,7 +129,7 @@ struct inet_sock {
129 hdrincl:1, 129 hdrincl:1,
130 mc_loop:1; 130 mc_loop:1;
131 int mc_index; 131 int mc_index;
132 __u32 mc_addr; 132 __be32 mc_addr;
133 struct ip_mc_socklist *mc_list; 133 struct ip_mc_socklist *mc_list;
134 struct { 134 struct {
135 unsigned int flags; 135 unsigned int flags;
@@ -137,7 +137,7 @@ struct inet_sock {
137 struct ip_options *opt; 137 struct ip_options *opt;
138 struct rtable *rt; 138 struct rtable *rt;
139 int length; /* Total length of all frames */ 139 int length; /* Total length of all frames */
140 u32 addr; 140 __be32 addr;
141 struct flowi fl; 141 struct flowi fl;
142 } cork; 142 } cork;
143}; 143};
@@ -167,10 +167,10 @@ static inline void inet_sk_copy_descendant(struct sock *sk_to,
167 167
168extern int inet_sk_rebuild_header(struct sock *sk); 168extern int inet_sk_rebuild_header(struct sock *sk);
169 169
170static inline unsigned int inet_ehashfn(const __u32 laddr, const __u16 lport, 170static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport,
171 const __u32 faddr, const __u16 fport) 171 const __be32 faddr, const __be16 fport)
172{ 172{
173 unsigned int h = (laddr ^ lport) ^ (faddr ^ fport); 173 unsigned int h = ((__force __u32)laddr ^ lport) ^ ((__force __u32)faddr ^ (__force __u32)fport);
174 h ^= h >> 16; 174 h ^= h >> 16;
175 h ^= h >> 8; 175 h ^= h >> 8;
176 return h; 176 return h;
@@ -179,10 +179,10 @@ static inline unsigned int inet_ehashfn(const __u32 laddr, const __u16 lport,
179static inline int inet_sk_ehashfn(const struct sock *sk) 179static inline int inet_sk_ehashfn(const struct sock *sk)
180{ 180{
181 const struct inet_sock *inet = inet_sk(sk); 181 const struct inet_sock *inet = inet_sk(sk);
182 const __u32 laddr = inet->rcv_saddr; 182 const __be32 laddr = inet->rcv_saddr;
183 const __u16 lport = inet->num; 183 const __u16 lport = inet->num;
184 const __u32 faddr = inet->daddr; 184 const __be32 faddr = inet->daddr;
185 const __u16 fport = inet->dport; 185 const __be16 fport = inet->dport;
186 186
187 return inet_ehashfn(laddr, lport, faddr, fport); 187 return inet_ehashfn(laddr, lport, faddr, fport);
188} 188}
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 600cb543550d..6d14c22a00c5 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -120,10 +120,10 @@ struct inet_timewait_sock {
120 unsigned char tw_rcv_wscale; 120 unsigned char tw_rcv_wscale;
121 /* Socket demultiplex comparisons on incoming packets. */ 121 /* Socket demultiplex comparisons on incoming packets. */
122 /* these five are in inet_sock */ 122 /* these five are in inet_sock */
123 __u16 tw_sport; 123 __be16 tw_sport;
124 __u32 tw_daddr __attribute__((aligned(INET_TIMEWAIT_ADDRCMP_ALIGN_BYTES))); 124 __be32 tw_daddr __attribute__((aligned(INET_TIMEWAIT_ADDRCMP_ALIGN_BYTES)));
125 __u32 tw_rcv_saddr; 125 __be32 tw_rcv_saddr;
126 __u16 tw_dport; 126 __be16 tw_dport;
127 __u16 tw_num; 127 __u16 tw_num;
128 /* And these are ours. */ 128 /* And these are ours. */
129 __u8 tw_ipv6only:1; 129 __u8 tw_ipv6only:1;
@@ -186,7 +186,7 @@ static inline struct inet_timewait_sock *inet_twsk(const struct sock *sk)
186 return (struct inet_timewait_sock *)sk; 186 return (struct inet_timewait_sock *)sk;
187} 187}
188 188
189static inline u32 inet_rcv_saddr(const struct sock *sk) 189static inline __be32 inet_rcv_saddr(const struct sock *sk)
190{ 190{
191 return likely(sk->sk_state != TCP_TIME_WAIT) ? 191 return likely(sk->sk_state != TCP_TIME_WAIT) ?
192 inet_sk(sk)->rcv_saddr : inet_twsk(sk)->tw_rcv_saddr; 192 inet_sk(sk)->rcv_saddr : inet_twsk(sk)->tw_rcv_saddr;
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 0965515f40cf..925573fd2aed 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -22,7 +22,7 @@ struct inet_peer
22 unsigned long dtime; /* the time of last use of not 22 unsigned long dtime; /* the time of last use of not
23 * referenced entries */ 23 * referenced entries */
24 atomic_t refcnt; 24 atomic_t refcnt;
25 __u32 v4daddr; /* peer's address */ 25 __be32 v4daddr; /* peer's address */
26 __u16 avl_height; 26 __u16 avl_height;
27 __u16 ip_id_count; /* IP ID for the next packet */ 27 __u16 ip_id_count; /* IP ID for the next packet */
28 atomic_t rid; /* Frag reception counter */ 28 atomic_t rid; /* Frag reception counter */
@@ -33,7 +33,7 @@ struct inet_peer
33void inet_initpeers(void) __init; 33void inet_initpeers(void) __init;
34 34
35/* can be called with or without local BH being disabled */ 35/* can be called with or without local BH being disabled */
36struct inet_peer *inet_getpeer(__u32 daddr, int create); 36struct inet_peer *inet_getpeer(__be32 daddr, int create);
37 37
38extern spinlock_t inet_peer_unused_lock; 38extern spinlock_t inet_peer_unused_lock;
39extern struct inet_peer **inet_peer_unused_tailp; 39extern struct inet_peer **inet_peer_unused_tailp;
diff --git a/include/net/ip.h b/include/net/ip.h
index 98f908400771..b6d95e553401 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -45,7 +45,7 @@ struct inet_skb_parm
45 45
46struct ipcm_cookie 46struct ipcm_cookie
47{ 47{
48 u32 addr; 48 __be32 addr;
49 int oif; 49 int oif;
50 struct ip_options *opt; 50 struct ip_options *opt;
51}; 51};
@@ -86,7 +86,7 @@ extern int igmp_mc_proc_init(void);
86 */ 86 */
87 87
88extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, 88extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
89 u32 saddr, u32 daddr, 89 __be32 saddr, __be32 daddr,
90 struct ip_options *opt); 90 struct ip_options *opt);
91extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, 91extern int ip_rcv(struct sk_buff *skb, struct net_device *dev,
92 struct packet_type *pt, struct net_device *orig_dev); 92 struct packet_type *pt, struct net_device *orig_dev);
@@ -335,7 +335,7 @@ extern int ip_net_unreachable(struct sk_buff *skb);
335 * Functions provided by ip_options.c 335 * Functions provided by ip_options.c
336 */ 336 */
337 337
338extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, u32 daddr, struct rtable *rt, int is_frag); 338extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, __be32 daddr, struct rtable *rt, int is_frag);
339extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb); 339extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
340extern void ip_options_fragment(struct sk_buff *skb); 340extern void ip_options_fragment(struct sk_buff *skb);
341extern int ip_options_compile(struct ip_options *opt, struct sk_buff *skb); 341extern int ip_options_compile(struct ip_options *opt, struct sk_buff *skb);
@@ -363,8 +363,8 @@ extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(s
363 363
364extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len); 364extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len);
365extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, 365extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
366 u16 port, u32 info, u8 *payload); 366 __be16 port, u32 info, u8 *payload);
367extern void ip_local_error(struct sock *sk, int err, u32 daddr, u16 dport, 367extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport,
368 u32 info); 368 u32 info);
369 369
370/* sysctl helpers - any sysctl which holds a value that ends up being 370/* sysctl helpers - any sysctl which holds a value that ends up being
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index fcc159a4ac17..82229146bac7 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -30,13 +30,13 @@ struct fib_config {
30 u8 fc_type; 30 u8 fc_type;
31 /* 1 byte unused */ 31 /* 1 byte unused */
32 u32 fc_table; 32 u32 fc_table;
33 u32 fc_dst; 33 __be32 fc_dst;
34 u32 fc_src; 34 __be32 fc_src;
35 u32 fc_gw; 35 __be32 fc_gw;
36 int fc_oif; 36 int fc_oif;
37 u32 fc_flags; 37 u32 fc_flags;
38 u32 fc_priority; 38 u32 fc_priority;
39 u32 fc_prefsrc; 39 __be32 fc_prefsrc;
40 struct nlattr *fc_mx; 40 struct nlattr *fc_mx;
41 struct rtnexthop *fc_mp; 41 struct rtnexthop *fc_mp;
42 int fc_mx_len; 42 int fc_mx_len;
@@ -63,7 +63,7 @@ struct fib_nh {
63 __u32 nh_tclassid; 63 __u32 nh_tclassid;
64#endif 64#endif
65 int nh_oif; 65 int nh_oif;
66 u32 nh_gw; 66 __be32 nh_gw;
67}; 67};
68 68
69/* 69/*
@@ -78,7 +78,7 @@ struct fib_info {
78 int fib_dead; 78 int fib_dead;
79 unsigned fib_flags; 79 unsigned fib_flags;
80 int fib_protocol; 80 int fib_protocol;
81 u32 fib_prefsrc; 81 __be32 fib_prefsrc;
82 u32 fib_priority; 82 u32 fib_priority;
83 u32 fib_metrics[RTAX_MAX]; 83 u32 fib_metrics[RTAX_MAX];
84#define fib_mtu fib_metrics[RTAX_MTU-1] 84#define fib_mtu fib_metrics[RTAX_MTU-1]
@@ -107,8 +107,8 @@ struct fib_result {
107 unsigned char type; 107 unsigned char type;
108 unsigned char scope; 108 unsigned char scope;
109#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED 109#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
110 __u32 network; 110 __be32 network;
111 __u32 netmask; 111 __be32 netmask;
112#endif 112#endif
113 struct fib_info *fi; 113 struct fib_info *fi;
114#ifdef CONFIG_IP_MULTIPLE_TABLES 114#ifdef CONFIG_IP_MULTIPLE_TABLES
@@ -117,7 +117,7 @@ struct fib_result {
117}; 117};
118 118
119struct fib_result_nl { 119struct fib_result_nl {
120 u32 fl_addr; /* To be looked up*/ 120 __be32 fl_addr; /* To be looked up*/
121 u32 fl_fwmark; 121 u32 fl_fwmark;
122 unsigned char fl_tos; 122 unsigned char fl_tos;
123 unsigned char fl_scope; 123 unsigned char fl_scope;
@@ -222,17 +222,17 @@ extern int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *ar
222extern int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg); 222extern int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
223extern int inet_rtm_getroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg); 223extern int inet_rtm_getroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
224extern int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb); 224extern int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb);
225extern int fib_validate_source(u32 src, u32 dst, u8 tos, int oif, 225extern int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
226 struct net_device *dev, u32 *spec_dst, u32 *itag); 226 struct net_device *dev, __be32 *spec_dst, u32 *itag);
227extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res); 227extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res);
228 228
229struct rtentry; 229struct rtentry;
230 230
231/* Exported by fib_semantics.c */ 231/* Exported by fib_semantics.c */
232extern int ip_fib_check_default(u32 gw, struct net_device *dev); 232extern int ip_fib_check_default(__be32 gw, struct net_device *dev);
233extern int fib_sync_down(u32 local, struct net_device *dev, int force); 233extern int fib_sync_down(__be32 local, struct net_device *dev, int force);
234extern int fib_sync_up(struct net_device *dev); 234extern int fib_sync_up(struct net_device *dev);
235extern u32 __fib_res_prefsrc(struct fib_result *res); 235extern __be32 __fib_res_prefsrc(struct fib_result *res);
236 236
237/* Exported by fib_hash.c */ 237/* Exported by fib_hash.c */
238extern struct fib_table *fib_hash_init(u32 id); 238extern struct fib_table *fib_hash_init(u32 id);
diff --git a/include/net/ip_mp_alg.h b/include/net/ip_mp_alg.h
index ac747b64734c..beffdd66ad74 100644
--- a/include/net/ip_mp_alg.h
+++ b/include/net/ip_mp_alg.h
@@ -17,7 +17,7 @@ struct ip_mp_alg_ops {
17 void (*mp_alg_select_route)(const struct flowi *flp, 17 void (*mp_alg_select_route)(const struct flowi *flp,
18 struct rtable *rth, struct rtable **rp); 18 struct rtable *rth, struct rtable **rp);
19 void (*mp_alg_flush)(void); 19 void (*mp_alg_flush)(void);
20 void (*mp_alg_set_nhinfo)(__u32 network, __u32 netmask, 20 void (*mp_alg_set_nhinfo)(__be32 network, __be32 netmask,
21 unsigned char prefixlen, 21 unsigned char prefixlen,
22 const struct fib_nh *nh); 22 const struct fib_nh *nh);
23 void (*mp_alg_remove)(struct rtable *rth); 23 void (*mp_alg_remove)(struct rtable *rth);
@@ -59,7 +59,7 @@ static inline void multipath_flush(void)
59} 59}
60 60
61static inline void multipath_set_nhinfo(struct rtable *rth, 61static inline void multipath_set_nhinfo(struct rtable *rth,
62 __u32 network, __u32 netmask, 62 __be32 network, __be32 netmask,
63 unsigned char prefixlen, 63 unsigned char prefixlen,
64 const struct fib_nh *nh) 64 const struct fib_nh *nh)
65{ 65{
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 3b57b159b653..49c717e3b040 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -100,22 +100,22 @@
100struct ip_vs_service_user { 100struct ip_vs_service_user {
101 /* virtual service addresses */ 101 /* virtual service addresses */
102 u_int16_t protocol; 102 u_int16_t protocol;
103 u_int32_t addr; /* virtual ip address */ 103 __be32 addr; /* virtual ip address */
104 u_int16_t port; 104 __be16 port;
105 u_int32_t fwmark; /* firwall mark of service */ 105 u_int32_t fwmark; /* firwall mark of service */
106 106
107 /* virtual service options */ 107 /* virtual service options */
108 char sched_name[IP_VS_SCHEDNAME_MAXLEN]; 108 char sched_name[IP_VS_SCHEDNAME_MAXLEN];
109 unsigned flags; /* virtual service flags */ 109 unsigned flags; /* virtual service flags */
110 unsigned timeout; /* persistent timeout in sec */ 110 unsigned timeout; /* persistent timeout in sec */
111 u_int32_t netmask; /* persistent netmask */ 111 __be32 netmask; /* persistent netmask */
112}; 112};
113 113
114 114
115struct ip_vs_dest_user { 115struct ip_vs_dest_user {
116 /* destination server address */ 116 /* destination server address */
117 u_int32_t addr; 117 __be32 addr;
118 u_int16_t port; 118 __be16 port;
119 119
120 /* real server options */ 120 /* real server options */
121 unsigned conn_flags; /* connection flags */ 121 unsigned conn_flags; /* connection flags */
@@ -163,15 +163,15 @@ struct ip_vs_getinfo {
163struct ip_vs_service_entry { 163struct ip_vs_service_entry {
164 /* which service: user fills in these */ 164 /* which service: user fills in these */
165 u_int16_t protocol; 165 u_int16_t protocol;
166 u_int32_t addr; /* virtual address */ 166 __be32 addr; /* virtual address */
167 u_int16_t port; 167 __be16 port;
168 u_int32_t fwmark; /* firwall mark of service */ 168 u_int32_t fwmark; /* firwall mark of service */
169 169
170 /* service options */ 170 /* service options */
171 char sched_name[IP_VS_SCHEDNAME_MAXLEN]; 171 char sched_name[IP_VS_SCHEDNAME_MAXLEN];
172 unsigned flags; /* virtual service flags */ 172 unsigned flags; /* virtual service flags */
173 unsigned timeout; /* persistent timeout */ 173 unsigned timeout; /* persistent timeout */
174 u_int32_t netmask; /* persistent netmask */ 174 __be32 netmask; /* persistent netmask */
175 175
176 /* number of real servers */ 176 /* number of real servers */
177 unsigned int num_dests; 177 unsigned int num_dests;
@@ -182,8 +182,8 @@ struct ip_vs_service_entry {
182 182
183 183
184struct ip_vs_dest_entry { 184struct ip_vs_dest_entry {
185 u_int32_t addr; /* destination address */ 185 __be32 addr; /* destination address */
186 u_int16_t port; 186 __be16 port;
187 unsigned conn_flags; /* connection flags */ 187 unsigned conn_flags; /* connection flags */
188 int weight; /* destination weight */ 188 int weight; /* destination weight */
189 189
@@ -203,8 +203,8 @@ struct ip_vs_dest_entry {
203struct ip_vs_get_dests { 203struct ip_vs_get_dests {
204 /* which service: user fills in these */ 204 /* which service: user fills in these */
205 u_int16_t protocol; 205 u_int16_t protocol;
206 u_int32_t addr; /* virtual address */ 206 __be32 addr; /* virtual address */
207 u_int16_t port; 207 __be16 port;
208 u_int32_t fwmark; /* firwall mark of service */ 208 u_int32_t fwmark; /* firwall mark of service */
209 209
210 /* number of real servers */ 210 /* number of real servers */
@@ -502,12 +502,12 @@ struct ip_vs_conn {
502 struct list_head c_list; /* hashed list heads */ 502 struct list_head c_list; /* hashed list heads */
503 503
504 /* Protocol, addresses and port numbers */ 504 /* Protocol, addresses and port numbers */
505 __u32 caddr; /* client address */ 505 __be32 caddr; /* client address */
506 __u32 vaddr; /* virtual address */ 506 __be32 vaddr; /* virtual address */
507 __u32 daddr; /* destination address */ 507 __be32 daddr; /* destination address */
508 __u16 cport; 508 __be16 cport;
509 __u16 vport; 509 __be16 vport;
510 __u16 dport; 510 __be16 dport;
511 __u16 protocol; /* Which protocol (TCP/UDP) */ 511 __u16 protocol; /* Which protocol (TCP/UDP) */
512 512
513 /* counter and timer */ 513 /* counter and timer */
@@ -554,12 +554,12 @@ struct ip_vs_service {
554 atomic_t usecnt; /* use counter */ 554 atomic_t usecnt; /* use counter */
555 555
556 __u16 protocol; /* which protocol (TCP/UDP) */ 556 __u16 protocol; /* which protocol (TCP/UDP) */
557 __u32 addr; /* IP address for virtual service */ 557 __be32 addr; /* IP address for virtual service */
558 __u16 port; /* port number for the service */ 558 __be16 port; /* port number for the service */
559 __u32 fwmark; /* firewall mark of the service */ 559 __u32 fwmark; /* firewall mark of the service */
560 unsigned flags; /* service status flags */ 560 unsigned flags; /* service status flags */
561 unsigned timeout; /* persistent timeout in ticks */ 561 unsigned timeout; /* persistent timeout in ticks */
562 __u32 netmask; /* grouping granularity */ 562 __be32 netmask; /* grouping granularity */
563 563
564 struct list_head destinations; /* real server d-linked list */ 564 struct list_head destinations; /* real server d-linked list */
565 __u32 num_dests; /* number of servers */ 565 __u32 num_dests; /* number of servers */
@@ -581,8 +581,8 @@ struct ip_vs_dest {
581 struct list_head n_list; /* for the dests in the service */ 581 struct list_head n_list; /* for the dests in the service */
582 struct list_head d_list; /* for table with all the dests */ 582 struct list_head d_list; /* for table with all the dests */
583 583
584 __u32 addr; /* IP address of the server */ 584 __be32 addr; /* IP address of the server */
585 __u16 port; /* port number of the server */ 585 __be16 port; /* port number of the server */
586 volatile unsigned flags; /* dest status flags */ 586 volatile unsigned flags; /* dest status flags */
587 atomic_t conn_flags; /* flags to copy to conn */ 587 atomic_t conn_flags; /* flags to copy to conn */
588 atomic_t weight; /* server weight */ 588 atomic_t weight; /* server weight */
@@ -605,8 +605,8 @@ struct ip_vs_dest {
605 /* for virtual service */ 605 /* for virtual service */
606 struct ip_vs_service *svc; /* service it belongs to */ 606 struct ip_vs_service *svc; /* service it belongs to */
607 __u16 protocol; /* which protocol (TCP/UDP) */ 607 __u16 protocol; /* which protocol (TCP/UDP) */
608 __u32 vaddr; /* virtual IP address */ 608 __be32 vaddr; /* virtual IP address */
609 __u16 vport; /* virtual port number */ 609 __be16 vport; /* virtual port number */
610 __u32 vfwmark; /* firewall mark of service */ 610 __u32 vfwmark; /* firewall mark of service */
611}; 611};
612 612
@@ -648,7 +648,7 @@ struct ip_vs_app
648 /* members for application incarnations */ 648 /* members for application incarnations */
649 struct list_head p_list; /* member in proto app list */ 649 struct list_head p_list; /* member in proto app list */
650 struct ip_vs_app *app; /* its real application */ 650 struct ip_vs_app *app; /* its real application */
651 __u16 port; /* port number in net order */ 651 __be16 port; /* port number in net order */
652 atomic_t usecnt; /* usage counter */ 652 atomic_t usecnt; /* usage counter */
653 653
654 /* output hook: return false if can't linearize. diff set for TCP. */ 654 /* output hook: return false if can't linearize. diff set for TCP. */
@@ -740,11 +740,11 @@ enum {
740}; 740};
741 741
742extern struct ip_vs_conn *ip_vs_conn_in_get 742extern struct ip_vs_conn *ip_vs_conn_in_get
743(int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); 743(int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port);
744extern struct ip_vs_conn *ip_vs_ct_in_get 744extern struct ip_vs_conn *ip_vs_ct_in_get
745(int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); 745(int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port);
746extern struct ip_vs_conn *ip_vs_conn_out_get 746extern struct ip_vs_conn *ip_vs_conn_out_get
747(int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); 747(int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port);
748 748
749/* put back the conn without restarting its timer */ 749/* put back the conn without restarting its timer */
750static inline void __ip_vs_conn_put(struct ip_vs_conn *cp) 750static inline void __ip_vs_conn_put(struct ip_vs_conn *cp)
@@ -752,11 +752,11 @@ static inline void __ip_vs_conn_put(struct ip_vs_conn *cp)
752 atomic_dec(&cp->refcnt); 752 atomic_dec(&cp->refcnt);
753} 753}
754extern void ip_vs_conn_put(struct ip_vs_conn *cp); 754extern void ip_vs_conn_put(struct ip_vs_conn *cp);
755extern void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __u16 cport); 755extern void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __be16 cport);
756 756
757extern struct ip_vs_conn * 757extern struct ip_vs_conn *
758ip_vs_conn_new(int proto, __u32 caddr, __u16 cport, __u32 vaddr, __u16 vport, 758ip_vs_conn_new(int proto, __be32 caddr, __be16 cport, __be32 vaddr, __be16 vport,
759 __u32 daddr, __u16 dport, unsigned flags, 759 __be32 daddr, __be16 dport, unsigned flags,
760 struct ip_vs_dest *dest); 760 struct ip_vs_dest *dest);
761extern void ip_vs_conn_expire_now(struct ip_vs_conn *cp); 761extern void ip_vs_conn_expire_now(struct ip_vs_conn *cp);
762 762
@@ -887,7 +887,7 @@ extern int sysctl_ip_vs_nat_icmp_send;
887extern struct ip_vs_stats ip_vs_stats; 887extern struct ip_vs_stats ip_vs_stats;
888 888
889extern struct ip_vs_service * 889extern struct ip_vs_service *
890ip_vs_service_get(__u32 fwmark, __u16 protocol, __u32 vaddr, __u16 vport); 890ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport);
891 891
892static inline void ip_vs_service_put(struct ip_vs_service *svc) 892static inline void ip_vs_service_put(struct ip_vs_service *svc)
893{ 893{
@@ -895,7 +895,7 @@ static inline void ip_vs_service_put(struct ip_vs_service *svc)
895} 895}
896 896
897extern struct ip_vs_dest * 897extern struct ip_vs_dest *
898ip_vs_lookup_real_service(__u16 protocol, __u32 daddr, __u16 dport); 898ip_vs_lookup_real_service(__u16 protocol, __be32 daddr, __be16 dport);
899extern int ip_vs_use_count_inc(void); 899extern int ip_vs_use_count_inc(void);
900extern void ip_vs_use_count_dec(void); 900extern void ip_vs_use_count_dec(void);
901extern int ip_vs_control_init(void); 901extern int ip_vs_control_init(void);
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 72bf47b2a4e0..8223c4410b4b 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -318,8 +318,8 @@ static inline void ipv6_addr_prefix(struct in6_addr *pfx,
318 318
319#ifndef __HAVE_ARCH_ADDR_SET 319#ifndef __HAVE_ARCH_ADDR_SET
320static inline void ipv6_addr_set(struct in6_addr *addr, 320static inline void ipv6_addr_set(struct in6_addr *addr,
321 __u32 w1, __u32 w2, 321 __be32 w1, __be32 w2,
322 __u32 w3, __u32 w4) 322 __be32 w3, __be32 w4)
323{ 323{
324 addr->s6_addr32[0] = w1; 324 addr->s6_addr32[0] = w1;
325 addr->s6_addr32[1] = w2; 325 addr->s6_addr32[1] = w2;
@@ -337,7 +337,7 @@ static inline int ipv6_addr_equal(const struct in6_addr *a1,
337 a1->s6_addr32[3] == a2->s6_addr32[3]); 337 a1->s6_addr32[3] == a2->s6_addr32[3]);
338} 338}
339 339
340static inline int __ipv6_prefix_equal(const u32 *a1, const u32 *a2, 340static inline int __ipv6_prefix_equal(const __be32 *a1, const __be32 *a2,
341 unsigned int prefixlen) 341 unsigned int prefixlen)
342{ 342{
343 unsigned pdw, pbi; 343 unsigned pdw, pbi;
diff --git a/include/net/irda/irlan_common.h b/include/net/irda/irlan_common.h
index 1c73bdbc3eb3..9592c374b41d 100644
--- a/include/net/irda/irlan_common.h
+++ b/include/net/irda/irlan_common.h
@@ -98,7 +98,15 @@
98#define IRLAN_SHORT 1 98#define IRLAN_SHORT 1
99#define IRLAN_ARRAY 2 99#define IRLAN_ARRAY 2
100 100
101#define IRLAN_MAX_HEADER (TTP_HEADER+LMP_HEADER+LAP_MAX_HEADER) 101/* IrLAN sits on top if IrTTP */
102#define IRLAN_MAX_HEADER (TTP_HEADER+LMP_HEADER)
103/* 1 byte for the command code and 1 byte for the parameter count */
104#define IRLAN_CMD_HEADER 2
105
106#define IRLAN_STRING_PARAMETER_LEN(name, value) (1 + strlen((name)) + 2 \
107 + strlen ((value)))
108#define IRLAN_BYTE_PARAMETER_LEN(name) (1 + strlen((name)) + 2 + 1)
109#define IRLAN_SHORT_PARAMETER_LEN(name) (1 + strlen((name)) + 2 + 2)
102 110
103/* 111/*
104 * IrLAN client 112 * IrLAN client
diff --git a/include/net/irda/irlap_frame.h b/include/net/irda/irlap_frame.h
index 3452ae257c84..9dd54a5002b2 100644
--- a/include/net/irda/irlap_frame.h
+++ b/include/net/irda/irlap_frame.h
@@ -74,6 +74,19 @@ struct discovery_t;
74 74
75#define PF_BIT 0x10 /* Poll/final bit */ 75#define PF_BIT 0x10 /* Poll/final bit */
76 76
77/* Some IrLAP field lengths */
78/*
79 * Only baud rate triplet is 4 bytes (PV can be 2 bytes).
80 * All others params (7) are 3 bytes, so that's 7*3 + 1*4 bytes.
81 */
82#define IRLAP_NEGOCIATION_PARAMS_LEN 25
83#define IRLAP_DISCOVERY_INFO_LEN 32
84
85struct disc_frame {
86 __u8 caddr; /* Connection address */
87 __u8 control;
88} IRDA_PACK;
89
77struct xid_frame { 90struct xid_frame {
78 __u8 caddr; /* Connection address */ 91 __u8 caddr; /* Connection address */
79 __u8 control; 92 __u8 control;
@@ -95,11 +108,25 @@ struct test_frame {
95struct ua_frame { 108struct ua_frame {
96 __u8 caddr; 109 __u8 caddr;
97 __u8 control; 110 __u8 control;
98
99 __u32 saddr; /* Source device address */ 111 __u32 saddr; /* Source device address */
100 __u32 daddr; /* Dest device address */ 112 __u32 daddr; /* Dest device address */
101} IRDA_PACK; 113} IRDA_PACK;
102 114
115struct dm_frame {
116 __u8 caddr; /* Connection address */
117 __u8 control;
118} IRDA_PACK;
119
120struct rd_frame {
121 __u8 caddr; /* Connection address */
122 __u8 control;
123} IRDA_PACK;
124
125struct rr_frame {
126 __u8 caddr; /* Connection address */
127 __u8 control;
128} IRDA_PACK;
129
103struct i_frame { 130struct i_frame {
104 __u8 caddr; 131 __u8 caddr;
105 __u8 control; 132 __u8 control;
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
index 11ecfa58a648..e212b9bc2503 100644
--- a/include/net/irda/irlmp.h
+++ b/include/net/irda/irlmp.h
@@ -48,7 +48,7 @@
48#define DEV_ADDR_ANY 0xffffffff 48#define DEV_ADDR_ANY 0xffffffff
49 49
50#define LMP_HEADER 2 /* Dest LSAP + Source LSAP */ 50#define LMP_HEADER 2 /* Dest LSAP + Source LSAP */
51#define LMP_CONTROL_HEADER 4 51#define LMP_CONTROL_HEADER 4 /* LMP_HEADER + opcode + parameter */
52#define LMP_PID_HEADER 1 /* Used by Ultra */ 52#define LMP_PID_HEADER 1 /* Used by Ultra */
53#define LMP_MAX_HEADER (LMP_CONTROL_HEADER+LAP_MAX_HEADER) 53#define LMP_MAX_HEADER (LMP_CONTROL_HEADER+LAP_MAX_HEADER)
54 54
diff --git a/include/net/netlabel.h b/include/net/netlabel.h
index 6692430063fd..c63a58058e21 100644
--- a/include/net/netlabel.h
+++ b/include/net/netlabel.h
@@ -92,11 +92,17 @@
92 * 92 *
93 */ 93 */
94 94
95/* NetLabel audit information */
96struct netlbl_audit {
97 u32 secid;
98 uid_t loginuid;
99};
100
95/* Domain mapping definition struct */ 101/* Domain mapping definition struct */
96struct netlbl_dom_map; 102struct netlbl_dom_map;
97 103
98/* Domain mapping operations */ 104/* Domain mapping operations */
99int netlbl_domhsh_remove(const char *domain); 105int netlbl_domhsh_remove(const char *domain, struct netlbl_audit *audit_info);
100 106
101/* LSM security attributes */ 107/* LSM security attributes */
102struct netlbl_lsm_cache { 108struct netlbl_lsm_cache {
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 4ab68a7a636a..ce5cba19c393 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -831,6 +831,9 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
831#define NLA_PUT_U32(skb, attrtype, value) \ 831#define NLA_PUT_U32(skb, attrtype, value) \
832 NLA_PUT_TYPE(skb, u32, attrtype, value) 832 NLA_PUT_TYPE(skb, u32, attrtype, value)
833 833
834#define NLA_PUT_BE32(skb, attrtype, value) \
835 NLA_PUT_TYPE(skb, __be32, attrtype, value)
836
834#define NLA_PUT_U64(skb, attrtype, value) \ 837#define NLA_PUT_U64(skb, attrtype, value) \
835 NLA_PUT_TYPE(skb, u64, attrtype, value) 838 NLA_PUT_TYPE(skb, u64, attrtype, value)
836 839
@@ -853,6 +856,15 @@ static inline u32 nla_get_u32(struct nlattr *nla)
853} 856}
854 857
855/** 858/**
859 * nla_get_be32 - return payload of __be32 attribute
860 * @nla: __be32 netlink attribute
861 */
862static inline __be32 nla_get_be32(struct nlattr *nla)
863{
864 return *(__be32 *) nla_data(nla);
865}
866
867/**
856 * nla_get_u16 - return payload of u16 attribute 868 * nla_get_u16 - return payload of u16 attribute
857 * @nla: u16 netlink attribute 869 * @nla: u16 netlink attribute
858 */ 870 */
diff --git a/include/net/route.h b/include/net/route.h
index 7f93ac0e0899..486e37aff06c 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -62,18 +62,18 @@ struct rtable
62 __u16 rt_type; 62 __u16 rt_type;
63 __u16 rt_multipath_alg; 63 __u16 rt_multipath_alg;
64 64
65 __u32 rt_dst; /* Path destination */ 65 __be32 rt_dst; /* Path destination */
66 __u32 rt_src; /* Path source */ 66 __be32 rt_src; /* Path source */
67 int rt_iif; 67 int rt_iif;
68 68
69 /* Info on neighbour */ 69 /* Info on neighbour */
70 __u32 rt_gateway; 70 __be32 rt_gateway;
71 71
72 /* Cache lookup keys */ 72 /* Cache lookup keys */
73 struct flowi fl; 73 struct flowi fl;
74 74
75 /* Miscellaneous cached information */ 75 /* Miscellaneous cached information */
76 __u32 rt_spec_dst; /* RFC1122 specific destination */ 76 __be32 rt_spec_dst; /* RFC1122 specific destination */
77 struct inet_peer *peer; /* long-living peer info */ 77 struct inet_peer *peer; /* long-living peer info */
78}; 78};
79 79
@@ -109,18 +109,18 @@ extern struct ip_rt_acct *ip_rt_acct;
109 109
110struct in_device; 110struct in_device;
111extern int ip_rt_init(void); 111extern int ip_rt_init(void);
112extern void ip_rt_redirect(u32 old_gw, u32 dst, u32 new_gw, 112extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw,
113 u32 src, struct net_device *dev); 113 __be32 src, struct net_device *dev);
114extern void ip_rt_advice(struct rtable **rp, int advice); 114extern void ip_rt_advice(struct rtable **rp, int advice);
115extern void rt_cache_flush(int how); 115extern void rt_cache_flush(int how);
116extern int __ip_route_output_key(struct rtable **, const struct flowi *flp); 116extern int __ip_route_output_key(struct rtable **, const struct flowi *flp);
117extern int ip_route_output_key(struct rtable **, struct flowi *flp); 117extern int ip_route_output_key(struct rtable **, struct flowi *flp);
118extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); 118extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
119extern int ip_route_input(struct sk_buff*, u32 dst, u32 src, u8 tos, struct net_device *devin); 119extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin);
120extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu); 120extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu);
121extern void ip_rt_send_redirect(struct sk_buff *skb); 121extern void ip_rt_send_redirect(struct sk_buff *skb);
122 122
123extern unsigned inet_addr_type(u32 addr); 123extern unsigned inet_addr_type(__be32 addr);
124extern void ip_rt_multicast_event(struct in_device *); 124extern void ip_rt_multicast_event(struct in_device *);
125extern int ip_rt_ioctl(unsigned int cmd, void __user *arg); 125extern int ip_rt_ioctl(unsigned int cmd, void __user *arg);
126extern void ip_rt_get_source(u8 *src, struct rtable *rt); 126extern void ip_rt_get_source(u8 *src, struct rtable *rt);
@@ -144,9 +144,9 @@ static inline char rt_tos2priority(u8 tos)
144 return ip_tos2prio[IPTOS_TOS(tos)>>1]; 144 return ip_tos2prio[IPTOS_TOS(tos)>>1];
145} 145}
146 146
147static inline int ip_route_connect(struct rtable **rp, u32 dst, 147static inline int ip_route_connect(struct rtable **rp, __be32 dst,
148 u32 src, u32 tos, int oif, u8 protocol, 148 __be32 src, u32 tos, int oif, u8 protocol,
149 u16 sport, u16 dport, struct sock *sk) 149 __be16 sport, __be16 dport, struct sock *sk)
150{ 150{
151 struct flowi fl = { .oif = oif, 151 struct flowi fl = { .oif = oif,
152 .nl_u = { .ip4_u = { .daddr = dst, 152 .nl_u = { .ip4_u = { .daddr = dst,
@@ -172,7 +172,7 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst,
172} 172}
173 173
174static inline int ip_route_newports(struct rtable **rp, u8 protocol, 174static inline int ip_route_newports(struct rtable **rp, u8 protocol,
175 u16 sport, u16 dport, struct sock *sk) 175 __be16 sport, __be16 dport, struct sock *sk)
176{ 176{
177 if (sport != (*rp)->fl.fl_ip_sport || 177 if (sport != (*rp)->fl.fl_ip_sport ||
178 dport != (*rp)->fl.fl_ip_dport) { 178 dport != (*rp)->fl.fl_ip_dport) {
diff --git a/include/net/sock.h b/include/net/sock.h
index edd4d73ce7f5..40bb90ebb2d1 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -665,7 +665,6 @@ struct sock_iocb {
665 struct sock *sk; 665 struct sock *sk;
666 struct scm_cookie *scm; 666 struct scm_cookie *scm;
667 struct msghdr *msg, async_msg; 667 struct msghdr *msg, async_msg;
668 struct iovec async_iov;
669 struct kiocb *kiocb; 668 struct kiocb *kiocb;
670}; 669};
671 670
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 11e0b1d6bd47..1e2a4ddec96e 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -437,8 +437,8 @@ static inline void xfrm_state_hold(struct xfrm_state *x)
437 437
438static __inline__ int addr_match(void *token1, void *token2, int prefixlen) 438static __inline__ int addr_match(void *token1, void *token2, int prefixlen)
439{ 439{
440 __u32 *a1 = token1; 440 __be32 *a1 = token1;
441 __u32 *a2 = token2; 441 __be32 *a2 = token2;
442 int pdw; 442 int pdw;
443 int pbi; 443 int pbi;
444 444
@@ -450,7 +450,7 @@ static __inline__ int addr_match(void *token1, void *token2, int prefixlen)
450 return 0; 450 return 0;
451 451
452 if (pbi) { 452 if (pbi) {
453 __u32 mask; 453 __be32 mask;
454 454
455 mask = htonl((0xffffffff) << (32 - pbi)); 455 mask = htonl((0xffffffff) << (32 - pbi));
456 456
@@ -462,9 +462,9 @@ static __inline__ int addr_match(void *token1, void *token2, int prefixlen)
462} 462}
463 463
464static __inline__ 464static __inline__
465u16 xfrm_flowi_sport(struct flowi *fl) 465__be16 xfrm_flowi_sport(struct flowi *fl)
466{ 466{
467 u16 port; 467 __be16 port;
468 switch(fl->proto) { 468 switch(fl->proto) {
469 case IPPROTO_TCP: 469 case IPPROTO_TCP:
470 case IPPROTO_UDP: 470 case IPPROTO_UDP:
@@ -487,9 +487,9 @@ u16 xfrm_flowi_sport(struct flowi *fl)
487} 487}
488 488
489static __inline__ 489static __inline__
490u16 xfrm_flowi_dport(struct flowi *fl) 490__be16 xfrm_flowi_dport(struct flowi *fl)
491{ 491{
492 u16 port; 492 __be16 port;
493 switch(fl->proto) { 493 switch(fl->proto) {
494 case IPPROTO_TCP: 494 case IPPROTO_TCP:
495 case IPPROTO_UDP: 495 case IPPROTO_UDP:
@@ -912,7 +912,7 @@ extern int xfrm_state_check_expire(struct xfrm_state *x);
912extern void xfrm_state_insert(struct xfrm_state *x); 912extern void xfrm_state_insert(struct xfrm_state *x);
913extern int xfrm_state_add(struct xfrm_state *x); 913extern int xfrm_state_add(struct xfrm_state *x);
914extern int xfrm_state_update(struct xfrm_state *x); 914extern int xfrm_state_update(struct xfrm_state *x);
915extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family); 915extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family);
916extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family); 916extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family);
917#ifdef CONFIG_XFRM_SUB_POLICY 917#ifdef CONFIG_XFRM_SUB_POLICY
918extern int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, 918extern int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src,
@@ -935,8 +935,8 @@ static inline int xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **s
935extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); 935extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq);
936extern int xfrm_state_delete(struct xfrm_state *x); 936extern int xfrm_state_delete(struct xfrm_state *x);
937extern void xfrm_state_flush(u8 proto); 937extern void xfrm_state_flush(u8 proto);
938extern int xfrm_replay_check(struct xfrm_state *x, u32 seq); 938extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq);
939extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq); 939extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq);
940extern void xfrm_replay_notify(struct xfrm_state *x, int event); 940extern void xfrm_replay_notify(struct xfrm_state *x, int event);
941extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); 941extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb);
942extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); 942extern int xfrm_state_mtu(struct xfrm_state *x, int mtu);
@@ -945,7 +945,7 @@ extern int xfrm4_rcv(struct sk_buff *skb);
945extern int xfrm4_output(struct sk_buff *skb); 945extern int xfrm4_output(struct sk_buff *skb);
946extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); 946extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler);
947extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); 947extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler);
948extern int xfrm6_rcv_spi(struct sk_buff *skb, u32 spi); 948extern int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi);
949extern int xfrm6_rcv(struct sk_buff **pskb); 949extern int xfrm6_rcv(struct sk_buff **pskb);
950extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, 950extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
951 xfrm_address_t *saddr, u8 proto); 951 xfrm_address_t *saddr, u8 proto);
@@ -989,7 +989,7 @@ struct xfrm_policy *xfrm_policy_bysel_ctx(u8 type, int dir,
989struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete); 989struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete);
990void xfrm_policy_flush(u8 type); 990void xfrm_policy_flush(u8 type);
991u32 xfrm_get_acqseq(void); 991u32 xfrm_get_acqseq(void);
992void xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi); 992void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi);
993struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, 993struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto,
994 xfrm_address_t *daddr, xfrm_address_t *saddr, 994 xfrm_address_t *daddr, xfrm_address_t *saddr,
995 int create, unsigned short family); 995 int create, unsigned short family);
@@ -1004,7 +1004,7 @@ extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pi
1004extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); 1004extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr);
1005 1005
1006extern void xfrm_input_init(void); 1006extern void xfrm_input_init(void);
1007extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq); 1007extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq);
1008 1008
1009extern void xfrm_probe_algs(void); 1009extern void xfrm_probe_algs(void);
1010extern int xfrm_count_auth_supported(void); 1010extern int xfrm_count_auth_supported(void);