home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0210 - 0219 / ibm0210-0219 / ibm0213.tar / ibm0213 / LS4APWAD.ZIP / LS40A.A12 / IBMLSA / IBM400R2 / OSLANAPI.ZIP / IBMLAN / NETSRC / H / REMUTIL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-10  |  9.5 KB  |  228 lines

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