A buffer is created using the
.B buf_init
function. You must pass it the buffer base address and size, and a
-pointer to a
+pointer to a
.B buf
structure to fill in. It doesn't allocate any memory, so you don't need
to dispose of the
.TP
.B BLEN
The length of data in the buffer (if writing) or the amount of data
-read (if reading); i.e.,
+read (if reading); i.e.,
.I current
\-
.IR base .
.B buf_flip
takes a buffer which has been used for writing, and makes it suitable
for reading. This turns out to be useful when building packets in
-multi-layered networking software. Its precise behaviour is to preserve
+multi-layered networking software. Its precise behaviour is to preserve
.IR base ,
to set
.I limit
to
.IR current ,
-and to set
+and to set
.I current
to
.IR base .
.I current
pointer by
.I sz
-and returns the
+and returns the
.I original
(pre-stepping)
.I current
.PP
The
.B buf_put
-function writes
+function writes
.I sz
bytes of data starting at
.I p