Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#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);
Client handle returned from csx_RegisterClient(9F).
Pointer to a tuple_t structure.
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 illumos, but for portability with other Card Services implementations, it should be set to the logical socket number.
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
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_GetFirstTuple() or csx_GetNextTuple() request.
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.
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.
Successful operation.
Client handle is invalid.
No PC Card in socket.
No Card Information Structure (CIS) on PC card.
Desired tuple not found.
No PCMCIA hardware installed.