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

rx_link.c File Reference


Detailed Description

Network driver -- link level.

This driver reads data from the network and builds messages that are given to the upper layer on the "interrupt stack".

Author:
Raphael Manfredi
Date:
2002-2003

#include "common.h"
#include "sockets.h"
#include "pmsg.h"
#include "rx.h"
#include "rx_link.h"
#include "rxbuf.h"
#include "bsched.h"
#include "lib/walloc.h"
#include "lib/override.h"

Data Structures

struct  attr
 Private attributes for the decompressing layer. More...


Functions

 RCSID ("$Id:rx_link.c, v 1.13 2005/11/30 16:43:41 rmanfredi Exp $")
void is_readable (gpointer data, gint unused_source, inputevt_cond_t cond)
 Invoked when the input file descriptor has more data available.

gpointer rx_link_init (rxdrv_t *rx, gconstpointer args)
 Initialize the driver.

void rx_link_destroy (rxdrv_t *rx)
 Get rid of the driver's private data.

void rx_link_recv (rxdrv_t *rx, pmsg_t *mb)
 Inject data into driver.

void rx_link_enable (rxdrv_t *rx)
 Enable reception of data.

void rx_link_disable (rxdrv_t *rx)
 Disable reception of data.

bio_sourcerx_link_bio_source (rxdrv_t *rx)
const struct rxdrv_opsrx_link_get_ops (void)

Variables

const struct rxdrv_ops rx_link_ops


Function Documentation

void is_readable gpointer  data,
gint  unused_source,
inputevt_cond_t  cond
[static]
 

Invoked when the input file descriptor has more data available.

RCSID "$Id:rx_link.  c,
v 1.13 2005/11/30 16:43:41 rmanfredi Exp $" 
 

struct bio_source* rx_link_bio_source rxdrv_t rx  )  [static]
 

Returns:
I/O source of the lower level.

void rx_link_destroy rxdrv_t rx  )  [static]
 

Get rid of the driver's private data.

void rx_link_disable rxdrv_t rx  )  [static]
 

Disable reception of data.

void rx_link_enable rxdrv_t rx  )  [static]
 

Enable reception of data.

const struct rxdrv_ops* rx_link_get_ops void   ) 
 

gpointer rx_link_init rxdrv_t rx,
gconstpointer  args
[static]
 

Initialize the driver.

Always succeeds, so never returns NULL.

void rx_link_recv rxdrv_t rx,
pmsg_t mb
[static]
 

Inject data into driver.

Since we normally read from the network, we don't have to process those data and can forward them directly to the upper layer.


Variable Documentation

const struct rxdrv_ops rx_link_ops [static]
 

Initial value:

 {
    rx_link_init,       
    rx_link_destroy,    
    rx_link_recv,       
    rx_link_enable,     
    rx_link_disable,    
    rx_link_bio_source, 
}


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