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