1 '\" te 2 .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved 3 .\" 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. 4 .\" 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. 5 .\" 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] 6 .TH CSX_GETTUPLEDATA 9F "Dec 20, 1996" 7 .SH NAME 8 csx_GetTupleData \- return the data portion of a tuple 9 .SH SYNOPSIS 10 .LP 11 .nf 12 #include <sys/pccard.h> 13 14 15 16 \fBint32_t\fR \fBcsx_GetTupleData\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR); 17 .fi 18 19 .SH INTERFACE LEVEL 20 .sp 21 .LP 22 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR 23 .SH PARAMETERS 24 .sp 25 .ne 2 26 .na 27 \fB\fIch\fR\fR 28 .ad 29 .RS 6n 30 Client handle returned from \fBcsx_RegisterClient\fR(9F). 31 .RE 32 33 .sp 34 .ne 2 35 .na 36 \fB\fItu\fR\fR 37 .ad 38 .RS 6n 39 Pointer to a \fBtuple_t\fR structure. 40 .RE 41 42 .SH DESCRIPTION 43 .sp 44 .LP 45 This function returns the data portion of a tuple, as returned by the 46 \fBcsx_GetFirstTuple\fR(9F) and \fBcsx_GetNextTuple\fR(9F) functions. 47 .SH STRUCTURE MEMBERS 48 .sp 49 .LP 50 The structure members of \fBtuple_t\fR are: 51 .sp 52 .LP 53 The fields are defined as follows: 54 .sp 55 .in +2 56 .nf 57 uint32_t Socket; /* socket number */ 58 uint32_t Attributes; /* tuple attributes*/ 59 cisdata_t DesiredTuple; /* tuple to search for*/ 60 cisdata_t TupleOffset; /* tuple data offset*/ 61 cisdata_t TupleDataMax; /* max tuple data size*/ 62 cisdata_t TupleDataLen; /* actual tuple data length*/ 63 cisdata_t TupleData[CIS_MAX_TUPLE_DATA_LEN];/* tuple body data buffer*/ 64 cisdata_t TupleCode; /* tuple type code*/ 65 cisdata_t TupleLink; /* tuple link */ 66 .fi 67 .in -2 68 69 .sp 70 .ne 2 71 .na 72 \fB\fBSocket\fR\fR 73 .ad 74 .RS 16n 75 Not used in Solaris, but for portability with other Card Services 76 implementations, it should be set to the logical socket number. 77 .RE 78 79 .sp 80 .ne 2 81 .na 82 \fB\fBAttributes\fR\fR 83 .ad 84 .RS 16n 85 Initialized by \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F); the 86 client must not modify the value in this field. 87 .RE 88 89 .sp 90 .ne 2 91 .na 92 \fB\fBDesiredTuple\fR\fR 93 .ad 94 .RS 16n 95 Initialized by \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F); the 96 client must not modify the value in this field. 97 .RE 98 99 .sp 100 .ne 2 101 .na 102 \fB\fBTupleOffset\fR\fR 103 .ad 104 .RS 16n 105 This field allows partial tuple information to be retrieved, starting anywhere 106 within the tuple. 107 .RE 108 109 .sp 110 .ne 2 111 .na 112 \fB\fBTupleDataMax\fR\fR 113 .ad 114 .RS 16n 115 This field is the size of the tuple data buffer that Card Services uses to 116 return raw tuple data from \fBcsx_GetTupleData\fR. It can be larger than the 117 number of bytes in the tuple data body. Card Services ignores any value placed 118 here by the client. 119 .RE 120 121 .sp 122 .ne 2 123 .na 124 \fB\fBTupleDataLen\fR\fR 125 .ad 126 .RS 16n 127 This field is the actual size of the tuple data body. It represents the number 128 of tuple data body bytes returned. 129 .RE 130 131 .sp 132 .ne 2 133 .na 134 \fB\fBTupleData\fR\fR 135 .ad 136 .RS 16n 137 This field is an array of bytes containing the raw tuple data body contents. 138 .RE 139 140 .sp 141 .ne 2 142 .na 143 \fB\fBTupleCode\fR\fR 144 .ad 145 .RS 16n 146 Initialized by \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F); the 147 client must not modify the value in this field. 148 .RE 149 150 .sp 151 .ne 2 152 .na 153 \fB\fBTupleLink\fR\fR 154 .ad 155 .RS 16n 156 Initialized by \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F); the 157 client must not modify the value in this field. 158 .RE 159 160 .SH RETURN VALUES 161 .sp 162 .ne 2 163 .na 164 \fB\fBCS_SUCCESS\fR\fR 165 .ad 166 .RS 27n 167 Successful operation. 168 .RE 169 170 .sp 171 .ne 2 172 .na 173 \fB\fBCS_BAD_HANDLE\fR\fR 174 .ad 175 .RS 27n 176 Client handle is invalid. 177 .RE 178 179 .sp 180 .ne 2 181 .na 182 \fB\fBCS_BAD_ARGS\fR\fR 183 .ad 184 .RS 27n 185 Data from prior \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F) is 186 corrupt. 187 .RE 188 189 .sp 190 .ne 2 191 .na 192 \fB\fBCS_NO_CARD\fR\fR 193 .ad 194 .RS 27n 195 No \fBPC \fRCard in socket. 196 .RE 197 198 .sp 199 .ne 2 200 .na 201 \fB\fBCS_NO_CIS\fR\fR 202 .ad 203 .RS 27n 204 No Card Information Structure (CIS) on \fBPC \fRCard. 205 .RE 206 207 .sp 208 .ne 2 209 .na 210 \fB\fBCS_NO_MORE_ITEMS\fR\fR 211 .ad 212 .RS 27n 213 Card Services was not able to read the tuple from the \fBPC \fRCard. 214 .RE 215 216 .sp 217 .ne 2 218 .na 219 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR 220 .ad 221 .RS 27n 222 No \fBPCMCIA \fRhardware installed. 223 .RE 224 225 .SH CONTEXT 226 .sp 227 .LP 228 This function may be called from user or kernel context. 229 .SH SEE ALSO 230 .sp 231 .LP 232 \fBcsx_GetFirstTuple\fR(9F), \fBcsx_ParseTuple\fR(9F), 233 \fBcsx_RegisterClient\fR(9F), \fBcsx_ValidateCIS\fR(9F), \fBtuple\fR(9S) 234 .sp 235 .LP 236 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR