diff options
author | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
commit | c4366889dda8110247be59ca41fddb82951a8c26 (patch) | |
tree | 705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /include/net/ip.h | |
parent | db2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff) | |
parent | e1036502e5263851259d147771226161e5ccc85a (diff) |
Merge ../linus
Conflicts:
drivers/cpufreq/cpufreq.c
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index b6d95e553401..053f02b5cb89 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -97,7 +97,7 @@ extern int ip_mc_output(struct sk_buff *skb); | |||
97 | extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); | 97 | extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); |
98 | extern int ip_do_nat(struct sk_buff *skb); | 98 | extern int ip_do_nat(struct sk_buff *skb); |
99 | extern void ip_send_check(struct iphdr *ip); | 99 | extern void ip_send_check(struct iphdr *ip); |
100 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); | 100 | extern int ip_queue_xmit(struct sk_buff *skb, struct sock *sk, int ipfragok); |
101 | extern void ip_init(void); | 101 | extern void ip_init(void); |
102 | extern int ip_append_data(struct sock *sk, | 102 | extern int ip_append_data(struct sock *sk, |
103 | int getfrag(void *from, char *to, int offset, int len, | 103 | int getfrag(void *from, char *to, int offset, int len, |
@@ -123,7 +123,7 @@ extern int ip4_datagram_connect(struct sock *sk, | |||
123 | * multicast packets. | 123 | * multicast packets. |
124 | */ | 124 | */ |
125 | 125 | ||
126 | static inline void ip_tr_mc_map(u32 addr, char *buf) | 126 | static inline void ip_tr_mc_map(__be32 addr, char *buf) |
127 | { | 127 | { |
128 | buf[0]=0xC0; | 128 | buf[0]=0xC0; |
129 | buf[1]=0x00; | 129 | buf[1]=0x00; |
@@ -135,7 +135,7 @@ static inline void ip_tr_mc_map(u32 addr, char *buf) | |||
135 | 135 | ||
136 | struct ip_reply_arg { | 136 | struct ip_reply_arg { |
137 | struct kvec iov[1]; | 137 | struct kvec iov[1]; |
138 | u32 csum; | 138 | __wsum csum; |
139 | int csumoffset; /* u16 offset of csum in iov[0].iov_base */ | 139 | int csumoffset; /* u16 offset of csum in iov[0].iov_base */ |
140 | /* -1 if not needed */ | 140 | /* -1 if not needed */ |
141 | }; | 141 | }; |
@@ -192,9 +192,9 @@ extern void ipfrag_init(void); | |||
192 | static inline | 192 | static inline |
193 | int ip_decrease_ttl(struct iphdr *iph) | 193 | int ip_decrease_ttl(struct iphdr *iph) |
194 | { | 194 | { |
195 | u32 check = iph->check; | 195 | u32 check = (__force u32)iph->check; |
196 | check += htons(0x0100); | 196 | check += (__force u32)htons(0x0100); |
197 | iph->check = check + (check>=0xFFFF); | 197 | iph->check = (__force __sum16)(check + (check>=0xFFFF)); |
198 | return --iph->ttl; | 198 | return --iph->ttl; |
199 | } | 199 | } |
200 | 200 | ||
@@ -238,9 +238,9 @@ static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst | |||
238 | * Map a multicast IP onto multicast MAC for type ethernet. | 238 | * Map a multicast IP onto multicast MAC for type ethernet. |
239 | */ | 239 | */ |
240 | 240 | ||
241 | static inline void ip_eth_mc_map(u32 addr, char *buf) | 241 | static inline void ip_eth_mc_map(__be32 naddr, char *buf) |
242 | { | 242 | { |
243 | addr=ntohl(addr); | 243 | __u32 addr=ntohl(naddr); |
244 | buf[0]=0x01; | 244 | buf[0]=0x01; |
245 | buf[1]=0x00; | 245 | buf[1]=0x00; |
246 | buf[2]=0x5e; | 246 | buf[2]=0x5e; |
@@ -256,13 +256,14 @@ static inline void ip_eth_mc_map(u32 addr, char *buf) | |||
256 | * Leave P_Key as 0 to be filled in by driver. | 256 | * Leave P_Key as 0 to be filled in by driver. |
257 | */ | 257 | */ |
258 | 258 | ||
259 | static inline void ip_ib_mc_map(u32 addr, char *buf) | 259 | static inline void ip_ib_mc_map(__be32 naddr, char *buf) |
260 | { | 260 | { |
261 | __u32 addr; | ||
261 | buf[0] = 0; /* Reserved */ | 262 | buf[0] = 0; /* Reserved */ |
262 | buf[1] = 0xff; /* Multicast QPN */ | 263 | buf[1] = 0xff; /* Multicast QPN */ |
263 | buf[2] = 0xff; | 264 | buf[2] = 0xff; |
264 | buf[3] = 0xff; | 265 | buf[3] = 0xff; |
265 | addr = ntohl(addr); | 266 | addr = ntohl(naddr); |
266 | buf[4] = 0xff; | 267 | buf[4] = 0xff; |
267 | buf[5] = 0x12; /* link local scope */ | 268 | buf[5] = 0x12; /* link local scope */ |
268 | buf[6] = 0x40; /* IPv4 signature */ | 269 | buf[6] = 0x40; /* IPv4 signature */ |
@@ -375,8 +376,7 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write, | |||
375 | size_t *lenp, loff_t *ppos); | 376 | size_t *lenp, loff_t *ppos); |
376 | int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, | 377 | int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, |
377 | void __user *oldval, size_t __user *oldlenp, | 378 | void __user *oldval, size_t __user *oldlenp, |
378 | void __user *newval, size_t newlen, | 379 | void __user *newval, size_t newlen); |
379 | void **context); | ||
380 | #ifdef CONFIG_PROC_FS | 380 | #ifdef CONFIG_PROC_FS |
381 | extern int ip_misc_proc_init(void); | 381 | extern int ip_misc_proc_init(void); |
382 | #endif | 382 | #endif |