Subject: Re: USB emul under Linux
To: None <10.50@free.fr>
From: M. Warner Losh <imp@bsdimp.com>
List: tech-kern
Date: 01/19/2005 08:53:44
In message: <41EE3AB6.2030609@free.fr>
            Vincent <10.50@free.fr> writes:
: Hi !
: =

: M. Warner Losh a =E9crit :
: =

: > The ugen interface and the linux interfaces are fairly different.  =
In
: > addition, Linux's usb stack behaves somewhat differently than NetBS=
D's
: > stack, so doing a perfect emulation would be somewhat different.  T=
he
: > treatment of pipes is somewhat different and would present the bigg=
est
: > problems...
: =

: Okay.
: =

: In some way, the libusb is precisely meant to hide these differences.=
 =

: Wherefore, a new question : is it possible to design a special libusb=
 =

: which, even though being a Linux type library, would translate into =

: native NetBSD kernel USB calls.
: =

: Or should I implement a fake socket type Linux libusb, whose calls wo=
uld =

: be caught by a BSD demon listening on some port, who would then call =
the =

: true libusb, and report the results ?

The problem is that if a libusb program is running on Linux, the
exact details of what commands go to the device are different than the
exact details of what go to the device when running under NetBSD.
Having things at a higher level won't help this low level difference.

Usually, these differences just don't matter, but sometimes they do.

Warner