home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / network / rexxlan / rexxlan.asc < prev    next >
Text File  |  1993-11-08  |  189KB  |  5,093 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                             REXXLAN/2 1.0 documentation
  10.  
  11.                             !!!!!!!!!!!!!!!!!!!!!!!!!!!
  12.  
  13.                                    FINAL RELEASE
  14.  
  15.                             !!!!!!!!!!!!!!!!!!!!!!!!!!!
  16.  
  17.                ┌──────────────────────────────────────────────────┐
  18.                │                    REXXLAN/2                     │
  19.                │     the programmers REXX API extension for       │
  20.                │     IBM LAN Server (and compatible) networks.    │
  21.                └──────────────────────────────────────────────────┘
  22.  
  23.                   (c) EDV Beratung Leif Braeuer, 1992, 1993
  24.                       2080 Pinneberg, Germany
  25.                       EMAIL: CIS: 100024,3436, Fido: 2:240/5200.13
  26.  
  27.  
  28.  
  29.  
  30.  
  31. Trademarks:
  32. ───────────
  33.  
  34. The following terms are trademarks of the International Business Machines
  35. Corporation:
  36.  
  37.      REXX
  38.      IBM 
  39.      OS/2 
  40.      LAN Server 
  41.  
  42.  
  43. References:
  44. ───────────
  45.  
  46. The description of the LAN Server API bases on the IBM publication:
  47. IBM OS/2 LAN Server Version 3.0: Application Programmer's Reference
  48.  
  49.  
  50.                                   COPYRIGHT
  51.                                   ─────────
  52.  
  53. THE COMPONENTS OF REXXLAN/2 THAT MEANS THE SOFTWARE, USER'S MANUAL(S) AND
  54. OTHER ITEMS ACCOMPANYING THIS AGREEMENT CONTAIN MATERIAL IN WHICH LEIF
  55. BRAEUER NAD VTS-DATENSYSTEME GMBH & CO. RETAIN PROPRIETARY RIGHTS.
  56.  
  57.  
  58. YOU ARE ALLOWED TO EVALUATE THIS REXXLAN/2 PACKAGE FOR AT MOST 30 DAYS.
  59. AFTER THIS TESTING PERIOD YOU MUST DELETE ALL COPIES OF THIS PACKAGE
  60. INCLUDING ALL FILES AND DOKUMENTATION.
  61. ADDITINALLY, WILL THIS VERSION EXPIRE AT GENERAL AVAILABILITY OF ANY
  62. FOLLOWING VERSION OR AT LEAST ON MARCH 31, 1994.
  63. THE PROGRAM AND DOCUMENTATION ARE PROVIDED "AS-IS".
  64.  
  65.  
  66. THIS EVALUATION PACKAGE MAY BE DISTRIBUTED UNCHANGED FREELY VIA BULLETIN
  67. BOARD SYSTEMS INCLUDING ALL FILES AND CONSIDERING THE COPYRIGHT NOTES.
  68. YOU ARE NOT ALLOWED TO CHARGE ANY DISTRIBUTION FEES EXCEPT FOR REASONABLE
  69. HANDLING COSTS.
  70.  
  71.  
  72.                                  DISCLAIMER
  73.                                  ──────────
  74.  
  75. The user of the program by using it agrees not to hold the author nor the
  76. distributor liable for any damage that may have been caused by either the
  77. proper or improper functioning or by the use or misuse of this RexxLan/2
  78. REXX programming extension.
  79.  
  80.  
  81.                                 TABLE OF CONTENTS
  82.                                 ─────────────────
  83.  
  84.     Introduction
  85.          How do I use RexxLan/2 ?
  86.          RexxLan/2 and the REXX variable pool
  87.          Installation
  88.  
  89.     The RexxLan/2 Functions Reference
  90.          INTERNAL RexxLan/2 FUNCTIONS
  91.          ACCESS PERMISSION CATEGORY
  92.          REQUESTER SECTION
  93.          DOMAIN SECTION
  94.          USE SECTION
  95.          MESSAGE SECTION
  96.          CONFIGURATION SECTION
  97.          CONNECTION SECTION
  98.          ERROR SECTION
  99.          FILE SECTION
  100.          SERVER SECTION
  101.          SESSION SECTION
  102.          SHARE SECTION
  103.          STATISTICS SECTION
  104.          GROUP SECTION
  105.          USER SECTION
  106.          ALIAS SECTION
  107.          APPLICATION SECTION
  108.          USER PROFILE MANAGEMENT
  109.          APPENDICES
  110.  
  111. ----------------------------------------------------------
  112.  
  113.                                 Introduction
  114.                                 ────────────
  115.  
  116. Since the IBM OS/2 version 2.0, IBM provides an easy to use language
  117. extension for the OS/2 Procedures Language/REXX. Third party developer are
  118. able to supply REXX extension DLL, to add "special-need" functions to the
  119. REXX language extent.
  120.  
  121. An example for this kind of extension is REXXUTIL.DLL, a component of 
  122. the operating system, that adds some Workplace-Shell and standard API 
  123. system calls to the REXX language.
  124.  
  125. This well documented possibility to extend REXX and the few command line
  126. programs available for the IBM LAN Server were the base of the idea, to
  127. develop an extension that allows full access to the broad LAN Server API.
  128.  
  129. RexxLan/2:
  130.  
  131. -    provides an API very close to the native C API calls. Programmers
  132.      who are familiar with the C LAN API will not have any problems to
  133.      use the REXX counterparts.
  134. -    will give you full access to all available information
  135. -    enables the access to more than 80 API calls from your REXX
  136.      programs.
  137. -    supports the new LAN Server 3.0 Domain Controller Database
  138.      (DCDB) API.
  139.  
  140. RexxLan/2 is excellent for
  141.  
  142. -    LAN Server administrators with a minimum of REXX programming
  143.      knowledge.
  144. -    testing the LAN Server API
  145. -    prototyping network applications
  146. -    writing tools for a sophisticated use of the LAN Requester
  147.  
  148. In this package you will find two files, RXLAN20.DLL and RXLAN30.DLL,
  149. that implement more than 80 API calls to use in REXX.
  150.  
  151. RXLAN20.DLL is used for LAN Server 2.X Requester, that do not support
  152. the LAN Server 3.0 Domain Controller Database (DCDB) API.
  153.  
  154. RXLAN30.DLL adds these DCDB API calls and can only be used with IBM
  155. LAN Requester 3.0 or higher.
  156.  
  157.  
  158. How do I use RexxLan/2 ?
  159. ────────────────────────
  160.  
  161. The following example shows the use of the RexxLan/2 extension in your 
  162. REXX programs:
  163.  
  164.  
  165.  1: /* REXX */
  166.  2: /* Query which user is logged on this PC */
  167.  3:
  168.  4: CALL RxFuncAdd NetLoadFuncs, RXLAN20, NetLoadFuncs
  169.  5: CALL NetLoadFuncs
  170.  6: SAY 'Querying workstation info...'
  171.  7: ret =  NetWkstaGetInfo( '', '0', 'Buffer', '0', '0' )
  172.  8: IF ret = 0 THEN DO
  173.  9:    SAY 'Logged on user : ' || Buffer.wki0_username
  174. 10:    SAY 'Default domain : ' || Buffer.wki0_langroup
  175. 11:    END
  176. 12: ELSE DO
  177. 13:    IF ret = 2201 THEN DO            /* NERR_NotLoggedOn */
  178. 14:       SAY 'No user is logged on.'
  179. 15:       END
  180. 16:    ELSE DO
  181. 17:       SAY 'Error in NetWkstaGetInfo rc = ' || ret
  182. 18:       END
  183. 19:    END
  184. 20: CALL Netdropfuncs
  185.  
  186.  
  187. In line 4 the REXX function RxFuncAdd is used to add the loading  function
  188. of a REXX extension DLL. Please refer to your REXX Programmers
  189. Reference for more information.
  190.  
  191. The registering function is called NetLoadFuncs (like SysLoadFuncs in the
  192. REXXUTIL.DLL). NetLoadFuncs is loaded from RXLAN20.DLL and
  193. registered under the name NetLoadFuncs.
  194.  
  195. In line 5 the NetLoadFuncs registers all RXLAN20 functions, initialises  all
  196. needed variables and allocates memory for the loaded instance of the DLL.
  197.  
  198.               DO NOT REGISTER ANY OTHER FUNCTION THROUGH THE
  199.                               RXFUNCADD API !
  200.                                      
  201.             UNPREDICTABLE ERRORS WILL OCCUR, IF YOU TRY TO USE
  202.           REXXLAN/2 APIS WITHOUT INITIALIZING THEM WITH NETLOAD-
  203.                                    FUNCS
  204.                                      
  205. In line 7 the NetWkstaGetInfo is called. The first parameter specifies  where
  206. the command will be executed. '' means, the command will be  executed
  207. locally. The second parameter '0' specifies the level of  information needed.
  208. 'Buffer' tells the REXX function under which name  the variables should be
  209. created. The remaining buffers were left for  "future use" and for compatibility
  210. reasons. The lines 9 and 10 show  which variables are created by the Wksta
  211. API call. These values are  printed, if a user is logged on.
  212.  
  213.  
  214. RexxLan/2 and the REXX variable pool
  215. ────────────────────────────────────
  216.  
  217. REXX does not know any structured variables. So, a mechanism had to be 
  218. implemented which simulates this by separating the variable name and its
  219. struct fields by a dot. All components of the structures of IBMs LAN Server
  220. API have identical names in RexxLan/2. The REXX progammer passes the
  221. API the name of a top level qualifier under which the complete variable
  222. structure will be created.
  223.  
  224. The IBM LAN Server Programmers Reference describes the access info
  225. structure for level 1 calls in C as follow:
  226.  
  227.  
  228. struct access_info_1 {
  229.   char  LSFAR * LSPTR acc1_resource_name;
  230.   short               acc1_attr;
  231.   short               acc1_count;  /* number of following acl */
  232. };      /* access_info_1 */
  233.  
  234.  
  235. A REXX programmer who uses e.g. NetAccessGetInfo( '\\SERVER', 'D:\', 1,
  236. 'Buffer', '', '' ) to retrieve the access control informations will find the informa-
  237. tion in the following REXX variables:
  238.  
  239. BUFFER..ACC1_RESOURCENAME
  240. BUFFER.ACC1_ATTR         
  241. BUFFER.ACC1_COUNT
  242. BUFFER.n.ACL_UGNAME
  243. BUFFER.n.ACL_ACCESS     (n: 0..ACC1_COUNT-1)
  244.  
  245. Enumerated structures (returned by Enum functions or like the above example
  246. appended to a GetInfo buffer) are specified by an additional counter following
  247. the top level qualifier of the REXX variable.
  248.  
  249. Some LAN Server SetInfo API support the paramnum field that allows the
  250. programmer to set only one component of a data structure. In this case, the
  251. REXX-buffer parameter does not contain the name of the REXX top level
  252. qualifier for an info structure, but the new content of the component to be
  253. changed.
  254. In the following example, the privilege of an users account (usri_priv) is set
  255. to administrator (2):
  256.  
  257. /* set John's privilege to admin */
  258. /* syntax : NetUserSetInfo( server, user, level, buffer, dummy,
  259. parmnum ) */
  260. ret = NetUserSetInfo( '\\SERVER', 'JOHN', 1, 2, '', 5 )
  261.  
  262.  
  263.  
  264. -----------------------------------------------------------------------------
  265.  
  266. Installation
  267. ────────────
  268.  
  269. To use the RexxLan/2 extension, copy all files from the diskette into a
  270. directory of your choice (in this example all files were copied to the directory
  271. \REXXLAN).
  272.  
  273. XCOPY A:\REXXLAN\* C:\REXXLAN\ /S
  274.  
  275. Then add your installation directory to the LIBBPATH and PATH statement
  276. in the CONFIG.SYS
  277.  
  278. LIBPATH=C:\REXXLAN; ......
  279. SET PATH=C:\REXXLAN; ......
  280.  
  281. After saving these modification, end all your applications, shutdown your
  282. system and restart OS/2.
  283.  
  284.  
  285. ------------------------------------------------------------------------------
  286.  
  287.                       The RexxLan/2 Functions Reference
  288.                       ─────────────────────────────────
  289.  
  290. At the moment 17 categories with more than 80 functions of the OS/2 LAN
  291. Server API functions are supported. In some categories the C library holds
  292. some functions of the older versions of LAN Server for compatibility
  293. purposes. The APIs were obsolete and therefore not supported. All Net API
  294. functions return a standard return code. You can find the explanations of  the
  295. LAN Server related error code in the appendix. Some internal RexxLan/2
  296. functions return different return values. They are described in the functions
  297. description.
  298.  
  299.  
  300.                         INTERNAL RexxLan/2 FUNCTIONS
  301.                         ────────────────────────────
  302.  
  303. NetDropFuncs
  304. ────────────
  305.  
  306. Deregister all registered Functions of RXLAN30.DLL or RXLAN20.DLL
  307.  
  308. Syntax: 
  309.  
  310.         CALL NetDropFuncs
  311.  
  312.  
  313. Return:       NONE
  314.  
  315. ----------------------------------------------------------------------------
  316.  
  317. NetLoadFuncs
  318. ────────────
  319. Register additional Function from RXLAN30.DLL or RXLAN20.DLL
  320.  
  321. Syntax:
  322.  
  323.        CALL NetLoadFuncs
  324.  
  325.  
  326. Return:       NONE
  327.  
  328.  
  329. ----------------------------------------------------------------------------
  330.  
  331. NetRexxVersion
  332. ──────────────
  333.  
  334. Get information about RexxLan/2 version, supported LAN Requester, a
  335. textual copyright note and products serial number.
  336.  
  337. Syntax:
  338.  
  339.        ret =  NetRexxVersion( level )
  340.  
  341. Return:       depends on the value of level
  342.  
  343. Parameter:
  344.  
  345.               level
  346.               0:        return major and minor version of
  347.                         RexxLan/2 (e.g. "1.0")
  348.               1:        return supported LAN Requester ver-
  349.                         sion "2.0" or "3.0"
  350.               2:        return a textual copyright note
  351.               3:        Retrieves the serial number of your li-
  352.                         censed version
  353.               4:        level for the ABOUT.CMD to provide
  354.                         a printout of your personal information
  355.                         and serial number
  356.  
  357. Example:
  358.  
  359.         license = NetRexxVersion( 3 )
  360.         SAY 'License number is :' || license
  361.  
  362.  
  363. ----------------------------------------------------------------------------
  364.  
  365. NetRexxQueryFunction
  366. ────────────────────
  367.  
  368. Answer, whether or not a function is available in the loaded RexxLan/2
  369. module.
  370.  
  371. Syntax:
  372.  
  373.        ret = NetRexxQueryFunction( function )
  374.  
  375. Return: 
  376.               1 : function is available
  377.               0 : function is unknown
  378.  
  379. Parameter: 
  380.  
  381.               function  Name of function to test
  382.  
  383.  
  384. Example:
  385.  
  386.         exist = NetRexxQueryFunction( 'NetUserAdd' )
  387.         IF exist = 1 SAY 'Function available'
  388.  
  389. ----------------------------------------------------------------------------
  390.  
  391. NetRexxGetMessage
  392. ─────────────────
  393.  
  394. Retrieve the explanation text for a return code.
  395.  
  396. Syntax:
  397.  
  398.        text = NetRexxGetMessage( errorcode )
  399.  
  400.  
  401. Parameter:
  402.               errorcode Return code of  a Net API
  403.  
  404. The API returns a string containing the explanation of this error.
  405.  
  406. Example:
  407.  
  408.         ....
  409.         ret = NetAccessEnum( server, .... )
  410.         IF ret <> 0 THEN DO
  411.             text = NetRexxGetMessage( ret )
  412.             SAY 'Error in NetAccessEnum:'
  413.             SAY text
  414.             END
  415.         ...
  416.  
  417. ----------------------------------------------------------------------------
  418.  
  419.                          ACCESS PERMISSION CATEGORY
  420.                          ──────────────────────────
  421.  
  422. The functions in the Access Permission category examine or modify user or
  423. group access permission records for server resources.  
  424.  
  425. In order for a user to access a shared resource, an access permission record
  426. must be defined for that user.  An access permission record defines how a user
  427. or group can access a shared resource.  It contains a set of permissions for
  428. each user or group. 
  429.  
  430. The access permission record must be defined by a user or application that
  431. already has administrative permissions, or has special permission for the
  432. resource being shared.  Note that user permissions  have precedence over
  433. group permissions.  If a user is not defined in the access list for the shared
  434. resource, the user's access permissions are the union of all groups to which the
  435. user belongs.  
  436.  
  437.  
  438. Data structures
  439. ───────────────
  440.  
  441. The level parameter controls the level of information provided to or returned
  442. from the NetAccessAdd, NetAccessEnum, NetAccessGetInfo, and NetAccess-
  443. SetInfo functions.  These functions use either a level 0 or a level 1 data
  444. structure. 
  445.  
  446. Access Permission level 0 (access_info_0):
  447.  
  448. ACCESSINFO.ACC0_RESOURCENAME
  449.  
  450.  
  451. Access Permission level 1 (access_info_1):
  452.  
  453. ACCESSINFO.ACC1_RESOURCENAME 
  454. ACCESSINFO.ACC1_ATTR         
  455. ACCESSINFO.ACC1_COUNT
  456.  
  457.  
  458. where:
  459.  
  460. acc1_resource_name      contains a string specifying the name of a particular
  461.                         resource (see the preceding discussion on acc0_resour-
  462.                         ce_name). 
  463. acc1_attr               specifies the attributes of acc1_resource_name. The bits
  464.                         of acc1_attr are defined as follows:
  465.                         Bit       Meaning
  466.                         0         Audit all. When this bit is set, all ac-
  467.                                   cess attempts will be audited.  No other
  468.                                   bits in the field can be set.
  469.                                   It is an error to set any other bits when
  470.                                   bit 0 is set.
  471.                         When bit 0 is cleared, the remaining bits are defined as
  472.                         follows in this table.
  473.                         1-3       Reserved, with a value of 0.
  474.                         4         If 1, audit successful file opens.
  475.                         5         If 1, audit successful file writes and
  476.                                   successful  directory creates.
  477.                         6         If 1, audit successful file deletes or
  478.                                   truncates and successful directory de-
  479.                                   letes.
  480.                         7         If 1, audit successful file and directory
  481.                                   access control profile change.
  482.                         8         If 1, audit failed file opens.
  483.                         9         If 1, audit failed file writes and failed
  484.                                   directory  creates.
  485.                         10        If 1, audit failed file deletes or trun-
  486.                                   cates and failed  directory deletes.
  487.                         11        If 1, audit failed file and directory
  488.                                   access control profile change.
  489.                         12-15     Reserved, with a value of 0.
  490.    
  491. acc1_count              specifies the number of resource permission data
  492.                         structures following the access permission data structu-
  493.                         re.
  494.  
  495. In addition, the access permission data structure can be followed by zero or
  496. more (up to a maximum of 64) resource permission data structures. These
  497. structures are used to define resource permissions for individual users or
  498. groups. 
  499.  
  500. Resource Permissions (acl_info):
  501.  
  502. ACCESSINFO.n.ACL_UGNAME
  503. ACCESSINFO.n.ACL_ACCESS            (n: 0..ACC1_COUNT-1)
  504.  
  505. where:
  506.  
  507. acl_ugname    string specifying a particular user name or group name.
  508. acl_access    specifies permission of a user name or a group name.
  509.               BitMask   Meaning
  510.               0         No permission to access the resource
  511.               0x01      Permission to read data from a resour-
  512.                         ce, and by default execute the resource.
  513.               0x02      Permission to write data to the resour-
  514.                         ce.
  515.               0x04      Permission to create an instance of the
  516.                         resource (such as a file); data can be
  517.                         written to the resource when creating it.
  518.               0x08      Permission to execute the resource.
  519.               0x10      Permission to delete the resource.
  520.               0x40      Permission to modify the permissions
  521.                         (read, write, create, execute, and delete)
  522.                         assigned to a resource for a user  or ap-
  523.                         plication.
  524.               0x8000    Permission for a particular group; if
  525.                         returned, indicates that the entry is for
  526.                         a group.
  527.  
  528. ----------------------------------------------------------------------------
  529.  
  530. NetAccessAdd
  531. ────────────
  532.  
  533. Add a access profile for the resource on a server. Only level 1 info is
  534. supported.
  535.  
  536. Syntax:
  537.  
  538.        ret = NetAccessAdd( server, level, rexx-buffer, dummy )
  539.  
  540.  
  541. Parameter:
  542.  
  543.               server        UNC servername like \\SERVER1
  544.               level         1
  545.               rexx-buffer   name of  REXX variable containing the
  546.                             access permission structure (ac-
  547.                             cess_info_1) followed by resource per-
  548.                             mission structures
  549.               dummy         reserved to preserve NetApi compati-
  550.                             bility
  551.  
  552. Example:
  553.  
  554.         /* Set access permission for USERS to readonly */
  555.         Buffer.acc1_resource_name = 'D:\'
  556.         Buffer.acc1_attr = 0
  557.         Buffer.acc1_count = 1
  558.         Buffer.0.acl_ugname = 'USERS'
  559.         Buffer.0.acl_access = 1
  560.         ret = NetAccessAdd( '\\SERVER', 1, 'Buffer', '' )
  561.  
  562.  
  563. ----------------------------------------------------------------------------
  564.  
  565. NetAccessCheck
  566. ──────────────
  567.  
  568. Used to check that user can do the operation on resource.
  569.  
  570. Syntax:
  571.  
  572.        ret = NetAccessCheck( resvd, user, resource, operation, result )
  573.  
  574.  
  575. Parameter : 
  576.               resvd     must be ""
  577.               user      name of user
  578.               resource  name of resource, e.g. UNC name
  579.               operation access control bitmask
  580.               result    name of REXX variable, that can con-
  581.                         tain:
  582.                         0   access allowed
  583.                         5   ERROR_ACCESS_DENIED
  584.  
  585. Example:
  586.  
  587.         /* Do I have read access to D:\ ? */
  588.         ret = NetAccessCheck( '', 'JOHN', 'D:\', 1, 'res' )
  589.         IF res = 0 SAY 'Access allowed.'
  590.  
  591.  
  592. ----------------------------------------------------------------------------
  593.  
  594. NetAccessGetInfo
  595. ────────────────
  596.  
  597. Get information about access profiles for the resource on a server
  598.  
  599. Syntax:
  600.  
  601.        ret = NetAccessGetInfo( server, resource, level, rexx-buffer, dummy,
  602.        dummy )
  603.  
  604.  
  605. Parameter : 
  606.               server    UNC servername like \\SERVER1
  607.               resource  name of the resource like C:\IBMLAN
  608.               level     only level '1' is supported
  609.               rexx-buffer   name of  REXX variable containing the
  610.                             acc1_ struct followed by acc1_count
  611.                             acl_ structures
  612.               dummy     reserved to preserve NetApi compati-
  613.                         bility
  614.  
  615. Example:
  616.  
  617.         ret= NetAccessGetInfo( '\\SERVER', 'C:\IBMLAN', 1, 'Buffer', '' )
  618.         IF ret = 0 THEN DO
  619.             SAY 'Permissions for ' || Buffer.acc1_resource_name
  620.             DO i = 0 TO Buffer.acc1_count-1
  621.                 SAY Buffer.i.acl_ugname Buffer.i.acl_access
  622.                 END
  623.             END
  624.  
  625.  
  626. ----------------------------------------------------------------------------
  627.  
  628. NetAccessSetInfo
  629. ────────────────
  630. Set information about access profiles for the resourceon a server changes the
  631. access profile for the specified resource. Only level 1 is supported. The
  632. parmnum option is not implemented.
  633.  
  634. Syntax:
  635.  
  636.        ret = NetAccessSetInfo( server, resource, level, rexx-buffer, dummy,
  637.        parmnum )
  638.  
  639.  
  640. Parameter:
  641.               server    UNC servername like \\SERVER1
  642.               resource  name of the resource like C:\IBMLAN
  643.               level     only level '1' is supported
  644.               rexx-buffer   name of  REXX variable containing the
  645.                             access_info_1 struct
  646.               paramnum  0:  change the complete access con-
  647.                             trol entry by providing an ac-
  648.                             cess_info_1 struct.
  649.                         any other value is not supported
  650.               dummy     reserved to preserve NetApi compati-
  651.                         bility
  652.  
  653. Example:
  654.  
  655.     ret= NetAccessGetInfo( '\\SERVER', 'D:\', 1, 'Buffer', '' )
  656.     IF ret = 0 THEN DO
  657.         new = Buffer.acc1_count
  658.         Buffer.new.acl_ugname = 'JOHN'
  659.         Buffer.new.acl_access = 1
  660.         Buffer.acc1_count = Buffer.acc1_count+1
  661.         ret = NetAccessSetInfo( '\\SERVER', 'D:\', 1, 'Buffer', '', 0)
  662.         DO i = 0 TO Buffer.acc1_count-1
  663.             SAY Buffer.i.acl_ugname Buffer.i.acl_access
  664.             END
  665.         END
  666.  
  667.  
  668. ----------------------------------------------------------------------------
  669.  
  670. NetAccessGetUserPerms
  671. ─────────────────────
  672. Returns permissions for the resource on the specified server for user in the
  673. REXX variable
  674.  
  675. Syntax:
  676.  
  677.        ret = NetAccessGetUserPerms( server, user, resource, perms )
  678.  
  679.  
  680. Parameter:
  681.               server    server, which owns the resource
  682.               user      User to get permissions for
  683.               resource  directory, pipe, etc.
  684.               perms     name of REXX variable, that will con-
  685.                         tain the permission mask
  686.  
  687. Example:
  688.  
  689.         ret = NetAccessGetUserPerms( '\\SERVER', 'JOHN', 'D:\', 'perm' )
  690.         IF ret = 0 THEN
  691.             SAY 'Permissions for D:\ :' || perm
  692.  
  693. ----------------------------------------------------------------------------
  694.  
  695. NetAccessEnum
  696. ─────────────
  697.  
  698. Lists all resources with defined access profiles. Only level 0 is supported
  699.  
  700. Syntax:
  701.  
  702.        ret = NetAccessEnum( server, basepath, recursively, level, buffer,
  703.        dummy, eread, dummy )
  704.  
  705.  
  706. Parameter:
  707.               server    name of server, e.g. \\SERVER1
  708.               basepath  display profiles for resources beginning
  709.                         with basepath (e.g. C:\ or \PIPE)
  710.               recursively   1 = include all subdirectories
  711.                         0 = don't include subdirectories
  712.               level     0
  713.               rexx-buffer   name of Rexx variable, containing the
  714.                             found profiles
  715.               eread     Rexx variable containing the number of
  716.                         profiles found
  717.  
  718. Example:
  719.  
  720.         ret = NetAccessEnum( '\\SERVER', 'D:\', 1, 0, 'Buffer', '', 'eread',
  721.         '')
  722.         IF ret = 0 THEN DO
  723.             DO i = 0 TO eread-1
  724.             SAY Buffer.i.acc0_resource_name
  725.             END
  726.         END
  727.  
  728. ----------------------------------------------------------------------------
  729.  
  730. NetAccessDel
  731. ────────────
  732.  
  733. Removes the access profile for the resource
  734.  
  735. Syntax:
  736.  
  737.        ret = NetAccessDel( server, resource )
  738.  
  739.  
  740. Parameter:
  741.               server    name of server (e.g. "\\SERVER1")
  742.               resource  directory, pipe, printer, etc.
  743.  
  744. Example:
  745.  
  746.         ret = NetAccessDel( '\\SERVER', '\PRINT\PRINTER1' )
  747.  
  748. ----------------------------------------------------------------------------
  749.  
  750.                               REQUESTER SECTION
  751.                               ─────────────────
  752.  
  753.  
  754. To log a user name on to or off a requester or to execute a logon script for a
  755. user name, an application calls the  NetWkstaSetUID2 function. 
  756.  
  757. To configure a requester, an application calls the NetWkstaSetInfo function. 
  758. The NetWkstaGetInfo function returns information about the configuration of
  759. a requester. 
  760.  
  761. Note:
  762. The API call NetWkstaSetUID will not be supported. This API has been
  763. replaced by NetWkstaSetUID2.
  764.  
  765.  
  766. Data structures
  767. ───────────────
  768.  
  769. Requester Information (Level 0) (wksta_info_0) :
  770.  
  771. Buffer.wki0_root                      Buffer.wki0_sizworkbuf
  772. Buffer.wki0_computername              Buffer.wki0_maxwrkcache
  773. Buffer.wki0_username                  Buffer.wki0_sesstimeout
  774. Buffer.wki0_langroup                  Buffer.wki0_sizerror
  775. Buffer.wki0_ver_major                 Buffer.wki0_numalerts
  776. Buffer.wki0_ver_minor                 Buffer.wki0_numservices
  777. Buffer.wki0_charwait                  Buffer.wki0_errlogsz
  778. Buffer.wki0_chartime                  Buffer.wki0_printbuftime
  779. Buffer.wki0_charcount                 Buffer.wki0_numcharbuf
  780. Buffer.wki0_keepconn                  Buffer.wki0_sizcharbuf
  781. Buffer.wki0_keepsearch                Buffer.wki0_logon_server
  782. Buffer.wki0_maxthreads                Buffer.wki0_wrkheuristics
  783. Buffer.wki0_maxcmds                   Buffer.wki0_mailslots
  784. Buffer.wki0_numworkbuf
  785.  
  786. Requester Information (Level 1) (wksta_info_1):
  787.  
  788. Requester information level 1 includes all the fields of wksta_info_0, plus
  789. oth_domains, logon_domains, and numdgrambuf. 
  790.  
  791. wki1_root                       wki1_sesstimeout
  792. wki1_computername               wki1_sizerror
  793. wki1_username                   wki1_numalerts
  794. wki1_langroup                   wki1_numservices
  795. wki1_ver_major                  wki1_errlogsz
  796. wki1_ver_minor                  wki1_printbuftime
  797. wki1_charwait                   wki1_numcharbuf
  798. wki1_chartime                   wki1_sizcharbuf
  799. wki1_charcount                  wki1_logon_server
  800. wki1_keepconn                   wki1_wrkheuristics
  801. wki1_keepsearch                 wki1_mailslots
  802. wki1_maxthreads                 wki1_logon_domain
  803. wki1_maxcmds                    wki1_oth_domains
  804. wki1_numworkbuf                 wki1_numdgrambuf
  805. wki1_sizworkbuf
  806. wki1_maxwrkcache
  807.  
  808.  
  809. Requester Information (Level 10)(wksta_info_10): 
  810.  
  811. The wksta_info_10 data structure is supplied to fulfill the needs of remote
  812. users who want to obtain certain information from a server.  This data
  813. structure allows remote users to discover what domain a server belongs to. 
  814.  
  815. wki10_computername
  816. wki10_username
  817. wki10_langroup
  818. wki10_ver_major
  819. wki10_ver_minor
  820. wki10_logon_domain
  821. wki10_oth_domains
  822.  
  823. where:
  824. wki?_root               string containing the path to the IBMLAN directory of
  825.                         the computer (the recommended  default path is \IBM-
  826.                         LAN).
  827. wki?_computername       string containing the computer name of the local
  828.                         requester being configured. 
  829. wki?_username           string containing the user's name logged on to the
  830.                         requester. 
  831. wki?_langroup           string containing the name of the domain to which the
  832.                         requester belongs. 
  833. wki?_ver_major          major version number of the OS/2 LAN Server software
  834.                         running on the computer. 
  835. wki?_ver_minor          minor version number of the OS/2 LAN Server soft-
  836.                         ware running on the computer. 
  837. wki?_charwait           number of seconds the requester will wait for a remote
  838.                         serial or communication device to become available.
  839. wki?_chartime           number of milliseconds the requester will wait to collect
  840.                         data to send to a remote serial or communication
  841.                         device. 
  842. wki?_charcount          number of bytes of information the requester will send
  843.                         to a remote serial or communication device. 
  844. wki?_keepconn           number of seconds that an inactive connection from the
  845.                         requester to a resource of a  server will be maintained. 
  846. wki?_keepsearch         number of seconds that an inactive search will continue.
  847. wki?_maxthreads         number of threads the requester can dedicate to the net-
  848.                         work. 
  849. wki?_maxcmds            number of simultaneous network device driver com-
  850.                         mands that can be sent to the network.
  851. wki?_numworkbuf         number of internal buffers the requester has. 
  852. wki?_sizworkbuf         size (in bytes) of each internal buffer. 
  853. wki?_maxwrkcache        maximum size (in bytes) of an internal cache buffer. 
  854. wki?_sesstimeout        number of seconds that are waited before disconnecting
  855.                         an inactive session between a requester and a server. 
  856. wki?_sizerror           size (in bytes) of an internal error buffer. 
  857. wki?_numalerts          maximum number of clients that can receive alert
  858.                         messages. 
  859. wki?_numservices        number of services that can be started on the requester
  860.                         at any time.  
  861. wki?_errlogsz           maximum size (in kilobytes) of the error log file of the
  862.                         requester. 
  863. wki?_printbuftime       number of seconds waited before closing inactive
  864.                         compatibility mode print jobs. 
  865. wki?_numcharbuf         number of character pipe buffers and device buffers the
  866.                         requester can have. 
  867. wki?_sizcharbuf         maximum size (in bytes) of a character pipe buffer and
  868.                         device buffer. 
  869. wki?_logon_server       string containing the name of the preferred server,
  870.                         which validates user logon requests for this user.  A
  871.                         server name of an asterisk (*) indicates that the logon
  872.                         request can be handled by any domain controller or
  873.                         backup server on the domain.  A ''  indicates that the
  874.                         domain controller will be the preferred logon server. 
  875. wki?_wrkheuristics      string of flags used to control a requester's operation. 
  876. wki?_mailslot           specifies whether mailslots are allowed.  If 0, mailslots
  877.                         are not supported on this machine, and Netlogon service
  878.                         will not start. 
  879. wki?_logon_domains      names the domain to which the user is logged on. It is
  880.                         returned as '' when no one is logged on. 
  881. wki?_oth_domains        is an string listing all domains on which the machine is
  882.                         currently listed.  This is a string which is a space--
  883.                         delimited list of domains.  The oth_domains field is
  884.                         settable with  NetWkstaSetInfo. 
  885. wki?_numdgrambuf        is the number of buffers allocated for receiving datag-
  886.                         rams. 
  887.  
  888. ----------------------------------------------------------------------------
  889.  
  890. NetWkstaSetInfo
  891. ───────────────
  892.  
  893. modifies actual LAN server parameter. The parmnum field is not supported.
  894.  
  895. Syntax:
  896.  
  897.        ret = NetWkstaSetInfo( server, level, rexx-buffer, dummy, dummy )
  898.  
  899.  
  900. Parameter : 
  901.               server    see above
  902.               level     0, 1
  903.               rexx-buffer   name of rexx variable containing wkst-
  904.                             a_info_? data
  905.  
  906. Example:
  907.  
  908.     /* Change the other domains field */
  909.     ret = NetWkstaGetInfo( '\\SERVER', 1, 'buffer', '', '' )
  910.     Buffer.wki1_oth_domains = 'DOM1 DOM2'
  911.     ret = NetWkstaSetInfo( '\\SERVER', 1, 'buffer', '', '' )
  912.  
  913.  
  914. ----------------------------------------------------------------------------
  915.  
  916. NetWkstaGetInfo
  917. ───────────────
  918.  
  919. Query actual LAN requester parameter
  920.  
  921. Syntax:
  922.  
  923.        ret = NetWkstaGetInfo( server, level, rexx-buffer, dummy, dummy )
  924.  
  925.  
  926. Parameter:
  927.               server    see above
  928.               level     0, 1, 10
  929.               rexx-buffer   name of rexx variable containing wkst-
  930.                             a_info_? data
  931.  
  932. Example:
  933.  
  934.         ret = NetWkstaGetInfo( '', 10, 'buffer', '', '' )
  935.         SAY 'This computer name: ' || buffer.wki10_computer_name
  936.  
  937.  
  938. ----------------------------------------------------------------------------
  939.  
  940. NetWkstaSetUID2
  941. ───────────────
  942.  
  943. Logons/ Logoffs a user to/from the network and returns  statistics. It is
  944. recommended that you use the UPM API instead, because no logon assign-
  945. ments or profiles were created. The UPM will not register this logon.
  946.  
  947. Syntax:
  948.  
  949.        ret = NetWkstaSetUID2( dummy, domain, username, password, parms,
  950.        ucond, level, rexx-buffer, dummy, dummy )
  951.  
  952. Parameter: 
  953.               domain    name of logon domain
  954.               username  name of user to log on (if "" a user
  955.                         wants to log off)
  956.               password  password of user. (if "" the ID has no
  957.                         password) This field is CASE SENSI-
  958.                         TIVE For compatibility to LAN Server-
  959.                         interface use only UPPER CHARAC-
  960.                         TERS !
  961.               parms     In LAN Server environments it must be
  962.                         ""
  963.               ucond     specifies what action to take if another
  964.                         user name is logged on to the requester.
  965.                         Defined are four values:
  966.                         Value   Meaning
  967.                         0   NetWkstaSetUID2 fails, and the
  968.                             user's identification number
  969.                             (UID) does not change.
  970.                         1   Logs the current user name off,
  971.                             disconnecting any connections to
  972.                             redirected resources.
  973.                         2   Cancels any connections and other-
  974.                              pending activities necessary.
  975.                             Fails if any connection is used
  976.                             by a process as the current drive.
  977.                         3   WkstaSetUID2 always succeeds
  978.                             and forces all disconnections.
  979.               level     must be 1.
  980.               rexx-buffer   name of rexx variable containing user
  981.                             data
  982.  
  983. ----------------------------------------------------------------------------
  984.  
  985.                                DOMAIN SECTION
  986.                                ──────────────
  987.  
  988. The functions in this category deal with domain specific information. The
  989. NetGetDCName function obtains the name of the domain controller when
  990. provided the name of the domain. The NetLogonEnum function enumerates
  991. the information of logged on users in a domain. The information is in the level
  992. 0, 1, or 2 user_logon_info data structures. See the data structure information
  993. under the User category. 
  994.  
  995.  
  996. NetGetDCName
  997. ────────────
  998.  
  999. Returns the name of the domain controller.
  1000.  
  1001. Syntax:
  1002.  
  1003.        ret = NetGetDCName( server, domain, DC-name, dummy )
  1004.  
  1005. Parameter:
  1006.               server    where to execute command
  1007.               domain    see above
  1008.               DC-name   contains the name of the domain con-
  1009.                         troller after return.
  1010.  
  1011. Example:
  1012.  
  1013.         ret = NetGetDCName( '', 'DOM1', 'Controller' )
  1014.         SAY 'The name of the DC is: ' || Controller
  1015.  
  1016.  
  1017. ----------------------------------------------------------------------------
  1018.  
  1019. NetLogonEnum
  1020. ────────────
  1021.  
  1022. Supplies information about logged on users.
  1023.  
  1024. Syntax:
  1025.  
  1026.        ret = NetLogonEnum( server, level, buffer, dummy, eread, dummy )
  1027.  
  1028.  
  1029. Parameter : 
  1030.               server    where to execute
  1031.               level     0, 2
  1032.               rexx-buffer   name of rexx variable containing logon
  1033.                             data. Depending on the information
  1034.                             level it contains an usrlog0 or an
  1035.                             usrlog2 structure.
  1036.               eread     Number of logged on users
  1037.  
  1038. Example:
  1039.  
  1040.         ret = NetLogonEnum( '', 0, 'Buffer', '', 'eread', '' )
  1041.         DO i = 0 TO eread-1
  1042.            SAY Buffer.i.usrlog0_name
  1043.            END
  1044.  
  1045.  
  1046. ----------------------------------------------------------------------------
  1047.  
  1048.                                  USE SECTION
  1049.                                  ───────────
  1050.  
  1051. The functions in the Use category examine or control connections (uses)
  1052. between requesters and servers.  Administrative privilege is required to call
  1053. them remotely.
  1054.  
  1055.  
  1056. Data structures
  1057. ───────────────
  1058.  
  1059. Use Information (Level 0)(use_info_0): 
  1060.  
  1061. ui0_local
  1062. ui0_remote
  1063.  
  1064.  
  1065.  Use Information (Level 1)(use_info_1): 
  1066.  
  1067. ui1_local
  1068. ui1_remote
  1069. ui1_password
  1070. ui1_status
  1071. ui1_asg_type
  1072. ui1_refcount
  1073. ui1_usecount
  1074.  
  1075. where: 
  1076. ui?_local     string specifying the local device name being redirected
  1077.               to the shared resource. 
  1078. ui?_remote    string specifying the UNC name of the remote resource
  1079.               being accessed.  The string must be in the form \\serve-
  1080.               rname\netname. 
  1081. ui?_password  string containing the password needed to establish a
  1082.               session between a specific requester and server.  This
  1083.               field is only used by NetUseAdd. 
  1084. ui?_status    specifies the status of the connection.  Seven possible
  1085.               values for ui1_status are defined as follows: 
  1086.               Value     Meaning
  1087.               0         Connection valid
  1088.               1         Paused by local requester
  1089.               2         Session removed
  1090.               2         Connection disconnected
  1091.               3         Network error
  1092.               4         Connection being made
  1093.               5         Reconnecting
  1094. ui?_asg_type  specifies the type of remote resource being accessed.
  1095.               Five types of resources are defined as follows: 
  1096.               Value     Meaning
  1097.               -1        Matches the type of the share of the
  1098.                         server (wildcards are used only when
  1099.                         ui1_local is a null string).
  1100.               0         Disk device.
  1101.               1         Spooled printer.
  1102.               2         Serial device.
  1103.               3         Interprocess communication (IPC).
  1104. ui?_refcount  indicates the number of files, directories, and other
  1105.               processes that are open on the remote resource. 
  1106. ui?_usecount  indicates the number of explicit connections (redirection
  1107.               of a local device name) or implicit UNC connections
  1108.               (redirection of a null local device name) that are
  1109.               established with the resource. 
  1110.  
  1111. ----------------------------------------------------------------------------
  1112.  
  1113. NetUseAdd
  1114. ─────────
  1115.  
  1116. Establishes a connection between a local device (or NULL) and a remote re-
  1117. source.
  1118.  
  1119. Syntax:
  1120.  
  1121.        ret = NetUseAdd( server, level, rexx-buffer, dummy )
  1122.  
  1123. Parameter: 
  1124.               server    name of computer for which the con-
  1125.                         nection will be established. For server
  1126.                         <> "" you will need administrator pri-
  1127.                         vileges, for the local machine server
  1128.                         must be ""
  1129.               level     1
  1130.               rexx-buffer   name of rexx variable containing use_i-
  1131.                             nfo_1  data
  1132.  
  1133. Example:
  1134.  
  1135.         Buffer.ui1_local = 'T:'
  1136.         Buffer.ui1_remote = '\\SERVER\D$'
  1137.         Buffer.ui1_password = ''
  1138.         Buffer.ui1_asg_type = 0
  1139.         ret = NetUseAdd( '', 1, 'Buffer', '' )
  1140.  
  1141.  
  1142. ----------------------------------------------------------------------------
  1143.  
  1144. NetUseDel
  1145. ─────────
  1146.  
  1147. Ends a connection.
  1148.  
  1149. Syntax:
  1150.  
  1151.        ret = NetUseDel( server, usename, ucond )
  1152.  
  1153.  
  1154. Parameter:
  1155.               server    points to an ASCIIZ string containing
  1156.                         the name of the remote server on which
  1157.                         the function is to execute. A null poin-
  1158.                         ter or string specifies a local computer.
  1159.               usename   points to an ASCIIZ string that contains
  1160.                         the following information:
  1161.                         - If the connection is a device name
  1162.                         connection, the name specified must be
  1163.                         the name of the local device.
  1164.                         - If the connection is a UNC connection
  1165.                         (either implicit or explicit), the name
  1166.                         must be the UNC name.
  1167.               forceflag is one of three values specifying three
  1168.                         types of disconnection. The following
  1169.                         options are available:
  1170.                         Value   Meaning
  1171.                         0       Maintains the connection in a
  1172.                                 dormant state, decrementing
  1173.                                 usecount. A dormant session can
  1174.                                 quickly be activated as soon as
  1175.                                 reconnection is needed, improv-
  1176.                                 ing system performance.
  1177.                         1       Connection is removed only if
  1178.                                 no file directory, or drive is
  1179.                                 opened. usecount is decremented
  1180.                                 for a local device name connec-
  1181.                                 tion and forced to 0 for a UNC
  1182.                                 connection.
  1183.                         2       All files, directories, and drives
  1184.                                 open  on the connection are
  1185.                                 forced closed.
  1186.  
  1187. Example:
  1188.  
  1189.         ret = NetUseDel( '', 'T:', 2 )
  1190.  
  1191.  
  1192. ----------------------------------------------------------------------------
  1193.  
  1194. NetUseEnum
  1195. ──────────
  1196.  
  1197. Lists all current connections
  1198.  
  1199. Syntax:
  1200.  
  1201.        ret = NetUseEnum( server, level, rexx-buffer, dummy, eread, dummy )
  1202.  
  1203.  
  1204. Parameter:
  1205.               server    where to execute
  1206.               level     0, 1
  1207.               rexx-buffer   name of rexx variable containing use_i-
  1208.                             nfo_? data
  1209.               eread     rexx variable containing number of con-
  1210.                         nections found
  1211.  
  1212. Example:
  1213.  
  1214.         ret = NetUseEnum( '', 1, 'Buffer', '', 'eread', '' )
  1215.         SAY 'Local Remote-name'
  1216.         DO i = 0 TO eread-1
  1217.             SAY Buffer.i.ui1_local Buffer.i.ui1_remote
  1218.             END
  1219.  
  1220.  
  1221. ----------------------------------------------------------------------------
  1222.  
  1223. NetUseGetInfo
  1224. ─────────────
  1225.  
  1226. Returns information about a connection.
  1227.  
  1228. Syntax:
  1229.  
  1230.        ret = NetUseGetInfo( server, usename, level, rexx-buffer, dummy, dummy )
  1231.  
  1232.  
  1233. Parameter:
  1234.               server    where to perform
  1235.               usename   name of the connection
  1236.               level     1
  1237.               rexx-buffer   name of rexx variable containing use_i-
  1238.                             nfo_1 data
  1239.  
  1240. Example:
  1241.  
  1242.         ret = NetUseGetInfo( '', 'T:', 1, 'Buffer', '', '' )
  1243.         SAY 'Remote name: ' Buffer.ui1_remote
  1244.  
  1245.  
  1246. ----------------------------------------------------------------------------
  1247.  
  1248.                                MESSAGE SECTION
  1249.                                ───────────────
  1250.  
  1251. The functions in the Message category are used to send, log, and forward
  1252. messages.  The administrator can execute these functions remotely. 
  1253.  
  1254. Data structures
  1255. ───────────────
  1256.  
  1257. Message Information (Level 0)(message_info_0) :
  1258.  
  1259. msgi0_name
  1260.  
  1261.  
  1262. Message Information (Level 1) (message_info_1)
  1263.  
  1264. msgi1_name
  1265. msgi1_forward_flag
  1266. msgi1_forward
  1267.  
  1268.  
  1269. where: 
  1270.  
  1271. msgi?_name    specifying which messaging name to send the message. 
  1272. msgi?_forward_flag      specifies whether messages will be sent to a user or
  1273.                         application on the local computer, or forwarded to a
  1274.                         user or application on a remote computer.  msgi1_-
  1275.                         forward_flag can be defined as follows: 
  1276.               Bit       Meaning
  1277.               0-1       Reserved; must be 0.
  1278.               2         If 1, specifies a user name on a remote
  1279.                         computer.
  1280.               3         Reserved; must be 0.
  1281.               4         If 1, specifies a user name on the local
  1282.                         computer.
  1283.               5-7       Reserved; must be 0.
  1284. msgi?_forward string specifying the user name to which the message
  1285.               will be sent, if messages are to be forwarded.
  1286.  
  1287. ----------------------------------------------------------------------------
  1288.  
  1289. NetMessageBufferSend
  1290. ────────────────────
  1291.  
  1292. Send a buffer to selected messengers
  1293.  
  1294. Syntax:
  1295.  
  1296.        ret = NetMessageBufferSend( server, msgname, buffer, dummy )
  1297.  
  1298.  
  1299. Parameter:
  1300.               server    where the message will be sent
  1301.               msgname   receiver, for broadcasts enter "*"
  1302.               buffer    message to send
  1303.  
  1304. Example:
  1305.  
  1306.         ret = NetMessageBufferSend( '', '*', 'Hello World !', '' )
  1307.  
  1308.  
  1309. ----------------------------------------------------------------------------
  1310.  
  1311. NetMessageFileSend
  1312. ──────────────────
  1313.  
  1314. Send a file to selected messengers
  1315.  
  1316. Syntax:
  1317.  
  1318.        ret = NetMessageFileSend( server, msgname, filename )
  1319.  
  1320.  
  1321. Parameter:
  1322.               server    where the message will be send
  1323.               msgname   receiver, for broadcasts enter "*"
  1324.               filename  file containing the message
  1325.  
  1326.  
  1327. Example:
  1328.  
  1329.         ret = NetMessageFileSend( '', '*', 'C:\ADMIN.TXT' )
  1330.  
  1331. ----------------------------------------------------------------------------
  1332.  
  1333. NetMessageNameEnum
  1334. ──────────────────
  1335.  
  1336. Lists the names in the message name table
  1337.  
  1338. Syntax: 
  1339.  
  1340.         ret = NetMessageNameEnum( server, level, rexx-buffer, dummy, eread,
  1341.                   dummy )
  1342.  
  1343.  
  1344. Parameter: 
  1345.               server    see above
  1346.               level     0, 1
  1347.               rexx-buffer   name of rexx variable containing mes-
  1348.                             sage_info_? data
  1349.               eread     number of entries
  1350.  
  1351. Example:
  1352.  
  1353.         ret = NetMessageNameEnum('', 0, 'Buffer', '', 'eread', '' )
  1354.         DO i = 0 TO eread-1
  1355.             SAY Buffer.i.msgi0_name
  1356.             END
  1357.  
  1358. ----------------------------------------------------------------------------
  1359.  
  1360. NetMessageNameAdd
  1361. ─────────────────
  1362.  
  1363. Registers a name in the message name table
  1364.  
  1365. Syntax: 
  1366.  
  1367.         ret = NetMessageNameAdd( server, name, fwd_action )
  1368.  
  1369.  
  1370. Parameter: 
  1371.               server    see above
  1372.               name      name to register
  1373.               fwd_action    action to take if name is already for-
  1374.                             warded. If fwd_action is non-zero, the
  1375.                             name is added to the message name
  1376.                             table; a 0 value causes an error to be
  1377.                             returned if the name has already been
  1378.                             forwarded. 
  1379.  
  1380. Example:
  1381.  
  1382.         ret = NetMessageNameAdd( '', 'JOHN', 0 )
  1383.  
  1384. ----------------------------------------------------------------------------
  1385.  
  1386. NetMessageNameDel
  1387. ─────────────────
  1388.  
  1389. Deregisters a name in the message name table
  1390.  
  1391. Syntax: 
  1392.  
  1393.         ret = NetMessageNameDel( server, name, fwd_action )
  1394.  
  1395.  
  1396. Parameter:
  1397.               server    see above
  1398.               name      name to deregister
  1399.               fwd_action    specifies the action to take if the mes-
  1400.                             sages for name are being forwarded to
  1401.                             another name. If fwd_action is non-
  1402.                             -zero, the forwarded name is deleted. A
  1403.                             0 value prevents the name from being
  1404.                             deleted.
  1405.  
  1406. Example:
  1407.  
  1408.         ret = NetMessageNameDel( '', 'JOHN', 0 )
  1409.  
  1410. ----------------------------------------------------------------------------
  1411.  
  1412. NetMessageNameFwd
  1413. ─────────────────
  1414.  
  1415. Modifies the message name table to forward messages to another messaging
  1416. name
  1417.  
  1418. Syntax: 
  1419.  
  1420.         ret = NetMessageNameFwd( server, name, fwd_name, del_for )
  1421.  
  1422.  
  1423. Parameter:
  1424.               server    see above
  1425.               name      name in message name table
  1426.               forwardname   points to an ASCIIZ string specifying
  1427.                             the name to receive name's forwarded
  1428.                             messages.
  1429.               delfor    specifies the action to take if name
  1430.                         forwards messages to another name. If
  1431.                         non-zero, then any previous forwarded
  1432.                         user name is deleted; if 0, it is not
  1433.                         deleted and an error is returned.
  1434.  
  1435.  
  1436. Example:
  1437.  
  1438.         ret = NetMessageNameFwd( '', 'JOHN', 'MARY', 0 )
  1439.  
  1440.  
  1441. ----------------------------------------------------------------------------
  1442.  
  1443. NetMessageNameGetInfo
  1444. ─────────────────────
  1445.  
  1446. Get information about a registered name
  1447.  
  1448. Syntax: 
  1449.  
  1450.         ret = NetMessageNameGetInfo( server, name, level, buffer, dummy,
  1451.                   dummy )
  1452.  
  1453.  
  1454. Parameter: 
  1455.               server    see above
  1456.               name      name to get information
  1457.               level     1
  1458.               rexx-buffer   name of rexx variable containing mes-
  1459.                             sage_info_1 data
  1460.  
  1461. Example:
  1462.  
  1463.         ret = NetMessageNameGetInfo( '', 'JOHN', 1, 'buffer', '', '' )
  1464.         SAY 'Name: ' Buffer.msgi1_name
  1465.         SAY 'Forward flag: ' Buffer.msgi1_forward_flag
  1466.         SAY 'Forward to: ' Buffer.msgi1_forward
  1467.  
  1468.  
  1469. ----------------------------------------------------------------------------
  1470.  
  1471. NetMessageNameUnFwd
  1472. ───────────────────
  1473. Unforwards a message name
  1474.  
  1475. Syntax: 
  1476.  
  1477.         ret = NetMessageNameUnFwd( server, name )
  1478.  
  1479.  
  1480. Parameter:
  1481.               server    see above
  1482.               name      name whose message forwarding is to
  1483.                         be canceled
  1484.  
  1485. Example:
  1486.  
  1487.         ret = NetMessageNameUnFwd( '', 'MARY' )
  1488.  
  1489. ----------------------------------------------------------------------------
  1490.  
  1491. NetMessageLogFileSet
  1492. ────────────────────
  1493.  
  1494. Specifies a file to log messages received by registered users and enables or
  1495. disables logging.
  1496.  
  1497. Syntax: 
  1498.  
  1499.         ret = NetMessageLogFileSet( server, filename, on )
  1500.  
  1501.  
  1502. Parameter: 
  1503.               server    see above
  1504.               filename  specifies the path name of the device
  1505.                         (LPTn or COMn) or file to which the
  1506.                         messages are logged. If filename is "",
  1507.                         no message file will be used; in this
  1508.                         case, the value of on must be 0.
  1509.               on        specifies whether (1) or not (0) logging
  1510.                         is enabled.
  1511.  
  1512. Example:
  1513.  
  1514.         ret = NetMessageLogFileSet( '', 'C:\IBMLAN\LOGS\NEW.LOG', 1 )
  1515.  
  1516. ----------------------------------------------------------------------------
  1517.  
  1518. NetMessageLogFileGet
  1519. ────────────────────
  1520.  
  1521. Returns the file to log messages received by registered users and reports
  1522. whether or not logging is enabled.
  1523.  
  1524. Syntax: 
  1525.  
  1526.         ret = NetMessageLogFileGet( server, filename, dummy, pon )
  1527.  
  1528.  
  1529. Parameter: 
  1530.               server    see above
  1531.               filename  rexx-variable that will contain the name
  1532.                         of the message file.
  1533.               pon       rexx-variable that will contain the status
  1534.                         of message logging
  1535.  
  1536. Example:
  1537.  
  1538.         ret = NetMessageLogFileGet( '\\SERVER', 'File', '', 'pon' )
  1539.         SAY 'Log file: ' File
  1540.         IF pon THEN SAY 'Logging enabled'
  1541.           ELSE SAY 'Logging disabled.'
  1542.  
  1543. ----------------------------------------------------------------------------
  1544.  
  1545.                             CONFIGURATION SECTION
  1546.                             ─────────────────────
  1547.  
  1548. The functions in the Configuration category retrieve network configuration
  1549. information from the IBMLAN.INI file. The NetConfigGet2 function retrieves
  1550. a single parameter value for given network component; NetConfigGetAll2
  1551. returns all of  the parameters for given components.  
  1552.  
  1553. The APIs NetConfigGet and NetConfigGetAll are replaced by their newer
  1554. counterparts NetConfigGet2 and NetConfigGetAll2 and are therefore obsolete.
  1555.  
  1556.  
  1557. NetConfigGet2
  1558. ─────────────
  1559.  
  1560. Retrieves a specified parameter value from the IBMLAN.INI file of a local
  1561. computer or a remote server.
  1562.  
  1563. Syntax:
  1564.  
  1565.        ret = NetConfigGet2( server, dummy, component, parameter,
  1566.                   rexx-buffer, dummy, dummy )
  1567.  
  1568.  
  1569. Parameter: 
  1570.               server    see above
  1571.               component the name of the component to search.
  1572.               parameter the parameter whose value is to be
  1573.                         returned.
  1574.               rexx-buffer   name of rexx variable which will con-
  1575.                             tain the parameters value
  1576.  
  1577.  
  1578. Example:
  1579.  
  1580.         ret = NetConfigGet2( '', '', 'REQUESTER', 'WRKSERVICES', 'Buffer', '', '' )
  1581.         SAY 'Workstation services : ' Buffer
  1582.  
  1583.  
  1584. ----------------------------------------------------------------------------
  1585.  
  1586. NetConfigGetAll2
  1587. ────────────────
  1588. Retrieves all parameter values for a component from the IBMLAN.INI file of
  1589. a local computer or a remote server.
  1590.  
  1591. Syntax:
  1592.  
  1593.        ret = NetConfigGet2( server, dummy, component, rexx-buffer, dummy,
  1594.                   dummy, dummy )
  1595.  
  1596.  
  1597. Parameter:
  1598.               server    see above
  1599.               component the name of the component to search.
  1600.               rexx-buffer   name of rexx variable which will con-
  1601.                             tain the parameters values. In Buffer.0
  1602.                             is the number of entries read returned.
  1603.                             Buffer.1 to Buffer.n contain a formatted
  1604.                             parameter line of the IBMLAN.INI.
  1605.  
  1606. Example:
  1607.  
  1608.         ret = NetConfigGetAll2( '', '', 'REQUESTER', 'Buffer', '', '', '' )
  1609.         IF ret = 0 THEN DO
  1610.             FOR i = 0 TO Buffer.0
  1611.                 SAY Buffer.i
  1612.             END
  1613.  
  1614.  
  1615. ----------------------------------------------------------------------------
  1616.  
  1617.                              CONNECTION SECTION
  1618.                              ──────────────────
  1619.  
  1620. The NetConnectionEnum function lists all connections made to a server by a
  1621. requester client or all connections made to the shared resources of a server. 
  1622.  
  1623.  
  1624. Data structures
  1625. ───────────────
  1626.  
  1627. Connection Information (Level 0)(conn_info_0) :
  1628.  
  1629. coni0_id
  1630.  
  1631.  
  1632. Connection Information (Level 1)(conn_info_1):
  1633.  
  1634. coni1_id
  1635. coni1_type
  1636. coni1_num_opens
  1637. coni1_num_users
  1638. coni1_time
  1639. coni1_username
  1640. coni1_netname
  1641.  
  1642.  where: 
  1643.  
  1644. coni?_id      is the connection identification number.
  1645. coni?_type    indicates the type of connection made from the local
  1646.               device name to the shared resource. Defined are the fol-
  1647.               lowing types of connection: 
  1648.               Value     Meaning
  1649.               0         Disk connection.
  1650.               1         Spooler queue connection.
  1651.               2         Serial device connection.
  1652.               3         Interprocess communication (IPC) con-
  1653.                         nection.
  1654. coni?_num_opens         indicates the number of files that are  currently open as
  1655.                         a result of the connection. 
  1656. coni?_num_users         indicates the number of users on the connection. 
  1657. coni?_time    indicates the number of seconds the connection has
  1658.               been established. 
  1659. coni?_username          string indicating the user that made the connection. 
  1660. coni?_netname string indicating either the netname of the shared
  1661.               resource of the server or the computer name of the
  1662.               requester, depending on which name was specified as
  1663.               the qualifier parameter of the NetConnectionEnum
  1664.               function. The type of name supplied to coni1_netname
  1665.               is the inverse of the type supplied to the qualifier
  1666.               parameter. 
  1667.  
  1668. ----------------------------------------------------------------------------
  1669.  
  1670. NetConnectionEnum
  1671. ─────────────────
  1672.  
  1673. Gives a listing of connections made to a shared resource of a server, or of all
  1674. connections established from a particular computer to a server.
  1675.  
  1676. Syntax:
  1677.  
  1678.        ret = NetConnectionEnum( server, qualifier, level, buffer, dummy,
  1679.                   eread, dummy )
  1680.  
  1681.  
  1682. Parameter:
  1683.               server    see above
  1684.               qualifier specifies either the netname of the
  1685.                         shared resource whose connections will
  1686.                         be listed or the client name of the re-
  1687.                         quester whose connections to the shared
  1688.                         resource will be listed (qualifier cannot
  1689.                         be a null string).
  1690.               level     1
  1691.               rexx-buffer   name of rexx variable containing con-
  1692.                             n_info_? data
  1693.               eread     rexx-variable containing number of
  1694.                         entries found
  1695.  
  1696.  
  1697. Example:
  1698.  
  1699.         ret = NetConnectionEnum( '\\SERVER', 'PRINTER1', 1, 'Buffer', '', 'eread', '' )
  1700.         DO i = 0 TO eread-1
  1701.             SAY Buffer.i.coni1_username
  1702.             END
  1703.  
  1704. ----------------------------------------------------------------------------
  1705.  
  1706.                                 ERROR SECTION
  1707.                                 ─────────────
  1708.  
  1709. Each time an error condition occurs during a network operation, an error log
  1710. entry can be generated by NetErrorLogWrite to record error information. The
  1711. other two functions enable opening (NetErrorLogRead) and clearing
  1712. (NetErrorLogClear) of the error log file (which stores the entries). 
  1713.  
  1714. Error log entries are stored as ASCII text, preceded by a hexadecimal header. 
  1715. The default error log file name is \IBMLAN\LOGS\NET.ERR. All error 
  1716. logging functions perform their operations on this file. 
  1717.  
  1718. These APIs are not supported yet:
  1719.     - NetErrorLogOpen
  1720.     - NetErrorLogRead
  1721.     - NetErrorLogWrite
  1722.  
  1723.  
  1724.  
  1725. NetErrorLogClear
  1726. ────────────────
  1727.  
  1728. Clears (and optionally saves) the computers error log file
  1729.  
  1730. Syntax:
  1731.  
  1732.         ret = NetErrorLogClear( server, backupfile, dummy )
  1733.  
  1734. Parameter:
  1735.               server    see above
  1736.               backupfile    If not "", the error log is MOVED to
  1737.                             this file, before it is cleared. You can
  1738.                             specify a different directory and name,
  1739.                             but you must specify the same local
  1740.                             drive where the LAN Server is in-
  1741.                             stalled, otherwise an error 17 will be
  1742.                             returned.
  1743.  
  1744. ----------------------------------------------------------------------------
  1745.  
  1746.                              FILE SECTION
  1747.                              ────────────
  1748.  
  1749. The functions in the File category provide a system for monitoring the file,
  1750. device, and pipe resources that are opened on a server and for closing one of
  1751. these resources if necessary. 
  1752.  
  1753. The following API are only held in the NETAPI libary for compatibility
  1754. reasons and are not supported by RexxLan/2:
  1755.               - NetFileClose                 (replaced by NetFileClose2)
  1756.               - NetFileEnum                  (replaced by NetFileEnum2)
  1757.               - NetFileGetInfo               (replaced by NetFileGetInfo2)
  1758.  
  1759.  
  1760. Data structures
  1761. ───────────────
  1762.  
  1763. Opened Resources (Level 2)(file_info_2): 
  1764.  
  1765. fi2_id
  1766.  
  1767.  
  1768. Opened Resources (Level 3)(file_info_3): 
  1769.  
  1770. fi3_id
  1771. fi3_permissions
  1772. fi3_num_locks
  1773. fi3_pathname
  1774. fi3_username
  1775.  
  1776. where: 
  1777. fi?_id        is the identification number assigned to the resource at
  1778.               opening. 
  1779. fi?_permissions         indicates the access permissions of the opening applica-
  1780.                         tion.  The bit mask of fi3_permissions is defined as
  1781.                         follows: 
  1782.               Mask      Meaning
  1783.               0x1       Permission to read a resource, and by
  1784.                         default, execute the resource.
  1785.               0x2       Permission to write to a resource.
  1786.               0x4       Permission to create a resource; data
  1787.                         can be written when creating the re-
  1788.                         source.
  1789. fi?_num_locks indicates the number of file locks on the file, device, or
  1790.               pipe. 
  1791. fi?_pathname  string giving the path name of the opened resource. 
  1792. fi?_username  string indicating the user that opened the resource.
  1793.  
  1794.  
  1795. ----------------------------------------------------------------------------
  1796.  
  1797. NetFileEnum2
  1798. ────────────
  1799.  
  1800. Supplies information about some or all open files on the server. The re-
  1801. sume_key function, as described in the LAN Application Programmers
  1802. Reference, will not be passed through the REXX API, the REXX function
  1803. iterates the NetFileEnum2 calls, until it retrieved all information.
  1804.  
  1805. Syntax: 
  1806.  
  1807.         ret = NetFileEnum2( server, basepath, user, level, buffer, dummy,
  1808.                   eread, dummy, dummy )
  1809.  
  1810. Parameter: 
  1811.               server    see above
  1812.               basepath  base path for enumeration. If not
  1813.                         NULL, basepath serves as a qualifier to
  1814.                         the enumeration.  The entries returned
  1815.                         are limited to those whose name begins
  1816.                         with the qualifier string.
  1817.               username  indicates the name of the user. If not
  1818.                         NULL, username serves as a qualifier
  1819.                         to the enumeration. The files returned
  1820.                         are limited to those whose opener
  1821.                         username matches the qualifier.
  1822.               level     2, 3
  1823.               rexx-buffer   name of rexx variable containing file
  1824.                             data (file_info_2 or file_info_3 struct)
  1825.               eread     contains number of entries found
  1826.  
  1827. Example:
  1828.  
  1829.         ret = NetFileEnum2( '\\SERVER', 'D:\', '', 3, 'Buffer', '', 'eread', '', '' )
  1830.         SAY 'ID   Filename'
  1831.         DO i = 0 to eread-1
  1832.             SAY Buffer.i.fi3_id Buffer.i.fi3_pathname
  1833.             END
  1834.  
  1835. ----------------------------------------------------------------------------
  1836.  
  1837. NetFileGetInfo2
  1838. ───────────────
  1839.  
  1840. Retrieves information about a particular opening of a server resource.
  1841.  
  1842. Syntax:
  1843.  
  1844.        ret = NetFileGetInfo2( server, file, level, buffer, dummy, dummy )
  1845.  
  1846.  
  1847. Parameter:
  1848.               server    see above
  1849.               file      identifier of open file.
  1850.               level     3
  1851.               rexx-buffer   name of rexx variable containing
  1852.                             file_info_3 data
  1853.  
  1854. Example:
  1855.  
  1856.         SAY 'Enter file ID:'
  1857.         PULL id
  1858.         ret = NetFileGetInfo2( '', id, 3, 'Buffer', '', '' )
  1859.         SAY 'User : ' Buffer.fi3_username
  1860.         SAY 'File : ' Buffer.fi3_pathname
  1861.  
  1862.  
  1863. ----------------------------------------------------------------------------
  1864.  
  1865. NetFileClose2
  1866. ─────────────
  1867.  
  1868. forces a close to an open file
  1869.  
  1870. Syntax:
  1871.  
  1872.        ret = NetFileClose2( server, file-ID )
  1873.  
  1874.  
  1875. Parameter:
  1876.               server    see above
  1877.               file-ID   identifier of open file.
  1878.  
  1879.  
  1880.  
  1881. ----------------------------------------------------------------------------
  1882.  
  1883.                                SERVER SECTION
  1884.                                ──────────────
  1885.  
  1886. With the functions in the Server category, an application can perform remote
  1887. administrative tasks on a local or remote server. 
  1888. The API NetServerEnum was replaced by NetServerEnum2 and is not
  1889. supported.
  1890.  
  1891. Data structures
  1892. ───────────────
  1893.  
  1894. Server Information (Level 0) (server_info_0):
  1895.  
  1896. sv1_name
  1897.  
  1898. Server Information (Level 1) (server_info_1):
  1899.  
  1900. sv1_name
  1901. sv1_version_major
  1902. sv1_version_minor
  1903. sv1_type
  1904. sv1_comment
  1905.  
  1906. Server Information (Level 2) (server_info_2):
  1907.  
  1908. sv2_name                         sv2_chdevq
  1909. sv2_version_major                sv2_chdevjobs
  1910. sv2_version_minor                sv2_connections
  1911. sv2_type                         sv2_shares
  1912. sv2_comment                      sv2_openfiles
  1913. sv2_ulist_mtime                  sv2_sessopens
  1914. sv2_glist_mtime                  sv2_sessvcs
  1915. sv2_alist_mtime                  sv2_sessreqs
  1916. sv2_users                        sv2_opensearch
  1917. sv2_disc                         sv2_activelocks
  1918. sv2_alerts                       sv2_numreqbuf
  1919. sv2_security                     sv2_sizreqbuf
  1920. sv2_auditing                     sv2_numbigbuf
  1921. sv2_numadmin                     sv2_numfiletasks
  1922. sv2_lanmask                      sv2_alertsched
  1923. sv2_hidden                       sv2_erroralert
  1924. sv2_announce                     sv2_logonalert
  1925. sv2_anndelta                     sv2_accessalert
  1926. sv2_guestacct                    sv2_diskalert
  1927. sv2_userpath                     sv2_netioalert
  1928. sv2_chdevs                       sv2_maxauditsz
  1929.                                  sv2_srvheuristics
  1930.  
  1931.  
  1932. Server Information (Level 3)(server_info_3):
  1933.  
  1934. sv3_name                       sv3_connections
  1935. sv3_version_major              sv3_shares
  1936. sv3_version_minor              sv3_openfiles
  1937. sv3_type                       sv3_sessopens
  1938. sv3_comment                    sv3_sessvcs
  1939. sv3_ulist_mtime                sv3_sessreqs
  1940. sv3_glist_mtime                sv3_opensearch
  1941. sv3_alist_mtime                sv3_activelocks
  1942. sv3_users                      sv3_numreqbuf
  1943. sv3_disc                       sv3_sizreqbuf
  1944. sv3_alerts                     sv3_numbigbuf
  1945. sv3_security                   sv3_numfiletasks
  1946. sv3_auditing                   sv3_alertsched
  1947. sv3_numadmin                   sv3_erroralert
  1948. sv3_lanmask                    sv3_logonalert
  1949. sv3_hidden                     sv3_accessalert
  1950. sv3_announce                   sv3_diskalert
  1951. sv3_anndelta                   sv3_netioalert
  1952. sv3_guestacct                  sv3_maxauditsz
  1953. sv3_pad1                       sv3_srvheuristics
  1954. sv3_userpath                   sv3_auditedevents
  1955. sv3_chdevs                     sv3_autoprofile
  1956. sv3_chdevq                     sv3_autopath
  1957. sv3_chdevjobs
  1958.  
  1959. where: 
  1960. sv?_name      string containing the name of a server. 
  1961. sv?_version_major       major release version number of the LAN Server
  1962.                         software. 
  1963. sv?_version_minor       minor release version number of the LAN Server
  1964.                         software. 
  1965. sv?_type      type of software the computer is running.  
  1966.                         Mask                   Type of Software
  1967.               0x01      Requester
  1968.               0x02      Server
  1969.               0x08      Domain controller
  1970.               0x10      Backup domain controller
  1971.               0x20      Time server
  1972.               -1        All types of servers
  1973. sv?_comment   string containing a comment describing the server. 
  1974. sv?_ulist_mtime         last time (in seconds from 00:00:00 1 January, 1970)
  1975.                         the users list was modified. 
  1976. sv?_glist_mtime         last time (in seconds from 00:00:00 1 January, 1970)
  1977.                         the groups list was modified. 
  1978. sv?_alist_mtime         last time (in seconds from 00:00:00 1 January, 1970)
  1979.                         the access control list was modified. 
  1980. sv?_users     number of users that are allowed on the server. 
  1981. sv?_disc      indicates the auto-disconnect time (in minutes).  A
  1982.               session is disconnected if it is idle longer than the time
  1983.               specified by sv2_disc. If 0, auto-disconnect is not
  1984.               enabled. 
  1985. sv?_alerts    string containing the list of user names on the alert
  1986.               table of the server.  Spaces separate the names. 
  1987. sv?_security  specifies the security type of the server.
  1988.               Value     Type of Security
  1989.               0         Share-level
  1990.               1         User-level
  1991. sv?_auditing  indicates whether auditing is enabled on the server.  If
  1992.               0, auditing is disabled.  If non-zero, the server is audit-
  1993.               ing all OS/2 LAN Server activities, as described in
  1994.               Auditing Category. 
  1995. sv?_numadmin  number of administrators a server can accommodate. 
  1996. sv?_lanmask   determines the order in which the network device
  1997.               drivers are served. 
  1998. sv?_hidden    determines whether the server is visible to other com-
  1999.               puters in the same domain.
  2000.               Value     Meaning
  2001.               0         Server
  2002.               1         Hidden server, not visible
  2003. sv?_announce  network announce delta (in seconds), which determines
  2004.               how often the server will be announced to other com-
  2005.               puters on the network. 
  2006. sv?_anndelta  random announce rate (in milliseconds) for
  2007.               sv?_announce.  The announce interval (sv?_announce)
  2008.               can vary by the amount specified in sv?_anndelta (for
  2009.               example, it could vary from 9.999 seconds to 10.001
  2010.               seconds instead of being exactly 10 seconds each time).
  2011.               
  2012. sv?_guestacct string containing the name of a server's reserved
  2013.               GUEST user account. 
  2014. sv?_userpath  string containing the path name to user directories. 
  2015. sv?_chdevs    indicates the number of serial devices that can be
  2016.               shared on the server. 
  2017. sv?_chdevq    number of serial device queues that can coexist on the
  2018.               server. 
  2019. sv?_chdevjobs number of serial device jobs that can be pending on a
  2020.               server. 
  2021. sv?_connections         number of connections to netnames that are allowed on
  2022.                         a server. 
  2023. sv?_shares    number of netnames a server can accommodate. 
  2024. sv?_openfiles number of files that can be opened at once.
  2025. sv?_sessopens number of files that can be opened in one session. 
  2026. sv?_sessvcs   maximum  number of virtual circuits per client. 
  2027. sv?_sessreqs  number of simultaneous requests that a client can make
  2028.               on any virtual circuit. 
  2029. sv?_opensearch          number of searches that can be opened at once. 
  2030. sv?_activelocks         number of file locks that can be active. 
  2031. sv?_numreqbuf number of server buffers that are provided.
  2032. sv?_sizreqbuf size (in bytes) of each server buffer. 
  2033. sv?_numbigbuf number of 64KB server buffers that are provided. 
  2034. sv?_numfiletasks        number of processes that can access the operating
  2035.                         system at one time. 
  2036. sv?_alertsched          alert interval (in seconds) for notifying an administrator
  2037.                         of a network event. 
  2038. sv?_erroralert          number of entries that can be written to the error log
  2039.                         file during a sv2_alertsched interval before notifying an
  2040.                         administrator. 
  2041. sv?_logonalert          number of failed logon attempts to allow a user before
  2042.                         notifying an administrator. 
  2043. sv?_accessalert         number of failed file accesses to allow before issuing an
  2044.                         administrative alert.
  2045. sv?_diskalert number of kilobytes of free disk space, at which, an
  2046.               administrator must be notified that the free space is low.
  2047.               
  2048. sv?_netioalert          network I/O error ratio (in tenths of a percent) to allow
  2049.                         before notifying an administrator. 
  2050. sv?_maxauditsz          maximum audit file size
  2051. sv?_srvheuristics       string of flags used to control the operations of a server.
  2052. sv?_auditedevents       is the audit event control mask. Setting bits in the mask
  2053.                         to 1 enables auditing of events according to the follow-
  2054.                         ing manifests: 
  2055.               Value     Meaning
  2056.               0x1       Service state change
  2057.               0x6       Successful sess. logon req.
  2058.               0x18      Unsuccessful sess. logon req.
  2059.               0x1E      All sess. logon and logoff req.
  2060.               0x60      Successful network logon req.
  2061.               0x180     Unsuccessful network logon req.
  2062.               0x1E0     All network logon and logoff req.
  2063.               0x1FE     All logon and logoff requests (network
  2064.                         and session)
  2065.               0x600     Successful share requests
  2066.               0x1800    Unsuccessful share requests
  2067.               0x1E00    All share requests
  2068.               0x2000    Changes to the user or group account
  2069.                         database
  2070.               0x4000    Changes to the access control list data-
  2071.                         base
  2072.               0x8000    Resource access as defined by the per
  2073.                         resource auditing options specified in
  2074.                         the access control list
  2075.               0x10000   Logon limit violations
  2076. sv?_autoprofile         bit mask for automatic server configuration as follows: 
  2077.               Value     Meaning
  2078.               0x1       Autoload at server startup.
  2079.               0x2       Autoload at server shutdown.
  2080. sv?_autopath  where to save and load the server information for
  2081.               autoload. 
  2082.  
  2083. ----------------------------------------------------------------------------
  2084.  
  2085. NetServerAdminCommand
  2086. ─────────────────────
  2087.  
  2088. Executes a command on a server. The output is queued in the active REXX
  2089. Queue.
  2090.  
  2091. Syntax:
  2092.  
  2093.        ret = NetServerAdminCommand( server, command, result, dummy, dummy,
  2094.               dummy, dummy )
  2095.  
  2096.  
  2097. Parameter: 
  2098.               server    see above
  2099.               command   contains the command to execute
  2100.               result    name of rexx variable containing the
  2101.                         result code of the command
  2102.  
  2103.  
  2104. Example:
  2105.  
  2106.         /* REXX */
  2107.         ret = NetServerAdminCommand( "\\SERVER", "DIR C:\", "RESULT", "", "", "", "" )
  2108.         IF ret = 0 THEN DO
  2109.             SAY "Result of DIR C:\ on Server \\SERVER: " || RESULT
  2110.             DO QUEUED()
  2111.                 PULL line
  2112.                 SAY line
  2113.                 END
  2114.             END
  2115.  
  2116.  
  2117. ----------------------------------------------------------------------------
  2118.  
  2119. NetServerDiskEnum
  2120. ─────────────────
  2121.  
  2122. Retrieves a list of disk drives on a server.
  2123.  
  2124. Syntax: 
  2125.  
  2126.         ret=NetServerDiskEnum( server, level, buffer, dummy, eread, dummy )
  2127.  
  2128.  
  2129. Parameter: 
  2130.               server    see above
  2131.               level     0
  2132.               rexx-buffer   name of rexx variable containing list of
  2133.                             found drives (buffer.0 to buffer.n-1)
  2134.               eread     number of entries found
  2135.  
  2136.  
  2137. Example:
  2138.  
  2139.         ret = NetServerDiskEnum( '\\SERVER', 0, 'Buffer', '', 'eread', '' )
  2140.         DO i = 0 TO eread-1
  2141.             SAY 'Drive : ' Buffer.i
  2142.             END
  2143.  
  2144.  
  2145. ----------------------------------------------------------------------------
  2146.  
  2147. NetServerEnum2
  2148. ──────────────
  2149.  
  2150. Enumerates the set of all servers visible on the network. The type of
  2151. NetServerEnum2 matches the bit mask in the field.
  2152.  
  2153.  
  2154. Syntax:
  2155.  
  2156.        ret = NetServerEnum2( server, level, buffer, dummy, eread, dummy,
  2157.                   servertype, domain )
  2158.  
  2159.  
  2160. Parameter:
  2161.               server    where the command will be executed
  2162.               level     0, 1
  2163.               rexx-buffer   name of REXX variable containing
  2164.                             server_info_?  data
  2165.               eread     number of found servers
  2166.               servertype    specifies the types of servers to enu-
  2167.                             merate.
  2168.                         This parameter is tested against the
  2169.                         svx_type element of each entry. Entries
  2170.                         that match at least one of the specified
  2171.                         bits are included in the returned buffer.
  2172.                         For the defined values refer to the de-
  2173.                         scription of the server data structures.
  2174.                domain   if not '' only server in specified domain
  2175.                         were listed.
  2176.  
  2177. Example:
  2178.  
  2179.         ret = NetServerEnum2( '', 0, 'buffer', '', 'eread', '', -1, '' )
  2180.         DO i = 0 TO eread-1
  2181.             SAY 'Servername : ' Buffer.sv0_name
  2182.             END
  2183.  
  2184. ----------------------------------------------------------------------------
  2185.  
  2186. NetServerGetInfo
  2187. ────────────────
  2188. Retrieves information about a particular server.
  2189.  
  2190. Syntax:
  2191.  
  2192.        ret = NetServerGetInfo( server, level, buffer, dummy, dummy )
  2193.  
  2194.  
  2195. Parameter:
  2196.               server    see above
  2197.               level     1, 2, 3
  2198.               rexx-buffer   name of rexx variable containing serv-
  2199.                             er_info_? data
  2200.  
  2201. Example:
  2202.  
  2203.         ret = NetServerGetInfo( '\\SERVER', 3, 'buffer', '','' )
  2204.         SAY 'Servers software level: '|| Buffer.sv3_version_major || '.' ||
  2205.             Buffer.sv3_version_minor
  2206.  
  2207. ----------------------------------------------------------------------------
  2208.  
  2209. NetServerSetInfo
  2210. ────────────────
  2211. Changes information about a particular server.
  2212.  
  2213. Syntax: 
  2214.  
  2215.         ret = NetServerSetInfo( server, level, buffer, dummy, parmnum )
  2216.  
  2217. Parameter: 
  2218.               server    see above
  2219.               level     1, 2, 3
  2220.               rexx-buffer   name of rexx variable containing serv-
  2221.                             er_info_? data
  2222.               paramnum  determines whether buffer  contains a
  2223.                         complete server_info data or a single
  2224.                         data component.  If parmnum is 0, buf
  2225.                         must contain a server_info_? data struc-
  2226.                         ture. Otherwise, parmnum must specify
  2227.                         the ordinal position value for one of the
  2228.                         following data structure components:
  2229.                         Value    Component
  2230.                         5   svx_comment
  2231.                         10  svx_disc
  2232.                         11  svx_alerts
  2233.                         16  svx_hidden
  2234.                         17  svx_announce
  2235.                         18  svx_anndelta
  2236.                         37  svx_alertsched
  2237.                         38  svx_erroralert
  2238.                         39  svx_logonalert
  2239.                         40  svx_accessalert
  2240.                         41  svx_diskalert
  2241.                         42  svx_netioalert
  2242.                         43  svx_maxauditsz
  2243.  
  2244.  
  2245. ----------------------------------------------------------------------------
  2246.  
  2247.                                SESSION SECTION
  2248.                                ───────────────
  2249.  
  2250. The functions in the Session category control network sessions established
  2251. between requesters and servers.  
  2252. The session info level 0, 1 and 2 are only accessable for administrators, a user
  2253. can retrieve session infos through level 10.
  2254.  
  2255. Data structures
  2256. ───────────────
  2257.  
  2258. Session Information (Level 0) (session_info_0):
  2259.  
  2260. sesi0_cname
  2261.  
  2262.  
  2263. Session Information (Level 1) (session_info_1):
  2264.  
  2265. sesi1_cname
  2266. sesi1_username
  2267. sesi1_num_conns
  2268. sesi1_num_opens
  2269. sesi1_num_users
  2270. sesi1_sess_time
  2271. sesi1_idle_time
  2272. sesi1_user_flags
  2273.  
  2274. Session Information (Level 2) (session_info_2):
  2275.  
  2276. sesi2_cname                     sesi2_sess_time
  2277. sesi2_username                  sesi2_idle_time
  2278. sesi2_num_conns                 sesi2_user_flags
  2279. sesi2_num_opens                 sesi2_cltype_name
  2280. sesi2_num_users
  2281.  
  2282. Session Information (Level 10)(session_info_10):
  2283.  
  2284. sesi10_cname
  2285. sesi10_username
  2286. sesi10_sess_time
  2287. sesi10_idle_time
  2288.  
  2289. where: 
  2290. sesi?_cname   string containing the computer name of the requester
  2291.               that established the session. 
  2292. sesi?_username          string containing the name of the user who established
  2293.                         the session. 
  2294. sesi?_num_conns         number of connections that have been made during the
  2295.                         session.
  2296. sesi?_num_opens         number of files, devices, and pipes that have been
  2297.                         opened during the session. 
  2298. sesi?_num_users         number of sessions that are established between the
  2299.                         server and the requester. 
  2300. sesi? _sess_time        number of seconds a  session has been active.
  2301. sesi?_idle_time         number of seconds a session has been idle.
  2302. sesi?_user_flags        manner in which the user established the session.  The
  2303.                         bit mask for sesi?_user_flags is defined as follows: 
  2304.               Value     Meaning
  2305.               1         sesi?_username established the session
  2306.                         using a GUEST account.
  2307.               2         sesi?_username established the session
  2308.                         without using password encryption.
  2309. sesi?_cltype_name       type of client that established the session.  The defined
  2310.                         types are as follows: 
  2311.                         Type      Meaning
  2312.                         'Down Level': Old clients; for example, LAN Server
  2313.                                       1.0 clients
  2314.                         'DLR 2.0' DOS LAN Requester 2.0 clients
  2315.                         'OS/2 LS 1.3' OS/2 LAN Server 1.3 clients
  2316.                         'OS/2 LS 2.0' OS/2 LAN Server 2.0 clients
  2317.                         'OS/2 LS 3.0' OS/2 LAN Server 3.0 clients
  2318.  
  2319. ----------------------------------------------------------------------------
  2320.  
  2321. NetSessionEnum
  2322. ──────────────
  2323.  
  2324. Supplies information about all sessions on the server.
  2325.  
  2326. Syntax:
  2327.  
  2328.        ret = NetSessionEnum( server, level, buffer, dummy, eread, dummy )
  2329.  
  2330.  
  2331. Parameter:
  2332.               server    see above
  2333.               level     0, 1, 2, 10
  2334.               rexx-buffer   name of rexx variable containing ses-
  2335.                             sion_info_? data
  2336.               eread     contains number of entries found
  2337.  
  2338. Example:
  2339.  
  2340.     ret = NetSessionEnum( '\\SERVER', 1, 'Buffer', '', 'eread', '' )
  2341.     SAY eread ' Session found:'
  2342.     SAY 'Computer  User '
  2343.     DO i = 0 TO eread-1
  2344.         SAY BUFFER.i.SESI1_cname BUFFER.i.SESI1_username
  2345.         END
  2346.  
  2347.  
  2348. ----------------------------------------------------------------------------
  2349.  
  2350. NetSessionGetInfo
  2351. ─────────────────
  2352.  
  2353. Retrieves information about a particular session on a server
  2354.  
  2355. Syntax:
  2356.  
  2357.        ret = NetSessionGetInfo( server, client, level, buffer, dummy,
  2358.                   dummy )
  2359.  
  2360. Parameter:
  2361.               server    see above
  2362.               client    workstation name whose session is to
  2363.                         be monitored
  2364.               level     0, 1, 2, 10
  2365.               rexx-buffer   name of rexx variable containing ses-
  2366.                             sion_info_? data
  2367.  
  2368. Example:
  2369.  
  2370.         ret=NetSessionGetInfo( '\\SERVER', 'PC_JOHN', 2, 'Buffer', '', '' )
  2371.         SAY 'User having a session on John's PC:' Buffer.sesi1_user_name
  2372.  
  2373.  
  2374. ----------------------------------------------------------------------------
  2375.  
  2376. NetSessionDel
  2377. ─────────────
  2378. Forces a close to a session
  2379.  
  2380. Syntax:
  2381.  
  2382.        ret = NetSessionDel( server, client-name, dummy )
  2383.  
  2384.  
  2385. Parameter:
  2386.               server    see above
  2387.               client-name   name of client whose session is to be
  2388.                             closed
  2389.  
  2390.  
  2391. Example:
  2392.  
  2393.         ret = NetSessionDel( '\\SERVER', 'PC_JOHN', '' )
  2394.  
  2395.  
  2396. ----------------------------------------------------------------------------
  2397.  
  2398.                                 SHARE SECTION
  2399.                                 ─────────────
  2400.  
  2401.  
  2402. Share is the term applied to the local device of a server (such as a disk drive,
  2403. print device, or named pipe) that other applications on the network can access. 
  2404. A unique netname is assigned to each shared resource to enable remote users
  2405. and applications to refer to the share, rather than the local device name of the
  2406. share. 
  2407.  
  2408.  
  2409. Data structures
  2410. ───────────────
  2411.  
  2412. Share Information (Level 0) (share_info_0):
  2413.  
  2414. shi0_netname
  2415.  
  2416.  
  2417. Share Information (Level 1) (share_info_1):
  2418.  
  2419. shi1_netname
  2420. shi1_type
  2421. shi1_remark
  2422.  
  2423.  
  2424. Share Information (Level 2) (share_info_2):
  2425.  
  2426. shi2_netname
  2427. shi2_type
  2428. shi2_remark
  2429. shi2_permissions
  2430. shi2_max_uses
  2431. shi2_current_uses
  2432. shi2_path
  2433. shi2_passwd
  2434.  
  2435.  
  2436. where: 
  2437. shi?_netname  string containing the netname of a resource. 
  2438. shi?_type     is one of four values indicating the type of share, are
  2439.               defined as follows: 
  2440.               Value     Share Type
  2441.               0         Disk drive
  2442.               1         Spooler queue
  2443.               2         Serial device
  2444.               3         Interproc. communication (IPC)
  2445.               The shi2_type value affects the requirements for certain
  2446.               other share_info_2 components when the NetShareAdd
  2447.               function is called.  See NetShareAdd "Remarks" for
  2448.               details. 
  2449. shi?_remark   string containing an optional comment about the shared
  2450.               resource. 
  2451. shi?_max_uses gives the maximum number of concurrent connections
  2452.               that the shared resource can accommodate (unlimited if
  2453.               the shi2_max_uses value is -1). 
  2454. shi?_current_uses       indicates the number of connections that are currently
  2455.                         made to the resource. 
  2456. shi?_path     string containing the local path name of the shared re-
  2457.               source.  For disks, shi?_path is the path being shared.
  2458.               For spooler queues, shi?_path is the name of the spooler
  2459.               queue being shared.  For serial device queues, shi?_path
  2460.               is a string of one or more communication device names
  2461.               separated by blanks (for example, COM1 COM2
  2462.               COM6). 
  2463.  
  2464. ----------------------------------------------------------------------------
  2465.  
  2466. NetShareAdd
  2467. ───────────
  2468. Adds a shared resource on a server
  2469.  
  2470. Syntax:
  2471.  
  2472.        ret = NetShareAdd( server, level, rexx-buffer, dummy )
  2473.  
  2474.  
  2475. Parameter:
  2476.               server    UNC servername like \\SERVER1
  2477.               level     must be 2
  2478.               rexx-buffer   name of  REXX variable containing the
  2479.                             share_info_2 data
  2480.  
  2481. Example:
  2482.  
  2483.         BUFFER.SHI2_netname = 'SRV_D'
  2484.         BUFFER.SHI2_type = 0
  2485.         BUFFER.SHI2_remark = 'Shared server drive D:\'
  2486.         BUFFER.SHI2_permissions = 0
  2487.         BUFFER.SHI2_max_uses = -1
  2488.         BUFFER.SHI2_path = 'D:\'
  2489.         BUFFER.SHI2_passwd = ''
  2490.         ret = NetShareAdd( '\\SERVER', 2, 'buffer', '' )
  2491.  
  2492.  
  2493. ----------------------------------------------------------------------------
  2494.  
  2495. NetShareGetInfo
  2496. ───────────────
  2497.  
  2498. Get information about a shared resource on a server.
  2499.  
  2500. Syntax:
  2501.  
  2502.        ret = NetShareGetInfo( server, netname, level, rexx-buffer, dummy,
  2503.                   dummy )
  2504.  
  2505.  
  2506. Parameter:
  2507.               server    UNC servername like \\SERVER1
  2508.               netname   Alias for a resource
  2509.               level     0, 1, 2
  2510.               rexx-buffer   name of  REXX variable containing the
  2511.                             share_info_? datas
  2512.  
  2513. Example:
  2514.  
  2515.         ret = NetShareGetInfo( '\\SERVER', 'SRV_D', 2, 'buffer', '', '' )
  2516.         SAY 'Max Uses for SRV_D : ' Buffer.shi2_max_uses
  2517.  
  2518.  
  2519. ----------------------------------------------------------------------------
  2520.  
  2521. NetShareSetInfo
  2522. ───────────────
  2523.  
  2524. Set information about a shared resource on a server
  2525.  
  2526. Syntax:
  2527.  
  2528.        ret = NetShareSetInfo( server, netname, level, rexx-buffer, dummy,
  2529.                   parmnum )
  2530.  
  2531.  
  2532. Parameter:
  2533.               server    UNC servername like \\SERVER1
  2534.               netname   Alias for a resource
  2535.               level     1, 2
  2536.               rexx-buffer   name of  REXX variable containing the
  2537.                             share_info_? data
  2538.               parmnum   specifies whether a specific component
  2539.                         of the share_info or the entire data
  2540.                         structure is being set.  If parmnum is 0,
  2541.                         then buffer must contain a complete
  2542.                         share_info data array.
  2543.                         Otherwise, parmnum must pass the
  2544.                         ordinal position value for one of the
  2545.                         following share_info_2 data structure 
  2546.                         components:
  2547.                         Value                                       Component
  2548.                         4   shi1_remark or shi2_remark
  2549.                         6   shi2_max_uses
  2550.  
  2551. Example:
  2552.  
  2553.         /* change the max user parameter to 10 */
  2554.         ret = NetShareSetInfo( '\\SERVER', 'SRV_D', 2, 10, '', 6 )
  2555.  
  2556.  
  2557. ----------------------------------------------------------------------------
  2558.  
  2559. NetShareCheck
  2560. ─────────────
  2561. Queries whether a server is sharing a device. You can only test whether the
  2562. server share one portion of a drive. A test on C: for example returns 0 if one
  2563. of its directories is shared. If no directory of a drive is shared, the API returns
  2564. a non-zero return code.
  2565.  
  2566. Syntax:
  2567.  
  2568.        ret = NetAccessCheck( server, device, type )
  2569.  
  2570.  
  2571. Parameter:
  2572.               server    contains the name of the remote server
  2573.                         on which the function is to execute
  2574.               device    contains the name of the device to be
  2575.                         checked.
  2576.               type      indicates the type of shared device:
  2577.                         Value                                       Share Type
  2578.                         0   Disk drive
  2579.                         1   Spooler queue
  2580.                         2   Serial device
  2581.                         3   Interproc. communication (IPC)
  2582.  
  2583.  
  2584. ----------------------------------------------------------------------------
  2585.  
  2586. NetShareEnum
  2587. ────────────
  2588. Lists shared resources
  2589.  
  2590. Syntax: 
  2591.  
  2592.         ret = NetShareEnum( server, level, buffer, dummy, eread, dummy )
  2593.  
  2594.  
  2595. Parameter:
  2596.               server    name of server, e.g. \\SERVER1
  2597.               level     0, 1, 2
  2598.               Rexx-buffer   name of Rexx variable, containing the
  2599.                             found resources
  2600.               eread     Rexx variable containing the number of
  2601.                         resources found
  2602.  
  2603. Example:
  2604.  
  2605.         ret = NetShareEnum( '\\SERVER', 1, 'buffer', '', 'eread', '' )
  2606.         DO i = 0 TO eread-1
  2607.             SAY Buffer.i.shi1_netname Buffer.i.shi1_remark
  2608.             END
  2609.  
  2610.  
  2611. ----------------------------------------------------------------------------
  2612.  
  2613. NetShareDel
  2614. ───────────
  2615.  
  2616. Stops sharing a resource
  2617.  
  2618. Syntax:
  2619.  
  2620.        ret = NetShareDel( server, netname, dummy )
  2621.  
  2622.  
  2623. Parameter:
  2624.               server    name of server (e.g. "\\SERVER1")
  2625.               netname   name of the shared resource
  2626.  
  2627. Example:
  2628.  
  2629.         rc = NetShareDel( '\\SERVER', 'SRV_D', '' )
  2630.  
  2631.  
  2632. ----------------------------------------------------------------------------
  2633.  
  2634.                              STATISTICS SECTION
  2635.                              ──────────────────
  2636.  
  2637.  
  2638. LAN Server accumulates a set of operating statistics for requesters and servers
  2639. from the time that the requester or server service is started.  To retrieve the
  2640. statistics, call the NetStatisticsGet2 function. 
  2641.  
  2642. The NetStatisticsGet and NetStatisticsClear are replaced by NetStatisticsGet2
  2643. and are now obsolete.
  2644.  
  2645.  
  2646. Data structures
  2647. ───────────────
  2648.  
  2649.  Data Structure of Requester Statistics :
  2650.  
  2651. stw0_start                        stw0_autorec
  2652. stw0_numNCB_r                     stw0_bytessent_r_high
  2653. stw0_numNCB_s                     stw0_bytessent_r_low
  2654. stw0_numNCB_a                     stw0_bytesrcvd_r_high
  2655. stw0_fiNCB_r                      stw0_bytesrcvd_r_low
  2656. stw0_fiNCB_s                      stw0_bytessent_s_high
  2657. stw0_fiNCB_a                      stw0_bytessent_s_low
  2658. stw0_fcNCB_r                      stw0_bytesrcvd_s_high
  2659. stw0_fcNCB_s                      stw0_bytesrcvd_s_low
  2660. stw0_fcNCB_a                      stw0_bytessent_a_high
  2661. stw0_sesstart                     stw0_bytessent_a_low
  2662. stw0_sessfailcon                  stw0_bytesrcvd_a_high
  2663. stw0_sessbroke                    stw0_bytesrcvd_a_low
  2664. stw0_uses                         stw0_reqbufneed
  2665. stw0_usefail                      stw0_bigbufneed
  2666.  
  2667.  
  2668. where: 
  2669. stw0_start    time that statistics collection started.  This field indi-
  2670.               cates the date or time that the statistics were  last
  2671.               cleared; that means, it indicates the time period over
  2672.               which the returned statistics were collected. 
  2673. stw0_numNCB   fields indicate the number of network control blocks
  2674.               (NCBs) issued from each source and include failed 
  2675.               NCBs.  To get the total successful NCBs issued it is
  2676.               necessary to subtract the numbers of failed NCBs. 
  2677.               These  numbers are held as follows in the fiNCB and
  2678.               fcNCB fields: 
  2679.               - numNCB_r is the number of NCBs issued (redirector).
  2680.               - numNCB_s is the number of NCBs issued (server). 
  2681.               - numNCB_a is the number of NCBs issued (applica-
  2682.               tion). 
  2683. stw0_fiNCB    fields indicate the number of NCBs that failed at the
  2684.               time they were issued, for whatever reason.  These 
  2685.               NCBs are still included in the "total issued" count, as
  2686.               follows: 
  2687.               - fiNCB_r is the number of NCBs that failed issue
  2688.               (redirector). 
  2689.               - fiNCB_s is the number of NCBs that failed issue
  2690.               (server). 
  2691.               - fiNCB_a is the number of NCBs that failed issue
  2692.               (application). 
  2693. stw0_fcNCB    fields indicate the number of NCBs that failed after
  2694.               issue, at or before completion.  These NCBs are still 
  2695.               included in the "total issued" count, as follows: 
  2696.               - fcNCB_r is the number of NCBs that failed comple-
  2697.               tion (redirector). 
  2698.               - fcNCB_s is the number of NCBs that failed comple-
  2699.               tion (server). 
  2700.               - fcNCB_a is the number of NCBs that failed comple-
  2701.               tion (application). 
  2702. stw0_sessstart          number of requester sessions started. 
  2703. stw0_sessfailcon        number of requester session failures to connect, except
  2704.                         those that failed due to "name not  found." 
  2705. stw0_sessbroke          number of failures of requester sessions, after the
  2706.                         session was established. 
  2707. stw0_uses     number of requester uses. 
  2708. stw0_usefail  number of requester use failures.  This is a count of
  2709.               failed tree connects, when a server is found but the
  2710.               resources were not found. 
  2711. stw0_autorec  number of requester autoconnects. 
  2712. The following 12 fields form six quadwords, which contain very large
  2713. counters.  The high doubleword of each is the value divided by 2^32, while
  2714. the low doubleword is the value modal 2^32.  A quadword is a data area with
  2715. the size twice as large as a double word. These fields count total bytes in all
  2716. NCBs sent and received for all three categories.  Server information is
  2717. included to provide an accurate total. 
  2718.  
  2719. Note:  For all the NCB-related and bytes-count counters: 
  2720. - The suffix _r indicates redirector.  These NCBs are issued by the redirector
  2721. as part of the normal process of maintaining remote network connections. 
  2722. - Those with the suffix _s are server-related, sent by the redirector on behalf
  2723. of the server to maintain  shared resource connections. 
  2724. - Those with the suffix _a are application-generated NCBs, which may be
  2725. caused by applications calling NetBiosSubmit, use of second class mailslots,
  2726. server announcements (sending and receiving), and so on. 
  2727.  
  2728. bytessent_r_high        is the number of requester bytes sent to the network
  2729.                         (high doubleword). 
  2730. bytessent_r_low         is the number of requester bytes sent to the network
  2731.                         (low doubleword). 
  2732. bytesrcvd_r_high        is the number of requester bytes received from the
  2733.                         network (high doubleword). 
  2734. bytesrcvd_r_low         is the number of requester bytes received from the
  2735.                         network (low doubleword). 
  2736. bytessent_s_high        is the number of server bytes sent to the network (high
  2737.                         doubleword). 
  2738. bytessent_s_low         is the number of server bytes sent to the network (low
  2739.                         doubleword). 
  2740. bytesrcvd_s_high        is the number of requester bytes received from the
  2741.                         network (high doubleword). 
  2742. bytesrcvd_s_low         is the number of requester bytes received from the
  2743.                         network (low doubleword). 
  2744. bytessent_a_high        is the number of application bytes sent to the network
  2745.                         (high doubleword). 
  2746. bytessent_a_low         is the number of application bytes sent to the network
  2747.                         (low doubleword). 
  2748. bytesrcvd_a_high        is the number of application bytes received from the
  2749.                         network (high doubleword). 
  2750. bytesrcvd_a_low         is the number of application bytes received from the
  2751.                         network (low doubleword). 
  2752.  
  2753. stw0_reqbufneed         is the number of times that the requester required a
  2754.                         request buffer, but failed to allocate one.  This indicates
  2755.                         that the parameters of the requester may need adjust-
  2756.                         ment. 
  2757. stw0_bigbufneed         is the number of times the requester required a big
  2758.                         buffer, but failed to allocate one.  This indicates that the
  2759.                         parameters of the requester may need adjustment. 
  2760.  
  2761.  
  2762. Data Structure of Server Statistics 
  2763.  
  2764. sts0_start
  2765. sts0_fopens
  2766. sts0_devopens
  2767. sts0_jobsqueued
  2768. sts0_sopens
  2769. sts0_stimedout
  2770. sts0_serrorout
  2771. sts0_pwerrors
  2772. sts0_permerrors
  2773. sts0_syserrors
  2774. sts0_bytessent_high
  2775. sts0_bytessent_low
  2776. sts0_bytesrcvd_high
  2777. sts0_bytesrcvd_low
  2778. stw0_avresponse
  2779. stw0_reqbufneed
  2780. stw0_bigbufneed
  2781.  
  2782. where: 
  2783. sts0_start    time statistics collection started.  This field indicates the
  2784.               date and time that the statistics were last  cleared; that
  2785.               means, it indicates the time period over which the re-
  2786.               turned statistics were collected. 
  2787. sts0_fopens   number of server file opens.  This includes opens of
  2788.               named pipes. 
  2789. sts0_devopens number of server device opens. 
  2790. sts0_jobsqueued         number of server print jobs spooled. 
  2791. sts0_sopens   number of server session starts. 
  2792. sts0_stimedout          number of server session autodisconnects. 
  2793. sts0_serrorout          number of server sessions errored out. 
  2794. sts0_pwerrors number of server password violations. 
  2795. sts0_permerrors         number of server access permission errors. 
  2796. sts0_syserrors          number of server system errors. 
  2797.  
  2798. The following 4 fields form two quadwords that contain very large counters. 
  2799. The high doubleword of each is the value divided by 2^32, while the low
  2800. doubleword is the value modal 2^32. 
  2801.  
  2802. bytessent_high          number of server bytes sent to the network (high
  2803.                         doubleword) 
  2804. bytessent_low number of server bytes sent to the network (low
  2805.               doubleword) 
  2806. bytesrcvd_high          number of server bytes received from the network (high
  2807.                         doubleword) 
  2808. bytesrcvd_low number of server bytes received from the network (low
  2809.               doubleword). 
  2810.  
  2811. sts0_avresponse         average server response time in milliseconds. 
  2812. sts0_reqbufneed         number of times the server required a request buffer,
  2813.                         but failed to allocate one.  This indicates  that the
  2814.                         parameters of the server may need adjustment. 
  2815. sts0_bigbufneed         number of times the server required a big buffer, but
  2816.                         failed to allocate one.  This indicates that the parame-
  2817.                         ters of the server may need adjustment. 
  2818.  
  2819.  
  2820. Note:  A value of -1 or 0xFFFFFFFF for any field means that information is
  2821. not available.  A value of -2 or 0xFFFFFFFE means that the field has
  2822. overflowed. 
  2823.  
  2824. ----------------------------------------------------------------------------
  2825.  
  2826. NetStatisticsGet2
  2827. ─────────────────
  2828.  
  2829. Retrieves and optionally clears operating statistics for a service.
  2830.  
  2831. Syntax:
  2832.  
  2833.        ret = NetStatisticsGet2( server, service, dummy, dummy, option,
  2834.        buffer, dummy, dummy )
  2835.  
  2836.  
  2837. Parameter:
  2838.               server    see above
  2839.               servicename   service name for which to get the statis-
  2840.                             tics. Only 'SERVER' and 'REQUEST-
  2841.                             ER' are allowed for the servicename. 
  2842.                             Other names will produce the ER-
  2843.                             ROR_NOT_SUPPORTED error code.
  2844.               level     must be 0
  2845.               options   The options parameter is bitmapped as
  2846.                         follows:
  2847.                         Mask                                        Meaning
  2848.                         0x1 Clear statistics after retrieval.
  2849.                         1-31                                        Must be 0.
  2850.               rexx-buffer   name of rexx variable containing ser-
  2851.                             vice data for server or requester statis-
  2852.                             tics.
  2853.  
  2854. Example:
  2855.  
  2856.         HighByte = 4294967296  /* = 2^32 */
  2857.         ret = NetStatisticsGet2( '\\SERVER', 'SERVER', '', '', 0, 'buffer',
  2858.         '', '' )
  2859.         SAY 'Bytes sent : ' Buffer.sts0_bytessent_high * HighByte +
  2860.         Buffer.sts_bytessent_low
  2861.         SAY 'Bytes sent : ' Buffer.sts0_bytesrcvd_high * HighByte +
  2862.         Buffer.sts_bytesrcvd_low
  2863.  
  2864.  
  2865. ----------------------------------------------------------------------------
  2866.  
  2867.                                 GROUP SECTION
  2868.                                 ─────────────
  2869.  
  2870. The functions in the Group category control the group entries in the user
  2871. accounts system  database (UAS)
  2872.  
  2873.  
  2874. Data structures
  2875.  
  2876. Group Information (Level 0)(group_info_0): 
  2877.  
  2878. grpi0_name
  2879.  
  2880.  
  2881. Group Information (Level 1)(group_info_1): 
  2882.  
  2883. grpi1_name
  2884. grpi1_comment
  2885.  
  2886.  
  2887. Group Membership Information (Level 0)(group_users_info_0):
  2888.  
  2889. grui0_name
  2890.  
  2891.  
  2892. where: 
  2893.  
  2894. grpi?_name    is the name of the group. 
  2895. grpi?_comment string containing the comment or remark of the group. 
  2896.               The string can be ''. 
  2897. grui0_name    is the name of the user in the group. 
  2898.  
  2899. ----------------------------------------------------------------------------
  2900.  
  2901. NetGroupAdd
  2902. ───────────
  2903.  
  2904. Creates a new group account in the UAS database.
  2905.  
  2906.  
  2907. Syntax:
  2908.  
  2909.        ret = NetGroupAdd( server, level, buffer, dummy )
  2910.  
  2911.  
  2912. Parameter:
  2913.               server    see above
  2914.               level     0, 1
  2915.               rexx-buffer   name of rexx variable containing group
  2916.                             data
  2917.  
  2918. Example:
  2919.  
  2920.         Buffer.grpi1_name = 'TRADER'
  2921.         Buffer.grpi1_comment = 'Group for company's trader'
  2922.         ret = NetGroupAdd( '\\SERVER', 1, buffer, '' )
  2923.  
  2924.  
  2925. ----------------------------------------------------------------------------
  2926.  
  2927. NetGroupEnum
  2928. ────────────
  2929. Retrieves all group accounts in the UAS database
  2930.  
  2931. Syntax:
  2932.  
  2933.        ret = NetGroupEnum( server, level, buffer, dummy, eread, dummy )
  2934.  
  2935.  
  2936. Parameter:
  2937.               server    see above
  2938.               level     0, 1
  2939.               rexx-buffer   name of rexx variable containing group
  2940.                             data
  2941.               eread     number of entries found
  2942.  
  2943. Example:
  2944.  
  2945.         ret = NetGroupEnum( '\\SERVER', 1, 'Buffer', '', 'eread', '' )
  2946.         DO i=0 TO eread-1
  2947.             SAY Buffer.grpi1_name  Buffer.grpi1_comment
  2948.             END
  2949.  
  2950. ----------------------------------------------------------------------------
  2951.  
  2952. NetGroupDel
  2953. ───────────
  2954. Removes a group account in the UAS database.
  2955.  
  2956. Syntax:
  2957.  
  2958.        ret = NetGroupDel( server, group )
  2959.  
  2960.  
  2961. Parameter:
  2962.               server    see above
  2963.               group     name of group to remove
  2964.  
  2965.  
  2966. Example:
  2967.  
  2968.         ret = NetGroupDel( '\\SERVER', 'TRADER' )
  2969.  
  2970. ----------------------------------------------------------------------------
  2971.  
  2972. NetGroupAddUser
  2973. ───────────────
  2974. Adds a user-ID to a group account in the UAS database.
  2975.  
  2976. Syntax:
  2977.  
  2978.        ret = NetGroupAddUser( server, group, user )
  2979.  
  2980.  
  2981. Parameter:
  2982.               server    see above
  2983.               group     name of group
  2984.               user      name of user to add to group
  2985.  
  2986. Example:
  2987.  
  2988.         ret = NetGroupAddUser( '\\SERVER', 'TRADER', JOHN' )
  2989.  
  2990.  
  2991. ----------------------------------------------------------------------------
  2992.  
  2993. NetGroupDelUser
  2994. ───────────────
  2995. Removes a user-ID from a group account in the UAS database.
  2996.  
  2997. Syntax:
  2998.  
  2999.        ret = NetGroupDelUser( server, group, user )
  3000.  
  3001.  
  3002. Parameter:
  3003.               server    see above
  3004.               group     name of group
  3005.               user      name of user to remove from group
  3006.  
  3007.  
  3008. Example:
  3009.  
  3010.         ret = NetGroupDelUser( '\\SERVER', 'TRADER', 'JOHN' )
  3011.  
  3012.  
  3013. ----------------------------------------------------------------------------
  3014.  
  3015. NetGroupGetInfo
  3016. ───────────────
  3017. Queries information about a group account in the UAS database.
  3018.  
  3019. Syntax:
  3020.  
  3021.        ret = NetGroupGetInfo( server, group, level, buffer, dummy, dummy )
  3022.  
  3023.  
  3024. Parameter:
  3025.               server    see above
  3026.               group     group to get information
  3027.               level     1
  3028.               rexx-buffer   name of rexx variable containing group
  3029.                             data
  3030.  
  3031. Example:
  3032.  
  3033.         ret = NetGroupGetInfo( '\\SERVER', 'TRADER', 1, 'Buffer', '', '' )
  3034.         IF ret = 0 THEN DO
  3035.            SAY 'Group exists.'
  3036.            SAY Buffer.grpi1_name Buffer.grpi1_comment
  3037.            END
  3038.  
  3039. ----------------------------------------------------------------------------
  3040.  
  3041. NetGroupSetInfo
  3042. ───────────────
  3043. Changes information about a group account in the UAS database.
  3044.  
  3045. Syntax:
  3046.  
  3047.        ret = NetGroupSetInfo( server, group, level, buffer, dummy, dummy )
  3048.  
  3049.  
  3050. Parameter:
  3051.               server    see above
  3052.               group     group to set information
  3053.               level     1
  3054.               rexx-buffer   name of rexx variable containing group
  3055.                             data
  3056.  
  3057. Example:
  3058.  
  3059.         ret = NetGroupGetInfo( '\\SERVER', 'TRADER', 1, 'Buffer', '', '' )
  3060.         IF ret = 0 THEN DO
  3061.             SAY 'Enter new comment:'
  3062.             PULL Buffer.grpi1_comment
  3063.             ret=NetGroupSetInfo( '\\SERVER', 'TRADER', 1, 'Buffer', '', '' )
  3064.             END
  3065.  
  3066.  
  3067. ----------------------------------------------------------------------------
  3068.  
  3069. NetGroupGetUsers
  3070. ────────────────
  3071. Gets a list of all users of a group
  3072.  
  3073. Syntax:
  3074.  
  3075.        ret = NetGroupGetUsers( server, group, level, buffer, dummy, eread,
  3076.            dummy )
  3077.  
  3078.  
  3079. Parameter:
  3080.               server    see above
  3081.               group     name of group to get user list
  3082.               level     0
  3083.               rexx-buffer   name of rexx variable containing user
  3084.                             list (group_user_info_0)
  3085.               eread     number of entries found
  3086.  
  3087. Example:
  3088.  
  3089.         ret = NetGroupGetUsers( '\\SERVER', 'TRADER', 0, 'Buffer, '', 'eread', '' )
  3090.         SAY 'Found members: '
  3091.         DO i=0 TO eread-1
  3092.             SAY Buffer.i.grui0_name
  3093.             END
  3094.  
  3095.  
  3096. ----------------------------------------------------------------------------
  3097.  
  3098. NetGroupSetUsers
  3099. ────────────────
  3100. Joins a list of users for a group
  3101.  
  3102. Syntax:
  3103.  
  3104.        ret=NetGroupSetUsers( server, group, level, buffer, dummy, entries )
  3105.  
  3106.  
  3107. Parameter:
  3108.               server    see above
  3109.               group     name of group to set user list
  3110.               level     0
  3111.               rexx-buffer   name of rexx variable containing user
  3112.                             list
  3113.               entries   number of entries to set
  3114.  
  3115.  
  3116. Example:
  3117.  
  3118.         ret = NetGroupGetUsers( '\\SERVER', 'TRADER', 0, 'Buffer, '', 'eread', '' )
  3119.         SAY 'Enter new member: '
  3120.         PULL Buffer.eread.grui0_name
  3121.         eread = eread+1
  3122.         ret = NetGroupSetUsers( '\\SERVER', 'TRADER', 0, 'Buffer, '', 'eread' )
  3123.  
  3124.  
  3125. ----------------------------------------------------------------------------
  3126.  
  3127.                                 USER SECTION
  3128.                                 ────────────
  3129.  
  3130. The functions in the User category control a user's account in the user
  3131. accounts subsystem (UAS) database.
  3132. The NetUserDCDBInit, NetUserGetAppSel, NetUserGetLogonAsn, NetUser-
  3133. SetAppSel, and NetUserSetLogonAsn functions are only available if you use
  3134. RXLAN30.DLL.
  3135.  
  3136.  
  3137. Data structures
  3138. ───────────────
  3139.  
  3140. User Account Information (Level 0) (user_info_0):
  3141.  
  3142. usri0_name
  3143.  
  3144.  
  3145. User Account Information (Level 1) (user_info_1):
  3146.  
  3147. usri1_name
  3148. usri1_password
  3149. usri1_password_age
  3150. usri1_priv
  3151. usri1_home_dir
  3152. usri1_comment
  3153. usri1_flags
  3154. usri1_script_path
  3155.  
  3156.  
  3157. User Account Information (Level 2) (user_info_2):
  3158.  
  3159. usri2_name                           usri2_workstations
  3160. usri2_password                       usri2_last_logon
  3161. usri2_password_age                   usri2_last_logoff
  3162. usri2_priv                           usri2_acct_expires
  3163. usri2_home_dir                       usri2_max_storage
  3164. usri2_comment                        usri2_units_per_week
  3165. usri2_flags                          usri2_logon_hours
  3166. usri2_script_path                    usri2_bad_pw_count
  3167. usri2_auth_flags                     usri2_num_logons
  3168. usri2_full_name                      usri2_logon_server
  3169. usri2_usr_comment                    usri2_country_code
  3170. usri2_parms                          usri2_code_page
  3171.  
  3172.  
  3173. User Account Information (Level 10) (usr_info_10):
  3174.  
  3175. usri10_name
  3176. usri10_comment
  3177. usri10_usr_comment
  3178. usri10_full_name
  3179.  
  3180. User Account Information (Level 11) (user_info_11):
  3181.  
  3182. usri11_name                       usri11_bad_pw_count
  3183. usri11_comment                    usri11_num_logons
  3184. usri11_usr_comment                usri11_logon_server
  3185. usri11_full_name                  usri11_country_code
  3186. usri11_priv                       usri11_workstations
  3187. usri11_auth_flags                 usri11_max_storage
  3188. usri11_password_age               usri11_units_per_week
  3189. usri11_home_dir                   usri11_logon_hours
  3190. usri11_parms                      usri11_code_page
  3191. usri11_last_logon
  3192. usri11_last_logoff
  3193.  
  3194.  
  3195. where: 
  3196. usri?_name    name of the user. 
  3197. usri?_password          is the password of a usri1_name. The NetUserEnum and
  3198.                         NetUserGetInfo functions return a string of blanks to
  3199.                         maintain password security.  The string can be ''. 
  3200. usri?_password_age      number of seconds that have passed since
  3201.                         usri1_password last changed. 
  3202. usri?_priv    one of three values indicating the level of privilege as-
  3203.               signed usri1_name.  
  3204.               Value     Privilege
  3205.               0         Guest
  3206.               1         User
  3207.               2         Administrator
  3208. usri?_home_dir          path to the user's home directory.  This string can take 
  3209.                         one of two forms.  The first form defines the drive of
  3210.                         the user that will be assigned to the home directory.  It
  3211.                         can have as many as PATHLEN bytes. 
  3212.               x:\machineID\Y$\pathname
  3213.               Where x is the drive letter to be assigned, machineID is
  3214.               the name of the server that holds the home directory, 
  3215.               y is the drive letter on the server where the home
  3216.               directory exists, and pathname is the remaining path to
  3217.               the directory. 
  3218.               The second form defines a first-available drive specifi-
  3219.               cation for the home directory: 
  3220.               \\machineID\Y$\pathname
  3221.               Where machineID, y, and pathname are defined as in
  3222.               the preceding example. 
  3223.               To define a home directory at the root of a server's
  3224.               drive, omit \pathname from either of the previous
  3225.               forms. 
  3226. usri?_comment optional comment or remark about the user.  
  3227. usri?_flags   is one of the following values that determine whether a
  3228.               logon script is to be executed and whether the user's
  3229.               account is enabled.
  3230.               Bit Mask  Meaning
  3231.               0x1       Must be 1.  Logon script enabled.
  3232.               0x2       If 1, user's account disabled.
  3233.               0x8       If 1, home directory required.
  3234.               0x20      If 1, password not required.
  3235.               0x40      If 1, user cannot change password.
  3236. usri?_script_path       path name of the user's logon script (.CMD, .EXE,
  3237.                         .BAT, or .PRO file).  It can have no extension at all. 
  3238.                         If the file has no extension, it is assumed to be a .CMD
  3239.                         or .BAT file. 
  3240. usri?_auth_flags        grants operator privilege (accounts, print, comm, and
  3241.                         server) to users.  
  3242.               Bits     Meaning
  3243.               0         If 1, print operator privilege is enabled.
  3244.               1         If 1, comm operator privilege is en-
  3245.                         abled.
  3246.               2         If 1, server operator privilege is en-
  3247.                         abled.
  3248.               3         If 1, accounts operator privilege is
  3249.                         enabled.
  3250. usri?_full_name         full name of the user. 
  3251. usri?_usr_comment       string which is a user settable field.  
  3252. usri?_parms   string that is set aside for use by applications. 
  3253. usri?_workstations      list of requesters from which a user is permitted to log
  3254.                         on.  A null string means all requesters are allowed.  Up
  3255.                         to eight requesters may be specified.
  3256. usri?_last_logon        time and date (seconds since 1 January 1970) when the
  3257.                         last logon occurred.  A value of 0 means unknown. 
  3258.                         This field can only be set by the system. 
  3259. usri?_last_logoff       time and date (seconds since 1 January 1970) when the
  3260.                         last logoff occurred.  A value of 0 means unknown. 
  3261.                         This field can only be set by the system. 
  3262. usri?_acct_expires      time and date (seconds since 1 January 1970) when the
  3263.                         account will expire.  An expired account is the equiva-
  3264.                         lent of a disabled account.  An entry of 0xFFFFFFFF or
  3265.                         (-1) means that there is no limit. 
  3266. usri?_max_storage       maximum storage allowed for the home directory. 
  3267.                         Units are kilobytes (KB).  An entry of 0xFFFFFFFF
  3268.                         (-1) means unlimited storage.
  3269. usri?_bad_pw_count      number of attempts to validate a bad password.  A
  3270.                         value of -1 means unknown.  This element is ignored in
  3271.                         NetUserAdd and NetUserSetInfo calls. 
  3272. usri?_num_logons        number of instances of logons to the account.  A value
  3273.                         of -1 means unknown.  This field can only be set by the
  3274.                         system and is ignored by NetUserAdd and
  3275.                         NetUserSetInfo. 
  3276. usri?_logon_server      string containing the name of the perferred server,
  3277.                         which validates user logon requests for this user.  A
  3278.                         null string indicates that the domain controller is the
  3279.                         preferred logon server. 
  3280. usri?_country_code      OS/2 country code for the user's language choice.  This
  3281.                         is used by the LAN Server software to generate mes-
  3282.                         sages in the appropriate language whenever possible. 
  3283. usri?_code_page         OS/2 code page for the language choice of the user. 
  3284.  
  3285.  
  3286. User Modals Information (Level 0)(user_modals_info_0): 
  3287.  
  3288. usrmod0_min_passwd_len
  3289. usrmod0_max_passwd_age
  3290. usrmod0_min_passwd_age
  3291. usrmod0_force_logoff
  3292. usrmod0_password_hist_len
  3293.  
  3294.  
  3295. where: 
  3296. usrmod0_min_passwd_len  minimum password length.  
  3297. usrmod0_max_passwd_age  maximum time (in seconds) since the
  3298.                         password was last changed, and for
  3299.                         which the current password is valid.  A
  3300.                         value of 0xFFFFFFFF allows the pass-
  3301.                         word to be valid forever.  The mini-
  3302.                         mum value is 1 day. 
  3303. usrmod0_min_passwd_age  minimum time (in seconds) since the
  3304.                         password was last changed, and before
  3305.                         which the current password is allowed
  3306.                         to be changed.  A value of 0 means
  3307.                         there is no delay required between
  3308.                         password updates. 
  3309. usrmod0_force_logoff    length of time (in seconds) after the
  3310.                         valid logon hours that the user should
  3311.                         be forced off the network.  The user is
  3312.                         never forced off if the value is
  3313.                         TIMEQ_FOREVER (-1), or is forced
  3314.                         off immediately if the value is 0.  Any
  3315.                         value between these can also be used. 
  3316. usrmod0_password_hist_len   length of the password history, that is,
  3317.                             the number of passwords in the history
  3318.                             buffer that are scanned versus the new
  3319.                             password in a NetUserPasswordSet
  3320.                             attempt.  The new password may not
  3321.                             match any of the entries scanned.  
  3322.  
  3323. User Modals Information (Level 1)(user_modals_info_1):
  3324.  
  3325. usrmod1_role
  3326. usrmod1_primary
  3327.  
  3328.  
  3329. where:
  3330. usrmod1_role  role of this server under a single system image (SSI). 
  3331.               It can be one of the following: 
  3332.               Value     Meaning
  3333.               0         Standalone server.
  3334.               1         Member server in the domain.
  3335.               2         Backup server in the domain.
  3336.               3         Primary server in the domain.
  3337. usrmod1_primary         name of the primary domain to which this server
  3338.                         belongs.  It should match the primary domain name of
  3339.                         the requester software on the local machine. 
  3340.  
  3341.  
  3342. User Validation Information (Requester) (user_logon_req_1):
  3343.  
  3344. usrreq1_name
  3345. usrreq1_password
  3346. usrreq1_workstation
  3347.  
  3348.  
  3349.  where: 
  3350. usrreq1_name  account name to which the user is attempting to log on.
  3351. usrreq1_password        is the plain text password. 
  3352. usrreq1_workstation     string representing the requester from which the user is
  3353.                         logging on. Can be '' for local.
  3354.  
  3355.  
  3356. User Validation Information (Level 0) (user_logon_info_0):
  3357.  
  3358. usrlog0_code
  3359. usrlog0_eff_name
  3360.  
  3361. User Validation Information (Level 1) (user_logon_info_1):
  3362.  
  3363. usrlog1_code                    usrlog1_logoff_time
  3364. usrlog1_eff_name                usrlog1_kickoff_time
  3365. usrlog1_priv                    usrlog1_password_age
  3366. usrlog1_auth_flags              usrlog1_pw_can_change
  3367. usrlog1_num_logons              usrlog1_pw_must_change
  3368. usrlog1_bad_pw_count            usrlog1_computer
  3369. usrlog1_last_logon              usrlog1_domain
  3370. usrlog1_last_logoff             usrlog1_script_path
  3371.  
  3372.  
  3373. User Validation Information (Level 2) (user_logon_info_2):
  3374.  
  3375. usrlog2_eff_name
  3376. usrlog2_computer
  3377. usrlog2_fullname
  3378. usrlog2_usrcomment
  3379. usrlog2_logon_time
  3380.  
  3381.  
  3382. where: 
  3383. usrlog?_code  code explaining an action taken. The following are
  3384.               possible values: 
  3385.               0:        No problems were encountered. 
  3386.               5:        Some condition of logon has not been
  3387.                         met. 
  3388.               2212:     An error occurred processing logon
  3389.                         script. 
  3390.               2214:     No domain controller could be found to
  3391.                         validate the user.  Script processing was
  3392.                         not performed. 
  3393.               2217:     The logon request was serviced by a
  3394.                         1X logon server.  Logon script process-
  3395.                         ing was performed. 
  3396.               2240:     The user was attempting to log on from
  3397.                         a requester that is not valid.
  3398.               2241:     The user was attempting to log on at a
  3399.                         time that is not valid.
  3400.               2242:     The user has an account, but the user's
  3401.                         password has expired.  No other condi-
  3402.                         tions of logon have been checked. 
  3403. usrlog?_eff_name        is the name of the account to which the user was
  3404.                         logged on. 
  3405. usrlog?_priv  is the user's privilege level.  It can be one of the
  3406.               following: 
  3407.               Value     Privilege
  3408.               0         Guest
  3409.               1         User
  3410.               2         Administrator
  3411. usrlog?_auth_flags      grants operator rights (accounts, print, comm, and
  3412.                         server) to users both locally and remotely. 
  3413. usrlog?_num_logons      is the number of instances of logons to the account.  A
  3414.                         value of -1 means unknown. 
  3415. usrlog?_bad_pw_count is the number of attempts to validate a bad password. 
  3416. usrlog?_last_logon      is the time and date (seconds since 1 January 1970)
  3417.                         when the last logon occurred. 
  3418. usrlog?_last_logoff     is the time and date (seconds since 1 January 1970)
  3419.                         when the last logoff occurred.  
  3420. usrlog?_logoff_time     is the time (in seconds) and date (since 1 January 1970)
  3421.                         when the user should log off. 
  3422. usrlog_kickoff_time     is the time (in seconds) when the user will be logged
  3423.                         off. 
  3424. usrlog?_password_age is the time since the password was last changed. 
  3425. usrlog?_pw_can_change time and date (since 1 January 1970) when the user
  3426.               can change his password.  
  3427. usrlog?_pw_must_change is the time (in seconds) and the date (since 1 
  3428.               January 1970) when the password must be changed. 
  3429. usrlog?_computer        is the server that validated the user's logon. 
  3430. usrlog?_domain          is the domain currently logged on to. 
  3431. usrlog?_script_path     is the relative path to the logon script of an account. 
  3432. usrlog?_fullname        is the full name of the user. 
  3433. usrlog?_usrcomment      string, which is a user-settable field for user comments. 
  3434.                         The string can be ''.
  3435. usrlog?_logon_time      is the time and date (seconds since 1 January 1970)
  3436.                         when the user logged on.  It can be '' for local.
  3437.  
  3438.  
  3439. User Validation Information (Logoff)(user_logoff_info_1):
  3440.  
  3441. usrlog1_code
  3442. usrlogf1_duration
  3443. usrlogf1_num_logons
  3444.  
  3445.  
  3446.  where: 
  3447. usrlogf1_code is dependent on the calling API.  It is specified sepa-
  3448.               rately for each API. 
  3449. usrlogf1_duration       is the duration of a logon.  It can be 0 for unknown. 
  3450. usrlogf1_num_logons   is the number of logons by a user name.  
  3451.  
  3452.  
  3453. Application Selector Information (Level 1)(app_sel_info_1): 
  3454.  
  3455. asi1_count
  3456.  
  3457. asi1_count    is an unsigned short integer that indicates the number of
  3458.               app_sel_list structures that immediately follow the
  3459.               app_sel_info_1 structure. 
  3460.  
  3461. Application Selector List (Level 1)(app_sel_list_1): 
  3462.  
  3463. asl_appname
  3464. asl_apptype
  3465.  
  3466. where: 
  3467. asl_appname   is the name of an application that exists in the domain
  3468.               control database.
  3469. as1_apptype   is one of the three values, defined as follows: 
  3470.               Value     Meaning
  3471.               0x1       Public DOS applications.
  3472.               0x2       Public OS/2 applications.
  3473.               0x4       Private OS/2 applications.
  3474.  
  3475. Logon Assignment Information (Level 1)(logon_asn_info_1):
  3476.  
  3477. lai1_count;
  3478.  
  3479. where: 
  3480. lai1_count    is an unsigned short integer that indicates the number of
  3481.               logon_asn_list structures that immediately follow the
  3482.               logon_asn_info_1 structure. 
  3483.  
  3484. Logon Assignment List (logon_asn_list):
  3485.  
  3486. lal_alias
  3487. lal_type
  3488. lal_device
  3489.  
  3490. where: 
  3491. lal_alias     specifies an existing alias for the resource that is to be
  3492.               automatically assigned to the user at logon time. 
  3493. lal_type      is one of three values indicating the alias type. 
  3494.               Value     Meaning
  3495.               0x0001    Files alias
  3496.               0x0002    Printer alias
  3497.               0x0004    Serial device alias
  3498. lal_device    indicates the device that will be assigned to the resource
  3499.               specified by lal_alias when the user logs on. If the
  3500.               device field is left blank, the connection is to be
  3501.               deviceless. 
  3502.  
  3503. ----------------------------------------------------------------------------
  3504.  
  3505. NetUserAdd
  3506. ──────────
  3507.  
  3508. Creates a new user account in the UAS database.
  3509.  
  3510. Syntax:
  3511.  
  3512.        ret = NetUserAdd( server, level, buffer, dummy )
  3513.  
  3514.  
  3515. Parameter: 
  3516.               server    see above
  3517.               level     1,2
  3518.               rexx-buffer   name of rexx variable containing us-
  3519.                             er_info_?  data
  3520.  
  3521. Example:
  3522.  
  3523.         BUFFER.USRI1_name = 'JOHN'
  3524.         BUFFER.USRI1_password = 'SECRET'
  3525.         BUFFER.USRI1_priv = 1        /* he is user */
  3526.         BUFFER.USRI1_home_dir = 'Y:\SERVER\D$\HOMEDIR\JOHN'
  3527.         BUFFER.USRI1_comment = 'John Smith, Trader, Tel-111'
  3528.         BUFFER.USRI1_flags = 1 + 8   /* script path enabled, homedir req.*/
  3529.         BUFFER.USRI1_script_path = ''
  3530.         ret = NetUserAdd( '\\SERVER', 1, 'Buffer', '' )
  3531.  
  3532.  
  3533.  
  3534. ----------------------------------------------------------------------------
  3535.  
  3536. NetUserEnum
  3537. ───────────
  3538.  
  3539. Retrieves all user accounts in the UAS database
  3540.  
  3541. Syntax: 
  3542.  
  3543.         ret = NetUserEnum( server, level, buffer, dummy, eread, dummy )
  3544.  
  3545.  
  3546. Parameter:
  3547.               server    see above
  3548.               level     0, 1, 2, 10
  3549.               rexx-buffer   name of rexx variable containing us-
  3550.                             er_info_? data
  3551.               eread     number of entries found
  3552.  
  3553. Example:
  3554.  
  3555.         ret = NetUserEnum('\\SERVER', 10,'Buffer', '', 'eread', '' )
  3556.         SAY eread 'user found.'
  3557.         DO i=0 TO eread-1
  3558.             SAY BUFFER.i.USRI10_name BUFFER.i.USRI10_full_name
  3559.             END
  3560.  
  3561.  
  3562. ----------------------------------------------------------------------------
  3563.  
  3564. NetUserDel
  3565. ──────────
  3566. Removes a user account in the UAS database.
  3567.  
  3568. Syntax:
  3569.  
  3570.        ret = NetUserDel( server, user )
  3571.  
  3572.  
  3573. Parameter:
  3574.               server    see above
  3575.               user      name of user to remove
  3576.  
  3577. Example:
  3578.  
  3579.         ret = NetUserDel( '\\SERVER', 'JOHN' )
  3580.  
  3581. ----------------------------------------------------------------------------
  3582.  
  3583. NetUserGetInfo
  3584. ──────────────
  3585.  
  3586. Queries information about a user account in the UAS database.
  3587.  
  3588. Syntax:
  3589.  
  3590.        ret = NetUserGetInfo( server, user, level, buffer, dummy, dummy )
  3591.  
  3592.  
  3593. Parameter:
  3594.               server    see above
  3595.               user      user to get information
  3596.               level     0, 1, 2, 10, 11
  3597.               rexx-buffer   name of REXX variable containing us-
  3598.                             er_info_? data
  3599.  
  3600. Example:
  3601.  
  3602.         ret = NetUserGetInfo( '\\SERVER', 'JOHN', 1, 'Buffer', '', '')
  3603.         SAY BUFFER.USRI1_name BUFFER.USRI1_comment
  3604.         IF Buffer.usri1_priv = 0 THEN SAY 'He is guest.'
  3605.         IF Buffer.usri1_priv = 1 THEN SAY 'He is user.'
  3606.         IF Buffer.usri1_priv = 2 THEN SAY 'He is administrator.'
  3607.  
  3608.  
  3609. ----------------------------------------------------------------------------
  3610.  
  3611. NetUserSetInfo
  3612. ──────────────
  3613.  
  3614. Changes information about a user account in the UAS database.
  3615.  
  3616. Syntax:
  3617.  
  3618.        ret = NetUserSetInfo( server, user, level, buffer, dummy, parmnum )
  3619.  
  3620.  
  3621. Parameter:
  3622.               server    see above
  3623.               group     user to get information
  3624.               level     1, 2
  3625.               parmnum   determines whether buf contains a com-
  3626.                         plete user_info data structure or a single
  3627.                         component. Parmnum must specify the
  3628.                         ordinal position value:
  3629.                         Value                                       Component
  3630.                         0   user_info_x
  3631.                         1   usrix_name
  3632.                         3   usrix_password
  3633.                         4   usrix_password_age
  3634.                         5   usrix_priv
  3635.                         6   usrix_home_dir
  3636.                         7   usrix_comment
  3637.                         8   usrix_flags
  3638.                         9   usrix_script_path
  3639.                         10  usri2_auth_flags
  3640.                         11  usri2_full_name
  3641.                         12  usri2_usr_comment
  3642.                         13  usri2_parms
  3643.                         14  usri2_workstations
  3644.                         15  usri2_last_logon
  3645.                         16  usri2_last_logoff
  3646.                         17  usri2_acct_expires
  3647.                         18  usri2_max_storage
  3648.                         19  usri2_units_per_week
  3649.                         20  usri2_logon_hours
  3650.                         21  usri2_bad_pw_count
  3651.                         22  usri2_num_logons
  3652.                         23  usri2_logon_server
  3653.                         24  usri2_country_code
  3654.                         25  usri2_code_page
  3655.                         100 password expired (only LS 3.0)
  3656.               rexx-buffer   name of rexx variable containing user
  3657.                             data
  3658.  
  3659. Example:
  3660.  
  3661.         /* set John's password to expired */
  3662.         ret = NetUserSetInfo( '\\SERVER', 'JOHN', 1, 0, '', 100 )
  3663.  
  3664.  
  3665. ----------------------------------------------------------------------------
  3666.  
  3667. NetUserGetGroups
  3668. ────────────────
  3669.  
  3670. Gets a list of groups a user belongs to.
  3671.  
  3672. Syntax:
  3673.  
  3674.        ret = NetUserGetGroups( server, user, level, buffer, dummy, eread,
  3675.            dummy )
  3676.  
  3677.  
  3678. Parameter:
  3679.               server    see above
  3680.               user      name of user to get group list
  3681.               level     0
  3682.               rexx-buffer   name of rexx variable containing
  3683.                             group_info_0 list
  3684.               eread     number of entries found
  3685.  
  3686. Example:
  3687.  
  3688.         ret = NetUserGetGroups( '\\SERVER', 'JOHN', 0, 'Buffer', '', 'eread-
  3689.         ', '' )
  3690.         SAY 'JOHN belongs to the groups : '
  3691.         DO i=0 TO eread-1
  3692.             SAY BUFFER.i.grpi0_name
  3693.             END
  3694.  
  3695.  
  3696. ----------------------------------------------------------------------------
  3697.  
  3698. NetUserSetGroups
  3699. ────────────────
  3700.  
  3701. User joins the groups in the list specified
  3702.  
  3703. Syntax:
  3704.  
  3705.  
  3706.        ret= NetUserSetGroups( server, user, level, buffer, dummy, entries )
  3707.  
  3708.  
  3709. Parameter:
  3710.               server    see above
  3711.               user      name of user to set group list
  3712.               level     0
  3713.               rexx-buffer   name of rexx variable containing
  3714.                             group_info_0 list
  3715.               entries   number of entries to set
  3716.  
  3717. Note:
  3718. NetUserGetGroups return one of the reserved groups GUESTS, USERS,
  3719. ADMINS (depending on the value of usri_priv). These groups were rejected
  3720. when passing them to NetUserSetGroups. Before passing the list of groups to
  3721. NetUserSetGroups, you have to remove them manually.
  3722.  
  3723. Example:
  3724.  
  3725.         /* Add JOHN to group TRADER */
  3726.         ret = NetUserGetGroups( '\\SERVER', 'JOHN', 0, 'Buffer', '', 'eread-
  3727.         ', '' )
  3728.         DO i=0 TO eread-1
  3729.             IF BUFFER.i.grpi0_name ='ADMINS' | BUFFER.i.grpi0_name ='USERS'
  3730.             | BUFFER.i.grpi0_name = GUESTS' THEN
  3731.                 BUFFER.i.grpi0_name = 'TRADER'
  3732.                 END
  3733.  
  3734.  
  3735. ----------------------------------------------------------------------------
  3736.  
  3737. NetUserPasswordSet
  3738. ──────────────────
  3739. Sets a new password for a user. This API is intended for having a user change
  3740. his password. The user needs to enter his old password before changing the
  3741. password. An administrator can use the NetUserSetInfo to change the users
  3742. password.
  3743.  
  3744. Syntax:
  3745.  
  3746.        ret = NetUserPasswordSet( server, user, old, new )
  3747.  
  3748.  
  3749. Parameter:
  3750.               server    see above
  3751.               user      user-ID whose password to change
  3752.               old       the currently used password
  3753.               new       the new password to set
  3754.  
  3755.  
  3756. Note:
  3757. The Password API is CASE SENSITIVE ! It is strongly recommended, to use
  3758. only upper case character and only standard ASCII character, because the
  3759. LAN servers and user profile interface only accept these characters.
  3760.  
  3761.  
  3762. ----------------------------------------------------------------------------
  3763.  
  3764. NetUserModalsGet
  3765. ────────────────
  3766. Gets global modals related information for all users and groups in the user
  3767. accounts subsystem (UAS) database.
  3768.  
  3769. Syntax:
  3770.  
  3771.        ret = NetUserModalsGet( server, level, buffer, dummy, dummy )
  3772.  
  3773.  
  3774. Parameter:
  3775.               server    see above
  3776.               level     0, 1
  3777.               rexx-buffer   name of rexx variable containing us-
  3778.                             er_modals_info_? data
  3779.  
  3780.  
  3781. Example:
  3782.  
  3783.  
  3784.         ret = NetUserModalsGet( '\\SERVER', 0, 'Buffer', '', '' )
  3785.         SAY 'Minimal pwd length: 'BUFFER.USRMOD0_min_passwd_len
  3786.         SAY 'Maximum pwd. age: ' BUFFER.USRMOD0_max_passwd_age
  3787.  
  3788.  
  3789. ----------------------------------------------------------------------------
  3790.  
  3791. NetUserModalsSet
  3792. ────────────────
  3793.  
  3794. Sets global modals related information for all users and groups in the user
  3795. accounts subsystem (UAS) database. The parmnum field is not supported.
  3796.  
  3797. Syntax:
  3798.  
  3799.        ret = NetUserModalsGet( server, level, buffer, dummy, dummy )
  3800.  
  3801.  
  3802. Parameter:
  3803.               server    see above
  3804.               level     0, 1
  3805.               rexx-buffer   name of rexx variable containing us-
  3806.                             er_modals_info data
  3807.  
  3808. Example:
  3809.  
  3810.         /* change maximum password age */
  3811.         ret = NetUserModalsGet( '\\SERVER', 0, 'Buffer', '', '' )
  3812.         BUFFER.USRMOD0_max_passwd_age = 60
  3813.         ret = NetUserModalsSet( '\\SERVER', 0, 'Buffer', '', '' )
  3814.  
  3815.  
  3816.  
  3817. ----------------------------------------------------------------------------
  3818.  
  3819. NetUserValidate2
  3820. ────────────────
  3821.  
  3822. Validates a user with its password. It checks if the user can log on based on
  3823. logon restrictions defined for the account.
  3824.  
  3825. Syntax:
  3826.  
  3827.        ret = NetUserValidate2( dummy, level, buffer, dummy, dummy, dummy )
  3828.  
  3829.  
  3830. Parameter:
  3831.               level     specifies the level of detail (1) supplied
  3832.                         to the user_logon data structure.
  3833.               rexx-buffer   At logon the rexx-buffer contains the
  3834.                             name of the variable, containing a us-
  3835.                             er_logon_req_1 array. The API creates
  3836.                             variables supplying a user_logon_info_1
  3837.                             array.
  3838.  
  3839. Example:
  3840.  
  3841.         BUFFER.USRreq1_name = 'JOHN'
  3842.         BUFFER.USRreq1_password = 'SECRET'
  3843.         BUFFER.USRreq1_workstation = 'JOHNSPC'
  3844.         ret = NetUserValidate2( '', 1, 'buffer', '', '', '' )
  3845.         IF ret = 0 THEN DO
  3846.             Msg = NetRexxGetMessage( BUFFER.USRlog1_code )
  3847.             SAY Msg
  3848.             SAY 'Users priv: ' BUFFER.USRlog1_priv
  3849.             SAY 'Bad pwds: ' BUFFER.USRlog1_bad_pw_count
  3850.             SAY 'Workstation: ' BUFFER.USRlog1_computer
  3851.             SAY 'Logon Domain: ' BUFFER.USRlog1_domain
  3852.             END
  3853.  
  3854.  
  3855. ----------------------------------------------------------------------------
  3856.  
  3857. NetUserDCDBInit 
  3858. ───────────────
  3859.  
  3860. Initializes the domain control database for the specified user. This API is only
  3861. available with RXLAN30 and LAN Server 3.0.
  3862.  
  3863. Syntax:
  3864.  
  3865.        ret = NetUserDCDBInit( server, user, dummy )
  3866.  
  3867.  
  3868. Parameter:
  3869.               server    see above
  3870.               user      specifies the user ID of a user that is
  3871.                         defined on the domain.
  3872.  
  3873. Example:
  3874.  
  3875.         ret = NetUserDCDBInit( '\\SERVER', 'JOHN' )
  3876.  
  3877. ----------------------------------------------------------------------------
  3878.  
  3879. NetUserGetAppSel
  3880. ────────────────
  3881. Retrieves information about all specified types of applications contained in the
  3882. user's desktop application folders. This API is only available with RXLAN30
  3883. and LAN Server 3.0.
  3884.  
  3885. Syntax:
  3886.  
  3887.        ret = NetUserGetAppSel( server, user, level, type, buffer, dummy,
  3888.        dummy )
  3889.  
  3890.  
  3891. Parameter:
  3892.               server    see above
  3893.               user      specifies the user ID of a user that is
  3894.                         defined on the domain.
  3895.               level     specifies the level of information re-
  3896.                         quested.  Currently, only level 1 is
  3897.                         supported.
  3898.               type      indicates the types of application to
  3899.                         retrieve:
  3900.                         Value  Meaning
  3901.                         0x1    Public DOS applications
  3902.                         0x2    Public OS/2 applications
  3903.                         0x4    Private OS/2 applications
  3904.                         0x7    All applications
  3905.               rexx-buffer   name of rexx variable containing appli-
  3906.                             cation data (user_app_info_1) followed
  3907.                             by application lists (user_app_list).
  3908.  
  3909. Example:
  3910.  
  3911.         ret = NetUserGetAppSel( '\\SERVER', 'JOHN', 1, 2, 'buffer', '', '')
  3912.         DO i=0 TO BUFFER.asi1_count
  3913.             BUFFER.i.asl_appname
  3914.             END
  3915.  
  3916.  
  3917. ----------------------------------------------------------------------------
  3918.  
  3919. NetUserSetAppSel
  3920. ────────────────
  3921.  
  3922. Changes information about all specified types of applications contained in the
  3923. user's desktop application folders.This API is only available with RXLAN30
  3924. and LAN Server 3.0.
  3925.  
  3926. Syntax:
  3927.  
  3928.        ret = NetUserSetAppSel( server, user, level, buffer, dummy )
  3929.  
  3930.  
  3931. Parameter:
  3932.               server    see above
  3933.               user      specifies the user ID of a user that is
  3934.                         defined on the domain.
  3935.               level     specifies the level of information re-
  3936.                         quested.  Currently, only level 1 is
  3937.                         supported.
  3938.               rexx-buffer   name of rexx variable containing appli-
  3939.                             cation data
  3940.  
  3941. Example:
  3942.  
  3943.         ret = NetUserGetAppSel( '\\SERVER', 'JOHN', 1, 2, 'buffer', '', '')
  3944.         new = Buffer.asi1_count
  3945.         BUFFER.new.asl_appname = 'WORDPRO'
  3946.         Buffer.new.asl_app_type = 2
  3947.         BUFFER.asi1_count = BUFFER.asi1_count +1
  3948.         ret = NetUserSetAppSel( '\\SERVER', JOHN', 1, 'Buffer', '' )
  3949.  
  3950.  
  3951. ----------------------------------------------------------------------------
  3952.  
  3953. NetUserGetLogonAsn
  3954. ──────────────────
  3955.  
  3956. Retrieves information about logon assignments for a user. This API is only
  3957. available with RXLAN30 and LAN Server 3.0.
  3958.  
  3959. Syntax:
  3960.  
  3961.        ret = NetUserGetLogonAsn( server, user, level, type, buffer, dummy,
  3962.            dummy )
  3963.  
  3964.  
  3965. Parameter:
  3966.               server    see above
  3967.               user      name of user to get logon assignments
  3968.               level     1
  3969.               type      indicates the types of logon assign-
  3970.                         ments:
  3971.                         Bit Meaning
  3972.                         0x01 Network nickname used for a file.
  3973.                         0x02 Network nickname used for a printer.
  3974.                         0x04 Network nickname used for a serial device.
  3975.               rexx-buffer   name of rexx variable containing as-
  3976.                             signment data (logon_asn_info_1) fol-
  3977.                             lowed by assignment list (logon_asn_li-
  3978.                             st)
  3979.  
  3980. Example:
  3981.  
  3982.         ret = NetUserGetLogonAsn('\\SERVER', 'JOHN', 1, 'Buffer', '' )
  3983.         DO i=0 TO BUFFER.lai1_count-1
  3984.             SAY BUFFER.i.lal_alias BUFFER.i.lal_device
  3985.             END
  3986.  
  3987.  
  3988. ----------------------------------------------------------------------------
  3989.  
  3990. NetUserSetLogonAsn
  3991. ──────────────────
  3992.  
  3993. Sets information about logon assignments for a user.This API is only available
  3994. with RXLAN30 and LAN Server 3.0.
  3995.  
  3996. Syntax:
  3997.  
  3998.        ret = NetUserSetLogonAsn( server, user, level, buffer, dummy )
  3999.  
  4000.  
  4001. Parameter:
  4002.               server    see above
  4003.               user      name of user to modify logon assign-
  4004.                         ments
  4005.               level     1
  4006.               rexx-buffer   name of rexx variable containing as-
  4007.                             signment data (logon_asn_info_1 follo-
  4008.                             wed by logon_asn_list).
  4009.  
  4010. Note:
  4011. THE IBM LAN APPLICATION PROGRAMMERS REFERENCE DOES
  4012. NOT DESCRIBE THE API CORRECTLY.
  4013.  
  4014.  
  4015. Example:
  4016.  
  4017.         ret = NetUserGetLogonAsn('\\SERVER', 'JOHN', 1, 'Buffer', '' )
  4018.         New = BUFFER.lai1_count
  4019.         Buffer.new.lal_alias = 'SRV_D'
  4020.         Buffer.new.lal_type = 1
  4021.         Buffer.new.lal_device = 'F:'
  4022.         BUFFER.lai1_count = BUFFER.lai1_count +1
  4023.         ret = NetUserSetLogonAsn('\\SERVER', 'JOHN', 1, 'Buffer', '' )
  4024.  
  4025.  
  4026. ----------------------------------------------------------------------------
  4027.  
  4028.                                 ALIAS SECTION
  4029.                                 ─────────────
  4030. The API in this section examine or modify aliases defined in a domain.
  4031.  
  4032. Data structures
  4033.  
  4034. Alias Information (Level 0)(alias_info_0): 
  4035.  
  4036. ai0_alias
  4037.  
  4038.  
  4039. Alias Information (Level 1)(alias_info_1): 
  4040.  
  4041. ai1_alias
  4042. ai1_remark
  4043. ai1_type
  4044.  
  4045.  
  4046. Alias Information (Level 2)(alias_info_2): 
  4047.  
  4048. ai2_alias
  4049. ai2_remark
  4050. ai2_type
  4051. ai2_location
  4052. ai2_server
  4053. ai2_mode
  4054. ai2_maxuses
  4055. ai2_netname
  4056. ai2_queue
  4057. ai2_path
  4058. ai2_priority
  4059. ai2_device_pool
  4060.  
  4061.  
  4062. where: 
  4063. ai?_alias     is the name by which a resource will be known in the
  4064.               domain.  
  4065. ai?_remark    string containing an optional comment about the alias. 
  4066.               The string must be no longer than 40 bytes. 
  4067. ai?_type      is one of three values indicating the alias type. 
  4068.               Value     Meaning
  4069.               0x0001    Files alias
  4070.               0x0002    Printer alias
  4071.               0x0004    Serial device alias
  4072. ai?_location  is one of four values defined as follows: 
  4073.               Value     Meaning
  4074.               0x0000    The alias describes a resource on a
  4075.                         server within the current domain.
  4076.               0x0001    The alias describes a resource on a
  4077.                         server outside the current domain.  The
  4078.                         alias will be accessed by DOS worksta-
  4079.                         tions only.
  4080.               0x0002    The alias describes a resource on a
  4081.                         server outside the current domain.  The
  4082.                         alias will be accessed by OS/2 worksta-
  4083.                         tions only.
  4084.               0x0003    The alias describes a resource on a
  4085.                         server outside the current domain.  The
  4086.                         alias will be accessed by both DOS and
  4087.                         OS/2 workstations.
  4088. ai?_server    is the name of the server where the resource described
  4089.               by this alias resides. 
  4090. ai?_mode      is one of three values that indicates when the alias is
  4091.               shared. 
  4092.               Value     Meaning
  4093.               0x0000    The resource is shared when the server
  4094.                         is started.
  4095.               0x0001    The resource must be explicitly shared
  4096.                         by the administrator.
  4097.               0x0002    The resource is shared when a request
  4098.                         to assign it is made.
  4099. ai?_maxuses   indicates the maximum number of users who can have
  4100.               redirection to the resource identified by this  alias. 
  4101.               Values from 0 through 65535 are valid. 
  4102. ai?_netname   is the alias name for files aliases, and the queue name
  4103.               for printer and serial device aliases.  For  NetAliasAdd
  4104.               and NetAliasSetInfo operations, any data in this field
  4105.               will be ignored. 
  4106. ai?_queue     applies to printer and serial device aliases only.  For
  4107.               serial devices, the queue is identical to the alias.  For
  4108.               printers, the queue is the print destination. 
  4109. ai?_path      applies to files aliases only.  It's a string  indicating a
  4110.               path that is relative to the server that the alias will be
  4111.               shared on.  The path must begin with a drive letter,
  4112.               followed by a colon and a backslash (for example C:\). 
  4113.               The maximum length of the string is 128 bytes. 
  4114. ai?_priority  applies to serial device aliases only.  The priority can
  4115.               have a value between 1 and 9 (inclusive),  with 1 being
  4116.               the highest priority. 
  4117. ai?_device_pool         applies to serial device aliases only and must not be ''. 
  4118.                         It's a list of serial devices separated by blanks.  Valid
  4119.                         serial devices are LPT1 through LPT9 and COM1
  4120.                         through COM9. 
  4121.  
  4122.  
  4123. ----------------------------------------------------------------------------
  4124.  
  4125. NetAliasAdd
  4126. ───────────
  4127.  
  4128. Creates an alias definition. This API is only available with RXLAN30 and
  4129. LAN Server 3.0.
  4130.  
  4131. Syntax:
  4132.  
  4133.        ret = NetAliasAdd( server, level, buffer, dummy )
  4134.  
  4135.  
  4136. Parameter:
  4137.               server    see above
  4138.               level     2
  4139.               rexx-buffer   name of rexx variable containing alias
  4140.                             data (alias_info_2).
  4141.  
  4142. Example:
  4143.  
  4144.         /* Add drive D: as alias */
  4145.         BUFFER.AI2_alias = 'SRV_D'
  4146.         BUFFER.AI2_remark = 'Path D:\ of server'
  4147.         BUFFER.AI2_type = 1
  4148.         BUFFER.AI2_location = 0
  4149.         BUFFER.AI2_server = '\\SERVER'
  4150.         BUFFER.AI2_mode = 0
  4151.         BUFFER.AI2_maxuses = -1
  4152.         BUFFER.AI2_path = 'D:\'
  4153.         ret = NetAliasAdd( '\\SERVER', 2, 'Buffer', '' )
  4154.  
  4155.  
  4156.  
  4157. ----------------------------------------------------------------------------
  4158.  
  4159. NetAliasDel
  4160. ───────────
  4161.  
  4162. Deletes an alias definition. This API is only available with RXLAN30 and
  4163. LAN Server 3.0.
  4164.  
  4165. Syntax:
  4166.  
  4167.        ret = NetAliasDel( server, alias, dummy )
  4168.  
  4169.  
  4170. Parameter:
  4171.               server    see above
  4172.               alias     name of alias to delete
  4173.  
  4174. Example:
  4175.  
  4176.         ret = NetAliasDel( '\\SERVER', 'SRV_D', '' )
  4177.  
  4178. ----------------------------------------------------------------------------
  4179.  
  4180. NetAliasEnum
  4181. ────────────
  4182.  
  4183. Returns a list of all aliases of a given type. This API is only available with
  4184. RXLAN30 and LAN Server 3.0.
  4185.  
  4186. Syntax:
  4187.  
  4188.        ret=NetAliasEnum( server, level, type, buffer, dummy, eread, dummy )
  4189.  
  4190.  
  4191. Parameter:
  4192.               server    see above
  4193.               level     0, 1, 2
  4194.               type      indicates the kind of alias to be enu-
  4195.                         merated:
  4196.                         Bit Meaning
  4197.                         0x01 Files alias
  4198.                         0x02 Printer alias
  4199.                         0x04 Serial device alias
  4200.               rexx-buffer   name of rexx variable containing alias
  4201.                             data
  4202.               eread     number of entries found
  4203.  
  4204.  
  4205. Example:
  4206.  
  4207.         ret = NetAliasEnum( '\\SERVER', 0, 7, 'Buffer', '', 'eread', '' )
  4208.         DO i=0 TO eread-1
  4209.             SAY Buffer.i.ai0_alias
  4210.             END
  4211.  
  4212.  
  4213. ----------------------------------------------------------------------------
  4214.  
  4215. NetAliasGetInfo
  4216. ───────────────
  4217.  
  4218. Returns information about a given alias. This API is only available with
  4219. RXLAN30 and LAN Server 3.0.
  4220.  
  4221. Syntax:
  4222.  
  4223.        ret = NetAliasGetInfo( server, alias, level, buffer, dummy, dummy )
  4224.  
  4225.  
  4226. Parameter:
  4227.               server    see above
  4228.               alias     name of alias to get information
  4229.               level     0, 1, 2
  4230.               rexx-buffer   name of rexx variable containing alias
  4231.                             data
  4232.  
  4233. Example:
  4234.  
  4235.         ret = NetAliasGetInfo( '\\SERVER', 'SRV_D', 2, 'Buffer', '', '' )
  4236.         SAY 'Alias : 'BUFFER.AI2_alias
  4237.         SAY 'Remark: 'BUFFER.AI2_remark
  4238.         SAY 'Server: 'BUFFER.AI2_server
  4239.         SAY 'Path: 'BUFFER.AI2_path
  4240.  
  4241.  
  4242.  
  4243. ----------------------------------------------------------------------------
  4244.  
  4245. NetAliasSetInfo
  4246. ───────────────
  4247.  
  4248. Set information about a given alias. This API is only available with
  4249. RXLAN30 and LAN Server 3.0.
  4250.  
  4251. Syntax:
  4252.  
  4253.        ret= NetAliasSetInfo( server, alias, level, buffer, dummy, parmnum )
  4254.  
  4255.  
  4256. Parameter:
  4257.               server    see above
  4258.               alias     name of alias to get information
  4259.               level     0, 1, 2
  4260.               rexx-buffer   name of rexx variable containing alias
  4261.                             data
  4262.               parmnum   determines whether rexx-buffer contains
  4263.                         a complete alias_info data structure or
  4264.                         a single component.
  4265.                         Value                                       Component Comment
  4266.                         3   aix_remark
  4267.                         7   aix_mode
  4268.                         8   aix_maxuses
  4269.                         13  aix_path Valid for files aliases
  4270.                             only
  4271.                         14  aix_priority Valid for serial de-
  4272.                             vice aliases only
  4273.                         15  aix_device_pool Valid for serial
  4274.                             device aliases only
  4275.                 
  4276. Example:
  4277.  
  4278.         ret= NetAliasSetInfo( '\\SERVER', 'SRV_D', 0, 'New comment', '', 3 )
  4279.  
  4280.  
  4281. ----------------------------------------------------------------------------
  4282.  
  4283.                              APPLICATION SECTION
  4284.                              ───────────────────
  4285.  
  4286. The functions in this section manage informations about the network
  4287. applications.
  4288.  
  4289. Data structures
  4290.  
  4291. Application Information (Level 0)(app_info_0):
  4292.  
  4293. app0_name
  4294.  
  4295.  
  4296. Application Information (Level 1)(app_info_1):
  4297.  
  4298. app1_name
  4299. app1_remark
  4300.  
  4301.  
  4302. Application Information (Level 2)(app_info_2):
  4303.  
  4304. app2_name                          app2_wrkdir_alias_or_drv
  4305. app2_remark                        app2_wrkdir_drive
  4306. app2_command                       app2_wrkdir_path_to_dir
  4307. app2_command_parms                 app2_prompt
  4308. app2_app_alias_or_drv              app2_interface
  4309. app2_app_drive                     app2_apptype
  4310. app2_app_path_to_dir
  4311.  
  4312.   
  4313. Application Information (Level 3)(app_info_3):
  4314.  
  4315. app3_name                          app3_wrkdir_alias_or_drv
  4316. app3_remark                        app3_wrkdir_drive
  4317. app3_command                       app3_wrkdir_path_to_dir
  4318. app3_command_parms                 app3_prompt
  4319. app3_app_alias_or_drv              app3_interface
  4320. app3_app_drive                     app3_apptype
  4321. app3_app_path_to_dir               app3_res_count
  4322.  
  4323.  
  4324. where: 
  4325. app?_name     specifies an identifying name for an application.
  4326. app?_remark   provides a description of the application.  '' is not
  4327.               allowed; a remark is required.  
  4328. app?_command  indicates the command that starts the application.  A
  4329.               null string is not allowed; a command is required. 
  4330. app?_command_parms string that indicates any fixed parameters needed for
  4331.               this application.  
  4332. app?_app_alias_or_drv alias or drive where the application resides.  
  4333. app?_app_drive          applies to DOS public applications only.  It is used to
  4334.                         specify the drive that is current when the application
  4335.                         runs.  
  4336. app?_app_path_to_dir string indicating the remaining path to the application,
  4337.               relative to the information in app2_app_alias_or_drv. 
  4338.               The string must begin with a \. 
  4339. app?_wrkdir_alias_or_drv directory that is made current when the application
  4340.               runs.  If the working directory is on the local machine,
  4341.               this field specifies the drive letter, followed by a :
  4342.               where the directory is located.  If the working directory
  4343.               is remote, this field specifies an existing alias where the
  4344.               directory is located. 
  4345. app?_wrkdir_drive       drive that the working directory is to be assigned to
  4346.                         when the application is started.
  4347. app?_wrkdir_path_to_dir string that specifies the remaining path to the
  4348.               working directory, relative to the information in appx_-
  4349.               wrkdir_alias_or_drv.  The string must begin with a \. 
  4350.               If app2_wrkdir_alias_or_drv is NULL, this field must
  4351.               be set to zero. 
  4352. app?_prompt   indicates whether the user is to be prompted for param-
  4353.               eters when the application starts.  A value of 1 indicates
  4354.               that the user is to be prompted for parameters; a value
  4355.               of zero indicates that the user is not to be prompted. 
  4356. app?_interface          is one of three values:
  4357.               Value     Meaning
  4358.               0x1       The application is a windowed program
  4359.                         running the PM interface.
  4360.               0x2       The application is a protected mode
  4361.                         program that is not windowed.
  4362.               0x4       The application is a windowed program
  4363.                         that is not PM and that uses OS/2 video
  4364.                         I/O functions.
  4365. app?_apptype  is one of three values:
  4366.               Value     Meaning
  4367.               0x1       Public DOS applications
  4368.               0x2       Public OS/2 applications
  4369.               0x4       Private OS/2 applications
  4370. app?_res_count          is the number of app_res_list structures that immediate-
  4371.                         ly follow the app_info_3 structure.  
  4372.  
  4373.  
  4374. Application Resource Lists (app_res_list):
  4375.  
  4376. arl_alias
  4377. arl_device
  4378.  
  4379.  
  4380.  where: 
  4381. arl_alias     specifies the alias for the resource required by the
  4382.               application.  The alias must exist. 
  4383. arl_device    indicates the device assigned to the resource specified
  4384.               by arl_alias when the application starts.  
  4385.  
  4386.  
  4387. ----------------------------------------------------------------------------
  4388.  
  4389. NetAppAdd
  4390. ─────────
  4391.  
  4392. Adds an application definition. This API is only available with RXLAN30 and
  4393. LAN Server 3.0.
  4394.  
  4395. Syntax:
  4396.  
  4397.        ret = NetAppAdd( server, user, level, buffer, dummy )
  4398.  
  4399.  
  4400. Parameter:
  4401.               server    see above
  4402.               user      indicates the application type. If userid
  4403.                         is '', the application is considered to be
  4404.                         a public application. Otherwise, userid
  4405.                         contains the user ID of a user defined
  4406.                         on the domain. A userid that is not ""
  4407.                         indicates that the application to be
  4408.                         added is private.
  4409.               level     3
  4410.               rexx-buffer   name of rexx variable containing app
  4411.                             data (app_info_3)
  4412.  
  4413. Example:
  4414.  
  4415.         BUFFER.APP3_name = 'WORDPRO'
  4416.         BUFFER.APP3_remark = 'Word Processor'
  4417.         BUFFER.APP3_command = 'WORD.EXE'
  4418.         BUFFER.APP3_command_parms =''
  4419.         BUFFER.APP3_app_alias_or_drv = 'SRV_D'
  4420.         BUFFER.APP3_app_path_to_dir = '\WORDPRO'
  4421.         BUFFER.APP3_prompt = 0
  4422.         BUFFER.APP3_interface = 1
  4423.         BUFFER.APP3_apptype = 2
  4424.         BUFFER.APP3_res_count = 0
  4425.         ret = NetAppAdd( '\\SERVER', '', 3, 'Buffer', '' )
  4426.  
  4427.  
  4428.  
  4429. ----------------------------------------------------------------------------
  4430.  
  4431. NetAppDel
  4432. ─────────
  4433. Deletes an application definition. This API is only available with RXLAN30
  4434. and LAN Server 3.0.
  4435.  
  4436. Syntax:
  4437.  
  4438.        ret = NetAppDel( server, user, appname, dummy )
  4439.  
  4440.  
  4441. Parameter:
  4442.               server    see above
  4443.               user      indicates the application type. If userid
  4444.                         is '', the application is considered to be
  4445.                         a public application.
  4446.               appname   name of application to delete
  4447.  
  4448. Example:
  4449.  
  4450.         ret = NetAppDel( '\\SERVER', '', 'WORDPRO', '' )
  4451.  
  4452.  
  4453. ----------------------------------------------------------------------------
  4454.  
  4455. NetAppEnum
  4456. ──────────
  4457.  
  4458. Enumerates all applications of a given type. This API is only available with
  4459. RXLAN30 and LAN Server 3.0.
  4460.  
  4461. Syntax:
  4462.  
  4463.        ret = NetAppEnum( server, userid, level, type, buffer, dummy, eread,
  4464.        dummy )
  4465.  
  4466.  
  4467. Parameter:
  4468.               server    see above
  4469.               user      indicates the application type. If userid
  4470.                         is '', the applications are considered to
  4471.                         be public applications.
  4472.               level     0, 1, 2, 3
  4473.               type      indicates the kind of application to be
  4474.                         enumerated:
  4475.                         Bit Meaning
  4476.                         0x1 Public DOS applications
  4477.                         0x2 Public OS/2 applications
  4478.                         0x4 Private OS/2 applications
  4479.                         0x7 All applications
  4480.               rexx-buffer   name of rexx variable containing app
  4481.                             data
  4482.               eread     number of entries found
  4483.  
  4484. Example:
  4485.  
  4486.         ret = NetAppEnum( '\\SERVER', 'JOHN', 0, 7, 'Buffer', '', 'eread',
  4487.         '' )
  4488.         DO i=0 TO eread-1
  4489.             BUFFER.i.APP0_name
  4490.             END
  4491.  
  4492.  
  4493. ----------------------------------------------------------------------------
  4494.  
  4495. NetAppGetInfo
  4496. ─────────────
  4497.  
  4498. Returns information about a given application. This API is only available with
  4499. RXLAN30 and LAN Server 3.0.
  4500.  
  4501. Syntax:
  4502.  
  4503.        ret = NetAppGetInfo( server, user, appname, level, buffer, dummy,
  4504.        dummy )
  4505.  
  4506.  
  4507. Parameter:
  4508.               server    see above
  4509.               user      see above
  4510.               appname   name of application to get information
  4511.               level     0, 1, 2, 3
  4512.               rexx-buffer   name of rexx variable containing app
  4513.                             data
  4514.  
  4515. Example:
  4516.  
  4517.         ret = NetAppGetInfo( '\\SERVER', '', 'WORDPRO', 2, 'Buffer', '' )
  4518.         SAY 'Name : ' BUFFER.APP2_name
  4519.         SAY 'Remark: 'BUFFER.APP2_remark
  4520.         SAY 'Command: 'BUFFER.APP2_command
  4521.  
  4522.  
  4523.  
  4524. ----------------------------------------------------------------------------
  4525.  
  4526. NetAppSetInfo
  4527. ─────────────
  4528.  
  4529. Returns information about a given application. This API is only available with
  4530. RXLAN30 and LAN Server 3.0.
  4531.  
  4532. Syntax:
  4533.  
  4534.        ret = NetAppSetInfo( server, user, appname, level, buffer, dummy,
  4535.        parmnum )
  4536.  
  4537.  
  4538. Parameter:
  4539.               server    see above
  4540.               user      see above
  4541.               appname   name of application to get information
  4542.               level     0, 1, 2, 3
  4543.               rexx-buffer   name of rexx variable containing app
  4544.                             data
  4545.               parmnum   determines whether rexx-buffer contains
  4546.                         a complete app_info data structure or a
  4547.                         single component. If parmnum is 0,
  4548.                         level can be 1, 2, or 3, and rexx-buffer
  4549.                         must contain a complete alias_info data
  4550.                         structure.  Otherwise, parmnum
  4551.                         mustspecify the ordinal position value
  4552.                         for one of the data structure compo-
  4553.                         nents:
  4554.                         Value  Component
  4555.                         3   appx_remark
  4556.                         4   appx_command
  4557.                         5   appx_command_parms
  4558.  
  4559. Example:
  4560.  
  4561.         ret = NetAppSetInfo( '\\SERVER', '', 'WORDPRO', 0, 'New remark', '',
  4562.         3 )
  4563.  
  4564. ----------------------------------------------------------------------------
  4565.  
  4566.                            USER PROFILE MANAGEMENT
  4567.                            ───────────────────────
  4568.  
  4569. The functions of this sections provide an interface to the OS/2 user profile
  4570. management including the logon and logoff commands.
  4571.  
  4572.  
  4573. Data structures
  4574.  
  4575. User logon information (upm_user_logon):
  4576.  
  4577. userid
  4578. remotetype
  4579. remotename
  4580. sessionid
  4581.  
  4582. where:
  4583. userid        contains the name of the logged on user
  4584. remotetype    is the type of node named in remotename for which the
  4585.               logoff is being requested.  Valid values are: 
  4586.               type      Meaning
  4587.               1         The local node. 
  4588.               2         Specifies that remotename is the name
  4589.                         of a node from which the user wants to
  4590.                         log off. 
  4591.               3         Specifies that remotename is the name
  4592.                         of a domain.  
  4593. remotename    string identifying the node or domain for the user ID. 
  4594. sessionid     Identifier of the session
  4595.  
  4596. ----------------------------------------------------------------------------
  4597.  
  4598. upmeulgn
  4599. ────────
  4600.  
  4601. Logs a user on to the system.
  4602.  
  4603. Syntax:
  4604.  
  4605.        ret = upmeulgn( userid,  password,  remotename, remotetype, resvd )
  4606.  
  4607.  
  4608. Parameter:
  4609.           userid        string containing the user ID to be logged on.
  4610.           password      string containing the password.
  4611.           remotename    string identifying the node or domain for which the user
  4612.                         ID and password are required.  If remotetype is local,
  4613.                         remotename is ignored.
  4614.           remotetype    is the type of node named in remotename for which the
  4615.                         user ID and password are required.
  4616.                         types     Meaning
  4617.                         1         The local node.  The calling process is
  4618.                                   logging on to the local node.
  4619.                         2         Specifies that remotename is the name
  4620.                                   of an LU 6.2 node to which the caller
  4621.                                   wishes to log on.
  4622.                         3         Specifies that remotename is the name
  4623.                                   of a domain.
  4624.           flags         is a bit mask for LAN Server logon verification.  Valid
  4625.                         values for bits 0 and 1 follow:
  4626.                         Bit       Meaning
  4627.                         0x01      Perform verification locally
  4628.                         0x02      Don't perform any verification
  4629.                         0x03      Perform the verification on the domain
  4630.  
  4631.  
  4632. ----------------------------------------------------------------------------
  4633.  
  4634. upmeulgf
  4635. ────────
  4636.  
  4637. Logs a user off the system.
  4638.  
  4639.  
  4640. Syntax:
  4641.  
  4642.        ret = upmeulgf( userid, remotename, remotetype )
  4643.  
  4644.  
  4645. Parameter:
  4646.               userid    string containing the user ID to be
  4647.                         logged off. 
  4648.               remotename    name identifying the node or domain
  4649.                             from which the user ID is to be logged
  4650.                             off. 
  4651.               remotetype    is the type of node named in remotena-
  4652.                             me for which the logoff is being re-
  4653.                             quested.  Valid values are: 
  4654.                         type  Meaning
  4655.                         1   The local node. 
  4656.                         2   Specifies that remotename is the
  4657.                             name of a node from which the
  4658.                             user wants to log off. 
  4659.                         3   Specifies that remotename is the
  4660.                             name of a domain.  
  4661.                         4   Same meaning as (3), except
  4662.                             that all connections are forced
  4663.                             closed. 
  4664.  
  4665.  
  4666. ----------------------------------------------------------------------------
  4667.  
  4668. upmelocl
  4669. ────────
  4670.  
  4671. Displays a local logon window to log on to the system. 
  4672.  
  4673. Syntax:
  4674.  
  4675.        ret = upmelocl( userid, type )
  4676.  
  4677.  
  4678. Parameter:
  4679.               userid    buffer containing the locally logged-on
  4680.                         user ID. 
  4681.               type      is a buffer containing the privilege type
  4682.                         of the user who logged on locally. 
  4683.                         Type is either: 
  4684.                         1   user privilege
  4685.                         2   administrator privilege
  4686.                         9   local administrator privilege
  4687.  
  4688. Example:
  4689.  
  4690.         ret = upmelocl( 'user', 'priv' )
  4691.         SAY 'User ID: 'user
  4692.         IF priv = 1 THEN type = 'USER'
  4693.         IF priv = 2 THEN type = 'ADMIN'
  4694.         IF priv = 9 THEN type = 'LOCAL ADMIN'
  4695.         SAY 'Priv: 'type
  4696.  
  4697. ----------------------------------------------------------------------------
  4698.  
  4699. upmelocu
  4700. ────────
  4701.  
  4702. Retrieves the ID of an already local logged on user. 
  4703.  
  4704. Syntax:
  4705.  
  4706.        ret = upmelocu( userid, type )
  4707.  
  4708. Parameter:
  4709.               userid    buffer containing the locally logged-on
  4710.                         user ID. 
  4711.               type      is a buffer containing the privilege type
  4712.                         of the user who is logged on locally. 
  4713.                         type is either: 
  4714.                         1   user privilege
  4715.                         2   administrator privilege
  4716.                         9   local administrator privilege
  4717.  
  4718. ----------------------------------------------------------------------------
  4719.  
  4720.  
  4721. upmeusrl
  4722. ────────
  4723.  
  4724. Returns a list of logged on user IDs.
  4725.  
  4726. Syntax;
  4727.  
  4728.        ret = upmeusrl( remotename, remotetype, buffer, dummy, entries, '' )
  4729.  
  4730.  
  4731. Parameter:
  4732.               remotename    name identifying the node or domain
  4733.                             from which the logged-on user IDs are
  4734.                             requested.
  4735.               remotetype    is the type for the requested logged-on
  4736.                             user IDs.  Valid values are: 
  4737.                         types Meaning
  4738.                         1   User IDs logged on to the local
  4739.                             node
  4740.                         2   User IDs logged on to remote
  4741.                             nodes
  4742.                         3   User IDs logged on to the LAN
  4743.                             Server domain.
  4744.                         21  User IDs logged on to the high
  4745.                             performance file system
  4746.                         22  All user IDs
  4747.               buffer    contains the UPM_USER_LOGON
  4748.                         structures. 
  4749.               entries   is the number of UPM_USER_LOGON
  4750.                         entries returned in buffer. 
  4751.  
  4752. ----------------------------------------------------------------------------
  4753.  
  4754.                                  APPENDICES
  4755.                                  ──────────
  4756.  
  4757.  
  4758. The files
  4759. ─────────
  4760.  
  4761. This package consists of the following files:
  4762.  
  4763. RXLAN20.DLL   The RexxLan/2 extension DLL for a LAN Server Ver-
  4764.               sion 2.0 Requester
  4765. RXLAN30.DLL   The counterpart for a Version 3.0 Requester
  4766.               DO NOT USE THIS WITH A LAN REQUESTER 2.0
  4767. REXXLAN.INF   The 'VIEW'able version of the programmers reference (not
  4768.               in the evaluation package)
  4769. README.1ST    Any last minute comments. Please read them first.
  4770. FORM          For the development of further releases of RexxLan/2
  4771.               and other Network management utilities,
  4772. REPORT.BUG    For the - hopefully - never occuring case, that you
  4773.               discover an "anomaly" of RexxLan/2 ,  please fill in
  4774.               this form and send it to the technical support.
  4775. \SMPLES?0     Some sample REXX files using the REXX?0.DLL The
  4776.               files are well documented, please read the remarks for
  4777.               further details.
  4778.  
  4779. ----------------------------------------------------------------------------
  4780.  
  4781. Support
  4782. ───────
  4783.  
  4784. The technical support is provided through electronic mail. You will reach it
  4785. at:
  4786.  
  4787. CompuServe:   100024,3436 (Leif Braeuer)
  4788. Fido:         2:240/5200.13
  4789. Internet:     100024.3436@compuserve.com
  4790. Maus Net:     Leif Braeuer@HH           (Germany only)
  4791.  
  4792.  
  4793. ----------------------------------------------------------------------------
  4794.  
  4795. Return codes
  4796. ────────────
  4797.  
  4798. You can consult the OS/2 Online help for further details of the error condition.
  4799. To do so, open a OS/2 Command Window and enter HELP SYSxxx for error
  4800. code less than 2100, for other enter HELP NETxxxx, where xxxx specfies the
  4801. error code returned from the RexxLan/2 API. In your programs,
  4802. NetRexxGetMessage() will supply this information.
  4803.  
  4804. 0 (NERR_Success)       Success
  4805.  
  4806. Redirector related error codes
  4807. 50 (ERR_NOT_SUPPORTED)                     The network request is not supported.
  4808. 51 (ERR_REM_NOT_LIST)                      This remote computer is not listening.
  4809. 52 (ERR_DUP_NAME)                          A duplicate name exists on the network.
  4810. 53 (ERR_BAD_NETPATH)                       The network path cannot be located.
  4811. 54 (ERR_NETWORK_BUSY)                      The network is busy.
  4812. 55 (ERR_DEV_NOT_EXIST)                     This device does not exist on the net-
  4813.                                            work.
  4814. 56 (ERR_TOO_MANY_CMDS)                     The network BIOS command limit has been
  4815.                                            reached.
  4816. 57 (ERR_ADAP_HDW_ERR)                      A network adapter hardware error has
  4817.                                            occurred.
  4818. 58 (ERR_BAD_NET_RESP)                      The network responded incorrectly.
  4819. 59 (ERR_UNEXP_NET_ERR)                     An unexpected network error occurred.
  4820. 60 (ERR_BAD_REM_ADAP)                      The remote adapter is not compatible.
  4821. 61 (ERR_PRINTQ_FULL)                       The printer queue is full.
  4822. 62 (ERR_NO_SPOOL_SPACE)                    Space to store the file waiting to be
  4823.                                            printed is not available on the server.
  4824. 63 (ERR_PRINT_CANCELLED)                   The requested print file has been can-
  4825.                                            celled.
  4826. 64 (ERR_NETNAME_DELETED)                   The network name was deleted.
  4827. 65 (ERR_NETWORK_ACCESS_DENIED)             Network access is denied.
  4828. 66 (ERR_BAD_DEV_TYPE)                      The network resource type is not cor-
  4829.                                            rect.
  4830. 67 (ERR_BAD_NET_NAME)                      The network name cannot be found.
  4831. 68 (ERR_TOO_MANY_NAMES)                    The name limit for the local computer
  4832.                                            network adapter card was exceeded.
  4833. 69 (ERR_TOO_MANY_SESS)                     The network BIOS session limit was ex-
  4834.                                            ceeded.
  4835. 70 (ERR_SHARING_PAUSED)                    File sharing has been temporarily paused.
  4836. 71 (ERR_REQ_NOT_ACCEP)                     The network request was not accepted.
  4837. 72 (ERR_REDIR_PAUSED)                      Print or disk redirection is tempora-
  4838.                                            rily paused.
  4839. 88 (NET_WRITE_FAULT)                       A network data fault occurred.
  4840. 230 (ERR_BAD_PIPE)                         This is a nonexistent pipe or an inva-
  4841.                                            lid operation.
  4842. 231 (ERR_PIPE_BUSY)                        The specified pipe is busy.
  4843. 232 (ERR_NO_DATA)                          There is no data to be read on a non--
  4844.                                            blocking read.
  4845. 233 (ERR_PIPE_NOT_CONNECTED)               The server disconnected the pipe.
  4846. 234 (ERR_MORE_DATA)                        Additional data is available.
  4847. 240 (ERR_VC_DISCONNECTED)                  The session was cancelled.
  4848. 2102 (NERR_NetNotStarted)                  The workstation driver (NETWKSTA.SYS on
  4849.                                            OS/2 workstations, NETWKSTA.EXE on DOS
  4850.                                            workstations) isn't installed.
  4851. 2103 (NERR_UnknownServer)                  The server cannot be located.
  4852. 2104 (NERR_ShareMem)                       An internal error occurred.  The net-
  4853.                                            work cannot access a shared memory
  4854.                                            segment.
  4855. 2105 (NERR_NoNetworkResource)              A network resource shortage occurred .
  4856. 2106 (NERR_RemoteOnly)                     This operation is not supported on
  4857.                                            workstations.
  4858. 2107 (NERR_DevNotRedirected)               The device is not connected. 
  4859. 2114 (NERR_ServerNotStarted)               The Server service isn't started. 
  4860. 2115 (NERR_ItemNotFound)                   The queue is empty. 
  4861. 2116 (NERR_UnknownDevDir)                  The device or directory does not exist
  4862. 2117 (NERR_RedirectedPath)                 The operation is invalid on a redirec-
  4863.                                            ted resource. 
  4864. 2118 (NERR_DuplicateShare)                 The name has already been shared. 
  4865. 2119 (NERR_NoRoom)                         The server is currently out of the
  4866.                                            requested resource.
  4867. 2121 (NERR_TooManyItems)                   Requested add of item exceeds maximum
  4868.                                            allowed. 
  4869. 2122 (NERR_InvalidMaxUsers)                The Peer service supports only two
  4870.                                            simultaneous users. 
  4871. 2123 (NERR_BufTooSmall)                    The API return buffer is too small. 
  4872. 2127 (NERR_RemoteErr)                      A remote API error occurred.
  4873. 2131 (NERR_LanmanIniError)                 An error occurred when opening or read-
  4874.                                            ing IBMLAN.INI. 
  4875. 2134 (NERR_OS2IoctlError)                  An internal error occurred when calling
  4876.                                            the workstation driver. 
  4877. 2136 (NERR_NetworkError)                   A general network error occurred. 
  4878. 2138 (NERR_WkstaNotStarted)                The Requester service has not been
  4879.                                            started. 
  4880. 2139 (NERR_BrowserNotStarted)              The requested information is not avai-
  4881.                                            lable. 
  4882. 2140 (NERR_InternalError)                  An internal LAN Manager error occurred.
  4883. 2141 (NERR_BadTransactConfig)              The server is not configured for trans-
  4884.                                            actions. 
  4885. 2142 (NERR_InvalidAPI)                     The requested API isn't supported on
  4886.                                            the remote server.
  4887. 2143 (NERR_BadEventName)                   The event name is invalid. 
  4888.  
  4889. NetConfig related error codes
  4890. 2146 (NERR_CfgCompNotFound)                Could not find the specified component
  4891.                                            in IBMLAN.INI. 
  4892. 2147 (NERR_CfgParamNotFound)               Could not find the specified parameter
  4893.                                            in IBMLAN.INI. 
  4894. 2149 (NERR_LineTooLong)                    A line in IBMLAN.INI is too long. 
  4895.  
  4896. Wksta and Logon related error codes 
  4897. 2200 (NERR_AlreadyLoggedOn)                This workstation is already logged  on
  4898.                                            to the local-area network. 
  4899. 2201 (NERR_NotLoggedOn)                    The workstation isn't logged on to the
  4900.                                            local-area network. 
  4901. 2202 (NERR_BadUsername)                    The username or groupname parameter is
  4902.                                            invalid.  
  4903. 2203 (NERR_BadPassword)                    The password parameter is invalid. 
  4904. 2204 (NERR_UnableToAddName_W)              The logon processor did not add the
  4905.                                            message alias. 
  4906. 2205 (NERR_UnableToAddName_F)              The logon processor did not add the
  4907.                                            message alias. 
  4908. 2206 (NERR_UnableToDelName_W)              The logoff processor did not delete the
  4909.                                            message alias. 
  4910. 2207 (NERR_UnableToDelName_F)              The logoff processor did not delete the
  4911.                                            message alias. 
  4912. 2209 (NERR_LogonsPaused)                   Network logons are paused. 
  4913. 2210 (NERR_LogonServerConflict)            A centralized logon-server conflict
  4914.                                            occurred. 
  4915. 2211 (NERR_LogonNoUserPath)                The server is configured without a
  4916.                                            valid user path. 
  4917. 2212 (NERR_LogonScriptError)               An error occurred while loading or
  4918.                                            running the logon script. 
  4919. 2214 (NERR_StandaloneLogon)                The logon server was not specified. 
  4920.                                            Your computer will be logged on as
  4921.                                            STANDALONE. 
  4922. 2215 (NERR_LogonServerNotFound)            The logon server cannot be found.  
  4923. 2216 (NERR_LogonDomainExists)              There is already a logon domain for
  4924.                                            this computer.  
  4925. 2217 (NERR_NonValidatedLogon)              The logon server could not validate the
  4926.                                            logon. 
  4927.  
  4928. ACF API related (access, user, group) error codes
  4929. 2219 (NERR_ACFNotFound)                    The accounts file NET.ACC cannot be
  4930.                                            found. 
  4931. 2220 (NERR_GroupNotFound)                  The groupname cannot be found. 
  4932. 2221 (NERR_UserNotFound)                   The username cannot be found. 
  4933. 2222 (NERR_ResourceNotFound)               The resource name cannot be found.  
  4934. 2223 (NERR_GroupExists)                    The group already exists. 
  4935. 2224 (NERR_UserExists)                     The user account already exists.
  4936. 2225 (NERR_ResourceExists)                 The resource permission list already
  4937.                                            exists. 
  4938. 2226 (NERR_NotPrimary)                     The UAS database is replicant and will
  4939.                                            not allow updates.
  4940. 2227 (NERR_ACFNotLoaded)                   The user account system has not been
  4941.                                            started. 
  4942. 2228 (NERR_ACFNoRoom)                      There are too many names in the user
  4943.                                            account system.
  4944. 2229 (NERR_ACFFileIOFail)                  A disk I/O failure occurred.
  4945. 2230 (NERR_ACFTooManyLists)                The limit of 64 entries per resource
  4946.                                            was exceeded. 
  4947. 2231 (NERR_UserLogon)                      Deleting a user with a session is not
  4948.                                            allowed.
  4949. 2232 (NERR_ACFNoParent)                    The parent directory cannot be located.
  4950. 2233 (NERR_CanNotGrowSegment)              Unable to grow UAS session cache segment.
  4951. 2234 (NERR_SpeGroupOp)                     This operation is not allowed on this
  4952.                                            special group.
  4953. 2235 (NERR_NotInCache)                     This user is not cached in UAS session
  4954.                                            cache.
  4955. 2236 (NERR_UserInGroup)                    The user already belongs to this group.
  4956. 2237 (NERR_UserNotInGroup)                 The user does not belong to this group.
  4957. 2238 (NERR_AccountUndefined)               This user account is undefined.
  4958. 2239 (NERR_AccountExpired)                 This user account has expired. 
  4959. 2240 (NERR_InvalidRequester)               The user is not allowed to log on from
  4960.                                            this workstation. 
  4961. 2241 (NERR_InvalidLogonHours)              The user is not allowed to log on at
  4962.                                            this time.  
  4963. 2242 (NERR_PasswordExpired)                The password of this user has expired. 
  4964. 2243 (NERR_PasswordCantChange)             The password of this user cannot chan-
  4965.                                            ge. 
  4966. 2244 (NERR_PasswordHistConflict)           This password cannot be used now. 
  4967. 2245 (NERR_PasswordTooShort)               The password is shorter than required. 
  4968. 2246 (NERR_PasswordTooRecent)              The password of this user is too recent
  4969.                                            to change.  
  4970. 2247 (NERR_InvalidDatabase)                The UAS database file is corrupted. 
  4971. 2248 (NERR_DatabaseUpToDate)               No updates are necessary to this repli-
  4972.                                            cant UAS database. 
  4973. 2249 (NERR_SyncRequired)                   This replicant database is outdated;
  4974.                                            synchronization is required. 
  4975.  
  4976. Use API related error codes
  4977. 2250 (NERR_UseNotFound)                    The connection cannot be found. 
  4978. 2251 (NERR_BadAsgType)                     This asg_type is invalid.
  4979. 2252 (NERR_DeviceIsShared)                 This device is currently being shared. 
  4980.  
  4981. Message Server related error codes
  4982. 2270 (NERR_NoComputerName)                 A computername has not been configured. 
  4983. 2271 (NERR_MsgAlreadyStarted)              The Messenger service is already  star-
  4984.                                            ted.
  4985. 2272 (NERR_MsgInitFailed)                  The Messenger service failed to start. 
  4986. 2273 (NERR_NameNotFound)                   The message alias cannot be found on
  4987.                                            the local-area network.
  4988. 2274 (NERR_AlreadyForwarded)               This message alias has already been
  4989.                                            forwarded. 
  4990. 2275 (NERR_AddForwarded)                   This message alias has been added but
  4991.                                            is still forwarded. 
  4992. 2276 (NERR_AlreadyExists)                  This message alias already exists lo-
  4993.                                            cally. 
  4994. 2277 (NERR_TooManyNames)                   The maximum number of added message
  4995.                                            aliases has been exceeded. 
  4996. 2278 (NERR_DelComputerName)                The computername cannot be deleted.
  4997. 2279 (NERR_LocalForward)                   Messages cannot be forwarded back to
  4998.                                            the same workstation. 
  4999. 2280 (NERR_GrpMsgProcessor)                Error in domain message processor 
  5000. 2281 (NERR_PausedRemote)                   The message was sent, but the recipient
  5001.                                            has paused the Messenger service. 
  5002. 2282 (NERR_BadReceive)                     The message was sent but not received.
  5003. 2283 (NERR_NameInUse)                      The message alias is currently in use.
  5004.                                            Try again later.
  5005. 2284 (NERR_MsgNotStarted)                  The Messenger service has not been
  5006.                                            started. 
  5007. 2285 (NERR_NotLocalName)                   The name is not on the local computer. 
  5008. 2286 (NERR_NoForwardName)                  The forwarded message alias cannot be
  5009.                                            found on the network. 
  5010. 2287 (NERR_RemoteFull)                     The message alias table on the remote
  5011.                                            station is full.
  5012. 2288 (NERR_NameNotForwarded)               Messages for this alias are not cur-
  5013.                                            rently being forwarded. 
  5014. 2289 (NERR_TruncatedBroadcast)             The broadcast message was truncated. 
  5015. 2294 (NERR_InvalidDevice)                  This is an invalid devicename. 
  5016. 2295 (NERR_WriteFault)                     A write fault occurred.
  5017. 2297 (NERR_DuplicateName)                  A duplicate message alias exists on the
  5018.                                            local-area network. 
  5019. 2298 (NERR_DeleteLater)                    This message alias will be deleted
  5020.                                            later. 
  5021. 2299 (NERR_IncompleteDel)                  The message alias was not successfully
  5022.                                            deleted from all networks. 
  5023. 2300 (NERR_MultipleNets)                   This operation is not supported on
  5024.                                            machines with multiple networks. 
  5025.  
  5026. Server API related error codes 
  5027. 2310 (NERR_NetNameNotFound)                This shared resource does not exist.
  5028. 2311 (NERR_DeviceNotShared)                This device is not shared. 
  5029. 2312 (NERR_ClientNameNotFound)             A session does not exist with that
  5030.                                            computername. 
  5031. 2314 (NERR_FileIdNotFound)                 There isn't an open file with that ID
  5032.                                            number. 
  5033. 2315 (NERR_ExecFailure)                    A failure occurred when executing a
  5034.                                            remote administration command. 
  5035. 2316 (NERR_TmpFile)                        A failure occurred when opening a re-
  5036.                                            mote temporary file.
  5037. 2317 (NERR_TooMuchData)                    The data returned from a remote admini-
  5038.                                            stration command has been truncated to
  5039.                                            64K. 
  5040. 2318 (NERR_DeviceShareConflict)            This device cannot be shared as both a
  5041.                                            spooled and a non-spooled resource. 
  5042. 2319 (NERR_BrowserTblIncomplete)           The information in the list of servers
  5043.                                            may be incorrect. 
  5044. 2320 (NERR_NotLocalDomain)                 The computer isn't active on this do-
  5045.                                            main. 
  5046.  
  5047. NetErrorLog error codes 
  5048. 2377 (NERR_LogOverflow)                    This log file exceeds the maximum de-
  5049.                                            fined size. 
  5050. 2378 (NERR_LogFileChanged)                 This log file has changed between
  5051.                                            reads. 
  5052. 2379 (NERR_LogFileCorrupt)                 This log file is corrupt. 
  5053.  
  5054. Additional UAS and NETLOGON error codes
  5055. 2450 (NERR_BadUasConfig)                   The user account system database is not
  5056.                                            configured correctly. 
  5057. 2451 (NERR_InvalidUASOp)                   This operation is not permitted when
  5058.                                            the Netlogon service is running. 
  5059. 2452 (NERR_LastAdmin)                      This operation is not allowed on the
  5060.                                            last admin account.
  5061. 2453 (NERR_DCNotFound)                     Unable to find domain controller for
  5062.                                            this domain.
  5063. 2454 (NERR_LogonTrackingError)             Unable to set logon information for
  5064.                                            this user. 
  5065. 2455 (NERR_NetlogonNotStarted)             The Netlogon service has not been star-
  5066.                                            ted. 
  5067. 2456 (NERR_CanNotGrowUASFile)              Unable to grow the user account system
  5068.                                            database. 
  5069. 2458 (NERR_PasswordMismatch)               A password mismatch has been detected. 
  5070.  
  5071. Server error codes.
  5072. 2460 (NERR_NoSuchServer)                   The server ID does not specify a valid
  5073.                                            server. 
  5074. 2461 (NERR_NoSuchSession)                  The session ID does not specify a valid
  5075.                                            session. 
  5076. 2462 (NERR_NoSuchConnection)               The connection ID does not specify a
  5077.                                            valid connection. 
  5078. 2463 (NERR_TooManyServers)                 There is no space for another entry in
  5079.                                            the table of available servers. 
  5080. 2464 (NERR_TooManySessions)                The server has reached the maximum
  5081.                                            number of sessions it supports. 
  5082. 2465 (NERR_TooManyConnections)             The server has reached the maximum
  5083.                                            number of connections it supports. 
  5084. 2466 (NERR_TooManyFiles)                   The server cannot open more files be-
  5085.                                            cause it has reached its maximum num-
  5086.                                            ber. 
  5087. 2467 (NERR_NoAlternateServers)             There are no alternate servers registe-
  5088.                                            red on this server. 
  5089.  
  5090. UPS error codes.
  5091. 2480 (NERR_UPSDriverNotStarted)            The UPS driver could not be accessed by
  5092.                                            the UPS service. 
  5093.