Dear all,
This series of patches introduces WebSocket to USB/IP.
0. Version info
v4)
# Fixed regression of usbip list --remote
v3)
# Coding style for goto err labels are fixed.
# Defined magic numbers for open_hc_device() argument.
# Corrected include .../uapi/linux/usbip_ux.h as linux/usbip_ux.h.
# Modified parameter notation in manuals not to use '='.
# Fixed inappropriate version definition in
tools/.../websocket/configure.ac.
# Remved unnecessary COPYING and AUTHORS fil from tools/.../websocket/.
# Added -version-info to libraries in tools/.../src.
v2)
# Formatted patches from linux-next.
# Fixed change log word wrapping.
# Removed SSL patches.
# Fixed a bug that vendor and product names are not shown by 'usbws
list -l' because usbip_names_init() was not called in libusbip.la.
1. Features included
It also includes some independent features effective in themselves.
1) Exporting devices
Export request and response PDU had been defined in a header but not
been used.
Now it works!
Also, it supports senarios, for example, connect ubiquetous devices to
a Linux based cloud service.
In this senario, it's needed to establish connection from a device
inside of firewall to a service outside. Exporting is suit for the
senario.
2) User space transmission
USB/IP transfer URBs in kernel space. It's better for performance but
difficult to introduce application protocols.
Like fuse for file systems, it allows to transfer URBs in user space.
When usbip_ux.ko is loaded, it replaces kernel_sendmsg() and
kernel_recvmsg() with user spcace interface. When USB/IP utilities find
usbip_ux.ko, they start threads to read/write PDUs from/to usbip_ux.ko
and send/recv them.
3) Replaceable protocols
Both transmission(send/receive) and connection establishment are
replaceable.
4) a WebSocket implementation
It's made with Poco C++. DNS and proxy client are supported.
I published scripts I used while developed the patches.
http://linux-usbip-additions.blogspot.jp/2015/03/scripts-to-patch-and-ma
ke-locally.html
http://linux-usbip-additions.blogspot.jp/2015/03/test-scripts.html
2. Why WebSocket?
It allows to use USB/IP in internet. WebSocket is widely used to
encapsulate packets in HTTP and to carry them through firewall using
HTTP port numbers.
Assumed use case is a system that service in internet serves
distributes devices in home or office networks. Service may be called
as cloud and devices as ubiquitous.
Home/SOHO/IntranetInternet
++++
+--+ +--+ |Router, ||Internet|
+|device|---|Linux |-|proxy, ||service |
|+--+ +--+ |firewall||on Linux|
+--+ controller++++
ex)
Device Service
sensors ... environment analysis
cameras ... monitoring, recording
ID/biometric readers .. authentication
3. Why userspace transmission?
Userspace transmission and APIs provided by this series allow to apply
application protocols to USB/IP.
Why not use usbfs or libusb?
a) Not only device(usbip-host) side, application(vhci-hcd) side must be
handled.
b) In device side, if using usbfs or libusb, many parts of usbip-common
and usbip-host driver must be copied to userspace. It's not good for
maintainability.
Tunneling daemons can wrap TCP/IP with application protocol. They pass
packets through loopback so this series has certain advantage regarding
performance.
4. Why exporting devices?
Connection from outside firewall is usually blocked.
So existing import request sent with attach command doesn't work.
# usbipd (blocked)|| - # usbip attach
Firewall opens some ports, usually HTTP(80) and HTTPS(443), from inside.
Then export request sent with new connect command works.
# usbip connect - # usbipa
(passed)
Thank you,
Nobuo Iwata nobuo.iw...@fujixerox.co.jp
//
*** BLURB HERE ***
Nobuo Iwata (11):
usbip: exporting devices
usbip: readme and manuals about exporting devices
usbip: safe completion against usb_kill_urb()
usbip: kernel module for userspace URBs transmission
usbip: tools for userspace URBs transmission
usbip: readme about user space URBs transmission
usbip: letting send and receive replaceable
usbip: letting connection establishment replaceable
usbip: deriving functions as libraries
usbip: added const qualifier to arguments of some functions
usbip: USB over WebSocket
drivers/usb/usbip/Kconfig | 10 +
drivers/usb/usbip/Makefile| 3 +
drivers/usb/usbip/stub_dev.c | 16 +-
drivers/usb/usbip/stub_rx.c | 3 +-
drivers/usb/usbip/stub_tx.c | 9 +-
drivers/usb/usbip/usbip_common.c | 79 ++-