Lines Matching refs:tuple

551 	tuple_t		*tuple;
845 tuple = va_arg(arglist, tuple_t *);
847 retcode = cs_parse_tuple(ch, tuple, cisparse,
906 * ==== tuple and CIS handling section ====
912 * returns: CS_SUCCESS - if tuple parsed sucessfully
915 * CS_UNKNOWN_TUPLE - if unknown tuple passed to CIS parser
922 cs_parse_tuple(client_handle_t client_handle, tuple_t *tuple,
930 if ((ret = cs_get_socket(client_handle, &tuple->Socket,
945 if (!(tuple->CISOffset))
957 * to know whether this tuple came from the global CIS
964 tuple->CISOffset,
965 (tuple->Attributes & TUPLE_RETURN_NAME)?
984 * cs_get_firstnext_tuple - returns the first/next tuple of the specified type
1022 * On both a single-function card and a multi-function card, if the tuple
1026 * On a multi-function card, if the tuple comes from the function-specific
1038 * If a tuple has the CISTPLF_IGNORE_TUPLE flag set and the flags
1039 * parameter CIS_GET_LTUPLE_IGNORE is not set, that tuple will not
1040 * be returned to the caller. Instead, the next tuple that matches
1052 * CS_SUCCESS - if tuple sucessfully found and returned
1055 * CS_NO_MORE_ITEMS - if tuple not found or no more tuples
1063 tuple_t *tuple, uint32_t flags)
1070 if ((ret = cs_get_socket(client_handle, &tuple->Socket, &fn,
1101 if (tuple->Attributes & TUPLE_RETURN_IGNORED_TUPLES)
1109 * Initialize the tuple structure; we need this information when
1116 * macro to return the first tuple in the CIS list - we do this
1121 * always have at least a CISTPL_LONGLINK_MFC tuple in the global
1125 if ((tuple->CISOffset =
1132 tuple->CISOffset = sp->cis[0].cis;
1138 * Check to be sure that we have a non-NULL tuple list pointer.
1140 * with get next tuple requests but we don't have any more
1143 if (tuple->CISOffset == NULL) {
1149 * Point to the next tuple in the list. If we're searching for
1150 * a particular tuple, FIND_LTUPLE_FWD will find it.
1157 if ((tp = GET_NEXT_TUPLE(tuple->CISOffset, flags)) == NULL) {
1159 if ((tuple->CISOffset->flags & CISTPLF_GLOBAL_CIS) &&
1169 if ((tuple->CISOffset = tp) == NULL) {
1176 * Check if we want to get the first of a particular type of tuple
1177 * or just the first tuple in the chain.
1183 if (tuple->DesiredTuple != RETURN_FIRST_TUPLE) {
1186 if ((tp = FIND_LTUPLE_FWD(tuple->CISOffset,
1187 tuple->DesiredTuple, flags)) == NULL) {
1189 if ((tuple->CISOffset->flags & CISTPLF_GLOBAL_CIS) &&
1192 tuple->DesiredTuple, flags);
1200 if ((tuple->CISOffset = tp) == NULL) {
1207 * We've got a tuple, now fill out the rest of the tuple_t
1209 * determine whether or not the tuple data was copied
1212 tuple->Flags = tuple->CISOffset->flags;
1213 tuple->TupleCode = tuple->CISOffset->type;
1214 tuple->TupleLink = tuple->CISOffset->len;
1215 tuple->TupleDataLen = tuple->CISOffset->len;
1223 * cs_get_tuple_data - get the data portion of a tuple; this is to
1226 * Note that if the data body of a tuple was not read from the CIS,
1237 cs_get_tuple_data(client_handle_t client_handle, tuple_t *tuple)
1247 if ((ret = cs_get_socket(client_handle, &tuple->Socket, &fn,
1267 if (!(tuple->CISOffset)) {
1273 * Since the tuple data buffer that the caller calls us with
1276 * actual size of the tuple data buffer in the structure.
1278 tuple->TupleDataMax = sizeof (tuple->TupleData);
1282 * tuple data body nor past the end of the user-supplied
1285 if ((int)tuple->TupleOffset >= min((int)tuple->TupleLink,
1286 (int)tuple->TupleDataMax)) {
1291 tuple->TupleDataLen = tuple->TupleLink;
1293 if ((nbytes = min((int)tuple->TupleDataMax -
1294 (int)tuple->TupleOffset,
1295 (int)tuple->TupleDataLen -
1296 (int)tuple->TupleOffset)) < 1) {
1302 * The tuple data destination is always the tuple_t->TupleData
1304 * tuple data from.
1306 tdd = tuple->TupleData;
1307 bzero((caddr_t)tdd, sizeof (tuple->TupleData));
1310 * Do we have a copy of the tuple data? If not, we have to
1311 * get a pointer to the CIS and read the tuple data from the
1314 switch (tuple->CISOffset->flags & CISTPLF_SPACE_MASK) {
1316 tsd = (tuple->CISOffset->data +
1317 (unsigned)tuple->TupleOffset);
1323 newoffset = tuple->CISOffset->offset;
1327 * address offset to point to the start of the tuple
1330 * tuple->CISOffset->offset offset to point to the
1331 * start of the tuple.
1333 if (tuple->CISOffset->flags & CISTPLF_AM_SPACE) {
1335 newoffset += ((tuple->TupleOffset * 2) + 4);
1338 newoffset += (tuple->TupleOffset + 2);
1351 if (tuple->CISOffset->flags & CISTPLF_AM_SPACE)
1417 * looking at the various flags and tuple/chain counts that were already