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

NAME

6       csx_RegisterClient - register a client
7

SYNOPSIS

9       #include <sys/pccard.h>
10
11
12
13       int32_t csx_RegisterClient(client_handle_t *ch, client_reg_t *cr);
14
15

INTERFACE LEVEL

17       Solaris DDI Specific (Solaris DDI)
18

PARAMETERS

20       ch    Pointer to a client_handle_t structure.
21
22
23       mc    Pointer to a client_reg_t structure.
24
25

DESCRIPTION

27       This  function  registers  a  client  with  Card Services and returns a
28       unique client handle for the client. The client handle must  be  passed
29       to csx_DeregisterClient(9F) when the client terminates.
30

STRUCTURE MEMBERS

32       The structure members of client_reg_t are:
33
34          uint32_t                 Attributes;
35           uint32_t                 EventMask;
36           event_callback_args_t    event_callback_args;
37           uint32_t                 Version;             /* CS version to expect */
38           csfunction_t             *event_handler;
39           ddi_iblock_cookie_t      *iblk_cookie;        /* event iblk cookie */
40           ddi_idevice_cookie_t     *idev_cookie;        /* event idev cookie */
41           dev_info_t               *dip;                /* client's dip */
42           char                     driver_name[MODMAXNAMELEN];
43
44
45
46       The fields are defined as follows:
47
48       Attributes             This field is bit-mapped and defined as follows:
49
50                              INFO_MEM_CLIENT
51
52                                  Memory client device driver.
53
54
55                              INFO_MTD_CLIENT
56
57                                  Memory Technology Driver client.
58
59
60                              INFO_IO_CLIENT
61
62                                  IO client device driver.
63
64
65                              INFO_CARD_SHARE
66
67                                  Generate  artificial CS_EVENT_CARD_INSERTION
68                                  and CS_EVENT_REGISTRATION_COMPLETE events.
69
70
71                              INFO_CARD_EXCL
72
73                                  Generate artificial  CS_EVENT_CARD_INSERTION
74                                  and CS_EVENT_REGISTRATION_COMPLETE events.
75
76                                  INFO_MEM_CLIENT
77                                  INFO_MTD_CLIENT
78                                  INFO_IO_CLIENT
79
80                                      These  bits are mutually exclusive (that
81                                      is, only one bit may be set), but one of
82                                      the bits must be set.
83
84
85                                  INFO_CARD_SHARE
86                                  INFO_CARD_EXCL
87
88                                      If  either  of  these  bits  is set, the
89                                      client will receive a CS_EVENT_REGISTRA‐
90                                      TION_COMPLETE  event  when Card Services
91                                      has completed its internal client regis‐
92                                      tration processing and after a sucessful
93                                      call to csx_RequestSocketMask(9F).
94
95                                      Also, if either of these  bits  is  set,
96                                      and  if  a  card  of  the  type that the
97                                      client can control is currently inserted
98                                      in  the  socket  (and after a successful
99                                      call to csx_RequestSocketMask(9F)),  the
100                                      client   will   receive   an  artificial
101                                      CS_EVENT_CARD_INSERTION event.
102
103
104
105
106       Event Mask             This  field  is  bit-mapped  and  specifies  the
107                              client's  global  event mask. Card Services per‐
108                              forms event notification based  on  this  field.
109                              See  csx_event_handler(9E) for valid event defi‐
110                              nitions and  for  additional  information  about
111                              handling events.
112
113
114       event_callback_args    The event_callback_args_t structure members are:
115
116                                    void     *client_data;
117
118                              The  client_data  field  may  be used to provide
119                              data  available  to  the  event   handler   (see
120                              csx_event_handler(9E)).  Typically,  this is the
121                              client driver's soft state pointer.
122
123
124       Version                This field contains the specific  Card  Services
125                              version  number  that the client expects to use.
126                              Typically, the client will  use  the  CS_VERSION
127                              macro  to specify to Card Services which version
128                              of Card Services the client expects.
129
130
131       event_handler          The client event callback handler entry point is
132                              passed in the event_handler field.
133
134
135       iblk_cookie            These  fields  must be used by the client to set
136       idev_cookie            up mutexes that are used in the  client's  event
137                              callback  handler  when  handling  high priority
138                              events.
139
140
141       dip                    The client must set this field with a pointer to
142                              the client's dip.
143
144
145       driver_name            The  client  must copy a driver-unique name into
146                              this member. This name must be identical  across
147                              all instances of the driver.
148
149

RETURN VALUES

151       CS_SUCCESS                 Successful operation.
152
153
154       CS_BAD_ATTRIBUTE           No  client type or more than one client type
155                                  specified.
156
157
158       CS_OUT_OF_RESOURCE         Card Services is unable to register client.
159
160
161       CS_BAD_VERSION             Card Services version is  incompatible  with
162                                  client.
163
164
165       CS_BAD_HANDLE              Client   has  already  registered  for  this
166                                  socket.
167
168
169       CS_UNSUPPORTED_FUNCTION    No PCMCIA hardware installed.
170
171

CONTEXT

173       This function may be called from user or kernel context.
174

SEE ALSO

176       csx_DeregisterClient(9F), csx_RequestSocketMask(9F)
177
178
179       PC Card 95 Standard, PCMCIA/JEIDA
180
181
182
183SunOS 5.11                        19 Jul 1996           csx_RegisterClient(9F)
Impressum