2 * Netgrind -- Packet Buffers
4 * (c) 2003 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU General Public License.
11 #include "netgrind/pkt.h"
15 struct pkt *pkt_new(uns preroom, uns postroom)
17 uns len = preroom + postroom;
18 struct pkt *p = xmalloc(sizeof(struct pkt) + len);
19 p->stop = p->data = p->buf + preroom;
20 p->ebuf = p->buf + len;
24 void pkt_free(struct pkt *p)
29 void pkt_flush_queue(list *l)
32 while (p = list_head(l))