1
2
3
4
5
6
7
8
9
10
11 #ifndef _MBUF_
12 #define _MBUF_
13
14 #define M_SIZE 4504
15
16 #ifndef MAX_MBUF
17 #define MAX_MBUF 4
18 #endif
19
20 #ifndef NO_STD_MBUF
21 #define sm_next m_next
22 #define sm_off m_off
23 #define sm_len m_len
24 #define sm_data m_data
25 #define SMbuf Mbuf
26 #define mtod smtod
27 #define mtodoff smtodoff
28 #endif
29
30 struct s_mbuf {
31 struct s_mbuf *sm_next ;
32 short sm_off ;
33 u_int sm_len ;
34 #ifdef PCI
35 int sm_use_count ;
36 #endif
37 char sm_data[M_SIZE] ;
38 } ;
39
40 typedef struct s_mbuf SMbuf ;
41
42
43 #define smtod(x,t) ((t)((x)->sm_data + (x)->sm_off))
44 #define smtodoff(x,t,o) ((t)((x)->sm_data + (o)))
45
46 #endif