#include "common.h"
#include "ggep.h"
#include "ggep_type.h"
#include "hosts.h"
#include "lib/endian.h"
#include "lib/misc.h"
#include "lib/walloc.h"
#include "if/core/hosts.h"
#include "lib/override.h"
Defines | |
#define | TIGER_RAW_SIZE 24 /**< XXX temporary, until we implement tiger */ |
Functions | |
RCSID ("$Id:ggep_type.c, v 1.19 2005/09/10 08:17:28 daichik Exp $") | |
ggept_status_t | ggept_h_sha1_extract (extvec_t *exv, gchar *buf, gint len) |
Extract the SHA1 hash of the "H" extension into the supplied buffer. | |
ggept_status_t | ggept_gtkgv1_extract (extvec_t *exv, struct ggep_gtkgv1 *info) |
Extract payload information from "GTKGV1" into `info'. | |
ggept_status_t | ggept_ip_vec_extract (extvec_t *exv, struct gnutella_host **hvec, gint *hvcnt) |
ggept_status_t | ggept_alt_extract (extvec_t *exv, struct gnutella_host **hvec, gint *hvcnt) |
Extract vector of IP:port alternate locations. | |
ggept_status_t | ggept_push_extract (extvec_t *exv, struct gnutella_host **hvec, gint *hvcnt) |
Extract vector of IP:port push proxy locations. | |
ggept_status_t | ggept_hname_extract (extvec_t *exv, gchar *buf, gint len) |
Extract hostname of the "HNAME" extension into the supplied buffer. | |
ggept_status_t | ggept_lf_extract (extvec_t *exv, guint64 *filesize) |
Extract filesize length into `filesize' from GGEP "LF" extension. | |
ggept_status_t | ggept_gtkg_ipv6_extract (extvec_t *exv, host_addr_t *addr) |
Extract IPv6 address into `addr' from GGEP "GTKG.IPV6" extension. | |
gint | ggep_vlint_encode (guint64 v, gchar *data) |
Encodes a variable-length integer. | |
gint | ggept_lf_encode (guint64 filesize, gchar *data) |
Encode `filesize' for the GGEP "LF" extension into `data'. | |
ggept_status_t | ggept_du_extract (extvec_t *exv, guint32 *uptime) |
Extract daily uptime into `uptime', from the GGEP "DU" extensions. | |
gint | ggept_du_encode (guint32 uptime, gchar *data) |
Encode `uptime' for the GGEP "DU" extension into `data'. |
|
|
|
Encodes a variable-length integer. This encoding is equivalent to little-endian encoding whereas trailing zeros are discarded.
|
|
Extract vector of IP:port alternate locations.
|
|
Encode `uptime' for the GGEP "DU" extension into `data'.
|
|
Extract daily uptime into `uptime', from the GGEP "DU" extensions.
|
|
Extract IPv6 address into `addr' from GGEP "GTKG.IPV6" extension. A zero length indicates IPv6 support, a length of 16 or more indicates that the first 16 bytes are a IPv6 address. |
|
Extract payload information from "GTKGV1" into `info'.
|
|
Extract the SHA1 hash of the "H" extension into the supplied buffer.
< XXX temporary, until we implement tiger |
|
Extract hostname of the "HNAME" extension into the supplied buffer.
|
|
|
|
Encode `filesize' for the GGEP "LF" extension into `data'.
|
|
Extract filesize length into `filesize' from GGEP "LF" extension.
|
|
Extract vector of IP:port push proxy locations. The `hvec' pointer is filled with a dynamically allocated vector, and the `hvcnt' is filled with the size of the allocated vector (number of items). Unless GGEP_OK is returned, no memory allocation takes place. |
|
|