csx_GetTupleData - return the data portion of a tuple
#include <sys/pccard.h>
int32_t csx_GetTupleData(client_handle_t ch, tuple_t *tu);
illumos DDI Specific (illumos DDI)
ch
tu
Pointer to a tuple_t structure.
The structure members of tuple_t are:
The fields are defined as follows:
uint32_t Socket; /* socket number */
uint32_t Attributes; /* tuple attributes*/
cisdata_t DesiredTuple; /* tuple to search for*/
cisdata_t TupleOffset; /* tuple data offset*/
cisdata_t TupleDataMax; /* max tuple data size*/
cisdata_t TupleDataLen; /* actual tuple data length*/
cisdata_t TupleData[CIS_MAX_TUPLE_DATA_LEN];/* tuple body data buffer*/
cisdata_t TupleCode; /* tuple type code*/
cisdata_t TupleLink; /* tuple link */
Socket
Not used in illumos, but for portability with other Card
Services implementations, it should be set to the logical socket number.
Attributes
DesiredTuple
TupleOffset
This field allows partial tuple information to be
retrieved, starting anywhere within the tuple.
TupleDataMax
This field is the size of the tuple data buffer that Card
Services uses to return raw tuple data from csx_GetTupleData. It can be
larger than the number of bytes in the tuple data body. Card Services ignores
any value placed here by the client.
TupleDataLen
This field is the actual size of the tuple data body. It
represents the number of tuple data body bytes returned.
TupleData
This field is an array of bytes containing the raw tuple
data body contents.
TupleCode
TupleLink
CS_SUCCESS
Successful operation.
CS_BAD_HANDLE
Client handle is invalid.
CS_BAD_ARGS
CS_NO_CARD
No PC Card in socket.
CS_NO_CIS
No Card Information Structure (CIS) on PC
Card.
CS_NO_MORE_ITEMS
Card Services was not able to read the tuple from the
PC Card.
CS_UNSUPPORTED_FUNCTION
No PCMCIA hardware installed.
This function may be called from user or kernel context.