00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _SBUF_H_
00009 #define _SBUF_H_
00010
00011 #define sbflush(sb) sbdrop((sb),(sb)->sb_cc)
00012 #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc)
00013
00014 struct sbuf {
00015 u_int sb_cc;
00016 u_int sb_datalen;
00017 char *sb_wptr;
00018
00019 char *sb_rptr;
00020
00021 char *sb_data;
00022 };
00023
00024 void sbfree _P((struct sbuf *));
00025 void sbdrop _P((struct sbuf *, int));
00026 void sbreserve _P((struct sbuf *, int));
00027 void sbappend _P((struct socket *, struct mbuf *));
00028 void sbcopy _P((struct sbuf *, int, int, char *));
00029
00030 #endif