aboutsummaryrefslogtreecommitdiff
path: root/tools/usb/usbip/libsrc/usbip_host_driver.h
diff options
context:
space:
mode:
authorGravatar Valentina Manea <valentina.manea.m@gmail.com> 2014-08-20 07:30:59 +0300
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2014-08-25 10:38:56 -0700
commit588b48caf65c4a92af567948ec0025065e749ddf (patch)
tree6cf9771e522864db1685ffd7cabd31439fe93305 /tools/usb/usbip/libsrc/usbip_host_driver.h
parentMerge tag 'fixes-for-v3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-588b48caf65c4a92af567948ec0025065e749ddf.tar.gz
linux-588b48caf65c4a92af567948ec0025065e749ddf.tar.bz2
linux-588b48caf65c4a92af567948ec0025065e749ddf.zip
usbip: move usbip userspace code out of staging
At this point, USB/IP userspace code is fully functional and can be moved out of staging. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/usb/usbip/libsrc/usbip_host_driver.h')
-rw-r--r--tools/usb/usbip/libsrc/usbip_host_driver.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/tools/usb/usbip/libsrc/usbip_host_driver.h b/tools/usb/usbip/libsrc/usbip_host_driver.h
new file mode 100644
index 000000000000..2a31f855c616
--- /dev/null
+++ b/tools/usb/usbip/libsrc/usbip_host_driver.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2011 matt mooney <mfm@muteddisk.com>
+ * 2005-2007 Takahiro Hirofuchi
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __USBIP_HOST_DRIVER_H
+#define __USBIP_HOST_DRIVER_H
+
+#include <stdint.h>
+#include "usbip_common.h"
+#include "list.h"
+
+struct usbip_host_driver {
+ int ndevs;
+ /* list of exported device */
+ struct list_head edev_list;
+};
+
+struct usbip_exported_device {
+ struct udev_device *sudev;
+ int32_t status;
+ struct usbip_usb_device udev;
+ struct list_head node;
+ struct usbip_usb_interface uinf[];
+};
+
+extern struct usbip_host_driver *host_driver;
+
+int usbip_host_driver_open(void);
+void usbip_host_driver_close(void);
+
+int usbip_host_refresh_device_list(void);
+int usbip_host_export_device(struct usbip_exported_device *edev, int sockfd);
+struct usbip_exported_device *usbip_host_get_device(int num);
+
+#endif /* __USBIP_HOST_DRIVER_H */