home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / DASD.H < prev    next >
C/C++ Source or Header  |  1999-04-29  |  10KB  |  228 lines

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