Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

csx_getnexttuple(9f) [sunos man page]

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

NAME
csx_GetFirstTuple, csx_GetNextTuple - return Card Information Structure tuple SYNOPSIS
#include <sys/pccard.h> int32_t csx_GetFirstTuple(client_handle_t ch, tuple_t *tu); int32_t csx_GetNextTuple(client_handle_t ch, tuple_t *tu); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Client handle returned from csx_RegisterClient(9F). tu Pointer to a tuple_t structure. DESCRIPTION
The functions csx_GetFirstTuple() and csx_GetNextTuple() return the first and next tuple, respectively, of the specified type in the Card Information Structure (CIS) for the specified socket. STRUCTURE MEMBERS
The structure members of tuple_t are: uint32_t Socket; /* socket number */ uint32_t Attributes; /* Attributes */ cisdata_t DesiredTuple; /* tuple to search for or flags */ cisdata_t TupleCode; /* tuple type code */ cisdata_t TupleLink; /* tuple data body size */ 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 number. Attributes This field is bit-mapped. The following bits are defined: TUPLE_RETURN_LINK Return link tuples if set. The following are link tuples and will only be returned by this function if the TUPLE_RETURN_LINK bit in the Attributes field is set: CISTPL_NULL CISTPL_LONGLINK_MFC CISTPL_LONGLINK_A CISTPL_LINKTARGET CISTPL_LONGLINK_C CISTPL_NO_LINK CISTPL_LONGLINK_CB CISTPL_END TUPLE_RETURN_IGNORED_TUPLES Return ignored tuples if set. Ignored tuples will be returned by this function if the TUPLE_RETURN_IGNORED_TUPLES bit in the Attributes field is set, see tuple(9S) for more information. The CIS is parsed from the location setup by the previous csx_Get- FirstTuple() or csx_GetNextTuple() request. DesiredTuple This field is the tuple value desired. If it is RETURN_FIRST_TUPLE, the very first tuple of the CIS is returned (if it exists). If this field is set to RETURN_NEXT_TUPLE, the very next tuple of the CIS is returned (if it exists). If the DesiredTuple field is any other value on entry, the CIS is searched in an attempt to locate a tuple which matches. TupleCode,TupleLink These fields are the values returned from the tuple found. If there are no tuples on the card, CS_NO_MORE_ITEMS is returned. Since the csx_GetFirstTuple(), csx_GetNextTuple(), and csx_GetTupleData(9F) functions all share the same tuple_t structure, some fields in the tuple_t structure are unused or reserved when calling this function and these fields must not be initialized by the client. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_HANDLE Client handle is invalid. CS_NO_CARD No PC Card in socket. CS_NO_CIS No Card Information Structure (CIS) on PC card. CS_NO_MORE_ITEMS Desired tuple not found. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CONTEXT
These functions may be called from user or kernel context. SEE ALSO
csx_GetTupleData(9F), csx_ParseTuple(9F), csx_RegisterClient(9F), csx_ValidateCIS(9F), tuple(9S) PC Card 95Standard, PCMCIA/JEIDA SunOS 5.10 20 Dec 1996 csx_GetFirstTuple(9F)

Check Out this Related Man Page

tuple(9S)						    Data Structures for Drivers 						 tuple(9S)

