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

rxbuf.c File Reference


Detailed Description

Network RX buffer allocator.

Author:
Raphael Manfredi
Date:
2002-2003

#include "common.h"
#include "rxbuf.h"
#include "pmsg.h"
#include "if/gnet_property_priv.h"
#include "lib/palloc.h"
#include "lib/override.h"

Defines

#define BUF_COUNT   5 /**< Max amount of buffers we want in pool */
 Max amount of buffers we want in pool.

#define BUF_SIZE   4096 /**< Size of each buffer */
 Size of each buffer.


Functions

 RCSID ("$Id:rxbuf.c, v 1.5 2005/09/25 21:41:48 rmanfredi Exp $")
void rxbuf_free (gpointer p, gpointer unused_data)
 Put RX buffer back to its pool.

pdata_trxbuf_new (void)
 Get a new RX buffer from the pool.

void rxbuf_init (void)
 Initialize pool of RX buffers.

void rxbuf_close (void)
 Dispose of all the RX buffers.


Variables

pool_trxpool


Define Documentation

#define BUF_COUNT   5 /**< Max amount of buffers we want in pool */
 

Max amount of buffers we want in pool.

#define BUF_SIZE   4096 /**< Size of each buffer */
 

Size of each buffer.


Function Documentation

RCSID "$Id:rxbuf.  c,
v 1.5 2005/09/25 21:41:48 rmanfredi Exp $" 
 

void rxbuf_close void   ) 
 

Dispose of all the RX buffers.

void rxbuf_free gpointer  p,
gpointer  unused_data
 

Put RX buffer back to its pool.

Can be called directly, or via pdata_unref() because this routine is installed as the "free routine" of the buffer.

void rxbuf_init void   ) 
 

Initialize pool of RX buffers.

pdata_t* rxbuf_new void   ) 
 

Get a new RX buffer from the pool.

Returns:
new RX buffer.


Variable Documentation

pool_t* rxpool [static]
 


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