/* The event handler will be evoked when link state changes *ordatabecomesavailableonthereceiveside. * *Fornon-RAWlinks,iftheLDC_EVENT_RESETeventarrivesthe *drivershouldresetallofitsinternalstateandreinvoke *ldc_connect()totryandbringthelinkupagain. * *ForRAWlinks,ldc_connect()isnotused.Insteadthedriver *justwaitsfortheLDC_EVENT_UPevent.
*/ 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 *communicationcanproceed.ldc_connect()doesthat,ifthe *handshakecompletessuccessfully,anLDC_EVENT_UPeventwill *besentuptothedriver.
*/ 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.