| 1 |
blade |
219 |
/*
|
| 2 |
|
|
* This file has been modified for the cdrkit suite.
|
| 3 |
|
|
*
|
| 4 |
|
|
* The behaviour and appearence of the program code below can differ to a major
|
| 5 |
|
|
* extent from the version distributed by the original author(s).
|
| 6 |
|
|
*
|
| 7 |
|
|
* For details, see Changelog file distributed with the cdrkit package. If you
|
| 8 |
|
|
* received this file from another source then ask the distributing person for
|
| 9 |
|
|
* a log of modifications.
|
| 10 |
|
|
*
|
| 11 |
|
|
*/
|
| 12 |
|
|
|
| 13 |
blade |
2 |
/* @(#)scgops.h 1.5 02/10/19 Copyright 2000 J. Schilling */
|
| 14 |
|
|
/*
|
| 15 |
|
|
* Copyright (c) 2000 J. Schilling
|
| 16 |
|
|
*/
|
| 17 |
|
|
/*
|
| 18 |
|
|
* This program is free software; you can redistribute it and/or modify
|
| 19 |
|
|
* it under the terms of the GNU General Public License version 2
|
| 20 |
|
|
* as published by the Free Software Foundation.
|
| 21 |
|
|
*
|
| 22 |
|
|
* This program is distributed in the hope that it will be useful,
|
| 23 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 24 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 25 |
|
|
* GNU General Public License for more details.
|
| 26 |
|
|
*
|
| 27 |
|
|
* You should have received a copy of the GNU General Public License along with
|
| 28 |
|
|
* this program; see the file COPYING. If not, write to the Free Software
|
| 29 |
|
|
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
| 30 |
|
|
*/
|
| 31 |
|
|
|
| 32 |
|
|
#ifndef _SCG_SCGOPS_H
|
| 33 |
|
|
#define _SCG_SCGOPS_H
|
| 34 |
|
|
|
| 35 |
|
|
#ifdef __cplusplus
|
| 36 |
|
|
extern "C" {
|
| 37 |
|
|
#endif
|
| 38 |
|
|
|
| 39 |
|
|
typedef struct scg_ops {
|
| 40 |
kaner-guest |
368 |
int (*scgo_send)(SCSI *scgp);
|
| 41 |
blade |
2 |
|
| 42 |
kaner-guest |
368 |
char * (*scgo_version)(SCSI *scgp, int what);
|
| 43 |
blade |
2 |
#ifdef EOF /* stdio.h has been included */
|
| 44 |
kaner-guest |
368 |
int (*scgo_help)(SCSI *scgp, FILE *f);
|
| 45 |
blade |
2 |
#else
|
| 46 |
kaner-guest |
368 |
int (*scgo_help)(SCSI *scgp, void *f);
|
| 47 |
blade |
2 |
#endif
|
| 48 |
kaner-guest |
368 |
int (*scgo_open)(SCSI *scgp, char *device);
|
| 49 |
|
|
int (*scgo_close)(SCSI *scgp);
|
| 50 |
|
|
long (*scgo_maxdma)(SCSI *scgp, long amt);
|
| 51 |
|
|
void * (*scgo_getbuf)(SCSI *scgp, long amt);
|
| 52 |
|
|
void (*scgo_freebuf)(SCSI *scgp);
|
| 53 |
blade |
2 |
|
| 54 |
|
|
|
| 55 |
kaner-guest |
368 |
BOOL (*scgo_havebus)(SCSI *scgp, int busno);
|
| 56 |
|
|
int (*scgo_fileno)(SCSI *scgp, int busno, int tgt, int tlun);
|
| 57 |
|
|
int (*scgo_initiator_id)(SCSI *scgp);
|
| 58 |
|
|
int (*scgo_isatapi)(SCSI *scgp);
|
| 59 |
|
|
int (*scgo_reset)(SCSI *scgp, int what);
|
| 60 |
blade |
2 |
} scg_ops_t;
|
| 61 |
|
|
|
| 62 |
|
|
#define SCGO_SEND(scgp) (*(scgp)->ops->scgo_send)(scgp)
|
| 63 |
|
|
#define SCGO_VERSION(scgp, what) (*(scgp)->ops->scgo_version)(scgp, what)
|
| 64 |
|
|
#define SCGO_HELP(scgp, f) (*(scgp)->ops->scgo_help)(scgp, f)
|
| 65 |
|
|
#define SCGO_OPEN(scgp, device) (*(scgp)->ops->scgo_open)(scgp, device)
|
| 66 |
|
|
#define SCGO_CLOSE(scgp) (*(scgp)->ops->scgo_close)(scgp)
|
| 67 |
|
|
#define SCGO_MAXDMA(scgp, amt) (*(scgp)->ops->scgo_maxdma)(scgp, amt)
|
| 68 |
|
|
#define SCGO_GETBUF(scgp, amt) (*(scgp)->ops->scgo_getbuf)(scgp, amt)
|
| 69 |
|
|
#define SCGO_FREEBUF(scgp) (*(scgp)->ops->scgo_freebuf)(scgp)
|
| 70 |
|
|
#define SCGO_HAVEBUS(scgp, busno) (*(scgp)->ops->scgo_havebus)(scgp, busno)
|
| 71 |
|
|
#define SCGO_FILENO(scgp, busno, tgt, tlun) (*(scgp)->ops->scgo_fileno)(scgp, busno, tgt, tlun)
|
| 72 |
|
|
#define SCGO_INITIATOR_ID(scgp) (*(scgp)->ops->scgo_initiator_id)(scgp)
|
| 73 |
|
|
#define SCGO_ISATAPI(scgp) (*(scgp)->ops->scgo_isatapi)(scgp)
|
| 74 |
|
|
#define SCGO_RESET(scgp, what) (*(scgp)->ops->scgo_reset)(scgp, what)
|
| 75 |
|
|
|
| 76 |
|
|
#ifdef __cplusplus
|
| 77 |
|
|
}
|
| 78 |
|
|
#endif
|
| 79 |
|
|
|
| 80 |
|
|
#endif /* _SCG_SCGOPS_H */
|