home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_09 / 8n09071b < prev    next >
Text File  |  1990-06-01  |  3KB  |  87 lines

  1. Listing 5 - Basic File System Control Structures
  2.  
  3.  
  4. /**************************************************************
  5.  *      application session/file control block structure      *
  6.  **************************************************************/
  7.  
  8. typedef struct {
  9.     int        state;          /* state of session */
  10.     char        sname[16];      /* server name      */
  11.     char    fname[64];      /* filename name    */
  12.     char        ftype[8];       /* access type      */
  13.     } RFILE;
  14.  
  15.  
  16. /**************************************************************
  17.  *      client fifo control block structure                   *
  18.  **************************************************************/
  19.  
  20. typedef struct {
  21.     int         afifo;          /* apl fifo      */
  22.     int         pid;            /* apl pid       */
  23.     int         link;           /* link count    */
  24.     char        afname[64];     /* apl fifo name */
  25.     } C_FCB;
  26.  
  27.  
  28. /**************************************************************
  29.  *      client session control block structure                *
  30.  **************************************************************/
  31.  
  32. typedef struct {
  33.     int         pid;            /* apl pid           */
  34.     int         fid;            /* apl file id       */
  35.     int         lid;            /* line cntl blk id  */
  36.     int         state;          /* cntl blk state    */
  37.     int         ssid;           /* server session id */
  38.     } C_SCB;
  39.  
  40.  
  41. /**************************************************************
  42.  *      client line control block structure                   *
  43.  **************************************************************/
  44.  
  45. typedef struct {
  46.     int         port;           /* x.25 port id       */
  47.     int         cid;            /* x.25 circuit id    */
  48.     int         link;           /* session link count */
  49.     char        sname[16];      /* server name        */
  50.     char        raddr[16];      /* server X.25 addr   */
  51.     char       *cbuf;           /* x.25 cmd buf ptr   */
  52.     char       *rbuf;           /* x.25 rsp buf ptr   */
  53.     char       *dbuf;           /* x.25 data buf ptr  */
  54.     } C_LCB;
  55.  
  56.  
  57. /**************************************************************
  58.  *      server line control block structure                   *
  59.  **************************************************************/
  60.  
  61. typedef struct {
  62.     int         port;           /* x.25 port id       */
  63.     int         cid;            /* x.25 circuit id    */
  64.     int         link;           /* session link count */
  65.     char        cname[16];      /* client name        */
  66.     char        raddr[16];      /* client X.25 addr   */
  67.     char       *cbuf;           /* x.25 cmd buf ptr   */
  68.     char       *rbuf;           /* x.25 rsp buf ptr   */
  69.     char       *dbuf;           /* x.25 data buf ptr  */
  70.     } S_LCB;
  71.  
  72.  
  73. /**************************************************************
  74.  *      server session control block structure                *
  75.  **************************************************************/
  76.  
  77. typedef struct {
  78.     int         lid;            /* line cntl blk id  */
  79.     FILE        *fid;           /* file cntl blk id  */
  80.     char        fname[64];      /* file name         */
  81.     char        ftype[8];       /* access type       */
  82.     int         state;          /* cntl blk state    */
  83.     int         csid;           /* client session id */
  84.     } S_SCB;
  85.  
  86.  
  87.