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