home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dsstlkt5.zip / dssos2tk / dss / REMUTIL.H < prev    next >
C/C++ Source or Header  |  1998-05-08  |  10KB  |  226 lines

  1. /**************************************************************************/
  2. /*                                                                        */
  3. /*              IBM OS/2(tm) Directory and Security Services (DSS)        */
  4. /*                            Version 5.0                                 */
  5. /*                   (C) Copyright IBM Corp. 1995                         */
  6. /*                  Licensed Materials - Property of IBM                  */
  7. /*                                                                        */
  8. /**************************************************************************/
  9. /********************************************************************/
  10.  
  11. /********************************************************************
  12.  *                                                                  *
  13.  *  About this file ...  REMUTIL.H                                  *
  14.  *                                                                  *
  15.  *  This file contains information about the NetRemote 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. #ifdef  ANY_32_BIT
  31. #pragma pack(1)
  32. #endif
  33.  
  34.  
  35. #ifndef NETREMUTIL_INCLUDED
  36.  
  37. #define NETREMUTIL_INCLUDED
  38.  
  39.  
  40. /****************************************************************
  41.  *                                                              *
  42.  *              Function prototypes - REMOTE                    *
  43.  *                                                              *
  44.  ****************************************************************/
  45.  
  46. extern API_FUNCTION
  47.   NetRemoteCopy ( const unsigned char LSFAR * pszSourcePath,
  48.                   const unsigned char LSFAR * pszDestPath,
  49.                   const unsigned char LSFAR * pszSourcePasswd,
  50.                   const unsigned char LSFAR * pszDestPasswd,
  51.                   unsigned short     fsOpen,
  52.                   unsigned short     fsCopy,
  53.                   unsigned char LSFAR *       pbBuffer,
  54.                   unsigned short     cbBuffer );
  55.  
  56. extern API_FUNCTION
  57.   NetRemoteExec ( unsigned char LSFAR *       pszReserved1,
  58.                   unsigned char LSFAR *       pszFailName,
  59.                   unsigned LSINT     cbFailName,
  60.                   unsigned LSINT     fAsync,
  61.                   const unsigned char LSFAR * pszArgs,
  62.                   const unsigned char LSFAR * pszEnvs,
  63.                   unsigned char LSFAR *       pReturnCodes,
  64.                   const unsigned char LSFAR * pszPgmName,
  65.                   unsigned char LSFAR *       pszReserved2,
  66.                   unsigned short     fsRemoteExec );
  67.  
  68. extern API_FUNCTION
  69.   NetRemoteMove ( const unsigned char LSFAR * pszSourcePath,
  70.                   const unsigned char LSFAR * pszDestPath,
  71.                   const unsigned char LSFAR * pszSourcePasswd,
  72.                   const unsigned char LSFAR * pszDestPasswd,
  73.                   unsigned short     fsOpen,
  74.                   unsigned short     fsMove,
  75.                   unsigned char LSFAR *       pbBuffer,
  76.                   unsigned short     cbBuffer );
  77.  
  78. extern API_FUNCTION
  79.   NetRemoteTOD ( const unsigned char LSFAR * pszServer,
  80.                  unsigned char LSFAR *       pbBuffer,
  81.                  unsigned short     cbBuffer );
  82.  
  83.  
  84. /****************************************************************
  85.  *                                                              *
  86.  *              Data structure templates - REMOTE               *
  87.  *                                                              *
  88.  ****************************************************************/
  89.  
  90. struct copy_info {
  91.         unsigned short  ci_num_copied;
  92.         unsigned char   ci_err_buf[1];
  93. };      /* copy_info */
  94.  
  95.  
  96. struct move_info {
  97.         unsigned short  mi_num_moved;
  98.         unsigned char   mi_err_buf[1];
  99. };      /* move_info */
  100.  
  101. struct time_of_day_info {
  102.     unsigned long   tod_elapsedt;   /* time from 1-1-1970 in seconds */
  103.     unsigned long   tod_msecs;      /* milliseconds */
  104.     unsigned char   tod_hours;      /* hours */
  105.     unsigned char   tod_mins;       /* minutes */
  106.     unsigned char   tod_secs;       /* seconds */
  107.     unsigned char   tod_hunds;      /* hundredths */
  108.     unsigned short  tod_timezone;   /* time zone in minutes from GMT */
  109.     unsigned short  tod_tinterval;  /* timer interval (units = 0.0001 sec) */
  110.     unsigned char   tod_day;        /* day */
  111.     unsigned char   tod_month;      /* month */
  112.     unsigned short  tod_year;       /* year */
  113.     unsigned char   tod_weekday;    /* day of week */
  114. };      /* time_of_day_info */
  115.  
  116.  
  117. #ifdef PURE_32
  118. /****************************************************************
  119.  *                                                              *
  120.  *              Function prototypes - REMOTE                    *
  121.  *              For "pure" 32-bit code                          *
  122.  ****************************************************************/
  123.  
  124. extern API32_FUNCTION
  125. Net32RemoteCopy ( const unsigned char      * pszSourcePath,
  126.                   const unsigned char      * pszDestPath,
  127.                   const unsigned char      * pszSourcePasswd,
  128.                   const unsigned char      * pszDestPasswd,
  129.                   unsigned long      fsOpen,          /* was short */
  130.                   unsigned long      fsCopy,          /* was short */
  131.                   unsigned char    * pbBuffer,
  132.                   unsigned long      ulBuffer );      /* was short */
  133.  
  134. extern API32_FUNCTION
  135. Net32RemoteExec ( unsigned char    * pszReserved1,
  136.                   unsigned char    * pszFailName,
  137.                   unsigned long      cbFailName,    /* was unsigned LSINT */
  138.                   unsigned long      fAsync,        /* was unsigned LSINT */
  139.                   const unsigned char      * pszArgs,
  140.                   const unsigned char      * pszEnvs,
  141.                   unsigned char    * pReturnCodes,
  142.                   const unsigned char      * pszPgmName,
  143.                   unsigned char    * pszReserved2,
  144.                   unsigned long      fsRemoteExec );  /* was short */
  145.  
  146. extern API32_FUNCTION
  147. Net32RemoteMove ( const unsigned char      * pszSourcePath,
  148.                   const unsigned char      * pszDestPath,
  149.                   const unsigned char      * pszSourcePasswd,
  150.                   const unsigned char      * pszDestPasswd,
  151.                   unsigned long      fsOpen,          /* was short */
  152.                   unsigned long      fsMove,          /* was short */
  153.                   unsigned char    * pbBuffer,
  154.                   unsigned long      ulBuffer );      /* was short */
  155.  
  156. extern API32_FUNCTION
  157. Net32RemoteTOD ( const unsigned char      * pszServer,
  158.                  unsigned char    * pbBuffer,
  159.                  unsigned long      ulBuffer );       /* was short */
  160. #endif /* PURE_32 */
  161.  
  162.  
  163. /****************************************************************
  164.  *                                                              *
  165.  *           Special values and constants - REMOTE              *
  166.  *                                                              *
  167.  ****************************************************************/
  168.  
  169. /*
  170.  *      Bit values for the "copyflags" parameter of NetRemoteCopy
  171.  *      and the "moveflags" parameter of NetRemoteMove.
  172.  *
  173.  *      bit 0:          1 - destination mode must be a file
  174.  *      bit 1:          1 - destination mode must be a directory
  175.  *
  176.  *      The following bits are defined for NetRemoteCopy ONLY.
  177.  *
  178.  *      bit 2:          0 - destination copy mode is binary.
  179.  *                      1 - destination copy mode is ASCII.
  180.  *      bit 3:          0 - source copy mode is binary.
  181.  *                      1 - source copy mode is ASCII.
  182.  *      bit 4:          1 - verify all writes.
  183.  */
  184.  
  185. #define MUST_BE_FILE    0x1
  186. #define MUST_BE_DIR    0x2
  187. #define ASCII_DEST    0x4
  188. #define ASCII_SOURCE    0x8
  189. #define VERIFY        0x10
  190.  
  191.  
  192. /*
  193.  *    Bit values for the "remexecflags" parameter of NetRemoteExec.
  194.  *
  195.  *    bit 0:      0 - use msg mode pipe for std in
  196.  *            1 - use unsigned charmode pipe for std in
  197.  *    bit 1:      0 - CWait for process tree before returning
  198.  *                ExitCode to Ghost
  199.  *            1 - CWait for exec'ed process before returning
  200.  *                ExitCode to Ghost
  201.  *    bit 2:      0 - Map SIGINTR and SIGBREAK to SIGKILL when
  202.  *                remoting signals
  203.  *            1 - Send signals as received
  204.  */
  205.  
  206. #define REM_PIPE_MODE          1
  207. #define REM_PIPE_MODE_MSG      0
  208. #define REM_PIPE_MODE_CHAR     1
  209.  
  210. #define REM_WAIT_MODE         2
  211. #define REM_WAIT_MODE_PROCESS     0
  212. #define REM_WAIT_MODE_TREE     2
  213.  
  214. #define REM_SIGL_MODE         4
  215. #define REM_SIGL_MODE_MAP    0
  216. #define REM_SIGL_MODE_RAW    4
  217.  
  218.  
  219. #endif /* NETREMUTIL_INCLUDED */
  220.  
  221.  
  222. #ifdef  ANY_32_BIT
  223. #pragma pack()
  224. #endif
  225.  
  226.