'\" te .\" 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] .TH CSX_GETFIRSTTUPLE 9F "Dec 20, 1996" .SH NAME csx_GetFirstTuple, csx_GetNextTuple \- return Card Information Structure tuple .SH SYNOPSIS .nf #include \fBint32_t\fR \fBcsx_GetFirstTuple\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR); .fi .LP .nf \fBint32_t\fR \fBcsx_GetNextTuple\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR); .fi .SH INTERFACE LEVEL illumos \fBDDI \fRSpecific (illumos \fBDDI) \fR .SH PARAMETERS .ne 2 .na \fB\fIch\fR\fR .ad .RS 6n Client handle returned from \fBcsx_RegisterClient\fR(9F). .RE .sp .ne 2 .na \fB\fItu\fR\fR .ad .RS 6n Pointer to a \fBtuple_t\fR structure. .RE .SH DESCRIPTION The functions \fBcsx_GetFirstTuple()\fR and \fBcsx_GetNextTuple()\fR return the first and next tuple, respectively, of the specified type in the Card Information Structure (CIS) for the specified socket. .SH STRUCTURE MEMBERS The structure members of \fBtuple_t\fR are: .sp .in +2 .nf 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 */ .fi .in -2 .sp .LP The fields are defined as follows: .sp .ne 2 .na \fB\fBSocket\fR\fR .ad .RS 23n Not used in illumos, but for portability with other Card Services implementations, it should be set to the logical socket number. .RE .sp .ne 2 .na \fB\fBAttributes\fR\fR .ad .RS 23n This field is bit-mapped. The following bits are defined: .sp .ne 2 .na \fBTUPLE_RETURN_LINK\fR .ad .sp .6 .RS 4n Return link tuples if set. The following are link tuples and will only be returned by this function if the \fBTUPLE_RETURN_LINK\fR bit in the \fBAttributes\fR field is set: .sp .in +2 .nf CISTPL_NULL CISTPL_LONGLINK_MFC CISTPL_LONGLINK_A CISTPL_LINKTARGET CISTPL_LONGLINK_C CISTPL_NO_LINK CISTPL_LONGLINK_CB CISTPL_END .fi .in -2 .RE .sp .ne 2 .na \fBTUPLE_RETURN_IGNORED_TUPLES\fR .ad .sp .6 .RS 4n Return ignored tuples if set. Ignored tuples will be returned by this function if the \fBTUPLE_RETURN_IGNORED_TUPLES\fR bit in the \fBAttributes\fR field is set, see \fBtuple\fR(9S) for more information. The \fBCIS \fRis parsed from the location setup by the previous \fBcsx_GetFirstTuple()\fR or \fBcsx_GetNextTuple()\fR request. .RE .RE .sp .ne 2 .na \fB\fBDesiredTuple\fR\fR .ad .RS 23n This field is the tuple value desired. If it is \fBRETURN_FIRST_TUPLE,\fR the very first tuple of the \fBCIS \fRis returned (if it exists). If this field is set to \fBRETURN_NEXT_TUPLE,\fR the very next tuple of the \fBCIS \fRis returned (if it exists). If the \fBDesiredTuple\fR field is any other value on entry, the \fBCIS \fRis searched in an attempt to locate a tuple which matches. .RE .sp .ne 2 .na \fB\fBTupleCode,TupleLink\fR\fR .ad .RS 23n These fields are the values returned from the tuple found. If there are no tuples on the card, \fBCS_NO_MORE_ITEMS\fR is returned. .RE .sp .LP Since the \fBcsx_GetFirstTuple()\fR, \fBcsx_GetNextTuple()\fR, and \fBcsx_GetTupleData\fR(9F) functions all share the same \fBtuple_t\fR structure, some fields in the \fBtuple_t\fR structure are unused or reserved when calling this function and these fields must not be initialized by the client. .SH RETURN VALUES .ne 2 .na \fB\fBCS_SUCCESS\fR\fR .ad .RS 27n Successful operation. .RE .sp .ne 2 .na \fB\fBCS_BAD_HANDLE\fR\fR .ad .RS 27n Client handle is invalid. .RE .sp .ne 2 .na \fB\fBCS_NO_CARD\fR\fR .ad .RS 27n No \fBPC \fRCard in socket. .RE .sp .ne 2 .na \fB\fBCS_NO_CIS\fR\fR .ad .RS 27n No Card Information Structure (CIS) on \fBPC \fRcard. .RE .sp .ne 2 .na \fB\fBCS_NO_MORE_ITEMS\fR\fR .ad .RS 27n Desired tuple not found. .RE .sp .ne 2 .na \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR .ad .RS 27n No \fBPCMCIA \fRhardware installed. .RE .SH CONTEXT These functions may be called from user or kernel context. .SH SEE ALSO .BR csx_GetTupleData (9F), .BR csx_ParseTuple (9F), .BR csx_RegisterClient (9F), .BR csx_ValidateCIS (9F), .BR tuple (9S) .sp .LP \fIPC Card \fR\fI95Standard,\fR PCMCIA/JEIDA