3 * Copyright (c) 2016, Oracle and/or its affiliates.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef LIBUSB_SUNOS_H
21 #define LIBUSB_SUNOS_H
23 #include <libdevinfo.h>
30 typedef struct sunos_device_priv {
31 uint8_t cfgvalue; /* active config value */
32 uint8_t *raw_cfgdescr; /* active config descriptor */
33 struct libusb_device_descriptor dev_descr; /* usb device descriptor */
34 char *ugenpath; /* name of the ugen(4) node */
35 char *phypath; /* physical path */
38 typedef struct endpoint {
39 int datafd; /* data file */
40 int statfd; /* state file */
43 typedef struct sunos_device_handle_priv {
44 uint8_t altsetting[USB_MAXINTERFACES]; /* a interface's alt */
46 sunos_ep_priv_t eps[USB_MAXENDPOINTS];
47 sunos_dev_priv_t *dpriv; /* device private */
48 } sunos_dev_handle_priv_t;
50 typedef struct sunos_transfer_priv {
52 struct libusb_transfer *transfer;
56 struct libusb_context *ctx;
57 struct discovered_devs **discdevs;
58 const char *last_ugenpath;
59 di_devlink_handle_t dlink_hdl;
62 struct devlink_cbarg {
63 struct node_args *nargs; /* di node walk arguments */
64 di_node_t myself; /* the di node */
68 typedef struct walk_link {
74 /* AIO callback args */
75 struct aio_callback_args{
76 struct libusb_transfer *transfer;
80 #endif /* LIBUSB_SUNOS_H */