root/net/inet/skbuff.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * INET         An implementation of the TCP/IP protocol suite for the LINUX
   3  *              operating system.  INET is implemented using the  BSD Socket
   4  *              interface as the means of communication with the user level.
   5  *
   6  *              Definitions for the 'struct sk_buff' memory handlers.
   7  *
   8  * Version:     @(#)skbuff.h    1.0.4   05/20/93
   9  *
  10  * Authors:     Ross Biro, <bir7@leland.Stanford.Edu>
  11  *              Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  12  *              Corey Minyard <wf-rch!minyard@relay.EU.net>
  13  *
  14  *              This program is free software; you can redistribute it and/or
  15  *              modify it under the terms of the GNU General Public License
  16  *              as published by the Free Software Foundation; either version
  17  *              2 of the License, or (at your option) any later version.
  18  */
  19 #ifndef _SKBUFF_H
  20 #define _SKBUFF_H
  21 
  22 
  23 #define FREE_READ       1
  24 #define FREE_WRITE      0
  25 
  26 
  27 struct sk_buff {
  28   struct sk_buff                *volatile next;
  29   struct sk_buff                *volatile prev;
  30   struct sk_buff                *volatile link3;
  31   struct sock                   *sk;
  32   volatile unsigned long        when;   /* used to compute rtt's        */
  33   struct device                 *dev;
  34   void                          *mem_addr;
  35   union {
  36         struct tcphdr   *th;
  37         struct ethhdr   *eth;
  38         struct iphdr    *iph;
  39         struct udphdr   *uh;
  40         struct arphdr   *arp;
  41         unsigned char   *raw;
  42         unsigned long   seq;
  43   } h;
  44   unsigned long                 mem_len;
  45   unsigned long                 len;
  46   unsigned long                 saddr;
  47   unsigned long                 daddr;
  48   int                           magic;
  49   volatile char                 acked,
  50                                 used,
  51                                 free,
  52                                 arp,
  53                                 urg_used,
  54                                 lock;
  55   unsigned char                 tries;
  56 };
  57 
  58 #define SK_WMEM_MAX     8192
  59 #define SK_RMEM_MAX     32767
  60 
  61 
  62 extern void                     print_skb(struct sk_buff *);
  63 extern void                     kfree_skb(struct sk_buff *skb, int rw);
  64 extern void                     lock_skb(struct sk_buff *skb);
  65 extern void                     unlock_skb(struct sk_buff *skb, int rw);
  66 
  67 #endif  /* _SKBUFF_H */

/* [previous][next][first][last][top][bottom][index][help] */