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

tx_dgram.c File Reference


Detailed Description

Network driver -- datagram level.

This driver sends datagrams to specified hosts.

Author:
Raphael Manfredi
Date:
2002-2003

#include "common.h"
#include "sockets.h"
#include "tx.h"
#include "tx_dgram.h"
#include "bsched.h"
#include "inet.h"
#include "if/core/hosts.h"
#include "lib/misc.h"
#include "lib/tm.h"
#include "lib/walloc.h"
#include "lib/override.h"

Data Structures

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


Functions

 RCSID ("$Id:tx_dgram.c, v 1.21 2005/08/31 21:37:28 rmanfredi Exp $")
void is_writable (gpointer data, gint unused_source, inputevt_cond_t cond)
 Invoked when the output file descriptor can accept more data.

gpointer tx_dgram_init (txdrv_t *tx, gpointer args)
 Initialize the driver.

void tx_dgram_destroy (txdrv_t *tx)
 Get rid of the driver's private data.

gint tx_dgram_write_error (txdrv_t *tx, gnet_host_t *to, const char *func)
ssize_t tx_dgram_sendto (txdrv_t *tx, gnet_host_t *to, gpointer data, size_t len)
 Send buffer datagram to specified destination `to'.

void tx_dgram_enable (txdrv_t *tx)
 Allow servicing of upper TX queue when output fd is ready.

void tx_dgram_disable (txdrv_t *tx)
 Disable servicing of upper TX queue.

size_t tx_dgram_pending (txdrv_t *unused_tx)
 No data buffered at this level: always returns 0.

void tx_dgram_flush (txdrv_t *unused_tx)
 Nothing to do.

void tx_dgram_shutdown (txdrv_t *unused_tx)
 Nothing to do.

bio_sourcetx_dgram_bio_source (txdrv_t *tx)
const struct txdrv_opstx_dgram_get_ops (void)

Variables

const struct txdrv_ops tx_dgram_ops


Function Documentation

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

Invoked when the output file descriptor can accept more data.

RCSID "$Id:tx_dgram.  c,
v 1.21 2005/08/31 21:37:28 rmanfredi Exp $" 
 

struct bio_source* tx_dgram_bio_source txdrv_t tx  )  [static]
 

Returns:
the I/O source of this level.

void tx_dgram_destroy txdrv_t tx  )  [static]
 

Get rid of the driver's private data.

void tx_dgram_disable txdrv_t tx  )  [static]
 

Disable servicing of upper TX queue.

void tx_dgram_enable txdrv_t tx  )  [static]
 

Allow servicing of upper TX queue when output fd is ready.

void tx_dgram_flush txdrv_t unused_tx  )  [static]
 

Nothing to do.

const struct txdrv_ops* tx_dgram_get_ops void   ) 
 

gpointer tx_dgram_init txdrv_t tx,
gpointer  args
[static]
 

Initialize the driver.

Always succeeds, so never returns NULL.

size_t tx_dgram_pending txdrv_t unused_tx  )  [static]
 

No data buffered at this level: always returns 0.

ssize_t tx_dgram_sendto txdrv_t tx,
gnet_host_t to,
gpointer  data,
size_t  len
[static]
 

Send buffer datagram to specified destination `to'.

Returns:
amount of bytes written, or -1 on error with errno set.

void tx_dgram_shutdown txdrv_t unused_tx  )  [static]
 

Nothing to do.

gint tx_dgram_write_error txdrv_t tx,
gnet_host_t to,
const char *  func
[inline, static]
 


Variable Documentation

const struct txdrv_ops tx_dgram_ops [static]
 

Initial value:

 {
    tx_dgram_init,          
    tx_dgram_destroy,       
    tx_no_write,            
    tx_no_writev,           
    tx_dgram_sendto,        
    tx_dgram_enable,        
    tx_dgram_disable,       
    tx_dgram_pending,       
    tx_dgram_flush,         
    tx_dgram_shutdown,      
    tx_close_noop,          
    tx_dgram_bio_source,    
}


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