#include "common.h"
#include "ggep.h"
#include "extensions.h"
#include "lib/cobs.h"
#include "lib/misc.h"
#include "lib/walloc.h"
#include "lib/zlib_util.h"
#include "if/gnet_property_priv.h"
#include "lib/override.h"
Functions | |
RCSID ("$Id:ggep.c, v 1.22 2005/09/10 08:17:28 daichik Exp $") | |
gboolean | ggep_stream_is_valid (ggep_stream_t *gs) |
Check whether a GGEP stream descriptor is valid. | |
void | ggep_stream_init (ggep_stream_t *gs, gpointer data, size_t len) |
Initialize a GGEP stream object, capable of receiving multiple GGEP extensions, written into the supplied buffer. | |
size_t | ggep_stream_avail (ggep_stream_t *gs) |
void | ggep_stream_cleanup (ggep_stream_t *gs) |
Called when there is an error during the writing of the payload. | |
gboolean | ggep_stream_appendc (ggep_stream_t *gs, gchar c) |
Append char to the GGEP stream. | |
gboolean | ggep_stream_append (ggep_stream_t *gs, gconstpointer data, size_t len) |
Append data to the GGEP stream. | |
gboolean | ggep_stream_begin (ggep_stream_t *gs, const gchar *id, guint32 wflags) |
Begin emission of GGEP extension. | |
gboolean | ggep_stream_writev (ggep_stream_t *gs, const struct iovec *iov, gint iovcnt) |
The vectorized version of ggep_stream_write(). | |
gboolean | ggep_stream_write (ggep_stream_t *gs, gconstpointer data, size_t len) |
Write data into the payload of the extension begun with ggep_stream_begin(). | |
gboolean | ggep_stream_end (ggep_stream_t *gs) |
End the extension begun with ggep_stream_begin(). | |
size_t | ggep_stream_close (ggep_stream_t *gs) |
We're done with the stream, close it. | |
gboolean | ggep_stream_packv (ggep_stream_t *gs, const gchar *id, const struct iovec *iov, gint iovcnt, guint32 wflags) |
The vectorized version of ggep_stream_pack(). | |
gboolean | ggep_stream_pack (ggep_stream_t *gs, const gchar *id, gconstpointer payload, size_t plen, guint32 wflags) |
Pack extension data in initialized stream. |
|
Append data to the GGEP stream.
|
|
Append char to the GGEP stream.
|
|
|
|
Begin emission of GGEP extension.
|
|
Called when there is an error during the writing of the payload. Restore the stream to the state it had before we began. |
|
We're done with the stream, close it.
|
|
End the extension begun with ggep_stream_begin().
|
|
Initialize a GGEP stream object, capable of receiving multiple GGEP extensions, written into the supplied buffer.
|
|
Check whether a GGEP stream descriptor is valid.
|
|
Pack extension data in initialized stream. The extension's name is `id' and its payload is represented by `plen' bytes starting at `payload'. If `GGEP_W_COBS' is set, COBS encoding is attempted if there is a NUL byte within the payload. If `GGEP_W_DEFLATE' is set, we attempt to deflate the payload. If the output is larger than the initial size, we emit the original payload instead.
|
|
The vectorized version of ggep_stream_pack().
|
|
Write data into the payload of the extension begun with ggep_stream_begin().
|
|
The vectorized version of ggep_stream_write().
|
|
|