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.h30
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;
82struct rtable; 82struct rtable;
83struct sockaddr; 83struct sockaddr;
84 84
85extern void ip_mc_dropsocket(struct sock *);
86extern void ip_mc_dropdevice(struct net_device *dev);
87extern int igmp_mc_proc_init(void); 85extern int igmp_mc_proc_init(void);
88 86
89/* 87/*
@@ -102,6 +100,8 @@ extern int ip_mc_output(struct sk_buff *skb);
102extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); 100extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
103extern int ip_do_nat(struct sk_buff *skb); 101extern int ip_do_nat(struct sk_buff *skb);
104extern void ip_send_check(struct iphdr *ip); 102extern void ip_send_check(struct iphdr *ip);
103extern int __ip_local_out(struct sk_buff *skb);
104extern int ip_local_out(struct sk_buff *skb);
105extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); 105extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok);
106extern void ip_init(void); 106extern void ip_init(void);
107extern int ip_append_data(struct sock *sk, 107extern 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
171extern unsigned long snmp_fold_field(void *mib[], int offt); 171extern unsigned long snmp_fold_field(void *mib[], int offt);
172extern int snmp_mib_init(void *ptr[2], size_t mibsize, size_t mibalign); 172extern int snmp_mib_init(void *ptr[2], size_t mibsize);
173extern void snmp_mib_free(void *ptr[2]); 173extern void snmp_mib_free(void *ptr[2]);
174 174
175extern void inet_get_local_port_range(int *low, int *high); 175extern 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);
177extern int sysctl_ip_default_ttl; 177extern int sysctl_ip_default_ttl;
178extern int sysctl_ip_nonlocal_bind; 178extern int sysctl_ip_nonlocal_bind;
179 179
180/* From ip_fragment.c */ 180extern struct ctl_path net_ipv4_ctl_path[];
181struct inet_frags_ctl;
182extern struct inet_frags_ctl ip4_frags_ctl;
183extern int sysctl_ipfrag_max_dist;
184 181
185/* From inetpeer.c */ 182/* From inetpeer.c */
186extern int inet_peer_threshold; 183extern 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
269static inline void ip_ib_mc_map(__be32 naddr, char *buf) 266static 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)
317extern int ip_call_ra_chain(struct sk_buff *skb); 316extern 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
323enum ip_defrag_users 322enum ip_defrag_users
@@ -332,15 +331,14 @@ enum ip_defrag_users
332}; 331};
333 332
334int ip_defrag(struct sk_buff *skb, u32 user); 333int ip_defrag(struct sk_buff *skb, u32 user);
335int ip_frag_mem(void); 334int ip_frag_mem(struct net *net);
336int ip_frag_nqueues(void); 335int 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
342extern int ip_forward(struct sk_buff *skb); 341extern int ip_forward(struct sk_buff *skb);
343extern 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,
391extern int ip_misc_proc_init(void); 389extern int ip_misc_proc_init(void);
392#endif 390#endif
393 391
394extern struct ctl_table ipv4_table[];
395
396#endif /* _IP_H */ 392#endif /* _IP_H */