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 #defineFREE_READ 1
24 #defineFREE_WRITE 0
25
26
27 structsk_buff{ 28 structsk_buff *volatilenext;
29 structsk_buff *volatileprev;
30 structsk_buff *volatilelink3;
31 structsock *sk;
32 volatileunsignedlongwhen; /* used to compute rtt's */ 33 structdevice *dev;
34 void *mem_addr;
35 union{ 36 structtcphdr *th;
37 structethhdr *eth;
38 structiphdr *iph;
39 structudphdr *uh;
40 structarphdr *arp;
41 unsignedchar *raw;
42 unsignedlongseq;
43 }h;
44 unsignedlongmem_len;
45 unsignedlonglen;
46 unsignedlongsaddr;
47 unsignedlongdaddr;
48 intmagic;
49 volatilecharacked,
50 used,
51 free,
52 arp,
53 urg_used,
54 lock;
55 unsignedchartries;
56 };
57
58 #defineSK_WMEM_MAX 8192
59 #defineSK_RMEM_MAX 32767
60
61
62 externvoidprint_skb(structsk_buff *);
63 externvoidkfree_skb(structsk_buff *skb, intrw);
64 externvoidlock_skb(structsk_buff *skb);
65 externvoidunlock_skb(structsk_buff *skb, intrw);
66
67 #endif/* _SKBUFF_H */