|
Data Structures |
struct | query_hash |
struct | query_hashvec |
struct | qrt_info |
Defines |
#define | QRP_MIN_WORD_LENGTH 3 /**< Minimal word length */ |
| Minimal word length.
|
#define | qhvec_has_urn(x) ((x)->has_urn) |
Typedefs |
typedef query_hashvec | query_hashvec_t |
typedef qrt_info | qrt_info_t |
typedef void(* | qrp_callback_t )(gpointer arg, gboolean cancelled) |
Enumerations |
enum | query_hsrc { QUERY_H_WORD = 0,
QUERY_H_URN
} |
Functions |
void | qrp_init (char_map_t map) |
| Initialize QRP.
|
void | qrp_close (void) |
| Called at servent shutdown to reclaim all the memory.
|
void | qrp_leaf_changed (void) |
| Called when we get a new QRT from a leaf node, or when we loose a leaf that sent us its QRT.
|
void | qrp_peermode_changed (void) |
| Called when the current peermode has changed.
|
void | qrp_prepare_computation (void) |
| This routine must be called to initialize the computation of the new QRP based on our local files.
|
void | qrp_add_file (struct shared_file *sf) |
| Add shared file to our QRP.
|
void | qrp_finalize_computation (void) |
| This routine must be called once all the files have been added to finalize the computation of the new QRP.
|
gpointer | qrt_update_create (struct gnutella_node *n, gpointer query_table) |
| Create structure keeping track of the table update.
|
void | qrt_update_free (gpointer handle) |
| Free query routing update tracker.
|
gboolean | qrt_update_send_next (gpointer handle) |
| Send the next batch of data.
|
gboolean | qrt_update_was_ok (gpointer handle) |
| Check whether sending was successful.
|
gpointer | qrt_receive_create (struct gnutella_node *n, gpointer query_table) |
| Create a new QRT receiving handler, to process all incoming QRP messages from the leaf node.
|
void | qrt_receive_free (gpointer handle) |
| Dispose of the QRP receiving state.
|
gboolean | qrt_receive_next (gpointer handle, gboolean *done) |
| Handle reception of the next QRP message in the stream for a given update.
|
gpointer | qrt_get_table (void) |
gpointer | qrt_ref (gpointer obj) |
| Get a new reference on the query routing table.
|
void | qrt_unref (gpointer obj) |
| Remove one reference to query routing table.
|
void | qrt_get_info (gpointer obj, qrt_info_t *qi) |
query_hashvec * | qhvec_alloc (gint size) |
| Allocate a query hash container for at most `size' entries.
|
void | qhvec_free (struct query_hashvec *qhvec) |
void | qhvec_reset (struct query_hashvec *qhvec) |
query_hashvec_t * | qhvec_clone (const query_hashvec_t *qsrc) |
| Clone query hash vector.
|
void | qhvec_add (struct query_hashvec *qhvec, const gchar *word, enum query_hsrc src) |
GSList * | qrt_build_query_target (query_hashvec_t *qhvec, gint hops, gint ttl, struct gnutella_node *source) |
| Compute list of nodes to send the query to, based on node's QRT.
|
void | qrt_route_query (struct gnutella_node *n, query_hashvec_t *qhvec) |
| Route query message to leaf nodes, based on their QRT, or to ultrapeers that support last-hop QRP if TTL=1.
|
gboolean | qrp_node_can_route (struct gnutella_node *n, query_hashvec_t *qhv) |