USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
Loading...
Searching...
No Matches

One logical unit: a backend context, plus what this unit alone presents itself as. More...

#include <classes/msc.h>

Data Fields

void * user
 Backend context, handed to num_blocks / block_size / read / write for this unit

 
int medium
 One of the MSC_MEDIUM_* codes; 0 = msc_opts::medium

 
int read_only
 Write-protect this unit; a device-wide msc_opts::read_only still protects every unit, and a CD-ROM is read-only whatever this says

 
const char * product
 INQUIRY product id; NULL = msc_opts::product

 
const char * serial
 INQUIRY EVPD page 0x80 serial; NULL = msc_opts::serial

 

Detailed Description

One logical unit: a backend context, plus what this unit alone presents itself as.

A mass-storage interface can carry several units - a card reader's slots, a disk next to its install CD - and the host addresses them separately (Linux gives each one its own /dev/sd*, Windows its own drive letter). They share one interface and one pair of bulk pipes; only the backend and the fields below differ.

Every field except user is an override: left zero or NULL it takes the device-wide value from msc_opts. Since MSC_MEDIUM_DISK is itself 0, a unit cannot override a device-wide MSC_MEDIUM_CDROM back to a plain disk - leave msc_opts::medium unset and name the medium on each unit instead.

Field Documentation

◆ user

void* msc_lun::user

Backend context, handed to num_blocks / block_size / read / write for this unit

◆ medium

int msc_lun::medium

One of the MSC_MEDIUM_* codes; 0 = msc_opts::medium

◆ read_only

int msc_lun::read_only

Write-protect this unit; a device-wide msc_opts::read_only still protects every unit, and a CD-ROM is read-only whatever this says

◆ product

const char* msc_lun::product

INQUIRY product id; NULL = msc_opts::product

◆ serial

const char* msc_lun::serial

INQUIRY EVPD page 0x80 serial; NULL = msc_opts::serial


The documentation for this struct was generated from the following file: