xref: /linux/drivers/net/fddi/skfp/h/mbuf.h (revision 8e07e0e3964ca4e23ce7b68e2096fe660a888942)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /******************************************************************************
3  *
4  *	(C)Copyright 1998,1999 SysKonnect,
5  *	a business unit of Schneider & Koch & Co. Datensysteme GmbH.
6  *
7  *	The information in this file is provided "AS IS" without warranty.
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 ;		/* low level linked list */
32 	short		sm_off ;			/* offset in m_data */
33 	u_int		sm_len ;			/* len of data */
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 /* mbuf head, to typed data */
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	/* _MBUF_ */
47