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

rx.h File Reference


Detailed Description

Network driver.

Author:
Raphael Manfredi
Date:
2002-2003

#include <glib.h>
#include "pmsg.h"
#include "if/core/hosts.h"

Go to the source code of this file.

Data Structures

struct  rxdriver
 A network driver. More...

struct  rxdrv_ops
 Operations defined on all drivers. More...


Defines

#define rx_owner(r)   ((r)->owner)

Typedefs

typedef void(* rx_data_t )(struct rxdriver *, pmsg_t *mb)
typedef rxdriver rxdrv_t
 A network driver.


Functions

rxdrv_trx_make (gpointer owner, gnet_host_t *host, const struct rxdrv_ops *ops, gpointer args)
rxdrv_trx_make_above (rxdrv_t *lrx, const struct rxdrv_ops *ops, gconstpointer args)
 Creation routine for a driver to be stacked above specified lower `lrx'.

void rx_set_data_ind (rxdrv_t *rx, rx_data_t data_ind)
 Set the `data_ind' callback, invoked when a new message has been fully received by the RX stack.

void rx_free (rxdrv_t *d)
 Dispose of the driver resources, recursively and asynchronously.

void rx_collect (void)
 Collect freed stacks.

void rx_recv (rxdrv_t *rx, pmsg_t *mb)
 Inject data into driver, from lower layer.

void rx_enable (rxdrv_t *rx)
 Enable reception, recursively.

void rx_disable (rxdrv_t *rx)
 Disable reception, recursively.

rxdrv_trx_bottom (rxdrv_t *rx)
bio_sourcerx_bio_source (rxdrv_t *rx)
bio_sourcerx_no_source (rxdrv_t *rx)
 No I/O source can be fetched from this layer.


Define Documentation

#define rx_owner  )     ((r)->owner)
 


Typedef Documentation

typedef void(* rx_data_t)(struct rxdriver *, pmsg_t *mb)
 

typedef struct rxdriver rxdrv_t
 

A network driver.


Function Documentation

struct bio_source* rx_bio_source rxdrv_t rx  ) 
 

Returns:
the I/O source from the bottom of the stack (link layer).

rxdrv_t* rx_bottom rxdrv_t rx  ) 
 

Returns:
the driver at the bottom of the stack.

void rx_collect void   ) 
 

Collect freed stacks.

void rx_disable rxdrv_t rx  ) 
 

Disable reception, recursively.

It must be called on the top layer only.

void rx_enable rxdrv_t rx  ) 
 

Enable reception, recursively.

It must be called on the top layer only.

void rx_free rxdrv_t rx  ) 
 

Dispose of the driver resources, recursively and asynchronously.

It must be called on the top layer only.

rxdrv_t* rx_make gpointer  owner,
gnet_host_t host,
const struct rxdrv_ops ops,
gpointer  args
 

rxdrv_t* rx_make_above rxdrv_t lrx,
const struct rxdrv_ops ops,
gconstpointer  args
 

Creation routine for a driver to be stacked above specified lower `lrx'.

Returns:
NULL if there is an initialization problem.

struct bio_source* rx_no_source rxdrv_t rx  ) 
 

No I/O source can be fetched from this layer.

void rx_recv rxdrv_t rx,
pmsg_t mb
 

Inject data into driver, from lower layer.

void rx_set_data_ind rxdrv_t rx,
rx_data_t  data_ind
 

Set the `data_ind' callback, invoked when a new message has been fully received by the RX stack.

The first argument of the routine is the layer from which data come, which will be the topmost driver when calling the external routine.


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