#include "common.h"
#include "oob_proxy.h"
#include "share.h"
#include "nodes.h"
#include "routing.h"
#include "settings.h"
#include "dq.h"
#include "dh.h"
#include "gnet_stats.h"
#include "vmsg.h"
#include "if/gnet_property_priv.h"
#include "lib/atoms.h"
#include "lib/cq.h"
#include "lib/endian.h"
#include "lib/walloc.h"
#include "lib/override.h"
Data Structures | |
struct | oob_proxy_rec |
Record keeping track of the MUID remappings happening for the proxied OOB queries. More... | |
Defines | |
#define | PROXY_EXPIRE_MS (10*60*1000) /**< 10 minutes at most */ |
10 minutes at most | |
Functions | |
RCSID ("$Id:oob_proxy.c, v 1.18 2005/08/27 14:54:27 rmanfredi Exp $") | |
oob_proxy_rec * | oob_proxy_rec_make (const gchar *leaf_muid, const gchar *proxied_muid, guint32 node_id) |
Allocate new OOB proxy record to keep track of the MUID remapping. | |
void | oob_proxy_rec_free (struct oob_proxy_rec *opr) |
Release the OOB proxy record. | |
void | oob_proxy_rec_free_remove (struct oob_proxy_rec *opr) |
Dispose of the OOB proxy record, removing entry from the `proxied_queries' table. | |
void | oob_proxy_rec_destroy (cqueue_t *unused_cq, gpointer obj) |
Callout queue callback to free OOB proxy record. | |
void | oob_proxy_create (gnutella_node_t *n) |
Create a new OOB-proxied query. | |
gboolean | oob_proxy_pending_results (gnutella_node_t *n, gchar *muid, gint hits, gboolean uu_udp_firewalled) |
Received out-of-band indication of results for search identified by its MUID, on remote node `n'. | |
gboolean | oob_proxy_got_results (gnutella_node_t *n, guint results) |
Called when we parsed successfully a query hit packet. | |
gboolean | oob_proxy_muid_proxied (gchar *muid) |
Check whether MUID is for an OOB-proxied query. | |
void | oob_proxy_init (void) |
Initialize proxied out-of-band queries. | |
void | free_oob_proxy_kv (gpointer uu_key, gpointer value, gpointer uu_udata) |
Cleanup servent -- hash table iterator callback. | |
void | oob_proxy_close (void) |
Cleanup at shutdown time. | |
Variables | |
GHashTable * | proxied_queries = NULL |
Table recording the proxied OOB query MUID. |
|
10 minutes at most
|
|
Cleanup servent -- hash table iterator callback.
|
|
Cleanup at shutdown time.
|
|
Create a new OOB-proxied query.
|
|
Called when we parsed successfully a query hit packet. Look whether the MUID of hit is actually the one of an OOB-proxied query. If it is, then route the hit directly to the leaf.
|
|
Initialize proxied out-of-band queries.
|
|
Check whether MUID is for an OOB-proxied query.
|
|
Received out-of-band indication of results for search identified by its MUID, on remote node `n'. If the dynamic query is still alive, look whether it needs results still, and claim the pending results if necessary.
|
|
Callout queue callback to free OOB proxy record.
|
|
Release the OOB proxy record.
|
|
Dispose of the OOB proxy record, removing entry from the `proxied_queries' table.
|
|
Allocate new OOB proxy record to keep track of the MUID remapping.
|
|
|
|
Table recording the proxied OOB query MUID.
|