summaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /include/net/ip.h
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h43
1 files changed, 11 insertions, 32 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index c078484c3..4d4dbf7ce 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -66,6 +66,7 @@ struct ip_ra_chain
};
extern struct ip_ra_chain *ip_ra_chain;
+extern rwlock_t ip_ra_lock;
/* IP flags. */
#define IP_CE 0x8000 /* Flag: "Congestion" */
@@ -76,7 +77,7 @@ extern struct ip_ra_chain *ip_ra_chain;
#define IP_FRAG_TIME (30 * HZ) /* fragment lifetime */
extern void ip_mc_dropsocket(struct sock *);
-extern void ip_mc_dropdevice(struct device *dev);
+extern void ip_mc_dropdevice(struct net_device *dev);
extern int ip_mc_procinfo(char *, char **, off_t, int, int);
/*
@@ -86,17 +87,17 @@ extern int ip_mc_procinfo(char *, char **, off_t, int, int);
extern void ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
u32 saddr, u32 daddr,
struct ip_options *opt);
-extern int ip_rcv(struct sk_buff *skb, struct device *dev,
+extern int ip_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt);
extern int ip_local_deliver(struct sk_buff *skb);
extern int ip_mr_input(struct sk_buff *skb);
extern int ip_output(struct sk_buff *skb);
extern int ip_mc_output(struct sk_buff *skb);
-extern void ip_fragment(struct sk_buff *skb, int (*out)(struct sk_buff*));
+extern int ip_fragment(struct sk_buff *skb, int (*out)(struct sk_buff*));
extern int ip_do_nat(struct sk_buff *skb);
extern void ip_send_check(struct iphdr *ip);
extern int ip_id_count;
-extern void ip_queue_xmit(struct sk_buff *skb);
+extern int ip_queue_xmit(struct sk_buff *skb);
extern void ip_init(void);
extern int ip_build_xmit(struct sock *sk,
int getfrag (const void *,
@@ -121,7 +122,7 @@ struct ip_reply_arg {
void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
unsigned int len);
-extern int __ip_finish_output(struct sk_buff *skb);
+extern __inline__ int ip_finish_output(struct sk_buff *skb);
struct ipv4_config
{
@@ -136,34 +137,12 @@ extern struct linux_mib net_statistics;
extern int sysctl_local_port_range[2];
-extern __inline__ int ip_finish_output(struct sk_buff *skb)
-{
- struct dst_entry *dst = skb->dst;
- struct device *dev = dst->dev;
- struct hh_cache *hh = dst->hh;
-
- skb->dev = dev;
- skb->protocol = __constant_htons(ETH_P_IP);
-
- if (hh) {
- read_lock_bh(&hh->hh_lock);
- memcpy(skb->data - 16, hh->hh_data, 16);
- read_unlock_bh(&hh->hh_lock);
- skb_push(skb, hh->hh_len);
- return hh->hh_output(skb);
- } else if (dst->neighbour)
- return dst->neighbour->output(skb);
-
- kfree_skb(skb);
- return -EINVAL;
-}
-
-extern __inline__ void ip_send(struct sk_buff *skb)
+extern __inline__ int ip_send(struct sk_buff *skb)
{
if (skb->len > skb->dst->pmtu)
- ip_fragment(skb, __ip_finish_output);
+ return ip_fragment(skb, ip_finish_output);
else
- ip_finish_output(skb);
+ return ip_finish_output(skb);
}
extern __inline__
@@ -180,8 +159,8 @@ int ip_decrease_ttl(struct iphdr *iph)
extern __inline__
int ip_dont_fragment(struct sock *sk, struct dst_entry *dst)
{
- return (sk->ip_pmtudisc == IP_PMTUDISC_DO ||
- (sk->ip_pmtudisc == IP_PMTUDISC_WANT &&
+ return (sk->protinfo.af_inet.pmtudisc == IP_PMTUDISC_DO ||
+ (sk->protinfo.af_inet.pmtudisc == IP_PMTUDISC_WANT &&
!(dst->mxlock&(1<<RTAX_MTU))));
}