SCO OpenServer
mditx_register(D3mdi)
mditx_register --
single-threaded interface registration for MP-aware MDI drivers
Synopsis (Not in SVR5 version)
#include <sys/mdi.h>
void mditx_register(
mditx_IF_t * txint,
queue_t * q,
mditx_CheckAvail_t tx_avail,
mditx_ProcessMsg_t process_msg,
void * handle);
Description
The
mditx_register( )
function registers an MDI driver
as MP-aware.
The caller provides pointers to the data and routines used by the
mditx_interface( )
routine.
This registration routine is called from the driver's open routine.
Parameters
The parameters are:
txint-
pointer to an mditx_IF_t structure,
which the driver declares as part of its per-device structure.
This registration routine
initializes this structure using the remaining parameters.
q-
pointer to the driver's write queue
tx_avail-
pointer to a function with prototype:
void (*tx_avail)(void * handle);
This routine is called with a single argument,
handle, (described below)
and must return non-zero if transmit resources are available,
zero if not.
process_msg-
is a pointer to a function with prototype:
void (*process_msg)(void * handle, mblk_t * mp);
This routine accepts two arguments,
handle
and mp, a pointer to
a transmit request STREAMS data message.
This routine commits the request to the card,
and can assume that at most one instance of it
is active at any given time
in other words, it is single-threaded.
handle-
pointer to a device-specific data structure required by the driver
to identify a particular device
(usually the device-table pointer)
Context and synchronization
Blockable
context.
Hardware applicability
All
Version applicability
mdi:
1
Differences between versions
This function is not supported in MDI on SVR5
systems.
In DDI 8, use the
mdi_tx_if_init(D3mdi)
and related functions instead of
mditx_register( ).
References
mditx_interface(D3mdi),
mditx_registerMT(D3mdi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005