staging: usbip: userspace: rename usbip device and interface
[deliverable/linux.git] / drivers / staging / usbip / userspace / libsrc / vhci_driver.h
1 /*
2 * Copyright (C) 2005-2007 Takahiro Hirofuchi
3 */
4
5 #ifndef _VHCI_DRIVER_H
6 #define _VHCI_DRIVER_H
7
8 #include "usbip.h"
9
10 #define USBIP_VHCI_BUS_TYPE "platform"
11
12 #define MAXNPORT 128
13
14 struct usbip_class_device {
15 char class_path[SYSFS_PATH_MAX];
16 char dev_path[SYSFS_PATH_MAX];
17 };
18
19 struct usbip_imported_device {
20 uint8_t port;
21 uint32_t status;
22
23 uint32_t devid;
24
25 uint8_t busnum;
26 uint8_t devnum;
27
28 /* usbip_class_device list */
29 struct dlist *cdev_list;
30 struct usbip_usb_device udev;
31 };
32
33 struct usbip_vhci_driver {
34 char sysfs_mntpath[SYSFS_PATH_MAX];
35
36 /* /sys/devices/platform/vhci_hcd */
37 struct sysfs_device *hc_device;
38
39 /* usbip_class_device list */
40 struct dlist *cdev_list;
41
42 int nports;
43 struct usbip_imported_device idev[MAXNPORT];
44 };
45
46
47 extern struct usbip_vhci_driver *vhci_driver;
48
49 int usbip_vhci_driver_open(void);
50 void usbip_vhci_driver_close(void);
51
52 int usbip_vhci_refresh_device_list(void);
53
54
55 int usbip_vhci_get_free_port(void);
56 int usbip_vhci_attach_device2(uint8_t port, int sockfd, uint32_t devid,
57 uint32_t speed);
58
59 /* will be removed */
60 int usbip_vhci_attach_device(uint8_t port, int sockfd, uint8_t busnum,
61 uint8_t devnum, uint32_t speed);
62
63 int usbip_vhci_detach_device(uint8_t port);
64 #endif
This page took 0.051049 seconds and 5 git commands to generate.