]> err.no Git - linux-2.6/blobdiff - include/linux/skbuff.h
[NET]: Zerocopy sequential reading of skb data
[linux-2.6] / include / linux / skbuff.h
index c77d745cbd3fc8b399adabf427ebd96a68ea9dea..171a37dff83aa63baeffb6eec2949fabf59b9daa 100644 (file)
@@ -167,13 +167,14 @@ struct skb_shared_info {
  *     @h: Transport layer header
  *     @nh: Network layer header
  *     @mac: Link layer header
- *     @dst: FIXME: Describe this field
+ *     @dst: destination entry
+ *     @sp: the security path, used for xfrm
  *     @cb: Control buffer. Free for use by every layer. Put private vars here
  *     @len: Length of actual data
  *     @data_len: Data length
  *     @mac_len: Length of link layer header
  *     @csum: Checksum
- *     @__unused: Dead field, may be reused
+ *     @local_df: allow local fragmentation
  *     @cloned: Head may be cloned (check refcnt to be sure)
  *     @nohdr: Payload reference only, must not modify header
  *     @pkt_type: Packet class
@@ -192,7 +193,6 @@ struct skb_shared_info {
  *     @nfcache: Cache info
  *     @nfct: Associated connection, if any
  *     @nfctinfo: Relationship of this skb to the connection
- *     @nf_debug: Netfilter debugging
  *     @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
  *      @private: Data which is private to the HIPPI implementation
  *     @tc_index: Traffic control index
@@ -263,9 +263,6 @@ struct sk_buff {
        __u32                   nfcache;
        __u32                   nfctinfo;
        struct nf_conntrack     *nfct;
-#ifdef CONFIG_NETFILTER_DEBUG
-        unsigned int           nf_debug;
-#endif
 #ifdef CONFIG_BRIDGE_NETFILTER
        struct nf_bridge_info   *nf_bridge;
 #endif
@@ -324,6 +321,24 @@ extern void              skb_over_panic(struct sk_buff *skb, int len,
 extern void          skb_under_panic(struct sk_buff *skb, int len,
                                      void *here);
 
+struct skb_seq_state
+{
+       __u32           lower_offset;
+       __u32           upper_offset;
+       __u32           frag_idx;
+       __u32           stepped_offset;
+       struct sk_buff  *root_skb;
+       struct sk_buff  *cur_skb;
+       __u8            *frag_data;
+};
+
+extern void          skb_prepare_seq_read(struct sk_buff *skb,
+                                          unsigned int from, unsigned int to,
+                                          struct skb_seq_state *st);
+extern unsigned int   skb_seq_read(unsigned int consumed, const u8 **data,
+                                  struct skb_seq_state *st);
+extern void          skb_abort_seq_read(struct skb_seq_state *st);
+
 /* Internal */
 #define skb_shinfo(SKB)                ((struct skb_shared_info *)((SKB)->end))
 
@@ -1218,15 +1233,6 @@ static inline void nf_reset(struct sk_buff *skb)
 {
        nf_conntrack_put(skb->nfct);
        skb->nfct = NULL;
-#ifdef CONFIG_NETFILTER_DEBUG
-       skb->nf_debug = 0;
-#endif
-}
-static inline void nf_reset_debug(struct sk_buff *skb)
-{
-#ifdef CONFIG_NETFILTER_DEBUG
-       skb->nf_debug = 0;
-#endif
 }
 
 #ifdef CONFIG_BRIDGE_NETFILTER