1csx_GetFirstTuple(9F)    Kernel Functions for Drivers    csx_GetFirstTuple(9F)
2
3
4

NAME

6       csx_GetFirstTuple, csx_GetNextTuple - return Card Information Structure
7       tuple
8

SYNOPSIS

10       #include <sys/pccard.h>
11
12
13
14       int32_t csx_GetFirstTuple(client_handle_t ch, tuple_t *tu);
15
16
17       int32_t csx_GetNextTuple(client_handle_t ch, tuple_t *tu);
18
19

INTERFACE LEVEL

21       Solaris DDI Specific (Solaris DDI)
22

PARAMETERS

24       ch    Client handle returned from csx_RegisterClient(9F).
25
26
27       tu    Pointer to a tuple_t structure.
28
29

DESCRIPTION

31       The functions csx_GetFirstTuple()  and  csx_GetNextTuple()  return  the
32       first  and  next tuple, respectively, of the specified type in the Card
33       Information Structure (CIS) for the specified socket.
34

STRUCTURE MEMBERS

36       The structure members of tuple_t are:
37
38         uint32_t    Socket;        /* socket number */
39         uint32_t    Attributes;    /* Attributes */
40         cisdata_t   DesiredTuple;  /* tuple to search for or flags */
41         cisdata_t   TupleCode;     /* tuple type code */
42         cisdata_t   TupleLink;     /* tuple data body size */
43
44
45
46       The fields are defined as follows:
47
48       Socket                 Not used in Solaris, but  for  portability  with
49                              other  Card  Services implementations, it should
50                              be set to the logical socket number.
51
52
53       Attributes             This field is bit-mapped. The following bits are
54                              defined:
55
56                              TUPLE_RETURN_LINK
57
58                                  Return link tuples if set. The following are
59                                  link tuples and will  only  be  returned  by
60                                  this  function  if the TUPLE_RETURN_LINK bit
61                                  in the Attributes field is set:
62
63                                         CISTPL_NULL    CISTPL_LONGLINK_MFC
64                                         CISTPL_LONGLINK_A   CISTPL_LINKTARGET
65                                         CISTPL_LONGLINK_C   CISTPL_NO_LINK
66                                         CISTPL_LONGLINK_CB  CISTPL_END
67
68
69
70                              TUPLE_RETURN_IGNORED_TUPLES
71
72                                  Return ignored tuples if set. Ignored tuples
73                                  will  be  returned  by  this function if the
74                                  TUPLE_RETURN_IGNORED_TUPLES   bit   in   the
75                                  Attributes  field  is set, see tuple(9S) for
76                                  more information. The CIS is parsed from the
77                                  location setup by the previous csx_GetFirst‐
78                                  Tuple() or csx_GetNextTuple() request.
79
80
81
82       DesiredTuple           This field is the tuple value desired. If it  is
83                              RETURN_FIRST_TUPLE,  the very first tuple of the
84                              CIS is returned (if it exists). If this field is
85                              set to RETURN_NEXT_TUPLE, the very next tuple of
86                              the CIS is  returned  (if  it  exists).  If  the
87                              DesiredTuple  field is any other value on entry,
88                              the CIS is searched in an attempt  to  locate  a
89                              tuple which matches.
90
91
92       TupleCode,TupleLink    These  fields  are  the values returned from the
93                              tuple found. If there are no tuples on the card,
94                              CS_NO_MORE_ITEMS is returned.
95
96
97
98       Since  the  csx_GetFirstTuple(),  csx_GetNextTuple(), and csx_GetTuple‐
99       Data(9F) functions all share the same tuple_t structure, some fields in
100       the tuple_t structure are unused or reserved when calling this function
101       and these fields must not be initialized by the client.
102

RETURN VALUES

104       CS_SUCCESS                 Successful operation.
105
106
107       CS_BAD_HANDLE              Client handle is invalid.
108
109
110       CS_NO_CARD                 No PC Card in socket.
111
112
113       CS_NO_CIS                  No Card Information Structure  (CIS)  on  PC
114                                  card.
115
116
117       CS_NO_MORE_ITEMS           Desired tuple not found.
118
119
120       CS_UNSUPPORTED_FUNCTION    No PCMCIA hardware installed.
121
122

CONTEXT

124       These functions may be called from user or kernel context.
125

SEE ALSO

127       csx_GetTupleData(9F),    csx_ParseTuple(9F),    csx_RegisterClient(9F),
128       csx_ValidateCIS(9F), tuple(9S)
129
130
131       PC Card 95Standard, PCMCIA/JEIDA
132
133
134
135SunOS 5.11                        20 Dec 1996            csx_GetFirstTuple(9F)
Impressum