Addition of the service, server, serv_protocol and session structure needed to tie the elements together.

Improvements to the protocol module support

Documentation improvements

Addition of make install target
This commit is contained in:
Mark Riddoch
2013-06-18 16:59:01 +02:00
parent 4d5215e267
commit ec688e6222
26 changed files with 1255 additions and 93 deletions

View File

@ -39,6 +39,15 @@
*
* @endverbatim
*/
/**
* The buffer structure used by the descriptor control blocks.
*
* Linked lists of buffers are created as data is read from a descriptor
* or written to a descriptor. The use of linked lists of buffers with
* flexible data pointers is designed to minimise the need for data to
* be copied within the gateway.
*/
typedef struct gwbuf {
struct gwbuf *next; /**< Next buffer in a linked chain of buffers */
void *start; /**< Start of the valid data */
@ -49,10 +58,18 @@ typedef struct gwbuf {
/*
* Macros to access the data in the buffers
*/
#define GWBUF_DATA(b) ((b)->start)
#define GWBUF_LENGTH(b) ((b)->end - (b)->start)
#define GWBUF_EMPTY(b) ((b)->start == (b)->end)
#define GWBUF_CONSUME(b, bytes) (b)->start += bytes
#define GWBUF_DATA(b) ((b)->start) /**< First valid, uncomsumed
* byte in the buffer
*/
#define GWBUF_LENGTH(b) ((b)->end - (b)->start) /**< Number of bytes in the
* individual buffer
*/
#define GWBUF_EMPTY(b) ((b)->start == (b)->end) /**< True if all bytes in the
* buffer have been consumed
*/
#define GWBUF_CONSUME(b, bytes) (b)->start += bytes /**< Consume a number of bytes
* in the buffer
*/
/*
* Function prototypes for the API to maniplate the buffers