home *** CD-ROM | disk | FTP | other *** search
- /* Basic message buffer structure */
- struct mbuf {
- struct mbuf *next; /* Links mbufs belonging to single packets */
- struct mbuf *anext; /* Links packets on queues */
- int16 size; /* Size of associated data buffer */
- char *data; /* Active working pointers */
- int16 cnt;
- };
- #define NULLBUF (struct mbuf *)0
- #define NULLBUFP (struct mbuf **)0
-
- struct mbuf *alloc_mbuf(int16);
- struct mbuf *free_mbuf(struct mbuf *);
- struct mbuf *free_p(struct mbuf *);
- void free_q(struct mbuf **);
- int16 len_mbuf(struct mbuf *);
- int16 len_q(struct mbuf *);
- void trim_mbuf(struct mbuf **, int16);
- int16 dup_p(struct mbuf **, struct mbuf *, int16, int16);
- struct mbuf *copy_p(struct mbuf *, int16);
- int16 pullup(struct mbuf **, char *, int16);
- void append(struct mbuf **, struct mbuf *);
- struct mbuf *pushdown(struct mbuf *, int16);
- void enqueue(struct mbuf **, struct mbuf *);
- struct mbuf *dequeue(struct mbuf **);
- struct mbuf *qdata(char *, int16);
- int16 dqdata(struct mbuf *, char *, unsigned int);
- int32 pull32(struct mbuf **);
- int16 pull16(struct mbuf **);
- char pullchar(struct mbuf **);
-
-