|
Data Structures |
struct | txdriver |
| A network driver. More...
|
struct | txdrv_ops |
Defines |
#define | TX_SERVICE 0x00000001 /**< Servicing of upper layer needed */ |
| Servicing of upper layer needed.
|
#define | TX_ERROR 0x00000002 /**< Fatal error detected */ |
| Fatal error detected.
|
#define | TX_DOWN 0x00000004 /**< No further writes allowed */ |
| No further writes allowed.
|
#define | TX_CLOSING 0x00000008 /**< Closing, no further writes allowed */ |
| Closing, no further writes allowed.
|
#define | TX_EAGER 0x00000010 /**< Always service the queue */ |
| Always service the queue.
|
Typedefs |
typedef void(* | tx_service_t )(gpointer obj) |
typedef txdriver | txdrv_t |
| A network driver.
|
typedef void(* | tx_closed_t )(txdrv_t *tx, gpointer arg) |
| Operations defined on all drivers.
|
Functions |
txdrv_t * | tx_make (gpointer owner, gnet_host_t *host, const struct txdrv_ops *ops, gpointer args) |
| Create a new network driver, equipped with the `ops' operations and initialize its specific parameters by calling the init routine with `args'.
|
txdrv_t * | tx_make_above (txdrv_t *ltx, const struct txdrv_ops *ops, gpointer args) |
| Createion routine for a driver to be stacked above specified lower `ltx'.
|
void | tx_free (txdrv_t *tx) |
| Dispose of the driver resources, asynchronously.
|
void | tx_collect (void) |
| Collect freed stacks.
|
ssize_t | tx_write (txdrv_t *tx, gpointer data, size_t len) |
| Write `len' bytes starting at `data'.
|
ssize_t | tx_writev (txdrv_t *tx, struct iovec *iov, gint iovcnt) |
| Write I/O vector.
|
ssize_t | tx_sendto (txdrv_t *tx, gnet_host_t *to, gpointer data, size_t len) |
| Send buffer datagram to specified destination `to'.
|
void | tx_srv_register (txdrv_t *d, tx_service_t srv_fn, gpointer srv_arg) |
| Register service routine from upper TX layer.
|
void | tx_srv_enable (txdrv_t *tx) |
| Record that upper layer wants its service routine enabled.
|
void | tx_srv_disable (txdrv_t *tx) |
| Record that upper layer wants its service routine disabled.
|
size_t | tx_pending (txdrv_t *tx) |
bio_source * | tx_bio_source (txdrv_t *tx) |
| The I/O source of the lowest layer (link) that physically sends the information.
|
ssize_t | tx_no_write (txdrv_t *tx, gpointer data, size_t len) |
| The write() operation is forbidden.
|
ssize_t | tx_no_writev (txdrv_t *tx, struct iovec *iov, gint iovcnt) |
| The writev() operation is forbidden.
|
ssize_t | tx_no_sendto (txdrv_t *tx, gnet_host_t *to, gpointer data, size_t len) |
| The sendto() operation is forbidden.
|
void | tx_flush (txdrv_t *tx) |
| Request that data be sent immediately.
|
void | tx_shutdown (txdrv_t *tx) |
| Shutdown stack, disallowing further writes.
|
void | tx_close (txdrv_t *d, tx_closed_t cb, gpointer arg) |
| Close the transmission by ensuring each layer properly finishes sending its data.
|
void | tx_close_noop (txdrv_t *tx, tx_closed_t cb, gpointer arg) |
| No-operation closing routine for layers that don't need anything special.
|
gboolean | tx_has_error (txdrv_t *tx) |
void | tx_eager_mode (txdrv_t *tx, gboolean on) |
| Set stack in "eager" mode: in that mode, servicing is always enabled in the whole stack, meaning the bottom layer always invokes the queue service routines whenever it can accept more data.
|
bio_source * | tx_no_source (txdrv_t *tx) |
| No I/O source can be fetched from this layer.
|