mbuf.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #ifndef _MBUF_
  11. #define _MBUF_
  12. #define M_SIZE 4504
  13. #ifndef MAX_MBUF
  14. #define MAX_MBUF 4
  15. #endif
  16. #ifndef NO_STD_MBUF
  17. #define sm_next m_next
  18. #define sm_off m_off
  19. #define sm_len m_len
  20. #define sm_data m_data
  21. #define SMbuf Mbuf
  22. #define mtod smtod
  23. #define mtodoff smtodoff
  24. #endif
  25. struct s_mbuf {
  26. struct s_mbuf *sm_next ; /* low level linked list */
  27. short sm_off ; /* offset in m_data */
  28. u_int sm_len ; /* len of data */
  29. #ifdef PCI
  30. int sm_use_count ;
  31. #endif
  32. char sm_data[M_SIZE] ;
  33. } ;
  34. typedef struct s_mbuf SMbuf ;
  35. /* mbuf head, to typed data */
  36. #define smtod(x,t) ((t)((x)->sm_data + (x)->sm_off))
  37. #define smtodoff(x,t,o) ((t)((x)->sm_data + (o)))
  38. #endif /* _MBUF_ */