|
Data Structures |
struct | uhc_context |
| Request context, used when we decide to get hosts via the UDP host caches. More...
|
struct | used_uhc |
Defines |
#define | UHC_MAX_ATTEMPTS 3 /**< Maximum connection / resolution attempts */ |
| Maximum connection / resolution attempts.
|
#define | UHC_TIMEOUT 20 /**< Host cache timeout, in seconds */ |
| Host cache timeout, in seconds.
|
#define | UHC_RETRY_AFTER 3600 /**< Frequency of contacts for an UHC (secs) */ |
| Frequency of contacts for an UHC (secs).
|
Functions |
| RCSID ("$Id:uhc.c, v 1.43 2006/02/10 00:00:22 cbiere Exp $") |
void | uhc_host_resolved (const host_addr_t *addr, gpointer uu_udata) |
| Callback for adns_resolve(), invoked when the resolution is complete.
|
gboolean | uhc_get_host_port (const gchar *hp, const gchar **host, guint16 *port) |
| Parse hostname:port and return the hostname and port parts.
|
void | add_available_uhc (const gchar *hc) |
gboolean | uhc_pick (void) |
| Pick host at random among the host array.
|
gboolean | uhc_guid_free (gpointer key, gpointer uu_data, gpointer uu_user) |
| Free GUID atoms held in hash table.
|
void | uhc_guid_reset (void) |
| Reset the list of ping GUIDs.
|
void | uhc_try_random (void) |
| Try a random host cache.
|
void | uhc_ping_timeout (cqueue_t *unused_cq, gpointer unused_obj) |
| Callout queue callback, invoked when the ping was sent and we did not get a reply within the specified timeout.
|
void | uhc_send_ping (const host_addr_t addr, guint16 port) |
| Send an UDP ping to the host cache.
|
gboolean | uhc_is_waiting (void) |
| Check whether we're waiting for some UDP host cache pongs.
|
void | uhc_get_hosts (void) |
| Get more hosts to connect to from UDP host caches, asynchronously.
|
void | uhc_ipp_extract (gnutella_node_t *n, const gchar *payload, gint paylen) |
| Called when a pong with an "IPP" extension was received.
|
void | uhc_init (void) |
| Initializations.
|
void | uhc_close (void) |
| Cleanup during process termination.
|
Variables |
uhc_context | uhc_ctx |
| Request context, used when we decide to get hosts via the UDP host caches.
|
GList * | uhc_avail = NULL |
| List of UHCs as string.
|
GList * | uhc_used = NULL |
| List of used UHCs as ``struct used_uhc''.
|
struct { |
const gchar * uhc |
} | boot_hosts [] |
| The following hosts are there for bootstrapping purposes only.
|
gboolean | uhc_connecting = FALSE |