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.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 7c416583b710..66dd49149208 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -52,7 +52,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
52struct ipcm_cookie { 52struct ipcm_cookie {
53 __be32 addr; 53 __be32 addr;
54 int oif; 54 int oif;
55 struct ip_options *opt; 55 struct ip_options_rcu *opt;
56 __u8 tx_flags; 56 __u8 tx_flags;
57}; 57};
58 58
@@ -92,7 +92,7 @@ extern int igmp_mc_proc_init(void);
92 92
93extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, 93extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
94 __be32 saddr, __be32 daddr, 94 __be32 saddr, __be32 daddr,
95 struct ip_options *opt); 95 struct ip_options_rcu *opt);
96extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, 96extern int ip_rcv(struct sk_buff *skb, struct net_device *dev,
97 struct packet_type *pt, struct net_device *orig_dev); 97 struct packet_type *pt, struct net_device *orig_dev);
98extern int ip_local_deliver(struct sk_buff *skb); 98extern int ip_local_deliver(struct sk_buff *skb);
@@ -104,9 +104,9 @@ extern int ip_do_nat(struct sk_buff *skb);
104extern void ip_send_check(struct iphdr *ip); 104extern void ip_send_check(struct iphdr *ip);
105extern int __ip_local_out(struct sk_buff *skb); 105extern int __ip_local_out(struct sk_buff *skb);
106extern int ip_local_out(struct sk_buff *skb); 106extern int ip_local_out(struct sk_buff *skb);
107extern int ip_queue_xmit(struct sk_buff *skb); 107extern int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl);
108extern void ip_init(void); 108extern void ip_init(void);
109extern int ip_append_data(struct sock *sk, 109extern int ip_append_data(struct sock *sk, struct flowi4 *fl4,
110 int getfrag(void *from, char *to, int offset, int len, 110 int getfrag(void *from, char *to, int offset, int len,
111 int odd, struct sk_buff *skb), 111 int odd, struct sk_buff *skb),
112 void *from, int len, int protolen, 112 void *from, int len, int protolen,
@@ -114,15 +114,17 @@ extern int ip_append_data(struct sock *sk,
114 struct rtable **rt, 114 struct rtable **rt,
115 unsigned int flags); 115 unsigned int flags);
116extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb); 116extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb);
117extern ssize_t ip_append_page(struct sock *sk, struct page *page, 117extern ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
118 int offset, size_t size, int flags); 118 int offset, size_t size, int flags);
119extern struct sk_buff *__ip_make_skb(struct sock *sk, 119extern struct sk_buff *__ip_make_skb(struct sock *sk,
120 struct flowi4 *fl4,
120 struct sk_buff_head *queue, 121 struct sk_buff_head *queue,
121 struct inet_cork *cork); 122 struct inet_cork *cork);
122extern int ip_send_skb(struct sk_buff *skb); 123extern int ip_send_skb(struct sk_buff *skb);
123extern int ip_push_pending_frames(struct sock *sk); 124extern int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4);
124extern void ip_flush_pending_frames(struct sock *sk); 125extern void ip_flush_pending_frames(struct sock *sk);
125extern struct sk_buff *ip_make_skb(struct sock *sk, 126extern struct sk_buff *ip_make_skb(struct sock *sk,
127 struct flowi4 *fl4,
126 int getfrag(void *from, char *to, int offset, int len, 128 int getfrag(void *from, char *to, int offset, int len,
127 int odd, struct sk_buff *skb), 129 int odd, struct sk_buff *skb),
128 void *from, int length, int transhdrlen, 130 void *from, int length, int transhdrlen,
@@ -130,9 +132,9 @@ extern struct sk_buff *ip_make_skb(struct sock *sk,
130 struct rtable **rtp, 132 struct rtable **rtp,
131 unsigned int flags); 133 unsigned int flags);
132 134
133static inline struct sk_buff *ip_finish_skb(struct sock *sk) 135static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4)
134{ 136{
135 return __ip_make_skb(sk, &sk->sk_write_queue, &inet_sk(sk)->cork); 137 return __ip_make_skb(sk, fl4, &sk->sk_write_queue, &inet_sk(sk)->cork.base);
136} 138}
137 139
138/* datagram.c */ 140/* datagram.c */
@@ -172,8 +174,8 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
172 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0; 174 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0;
173} 175}
174 176
175void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, 177void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr,
176 unsigned int len); 178 struct ip_reply_arg *arg, unsigned int len);
177 179
178struct ipv4_config { 180struct ipv4_config {
179 int log_martians; 181 int log_martians;
@@ -416,14 +418,15 @@ extern int ip_forward(struct sk_buff *skb);
416 * Functions provided by ip_options.c 418 * Functions provided by ip_options.c
417 */ 419 */
418 420
419extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, __be32 daddr, struct rtable *rt, int is_frag); 421extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
422 __be32 daddr, struct rtable *rt, int is_frag);
420extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb); 423extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
421extern void ip_options_fragment(struct sk_buff *skb); 424extern void ip_options_fragment(struct sk_buff *skb);
422extern int ip_options_compile(struct net *net, 425extern int ip_options_compile(struct net *net,
423 struct ip_options *opt, struct sk_buff *skb); 426 struct ip_options *opt, struct sk_buff *skb);
424extern int ip_options_get(struct net *net, struct ip_options **optp, 427extern int ip_options_get(struct net *net, struct ip_options_rcu **optp,
425 unsigned char *data, int optlen); 428 unsigned char *data, int optlen);
426extern int ip_options_get_from_user(struct net *net, struct ip_options **optp, 429extern int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp,
427 unsigned char __user *data, int optlen); 430 unsigned char __user *data, int optlen);
428extern void ip_options_undo(struct ip_options * opt); 431extern void ip_options_undo(struct ip_options * opt);
429extern void ip_forward_options(struct sk_buff *skb); 432extern void ip_forward_options(struct sk_buff *skb);