DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

RegisterClient(D3pccard)


RegisterClient -- register a client with CardServices

Synopsis

   #include <sys/types.h>
   #include <sys/lcs.h>
   #include <sys/lss.h>
   

int CardServices (RegisterClient, ClientHandle_t **ch, CallbackEntry_t ClientEntry, int RegisterClientLen, RegisterClient_t *rgc, rm_key_t key);

Description

RegisterClient( ) registers a client with CardServices( ). Upon registration, CardServices( ) assigns the Client a ClientHandle which is of integer type. The CardServices( ) routine uses the ClientHandle to refer to the particular Client.

Arguments


ch
Pointer to a ClientHandle(D4pccard) structure.

ClientEntry
Pointer to a CallbackEntry(D4pccard) structure.

RegisterClientLen
Length of the RegisterClient(D4pccard) structure. Set to 14.

rgc
Pointer to a RegisterClient(D4pccard) structure.

key
Resource manager key.

Return values


BAD_ARG_LENGTH
RegisterClientLen not equal to 14.

BAD_ATTRIBUTE
No client or more than one client specified.

BAD_VERSION
Client version not supported by CardServices( ).

OUT_OF_RESOURCE
CardServices( ) already maxed out on registered clients.

SUCCESS
Client registered successfully.

Usage

When a Client later deregisters itself, it must pass the ClientHandle(D4pccard) structure as a parameter when using the DeregisterClient(D3pccard) service. The Client passes along a pointer (*rgc) to its client_callback(D2pccard) entry point routine so that CardServices will know the physical address in RAM to which event notifications will be sent, the logical socket number assigned to the card, and the pointer to a structure that in turn contains pointers to data that are of interest to the client. The client_callback( ) entry point routine must include a resource manager key, rm_key_t, as one of its arguments and must be written for interrupt context. The driver must be coded to handle the client_callback( ) routine before RegisterClient( ) is called.

Context and synchronization

Blockable, initialization, or user context

Hardware applicability

All

Version applicability

pccard: 1, 2, 3

References

CallbackEntry(D4pccard), ClientHandle(D4pccard), RegisterClient(D4pccard)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005