Re: USB API, ioctl's and libusb

From: DervishD (lkml_at_dervishd.net)
Date: 01/26/05

  • Next message: linux-os: "Re: don't let mmap allocate down to zero"
    Date:	Wed, 26 Jan 2005 17:38:11 +0100
    To: Oliver Neukum <oliver@neukum.org>
    
    

        Hi Oliver :)

     * Oliver Neukum <oliver@neukum.org> dixit:
    > Am Mittwoch, 26. Januar 2005 13:20 schrieb DervishD:
    > >     My question is: which interface should be used by user space
    > > applications, <linux/usb.h> or ioctl's? Is the ioctl interface
    > > deprecated in any way? In the "Programming guide for Linux USB Device
    > > Drivers", located in http://usb.in.tum.de/usbdoc/, I can't find ioctl
    > > interface references :?
    > You are supposed to use libusb.

        That's irrelevant, the program I was trying to fix uses libusb.
    My question is about the preferred kernel interface, 'cause I don't
    know if it's the ioctl one or the URB one (well, I'm calling 'URB'
    interface the API that is implemented using URB's inside the kernel).

        BTW, and judging from the program I've read, there are lots of
    operations that must be done using 'usb_control_msg', and libusb
    implements that function with exactly the same interface as the
    kernel. The only difference is that libusb uses ioctl and the kernel
    implements the function using URB's. IMHO libusb doesn't provide a
    cleaner API, the only advantage of libusb is portability. Anyway,
    I've not used it enough to judge, I'm more concerned about kernel USB
    interface, not libusb one.

        Thanks anyway :)

        Raúl Núñez de Arenas Coronado

    -- 
    Linux Registered User 88736
    http://www.dervishd.net & http://www.pleyades.net/
    It's my PC and I'll cry if I want to...
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: linux-os: "Re: don't let mmap allocate down to zero"

    Relevant Pages

    • ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)
      ... > no-new IOCTL policy certainly came as a surprise to the authors. ... operation" interface. ... a block driver is nothing but a message queue. ... kernel now for generic event delivery. ...
      (Linux-Kernel)
    • Re: USB API, ioctls and libusb
      ... the program I was trying to fix uses libusb. ... > interface the API that is implemented using URB's inside the kernel). ... It just so happens there is an ioctl() call that provides an URB like ...
      (Linux-Kernel)
    • Re: protocol handler for a proprietary protocol
      ... The signature of the ioctl handler is: ... linux kernel, so I would appreciate some clarity on this flow. ... figures if out from the interface name. ... first open socket by calling socke to get the file descriptor fd. ...
      (comp.os.linux.development.system)
    • Re: [Linux-usb-users] Re: USB API, ioctls and libusb
      ... > interface the API that is implemented using URB's inside the kernel). ... The only difference is that libusb uses ioctl and the kernel ...
      (Linux-Kernel)
    • [BUG] panic 2.6.20-rc3 in nf_conntrack
      ... When I shut down my ppp0 interface the kernel ... This kernel had the ipp2p patch from patch-o-matic-ng applied, ... # Firmware Drivers ... # ACPI Support ...
      (Linux-Kernel)