Kernel Functions for Drivers csxRegisterClient(9F)
NAME
csxRegisterClient - register a client
SYNOPSIS
#include
int32t csxRegisterClient(clienthandlet *ch, clientregt *cr);
INTERFACE LEVEL
Solaris DI Specific (Solaris DI)
PARAMETERS
ch Pointer to a clienthandlet structure.
mc Pointer to a clientregt structure.
DESCRIPTION
This function registers a client with Card Services and
returns a unique client handle for the client. The client
handle must be passed to csxDeregisterClient(9F) when the
client terminates.
STRUCTURE MEMBERS
The structure members of clientregt are:
uint32t Attributes;
uint32t EventMask;
eventcallbackargst eventcallbackargs;
uint32t Version; /* CS version to expect */
csfunctiont *eventhandler;
ddiiblockcookiet *iblkcookie; /* event iblk cookie */
ddiidevicecookiet *idevcookie; /* event idev cookie */
devinfot *dip; /* client's dip */
char drivername[MODMAXNAMELEN];
The fields are defined as follows:
Attributes This field is bit-mapped and defined
as follows:
INFOMEMCLIENT
Memory client device driver.
SunOS 5.11 Last change: 19 Jul 1996 1
Kernel Functions for Drivers csxRegisterClient(9F)
INFOMTDCLIENT
Memory Technology Driver client.
INFOIOCLIENT
IO client device driver.
INFOCARDSHARE
Generate artificial
CSEVENTCARDINSERTION and
CSEVENTREGISTRATIONCOMPLETE
events.
INFOCARDEXCL
Generate artificial
CSEVENTCARDINSERTION and
CSEVENTREGISTRATIONCOMPLETE
events.
INFOMEMCLIENT
INFOMTDCLIENT
INFOIOCLIENT
These bits are mutually
exclusive (that is, only one
bit may be set), but one of
the bits must be set.
INFOCARDSHARE
INFOCARDEXCL
If either of these bits is
set, the client will receive
a
CSEVENTREGISTRATIONCOMPLETE
event when Card Services has
completed its internal client
registration processing and
after a sucessful call to
csxRequestSocketMask(9F).
Also, if either of these bits
is set, and if a card of the
type that the client can con-
trol is currently inserted in
SunOS 5.11 Last change: 19 Jul 1996 2
Kernel Functions for Drivers csxRegisterClient(9F)
the socket (and after a suc-
cessful call to
csxRequestSocketMask(9F)),
the client will receive an
artificial
CSEVENTCARDINSERTION
event.
Event Mask This field is bit-mapped and speci-
fies the client's global event mask.
Card Services performs event notifi-
cation based on this field. See
csxeventhandler(9E) for valid event
definitions and for additional infor-
mation about handling events.
eventcallbackargs The eventcallbackargst structure
members are:
void *clientdata;
The clientdata field may be used to
provide data available to the event
handler (see csxeventhandler(9E)).
Typically, this is the client
driver's soft state pointer.
Version This field contains the specific Card
Services version number that the
client expects to use. Typically, the
client will use the CSVERSION macro
to specify to Card Services which
version of Card Services the client
expects.
eventhandler The client event callback handler
entry point is passed in the
eventhandler field.
iblkcookie These fields must be used by the
idevcookie client to set up mutexes that are
used in the client's event callback
handler when handling high priority
events.
SunOS 5.11 Last change: 19 Jul 1996 3
Kernel Functions for Drivers csxRegisterClient(9F)
dip The client must set this field with a
pointer to the client's dip.
drivername The client must copy a driver-unique
name into this member. This name must
be identical across all instances of
the driver.
RETURN VALUES
CSUCES Successful operation.
CSBADATRIBUTE No client type or more than one
client type specified.
CSOUTOFRESOURCE Card Services is unable to regis-
ter client.
CSBADVERSION Card Services version is incompa-
tible with client.
CSBADHANDLE Client has already registered for
this socket.
CSUNSUPORTEDFUNCTION No PCMCIA hardware installed.
CONTEXT
This function may be called from user or kernel context.
SEE ALSO
csxDeregisterClient(9F), csxRequestSocketMask(9F)
PC Card 95 Standard, PCMCIA/JEIDA
SunOS 5.11 Last change: 19 Jul 1996 4
|