USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
Loading...
Searching...
No Matches
Error codes

Return codes shared across the library. More...

Macros

#define USB_SUCCESS
 Error/status codes - same values as libusb, so ported constants keep working.
 
#define USB_ERROR_IO
 Input/output error on the transport.
 
#define USB_ERROR_INVALID_PARAM
 An argument was invalid.
 
#define USB_ERROR_ACCESS
 Insufficient permissions.
 
#define USB_ERROR_NO_DEVICE
 The device has been disconnected.
 
#define USB_ERROR_NOT_FOUND
 Entity not found (no matching device/endpoint)
 
#define USB_ERROR_BUSY
 Resource busy.
 
#define USB_ERROR_TIMEOUT
 The operation timed out.
 
#define USB_ERROR_PIPE
 Endpoint STALLed / pipe error.
 
#define USB_ERROR_NO_MEM
 Out of memory.
 
#define USB_ERROR_OTHER
 Other / unspecified error.
 

Functions

const char * usb_strerror (int code)
 Map a USB_* status/error code to a human-readable string.
 

Detailed Description

Return codes shared across the library.

The USB_* error codes use the same numeric values as libusb so ported constants keep working; usb_strerror() renders them as text.

Macro Definition Documentation

◆ USB_SUCCESS

#define USB_SUCCESS

Error/status codes - same values as libusb, so ported constants keep working.

Render any of them with usb_strerror(). No error

◆ USB_ERROR_IO

#define USB_ERROR_IO

Input/output error on the transport.

◆ USB_ERROR_INVALID_PARAM

#define USB_ERROR_INVALID_PARAM

An argument was invalid.

◆ USB_ERROR_ACCESS

#define USB_ERROR_ACCESS

Insufficient permissions.

◆ USB_ERROR_NO_DEVICE

#define USB_ERROR_NO_DEVICE

The device has been disconnected.

◆ USB_ERROR_NOT_FOUND

#define USB_ERROR_NOT_FOUND

Entity not found (no matching device/endpoint)

◆ USB_ERROR_BUSY

#define USB_ERROR_BUSY

Resource busy.

◆ USB_ERROR_TIMEOUT

#define USB_ERROR_TIMEOUT

The operation timed out.

◆ USB_ERROR_PIPE

#define USB_ERROR_PIPE

Endpoint STALLed / pipe error.

◆ USB_ERROR_NO_MEM

#define USB_ERROR_NO_MEM

Out of memory.

◆ USB_ERROR_OTHER

#define USB_ERROR_OTHER

Other / unspecified error.

Function Documentation

◆ usb_strerror()

const char * usb_strerror ( int  code)

Map a USB_* status/error code to a human-readable string.

Parameters
codea value from the USB_* codes (0 is USB_SUCCESS).
Returns
a constant, NUL-terminated description (never NULL; do not free). Codes without a dedicated message render as "other error".