home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / sys / mbuf.h < prev    next >
C/C++ Source or Header  |  1999-05-11  |  4KB  |  91 lines

  1. /* IBM Confidential                                 */
  2. /* Licensed Materials - Property of IBM Corporation */
  3. /* (C) Copyright IBM Corp 1990,1996. All rights reserved */
  4.  
  5. /*
  6.  * Copyright (c) 1982, 1986, 1988, 1993
  7.  *      The Regents of the University of California.  All rights reserved.
  8.  *
  9.  * Redistribution and use in source and binary forms, with or without
  10.  * modification, are permitted provided that the following conditions
  11.  * are met:
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 2. Redistributions in binary form must reproduce the above copyright
  15.  *    notice, this list of conditions and the following disclaimer in the
  16.  *    documentation and/or other materials provided with the distribution.
  17.  * 3. All advertising materials mentioning features or use of this software
  18.  *    must display the following acknowledgement:
  19.  *      This product includes software developed by the University of
  20.  *      California, Berkeley and its contributors.
  21.  * 4. Neither the name of the University nor the names of its contributors
  22.  *    may be used to endorse or promote products derived from this software
  23.  *    without specific prior written permission.
  24.  *
  25.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  26.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  28.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  29.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  31.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  32.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  33.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  34.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  35.  * SUCH DAMAGE.
  36.  *
  37.  *      @(#)mbuf.h      8.5 (Berkeley) 2/19/95
  38.  */
  39.  
  40. #ifndef _SYS_MBUF_H_
  41. #define _SYS_MBUF_H_
  42.  
  43. #ifdef TCPV40HDRS
  44. #error error: sys\mbuf.h is for TCP/IP toolkit 5.0 or later releases only
  45. #else
  46. /* mbuf types */
  47. #define MT_FREE         0       /* should be on free list */
  48. #define MT_DATA         1       /* dynamic (data) allocation */
  49. #define MT_HEADER       2       /* packet header */
  50. #define MT_SOCKET       3       /* socket structure */
  51. #define MT_PCB          4       /* protocol control block */
  52. #define MT_RTABLE       5       /* routing tables */
  53. #define MT_HTABLE       6       /* IMP host tables */
  54. #define MT_ATABLE       7       /* address resolution tables */
  55. #define MT_SONAME       8       /* socket name */
  56. #define MT_SOOPTS       10      /* socket options */
  57. #define MT_FTABLE       11      /* fragment reassembly header */
  58. #define MT_RIGHTS       12      /* access rights */
  59. #define MT_IFADDR       13      /* interface address */
  60. #define MT_CONTROL      14      /* extra-data protocol message */
  61. #define MT_OOBDATA      15      /* expedited data  */
  62.  
  63. /* mulitcast (os/2 only) */
  64. #define MT_IPMOPTS      16      /* internet multicast options */
  65. #define MT_IPMADDR      17      /* internet multicast address */
  66. #define MT_IFMADDR      18      /* link-level multicast address */
  67. #define MT_MRTABLE      19      /* multicast routing tables */
  68. #define MT_MAPIO        20      /* memory map io */
  69. /*
  70.  * Mbuf statistics.
  71.  */
  72. #pragma pack(1)
  73. struct mbstat {
  74.         u_long  m_mbufs;        /* mbufs obtained from page pool */
  75.         u_long  m_clusters;     /* clusters obtained from page pool */
  76.         u_long  m_spare;        /* spare field */
  77.         u_long  m_clfree;       /* free clusters */
  78.         u_long  m_drops;        /* times failed to find space */
  79.         u_long  m_wait;         /* times waited for space */
  80.         u_long  m_drain;        /* times drained protocols for space */
  81.         u_short m_mtypes[256];  /* type specific mbuf allocations */
  82. };
  83. #pragma pack()
  84.  
  85. #ifdef KERNEL
  86. #include <private/mbuf.h>
  87. #endif
  88.  
  89. #endif /* TCPV40HDRS */
  90. #endif /* !_SYS_MBUF_H_ */
  91.