NAME
tuple - card information structure (CIS) access structure SYNOPSIS
#include <sys/pccard.h> INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) DESCRIPTION
The tuple_t structure is the basic data structure provided by card services to manage PC card information. A PC card provides identifica- tion and configuration information through its card information structure (CIS). A PC card driver accesses a PC card's CIS through various card services functions. The CIS information allows PC cards to be self-identifying: the CIS provides information to the system so that it can identify the proper PC card driver for the PC card, and provides configuration information so that the driver can allocate appropriate resources to configure the PC card for proper operation in the system. The CIS information is contained on the PC card in a linked list of tuple data structures called a CIS chain. Each tuple has a one-byte type and a one-byte link, an offset to the next tuple in the list. A PC card can have one or more CIS chains. A multi-function PC card that complies with the PC Card 95 MultiFunction Metaformat specification will have one or more global CIS chains that collectively are referred to as the global CIS. These PC Cards will also have one or more per-function CIS chains. Each per-function collection of CIS chains is referred to as a function-specific CIS. To examine a PC card's CIS, first a PC card driver must locate the desired tuple by calling csx_GetFirstTuple(9F). Once the first tuple is located, subsequent tuples may be located by calling csx_GetNextTuple(9F). See csx_GetFirstTuple(9F). The linked list of tuples may be inspected one by one, or the driver may narrow the search by requesting only tuples of a particular type. Once a tuple has been located, the PC card driver may inspect the tuple data. The most convenient way to do this for standard tuples is by calling one of the number of tuple-parsing utility functions; for custom tuples, the driver may get access to the raw tuple data by calling csx_GetTupleData(9F). Solaris PC card drivers do not need to be concerned with which CIS chain a tuple appears in. On a multi-function PC card, the client will get the tuples from the global CIS followed by the tuples in the function-specific CIS. The caller will not get any tuples from a function- specific CIS that does not belong to the caller's function. STRUCTURE MEMBERS
The structure members of tuple_t are: 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]; /* body tuple data */ cisdata_t TupleCode; /* tuple type code */ cisdata_t TupleLink; /* tuple link */ 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 number. Attributes This field is bit-mapped. The following bits are defined: TUPLE_RETURN_LINK Return link tuples if set. TUPLE_RETURN_IGNORED_TUPLES Return ignored tuples if set. Ignored tuples are those tuples in a multi-function PC card's global CIS chain that are duplicates of the same tuples in a function-specific CIS chain. TUPLE_RETURN_NAME Return tuple name string using the csx_ParseTuple(9F) function if set. DesiredTuple This field is the requested tuple type code to be returned when calling csx_GetFirstTuple(9F) or csx_GetNextTuple(9F). RETURN_FIRST_TUPLE is used to return the first tuple regardless of tuple type. RETURN_NEXT_TUPLE is used to return the next tuple regardless of tuple type. TupleOffset This field allows partial tuple information to be retrieved, starting at the specified offset within the tuple. This field must only be set before calling csx_GetTupleData(9F). TupleDataMax This field is the size of the tuple data buffer that card services uses to return raw tuple data from csx_GetTupleData(9F). 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 by csx_GetTupleData(9F). TupleData This field is an array of bytes containing the raw tuple data body contents returned by csx_GetTupleData(9F). TupleCode This field is the tuple type code and is returned by csx_GetFirstTuple(9F) or csx_GetNextTuple(9F) when a tuple matching the DesiredTuple field is returned. TupleLink This field is the tuple link, the offset to the next tuple, and is returned by csx_GetFirstTuple(9F) or csx_GetNext- Tuple(9F) when a tuple matching the DesiredTuple field is returned. SEE ALSO
csx_GetFirstTuple(9F), csx_GetTupleData(9F), csx_ParseTuple(9F), csx_Parse_CISTPL_BATTERY(9F), csx_Parse_CISTPL_BYTEORDER(9F), csx_Parse_CISTPL_CFTABLE_ENTRY(9F), csx_Parse_CISTPL_CONFIG(9F), csx_Parse_CISTPL_DATE(9F), csx_Parse_CISTPL_DEVICE(9F), csx_Parse_CISTPL_FUNCE(9F), csx_Parse_CISTPL_FUNCID(9F), csx_Parse_CISTPL_JEDEC_C(9F), csx_Parse_CISTPL_MANFID(9F), csx_Parse_CISTPL_SPCL(9F), csx_Parse_CISTPL_VERS_1(9F), csx_Parse_CISTPL_VERS_2(9F) PC Card 95 Standard, PCMCIA/JEIDA SunOS 5.10 20 Dec 1996 tuple(9S)
Man Page