home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lansystk.zip / INCLUDE / LANSERV / DASD.H < prev    next >
C/C++ Source or Header  |  1998-05-08  |  10KB  |  230 lines

  1. /**************************************************************************/
  2. /*                                                                        */
  3. /*              IBM OS/2(tm) Local Area Network (LAN) Server              */
  4. /*                            Version 4.0                                 */
  5. /*                   (C) Copyright IBM Corp. 1988, 1994                   */
  6. /*                  Licensed Materials - Property of IBM                  */
  7. /*                            52G8468, 52G8475                            */
  8. /*                                                                        */
  9. /**************************************************************************/
  10.  
  11. /********************************************************************
  12.  *                                                                  *
  13.  *  About this file ...  DASD.H                                     *
  14.  *                                                                  *
  15.  *  This file contains information about the NetDASD apis.          *
  16.  *                                                                  *
  17.  *      Function prototypes.                                        *
  18.  *                                                                  *
  19.  *      Data structure templates.                                   *
  20.  *                                                                  *
  21.  *      Definition of special values.                               *
  22.  *                                                                  *
  23.  *                                                                  *
  24.  *  NOTE:  You must include NETCONS.H before this file, since this  *
  25.  *         file depends on values defined in NETCONS.H.             *
  26.  *                                                                  *
  27.  ********************************************************************/
  28.  
  29.  
  30. #pragma pack(1)
  31.  
  32.  
  33.  
  34. /****************************************************************
  35.  *                                                              *
  36.  *              Function prototypes - API DASD                  *
  37.  *                                                              *
  38.  ****************************************************************/
  39.  
  40. extern  API_FUNCTION
  41.     NetDASDAdd( const unsigned char LSFAR *server,
  42.                 short                      level,
  43.                 unsigned char LSFAR       *buf,
  44.                 unsigned short             buflen
  45.               );
  46.  
  47. extern  API_FUNCTION
  48.     NetDASDDel( const unsigned char LSFAR *server,
  49.                 unsigned char LSFAR       *resource
  50.               );
  51.  
  52. extern  API_FUNCTION
  53.     NetDASDGetInfo( const unsigned char LSFAR    *server,
  54.                     unsigned char LSFAR          *resource,
  55.                     short                         level,
  56.                     unsigned char LSFAR          *buf,
  57.                     unsigned short                buflen,
  58.                     unsigned short LSFAR         *total
  59.                   );
  60.  
  61.  
  62. extern  API_FUNCTION
  63.     NetDASDSetInfo( const unsigned char LSFAR *server,
  64.                     unsigned char LSFAR       *resource,
  65.                     short                      level,
  66.                     unsigned char LSFAR       *buf,
  67.                     unsigned short             buflen
  68.                   );
  69.  
  70.  
  71. extern  API_FUNCTION
  72.     NetDASDEnum( const unsigned char LSFAR *server,
  73.                  unsigned char LSFAR       *path,
  74.                  short                      recursive,
  75.                  short                      level,
  76.                  unsigned char LSFAR       *buf,
  77.                  unsigned short             buflen,
  78.                  unsigned short LSFAR      *entries_returned,
  79.                  unsigned short LSFAR      *total_entries
  80.                );
  81.  
  82.  
  83. extern  API_FUNCTION
  84.     NetDASDCheck( const unsigned char LSFAR   *server,
  85.                   unsigned char LSFAR         *path,
  86.                   short                        level,
  87.                   unsigned char LSFAR         *buf,
  88.                   unsigned short               buflen,
  89.                   unsigned short LSFAR        *TotalAvail
  90.                 );
  91.  
  92. extern  API_FUNCTION
  93.     NetDASDCtl(  const unsigned char LSFAR *server,
  94.                  short                      level,
  95.                  unsigned char LSFAR       *buf,
  96.                  unsigned short             buflen
  97.                );
  98.  
  99.              /****************************
  100.               *      DATA STRUCTURES     *
  101.               ****************************/
  102.  
  103. struct dasd_info_0 {                     /* Level 0 data structure */
  104.     unsigned char LSFAR * LSPTR d0_resource_name; /* Name of resource     */
  105.     unsigned long d0_max;                /* DASD limit             */
  106.     unsigned long d0_use;                /* Usage count (bytes)    */
  107.     unsigned char d0_flag;               /* validate flags         */
  108.     unsigned char d0_thresh;       /* Threshold value in percentage       */
  109.     unsigned char d0_delta;        /* Incremental thresh value in percent.*/
  110. };  /* dasd_info_0 */
  111.  
  112. struct dasd_init_0 {                     /* Used by NetDASDCtl        */
  113.     unsigned char i0_CtlFlag;            /* Control flag              */
  114.     unsigned char i0_Drive;              /* Drive letter: 'C', 'D'... */
  115. };  /* dasd_init_0 */
  116.  
  117. struct dasd_check_0 {                      /* Used by NetDASDCheck  */
  118.     unsigned char LSFAR * LSPTR dc0_path;  /* Determining path      */
  119.     unsigned long               dc0_avail; /* Available space in KB */
  120.     unsigned long               dc0_usage; /* Directory size in KB  */
  121. };  /* dasd_check_0 */
  122.  
  123. /* On return, the dc0_path field contains the directory path
  124.  * at which the dc0_avail value space was calculated.
  125.  */
  126.  
  127. typedef struct dasd_info_0  DASDINFO0;
  128. typedef DASDINFO0 * PDASDINFO0;
  129.  
  130. typedef struct dasd_init_0  DASDINIT0;
  131. typedef DASDINIT0 * PDASDINIT0;
  132.  
  133. typedef struct dasd_check_0 DASDCHECK0;
  134. typedef DASDCHECK0 * PDASDCHECK0;
  135.  
  136.  
  137.  
  138. #ifdef PURE_32
  139. /****************************************************************
  140.  *                                                              *
  141.  *              Function prototypes - API DASD                  *
  142.  *                  for "pure" 32-bit code                      *
  143.  *                                                              *
  144.  ****************************************************************/
  145.  
  146. extern  API32_FUNCTION
  147.   Net32DASDAdd( const unsigned char  * pszServer,
  148.                 unsigned long          uLevel,        /* was signed short */
  149.                 unsigned char        * pbBuffer,
  150.                 unsigned long          ulBuffer       /* was USHORT */
  151.               );
  152.  
  153. extern  API32_FUNCTION
  154.   Net32DASDDel( const unsigned char  * pszServer,
  155.                 unsigned char        * pszResource
  156.               );
  157.  
  158. extern  API32_FUNCTION
  159.   Net32DASDGetInfo( const unsigned char   * pszServer,
  160.                     unsigned char         * pszResource,
  161.                     unsigned long           ulLevel,    /* was signed short */
  162.                     unsigned char         * pbBuffer,
  163.                     unsigned long           ulBuffer,   /* was USHORT  */
  164.                     unsigned long         * pulTotal    /* was USHORT* */
  165.                   );
  166.  
  167.  
  168. extern  API32_FUNCTION
  169.   Net32DASDSetInfo( const unsigned char  * pszServer,
  170.                     unsigned char        * pszResource,
  171.                     unsigned long          ulLevel,      /* was signed short */
  172.                     unsigned char        * pbBuffer,
  173.                     unsigned long          ulBuffer      /* was USHORT */
  174.                   );
  175.  
  176.  
  177. extern  API32_FUNCTION
  178.   Net32DASDEnum( const unsigned char    * pszServer,
  179.                  unsigned char          * pszPath,
  180.                  unsigned long            ulRecursive,   /* was signed short */
  181.                  unsigned long            ulLevel,       /* was signed short */
  182.                  unsigned char          * pbBuffer,
  183.                  unsigned long            ulBuffer,      /* was USHORT */
  184.                  unsigned long          * pulEntriesReturned,  /* was USHORT* */
  185.                  unsigned long          * pulTotalEntries      /* was USHORT* */
  186.                );
  187.  
  188.  
  189. extern  API32_FUNCTION
  190.   Net32DASDCheck( const unsigned char   * pszServer,
  191.                   unsigned char         * pszPath,
  192.                   unsigned long           ulLevel,        /* was signed short */
  193.                   unsigned char         * pbBuffer,
  194.                   unsigned long           ulBuffer,       /* was USHORT  */
  195.                   unsigned long         * pulTotalAvail   /* was USHORT* */
  196.                 );
  197.  
  198. extern  API32_FUNCTION
  199.   Net32DASDCtl(  const unsigned char  * pszServer,
  200.                  unsigned long          ulLevel,         /* was signed short*/
  201.                  unsigned char        * pbBuffer,
  202.                  unsigned long          ulBuffer         /* was USHORT*/
  203.                );
  204. #endif /* PURE_32 */
  205.  
  206.  
  207.              /****************************
  208.               *     MANIFESTS            *
  209.               ****************************/
  210.  
  211. /*  Used with NetDASDCtl() - values for i0_CtlFlag                  */
  212.  
  213. #define DASD_CTL_INSTALL        1       /* Install DASD_LIMITS      */
  214. #define DASD_CTL_REMOVE         2       /* Remove DASD_LIMITS       */
  215. #define DASD_CTL_RECALC         3       /* recalculate usage        */
  216.  
  217.  
  218. /*
  219.  * Bit masks used with d0_flag
  220.  */
  221.  
  222. #define DASD_VALIDATE_LIMIT_ON  0x00    /* Default--set if tree size < limit */
  223. #define DASD_VALIDATE_LIMIT_OFF 0x01    /* Set limit regardless of tree size */
  224.  
  225. #ifdef ANY_32_BIT
  226. #endif
  227.  
  228. #pragma pack()
  229.  
  230.