#include <glib.h>
Go to the source code of this file.
Data Structures | |
struct | route_dest |
Routing destination, as determined by route_message(). More... | |
Enumerations | |
enum | route_type_t { ROUTE_NONE = 0, ROUTE_ONE, ROUTE_ALL_BUT_ONE, ROUTE_MULTI, ROUTE_NO_DUPS_BUT_ONE } |
Route destination types. More... | |
Functions | |
void | routing_init (void) |
Init function. | |
void | routing_close (void) |
Destroy routing data structures. | |
void | message_set_muid (struct gnutella_header *header, guint8 function) |
Generate a new muid and put it in a message header. | |
gboolean | route_message (struct gnutella_node **, struct route_dest *) |
Main route computation function. | |
void | routing_node_remove (struct gnutella_node *) |
Erase a node from the routing tables. | |
void | message_add (const gchar *, guint8, struct gnutella_node *) |
Adds a new message in the routing tables. | |
GSList * | route_towards_guid (const gchar *guid) |
Check whether we have a route to the given GUID, in order to send pushes. | |
gboolean | route_exists_for_reply (const gchar *muid, guint8 function) |
Check whether we have a route for the reply that would be generated for this request. | |
gboolean | route_proxy_add (gchar *guid, struct gnutella_node *n) |
Add push-proxy route to GUID `guid', which is node `n'. | |
void | route_proxy_remove (gchar *guid) |
Remove push-proxy entry indexed by GUID. | |
gnutella_node * | route_proxy_find (gchar *guid) |
Find node to which we are connected with supplied GUID and who requested that we act as its push-proxy. |
|
Route destination types.
|
|
Adds a new message in the routing tables.
|
|
Generate a new muid and put it in a message header.
|
|
Check whether we have a route for the reply that would be generated for this request.
|
|
Main route computation function. Source of message is passed by reference as `node', because it can be nullified when the node is disconnected from. The destination of the message is computed in `dest', but the message is not physically sent. The gmsg_sendto_route() will have to be called for that.
|
|
Add push-proxy route to GUID `guid', which is node `n'.
|
|
Find node to which we are connected with supplied GUID and who requested that we act as its push-proxy.
|
|
Remove push-proxy entry indexed by GUID.
|
|
Check whether we have a route to the given GUID, in order to send pushes.
|
|
Destroy routing data structures.
|
|
Init function.
|
|
Erase a node from the routing tables.
|