.I pk
to a packet buffer structure; a pointer
.I p
- to a chunk of data to read; and the size
+to a chunk of data to read; and the size
.I sz
of the chunk of data. The data is pushed through the packet buffer and
any complete packets are passed on to the packet handler.
The
.B pkbuf_snarf
function is trivially implemented in terms of the more complex
-.B pkbuf_free / pkbuf_flush
+.BR pkbuf_free / pkbuf_flush
interface.
.SS "Packet breaking and the handler function"
The function
.PP
Clearly, since an
.B pkbuf_flush
-call can emit more than one packet, so it must be aware that the packet
+call can emit more than one packet, it must be aware that the packet
handler isn't interested in any more packet. However, this fact must
also be signalled to the higher-level object so that it can detach
itself from its data source.
.PP
Rather than invent some complex interface for this, the packet buffer
-exports one of its structure members,
-.BR flags .
+exports one of its structure members, a flags words called
+.BR f .
A higher-level object wishing to disable the packet buffer simply clears
the bit
.B PKBUF_ENABLE
-in the flags word.
+in this flags word.
.PP
Disabling a buffer causes an immediate return from
.BR pkbuf_flush .
.BR selpk (3),
.BR mLib (3).
.SH "AUTHOR"
-Mark Wooding, <mdw@nsict.org>
+Mark Wooding, <mdw@distorted.org.uk>