Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

csx_requestsocketmask(9f) [opensolaris man page]

csx_RequestSocketMask(9F)				   Kernel Functions for Drivers 				 csx_RequestSocketMask(9F)

NAME
csx_RequestSocketMask, csx_ReleaseSocketMask - set or clear the client's client event mask SYNOPSIS
#include <sys/pccard.h> int32_t csx_RequestSocketMask(client_handle_t ch, request_socket_mask_t *sm); int32_t csx_ReleaseSocketMask(client_handle_t ch, release_socket_mask_t *rm); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Client handle returned from csx_RegisterClient(9F). sm Pointer to a request_socket_mask_t structure. rm Pointer to a release_socket_mask_t structure. DESCRIPTION
The function csx_RequestSocketMask() sets the client's client event mask and enables the client to start receiving events at its event callback handler. Once this function returns successfully, the client can start receiving events at its event callback handler. Any pending events generated from the call to csx_RegisterClient(9F) will be delivered to the client after this call as well. This allows the client to set up the event handler mutexes before the event handler gets called. csx_RequestSocketMask() must be used before calling csx_GetEventMask(9F) or csx_SetEventMask(9F) for the client event mask for this socket. The function csx_ReleaseSocketMask() clears the client's client event mask. STRUCTURE MEMBERS
The structure members of request_socket_mask_t are: uint32_t Socket; /* socket number */ uint32_t EventMask; /* event mask to set or return */ The structure members of release_socket_mask_t are: uint32_t Socket; /* socket number */ The fields are defined as follows: Socket Not used in Solaris, but for portability with other Card Services implementations, it should be set to the logical socket num- ber. EventMask This field is bit-mapped. Card Services performs event notification based on this field. See csx_event_handler(9E) for valid event definitions and for additional information about handling events. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_HANDLE Client handle is invalid. CS_IN_USE csx_ReleaseSocketMask() has not been done. CS_BAD_SOCKET csx_RequestSocketMask() has not been done. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CONTEXT
These functions may be called from user or kernel context. SEE ALSO
csx_event_handler(9E), csx_GetEventMask(9F), csx_RegisterClient(9F), csx_SetEventMask(9F) PC Card 95 Standard, PCMCIA/JEIDA SunOS 5.11 19 Jul 1996 csx_RequestSocketMask(9F)

Check Out this Related Man Page

csx_RegisterClient(9F)					   Kernel Functions for Drivers 				    csx_RegisterClient(9F)

NAME
csx_RegisterClient - register a client SYNOPSIS
#include <sys/pccard.h> int32_t csx_RegisterClient(client_handle_t *ch, client_reg_t *cr); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Pointer to a client_handle_t structure. mc Pointer to a client_reg_t 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 csx_DeregisterClient(9F) when the client terminates. STRUCTURE MEMBERS
The structure members of client_reg_t are: uint32_t Attributes; uint32_t EventMask; event_callback_args_t event_callback_args; uint32_t Version; /* CS version to expect */ csfunction_t *event_handler; ddi_iblock_cookie_t *iblk_cookie; /* event iblk cookie */ ddi_idevice_cookie_t *idev_cookie; /* event idev cookie */ dev_info_t *dip; /* client's dip */ char driver_name[MODMAXNAMELEN]; The fields are defined as follows: Attributes This field is bit-mapped and defined as follows: INFO_MEM_CLIENT Memory client device driver. INFO_MTD_CLIENT Memory Technology Driver client. INFO_IO_CLIENT IO client device driver. INFO_CARD_SHARE Generate artificial CS_EVENT_CARD_INSERTION and CS_EVENT_REGISTRATION_COMPLETE events. INFO_CARD_EXCL Generate artificial CS_EVENT_CARD_INSERTION and CS_EVENT_REGISTRATION_COMPLETE events. INFO_MEM_CLIENT INFO_MTD_CLIENT INFO_IO_CLIENT These bits are mutually exclusive (that is, only one bit may be set), but one of the bits must be set. INFO_CARD_SHARE INFO_CARD_EXCL If either of these bits is set, the client will receive a CS_EVENT_REGISTRATION_COMPLETE event when Card Services has completed its internal client registration processing and after a sucessful call to csx_RequestSocketMask(9F). Also, if either of these bits is set, and if a card of the type that the client can control is currently inserted in the socket (and after a successful call to csx_RequestSocketMask(9F)), the client will receive an artificial CS_EVENT_CARD_INSERTION event. Event Mask This field is bit-mapped and specifies the client's global event mask. Card Services performs event notification based on this field. See csx_event_handler(9E) for valid event definitions and for additional information about handling events. event_callback_args The event_callback_args_t structure members are: void *client_data; The client_data field may be used to provide data available to the event handler (see csx_event_handler(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 CS_VERSION macro to specify to Card Services which version of Card Services the client expects. event_handler The client event callback handler entry point is passed in the event_handler field. iblk_cookie idev_cookie These fields must be used by the client to set up mutexes that are used in the client's event callback handler when handling high pri- ority events. dip The client must set this field with a pointer to the client's dip. driver_name The client must copy a driver-unique name into this member. This name must be identical across all instances of the driver. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_ATTRIBUTE No client type or more than one client type specified. CS_OUT_OF_RESOURCE Card Services is unable to register client. CS_BAD_VERSION Card Services version is incompatible with client. CS_BAD_HANDLE Client has already registered for this socket. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CONTEXT
This function may be called from user or kernel context. SEE ALSO
csx_DeregisterClient(9F), csx_RequestSocketMask(9F) PC Card 95 Standard, PCMCIA/JEIDA SunOS 5.10 19 Jul 1996 csx_RegisterClient(9F)
Man Page