Subject: Re: USB emul under Linux
To: None <>
From: M. Warner Losh <>
List: tech-kern
Date: 01/19/2005 08:53:44
In message: <>
            Vincent <> writes:
: Hi !
: =

: M. Warner Losh a =E9crit :
: =

: > The ugen interface and the linux interfaces are fairly different.  =
: > addition, Linux's usb stack behaves somewhat differently than NetBS=
: > stack, so doing a perfect emulation would be somewhat different.  T=
: > treatment of pipes is somewhat different and would present the bigg=
: > 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.