diff options
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 840dd91b513b..9f50d4f1f157 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -82,8 +82,6 @@ struct packet_type; | |||
82 | struct rtable; | 82 | struct rtable; |
83 | struct sockaddr; | 83 | struct sockaddr; |
84 | 84 | ||
85 | extern void ip_mc_dropsocket(struct sock *); | ||
86 | extern void ip_mc_dropdevice(struct net_device *dev); | ||
87 | extern int igmp_mc_proc_init(void); | 85 | extern int igmp_mc_proc_init(void); |
88 | 86 | ||
89 | /* | 87 | /* |
@@ -102,6 +100,8 @@ extern int ip_mc_output(struct sk_buff *skb); | |||
102 | extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); | 100 | extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); |
103 | extern int ip_do_nat(struct sk_buff *skb); | 101 | extern int ip_do_nat(struct sk_buff *skb); |
104 | extern void ip_send_check(struct iphdr *ip); | 102 | extern void ip_send_check(struct iphdr *ip); |
103 | extern int __ip_local_out(struct sk_buff *skb); | ||
104 | extern int ip_local_out(struct sk_buff *skb); | ||
105 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); | 105 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); |
106 | extern void ip_init(void); | 106 | extern void ip_init(void); |
107 | extern int ip_append_data(struct sock *sk, | 107 | extern int ip_append_data(struct sock *sk, |
@@ -169,7 +169,7 @@ DECLARE_SNMP_STAT(struct linux_mib, net_statistics); | |||
169 | #define NET_ADD_STATS_USER(field, adnd) SNMP_ADD_STATS_USER(net_statistics, field, adnd) | 169 | #define NET_ADD_STATS_USER(field, adnd) SNMP_ADD_STATS_USER(net_statistics, field, adnd) |
170 | 170 | ||
171 | extern unsigned long snmp_fold_field(void *mib[], int offt); | 171 | extern unsigned long snmp_fold_field(void *mib[], int offt); |
172 | extern int snmp_mib_init(void *ptr[2], size_t mibsize, size_t mibalign); | 172 | extern int snmp_mib_init(void *ptr[2], size_t mibsize); |
173 | extern void snmp_mib_free(void *ptr[2]); | 173 | extern void snmp_mib_free(void *ptr[2]); |
174 | 174 | ||
175 | extern void inet_get_local_port_range(int *low, int *high); | 175 | extern void inet_get_local_port_range(int *low, int *high); |
@@ -177,10 +177,7 @@ extern void inet_get_local_port_range(int *low, int *high); | |||
177 | extern int sysctl_ip_default_ttl; | 177 | extern int sysctl_ip_default_ttl; |
178 | extern int sysctl_ip_nonlocal_bind; | 178 | extern int sysctl_ip_nonlocal_bind; |
179 | 179 | ||
180 | /* From ip_fragment.c */ | 180 | extern struct ctl_path net_ipv4_ctl_path[]; |
181 | struct inet_frags_ctl; | ||
182 | extern struct inet_frags_ctl ip4_frags_ctl; | ||
183 | extern int sysctl_ipfrag_max_dist; | ||
184 | 181 | ||
185 | /* From inetpeer.c */ | 182 | /* From inetpeer.c */ |
186 | extern int inet_peer_threshold; | 183 | extern int inet_peer_threshold; |
@@ -266,20 +263,22 @@ static inline void ip_eth_mc_map(__be32 naddr, char *buf) | |||
266 | * Leave P_Key as 0 to be filled in by driver. | 263 | * Leave P_Key as 0 to be filled in by driver. |
267 | */ | 264 | */ |
268 | 265 | ||
269 | static inline void ip_ib_mc_map(__be32 naddr, char *buf) | 266 | static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, char *buf) |
270 | { | 267 | { |
271 | __u32 addr; | 268 | __u32 addr; |
269 | unsigned char scope = broadcast[5] & 0xF; | ||
270 | |||
272 | buf[0] = 0; /* Reserved */ | 271 | buf[0] = 0; /* Reserved */ |
273 | buf[1] = 0xff; /* Multicast QPN */ | 272 | buf[1] = 0xff; /* Multicast QPN */ |
274 | buf[2] = 0xff; | 273 | buf[2] = 0xff; |
275 | buf[3] = 0xff; | 274 | buf[3] = 0xff; |
276 | addr = ntohl(naddr); | 275 | addr = ntohl(naddr); |
277 | buf[4] = 0xff; | 276 | buf[4] = 0xff; |
278 | buf[5] = 0x12; /* link local scope */ | 277 | buf[5] = 0x10 | scope; /* scope from broadcast address */ |
279 | buf[6] = 0x40; /* IPv4 signature */ | 278 | buf[6] = 0x40; /* IPv4 signature */ |
280 | buf[7] = 0x1b; | 279 | buf[7] = 0x1b; |
281 | buf[8] = 0; /* P_Key */ | 280 | buf[8] = broadcast[8]; /* P_Key */ |
282 | buf[9] = 0; | 281 | buf[9] = broadcast[9]; |
283 | buf[10] = 0; | 282 | buf[10] = 0; |
284 | buf[11] = 0; | 283 | buf[11] = 0; |
285 | buf[12] = 0; | 284 | buf[12] = 0; |
@@ -317,7 +316,7 @@ static __inline__ void inet_reset_saddr(struct sock *sk) | |||
317 | extern int ip_call_ra_chain(struct sk_buff *skb); | 316 | extern int ip_call_ra_chain(struct sk_buff *skb); |
318 | 317 | ||
319 | /* | 318 | /* |
320 | * Functions provided by ip_fragment.o | 319 | * Functions provided by ip_fragment.c |
321 | */ | 320 | */ |
322 | 321 | ||
323 | enum ip_defrag_users | 322 | enum ip_defrag_users |
@@ -332,15 +331,14 @@ enum ip_defrag_users | |||
332 | }; | 331 | }; |
333 | 332 | ||
334 | int ip_defrag(struct sk_buff *skb, u32 user); | 333 | int ip_defrag(struct sk_buff *skb, u32 user); |
335 | int ip_frag_mem(void); | 334 | int ip_frag_mem(struct net *net); |
336 | int ip_frag_nqueues(void); | 335 | int ip_frag_nqueues(struct net *net); |
337 | 336 | ||
338 | /* | 337 | /* |
339 | * Functions provided by ip_forward.c | 338 | * Functions provided by ip_forward.c |
340 | */ | 339 | */ |
341 | 340 | ||
342 | extern int ip_forward(struct sk_buff *skb); | 341 | extern int ip_forward(struct sk_buff *skb); |
343 | extern int ip_net_unreachable(struct sk_buff *skb); | ||
344 | 342 | ||
345 | /* | 343 | /* |
346 | * Functions provided by ip_options.c | 344 | * Functions provided by ip_options.c |
@@ -391,6 +389,4 @@ int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, | |||
391 | extern int ip_misc_proc_init(void); | 389 | extern int ip_misc_proc_init(void); |
392 | #endif | 390 | #endif |
393 | 391 | ||
394 | extern struct ctl_table ipv4_table[]; | ||
395 | |||
396 | #endif /* _IP_H */ | 392 | #endif /* _IP_H */ |