home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / strppc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.0 KB  |  112 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_STRPPC_H
  11. #define _SYS_STRPPC_H
  12.  
  13. #ident    "@(#)/usr/include/sys/strppc.h.sl 1.1 4.0 12/08/90 3081 AT&T-USL"
  14.  
  15. /*
  16.  * b_state (board state) flags
  17.  *
  18.  *    ISSYSGEN:    board has been sysgen'ed and is operational
  19.  *    CIOTYPE        common IO type command
  20.  *    SYSGFAIL        indicated that SYSGEN has failed
  21.  *    EXPRESS:    REQUEST EXPRESS entry "being used"
  22.  */
  23. #define ISSYSGEN    0x0001
  24. #define CIOTYPE        0x0002
  25. #define SYSGFAIL    0x0004
  26. #define EXPRESS        0x8000
  27.  
  28.  
  29. /*
  30.  * t_dstat (special tty struc flags) flag definition
  31.  *    SETOPT        a SET_OPTION command is in progress
  32.  *    SPLITMSG    output message split into 64 byte chunks
  33.  *    WENTRY        wait for xmit queue entry
  34.  *      SUPBUF          have buffers been supplied for receive?
  35.  *      WRTQDRAIN       Wait for write queues to drain to user's terminal
  36.  *    CLDRAIN        wait for output to drain
  37.  *    OPDRAIN        wait for output to drain
  38.  *    WBREAK        wait for break send completion
  39.  */
  40. #define SETOPT        0x0001
  41. #define SPLITMSG    0x0002
  42. #define WENTRY         0x0004
  43. #define SUPBUF        0x0008
  44. #define WRTQDRAIN       0x0010
  45. #define CLDRAIN        0x0020
  46. #define OPDRAIN        0x0040
  47. #define WBREAK          0x0080
  48.  
  49. #define MAX_RBUF  17    /* 4 recv bufs/tty + 1 extra */
  50. #define PPBUFSIZ 64    /* MAX. size of in/out buffer */
  51.  
  52. /*
  53.  * Constants needed for determining the version
  54.  * of the PORTS board, e. g. PORTS or HIPORTS
  55.  *
  56.  *    PPC_VERS    request version number of a ppc board (ioctl)
  57.  *    O_VERS        oflag value for opening a board to read version number
  58.  *    DEFAULTVER    default version number for boards without one
  59.  *    HIPORTS        rom version number of the HIPORT board
  60.  */
  61.  
  62. #define PPC_VERS (('v'<<8)|1)   
  63. #define O_VERS  0200           
  64. #define DEFAULTVER 1           
  65. #define HIPORTS  2              
  66.  
  67. struct pprbuf
  68. {
  69.     mblk_t *bp;    /* message block pointer */
  70.     long sp;    /* PHYSICAL address of bp->b_datap->db_base */
  71.     long ep;    /* PHYSICAL address of bp->b_datap->db_lim */
  72. };
  73.  
  74. /*
  75.  * PORTS board control block
  76.  */
  77. struct ppcboard {
  78.     unsigned short b_state;    /* board state flags             */
  79.     short dcb;        /* desired nbr of cblocks for rqueue */
  80.     short qcb;        /* actual nbr of allocated cblocks   */
  81.     short retcode;        /* return code for lla commands         */
  82.      short p_nbr[NUM_QUEUES];    /* bnr of entries in queue   */
  83.     RQUEUE rqueue;
  84.     CQUEUE cqueue;
  85.     struct pprbuf rbp[MAX_RBUF];/* allocated recv buffers for PPC */
  86.     };
  87.  
  88. #define BSTATE(b)    npp_board[b].b_state
  89. #define PNBR(b,p)    npp_board[b].p_nbr[p]
  90.  
  91.  
  92.  
  93. /*
  94.  * Variables allocated by the operating system
  95.  */
  96.  
  97. extern int npp_cnt;
  98. extern struct strtty npp_tty[];
  99. extern char *npp_addr[];
  100. extern struct ppcboard npp_board[];
  101. extern int ncsbit[];
  102. extern short nppcbid[];
  103. extern short nppcpid[];
  104.  
  105. /*
  106.  Variables allocated by the driver
  107.  */
  108.  
  109. extern int npp_bnbr;
  110.  
  111. #endif    /* _SYS_STRPPC_H */
  112.