|
Defines |
#define | gmsg_function(p) (((struct gnutella_header *) p)->function) |
#define | gmsg_hops(p) (((struct gnutella_header *) p)->hops) |
Functions |
void | gmsg_init (void) |
| Initialization of the Gnutella message structures.
|
const gchar * | gmsg_name (guint function) |
| Convert message function number into name.
|
pmsg_t * | gmsg_to_pmsg (gconstpointer msg, guint32 size) |
| Construct regular PDU descriptor from message.
|
pmsg_t * | gmsg_to_ctrl_pmsg (gconstpointer msg, guint32 size) |
| Construct control PDU descriptor from message.
|
pmsg_t * | gmsg_to_ctrl_pmsg_extend (gconstpointer msg, guint32 size, pmsg_free_t free_cb, gpointer arg) |
| Construct extended control PDU (with free routine) from message.
|
pmsg_t * | gmsg_split_to_pmsg (gconstpointer head, gconstpointer data, guint32 size) |
| Construct PDU from header and data.
|
pmsg_t * | gmsg_split_to_pmsg_extend (gconstpointer head, gconstpointer data, guint32 size, pmsg_free_t free_cb, gpointer arg) |
| Construct extended PDU (with free routine) from header and data.
|
void | gmsg_mb_sendto_all (const GSList *sl, pmsg_t *mb) |
| Broadcast message to all nodes in the list.
|
void | gmsg_mb_sendto_one (struct gnutella_node *n, pmsg_t *mb) |
| Send message to one node.
|
void | gmsg_sendto_one (struct gnutella_node *n, gconstpointer msg, guint32 size) |
| Send message to one node.
|
void | gmsg_ctrl_sendto_one (struct gnutella_node *n, gconstpointer msg, guint32 size) |
| Send control message to one node.
|
void | gmsg_split_sendto_one (struct gnutella_node *n, gconstpointer head, gconstpointer data, guint32 size) |
| Send message consisting of header and data to one node.
|
void | gmsg_sendto_all (const GSList *l, gconstpointer msg, guint32 size) |
| Broadcast message to all nodes in the list.
|
void | gmsg_split_sendto_all (const GSList *l, gconstpointer head, gconstpointer data, guint32 size) |
| Send message consisting of header and data to all the nodes in the list.
|
void | gmsg_split_sendto_all_but_one (const GSList *sl, const struct gnutella_node *n, gconstpointer head, gconstpointer data, guint32 size) |
| Send message consisting of header and data to all nodes in the list but one node.
|
void | gmsg_sendto_route (struct gnutella_node *n, struct route_dest *rt) |
| Send message held in current node according to route specification.
|
gboolean | gmsg_can_drop (gconstpointer pdu, gint size) |
| Test whether the Gnutella message can be safely dropped on the connection.
|
gboolean | gmsg_is_oob_query (gconstpointer msg) |
| Check whether query message starting at `msg' is flagged for OOB hit delivery.
|
gboolean | gmsg_split_is_oob_query (gconstpointer head, gconstpointer data) |
| Check whether query message split between header and data is flagged for OOB hit delivery.
|
gint | gmsg_cmp (gconstpointer pdu1, gconstpointer pdu2) |
| Perform a priority comparison between two messages, given as the whole PDU.
|
gchar * | gmsg_infostr (gconstpointer head) |
gchar * | gmsg_infostr_full (gconstpointer message) |
gchar * | gmsg_infostr_full_split (gconstpointer head, gconstpointer data) |
void | gmsg_install_presend (pmsg_t *mb) |
| Install "pre-send" callback for certain types of messages.
|
void | gmsg_log_dropped (gconstpointer head, const gchar *reason,...) G_GNUC_PRINTF(2 |
void | gmsg_log_bad (const struct gnutella_node *n, const gchar *reason,...) G_GNUC_PRINTF(2 |
void | gmsg_sendto_route_ggep (struct gnutella_node *n, struct route_dest *rt, guint32 regular_size) |
| Same as gmsg_sendto_route() but if the node did not claim support of GGEP extensions in pings, pongs and pushes, strip the GGEP payload before forwarding the message.
|
void | gmsg_sendto_one_ggep (struct gnutella_node *n, gconstpointer msg, guint32 size, guint32 regular_size) |
| Send message to one node, stripping the GGEP part if the node cannot grok GGEP extensions.
|
void | gmsg_ctrl_sendto_one_ggep (struct gnutella_node *n, gconstpointer msg, guint32 size, guint32 regular_size) |
| Send control message to one node.
|
void | gmsg_sendto_all_ggep (const GSList *sl, gconstpointer msg, guint32 size, guint32 regular_size) |
| Broadcast message to all nodes in the list, sending only a stripped down version without the trailing GGEP extension to nodes not advertising GGEP support.
|
void | gmsg_search_sendto_one (struct gnutella_node *n, gnet_search_t sh, gconstpointer msg, guint32 size) |
| Send our search message to one node.
|
void | gmsg_search_sendto_all (const GSList *l, gnet_search_t sh, gconstpointer msg, guint32 size) |
| Broadcast our search message to all nodes in the list.
|