#include <asm/byteorder.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <net/sock.h>
#include "usbip_common.h"
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
#ifdef CONFIG_USBIP_DEBUG
unsigned long usbip_debug_flag = …;
#else
unsigned long usbip_debug_flag;
#endif
EXPORT_SYMBOL_GPL(…);
module_param(usbip_debug_flag, ulong, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(…) …;
struct device_attribute dev_attr_usbip_debug;
EXPORT_SYMBOL_GPL(…);
static ssize_t usbip_debug_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t usbip_debug_store(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{ … }
DEVICE_ATTR_RW(…);
static void usbip_dump_buffer(char *buff, int bufflen)
{ … }
static void usbip_dump_pipe(unsigned int p)
{ … }
static void usbip_dump_usb_device(struct usb_device *udev)
{ … }
static void usbip_dump_request_type(__u8 rt)
{ … }
static void usbip_dump_usb_ctrlrequest(struct usb_ctrlrequest *cmd)
{ … }
void usbip_dump_urb(struct urb *urb)
{ … }
EXPORT_SYMBOL_GPL(…);
void usbip_dump_header(struct usbip_header *pdu)
{ … }
EXPORT_SYMBOL_GPL(…);
int usbip_recv(struct socket *sock, void *buf, int size)
{ … }
EXPORT_SYMBOL_GPL(…);
static unsigned int tweak_transfer_flags(unsigned int flags)
{ … }
struct urb_to_usbip_flags { … };
#define NUM_USBIP_FLAGS …
static const struct urb_to_usbip_flags flag_map[NUM_USBIP_FLAGS] = …;
static unsigned int urb_to_usbip(unsigned int flags)
{ … }
static unsigned int usbip_to_urb(unsigned int flags)
{ … }
static void usbip_pack_cmd_submit(struct usbip_header *pdu, struct urb *urb,
int pack)
{ … }
static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb,
int pack)
{ … }
void usbip_pack_pdu(struct usbip_header *pdu, struct urb *urb, int cmd,
int pack)
{ … }
EXPORT_SYMBOL_GPL(…);
static void correct_endian_basic(struct usbip_header_basic *base, int send)
{ … }
static void correct_endian_cmd_submit(struct usbip_header_cmd_submit *pdu,
int send)
{ … }
static void correct_endian_ret_submit(struct usbip_header_ret_submit *pdu,
int send)
{ … }
static void correct_endian_cmd_unlink(struct usbip_header_cmd_unlink *pdu,
int send)
{ … }
static void correct_endian_ret_unlink(struct usbip_header_ret_unlink *pdu,
int send)
{ … }
void usbip_header_correct_endian(struct usbip_header *pdu, int send)
{ … }
EXPORT_SYMBOL_GPL(…);
static void usbip_iso_packet_correct_endian(
struct usbip_iso_packet_descriptor *iso, int send)
{ … }
static void usbip_pack_iso(struct usbip_iso_packet_descriptor *iso,
struct usb_iso_packet_descriptor *uiso, int pack)
{ … }
struct usbip_iso_packet_descriptor*
usbip_alloc_iso_desc_pdu(struct urb *urb, ssize_t *bufflen)
{ … }
EXPORT_SYMBOL_GPL(…);
int usbip_recv_iso(struct usbip_device *ud, struct urb *urb)
{ … }
EXPORT_SYMBOL_GPL(…);
void usbip_pad_iso(struct usbip_device *ud, struct urb *urb)
{ … }
EXPORT_SYMBOL_GPL(…);
int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init usbip_core_init(void)
{ … }
static void __exit usbip_core_exit(void)
{ … }
module_init(…) …;
module_exit(usbip_core_exit);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;