Linux Kernel
3.7.1
|
#include <linux/compiler.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/net.h>
#include <linux/printk.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/usb.h>
#include <linux/wait.h>
Go to the source code of this file.
Data Structures | |
struct | usbip_header_basic |
struct | usbip_header_cmd_submit |
struct | usbip_header_ret_submit |
struct | usbip_header_cmd_unlink |
struct | usbip_header_ret_unlink |
struct | usbip_header |
struct | usbip_iso_packet_descriptor |
struct | usbip_device |
struct | usbip_device::eh_ops |
Enumerations | |
enum | { usbip_debug_xmit = (1 << 0), usbip_debug_sysfs = (1 << 1), usbip_debug_urb = (1 << 2), usbip_debug_eh = (1 << 3), usbip_debug_stub_cmp = (1 << 8), usbip_debug_stub_dev = (1 << 9), usbip_debug_stub_rx = (1 << 10), usbip_debug_stub_tx = (1 << 11), usbip_debug_vhci_rh = (1 << 8), usbip_debug_vhci_hc = (1 << 9), usbip_debug_vhci_rx = (1 << 10), usbip_debug_vhci_tx = (1 << 11), usbip_debug_vhci_sysfs = (1 << 12) } |
enum | usbip_side { USBIP_VHCI, USBIP_STUB } |
enum | usbip_status { SDEV_ST_AVAILABLE = 0x01, SDEV_ST_USED, SDEV_ST_ERROR, VDEV_ST_NULL, VDEV_ST_NOTASSIGNED, VDEV_ST_USED, VDEV_ST_ERROR } |
Functions | |
void | usbip_dump_urb (struct urb *purb) |
void | usbip_dump_header (struct usbip_header *pdu) |
int | usbip_recv (struct socket *sock, void *buf, int size) |
struct socket * | sockfd_to_socket (unsigned int sockfd) |
void | usbip_pack_pdu (struct usbip_header *pdu, struct urb *urb, int cmd, int pack) |
void | usbip_header_correct_endian (struct usbip_header *pdu, int send) |
void * | usbip_alloc_iso_desc_pdu (struct urb *urb, ssize_t *bufflen) |
int | usbip_recv_iso (struct usbip_device *ud, struct urb *urb) |
void | usbip_pad_iso (struct usbip_device *ud, struct urb *urb) |
int | usbip_recv_xbuff (struct usbip_device *ud, struct urb *urb) |
int | usbip_start_eh (struct usbip_device *ud) |
void | usbip_stop_eh (struct usbip_device *ud) |
void | usbip_event_add (struct usbip_device *ud, unsigned long event) |
int | usbip_event_happened (struct usbip_device *ud) |
Variables | |
unsigned long | usbip_debug_flag |
struct device_attribute | dev_attr_usbip_debug |
struct usbip_header_basic | __packed |
Definition at line 295 of file usbip_common.h.
#define kthread_stop_put | ( | k | ) |
Definition at line 306 of file usbip_common.h.
Definition at line 40 of file usbip_common.h.
#define SDEV_EVENT_DOWN (USBIP_EH_SHUTDOWN | USBIP_EH_RESET) |
Definition at line 261 of file usbip_common.h.
#define SDEV_EVENT_ERROR_MALLOC (USBIP_EH_SHUTDOWN | USBIP_EH_UNUSABLE) |
Definition at line 264 of file usbip_common.h.
#define SDEV_EVENT_ERROR_SUBMIT (USBIP_EH_SHUTDOWN | USBIP_EH_RESET) |
Definition at line 263 of file usbip_common.h.
#define SDEV_EVENT_ERROR_TCP (USBIP_EH_SHUTDOWN | USBIP_EH_RESET) |
Definition at line 262 of file usbip_common.h.
#define SDEV_EVENT_REMOVED (USBIP_EH_SHUTDOWN | USBIP_EH_RESET | USBIP_EH_BYE) |
Definition at line 260 of file usbip_common.h.
#define USBIP_CMD_SUBMIT 0x0001 |
Definition at line 128 of file usbip_common.h.
#define USBIP_CMD_UNLINK 0x0002 |
Definition at line 129 of file usbip_common.h.
#define usbip_dbg_eh | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_eh, fmt , ##args) |
Definition at line 85 of file usbip_common.h.
#define usbip_dbg_flag_stub_rx (usbip_debug_flag & usbip_debug_stub_rx) |
Definition at line 66 of file usbip_common.h.
#define usbip_dbg_flag_stub_tx (usbip_debug_flag & usbip_debug_stub_tx) |
Definition at line 67 of file usbip_common.h.
#define usbip_dbg_flag_vhci_hc (usbip_debug_flag & usbip_debug_vhci_hc) |
Definition at line 63 of file usbip_common.h.
#define usbip_dbg_flag_vhci_rh (usbip_debug_flag & usbip_debug_vhci_rh) |
Definition at line 62 of file usbip_common.h.
#define usbip_dbg_flag_vhci_rx (usbip_debug_flag & usbip_debug_vhci_rx) |
Definition at line 64 of file usbip_common.h.
#define usbip_dbg_flag_vhci_sysfs (usbip_debug_flag & usbip_debug_vhci_sysfs) |
Definition at line 68 of file usbip_common.h.
#define usbip_dbg_flag_vhci_tx (usbip_debug_flag & usbip_debug_vhci_tx) |
Definition at line 65 of file usbip_common.h.
#define usbip_dbg_flag_xmit (usbip_debug_flag & usbip_debug_xmit) |
Definition at line 61 of file usbip_common.h.
#define usbip_dbg_stub_cmp | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_stub_cmp, fmt , ##args) |
Definition at line 99 of file usbip_common.h.
#define usbip_dbg_stub_rx | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_stub_rx, fmt , ##args) |
Definition at line 101 of file usbip_common.h.
#define usbip_dbg_stub_tx | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_stub_tx, fmt , ##args) |
Definition at line 103 of file usbip_common.h.
#define usbip_dbg_sysfs | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_sysfs, fmt , ##args) |
Definition at line 79 of file usbip_common.h.
#define usbip_dbg_urb | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_urb, fmt , ##args) |
Definition at line 83 of file usbip_common.h.
#define usbip_dbg_vhci_hc | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_vhci_hc, fmt , ##args) |
Definition at line 90 of file usbip_common.h.
#define usbip_dbg_vhci_rh | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_vhci_rh, fmt , ##args) |
Definition at line 88 of file usbip_common.h.
#define usbip_dbg_vhci_rx | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_vhci_rx, fmt , ##args) |
Definition at line 92 of file usbip_common.h.
#define usbip_dbg_vhci_sysfs | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_vhci_sysfs, fmt , ##args) |
Definition at line 96 of file usbip_common.h.
#define usbip_dbg_vhci_tx | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_vhci_tx, fmt , ##args) |
Definition at line 94 of file usbip_common.h.
Definition at line 73 of file usbip_common.h.
#define usbip_dbg_xmit | ( | fmt, | |
args... | |||
) | usbip_dbg_with_flag(usbip_debug_xmit, fmt , ##args) |
Definition at line 81 of file usbip_common.h.
#define USBIP_DIR_IN 0x01 |
Definition at line 134 of file usbip_common.h.
#define USBIP_DIR_OUT 0x00 |
Definition at line 133 of file usbip_common.h.
#define USBIP_EH_BYE (1 << 1) |
Definition at line 256 of file usbip_common.h.
#define USBIP_EH_RESET (1 << 2) |
Definition at line 257 of file usbip_common.h.
#define USBIP_EH_SHUTDOWN (1 << 0) |
Definition at line 255 of file usbip_common.h.
#define USBIP_EH_UNUSABLE (1 << 3) |
Definition at line 258 of file usbip_common.h.
#define USBIP_RET_SUBMIT 0x0003 |
Definition at line 130 of file usbip_common.h.
#define USBIP_RET_UNLINK 0x0004 |
Definition at line 131 of file usbip_common.h.
#define USBIP_VERSION "1.0.0" |
Definition at line 33 of file usbip_common.h.
#define VDEV_EVENT_DOWN (USBIP_EH_SHUTDOWN | USBIP_EH_RESET) |
Definition at line 267 of file usbip_common.h.
#define VDEV_EVENT_ERROR_MALLOC (USBIP_EH_SHUTDOWN | USBIP_EH_UNUSABLE) |
Definition at line 269 of file usbip_common.h.
#define VDEV_EVENT_ERROR_TCP (USBIP_EH_SHUTDOWN | USBIP_EH_RESET) |
Definition at line 268 of file usbip_common.h.
#define VDEV_EVENT_REMOVED (USBIP_EH_SHUTDOWN | USBIP_EH_BYE) |
Definition at line 266 of file usbip_common.h.
anonymous enum |
Definition at line 43 of file usbip_common.h.
enum usbip_side |
Definition at line 233 of file usbip_common.h.
enum usbip_status |
SDEV_ST_AVAILABLE | |
SDEV_ST_USED | |
SDEV_ST_ERROR | |
VDEV_ST_NULL | |
VDEV_ST_NOTASSIGNED | |
VDEV_ST_USED | |
VDEV_ST_ERROR |
Definition at line 238 of file usbip_common.h.
Definition at line 402 of file usbip_common.c.
Definition at line 642 of file usbip_common.c.
void usbip_dump_header | ( | struct usbip_header * | pdu | ) |
Definition at line 297 of file usbip_common.c.
Definition at line 251 of file usbip_common.c.
void usbip_event_add | ( | struct usbip_device * | ud, |
unsigned long | event | ||
) |
Definition at line 106 of file usbip_event.c.
int usbip_event_happened | ( | struct usbip_device * | ud | ) |
Definition at line 115 of file usbip_event.c.
void usbip_header_correct_endian | ( | struct usbip_header * | pdu, |
int | send | ||
) |
Definition at line 575 of file usbip_common.c.
Definition at line 484 of file usbip_common.c.
void usbip_pad_iso | ( | struct usbip_device * | ud, |
struct urb * | urb | ||
) |
Definition at line 741 of file usbip_common.c.
Definition at line 341 of file usbip_common.c.
int usbip_recv_iso | ( | struct usbip_device * | ud, |
struct urb * | urb | ||
) |
Definition at line 668 of file usbip_common.c.
int usbip_recv_xbuff | ( | struct usbip_device * | ud, |
struct urb * | urb | ||
) |
Definition at line 775 of file usbip_common.c.
int usbip_start_eh | ( | struct usbip_device * | ud | ) |
Definition at line 81 of file usbip_event.c.
void usbip_stop_eh | ( | struct usbip_device * | ud | ) |
Definition at line 96 of file usbip_event.c.
struct device_attribute dev_attr_usbip_debug |
Definition at line 45 of file usbip_common.c.
unsigned long usbip_debug_flag |
Definition at line 38 of file usbip_common.c.