/* The event handler will be evoked when link state changes * or data becomes available on the receive side. * * For non-RAW links, if the LDC_EVENT_RESET event arrives the * driver should reset all of its internal state and reinvoke * ldc_connect() to try and bring the link up again. * * For RAW links, ldc_connect() is not used. Instead the driver * just waits for the LDC_EVENT_UP event.
*/ struct ldc_channel_config { void (*event)(void *arg, int event);
/* Allocate state for a channel. */ struct ldc_channel *ldc_alloc(unsignedlong id, conststruct ldc_channel_config *cfgp, void *event_arg, constchar *name);
/* Shut down and free state for a channel. */ void ldc_free(struct ldc_channel *lp);
/* Register TX and RX queues of the link with the hypervisor. */ int ldc_bind(struct ldc_channel *lp); void ldc_unbind(struct ldc_channel *lp);
/* For non-RAW protocols we need to complete a handshake before * communication can proceed. ldc_connect() does that, if the * handshake completes successfully, an LDC_EVENT_UP event will * be sent up to the driver.
*/ int ldc_connect(struct ldc_channel *lp); int ldc_disconnect(struct ldc_channel *lp);
int ldc_state(struct ldc_channel *lp); void ldc_set_state(struct ldc_channel *lp, u8 state); int ldc_mode(struct ldc_channel *lp); void __ldc_print(struct ldc_channel *lp, constchar *caller); int ldc_rx_reset(struct ldc_channel *lp);
/* Read and write operations. Only valid when the link is up. */ int ldc_write(struct ldc_channel *lp, constvoid *buf, unsignedint size); int ldc_read(struct ldc_channel *lp, void *buf, unsignedint size);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.