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

mqueue Struct Reference

#include <mq.h>


Detailed Description

A message queue.

The queue itself is a two-way list, whose head is kept in `qhead' and the tail in `qtail', since a GList does not keep that information and we don't want to traverse the list each time. Manual bookkeeping required.

Flow control is triggered when the size reaches the high watermark, and remains in effect until we reach the low watermark, thereby providing the necessary hysteresis.

The `qlink' field is used during flow-control. It contains a sorted (by priority) array of all the items in the list. It is dynamically allocated and freed as needed.

The `header' is used to hold the function/hops/TTL of a reference message to be used as a comparison point when speeding up dropping in flow-control.


Data Fields

gnutella_header_t header
 Comparison point during flow control.
gnutella_nodenode
 Node to which this queue belongs.
const struct mq_opsops
 Polymorphic operations.
const struct mq_copscops
 Common operations.
txdrv_ttx_drv
 Network TX stack driver.
GList * qhead
GList * qtail
GList ** qlink
slist_tqwait
 Waiting queue during putq recursions.
cevent_tswift_ev
 Callout queue event in "swift" mode.
gint swift_elapsed
 Scheduled elapsed time, in ms.
gint qlink_count
 Amount of entries in `qlink'.
gint maxsize
 Maximum size of this queue (total queued).
gint count
 Amount of messages queued.
gint hiwat
 High watermark.
gint lowat
 Low watermark.
gint size
 Current amount of bytes queued.
gint flags
 Status flags.
gint last_written
 Amount last written by service routine.
gint flowc_written
 Amount written during flow control.
gint last_size
 Queue size at last "swift" event callback.
gint putq_entered
 For recursion checks in mq_putq().


Field Documentation

const struct mq_cops* mqueue::cops
 

Common operations.

gint mqueue::count
 

Amount of messages queued.

gint mqueue::flags
 

Status flags.

gint mqueue::flowc_written
 

Amount written during flow control.

gnutella_header_t mqueue::header
 

Comparison point during flow control.

gint mqueue::hiwat
 

High watermark.

gint mqueue::last_size
 

Queue size at last "swift" event callback.

gint mqueue::last_written
 

Amount last written by service routine.

gint mqueue::lowat
 

Low watermark.

gint mqueue::maxsize
 

Maximum size of this queue (total queued).

struct gnutella_node* mqueue::node
 

Node to which this queue belongs.

const struct mq_ops* mqueue::ops
 

Polymorphic operations.

gint mqueue::putq_entered
 

For recursion checks in mq_putq().

GList* mqueue::qhead
 

GList ** mqueue::qlink
 

gint mqueue::qlink_count
 

Amount of entries in `qlink'.

GList * mqueue::qtail
 

slist_t* mqueue::qwait
 

Waiting queue during putq recursions.

gint mqueue::size
 

Current amount of bytes queued.

gint mqueue::swift_elapsed
 

Scheduled elapsed time, in ms.

cevent_t* mqueue::swift_ev
 

Callout queue event in "swift" mode.

txdrv_t* mqueue::tx_drv
 

Network TX stack driver.


The documentation for this struct was generated from the following file:
Generated on Sat Jun 30 17:53:33 2007 for gtk-gnutella by  doxygen 1.3.9.1