summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_sbuf.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-10-04 09:58:17 +0000
committerphk <phk@FreeBSD.org>2002-10-04 09:58:17 +0000
commitae4fc4e63ee57d562ca2d8a1983a0ca4720ab436 (patch)
tree769a78b7fdf83c2fefa71b0a4bfd162f398a203c /sys/kern/subr_sbuf.c
parent3bf276fb33027a974490c4c9f1a20b2a406efc3a (diff)
downloadFreeBSD-src-ae4fc4e63ee57d562ca2d8a1983a0ca4720ab436.zip
FreeBSD-src-ae4fc4e63ee57d562ca2d8a1983a0ca4720ab436.tar.gz
Add the new function "sbuf_done()" which returns non-zero if the sbuf is
finished. This allows sbufs to be used for request/response scenarioes without needing additional communication flags. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/kern/subr_sbuf.c')
-rw-r--r--sys/kern/subr_sbuf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c
index 5892d89..9e63e8e 100644
--- a/sys/kern/subr_sbuf.c
+++ b/sys/kern/subr_sbuf.c
@@ -558,3 +558,13 @@ sbuf_delete(struct sbuf *s)
if (isdyn)
SBFREE(s);
}
+
+/*
+ * Check if an sbuf has been finished.
+ */
+int
+sbuf_done(struct sbuf *s)
+{
+
+ return(SBUF_ISFINISHED(s));
+}
OpenPOWER on IntegriCloud