Go to the documentation of this file.
5 #ifndef __USBIP_NETWORK_H
6 #define __USBIP_NETWORK_H
12 #include <sys/types.h>
13 #include <sysfs/libsysfs.h>
17 #define USBIP_PORT 3240
18 #define USBIP_PORT_STRING "3240"
25 #define OP_REQUEST (0x80 << 8)
26 #define OP_REPLY (0x00 << 8)
36 #define PACK_OP_COMMON(pack, op_common) do {\
37 usbip_net_pack_uint16_t(pack, &(op_common)->version);\
38 usbip_net_pack_uint16_t(pack, &(op_common)->code );\
39 usbip_net_pack_uint32_t(pack, &(op_common)->status );\
44 #define OP_UNSPEC 0x00
45 #define OP_REQ_UNSPEC OP_UNSPEC
46 #define OP_REP_UNSPEC OP_UNSPEC
50 #define OP_DEVINFO 0x02
51 #define OP_REQ_DEVINFO (OP_REQUEST | OP_DEVINFO)
52 #define OP_REP_DEVINFO (OP_REPLY | OP_DEVINFO)
65 #define OP_IMPORT 0x03
66 #define OP_REQ_IMPORT (OP_REQUEST | OP_IMPORT)
67 #define OP_REP_IMPORT (OP_REPLY | OP_IMPORT)
78 #define PACK_OP_IMPORT_REQUEST(pack, request) do {\
81 #define PACK_OP_IMPORT_REPLY(pack, reply) do {\
82 usbip_net_pack_usb_device(pack, &(reply)->udev);\
87 #define OP_EXPORT 0x06
88 #define OP_REQ_EXPORT (OP_REQUEST | OP_EXPORT)
89 #define OP_REP_EXPORT (OP_REPLY | OP_EXPORT)
100 #define PACK_OP_EXPORT_REQUEST(pack, request) do {\
101 usbip_net_pack_usb_device(pack, &(request)->udev);\
104 #define PACK_OP_EXPORT_REPLY(pack, reply) do {\
109 #define OP_UNEXPORT 0x07
110 #define OP_REQ_UNEXPORT (OP_REQUEST | OP_UNEXPORT)
111 #define OP_REP_UNEXPORT (OP_REPLY | OP_UNEXPORT)
121 #define PACK_OP_UNEXPORT_REQUEST(pack, request) do {\
122 usbip_net_pack_usb_device(pack, &(request)->udev);\
125 #define PACK_OP_UNEXPORT_REPLY(pack, reply) do {\
130 #define OP_CRYPKEY 0x04
131 #define OP_REQ_CRYPKEY (OP_REQUEST | OP_CRYPKEY)
132 #define OP_REP_CRYPKEY (OP_REPLY | OP_CRYPKEY)
146 #define OP_DEVLIST 0x05
147 #define OP_REQ_DEVLIST (OP_REQUEST | OP_DEVLIST)
148 #define OP_REP_DEVLIST (OP_REPLY | OP_DEVLIST)
163 #define PACK_OP_DEVLIST_REQUEST(pack, request) do {\
166 #define PACK_OP_DEVLIST_REPLY(pack, reply) do {\
167 usbip_net_pack_uint32_t(pack, &(reply)->ndev);\