#include "common.h"
#include "pmsg.h"
#include "hosts.h"
#include "rx.h"
#include "rx_chunk.h"
#include "rxbuf.h"
#include "if/gnet_property_priv.h"
#include "lib/misc.h"
#include "lib/walloc.h"
#include "lib/override.h"
Data Structures | |
struct | attr |
Private attributes for the decompressing layer. More... | |
Defines | |
#define | IF_ENABLED 0x00000001 /**< Reception enabled */ |
Reception enabled. | |
#define | IF_NO_CRLF 0x00000002 /**< Set when missing CRLF after data */ |
Set when missing CRLF after data. | |
Enumerations | |
enum | chunk_state { CHUNK_STATE_ERROR = 0, CHUNK_STATE_SIZE, CHUNK_STATE_EXT, CHUNK_STATE_DATA, CHUNK_STATE_DATA_CRLF, CHUNK_STATE_TRAILER_START, CHUNK_STATE_TRAILER, CHUNK_STATE_END, NUM_CHUNK_STATES } |
Functions | |
RCSID ("$Id:rx_chunk.c, v 1.17 2005/12/17 09:25:44 daichik Exp $") | |
size_t | parse_chunk (rxdrv_t *rx, const gchar *src, size_t size, const gchar **p_error_str) |
Decodes "chunked" data. | |
pmsg_t * | dechunk_data (rxdrv_t *rx, pmsg_t *mb) |
Dechunk more data from the input buffer `mb'. | |
gpointer | rx_chunk_init (rxdrv_t *rx, gconstpointer args) |
Initialize the driver. | |
void | rx_chunk_destroy (rxdrv_t *rx) |
Get rid of the driver's private data. | |
void | rx_chunk_recv (rxdrv_t *rx, pmsg_t *mb) |
Got data from lower layer. | |
void | rx_chunk_enable (rxdrv_t *rx) |
Enable reception of data. | |
void | rx_chunk_disable (rxdrv_t *rx) |
Disable reception of data. | |
const struct rxdrv_ops * | rx_chunk_get_ops (void) |
Variables | |
const struct rxdrv_ops | rx_chunk_ops |
|
Reception enabled.
|
|
Set when missing CRLF after data.
|
|
|
|
Dechunk more data from the input buffer `mb'.
|
|
Decodes "chunked" data. The function returns as soon as it needs more data to proceed, on error, if the state CHUNK_STATE_END was reached, or if the state CHUNK_STATE_DATA was reached. In the latter case the chunk payload itself must be consumed and this function must not be called again until the state CHUNK_STATE_DATA_CRLF is reached.
|
|
|
|
Get rid of the driver's private data.
|
|
Disable reception of data.
|
|
Enable reception of data.
|
|
|
|
Initialize the driver.
|
|
Got data from lower layer.
|
|
Initial value: { rx_chunk_init, rx_chunk_destroy, rx_chunk_recv, rx_chunk_enable, rx_chunk_disable, rx_no_source, } |