diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-09-15 10:55:00 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-09-15 10:55:00 +0000 |
commit | 43985f9587646943ba4a959767965a408816239c (patch) | |
tree | afb1260c2c2827d7a8f7391f3186c6f5941f0007 /usr.sbin/snmpd/imsg.h | |
parent | 3fc21b44e9512152a48c83f4a8f0da37a597ce65 (diff) |
Enclose repeated buffer draining code in a new msgbuf_drain()
function, which is additionally exported for use by others.
It will be needed by smtpd's SSL module when the SMTP client code
is changed to replace libevent's evbuffers with our msgbuf_* API.
ok gilles@ henning@ guenther@ eric@
Diffstat (limited to 'usr.sbin/snmpd/imsg.h')
-rw-r--r-- | usr.sbin/snmpd/imsg.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/imsg.h b/usr.sbin/snmpd/imsg.h index 427e3e1468c..bd2bada5a3b 100644 --- a/usr.sbin/snmpd/imsg.h +++ b/usr.sbin/snmpd/imsg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.h,v 1.3 2009/06/07 05:56:25 eric Exp $ */ +/* $OpenBSD: imsg.h,v 1.4 2009/09/15 10:54:59 jacekm Exp $ */ /* * Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -90,6 +90,7 @@ void buf_free(struct buf *); void msgbuf_init(struct msgbuf *); void msgbuf_clear(struct msgbuf *); int msgbuf_write(struct msgbuf *); +void msgbuf_drain(struct msgbuf *, size_t); /* imsg.c */ void imsg_init(struct imsgbuf *, int); |