aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 2f47e5482b55..e6b9d12d5f62 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -33,8 +33,7 @@
33 33
34struct sock; 34struct sock;
35 35
36struct inet_skb_parm 36struct inet_skb_parm {
37{
38 struct ip_options opt; /* Compiled IP options */ 37 struct ip_options opt; /* Compiled IP options */
39 unsigned char flags; 38 unsigned char flags;
40 39
@@ -50,8 +49,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
50 return ip_hdr(skb)->ihl * 4; 49 return ip_hdr(skb)->ihl * 4;
51} 50}
52 51
53struct ipcm_cookie 52struct ipcm_cookie {
54{
55 __be32 addr; 53 __be32 addr;
56 int oif; 54 int oif;
57 struct ip_options *opt; 55 struct ip_options *opt;
@@ -60,8 +58,7 @@ struct ipcm_cookie
60 58
61#define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb)) 59#define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb))
62 60
63struct ip_ra_chain 61struct ip_ra_chain {
64{
65 struct ip_ra_chain *next; 62 struct ip_ra_chain *next;
66 struct sock *sk; 63 struct sock *sk;
67 void (*destructor)(struct sock *); 64 void (*destructor)(struct sock *);
@@ -159,8 +156,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
159void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, 156void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
160 unsigned int len); 157 unsigned int len);
161 158
162struct ipv4_config 159struct ipv4_config {
163{
164 int log_martians; 160 int log_martians;
165 int no_pmtu_disc; 161 int no_pmtu_disc;
166}; 162};
@@ -240,8 +236,8 @@ static inline void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, str
240 * does not change, they drop every other packet in 236 * does not change, they drop every other packet in
241 * a TCP stream using header compression. 237 * a TCP stream using header compression.
242 */ 238 */
243 iph->id = (sk && inet_sk(sk)->daddr) ? 239 iph->id = (sk && inet_sk(sk)->inet_daddr) ?
244 htons(inet_sk(sk)->id++) : 0; 240 htons(inet_sk(sk)->inet_id++) : 0;
245 } else 241 } else
246 __ip_select_ident(iph, dst, 0); 242 __ip_select_ident(iph, dst, 0);
247} 243}
@@ -249,9 +245,9 @@ static inline void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, str
249static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst, struct sock *sk, int more) 245static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst, struct sock *sk, int more)
250{ 246{
251 if (iph->frag_off & htons(IP_DF)) { 247 if (iph->frag_off & htons(IP_DF)) {
252 if (sk && inet_sk(sk)->daddr) { 248 if (sk && inet_sk(sk)->inet_daddr) {
253 iph->id = htons(inet_sk(sk)->id); 249 iph->id = htons(inet_sk(sk)->inet_id);
254 inet_sk(sk)->id += 1 + more; 250 inet_sk(sk)->inet_id += 1 + more;
255 } else 251 } else
256 iph->id = 0; 252 iph->id = 0;
257 } else 253 } else
@@ -317,7 +313,7 @@ static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, ch
317 313
318static __inline__ void inet_reset_saddr(struct sock *sk) 314static __inline__ void inet_reset_saddr(struct sock *sk)
319{ 315{
320 inet_sk(sk)->rcv_saddr = inet_sk(sk)->saddr = 0; 316 inet_sk(sk)->inet_rcv_saddr = inet_sk(sk)->inet_saddr = 0;
321#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 317#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
322 if (sk->sk_family == PF_INET6) { 318 if (sk->sk_family == PF_INET6) {
323 struct ipv6_pinfo *np = inet6_sk(sk); 319 struct ipv6_pinfo *np = inet6_sk(sk);
@@ -336,8 +332,7 @@ extern int ip_call_ra_chain(struct sk_buff *skb);
336 * Functions provided by ip_fragment.c 332 * Functions provided by ip_fragment.c
337 */ 333 */
338 334
339enum ip_defrag_users 335enum ip_defrag_users {
340{
341 IP_DEFRAG_LOCAL_DELIVER, 336 IP_DEFRAG_LOCAL_DELIVER,
342 IP_DEFRAG_CALL_RA_CHAIN, 337 IP_DEFRAG_CALL_RA_CHAIN,
343 IP_DEFRAG_CONNTRACK_IN, 338 IP_DEFRAG_CONNTRACK_IN,