Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

mq_udp.c File Reference


Detailed Description

Message queues, writing to a UDP stack.

Author:
Raphael Manfredi
Date:
2002-2003

#include "common.h"
#include "nodes.h"
#include "mq.h"
#include "mq_tcp.h"
#include "pmsg.h"
#include "gmsg.h"
#include "tx.h"
#include "gnet_stats.h"
#include "lib/walloc.h"
#include "if/gnet_property_priv.h"
#include "lib/override.h"

Data Structures

struct  mq_udp_info
 The "meta data" attached to each message block enqueued yields routing information, perused by the queue to route messages. More...

struct  mq_udp_info_extended
 The extended meta data are used when the enqueued message is already extended. More...


Functions

 RCSID ("$Id:mq_udp.c, v 1.18 2005/09/10 08:17:28 daichik Exp $")
void mq_udp_service (gpointer data)
 Service routine for UDP message queue.

void mq_udp_pmsg_free (pmsg_t *mb, gpointer arg)
 Free routine for plain metadata.

void mq_udp_pmsg_free_extended (pmsg_t *mb, gpointer arg)
 Free routine for extended metadata, invoking the original free routine on the original metadata.

pmsg_tmq_udp_attach_metadata (pmsg_t *mb, gnet_host_t *to)
 Attach meta information to supplied message block, returning a possibly new message block to use.

mqueue_tmq_udp_make (gint maxsize, struct gnutella_node *n, struct txdriver *nd)
 Create new message queue capable of holding `maxsize' bytes, and owned by the supplied node.

void mq_udp_putq (mqueue_t *q, pmsg_t *mb, gnet_host_t *to)
 Enqueue message, which becomes owned by the queue.

void mq_udp_node_putq (mqueue_t *q, pmsg_t *mb, gnutella_node_t *n)
 Enqueue message to be sent to the ip:port held in the supplied node.

void mq_no_putq (mqueue_t *unused_q, pmsg_t *unused_mb)
 Disable plain mq_putq() operation on an UDP queue.


Variables

const struct mq_ops mq_udp_ops


Function Documentation

void mq_no_putq mqueue_t unused_q,
pmsg_t unused_mb
[static]
 

Disable plain mq_putq() operation on an UDP queue.

pmsg_t* mq_udp_attach_metadata pmsg_t mb,
gnet_host_t to
[static]
 

Attach meta information to supplied message block, returning a possibly new message block to use.

mqueue_t* mq_udp_make gint  maxsize,
struct gnutella_node n,
struct txdriver nd
 

Create new message queue capable of holding `maxsize' bytes, and owned by the supplied node.

void mq_udp_node_putq mqueue_t q,
pmsg_t mb,
gnutella_node_t n
 

Enqueue message to be sent to the ip:port held in the supplied node.

void mq_udp_pmsg_free pmsg_t mb,
gpointer  arg
[static]
 

Free routine for plain metadata.

void mq_udp_pmsg_free_extended pmsg_t mb,
gpointer  arg
[static]
 

Free routine for extended metadata, invoking the original free routine on the original metadata.

void mq_udp_putq mqueue_t q,
pmsg_t mb,
gnet_host_t to
 

Enqueue message, which becomes owned by the queue.

The data held in `to' is copied, so the structure can be reclaimed immediately by the caller.

void mq_udp_service gpointer  data  )  [static]
 

Service routine for UDP message queue.

RCSID "$Id:mq_udp.  c,
v 1.18 2005/09/10 08:17:28 daichik Exp $" 
 


Variable Documentation

const struct mq_ops mq_udp_ops [static]
 

Initial value:

 {
    mq_no_putq,         
}


Generated on Sun Feb 12 10:50:04 2006 for Gtk-Gnutella by doxygen 1.3.6