void mditx_registerMT( mditx_IFMT_t * txint, queue_t * q, mditx_GetResource_t get_txr, mditx_ProcessMsgMT_t process_msg, void * handle);
This routine should be called from the driver's open( ) routine.
void * (*get_txr)(void * handle);This routine is called with a single argument, handle (described below) to return a driver-specific resource used to transmit a single request. This resource is typically a transmit buffer or transmit buffer descriptor.
get_txr must ensure that any resource it returns is properly sequenced. For instance, if A's context calls get_txr, then B's context calls get_txr, the card transmits A's frame then B's frame, regardless of which order A's context and B's context happen to eventually call process_msg (see below). This can be accomplished by placing the resource in an ordered list.
get_txr must return NULL if no more transmit resources are available; a pointer to a valid resource otherwise.
void (*process_msg)(void * handle, void * txr, mblk_t * mp);This routine is accepts three arguments: handle (described below), txr, the resource returned by get_txr, and mp, a pointer to the transmit request message. This routine commits the given message mp to the card. As mentioned above, frames are sent in the order in which their transmit resources were acquired (from get_txr), not the order in which they were committed (by process_msg). This ensures that frames are not inadvertently re-ordered.