home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / g / gtak212.zip / OS2-ADD / addtape.h next >
C/C++ Source or Header  |  1992-11-14  |  2KB  |  61 lines

  1. /*****************************************************************************
  2.  * $Id: addtape.h,v 1.2 1992/09/29 09:35:26 ak Exp $
  3.  *****************************************************************************
  4.  * $Log: addtape.h,v $
  5.  * Revision 1.2  1992/09/29  09:35:26  ak
  6.  * Must allow multiple DrvOpen calls. dup() seems to reopen the driver.
  7.  *
  8.  * Revision 1.1.1.1  1992/09/02  18:57:44  ak
  9.  * Initial checkin of OS/2 ADD based SCSI tape device driver.
  10.  *
  11.  * Revision 1.1  1992/09/02  18:57:43  ak
  12.  * Initial revision
  13.  *
  14.  *****************************************************************************/
  15.  
  16. #include <os2def.h>
  17. #include <dd.h>
  18. #include <tapedrvr.h>
  19. #include "iorb.h"
  20. #include "scsi.h"
  21.  
  22. #pragma ZTC align 1
  23. #pragma pack(1)
  24. /* pure magic - analyzed from OS2SCSI.DMD */
  25. typedef struct Status {
  26.     byte    unknown_00 [0x11-0x00];    /* 00 */
  27.     word    sense_len;        /* 11 */
  28.     farptr    sense_ptr;        /* 13 */
  29. } Status;
  30. #define SizeofStatus 23
  31. #pragma ZTC align
  32. #pragma pack()
  33.  
  34. DevClassTable _far *dctbl;            /* device class table */
  35. byte        devtab_data [4096];        /* devtab data */
  36. DEVICETABLE *    devtab;
  37. byte        iorb1[MAX_IORB_SIZE];        /* iorb for SCSI command */
  38. byte        iorb2[MAX_IORB_SIZE];        /* iorb for Abort */
  39. paddr        paddr_iorb1;            /* phys addr of iorb1 */
  40. Status        status;                /* ADD status */
  41. byte        sense[32];            /* SCSI sense bytes */
  42. SCATGATENTRY    sglist[1];            /* scatter/gather list */
  43. paddr        paddr_sglist;
  44. byte        cdb[12];            /* rw CDB */
  45.  
  46. UNITINFO *    unitinfo;            /* ptr into devtab */
  47. void        (_far * callADD) (PIORBH);    /* ADD entry point */
  48.  
  49. ReqPtr        reqpkt;                /* active request packet */
  50.  
  51. int        trace;                /* trace level */
  52. dword        blocksize;            /* fixed blocksize, variable if 0 */
  53. int        open_count;            /* no of active DrvOpen's */
  54.  
  55. int        waiting;    /* someone is waiting for iorb */
  56. int        senseMode;    /* sense data mode */
  57. int        senseValid;    /* sense data valid */
  58. int        stickyEOF;    /* return EOF until reopened */
  59.  
  60. extern word    startup (void);
  61.