Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
usbip_common.c File Reference
#include "usbip_common.h"
#include "names.h"

Go to the source code of this file.

Data Structures

struct  speed_string
 
struct  portst_string
 

Macros

#define PROGNAME   "libusbip"
 
#define DBG_UDEV_INTEGER(name)   dbg("%-20s = %x", to_string(name), (int) udev->name)
 
#define DBG_UINF_INTEGER(name)   dbg("%-20s = %x", to_string(name), (int) uinf->name)
 
#define READ_ATTR(object, type, dev, name, format)   do { (object)->name = (type) read_attr_value(dev, to_string(name), format); } while (0)
 

Functions

const charusbip_status_string (int32_t status)
 
const charusbip_speed_string (int num)
 
void dump_usb_interface (struct usbip_usb_interface *uinf)
 
void dump_usb_device (struct usbip_usb_device *udev)
 
int read_attr_value (struct sysfs_device *dev, const char *name, const char *format)
 
int read_attr_speed (struct sysfs_device *dev)
 
int read_usb_device (struct sysfs_device *sdev, struct usbip_usb_device *udev)
 
int read_usb_interface (struct usbip_usb_device *udev, int i, struct usbip_usb_interface *uinf)
 
int usbip_names_init (char *f)
 
void usbip_names_free ()
 
void usbip_names_get_product (char *buff, size_t size, uint16_t vendor, uint16_t product)
 
void usbip_names_get_class (char *buff, size_t size, uint8_t class, uint8_t subclass, uint8_t protocol)
 

Variables

int usbip_use_syslog = 0
 
int usbip_use_stderr = 0
 
int usbip_use_debug = 0
 

Macro Definition Documentation

#define DBG_UDEV_INTEGER (   name)    dbg("%-20s = %x", to_string(name), (int) udev->name)

Definition at line 64 of file usbip_common.c.

#define DBG_UINF_INTEGER (   name)    dbg("%-20s = %x", to_string(name), (int) uinf->name)

Definition at line 67 of file usbip_common.c.

#define PROGNAME   "libusbip"

Definition at line 9 of file usbip_common.c.

#define READ_ATTR (   object,
  type,
  dev,
  name,
  format 
)    do { (object)->name = (type) read_attr_value(dev, to_string(name), format); } while (0)

Definition at line 183 of file usbip_common.c.

Function Documentation

void dump_usb_device ( struct usbip_usb_device udev)

Definition at line 80 of file usbip_common.c.

void dump_usb_interface ( struct usbip_usb_interface uinf)

Definition at line 70 of file usbip_common.c.

int read_attr_speed ( struct sysfs_device *  dev)

Definition at line 146 of file usbip_common.c.

int read_attr_value ( struct sysfs_device *  dev,
const char name,
const char format 
)

Definition at line 112 of file usbip_common.c.

int read_usb_device ( struct sysfs_device *  sdev,
struct usbip_usb_device udev 
)

Definition at line 187 of file usbip_common.c.

int read_usb_interface ( struct usbip_usb_device udev,
int  i,
struct usbip_usb_interface uinf 
)

Definition at line 215 of file usbip_common.c.

void usbip_names_free ( void  )

Definition at line 243 of file usbip_common.c.

void usbip_names_get_class ( char buff,
size_t  size,
uint8_t  class,
uint8_t  subclass,
uint8_t  protocol 
)

Definition at line 264 of file usbip_common.c.

void usbip_names_get_product ( char buff,
size_t  size,
uint16_t  vendor,
uint16_t  product 
)

Definition at line 248 of file usbip_common.c.

int usbip_names_init ( char f)

Definition at line 238 of file usbip_common.c.

const char* usbip_speed_string ( int  num)

Definition at line 54 of file usbip_common.c.

const char* usbip_status_string ( int32_t  status)

Definition at line 45 of file usbip_common.c.

Variable Documentation

int usbip_use_debug = 0

Definition at line 13 of file usbip_common.c.

int usbip_use_stderr = 0

Definition at line 12 of file usbip_common.c.

int usbip_use_syslog = 0

Definition at line 11 of file usbip_common.c.