- Merge some small changes from aicom-network-branch to fix potential memory corrupt...
[reactos.git] / reactos / lib / drivers / oskittcp / include / freebsd / src / sys / sys / mbuf.h
1 /*
2 * Copyright (c) 1997-1998 University of Utah and the Flux Group.
3 * All rights reserved.
4 *
5 * This file is part of the Flux OSKit. The OSKit is free software, also known
6 * as "open source;" you can redistribute it and/or modify it under the terms
7 * of the GNU General Public License (GPL), version 2, as published by the Free
8 * Software Foundation (FSF). To explore alternate licensing terms, contact
9 * the University of Utah at csl-dist@cs.utah.edu or +1-801-585-3271.
10 *
11 * The OSKit is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GPL for more details. You should have
14 * received a copy of the GPL along with the OSKit; see the file COPYING. If
15 * not, write to the FSF, 59 Temple Place #330, Boston, MA 02111-1307, USA.
16 */
17 /*
18 * Copyright (c) 1982, 1986, 1988, 1993
19 * The Regents of the University of California. All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. All advertising materials mentioning features or use of this software
30 * must display the following acknowledgement:
31 * This product includes software developed by the University of
32 * California, Berkeley and its contributors.
33 * 4. Neither the name of the University nor the names of its contributors
34 * may be used to endorse or promote products derived from this software
35 * without specific prior written permission.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
38 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
40 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
41 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
42 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
43 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
45 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
46 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47 * SUCH DAMAGE.
48 *
49 * @(#)mbuf.h 8.3 (Berkeley) 1/21/94
50 * $\Id: mbuf.h,v 1.9 1994/11/14 13:54:20 bde Exp $
51 */
52
53 #ifndef _SYS_MBUF_H_
54 #define _SYS_MBUF_H_
55
56 #ifndef M_WAITOK
57 #include <sys/malloc.h>
58 #endif
59
60 /*
61 * Mbufs are of a single size, MSIZE (machine/machparam.h), which
62 * includes overhead. An mbuf may add a single "mbuf cluster" of size
63 * MCLBYTES (also in machine/machparam.h), which has no additional overhead
64 * and is used instead of the internal data area; this is done when
65 * at least MINCLSIZE of data must be stored.
66 */
67
68 #define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */
69 #define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */
70
71 #define MINCLSIZE (MHLEN + MLEN) /* smallest amount to put in cluster */
72 #define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */
73
74 /*
75 * Macros for type conversion
76 * mtod(m,t) - convert mbuf pointer to data pointer of correct type
77 * dtom(x) - convert data pointer within mbuf to mbuf pointer (XXX)
78 * mtocl(x) - convert pointer within cluster to cluster index #
79 * cltom(x) - convert cluster # to ptr to beginning of cluster
80 */
81 #define mtod(m,t) ((t)((m)->m_data))
82 #ifndef __REACTOS__
83 #define dtom(x) ((struct mbuf *)((int)(x) & ~(MSIZE-1)))
84 #else
85 #define dtom(x) ((struct mbuf *)((int)(x) - sizeof(struct m_hdr)))
86 #endif
87 #ifndef OSKIT
88 #define mtocl(x) (((u_int)(x) - (u_int)mbutl) >> MCLSHIFT)
89 #define cltom(x) ((caddr_t)((u_int)mbutl + ((u_int)(x) << MCLSHIFT)))
90 #endif /* OSKIT */
91
92 /* header at beginning of each mbuf: */
93 struct m_hdr {
94 struct mbuf *mh_next; /* next buffer in chain */
95 struct mbuf *mh_nextpkt; /* next chain in queue/record */
96 int mh_len; /* amount of data in this mbuf */
97 caddr_t mh_data; /* location of data */
98 short mh_type; /* type of data in this mbuf */
99 short mh_flags; /* flags; see below */
100 };
101
102 /* record/packet header in first mbuf of chain; valid if M_PKTHDR set */
103 struct pkthdr {
104 int len; /* total packet length */
105 struct ifnet *rcvif; /* rcv interface */
106 };
107
108 /* description of external storage mapped into mbuf, valid if M_EXT set */
109 struct m_ext {
110 caddr_t ext_buf; /* start of buffer */
111 #ifdef OSKIT
112 struct oskit_bufio *ext_bufio; /* OS Kit bufio pointer */
113 #else
114 void (*ext_free) /* free routine if not the usual */
115 __P((caddr_t, u_int));
116 #endif
117 u_int ext_size; /* size of buffer, for ext_free */
118 };
119
120 struct mbuf {
121 struct m_hdr m_hdr;
122 union {
123 struct {
124 struct pkthdr MH_pkthdr; /* M_PKTHDR set */
125 union {
126 struct m_ext MH_ext; /* M_EXT set */
127 char MH_databuf[MHLEN];
128 } MH_dat;
129 } MH;
130 char M_databuf[MLEN]; /* !M_PKTHDR, !M_EXT */
131 } M_dat;
132 };
133 #define m_next m_hdr.mh_next
134 #define m_len m_hdr.mh_len
135 #define m_data m_hdr.mh_data
136 #define m_type m_hdr.mh_type
137 #define m_flags m_hdr.mh_flags
138 #define m_nextpkt m_hdr.mh_nextpkt
139 #define m_act m_nextpkt
140 #define m_pkthdr M_dat.MH.MH_pkthdr
141 #define m_ext M_dat.MH.MH_dat.MH_ext
142 #define m_pktdat M_dat.MH.MH_dat.MH_databuf
143 #define m_dat M_dat.M_databuf
144
145 /* mbuf flags */
146 #if defined(OSKIT) && !defined(__REACTOS__)
147 #include <oskit/io/bufio.h>
148 /*
149 * A small step for mankind, but a huge leap for BSD:
150 * We consistently use oskit_bufios for external mbufs
151 */
152 #endif
153 #define M_EXT 0x0001 /* has associated external storage */
154 #define M_PKTHDR 0x0002 /* start of record */
155 #define M_EOR 0x0004 /* end of record */
156
157 /* mbuf pkthdr flags, also in m_flags */
158 #define M_BCAST 0x0100 /* send/received as link-level broadcast */
159 #define M_MCAST 0x0200 /* send/received as link-level multicast */
160
161 /* flags copied when copying m_pkthdr */
162 #define M_COPYFLAGS (M_PKTHDR|M_EOR|M_BCAST|M_MCAST)
163
164 /* mbuf types */
165 #define MT_FREE 0 /* should be on free list */
166 #define MT_DATA 1 /* dynamic (data) allocation */
167 #define MT_HEADER 2 /* packet header */
168 #define MT_SOCKET 3 /* socket structure */
169 #define MT_PCB 4 /* protocol control block */
170 #define MT_RTABLE 5 /* routing tables */
171 #define MT_HTABLE 6 /* IMP host tables */
172 #define MT_ATABLE 7 /* address resolution tables */
173 #define MT_SONAME 8 /* socket name */
174 #define MT_SOOPTS 10 /* socket options */
175 #define MT_FTABLE 11 /* fragment reassembly header */
176 #define MT_RIGHTS 12 /* access rights */
177 #define MT_IFADDR 13 /* interface address */
178 #define MT_CONTROL 14 /* extra-data protocol message */
179 #define MT_OOBDATA 15 /* expedited data */
180
181 /* flags to m_get/MGET */
182 #define M_DONTWAIT M_NOWAIT
183 #define M_WAIT M_WAITOK
184
185 /*
186 * mbuf utility macros:
187 *
188 * MBUFLOCK(code)
189 * prevents a section of code from from being interrupted by network
190 * drivers.
191 */
192 #define MBUFLOCK(code) \
193 { int ms = splimp(); \
194 { code } \
195 splx(ms); \
196 }
197
198 /*
199 * mbuf allocation/deallocation macros:
200 *
201 * MGET(struct mbuf *m, int how, int type)
202 * allocates an mbuf and initializes it to contain internal data.
203 *
204 * MGETHDR(struct mbuf *m, int how, int type)
205 * allocates an mbuf and initializes it to contain a packet header
206 * and internal data.
207 */
208 #define MGET(m, how, type) { \
209 MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \
210 OS_DbgPrint(OSK_MID_TRACE,("(MGET) got mbuf @ %x\n", m)); \
211 if (m) { \
212 (m)->m_type = (type); \
213 MBUFLOCK(mbstat.m_mtypes[type]++;) \
214 (m)->m_next = (struct mbuf *)NULL; \
215 (m)->m_nextpkt = (struct mbuf *)NULL; \
216 (m)->m_data = (m)->m_dat; \
217 (m)->m_flags = 0; \
218 } else \
219 (m) = m_retry((how), (type)); \
220 }
221
222 #define MGETHDR(m, how, type) { \
223 MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \
224 OS_DbgPrint(OSK_MID_TRACE,("(MGETHDR) got mbuf @ %x\n", m)); \
225 if (m) { \
226 (m)->m_type = (type); \
227 MBUFLOCK(mbstat.m_mtypes[type]++;) \
228 (m)->m_next = (struct mbuf *)NULL; \
229 (m)->m_nextpkt = (struct mbuf *)NULL; \
230 (m)->m_data = (m)->m_pktdat; \
231 (m)->m_flags = M_PKTHDR; \
232 } else \
233 (m) = m_retryhdr((how), (type)); \
234 }
235
236 #ifdef OSKIT
237 #define MGET_DONT_RECURSE(m, how, type) { \
238 MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \
239 OS_DbgPrint(OSK_MID_TRACE,("(MGET_DONT_RECURSE) got mbuf @ %x\n", m)); \
240 if (m) { \
241 (m)->m_type = (type); \
242 MBUFLOCK(mbstat.m_mtypes[type]++;) \
243 (m)->m_next = (struct mbuf *)NULL; \
244 (m)->m_nextpkt = (struct mbuf *)NULL; \
245 (m)->m_data = (m)->m_dat; \
246 (m)->m_flags = 0; \
247 } else \
248 (m) = (struct mbuf *)0; \
249 }
250
251 #define MGETHDR_DONT_RECURSE(m, how, type) { \
252 MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \
253 OS_DbgPrint(OSK_MID_TRACE,("(MGETHDR_DONT_RECURSE) got mbuf @ %x\n", m)); \
254 if (m) { \
255 (m)->m_type = (type); \
256 MBUFLOCK(mbstat.m_mtypes[type]++;) \
257 (m)->m_next = (struct mbuf *)NULL; \
258 (m)->m_nextpkt = (struct mbuf *)NULL; \
259 (m)->m_data = (m)->m_pktdat; \
260 (m)->m_flags = M_PKTHDR; \
261 } else \
262 (m) = (struct mbuf *)0; \
263 }
264 #endif /* OSKIT */
265
266 #ifndef OSKIT
267 /*
268 * Mbuf cluster macros.
269 * MCLALLOC(caddr_t p, int how) allocates an mbuf cluster.
270 * MCLGET adds such clusters to a normal mbuf;
271 * the flag M_EXT is set upon success.
272 * MCLFREE releases a reference to a cluster allocated by MCLALLOC,
273 * freeing the cluster if the reference count has reached 0.
274 *
275 * Normal mbuf clusters are normally treated as character arrays
276 * after allocation, but use the first word of the buffer as a free list
277 * pointer while on the free list.
278 */
279 union mcluster {
280 union mcluster *mcl_next;
281 char mcl_buf[MCLBYTES];
282 };
283
284 #define MCLALLOC(p, how) \
285 MBUFLOCK( \
286 OS_DbgPrint(OSK_MID_TRACE,("(MCLALLOC)\n")); \
287 if (mclfree == 0) \
288 (void)m_clalloc(1, (how)); \
289 (p) = (caddr_t)mclfree; \
290 if ((p)) { \
291 ++mclrefcnt[mtocl(p)]; \
292 mbstat.m_clfree--; \
293 mclfree = ((union mcluster *)(p))->mcl_next; \
294 } \
295 )
296
297 #define MCLGET(m, how) \
298 { MCLALLOC((m)->m_ext.ext_buf, (how)); \
299 OS_DbgPrint(OSK_MID_TRACE,("(MCLGET) m = %x\n", m)); \
300 if ((m)->m_ext.ext_buf != NULL) { \
301 (m)->m_data = (m)->m_ext.ext_buf; \
302 (m)->m_flags |= M_EXT; \
303 (m)->m_ext.ext_size = MCLBYTES; \
304 } \
305 }
306
307 #define MCLFREE(p) \
308 MBUFLOCK ( \
309 OS_DbgPrint(OSK_MID_TRACE,("(MCLFREE)\n")); \
310 if (--mclrefcnt[mtocl(p)] == 0) { \
311 ((union mcluster *)(p))->mcl_next = mclfree; \
312 mclfree = (union mcluster *)(p); \
313 mbstat.m_clfree++; \
314 } \
315 )
316 #else
317 #define MCLGET(m, how) \
318 { (m)->m_ext.ext_bufio = oskit_bufio_create(MCLBYTES); \
319 OS_DbgPrint(OSK_MID_TRACE,("(!OSKIT MCLGET)\n")); \
320 oskit_bufio_map((m)->m_ext.ext_bufio, \
321 (void **)&((m)->m_ext.ext_buf), 0, MCLBYTES); \
322 if ((m)->m_ext.ext_buf != NULL) { \
323 (m)->m_data = (m)->m_ext.ext_buf; \
324 (m)->m_flags |= M_EXT; \
325 (m)->m_ext.ext_size = MCLBYTES; \
326 } \
327 }
328 #endif /* !OSKIT */
329
330 /*
331 * MFREE(struct mbuf *m, struct mbuf *n)
332 * Free a single mbuf and associated external storage.
333 * Place the successor, if any, in n.
334 */
335 #ifdef notyet
336 #define MFREE(m, n) \
337 { MBUFLOCK(mbstat.m_mtypes[(m)->m_type]--;) \
338 if ((m)->m_flags & M_EXT) { \
339 if ((m)->m_ext.ext_free) \
340 (*((m)->m_ext.ext_free))((m)->m_ext.ext_buf, \
341 (m)->m_ext.ext_size); \
342 else \
343 MCLFREE((m)->m_ext.ext_buf); \
344 } \
345 (n) = (m)->m_next; \
346 FREE((m), mbtypes[(m)->m_type]); \
347 m = NULL; \
348 }
349 #else /* notyet */
350 #ifdef OSKIT
351 #define MFREE(m, nn) \
352 { MBUFLOCK(mbstat.m_mtypes[(m)->m_type]--;) \
353 OS_DbgPrint(OSK_MID_TRACE,("(OSKIT MFREE) m = %x\n", m)); \
354 if ((m)->m_flags & M_EXT) { \
355 oskit_bufio_release((m)->m_ext.ext_bufio); \
356 } \
357 (nn) = (m)->m_next; \
358 FREE((m), mbtypes[(m)->m_type]); \
359 m = NULL; \
360 }
361 #else /* !OSKIT */
362 #define MFREE(m, nn) \
363 { MBUFLOCK(mbstat.m_mtypes[(m)->m_type]--;) \
364 OS_DbgPrint(OSK_MID_TRACE,("(!OSKIT MFREE) m = %x\n", m)); \
365 if ((m)->m_flags & M_EXT) { \
366 MCLFREE((m)->m_ext.ext_buf); \
367 } \
368 (nn) = (m)->m_next; \
369 FREE((m), mbtypes[(m)->m_type]); \
370 m = NULL; \
371 }
372 #endif /* OSKIT */
373 #endif
374
375 /*
376 * Copy mbuf pkthdr from from to to.
377 * from must have M_PKTHDR set, and to must be empty.
378 */
379 #define M_COPY_PKTHDR(to, from) { \
380 OS_DbgPrint(OSK_MID_TRACE,("(M_COPY_PKTHDR) to %x from %x\n", to, from)); \
381 (to)->m_pkthdr = (from)->m_pkthdr; \
382 (to)->m_flags = (from)->m_flags & M_COPYFLAGS; \
383 (to)->m_data = (to)->m_pktdat; \
384 }
385
386 /*
387 * Set the m_data pointer of a newly-allocated mbuf (m_get/MGET) to place
388 * an object of the specified size at the end of the mbuf, longword aligned.
389 */
390 #define M_ALIGN(m, len) \
391 { \
392 OS_DbgPrint(OSK_MID_TRACE,("(M_ALIGN) %d @ %x\n", m, len)); \
393 (m)->m_data += (MLEN - (len)) &~ (sizeof(long) - 1); \
394 }
395 /*
396 * As above, for mbufs allocated with m_gethdr/MGETHDR
397 * or initialized by M_COPY_PKTHDR.
398 */
399 #define MH_ALIGN(m, len) \
400 { \
401 OS_DbgPrint(OSK_MID_TRACE,("(MH_ALIGN) %d @ %x\n", m, len)); \
402 (m)->m_data += (MHLEN - (len)) &~ (sizeof(long) - 1); \
403 }
404
405 /*
406 * Compute the amount of space available
407 * before the current start of data in an mbuf.
408 */
409 #ifdef OSKIT
410 /* Be bold and strong: why shouldn't that work??? */
411 #define M_LEADINGSPACE(m) \
412 ((m)->m_flags & M_EXT ? (m)->m_data - (m)->m_ext.ext_buf : \
413 (m)->m_flags & M_PKTHDR ? (m)->m_data - (m)->m_pktdat : \
414 (m)->m_data - (m)->m_dat)
415 #else
416 #define M_LEADINGSPACE(m) \
417 ((m)->m_flags & M_EXT ? /* (m)->m_data - (m)->m_ext.ext_buf */ 0 : \
418 (m)->m_flags & M_PKTHDR ? (m)->m_data - (m)->m_pktdat : \
419 (m)->m_data - (m)->m_dat)
420 #endif /* OSKIT */
421
422 /*
423 * Compute the amount of space available
424 * after the end of data in an mbuf.
425 */
426 #define M_TRAILINGSPACE(m) \
427 OS_DbgPrint(OSK_MID_TRACE,("(M_TRAILINGSPACE) %x\n", m)); \
428 ((m)->m_flags & M_EXT ? (m)->m_ext.ext_buf + (m)->m_ext.ext_size - \
429 ((m)->m_data + (m)->m_len) : \
430 &(m)->m_dat[MLEN] - ((m)->m_data + (m)->m_len))
431
432 /*
433 * Arrange to prepend space of size plen to mbuf m.
434 * If a new mbuf must be allocated, how specifies whether to wait.
435 * If how is M_DONTWAIT and allocation fails, the original mbuf chain
436 * is freed and m is set to NULL.
437 */
438 #define M_PREPEND(m, plen, how) { \
439 OS_DbgPrint(OSK_MID_TRACE,("(M_PREPEND) %d on %x\n", plen, m)); \
440 if (M_LEADINGSPACE(m) >= (plen)) { \
441 (m)->m_data -= (plen); \
442 (m)->m_len += (plen); \
443 } else \
444 (m) = m_prepend((m), (plen), (how)); \
445 if ((m) && (m)->m_flags & M_PKTHDR) \
446 (m)->m_pkthdr.len += (plen); \
447 }
448
449 /* change mbuf to new type */
450 #define MCHTYPE(m, t) { \
451 OS_DbgPrint(OSK_MID_TRACE,("(MCHTYPE) %x %x\n", m, t)); \
452 MBUFLOCK(mbstat.m_mtypes[(m)->m_type]--; mbstat.m_mtypes[t]++;) \
453 (m)->m_type = t;\
454 }
455
456 /* length to m_copy to copy all */
457 #define M_COPYALL 1000000000
458
459 /* compatiblity with 4.3 */
460 #define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
461
462 /*
463 * Mbuf statistics.
464 */
465 struct mbstat {
466 u_long m_mbufs; /* mbufs obtained from page pool */
467 u_long m_clusters; /* clusters obtained from page pool */
468 u_long m_spare; /* spare field */
469 u_long m_clfree; /* free clusters */
470 u_long m_drops; /* times failed to find space */
471 u_long m_wait; /* times waited for space */
472 u_long m_drain; /* times drained protocols for space */
473 u_short m_mtypes[256]; /* type specific mbuf allocations */
474 };
475
476 #ifdef KERNEL
477 #ifndef OSKIT
478 extern struct mbuf *mbutl; /* virtual address of mclusters */
479 extern char *mclrefcnt; /* cluster reference counts */
480 #endif /* !OSKIT */
481 struct mbstat mbstat;
482 #ifndef OSKIT
483 extern int nmbclusters;
484 union mcluster *mclfree;
485 #endif /* !OSKIT */
486 int max_linkhdr; /* largest link-level header */
487 int max_protohdr; /* largest protocol header */
488 int max_hdr; /* largest link+protocol header */
489 int max_datalen; /* MHLEN - max_hdr */
490 extern int mbtypes[]; /* XXX */
491
492 int m_clalloc __P((int, int));
493 void m_copyback __P((struct mbuf *, int, int, caddr_t));
494 struct mbuf *m_retry __P((int, int));
495 struct mbuf *m_retryhdr __P((int, int));
496 void m_reclaim __P((void));
497 struct mbuf *m_get __P((int, int));
498 struct mbuf *m_gethdr __P((int, int));
499 struct mbuf *m_getclr __P((int, int));
500 struct mbuf *m_free __P((struct mbuf *));
501 void m_freem __P((struct mbuf *));
502 struct mbuf *m_prepend __P((struct mbuf *,int,int));
503 struct mbuf *m_copym __P((struct mbuf *, int, int, int));
504 void m_copydata __P((struct mbuf *,int,int,caddr_t));
505 void m_cat __P((struct mbuf *,struct mbuf *));
506 void m_adj __P((struct mbuf *,int));
507 struct mbuf *m_pullup __P((struct mbuf *, int));
508 struct mbuf *m_split __P((struct mbuf *,int,int));
509 struct mbuf *m_devget __P((char *, int, int, struct ifnet *,
510 void (*copy)(struct mbuf *, caddr_t, u_int)));
511
512 #ifdef MBTYPES
513 int mbtypes[] = { /* XXX */
514 M_FREE, /* MT_FREE 0 should be on free list */
515 M_MBUF, /* MT_DATA 1 dynamic (data) allocation */
516 M_MBUF, /* MT_HEADER 2 packet header */
517 M_SOCKET, /* MT_SOCKET 3 socket structure */
518 M_PCB, /* MT_PCB 4 protocol control block */
519 M_RTABLE, /* MT_RTABLE 5 routing tables */
520 M_HTABLE, /* MT_HTABLE 6 IMP host tables */
521 0, /* MT_ATABLE 7 address resolution tables */
522 M_MBUF, /* MT_SONAME 8 socket name */
523 0, /* 9 */
524 M_SOOPTS, /* MT_SOOPTS 10 socket options */
525 M_FTABLE, /* MT_FTABLE 11 fragment reassembly header */
526 M_MBUF, /* MT_RIGHTS 12 access rights */
527 M_IFADDR, /* MT_IFADDR 13 interface address */
528 M_MBUF, /* MT_CONTROL 14 extra-data protocol message */
529 M_MBUF, /* MT_OOBDATA 15 expedited data */
530 #ifdef DATAKIT
531 25, 26, 27, 28, 29, 30, 31, 32 /* datakit ugliness */
532 #endif
533 };
534 #endif
535 #endif
536
537 #endif /* !_SYS_MBUF_H_ */