Tor  0.4.4.0-alpha-dev
buf Directory Reference

lib/buf: An efficient byte queue.

More...

Files

file  buffers.c [code]
 Implements a generic buffer interface.
 
file  buffers.h [code]
 Header file for buffers.c.
 

Detailed Description

lib/buf: An efficient byte queue.

This module defines the buf_t type, which is used throughout our networking code. The implementation is a singly-linked queue of buffer chunks, similar to the BSD kernel's "mbuf" structure.

The buf_t type is also reasonable for use in constructing long strings.

See lib/net for networking code that uses buf_t, and lib/tls for cryptographic code that uses buf_t.