home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / sys / h / mtio < prev    next >
Encoding:
Text File  |  1995-01-11  |  2.7 KB  |  85 lines

  1. /*
  2.  * $Header: /ax/networking:include/sys/mtio.h:networking  1.1  $
  3.  * $Source: /ax/networking:include/sys/mtio.h: $
  4.  *
  5.  * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
  6.  *
  7.  * $Log:    mtio.h,v $
  8.  * Revision 1.1  95/01/11  10:19:27  kwelton
  9.  * Initial revision
  10.  * 
  11.  * Revision 1.3  88/06/17  20:19:59  beta
  12.  * Acorn Unix initial beta version
  13.  * 
  14.  */
  15. /* @(#)mtio.h    1.2 87/05/15 3.2/4.3NFSSRC */
  16. /*
  17.  * Copyright (c) 1982, 1986 Regents of the University of California.
  18.  * All rights reserved.  The Berkeley software License Agreement
  19.  * specifies the terms and conditions for redistribution.
  20.  *
  21.  *    @(#)mtio.h    7.1 (Berkeley) 6/4/86
  22.  */
  23.  
  24. /*
  25.  * Structures and definitions for mag tape io control commands
  26.  */
  27.  
  28. /* structure for MTIOCTOP - mag tape op command */
  29. struct    mtop    {
  30.     short    mt_op;        /* operations defined below */
  31.     daddr_t    mt_count;    /* how many of them */
  32. };
  33.  
  34. /* operations */
  35. #define MTWEOF    0    /* write an end-of-file record */
  36. #define MTFSF    1    /* forward space file */
  37. #define MTBSF    2    /* backward space file */
  38. #define MTFSR    3    /* forward space record */
  39. #define MTBSR    4    /* backward space record */
  40. #define MTREW    5    /* rewind */
  41. #define MTOFFL    6    /* rewind and put the drive offline */
  42. #define MTNOP    7    /* no operation, sets status only */
  43. #define MTCACHE    8    /* enable controller cache */
  44. #define MTNOCACHE 9    /* disable controller cache */
  45.  
  46. /* structure for MTIOCGET - mag tape get status command */
  47.  
  48. struct    mtget    {
  49.     short    mt_type;    /* type of magtape device */
  50. /* the following two registers are grossly device dependent */
  51.     short    mt_dsreg;    /* ``drive status'' register */
  52.     short    mt_erreg;    /* ``error'' register */
  53. /* end device-dependent registers */
  54.     short    mt_resid;    /* residual count */
  55. /* the following two are not yet implemented */
  56.     daddr_t    mt_fileno;    /* file number of current position */
  57.     daddr_t    mt_blkno;    /* block number of current position */
  58. /* end not yet implemented */
  59. };
  60.  
  61. /*
  62.  * Constants for mt_type byte.  These are the same
  63.  * for controllers compatible with the types listed.
  64.  */
  65. #define    MT_ISTS        0x01        /* TS-11 */
  66. #define    MT_ISHT        0x02        /* TM03 Massbus: TE16, TU45, TU77 */
  67. #define    MT_ISTM        0x03        /* TM11/TE10 Unibus */
  68. #define    MT_ISMT        0x04        /* TM78/TU78 Massbus */
  69. #define    MT_ISUT        0x05        /* SI TU-45 emulation on Unibus */
  70. #define    MT_ISCPC    0x06        /* SUN */
  71. #define    MT_ISAR        0x07        /* SUN */
  72. #define    MT_ISTMSCP    0x08        /* DEC TMSCP protocol (TU81, TK50) */
  73.  
  74. /* mag tape io control commands */
  75. #define    MTIOCTOP    _IOW(m, 1, struct mtop)        /* do a mag tape op */
  76. #define    MTIOCGET    _IOR(m, 2, struct mtget)    /* get tape status */
  77. #define MTIOCIEOT    _IO(m, 3)            /* ignore EOT error */
  78. #define MTIOCEEOT    _IO(m, 4)            /* enable EOT error */
  79.  
  80. #ifndef KERNEL
  81. #define    DEFTAPE    "/dev/rmt12"
  82. #endif
  83.  
  84. /* EOF mtio.h */
  85.