]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/net/ip.h
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / include / net / ip.h
index 49c672c8cdae9acbc0fe84100dae971ecf1da3e8..29d89de39822288f7b61d20c96374cfed5f6b8fb 100644 (file)
@@ -161,6 +161,44 @@ int ip_output(struct net *net, struct sock *sk, struct sk_buff *skb);
 int ip_mc_output(struct net *net, struct sock *sk, struct sk_buff *skb);
 int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
                   int (*output)(struct net *, struct sock *, struct sk_buff *));
+
+struct ip_fraglist_iter {
+       struct sk_buff  *frag;
+       struct iphdr    *iph;
+       int             offset;
+       unsigned int    hlen;
+};
+
+void ip_fraglist_init(struct sk_buff *skb, struct iphdr *iph,
+                     unsigned int hlen, struct ip_fraglist_iter *iter);
+void ip_fraglist_prepare(struct sk_buff *skb, struct ip_fraglist_iter *iter);
+
+static inline struct sk_buff *ip_fraglist_next(struct ip_fraglist_iter *iter)
+{
+       struct sk_buff *skb = iter->frag;
+
+       iter->frag = skb->next;
+       skb_mark_not_on_list(skb);
+
+       return skb;
+}
+
+struct ip_frag_state {
+       struct iphdr    *iph;
+       unsigned int    hlen;
+       unsigned int    ll_rs;
+       unsigned int    mtu;
+       unsigned int    left;
+       int             offset;
+       int             ptr;
+       __be16          not_last_frag;
+};
+
+void ip_frag_init(struct sk_buff *skb, unsigned int hlen, unsigned int ll_rs,
+                 unsigned int mtu, struct ip_frag_state *state);
+struct sk_buff *ip_frag_next(struct sk_buff *skb,
+                            struct ip_frag_state *state);
+
 void ip_send_check(struct iphdr *ip);
 int __ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
 int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
@@ -241,7 +279,7 @@ void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb,
                           const struct ip_options *sopt,
                           __be32 daddr, __be32 saddr,
                           const struct ip_reply_arg *arg,
-                          unsigned int len);
+                          unsigned int len, u64 transmit_time);
 
 #define IP_INC_STATS(net, field)       SNMP_INC_STATS64((net)->mib.ip_statistics, field)
 #define __IP_INC_STATS(net, field)     __SNMP_INC_STATS64((net)->mib.ip_statistics, field)