scg 应该是 SCSI general driver 缩写。
windows spti 接口(SCSI Pass-Through Interface)
D:\cdrtools-beta\cdrtools-3.01\libscg\scsi-wnt.c
D:\cdrtools-beta\cdrtools-3.01\libscg\scg\spti-wnt.h
Send a SCSI command
EXPORT int scg_cmd(scgp) SCSI *scgp;
typedef struct scg_ops {
int (*scgo_send) __PR((SCSI *scgp));
char * (*scgo_version) __PR((SCSI *scgp, int what));
#ifdef EOF /* stdio.h has been included */
int (*scgo_help) __PR((SCSI *scgp, FILE *f));
#else
int (*scgo_help) __PR((SCSI *scgp, void *f));
#endif
int (*scgo_open) __PR((SCSI *scgp, char *device));
int (*scgo_close) __PR((SCSI *scgp));
long (*scgo_maxdma) __PR((SCSI *scgp, long amt));
void * (*scgo_getbuf) __PR((SCSI *scgp, long amt));
void (*scgo_freebuf) __PR((SCSI *scgp));
int (*scgo_numbus) __PR((SCSI *scgp));
BOOL (*scgo_havebus) __PR((SCSI *scgp, int busno));
int (*scgo_fileno) __PR((SCSI *scgp, int busno, int tgt, int tlun));
int (*scgo_initiator_id) __PR((SCSI *scgp));
int (*scgo_isatapi) __PR((SCSI *scgp));
int (*scgo_reset) __PR((SCSI *scgp, int what));
} scg_ops_t;
struct scg_scsi {
scg_ops_t *ops; /* Ptr to low level SCSI transport ops */
int fd; /* File descriptor for next I/O */
scg_addr_t addr; /* SCSI address for next I/O */
int flags; /* Libscg flags (see below) */
int dflags; /* Drive specific flags (see below) */
int kdebug; /* Kernel debug value for next I/O */
int debug; /* Debug value for SCSI library */
int silent; /* Be silent if value > 0 */
int verbose; /* Be verbose if value > 0 */
int overbose; /* Be verbose in open() if value > 0 */
int disre_disable;
int deftimeout;
int noparity; /* Do not use SCSI parity fo next I/O */
int dev; /* from scsi_cdr.c */
struct scg_cmd *scmd;
char *cmdname; 命令名称
char *curcmdname;
BOOL running;
int error; /* libscg error number */
long maxdma; /* Max DMA limit for this open instance */
long maxbuf; /* Cur DMA buffer limit for this inst. */
/* This is the size behind bufptr */
struct timeval *cmdstart;
struct timeval *cmdstop;
const char **nonstderrs;
void *local; /* Local data from the low level code */
void *bufbase; /* needed for scsi_freebuf() */
void *bufptr; /* DMA buffer pointer for appl. use */
char *errstr; /* Error string for scsi_open/sendmcd */
char *errbeg; /* Pointer to begin of not flushed data */
char *errptr; /* Actual write pointer into errstr */
void *errfile; /* FILE to write errors to. NULL for not*/
/* writing and leaving errs in errstr */
scg_cb_t cb_fun;
void *cb_arg;
struct scsi_inquiry *inq;
struct scsi_capacity *cap;
};
cgp->cmdname = "read_format_capacities";
cgp->cmdname = "set streaming";
scgp->cmdname = "get performance"; (性能)
scgp->cmdname = "get_configuration";
BerliOS (short for "Berlin Open Source") is a project founded by FOKUS, a Fraunhofer Institute located in Berlin, to coordinate the different interest groups in the field of open source software (OSS) and to assume a neutral coordinator function. The target groups of BerliOS are developers and users of open source software on the one side and OSS-related companies on the other.
没有评论:
发表评论