|
USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
|
One mass-storage function: a single instance of the class on a device. More...
#include <classes/msc.h>
Data Fields | |
| int | index |
| 0-based instance number on this device, in msc_add() order | |
| const char * | name |
msc_opts::name, or "" (never NULL) | |
| void * | user |
| msc_opts::user, passed straight through | |
| int | n_luns |
| Logical units this disk carries: 1 unless msc_opts::luns asked for more | |
| int | medium |
Unit 0's medium, one of the MSC_MEDIUM_* codes. | |
| int | interface_number |
| The mass-storage interface's bInterfaceNumber. | |
| uint8_t | in_ep |
| Bulk IN address actually assigned (on a composite this is relocated off 0x82) | |
| uint8_t | out_ep |
| Bulk OUT address actually assigned | |
| usbip_device * | dev |
| The owning device | |
| usbip_function * | func |
| The underlying function - escape hatch to the core usbip_device.h API | |
One mass-storage function: a single instance of the class on a device.
Create one with msc_add(); it stays valid for the life of the device. The fields are maintained by the class and are read-only to the app - they are here so a callback (or a second function sharing the same app state) can tell which disk it is looking at and how it was wired up, without keeping its own table.
It is a distinct type from the other classes' handles, so passing (say) a cdc_port where a msc_disk is wanted is a compile error, not a misread state block.
| int msc_disk::index |
0-based instance number on this device, in msc_add() order
| const char* msc_disk::name |
msc_opts::name, or "" (never NULL)
| void* msc_disk::user |
msc_opts::user, passed straight through
| int msc_disk::n_luns |
Logical units this disk carries: 1 unless msc_opts::luns asked for more
| int msc_disk::medium |
Unit 0's medium, one of the MSC_MEDIUM_* codes.
| int msc_disk::interface_number |
The mass-storage interface's bInterfaceNumber.
| uint8_t msc_disk::in_ep |
Bulk IN address actually assigned (on a composite this is relocated off 0x82)
| uint8_t msc_disk::out_ep |
Bulk OUT address actually assigned
| usbip_device* msc_disk::dev |
The owning device
| usbip_function* msc_disk::func |
The underlying function - escape hatch to the core usbip_device.h API