diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-03-13 04:40:56 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-03-13 04:40:56 +0000 |
commit | 88a72df5338a3395ef02c2ea6486acb2a0887bc0 (patch) | |
tree | 767bb5dff43487b9f0af4421e72479808644af91 /usr.sbin/bgpd/bgpd.h | |
parent | 0a4daf9300abe4cb8f4e7e1cccaac1d2e4a22e98 (diff) |
Sync buffer API with the one from ospfd. The dynamic buffers will make other
code much easier to write. OK henning@ some time ago.
Diffstat (limited to 'usr.sbin/bgpd/bgpd.h')
-rw-r--r-- | usr.sbin/bgpd/bgpd.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index fe7b77287b4..5764610296c 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.223 2008/12/12 23:15:12 claudio Exp $ */ +/* $OpenBSD: bgpd.h,v 1.224 2009/03/13 04:40:55 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -109,6 +109,7 @@ struct buf { TAILQ_ENTRY(buf) entry; u_char *buf; size_t size; + size_t max; size_t wpos; size_t rpos; int fd; @@ -734,9 +735,12 @@ int bgpd_filternexthop(struct kroute *, struct kroute6 *); /* buffer.c */ struct buf *buf_open(size_t); -struct buf *buf_grow(struct buf *, size_t); +struct buf *buf_dynamic(size_t, size_t); int buf_add(struct buf *, const void *, size_t); void *buf_reserve(struct buf *, size_t); +void *buf_seek(struct buf *, size_t, size_t); +size_t buf_size(struct buf *); +size_t buf_left(struct buf *); int buf_close(struct msgbuf *, struct buf *); int buf_write(int, struct buf *); void buf_free(struct buf *); |