|
Data Structures |
| struct | oob_results |
| | A set of hits awaiting delivery. More...
|
| struct | gservent |
| | A servent entry, used as values in the `servent_by_host' table. More...
|
Defines |
| #define | OOB_EXPIRE_MS (2*60*1000) |
| | 2 minutes at most
|
| #define | OOB_TIMEOUT_MS (45*1000) |
| | 45 secs for them to reply
|
| #define | OOB_DELIVER_BASE_MS 2500 |
| | 1 msg queued every 2.5 secs
|
| #define | OOB_DELIVER_RAND_MS 5000 |
| | ..
|
| #define | OOB_MAX_QUEUED 50 |
| | Max # of messages per host.
|
| #define | OOB_MAX_RETRY 3 |
| | Retry # if LIME/12v2 dropped.
|
| #define | OOB_MAX_QHIT_SIZE 645 |
| | Flush hits larger than this.
|
| #define | OOB_MAX_DQHIT_SIZE 1075 |
| | Flush limit for deflated hits.
|
Enumerations |
| enum | oob_results_magic_t { OOB_RESULTS_MAGIC = 0x7ae5e685
} |
Functions |
| void | results_destroy (cqueue_t *cq, gpointer obj) |
| | Callout queue callback to free the results.
|
| void | servent_free (struct gservent *s) |
| | Free servent structure.
|
| void | oob_send_reply_ind (struct oob_results *r) |
| | Send them a LIME/12v2, monitoring progress in queue via a callback.
|
| void | oob_results_check (const struct oob_results *r) |
| oob_results * | results_make (const gchar *muid, GSList *files, gint count, gnet_host_t *to, gboolean secure, gboolean ggep_h) |
| | Create new "struct oob_results" to handle the initial negotiation of results delivery via the sent LIME/12v2 and the expected LIME/11v2 reply.
|
| void | results_free_remove (struct oob_results *r) |
| | Dispose of results.
|
| void | results_timeout (cqueue_t *unused_cq, gpointer obj) |
| | Callout queue callback to free the results.
|
| void | servent_free_remove (struct gservent *s) |
| | Dispose of servent, removing entry from the `servent_by_host' table.
|
| gint | deliver_delay (void) |
| | Computes the amount of milliseconds before the next OOB hit delivery,.
|
| void | servent_service (cqueue_t *cq, gpointer obj) |
| | Service servent's FIFO: send next packet, and re-arm servicing callback if there are more data to send.
|
| gservent * | servent_make (gnet_host_t *host, gboolean can_deflate) |
| | Create a new servent structure.
|
| void | free_pmsg (gpointer item, gpointer unused_udata) |
| | Cleanup items from FIFO.
|
| void | oob_record_hit (gpointer data, size_t len, gpointer udata) |
| | Invoked via qhit_build_results() for each fully built query hit message.
|
| void | oob_deliver_hits (struct gnutella_node *n, const gchar *muid, guint8 wanted, const struct array *token) |
| | The remote host acknowledges that we have some hits for it and wishes to get the specified amount.
|
| void | oob_pmsg_free (pmsg_t *mb, gpointer arg) |
| | Callback invoked when the LIME/12v2 message we queued is freed.
|
| void | oob_got_results (struct gnutella_node *n, GSList *files, gint count, gboolean secure, gboolean ggep_h) |
| | Notification that we got matches for a query from some node that needs to be replied to using out-of-band delivery.
|
| void | oob_init (void) |
| | Initialize out-of-band query hit delivery.
|
| void | free_oob_kv (gpointer key, gpointer value, gpointer unused_udata) |
| | Cleanup oob_results -- hash table iterator callback.
|
| void | free_servent_kv (gpointer key, gpointer value, gpointer unused_udata) |
| | Cleanup servent -- hash table iterator callback.
|
| void | oob_shutdown (void) |
| | Cleanup at shutdown time.
|
| void | oob_close (void) |
| | Final cleanup.
|
Variables |
| GHashTable * | results_by_muid = NULL |
| | Indexes all OOB queries by MUID.
|
| GHashTable * | servent_by_host = NULL |
| | Each servent, as identified by its IP:port, is given a FIFO for queuing messages and sending them at a rate of 1 message every OOB_DELIVER_MS, to avoid UDP flooding on the remote side.
|
| gint | num_oob_records |
| | Leak and duplicate free detector.
|
| gboolean | oob_shutdown_running |