Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /******************************************************************************
0003  *
0004  *  (C)Copyright 1998,1999 SysKonnect,
0005  *  a business unit of Schneider & Koch & Co. Datensysteme GmbH.
0006  *
0007  *  The information in this file is provided "AS IS" without warranty.
0008  *
0009  ******************************************************************************/
0010 
0011 #ifndef _MBUF_
0012 #define _MBUF_
0013 
0014 #define M_SIZE  4504
0015 
0016 #ifndef MAX_MBUF
0017 #define MAX_MBUF    4
0018 #endif
0019 
0020 #ifndef NO_STD_MBUF
0021 #define sm_next         m_next
0022 #define sm_off          m_off
0023 #define sm_len          m_len
0024 #define sm_data         m_data
0025 #define SMbuf           Mbuf
0026 #define mtod        smtod
0027 #define mtodoff     smtodoff
0028 #endif
0029 
0030 struct s_mbuf {
0031     struct s_mbuf   *sm_next ;      /* low level linked list */
0032     short       sm_off ;            /* offset in m_data */
0033     u_int       sm_len ;            /* len of data */
0034 #ifdef  PCI
0035     int     sm_use_count ;
0036 #endif
0037     char        sm_data[M_SIZE] ;
0038 } ;
0039 
0040 typedef struct s_mbuf SMbuf ;
0041 
0042 /* mbuf head, to typed data */
0043 #define smtod(x,t)  ((t)((x)->sm_data + (x)->sm_off))
0044 #define smtodoff(x,t,o) ((t)((x)->sm_data + (o)))
0045 
0046 #endif  /* _MBUF_ */