home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff294.lzh / DNet / amiga / dnet / channel.h next >
C/C++ Source or Header  |  1989-12-11  |  2KB  |  84 lines

  1.  
  2. /*
  3.  *  CHANNEL.H
  4.  *
  5.  *  DNET (c)Copyright 1988, Matthew Dillon, All Rights Reserved.
  6.  *
  7.  *  Channel structures for SCMD_* channel commands.
  8.  */
  9.  
  10. #ifndef DNET_CHANNEL_H
  11. #define DNET_CHANNEL_H
  12.  
  13. #ifndef DNET_H
  14. typedef struct IOStdReq IOSTD;
  15. #endif
  16.  
  17. #define CSWITCH struct _CSWITCH
  18. #define COPEN    struct _COPEN
  19. #define CCLOSE    struct _CCLOSE
  20. #define CACKCMD struct _CACKCMD
  21. #define CEOFCMD struct _CEOFCMD
  22. #define CIOCTL    struct _CIOCTL
  23.  
  24. CSWITCH {        /*  SWITCH current data channel */
  25.     ubyte   chanh;
  26.     ubyte   chanl;
  27. };
  28.  
  29. COPEN {         /*  OPEN port on channel    */
  30.     ubyte   chanh;
  31.     ubyte   chanl;
  32.     ubyte   porth;
  33.     ubyte   portl;
  34.     ubyte   error;    /*  error return 0=ok        */
  35.     ubyte   pri;
  36. };
  37.  
  38. CCLOSE {        /*  CLOSE a channel        */
  39.     ubyte   chanh;
  40.     ubyte   chanl;
  41. };
  42.  
  43. CACKCMD {        /*  Acknowledge an open/close        */
  44.     ubyte   chanh;
  45.     ubyte   chanl;
  46.     ubyte   error;    /*  ERETRY ENOPORT ECLOSE1 ECLOSE2  */
  47.     ubyte   filler;
  48. };
  49.  
  50. CEOFCMD {        /*  Send [R/W] EOF        */
  51.     ubyte   chanh;
  52.     ubyte   chanl;
  53.     ubyte   flags;
  54.     ubyte   filler;
  55. };
  56.  
  57. CIOCTL {
  58.     ubyte   chanh;    /* channel            */
  59.     ubyte   chanl;
  60.     ubyte   cmd;    /* ioctl command        */
  61.     ubyte   valh;    /* ioctl value            */
  62.     ubyte   vall;
  63.     ubyte   valaux;    /* auxillary field        */
  64. };
  65.  
  66. #define CIO_SETROWS    1    /* PTY's only                   */
  67. #define CIO_SETCOLS    2    /* PTY's only                   */
  68. #define CIO_STOP    3    /* any channel, flow control    */
  69. #define CIO_START    4    /* any channel, flow control    */
  70. #define CIO_FLUSH    5
  71. #define CIO_MODE    6    /* b0=txlate13->10 b1=localecho b2=LF=CRLF */
  72.  
  73. #define CHAN    struct _CHAN
  74.  
  75. CHAN {
  76.     PORT    *port;
  77.     IOSTD   *ior;
  78.     ubyte   state;
  79.     ubyte   flags;
  80.     char    pri;    /*  transmit priority    */
  81. };
  82.  
  83. #endif
  84.