home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dceapref.zip / DCEAPREF.INF (.txt)
OS/2 Help File  |  1998-05-08  |  2MB  |  72,544 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Notices ΓòÉΓòÉΓòÉ
  3.  
  4. Second Edition (June 1996) 
  5.  
  6. The following paragraph does not apply to the United Kingdom or any country 
  7. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  8. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  9. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  10. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  11. do not allow disclaimer of express or implied warranties in certain 
  12. transactions, therefore, this statement may not apply to you. 
  13.  
  14. This publication could include technical inaccuracies or typographical errors. 
  15. Changes are periodically made to the information herein; these changes will be 
  16. incorporated in new editions of the publication. IBM may make improvements 
  17. and/or changes in the product(s) and/or the program(s) described in this 
  18. publication at any time. 
  19.  
  20. It is possible that this publication may contain reference to, or information 
  21. about, IBM products (machines and programs), programming, or services that are 
  22. not announced in your country.  Such references or information must not be 
  23. construed to mean that IBM intends to announce such IBM products, programming, 
  24. or services in your country. 
  25.  
  26. Requests for technical information about IBM products should be made to your 
  27. IBM reseller or IBM marketing representative. 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 1.1. Copyright Notices ΓòÉΓòÉΓòÉ
  31.  
  32. COPYRIGHT LICENSE: This publication contains printed sample application 
  33. programs in source language, which illustrate OS/2 programming techniques. You 
  34. may copy, modify, and distribute these sample programs in any form without 
  35. payment to IBM, for the purposes of developing, using, marketing or 
  36. distributing application programs conforming to the OS/2 application 
  37. programming interface. 
  38.  
  39. Each copy of any portion of these sample programs or any derivative work, which 
  40. is distributed to others, must include a copyright notice as follows: "(C) 
  41. (your company name) (year).  All rights reserved." 
  42.  
  43. (C)Copyright International Business Machines Corporation 1992, 1996.  All 
  44. rights reserved. 
  45. Note to U.S. Government Users - Documentation related to restricted rights - 
  46. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  47. Schedule Contract with IBM Corp. 
  48.  
  49.  
  50. ΓòÉΓòÉΓòÉ 1.2. Disclaimers ΓòÉΓòÉΓòÉ
  51.  
  52. References in this publication to IBM products, programs, or services do not 
  53. imply that IBM intends to make these available in all countries in which IBM 
  54. operates. Any reference to an IBM product, program or service is not intended 
  55. to state or imply that only that IBM product, program, or service may be used. 
  56. Subject to IBM's valid intellectual property or other legally protectable 
  57. rights, any functionally equivalent product, program, or service may be used 
  58. instead of the IBM product, program, or service. The evaluation and 
  59. verification of operation in conjunction with other products, except those 
  60. expressly designated by IBM, are the responsibility of the user. 
  61.  
  62. IBM may have patents or pending patent applications covering subject matter in 
  63. this document. The furnishing of this document does not give you any license to 
  64. these patents. You can send license inquiries, in writing, to: 
  65.  
  66.       IBM Director of Licensing 
  67.       IBM Corporation 
  68.       500 Columbus Avenue 
  69.       Thornwood, NY  10594 
  70.       U.S.A. 
  71.  
  72.  Licensees of this program who wish to have information about it for the 
  73.  purpose of enabling: (i) the exchange of information between independently 
  74.  created programs and other programs (including this one) and (ii) the mutual 
  75.  use of the information which has been exchanged, should contact IBM 
  76.  Corporation, Department LZKS, 11400 Burnet Road, Austin, TX 78758 U.S.A.  Such 
  77.  information may be available, subject to appropriate terms and conditions, 
  78.  including in some cases, payment of a fee. 
  79.  
  80.  Asia-Pacific users can inquire, in writing, to the IBM Director of 
  81.  Intellectual Property and Licensing, IBM World Trade Asia Corporation, 2-31 
  82.  Roppongi 3-chome, Minato-ku, Tokyo 106, Japan. 
  83.  
  84.  
  85. ΓòÉΓòÉΓòÉ 1.3. Trademarks ΓòÉΓòÉΓòÉ
  86.  
  87. The following terms are trademarks of the IBM Corporation in the United States 
  88. or other countries or both: 
  89.  
  90.       AIX 
  91.  
  92.       IBM 
  93.  
  94.       OS/2 
  95.  
  96.  The following terms are trademarks of other companies: 
  97.  
  98.  OSF       Open Software Foundation 
  99.  
  100.  UNIX      Registered trademark in the United States and other countries, 
  101.            licensed exclusively through X/Open Company Limited. 
  102.  
  103.  Other company, product, and service names, which may be denoted by a double 
  104.  asterisk (**), may be trademarks or service marks of others. 
  105.  
  106.  
  107. ΓòÉΓòÉΓòÉ 2. How This Book is Organized ΓòÉΓòÉΓòÉ
  108.  
  109. This reference is organized in sections according to the Distributed Computing 
  110. Environment (DCE) component technologies. The sections are as follows: 
  111.  
  112.    1. The DCE Routines describes the routines used to return information based 
  113.       on the contents of the local DCE configuration file. 
  114.  
  115.    2. The DCE Threads API describes a set of routines that you can call to 
  116.       create a multithreaded program. 
  117.  
  118.    3. The DCE Remote Procedure Call API describes the Remote Procedure Call 
  119.       (RPC) Application Programming Interface (API). 
  120.  
  121.    4. Directory Service API describes the Directory Service routines and header 
  122.       files. 
  123.  
  124.    5. The DCE Distributed Time Service API describes the Distributed Time 
  125.       Service (DTS), which allows you to obtain and manipulate timestamps. 
  126.  
  127.    6. DCE Security Services API describes the Security Services API, which 
  128.       allows you to create network services that can access the authentication 
  129.       and authorization capabilities of DCE Security. 
  130.  
  131.    7. DCE Event Management Service API describes the Event Management Service 
  132.       (EMS) routines. 
  133.  
  134.    8. DCE SNMP Management Information Base describes Simple Network Management 
  135.       Protocol (SNMP) information. 
  136.  
  137.  
  138. ΓòÉΓòÉΓòÉ 3. The DCE Routines ΓòÉΓòÉΓòÉ
  139.  
  140. The DCE routines provide several facilities that are applicable across more 
  141. than one DCE component. They can be divided into the following major areas: 
  142.  
  143.  The DCE C Runtime Routines These routines are used only on the OS/2 platform. 
  144.                      They are entry points within the DCE Dynamic Link 
  145.                      Libraries (DLLs) that call C runtime routines bound into 
  146.                      the DCE DLLs. 
  147.  
  148.  The DCE ACL Interface Routines These routines enable servers to perform 
  149.                      DCE-conformant authorization checks at runtime. This ACL 
  150.                      Library provides an implementation of the ACL Manager 
  151.                      Interface and the ACL Network Interface. It supports 
  152.                      development of ACL managers for DCE servers. 
  153.  
  154.  The DCE Attribute Interface API These routines allow applications to define 
  155.                      and access attribute types (schema entries) in a schema of 
  156.                      your choice. They are based on the Extended Registry 
  157.                      Attribute (ERA) interface, which defines and accesses 
  158.                      attribute types in the register database schema. 
  159.  
  160.  DCE Audit API       The DCE Audit API allows applications to perform auditing 
  161.                      and to analyze audit trails. 
  162.  
  163.  The DCE Configuration Routines These routines return information based on the 
  164.                      contents of the local DCE configuration file, which is 
  165.                      created during the DCE cell-configuration or 
  166.                      machine-configuration process. 
  167.  
  168.  The DCE Backing Store Interface These routines allow you to maintain typed 
  169.                      data between program invocations. The backing store 
  170.                      routines can be used in servers, in clients, or in 
  171.                      stand-alone programs that do not involve remote procedure 
  172.                      calls (RPC). 
  173.  
  174.  The DCE Messaging Interface These routines give you access to message 
  175.                      catalogs, to specific message texts and message IDs, and 
  176.                      to in-memory message tables. 
  177.  
  178.  The DCE Server Routines These routines are used by servers to register 
  179.                      themselves with DCE. This includes RPC runtime, the local 
  180.                      endpoint mapper, and the namespace. Routines are also 
  181.                      available to set up DCE security so that servers can 
  182.                      receive and invoke authenticated RPCs. 
  183.  
  184.  The DCE Serviceability Interface These routines are intended for use by 
  185.                      servers that export the serviceability interface defined 
  186.                      in service.idl. There is also a set of DCE serviceability 
  187.                      macros can be used for diagnostic purposes, and to create 
  188.                      a serviceability handle. 
  189.  
  190.                      For information about the individual DCE serviceability 
  191.                      macros, see The DCE Serviceability Macros. 
  192.  
  193.  The DCE Host Daemon Routines These routines give management applications 
  194.                      remote access to various data, servers, and services on 
  195.                      DCE hosts. 
  196.  
  197.  
  198. ΓòÉΓòÉΓòÉ 3.1. The DCE C Runtime Routines ΓòÉΓòÉΓòÉ
  199.  
  200. The DCE dce_free Routine 
  201.  
  202. The dce_free routine is used to free allocated memory. A number of DCE routines 
  203. allocate memory using the C runtime routine malloc. When these routines are 
  204. finished with the allocated memory, they need to be followed with a routine to 
  205. free the memory. Typically, this is done by calling the C free routine. 
  206. However, on OS/2 platforms, unpredictable results can occur using free. The 
  207. reason is that the DCE routines that allocate the memory use the version of the 
  208. C runtime that is bound into the DCE Dynamic Link Libraries (DLLs). But, the 
  209. application that frees the memory uses whatever C runtime to which it is 
  210. linked. Therefore, you must use the dce_free routine to replace the standard C 
  211. free routine. The dce_free routine is an entry point within the DCE DLLs that 
  212. call the C free routine. 
  213.  
  214. For more information about the use of this routine and a list of the routines 
  215. that must be followed by a call to dce_free, see dce_free. 
  216.  
  217. The DCE dce_getenv and dce_putenv Routines 
  218.  
  219. The dce_getenv routine is used to obtain DCE environment variable values. The 
  220. dce_putenv routine is used to modify or add environment variables in the DCE 
  221. environment string. Typically, this is done by calling the getenv and putenv C 
  222. runtime routines. The C runtime has a buffer where the environment string is 
  223. stored. However, on OS/2 platforms, DCE uses the version of the C runtime that 
  224. is bound into the DCE Dynamic Link Libraries (DLLs). But, the application uses 
  225. whatever C runtime (whose getenv and putenv use a different buffer) to which it 
  226. is bound. In order to access variables in the DCE environment string, 
  227. applications must use the dce_getenv and dce_putenv to replace the standard C 
  228. getenv and putenv routines. The dce_getenv and dce_putenv routines are entry 
  229. points within the DCE DLLs that call the C getenv and putenv routines, 
  230. respectively. 
  231.  
  232.  
  233. ΓòÉΓòÉΓòÉ 3.1.1. dce_free ΓòÉΓòÉΓòÉ
  234.  
  235.  Purpose 
  236.  
  237.           Frees memory allocated by DCE routines. 
  238.  
  239.  Format 
  240.  
  241.                     #include <dce\dcefree.h>
  242.  
  243.                     void dce_free(
  244.                             void *ptr);
  245.  
  246.  Parameters 
  247.  
  248.           Input 
  249.  
  250.           ptr           The block of storage to be freed. This block of storage 
  251.                         must have been allocated by a call to one of the DCE 
  252.                         routines listed in Usage. 
  253.  
  254.  Usage 
  255.  
  256.           The dce_free routine is used on the OS/2 platforms to free memory 
  257.           allocated by the following DCE routines: 
  258.  
  259.                dce_msg_get 
  260.                dce_msg_get_msg 
  261.                dce_sprintf 
  262.                dce_pgm_sprintf 
  263.                dce_aud_print 
  264.                dce_cf_find_name_by_key 
  265.                dce_cf_get_cell_name 
  266.                dce_cf_get_host_name 
  267.                dce_cf_dced_entry_from_host 
  268.                dce_cf_get_csrgy_filename 
  269.                dce_db_header_fetch 
  270.  
  271.  Notes 
  272.  
  273.           This routine is not a general routine for freeing memory, nor is it a 
  274.           replacement for other DCE routines that free memory (for example, 
  275.           rpc_string_free). 
  276.  
  277.           Because dce_free is only used on OS/2, you should make sure that any 
  278.           calls to dce_free are within the bounds of an #ifdef for portability. 
  279.  
  280.  Examples 
  281.  
  282.           This example shows the use of dce_free within an #ifdef. 
  283.  
  284.                         #ifdef OS2
  285.                         dce_free (ptr);
  286.                         #else
  287.                         free (ptr);
  288.                         #endif
  289.  
  290.           Another approach is: 
  291.  
  292.                         #ifndef OS2
  293.                         #define dce_free
  294.                         #endif
  295.  
  296.  Related Information 
  297.  
  298.           Routines: 
  299.           dce_msg_get 
  300.           dce_msg_get_msg 
  301.           dce_sprintf 
  302.           dce_pgm_sprintf 
  303.           dce_aud_print 
  304.           dce_cf_find_name_by_key 
  305.           dce_cf_get_cell_name 
  306.           dce_cf_get_host_name 
  307.           dce_cf_dced_entry_from_host 
  308.           dce_cf_get_csrgy_filename 
  309.           dce_db_header_fetch 
  310.  
  311.  
  312. ΓòÉΓòÉΓòÉ 3.1.2. dce_getenv ΓòÉΓòÉΓòÉ
  313.  
  314.  Purpose 
  315.  
  316.           Enables the application to obtain the string value of a variable name 
  317.           from the DCE environment string. 
  318.  
  319.  Format 
  320.  
  321.                     #include <dce\dcegetenv.h>
  322.  
  323.                     char * dce_getenv(
  324.                             const char *varname);
  325.  
  326.  Parameters 
  327.  
  328.           Input 
  329.  
  330.           varname       A character string that is the variable name in the DCE 
  331.                         environment string whose value the application is 
  332.                         trying to obtain. 
  333.  
  334.  Usage 
  335.  
  336.           The dce_getenv routine is used only on the OS/2 platforms to retrieve 
  337.           values of DCE environment variables from the DCE environment string. 
  338.           As a result, you should make sure that any calls to dce_getenv are 
  339.           within the bounds of an #ifdef for portability. 
  340.  
  341.  Examples 
  342.  
  343.           This example shows the use of dce_getenv within an #ifdef. 
  344.  
  345.                         #ifdef OS2
  346.                         ptr = dce_getenv ("TRY_PE_SITE");
  347.                         #else
  348.                         rc = getenv ("TRY_PE_SITE");
  349.                         #endif
  350.  
  351.  Return Codes 
  352.  
  353.           This routine returns a pointer to the character string value of the 
  354.           variable name if found in the DCE environment string. If varname was 
  355.           not found in the DCE environment string, the routine sets the pointer 
  356.           to NULL. 
  357.  
  358.  
  359. ΓòÉΓòÉΓòÉ 3.1.3. dce_putenv ΓòÉΓòÉΓòÉ
  360.  
  361.  Purpose 
  362.  
  363.           Enables the application to modify DCE environment variables or place 
  364.           additional variables into the DCE environment string. 
  365.  
  366.  Format 
  367.  
  368.                     #include <dce\dceputenv.h>
  369.  
  370.                     int dce_putenv(
  371.                            const char *string);
  372.  
  373.  Parameters 
  374.  
  375.           Input 
  376.  
  377.           string        A character string of the format varname=varstring 
  378.                         where varname is the name of the environment variable 
  379.                         to be added or modified and varstring is the value of 
  380.                         the variable. 
  381.  
  382.  Usage 
  383.  
  384.           The dce_putenv routine is used only on OS/2 platforms to modify 
  385.           existing DCE environment variables or add environment variables to 
  386.           the DCE environment string. As a result, you should make sure that 
  387.           any calls to dce_putenv are within the bounds of an #ifdef for 
  388.           portability. 
  389.  
  390.  Return Codes 
  391.  
  392.           On successful completion the routine returns 0. Otherwise, it returns 
  393.           -1. 
  394.  
  395.  Examples 
  396.  
  397.           This example shows the use of dce_putenv within an #ifdef. 
  398.  
  399.                         #ifdef OS2
  400.                         rc = dce_putenv ("TRY_PE_SITE=1");
  401.                         #else
  402.                         rc = putenv ("TRY_PE_SITE=1");
  403.                         #endif
  404.  
  405.  
  406. ΓòÉΓòÉΓòÉ 3.2. The DCE ACL Interface Routines ΓòÉΓòÉΓòÉ
  407.  
  408. The ACL Library API, dce_acl_xxx, is a local interface that provides the 
  409. server-side implementation of the ACL network interface. 
  410.  
  411. The ACL library consists of the following parts: 
  412.  
  413.    o  Initialization routine 
  414.  
  415.       An ACL manager calls the following routine to initialize and define 
  416.       objects: 
  417.  
  418.            dce_acl_register_object_type               Registers an object type, 
  419.                                                       once for each type of 
  420.                                                       object that the server 
  421.                                                       manages. 
  422.  
  423.    o  Server queries 
  424.  
  425.       The ACL library provides several routines to automate the most common 
  426.       uses of DCE ACLs: 
  427.  
  428.            dce_acl_inq_client_permset                Returns client 
  429.                                                      permissions, corresponding 
  430.                                                      to an ACL. 
  431.  
  432.            dce_acl_inq_client_creds                  Returns client 
  433.                                                      credentials. 
  434.  
  435.            dce_acl_inq_permset_for_creds             Determines a client's 
  436.                                                      complete extent of access 
  437.                                                      to an object. 
  438.  
  439.            dce_acl_inq_acl_from_header               Retrieves the UUID of an 
  440.                                                      ACL from the header of an 
  441.                                                      object in the backing 
  442.                                                      store. 
  443.  
  444.            dce_acl_inq_prin_and_group                Inquires for the principal 
  445.                                                      and group of an RPC 
  446.                                                      caller. 
  447.  
  448.            dce_acl_is_client_authorized              Checks whether client 
  449.                                                      credentials are 
  450.                                                      authenticated, and if so, 
  451.                                                      that they grant the 
  452.                                                      desired access. 
  453.  
  454.            dce_acl_is_unauthenticated                Checks whether credentials 
  455.                                                      are unauthenticated. 
  456.  
  457.    o  Creating ACL objects 
  458.  
  459.       The following convenience routines can be used by an application 
  460.       programmer to create ACL objects in other servers or clients: 
  461.  
  462.            dce_acl_copy_acl                             Copies an ACL. 
  463.  
  464.            dce_acl_obj_init                             Initializes an ACL for 
  465.                                                         an object. 
  466.  
  467.            dce_acl_obj_free_entries                     Frees space used by ACL 
  468.                                                         entries. 
  469.  
  470.            dce_acl_obj_add_user_entry                   Adds permissions for a 
  471.                                                         user ACL entry to the 
  472.                                                         given ACL. 
  473.  
  474.            dce_acl_obj_add_group_entry                  Adds permissions for a 
  475.                                                         group ACL entry to the 
  476.                                                         given ACL. 
  477.  
  478.            dce_acl_obj_add_id_entry                     Adds permissions for an 
  479.                                                         ACL entry to the given 
  480.                                                         ACL. 
  481.  
  482.            dce_acl_obj_add_unauth_entry                 Adds permissions for an 
  483.                                                         "unauthenticated" ACL 
  484.                                                         entry to the given ACL. 
  485.  
  486.            dce_acl_obj_add_obj_entry                    Adds permissions for an 
  487.                                                         "obj" ACL entry to the 
  488.                                                         given ACL. 
  489.  
  490.            dce_acl_obj_add_foreign_entry                Adds permissions for 
  491.                                                         the ACL entry for a 
  492.                                                         foreign user or group 
  493.                                                         to the given ACL. 
  494.  
  495.            dce_acl_obj_add_any_other_entry              Adds permissions for 
  496.                                                         the "any_other" ACL 
  497.                                                         entry to a given ACL. 
  498.  
  499.    o  Implementing rdacl 
  500.  
  501.       In order to implement the rdacl interface, the server must register the 
  502.       rdacl interface with the RPC runtime and with the endpoint mapper. The 
  503.       server must provide a resolution routine that maps the rdacl parameters 
  504.       into the UUID of the desired ACL object. The library includes two such 
  505.       routines: 
  506.  
  507.            dce_acl_resolve_by_name          Finds an ACL's UUID, given an 
  508.                                             object name. 
  509.  
  510.            dce_acl_resolve_by_uuid          Finds an ACL's UUID, given an 
  511.                                             object UUID. 
  512.  
  513.          For situations in which neither of these resolver routines is 
  514.          appropriate, application developers must provide their own. 
  515.  
  516.  
  517. ΓòÉΓòÉΓòÉ 3.2.1. dce_acl_copy_acl ΓòÉΓòÉΓòÉ
  518.  
  519.  Purpose 
  520.  
  521.           Copies an ACL. 
  522.  
  523.  Format 
  524.  
  525.                     #include <dce\dce.h>
  526.                     #include <dce\aclif.h>
  527.  
  528.                     void dce_acl_copy_acl(
  529.                             sec_acl_t  *source,
  530.                             sec_acl_t  *target,
  531.                             error_status_t  *status);
  532.  
  533.  Parameters 
  534.  
  535.           Input 
  536.  
  537.           source        A pointer to the ACL to be copied. 
  538.  
  539.           target        A pointer to the new ACL that is to receive the copy. 
  540.  
  541.           Output 
  542.  
  543.           status        A pointer to the completion status.  On successful 
  544.                         completion, the routine returns error_status_ok. 
  545.                         Otherwise, it returns rpc_s_no_memory, which indicates 
  546.                         that the rpc_sm_allocate routine could not obtain 
  547.                         memory. 
  548.  
  549.  Usage 
  550.  
  551.           The dce_acl_copy_acl routine makes a copy of a specified ACL. The 
  552.           caller passes the space for the target ACL, but the space for the 
  553.           sec_acl_entries array is allocated. To free the allocated space, call 
  554.           dce_acl_obj_free_entries, which frees the entries, but not the ACL 
  555.           itself. 
  556.  
  557.  Related Information 
  558.  
  559.           Routines: 
  560.           dce_acl_obj_free_entries 
  561.  
  562.  
  563. ΓòÉΓòÉΓòÉ 3.2.2. dce_acl_inq_acl_from_header ΓòÉΓòÉΓòÉ
  564.  
  565.  Purpose 
  566.  
  567.           Retrieves the UUID of an ACL from an item's header in a backing 
  568.           store. 
  569.  
  570.  Format 
  571.  
  572.                     #include <dce\dce.h>
  573.                     #include <dce\aclif.h>
  574.  
  575.                     void dce_acl_inq_acl_from_header(
  576.                             dce_db_header_t  db_header,
  577.                             sec_acl_type_t  sec_acl_type,
  578.                             uuid_t  *acl_uuid,
  579.                             error_status_t  *status);
  580.  
  581.  Parameters 
  582.  
  583.           Input 
  584.  
  585.           db_header                The backing store header containing the ACL 
  586.                                    object. 
  587.  
  588.           sec_acl_type             The type of ACL to be identified: 
  589.                                    sec_acl_type_object, 
  590.                                    sec_acl_type_default_object, or 
  591.                                    sec_acl_type_default_container. 
  592.  
  593.           Output 
  594.  
  595.           acl_uuid                 A pointer to the UUID of the ACL object. 
  596.  
  597.           status                   A pointer to the completion status.  On 
  598.                                    successful completion, the routine returns 
  599.                                    error_status_ok. Otherwise, it returns one 
  600.                                    of the following errors: 
  601.  
  602.                                         db_s_key_not_found The specified key 
  603.                                              was not found in the backing 
  604.                                              store.  (This error is passed 
  605.                                              through from dce_db_fetch.) 
  606.  
  607.                                         db_s_bad_index_type The key's type is 
  608.                                              wrong, or else the backing store 
  609.                                              is not indexed by name or by UUID. 
  610.                                              (This error is passed through from 
  611.                                              dce_db_fetch.) 
  612.  
  613.                                         sec_acl_invalid_type The sec_acl_type 
  614.                                              parameter does not contain a valid 
  615.                                              type. 
  616.  
  617.  Usage 
  618.  
  619.           The dce_acl_inq_acl_from_header routine gets the UUID for an ACL 
  620.           object of the specified type from the specified backing store header. 
  621.  
  622.  Related Information 
  623.  
  624.           Routines: 
  625.           dce_acl_resolve_by_name 
  626.           dce_acl_resolve_by_uuid 
  627.  
  628.  
  629. ΓòÉΓòÉΓòÉ 3.2.3. dce_acl_inq_client_creds ΓòÉΓòÉΓòÉ
  630.  
  631.  Purpose 
  632.  
  633.           Returns the client's credentials. 
  634.  
  635.  Format 
  636.  
  637.                     #include <dce\dce.h>
  638.                     #include <dce\aclif.h>
  639.  
  640.                     void dce_acl_inq_client_creds(
  641.                             handle_t  handle,
  642.                             rpc_authz_cred_handle_t  *creds,
  643.                             error_status_t  *status);
  644.  
  645.  Parameters 
  646.  
  647.           Input 
  648.  
  649.           handle        The remote procedure call binding handle. 
  650.  
  651.           Output 
  652.  
  653.           creds         The address of an rpc_authz_cred_handle_t structure in 
  654.                         which to return the client's credentials, or NULL if 
  655.                         unauthorized. 
  656.  
  657.           status        A pointer to the completion status. On successful 
  658.                         completion, the routine returns error_status_ok. 
  659.                         Otherwise, it returns one of the following errors: 
  660.  
  661.                              rpc_s_authn_authz_mismatch Either the client, or 
  662.                                   the server, or both is not using the 
  663.                                   rpc_c_authz_dce authorization service. 
  664.  
  665.                              rpc_s_invalid_binding Invalid RPC binding handle. 
  666.  
  667.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  668.                                   for the operation. 
  669.  
  670.                              rpc_s_binding_has_no_auth Binding has no 
  671.                                   authentication information.  The client or 
  672.                                   the server should have called 
  673.                                   rpc_binding_set_auth_info. 
  674.  
  675.  Usage 
  676.  
  677.           The dce_acl_inq_client_creds routine returns the client's security 
  678.           credentials found through the RPC binding handle. 
  679.  
  680.  Related Information 
  681.  
  682.           Routines: 
  683.           dce_acl_inq_client_permset 
  684.           dce_acl_inq_permset_for_creds 
  685.           dce_acl_register_object_type 
  686.  
  687.  
  688. ΓòÉΓòÉΓòÉ 3.2.4. dce_acl_inq_client_permset ΓòÉΓòÉΓòÉ
  689.  
  690.  Purpose 
  691.  
  692.           Returns the client's permissions corresponding to an ACL. 
  693.  
  694.  Format 
  695.  
  696.                     #include <dce\dce.h>
  697.                     #include <dce\aclif.h>
  698.  
  699.                     void dce_acl_inq_client_permset(
  700.                             handle_t  handle,
  701.                             uuid_t  *mgr_type,
  702.                             uuid_t  *acl_uuid,
  703.                             sec_acl_permset_t  *permset,
  704.                             error_status_t  *status);
  705.  
  706.  Parameters 
  707.  
  708.           Input 
  709.  
  710.           handle        The remote procedure call binding handle. 
  711.  
  712.           mgr_type      A pointer to the UUID identifying the type of the ACL 
  713.                         manager in question.  There may be more than one type 
  714.                         of ACL manager protecting the object whose ACL is bound 
  715.                         to the input handle.  Use this parameter to distinguish 
  716.                         them. 
  717.  
  718.           acl_uuid      A pointer to the UUID of the ACL. 
  719.  
  720.           Output 
  721.  
  722.           permset       The set of permissions allowed to the client. 
  723.  
  724.           status        A pointer to the completion status.  On successful 
  725.                         completion, the routine returns error_status_ok. 
  726.                         Otherwise, it returns acl_s_bad_manager_type, which 
  727.                         indicates that the mgr_type parameter does not match 
  728.                         the manager type in the ACL itself. 
  729.  
  730.  Usage 
  731.  
  732.           The dce_acl_inq_client_permset routine returns the client's 
  733.           permissions that correspond to the ACL. It finds the ACL in the 
  734.           database as defined for this ACL manager type with 
  735.           dce_acl_register_object_type. The client's credentials are determined 
  736.           from the binding handle. The ACL and credentials determine the 
  737.           permission set. 
  738.  
  739.  Related Information 
  740.  
  741.           Routines: 
  742.           dce_acl_inq_client_creds 
  743.           dce_acl_inq_permset_for_creds 
  744.           dce_acl_register_object_type 
  745.  
  746.  
  747. ΓòÉΓòÉΓòÉ 3.2.5. dce_acl_inq_permset_for_creds ΓòÉΓòÉΓòÉ
  748.  
  749.  Purpose 
  750.  
  751.           Determines a principal's complete extent of access to an object. 
  752.  
  753.  Format 
  754.  
  755.                     #include <dce\dce.h>
  756.                     #include <dce\aclif.h>
  757.  
  758.                     void dce_acl_inq_permset_for_creds(
  759.                             rpc_authz_cred_handle_t  creds,
  760.                             sec_acl_t  *ap,
  761.                             uuid_t  *owner_id,
  762.                             uuid_t  *group_id,
  763.                             sec_acl_posix_semantics_t  posix_semantics,
  764.                             sec_acl_permset_t  *perms,
  765.                             error_status_t  *status);
  766.  
  767.  Parameters 
  768.  
  769.           Input 
  770.  
  771.           creds         The security credentials that represent the principal. 
  772.  
  773.           ap            The ACL that represents the object. 
  774.  
  775.           owner_id      Identifies the owner of the object that is protected by 
  776.                         the specified ACL. If the sec_acl_e_type_user_obj ACLE 
  777.                         (ACL entry) exists, then the owner_id (uuid_t pointer) 
  778.                         cannot be NULL. If it is, then the error 
  779.                         sec_acl_expected_user_obj is returned. 
  780.  
  781.           group_id      Identifies the group that the object that is protected 
  782.                         by the specified ACL belongs to. If a 
  783.                         sec_acl_e_type_group_obj ACLE exists, the group_id 
  784.                         (uuid_t pointer) cannot be NULL. If it is, the error 
  785.                         sec_acl_expected_group_obj is returned. 
  786.  
  787.           posix_semantics This parameter is currently unused in OSF 
  788.                         implementation. 
  789.  
  790.           Output 
  791.  
  792.           perms         A bit mask containing a bit with a value of 1 for each 
  793.                         permission granted by the ACL and 0 bits elsewhere. 
  794.  
  795.           status        A pointer to the completion status.  On successful 
  796.                         completion, the routine returns error_status_ok. 
  797.  
  798.  Usage 
  799.  
  800.           The dce_acl_inq_permset_for_creds routine returns a principal's 
  801.           "complete extent of access" to some object. This routine is useful 
  802.           for implementing operations such as the conventional UNIX access 
  803.           function. 
  804.  
  805.           The values allowed for the credentials representing the principal 
  806.           include NULL or unauthenticated. 
  807.  
  808.           The routine normally returns TRUE, even when the access permissions 
  809.           are determined to be all 0 bits (dce_acl_c_no_permissions). It 
  810.           returns FALSE only on illogical error conditions (such as unsupported 
  811.           ACL Entry types), in which case the status output gets the error 
  812.           status code and the perms is set to dce_acl_c_no_permissions. 
  813.  
  814.           The following ACL entry types (of type sec_acl_entry_type_t) are 
  815.           supported by this routine. The categories are checked in the order 
  816.           shown. 
  817.  
  818.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  819.                     Γöé ACL ENTRY TYPE         Γöé MEANING                Γöé
  820.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  821.                     Γöé sec_acl_e_type_user      Γöé At most, one can match.        Γöé
  822.                     Γöé sec_acl_e_type_foreign_user  Γöé                    Γöé
  823.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  824.                     Γöé sec_acl_e_type_group      Γöé The union of all permissions for   Γöé
  825.                     Γöé sec_acl_e_type_foreign_group  Γöé each matching group.         Γöé
  826.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  827.                     Γöé sec_acl_e_type_other_obj    Γöé Matching local realm accesses.    Γöé
  828.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  829.                     Γöé sec_acl_e_type_foreign_other  Γöé At most, one can match.        Γöé
  830.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  831.                     Γöé sec_acl_e_type_any_other    Γöé Anything not in the other types.   Γöé
  832.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  833.                     Γöé sec_acl_e_type_unauthenticatedΓöé The sec_acl_e_type_unauthenticated  Γöé
  834.                     Γöé                Γöé type is a mask that is used for all  Γöé
  835.                     Γöé                Γöé matches on unauthenticated creden-  Γöé
  836.                     Γöé                Γöé tials.  It is also intersected with  Γöé
  837.                     Γöé                Γöé sec_acl_e_type_any_other for NULL   Γöé
  838.                     Γöé                Γöé credentials.             Γöé
  839.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  840.  
  841.           Note:  The meanings of the permission bits have no effect on the 
  842.                  action of the dce_acl_inq_permset_for_creds routine. The 
  843.                  interpretation of the bits is left entirely to the 
  844.                  application. 
  845.  
  846.  Related Information 
  847.  
  848.           Routines: 
  849.           dce_acl_inq_client_creds 
  850.           dce_acl_inq_client_permset 
  851.           dce_acl_register_object_type 
  852.  
  853.  
  854. ΓòÉΓòÉΓòÉ 3.2.6. dce_acl_inq_prin_and_group ΓòÉΓòÉΓòÉ
  855.  
  856.  Purpose 
  857.  
  858.           Gets the principal and group of an RPC caller. 
  859.  
  860.  Format 
  861.  
  862.                     #include <dce\dce.h>
  863.                     #include <dce\aclif.h>
  864.  
  865.                     void dce_acl_inq_prin_and_group(
  866.                             handle_t  handle,
  867.                             uuid_t  *principal,
  868.                             uuid_t  *group,
  869.                             error_status_t  *status);
  870.  
  871.  Parameters 
  872.  
  873.           Input 
  874.  
  875.           handle        The remote procedure call binding handle. 
  876.  
  877.           Output 
  878.  
  879.           principal     The UUID of the principal of the caller of the RPC. 
  880.  
  881.           group         The UUID of the group of the caller of the RPC. 
  882.  
  883.           status        A pointer to the completion status. On successful 
  884.                         completion, the routine returns error_status_ok. 
  885.                         Otherwise, it returns an error. 
  886.  
  887.                         The dce_acl_inq_prin_and_group routine can return 
  888.                         errors from dce_acl_inq_client_creds, 
  889.                         sec_cred_get_initiator, and sec_cred_get_pa_data. It 
  890.                         generates no error messages of its own. 
  891.  
  892.  Usage 
  893.  
  894.           The dce_acl_inq_prin_and_group routine finds the principal and group 
  895.           of the caller of a remote procedure call. This information is useful 
  896.           for filling in the owner_id and group_id fields of standard data or 
  897.           object headers.  Setting the owner and group makes sense only if your 
  898.           ACL manager handles owners and groups, which you specify with the 
  899.           dce_acl_c_has_owner and dce_acl_c_has_groups flags to 
  900.           dce_acl_register_object_type. 
  901.  
  902.           If the caller is unauthenticated, the principal and group are filled 
  903.           with the NIL UUID, generated through uuid_create_nil. 
  904.  
  905.  Examples 
  906.  
  907.                     dce_db_std_header_init(db, &data, ..., &st);
  908.                     dce_acl_inq_prin_and_group(h, &data.h.owner_id,
  909.                             &data.h.group_id, &st);
  910.  
  911.  Related Information 
  912.  
  913.           Routines: 
  914.           dce_acl_register_object_type 
  915.  
  916.  
  917. ΓòÉΓòÉΓòÉ 3.2.7. dce_acl_is_client_authorized ΓòÉΓòÉΓòÉ
  918.  
  919.  Purpose 
  920.  
  921.           Checks whether the client credentials are authenticated. 
  922.  
  923.  Format 
  924.  
  925.                     #include <dce\dce.h>
  926.                     #include <dce\aclif.h>
  927.  
  928.                     void dce_acl_is_client_authorized(
  929.                             handle_t  handle,
  930.                             uuid_t  *mgr_type,
  931.                             uuid_t  *acl_uuid,
  932.                             uuid_t  *owner_id,
  933.                             uuid_t  *group_id,
  934.                             sec_acl_permset_t  desired_perms,
  935.                             boolean32  *authorized,
  936.                             error_status_t  *status);
  937.  
  938.  Parameters 
  939.  
  940.           Input 
  941.  
  942.           handle        The client binding handle. 
  943.  
  944.           mgr_type      A pointer to the UUID identifying the type of the ACL 
  945.                         manager in question.  There may be more than one type 
  946.                         of ACL manager protecting the object whose ACL is bound 
  947.                         to the input handle.  Use this parameter to distinguish 
  948.                         them. 
  949.  
  950.           acl_uuid      A pointer to the UUID of the ACL. 
  951.  
  952.           owner_id      Identifies the owner of the object that is protected by 
  953.                         the specified ACL. If the sec_acl_e_type_user_obj ACLE 
  954.                         (ACL entry) exists, then the owner_id (uuid_t pointer) 
  955.                         cannot be NULL. If it is, then the error 
  956.                         sec_acl_expected_user_obj is returned. 
  957.  
  958.           group_id      Identifies the group in which the object that is 
  959.                         protected by the specified ACL belongs. If a 
  960.                         sec_acl_e_type_group_obj ACLE exists, the group_id 
  961.                         (uuid_t pointer) cannot be NULL. If it is, the error 
  962.                         sec_acl_expected_group_obj is returned. 
  963.  
  964.           desired_perms A permission set containing the desired privileges. 
  965.                         This is a 32-bit set of permission flags. The flags can 
  966.                         represent the conventional file system permissions 
  967.                         (read, write, and execute), the extended AFS 
  968.                         permissions (owner, insert, and delete), or some other 
  969.                         permissions supported by the specific application ACL 
  970.                         manager. For example, a bit that is unused for file 
  971.                         system permissions can mean withdrawals are allowed for 
  972.                         a bank ACL manager, while it can mean matrix inversions 
  973.                         are allowed for a CPU ACL manager. The mgr_type 
  974.                         identifies the semantics of the bits. 
  975.  
  976.           Output 
  977.  
  978.           authorized    A pointer to the TRUE or FALSE return value of the 
  979.                         routine. 
  980.  
  981.           status        A pointer to the completion status. On successful 
  982.                         completion, the routine returns error_status_ok. 
  983.                         Otherwise, it returns acl_s_bad_manager_type, which 
  984.                         indicates that the mgr_type does not match the manager 
  985.                         type in the ACL itself. 
  986.  
  987.  Usage 
  988.  
  989.           The dce_acl_is_client_authorized routine returns TRUE in the 
  990.           authorized parameter if, and only if, all of the desired permissions 
  991.           (represented as bits in desired_perms) are included in the actual 
  992.           permissions corresponding to the handle, the mgr_type, and the 
  993.           acl_uuid UUID. Otherwise, the returned value is FALSE. 
  994.  
  995.           Note:  The routine's return value is void. The returned boolean32 
  996.                  value is contained in the authorized parameter. 
  997.  
  998.  
  999. ΓòÉΓòÉΓòÉ 3.2.8. dce_acl_is_unauthenticated ΓòÉΓòÉΓòÉ
  1000.  
  1001.  Purpose 
  1002.  
  1003.                      Checks whether credentials are unauthenticated.
  1004.  
  1005.  Format 
  1006.  
  1007.                     #include <dce/dce.h>
  1008.                     #include <dce/aclif.h>
  1009.  
  1010.                     boolean32 dce_acl_is_unauthenticated(
  1011.                             rpc_authz_cred_handle_t  cred_h);
  1012.  
  1013.  Parameters 
  1014.  
  1015.           Output 
  1016.  
  1017.           cred_h        Returns an opaque handle of type 
  1018.                         rpc_authz_cred_handle_t to the authorization 
  1019.                         information for the client that made the remote 
  1020.                         procedure call on cred_h. The data referenced by this 
  1021.                         parameter is read-only and cannot be modified by the 
  1022.                         server. If the server wants to preserve any of the 
  1023.                         returned data, it must copy the data into 
  1024.                         server-allocated memory. 
  1025.  
  1026.  Usage 
  1027.  
  1028.           The dce_acl_is_unauthenticated routine checks whether credentials are 
  1029.           unauthenticated. The caller is unauthenticated if 
  1030.           rpc_binding_inq_auth_caller returns no_authen. 
  1031.  
  1032.  Related Information 
  1033.  
  1034.           Routines: 
  1035.           rpc_binding_inq_auth_caller 
  1036.  
  1037.  
  1038. ΓòÉΓòÉΓòÉ 3.2.9. dce_acl_obj_add_any_other_entry ΓòÉΓòÉΓòÉ
  1039.  
  1040.  Purpose 
  1041.  
  1042.           Adds permissions for access to a sec_acl_e_type_any_other ACL entry 
  1043.           to a given ACL. 
  1044.  
  1045.  Format 
  1046.  
  1047.                     #include <dce\dce.h>
  1048.                     #include <dce\aclif.h>
  1049.  
  1050.                     void dce_acl_obj_add_any_other_entry(
  1051.                             sec_acl_t  *acl,
  1052.                             sec_acl_permset_t  permset,
  1053.                             error_status_t  *status);
  1054.  
  1055.  Parameters 
  1056.  
  1057.           Input 
  1058.  
  1059.           acl           A pointer to the ACL that is to be modified. 
  1060.  
  1061.           permset       The permissions to be granted for access to the 
  1062.                         sec_acl_e_type_any_other entry. 
  1063.  
  1064.           Output 
  1065.  
  1066.           status        A pointer to the completion status. On successful 
  1067.                         completion, the routine returns error_status_ok. 
  1068.                         Otherwise, it returns the following error: 
  1069.  
  1070.                              sec_acl_cant_allocate_memory The requested 
  1071.                                   operation requires more memory than is 
  1072.                                   available. 
  1073.  
  1074.  Usage 
  1075.  
  1076.           The dce_acl_obj_add_any_other_entry routine adds an ACL entry for 
  1077.           sec_acl_e_type_any_other access to the specified ACL. It is 
  1078.           equivalent to calling the dce_acl_obj_add_obj_entry routine with the 
  1079.           sec_acl_e_type_any_other entry type, but is more convenient. 
  1080.  
  1081.           The data type that stores an ACL has a limited size. Attempting to 
  1082.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  1083.  
  1084.  Related Information 
  1085.  
  1086.           Routines: 
  1087.           dce_acl_obj_add_obj_entry 
  1088.  
  1089.  
  1090. ΓòÉΓòÉΓòÉ 3.2.10. dce_acl_obj_add_foreign_entry ΓòÉΓòÉΓòÉ
  1091.  
  1092.  Purpose 
  1093.  
  1094.           Adds permissions for an ACL entry for a foreign user or group to the 
  1095.           given ACL. 
  1096.  
  1097.  Format 
  1098.  
  1099.                     #include <dce\dce.h>
  1100.                     #include <dce\aclif.h>
  1101.  
  1102.                     void dce_acl_obj_add_foreign_entry(
  1103.                             sec_acl_t  *acl,
  1104.                             sec_acl_entry_type_t  entry_type,
  1105.                             sec_acl_permset_t  permset,
  1106.                             uuid_t  *realm,
  1107.                             uuid_t  *id,
  1108.                             error_status_t  *status);
  1109.  
  1110.  Parameters 
  1111.  
  1112.           Input 
  1113.  
  1114.           acl           A pointer to the ACL that is to be modified. 
  1115.  
  1116.           entry_type    Must be one of the following types: 
  1117.  
  1118.                              sec_acl_e_type_foreign_user 
  1119.                              sec_acl_e_type_foreign_group 
  1120.                              sec_acl_e_type_for_user_deleg 
  1121.                              sec_acl_e_type_for_group_deleg 
  1122.  
  1123.           permset       The permissions to be granted to the foreign group or 
  1124.                         foreign user. 
  1125.  
  1126.           realm         The UUID of the foreign cell. 
  1127.  
  1128.           id            The UUID identifying the foreign group or foreign user. 
  1129.  
  1130.           Output 
  1131.  
  1132.           status        A pointer to the completion status.  On successful 
  1133.                         completion, the routine returns error_status_ok. 
  1134.                         Otherwise, it returns one of the following errors: 
  1135.  
  1136.                              sec_acl_cant_allocate_memory The requested 
  1137.                                   operation requires more memory than is 
  1138.                                   available. 
  1139.  
  1140.                              sec_acl_invalid_entry_type The type specified in 
  1141.                                   entry_type is not one of the four specified 
  1142.                                   types. 
  1143.  
  1144.  Usage 
  1145.  
  1146.           The dce_acl_obj_add_foreign_entry routine adds an ACL entry for 
  1147.           sec_acl_e_type_foreign_xxx access to the specified ACL. 
  1148.  
  1149.           The data type that stores an ACL has a limited size. Attempting to 
  1150.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  1151.  
  1152.  Related Information 
  1153.  
  1154.           Routines: 
  1155.           dce_acl_obj_add_id_entry 
  1156.           sec_id_parse_name 
  1157.  
  1158.  
  1159. ΓòÉΓòÉΓòÉ 3.2.11. dce_acl_obj_add_group_entry ΓòÉΓòÉΓòÉ
  1160.  
  1161.  Purpose 
  1162.  
  1163.           Adds permissions for a group ACL entry to the given ACL. 
  1164.  
  1165.  Format 
  1166.  
  1167.                     #include <dce\dce.h>
  1168.                     #include <dce\aclif.h>
  1169.  
  1170.                     void dce_acl_obj_add_group_entry(
  1171.                             sec_acl_t  *acl,
  1172.                             sec_acl_permset_t  permset,
  1173.                             uuid_t  *group,
  1174.                             error_status_t  *status);
  1175.  
  1176.  Parameters 
  1177.  
  1178.           Input 
  1179.  
  1180.           acl           A pointer to the ACL that is to be modified. 
  1181.  
  1182.           permset       The permissions to be granted to the group. 
  1183.  
  1184.           group         The UUID identifying the group. 
  1185.  
  1186.           Output 
  1187.  
  1188.           status        A pointer to the completion status.  On successful 
  1189.                         completion, the routine returns error_status_ok. 
  1190.                         Otherwise, it returns the following error: 
  1191.  
  1192.                              sec_acl_cant_allocate_memory The requested 
  1193.                                   operation requires more memory than is 
  1194.                                   available. 
  1195.  
  1196.  Usage 
  1197.  
  1198.           The dce_acl_obj_add_group_entry routine adds a group ACL entry to the 
  1199.           given ACL. It is equivalent to calling the dce_acl_obj_add_id_entry 
  1200.           routine with the sec_acl_e_type_group entry type, but is more 
  1201.           convenient. 
  1202.  
  1203.           The data type that stores an ACL has a limited size. Attempting to 
  1204.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  1205.  
  1206.  Related Information 
  1207.  
  1208.           Routines: 
  1209.           dce_acl_obj_add_id_entry 
  1210.  
  1211.  
  1212. ΓòÉΓòÉΓòÉ 3.2.12. dce_acl_obj_add_id_entry ΓòÉΓòÉΓòÉ
  1213.  
  1214.  Purpose 
  1215.  
  1216.           Adds permissions for an ACL entry to the given ACL. 
  1217.  
  1218.  Format 
  1219.  
  1220.                     #include <dce\dce.h>
  1221.                     #include <dce\aclif.h>
  1222.  
  1223.                     void dce_acl_obj_add_id_entry(
  1224.                             sec_acl_t  *acl,
  1225.                             sec_acl_entry_type_t  entry_type,
  1226.                             sec_acl_permset_t  permset,
  1227.                             uuid_t  *id,
  1228.                             error_status_t  *status);
  1229.  
  1230.  Parameters 
  1231.  
  1232.           Input 
  1233.  
  1234.           acl           A pointer to the ACL that is to be modified. 
  1235.  
  1236.           entry_type    Must be one of the following types: 
  1237.  
  1238.                              sec_acl_e_type_user 
  1239.                              sec_acl_e_type_group 
  1240.                              sec_acl_e_type_foreign_other 
  1241.                              sec_acl_e_type_user_deleg 
  1242.                              sec_acl_e_type_group_deleg 
  1243.                              sec_acl_e_type_for_other_deleg 
  1244.  
  1245.           permset       The permissions to be granted that give access to the 
  1246.                         user, group, or foreign_other entry. 
  1247.  
  1248.           id            The UUID identifying the user, group, or foreign_other 
  1249.                         entry to be added. 
  1250.  
  1251.           Output 
  1252.  
  1253.           status        A pointer to the completion status. On successful 
  1254.                         completion, the routine returns error_status_ok. 
  1255.                         Otherwise, it returns one of the following errors: 
  1256.  
  1257.                              sec_acl_cant_allocate_memory The requested 
  1258.                                   operation requires more memory than is 
  1259.                                   available. 
  1260.  
  1261.                              sec_acl_invalid_entry_type The type specified in 
  1262.                                   entry_type is not one of the six specified 
  1263.                                   types. 
  1264.  
  1265.  Usage 
  1266.  
  1267.           The dce_acl_obj_add_id_entry routine adds an ACL entry (user or 
  1268.           group, domestic or foreign) to the given ACL. 
  1269.  
  1270.           The data type that stores an ACL has a limited size. Attempting to 
  1271.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  1272.  
  1273.  Related Information 
  1274.  
  1275.           Routines: 
  1276.           dce_acl_obj_add_group_entry 
  1277.           dce_acl_obj_add_user_entry 
  1278.  
  1279.  
  1280. ΓòÉΓòÉΓòÉ 3.2.13. dce_acl_obj_add_obj_entry ΓòÉΓòÉΓòÉ
  1281.  
  1282.  Purpose 
  1283.  
  1284.           Adds permissions for an object (obj) ACL entry to the given ACL. 
  1285.  
  1286.  Format 
  1287.  
  1288.                     #include <dce\dce.h>
  1289.                     #include <dce\aclif.h>
  1290.  
  1291.                     void dce_acl_obj_add_obj_entry(
  1292.                             sec_acl_t  *acl,
  1293.                             sec_acl_entry_type_t  entry_type,
  1294.                             sec_acl_permset_t  permset,
  1295.                             error_status_t  *status);
  1296.  
  1297.  Parameters 
  1298.  
  1299.           Input 
  1300.  
  1301.           acl           A pointer to the ACL that is to be modified. 
  1302.  
  1303.           entry_type    Must be one of these types: 
  1304.  
  1305.                              sec_acl_e_type_unauthenticated 
  1306.                              sec_acl_e_type_any_other 
  1307.                              sec_acl_e_type_user_obj_deleg 
  1308.                              sec_acl_e_type_group_obj_deleg 
  1309.                              sec_acl_e_type_other_obj_deleg 
  1310.                              sec_acl_e_type_any_other_deleg 
  1311.  
  1312.           permset       The permissions to be granted. 
  1313.  
  1314.           Output 
  1315.  
  1316.           status        A pointer to the completion status.  On successful 
  1317.                         completion, the routine returns error_status_ok. 
  1318.                         Otherwise, it returns one of the following errors: 
  1319.  
  1320.                              sec_acl_invalid_entry_type The type specified in 
  1321.                                   entry_type is not one of the six specified 
  1322.                                   types. 
  1323.  
  1324.                              sec_acl_cant_allocate_memory The requested 
  1325.                                   operation requires more memory than is 
  1326.                                   available. 
  1327.  
  1328.  Usage 
  1329.  
  1330.           The dce_acl_obj_add_obj_entry routine adds an obj ACL entry to the 
  1331.           given ACL. 
  1332.  
  1333.           The data type that stores an ACL has a limited size. Attempting to 
  1334.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  1335.  
  1336.  Related Information 
  1337.  
  1338.           Routines: 
  1339.           dce_acl_obj_add_any_other_entry 
  1340.           dce_acl_obj_add_unauth_entry 
  1341.  
  1342.  
  1343. ΓòÉΓòÉΓòÉ 3.2.14. dce_acl_obj_add_unauth_entry ΓòÉΓòÉΓòÉ
  1344.  
  1345.  Purpose 
  1346.  
  1347.           Adds permissions for an unauthenticated ACL entry to the given ACL. 
  1348.  
  1349.  Format 
  1350.  
  1351.                     #include <dce\dce.h>
  1352.                     #include <dce\aclif.h>
  1353.  
  1354.                     void dce_acl_obj_add_unauth_entry(
  1355.                             sec_acl_t  *acl,
  1356.                             sec_acl_permset_t  permset,
  1357.                             error_status_t  *status);
  1358.  
  1359.  Parameters 
  1360.  
  1361.           Input 
  1362.  
  1363.           acl           A pointer to the ACL that is to be modified. 
  1364.  
  1365.           permset       The permissions to be granted for access to a 
  1366.                         sec_acl_e_type_unauthenticated entry. 
  1367.  
  1368.           Output 
  1369.  
  1370.           status        A pointer to the completion status.  On successful 
  1371.                         completion, the routine returns error_status_ok. 
  1372.                         Otherwise, it returns sec_acl_cant_allocate_memory, 
  1373.                         which indicates that the requested operation requires 
  1374.                         more memory than is available. 
  1375.  
  1376.  Usage 
  1377.  
  1378.           The dce_acl_obj_add_unauth_entry routine adds an ACL entry for access 
  1379.           to a sec_acl_e_type_unauthenticated entry to the given ACL. It is 
  1380.           equivalent to calling the dce_acl_obj_add_obj_entry routine with the 
  1381.           sec_acl_e_type_unauthenticated entry type, but it is more convenient. 
  1382.  
  1383.           The data type that stores an ACL has a limited size. Attempting to 
  1384.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  1385.  
  1386.  Related Information 
  1387.  
  1388.           Routines: 
  1389.           dce_acl_obj_add_obj_entry 
  1390.  
  1391.  
  1392. ΓòÉΓòÉΓòÉ 3.2.15. dce_acl_obj_add_user_entry ΓòÉΓòÉΓòÉ
  1393.  
  1394.  Purpose 
  1395.  
  1396.           Adds permissions for a user ACL entry to the given ACL. 
  1397.  
  1398.  Format 
  1399.  
  1400.                     #include <dce\dce.h>
  1401.                     #include <dce\aclif.h>
  1402.  
  1403.                     void dce_acl_obj_add_user_entry(
  1404.                             sec_acl_t  *acl,
  1405.                             sec_acl_permset_t  permset,
  1406.                             uuid_t  *user,
  1407.                             error_status_t  *status);
  1408.  
  1409.  Parameters 
  1410.  
  1411.           Input 
  1412.  
  1413.           acl           A pointer to the ACL that is to be modified. 
  1414.  
  1415.           permset       The permissions to be granted to the user. 
  1416.  
  1417.           user          The UUID identifying the user to be added. 
  1418.  
  1419.           Output 
  1420.  
  1421.           status        A pointer to the completion status. On successful 
  1422.                         completion, the routine returns error_status_ok. 
  1423.                         Otherwise, it returns sec_acl_cant_allocate_memory, 
  1424.                         which indicates that the requested operation requires 
  1425.                         more memory than is available. 
  1426.  
  1427.  Usage 
  1428.  
  1429.           The dce_acl_obj_add_user_entry routine adds a user ACL entry to the 
  1430.           given ACL. It is equivalent to calling the dce_acl_obj_add_id_entry 
  1431.           routine with the sec_acl_e_type_user entry type, but it is more 
  1432.           convenient. 
  1433.  
  1434.           The data type that stores an ACL has a limited size. Attempting to 
  1435.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  1436.  
  1437.  Related Information 
  1438.  
  1439.           Routines: 
  1440.           dce_acl_obj_add_id_entry 
  1441.  
  1442.  
  1443. ΓòÉΓòÉΓòÉ 3.2.16. dce_acl_obj_free_entries ΓòÉΓòÉΓòÉ
  1444.  
  1445.  Purpose 
  1446.  
  1447.           Frees space used by an ACL's entries. 
  1448.  
  1449.  Format 
  1450.  
  1451.                     #include <dce\dce.h>
  1452.                     #include <dce\aclif.h>
  1453.  
  1454.                     void dce_acl_obj_free_entries(
  1455.                             sec_acl_t  *acl,
  1456.                             error_status_t  *status);
  1457.  
  1458.  Parameters 
  1459.  
  1460.           Input 
  1461.  
  1462.           acl           A pointer to the ACL that is to be freed. 
  1463.  
  1464.           Output 
  1465.  
  1466.           status        A pointer to the completion status. On successful 
  1467.                         completion, the routine returns error_status_ok. 
  1468.                         Otherwise, it returns an error. 
  1469.  
  1470.  Usage 
  1471.  
  1472.           The dce_acl_obj_free_entries routine frees space used by an ACL's 
  1473.           entries, and then sets the pointer to the ACL entry array to NULL and 
  1474.           the entry count to 0 (zero). 
  1475.  
  1476.  Related Information 
  1477.  
  1478.           Routines: 
  1479.           dce_acl_obj_init 
  1480.  
  1481.  
  1482. ΓòÉΓòÉΓòÉ 3.2.17. dce_acl_obj_init ΓòÉΓòÉΓòÉ
  1483.  
  1484.  Purpose 
  1485.  
  1486.           Initializes an ACL. 
  1487.  
  1488.  Format 
  1489.  
  1490.                     #include <dce\dce.h>
  1491.                     #include <dce\aclif.h>
  1492.  
  1493.                     void dce_acl_obj_init(
  1494.                             uuid_t  *mgr_type,
  1495.                             sec_acl_t  *acl,
  1496.                             error_status_t  *status);
  1497.  
  1498.  Parameters 
  1499.  
  1500.           Input 
  1501.  
  1502.           mgr_type      A pointer to the UUID identifying the type of the ACL 
  1503.                         manager in question. There can be more than one type of 
  1504.                         ACL manager protecting the object whose ACL is bound to 
  1505.                         the input handle. Use this parameter to distinguish 
  1506.                         them. 
  1507.  
  1508.           acl           A pointer to the ACL that is to be created. 
  1509.  
  1510.           Output 
  1511.  
  1512.           status        A pointer to the completion status. On successful 
  1513.                         completion, the routine returns error_status_ok. 
  1514.                         Otherwise, it returns an error. 
  1515.  
  1516.  Usage 
  1517.  
  1518.           The dce_acl_obj_init routine initializes an ACL. The caller passes in 
  1519.           the pointer to the existing ACL structure (of type sec_acl_t), for 
  1520.           which the caller provides the space. 
  1521.  
  1522.  Examples 
  1523.  
  1524.           The following example shows the use of dce_acl_obj_init and the 
  1525.           corresponding routine to free the entries, dce_acl_obj_free_entries. 
  1526.  
  1527.                         sec_acl_t acl;
  1528.                         extern uuid_t my_mgr_type;
  1529.                         error_status_t status;
  1530.  
  1531.                         dce_acl_obj_init(&my_mgr_type, &acl, &status);
  1532.                         /* ... use the ACL ... */
  1533.                         dce_acl_obj_free_entries(&acl, &status);
  1534.  
  1535.  Related Information 
  1536.  
  1537.           Routines: 
  1538.           dce_acl_obj_free_entries 
  1539.  
  1540.  
  1541. ΓòÉΓòÉΓòÉ 3.2.18. dce_acl_register_object_type ΓòÉΓòÉΓòÉ
  1542.  
  1543.  Purpose 
  1544.  
  1545.           Registers an ACL manager's object type. 
  1546.  
  1547.  Format 
  1548.  
  1549.                     #include <dce\dce.h>
  1550.                     #include <dce\aclif.h>
  1551.  
  1552.                     void dce_acl_register_object_type(
  1553.                             dce_db_handle_t  db,
  1554.                             uuid_t  *mgr_type,
  1555.                             unsigned32  printstring_size,
  1556.                             sec_acl_printstring_t  *printstring,
  1557.                             sec_acl_printstring_t  *mgr_info,
  1558.                             sec_acl_permset_t  control_perm,
  1559.                             sec_acl_permset_t  test_perm,
  1560.                             dce_acl_resolve_func_t  resolver,
  1561.                             void  *resolver_arg,
  1562.                             unsigned32  flags,
  1563.                             error_status_t  *status);
  1564.  
  1565.  Parameters 
  1566.  
  1567.           Input 
  1568.  
  1569.           db            Specifies the handle to the backing store database 
  1570.                         where the ACL objects are stored. The backing store 
  1571.                         must be indexed by UUID and must not use backing store 
  1572.                         headers. The database is obtained through dce_db_open, 
  1573.                         which is called prior to this routine. 
  1574.  
  1575.           mgr_type      A pointer to the UUID identifying the type of the ACL 
  1576.                         manager in question. There can be more than one type of 
  1577.                         ACL manager protecting the object whose ACL is bound to 
  1578.                         the input handle. Use this parameter to distinguish 
  1579.                         them. 
  1580.  
  1581.           printstring_size The number of items in the printstring array. 
  1582.  
  1583.           printstring   An array of sec_acl_printstring_t structures containing 
  1584.                         the printable representation of each specified 
  1585.                         permission. These are the print strings used by dcecp 
  1586.                         or other ACL editors. 
  1587.  
  1588.           mgr_info      A single sec_acl_printstring_t containing the name and 
  1589.                         short description for the given ACL manager. 
  1590.  
  1591.           control_perm  The permission set needed to change an ACL, typically 
  1592.                         sec_acl_perm_control. If the value is 0, anyone is 
  1593.                         allowed to change the ACL. The permission must be 
  1594.                         listed in printstring. 
  1595.  
  1596.           test_perm     The permission set needed to test an ACL, typically 
  1597.                         sec_acl_perm_test. If the value is 0, anyone is allowed 
  1598.                         to test the ACL. The permissions must be listed in 
  1599.                         printstring. 
  1600.  
  1601.           resolver      The routine for finding the UUID for an ACL. 
  1602.  
  1603.           resolver_arg  The parameter to pass to the resolver routine. If using 
  1604.                         dce_acl_resolve_by_name or dce_acl_resolve_by_uuid, 
  1605.                         pass the database handle to the name or UUID backing 
  1606.                         store database. The backing store must use the standard 
  1607.                         backing store header. See dce_db_open. 
  1608.  
  1609.           flags         A bit mask with the following possible bit values: 
  1610.  
  1611.                              dce_acl_c_orphans_ok If this bit is specified, it 
  1612.                                   is possible to replace an ACL with one in 
  1613.                                   which no control bits are turned on in any of 
  1614.                                   the ACL entries. (Use the rdacl_replace 
  1615.                                   operation to replace an ACL.) This is a 
  1616.                                   write-once operation and, after it has been 
  1617.                                   done, no one can change the ACL. 
  1618.  
  1619.                              dce_acl_c_has_owner If this bit is set, the ACL 
  1620.                                   manager supports the concept of user owners 
  1621.                                   of objects. This is required to use ACL 
  1622.                                   entries of type user_obj and user_obj_deleg. 
  1623.  
  1624.                              dce_acl_c_has_groups A similar bit for group 
  1625.                                   owners of objects. 
  1626.  
  1627.           Output 
  1628.  
  1629.           status        A pointer to the completion status. On successful 
  1630.                         completion, the routine returns error_status_ok. 
  1631.                         Otherwise, it returns one of the following errors: 
  1632.  
  1633.                              acl_s_owner_not_allowed In a rdacl_replace 
  1634.                                   operation an attempt was made to add an ACL 
  1635.                                   entry of type sec_acl_e_type_user_obj or 
  1636.                                   sec_acl_e_type_user_obj_deleg to a manager 
  1637.                                   that does not support object user ownership. 
  1638.  
  1639.                              acl_s_group_not_allowed In a rdacl_replace 
  1640.                                   operation an attempt was made to add an ACL 
  1641.                                   entry of type sec_acl_e_type_group_obj or 
  1642.                                   sec_acl_e_type_group_obj_deleg to a manager 
  1643.                                   that does not support object group ownership. 
  1644.  
  1645.                              acl_s_no_control_entries In a rdacl_replace 
  1646.                                   operation an attempt was made to replace the 
  1647.                                   ACL where no entries have control permission. 
  1648.  
  1649.  Usage 
  1650.  
  1651.           The dce_acl_register_object_type routine registers the object types 
  1652.           of an ACL manager with the ACL library. 
  1653.  
  1654.           The resolver routine may be the dce_acl_resolve_by_name or the 
  1655.           dce_acl_resolve_by_uuid routine if the application uses the standard 
  1656.           header in the backing store database, or it may be some other 
  1657.           user-supplied routine. A user-supplied routine must be of type 
  1658.           dce_acl_resolve_func_t. The resolver routine finds the UUID of the 
  1659.           ACL of the given object. The resolver's parameters must match the 
  1660.           type dce_db_convert_func_t defined in the file <dce\aclif.h>. See the 
  1661.           following examples for use of the resolver routine 
  1662.           dce_acl_convert_func. 
  1663.  
  1664.           Unless the dce_acl_c_orphans_ok bit is set in the flags parameter, 
  1665.           all ACLs must always have someone able to modify the ACL. 
  1666.  
  1667.           Another way to express this is that if dce_acl_c_orphans_ok is 
  1668.           cleared in a call to dce_acl_register_object_type where a 
  1669.           control_perm value is specified, a subsequent ACL replacement using 
  1670.           an ACL that has no control bits set in any non-delegation entry will 
  1671.           fail, resulting in the acl_s_no_control_entries error. If 
  1672.           dce_acl_c_orphans_ok is set, but no control_perm bits are specified, 
  1673.           then dce_acl_c_orphans_ok is ignored, and the replacement works in 
  1674.           all cases. 
  1675.  
  1676.  Examples 
  1677.  
  1678.           The dce_acl_register_object_type routine should be called once for 
  1679.           each type of object that the server manages. A typical call follows. 
  1680.           The sample code defines three variables: the manager print string, 
  1681.           the ACL print strings, and the ACL database. Note that the manager 
  1682.           print string does not define any permission bits; they are set by the 
  1683.           library to be the union of all permissions in the ACL print string. 
  1684.           The code also uses the global my_uuid as the ACL manager type UUID. 
  1685.           The ACL print string uses the standard sec_acl_perm_xxx bits. 
  1686.  
  1687.                     include <dce\aclif.h>
  1688.  
  1689.                     /* Manager help. */
  1690.                     sec_acl_printstring_t my_acl_help = {
  1691.                         "me", "My manager"
  1692.                     };
  1693.  
  1694.                     /*
  1695.                      * ACL permission descriptions; these are from /usr/include/dce/aclbase.idl
  1696.                      * This example refrains from redefining any of the conventionally
  1697.                      * established bits.
  1698.                      */
  1699.                     sec_acl_printstring_t my_printstring[] = {
  1700.                         { "r", "read", sec_acl_perm_read },
  1701.                         { "f", "foobar", sec_acl_perm_unused_00000080 },
  1702.                         { "w", "write", sec_acl_perm_write },
  1703.                         { "d", "delete, sec_acl_perm_delete },
  1704.                         { "c", "control", sec_acl_perm_control }
  1705.                     };
  1706.  
  1707.                     dce_db_open("my_acldb", NULL,
  1708.                         dce_db_c_std_header | dce_db_c_index_by_uuid,
  1709.                         (dce_db_convert_func_t)dce_acl_convert_func,
  1710.                         &dbh, &st);
  1711.  
  1712.                     dce_acl_register_object_type(dbh, &my_manager_uuid,
  1713.                         sizeof my_printstring / sizeof my_printstring[0],
  1714.                         my_printstring, &my_acl_help, sec_acl_perm_control,
  1715.                         0, xxx_resolve_func, NULL, 0, &st);
  1716.  
  1717.           If the ACL manager can use the standard collection of ACL bits (that 
  1718.           is, has not defined any special ones), then it can use the global 
  1719.           variable dce_acl_g_printstring that predefines a print string.  Here 
  1720.           is an example of its use: 
  1721.  
  1722.                     dce_acl_register_object_type(acl_db, &your_mgr_type,
  1723.                         sizeof dce_acl_g_printstring / sizeof dce_acl_g_printstring[0],
  1724.                         dce_acl_g_printstring, &your_acl_help,
  1725.                         dced_perm_control, dced_perm_test, your_resolver, NULL, 0, st);
  1726.  
  1727.  Related Information 
  1728.  
  1729.           Routines: 
  1730.           dce_db_open 
  1731.           dce_acl_resolve_by_name 
  1732.           dce_acl_resolve_by_uuid 
  1733.  
  1734.           Files: 
  1735.           \usr\include\dce\aclif.h - Definition of dce_acl_resolve_func_t. 
  1736.  
  1737.  
  1738. ΓòÉΓòÉΓòÉ 3.2.19. dce_acl_resolve_by_name ΓòÉΓòÉΓòÉ
  1739.  
  1740.  Purpose 
  1741.  
  1742.           Finds the UUID for an ACL, given an object name. 
  1743.  
  1744.  Format 
  1745.  
  1746.                     #include <dce\dce.h>
  1747.                     #include <dce\aclif.h>
  1748.  
  1749.                     void dce_acl_resolve_by_name(
  1750.                             handle_t  handle,
  1751.                             sec_acl_component_name_t  component_name,
  1752.                             sec_acl_type_t  sec_acl_type,
  1753.                             uuid_t  *mgr_type,
  1754.                             boolean32  writing,
  1755.                             void  *resolver_arg,
  1756.                             uuid_t  *acl_uuid,
  1757.                             error_status_t  *status);
  1758.  
  1759.  Parameters 
  1760.  
  1761.           Input 
  1762.  
  1763.           handle        A client binding handle passed into the server stub. 
  1764.                         Use sec_acl_bind to create this handle. 
  1765.  
  1766.           component_name A character string containing the name of the target 
  1767.                         object. 
  1768.  
  1769.           sec_acl_type  The type of ACL to be resolved: sec_acl_type_object, 
  1770.                         sec_acl_type_default_object, or 
  1771.                         sec_acl_type_default_container. 
  1772.  
  1773.           mgr_type      A pointer to the UUID identifying the type of the ACL 
  1774.                         manager in question. There can be more than one type of 
  1775.                         ACL manager protecting the object whose ACL is bound to 
  1776.                         the input handle. Use this parameter to distinguish 
  1777.                         them. 
  1778.  
  1779.           writing       This parameter is ignored in the OSF implementation. 
  1780.  
  1781.           resolver_arg  This argument is passed into 
  1782.                         dce_acl_register_object_type. It should be a handle for 
  1783.                         a backing store indexed by name. 
  1784.  
  1785.           Output 
  1786.  
  1787.           acl_uuid      The ACL UUID, as resolved by dce_acl_resolve_by_name. 
  1788.  
  1789.           status        A pointer to the completion status. On successful 
  1790.                         completion, the routine returns error_status_ok. 
  1791.                         Otherwise, it returns an error. 
  1792.  
  1793.  Usage 
  1794.  
  1795.           The dce_acl_resolve_by_name routine finds a UUID for an ACL, given an 
  1796.           object's name, as provided in the component_name parameter. The user 
  1797.           does not call this routine directly. It is an instance of the kind of 
  1798.           routine provided to the resolver argument of 
  1799.           dce_acl_register_object_type. 
  1800.  
  1801.           If dce_acl_resolve_by_name and dce_acl_resolve_by_uuid are 
  1802.           inappropriate, the user of dce_acl_register_object_type must provide 
  1803.           some other resolver routine. 
  1804.  
  1805.  Related Information 
  1806.  
  1807.           Routines: dce_db_header_fetch 
  1808.           dce_db_open 
  1809.           dce_acl_register_object_type 
  1810.           dce_acl_resolve_by_uuid 
  1811.  
  1812.  
  1813. ΓòÉΓòÉΓòÉ 3.2.20. dce_acl_resolve_by_uuid ΓòÉΓòÉΓòÉ
  1814.  
  1815.  Purpose 
  1816.  
  1817.           Finds the UUID for an ACL, given an object's UUID. 
  1818.  
  1819.  Format 
  1820.  
  1821.                     #include <dce\dce.h>
  1822.                     #include <dce\aclif.h>
  1823.  
  1824.                     dce_acl_resolve_func_t  dce_acl_resolve_by_uuid(
  1825.                              handle_t  handle,
  1826.                              sec_acl_component_name_t  component_name,
  1827.                              sec_acl_type_t  sec_acl_type,
  1828.                              uuid_t  *mgr_type,
  1829.                              boolean32  writing,
  1830.                              void  *resolver_arg,
  1831.                              uuid_t  *acl_uuid,
  1832.                              error_status_t  *status);
  1833.  
  1834.  Parameters 
  1835.  
  1836.           Input 
  1837.  
  1838.           handle        A client binding handle passed into the server stub. 
  1839.                         Use sec_acl_bind to create this handle. 
  1840.  
  1841.           component_name A character string containing the name of the target 
  1842.                         object. (The dce_acl_resolve_by_uuid routine ignores 
  1843.                         this parameter.) 
  1844.  
  1845.           sec_acl_type  The type of ACL to be resolved: sec_acl_type_object, 
  1846.                         sec_acl_type_default_object, or 
  1847.                         sec_acl_type_default_container. 
  1848.  
  1849.           mgr_type      A pointer to the UUID identifying the type of the ACL 
  1850.                         manager in question. There might be more than one type 
  1851.                         of ACL manager protecting the object whose ACL is bound 
  1852.                         to the input handle. Use this parameter to distinguish 
  1853.                         them. 
  1854.  
  1855.           writing       This parameter is ignored in OSF's implementation. 
  1856.  
  1857.           resolver_arg  This argument is passed into 
  1858.                         dce_acl_register_object_type. It should be a handle for 
  1859.                         a backing store indexed by UUID. 
  1860.  
  1861.           Output 
  1862.  
  1863.           acl_uuid      The ACL UUID, as resolved by dce_acl_resolve_by_uuid. 
  1864.  
  1865.           status        A pointer to the completion status. On successful 
  1866.                         completion, the routine returns error_status_ok. 
  1867.                         Otherwise, it returns an error. 
  1868.  
  1869.  Usage 
  1870.  
  1871.           The dce_acl_resolve_by_uuid routine finds a UUID for an ACL, given an 
  1872.           object's UUID, as provided through the handle parameter. The user 
  1873.           does not call this routine directly. It is an instance of the kind of 
  1874.           routine provided to the resolver argument of 
  1875.           dce_acl_register_object_type. 
  1876.  
  1877.           If dce_acl_resolve_by_uuid and dce_acl_resolve_by_name are 
  1878.           inappropriate, the user of dce_acl_register_object_type must provide 
  1879.           some other resolver routine. 
  1880.  
  1881.  Related Information 
  1882.  
  1883.           Routines: dce_db_header_fetch 
  1884.           dce_db_open 
  1885.           dce_acl_register_object_type 
  1886.           dce_acl_resolve_by_name 
  1887.  
  1888.  
  1889. ΓòÉΓòÉΓòÉ 3.3. The DCE Attribute Interface API ΓòÉΓòÉΓòÉ
  1890.  
  1891. The DCE Attribute Interface API allows applications to define and access 
  1892. attributes types (schema entries) in a schema of your choice. It is based on 
  1893. the Extended Registry Attribute (ERA) interface, which defines and accesses 
  1894. attribute types in the registry database schema. Except for the binding 
  1895. methods, the two APIs are similar. 
  1896.  
  1897. Note however, that the ERA API provides routines to create attribute types in 
  1898. the registry schema, to create and manipulate attribute instances, and to 
  1899. attach those instances to objects. The DCE Attribute Interface in its current 
  1900. state provides routines to create attribute types only. 
  1901.  
  1902. See the following topics for more information: 
  1903.  
  1904.       The DCE Attribute Interface Routines 
  1905.       Attribute Interface Data Types and Structures 
  1906.  
  1907.  
  1908. ΓòÉΓòÉΓòÉ 3.3.1. The DCE Attribute Interface Routines ΓòÉΓòÉΓòÉ
  1909.  
  1910. The DCE Attribute Interface consists of the following routines: 
  1911.  
  1912.  dce_attr_sch_aclmgr_strings        Returns printable ACL strings associated 
  1913.                                     with an ACL manager protecting a schema 
  1914.                                     object. 
  1915.  
  1916.  dce_attr_sch_bind                  Returns an opaque handle of type 
  1917.                                     dce_attr_sch_handle_t to a schema object 
  1918.                                     specified by name and sets authentication 
  1919.                                     and authorization parameters for the 
  1920.                                     handle. 
  1921.  
  1922.  dce_attr_sch_bind_free             Releases an opaque handle of type 
  1923.                                     dce_attr_sch_handle_t. 
  1924.  
  1925.  dce_attr_sch_create_entry          Creates a schema entry in a schema bound to 
  1926.                                     with dce_attr_sch_bind. 
  1927.  
  1928.  dce_attr_sch_cursor_alloc          Allocates resources to a cursor used with 
  1929.                                     dce_attr_sch_scan.  The 
  1930.                                     dce_attr_sch_cursor_alloc routine is a 
  1931.                                     local operation. 
  1932.  
  1933.  dce_attr_sch_cursor_init           Allocates resources to and initializes a 
  1934.                                     cursor used with dce_attr_sch_scan.  The 
  1935.                                     dce_attr_sch_cursor_init routine makes a 
  1936.                                     remote call that also returns the current 
  1937.                                     number of schema entries in the schema. 
  1938.  
  1939.  dce_attr_sch_cursor_release        Releases states associated with a cursor 
  1940.                                     created by dce_attr_sch_cursor_alloc or 
  1941.                                     dce_attr_sch_cursor_init. 
  1942.  
  1943.  dce_attr_sch_cursor_reset          Reinitializes a cursor used with 
  1944.                                     dce_attr_sch_scan. The reset cursor can 
  1945.                                     then be reused without releasing and 
  1946.                                     re-allocating. 
  1947.  
  1948.  dce_attr_sch_delete_entry          Deletes a schema entry in a schema bound to 
  1949.                                     with dce_attr_sch_bind. 
  1950.  
  1951.  dce_attr_sch_get_acl_mgrs          Retrieves the manager types of the ACLs 
  1952.                                     protecting objects dominated by a named 
  1953.                                     schema. 
  1954.  
  1955.  dce_attr_sch_lookup_by_id          Reads a schema entry identified by 
  1956.                                     attribute type UUID. 
  1957.  
  1958.  dce_attr_sch_lookup_by_name        Reads a schema entry identified by 
  1959.                                     attribute name. 
  1960.  
  1961.  dce_attr_sch_scan                  Reads a specified number of schema entries. 
  1962.  
  1963.  dce_attr_sch_update_entry          Updates a schema entry in a schema bound to 
  1964.                                     with dce_attr_sch_bind. 
  1965.  
  1966.  
  1967. ΓòÉΓòÉΓòÉ 3.3.2. Attribute Interface Data Types and Structures ΓòÉΓòÉΓòÉ
  1968.  
  1969.  dce_attr_sch_handle_t              An opaque handle to a schema object. Use 
  1970.                                     dce_attr_sch_bind to acquire the handle. 
  1971.  
  1972.  dce_attr_component_name_t          A pointer to a character string used to 
  1973.                                     further specify a schema object. 
  1974.  
  1975.  dce_bind_auth_info_t               An enumeration that defines whether the 
  1976.                                     binding is authenticated. This data type is 
  1977.                                     defined exactly as the 
  1978.                                     sec_attr_bind_auth_info_t data type in the 
  1979.                                     ERA interface. See DCE Security Services 
  1980.                                     API for more information on 
  1981.                                     sec_attr_bind_auth_info_t. 
  1982.  
  1983.  dce_attr_schema_entry_t            A structure that defines a complete 
  1984.                                     attribute entry for the schema catalog. 
  1985.                                     This data type is defined exactly as the 
  1986.                                     sec_attr_schema_entry_t data type in the 
  1987.                                     ERA interface. See DCE Security Services 
  1988.                                     API for more information on 
  1989.                                     sec_attr_schema_entry_t. 
  1990.  
  1991.  dce_attr_cursor_t                  A structure that provides a pointer into a 
  1992.                                     database and is used for multiple database 
  1993.                                     operations. This cursor must minimally 
  1994.                                     represent the object indicated by 
  1995.                                     dce_attr_sch_handle_t. The cursor can 
  1996.                                     additionally represent an entry within that 
  1997.                                     schema. 
  1998.  
  1999.  dce_attr_schema_entry_parts_t      A 32-bit bitset containing flags that 
  2000.                                     specify the schema entry fields that can be 
  2001.                                     modified on a schema entry update 
  2002.                                     operation. This data type is defined 
  2003.                                     exactly as the 
  2004.                                     sec_attr_schema_entry_parts_t data type in 
  2005.                                     the ERA interface. See DCE Security 
  2006.                                     Services API for more information on 
  2007.                                     sec_attr_schema_entry_parts_t. 
  2008.  
  2009.  
  2010. ΓòÉΓòÉΓòÉ 3.3.3. dce_attr_sch_aclmgr_strings ΓòÉΓòÉΓòÉ
  2011.  
  2012.  Purpose 
  2013.  
  2014.           Retrieves printable ACL strings for each permission bit that the 
  2015.           acl_mgr_type will support. 
  2016.  
  2017.  Format 
  2018.  
  2019.                     #include <dce\dce_attr_sch.h>
  2020.  
  2021.                     void dce_attr_sch_aclmgr_strings(
  2022.                             dce_attr_sch_handle_t  *h,
  2023.                             uuid_t  *acl_mgr_type,
  2024.                             unsigned32  size_avail,
  2025.                             uuid_t  *acl_mgr_type_chain,
  2026.                             sec_acl_print_string_t  *acl_mgr_info,
  2027.                             boolean32  *tokenize,
  2028.                             unsigned32  *total_num_printstrings,
  2029.                             unsigned32  *size_used,
  2030.                             sec_acl_printstring_t  permstrings[],
  2031.                             error_status_t *status);
  2032.  
  2033.  Parameters 
  2034.  
  2035.           Input 
  2036.  
  2037.           h             An opaque handle to the schema on which this operation 
  2038.                         is being performed. 
  2039.  
  2040.           acl_mgr_type  The UUID of the acl_mgr_type for which the printstrings 
  2041.                         are to be returned. 
  2042.  
  2043.           size_avail    The size of the permstrings array. 
  2044.  
  2045.           Output 
  2046.  
  2047.           acl_mgr_type_chain If not uuid_nil, identifies the next acl_mgr_type 
  2048.                         UUID in a chain supporting ACL managers with more than 
  2049.                         32 permission bits. 
  2050.  
  2051.           acl_mgr_info  Printstrings containing the name, help information, and 
  2052.                         complete set of supported permission bits for this ACL 
  2053.                         manager. 
  2054.  
  2055.           tokenize      If TRUE, permission bit strings should be tokenized. If 
  2056.                         FALSE, permission print strings are unambiguous and 
  2057.                         print strings for various permissions can be 
  2058.                         concatenated. 
  2059.  
  2060.           total_num_permstrings The total number of permission print strings 
  2061.                         supported by this acl_mgr_type. 
  2062.  
  2063.           size_used     The number of perm print strings returned. 
  2064.  
  2065.           permstrings[] An array containing the print strings for each 
  2066.                         permission supported by this acl_mgr_type. 
  2067.  
  2068.           status        A pointer to the completion status. On successful 
  2069.                         completion, the routine returns error_status_ok. 
  2070.                         Otherwise, it returns dce_attr_s_not_implemented. 
  2071.  
  2072.  Usage 
  2073.  
  2074.           The dce_attr_sch_aclmgr_strings routine retrieves printable 
  2075.           representations for each permission bit that the input acl_mgr_type 
  2076.           will support. There can be aliases for common permission 
  2077.           combinations; by convention, simple entries should appear  at the 
  2078.           beginning of the array, and combinations should appear at the end. 
  2079.           When FALSE, the tokenize flag indicates that permission print strings 
  2080.           are unambiguous and therefore can be concatenated for various 
  2081.           permissions. When TRUE, however, this property does not hold and the 
  2082.           strings should be tokenized before input or output. 
  2083.  
  2084.           The acl_mgr_info string provides a name and help information for the 
  2085.           manager type as well as the complete set of supported permission 
  2086.           bits. The total_num_printstrings parameter contains the total number 
  2087.           of ACL print strings supported by this ACL manager type. If 
  2088.           total_num_printstrings is greater than size_avail, this routine 
  2089.           should be invoked again with a buffer of the appropriate size. 
  2090.  
  2091.           If acl_mgr_type supports more than 32 permission bits, multiple 
  2092.           manager types can be used, one for each 32-bit-wide slice of 
  2093.           permissions. When this is the case the acl_mgr_type_chain parameter 
  2094.           is set to the UUID of the next manager type in the set. The final 
  2095.           result for the chain returns uuid_nil in the manager_type_chain 
  2096.           parameter. 
  2097.  
  2098.  Related Information 
  2099.  
  2100.           Files: 
  2101.           \usr\include\dce\dce_attr_sch.idl - The idl file from which 
  2102.           dce\dce_attr_sch.h was derived. 
  2103.  
  2104.  
  2105. ΓòÉΓòÉΓòÉ 3.3.4. dce_attr_sch_bind ΓòÉΓòÉΓòÉ
  2106.  
  2107.  Purpose 
  2108.  
  2109.           Returns an opaque handle to a schema object. 
  2110.  
  2111.  Format 
  2112.  
  2113.                     #include <dce\dce_attr_base.h>
  2114.  
  2115.                     void dce_attr_sch_bind(
  2116.                             dce_attr_component_name_t schema_name,
  2117.                             dce_bind_auth_info_t *auth_info,
  2118.                             dce_attr_sch_handle_t *h,
  2119.                             error_status_t *status);
  2120.  
  2121.  Parameters 
  2122.  
  2123.           Input 
  2124.  
  2125.           schema_name   A pointer to a value of type dce_attr_component_name_t 
  2126.                         that specifies the name of the schema object to which 
  2127.                         to bind. 
  2128.  
  2129.           auth_info     A value of type dce_bind_auth_info_t that defines the 
  2130.                         authentication and authorization parameters to use with 
  2131.                         the binding handle. If set to NULL, the default 
  2132.                         authentication and authorization parameters are used. 
  2133.  
  2134.           Output 
  2135.  
  2136.           h             An opaque handle of type dce_attr_sch_handle_t to the 
  2137.                         named schema object for use with dce_attr_sch 
  2138.                         operations. 
  2139.  
  2140.           status        A pointer to the completion status. On successful 
  2141.                         completion, the routine returns error_status_ok. 
  2142.                         Otherwise, it returns one of the following errors: 
  2143.  
  2144.                              dce_attr_s_bad_name 
  2145.                              sec_login_s_no_current_context 
  2146.                              rpc_s_entry_not_found 
  2147.                              rpc_s_no_more_bindings 
  2148.                              dce_attr_s_unknown_auth_info_type 
  2149.                              dce_attr_s_no_memory 
  2150.  
  2151.  Usage 
  2152.  
  2153.           The dce_attr_sch_bind routine returns an opaque handle of type 
  2154.           dce_attr_sch_handle_t to a named schema object. The returned handle 
  2155.           can then be used for subsequent dce_attr_sch operations performed on 
  2156.           the object. 
  2157.  
  2158.  Permissions Required 
  2159.  
  2160.           The dce_attr_sch_bind routine requires appropriate permissions on the 
  2161.           schema object. These permissions are managed by the target server. 
  2162.  
  2163.  Related Information 
  2164.  
  2165.           Routines: 
  2166.           dce_attr_sch_bind_free 
  2167.  
  2168.           Files: 
  2169.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2170.           dce\dce_attr_base.h was derived. 
  2171.  
  2172.  
  2173. ΓòÉΓòÉΓòÉ 3.3.5. dce_attr_sch_bind_free ΓòÉΓòÉΓòÉ
  2174.  
  2175.  Purpose 
  2176.  
  2177.           Releases an opaque handle of type dce_attr_sch_handle_t to a schema 
  2178.           object. 
  2179.  
  2180.  Format 
  2181.  
  2182.                     #include <dce\dce_attr_base.h>
  2183.  
  2184.                     void dce_attr_sch_bind_free(
  2185.                             dce_attr_sch_handle_t  *h,
  2186.                             error_status_t  *status);
  2187.  
  2188.  Parameters 
  2189.  
  2190.           Input 
  2191.  
  2192.           h             An opaque handle of type dce_attr_sch_handle_t. 
  2193.  
  2194.           Output 
  2195.  
  2196.           status        A pointer to the completion status.  On successful 
  2197.                         completion, the routine returns error_status_ok. 
  2198.                         Otherwise, it returns an error. 
  2199.  
  2200.  Usage 
  2201.  
  2202.           The dce_attr_sch_bind_free routine releases an opaque handle of type 
  2203.           dce_attr_sch_handle_t. The handle was returned with the 
  2204.           dce_attr_sch_bind routine and used to perform dce_attr_sch 
  2205.           operations. 
  2206.  
  2207.  Permissions Required 
  2208.  
  2209.           The dce_attr_sch_bind_free routine requires appropriate permissions 
  2210.           on the schema object.  These permissions are managed by the target 
  2211.           server. 
  2212.  
  2213.  Related Information 
  2214.  
  2215.           Routines: 
  2216.           dce_attr_sch_bind 
  2217.  
  2218.           Files: 
  2219.           \usr\include\dce\dce_attr_sch.idl - The idl file from which 
  2220.           dce\dce_attr_sch.h was derived. 
  2221.  
  2222.  
  2223. ΓòÉΓòÉΓòÉ 3.3.6. dce_attr_sch_create_entry ΓòÉΓòÉΓòÉ
  2224.  
  2225.  Purpose 
  2226.  
  2227.           Creates a schema entry in a schema bound to by a previous 
  2228.           dce_attr_sch_bind routine. 
  2229.  
  2230.  Format 
  2231.  
  2232.                     #include <dce\dce_attr_base.h>
  2233.  
  2234.                     void dce_attr_sch_create_entry(
  2235.                             dce_attr_sch_handle_t h,
  2236.                             dce_attr_schema_entry_t *schema_entry,
  2237.                             error_status_t *status);
  2238.  
  2239.  Parameters 
  2240.  
  2241.           Input 
  2242.  
  2243.           h             An opaque handle bound to a schema object.  Use 
  2244.                         dce_attr_sch_bind to acquire the handle. 
  2245.  
  2246.           schema_entry  A pointer to a dce_attr_schema_entry_t that contains 
  2247.                         the schema entry values for the schema where the entry 
  2248.                         is to be created. 
  2249.  
  2250.           Output 
  2251.  
  2252.           status        A pointer to the completion status. On successful 
  2253.                         completion, the routine returns error_status_ok. 
  2254.                         Otherwise, it returns dce_attr_s_bad_binding. 
  2255.  
  2256.  Usage 
  2257.  
  2258.           The dce_attr_sch_create_entry routine creates schema entries that 
  2259.           define attribute types in the schema object bound to by h. 
  2260.  
  2261.  Permissions Required 
  2262.  
  2263.           The dce_attr_sch_create_entry routine requires appropriate 
  2264.           permissions on the schema object. These permissions are managed by 
  2265.           the target server. 
  2266.  
  2267.  Related Information 
  2268.  
  2269.           Routines: 
  2270.           dce_attr_sch_delete_entry 
  2271.           dce_attr_sch_update_entry 
  2272.  
  2273.           Files: 
  2274.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2275.           dce\dce_attr_base.h was derived. 
  2276.  
  2277.  
  2278. ΓòÉΓòÉΓòÉ 3.3.7. dce_attr_sch_cursor_alloc ΓòÉΓòÉΓòÉ
  2279.  
  2280.  Purpose 
  2281.  
  2282.           Allocates resources to a cursor used with the dce_attr_sch_scan 
  2283.           routine. 
  2284.  
  2285.  Format 
  2286.  
  2287.                     #include <dce\dce_attr_sch.h>
  2288.  
  2289.                     void dce_rgy_attr_cursor_alloc(
  2290.                             dce_attr_cursor_t *cursor,
  2291.                             error_status_t *status);
  2292.  
  2293.  Parameters 
  2294.  
  2295.           Output 
  2296.  
  2297.           cursor        A pointer to a dce_attr_cursor_t. 
  2298.  
  2299.           status        A pointer to the completion status. On successful 
  2300.                         completion, the routine returns error_status_ok. 
  2301.                         Otherwise, it returns dce_attr_s_no_memory. 
  2302.  
  2303.  Usage 
  2304.  
  2305.           The dce_attr_sch_cursor_alloc routine allocates resources to a cursor 
  2306.           used with the dce_attr_sch_scan routine. This routine, which is a 
  2307.           local operation, does not initialize cursor. 
  2308.  
  2309.           The dce_attr_sch_cursor_init routine, which makes a remote call, 
  2310.           allocates and initializes the cursor. In addition, 
  2311.           dce_attr_sch_cursor_init returns the total number of entries found in 
  2312.           the schema as an output parameter; dce_attr_sch_cursor_alloc does 
  2313.           not. 
  2314.  
  2315.  Permissions Required 
  2316.  
  2317.           The dce_attr_sch_cursor_alloc routine requires appropriate 
  2318.           permissions on the schema object. These permissions are managed by 
  2319.           the target server. 
  2320.  
  2321.  Related Information 
  2322.  
  2323.           Routines: 
  2324.           dce_attr_sch_cursor_init 
  2325.           dce_attr_sch_cursor_release 
  2326.           dce_attr_sch_scan 
  2327.  
  2328.           Files: 
  2329.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2330.           dce\dce_attr_base.h was derived. 
  2331.  
  2332.  
  2333. ΓòÉΓòÉΓòÉ 3.3.8. dce_attr_sch_cursor_init ΓòÉΓòÉΓòÉ
  2334.  
  2335.  Purpose 
  2336.  
  2337.           Initializes and allocates a cursor used with the dce_attr_sch_scan 
  2338.           routine. 
  2339.  
  2340.  Format 
  2341.  
  2342.                     #include <dce\dce_attr_base.h>
  2343.  
  2344.                     void dce_rgy_attr_cursor_init(
  2345.                             dce_attr_sch_handle_t h,
  2346.                             unsigned32 *cur_num_entries,
  2347.                             dce_attr_cursor_t *cursor,
  2348.                             error_status_t *status);
  2349.  
  2350.  Parameters 
  2351.  
  2352.           Input 
  2353.  
  2354.           h             An opaque handle bound to a schema object.  Use 
  2355.                         dce_attr_sch_bind to acquire the handle. 
  2356.  
  2357.           Output 
  2358.  
  2359.           cur_num_entries A pointer to an unsigned 32-bit integer that 
  2360.                         specifies the total number of entries contained in the 
  2361.                         schema at the time of this call. 
  2362.  
  2363.           cursor        A pointer to a dce_attr_cursor_t that is initialized to 
  2364.                         the first entry in the schema. 
  2365.  
  2366.           status        A pointer to the completion status. On successful 
  2367.                         completion, the routine returns error_status_ok. 
  2368.                         Otherwise, it returns one of the following errors: 
  2369.  
  2370.                              dce_attr_s_bad_binding 
  2371.                              dce_attr_s_no_memory 
  2372.  
  2373.  Usage 
  2374.  
  2375.           The dce_attr_sch_cursor_init routine initializes and allocates a 
  2376.           cursor used with the dce_attr_sch_scan routine. This routine makes 
  2377.           remote calls to initialize the cursor. To limit the number of remote 
  2378.           calls, use the dce_attr_sch_cursor_alloc routine to allocate cursor, 
  2379.           but not initialize it. If the cursor input to dce_attr_sch_scan has 
  2380.           not been initialized, the dce_attr_sch_scan routine initializes it; 
  2381.           if it has been initialized, dce_attr_sch_scan advances it. 
  2382.  
  2383.           Unlike the dce_attr_sch_cursor_alloc routine, 
  2384.           dce_attr_sch_cursor_init supplies the total number of entries found 
  2385.           in the schema as an output parameter. 
  2386.  
  2387.  Related Information 
  2388.  
  2389.           Routines: 
  2390.           dce_attr_sch_cursor_release 
  2391.           dce_attr_sch_scan 
  2392.           dce_attr_sch_cursor_alloc 
  2393.  
  2394.           Files: 
  2395.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2396.           dce\dce_attr_base.h was derived. 
  2397.  
  2398.  
  2399. ΓòÉΓòÉΓòÉ 3.3.9. dce_attr_sch_cursor_release ΓòÉΓòÉΓòÉ
  2400.  
  2401.  Purpose 
  2402.  
  2403.           Releases states associated with a cursor that has been allocated with 
  2404.           either dce_attr_sch_cursor_init or dce_attr_sch_cursor_alloc. 
  2405.  
  2406.  Format 
  2407.  
  2408.                     #include <dce\dce_attr_base.h>
  2409.  
  2410.                     void dce_attr_sch_cursor_init(
  2411.                             dce_attr_cursor_t *cursor,
  2412.                             error_status_t *status);
  2413.  
  2414.  Parameters 
  2415.  
  2416.           Input\Output 
  2417.  
  2418.           cursor        A pointer to a dce_attr_cursor_t.  As an input 
  2419.                         parameter, cursor must have been initialized to the 
  2420.                         first entry in a schema.  As an output parameter, 
  2421.                         cursor is uninitialized with all resources released. 
  2422.  
  2423.           Output 
  2424.  
  2425.           status        A pointer to the completion status. On successful 
  2426.                         completion, the routine returns error_status_ok. 
  2427.                         Otherwise, it returns an error. 
  2428.  
  2429.  Usage 
  2430.  
  2431.           The dce_attr_sch_cursor_init routine releases the resources allocated 
  2432.           to a cursor that has been allocated by either a 
  2433.           dce_attr_sch_cursor_init or dce_attr_sch_cursor_alloc. This routine 
  2434.           is a local operation and makes no remote calls. 
  2435.  
  2436.  Related Information 
  2437.  
  2438.           Routines: 
  2439.           dce_attr_sch_cursor_alloc 
  2440.           dce_attr_sch_cursor_init 
  2441.           dce_attr_sch_cursor_reset 
  2442.           dce_attr_sch_scan 
  2443.  
  2444.           Files: 
  2445.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2446.           dce\dce_attr_base.h was derived. 
  2447.  
  2448.  
  2449. ΓòÉΓòÉΓòÉ 3.3.10. dce_attr_sch_cursor_reset ΓòÉΓòÉΓòÉ
  2450.  
  2451.  Purpose 
  2452.  
  2453.           Resets a cursor that has been allocated with either 
  2454.           dce_attr_sch_cursor_init or dce_attr_sch_cursor_alloc. 
  2455.  
  2456.  Format 
  2457.  
  2458.                     #include <dce\dce_attr_base.h>
  2459.  
  2460.                     void dce_attr_cursor_reset(
  2461.                       dce_attr_cursor_t *cursor,
  2462.                       error_status_t *status);
  2463.  
  2464.  Parameters 
  2465.  
  2466.           Input\Output 
  2467.  
  2468.           cursor        A pointer to a dce_attr_cursor_t. As an input 
  2469.                         parameter, cursor is an initialized cursor. As an 
  2470.                         output parameter, cursor is reset to the first 
  2471.                         attribute in the schema. 
  2472.  
  2473.           status        A pointer to the completion status. On successful 
  2474.                         completion, the routine returns error_status_ok. 
  2475.                         Otherwise, it returns an error. 
  2476.  
  2477.  Usage 
  2478.  
  2479.           The dce_attr_sch_cursor_reset routine resets a dce_attr_cursor_t that 
  2480.           has been allocated by either dce_attr_sch_cursor_init or 
  2481.           dce_attr_sch_cursor_alloc. The reset cursor can then be used to 
  2482.           process a new dce_attr_sch_scan query by reusing the cursor instead 
  2483.           of releasing and re-allocating it. This is a local operation and 
  2484.           makes no remote calls. 
  2485.  
  2486.  Related Information 
  2487.  
  2488.           Routines: 
  2489.           dce_attr_sch_cursor_alloc 
  2490.           dce_attr_sch_cursor_init 
  2491.           dce_attr_sch_scan 
  2492.  
  2493.           Files: 
  2494.           \usr\include\dce\dce_attr_sch.idl - The idl file from which 
  2495.           dce\dce_attr_sch.h was derived. 
  2496.  
  2497.  
  2498. ΓòÉΓòÉΓòÉ 3.3.11. dce_attr_sch_delete_entry ΓòÉΓòÉΓòÉ
  2499.  
  2500.  Purpose 
  2501.  
  2502.           Deletes a schema entry. 
  2503.  
  2504.  Format 
  2505.  
  2506.                     #include <dce\dce_attr_sch.h>
  2507.  
  2508.                     void dce_attr_sch_delete_entry(
  2509.                             dce_attr_sch_handle_t h,
  2510.                             uuid_t *attr_id,
  2511.                             error_status_t *status);
  2512.  
  2513.  Parameters 
  2514.  
  2515.           Input 
  2516.  
  2517.           h             An opaque handle bound to a schema object. Use 
  2518.                         dce_attr_sch_bind to acquire the handle. 
  2519.  
  2520.           attr_id       A pointer to a uuid_t that identifies the schema entry 
  2521.                         to be deleted in the schema bound to by h. 
  2522.  
  2523.           Output 
  2524.  
  2525.           status        A pointer to the completion status. On successful 
  2526.                         completion, the routine returns error_status_ok. 
  2527.                         Otherwise, it returns dce_attr_s_bad_binding. 
  2528.  
  2529.  Usage 
  2530.  
  2531.           The dce_attr_sch_delete_entry routine deletes a schema entry. Because 
  2532.           this is a radical operation that invalidates any existing attributes 
  2533.           of this type on objects dominated by the schema, access to this 
  2534.           operation should be severely limited. 
  2535.  
  2536.  Permissions Required 
  2537.  
  2538.           The dce_attr_sch_delete_entry routine requires appropriate 
  2539.           permissions on the schema object. These permissions are managed by 
  2540.           the target server. 
  2541.  
  2542.  Related Information 
  2543.  
  2544.           Routines: 
  2545.           dce_attr_sch_bind 
  2546.           dce_attr_sch_create_entry 
  2547.           dce_attr_sch_update_entry 
  2548.  
  2549.           Files: 
  2550.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2551.           dce\dce_attr_base.h was derived. 
  2552.  
  2553.  
  2554. ΓòÉΓòÉΓòÉ 3.3.12. dce_attr_sch_get_acl_mgrs ΓòÉΓòÉΓòÉ
  2555.  
  2556.  Purpose 
  2557.  
  2558.           Retrieves the manager types of the ACLs protecting the objects 
  2559.           dominated by a named schema. 
  2560.  
  2561.  Format 
  2562.  
  2563.                     #include  <dce\dce_attr_base.h>
  2564.  
  2565.                     void dce_attr_sch_get_acl_mgrs(
  2566.                             dce_attr_sch_handle_t  h,
  2567.                             unsigned32  size_avail,
  2568.                             unsigned32  *size_used,
  2569.                             unsigned32  *num_acl_mgr_types,
  2570.                             uuid_t  acl_mgr_types[],
  2571.                             error_status_t  *status);
  2572.  
  2573.  Parameters 
  2574.  
  2575.           Input 
  2576.  
  2577.           h             An opaque handle bound to a schema object. Use 
  2578.                         dce_attr_sch_bind to acquire the handle. 
  2579.  
  2580.           size_avail    An unsigned 32-bit integer containing the allocated 
  2581.                         length of the acl_manager_types array. 
  2582.  
  2583.           Output 
  2584.  
  2585.           size_used     An unsigned 32-bit integer containing the number of 
  2586.                         output entries returned in the acl_mgr_types array. 
  2587.  
  2588.           num_acl_mgr_types An unsigned 32-bit integer containing the number of 
  2589.                         types returned in the acl_mgr_types array. This might 
  2590.                         be greater than size_used if there was not enough space 
  2591.                         allocated by size_avail for all the manager types in 
  2592.                         the acl_manager_types array. 
  2593.  
  2594.           acl_mgr_types An array of the length specified in size_avail to 
  2595.                         contain UUIDs (of type uuid_t) identifying the types of 
  2596.                         ACL managers protecting the target object. 
  2597.  
  2598.           status        A pointer to the completion status. On successful 
  2599.                         completion, the routine returns error_status_ok. 
  2600.                         Otherwise, it returns dce_attr_s_not_implemented. 
  2601.  
  2602.  Usage 
  2603.  
  2604.           The dce_attr_sch_get_acl_mgrs routine returns a list of the manager 
  2605.           types protecting the schema object identified by h. 
  2606.  
  2607.           ACL editors and browsers can use this operation to determine the ACL 
  2608.           manager types protecting a selected schema object. Then, using the 
  2609.           dce_attr_sch_aclmgr_strings routine, they can determine how to format 
  2610.           for display the permissions supported by that ACL manager type. 
  2611.  
  2612.  Permissions Required 
  2613.  
  2614.           The dce_attr_sch_get_acl_mgrs routine requires appropriate 
  2615.           permissions on the schema object for which the ACL manager types are 
  2616.           to be returned.  These permissions are managed by the target server. 
  2617.  
  2618.  Related Information 
  2619.  
  2620.           Routines: 
  2621.           dce_attr_sch_bind 
  2622.  
  2623.           Files: 
  2624.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2625.           dce\dce_attr_base.h was derived. 
  2626.  
  2627.  
  2628. ΓòÉΓòÉΓòÉ 3.3.13. dce_attr_sch_lookup_by_id ΓòÉΓòÉΓòÉ
  2629.  
  2630.  Purpose 
  2631.  
  2632.           Reads a schema entry identified by UUID. 
  2633.  
  2634.  Format 
  2635.  
  2636.                     #include <dce\dce_attr_base.h>
  2637.  
  2638.                     void dce_attr_sch_lookup_by_id(
  2639.                             dce_attr_sch_handle_t  h,
  2640.                             uuid_t  *attr_id,
  2641.                             dce_attr_schema_entry_t  *schema_entry,
  2642.                             error_status_t  *status);
  2643.  
  2644.  Parameters 
  2645.  
  2646.           Input 
  2647.  
  2648.           h             An opaque handle bound to a schema object. Use 
  2649.                         dce_attr_sch_bind to acquire the handle. 
  2650.  
  2651.           attr_id       A pointer to a uuid_t that identifies a schema entry. 
  2652.  
  2653.           Output 
  2654.  
  2655.           schema_entry  A dce_attr_schema_entry_t that contains an entry 
  2656.                         identified by attr_id. 
  2657.  
  2658.           status        A pointer to the completion status. On successful 
  2659.                         completion, the routine returns error_status_ok. 
  2660.                         Otherwise, it returns dce_attr_s_bad_binding. 
  2661.  
  2662.  Usage 
  2663.  
  2664.           The dce_attr_sch_lookup_by_id routine reads a schema entry identified 
  2665.           by attr_id. This routine is useful for access by applications. 
  2666.  
  2667.  Permissions Required 
  2668.  
  2669.           The dce_attr_sch_lookup_by_id routine requires appropriate 
  2670.           permissions on the schema object. These permissions are managed by 
  2671.           the target server. 
  2672.  
  2673.  Related Information 
  2674.  
  2675.           Routines: 
  2676.           dce_attr_sch_bind 
  2677.           dce_attr_sch_lookup_by_name 
  2678.           dce_attr_sch_scan 
  2679.  
  2680.           Files: 
  2681.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2682.           dce\dce_attr_base.h was derived. 
  2683.  
  2684.  
  2685. ΓòÉΓòÉΓòÉ 3.3.14. dce_attr_sch_lookup_by_name ΓòÉΓòÉΓòÉ
  2686.  
  2687.  Purpose 
  2688.  
  2689.           Reads a schema entry identified by name. 
  2690.  
  2691.  Format 
  2692.  
  2693.                     #include <dce\dce_attr_base.h>
  2694.  
  2695.                     void dce_attr_sch_lookup_by_name(
  2696.                             dce_attr_sch_handle_t  h,
  2697.                             char  *attr_name,
  2698.                             dce_attr_schema_entry_t  *schema_entry,
  2699.                             error_status_t  *status);
  2700.  
  2701.  Parameters 
  2702.  
  2703.           Input 
  2704.  
  2705.           h             An opaque handle bound to a schema object. Use 
  2706.                         dce_attr_sch_bind to acquire the handle. 
  2707.  
  2708.           attr_name     A pointer to a character string that identifies the 
  2709.                         schema entry. 
  2710.  
  2711.           Output 
  2712.  
  2713.           schema_entry  A dce_attr_schema_entry_t that contains the schema 
  2714.                         entry identified by attr_name. 
  2715.  
  2716.           status        A pointer to the completion status. On successful 
  2717.                         completion, the routine returns error_status_ok. 
  2718.                         Otherwise, it returns dce_attr_s_bad_binding. 
  2719.  
  2720.  Usage 
  2721.  
  2722.           The dce_attr_sch_lookup_by_name routine reads a schema entry 
  2723.           identified by name. This routine is useful with an interactive 
  2724.           editor. 
  2725.  
  2726.  Permissions Required 
  2727.  
  2728.           The dce_attr_sch_lookup_by_name routine requires appropriate 
  2729.           permissions on the schema object. These permissions are managed by 
  2730.           the target server. 
  2731.  
  2732.  Related Information 
  2733.  
  2734.           Routines: 
  2735.           dce_attr_sch_bind 
  2736.           dce_attr_sch_lookup_by_id 
  2737.           dce_attr_sch_scan 
  2738.  
  2739.           Files: 
  2740.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2741.           dce\dce_attr_base.h was derived. 
  2742.  
  2743.  
  2744. ΓòÉΓòÉΓòÉ 3.3.15. dce_attr_sch_scan ΓòÉΓòÉΓòÉ
  2745.  
  2746.  Purpose 
  2747.  
  2748.           Reads a specified number of schema entries. 
  2749.  
  2750.  Format 
  2751.  
  2752.                     #include <dce\dce_attr_base.h>
  2753.  
  2754.                     void dce_attr_sch_scan(
  2755.                             dce_attr_sch_handle_t  h,
  2756.                             dce_attr_cursor_t  *cursor,
  2757.                             unsigned32  num_to_read,
  2758.                             unsigned32  *num_read,
  2759.                             dce_attr_schema_entry_t  schema_entries[        ],
  2760.                             error_status_t *status);
  2761.  
  2762.  Parameters 
  2763.  
  2764.           Input 
  2765.  
  2766.           h             An opaque handle bound to a schema object. Use 
  2767.                         dce_attr_sch_bind to acquire the handle. 
  2768.  
  2769.           num_to_read   An unsigned 32-bit integer specifying the size of the 
  2770.                         schema_entries[] array and the maximum number of 
  2771.                         entries to be returned. 
  2772.  
  2773.           Input\Output 
  2774.  
  2775.           cursor        A pointer to a dce_attr_cursor_t. As input, cursor must 
  2776.                         be allocated and can be initialized. If cursor is not 
  2777.                         initialized, dce_attr_sch_scan initializes it. As 
  2778.                         output, cursor is positioned at the first schema entry 
  2779.                         after the returned entries. 
  2780.  
  2781.           Output 
  2782.  
  2783.           num_read      A pointer to an unsigned 32-bit integer specifying the 
  2784.                         number of entries returned in schema_entries[]. 
  2785.  
  2786.           schema_entries[] A dce_attr_schema_entry_t that contains an array of 
  2787.                         the returned schema entries. 
  2788.  
  2789.           status        A pointer to the completion status. On successful 
  2790.                         completion, the routine returns error_status_ok. 
  2791.                         Otherwise, it returns one of the following errors: 
  2792.  
  2793.                           o  dce_attr_s_bad_binding 
  2794.                           o  edce_attr_s_bad_cursor 
  2795.  
  2796.  Usage 
  2797.  
  2798.           The dce_attr_sch_scan routine reads schema entries. The read begins 
  2799.           at the entry where the input cursor is positioned and ends after the 
  2800.           number of entries specified in num_to_read. 
  2801.  
  2802.           The input cursor must have been allocated by either the 
  2803.           dce_attr_sch_cursor_init or the dce_attr_sch_cursor_alloc routine. If 
  2804.           the input cursor is not initialized, dce_attr_sch_scan initializes 
  2805.           it. If cursor is initialized, dce_attr_sch_scan advances it. 
  2806.  
  2807.           To read all entries in a schema, make successive dce_attr_sch_scan 
  2808.           calls. When all entries have been read, the call returns the message 
  2809.           no_more_entries. 
  2810.  
  2811.           This routine is useful as a browser. 
  2812.  
  2813.  Permissions Required 
  2814.  
  2815.           The dce_attr_sch_scan routine requires appropriate permissions on the 
  2816.           schema object.  These permissions are managed by the target server. 
  2817.  
  2818.  Related Information 
  2819.  
  2820.           Routines: 
  2821.           dce_attr_sch_bind 
  2822.           dce_attr_sch_cursor_init 
  2823.           dce_attr_sch_cursor_alloc 
  2824.           dce_attr_sch_cursor_release 
  2825.  
  2826.           Files: 
  2827.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2828.           dce\dce_attr_base.h was derived. 
  2829.  
  2830.  
  2831. ΓòÉΓòÉΓòÉ 3.3.16. dce_attr_sch_update_entry ΓòÉΓòÉΓòÉ
  2832.  
  2833.  Purpose 
  2834.  
  2835.           Updates a schema entry. 
  2836.  
  2837.  Format 
  2838.  
  2839.                     #include <dce\dce_attr_sch.h>
  2840.  
  2841.                     void dce_attr_sch_update_entry(
  2842.                             dce_attr_sch_handle_t  h,
  2843.                             dce_attr_schema_entry_parts_t  modify_parts,
  2844.                             dce_attr_schema_entry_t  *schema_entry,
  2845.                             error_status_t  *status);
  2846.  
  2847.  Parameters 
  2848.  
  2849.           Input 
  2850.  
  2851.           h             An opaque handle bound to a schema object.  Use 
  2852.                         dce_attr_sch_bind to acquire the handle. 
  2853.  
  2854.           modify_parts  A value of type dce_attr_schema_entry_parts_t that 
  2855.                         identifies the fields in the schema bound to by h that 
  2856.                         can be modified. 
  2857.  
  2858.           schema_entry  A pointer to a dce_attr_schema_entry_t that contains 
  2859.                         the schema entry values for the schema entry to be 
  2860.                         updated. 
  2861.  
  2862.           Output 
  2863.  
  2864.           status        A pointer to the completion status. On successful 
  2865.                         completion, the routine returns error_status_ok. 
  2866.                         Otherwise, it returns dce_attr_s_bad_binding. 
  2867.  
  2868.  Usage 
  2869.  
  2870.           The dce_attr_sch_update_entry routine modifies schema entries. Only 
  2871.           those schema entry fields set to be modified in the 
  2872.           dce_attr_schema_entry_parts_t data type can be modified. 
  2873.  
  2874.           Some schema entry components can never be modified. Instead, to make 
  2875.           any changes to these components, the schema entry must be deleted 
  2876.           (which deletes all attribute instances of that type) and re-created. 
  2877.           These components are: 
  2878.  
  2879.             o  Attribute name 
  2880.             o  Reserved flag 
  2881.             o  Apply defaults flag 
  2882.             o  Intercell action flag 
  2883.             o  Trigger binding 
  2884.             o  Comment 
  2885.  
  2886.           Fields that are arrays of structures (such as acl_mgr_set and 
  2887.           trig_binding) are completely replaced by the new input array.  This 
  2888.           operation cannot be used to add a new element to the existing array. 
  2889.  
  2890.  Permissions Required 
  2891.  
  2892.           The dce_attr_sch_update_entry routine requires appropriate 
  2893.           permissions on the schema object. These permissions are managed by 
  2894.           the target server. 
  2895.  
  2896.  Related Information 
  2897.  
  2898.           Routines: 
  2899.           dce_attr_sch_create_entry 
  2900.           dce_attr_sch_delete_entry 
  2901.  
  2902.           Files: 
  2903.           \usr\include\dce\dce_attr_base.idl - The idl file from which 
  2904.           dce\dce_attr_base.h was derived. 
  2905.  
  2906.  
  2907. ΓòÉΓòÉΓòÉ 3.4. DCE Audit API ΓòÉΓòÉΓòÉ
  2908.  
  2909. The DCE Audit Application Program Interface (API) allows applications to 
  2910. perform auditing and to analyze audit trails. The following give general 
  2911. information about the DCE Audit API and an overview of the parts of the DCE 
  2912. Audit API: 
  2913.  
  2914.    o  Audit API Routines 
  2915.    o  Audit Data Types 
  2916.    o  Environment Variables 
  2917.    o  Permissions Required 
  2918.    o  Related Information 
  2919.  
  2920.  
  2921. ΓòÉΓòÉΓòÉ 3.4.1. Audit API Routines ΓòÉΓòÉΓòÉ
  2922.  
  2923. The following is an alphabetical list of the Audit API routines and their 
  2924. descriptions. The types of application programs that are most likely to call 
  2925. the routines are enclosed in parentheses. 
  2926.  
  2927.  dce_aud_clean       Resets and rewinds the specified the audit trail (audit 
  2928.                      trail analysis and examination tools). 
  2929.  
  2930.  dce_aud_close       Closes an audit trail (client/server applications, audit 
  2931.                      trail analysis and examination tools). 
  2932.  
  2933.  dce_aud_collect     Appends the contents of one audit trail file to the end of 
  2934.                      another audit trail file (audit trail administration and 
  2935.                      examination tools). 
  2936.  
  2937.  dce_aud_commit      Performs the audit actions (client/server applications). 
  2938.  
  2939.  dce_aud_discard     Discards an audit record that releases the memory 
  2940.                      (client/server applications, audit trail analysis and 
  2941.                      examination tools). 
  2942.  
  2943.  dce_aud_first_record Reads the first audit record from a specified audit trail 
  2944.                      file into a buffer. 
  2945.  
  2946.  dce_aud_free_ev_info Frees the memory allocated for an event information 
  2947.                      structure returned from calling the dce_aud_get_ev_info 
  2948.                      routine (audit trail analysis and examination tools). 
  2949.  
  2950.  dce_aud_free_header Frees the memory allocated to a designated audit record 
  2951.                      header structure (audit trail analysis and examination 
  2952.                      tools). 
  2953.  
  2954.  dce_aud_get_ev_info Gets the event-specific information of a specified audit 
  2955.                      record (audit trail analysis and examination tools). 
  2956.  
  2957.  dce_aud_get_header  Gets the header of a specified audit record (audit trail 
  2958.                      analysis and examination tools). 
  2959.  
  2960.  dce_aud_last_record Reads the last audit record from a specified audit trail 
  2961.                      file into a buffer. 
  2962.  
  2963.  dce_aud_length      Gets the length of a specified audit record (client/server 
  2964.                      applications, audit trail analysis and examination tools). 
  2965.  
  2966.  dce_aud_modify_sstrategy Modifies the storage strategy of the audit daemon. 
  2967.  
  2968.  dce_aud_next        Reads the next audit record from a specified audit trail 
  2969.                      into a buffer (audit trail analysis and examination 
  2970.                      tools). 
  2971.  
  2972.  dce_aud_open        Opens a specified audit trail for read or write 
  2973.                      (client/server applications, audit trail analysis and 
  2974.                      examination tools). 
  2975.  
  2976.  dce_aud_print       Formats an audit record into a human-readable form (audit 
  2977.                      trail analysis and examination tools). 
  2978.  
  2979.  dce_aud_prev        Reads the previous audit record from a specified audit 
  2980.                      trail file into a buffer (audit trail analysis and 
  2981.                      examination tools). 
  2982.  
  2983.  dce_aud_put_ev_info Adds event-specific information to a specified audit 
  2984.                      record buffer (client/server applications). 
  2985.  
  2986.  dce_aud_rename      Renames the specified audit trail (audit trail analysis 
  2987.                      and examination tools). 
  2988.  
  2989.  dce_aud_rewind      Rewinds the specified audit trail (audit trail analysis 
  2990.                      and examination tools). 
  2991.  
  2992.  dce_aud_save        Saves the specified audit trail file (audit trail analysis 
  2993.                      and examination tools). 
  2994.  
  2995.  dce_aud_set_local_cell_uuid Obtains the cell's UUID. 
  2996.  
  2997.  dce_aud_set_trail_size_limit Sets a limit to the audit trail size 
  2998.                      (client/server applications). 
  2999.  
  3000.  dce_aud_start       Determines whether a specified event should be audited, 
  3001.                      given the client's binding information and the event 
  3002.                      outcome. If the event should be audited or if it is not 
  3003.                      yet known whether the event should be audited because the 
  3004.                      event outcome is still unknown, memory for the audit 
  3005.                      record descriptor is allocated and the address of this 
  3006.                      memory is returned to the caller (client/server 
  3007.                      applications). 
  3008.  
  3009.  dce_aud_start_with_name Determines whether a specified event should be 
  3010.                      audited, given the client/server name and the event 
  3011.                      outcome.  If the event should be audited or if it is not 
  3012.                      yet known whether the event should be audited because the 
  3013.                      event outcome is still unknown, memory for the audit 
  3014.                      record descriptor is allocated and the address of this 
  3015.                      memory is returned to the caller (client/server 
  3016.                      applications). 
  3017.  
  3018.  dce_aud_start_with_pac Determines whether a specified event should be audited, 
  3019.                      given the client's privilege attribute certificate (PAC) 
  3020.                      and the event outcome. If the event should be audited or 
  3021.                      if it is not yet known whether the event should be audited 
  3022.                      because the event outcome is still unknown, memory for the 
  3023.                      audit record descriptor is allocated and the address of 
  3024.                      this memory is returned to the caller (client/server 
  3025.                      applications). 
  3026.  
  3027.  dce_aud_start_with_server_binding Determines whether a specified event should 
  3028.                      be audited, given the server's binding information and the 
  3029.                      event outcome. If the event should be audited or if it is 
  3030.                      not yet known whether the event should be audited because 
  3031.                      the event outcome is still unknown, memory for the audit 
  3032.                      record descriptor is allocated and the address of this 
  3033.                      memory is returned to the caller (client/server 
  3034.                      applications). 
  3035.  
  3036.  dce_aud_start_with_uuid Determines whether a specified event should be 
  3037.                      audited, given the client/server UUID and the event 
  3038.                      outcome. If the event should be audited, or if the outcome 
  3039.                      of the event is not yet known, the memory for the audit 
  3040.                      record descriptor is allocated and the address of this 
  3041.                      structure is returned to the caller (client/server 
  3042.                      applications). 
  3043.  
  3044.  get_event_name_from_event_number Returns the event name from the event number 
  3045.                      (trail analysis and examination tools). 
  3046.  
  3047.  get_event_number_from_event_name Returns the event number from the event name 
  3048.                      (trail analysis and examination tools). 
  3049.  
  3050.  
  3051. ΓòÉΓòÉΓòÉ 3.4.2. Audit Data Types ΓòÉΓòÉΓòÉ
  3052.  
  3053. The following sections list the data types and structures used by applications 
  3054. to perform auditing and to analyze audit trails. 
  3055.  
  3056.  Event-Specific Information The Audit API routines allow applications to 
  3057.                      include event-specific information in audit records. 
  3058.                      Event-specific information must be represented as 
  3059.                      information items using the following data type: 
  3060.  
  3061.                                           typedef struct {
  3062.                                                   unsigned16  format;
  3063.                                                   union {
  3064.                                                       idl_small_int  small_int;
  3065.                                                       idl_short_int  short_int;
  3066.                                                       idl_long_int  long_int;
  3067.                                                       idl_hyper_int  hyper_int;
  3068.                                                       idl_usmall_int  usmall_int;
  3069.                                                       idl_ushort_int  ushort_int;
  3070.                                                       idl_ulong_int  ulong_int;
  3071.                                                       idl_uhyper_int  uhyper_int;
  3072.                                                       idl_short_float  short_float;
  3073.                                                       idl_long_float  long_float;
  3074.                                                       idl_boolean  boolean;
  3075.                                                       uuid_t  uuid;
  3076.                                                       utc_t  utc;
  3077.                                                       sec_acl_t  *acl;
  3078.                                                       idl_byte  *byte_string;
  3079.                                                       idl_char  *char_string;
  3080.                                                   } data;
  3081.                                           } dce_aud_ev_info_t;
  3082.  
  3083.                      The format field of the preceding data structure defines 
  3084.                      formatting information that is used to determine the type 
  3085.                      of the data referenced by the data field. The following 
  3086.                      table shows possible values of the format field, their 
  3087.                      corresponding data types, and their sizes. 
  3088.  
  3089.                                           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3090.                                           Γöé Table 1. Event Data Format Specifiers                 Γöé
  3091.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3092.                                           Γöé SPECIFIER             Γöé DATA TYPE    Γöé SIZE      Γöé
  3093.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3094.                                           Γöé aud_c_evt_info_small_int      Γöé idl_small_int  Γöé 1 byte     Γöé
  3095.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3096.                                           Γöé aud_c_evt_info_short_int      Γöé idl_short_int  Γöé 2 bytes     Γöé
  3097.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3098.                                           Γöé aud_c_evt_info_long_int      Γöé idl_long_int   Γöé 4 bytes     Γöé
  3099.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3100.                                           Γöé aud_c_evt_info_hyper_int      Γöé idl_hyper_int  Γöé 8 bytes     Γöé
  3101.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3102.                                           Γöé aud_c_evt_info_usmall_int     Γöé idl_usmall_int  Γöé 1 bytes     Γöé
  3103.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3104.                                           Γöé aud_c_evt_info_ushort_int     Γöé idl_ushort_int  Γöé 2 bytes     Γöé
  3105.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3106.                                           Γöé aud_c_evt_info_ulong_int      Γöé idl_ulong_int  Γöé 4 bytes     Γöé
  3107.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3108.                                           Γöé aud_c_evt_info_uhyper_int     Γöé idl_uhyper_int  Γöé 8 bytes     Γöé
  3109.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3110.                                           Γöé aud_c_evt_info_short_float     Γöé idl_short_float Γöé 4 bytes     Γöé
  3111.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3112.                                           Γöé aud_c_evt_info_long_float     Γöé idl_long_float  Γöé 8 bytes     Γöé
  3113.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3114.                                           Γöé aud_c_evt_info_boolean       Γöé idl_boolean   Γöé 1 byte     Γöé
  3115.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3116.                                           Γöé aud_c_evt_info_uuid        Γöé uuid_t      Γöé 16 bytes    Γöé
  3117.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3118.                                           Γöé aud_c_evt_info_utc         Γöé utc_t      Γöé 16 bytes    Γöé
  3119.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3120.                                           Γöé aud_c_evt_info_acl         Γöé sec_acl_t *   Γöé variable size  Γöé
  3121.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3122.                                           Γöé aud_c_evt_info_byte_string     Γöé idl_byte *    Γöé variable size  Γöé
  3123.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3124.                                           Γöé aud_c_evt_info_char_string     Γöé idl_char *    Γöé variable size  Γöé
  3125.                                           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3126.  
  3127.                      Byte strings and character strings are terminated with a 0 
  3128.                      (zero) byte. New data types can be added to this list, if 
  3129.                      they are used frequently. Servers can use the pickling 
  3130.                      service of the IDL compiler to encode complex data types 
  3131.                      into byte strings that are to be included in an audit 
  3132.                      record. 
  3133.  
  3134.  Audit Record Header Data Structure The following data structure is used to 
  3135.                      store header information obtained from an audit record. 
  3136.                      This structure is normally used only by audit trail 
  3137.                      analysis and examination tools. That is, it is hidden from 
  3138.                      client/server applications. 
  3139.  
  3140.                                           typedef struct {
  3141.                                                   unsigned32  format;
  3142.                                                   uuid_t  server;
  3143.                                                   unsigned32  event;
  3144.                                                   unsigned16  outcome;
  3145.                                                   unsigned16  authz_st;
  3146.                                                   uuid_t  client;
  3147.                                                   uuid_t  cell;
  3148.                                                   unsigned16  num_groups;
  3149.                                                   utc_t  time;
  3150.                                                   char  *addr;
  3151.                                                   uuid_t  *groups;
  3152.                                           } dce_aud_hdr_t;
  3153.  
  3154.                           format         Contains the version number of the 
  3155.                                          tail format of the event used for the 
  3156.                                          event-specific information. With this 
  3157.                                          format version number, the audit 
  3158.                                          analysis tools can accommodate changes 
  3159.                                          in the formats of the event-specific 
  3160.                                          information. For example, the 
  3161.                                          event-specific information of an event 
  3162.                                          can initially be defined to be a 
  3163.                                          32-bit integer, and later changed to a 
  3164.                                          character string. Format version 0 
  3165.                                          (zero) is assigned to the initial 
  3166.                                          format for each event. 
  3167.  
  3168.                           server         Contains the UUID of the server that 
  3169.                                          generates the audit record. 
  3170.  
  3171.                           event          Contains the event number. 
  3172.  
  3173.                           outcome        Indicates whether the event failed or 
  3174.                                          succeeded. If the event failed, the 
  3175.                                          reason for the failure is given. 
  3176.  
  3177.                           authz_st       Indicates how the client is 
  3178.                                          authorized: by a name or by a DCE 
  3179.                                          privilege attribute certificate (PAC). 
  3180.  
  3181.                           client         Contains the UUID of the client. 
  3182.  
  3183.                           cell           Contains the UUID of the client cell. 
  3184.  
  3185.                           num_groups     Contains the number of local group 
  3186.                                          privileges the client used for access. 
  3187.  
  3188.                           groups         Contains the UUIDs of the local group 
  3189.                                          privileges that are used by the client 
  3190.                                          for the access. By default, the group 
  3191.                                          information is not included in the 
  3192.                                          header (num_groups is set to 0 in this 
  3193.                                          case), to minimize the size of the 
  3194.                                          audit records. If the group 
  3195.                                          information is deemed as important, it 
  3196.                                          can be included. 
  3197.  
  3198.                                          Information about foreign groups 
  3199.                                          (global groups that do not belong to 
  3200.                                          the same cell where the client is 
  3201.                                          registered) is not included in this 
  3202.                                          version of the audit header but can be 
  3203.                                          included in later versions when global 
  3204.                                          groups are supported. 
  3205.  
  3206.                           time           Contains a timestamp of utc_t type 
  3207.                                          that records the time when the server 
  3208.                                          committed the audit record (that is, 
  3209.                                          after providing the event information 
  3210.                                          through Audit API routine calls). 
  3211.                                          Recording this time, rather than 
  3212.                                          recording the time when the audit 
  3213.                                          record is appended to an audit trail, 
  3214.                                          better maintains the sequence of 
  3215.                                          events. The implementation of the 
  3216.                                          audit subsystem can involve 
  3217.                                          communication between the server and a 
  3218.                                          remote audit daemon, incurring 
  3219.                                          indefinite delays by network problems 
  3220.                                          or intruders. The inaccuracy in the 
  3221.                                          utc_t timestamp can be useful for 
  3222.                                          correlating events. When searching for 
  3223.                                          events in an audit trail that occur 
  3224.                                          within a time interval, if the results 
  3225.                                          of the comparisons between the time of 
  3226.                                          an event and the interval starting and 
  3227.                                          ending times is maybe (because of 
  3228.                                          inaccuracies), the event should be 
  3229.                                          returned. 
  3230.  
  3231.                           addr           Records the client address (port 
  3232.                                          address of the caller). Port addresses 
  3233.                                          are not authenticated. A caller can 
  3234.                                          provide a fraudulent port address to a 
  3235.                                          DCE server. However, if this 
  3236.                                          unauthenticated port address is deemed 
  3237.                                          to be useful information, a DCE server 
  3238.                                          can record this information using this 
  3239.                                          field. 
  3240.  
  3241.                                          The identity of the server cell is not 
  3242.                                          recorded in the header, because of the 
  3243.                                          assumption that all audit records in 
  3244.                                          an audit trail are for servers within 
  3245.                                          a single cell, and implicitly, that 
  3246.                                          the server cell is the local cell. 
  3247.  
  3248.  audit record descriptor An opaque data type, dce_aud_rec_t, is used to 
  3249.                      represent an audit record descriptor. An audit record 
  3250.                      descriptor can be manipulated by the following routines: 
  3251.  
  3252.                        o  These routines return a record descriptor: 
  3253.  
  3254.                                dce_aud_start 
  3255.                                dce_aud_start_with_pac 
  3256.                                dce_aud_start_with_name 
  3257.                                dce_aud_start_with_server_binding 
  3258.                                dce_aud_next 
  3259.  
  3260.                        o  dce_aud_put_ev_info adds event information to an 
  3261.                           audit record through a record descriptor. 
  3262.  
  3263.                        o  These routines get the event and record information 
  3264.                           through a record descriptor: 
  3265.  
  3266.                                dce_aud_get_header 
  3267.                                dce_aud_get_ev_info 
  3268.                                dce_aud_length 
  3269.  
  3270.                        o  The dce_aud_commit routine commits an audit record 
  3271.                           through its descriptor. 
  3272.  
  3273.                        o  The routine dce_aud_discard disposes of a record 
  3274.                           descriptor. The routine dce_aud_discard is necessary 
  3275.                           only after reading the record (that is, after calling 
  3276.                           dce_aud_next). 
  3277.  
  3278.  Audit Trail Descriptor An opaque data type, dce_aud_trail_t, is used to 
  3279.                      represent an audit trail descriptor. The dce_aud_open 
  3280.                      routine opens an audit trail and returns a trail 
  3281.                      descriptor; dce_aud_next obtains an audit record from this 
  3282.                      descriptor; and dce_aud_commit commits an audit record 
  3283.                      from and to an opened audit trail through this descriptor. 
  3284.                      The dce_aud_close routine disposes of this descriptor. 
  3285.  
  3286.  
  3287. ΓòÉΓòÉΓòÉ 3.4.3. Environment Variables ΓòÉΓòÉΓòÉ
  3288.  
  3289. The Audit API routines use the following environment variables: 
  3290.  
  3291.  DCEAUDITOFF                   If this environment variable is defined at the 
  3292.                                time the application is started, auditing is 
  3293.                                turned off. 
  3294.  
  3295.  DCEAUDITON                    If this environment variable is defined at the 
  3296.                                time the application is started, auditing is 
  3297.                                turned on. 
  3298.  
  3299.  DCEAUDITFILTERON              If this environment variable is defined, 
  3300.                                filtering is enabled. 
  3301.  
  3302.  DCEAUDITTRAILSIZE             Sets the limit of the audit trail size. This 
  3303.                                variable overrides the limit set by the 
  3304.                                dce_aud_set_trail_size_limit routine. 
  3305.  
  3306.  Note:  If both the DCEAUDITOFF and DCEAUDITON environment variables are set 
  3307.         before starting the Audit daemon, DCEAUDITOFF takes precedence. 
  3308.  
  3309.  
  3310. ΓòÉΓòÉΓòÉ 3.4.4. Permissions Required ΓòÉΓòÉΓòÉ
  3311.  
  3312. To use an Audit daemon's audit record logging service, you need the log (l) 
  3313. permission to the Audit daemon. 
  3314.  
  3315.  
  3316. ΓòÉΓòÉΓòÉ 3.4.5. Related Information ΓòÉΓòÉΓòÉ
  3317.  
  3318. Books: 
  3319. DCE for OS/2 Warp: Administration Command Reference 
  3320. DCE for OS/2 Warp: Application Development Guide - Core Components 
  3321.  
  3322.  
  3323. ΓòÉΓòÉΓòÉ 3.4.6. dce_aud_clean ΓòÉΓòÉΓòÉ
  3324.  
  3325.  Purpose 
  3326.  
  3327.           Resets and rewinds the specified audit trail file. This routine is 
  3328.           used by the audit trail analysis and examination tools. 
  3329.  
  3330.  Format 
  3331.  
  3332.                     #include <dce\audit.h>
  3333.  
  3334.                     void dce_aud_clean(
  3335.                             dce_aud_trail_t  at,
  3336.                             unsigned32  *status);
  3337.  
  3338.  Parameters 
  3339.  
  3340.           Input 
  3341.  
  3342.           at            A pointer to the descriptor of an audit trail file 
  3343.                         previously opened for writing by the dce_aud_open 
  3344.                         routine. 
  3345.  
  3346.           Output 
  3347.  
  3348.           status        The status code returned by this routine. On successful 
  3349.                         completion, the routine returns aud_s_ok. Otherwise, 
  3350.                         the status code is one of the following: 
  3351.  
  3352.                              aud_s_invalid_trail_descriptor The audit trail 
  3353.                                   descriptor is invalid. 
  3354.  
  3355.                              aud_s_clean_trail_file The chsize call failed on 
  3356.                                   the trail file. 
  3357.  
  3358.                              aud_s_clean_index_file The chsize call failed on 
  3359.                                   the index file. 
  3360.  
  3361.  Usage 
  3362.  
  3363.           The dce_aud_clean routine resets and rewinds the audit trail file to 
  3364.           zero size. This routine can be used to clean up the audit trail file 
  3365.           instantly when the audit trail file is no longer needed The 
  3366.           dce_aud_open routine must be called to specify the desired audit 
  3367.           trail to be reset and rewound. Otherwise, the audit trail file that 
  3368.           is currently set in at will be reset and rewound. 
  3369.  
  3370.           If the call is successful, the file cursors are set to the beginning 
  3371.           of the files. 
  3372.  
  3373.           Storage allocated by this routine must be explicitly freed by a call 
  3374.           to dce_aud_discard with ard as the input parameter. 
  3375.  
  3376.   Related Information 
  3377.  
  3378.           Routines: dce_aud_open 
  3379.           dce_aud_save 
  3380.  
  3381.  
  3382. ΓòÉΓòÉΓòÉ 3.4.7. dce_aud_close ΓòÉΓòÉΓòÉ
  3383.  
  3384.  Purpose 
  3385.  
  3386.           Closes an audit trail file. This routine is used by client/server 
  3387.           applications and audit trail analysis and examination tools. 
  3388.  
  3389.  Format 
  3390.  
  3391.                     #include <dce\audit.h>
  3392.  
  3393.                     void dce_aud_close(
  3394.                             dce_aud_trail_t  at,
  3395.                             unsigned32  *status);
  3396.  
  3397.  Parameters 
  3398.  
  3399.           Input 
  3400.  
  3401.           at            A pointer to an audit trail descriptor returned by a 
  3402.                         previous call to dce_aud_open. 
  3403.  
  3404.           Output 
  3405.  
  3406.           status        A pointer to the completion status.  On successful 
  3407.                         completion, the routine returns aud_s_ok. Otherwise, it 
  3408.                         returns an error. 
  3409.  
  3410.  Usage 
  3411.  
  3412.           The dce_aud_close routine releases data structures of file openings, 
  3413.           RPC bindings, and other memory associated with the audit trail that 
  3414.           is specified by the audit trail descriptor. 
  3415.  
  3416.   Related Information 
  3417.  
  3418.           Routines: 
  3419.           dce_aud_open 
  3420.  
  3421.  
  3422. ΓòÉΓòÉΓòÉ 3.4.8. dce_aud_collect ΓòÉΓòÉΓòÉ
  3423.  
  3424.  Purpose 
  3425.  
  3426.           Appends the contents of one audit trail file to the end of another 
  3427.           audit trail file. This routine is used by the trail administration 
  3428.           and and examination tools. 
  3429.  
  3430.  Format 
  3431.  
  3432.                     #include <dce\audit.h>
  3433.  
  3434.                     void dce_aud_collect(
  3435.                             dce_aud_trail_t  from,
  3436.                             dce_aud_trail_t  to,
  3437.                             unsigned32  *status);
  3438.  
  3439.  Parameters 
  3440.  
  3441.           Input 
  3442.  
  3443.           from          A pointer to the audit trail file descriptor whose 
  3444.                         contents are to be copied. 
  3445.  
  3446.           to            A pointer to the audit trail file descriptor whose 
  3447.                         contents are to be appended with the from audit trail 
  3448.                         file. 
  3449.  
  3450.           Output 
  3451.  
  3452.           status        A pointer to the completion status.  On successful 
  3453.                         completion, the routine returns aud_s_ok. Otherwise, it 
  3454.                         returns one of the following errors: 
  3455.  
  3456.                              aud_s_invalid_trail_descriptor The audit trail 
  3457.                                   descriptor is invalid. 
  3458.  
  3459.                              aud_s_cannot_open_trail_file_rc The fopen call 
  3460.                                   failed on the trail file. 
  3461.  
  3462.                              aud_s_cannot_open_index_file_rc The fopen call 
  3463.                                   failed on the index file. 
  3464.  
  3465.  Usage 
  3466.  
  3467.           The dce_aud_collect routine collects the data from one trail file 
  3468.           (specified in from) and move them to another trail file (specified in 
  3469.           to). This routine is useful when analyzing the audit trail files of 
  3470.           different releases or different systems in a network. 
  3471.  
  3472.           The from and to parameters are returned from a successful 
  3473.           dce_aud_open invocation. 
  3474.  
  3475.   Related Information 
  3476.  
  3477.           Routines: dce_aud_open 
  3478.           dce_aud_save 
  3479.  
  3480.  
  3481. ΓòÉΓòÉΓòÉ 3.4.9. dce_aud_commit ΓòÉΓòÉΓòÉ
  3482.  
  3483.  Purpose 
  3484.  
  3485.           Writes the audit record in the audit trail file. This routine is used 
  3486.           by client/server applications. 
  3487.  
  3488.  Format 
  3489.  
  3490.                     #include <dce\audit.h>
  3491.  
  3492.                     void dce_aud_commit(
  3493.                             dce_aud_trail_t  at,
  3494.                             dce_aud_rec_t  ard,
  3495.                             unsigned32  options,
  3496.                             unsigned16  format,
  3497.                             unsigned32  outcome,
  3498.                             unsigned32  *status);
  3499.  
  3500.  Parameters 
  3501.  
  3502.           Input 
  3503.  
  3504.           at            Designates an audit trail file to which the completed 
  3505.                         audit record is written. The audit trail file must have 
  3506.                         been previously opened by a successful call to the 
  3507.                         dce_aud_open routine. 
  3508.  
  3509.           ard           Designates an audit record descriptor that was returned 
  3510.                         by a previously successful call to one of the 
  3511.                         dce_aud_start_xxx routines. The content of this record 
  3512.                         buffer is appended to the audit trail specified by at. 
  3513.  
  3514.           options       Bitwise OR of option values described below. A value of 
  3515.                         0 for options results in the default operation (normal 
  3516.                         writing to the file without flushing to stable 
  3517.                         storage). The possible option values are: 
  3518.  
  3519.                              aud_c_evt_commit_sync Flushes the audit record to 
  3520.                                   stable storage before the routine returns. 
  3521.  
  3522.                              aud_c_evt_always_ems Unconditionally sends the 
  3523.                                   audit record to EMS as an audit event. 
  3524.  
  3525.                              aud_c_evt_always_log Unconditionally logs the 
  3526.                                   audit record to the audit trail. 
  3527.  
  3528.                              aud_c_evt_always_alarm Unconditionally displays 
  3529.                                   the audit record on the console. If the 
  3530.                                   storage or audit logging service is not 
  3531.                                   available (for example, when the audit trail 
  3532.                                   file is full), the routine keeps on trying 
  3533.                                   until it is able to do a successful write to 
  3534.                                   the stable storage. 
  3535.  
  3536.                              aud_c_evt_commit_sync_no_wait Flush the audit 
  3537.                                   record to stable storage. Returns an error 
  3538.                                   status if the storage or audit logging 
  3539.                                   service is not available. 
  3540.  
  3541.           format        The tail format of the event used for the 
  3542.                         event-specific information. This format can be 
  3543.                         configured by the user. With this format version 
  3544.                         number, the servers and audit analysis tools can 
  3545.                         accommodate changes in the formats of the event 
  3546.                         specific information, or use different formats 
  3547.                         dynamically. 
  3548.  
  3549.           outcome       The event outcome to be stored in the header. The 
  3550.                         possible values are: 
  3551.  
  3552.                              aud_c_esl_cond_success The event completed 
  3553.                                   successfully. 
  3554.  
  3555.                              aud_c_esl_cond_denial The event failed because of 
  3556.                                   access denial. 
  3557.  
  3558.                              aud_c_esl_cond_failure The event failed because of 
  3559.                                   reasons other than access denial. 
  3560.  
  3561.                              aud_c_esl_cond_pending The event is in an 
  3562.                                   intermediate state, and the outcome is 
  3563.                                   pending, being one in a series of connected 
  3564.                                   events, where the application waits to record 
  3565.                                   the real outcome only after the last event. 
  3566.  
  3567.                              aud_c_esl_cond_unknown The event outcome (denial, 
  3568.                                   failure, pending, or success) is not known. 
  3569.                                   This outcome exists only between a 
  3570.                                   dce_aud_start (all varieties of this routine) 
  3571.                                   and the next dce_aud_commit call. You can 
  3572.                                   also use 0 to specify this outcome. 
  3573.  
  3574.           Output 
  3575.  
  3576.           status        Returns the status code from this routine. On 
  3577.                         successful completion, the routine returns aud_s_ok. 
  3578.                         Otherwise, the status code is one of the following: 
  3579.  
  3580.                              aud_s_wrong_protection_level Client used the wrong 
  3581.                                   protection level. 
  3582.  
  3583.                              aud_s_dmn_disabled The daemon is disabled for 
  3584.                                   logging. 
  3585.  
  3586.                              aud_s_log_access_denied The client's access to the 
  3587.                                   audit log was denied. 
  3588.  
  3589.                              aud_s_cannot_gettime The audit library cannot back 
  3590.                                   up a trail file because the utc_gettime 
  3591.                                   routine failed. 
  3592.  
  3593.                              aud_s_cannot_getgmtime The audit library cannot 
  3594.                                   back up a trail file because the utc_gmtime 
  3595.                                   routine failed. 
  3596.  
  3597.                              aud_s_rename_trail_file_rc Cannot rename the audit 
  3598.                                   trail file. 
  3599.  
  3600.                              aud_s_cannot_reopen_trail_file_rc Internally, the 
  3601.                                   audit trail file was being reopened and the 
  3602.                                   reopening of the file failed. 
  3603.  
  3604.                              aud_s_rename_trail_index_file_rc Internally, the 
  3605.                                   audit trail index file was being renamed and 
  3606.                                   the renaming of the file failed. 
  3607.  
  3608.                              aud_s_cannot_reopen_trail_index_file_rc 
  3609.                                   Internally, the audit trail index file was 
  3610.                                   being reopened and the reopening of the file 
  3611.                                   failed. 
  3612.  
  3613.                              aud_s_invalid_record_descriptor The audit record 
  3614.                                   descriptor is not valid. 
  3615.  
  3616.                              aud_s_invalid_outcome The event outcome parameter 
  3617.                                   that was provided is not valid. 
  3618.  
  3619.                              aud_s_outcomes_inconsistent The event outcome 
  3620.                                   parameter is inconsistent with the outcome 
  3621.                                   parameter provided in the dce_aud_start 
  3622.                                   routine. 
  3623.  
  3624.                              aud_s_trl_write_failure The audit record cannot be 
  3625.                                   written to stable storage. 
  3626.  
  3627.                              Status codes passed from dce_aud_discard. 
  3628.                              Status codes passed from 
  3629.                              rpc_binding_inq_auth_caller 
  3630.                              Status codes passed from 
  3631.                              dce_acl_is_client_authorized 
  3632.                              Status codes passed from 
  3633.                              audit_pickle_dencode_ev_info (RPC idl compiler) 
  3634.  
  3635.  Usage 
  3636.  
  3637.           The dce_aud_commit routine determines whether the event should be 
  3638.           audited, given the event outcome. If it should be audited, the 
  3639.           routine completes the audit record identified by ard and writes it to 
  3640.           the audit trail designated by at. If any of the aud_c_evt_always_log 
  3641.           or aud_c_evt_always_alarm options is selected, the event is always 
  3642.           audited (logged, or an alarm message sent to the standard output). 
  3643.  
  3644.           If the aud_c_evt_commit_sync option is selected, the routine attempts 
  3645.           to flush the audit record to stable storage. If the stable storage 
  3646.           write cannot be performed, the routine either continues to try until 
  3647.           the stable-storage write is completed or returns an error status. 
  3648.  
  3649.           Upon successful completion, dce_aud_commit calls dce_aud_discard 
  3650.           internally to release the memory of the audit record that is being 
  3651.           committed. 
  3652.  
  3653.           The caller should not change the outcome between the dce_aud_start 
  3654.           and dce_aud_commit routines arbitrarily. In this case, the outcome 
  3655.           can be made more specific; for example, from aud_c_esl_cond_unknown 
  3656.           to aud_c_esl_cond_success or from aud_c_esl_cond_pending to 
  3657.           aud_c_esl_cond_success. 
  3658.  
  3659.           An outcome change from aud_c_esl_cond_success to 
  3660.           aud_c_esl_cond_denial is not logically correct because the outcome 
  3661.           aud_c_esl_cond_success can have caused a NULL ard to be returned in 
  3662.           this routine. If the final outcome can be aud_c_esl_cond_success, it 
  3663.           should be specified in this routine, or use aud_c_esl_cond_unknown. 
  3664.  
  3665.  Related Information 
  3666.  
  3667.           Routines: 
  3668.           dce_aud_put_ev_info 
  3669.           dce_aud_start 
  3670.           dce_aud_start_with_pac 
  3671.           dce_aud_start_with_name 
  3672.           dce_aud_start_with_server_binding 
  3673.           dce_aud_open 
  3674.  
  3675.  
  3676. ΓòÉΓòÉΓòÉ 3.4.10. dce_aud_discard ΓòÉΓòÉΓòÉ
  3677.  
  3678.  Purpose 
  3679.  
  3680.           Discards an audit record (releases the memory). This routine is used 
  3681.           by client/server applications and trail analysis and examination 
  3682.           tools. 
  3683.  
  3684.  Format 
  3685.  
  3686.                     #include <dce\audit.h>
  3687.  
  3688.                     void dce_aud_discard
  3689.                             dce_aud_rec_t  ard,
  3690.                             unsigned32  *status);
  3691.  
  3692.  Parameters 
  3693.  
  3694.           Input 
  3695.  
  3696.           ard           Designates an audit record descriptor that was returned 
  3697.                         by a previously successful call to one of the 
  3698.                         dce_aud_start_xxx routines or the dce_aud_next routine. 
  3699.  
  3700.           Output 
  3701.  
  3702.           status        The status code returned by this routine. If completed 
  3703.                         successfully, the routine returns aud_s_ok. Otherwise, 
  3704.                         the status code is passed from dce_aud_free_header. 
  3705.  
  3706.  Usage 
  3707.  
  3708.           The dce_aud_discard routine releases the memory used by the audit 
  3709.           record descriptor and the associated audit record that is to be 
  3710.           discarded. 
  3711.  
  3712.  Related Information 
  3713.  
  3714.           Routines: 
  3715.           dce_aud_free_header 
  3716.           dce_aud_next 
  3717.           dce_aud_open 
  3718.           dce_aud_prev 
  3719.           dce_aud_start 
  3720.           dce_aud_start_with_name 
  3721.           dce_aud_start_with_pac 
  3722.           dce_aud_start_with_server_binding 
  3723.  
  3724.  
  3725. ΓòÉΓòÉΓòÉ 3.4.11. dce_aud_first_record ΓòÉΓòÉΓòÉ
  3726.  
  3727.  Purpose 
  3728.  
  3729.           Reads the first audit record from a specified audit trail file into a 
  3730.           buffer. Used by the trail analysis and examination tools. 
  3731.  
  3732.  Format 
  3733.  
  3734.                     #include <dce\audit.h>
  3735.  
  3736.                     void dce_aud_first_record(
  3737.                             dce_aud_trail_t  at,
  3738.                             unsigned16  format,
  3739.                             dce_aud_rec_t  *ard,
  3740.                             unsigned32  *status);
  3741.  
  3742.  Parameters 
  3743.  
  3744.           Input 
  3745.  
  3746.           at            A pointer to the descriptor of an audit trail file 
  3747.                         previously opened for reading by the dce_aud_open 
  3748.                         routine. 
  3749.  
  3750.           format        The event's tail format used for the event-specific 
  3751.                         information. This format can be configured by the user. 
  3752.                         With this format version number, the servers and audit 
  3753.                         analysis tools can accommodate changes in the formats 
  3754.                         of the event specification information, or use 
  3755.                         different formats dynamically. 
  3756.  
  3757.           Output 
  3758.  
  3759.           ard           A pointer to the audit record descriptor containing the 
  3760.                         returned record. 
  3761.  
  3762.           status        The status code returned by this routine.  On 
  3763.                         successful completion, the routine returns aud_s_ok. 
  3764.                         Otherwise, it returns one of the following errors: 
  3765.  
  3766.                              aud_s_invalid_trail_descriptor The audit trail 
  3767.                                   descriptor is invalid. 
  3768.  
  3769.                              aud_s_trail_file_corrupted The audit trail file is 
  3770.                                   corrupted. 
  3771.  
  3772.                              aud_s_index_file_corrupted The audit index trail 
  3773.                                   file is corrupted. 
  3774.  
  3775.                              aud_s_cannot_allocate_memory_rc The malloc call 
  3776.                                   failed. 
  3777.  
  3778.                                        Status codes passed from 
  3779.                                        idl_es_decode_buffer. 
  3780.  
  3781.                                        Status codes passed from 
  3782.                                        idl_es_handle_free. 
  3783.  
  3784.                                        Status codes passed from 
  3785.                                        audit_pickle_dencode_ev_info. 
  3786.  
  3787.  Usage 
  3788.  
  3789.           The dce_aud_first_record routine reads the first record from the 
  3790.           audit trail file which is specified by the audit trail descriptor, 
  3791.           at. The routine can be used to examine the first audit record written 
  3792.           to the audit trail file. It is very useful after the audit trail file 
  3793.           is wrapped around or cleaned up. 
  3794.  
  3795.           If no record is found, a value of zero (NULL) is returned in ard. The 
  3796.           value in ard can be supplied as an input parameter to the following 
  3797.           routines: 
  3798.  
  3799.                dce_aud_discard 
  3800.  
  3801.                dce_aud_get_ev_info 
  3802.  
  3803.                dce_aud_get_event 
  3804.  
  3805.                dce_aud_get_header 
  3806.  
  3807.                dce_aud_length 
  3808.  
  3809.                dce_aud_print 
  3810.  
  3811.           If the routine successfully reads an audit trail record, the cursor 
  3812.           associated with the audit trail descriptor, at, is moved to the 
  3813.           second record in the audit trail file. If no record can be found in 
  3814.           the audit trail file, an ard value of NULL is returned and the cursor 
  3815.           is set back to the beginning of the audit trail. If a call is 
  3816.           unsuccessful, the position of the cursor does not change. 
  3817.  
  3818.  Notes 
  3819.  
  3820.           Storage allocated by this routine must be explicitly freed by a call 
  3821.           to dce_aud_discard with ard as the input parameter. 
  3822.  
  3823.  Related Information 
  3824.  
  3825.           Routines: dce_aud_next 
  3826.           dce_aud_prev 
  3827.           dce_aud_get_header 
  3828.           dce_aud_get_ev_info 
  3829.           dce_aud_open 
  3830.           dce_aud_discard 
  3831.           dce_aud_print 
  3832.           dce_aud_get_event 
  3833.  
  3834.  
  3835. ΓòÉΓòÉΓòÉ 3.4.12. dce_aud_free_ev_info ΓòÉΓòÉΓòÉ
  3836.  
  3837.  Purpose 
  3838.  
  3839.           Frees the memory allocated for an event information structure 
  3840.           returned from calling dce_aud_get_ev_info. This routine is used by 
  3841.           the audit trail analysis and examination tools. 
  3842.  
  3843.  Format 
  3844.  
  3845.                     #include <dce\audit.h>
  3846.  
  3847.                     void dce_aud_free_ev_info(
  3848.                             dce_aud_ev_info_t  *event_info,
  3849.                             unsigned32  *status);
  3850.  
  3851.  Parameters 
  3852.  
  3853.           Input 
  3854.  
  3855.           event_info    Designates an event-specific information item returned 
  3856.                         from a previously successful call to the 
  3857.                         dce_aud_get_ev_info routine. 
  3858.  
  3859.           Output 
  3860.  
  3861.           status        The status code returned by this routine. If 
  3862.                         successful, the routine returns aud_s_ok. 
  3863.  
  3864.  Usage 
  3865.  
  3866.           The dce_aud_free_ev_info routine frees the memory allocated for an 
  3867.           event information structure returned by a previously successful call 
  3868.           to the dce_aud_get_ev_info routine. 
  3869.  
  3870.  Related Information 
  3871.  
  3872.           Routines: dce_aud_get_ev_info 
  3873.           dce_aud_next 
  3874.  
  3875.  
  3876. ΓòÉΓòÉΓòÉ 3.4.13. dce_aud_free_header ΓòÉΓòÉΓòÉ
  3877.  
  3878.  Purpose 
  3879.  
  3880.           Frees the memory allocated to a designated audit record header 
  3881.           structure. This routine is used by the audit trail analysis and 
  3882.           examination tools. 
  3883.  
  3884.  Format 
  3885.  
  3886.                     #include <dce\audit.h>
  3887.  
  3888.                     void dce_aud_free_header(
  3889.                             dce_aud_hdr_t  *header,
  3890.                             unsigned32  *status);
  3891.  
  3892.  Parameters 
  3893.  
  3894.           Input 
  3895.  
  3896.           ard           Designates a pointer to an audit record header 
  3897.                         structure that was returned by a previously successful 
  3898.                         call to the dce_aud_get_header routine. 
  3899.  
  3900.           Output 
  3901.  
  3902.           status        The status code returned by this routine. If 
  3903.                         successful, the routine returns aud_s_ok. 
  3904.  
  3905.  Usage 
  3906.  
  3907.           The dce_aud_free_header frees the memory allocated to a designated 
  3908.           audit record header structure. The designated audit record header is 
  3909.           usually obtained from an audit record by calling dce_aud_get_header. 
  3910.  
  3911.  Related Information 
  3912.  
  3913.           Routines: 
  3914.           dce_aud_get_header 
  3915.           dce_aud_open 
  3916.           dce_aud_next 
  3917.  
  3918.  
  3919. ΓòÉΓòÉΓòÉ 3.4.14. dce_aud_get_ev_info ΓòÉΓòÉΓòÉ
  3920.  
  3921.  Purpose 
  3922.  
  3923.           Returns a pointer to an event information structure 
  3924.           (dce_aud_ev_info_t). This routine is used by the audit trail analysis 
  3925.           and examination tools. 
  3926.  
  3927.  Format 
  3928.  
  3929.                     #include <dce\audit.h>
  3930.  
  3931.                     void dce_aud_get_ev_info(
  3932.                             dce_aud_rec_t  ard,
  3933.                             dce_aud_ev_info_t  **event_info,
  3934.                             unsigned32  *status);
  3935.  
  3936.  Parameters 
  3937.  
  3938.           Input 
  3939.  
  3940.           ard           Designates an audit record descriptor that was returned 
  3941.                         by a previously successful call to the dce_aud_next 
  3942.                         routine. 
  3943.  
  3944.           Output 
  3945.  
  3946.           event_info    Returns an event-specific information item of the 
  3947.                         designated audit record. Returns NULL if there are no 
  3948.                         more information items. 
  3949.  
  3950.           status        The status code returned by this routine. If 
  3951.                         successful, the routine returns aud_s_ok. If not, the 
  3952.                         status code contains the following error: 
  3953.  
  3954.                              aud_s_invalid_record_descriptor The audit record 
  3955.                                   descriptor is not valid. 
  3956.  
  3957.  Usage 
  3958.  
  3959.           The dce_aud_get_ev_info routine returns a pointer to an event 
  3960.           information structure. The designated record is usually obtained from 
  3961.           an audit trail by calling dce_aud_open and dce_aud_next. If there is 
  3962.           more than one item of event-specific information in the audit record, 
  3963.           one item is returned through one call to dce_aud_get_ev_info. The 
  3964.           order the items are returned in is the same as the order that they 
  3965.           were included in the audit record through dce_aud_put_ev_info 
  3966.           routines. This routine allocates the memory to hold the 
  3967.           human-readable representation of the audit record and returns the 
  3968.           address of this memory. 
  3969.  
  3970.  Related Information 
  3971.  
  3972.           Routines: 
  3973.           dce_aud_next 
  3974.           dce_aud_open 
  3975.           dce_aud_prev 
  3976.  
  3977.  
  3978. ΓòÉΓòÉΓòÉ 3.4.15. dce_aud_get_event ΓòÉΓòÉΓòÉ
  3979.  
  3980.  Purpose 
  3981.  
  3982.           Searches and gets an event in the audit trail file. This routine is 
  3983.           used by the trail administration and examination tools. 
  3984.  
  3985.  Format 
  3986.  
  3987.                     #include <dce\audit.h>
  3988.  
  3989.                     void dce_aud_get_event(
  3990.                             dce_aud_trail_t  at,
  3991.                             unsigned32  event,
  3992.                             int  order,
  3993.                             dce_aud_rect_t  *ard,
  3994.                             unsigned32  *status);
  3995.  
  3996.  Parameters 
  3997.  
  3998.           Input 
  3999.  
  4000.           at            A pointer to the descriptor of an audit trail file 
  4001.                         previously opened for reading by the dce_aud_open 
  4002.                         routine. 
  4003.  
  4004.           event         The event to be searched. 
  4005.  
  4006.           order         The type of search: successor (1) or predecessor (0). 
  4007.  
  4008.           Output 
  4009.  
  4010.           ard           A pointer to the audit record descriptor containing the 
  4011.                         returned record. 
  4012.  
  4013.           status        The status code returned by this routine. If 
  4014.                         successful, the routine returns aud_s_ok. If not, the 
  4015.                         status code contains one of the following: 
  4016.  
  4017.                              aud_s_invalid_trail_descriptor The audit trail 
  4018.                                   descriptor is not valid. 
  4019.  
  4020.                              aud_s_cannot_allocate_memory_rc The malloc call 
  4021.                                   failed. 
  4022.  
  4023.                                        Status codes from idl_es_decode_buffer. 
  4024.  
  4025.                                        Status codes from idl_es_handle_free. 
  4026.  
  4027.                                        Status codes from 
  4028.                                        audit_pickle_dencode_ev_info. 
  4029.  
  4030.  Usage 
  4031.  
  4032.           The dce_aud_get_event routine attempts to search a specified event in 
  4033.           the audit trail file. This routine uses the fast Two-Dimensional 
  4034.           Algorithm to search and read the record into the buffer. The search 
  4035.           can be specified in successor order (order is 1) or predecessor order 
  4036.           (order is 0). A subsequence call searches and reads one record after 
  4037.           or one record before into the buffer as do the dce_aud_next and 
  4038.           dce_aud_prev routines. 
  4039.  
  4040.           The dce_aud_get_event routine can be used to search for all the event 
  4041.           records that have the same event number recorded in the audit trail 
  4042.           file. Although dce_aud_next or dce_aud_prev can output the same 
  4043.           results when the predicate parameter is set to EVENT=value, they 
  4044.           sequentially read all the records in the audit trail file from top to 
  4045.           bottom or vice versa to search for the right ones. Therefore, the 
  4046.           search is very slow. 
  4047.  
  4048.           If a call is successful (that is, an appropriate record matched the 
  4049.           event number) the record is read into the buffer. The value of ard 
  4050.           can be supplied as an input parameter value to the following 
  4051.           routines: 
  4052.  
  4053.                dce_aud_print 
  4054.  
  4055.                dce_aud_get_header 
  4056.  
  4057.                dce_aud_get_ev_info 
  4058.  
  4059.                dce_aud_discard 
  4060.  
  4061.                dce_aud_length 
  4062.  
  4063.           If no appropriate record matched the event number, an ard value of 
  4064.           NULL is returned. 
  4065.  
  4066.  Related Information 
  4067.  
  4068.           Routines: 
  4069.           dce_aud_next 
  4070.           dce_aud_open 
  4071.           dce_aud_prev 
  4072.  
  4073.  
  4074. ΓòÉΓòÉΓòÉ 3.4.16. dce_aud_get_header ΓòÉΓòÉΓòÉ
  4075.  
  4076.  Purpose 
  4077.  
  4078.           Gets the header of a specified audit record. This routine is used by 
  4079.           the audit trail analysis and examination tools. 
  4080.  
  4081.  Format 
  4082.  
  4083.                     #include <dce\audit.h>
  4084.  
  4085.                     void dce_aud_get_header(
  4086.                             dce_aud_rec_t  ard,
  4087.                             dce_aud_hdr_t  **header,
  4088.                             unsigned32  *status);
  4089.  
  4090.  Parameters 
  4091.  
  4092.           Input 
  4093.  
  4094.           ard           Designates an audit record descriptor that was returned 
  4095.                         by a previously successful call to the dce_aud_next 
  4096.                         routine. 
  4097.  
  4098.           Output 
  4099.  
  4100.           header        Returns the header information of the designated audit 
  4101.                         record. 
  4102.  
  4103.           status        The status code returned by this routine. If 
  4104.                         successful, the routine returns aud_s_ok. If not, the 
  4105.                         status code contains the following error: 
  4106.  
  4107.                              aud_s_invalid_record_descriptor The audit record 
  4108.                                   descriptor is not valid. 
  4109.  
  4110.  Usage 
  4111.  
  4112.           The dce_aud_get_header routine gets the header information of a 
  4113.           designated audit record. The designated record is usually obtained 
  4114.           from an audit trail by calling dce_aud_open and dce_aud_next. 
  4115.  
  4116.  Related Information 
  4117.  
  4118.           Routines: 
  4119.           dce_aud_next 
  4120.           dce_aud_open 
  4121.           dce_aud_prev 
  4122.  
  4123.  
  4124. ΓòÉΓòÉΓòÉ 3.4.17. dce_aud_last_record ΓòÉΓòÉΓòÉ
  4125.  
  4126.  Purpose 
  4127.  
  4128.           Reads the last audit record from a specified audit trail file into a 
  4129.           buffer. Used by the trail analysis and examination tools. 
  4130.  
  4131.  Format 
  4132.  
  4133.                     #include <dce\audit.h>
  4134.  
  4135.                     void dce_aud_last_record(
  4136.                             dce_aud_trail_t  at,
  4137.                             unsigned16  format,
  4138.                             dce_aud_rec_t  *ard,
  4139.                             unsigned32  *status);
  4140.  
  4141.  Parameters 
  4142.  
  4143.           Input 
  4144.  
  4145.           at            A pointer to the descriptor of an audit trail file 
  4146.                         previously opened for reading by the dce_aud_open 
  4147.                         routine. 
  4148.  
  4149.           format        The event's tail format used for the event-specific 
  4150.                         information. This format can be configured by the user. 
  4151.                         With this format version number, the servers and audit 
  4152.                         analysis tools can accommodate changes in the formats 
  4153.                         of the event specification information, or use 
  4154.                         different formats dynamically. 
  4155.  
  4156.           Output 
  4157.  
  4158.           ard           A pointer to the audit record descriptor containing the 
  4159.                         returned record. 
  4160.  
  4161.           status        The status code returned by this routine.  On 
  4162.                         successful completion, the routine returns aud_s_ok. 
  4163.                         Otherwise, it returns one of the following errors: 
  4164.  
  4165.                              aud_s_invalid_trail_descriptor The audit trail 
  4166.                                   descriptor is invalid. 
  4167.  
  4168.                              aud_s_trail_file_corrupted The audit trail file is 
  4169.                                   corrupted. 
  4170.  
  4171.                              aud_s_index_file_corrupted The audit index file is 
  4172.                                   corrupted. 
  4173.  
  4174.                              aud_s_cannot_allocate_memory_rc The malloc call 
  4175.                                   failed. 
  4176.  
  4177.                                        Status codes passed from 
  4178.                                        idl_es_decode_buffer. 
  4179.  
  4180.                                        Status codes passed from 
  4181.                                        idl_es_handle_free 
  4182.  
  4183.                                        Status codes passed from 
  4184.                                        audit_pickle_dencode_ev_info. 
  4185.  
  4186.  Usage 
  4187.  
  4188.           The dce_aud_last_record routine reads the last record from the audit 
  4189.           trail file which is specified by the audit trail descriptor, at. The 
  4190.           routine can be used to examine the latest (current) audit record 
  4191.           written to the audit trail file. It is very useful after the audit 
  4192.           trail file is wrapped around or cleaned up. 
  4193.  
  4194.           If no record is found, a value of zero (NULL) is returned in ard. The 
  4195.           value in ard can be supplied as an input parameter to the following 
  4196.           routines: 
  4197.  
  4198.                dce_aud_discard 
  4199.  
  4200.                dce_aud_get_ev_info 
  4201.  
  4202.                dce_aud_get_event 
  4203.  
  4204.                dce_aud_get_header 
  4205.  
  4206.                dce_aud_length 
  4207.  
  4208.                dce_aud_print 
  4209.  
  4210.           If the routine successfully reads an audit trail record, the cursor 
  4211.           associated with the audit trail descriptor, at, is moved to the 
  4212.           second record in the audit trail file. If no record can be found in 
  4213.           the audit trail file, an ard value of NULL is returned and the cursor 
  4214.           is set back to the beginning of the audit trail. If a call is 
  4215.           unsuccessful, the position of the cursor does not change. 
  4216.  
  4217.  Notes 
  4218.  
  4219.           Storage allocated by this routine must be explicitly freed by a call 
  4220.           to dce_aud_discard with ard as the input parameter. 
  4221.  
  4222.  Related Information 
  4223.  
  4224.           Routines: dce_aud_next 
  4225.           dce_aud_prev 
  4226.           dce_aud_get_header 
  4227.           dce_aud_get_ev_info 
  4228.           dce_aud_open 
  4229.           dce_aud_discard 
  4230.           dce_aud_print 
  4231.           dce_aud_get_event 
  4232.           dce_aud_length 
  4233.  
  4234.  
  4235. ΓòÉΓòÉΓòÉ 3.4.18. dce_aud_length ΓòÉΓòÉΓòÉ
  4236.  
  4237.  Purpose 
  4238.  
  4239.           Gets the length of a specified audit record. This routine is used by 
  4240.           client/server applications and trail analysis and examination tools. 
  4241.  
  4242.  Format 
  4243.  
  4244.                     #include <dce\audit.h>
  4245.  
  4246.                     unsigned32 dce_aud_length(
  4247.                             dce_aud_rec_t  ard,
  4248.                             unsigned32  *status);
  4249.  
  4250.  Parameters 
  4251.  
  4252.           Input 
  4253.  
  4254.           ard           Designates an audit record descriptor that was returned 
  4255.                         by a previously successful call to dce_aud_next, or one 
  4256.                         of the dce_aud_start_xxx routines. 
  4257.  
  4258.           Output 
  4259.  
  4260.           status        The status code returned by this routine. If 
  4261.                         successful, the routine returns aud_s_ok. If not, the 
  4262.                         status code contains one of the following errors: 
  4263.  
  4264.                              aud_s_invalid_record_descriptor The audit record 
  4265.                                   descriptor is not valid. 
  4266.  
  4267.                              Status codes passed from idl_es_encode_dyn_buffer. 
  4268.                              Status codes passed from 
  4269.                              audit_pickle_dencode_ev_info (RPC IDL compiler). 
  4270.                              Status codes passed from idl_es_handle_free. 
  4271.                              Status codes passed from rpc_sm_client_free. 
  4272.  
  4273.  Usage 
  4274.  
  4275.           The dce_aud_length routine gets the length of a designated audit 
  4276.           record. The designated record (in binary format) can be obtained from 
  4277.           an audit trail by calling the dce_aud_open and dce_aud_next routines. 
  4278.  
  4279.           Applications can use this routine to know how much space an audit 
  4280.           record uses before it is committed. This routine can also be used by 
  4281.           audit trail analysis and examination tools to determine the space 
  4282.           that a previously committed audit record uses before it is read. 
  4283.  
  4284.  Return Values 
  4285.  
  4286.           The size of the specified audit record in number of bytes. 
  4287.  
  4288.  Related Information 
  4289.  
  4290.           Routines: 
  4291.           dce_aud_next 
  4292.           dce_aud_open 
  4293.           dce_aud_prev 
  4294.           dce_aud_put_ev_info 
  4295.           dce_aud_start 
  4296.           dce_aud_start_with_name 
  4297.           dce_aud_start_with_pac 
  4298.           dce_aud_start_with_server_binding 
  4299.  
  4300.  
  4301. ΓòÉΓòÉΓòÉ 3.4.19. dce_aud_modify_sstrategy ΓòÉΓòÉΓòÉ
  4302.  
  4303.  Purpose 
  4304.  
  4305.           Modifies the storage strategy of the audit daemon. 
  4306.  
  4307.  Format 
  4308.  
  4309.                     #include <dce\audit.h>
  4310.  
  4311.                     void dce_aud_modify_sstrategy(
  4312.                             dce_aud_trail_t  h,
  4313.                             unsigned32  *strgy,
  4314.                             error_status_t  *status);
  4315.  
  4316.  Parameters 
  4317.  
  4318.           Input 
  4319.  
  4320.           h             A pointer to the descriptor of an audit trail file 
  4321.                         previously opened by dce_aud_open. 
  4322.  
  4323.           strgy         This states the storage strategy. Possible values for 
  4324.                         strgy are: 
  4325.  
  4326.                              SAVE      The trail, when full, is backed up, 
  4327.                                        renamed with a timestamp, and then 
  4328.                                        written to the original trail again. 
  4329.  
  4330.                              WRAP      The trail, when full, returns to the 
  4331.                                        beginning of the file, and overwrites 
  4332.                                        previously written records. 
  4333.  
  4334.           Output 
  4335.  
  4336.           status        A pointer to the completion status.  On successful 
  4337.                         completion, the routine returns aud_s_ok. 
  4338.  
  4339.  Usage 
  4340.  
  4341.           The dce_aud_modify_sstrategy routine is an administrative operation 
  4342.           that modifies the storage strategy on the audit deamon. It defines 
  4343.           what the daemon does if the audit trail storage is full. 
  4344.  
  4345.  Related Information 
  4346.  
  4347.           Routines: 
  4348.           dce_aud_open 
  4349.  
  4350.  
  4351. ΓòÉΓòÉΓòÉ 3.4.20. dce_aud_next ΓòÉΓòÉΓòÉ
  4352.  
  4353.  Purpose 
  4354.  
  4355.           Reads the next audit record from a specified audit trail file into a 
  4356.           buffer. This routine is used by the trail analysis and examination 
  4357.           tools. 
  4358.  
  4359.  Format 
  4360.  
  4361.                     #include <dce\audit.h>
  4362.  
  4363.                     void dce_aud_next(
  4364.                             dce_aud_trail_t  at,
  4365.                             char  *predicate,
  4366.                             unsigned16  format,
  4367.                             dce_aud_rec_t  *ard,
  4368.                             unsigned32  *status;
  4369.  
  4370.  Parameters 
  4371.  
  4372.           Input 
  4373.  
  4374.           at            A pointer to the descriptor of an audit trail file 
  4375.                         previously opened for reading by the routine 
  4376.                         dce_aud_open. 
  4377.  
  4378.           predicate     Criteria for selecting the audit records that are to be 
  4379.                         read from the audit trail file. A predicate statement 
  4380.                         consists of an attribute and its value, separated by 
  4381.                         any of the following operators: = (equal to), < (less 
  4382.                         than), and > (greater than): 
  4383.  
  4384.                           o  attribute=value 
  4385.                           o  attribute>value 
  4386.                           o  attribute<value 
  4387.  
  4388.                         Attribute names are case-sensitive, and no space is 
  4389.                         allowed within a predicate expression. Multiple 
  4390.                         predicates are delimited by a comma, of the form: 
  4391.  
  4392.                         attribute1=value1,attribute2>value2,... 
  4393.  
  4394.                         No space is allowed between predicates. 
  4395.  
  4396.                         Note:  When multiple predicates are defined the values 
  4397.                                are logically ANDed together. 
  4398.  
  4399.                         The possible attribute names, their values, and 
  4400.                         allowable operators are: 
  4401.  
  4402.                              SERVER              The UUID of the server 
  4403.                                                  principal that generated the 
  4404.                                                  record. The attribute value 
  4405.                                                  must be a UUID string. 
  4406.                                                  Operator allowed: =. 
  4407.  
  4408.                              EVENT               The audit event number. The 
  4409.                                                  attribute value must be an 
  4410.                                                  integer. Operator allowed: =. 
  4411.  
  4412.                              OUTCOME             The event outcome of the 
  4413.                                                  record. The possible attribute 
  4414.                                                  values are SUCCESS, FAILURE, 
  4415.                                                  DENIAL, and PENDING. Operator 
  4416.                                                  allowed: =. 
  4417.  
  4418.                              STATUS              The authorization status of 
  4419.                                                  the client. The possible 
  4420.                                                  attribute values are DCE for 
  4421.                                                  DCE authorization (PAC based), 
  4422.                                                  and NAME for name-based 
  4423.                                                  authorization. Operator 
  4424.                                                  allowed: =. 
  4425.  
  4426.                              CLIENT              The UUID of the client 
  4427.                                                  principal. The attribute value 
  4428.                                                  must be a UUID string. 
  4429.                                                  Operator allowed: =. 
  4430.  
  4431.                              TIME                The time the record was 
  4432.                                                  generated. The attribute value 
  4433.                                                  must be a null-terminated 
  4434.                                                  string that expresses an 
  4435.                                                  absolute time. Operators 
  4436.                                                  allowed: <=, <, >=, and >. 
  4437.  
  4438.                              CELL                The UUID of the client's cell. 
  4439.                                                  The attribute value must be a 
  4440.                                                  UUID string. Operator allowed: 
  4441.                                                  =. 
  4442.  
  4443.                              GROUP               The UUID of one of the 
  4444.                                                  client's groups. The attribute 
  4445.                                                  value must be a UUID string. 
  4446.                                                  Operator allowed: =. 
  4447.  
  4448.                              ADDR                The address of the client. The 
  4449.                                                  attribute is typically the 
  4450.                                                  string representation of an 
  4451.                                                  RPC binding handle. Operator 
  4452.                                                  allowed: =. 
  4453.  
  4454.                              FORMAT              The format version number of 
  4455.                                                  the audit event record. The 
  4456.                                                  attribute value must be an 
  4457.                                                  integer. Operators allowed: =, 
  4458.                                                  <, and >. 
  4459.  
  4460.                         If the predicate parameter is a NULL pointer, the next 
  4461.                         record in the audit trail file is returned. 
  4462.  
  4463.           format        The event tail format used for the event-specific 
  4464.                         information. This format can be configured by the user. 
  4465.                         With this format version number, the servers and audit 
  4466.                         analysis tools can accommodate changes in the formats 
  4467.                         of the event-specific information, or use different 
  4468.                         formats dynamically. 
  4469.  
  4470.           Output 
  4471.  
  4472.           ard           A pointer to the audit record descriptor containing the 
  4473.                         returned record. 
  4474.  
  4475.           status        Returns the status code from this routine. If 
  4476.                         successful, the routine returns aud_s_ok. If not, the 
  4477.                         status code contains one of the following errors: 
  4478.  
  4479.                              aud_s_invalid_trail_descriptor The audit trail 
  4480.                                   descriptor is not valid. 
  4481.  
  4482.                              aud_s_trail_file_corrupted The trail file is 
  4483.                                   corrupted. 
  4484.  
  4485.                              aud_s_cannot_allocate_memory The malloc routine 
  4486.                                   failed. 
  4487.  
  4488.                              Status codes passed from idl_es_decode_buffer. 
  4489.                              Status codes passed from idl_es_handle_free. 
  4490.                              Status codes passed from 
  4491.                              audit_pickle_dencode_ev_info (RPC IDL compiler). 
  4492.  
  4493.  Usage 
  4494.  
  4495.           The dce_aud_next routine attempts to read the next record from the 
  4496.           audit trail that is specified by the audit trail descriptor, at. This 
  4497.           routine also defines the predicate to be used to search for the next 
  4498.           record and returns a matching record if one exists. The dce_aud_next 
  4499.           routine can be used to search for successive records in the trail 
  4500.           that match the defined predicate. By default, if no predicate is 
  4501.           explicitly defined, the routine returns the next record read from the 
  4502.           audit trail. 
  4503.  
  4504.           If no record satisfies the predicate specified for the call, a value 
  4505.           of 0 (zero) is returned in ard. 
  4506.  
  4507.           The value returned in ard can be supplied as an input parameter to 
  4508.           the routines dce_aud_get_header, dce_aud_length, dce_aud_get_ev_info, 
  4509.           and dce_aud_discard. 
  4510.  
  4511.           Storage allocated by this routine must be explicitly freed by a call 
  4512.           to dce_aud_discard with ard as the input parameter. 
  4513.  
  4514.           If the routine successfully reads an audit trail record, the cursor 
  4515.           associated with the audit trail descriptor at is advanced to the next 
  4516.           record in the audit trail. 
  4517.  
  4518.           If no appropriate record can be found in the audit trail, an ard 
  4519.           value of 0 (zero) is returned and the cursor is advanced to the end 
  4520.           of the audit trail. If a call is unsuccessful, the position of the 
  4521.           cursor does not change. 
  4522.  
  4523.  Related Information 
  4524.  
  4525.           Routines: 
  4526.           dce_aud_discard 
  4527.           dce_aud_get_ev_info 
  4528.           dce_aud_get_header 
  4529.           dce_aud_length 
  4530.           dce_aud_open 
  4531.           dce_aud_prev 
  4532.  
  4533.  
  4534. ΓòÉΓòÉΓòÉ 3.4.21. dce_aud_open ΓòÉΓòÉΓòÉ
  4535.  
  4536.  Purpose 
  4537.  
  4538.           Opens a specified audit trail file for read or write. This routine is 
  4539.           used by client/server applications and trail analysis and examination 
  4540.           tools. 
  4541.  
  4542.  Format 
  4543.  
  4544.                     #include <dce\audit.h>
  4545.  
  4546.                     void dce_aud_open(
  4547.                             unsigned32  flags,
  4548.                             char  *description,
  4549.                             unsigned32  first_evt_number,
  4550.                             unsigned32  num_of_evts,
  4551.                             dce_aud_trail_t  *at,
  4552.                             unsigned32  *status);
  4553.  
  4554.  Parameters 
  4555.  
  4556.           Input 
  4557.  
  4558.           flags         Specifies the mode of opening. The flags parameter is 
  4559.                         set to the bitwise OR of the following values: 
  4560.  
  4561.                              aud_c_trl_open_read 
  4562.                              aud_c_trl_open_write 
  4563.                              aud_c_trl_open_write_no_filter 
  4564.                              aud_c_trl_ss_save 
  4565.                              aud_c_trl_ss_wrap 
  4566.  
  4567.           description   A character string specifying an audit trail file to be 
  4568.                         opened. If description is NULL, the default audit trail 
  4569.                         file is opened. When the audit trail file is opened for 
  4570.                         write, the default audit trail is an RPC interface to a 
  4571.                         local Audit daemon. 
  4572.  
  4573.           first_evt_num The lowest assigned audit event number used by the 
  4574.                         calling server. 
  4575.  
  4576.           num_of_evts   The number of audit events defined for the calling 
  4577.                         server. 
  4578.  
  4579.           Output 
  4580.  
  4581.           at            A pointer to an audit trail descriptor. When the audit 
  4582.                         trail descriptor is no longer needed, it must be 
  4583.                         released by calling the dce_aud_close routine. 
  4584.  
  4585.           status        Returns the status code from this routine. If 
  4586.                         successful, the routine returns aud_s_ok. If not, the 
  4587.                         status code contains one of the following errors: 
  4588.  
  4589.                              aud_s_trl_invalid_open_flags The flags parameter 
  4590.                                   must include either aud_c_trl_open_read or 
  4591.                                   aud_c_trl_open_write flag, but not both. 
  4592.  
  4593.                              aud_s_cannot_open_dmn_binding_file The local audit 
  4594.                                   daemon trail file is designated, but the 
  4595.                                   daemon's binding file cannot be opened. 
  4596.  
  4597.                              Status codes passed from 
  4598.                              sec_login_get_current_context When the local audit 
  4599.                                   daemon trail file is designated, a login 
  4600.                                   context is needed for making a secure audit 
  4601.                                   logging RPC to the audit daemon. 
  4602.  
  4603.                              aud_s_cannot_open_dmn_identity_file The local 
  4604.                                   audit daemon trail file is designated, but 
  4605.                                   the daemon's identity file cannot be opened. 
  4606.  
  4607.                              Status codes passed from rpc_binding_set_auth_info 
  4608.                                   When the local audit daemon trail file is 
  4609.                                   designated, dce_aud_open sets authentication 
  4610.                                   information in the RPC binding handle for 
  4611.                                   making a secure audit logging RPC to the 
  4612.                                   audit daemon. This is done by calling 
  4613.                                   rpc_binding_set_auth_info. 
  4614.  
  4615.                              aud_s_cannot_open_trail_file_rc Cannot open a 
  4616.                                   local trail file. 
  4617.  
  4618.                              aud_s_cannot_allocate_memory Memory allocation 
  4619.                                   failed. 
  4620.  
  4621.                              aud_s_cannot_init_trail_mutex Audit trail mutex 
  4622.                                   initialization failed. 
  4623.  
  4624.                              Status codes passed from rpc_server_inq_bindings 
  4625.                                   When filtering is turned on, dce_aud_open 
  4626.                                   gets the caller's RPC bindings to be used for 
  4627.                                   registering an RPC interface in receiving 
  4628.                                   filter update notification from the local 
  4629.                                   audit daemon. This is done by calling 
  4630.                                   rpc_server_inq_bindings. 
  4631.  
  4632.                              Status codes passed from 
  4633.                              rpc_binding_to_string_binding When filtering is 
  4634.                                   turned on, the caller's RPC bindings are 
  4635.                                   converted to string bindings before they are 
  4636.                                   stored in a file. This is done by calling 
  4637.                                   rpc_binding_to_string_binding. 
  4638.  
  4639.                              aud_s_cannot_mkdir Cannot create a directory for 
  4640.                                   storing the bindings file for the filter 
  4641.                                   update notification interface. 
  4642.  
  4643.  Usage 
  4644.  
  4645.           The dce_aud_open routine opens the audit trail file specified by the 
  4646.           description parameter. If description is NULL, the routine uses the 
  4647.           default audit trail, which is an RPC interface to the local Audit 
  4648.           daemon. 
  4649.  
  4650.           This routine must be invoked after the server has finished 
  4651.           registering with RPC and before calling rpc_server_listen. 
  4652.  
  4653.           If the flags parameter is set to aud_c_trl_open_read, the specified 
  4654.           file (description cannot be NULL in this case) is opened for reading 
  4655.           audit records, using the dce_aud_next routine. If flags is set to 
  4656.           aud_c_trl_open_write, the specified file or the default audit trail 
  4657.           device is opened and initialized for appending audit records using 
  4658.           the dce_aud_commit routine. Only one of the aud_c_trl_open_read and 
  4659.           aud_c_trl_open_write flags can be specified in any call to 
  4660.           dce_aud_open. If the flags parameter is set to aud_c_trl_ss_wrap, the 
  4661.           audit trail operation is set to wrap mode. The aud_c_trl_ss_wrap flag 
  4662.           has meaning only if you specify the aud_c_trl_open_write flag. 
  4663.  
  4664.           If the audit trail specified is a file and the calling server does 
  4665.           not have the read and write permissions to the file, a NULL pointer 
  4666.           is returned in at, and status is set to 
  4667.           aud_s_cannot_open_trail_file_rc. The same values are returned if the 
  4668.           default audit trail file is used (that is, through an audit daemon) 
  4669.           and if the calling server is not authorized to use the audit daemon 
  4670.           to log records. 
  4671.  
  4672.  Related Information 
  4673.  
  4674.           Routines: 
  4675.           dce_aud_commit 
  4676.           dce_aud_next 
  4677.           dce_aud_prev 
  4678.           dce_aud_start 
  4679.           dce_aud_start_with_name 
  4680.           dce_aud_start_with_pac 
  4681.           dce_aud_start_with_server_binding 
  4682.  
  4683.  
  4684. ΓòÉΓòÉΓòÉ 3.4.22. dce_aud_prev ΓòÉΓòÉΓòÉ
  4685.  
  4686.  Purpose 
  4687.  
  4688.           Reads the previous audit record from a specified audit trail file 
  4689.           into a buffer. This routine is used by the audit trail examination 
  4690.           and analysis tools. 
  4691.  
  4692.  Format 
  4693.  
  4694.                     #include <dce\audit.h>
  4695.  
  4696.                     void dce_aud_prev(
  4697.                             dce_aud_trail_t  at,
  4698.                             char *predicate,
  4699.                             unsigned16 format,
  4700.                             dce_aud_rec_t *ard,
  4701.                             unsigned32 *status);
  4702.  
  4703.  Parameters 
  4704.  
  4705.           Input 
  4706.  
  4707.           at            A pointer to the descriptor of an audit trail file 
  4708.                         previously opened for reading by the dce_aud_open 
  4709.                         routine. 
  4710.  
  4711.           predicate     Criteria for selecting the audit records that are to be 
  4712.                         read from the Audit trail file. A predicate statement 
  4713.                         consists of an attribute and its value, separated by 
  4714.                         any of the following operators: 
  4715.  
  4716.                              = (equal to)        (for example, attribute=value) 
  4717.                              > (greater than)    (for example, attribute>value) 
  4718.                              < (less than)       (for example, attribute<value) 
  4719.                              >= (greater than or equal to) (for example, 
  4720.                                                  attribute>=value) 
  4721.                              <= (less than or equal to) (for example, 
  4722.                                                  attribute<=value) 
  4723.  
  4724.                         Attribute names are case sensitive, and no space is 
  4725.                         allowed within a predicate expression. Multiple 
  4726.                         predicates are delimited by a comma, of the form: 
  4727.  
  4728.                         attribute1=value1,attribute2>value2,...). 
  4729.  
  4730.                         No space is allowed between predicates. 
  4731.  
  4732.                         Note:  When multiple predicates are defined, the values 
  4733.                                are logically ANDed together. 
  4734.  
  4735.                         The possible attributes names, their values, and 
  4736.                         allowable operators are: 
  4737.  
  4738.                              SERVER       The UUID of the server principal that 
  4739.                                           generated the record. The attribute 
  4740.                                           value must be a UUID string. Operator 
  4741.                                           allowed: =. 
  4742.  
  4743.                              EVENT        The audit event number. The attribute 
  4744.                                           value must be a heximal number. 
  4745.                                           Operator allowed: =. 
  4746.  
  4747.                              OUTCOME      The event outcome of the record. The 
  4748.                                           possible attribute values are 
  4749.                                           SUCCESS, FAILURE, DENIAL, and 
  4750.                                           PENDING. Operator allowed: =. 
  4751.  
  4752.                              STATUS       The authorization status of the 
  4753.                                           client. The possible attribute values 
  4754.                                           are DCE for DCE authorization (PAC 
  4755.                                           based) NAME for name-based 
  4756.                                           authorization. Operator allowed: =. 
  4757.  
  4758.                              TIME         The time the record was created. The 
  4759.                                           attribute values must be a 
  4760.                                           null-terminated string that expressed 
  4761.                                           an absolute time. Operators allowed: 
  4762.                                           <=, <, >, and >=. 
  4763.  
  4764.                              CELL         The UUID of the client's cell. The 
  4765.                                           attribute value must be a UUID 
  4766.                                           string. Operator allowed: =. 
  4767.  
  4768.                              GROUP        The UUID of one of the client's group 
  4769.                                           or groups. The attribute value must 
  4770.                                           be a UUID string. Operator allowed: 
  4771.                                           =. 
  4772.  
  4773.                              ADDR         The address of the client. The 
  4774.                                           attribute is typically the string 
  4775.                                           representation of an RPC binding 
  4776.                                           handle. Operator allowed: =. 
  4777.  
  4778.                              FORMAT       The format version number of the 
  4779.                                           audit event record. The attribute 
  4780.                                           value must be an integer. Operators 
  4781.                                           allowed: =, <, and >. 
  4782.  
  4783.           format        The event's tail format used for the event-specific 
  4784.                         information. This format can be configured by the user. 
  4785.                         With this format version number, the servers and audit 
  4786.                         analysis tools can accommodate changes in the formats 
  4787.                         of the event specification information, or use 
  4788.                         different formats dynamically. 
  4789.  
  4790.           Output 
  4791.  
  4792.           ard           A pointer to the audit record descriptor containing the 
  4793.                         returned record. 
  4794.  
  4795.           status        The status code returned by this routine. This status 
  4796.                         code indicates whether the routine was completed 
  4797.                         successfully or not. If successful, the routine returns 
  4798.                         aud_s_ok. If not, the status code contains one of the 
  4799.                         following errors: 
  4800.  
  4801.                              aud_s_invalid_trail_descriptor The audit trail 
  4802.                                   descriptor is not valid. 
  4803.  
  4804.                              aud_s_trail_file_corrupted The audit trail is 
  4805.                                   corrupted. 
  4806.  
  4807.                              aud_s_index_file_corrupted The index trail file is 
  4808.                                   corrupted. 
  4809.  
  4810.                              aud_s_cannot_allocate_memory_rc The malloc call 
  4811.                                   failed. 
  4812.  
  4813.                              Status codes passed from idl_es_decode_buffer. 
  4814.                              Status codes passed from idl_es_handle_free. 
  4815.                              Status codes passed from 
  4816.                              audit_pickle_dencode_ev_info. 
  4817.  
  4818.  Usage 
  4819.  
  4820.           The dce_aud_prev routine attempts to read the previous record from 
  4821.           the audit trail file that is specified by the audit trail descriptor 
  4822.           at. This routine also defines the predicate to be used to search for 
  4823.           the previous record and returns a matching record if one exists. The 
  4824.           dce_aud_prev routine can be used to search for previous records in 
  4825.           the trail file that match the defined predicate. By default, if no 
  4826.           predicate is defined, the routine returns the previous record read 
  4827.           from the audit trail. 
  4828.  
  4829.           If no record satisfies the predicate specified for the call, a value 
  4830.           of zero ( NULL) is returned in ard. 
  4831.  
  4832.           The value returned in ard can be supplied as an input parameter to 
  4833.           the routines: 
  4834.  
  4835.                dce_aud_get_header 
  4836.                dce_aud_length 
  4837.                dce_aud_get_ev_info 
  4838.                dce_aud_get_event 
  4839.                dce_aud_discard 
  4840.                dce_aud_print 
  4841.  
  4842.           Storage allocated by this routine must be explicitly freed by a call 
  4843.           to dce_aud_discard with ard as the input parameter. 
  4844.  
  4845.           If the routine successfully reads an audit trail record, the cursor 
  4846.           associated with the audit trail descriptor at will be moved to the 
  4847.           previous record in the audit trail file. The calling routine does not 
  4848.           need to set or move the file cursor explicitly. 
  4849.  
  4850.           If no appropriate record can be found in the audit trail, an ard 
  4851.           value of zero (NULL) is returned and the cursor is set back to the 
  4852.           beginning of the audit trail. If a call is unsuccessful, the position 
  4853.           of the cursor does not change. 
  4854.  
  4855.  Related Information 
  4856.  
  4857.           Routines: 
  4858.           dce_aud_discard 
  4859.           dce_aud_get_ev_info 
  4860.           dce_aud_get_event 
  4861.           dce_aud_get_header 
  4862.           dce_aud_length 
  4863.           dce_aud_next 
  4864.           dce_aud_open 
  4865.           dce_aud_print 
  4866.  
  4867.  
  4868. ΓòÉΓòÉΓòÉ 3.4.23. dce_aud_print ΓòÉΓòÉΓòÉ
  4869.  
  4870.  Purpose 
  4871.  
  4872.           Formats an audit record into human-readable form. This routine is 
  4873.           used by audit trail examination and analysis tools. 
  4874.  
  4875.  Format 
  4876.  
  4877.                     #include <dce\audit.h>
  4878.  
  4879.                     void dce_aud_print(
  4880.                             dce_aud_rec_t  ard,
  4881.                             unsigned32  options,
  4882.                             unsigned_char_t  **buffer,
  4883.                             unsigned32  *status);
  4884.  
  4885.  Parameters 
  4886.  
  4887.           Input 
  4888.  
  4889.           ard           An audit record descriptor. This descriptor can be 
  4890.                         obtained from an opened audit trail by calling 
  4891.                         dce_aud_next or it can be a new record established by 
  4892.                         calling one of the dce_aud_start_xxx routines. 
  4893.  
  4894.           options       The options governing the transformation of the binary 
  4895.                         audit record information into a character string. The 
  4896.                         value of the options parameter is the bitwise OR of any 
  4897.                         selected combination of the following option values: 
  4898.  
  4899.                              aud_c_evt_groups_info            Includes group 
  4900.                                                               information. 
  4901.                              aud_c_evt_address_info           Includes address 
  4902.                                                               information. 
  4903.                              aud_c_evt_specific_info          Includes event 
  4904.                                                               specific 
  4905.                                                               information. 
  4906.                              aud_c_evt_delegates_info         Includes 
  4907.                                                               delegation 
  4908.                                                               information. 
  4909.                              aud_c_evt_raw_info               Includes raw 
  4910.                                                               information. 
  4911.                              aud_c_evt_all_info               Includes all the 
  4912.                                                               optional 
  4913.                                                               information (that 
  4914.                                                               is, groups, 
  4915.                                                               address, and 
  4916.                                                               event specific 
  4917.                                                               information). 
  4918.  
  4919.           Output 
  4920.  
  4921.           buffer        Returns the pointer to a character string converted 
  4922.                         from the audit record specified by ard. 
  4923.  
  4924.           status        The status code returned by this routine. If 
  4925.                         successful, the routine returns aud_s_ok. If not, the 
  4926.                         status code contains one of the following errors: 
  4927.  
  4928.                              aud_s_invalid_record_descriptor The audit record 
  4929.                                   descriptor is not valid. 
  4930.  
  4931.                              aud_s_cannot_allocate_memory The malloc call 
  4932.                                   failed. 
  4933.  
  4934.                              Status codes passed from 
  4935.                              sec_login_get_current_context. 
  4936.                              Status codes passed from 
  4937.                              sec_login_inquire_net_info. 
  4938.  
  4939.  Usage 
  4940.  
  4941.           The dce_aud_print routine transforms the audit record specified by 
  4942.           ard into a character string and places it in a buffer. The buffer is 
  4943.           allocated using malloc, and must later be freed by the caller. (This 
  4944.           routine allocates the memory to hold the human-readable text of the 
  4945.           audit record and returns the address of this memory in the buffer 
  4946.           parameter.) 
  4947.  
  4948.           The options parameter is set to the bitwise OR of flag values defined 
  4949.           in the dce\audit.h header file. A value of 0 for options results in 
  4950.           default operation, that is, no group, address, and event-specific 
  4951.           information is included in the output string. 
  4952.  
  4953.  Notes 
  4954.  
  4955.           The memory for a returned character string is allocated by malloc and 
  4956.           must be freed by the caller of dce_aud_print using dce_free. 
  4957.  
  4958.  Related Information 
  4959.  
  4960.           Routines: 
  4961.           dce_aud_open 
  4962.           dce_aud_start 
  4963.           dce_aud_start_with_pac 
  4964.           dce_aud_start_with_name 
  4965.           dce_aud_start_with_server_binding 
  4966.           dce_aud_next 
  4967.           dce_aud_put_ev_info 
  4968.           dce_free 
  4969.  
  4970.  
  4971. ΓòÉΓòÉΓòÉ 3.4.24. dce_aud_put_ev_info ΓòÉΓòÉΓòÉ
  4972.  
  4973.  Purpose 
  4974.  
  4975.           Adds event-specific information to a specified audit record buffer. 
  4976.           This routine is used by client/server applications. 
  4977.  
  4978.  Format 
  4979.  
  4980.                     #include <dce\audit.h>
  4981.  
  4982.                     void dce_aud_put_ev_info(
  4983.                             dce_aud_rec_t  ard,
  4984.                             dce_aud_ev_info_t  info,
  4985.                             error_status_t  *status);
  4986.  
  4987.  Parameters 
  4988.  
  4989.           Input 
  4990.  
  4991.           ard           A pointer to an audit record descriptor initialized by 
  4992.                         one of the dce_aud_start_xxx routines. 
  4993.  
  4994.           info          A data structure containing an event-specific 
  4995.                         information item that is to be appended to the tail of 
  4996.                         the audit record identified by ard. The possible 
  4997.                         formats of the event-specific information are listed in 
  4998.                         Audit Data Types. 
  4999.  
  5000.           Output 
  5001.  
  5002.           status        The status code returned by this routine. If 
  5003.                         successful, the routine returns aud_s_ok. If not, the 
  5004.                         status code contains one of the following errors: 
  5005.  
  5006.                              aud_s_invalid_record_descriptor The input audit 
  5007.                                   record descriptor is not valid. 
  5008.  
  5009.                              aud_s_evt_tail_info_exceeds_limit The tail portion 
  5010.                                   of the audit trail record has exceeded its 
  5011.                                   limit of 4K. 
  5012.  
  5013.  Usage 
  5014.  
  5015.           The dce_aud_put_ev_info routine adds event-specific information to an 
  5016.           audit record. The event-specific information is included in an audit 
  5017.           record by calling dce_aud_put_ev_info one or more times. The order of 
  5018.           the information items included by multiple calls is preserved in the 
  5019.           audit record, so that they can be read in the same order by the 
  5020.           dce_aud_get_ev_info routine. This order is also observed by the 
  5021.           dce_aud_print routine. The info parameter is a pointer to an instance 
  5022.           of the self-descriptive dce_aud_ev_info_t structure. 
  5023.  
  5024.  Related Information 
  5025.  
  5026.           Routines: 
  5027.           dce_aud_commit 
  5028.           dce_aud_open 
  5029.           dce_aud_start 
  5030.           dce_aud_start_with_pac 
  5031.           dce_aud_start_with_name 
  5032.           dce_aud_start_with_server_binding 
  5033.  
  5034.  
  5035. ΓòÉΓòÉΓòÉ 3.4.25. dce_aud_rename ΓòÉΓòÉΓòÉ
  5036.  
  5037.  Purpose 
  5038.  
  5039.           Renames the specified audit trail. This routine is used by the trail 
  5040.           analysis and examination tools. 
  5041.  
  5042.  Format 
  5043.  
  5044.                     #include <dce\audit.h>
  5045.  
  5046.                     void dce_aud_rename(
  5047.                             dce_aud_trail_t at,
  5048.                             char *new_name,
  5049.                             unsigned32 *status);
  5050.  
  5051.  Parameters 
  5052.  
  5053.           Input 
  5054.  
  5055.           at            A pointer to the descriptor of an audit trail file 
  5056.                         previously opened for writing by the dce_aud_open 
  5057.                         routine. 
  5058.  
  5059.           new_name      The new audit trail file name. 
  5060.  
  5061.           Output 
  5062.  
  5063.           status        The status code returned by this routine. If 
  5064.                         successful, the routine returns aud_s_ok. Otherwise, 
  5065.                         the status code is one of the following: 
  5066.  
  5067.                              aud_s_invalid_trail_descriptor The audit trail 
  5068.                                   descriptor is invalid. 
  5069.  
  5070.                              aud_s_invalid_name The value of new_name is 
  5071.                                   invalid (NULL). 
  5072.  
  5073.                              aud_s_rename_trail_file_rc The rename call failed 
  5074.                                   on the trail file. 
  5075.  
  5076.                              aud_s_rename_index_file_rc The rename call failed 
  5077.                                   on the index file. 
  5078.  
  5079.  Usage 
  5080.  
  5081.           The dce_aud_rename routine renames the audit trail file and the index 
  5082.           file to the name specified by new_name. DCE administrators can use 
  5083.           this routine to save the audit trail file before it reaches the 
  5084.           wrapping point. 
  5085.  
  5086.           Note:  For a platform, where a FAT file system is applied, the 
  5087.                  specified name cannot exceed 8 characters and the extension is 
  5088.                  not included. 
  5089.  
  5090.           The audit trail file and the index trail file must be closed and 
  5091.           cannot be used by any process before the files are renamed. 
  5092.  
  5093.           The dce_aud_open routine must be called to specify the desired audit 
  5094.           trail. Otherwise, the audit trail that is currently set in at will be 
  5095.           renamed. 
  5096.  
  5097.  Notes 
  5098.  
  5099.           Storage allocated by this routine must be explicitly freed by a call 
  5100.           to the dce_aud_discard routine with ard as the input parameter. 
  5101.  
  5102.  Related Information 
  5103.  
  5104.           Routines: 
  5105.           dce_aud_clean 
  5106.           dce_aud_save 
  5107.           dce_aud_open 
  5108.           dce_aud_rewind 
  5109.  
  5110.  
  5111. ΓòÉΓòÉΓòÉ 3.4.26. dce_aud_rewind ΓòÉΓòÉΓòÉ
  5112.  
  5113.  Purpose 
  5114.  
  5115.           Rewinds the specified audit trail. This routine is used by the trail 
  5116.           analysis and examination tools. 
  5117.  
  5118.  Format 
  5119.  
  5120.                     #include <dce\audit.h>
  5121.  
  5122.                     void dce_aud_rewind(
  5123.                             dce_aud_trail_t at,
  5124.                             unsigned32 *status);
  5125.  
  5126.  Parameters 
  5127.  
  5128.           Input 
  5129.  
  5130.           at            A pointer to the descriptor of an audit trail file 
  5131.                         previously opened for writing by the dce_aud_open 
  5132.                         routine. 
  5133.  
  5134.           Output 
  5135.  
  5136.           status        The status code returned by this routine. If 
  5137.                         successful, the routine returns aud_s_ok. Otherwise, 
  5138.                         the status code is one of the following: 
  5139.  
  5140.                              aud_s_invalid_trail_descriptor The audit trail 
  5141.                                   descriptor is invalid. 
  5142.  
  5143.                              aud_s_rewind_trail_file The ftruncate call failed 
  5144.                                   on the trail file. 
  5145.  
  5146.                              aud_s_rewind_index_file The ftruncate call failed 
  5147.                                   on the index file. 
  5148.  
  5149.  Usage 
  5150.  
  5151.           The dce_aud_rewind routine rewinds the specified audit trail file. 
  5152.           This routine can be used to instantly clean up the audit trail file 
  5153.           if it is no longer needed. The dce_aud_open routine must be called to 
  5154.           specify the desired audit trail. Otherwise, dce_aud_rewind will 
  5155.           rewind the latest audit trail file that is currently set in at. 
  5156.  
  5157.           If the call is successful, the file cursors are set to the beginning 
  5158.           of the file. 
  5159.  
  5160.  Notes 
  5161.  
  5162.           Storage allocated by this routine must be explicitly freed by a call 
  5163.           to the dce_aud_discard routine with ard as the input parameter. 
  5164.  
  5165.  Related Information 
  5166.  
  5167.           Routines: 
  5168.           dce_aud_clean 
  5169.           dce_aud_open 
  5170.  
  5171.  
  5172. ΓòÉΓòÉΓòÉ 3.4.27. dce_aud_save ΓòÉΓòÉΓòÉ
  5173.  
  5174.  Purpose 
  5175.  
  5176.           Saves the specified audit trail. This routine is used by the trail 
  5177.           analysis and examination tools. 
  5178.  
  5179.  Format 
  5180.  
  5181.                     #include <dce\audit.h>
  5182.  
  5183.                     void dce_aud_save(
  5184.                             dce_aud_trail_t at,
  5185.                             char  *name,
  5186.                             unsigned32 *status);
  5187.  
  5188.  Parameters 
  5189.  
  5190.           Input 
  5191.  
  5192.           at            A pointer to the descriptor of an audit trail file 
  5193.                         previously opened for reading by the dce_aud_open 
  5194.                         routine. 
  5195.  
  5196.           name          The new audit trail file name. 
  5197.  
  5198.           Output 
  5199.  
  5200.           status        The status code returned by this routine. If 
  5201.                         successful, the routine returns aud_s_ok. Otherwise, 
  5202.                         the status code is one of the following: 
  5203.  
  5204.                              aud_s_invalid_trail_descriptor The audit trail 
  5205.                                   descriptor is invalid. 
  5206.  
  5207.                              aud_s_cannot_open_trail_file_rc The fopen call 
  5208.                                   failed on the trail file (R/W). 
  5209.  
  5210.                              aud_s_cannot_open_index_file_rc The fopen call 
  5211.                                   failed on the index file (R/W). 
  5212.  
  5213.  Usage 
  5214.  
  5215.           The dce_aud_save routine saves the specified audit trail and index 
  5216.           files. This routine is useful for backup. DCE application developers 
  5217.           can use this routine to implement the save function in their 
  5218.           applications. 
  5219.  
  5220.           For a platform, where a FAT file system is applied, the specified 
  5221.           name cannot exceed 8 characters and the extension is not included. If 
  5222.           a NULL is specified for name, the audit trail and index files are 
  5223.           saved (or copied) to the \opt\dcelocal\var\audit\adm subdirectory 
  5224.           with a default extension. For example, on the OS/2 platform, the file 
  5225.           centrail is saved as centrail.old and centrail.mdi is saved as 
  5226.           centrail.odi. Similarly, on the AIX platform, central_trail is saved 
  5227.           as central_trail.old and central_trail.md_index is saved as 
  5228.           central_trail.md_index.old. 
  5229.  
  5230.           The dce_aud_open routine must be called to specify the desired audit 
  5231.           trail to be saved. Otherwise, the audit trail that is currently set 
  5232.           in at will be saved. 
  5233.  
  5234.  Related Information 
  5235.  
  5236.           Routines: 
  5237.           dce_aud_clean 
  5238.           dce_aud_open 
  5239.           dce_aud_rename 
  5240.           dce_aud_rewind 
  5241.  
  5242.  
  5243. ΓòÉΓòÉΓòÉ 3.4.28. dce_aud_set_local_cell_uuid ΓòÉΓòÉΓòÉ
  5244.  
  5245.  Purpose 
  5246.  
  5247.           Obtains the cell's uuid. 
  5248.  
  5249.  Format 
  5250.  
  5251.                     #include <dce/audit.h>
  5252.  
  5253.                     void dce_aud_set_local_cell_uuid(
  5254.                             uuid_t  cell_uuid,
  5255.                             error_status_t  *status);
  5256.  
  5257.  Parameters 
  5258.  
  5259.           Input 
  5260.  
  5261.           cell_uuid     The cell's uuid. 
  5262.  
  5263.           Input 
  5264.  
  5265.           status        A pointer to the completion status.  On successful 
  5266.                         completion, the routine returns aud_s_ok. 
  5267.  
  5268.  Usage 
  5269.  
  5270.           Obtains the cell UUID from the registry and provides this to the 
  5271.           audit daemon. 
  5272.  
  5273.  
  5274. ΓòÉΓòÉΓòÉ 3.4.29. dce_aud_set_trail_size_limit ΓòÉΓòÉΓòÉ
  5275.  
  5276.  Purpose 
  5277.  
  5278.           Sets a limit to the audit trail size. This routine is used by 
  5279.           client/server applications. 
  5280.  
  5281.  Format 
  5282.  
  5283.                     #include <dce\audit.h>
  5284.  
  5285.                     void dce_aud_set_trail_size_limit (
  5286.                             dce_aud_trail_t  at,
  5287.                             unsigned32  file_size_limit_value,
  5288.                             unsigned32  *status)
  5289.  
  5290.  Parameters 
  5291.  
  5292.           Input 
  5293.  
  5294.           at            A pointer to the descriptor of an audit trail file 
  5295.                         previously opened for reading by the routine 
  5296.                         dce_aud_open. 
  5297.  
  5298.           file_size_limit_value The desired maximum size of the audit trail 
  5299.                         file, in bytes. 
  5300.  
  5301.           Output 
  5302.  
  5303.           status        Returns the status code of this routine. If successful, 
  5304.                         the routine returns aud_s_ok. If not, the status code 
  5305.                         contains aud_s_invalid_trail_descriptor, which 
  5306.                         indicates that the audit trail descriptor at is null. 
  5307.  
  5308.  Usage 
  5309.  
  5310.           The dce_aud_set_trail_size_limit routine can be used by an 
  5311.           application that links with libaudit to set the maximum size of the 
  5312.           audit trail. This routine must be called immediately after calling 
  5313.           dce_aud_open. 
  5314.  
  5315.           For added flexibility, the environment variable DCEAUDITTRAILSIZE can 
  5316.           also be used to set the maximum trail size limit. 
  5317.  
  5318.           If none of these methods is used for setting the trail size, a 
  5319.           hardcoded limit of 2 megabytes is assumed. 
  5320.  
  5321.           If set, the value of the environment variable DCEAUDITTRAILSIZE 
  5322.           overrides the value set by this routine. Any of the values set by 
  5323.           DCEAUDITTRAILSIZE or this routine overrides the hardcoded default. 
  5324.  
  5325.           When the size limit is reached, the current trail file is copied to 
  5326.           another file. The name of this new file is the original file name 
  5327.           with a timestamp appended. For example, if the name of the original 
  5328.           trail file is central_trail, its companion trail file is named 
  5329.           central_trail.md_index. These two files are copied to 
  5330.           central_trail.1994-09-26-16-38-15 and 
  5331.           central_trail.1994-09-26-16-38-15.md_index. 
  5332.  
  5333.           When a trail file is copied to a new file by the audit library 
  5334.           because it has reached the size limit, a serviceability message is 
  5335.           issued to the console notifying the user that an audit trail file 
  5336.           (and its companion index file) is available to be backed up. After 
  5337.           the backup is performed, it is advisable to remove the old trail 
  5338.           file, to prevent running out of disk space. 
  5339.  
  5340.           Auditing then continues, using the original name of the file, (in our 
  5341.           example, central_trail). 
  5342.  
  5343.  Related Information 
  5344.  
  5345.           Routines: 
  5346.           dce_aud_open 
  5347.  
  5348.           Environment Variables: 
  5349.           DCEAUDITTRAILSIZE 
  5350.  
  5351.  
  5352. ΓòÉΓòÉΓòÉ 3.4.30. dce_aud_start ΓòÉΓòÉΓòÉ
  5353.  
  5354.  Purpose 
  5355.  
  5356.           Determines whether a specified event should be audited given the 
  5357.           client binding information and the event outcome. If the event must 
  5358.           be audited, or if the outcome of the event is not yet known, the 
  5359.           memory of the audit record descriptor is allocated and the address to 
  5360.           this structure is returned to the caller. This routine is used by 
  5361.           client/server applications. 
  5362.  
  5363.  Format 
  5364.  
  5365.                     #include <dce\audit.h>
  5366.  
  5367.                     void dce_aud_start(
  5368.                             unsigned32  event,
  5369.                             rpc_binding_handle_t  binding,
  5370.                             unsigned32  options,
  5371.                             unsigned32  outcome,
  5372.                             dce_aud_rec_t  *ard,
  5373.                             error_status_t  *status);
  5374.  
  5375.  Parameters 
  5376.  
  5377.           Input 
  5378.  
  5379.           event         Specifies the event to be audited.  This is a 32-bit 
  5380.                         event number. The event field in the audit record 
  5381.                         header is set to this number. 
  5382.  
  5383.           binding       Specifies the client's RPC binding handle from which 
  5384.                         the client identification information is retrieved to 
  5385.                         set the client, cell, num_groups, groups, and addr 
  5386.                         fields in the audit record header. 
  5387.  
  5388.           options       Specifies the optional header information wanted 
  5389.                         (aud_c_evt_all_info, aud_c_evt_group_info, or 
  5390.                         aud_c_evt_address_info). 
  5391.  
  5392.                         It can also be used to specify whether the audit 
  5393.                         records are always logged (aud_c_evt_always_log) or 
  5394.                         that an alarm message is always sent to the standard 
  5395.                         output (aud_c_evt_always_alarm). If either of these two 
  5396.                         options is selected, the filter is bypassed. 
  5397.  
  5398.                         The value of the options parameter is the bitwise OR of 
  5399.                         any selected combination of the following option 
  5400.                         values: 
  5401.  
  5402.                              aud_c_evt_all_info Includes all optional 
  5403.                                   information (groups and address) in the audit 
  5404.                                   record header. 
  5405.  
  5406.                              aud_c_evt_groups_info Includes the groups 
  5407.                                   information in the audit record header. 
  5408.  
  5409.                              aud_c_evt_address_info Includes the client address 
  5410.                                   information in the audit record header. 
  5411.  
  5412.                              aud_c_evt_always_log Bypasses the filter mechanism 
  5413.                                   and indicates that the event must be logged. 
  5414.  
  5415.                              aud_c_evt_always_ems Unconditionally sends the 
  5416.                                   audit record to EMS as an audit event. 
  5417.  
  5418.                              aud_c_evt_always_alarm Bypasses the filter 
  5419.                                   mechanism and indicates that an alarm message 
  5420.                                   must be sent to the system console for the 
  5421.                                   event. 
  5422.  
  5423.           outcome       The event outcome to be stored in the header. The 
  5424.                         following event outcome values are defined: 
  5425.  
  5426.                              aud_c_esl_cond_success The event was completed 
  5427.                                   successfully. 
  5428.  
  5429.                              aud_c_esl_cond_denial The event failed because 
  5430.                                   access was denied. 
  5431.  
  5432.                              aud_c_esl_cond_failure The event failed for 
  5433.                                   reasons other than access denial. 
  5434.  
  5435.                              aud_c_esl_cond_pending The event is in an 
  5436.                                   intermediate state; the outcome is pending 
  5437.                                   and is one in a series of connected events, 
  5438.                                   where the application waits to record the 
  5439.                                   real outcome only after the last event. 
  5440.  
  5441.                              aud_c_esl_cond_unknown The event outcome (denial, 
  5442.                                   failure, pending, or success) is still 
  5443.                                   unknown. This outcome exists only between a 
  5444.                                   dce_aud_start (all varieties of this routine) 
  5445.                                   call and the next dce_aud_commit call. You 
  5446.                                   can also use 0 to specify this outcome. 
  5447.  
  5448.           Output 
  5449.  
  5450.           ard           Returns a pointer to an audit record buffer. If the 
  5451.                         event does not need to be audited because it is not 
  5452.                         selected by the filters, or if the environment variable 
  5453.                         DCEAUDITOFF has been set, a NULL pointer is returned. 
  5454.                         If the routine is called with outcome set to 
  5455.                         aud_c_esl_cond_unknown, it is possible that the routine 
  5456.                         cannot determine whether the event should be audited. 
  5457.                         In this case, the audit record descriptor is still 
  5458.                         allocated and its address is returned to the caller. An 
  5459.                         outcome other than aud_c_esl_cond_unknown must be 
  5460.                         provided when calling the dce_aud_commit routine. 
  5461.  
  5462.           status        The status code returned by this routine. If 
  5463.                         successful, the routine returns aud_s_ok. If not, the 
  5464.                         status code contains one of the following errors: 
  5465.  
  5466.                              Status codes passed from 
  5467.                              rpc_binding_to_string_binding. 
  5468.                              Status codes passed from rpc_string_free. 
  5469.                              Status codes passed from dce_aud_start_with_name. 
  5470.                              Status codes passed from sec_cred_get_initiator. 
  5471.                              Status codes passed from sec_cred_get_v1_pac. 
  5472.                              Status codes passed from dce_aud_start_with_pac. 
  5473.                              Status codes passed from sec_cred_get_delegate. 
  5474.  
  5475.  Usage 
  5476.  
  5477.           The dce_aud_start routine determines if an audit record should be 
  5478.           generated for the specified event. The decision is based on the event 
  5479.           filters, two environment variables (DCEAUDITON and DCEAUDITOFF), the 
  5480.           client's identity provided in the binding parameter, and the event 
  5481.           outcome (if it is provided in the outcome parameter). If this event 
  5482.           needs to be audited, the routine allocates an audit record descriptor 
  5483.           and returns a pointer to it, (that is, ard). If the event does not 
  5484.           need to be audited, a NULL ard is returned. If an internal error has 
  5485.           occurred, a NULL pointer is returned in ard. If the 
  5486.           aud_c_evt_always_log or aud_c_evt_always_alarm option is selected, an 
  5487.           audit record descriptor is always created and returned. 
  5488.  
  5489.           Note:  If both the DCEAUDITOFF and DCEAUDITON environment variables 
  5490.                  are set before starting the Audit daemon, DCEAUDITOFF takes 
  5491.                  precedence. 
  5492.  
  5493.           The dce_aud_start routine is designed to be used by RPC applications. 
  5494.           Non-RPC applications that use the DCE authorization model (that is, 
  5495.           DCE ACL and PAC) must use dce_aud_start_with_pac. Non-RPC 
  5496.           applications that do not use the DCE authorization model must use 
  5497.           dce_aud_start_with_name. 
  5498.  
  5499.           This routine obtains the client identity information from the RPC 
  5500.           binding handle and records it in the newly created audit record 
  5501.           descriptor. 
  5502.  
  5503.           Event-specific information can be added to the record by calling the 
  5504.           dce_aud_put_ev_info routine. This routine can be called multiple 
  5505.           times after calling dce_aud_start and before calling dce_aud_commit. 
  5506.           A completed audit record is appended to an audit trail file or sent 
  5507.           to the Audit daemon (depending on the value of the description 
  5508.           parameter used in the previous call to dce_aud_open) by calling 
  5509.           dce_aud_commit. 
  5510.  
  5511.           This routine searches for all relevant filters (for the specified 
  5512.           subject and outcome, if these are specified), summarizes the actions 
  5513.           for each possible event outcome, and records an outcome-action table 
  5514.           with ard. If the outcome is specified when calling this routine and 
  5515.           the outcome does not require any action according to filters, then 
  5516.           this routine returns a NULL ard. 
  5517.  
  5518.           If outcome is not specified in the dce_aud_start routine, 
  5519.           dce_aud_start returns a NULL ard if no action is required for all 
  5520.           possible outcomes. 
  5521.  
  5522.           The caller should not change the outcome between the dce_aud_start 
  5523.           and dce_aud_commit calls arbitrarily. But in this case, the outcome 
  5524.           can be made more specific, for example, from aud_c_esl_cond_unknown 
  5525.           to aud_c_esl_cond_success or from aud_c_esl_cond_pending to 
  5526.           aud_c_esl_cond_success. 
  5527.  
  5528.           An outcome change from aud_c_esl_cond_success to 
  5529.           aud_c_esl_cond_denial is not logically correct because the outcome 
  5530.           aud_c_esl_cond_success may have caused a NULL ard to be returned in 
  5531.           this routine. If the final outcome can be aud_c_esl_cond_success, it 
  5532.           should be specified in this routine, or use aud_c_esl_cond_unknown. 
  5533.  
  5534.           This routine can be called with an outcome parameter of zero or the 
  5535.           union (logical OR) of selected values from the set of constants 
  5536.           aud_c_esl_cond_success, aud_c_esl_cond_failure, 
  5537.           aud_c_esl_cond_denial, and aud_c_esl_cond_pending. The outcome 
  5538.           parameter used in the dce_aud_commit routine should take one value 
  5539.           from the same set of constants. 
  5540.  
  5541.           If dce_aud_start used a non-zero value for outcome, the constant used 
  5542.           for outcome in the dce_aud_commit call should have been selected in 
  5543.           the dce_aud_start call. 
  5544.  
  5545.  Related Information 
  5546.  
  5547.           Routines: 
  5548.           dce_aud_commit 
  5549.           dce_aud_open 
  5550.           dce_aud_put_ev_info 
  5551.           dce_aud_start_with_pac 
  5552.           dce_aud_start_with_name 
  5553.           dce_aud_start_with_server_binding 
  5554.  
  5555.  
  5556. ΓòÉΓòÉΓòÉ 3.4.31. dce_aud_start_with_name ΓòÉΓòÉΓòÉ
  5557.  
  5558.  Purpose 
  5559.  
  5560.           Determines whether a specified event should be audited, given the 
  5561.           client/server name and the event outcome. If the event must be 
  5562.           audited, or if the outcome of the event is not yet known, the memory 
  5563.           for the audit record descriptor is allocated and the address of this 
  5564.           structure is returned to the caller. This routine is used by non-RPC 
  5565.           based client/server applications that do not use the DCE 
  5566.           authorization model. 
  5567.  
  5568.  Format 
  5569.  
  5570.                     #include <dce\audit.h>
  5571.  
  5572.                     void dce_aud_start_with_name(
  5573.                             unsigned32  event,
  5574.                             unsigned_char_t  *client,
  5575.                             unsigned_char_t  *address,
  5576.                             unsigned32  options,
  5577.                             unsigned32  outcome,
  5578.                             dce_aud_rec_t  *ard,
  5579.                             unsigned32  *status);
  5580.  
  5581.  Parameters 
  5582.  
  5583.           Input 
  5584.  
  5585.           event         Specifies the event to be audited. This is a 32-bit 
  5586.                         event number. The event field in the audit record 
  5587.                         header is set to this number. 
  5588.  
  5589.           client        Specifies the principal name of the remote 
  5590.                         client/server. 
  5591.  
  5592.           address       Specifies the address of the remote client/server. The 
  5593.                         address could be in any format of the underlying 
  5594.                         transport protocol. 
  5595.  
  5596.           options       Specifies the optional header information wanted 
  5597.                         (aud_c_evt_all_info, aud_c_evt_group_info, 
  5598.                         aud_c_evt_address_info). 
  5599.  
  5600.                         It can also be used to specify any of two options: to 
  5601.                         always log an audit record (aud_c_evt_always_log) or to 
  5602.                         always send an alarm message to the standard output 
  5603.                         (aud_c_evt_always_alarm). If either of these two 
  5604.                         options is selected, the filter is bypassed. The value 
  5605.                         of the options parameter is the bitwise OR of any 
  5606.                         selected combination of the following option values: 
  5607.  
  5608.                              aud_c_evt_all_info Includes all optional 
  5609.                                   information (groups and address) in the audit 
  5610.                                   record header. 
  5611.  
  5612.                              aud_c_evt_groups_info Includes the groups 
  5613.                                   information in the audit record header. 
  5614.  
  5615.                              aud_c_evt_address_info Includes the client address 
  5616.                                   information in the audit record header. 
  5617.  
  5618.                              aud_c_evt_always_log Bypasses the filter mechanism 
  5619.                                   and indicates that the event must be logged. 
  5620.  
  5621.                              aud_c_evt_always_ems Unconditionally sends the 
  5622.                                   audit record to EMS as an audit event. 
  5623.  
  5624.                              aud_c_evt_always_alarm Bypasses the filter 
  5625.                                   mechanism and indicates that an alarm message 
  5626.                                   must be sent to the system console for the 
  5627.                                   event. 
  5628.  
  5629.                              aud_c_evt_specific_info Includes event specific 
  5630.                                   information. 
  5631.  
  5632.                              aud_c_evt_delegates_info Includes delegation 
  5633.                                   information. 
  5634.  
  5635.                              aud_c_evt_raw_info Includes raw information. 
  5636.  
  5637.           outcome       The event outcome to be stored in the header. The 
  5638.                         following event outcome values are defined: 
  5639.  
  5640.                              aud_c_esl_cond_success The event was completed 
  5641.                                   successfully. 
  5642.  
  5643.                              aud_c_esl_cond_denial The event failed because 
  5644.                                   access was denied. 
  5645.  
  5646.                              aud_c_esl_cond_failure The event failed for 
  5647.                                   reasons other than access denial. 
  5648.  
  5649.                              aud_c_esl_cond_pending The event is in an 
  5650.                                   intermediate state; the outcome is pending 
  5651.                                   and is one in a series of connected events, 
  5652.                                   where the application waits to record the 
  5653.                                   real outcome only after the last event. 
  5654.  
  5655.                              aud_c_esl_cond_unknown The event outcome (denial, 
  5656.                                   failure, pending, or success) is still 
  5657.                                   unknown. This outcome exists only between a 
  5658.                                   dce_aud_start (all varieties of this routine) 
  5659.                                   call and the next dce_aud_commit call. You 
  5660.                                   can also use 0 to specify this outcome. 
  5661.  
  5662.           Output 
  5663.  
  5664.           ard           Returns a pointer to an audit record buffer. If the 
  5665.                         event does not need to be audited because it is not 
  5666.                         selected by the filters, or if the environment variable 
  5667.                         DCEAUDITOFF has been set, a NULL pointer is returned. 
  5668.                         If the routine is called with outcome set to 
  5669.                         aud_c_esl_cond_unknown, the routine may not be able to 
  5670.                         determine whether the event should be audited. In this 
  5671.                         case, the audit record descriptor is still allocated 
  5672.                         and its address is returned to the caller. An outcome 
  5673.                         must be provided prior to logging the record with the 
  5674.                         dce_aud_commit routine. 
  5675.  
  5676.           status        The status code returned by this routine. If 
  5677.                         successful, the routine returns aud_s_ok. If not, the 
  5678.                         status code contains one of the following errors: 
  5679.  
  5680.                              Status codes passed from sec_rgy_site_open. 
  5681.                              Status codes passed from sec_id_parse_name. 
  5682.                              Status codes passed from dce_aud_start_with_pac 
  5683.  
  5684.  Usage 
  5685.  
  5686.           The dce_aud_start_with_name routine determines if an audit record 
  5687.           must be generated for the specified event. The decision is based on 
  5688.           the event filters, two environment variables (DCEAUDITON and 
  5689.           DCEAUDITOFF), the client's identity provided in the input parameters, 
  5690.           and the event outcome (if it is provided in the outcome parameter). 
  5691.           If this event needs to be audited, the routine allocates an audit 
  5692.           record descriptor and returns a pointer to it, (that is, ard). If the 
  5693.           event does not need to be audited, NULL is returned in the ard 
  5694.           parameter. If either the aud_c_evt_always_log orthe 
  5695.           aud_c_evt_always_alarm option is selected, an audit record descriptor 
  5696.           is always created and returned. 
  5697.  
  5698.           Note:  If both the DCEAUDITOFF and DCEAUDITON environment variables 
  5699.                  are set before starting the Audit daemon, DCEAUDITOFF takes 
  5700.                  precedence. 
  5701.  
  5702.           The dce_aud_start_with_name routine is designed to be used by non-RPC 
  5703.           applications that do not use the DCE authorization model (that is, 
  5704.           DCE PAC and ACL). RPC applications must use dce_aud_start. Non-RPC 
  5705.           applications that use the DCE authorization model must use 
  5706.           dce_aud_start_with_pac. 
  5707.  
  5708.           This routine records the input identity parameters in the newly 
  5709.           created audit record descriptor. 
  5710.  
  5711.           Event-specific information can be added to the record by using the 
  5712.           dce_aud_put_ev_info routine, which can be called multiple times after 
  5713.           calling any of the dce_aud_start_xxx routines and before calling 
  5714.           dce_aud_commit. A completed audit record can either be appended to an 
  5715.           audit trail file or sent to the Audit daemon by calling 
  5716.           dce_aud_commit. 
  5717.  
  5718.           This routine searches for all relevant filters (for the specified 
  5719.           subject and outcome, if these are specified), summarizes the actions 
  5720.           for each possible event outcome, and records an outcome-action table 
  5721.           with ard. If the outcome is specified when calling this routine and 
  5722.           the outcome does not require any action according to filters, this 
  5723.           routine returns a NULL ard. 
  5724.  
  5725.           If outcome is not specified in the dce_aud_start_with_name call, 
  5726.           dce_aud_start_with_name returns a NULL ard if no action is required 
  5727.           for all possible outcomes. 
  5728.  
  5729.           The caller should not change the outcome between the 
  5730.           dce_aud_start_with_name and dce_aud_commit calls arbitrarily. In this 
  5731.           case, the outcome can be made more specific, for example, from 
  5732.           aud_c_esl_cond_unknown to aud_c_esl_cond_success or from 
  5733.           aud_c_esl_cond_pending to aud_c_esl_cond_success. 
  5734.  
  5735.           An outcome change from aud_c_esl_cond_success to 
  5736.           aud_c_esl_cond_denial is not logically correct because the outcome 
  5737.           aud_c_esl_cond_success may have caused a NULL ard to be returned in 
  5738.           this routine. If the final outcome can be aud_c_esl_cond_success, it 
  5739.           should be specified in this routine, or use aud_c_esl_cond_unknown. 
  5740.  
  5741.           This routine can be called with the outcome parameter taking a value 
  5742.           of zero or the union (logical OR) of selected values from the set of 
  5743.           constants aud_c_esl_cond_success, aud_c_esl_cond_failure, 
  5744.           aud_c_esl_cond_denial, and aud_c_esl_cond_pending. The outcome 
  5745.           parameter used in the dce_aud_commit routine should take one value 
  5746.           from the same set of constants. 
  5747.  
  5748.           If dce_aud_start_with_name used a non-zero value for outcome, the 
  5749.           constant used for outcome in the dce_aud_commit routine should have 
  5750.           been selected in the dce_aud_start_with_name routine. 
  5751.  
  5752.  Related Information 
  5753.  
  5754.           Routines: 
  5755.           dce_aud_commit 
  5756.           dce_aud_open 
  5757.           dce_aud_put_ev_info 
  5758.           dce_aud_start 
  5759.           dce_aud_start_with_pac 
  5760.           dce_aud_start_with_server_binding 
  5761.  
  5762.  
  5763. ΓòÉΓòÉΓòÉ 3.4.32. dce_aud_start_with_pac ΓòÉΓòÉΓòÉ
  5764.  
  5765.  Purpose 
  5766.  
  5767.           Determines whether a specified event must be audited, given the 
  5768.           client's privilege attribute certificate (PAC) and the event outcome. 
  5769.           If the event must be audited or if the outcome of the event is not 
  5770.           yet known, the memory for the audit record descriptor is allocated 
  5771.           and the address of this structure is returned to the caller. This 
  5772.           routine is used by non-RPC based client/server applications that use 
  5773.           the DCE authorization model. 
  5774.  
  5775.  Format 
  5776.  
  5777.                     #include <dce\audit.h>
  5778.  
  5779.                     void dce_aud_start_with_pac(
  5780.                             unsigned32  event,
  5781.                             sec_id_pac_t  *pac,
  5782.                             unsigned_char_t  *address,
  5783.                             unsigned32  options,
  5784.                             unsigned32  outcome,
  5785.                             dce_aud_rec_t  *ard,
  5786.                             unsigned32  *status);
  5787.  
  5788.  Parameters 
  5789.  
  5790.           Input 
  5791.  
  5792.           event         Specifies the event to be audited.  This is a 32-bit 
  5793.                         event number. The event field in the audit record 
  5794.                         header is set to this number. 
  5795.  
  5796.           pac           Specifies the client's PAC from which the client's 
  5797.                         identification information is retrieved to set the 
  5798.                         client, cell, num_groups, and groups fields in the 
  5799.                         audit record header. 
  5800.  
  5801.           address       Specifies the client's address.  The address can be in 
  5802.                         any format that is native to the underlying transport 
  5803.                         protocol. 
  5804.  
  5805.           options       Specifies the optional header information wanted 
  5806.                         (aud_c_evt_all_info, aud_c_evt_group_info, 
  5807.                         aud_c_evt_address_info). It can also be used to specify 
  5808.                         any of two options: to always log an audit record 
  5809.                         (aud_c_evt_always_log) or to always send an alarm 
  5810.                         message to the standard output 
  5811.                         (aud_c_evt_always_alarm). If either of these two 
  5812.                         options is selected, the filter is bypassed. 
  5813.  
  5814.                         The value of the options parameter is the bitwise OR of 
  5815.                         any selected combination of the following option 
  5816.                         values: 
  5817.  
  5818.                              aud_c_evt_all_info Includes all optional 
  5819.                                   information (groups and address) in the audit 
  5820.                                   record header. 
  5821.  
  5822.                              aud_c_evt_groups_info Includes the groups' 
  5823.                                   information in the audit record header. 
  5824.  
  5825.                              aud_c_evt_address_info Includes the client address 
  5826.                                   information in the audit record header. 
  5827.  
  5828.                              aud_c_evt_always_log Bypasses the filter and 
  5829.                                   indicates that the event must be logged. 
  5830.  
  5831.                              aud_c_evt_always_alarm Bypasses the filter and 
  5832.                                   indicates that an alarm message must be sent 
  5833.                                   to the system console for the event. 
  5834.  
  5835.                              aud_c_evt_specific_info Includes event specific 
  5836.                                   information. 
  5837.  
  5838.                              aud_c_evt_delegates_info Includes delegation 
  5839.                                   information. 
  5840.  
  5841.                              aud_c_evt_raw_info Includes raw information. 
  5842.  
  5843.           outcome       The event outcome to be stored in the header. The 
  5844.                         following event outcome values are defined: 
  5845.  
  5846.                              aud_c_esl_cond_success The event was completed 
  5847.                                   successfully. 
  5848.  
  5849.                              aud_c_esl_cond_denial The event failed because 
  5850.                                   access was denied. 
  5851.  
  5852.                              aud_c_esl_cond_failure The event failed for 
  5853.                                   reasons other than access denial. 
  5854.  
  5855.                              aud_c_esl_cond_pending The event is in an 
  5856.                                   intermediate state; the outcome is pending 
  5857.                                   and is one in a series of connected events, 
  5858.                                   where the application waits to record the 
  5859.                                   real outcome after the last event only. 
  5860.  
  5861.                              aud_c_esl_cond_unknown The event outcome (denial, 
  5862.                                   failure, pending, or success) is still 
  5863.                                   unknown. This outcome exists only between a 
  5864.                                   dce_aud_start (all varieties of this routine) 
  5865.                                   call and the next dce_aud_commit call. You 
  5866.                                   can also use 0 to specify this outcome. 
  5867.  
  5868.           Output 
  5869.  
  5870.           ard           Returns a pointer to an audit record buffer. If the 
  5871.                         event does not need to be audited because it is not 
  5872.                         selected by the filters, or if the environment variable 
  5873.                         DCEAUDITOFF has been set, a NULL pointer is returned. 
  5874.                         If the routine is called with outcome set to 
  5875.                         aud_c_esl_cond_unknown, it is possible that the routine 
  5876.                         cannot determine whether the event should be audited. 
  5877.                         In this case, the audit record descriptor is still 
  5878.                         allocated and its address is returned to the caller. An 
  5879.                         outcome must be provided prior to logging the record 
  5880.                         with the dce_aud_commit routine. 
  5881.  
  5882.           status        The status code returned by this routine. If 
  5883.                         successful, the routine returns aud_s_ok. If not, the 
  5884.                         status code contains one of the following errors: 
  5885.  
  5886.                              Status codes passed from sec_rgy_site_open. 
  5887.                              Status codes passed from 
  5888.                              sec_rgy_properties_get_info, 
  5889.                              Status codes passed from uuid_create_nil. 
  5890.  
  5891.  Usage 
  5892.  
  5893.           The dce_aud_start_with_pac routine determines if an audit record must 
  5894.           be generated for the specified event. The decision is based on the 
  5895.           event filters, two environment variables (DCEAUDITON and 
  5896.           DCEAUDITOFF), the client's identity provided in the pac parameter, 
  5897.           and the event outcome (if it is provided in the outcome parameter). 
  5898.           If this event needs to be audited, the routine allocates an audit 
  5899.           record descriptor and returns a pointer to it, (that is, ard). If the 
  5900.           event does not need to be audited, NULL is returned in the ard 
  5901.           parameter. If either the aud_c_evt_always_log or 
  5902.           aud_c_evt_always_alarm option is selected, an audit record descriptor 
  5903.           is always created and returned. 
  5904.  
  5905.           Note:  If both the DCEAUDITOFF and DCEAUDITON environment variables 
  5906.                  are set before starting the Audit daemon, DCEAUDITOFF takes 
  5907.                  precedence. 
  5908.  
  5909.           The dce_aud_start_with_pac routine is designed to be used by non-RPC 
  5910.           applications that use the DCE authorization model (that is, DCE PAC 
  5911.           and ACL). RPC applications must use dce_aud_start. Non-RPC 
  5912.           applications that do not use the DCE authorization model must use 
  5913.           dce_aud_start_with_name. 
  5914.  
  5915.           This routine obtains the client's identity information from the 
  5916.           client's privilege attribute certificate (PAC) and records it in the 
  5917.           newly created audit record descriptor. 
  5918.  
  5919.           Event-specific information can be added to the record by calling the 
  5920.           dce_aud_put_ev_info routine. This routine can be called multiple 
  5921.           times after calling any of the dce_aud_start_xxx routines and before 
  5922.           calling dce_aud_commit. A completed audit record can either be 
  5923.           appended to an audit trail file or sent to the Audit daemon by 
  5924.           calling the dce_aud_commit routine. 
  5925.  
  5926.           This routine searches for all relevant filters (for the specified 
  5927.           subject and outcome, if these are specified), summarizes the actions 
  5928.           for each possible event outcome, and records an outcome-action table 
  5929.           with ard. If the outcome is specified when calling this routine and 
  5930.           the outcome does not require any action according to filters, this 
  5931.           routine returns a NULL ard. 
  5932.  
  5933.           If the outcome is not specified in the dce_aud_start_with_pac call, 
  5934.           dce_aud_start_with_pac returns a NULL ard if no action is required 
  5935.           for all possible outcomes. 
  5936.  
  5937.           The caller should not change the outcome between the 
  5938.           dce_aud_start_with_pac and dce_aud_commit routines arbitrarily. In 
  5939.           this case, the outcome can be made more specific, for example, from 
  5940.           aud_c_esl_cond_unknown to aud_c_esl_cond_success or from 
  5941.           aud_c_esl_cond_pending to aud_c_esl_cond_success. 
  5942.  
  5943.           An outcome change from aud_c_esl_cond_success to 
  5944.           aud_c_esl_cond_denial is not logically correct because the outcome 
  5945.           aud_c_esl_cond_success may have caused a NULL ard to be returned in 
  5946.           this routine. If the final outcome can be aud_c_esl_cond_success, 
  5947.           then it should be specified in this routine, or use 
  5948.           aud_c_esl_cond_unknown. 
  5949.  
  5950.           This routine can be called with the outcome parameter taking a value 
  5951.           of zero or the union (logical OR) of selected values from the set of 
  5952.           constants aud_c_esl_cond_success, aud_c_esl_cond_failure, 
  5953.           aud_c_esl_cond_denial, and aud_c_esl_cond_pending. The outcome 
  5954.           parameter used in the dce_aud_commit routine should take one value 
  5955.           from the same set of constants. 
  5956.  
  5957.           If dce_aud_start_with_pac used a non-zero value for outcome, then the 
  5958.           constant used for outcome in the dce_aud_commit routine should have 
  5959.           been selected in the dce_aud_start_with_pac call. 
  5960.  
  5961.  Related Information 
  5962.  
  5963.           Routines: 
  5964.           dce_aud_commit 
  5965.           dce_aud_open 
  5966.           dce_aud_put_ev_info 
  5967.           dce_aud_start 
  5968.           dce_aud_start_with_name 
  5969.           dce_aud_start_with_server_binding 
  5970.  
  5971.  
  5972. ΓòÉΓòÉΓòÉ 3.4.33. dce_aud_start_with_server_binding ΓòÉΓòÉΓòÉ
  5973.  
  5974.  Purpose 
  5975.  
  5976.           Determines whether a specified event must be audited given the server 
  5977.           binding information and the event outcome. If the event must be 
  5978.           audited, or if the outcome of the event is not yet known, the memory 
  5979.           for the audit record descriptor is allocated and the address of this 
  5980.           structure is returned to the caller. This routine is used by 
  5981.           client/server applications. 
  5982.  
  5983.  Format 
  5984.  
  5985.                     #include <dce\audit.h>
  5986.  
  5987.                     void dce_aud_start_with_server_binding(
  5988.                             unsigned32  event,
  5989.                             rpc_binding_handle_t  binding,
  5990.                             unsigned32  options,
  5991.                             unsigned32  outcome,
  5992.                             dce_aud_rec_t  *ard,
  5993.                             unsigned32  *status);
  5994.  
  5995.  Parameters 
  5996.  
  5997.           Input 
  5998.  
  5999.           event         Specifies the event to be audited. This is a 32-bit 
  6000.                         event number. The event field in the audit record 
  6001.                         header is set to this number. 
  6002.  
  6003.           binding       Specifies the server's RPC binding handle from which 
  6004.                         the server identification information is retrieved to 
  6005.                         set the client, cell, and addr fields in the audit 
  6006.                         record header. Note that when an application client 
  6007.                         issues an audit record, the server identity is 
  6008.                         represented in the client field of the record. 
  6009.  
  6010.           options       This parameter can be used to specify the optional 
  6011.                         header information desired (aud_c_evt_all_info, 
  6012.                         aud_c_evt_group_info, aud_c_evt_address_info). It can 
  6013.                         also be used to specify any of two options: to always 
  6014.                         log an audit record (aud_c_evt_always_log) or to always 
  6015.                         send an alarm message to the standard output 
  6016.                         (aud_c_evt_always_alarm). If either of these two 
  6017.                         options is selected, the filter is bypassed. 
  6018.  
  6019.                         The value of the options parameter is the bitwise OR of 
  6020.                         any selected combination of the following option 
  6021.                         values: 
  6022.  
  6023.                              aud_c_evt_address_info Includes the server address 
  6024.                                   information in the audit record header. 
  6025.  
  6026.                              aud_c_evt_always_log Bypasses the filter and 
  6027.                                   indicates that the event must be logged. 
  6028.  
  6029.                              aud_c_evt_always_alarm Bypasses the filter and 
  6030.                                   indicates that an alarm message must be sent 
  6031.                                   to the system console for the event. 
  6032.  
  6033.                              aud_c_evt_specific_info Includes event specific 
  6034.                                   information. 
  6035.  
  6036.                              aud_c_evt_delegates_info Includes delegation 
  6037.                                   information. 
  6038.  
  6039.                              aud_c_evt_raw_info Includes raw information. 
  6040.  
  6041.           outcome       The event outcome to be stored in the header. The 
  6042.                         following event outcome values are defined: 
  6043.  
  6044.                              aud_c_esl_cond_success The event was completed 
  6045.                                   successfully. 
  6046.  
  6047.                              aud_c_esl_cond_denial The event failed because 
  6048.                                   access was denied. 
  6049.  
  6050.                              aud_c_esl_cond_failure The event failed for 
  6051.                                   reasons other than access denial. 
  6052.  
  6053.                              aud_c_esl_cond_pending The event is in an 
  6054.                                   intermediate state; the outcome is pending 
  6055.                                   and is one in a series of connected events, 
  6056.                                   where the application waits to record the 
  6057.                                   real outcome after the last event only. 
  6058.  
  6059.                              aud_c_esl_cond_unknown The event outcome (denial, 
  6060.                                   failure, pending, or success) is still 
  6061.                                   unknown. This outcome exists only between a 
  6062.                                   dce_aud_start (all varieties of this routine) 
  6063.                                   call and the next dce_aud_commit call. You 
  6064.                                   can also use 0 to specify this outcome. 
  6065.  
  6066.           Output 
  6067.  
  6068.           ard           Returns a pointer to an audit record buffer. If the 
  6069.                         event does not need to be audited because it is not 
  6070.                         selected by the filters, or if the environment variable 
  6071.                         DCEAUDITOFF has been set, a NULL pointer is returned. 
  6072.                         If the routine is called with outcome set to 
  6073.                         aud_c_esl_cond_unknown, it is possible that the routine 
  6074.                         cannot determine whether the event should be audited. 
  6075.                         In this case, the audit record descriptor is still 
  6076.                         allocated and its address is returned to the caller. An 
  6077.                         outcome must be provided prior to logging the record 
  6078.                         with the dce_aud_commit routine. 
  6079.  
  6080.           status        The status code returned by this routine. If 
  6081.                         successful, the routine returns aud_s_ok. If not, the 
  6082.                         status code contains one of the following errors: 
  6083.  
  6084.                              Status codes passed from 
  6085.                              rpc_binding_inq_auth_info. 
  6086.                              Status codes passed from 
  6087.                              rpc_binding_to_string_binding. 
  6088.                              Status codes passed from dce_aud_start_with_name 
  6089.  
  6090.  Usage 
  6091.  
  6092.           The dce_aud_start_with_server_binding routine determines if an audit 
  6093.           record must be generated for the specified event. The decision is 
  6094.           based on the event filters, two environment variables (DCEAUDITON and 
  6095.           DCEAUDITOFF), the server's identity provided in the binding 
  6096.           parameter, and the event outcome (if it is provided in the outcome 
  6097.           parameter). If this event needs to be audited, the routine allocates 
  6098.           an audit record descriptor and returns a pointer to it (that is, 
  6099.           ard). If the event does not need to be audited, NULL is returned in 
  6100.           the ard parameter. If the aud_c_evt_always_log or 
  6101.           aud_c_evt_always_alarm option is selected, an audit record descriptor 
  6102.           is always created and returned. 
  6103.  
  6104.           Note:  If both the DCEAUDITOFF and DCEAUDITON environment variables 
  6105.                  are set before starting the Audit daemon, DCEAUDITOFF takes 
  6106.                  precedence. 
  6107.  
  6108.           The dce_aud_start_with_server_binding routine is designed to be used 
  6109.           by RPC applications. Non-RPC applications that use the DCE 
  6110.           authorization model must use the dce_aud_start_with_pac routine. 
  6111.           Non-RPC applications that do not use the DCE authorization model must 
  6112.           use the dce_aud_start_with_name routine. 
  6113.  
  6114.           This routine obtains the server identity information from the RPC 
  6115.           binding handle and records it in the newly created audit record 
  6116.           descriptor. 
  6117.  
  6118.           Event-specific information can be added to the record by calling the 
  6119.           dce_aud_put_ev_info routine. The dce_aud_put_ev_info routine can be 
  6120.           called multiple times after calling any of the dce_aud_start_xxx 
  6121.           routines and before calling dce_aud_commit. A completed audit record 
  6122.           can either be appended to an audit trail file or sent to the Audit 
  6123.           daemon by calling dce_aud_commit. 
  6124.  
  6125.           This routine searches for all relevant filters (for the specified 
  6126.           subject and outcome, if these are specified), summarizes the actions 
  6127.           for each possible event outcome, and records an outcome-action table 
  6128.           with ard. If the outcome is specified when calling this routine and 
  6129.           the outcome does not require any action according to filters, this 
  6130.           routine returns a NULL ard. 
  6131.  
  6132.           If the outcome is not specified in the 
  6133.           dce_aud_start_with_server_binding call, 
  6134.           dce_aud_start_with_server_binding returns a NULL ard if no action is 
  6135.           required for all possible outcomes. 
  6136.  
  6137.           The caller should not change the outcome between the 
  6138.           dce_aud_start_with_server_binding and dce_aud_commit calls 
  6139.           arbitrarily. In this case, the outcome can be made more specific, for 
  6140.           example, from aud_c_esl_cond_unknown to aud_c_esl_cond_success or 
  6141.           from aud_c_esl_cond_pending to aud_c_esl_cond_success. 
  6142.  
  6143.           An outcome change from aud_c_esl_cond_success to 
  6144.           aud_c_esl_cond_denial is not logically correct because the outcome 
  6145.           aud_c_esl_cond_success may have caused a NULL ard to be returned in 
  6146.           this routine. If the final outcome can be aud_c_esl_cond_success, it 
  6147.           should be specified in this routine, or use aud_c_esl_cond_unknown. 
  6148.  
  6149.           This routine can be called with the outcome parameter taking a value 
  6150.           of zero or the union (logical OR) of selected values from the set of 
  6151.           constants aud_c_esl_cond_success, aud_c_esl_cond_failure, 
  6152.           aud_c_esl_cond_denial, and aud_c_esl_cond_pending. The outcome 
  6153.           parameter used in the dce_aud_commit routine should take one value 
  6154.           from the same set of constants. 
  6155.  
  6156.           If dce_aud_start_with_server_binding used a non-zero value for 
  6157.           outcome, the constant used for outcome in the dce_aud_commit call 
  6158.           should have been selected in the dce_aud_start_with_server_binding 
  6159.           call. 
  6160.  
  6161.  Related Information 
  6162.  
  6163.           Routines: 
  6164.           dce_aud_commit 
  6165.           dce_aud_open 
  6166.           dce_aud_put_ev_info 
  6167.           dce_aud_start 
  6168.           dce_aud_start_with_pac 
  6169.           dce_aud_start_with_name 
  6170.  
  6171.  
  6172. ΓòÉΓòÉΓòÉ 3.4.34. dce_aud_start_with_uuid ΓòÉΓòÉΓòÉ
  6173.  
  6174.  Purpose 
  6175.  
  6176.           Determines whether a specified event should be audited, given the 
  6177.           client/server UUID and the event outcome. If the event must be 
  6178.           audited, or if the outcome of the event is not yet known, the memory 
  6179.           for the audit record descriptor is allocated and the address of this 
  6180.           structure is returned to the caller. This routine is used by 
  6181.           client/server applications that already know the UUIDs of their 
  6182.           clients and want to avoid the overhead of the audit library acquiring 
  6183.           them. 
  6184.  
  6185.  Format 
  6186.  
  6187.                     #include <dce\audit.h>
  6188.  
  6189.                     void dce_aud_start_with_uuid(
  6190.                             unsigned32  event,
  6191.                             uuid_t  server_uuid,
  6192.                             uuid_t  client_uuid,
  6193.                             uuid_t  realm_uuid,
  6194.                             unsigned_char_t  * address,
  6195.                             unsigned32  options,
  6196.                             unsigned32  outcome,
  6197.                             dce_aud_rec_t  *ard,
  6198.                             unsigned32  *status);
  6199.  
  6200.  Parameters 
  6201.  
  6202.           Input 
  6203.  
  6204.           event         Specifies the event to be audited.  This is a 32-bit 
  6205.                         event number. The event field in the audit record 
  6206.                         header is set to this number. 
  6207.  
  6208.           server_uuid   Specifies the calling application's principal UUID. 
  6209.  
  6210.           client_uuid   Specifies the remote client or server's principal UUID. 
  6211.  
  6212.           realm_uuid    Specifies the remote client or server's cell UUID. 
  6213.  
  6214.           address       Specifies the remote client or server's address. The 
  6215.                         address could be in any format of the underlying 
  6216.                         transport protocol. 
  6217.  
  6218.           options       Specifies the optional header information desired 
  6219.                         (aud_c_evt_all_info, aud_c_evt_group_info, 
  6220.                         aud_c_evt_address_info). 
  6221.  
  6222.                         It can also be used to specify any of two options: to 
  6223.                         always log an audit record (aud_c_evt_always_log) or to 
  6224.                         always send an alarm message to the standard output 
  6225.                         (aud_c_evt_always_alarm). If either of these two 
  6226.                         options is selected, the filter is bypassed. The value 
  6227.                         of the options parameter is the bitwise OR of any 
  6228.                         selected combination of the following option values: 
  6229.  
  6230.                              aud_c_evt_all_info Includes all optional 
  6231.                                   information (groups and address) in the audit 
  6232.                                   record header. 
  6233.  
  6234.                              aud_c_evt_groups_info Includes the groups 
  6235.                                   information in the audit record header. 
  6236.  
  6237.                              aud_c_evt_address_info Includes the client address 
  6238.                                   information in the audit record header. 
  6239.  
  6240.                              aud_c_evt_always_log Bypasses the filter mechanism 
  6241.                                   and indicates that the event must be logged. 
  6242.  
  6243.                              aud_c_evt_always_alarm Bypasses the filter 
  6244.                                   mechanism and indicates that an alarm message 
  6245.                                   must be sent to the system console for the 
  6246.                                   event. 
  6247.  
  6248.                              aud_c_evt_specific_info Includes event specific 
  6249.                                   information. 
  6250.  
  6251.                              aud_c_evt_delegates_info Includes delegation 
  6252.                                   information. 
  6253.  
  6254.                              aud_c_evt_raw_info Includes raw information. 
  6255.  
  6256.           outcome       The event outcome to be stored in the header.  The 
  6257.                         following event outcome values are defined: 
  6258.  
  6259.                              aud_c_esl_cond_unknown The event outcome (denial, 
  6260.                                   failure, or success) is still unknown. 
  6261.  
  6262.                              aud_c_esl_cond_success The event completed 
  6263.                                   successfully. 
  6264.  
  6265.                              aud_c_esl_cond_denial The event failed because 
  6266.                                   access was denied. 
  6267.  
  6268.                              aud_c_esl_cond_failure The event failed for 
  6269.                                   reasons other than access denial. 
  6270.  
  6271.                              aud_c_esl_cond_pending The event outcome is 
  6272.                                   pending and is one in a series of connected 
  6273.                                   events, where the application wants to record 
  6274.                                   the real outcome after the last event only. 
  6275.  
  6276.           Output 
  6277.  
  6278.           ard           Returns a pointer to an audit record buffer. If the 
  6279.                         event does not need to be audited because it is not 
  6280.                         selected by the filters, or if the environment variable 
  6281.                         DCEAUDITOFF has been set, a NULL pointer is returned. 
  6282.                         If the routine is called with outcome set to 
  6283.                         aud_c_esl_cond_unknown, it is possible that the routine 
  6284.                         cannot determine whether the event should be audited. 
  6285.                         In this case, the audit record descriptor is still 
  6286.                         allocated and its address is returned to the caller. An 
  6287.                         outcome other than aud_c_esl_cond_unknown must be 
  6288.                         provided prior to logging the record with the 
  6289.                         dce_aud_commit routine. 
  6290.  
  6291.           status        The status code returned by this routine. If 
  6292.                         successful, the routine returns aud_s_ok. If not, the 
  6293.                         status codes are passed from dce_aud_start_with_pac. 
  6294.  
  6295.  Usage 
  6296.  
  6297.           The dce_aud_start_with_uuid routine determines if an audit record 
  6298.           must be generated for the specified event. The decision is based on 
  6299.           the event filters, two environment variables (DCEAUDITON and 
  6300.           DCEAUDITOFF), the client's identity provided in the input parameters, 
  6301.           and the event outcome (if it is provided in the outcome parameter). 
  6302.           If this event needs to be audited, the routine allocates an audit 
  6303.           record descriptor and returns a pointer to it, (that is, ard). If the 
  6304.           event does not need to be audited, NULL is returned in the ard 
  6305.           parameter. If either the aud_c_evt_always_log or 
  6306.           aud_c_evt_always_alarm option is selected, an audit record descriptor 
  6307.           is always created and returned. 
  6308.  
  6309.           Note:  If both the DCEAUDITOFF and DCEAUDITON environment variables 
  6310.                  are set before starting the Audit daemon, DCEAUDITOFF takes 
  6311.                  precedence. 
  6312.  
  6313.           The dce_aud_start_with_uuid routine is designed to be used by RPC 
  6314.           applications that know their client's identity in UUID form. 
  6315.           Otherwise, RPC applications should use dce_aud_start. Non-RPC 
  6316.           applications that use the DCE authorization model should use 
  6317.           dce_aud_start_with_pac. The dce_aud_start_with_name routine should be 
  6318.           used by Non-RPC applications that do not use the DCE authorization 
  6319.           model. 
  6320.  
  6321.           This routine records the input identity parameters in the 
  6322.           newly-created audit record descriptor. 
  6323.  
  6324.           Event-specific information can be added to the record by using the 
  6325.           dce_aud_put_ev_info routine, which can be called multiple times after 
  6326.           calling any of the dce_aud_start_xxx routines and before calling 
  6327.           dce_aud_commit. A completed audit record can either be appended to an 
  6328.           audit trail file or sent to the Audit daemon by calling 
  6329.           dce_aud_commit. 
  6330.  
  6331.           This routine searches for all relevant filters (for the specified 
  6332.           subject and outcome, if these are specified), summarizes the actions 
  6333.           for each possible event outcome, and records an outcome-action table 
  6334.           with ard. If the outcome is specified when calling this routine and 
  6335.           the outcome does not require any action according to filters, this 
  6336.           routine returns a NULL ard. 
  6337.  
  6338.           If the outcome is not specified in the dce_aud_start_with_uuid call, 
  6339.           dce_aud_start_with_uuid returns a NULL ard if no action is required 
  6340.           for all possible outcomes. 
  6341.  
  6342.           The caller should not change the outcome between the 
  6343.           dce_aud_start_with_uuid and dce_aud_commit calls arbitrarily. In this 
  6344.           case, the outcome can be made more specific, for example, from 
  6345.           aud_c_esl_cond_unknown to aud_c_esl_cond_success or from 
  6346.           aud_c_esl_cond_pending to aud_c_esl_cond_success. 
  6347.  
  6348.           An outcome change from aud_c_esl_cond_success to 
  6349.           aud_c_esl_cond_denial is not logically correct because the outcome 
  6350.           aud_c_esl_cond_success might have caused a NULL ard to be returned in 
  6351.           this routine. If the final outcome can be aud_c_esl_cond_success, 
  6352.           then it should be specified in this routine, or use 
  6353.           aud_c_esl_cond_unknown. 
  6354.  
  6355.           This routine can be called with the outcome parameter taking a value 
  6356.           of zero or the union (logical OR) of selected values from the set of 
  6357.           constants aud_c_esl_cond_success, aud_c_esl_cond_failure, 
  6358.           aud_c_esl_cond_denial, and aud_c_esl_cond_pending. The outcome 
  6359.           parameter used in the dce_aud_commit routine should take one value 
  6360.           from the same set of constants. 
  6361.  
  6362.           If dce_aud_start_with_uuid used a non-zero value for outcome, then 
  6363.           the constant used for outcome in the dce_aud_commit routine should 
  6364.           have been selected in the dce_aud_start_with_uuid routine. 
  6365.  
  6366.  Related Information 
  6367.  
  6368.           Routines: 
  6369.           dce_aud_commit 
  6370.           dce_aud_open 
  6371.           dce_aud_put_ev_info 
  6372.           dce_aud_start 
  6373.           dce_aud_start_with_pac 
  6374.           dce_aud_start_with_name 
  6375.           dce_aud_start_with_server_binding 
  6376.  
  6377.  
  6378. ΓòÉΓòÉΓòÉ 3.4.35. get_event_name_from_event_number ΓòÉΓòÉΓòÉ
  6379.  
  6380.  Purpose 
  6381.  
  6382.           Returns the event name from the event number. This routine is used by 
  6383.           the trail analysis and examination tools. 
  6384.  
  6385.  Format 
  6386.  
  6387.                     #include <dce\audit.h>
  6388.  
  6389.                     boolean32 get_event_name_from_event_number(
  6390.                             unsigned32  number,
  6391.                             char  *name);
  6392.  
  6393.  Parameters 
  6394.  
  6395.           Input 
  6396.  
  6397.           number        The 32-bit heximal event number. 
  6398.  
  6399.           Output 
  6400.  
  6401.           name          The event name associated with the 32-bit event number. 
  6402.  
  6403.  Usage 
  6404.  
  6405.           The get_event_name_from_number routine returns the event (ASCII) name 
  6406.           of the associated 32-bit event number. This routine is used in 
  6407.           dce_aud_print to display the human readable form of the audit 
  6408.           records. This routine can also be used in any application where it is 
  6409.           necessary to obtain the event name from the event number. 
  6410.  
  6411.   Related Information 
  6412.  
  6413.           Routines: 
  6414.           get_event_number_from_event_name 
  6415.  
  6416.  
  6417. ΓòÉΓòÉΓòÉ 3.4.36. get_event_number_from_event_name ΓòÉΓòÉΓòÉ
  6418.  
  6419.  Purpose 
  6420.  
  6421.           Returns the event number from the event name. This routine is used by 
  6422.           the trail analysis and examination tools. 
  6423.  
  6424.  Format 
  6425.  
  6426.                     #include <dce\audit.h>
  6427.  
  6428.                     boolean32 get_event_number_from_event_name(
  6429.                             char  *name,
  6430.                             unsigned32  number);
  6431.  
  6432.  Parameters 
  6433.  
  6434.           Input 
  6435.  
  6436.           name          The ASCII form of the event name. 
  6437.  
  6438.           Output 
  6439.  
  6440.           number        The 32-bit heximal event number associated with the 
  6441.                         event name. 
  6442.  
  6443.  Usage 
  6444.  
  6445.           The get_event_number_from_name routine returns the 32-bit heximal 
  6446.           event number associated with the event name. This routine is used in 
  6447.           dce_aud_print to display the human readable form of the audit 
  6448.           records. This routine can also be used in any application where it is 
  6449.           necessary to obtain the event number from the event name. 
  6450.  
  6451.   Related Information 
  6452.  
  6453.           Routines: 
  6454.           get_event_name_from_event_number 
  6455.  
  6456.  
  6457. ΓòÉΓòÉΓòÉ 3.5. The DCE Configuration Routines ΓòÉΓòÉΓòÉ
  6458.  
  6459. The DCE configuration routines return information based on the contents of the 
  6460. local DCE configuration file, which is created during the DCE 
  6461. cell-configuration or machine-configuration process. A configuration file is 
  6462. located on each DCE machine; it contains the host's name, the primary name of 
  6463. the cell where the host is located, and any aliases for that cell name. 
  6464.  
  6465. The configuration routines can also be used to get some additional information 
  6466. corollary to the host name, namely: 
  6467.  
  6468.    o  The host's principal name 
  6469.    o  Binding information to the host 
  6470.  
  6471.  The configuration file on machines that belong to internationalized DCE cells 
  6472.  also contains the path name to the code set registry object file on the host. 
  6473.  
  6474.  The Security Service component on each DCE machine must be able to find out, 
  6475.  by strictly local means, the machine's host name, the host machine's principal 
  6476.  name, and its cell name.  The DCE configuration routines exist primarily to 
  6477.  enable Security components to do these things.  But because this information 
  6478.  can be useful to DCE applications as well, these routines are made available 
  6479.  as part of the general application programming interface. 
  6480.  
  6481.  Notes  Host name, as used throughout this section, refers to the DCE host name 
  6482.         (that is, the machine's \...\cellname\host_directory\dce_hostname entry 
  6483.         in the CDS namespace), and not the Domain Name Service (DNS) host name, 
  6484.         which can be quite different from the DCE name. 
  6485.  
  6486.  The dce_hostname is case sensitive. 
  6487.  
  6488.  See the following topics for more information: 
  6489.  
  6490.       Configuration Routines List 
  6491.       Configuration Notes 
  6492.       Configuration Files 
  6493.       Configuration Output 
  6494.       Related Information for DCE Configuration 
  6495.  
  6496.  
  6497. ΓòÉΓòÉΓòÉ 3.5.1. Configuration Routines List ΓòÉΓòÉΓòÉ
  6498.  
  6499. The DCE configuration routines are: 
  6500.  
  6501.  dce_cf_binding_entry_from_host          Returns the host binding entry name. 
  6502.  
  6503.  dce_cf_dced_entry_from_host             Returns the dced entry name on a host. 
  6504.  
  6505.  dce_cf_find_name_by_key                 Returns a string tagged by key (this 
  6506.                                          is a lower-level utility routine that 
  6507.                                          is used by the others). 
  6508.  
  6509.  dce_cf_free_cell_aliases                Frees a list of cell aliases for a 
  6510.                                          cell. 
  6511.  
  6512.  dce_cf_get_cell_aliases                 Returns a list of cell aliases for a 
  6513.                                          cell. 
  6514.  
  6515.  dce_cf_get_cell_name                    Returns the primary cell name for the 
  6516.                                          local cell. 
  6517.  
  6518.  dce_cf_get_csrgy_filename               Returns the path name of the code set 
  6519.                                          registry file on a host. 
  6520.  
  6521.  dce_cf_get_host_name                    Returns the host name relative to a 
  6522.                                          local cell. 
  6523.  
  6524.  dce_cf_prin_name_from_host              Returns the host's principal name. 
  6525.  
  6526.  dce_cf_profile_entry_from_host          Returns the host's profile entry. 
  6527.  
  6528.  dce_cf_same_cell_name                   Indicates whether two cell names refer 
  6529.                                          to the same cell. 
  6530.  
  6531.  
  6532. ΓòÉΓòÉΓòÉ 3.5.2. Configuration Notes ΓòÉΓòÉΓòÉ
  6533.  
  6534. The DCE 1.0 implementations of the DCE configuration routines accepts only 
  6535. lines (in the configuration file) with a length of less than 1024 characters. 
  6536. If a tag occurs more than once in the input, the routines recognize only the 
  6537. first occurrence. 
  6538.  
  6539.  
  6540. ΓòÉΓòÉΓòÉ 3.5.3. Configuration Files ΓòÉΓòÉΓòÉ
  6541.  
  6542.  dcelocal\dce_cf.db  The machine's local DCE configuration file (where dcelocal 
  6543.                      is usually \opt\dcelocal). 
  6544.  
  6545.  The format of the configuration file is as follows. 
  6546.  
  6547.  Each of the entries is tagged with its own identifier, which must be the first 
  6548.  nonblank token on a line that does not begin with a # (number sign) comment 
  6549.  character.  The second token on a line is assumed to be the name associated 
  6550.  with the tag that was detected in front of it. 
  6551.  
  6552.  For example, cellname and dce_hostname are tags identifying the cell name and 
  6553.  host name, respectively, for the machine where the configuration file is 
  6554.  located. A sample configuration file could have the following contents: 
  6555.  
  6556.   cellname \...\osf.org
  6557.   dce_hostname hosts\brazil
  6558.  
  6559.  which would identify the host brazil in the osf.org cell. 
  6560.  
  6561.  Text characterized by the following is ignored: 
  6562.  
  6563.    o  Garbage lines; that is, lines that do not conform to the previously 
  6564.       described format. 
  6565.    o  Leading and trailing spaces in lines. 
  6566.    o  Additional tokens occurring on a line after the second token. 
  6567.  
  6568.  Only privileged users should be able to write the configuration file and 
  6569.  everyone should be able to read it. 
  6570.  
  6571.  
  6572. ΓòÉΓòÉΓòÉ 3.5.4. Configuration Output ΓòÉΓòÉΓòÉ
  6573.  
  6574. The DCE configuration routines return names without global or cell-relative 
  6575. prefixes, such as host_directory\dce_hostname or principalname where 
  6576. host_directory is usually hosts. 
  6577.  
  6578. However, the DCE Name Service Interface (NSI) routines require that the names 
  6579. that are passed to them are expressed either in cell-relative form such as: 
  6580.  
  6581. \.:\host_directory\dce_hostname
  6582.  
  6583. or as global names, with the global root prefix \...\ and the cell name, such 
  6584. as: 
  6585.  
  6586. \...\cellname\host_directory\dce_hostname
  6587.  
  6588. Therefore, an application must add either the cell-relative (\.:\) or correct 
  6589. global (\...\cellname) prefix to any name that it receives from a DCE 
  6590. configuration routine before it passes the name to an NSI routine. (All NSI 
  6591. routines have names beginning with rpc_ns_.) For example, if expressed in 
  6592. cell-relative form, the name host_directory\dce_hostname would become: 
  6593.  
  6594. \.:\hosts\dce_hostname
  6595.  
  6596. The cell-relative form of the name principalname would be: 
  6597.  
  6598. \.:\sec\principals\principalname
  6599.  
  6600. where dce_hostname and principalname are the host's name and principal name, 
  6601. respectively. 
  6602.  
  6603.  
  6604. ΓòÉΓòÉΓòÉ 3.5.5. Related Information for DCE Configuration ΓòÉΓòÉΓòÉ
  6605.  
  6606. Books: 
  6607. DCE for OS/2 Warp: Administration Guide 
  6608. DCE for OS/2 Warp: Administration Command Reference 
  6609.  
  6610.  
  6611. ΓòÉΓòÉΓòÉ 3.5.6. dce_cf_binding_entry_from_host ΓòÉΓòÉΓòÉ
  6612.  
  6613.  Purpose 
  6614.  
  6615.           Returns the host binding entry name. 
  6616.  
  6617.  Library 
  6618.  
  6619.           \lib\dceos2.lib 
  6620.  
  6621.  Format 
  6622.  
  6623.                     #include <dce_cf.h>
  6624.  
  6625.                     public void dce_cf_binding_entry_from_host(
  6626.                             char  *dce_hostname,
  6627.                             char  **entry_name,
  6628.                             error_status_t  *status);
  6629.  
  6630.  Parameters 
  6631.  
  6632.           Input 
  6633.  
  6634.           dce_hostname  Specifies the name of the host. Note that host names 
  6635.                         are case sensitive. If NULL, the configuration file is 
  6636.                         searched for the host name, and that name, if found, is 
  6637.                         used. 
  6638.  
  6639.           Output 
  6640.  
  6641.           entry_name    The binding entry name associated with the specified 
  6642.                         host. 
  6643.  
  6644.           status        Returns the status code from this operation. The status 
  6645.                         code is a value that indicates whether the routine 
  6646.                         completed successfully and if not, why not. 
  6647.  
  6648.                         Possible status codes and their meanings are: 
  6649.  
  6650.                              dce_cf_st_ok Operation completed successfully. 
  6651.  
  6652.                              dce_cf_e_file_open File open error. 
  6653.  
  6654.                              dce_cf_e_no_mem No memory available. 
  6655.  
  6656.                              dce_cf_e_no_match No dce_hostname entry in the DCE 
  6657.                                   configuration file. 
  6658.  
  6659.  Usage 
  6660.  
  6661.           The dce_cf_binding_entry_from_host routine returns the binding entry 
  6662.           name string associated with the dce_hostname passed to it. If 
  6663.           dce_hostname is NULL, the binding entry name associated with the name 
  6664.           returned by dce_cf_get_host_name is returned. 
  6665.  
  6666.  Related Information 
  6667.  
  6668.           Routines: 
  6669.           dce_cf_find_name_by_key 
  6670.           dce_cf_get_cell_name 
  6671.           dce_cf_get_host_name 
  6672.           dce_cf_prin_name_from_host 
  6673.  
  6674.           Files: 
  6675.           dcelocal\dce_cf.db - The machine's local DCE configuration file 
  6676.           (where dcelocal is usually \opt\dcelocal). 
  6677.  
  6678.           Books: 
  6679.           DCE for OS/2 Warp: Administration Guide 
  6680.  
  6681.  
  6682. ΓòÉΓòÉΓòÉ 3.5.7. dce_cf_dced_entry_from_host ΓòÉΓòÉΓòÉ
  6683.  
  6684.  Purpose 
  6685.  
  6686.           Returns the dced entry name on a host. 
  6687.  
  6688.  Format 
  6689.  
  6690.                     #include <dce\dce_cf.h>
  6691.  
  6692.                     void dce_cf_dced_entry_from_host(
  6693.                             char  *dce_hostname,
  6694.                             char  **entry_name,
  6695.                             error_status_t  *status);
  6696.  
  6697.  Parameters 
  6698.  
  6699.           Input 
  6700.  
  6701.           dce_hostname  Specifies the name of the host. Note that host names 
  6702.                         are case-sensitive. If this value is NULL, the value 
  6703.                         returned by dce_cf_get_host_name is used. 
  6704.  
  6705.           Output 
  6706.  
  6707.           entry_name    The dced entry name associated with the specified host. 
  6708.                         Storage for this name is dynamically allocated. 
  6709.  
  6710.           status        Returns the status code from this operation. The status 
  6711.                         code is a value that indicates whether the routine 
  6712.                         completed successfully and if not, why not. 
  6713.  
  6714.                         Possible status codes and their meanings are: 
  6715.  
  6716.                              dce_cf_st_ok Operation completed successfully. 
  6717.  
  6718.                              dce_cf_e_file_open File open error. 
  6719.  
  6720.                              dce_cf_e_no_mem No memory available. 
  6721.  
  6722.                              dce_cf_e_no_match No dce_hostname entry in the DCE 
  6723.                                   configuration file. 
  6724.  
  6725.  Usage 
  6726.  
  6727.           The dce_cf_dced_entry_from_host routine returns the name entered into 
  6728.           the DCE namespace for a DCE host daemon (dced) on the host specified 
  6729.           by the dce_hostname parameter. If the dce_hostname parameter is NULL, 
  6730.           the dced name associated with the name returned by 
  6731.           dce_cf_get_host_name is returned. The string name is of the form 
  6732.           \.:\hosts\dce_hostname\config, and specifies the entry point into the 
  6733.           dced namespace on the host. This is the location in the DCE namespace 
  6734.           where dced stores the objects associated with the host services it 
  6735.           provides (the hostdata, srvrconf, srvrexec, secval, and keytab 
  6736.           services, as well as ACL editing). It is also an actual name in the 
  6737.           DCE namespace that you can import if you want to create your own RPC 
  6738.           binding to dced. 
  6739.  
  6740.           You can use the dced entry name returned by this routine as input to 
  6741.           the dced_binding_create routine, input to sec_acl_xxx routines, or to 
  6742.           rpc_ns_binding_import_xxx routines to establish a binding to a dced 
  6743.           host service. 
  6744.  
  6745.           If using dced_binding_create, you append a service name to the entry 
  6746.           returned by this routine. If using sec_acl_xxx routines, you append 
  6747.           the service and the object name. If using rpc_ns_binding_import_xxx, 
  6748.           you use only the entry returned by the routine. 
  6749.  
  6750.           You can also use the returned string to name objects that dced 
  6751.           maintains (for example, when editing these objects' ACLs with dcecp). 
  6752.           For example, the string name \.:\hosts\vineyard\config\srvrconf\dtsd 
  6753.           names the server configuration data for the DTS server on the host 
  6754.           vineyard. 
  6755.  
  6756.  Notes 
  6757.  
  6758.           Storage for entry_name is dynamically allocated and must be freed by 
  6759.           the caller using dce_free. 
  6760.  
  6761.  Related Information 
  6762.  
  6763.           Routines: 
  6764.           dce_cf_binding_entry_from_host 
  6765.           dce_cf_find_name_by_key 
  6766.           dce_cf_get_cell_name 
  6767.           dce_cf_get_host_name 
  6768.           dce_cf_prin_name_from_host 
  6769.           dce_free 
  6770.           dced_binding_create 
  6771.  
  6772.           Files: 
  6773.           dcelocal\dce_cf.db - The machine's local DCE configuration file 
  6774.           (where dcelocal is usually \opt\dcelocal). 
  6775.  
  6776.           Books: 
  6777.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  6778.           DCE for OS/2 Warp: Administration Command Reference 
  6779.  
  6780.  
  6781. ΓòÉΓòÉΓòÉ 3.5.8. dce_cf_find_name_by_key ΓòÉΓòÉΓòÉ
  6782.  
  6783.  Purpose 
  6784.  
  6785.           Returns a string tagged by a character string key. 
  6786.  
  6787.  Library 
  6788.  
  6789.           \lib\dceos2.lib 
  6790.  
  6791.  Format 
  6792.  
  6793.                     #include <dce_cf.h>
  6794.  
  6795.                     void dce_cf_find_name_by_key(
  6796.                             FILE  *fp,
  6797.                             char  *key,
  6798.                             char  **name,
  6799.                             error_status_t  *status);
  6800.  
  6801.  Parameters 
  6802.  
  6803.           Input 
  6804.  
  6805.           fp            A file pointer to a correctly formatted text file 
  6806.                         opened for reading. 
  6807.  
  6808.           key           A character string key that is used to find name. 
  6809.  
  6810.           Input/Output 
  6811.  
  6812.           name          A pointer to a string (char **) containing the name. A 
  6813.                         buffer is allocated by a call to malloc into which the 
  6814.                         string is copied. 
  6815.  
  6816.           Output 
  6817.  
  6818.           status        Returns the status code from this operation. The status 
  6819.                         code is a value that indicates whether the routine 
  6820.                         completed successfully and if not, why not. 
  6821.  
  6822.                         Possible status codes and their meanings are: 
  6823.  
  6824.                              dce_cf_st_ok             Operation completed 
  6825.                                                       successfully. 
  6826.                              dce_cf_e_no_mem          No memory available. 
  6827.                              dce_cf_e_no_match        No match for key in file. 
  6828.  
  6829.  Usage 
  6830.  
  6831.           The dce_cf_find_name_by_key routine searches a text file for the 
  6832.           first occurrence of a string tag identical to the string passed in 
  6833.           key. The tag string, in order to be found, must be the first 
  6834.           non-white-space string on an uncommented line. If the tag string is 
  6835.           found, the dce_cf_find_name_by_key routine allocates a buffer (by a 
  6836.           call to malloc) for the next string found on the same line as the tag 
  6837.           string. The routine then copies this second string into the buffer 
  6838.           and returns its address in the name input parameter. 
  6839.  
  6840.           The name of the DCE configuration file is in the constant 
  6841.           dce_cf_c_db_name; in turn, this constant is defined in the include 
  6842.           file dce_cf.h. 
  6843.  
  6844.  Notes 
  6845.  
  6846.           The memory for a returned name string is allocated by malloc and must 
  6847.           be freed using dce_free by the original caller of the configuration 
  6848.           routine that called dce_cf_find_name_by_key. 
  6849.  
  6850.           This routine is limited to processing lines of text whose length is 
  6851.           less than 1024 characters long. 
  6852.  
  6853.  Related Information 
  6854.  
  6855.           Routines: 
  6856.           dce_cf_binding_entry_from_host 
  6857.           dce_cf_get_cell_name 
  6858.           dce_cf_get_csrgy_filename 
  6859.           dce_cf_get_host_name 
  6860.           dce_cf_prin_name_from_host 
  6861.           dce_free 
  6862.  
  6863.           Files: 
  6864.           dcelocal\dce_cf.db - The machine's local DCE configuration file 
  6865.           (where dcelocal is usually \opt\dcelocal). 
  6866.  
  6867.           Books: 
  6868.           DCE for OS/2 Warp: Application Development Guide - Core Components. 
  6869.  
  6870.  
  6871. ΓòÉΓòÉΓòÉ 3.5.9. dce_cf_free_cell_aliases ΓòÉΓòÉΓòÉ
  6872.  
  6873.  Purpose 
  6874.  
  6875.           Frees a list of cell name aliases for the local cell. 
  6876.  
  6877.  Format 
  6878.  
  6879.                     #include <dce\dce_cf.h>
  6880.  
  6881.                     void dce_cf_free_cell_aliases(
  6882.                             char  **cell_alias_list,
  6883.                             error_status_t  *status);
  6884.  
  6885.  Parameters 
  6886.  
  6887.           Input 
  6888.  
  6889.           cell_alias_list The address of a cell alias list, which is a 
  6890.                         null-terminated array of pointers to the cell alias 
  6891.                         names for the local cell. 
  6892.  
  6893.           Output 
  6894.  
  6895.           status        Returns the status code from this operation. The status 
  6896.                         code is a value that indicates whether the routine 
  6897.                         completed successfully and if not, why not. 
  6898.  
  6899.                         Possible status codes are: 
  6900.  
  6901.                              dce_cf_st_ok              Operation completed 
  6902.                                                        successfully. 
  6903.                              dce_cf_e_file_open        File open error. 
  6904.                              dce_cf_e_no_mem           No memory available. 
  6905.                              dce_cf_e_no_match         No match for the 
  6906.                                                        cell_alias_list. 
  6907.  
  6908.  Usage 
  6909.  
  6910.           The dce_cf_free_cell_aliases routine frees the list of aliases for 
  6911.           the local cell that the dce_cf_get_cell_aliases routine allocated. 
  6912.           The routine frees the memory allocated to hold the array of pointers 
  6913.           to cell alias string buffers and also frees the string buffers. 
  6914.  
  6915.  Related Information 
  6916.  
  6917.           Routines: 
  6918.           dce_cf_get_cell_aliases 
  6919.           dce_cf_get_cell_name 
  6920.           dce_cf_get_host_name 
  6921.           dce_cf_prin_name_from_host 
  6922.           dce_cf_same_cell_name 
  6923.  
  6924.           Books: 
  6925.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  6926.           DCE for OS/2 Warp: Administration Command Reference 
  6927.  
  6928.  
  6929. ΓòÉΓòÉΓòÉ 3.5.10. dce_cf_get_cell_aliases ΓòÉΓòÉΓòÉ
  6930.  
  6931.  Purpose 
  6932.  
  6933.           Returns a list of aliases for the local cell. 
  6934.  
  6935.  Format 
  6936.  
  6937.                     #include <dce\dce_cf.h>
  6938.  
  6939.                     void dce_cf_get_cell_aliases(
  6940.                             char  ***cell_alias_list,
  6941.                             error_status_t  *status);
  6942.  
  6943.  Parameters 
  6944.  
  6945.           Output 
  6946.  
  6947.           cell_alias_list The address of a string pointer array. This routine 
  6948.                         sets this address to point to the address of an 
  6949.                         allocated n ull-terminated array of pointers to the 
  6950.                         cell alias names for the local cell. If no aliases 
  6951.                         exist, the routine returns NULL in this parameter. 
  6952.  
  6953.           status        Returns the status code from this operation. The status 
  6954.                         code is a value that indicates whether the routine 
  6955.                         completed successfully and if not, why not. 
  6956.  
  6957.                         Possible status codes are: 
  6958.  
  6959.                              dce_cf_st_ok              Operation completed 
  6960.                                                        successfully. 
  6961.                              dce_cf_e_file_open        File open error. 
  6962.                              dce_cf_e_no_mem           No memory available. 
  6963.                              dce_cf_e_no_match         No match for the 
  6964.                                                        cell_alias_list. 
  6965.  
  6966.  Usage 
  6967.  
  6968.           The dce_cf_get_cell_aliases routine retrieves the local cell's name 
  6969.           aliases. If cell aliases are found, the routine returns the address 
  6970.           of an allocated list of cell alias names in the cell_alias_list 
  6971.           parameter. If no aliases exist for the cell, the routine returns 
  6972.           NULL. 
  6973.  
  6974.           Use the dce_cf_free_cell_aliases routine to free the memory allocated 
  6975.           by the dce_cf_get_cell_aliases routine. 
  6976.  
  6977.  Related Information 
  6978.  
  6979.           Routines: 
  6980.           dce_cf_get_cell_aliases 
  6981.           dce_cf_get_cell_name 
  6982.           dce_cf_get_host_name 
  6983.           dce_cf_same_cell_name 
  6984.  
  6985.           Books: 
  6986.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  6987.           DCE for OS/2 Warp: Administration Command Reference 
  6988.  
  6989.  
  6990. ΓòÉΓòÉΓòÉ 3.5.11. dce_cf_get_cell_name ΓòÉΓòÉΓòÉ
  6991.  
  6992.  Purpose 
  6993.  
  6994.           Returns the primary name for the local cell. 
  6995.  
  6996.  Library 
  6997.  
  6998.           \lib\dceos2.lib 
  6999.  
  7000.  Format 
  7001.  
  7002.                     #include <dce\dce_cf.h>
  7003.  
  7004.                     void dce_cf_get_cell_name(
  7005.                             char  **cellname,
  7006.                             error_status_t  *status );
  7007.  
  7008.  Parameters 
  7009.  
  7010.           Input/Output 
  7011.  
  7012.           cellname      The address of a string pointer.  This pointer is set 
  7013.                         by the routine to point to an allocated buffer that 
  7014.                         contains the cell name. 
  7015.  
  7016.           Output 
  7017.  
  7018.           status        Returns the status code from this operation. The status 
  7019.                         code is a value that indicates whether the routine 
  7020.                         completed successfully and if not, why not. 
  7021.  
  7022.                         Possible status codes and their meanings are: 
  7023.  
  7024.                              dce_cf_st_ok              Operation successfully 
  7025.                                                        completed. 
  7026.                              dce_cf_e_file_open        File open error. 
  7027.                              dce_cf_e_no_mem           No memory available. 
  7028.                              dce_cf_e_no_match         No match for cellname in 
  7029.                                                        DCE configuration file. 
  7030.  
  7031.  Usage 
  7032.  
  7033.           The dce_cf_get_cell_name routine searches the DCE configuration file 
  7034.           for the local cell's name. If the name is found, dce_cf_get_cell_name 
  7035.           returns an allocated (by a call to malloc) copy of it in the cellname 
  7036.           input parameter. 
  7037.  
  7038.  Notes 
  7039.  
  7040.           The memory for a returned cellname is allocated by malloc. You must 
  7041.           use dce_free to free the allocated copy when you no longer need it. 
  7042.  
  7043.           This version of this routine is limited to processing lines of text 
  7044.           less than 1024 characters long. 
  7045.  
  7046.  Related Information 
  7047.  
  7048.           Routines: 
  7049.           dce_cf_binding_entry_from_host 
  7050.           dce_cf_find_name_by_key 
  7051.           dce_cf_get_host_name 
  7052.           dce_cf_get_csrgy_filename 
  7053.           dce_cf_prin_name_from_host 
  7054.           dce_free 
  7055.  
  7056.           Files: 
  7057.           dcelocal\dce_cf.db - The machine's local DCE configuration file 
  7058.           (where dcelocal is usually \opt\dcelocal). 
  7059.  
  7060.           Books: 
  7061.           DCE for OS/2 Warp: Administration Guide 
  7062.  
  7063.  
  7064. ΓòÉΓòÉΓòÉ 3.5.12. dce_cf_get_csrgy_filename ΓòÉΓòÉΓòÉ
  7065.  
  7066.  Purpose 
  7067.  
  7068.           Returns the path name of the code set registry file on a host. 
  7069.  
  7070.  Library 
  7071.  
  7072.           \lib\dceos2.lib 
  7073.  
  7074.  Format 
  7075.  
  7076.                     #include <dce\dce_cf.h>
  7077.  
  7078.                     void dce_cf_get_csrgy_filename(
  7079.                             char  **csrgy_filename,
  7080.                             error_status_t  *status );
  7081.  
  7082.  Parameters 
  7083.  
  7084.           Input/Output 
  7085.  
  7086.           csrgy_filename The address of a string pointer. This pointer is set 
  7087.                         by the routine to point to a buffer that contains the 
  7088.                         path name to the code set registry file. 
  7089.  
  7090.           Output 
  7091.  
  7092.           status        Returns the status code from this operation. The status 
  7093.                         code is a value that indicates whether the routine 
  7094.                         completed successfully and if not, why not. 
  7095.  
  7096.                         Possible status codes and their meanings are: 
  7097.  
  7098.                              dce_cf_st_ok             Operation successfully 
  7099.                                                       completed. 
  7100.                              dce_cf_e_file_open       File open error. 
  7101.                              dce_cf_e_no_mem          No memory available. 
  7102.  
  7103.  Usage 
  7104.  
  7105.           The dce_cf_get_csrgy_filename routine returns the path name of a code 
  7106.           set registry file that has been created on a given host with the csrc 
  7107.           utility. DCE RPC routines for code set interoperability use this 
  7108.           routine when they need to locate a host's code set registry file in 
  7109.           order to map between unique code set identifiers and their operating 
  7110.           system-specific local code set names, or to obatin supported code 
  7111.           sets for a client or server. User-written code set interoperability 
  7112.           routines can also use the routine. 
  7113.  
  7114.           The dce_cf_get_csrgy_filename routine searches the DCE configuration 
  7115.           file for the name of the local host's code set registry file, 
  7116.           allocates a buffer for it (by a call to malloc), copies the name into 
  7117.           the buffer, and returns its address in the csrgy_filename input 
  7118.           parameter. 
  7119.  
  7120.  Notes 
  7121.  
  7122.           The memory for a returned name string is allocated by malloc and must 
  7123.           be freed by the caller of dce_cf_get_csrgy_filename by using 
  7124.           dce_free. 
  7125.  
  7126.           This routine is limited to processing lines of text whose length is 
  7127.           less than 1024 characters. 
  7128.  
  7129.  Related Information 
  7130.  
  7131.           Routines: 
  7132.           dce_cf_get_cell_name 
  7133.           dce_cf_find_name_by_key 
  7134.           dce_cf_get_host_name 
  7135.           dce_cf_prin_name_from_host 
  7136.           dce_cs_loc_to_rgy 
  7137.           dce_cs_rgy_to_loc 
  7138.           dce_free 
  7139.  
  7140.           Files: 
  7141.           dcelocal\dce_cf.db - The machine's local DCE configuration file 
  7142.           (where dcelocal is usually \opt\dcelocal). 
  7143.  
  7144.           Books: 
  7145.           DCE for OS/2 Warp: Administration Guide 
  7146.  
  7147.  
  7148. ΓòÉΓòÉΓòÉ 3.5.13. dce_cf_get_host_name ΓòÉΓòÉΓòÉ
  7149.  
  7150.  Purpose 
  7151.  
  7152.           Returns the host name relative to the local cell root. 
  7153.  
  7154.  Library 
  7155.  
  7156.           \lib\dceos2.lib 
  7157.  
  7158.  Format 
  7159.  
  7160.                     #include <dce\dce_cf.h>
  7161.  
  7162.                     public void dce_cf_get_host_name(
  7163.                            char  **dce_hostname,
  7164.                            error_status_t  *status);
  7165.  
  7166.  Parameters 
  7167.  
  7168.           Input/Output 
  7169.  
  7170.           dce_hostname  A pointer to a string (char **) where a string 
  7171.                         containing the name found is placed. The name string is 
  7172.                         allocated by malloc. 
  7173.  
  7174.           Output 
  7175.  
  7176.           status        Returns the status code from this operation. The status 
  7177.                         code is a value that indicates whether the routine 
  7178.                         completed successfully and if not, why not. 
  7179.  
  7180.                         Possible status codes and their meanings are: 
  7181.  
  7182.                              dce_cf_st_ok Operation successfully completed. 
  7183.  
  7184.                              dce_cf_e_file_open File open error. 
  7185.  
  7186.                              dce_cf_e_no_mem No memory available. 
  7187.  
  7188.                              dce_cf_e_no_match No match for dce_hostname in DCE 
  7189.                                   configuration file. 
  7190.  
  7191.  Usage 
  7192.  
  7193.           The dce_cf_get_host_name routine searches the DCE configuration file 
  7194.           for the local host's name relative to the local cell's root. If the 
  7195.           name is found, dce_cf_get_host_name allocates (by a call to malloc) a 
  7196.           buffer for it, copies the name into the buffer, and returns its 
  7197.           address in the dce_hostname input parameter. 
  7198.  
  7199.  Notes 
  7200.  
  7201.           The memory for a returned name string is allocated by malloc, and 
  7202.           must be freed by the caller of dce_cf_get_host_name, using dce_free. 
  7203.  
  7204.           The DCE 1.0 version of this function is limited to processing lines 
  7205.           of text whose length is less than 1024 characters. 
  7206.  
  7207.  Related Information 
  7208.  
  7209.           Routines: 
  7210.           dce_cf_binding_entry_from_host 
  7211.           dce_cf_find_name_by_key 
  7212.           dce_cf_get_cell_name 
  7213.           dce_cf_get_csrgy_filename 
  7214.           dce_cf_prin_name_from_host 
  7215.           dce_free 
  7216.  
  7217.           Files: 
  7218.           dcelocal\dce_cf.db - The machine's local DCE configuration file 
  7219.           (where dcelocal is usually \opt\dcelocal). 
  7220.  
  7221.           Books: 
  7222.           DCE for OS/2 Warp: Administration Guide 
  7223.  
  7224.  
  7225. ΓòÉΓòÉΓòÉ 3.5.14. dce_cf_prin_name_from_host ΓòÉΓòÉΓòÉ
  7226.  
  7227.  Purpose 
  7228.  
  7229.           Returns the host's principal name. 
  7230.  
  7231.  Library 
  7232.  
  7233.           \lib\dceos2.lib 
  7234.  
  7235.  Format 
  7236.  
  7237.                     #include <dce\dce_cf.h>
  7238.  
  7239.                     void dce_cf_prin_name_from_host(
  7240.                             char  *dce_hostname,
  7241.                             char  **prin_name,
  7242.                             error_status_t  *status);
  7243.  
  7244.  Parameters 
  7245.  
  7246.           Input 
  7247.  
  7248.           dce_hostname  The name of the host. Note that host names are 
  7249.                         case-sensitive. If NULL, the configuration file is 
  7250.                         searched for the host name, and that name, if found, is 
  7251.                         used. 
  7252.  
  7253.           Output 
  7254.  
  7255.           prin_name     The principal name associated with the specified host. 
  7256.  
  7257.           status        Returns the status code from this operation. The status 
  7258.                         code is a value that indicates whether the routine 
  7259.                         completed successfully and if not, why not. 
  7260.  
  7261.                         Possible status codes and their meanings are: 
  7262.  
  7263.                              dce_cf_st_ok             Operation completed 
  7264.                                                       successfully. 
  7265.                              dce_cf_e_file_open       File open error. 
  7266.                              dce_cf_e_no_mem          No memory available. 
  7267.                              dce_cf_e_no_match        No match for dce_hostname 
  7268.                                                       in DCE configuration 
  7269.                                                       file. 
  7270.  
  7271.  Usage 
  7272.  
  7273.           The dce_cf_prin_name_from_host routine returns the principal name 
  7274.           associated with the dce_hostname passed to it. If dce_hostname is 
  7275.           NULL, dce_cf_prin_name_from_host returns the principal name 
  7276.           associated with the name returned by dce_cf_get_host_name. 
  7277.  
  7278.  Related Information 
  7279.  
  7280.           Routines: 
  7281.           dce_cf_binding_entry_from_host 
  7282.           dce_cf_find_name_by_key 
  7283.           dce_cf_get_cell_name 
  7284.           dce_cf_get_host_name 
  7285.           dce_cf_get_csrgy_filename 
  7286.  
  7287.           Files: 
  7288.           dcelocal\dce_cf.db - The machine's local DCE configuration file 
  7289.           (where dcelocal is usually \opt\dcelocal). 
  7290.  
  7291.           Books: 
  7292.           DCE for OS/2 Warp: Administration Guide 
  7293.  
  7294.  
  7295. ΓòÉΓòÉΓòÉ 3.5.15. dce_cf_profile_entry_from_host ΓòÉΓòÉΓòÉ
  7296.  
  7297.  Purpose 
  7298.  
  7299.           Returns the host profile entry. 
  7300.  
  7301.  Library 
  7302.  
  7303.           \lib\dceos2.lib 
  7304.  
  7305.  Format 
  7306.  
  7307.                     #include <dce\dce_cf.h>
  7308.  
  7309.                     void dce_cf_profile_entry_from_host(
  7310.                             char  *dce_hostname,
  7311.                             char  **prof_name,
  7312.                             error_status_t  *status);
  7313.  
  7314.  Parameters 
  7315.  
  7316.           Input 
  7317.  
  7318.           dce_hostname  The name of the host. Note that host names are 
  7319.                         case-sensitive. If NULL, the configuration file is 
  7320.                         searched for the host name, and that name, if found, is 
  7321.                         used. 
  7322.  
  7323.           Output 
  7324.  
  7325.           prof_name     The profile entry associated with the specified host. 
  7326.  
  7327.           status        Returns the status code from this operation. The status 
  7328.                         code is a value that indicates whether the routine 
  7329.                         completed successfully and if not, why not. 
  7330.  
  7331.                         Possible status codes and their meanings are: 
  7332.  
  7333.                              dce_cf_st_ok             Operation completed 
  7334.                                                       successfully. 
  7335.                              dce_cf_e_file_open       File open error. 
  7336.                              dce_cf_e_no_mem          No memory available. 
  7337.                              dce_cf_e_no_match        No match for dce_hostname 
  7338.                                                       in DCE configuration 
  7339.                                                       file. 
  7340.  
  7341.  Usage 
  7342.  
  7343.           The dce_cf_profile_entry_from_host routine returns the profile entry 
  7344.           string associated with the dce_hostname passed to it. If dce_hostname 
  7345.           is NULL, dce_cf_profile_entry_from_host returns the profile entry 
  7346.           associated with the name returned by dce_cf_get_host_name. 
  7347.  
  7348.  Related Information 
  7349.  
  7350.           Routines: 
  7351.           dce_cf_binding_entry_from_host 
  7352.           dce_cf_find_name_by_key 
  7353.           dce_cf_get_cell_name 
  7354.           dce_cf_get_host_name 
  7355.           dce_cf_prin_name_from_host 
  7356.  
  7357.           Files: 
  7358.           dcelocal\dce_cf.db - The machine's local DCE configuration file 
  7359.           (where dcelocal is usually \opt\dcelocal). 
  7360.  
  7361.           Books: 
  7362.           DCE for OS/2 Warp: Administration Guide 
  7363.  
  7364.  
  7365. ΓòÉΓòÉΓòÉ 3.5.16. dce_cf_same_cell_name ΓòÉΓòÉΓòÉ
  7366.  
  7367.  Purpose 
  7368.  
  7369.           Indicates whether two cell names refer to the same cell. 
  7370.  
  7371.  Format 
  7372.  
  7373.                     #include <dce\dce_cf.h>
  7374.  
  7375.                     void dce_cf_same_cell_name(
  7376.                             char  *cell_name1,
  7377.                             char  *cell_name2,
  7378.                             boolean  result,
  7379.                             error_status_t  *status);
  7380.  
  7381.  Parameters 
  7382.  
  7383.           Input 
  7384.  
  7385.           cell_name1    A character string that specifies the name of a cell. 
  7386.  
  7387.           cell_name2    A character string that specifies the name of a cell to 
  7388.                         compare with cell_name1.  If this value is NULL, the 
  7389.                         routine determines whether the cell name specified in 
  7390.                         cell_name1 is the name of the local cell. 
  7391.  
  7392.           Output 
  7393.  
  7394.           result        A boolean value that indicates whether the specified 
  7395.                         cell names match, when two cell names are given, and 
  7396.                         indicates whether the specified cell name is the name 
  7397.                         of the local cell, when only one cell name is given.  A 
  7398.                         value of TRUE indicates that the cell names refer to 
  7399.                         the same cell. 
  7400.  
  7401.           status        Returns the status code from this operation. On 
  7402.                         successful completion, the routine returns 
  7403.                         dce_cf_st_ok. Otherwise, the routine returns 
  7404.                         dce_cf_e_no_match. 
  7405.  
  7406.  Usage 
  7407.  
  7408.           The dce_cf_same_cell_name routine, when given the names of two cells 
  7409.           as input parameters, compares the cell names to determine whether 
  7410.           they refer to the same cell. The result parameter is set to TRUE if 
  7411.           they do, and to FALSE if they do not. 
  7412.  
  7413.           If only one cell name is specified as an input parameter, the 
  7414.           dce_cf_same_cell_name routine determines whether the specified cell 
  7415.           name is the same as the local cell's primary name (which it retrieves 
  7416.           by calling dce_cf_get_cell_name). You can use the routine in this way 
  7417.           to determine whether a given cell name is the primary name of your 
  7418.           local cell. 
  7419.  
  7420.  Related Information 
  7421.  
  7422.           Routines: 
  7423.           dce_cf_free_cell_aliases 
  7424.           dce_cf_get_cell_aliases 
  7425.           dce_cf_get_cell_name 
  7426.  
  7427.           Books: 
  7428.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  7429.           DCE for OS/2 Warp: Administration Command Reference 
  7430.  
  7431.  
  7432. ΓòÉΓòÉΓòÉ 3.6. The DCE Backing Store Interface ΓòÉΓòÉΓòÉ
  7433.  
  7434. The DCE backing store interface allows you to maintain typed data between 
  7435. program invocations. For example, you can store application-specific 
  7436. configuration data in a backing store, and then retrieve it from the backing 
  7437. store when the application restarts. The backing store routines can be used in 
  7438. servers, in clients, or in standalone programs that do not involve remote 
  7439. procedure calls (RPC). A program can have more than one backing store open at 
  7440. the same time. 
  7441.  
  7442. Sometimes the backing store is called a database. For instance, the associated 
  7443. IDL file is dce\database.idl, and the name of the backing store routines begin 
  7444. with dce_db_. The backing store is, however, not a full-fledged database in the 
  7445. conventional sense, and it has no support for SQL or for any other query 
  7446. system. 
  7447.  
  7448. See the following subtopics for more information: 
  7449.  
  7450.       Backing Store Data 
  7451.       Encoding and Decoding in the Backing Store 
  7452.       Memory Allocation 
  7453.       The Backing Store Routines 
  7454.       Backing Store Data Types and Structures 
  7455.       Backing Store Notes 
  7456.       Backing Store Related Information 
  7457.  
  7458.  
  7459. ΓòÉΓòÉΓòÉ 3.6.1. Backing Store Data ΓòÉΓòÉΓòÉ
  7460.  
  7461. The backing store interface provides for the tagged storage and retrieval of 
  7462. typed data. The tag (or retrieval key) can be either a UUID or a standard C 
  7463. string. For a specific backing store, the data type must be specified at 
  7464. compile time, and is established through the IDL Encoding Services. Each 
  7465. backing store can contain a single data type only. 
  7466.  
  7467. Each data item (also called a data object or data record) consists of the data 
  7468. stored by a single call to a storage routine (dce_db_store, 
  7469. dce_db_store_by_name, or dce_db_store_by_uuid). Optionally, data items can have 
  7470. headers. If a backing store has been created to use headers, every data item 
  7471. must have a header. For a description of the data item header, see Backing 
  7472. Store Data Types and Structures. 
  7473.  
  7474.  
  7475. ΓòÉΓòÉΓòÉ 3.6.2. Encoding and Decoding in the Backing Store ΓòÉΓòÉΓòÉ
  7476.  
  7477. When an RPC sends data between a client and a server, it serializes the user's 
  7478. data structures by using the IDL Encoding Services (ES), described in the DCE 
  7479. for OS/2 Warp: Application Development Guide - Core Components. 
  7480.  
  7481. The backing store uses this same serialization scheme for encoding and 
  7482. decoding, informally called pickling, when storing data structures to disk. The 
  7483. IDL compiler, idl, writes the routine that encodes and decodes the data.  This 
  7484. routine is passed to dce_db_open, remembered in the handle, and used by these 
  7485. store and fetch routines: 
  7486.  
  7487.       dce_db_fetch 
  7488.       dce_db_fetch_by_name 
  7489.       dce_db_fetch_by_uuid 
  7490.       dce_db_header_fetch 
  7491.       dce_db_store 
  7492.       dce_db_store_by_name 
  7493.       dce_db_store_by_uuid 
  7494.  
  7495.  
  7496. ΓòÉΓòÉΓòÉ 3.6.3. Memory Allocation ΓòÉΓòÉΓòÉ
  7497.  
  7498. When fetching data, the encoding services (ES) allocate memory for the data 
  7499. structures that are returned.  These services accept a structure and use 
  7500. rpc_sm_allocate to provide additional memory needed to hold the data. 
  7501.  
  7502. The backing store library does not know what memory has been allocated, and 
  7503. therefore cannot free it.  For fetch calls that are made from a server stub, 
  7504. this is not a problem, because the memory is freed automatically when the 
  7505. server call terminates.  For fetch calls that are made from a non-server, the 
  7506. programmer is responsible for freeing the memory. 
  7507.  
  7508. Programs that call the fetch or store routines, such as dce_db_fetch, outside 
  7509. of a server operation (for instance, if a server does some backing store 
  7510. initialization, or in a standalone program) must call rpc_sm_enable_allocate 
  7511. first. 
  7512.  
  7513.  
  7514. ΓòÉΓòÉΓòÉ 3.6.4. The Backing Store Routines ΓòÉΓòÉΓòÉ
  7515.  
  7516. Many of the backing store routines occur in three versions: plain, by name, and 
  7517. by UUID.  The plain version works with backing stores that were created to be 
  7518. indexed either by name or by UUID, but the restricted versions accept the 
  7519. matching type only.  It is advantageous to use the restricted versions when 
  7520. they are appropriate, because they provide type-checking by the compiler, as 
  7521. well as visual clarity of purpose. 
  7522.  
  7523. The backing store routines, listed in alphabetical order, are: 
  7524.  
  7525.  dce_db_close                    Frees the handle returned by dce_db_open. It 
  7526.                                  closes any open files and releases all other 
  7527.                                  resources associated with the backing store. 
  7528.  
  7529.  dce_db_delete                   Deletes an item from a backing store that is 
  7530.                                  indexed by name or by UUID.  The key type must 
  7531.                                  match the flag that was used in dce_db_open. 
  7532.  
  7533.  dce_db_delete_by_name           Deletes an item only from a backing store that 
  7534.                                  is indexed by name. 
  7535.  
  7536.  dce_db_delete_by_uuid           Deletes an item only from a backing store that 
  7537.                                  is indexed by UUID. 
  7538.  
  7539.  dce_db_fetch                    Retrieves data from a backing store that is 
  7540.                                  indexed by name or by UUID.  The key type must 
  7541.                                  match the flag that was used in dce_db_open. 
  7542.  
  7543.  dce_db_fetch_by_name            Retrieves data only from a backing store that 
  7544.                                  is indexed by name. 
  7545.  
  7546.  dce_db_fetch_by_uuid            Retrieves data only from a backing store that 
  7547.                                  is indexed by UUID. 
  7548.  
  7549.  dce_db_free                     Releases the data supplied from a backing 
  7550.                                  store. 
  7551.  
  7552.  dce_db_header_fetch             Retrieves a header from a backing store. 
  7553.  
  7554.  dce_db_inq_count                Returns the number of items in a backing 
  7555.                                  store. 
  7556.  
  7557.  dce_db_iter_done                Terminates an iteration operation initiated by 
  7558.                                  dce_db_iter_start. It should be called when 
  7559.                                  iteration is done. 
  7560.  
  7561.  dce_db_iter_next                Returns the key for the next item from a 
  7562.                                  backing store that is indexed by name or by 
  7563.                                  UUID.  The db_s_no_more return value indicates 
  7564.                                  that there are no more items. 
  7565.  
  7566.  dce_db_iter_next_by_name        Returns the key for the next item only from a 
  7567.                                  backing store that is indexed by name. The 
  7568.                                  db_s_no_more return value indicates that there 
  7569.                                  are no more items. 
  7570.  
  7571.  dce_db_iter_next_by_uuid        Returns the key for the next item only from a 
  7572.                                  backing store that is indexed by UUID.  The 
  7573.                                  db_s_no_more return value indicates that there 
  7574.                                  are no more items. 
  7575.  
  7576.  dce_db_iter_start               Prepares for the start of iteration. 
  7577.  
  7578.  dce_db_lock                     Locks a backing store.  A lock is associated 
  7579.                                  with an open backing store's handle.  The 
  7580.                                  storage routines dce_db_store, 
  7581.                                  dce_db_store_by_name, and dce_db_store_by_uuid 
  7582.                                  all acquire the lock before updating. 
  7583.  
  7584.  dce_db_open                     Creates a new backing store or opens an 
  7585.                                  existing one.  The backing store is identified 
  7586.                                  by a filename.  Flags allow you to: 
  7587.  
  7588.                                    o  Create a new backing store, or open an 
  7589.                                       existing one. 
  7590.                                    o  Create a new backing store indexed by 
  7591.                                       name, or indexed by UUID. 
  7592.                                    o  Open an existing backing store 
  7593.                                       read/write, or read-only. 
  7594.                                    o  Use the standard data item header, or 
  7595.                                       not. 
  7596.  
  7597.                                  The routine returns a handle that subsequent 
  7598.                                  routines can use to reference the opened 
  7599.                                  backing store. 
  7600.  
  7601.  dce_db_std_header_init          Initializes a standard backing store header 
  7602.                                  retrieved by dce_db_header_fetch. It only 
  7603.                                  places the values into the header, and does 
  7604.                                  not write into the backing store. 
  7605.  
  7606.  dce_db_store                    Stores a data item into a backing store that 
  7607.                                  is indexed by name or by UUID.  The key type 
  7608.                                  must match the flag that was used in 
  7609.                                  dce_db_open. 
  7610.  
  7611.  dce_db_store_by_name            Stores a data item only into a backing store 
  7612.                                  that is indexed by name. 
  7613.  
  7614.  dce_db_store_by_uuid            Stores a data item only into a backing store 
  7615.                                  that is indexed by UUID. 
  7616.  
  7617.  dce_db_unlock                   Unlocks a backing store. 
  7618.  
  7619.  
  7620. ΓòÉΓòÉΓòÉ 3.6.5. Backing Store Data Types and Structures ΓòÉΓòÉΓòÉ
  7621.  
  7622.  dce_db_handle_t          An opaque handle to a backing store. Use dce_db_open 
  7623.                           to acquire the handle. 
  7624.  
  7625.  dce_db_header_t          The data structure that defines a standard backing 
  7626.                           store header for data items.  Use dce_db_header_fetch 
  7627.                           to retrieve it from a backing store and 
  7628.                           dce_db_std_header_init to initialize it. 
  7629.  
  7630.  dce_db_convert_func_t    An opaque pointer to the data conversion routine to 
  7631.                           be used when storing or retrieving data. This routine 
  7632.                           is specified as an argument to dce_db_open at open 
  7633.                           time. It converts between native format and on-disk 
  7634.                           (serialized) format.  It is generated from the IDL 
  7635.                           file by the IDL compiler. 
  7636.  
  7637.  
  7638. ΓòÉΓòÉΓòÉ 3.6.6. Backing Store Notes ΓòÉΓòÉΓòÉ
  7639.  
  7640. You cannot use conformant arrays in objects stored to a backing store. This is 
  7641. because the idl-generated code that encodes (pickles) the structure has no way 
  7642. to predict or detect the size of the array. When the object is fetched, there 
  7643. may be insufficient space provided for the structure, and the array's data 
  7644. destroys whatever is in memory after the structure. 
  7645.  
  7646.  
  7647. ΓòÉΓòÉΓòÉ 3.6.7. Backing Store Related Information ΓòÉΓòÉΓòÉ
  7648.  
  7649. Files: 
  7650. database.idl 
  7651. database.h 
  7652. db.h 
  7653. dbif.h 
  7654.  
  7655. Books: 
  7656. DCE for OS/2 Warp: Application Development Guide - Core Components 
  7657.  
  7658.  
  7659. ΓòÉΓòÉΓòÉ 3.6.8. dce_db_close ΓòÉΓòÉΓòÉ
  7660.  
  7661.  Purpose 
  7662.  
  7663.           Closes an open backing store. 
  7664.  
  7665.  Format 
  7666.  
  7667.                     #include <dce\dce.h>
  7668.                     #include <dce\dbif.h>
  7669.  
  7670.                     void dce_db_close(
  7671.                             dce_db_handle_t  *handle,
  7672.                             error_status_t  *status);
  7673.  
  7674.  Parameters 
  7675.  
  7676.           Input 
  7677.  
  7678.           handle        A handle identifying the backing store to be closed. 
  7679.  
  7680.           Output 
  7681.  
  7682.           status        A pointer to the completion status.  On successful 
  7683.                         completion, the routine returns error_status_ok. 
  7684.                         Otherwise, it returns an error. 
  7685.  
  7686.  Usage 
  7687.  
  7688.           The dce_db_close routine closes a backing store that was opened by 
  7689.           dce_db_open.  It also frees the storage used by the handle and sets 
  7690.           the handle value to NULL. 
  7691.  
  7692.  Related Information 
  7693.  
  7694.           Routines: 
  7695.           dce_db_open 
  7696.  
  7697.  
  7698. ΓòÉΓòÉΓòÉ 3.6.9. dce_db_delete ΓòÉΓòÉΓòÉ
  7699.  
  7700.  Purpose 
  7701.  
  7702.           Deletes an item from a backing store. 
  7703.  
  7704.  Format 
  7705.  
  7706.                     #include <dce\dce.h>
  7707.                     #include <dce\dbif.h>
  7708.  
  7709.                     void dce_db_delete(
  7710.                             dce_db_handle_t  handle,
  7711.                             void  *key,
  7712.                             error_status_t  *status);
  7713.  
  7714.  Parameters 
  7715.  
  7716.           Input 
  7717.  
  7718.           handle        A handle returned from dce_db_open that identifies the 
  7719.                         backing store being used. 
  7720.  
  7721.           key           A pointer to a string or UUID that is the key to the 
  7722.                         item in the backing store.  The data type of key must 
  7723.                         match the key method that was selected in the flags 
  7724.                         parameter to dce_db_open when the backing store was 
  7725.                         created. 
  7726.  
  7727.           Output 
  7728.  
  7729.           status        A pointer to the completion status.  On successful 
  7730.                         completion, the routine returns error_status_ok. 
  7731.                         Otherwise, it returns one of the following errors: 
  7732.  
  7733.                              db_s_del_failed The deletion did not occur.  The 
  7734.                                   global variable errno may indicate further 
  7735.                                   information about the error. 
  7736.  
  7737.                              db_s_bad_index_type The type of the key parameter 
  7738.                                   is wrong, or the backing store is not 
  7739.                                   organized by name or by UUID. 
  7740.  
  7741.                              db_s_iter_not_allowed The routine was called while 
  7742.                                   an iteration, begun by dce_db_iter_start, was 
  7743.                                   in progress. Deletion is not allowed during 
  7744.                                   iteration. 
  7745.  
  7746.  Usage 
  7747.  
  7748.           The dce_db_delete routine deletes an item from the backing store that 
  7749.           is identified by the handle parameter, which was obtained from 
  7750.           dce_db_open. It is a general deletion routine, which interprets the 
  7751.           key parameter according to the type of index with which the backing 
  7752.           store was created. 
  7753.  
  7754.  Related Information 
  7755.  
  7756.           Routines: 
  7757.           dce_db_delete_by_name 
  7758.           dce_db_delete_by_uuid 
  7759.           dce_db_open 
  7760.  
  7761.  
  7762. ΓòÉΓòÉΓòÉ 3.6.10. dce_db_delete_by_name ΓòÉΓòÉΓòÉ
  7763.  
  7764.  Purpose 
  7765.  
  7766.           Deletes an item from a string-indexed backing store. 
  7767.  
  7768.  Format 
  7769.  
  7770.                     #include <dce\dce.h>
  7771.                     #include <dce\dbif.h>
  7772.  
  7773.                     void dce_db_delete_by_name(
  7774.                             dce_db_handle_t  handle,
  7775.                             char  *key,
  7776.                             error_status_t  *status);
  7777.  
  7778.  Parameters 
  7779.  
  7780.           Input 
  7781.  
  7782.           handle        A handle returned from dce_db_open that identifies the 
  7783.                         backing store being used. 
  7784.  
  7785.           key           A NULL-terminated string that is the key to the item in 
  7786.                         the backing store. 
  7787.  
  7788.           Output 
  7789.  
  7790.           status        A pointer to the completion status. On successful 
  7791.                         completion, the routine returns error_status_ok. 
  7792.                         Otherwise, it returns one of the following errors: 
  7793.  
  7794.                              db_s_del_failed The deletion did not occur. The 
  7795.                                   global variable errno might indicate further 
  7796.                                   information about the error. 
  7797.  
  7798.                              db_s_bad_index_type The backing store is not 
  7799.                                   indexed by name. 
  7800.  
  7801.                              db_s_iter_not_allowed The routine was called while 
  7802.                                   an iteration, begun by dce_db_iter_start, was 
  7803.                                   in progress. Deletion is not allowed during 
  7804.                                   iteration. 
  7805.  
  7806.  Usage 
  7807.  
  7808.           The dce_db_delete_by_name routine deletes an item from the backing 
  7809.           store that is identified by the handle parameter, which was obtained 
  7810.           from dce_db_open. It is a specialized deletion routine for backing 
  7811.           stores that are indexed by name, as selected by the 
  7812.           db_c_index_by_name bit in the flags parameter of the dce_db_open 
  7813.           routine when the backing store was created. 
  7814.  
  7815.  Related Information 
  7816.  
  7817.           Routines: 
  7818.           dce_db_delete 
  7819.           dce_db_delete_by_uuid 
  7820.           dce_db_open 
  7821.  
  7822.  
  7823. ΓòÉΓòÉΓòÉ 3.6.11. dce_db_delete_by_uuid ΓòÉΓòÉΓòÉ
  7824.  
  7825.  Purpose 
  7826.  
  7827.           Deletes an item from a UUID-indexed backing store. 
  7828.  
  7829.  Format 
  7830.  
  7831.                     #include <dce\dce.h>
  7832.                     #include <dce\dbif.h>
  7833.  
  7834.                     void dce_db_delete_by_uuid(
  7835.                             dce_db_handle_t  handle,
  7836.                             uuid_t  *key,
  7837.                             error_status_t  *status);
  7838.  
  7839.  Parameters 
  7840.  
  7841.           Input 
  7842.  
  7843.           handle        A handle returned from dce_db_open that identifies the 
  7844.                         backing store being used. 
  7845.  
  7846.           key           A pointer to a UUID that is the key to the item in the 
  7847.                         backing store. 
  7848.  
  7849.           Output 
  7850.  
  7851.           status        A pointer to the completion status. On successful 
  7852.                         completion, the routine returns error_status_ok. 
  7853.                         Otherwise, it returns one of the following errors: 
  7854.  
  7855.                              db_s_del_failed The deletion did not occur. The 
  7856.                                   global variable errno might indicate further 
  7857.                                   information about the error. 
  7858.  
  7859.                              db_s_bad_index_type The backing store is not 
  7860.                                   indexed by UUID. 
  7861.  
  7862.                              db_s_iter_not_allowed The routine was called while 
  7863.                                   an iteration, begun by dce_db_iter_start, was 
  7864.                                   in progress. Deletion is not allowed during 
  7865.                                   iteration. 
  7866.  
  7867.  Usage 
  7868.  
  7869.           The dce_db_delete_by_uuid routine deletes an item from the backing 
  7870.           store that is identified by the handle parameter, which was obtained 
  7871.           from dce_db_open. It is a specialized deletion routine for backing 
  7872.           stores that are indexed by UUID, as selected by the 
  7873.           db_c_index_by_uuid bit in the flags parameter of the dce_db_open 
  7874.           routine when the backing store was created. 
  7875.  
  7876.  Related Information 
  7877.  
  7878.           Routines: 
  7879.           dce_db_delete 
  7880.           dce_db_delete_by_name 
  7881.           dce_db_open 
  7882.  
  7883.  
  7884. ΓòÉΓòÉΓòÉ 3.6.12. dce_db_fetch ΓòÉΓòÉΓòÉ
  7885.  
  7886.  Purpose 
  7887.  
  7888.           Retrieves data from a backing store. 
  7889.  
  7890.  Format 
  7891.  
  7892.                     #include <dce\dce.h>
  7893.                     #include <dce\dbif.h>
  7894.  
  7895.                     void dce_db_fetch(
  7896.                             dce_db_handle_t  handle,
  7897.                             void  *key,
  7898.                             void  *data,
  7899.                             error_status_t  *status);
  7900.  
  7901.  Parameters 
  7902.  
  7903.           Input 
  7904.  
  7905.           handle        A handle returned from dce_db_open that identifies the 
  7906.                         backing store being used. 
  7907.  
  7908.           key           A string or UUID that is the key to the item in the 
  7909.                         backing store. The data type of key must match the key 
  7910.                         method that was selected in the flags parameter of the 
  7911.                         dce_db_open routine when the backing store was created. 
  7912.  
  7913.           Output 
  7914.  
  7915.           data          A pointer to the returned data. 
  7916.  
  7917.           status        A pointer to the completion status. On successful 
  7918.                         completion, the routine returns error_status_ok. 
  7919.                         Otherwise, it returns one of the following errors: 
  7920.  
  7921.                              db_s_key_not_found The specified key was not found 
  7922.                                   in the backing store. (This circumstance is 
  7923.                                   not necessarily an error.) 
  7924.  
  7925.                              db_s_bad_index_type The type of the key parameter 
  7926.                                   is wrong, or else the backing store is not 
  7927.                                   organized by name or by UUID. 
  7928.  
  7929.  Usage 
  7930.  
  7931.           The dce_db_fetch routine retrieves data from the backing store that 
  7932.           is identified by the handle parameter, which was obtained from 
  7933.           dce_db_open. It is a general retrieval routine, interpreting the key 
  7934.           parameter according to the type of index with which the backing store 
  7935.           was created. 
  7936.  
  7937.           The data parameter is shown as a pointer to an arbitrary data type. 
  7938.           In actual use it is the address of the backing-store-specific data 
  7939.           type. 
  7940.  
  7941.  Notes 
  7942.  
  7943.           After calling dce_db_fetch, it might be necessary to free some memory 
  7944.           if the call was made outside of an RPC on the server side. This is 
  7945.           done by calling rpc_sm_client_free. (Inside an RPC, the memory is 
  7946.           allocated through rpc_sm_allocate and is automatically freed.) 
  7947.  
  7948.           Programs that call dce_db_fetch outside of a server operation (for 
  7949.           instance, if a server does some backing store initialization or in a 
  7950.           standalone program) must call rpc_sm_enable_allocate first. Indeed, 
  7951.           every thread that calls dce_db_fetch must do rpc_sm_allocate, but in 
  7952.           the server side of an RPC, this is already done. 
  7953.  
  7954.  Related Information 
  7955.  
  7956.           Routines: 
  7957.           dce_db_fetch_by_name 
  7958.           dce_db_fetch_by_uuid 
  7959.           dce_db_free 
  7960.           dce_db_open 
  7961.  
  7962.  
  7963. ΓòÉΓòÉΓòÉ 3.6.13. dce_db_fetch_by_name ΓòÉΓòÉΓòÉ
  7964.  
  7965.  Purpose 
  7966.  
  7967.           Retrieves data from a string-indexed backing store. 
  7968.  
  7969.  Format 
  7970.  
  7971.                     #include <dce\dce.h>
  7972.                     #include <dce\dbif.h>
  7973.  
  7974.                     void dce_db_fetch_by_name(
  7975.                             dce_db_handle_t  handle,
  7976.                             char  *key,
  7977.                             void  *data,
  7978.                             error_status_t  *status);
  7979.  
  7980.  Parameters 
  7981.  
  7982.           Input 
  7983.  
  7984.           handle        A handle, returned from dce_db_open, that identifies 
  7985.                         the backing store being used. 
  7986.  
  7987.           key           A null-terminated string that is the key to the item in 
  7988.                         the backing store. 
  7989.  
  7990.           Output 
  7991.  
  7992.           data          A pointer to the returned data. 
  7993.  
  7994.           status        A pointer to the completion status. On successful 
  7995.                         completion, the routine returns error_status_ok. 
  7996.                         Otherwise, it returns one of the following errors: 
  7997.  
  7998.                              db_s_key_not_found The specified key was not found 
  7999.                                   in the backing store. (This circumstance is 
  8000.                                   not necessarily an error.) 
  8001.  
  8002.                              db_s_bad_index_type The backing store is not 
  8003.                                   indexed by name. 
  8004.  
  8005.  Usage 
  8006.  
  8007.           The dce_db_fetch_by_name routine retrieves data from the 
  8008.           string-indexed backing store that is identified by the handle 
  8009.           parameter, which was obtained from dce_db_open. It is a specialized 
  8010.           retrieval routine for backing stores that are indexed by string, as 
  8011.           selected by the db_c_index_by_name bit in the flags parameter of the 
  8012.           dce_db_open routine when the backing store was created. 
  8013.  
  8014.           The data parameter is shown as a pointer to an arbitrary data type. 
  8015.           In actual use, it is the address of the backing-store-specific data 
  8016.           type. 
  8017.  
  8018.  Notes 
  8019.  
  8020.           After calling dce_db_fetch_by_name, it might be necessary to free 
  8021.           some memory if the call was made outside of an RPC on the server 
  8022.           side. This is done by calling rpc_sm_client_free. (Inside an RPC, the 
  8023.           memory is allocated through rpc_sm_allocate and is automatically 
  8024.           freed.) 
  8025.  
  8026.           Programs that call dce_db_fetch_by_name outside of a server operation 
  8027.           (for instance, if a server does some backing store initialization or 
  8028.           in a standalone program) must call rpc_sm_enable_allocate first. 
  8029.           Indeed, every thread that calls dce_db_fetch_by_name must do 
  8030.           rpc_sm_allocate, but in the server side of an RPC, this is already 
  8031.           done. 
  8032.  
  8033.  Examples 
  8034.  
  8035.           This example shows the use of the user-defined data type as the 
  8036.           my_data parameter. 
  8037.  
  8038.                         extern dce_db_handle_t  db_h;
  8039.                         uuid_t  key_uuid;
  8040.                         my_data_type_t  my_data;
  8041.                         error_status_t  status;
  8042.                         /* set key_uuid = xxx; */
  8043.                         dce_db_fetch_by_name(db_h, &key_uuid, &my_data, &status);
  8044.  
  8045.  Related Information 
  8046.  
  8047.           Routines: 
  8048.           dce_db_fetch 
  8049.           dce_db_fetch_by_uuid 
  8050.           dce_db_free 
  8051.           dce_db_open 
  8052.  
  8053.  
  8054. ΓòÉΓòÉΓòÉ 3.6.14. dce_db_fetch_by_uuid ΓòÉΓòÉΓòÉ
  8055.  
  8056.  Purpose 
  8057.  
  8058.           Retrieves data from a UUID-indexed backing store. 
  8059.  
  8060.  Format 
  8061.  
  8062.                     #include <dce\dce.h>
  8063.                     #include <dce\dbif.h>
  8064.  
  8065.                     void dce_db_fetch_by_uuid(
  8066.                             dce_db_handle_t  handle,
  8067.                             uuid_t  *key,
  8068.                             void  *data,
  8069.                             error_status_t  *status);
  8070.  
  8071.  Parameters 
  8072.  
  8073.           Input 
  8074.  
  8075.           handle        A handle, returned from dce_db_open, that identifies 
  8076.                         the backing store being used. 
  8077.  
  8078.           key           A UUID that is the key to the item in the backing 
  8079.                         store. 
  8080.  
  8081.           Output 
  8082.  
  8083.           data          A pointer to the returned data. 
  8084.  
  8085.           status        A pointer to the completion status. On successful 
  8086.                         completion, the routine returns error_status_ok. 
  8087.                         Otherwise, it returns one of the following errors: 
  8088.  
  8089.                              db_s_key_not_found The specified key was not found 
  8090.                                   in the backing store. (This circumstance is 
  8091.                                   not necessarily an error.) 
  8092.  
  8093.                              db_s_bad_index_type The backing store is not 
  8094.                                   indexed by UUID. 
  8095.  
  8096.  Usage 
  8097.  
  8098.           The dce_db_fetch_by_uuid routine retrieves data from the UUID-indexed 
  8099.           backing store that is identified by the handle parameter, which was 
  8100.           obtained from dce_db_open.  It is a specialized retrieval routine for 
  8101.           backing stores that are indexed by UUID, as selected by the 
  8102.           db_c_index_by_uuid bit in the flags parameter of the dce_db_open 
  8103.           routine when the backing store was created. 
  8104.  
  8105.           The data parameter is shown as a pointer to an arbitrary data type. 
  8106.           In actual use, it is the address of the backing-store-specific data 
  8107.           type. 
  8108.  
  8109.  Notes 
  8110.  
  8111.           After calling dce_db_fetch_by_uuid, it may be necessary to free some 
  8112.           memory if the call was made outside of an RPC on the server side. 
  8113.           This is done by calling rpc_sm_client_free. (Inside an RPC, the 
  8114.           memory is allocated through rpc_sm_allocate and is automatically 
  8115.           freed.) 
  8116.  
  8117.           Programs that call dce_db_fetch_by_uuid outside of a server operation 
  8118.           (for instance, if a server does some backing store initialization or 
  8119.           in a standalone program) must call rpc_sm_enable_allocate first. 
  8120.           Indeed, every thread that calls dce_db_fetch_by_uuid must do 
  8121.           rpc_sm_allocate, but in the server side of an RPC, this is already 
  8122.           done. 
  8123.  
  8124.  Examples 
  8125.  
  8126.           This example shows the use of the user-defined data type as the data 
  8127.           parameter. 
  8128.  
  8129.                         extern dce_db_handle_t  db_h;
  8130.                         uuid_t  key_uuid;
  8131.                         my_data_type_t  my_data;
  8132.                         error_status_t  status;
  8133.                         /* set key_uuid = xxx; */
  8134.                         dce_db_fetch_by_uuid(db_h, &key_uuid, &my_data, &status);
  8135.  
  8136.  Related Information 
  8137.  
  8138.           Routines: 
  8139.           dce_db_fetch 
  8140.           dce_db_fetch_by_name 
  8141.           dce_db_free 
  8142.           dce_db_open 
  8143.           rpc_sm_enable_allocate 
  8144.  
  8145.  
  8146. ΓòÉΓòÉΓòÉ 3.6.15. dce_db_free ΓòÉΓòÉΓòÉ
  8147.  
  8148.  Purpose 
  8149.  
  8150.           Releases the data supplied from a backing store. 
  8151.  
  8152.  Format 
  8153.  
  8154.                     #include <dce\dce.h>
  8155.                     #include <dce\dbif.h>
  8156.  
  8157.                     void dce_db_free(
  8158.                             dce_db_handle_t  handle,
  8159.                             void  *data,
  8160.                             error_status_t  *status);
  8161.  
  8162.  Parameters 
  8163.  
  8164.           Input 
  8165.  
  8166.           handle        A handle, returned from dce_db_open, that identifies 
  8167.                         the backing store being used. 
  8168.  
  8169.           data          The data area to be released. 
  8170.  
  8171.           Output 
  8172.  
  8173.           status        A pointer to the completion status.  On successful 
  8174.                         completion, the routine returns error_status_ok. 
  8175.                         Otherwise, it returns an error. 
  8176.  
  8177.  Usage 
  8178.  
  8179.           The dce_db_free routine is designed to free the data area previously 
  8180.           returned by a call to dce_db_fetch, dce_db_fetch_by_name, or 
  8181.           dce_db_fetch_by_uuid. 
  8182.  
  8183.  Notes 
  8184.  
  8185.           In the current implementation, the dce_db_free routine does not 
  8186.           perform any action. For servers that run properly this is of little 
  8187.           consequence, because their allocated memory is automatically cleaned 
  8188.           up when a remote procedure call finishes. For completeness, and for 
  8189.           compatibility with future releases, the use of dce_db_free is 
  8190.           recommended. 
  8191.  
  8192.  Related Information 
  8193.  
  8194.           Routines: 
  8195.           dce_db_fetch 
  8196.           dce_db_fetch_by_name 
  8197.           dce_db_fetch_by_uuid 
  8198.  
  8199.  
  8200. ΓòÉΓòÉΓòÉ 3.6.16. dce_db_header_fetch ΓòÉΓòÉΓòÉ
  8201.  
  8202.  Purpose 
  8203.  
  8204.           Retrieves the header from a backing store. 
  8205.  
  8206.  Format 
  8207.  
  8208.                     #include <dce\dce.h>
  8209.                     #include <dce\dbif.h>
  8210.  
  8211.                     void dce_db_header_fetch(
  8212.                             dce_db_handle_t  handle,
  8213.                             void  *key,
  8214.                             dce_db_header_t  *hdr,
  8215.                             error_status_t  *status);
  8216.  
  8217.  Parameters 
  8218.  
  8219.           Input 
  8220.  
  8221.           handle        A handle, returned from dce_db_open, that identifies 
  8222.                         the backing store being used. 
  8223.  
  8224.           key           A string or UUID that is the backing store key. 
  8225.  
  8226.           Output 
  8227.  
  8228.           hdr           A pointer to a caller-supplied header structure to be 
  8229.                         filled in by the library. 
  8230.  
  8231.           status        A pointer to the completion status.  On successful 
  8232.                         completion, the routine returns error_status_ok. 
  8233.                         Otherwise, it returns db_s_key_not_found. 
  8234.  
  8235.  Usage 
  8236.  
  8237.           The dce_db_header_fetch routine returns a pointer to a copy of the 
  8238.           header of the object in the backing store that is identified by the 
  8239.           handle parameter, which was obtained from dce_db_open. The key 
  8240.           parameter is interpreted according to the type of index with which 
  8241.           the backing store was created. 
  8242.  
  8243.           The hdr parameter is shown as a pointer to an arbitrary data type. In 
  8244.           actual use it is the address of the backing-store-specific data type. 
  8245.  
  8246.  Notes 
  8247.  
  8248.           The dce_db_header_fetch routine returns a pointer that must be freed 
  8249.           by the caller using dce_free. 
  8250.  
  8251.  Related Information 
  8252.  
  8253.           Routines: 
  8254.           dce_db_fetch 
  8255.           dce_db_std_header_init 
  8256.           dce_free 
  8257.  
  8258.  
  8259. ΓòÉΓòÉΓòÉ 3.6.17. dce_db_inq_count ΓòÉΓòÉΓòÉ
  8260.  
  8261.  Purpose 
  8262.  
  8263.           Returns the number of items in a backing store. 
  8264.  
  8265.  Format 
  8266.  
  8267.                     #include <dce\dce.h>
  8268.                     #include <dce\dbif.h>
  8269.  
  8270.                     void dce_db_inq_count(
  8271.                             dce_db_handle_t  handle,
  8272.                             unsigned32  *count,
  8273.                             error_status_t  *status);
  8274.  
  8275.  Parameters 
  8276.  
  8277.           Input 
  8278.  
  8279.           handle        A handle, returned from dce_db_open, that identifies 
  8280.                         the backing store being used. 
  8281.  
  8282.           Output 
  8283.  
  8284.           count         A pointer to the number of items in the backing store. 
  8285.  
  8286.           status        A pointer to the completion status. On successful 
  8287.                         completion, the routine returns error_status_ok. 
  8288.                         Otherwise, it returns db_s_iter_not_allowed, which 
  8289.                         means the routine was called while an iteration, begun 
  8290.                         by dce_db_iter_start, was in progress. Determining the 
  8291.                         count is not allowed during iteration. 
  8292.  
  8293.  Usage 
  8294.  
  8295.           The dce_db_inq_count routine returns the number of items in the 
  8296.           backing store that is identified by the handle parameter, which was 
  8297.           obtained from dce_db_open. It performs identically on backing stores 
  8298.           that are indexed by UUID and those that are indexed by string. The 
  8299.           count of items can be helpful when iterating through a backing store. 
  8300.  
  8301.  Related Information 
  8302.  
  8303.           Routines: 
  8304.           dce_db_iter_next 
  8305.  
  8306.  
  8307. ΓòÉΓòÉΓòÉ 3.6.18. dce_db_iter_done ΓòÉΓòÉΓòÉ
  8308.  
  8309.  Purpose 
  8310.  
  8311.           Frees the state associated with iteration. 
  8312.  
  8313.  Format 
  8314.  
  8315.                     #include <dce\dce.h>
  8316.                     #include <dce\dbif.h>
  8317.  
  8318.                     void dce_db_iter_done(
  8319.                             dce_db_handle_t  handle,
  8320.                             error_status_t  *status);
  8321.  
  8322.  Parameters 
  8323.  
  8324.           Input 
  8325.  
  8326.           handle        A handle returned from dce_db_open that identifies the 
  8327.                         backing store being used. 
  8328.  
  8329.           Output 
  8330.  
  8331.           status        A pointer to the completion status. On successful 
  8332.                         completion, the routine returns error_status_ok. 
  8333.  
  8334.  Usage 
  8335.  
  8336.           The dce_db_iter_done routine frees the state that permits iteration. 
  8337.           It should be called after an iteration through a backing store is 
  8338.           finished. 
  8339.  
  8340.           The iteration state is established by dce_db_iter_start. The routines 
  8341.           for performing iteration over the items are dce_db_iter_next, 
  8342.           dce_db_iter_next_by_name, and dce_db_iter_next_by_uuid. 
  8343.  
  8344.  Related Information 
  8345.  
  8346.           Routines: 
  8347.           dce_db_iter_next 
  8348.           dce_db_iter_next_by_name 
  8349.           dce_db_iter_next_by_uuid 
  8350.           dce_db_iter_start 
  8351.  
  8352.  
  8353. ΓòÉΓòÉΓòÉ 3.6.19. dce_db_iter_next ΓòÉΓòÉΓòÉ
  8354.  
  8355.  Purpose 
  8356.  
  8357.           Returns the next key from a backing store during iteration. 
  8358.  
  8359.  Format 
  8360.  
  8361.                     #include <dce\dce.h>
  8362.                     #include <dce\dbif.h>
  8363.  
  8364.                     void dce_db_iter_next(
  8365.                             dce_db_handle_t  handle,
  8366.                             void  **key,
  8367.                             error_status_t  *status);
  8368.  
  8369.  Parameters 
  8370.  
  8371.           Input 
  8372.  
  8373.           handle        A handle, returned from dce_db_open, that identifies 
  8374.                         the backing store being used. 
  8375.  
  8376.           Output 
  8377.  
  8378.           key           A pointer to the string or UUID that is the key to the 
  8379.                         item in the backing store. 
  8380.  
  8381.           status        A pointer to the completion status.  On successful 
  8382.                         completion, the routine returns error_status_ok. 
  8383.                         Otherwise, it returns db_s_no_more, which indicates 
  8384.                         that all the keys in the backing store have been 
  8385.                         accessed; there are no more iterations remaining to be 
  8386.                         done. 
  8387.  
  8388.  Usage 
  8389.  
  8390.           The dce_db_iter_next routine retrieves the next key from the backing 
  8391.           store that is identified by the handle parameter.  An iterator 
  8392.           established by the dce_db_iter_start routine maintains the identity 
  8393.           of the current key.  Use one of the dce_db_fetch routines to retrieve 
  8394.           the actual data. 
  8395.  
  8396.           The iteration routines scan sequentially through a backing store, in 
  8397.           no particular order. The dce_db_iter_start routine initializes the 
  8398.           process, a dce_db_iter_next routine retrieves successive keys, for 
  8399.           which the data can be retrieved with dce_db_fetch, and the 
  8400.           dce_db_iter_done routine finishes the process. The iteration can also 
  8401.           use the dce_db_iter_next_by_name and dce_db_iter_next_by_uuid 
  8402.           routines; the fetching can use the dce_db_fetch_by_name and 
  8403.           dce_db_fetch_by_uuid routines. 
  8404.  
  8405.           The iteration routine returns a pointer to a private space associated 
  8406.           with the handle.  Each call to the iteration routine reuses this 
  8407.           space, instead of using allocated space. 
  8408.  
  8409.  Related Information 
  8410.  
  8411.           Routines: 
  8412.           dce_db_fetch 
  8413.           dce_db_fetch_by_name 
  8414.           dce_db_fetch_by_uuid 
  8415.           dce_db_iter_done 
  8416.           dce_db_iter_next_by_name 
  8417.           dce_db_iter_next_by_uuid 
  8418.           dce_db_iter_start 
  8419.           dce_db_open 
  8420.  
  8421.  
  8422. ΓòÉΓòÉΓòÉ 3.6.20. dce_db_iter_next_by_name ΓòÉΓòÉΓòÉ
  8423.  
  8424.  Purpose 
  8425.  
  8426.           Returns the next key from a backing store indexed by string during 
  8427.           iteration. 
  8428.  
  8429.  Format 
  8430.  
  8431.                     #include <dce\dce.h>
  8432.                     #include <dce\dbif.h>
  8433.  
  8434.                     void dce_db_iter_next_by_name(
  8435.                             dce_db_handle_t  handle,
  8436.                             char  **key,
  8437.                             error_status_t  *status);
  8438.  
  8439.  Parameters 
  8440.  
  8441.           Input 
  8442.  
  8443.           handle        A handle returned from dce_db_open that identifies the 
  8444.                         backing store being used. 
  8445.  
  8446.           Output 
  8447.  
  8448.           key           The string that is the key to the item in the backing 
  8449.                         store. 
  8450.  
  8451.           status        A pointer to the completion status. On successful 
  8452.                         completion, the routine returns error_status_ok. 
  8453.                         Otherwise, it returns db_s_no_more, which indicates 
  8454.                         that all the keys in the backing store have been 
  8455.                         accessed; there are no more iterations remaining to be 
  8456.                         done. 
  8457.  
  8458.  Usage 
  8459.  
  8460.           The dce_db_iter_next_by_name routine retrieves the next key from the 
  8461.           backing store that is identified by the handle parameter.  An 
  8462.           iterator established by the dce_db_iter_start routine maintains the 
  8463.           identity of the current key.  Use the dce_db_fetch_by_name routine to 
  8464.           retrieve the actual data. 
  8465.  
  8466.           This iteration routine is the same as dce_db_iter_next, except that 
  8467.           it only works with backing stores indexed by name, and returns an 
  8468.           error if the backing store index is the wrong type. 
  8469.  
  8470.           The iteration routine returns a pointer to a private space associated 
  8471.           with the handle.  Each call to the iteration routine reuses this 
  8472.           space, instead of using allocated space. 
  8473.  
  8474.  Related Information 
  8475.  
  8476.           Routines: 
  8477.           dce_db_fetch_by_uuid 
  8478.           dce_db_iter_done 
  8479.           dce_db_iter_next 
  8480.           dce_db_iter_next_by_uuid 
  8481.           dce_db_iter_start 
  8482.  
  8483.  
  8484. ΓòÉΓòÉΓòÉ 3.6.21. dce_db_iter_next_by_uuid ΓòÉΓòÉΓòÉ
  8485.  
  8486.  Purpose 
  8487.  
  8488.           During iteration, returns the next key from a backing store indexed 
  8489.           by UUID. 
  8490.  
  8491.  Format 
  8492.  
  8493.                     #include <dce\dce.h>
  8494.                     #include <dce\dbif.h>
  8495.  
  8496.                     void dce_db_iter_next_by_uuid(
  8497.                             dce_db_handle_t  handle,
  8498.                             uuid_t  **key,
  8499.                             error_status_t  *status);
  8500.  
  8501.  Parameters 
  8502.  
  8503.           Input 
  8504.  
  8505.           handle        A handle, returned from dce_db_open, that identifies 
  8506.                         the backing store being used. 
  8507.  
  8508.           Output 
  8509.  
  8510.           key           The UUID that is the key to the item in the backing 
  8511.                         store. 
  8512.  
  8513.           status        A pointer to the completion status.  On successful 
  8514.                         completion, the routine returns error_status_ok. 
  8515.                         Otherwise, it returns an error. 
  8516.  
  8517.  Usage 
  8518.  
  8519.           The dce_db_iter_next_by_uuid routine retrieves the next key from the 
  8520.           backing store that is identified by the handle parameter. An iterator 
  8521.           established by the dce_db_iter_start routine maintains the identity 
  8522.           of the current key.  Use the dce_db_fetch_by_uuid routine to retrieve 
  8523.           the actual data. 
  8524.  
  8525.           This iteration routine is the same as dce_db_iter_next, except that 
  8526.           it only works with backing stores indexed by UUID, and returns an 
  8527.           error if the backing store index is the wrong type. 
  8528.  
  8529.           The iteration routine returns a pointer to a private space associated 
  8530.           with the handle.  Each call to the iteration routine reuses this 
  8531.           space, instead of using allocated space. 
  8532.  
  8533.  Related Information 
  8534.  
  8535.           Routines: 
  8536.           dce_db_fetch_by_uuid 
  8537.           dce_db_iter_done 
  8538.           dce_db_iter_next 
  8539.           dce_db_iter_next_by_name 
  8540.           dce_db_iter_start 
  8541.  
  8542.  
  8543. ΓòÉΓòÉΓòÉ 3.6.22. dce_db_iter_start ΓòÉΓòÉΓòÉ
  8544.  
  8545.  Purpose 
  8546.  
  8547.           Prepares a backing store for iteration. 
  8548.  
  8549.  Format 
  8550.  
  8551.                     #include <dce\dce.h>
  8552.                     #include <dce\dbif.h>
  8553.  
  8554.                     void dce_db_iter_start(
  8555.                             dce_db_handle_t  handle,
  8556.                             error_status_t  *status);
  8557.  
  8558.  Parameters 
  8559.  
  8560.           Input 
  8561.  
  8562.           handle        A handle, returned from dce_db_open, that identifies 
  8563.                         the backing store being used. 
  8564.  
  8565.           Output 
  8566.  
  8567.           status        A pointer to the completion status.  On successful 
  8568.                         completion, the routine returns error_status_ok. 
  8569.                         Otherwise, it returns db_s_iter_not_allowed, which 
  8570.                         indicates that the routine was called while an 
  8571.                         iteration was already in progress. The concept of 
  8572.                         nested iterations is not supported. 
  8573.  
  8574.  Usage 
  8575.  
  8576.           The dce_db_iter_start routine prepares the backing store that is 
  8577.           identified by the handle parameter for iterative retrieval of all its 
  8578.           keys in succession. 
  8579.  
  8580.           A given handle can support only a single instance of iteration at one 
  8581.           time. 
  8582.  
  8583.           To avoid the possibility that another thread writes to the backing 
  8584.           store during an iteration, always use the dce_db_lock routine before 
  8585.           calling dce_db_iter_start. 
  8586.  
  8587.  Related Information 
  8588.  
  8589.           Routines: 
  8590.           dce_db_iter_done 
  8591.           dce_db_iter_next 
  8592.           dce_db_iter_next_by_name 
  8593.           dce_db_iter_next_by_uuid 
  8594.           dce_db_lock 
  8595.           dce_db_open 
  8596.           dce_db_unlock 
  8597.  
  8598.  
  8599. ΓòÉΓòÉΓòÉ 3.6.23. dce_db_lock ΓòÉΓòÉΓòÉ
  8600.  
  8601.  Purpose 
  8602.  
  8603.           Applies an advisory lock on a backing store. 
  8604.  
  8605.  Format 
  8606.  
  8607.                     #include <dce\dce.h>
  8608.                     #include <dce\dbif.h>
  8609.  
  8610.                     void dce_db_lock(
  8611.                             dce_db_handle_t  handle,
  8612.                             error_status_t  *status);
  8613.  
  8614.  Parameters 
  8615.  
  8616.           Input 
  8617.  
  8618.           handle        A handle, returned from dce_db_open, that identifies 
  8619.                         the backing store being used. 
  8620.  
  8621.           Output 
  8622.  
  8623.           status        A pointer to the completion status. On successful 
  8624.                         completion, the routine returns error_status_ok. 
  8625.                         Otherwise, it returns db_s_already_locked, which 
  8626.                         indicates that an attempt was made to lock a backing 
  8627.                         store, but it was already locked. 
  8628.  
  8629.  Usage 
  8630.  
  8631.           The dce_db_lock routine acquires the lock associated with the handle. 
  8632.  
  8633.           There is an advisory lock associated with each handle.  The routines 
  8634.           for storing and deleting backing stores apply the lock before 
  8635.           updating a backing store.  This routine provides a means to apply the 
  8636.           lock for other purposes, such as iteration. 
  8637.  
  8638.           Advisory locks allow cooperating threads to perform consistent 
  8639.           operations on backing stores, but do not guarantee consistency; that 
  8640.           is, threads can still access backing stores without using advisory 
  8641.           locks, possibly resulting in inconsistencies. 
  8642.  
  8643.  Related Information 
  8644.  
  8645.           Routines: 
  8646.           dce_db_delete 
  8647.           dce_db_delete_by_name 
  8648.           dce_db_delete_by_uuid 
  8649.           dce_db_store 
  8650.           dce_db_store_by_name 
  8651.           dce_db_store_by_uuid 
  8652.           dce_db_unlock 
  8653.  
  8654.  
  8655. ΓòÉΓòÉΓòÉ 3.6.24. dce_db_open ΓòÉΓòÉΓòÉ
  8656.  
  8657.  Purpose 
  8658.  
  8659.           Opens an existing backing store or creates a new one. 
  8660.  
  8661.  Format 
  8662.  
  8663.                     #include <dce\dce.h>
  8664.                     #include <dce\dbif.h>
  8665.  
  8666.                     void dce_db_open(
  8667.                             const char  *name,
  8668.                             const char  *backend_type,
  8669.                             unsigned32  flags,
  8670.                             dce_db_convert_func_t  convert,
  8671.                             dce_db_handle_t  *handle,
  8672.                             error_status_t  *status);
  8673.  
  8674.  Parameters 
  8675.  
  8676.           Input 
  8677.  
  8678.           name          The file name of the backing store to be opened or 
  8679.                         created. 
  8680.  
  8681.           backend_type  Either of the strings bsd4.4-hash or bsd4.4-btree, or a 
  8682.                         null pointer, which defaults to hash. This parameter 
  8683.                         specifies the backing store backend type for licensees 
  8684.                         adding multiple backends. 
  8685.  
  8686.           flags         The manner of opening, as specified by any of the 
  8687.                         following bits: 
  8688.  
  8689.                              db_c_index_by_name The backing store is to be 
  8690.                                   indexed by name. Either this or 
  8691.                                   db_c_index_by_uuid, but not both, must be 
  8692.                                   selected. 
  8693.  
  8694.                              db_c_index_by_uuid The backing store is to be 
  8695.                                   indexed by UUID.  Either this or 
  8696.                                   db_c_index_by_name, but not both, must be 
  8697.                                   selected. 
  8698.  
  8699.                              db_c_std_header The first field of each item 
  8700.                                   (which is defined as a union in 
  8701.                                   dce_db_header_t) is the standard backing 
  8702.                                   store header, with the case dce_db_header_std 
  8703.                                   selected. If you select db_c_std_header, you 
  8704.                                   cannot select db_c_acl_uuid_header. If you do 
  8705.                                   not select a header flag, no header is used. 
  8706.  
  8707.                              db_c_acl_uuid_header The first field of each item 
  8708.                                   (the union) is an ACL UUID, with the case 
  8709.                                   dce_db_header_acl_uuid selected. If you 
  8710.                                   select db_c_acl_uuid_header, you cannot 
  8711.                                   select db_c_std_header. If you do not select 
  8712.                                   a header flag, no header is used. 
  8713.  
  8714.                              db_c_readonly An existing backing store is to be 
  8715.                                   opened in read-only mode.  Read/write mode is 
  8716.                                   the default. 
  8717.  
  8718.                              db_c_create Creates an empty backing store if one 
  8719.                                   of the given name does not already exist.  It 
  8720.                                   is an error to try to create an existing 
  8721.                                   backing store. 
  8722.  
  8723.           convert       The routine, generated by the IDL compiler, that is 
  8724.                         called to perform serialization. 
  8725.  
  8726.           Output 
  8727.  
  8728.           handle        A pointer to a handle that identifies the backing store 
  8729.                         being used. 
  8730.  
  8731.           status        A pointer to the completion status. On successful 
  8732.                         completion, the routine returns error_status_ok. 
  8733.                         Otherwise, it returns one of the following errors: 
  8734.  
  8735.                              db_s_bad_index_type The index type in flags is 
  8736.                                   specified neither by name nor by UUID, or 
  8737.                                   else it is specified as both. 
  8738.  
  8739.                              db_s_bad_header_type The header type in flags is 
  8740.                                   specified as both standard header and ACL 
  8741.                                   header. 
  8742.  
  8743.                              db_s_index_type_mismatch An existing backing store 
  8744.                                   was opened with the wrong index type. 
  8745.  
  8746.                              db_s_open_already_exists The backing store file 
  8747.                                   specified for creation already exists. 
  8748.  
  8749.                              db_s_no_name_specified No file name is specified. 
  8750.  
  8751.                              db_s_open_failed_eacces The server does not have 
  8752.                                   permission to open the backing store file. 
  8753.  
  8754.                              db_s_open_failed_enoent The specified directory or 
  8755.                                   backing store file was not found. 
  8756.  
  8757.                              db_s_open_failed The underlying database-open 
  8758.                                   procedure failed.  The global variable errno 
  8759.                                   may provide more specific information. 
  8760.  
  8761.  Usage 
  8762.  
  8763.           The dce_db_open routine opens the specified backing store. The flags 
  8764.           parameter must specify whether the backing store is to be indexed by 
  8765.           name or by UUID.  If all server objects have entries in the CDS 
  8766.           namespace, it is probably best to use a UUID index.  If the server 
  8767.           provides a junction or another name-based lookup operation, then it 
  8768.           is probably best to use a name index. 
  8769.  
  8770.           The IDL code in \usr\include\dce\database.idl defines the backing 
  8771.           store header (selected by the flags parameter) that is placed on each 
  8772.           item, the possible header types, and the form of the routine for 
  8773.           serializing headers. 
  8774.  
  8775.  Notes 
  8776.  
  8777.           Backing stores are also called databases. For instance, the 
  8778.           associated IDL header is dce\database.idl, and the name of the 
  8779.           backing store routines begin with dce_db_. Nevertheless, backing 
  8780.           stores are not databases in the conventional sense and have no 
  8781.           support for SQL or for any other query system. 
  8782.  
  8783.           If a backing store database is opened several times, whether by the 
  8784.           same application or by different applications, updates made to the 
  8785.           database by one handle cannot be seen by other handles. 
  8786.  
  8787.  Examples 
  8788.  
  8789.           Standardized use of the backing store library is encouraged. The 
  8790.           following code is the skeleton IDL interface for a server's backing 
  8791.           store: 
  8792.  
  8793.                     interface XXX_db
  8794.                     {
  8795.                         import "dce\database.idl";
  8796.  
  8797.                         typedef XXX_data_s_t {
  8798.                             dce_db_header_t header;
  8799.                             /* server-specific data */
  8800.                         } XXX_data_t;
  8801.  
  8802.                         void XXX_data_convert(
  8803.                             [in] handle_t h,
  8804.                             [in, out] XXX_data_t *data,
  8805.                             [out] error_status_t *st
  8806.                         );
  8807.                     }
  8808.  
  8809.           This interface should be compiled with the following ACF: 
  8810.  
  8811.                     interface XXX_db
  8812.                     {
  8813.                         [encode, decode] XXX_data_convert();
  8814.                     }
  8815.  
  8816.           A typical call to dce_db_open, using the preceding IDL example, would 
  8817.           be: 
  8818.  
  8819.                     dce_db_open("XXX_db", NULL,
  8820.                         db_c_std_header | db_c_index_by_uuid,
  8821.                         (dce_db_convert_func_t)XXX_data_convert,
  8822.                         &handle, &st);
  8823.  
  8824.  Related Information 
  8825.  
  8826.           Routines: 
  8827.           dce_db_close 
  8828.  
  8829.  
  8830. ΓòÉΓòÉΓòÉ 3.6.25. dce_db_std_header_init ΓòÉΓòÉΓòÉ
  8831.  
  8832.  Purpose 
  8833.  
  8834.           Initializes a standard backing store header. 
  8835.  
  8836.  Format 
  8837.  
  8838.                     #include <dce\dce.h>
  8839.                     #include <dce\dbif.h>
  8840.  
  8841.                     void dce_db_std_header_init(
  8842.                             dce_db_handle_t  handle,
  8843.                             dce_db_header_t  *hdr,
  8844.                             uuid_t  *uuid,
  8845.                             uuid_t  *acl_uuid,
  8846.                             uuid_t  *def_object_acl,
  8847.                             uuid_t  *def_container_acl,
  8848.                             unsigned32  ref_count,
  8849.                             error_status_t  *status);
  8850.  
  8851.  Parameters 
  8852.  
  8853.           Input 
  8854.  
  8855.           handle        A handle, returned from dce_db_open, that identifies 
  8856.                         the backing store being used. 
  8857.  
  8858.           hdr           Pointer to the object header part of the users' 
  8859.                         structure. 
  8860.  
  8861.           uuid          The UUID to be placed into the header.  This parameter 
  8862.                         can be NULL. 
  8863.  
  8864.           acl_uuid      The UUID of the ACL protecting this object, to be 
  8865.                         placed into the header.  This parameter can be NULL. 
  8866.  
  8867.           def_object_acl The UUID of the default object ACL, to be placed into 
  8868.                         the header.  This parameter can be NULL. 
  8869.  
  8870.           def_container_acl The UUID of the default container ACL, to be placed 
  8871.                         into the header.  This parameter can be NULL. 
  8872.  
  8873.           ref_count     The reference count to be placed into the header. 
  8874.  
  8875.           Output 
  8876.  
  8877.           status        A pointer to the completion status.  On successful 
  8878.                         completion, the routine returns error_status_ok. 
  8879.                         Otherwise, it returns db_s_bad_header_type, which 
  8880.                         indicates that the header type is not 
  8881.                         dce_db_header_std. 
  8882.  
  8883.  Usage 
  8884.  
  8885.           The dce_db_std_header_init routine initializes the fields of the 
  8886.           standard header for a data object whose backing store is identified 
  8887.           by the handle parameter. The fields are only set in memory and should 
  8888.           be stored to the backing store by one of the store routines. The 
  8889.           handle was obtained from dce_db_open, which must have been called 
  8890.           with the db_c_std_header flag. 
  8891.  
  8892.  Related Information 
  8893.  
  8894.           Routines: 
  8895.           dce_db_header_fetch 
  8896.           dce_db_open 
  8897.  
  8898.  
  8899. ΓòÉΓòÉΓòÉ 3.6.26. dce_db_store ΓòÉΓòÉΓòÉ
  8900.  
  8901.  Purpose 
  8902.  
  8903.           Stores data into a backing store. 
  8904.  
  8905.  Format 
  8906.  
  8907.                     #include <dce\dce.h>
  8908.                     #include <dce\dbif.h>
  8909.  
  8910.                     void dce_db_store(
  8911.                             dce_db_handle_t  handle,
  8912.                             void  *key,
  8913.                             void  *data,
  8914.                             error_status_t  *status);
  8915.  
  8916.  Parameters 
  8917.  
  8918.           Input 
  8919.  
  8920.           handle        A handle, returned from dce_db_open, that identifies 
  8921.                         the backing store being used. 
  8922.  
  8923.           key           A string or UUID that is the backing store key. The 
  8924.                         datatype of key must match the key method that was 
  8925.                         selected in the flags parameter of the dce_db_open 
  8926.                         routine when the backing store was created. 
  8927.  
  8928.           data          A pointer to the data structure to be stored. 
  8929.  
  8930.           Output 
  8931.  
  8932.           status        A pointer to the completion status. On successful 
  8933.                         completion, the routine returns error_status_ok. 
  8934.                         Otherwise, it returns one of the following errors: 
  8935.  
  8936.                              db_s_bad_index_type The type of the key parameter 
  8937.                                   is wrong, or else the backing store is not by 
  8938.                                   name or by UUID. 
  8939.  
  8940.                              db_s_readonly The backing store was opened with 
  8941.                                   the db_c_readonly flag, and cannot be written 
  8942.                                   to. 
  8943.  
  8944.                              db_s_store_failed The data could not be stored 
  8945.                                   into the backing store for some reason. The 
  8946.                                   global variable errno may contain more 
  8947.                                   information about the error. 
  8948.  
  8949.                              db_s_iter_not_allowed The routine was called while 
  8950.                                   an iteration, begun by dce_db_iter_start, was 
  8951.                                   in progress. Storing is not allowed during 
  8952.                                   iteration. 
  8953.  
  8954.  Usage 
  8955.  
  8956.           The dce_db_store routine stores the data structure pointed to by data 
  8957.           into the backing store.  The conversion routine that was specified in 
  8958.           the call to dce_db_open serializes the structure so that it can be 
  8959.           written to disk. 
  8960.  
  8961.           If the key value is the same as a key already stored, the new data 
  8962.           replaces the previously stored data associated with that key. 
  8963.  
  8964.  Notes 
  8965.  
  8966.           Because the dce_db_store routine uses the encoding services, and they 
  8967.           in turn use rpc_sm_allocate, all programs that call dce_db_store 
  8968.           outside a server operation (for instance, if a server does some 
  8969.           backing store initialization or in a standalone program) must call 
  8970.           rpc_sm_enable_allocate first. Indeed, every thread that calls 
  8971.           dce_db_store must do rpc_sm_enable_allocate, but in the server side 
  8972.           of an RPC, this is already done. 
  8973.  
  8974.  Related Information 
  8975.  
  8976.           Routines: 
  8977.           dce_db_iter_start 
  8978.           dce_db_fetch 
  8979.           dce_db_open 
  8980.           dce_db_store_by_name 
  8981.           dce_db_store_by_uuid 
  8982.           rpc_sm_enable_allocate 
  8983.  
  8984.  
  8985. ΓòÉΓòÉΓòÉ 3.6.27. dce_db_store_by_name ΓòÉΓòÉΓòÉ
  8986.  
  8987.  Purpose 
  8988.  
  8989.           Stores data into a string-indexed backing store. 
  8990.  
  8991.  Format 
  8992.  
  8993.                     #include <dce\dce.h>
  8994.                     #include <dce\dbif.h>
  8995.  
  8996.                     void dce_db_store_by_name(
  8997.                             dce_db_handle_t  handle,
  8998.                             char  *key,
  8999.                             void  *data,
  9000.                             error_status_t  *status);
  9001.  
  9002.  Parameters 
  9003.  
  9004.           Input 
  9005.  
  9006.           handle        A handle, returned from dce_db_open, that identifies 
  9007.                         the backing store being used. 
  9008.  
  9009.           key           A null-terminated string that is the backing store key. 
  9010.  
  9011.           data          A pointer to the data structure to be stored. 
  9012.  
  9013.           Output 
  9014.  
  9015.           status        A pointer to the completion status. On successful 
  9016.                         completion, the routine returns error_status_ok. 
  9017.                         Otherwise, it returns one of the following errors: 
  9018.  
  9019.                              db_s_bad_index_type The backing store is not 
  9020.                                   indexed by name. 
  9021.  
  9022.                              db_s_readonly The backing store was opened with 
  9023.                                   the db_c_readonly flag, and cannot be written 
  9024.                                   to. 
  9025.  
  9026.                              db_s_store_failed The data could not be stored 
  9027.                                   into the backing store for some reason. The 
  9028.                                   global variable errno may contain more 
  9029.                                   information about the error. 
  9030.  
  9031.                              db_s_iter_not_allowed The routine was called while 
  9032.                                   an iteration, begun by dce_db_iter_start, was 
  9033.                                   in progress. Storing is not allowed during 
  9034.                                   iteration. 
  9035.  
  9036.  Usage 
  9037.  
  9038.           The dce_db_store_by_name routine stores the data structure pointed to 
  9039.           by data into the backing store. The conversion routine that was 
  9040.           specified in the call to dce_db_open serializes the structure so that 
  9041.           it can be written to disk. 
  9042.  
  9043.           This routine is specialized for storage into backing stores that are 
  9044.           indexed by string, as selected by the db_c_index_by_name bit in the 
  9045.           flags parameter of the dce_db_open routine when the backing store was 
  9046.           created. 
  9047.  
  9048.           If the key value is the same as a key already stored, the information 
  9049.           pointed to by data replaces the previously stored data associated 
  9050.           with that key. 
  9051.  
  9052.  Notes 
  9053.  
  9054.           Because the dce_db_store_by_name routine uses the encoding services, 
  9055.           and they in turn use rpc_sm_allocate, all programs that call 
  9056.           dce_db_store_by_name outside a server operation (for instance, if a 
  9057.           server does some backing store initialization, or in a standalone 
  9058.           program) must call rpc_sm_enable_allocate first. Indeed, every thread 
  9059.           that calls dce_db_store_by_name must do rpc_sm_enable_allocate, but 
  9060.           in the server side of an RPC, this is already done. 
  9061.  
  9062.  Related Information 
  9063.  
  9064.           Routines: 
  9065.           dce_db_open 
  9066.           dce_db_store 
  9067.           dce_db_store_by_uuid 
  9068.           rpc_sm_enable_allocate 
  9069.  
  9070.  
  9071. ΓòÉΓòÉΓòÉ 3.6.28. dce_db_store_by_uuid ΓòÉΓòÉΓòÉ
  9072.  
  9073.  Purpose 
  9074.  
  9075.           Stores data into a UUID-indexed backing store. 
  9076.  
  9077.  Format 
  9078.  
  9079.                     #include <dce\dce.h>
  9080.                     #include <dce\dbif.h>
  9081.  
  9082.                     void dce_db_store_by_uuid(
  9083.                             dce_db_handle_t  handle,
  9084.                             uuid_t  *key,
  9085.                             void  *data,
  9086.                             error_status_t  *status);
  9087.  
  9088.  Parameters 
  9089.  
  9090.           Input 
  9091.  
  9092.           handle        A handle, returned from dce_db_open, that identifies 
  9093.                         the backing store being used. 
  9094.  
  9095.           key           A UUID that is the backing store key. 
  9096.  
  9097.           data          A pointer to the data structure to be stored. 
  9098.  
  9099.           Output 
  9100.  
  9101.           status        A pointer to the completion status. On successful 
  9102.                         completion, the routine returns error_status_ok. 
  9103.                         Otherwise, it returns one of the following errors: 
  9104.  
  9105.                              db_s_bad_index_type The backing store is not 
  9106.                                   indexed by UUID. 
  9107.  
  9108.                              db_s_readonly The backing store was opened with 
  9109.                                   the db_c_readonly flag and cannot be written 
  9110.                                   to. 
  9111.  
  9112.                              db_s_store_failed The data could not be stored 
  9113.                                   into the backing store for some reason. The 
  9114.                                   global variable errno may contain more 
  9115.                                   information about the error. 
  9116.  
  9117.                              db_s_iter_not_allowed The routine was called while 
  9118.                                   an iteration, begun by dce_db_iter_start, was 
  9119.                                   in progress. Storing is not allowed during 
  9120.                                   iteration. 
  9121.  
  9122.  Usage 
  9123.  
  9124.           The dce_db_store_by_uuid routine stores the data structure pointed to 
  9125.           by data into the backing store. The conversion routine that was 
  9126.           specified in the call to dce_db_open serializes the structure so that 
  9127.           it can be written to disk. 
  9128.  
  9129.           This routine is specialized for storage into backing stores that are 
  9130.           indexed by UUID, as selected by the db_c_index_by_uuid bit in the 
  9131.           flags parameter of the dce_db_open routine when the backing store was 
  9132.           created. 
  9133.  
  9134.           If the key value is the same as a key already stored, the information 
  9135.           pointed to by data replaces the previously stored data associated 
  9136.           with that key. 
  9137.  
  9138.  Notes 
  9139.  
  9140.           Because the dce_db_store_by_uuid routine uses the encoding services, 
  9141.           and they in turn use rpc_sm_allocate, all programs that call 
  9142.           dce_db_store_by_uuid outside a server operation (for instance, if a 
  9143.           server does some backing store initialization, or in a standalone 
  9144.           program) must call rpc_sm_enable_allocate first. Indeed, every thread 
  9145.           that calls dce_db_store_by_uuid must do rpc_sm_enable_allocate, but 
  9146.           in the server side of an RPC, this is already done. 
  9147.  
  9148.  Related Information 
  9149.  
  9150.           Routines: 
  9151.           dce_db_iter_start 
  9152.           dce_db_open 
  9153.           dce_db_store 
  9154.           dce_db_store_by_name 
  9155.           rpc_sm_enable_allocate 
  9156.  
  9157.  
  9158. ΓòÉΓòÉΓòÉ 3.6.29. dce_db_unlock ΓòÉΓòÉΓòÉ
  9159.  
  9160.  Purpose 
  9161.  
  9162.           Releases the backing store lock. 
  9163.  
  9164.  Format 
  9165.  
  9166.                     #include <dce\dce.h>
  9167.                     #include <dce\dbif.h>
  9168.  
  9169.                     void dce_db_unlock(
  9170.                             dce_db_handle_t  handle,
  9171.                             error_status_t  *status);
  9172.  
  9173.  Parameters 
  9174.  
  9175.           Input 
  9176.  
  9177.           handle        A handle, returned from dce_db_open, that identifies 
  9178.                         the backing store being used. 
  9179.  
  9180.           Output 
  9181.  
  9182.           status        A pointer to the completion status. On successful 
  9183.                         completion, the routine returns error_status_ok. 
  9184.                         Otherwise, it returns db_s_not_locked, which indicates 
  9185.                         that an attempt was made to unlock a backing store, but 
  9186.                         it was not locked. 
  9187.  
  9188.  Usage 
  9189.  
  9190.           The dce_db_unlock routine releases the lock associated with the 
  9191.           handle. 
  9192.  
  9193.  Related Information 
  9194.  
  9195.           Routines: 
  9196.           dce_db_lock 
  9197.  
  9198.  
  9199. ΓòÉΓòÉΓòÉ 3.7. The DCE Messaging Interface ΓòÉΓòÉΓòÉ
  9200.  
  9201. All DCE message texts are assigned a unique message ID. This is a 32-bit 
  9202. number, with the special value of all-bits-zero reserved to indicate success. 
  9203. All other numbers are divided into a technology/component that identifies the 
  9204. message catalog, and an index into the catalog. 
  9205.  
  9206. All messages for a given component are stored in a single message catalog 
  9207. generated by the sams utility when the component is built. (The messages can 
  9208. also be compiled into the application code, which allows the successful 
  9209. retrieval of message text independent of whether the message catalogs were 
  9210. correctly installed.) 
  9211.  
  9212. In typical use, a message is first retrieved from a message catalog, which 
  9213. allows localization to occur. If this fails, the default message is retrieved 
  9214. from an in-memory table. If this fails, a fallback text identifying the message 
  9215. number is generated. The two most useful routines, dce_error_inq_text and 
  9216. dce_msg_get, and the DCE printf routines follow these rules. The remainder of 
  9217. this API gives direct access for special needs. 
  9218.  
  9219. The dce_msg_cat_xxx routines provide a DCE abstraction to standard message 
  9220. catalog routines, and map DCE message IDs to message catalog names.  They offer 
  9221. a convenient way of opening and accessing a message catalog by supplying the ID 
  9222. of a message contained in it, rather than the name of the catalog itself. After 
  9223. it is opened, the catalog is accessed by means of an opaque handle (the 
  9224. dce_msg_cat_handle_t typedef). 
  9225.  
  9226. See the following subtopics for more information: 
  9227.  
  9228.       The DCE Messaging Routines 
  9229.       Messaging Data Types and Structures 
  9230.       Messaging Related Information 
  9231.  
  9232.  
  9233. ΓòÉΓòÉΓòÉ 3.7.1. The DCE Messaging Routines ΓòÉΓòÉΓòÉ
  9234.  
  9235. The messaging routines are as follows, listed in alphabetical order: 
  9236.  
  9237.  dce_error_inq_text            Retrieves from the installed DCE component 
  9238.                                message catalogs the message text associated 
  9239.                                with an error status code returned by a DCE 
  9240.                                library routine. 
  9241.  
  9242.  dce_msg_cat_close             Closes the message catalog that was opened with 
  9243.                                dce_msg_cat_open. 
  9244.  
  9245.  dce_msg_cat_get_msg           Receives the text for a specified message. 
  9246.  
  9247.  dce_msg_cat_open              Opens the message catalog that contains the 
  9248.                                specified message and returns a handle that can 
  9249.                                be used in subsequent calls to 
  9250.                                dce_msg_cat_get_msg. 
  9251.  
  9252.  dce_msg_define_msg_table      Registers an in-memory table containing the 
  9253.                                messages. 
  9254.  
  9255.  dce_msg_get                   Retrieves the text for a specified message. This 
  9256.                                routine is a convenience form of the 
  9257.                                dce_msg_get_msg routine. 
  9258.  
  9259.  dce_msg_get_cat_msg           This routine is a convenience form of the 
  9260.                                dce_msg_cat_get_msg routine. Unlike 
  9261.                                dce_msg_cat_get_msg, the dce_msg_get_cat_msg 
  9262.                                routine does not require the message catalog to 
  9263.                                be explicitly opened. 
  9264.  
  9265.  dce_msg_get_default_msg       Retrieves a message from the application's 
  9266.                                in-memory tables. 
  9267.  
  9268.  dce_msg_get_msg               Retrieves the text for a specified message. 
  9269.  
  9270.  dce_msg_translate_table       The dce_msg_translate_table routine overwrites 
  9271.                                the specified in-memory message table with the 
  9272.                                values from the equivalent message catalogs. 
  9273.  
  9274.  dce_pgm_printf, dce_pgm_fprintf, and dce_pgm_sprintf Equivalent to the 
  9275.                                dce_printf routines, except that these routines 
  9276.                                prepend the program name and append a newline 
  9277.                                character. 
  9278.  
  9279.  dce_printf, dce_fprintf, and dce_sprintf These routines retrieve and print the 
  9280.                                message text associated with the specified 
  9281.                                message ID. dce_printf prints the message and 
  9282.                                its arguments on the standard output, 
  9283.                                dce_fprintf prints the message on the specified 
  9284.                                stream, and dce_sprintf prints the message into 
  9285.                                an allocated string that is returned. 
  9286.  
  9287.  
  9288. ΓòÉΓòÉΓòÉ 3.7.2. Messaging Data Types and Structures ΓòÉΓòÉΓòÉ
  9289.  
  9290.  dce_error_string_t            An array of characters large enough to hold any 
  9291.                                error text returned by dce_error_inq_text. 
  9292.  
  9293.  dce_msg_cat_handle_t          An opaque handle to a DCE message catalog.  (Use 
  9294.                                dce_msg_cat_open to get a handle.) 
  9295.  
  9296.  
  9297. ΓòÉΓòÉΓòÉ 3.7.3. Messaging Related Information ΓòÉΓòÉΓòÉ
  9298.  
  9299. Files: 
  9300. dce\dce_msg.h 
  9301. dce\dcesvcmsg.h 
  9302.  
  9303. Books: 
  9304. DCE for OS/2 Warp: Application Development Guide - Core Components 
  9305.  
  9306.  
  9307. ΓòÉΓòÉΓòÉ 3.7.4. dce_error_inq_text ΓòÉΓòÉΓòÉ
  9308.  
  9309.  Purpose 
  9310.  
  9311.           Retrieves message text associated with a DCE error code. 
  9312.  
  9313.  Format 
  9314.  
  9315.                     #include <dce\dce_error.h>
  9316.  
  9317.                     void dce_error_inq_text(
  9318.                             error_status_t  status_to_convert,
  9319.                             dce_error_string_t  error_text,
  9320.                             int  *status);
  9321.  
  9322.  Parameters 
  9323.  
  9324.           Input 
  9325.  
  9326.           status_to_convert DCE status code for which a text message is to be 
  9327.                         retrieved. 
  9328.  
  9329.           Output 
  9330.  
  9331.           error_text    The message text associated with the status_to_convert. 
  9332.  
  9333.           status        Returns the status code from this operation. The status 
  9334.                         code is set to 0 on success, and to -1 on failure. 
  9335.  
  9336.  Usage 
  9337.  
  9338.           The dce_error_inq_text routine retrieves from the installed DCE 
  9339.           component message catalogs the message text associated with an error 
  9340.           status code returned by a DCE library routine. 
  9341.  
  9342.           All DCE message texts are assigned a unique 32-bit message ID. The 
  9343.           special value of all-bits-zero is reserved to indicate success. 
  9344.  
  9345.           The dce_error_inq_text routine uses the message ID as a series of 
  9346.           indices into the correct DCE component's message catalog; the text 
  9347.           found by this indexing is the message that explains the status code 
  9348.           that was returned by the DCE or DCE application routine. 
  9349.  
  9350.           All messages for a given component are stored in a single message 
  9351.           catalog generated by the sams utility when the component is built. 
  9352.           (The messages can also be compiled into the component code, which 
  9353.           allows the successful retrieval of message text independent of 
  9354.           whether the message catalogs were correctly installed.) 
  9355.  
  9356.           The text string returned by dce_error_inq_text is dependent on the 
  9357.           current locale. See Writing Internationalized RPC Applications for 
  9358.           more details. 
  9359.  
  9360.  Examples 
  9361.  
  9362.           The following code fragment shows how dce_error_inq_text can be used 
  9363.           to retrieve the message text describing the status code returned by 
  9364.           the DCE RPC library routine application: 
  9365.  
  9366.                     dce_error_string_t error_string;
  9367.                     error_status_t status;
  9368.                     int print_status;
  9369.  
  9370.                     rpc_server_register_if(application_v1_0_s_ifspec, &type_uuid,
  9371.                         (rpc_mgr_epv_t)&manager_epv, &status);
  9372.                     if (status != rpc_s_ok) {
  9373.                            dce_error_inq_text(status, error_string, &print_status);
  9374.                            fprintf(stderr," Server: %s: %s\n", caller, error_string);
  9375.  
  9376.                     }
  9377.  
  9378.  
  9379. ΓòÉΓòÉΓòÉ 3.7.5. dce_msg_cat_close ΓòÉΓòÉΓòÉ
  9380.  
  9381.  Purpose 
  9382.  
  9383.           Closes the specified DCE message catalog. 
  9384.  
  9385.  Format 
  9386.  
  9387.                     #include <dce\dce_msg.h>
  9388.                     #include <dce\dcesvcmsg.h>
  9389.  
  9390.                     void dce_msg_cat_close(
  9391.                             dce_msg_cat_handle_t  handle,
  9392.                             error_status_t  *status);
  9393.  
  9394.  Parameters 
  9395.  
  9396.           Input 
  9397.  
  9398.           handle        The handle (returned by dce_msg_cat_open) to the 
  9399.                         catalog that is to be closed. 
  9400.  
  9401.           Output 
  9402.  
  9403.           status        Returns the status code from this operation. On 
  9404.                         successful completion, the routine returns 
  9405.                         msg_s_ok_text. Otherwise, it returns one of the 
  9406.                         following errors: 
  9407.  
  9408.                              msg_s_bad_id The message ID is not valid. A 
  9409.                                   message ID with a technology or component 
  9410.                                   that is not valid was specified. 
  9411.  
  9412.                              msg_s_no_cat_open Could not open the message 
  9413.                                   catalog for the specified message ID. 
  9414.  
  9415.                              msg_s_no_cat_perm Local file permissions prevented 
  9416.                                   the program from opening the message catalog 
  9417.                                   for the specified message ID. 
  9418.  
  9419.                              msg_s_no_catalog The message catalog for the 
  9420.                                   specified message ID does not exist. 
  9421.  
  9422.                              msg_s_no_default Could not find the default 
  9423.                                   message for the specified status code in the 
  9424.                                   internal tables. 
  9425.  
  9426.                              msg_s_no_memory Could not allocate memory for 
  9427.                                   message table, string copy, or other internal 
  9428.                                   requirement. 
  9429.  
  9430.                              msg_s_not_found Could not find the text for the 
  9431.                                   specified status code in either the in-core 
  9432.                                   message tables or the message catalogs. 
  9433.  
  9434.  Usage 
  9435.  
  9436.           The dce_msg_cat_close routine closes the message catalog that was 
  9437.           opened with dce_msg_cat_open.  On error, it fills in status with an 
  9438.           error code. 
  9439.  
  9440.  Related Information 
  9441.  
  9442.           Routines: 
  9443.           dce_msg_cat_get_msg 
  9444.           dce_msg_cat_open 
  9445.           dce_msg_get 
  9446.           dce_msg_get_cat_msg 
  9447.           dce_msg_get_msg 
  9448.  
  9449.  
  9450. ΓòÉΓòÉΓòÉ 3.7.6. dce_msg_cat_get_msg ΓòÉΓòÉΓòÉ
  9451.  
  9452.  Purpose 
  9453.  
  9454.           Retrieves message text from a DCE message catalog. 
  9455.  
  9456.  Format 
  9457.  
  9458.                     #include <dce\dce_msg.h>
  9459.                     #include <dce\dcesvcmsg.h>
  9460.  
  9461.                     unsigned char *dce_msg_cat_get_msg(
  9462.                             dce_msg_cat_handle_t  handle,
  9463.                             unsigned32  message,
  9464.                             error_status_t  *status);
  9465.  
  9466.  Parameters 
  9467.  
  9468.           Input 
  9469.  
  9470.           message       The ID of the message to be retrieved. This is a 32-bit 
  9471.                         DCE message ID as described in dce_msg_intro. 
  9472.  
  9473.           handle        A handle (returned by dce_msg_cat_open) to an opened 
  9474.                         message catalog. 
  9475.  
  9476.           Output 
  9477.  
  9478.           status        Returns the status code from this operation. On 
  9479.                         successful completion, the routine returns 
  9480.                         msg_s_ok_text. Otherwise, it returns one of the 
  9481.                         following errors: 
  9482.  
  9483.                              msg_s_bad_id The message ID is not valid. A 
  9484.                                   message ID with a technology or component 
  9485.                                   that is not valid was specified. 
  9486.  
  9487.                              msg_s_no_cat_open Could not open the message 
  9488.                                   catalog for the specified message ID. 
  9489.  
  9490.                              msg_s_no_cat_perm Local file permissions prevented 
  9491.                                   the program from opening the message catalog 
  9492.                                   for the specified message ID. 
  9493.  
  9494.                              msg_s_no_catalog The message catalog for the 
  9495.                                   specified message ID does not exist. 
  9496.  
  9497.                              msg_s_no_default Could not find the default 
  9498.                                   message for the specified status code in the 
  9499.                                   internal tables. 
  9500.  
  9501.                              msg_s_no_memory Could not allocate memory for 
  9502.                                   message table, string copy, or other internal 
  9503.                                   requirement. 
  9504.  
  9505.                              msg_s_not_found Could not find the text for the 
  9506.                                   specified status code in either the in-core 
  9507.                                   message tables or the message catalogs. 
  9508.  
  9509.  Usage 
  9510.  
  9511.           After the catalog has been opened with the dce_msg_cat_open routine, 
  9512.           dce_msg_cat_get_msg can be used to retrieve the text for a specified 
  9513.           message. If the message cannot be found in the catalog, the routine 
  9514.           returns a NULL and fills in status with the appropriate error code. 
  9515.  
  9516.  Related Information 
  9517.  
  9518.           Routines: 
  9519.           dce_msg_cat_close 
  9520.           dce_msg_cat_get_msg 
  9521.           dce_msg_cat_open 
  9522.           dce_msg_get 
  9523.           dce_msg_get_cat_msg 
  9524.           dce_msg_get_msg 
  9525.  
  9526.  
  9527. ΓòÉΓòÉΓòÉ 3.7.7. dce_msg_cat_open ΓòÉΓòÉΓòÉ
  9528.  
  9529.  Purpose 
  9530.  
  9531.           Opens a DCE message catalog. 
  9532.  
  9533.  Format 
  9534.  
  9535.                     #include <dce\dce_msg.h>
  9536.                     #include <dce\dcesvcmsg.h>
  9537.  
  9538.                     dce_msg_cat_handle_t dce_msg_cat_open(
  9539.                             unsigned32  message_id,
  9540.                             error_status_t  *status);
  9541.  
  9542.  Parameters 
  9543.  
  9544.           Input 
  9545.  
  9546.           message_id    The ID of the message to be retrieved. 
  9547.  
  9548.           Output 
  9549.  
  9550.           status        Returns the status code from this operation. On 
  9551.                         successful completion, the routine returns 
  9552.                         msg_s_ok_text. Otherwise, it returns one of the 
  9553.                         following errors: 
  9554.  
  9555.                              msg_s_bad_id The message ID is not valid. A 
  9556.                                   message ID with a technology or component 
  9557.                                   that is not valid was specified. 
  9558.  
  9559.                              msg_s_no_cat_open Could not open the message 
  9560.                                   catalog for the specified message ID. 
  9561.  
  9562.                              msg_s_no_cat_perm Local file permissions prevented 
  9563.                                   the program from opening the message catalog 
  9564.                                   for the specified message ID. 
  9565.  
  9566.                              msg_s_no_catalog The message catalog for the 
  9567.                                   specified message ID does not exist. 
  9568.  
  9569.                              msg_s_no_default Could not find the default 
  9570.                                   message for the specified status code in the 
  9571.                                   internal tables. 
  9572.  
  9573.                              msg_s_no_memory Could not allocate memory for 
  9574.                                   message table, string copy, or other internal 
  9575.                                   requirement. 
  9576.  
  9577.                              msg_s_not_found Could not find the text for the 
  9578.                                   specified status code in either the in-core 
  9579.                                   message tables or the message catalogs. 
  9580.  
  9581.  Usage 
  9582.  
  9583.           The dce_msg_cat_open routine opens the message catalog that contains 
  9584.           the specified message_id.  It returns a handle that can be used in 
  9585.           subsequent calls to dce_msg_cat_get_msg.  On error, it returns NULL 
  9586.           and fills in status with an appropriate error code. 
  9587.  
  9588.  Related Information 
  9589.  
  9590.           Routines: 
  9591.           dce_msg_cat_close 
  9592.           dce_msg_cat_get_msg 
  9593.           dce_msg_get_cat_msg 
  9594.           dce_msg_get 
  9595.           dce_msg_get_msg 
  9596.  
  9597.  
  9598. ΓòÉΓòÉΓòÉ 3.7.8. dce_msg_define_msg_table ΓòÉΓòÉΓòÉ
  9599.  
  9600.  Purpose 
  9601.  
  9602.           Adds a message table to the in-memory table. 
  9603.  
  9604.  Format 
  9605.  
  9606.                     #include <dce\dce_msg.h>
  9607.                     #include <dce\dcesvcmsg.h>
  9608.  
  9609.                     void dce_msg_define_msg_table(
  9610.                             dce_msg_table_t  *table,
  9611.                             unsigned32  count,
  9612.                             error_status_t  *status);
  9613.  
  9614.  Parameters 
  9615.  
  9616.           Input 
  9617.  
  9618.           table         A message table structure defined in a header file 
  9619.                         generated by sams during compilation (see the examples 
  9620.                         following). 
  9621.  
  9622.           count         The number of elements contained in the table. 
  9623.  
  9624.           Output 
  9625.  
  9626.           status        Returns the status code from this operation. On 
  9627.                         successful completion, the routine returns 
  9628.                         msg_s_ok_text. Otherwise, it returns one of the 
  9629.                         following errors: 
  9630.  
  9631.                              msg_s_bad_id The message ID is not valid. A 
  9632.                                   message ID with a technology or component 
  9633.                                   that is not valid was specified. 
  9634.  
  9635.                              msg_s_no_cat_open Could not open the message 
  9636.                                   catalog for the specified message ID. 
  9637.  
  9638.                              msg_s_no_cat_perm Local file permissions prevented 
  9639.                                   the program from opening the message catalog 
  9640.                                   for the specified message ID. 
  9641.  
  9642.                              msg_s_no_catalog The message catalog for the 
  9643.                                   specified message ID does not exist. 
  9644.  
  9645.                              msg_s_no_default Could not find the default 
  9646.                                   message for the specified status code in the 
  9647.                                   internal tables. 
  9648.  
  9649.                              msg_s_no_memory Could not allocate memory for 
  9650.                                   message table, string copy, or other internal 
  9651.                                   requirement. 
  9652.  
  9653.                              msg_s_not_found Could not find the text for the 
  9654.                                   specified status code in either the in-core 
  9655.                                   message tables or the message catalogs. 
  9656.  
  9657.  Usage 
  9658.  
  9659.           All messages for a given component are stored in a single message 
  9660.           catalog generated by the sams utility when the component 
  9661.           (application) is built. 
  9662.  
  9663.           However, the messages can also be compiled directly into the 
  9664.           component code, which allows the successful retrieval of message text 
  9665.           independent of whether the message catalogs were correctly installed. 
  9666.           Generation of in-memory message tables is specified by the incatalog 
  9667.           flag in the sams file where the message text is defined. If the 
  9668.           messages have been generated at compile time with this option 
  9669.           specified, the dce_msg_define_msg_table routine can be called by the 
  9670.           application to register an in-memory table containing the messages. 
  9671.  
  9672.           The table parameter should identify a message table structure defined 
  9673.           in a header file generated by sams during compilation (see the 
  9674.           examples following). The count parameter specifies the number of 
  9675.           elements contained in the table. If an error is detected during the 
  9676.           call, the routine returns an appropriate error code in the status 
  9677.           parameter. 
  9678.  
  9679.  Examples 
  9680.  
  9681.           The following code fragment shows how an application (whose 
  9682.           serviceability component name is app) sets up an in-memory message 
  9683.           table: 
  9684.  
  9685.                     #include <dce\dce.h>
  9686.                     #include <dce\dce_msg.h>
  9687.                     #include <dce\dcesvcmsg.h>
  9688.                     #include "dceappmsg.h"         \* defines app_msg_table *\
  9689.  
  9690.                     error_status_t status;
  9691.  
  9692.           The following call adds the message table to the in-memory table. 
  9693.           Note that you must include <dce\dce_msg.h>.  You also have to link in 
  9694.           dceappmsg.o and dceappsvc.o (object files produced by compiling 
  9695.           sams-generated .c files), which contain the code for the messages and 
  9696.           the table, respectively. 
  9697.  
  9698.                     dce_msg_define_msg_table(app_msg_table,
  9699.                                              sizeof(app_msg_table) / sizeof(app_msg_table[0]),
  9700.                                              &status);
  9701.  
  9702.  Related Information 
  9703.  
  9704.           Routines: 
  9705.           dce_msg_get 
  9706.           dce_msg_get_msg 
  9707.           dce_msg_get_default_msg 
  9708.  
  9709.  
  9710. ΓòÉΓòÉΓòÉ 3.7.9. dce_msg_get ΓòÉΓòÉΓòÉ
  9711.  
  9712.  Purpose 
  9713.  
  9714.           Retrieves the text of a specified DCE message. 
  9715.  
  9716.  Format 
  9717.  
  9718.                     #include <dce\dce_msg.h>
  9719.  
  9720.                     unsigned char *dce_msg_get(
  9721.                             unsigned32 message);
  9722.  
  9723.  Parameters 
  9724.  
  9725.           Input 
  9726.  
  9727.           message       ID of the message to be retrieved. This ID is a 32-bit 
  9728.                         DCE message ID, with the special value of all-bits-zero 
  9729.                         reserved to indicate success. 
  9730.  
  9731.  Usage 
  9732.  
  9733.           The dce_msg_get routine is a convenience form of the dce_msg_get_msg 
  9734.           routine. Like dce_msg_get_msg, the dce_msg_get routine retrieves the 
  9735.           text for a specified message. However, dce_msg_get does not return a 
  9736.           status code; it either returns the specified message successfully or 
  9737.           fails (ends the program) with an assertion error if the message could 
  9738.           not be found or memory could not be allocated. 
  9739.  
  9740.           The routine implicitly determines the correct message catalog in 
  9741.           which to access the specified message, and opens it; you only have to 
  9742.           call this routine. 
  9743.  
  9744.           The routine first searches the appropriate message catalog for the 
  9745.           message, and then (if it cannot find the catalog) searches the 
  9746.           in-memory message table, if it exists. 
  9747.  
  9748.           The message, if found, is returned in allocated space to which the 
  9749.           routine returns a pointer. You must free the pointed-to space by 
  9750.           using dce_free. 
  9751.  
  9752.  Related Information 
  9753.  
  9754.           Routines: 
  9755.           dce_free 
  9756.           dce_msg_define_msg_table 
  9757.           dce_msg_get_msg 
  9758.           dce_msg_get_default_msg 
  9759.  
  9760.  
  9761. ΓòÉΓòÉΓòÉ 3.7.10. dce_msg_get_cat_msg ΓòÉΓòÉΓòÉ
  9762.  
  9763.  Purpose 
  9764.  
  9765.           Opens a message catalog and retrieves a message. 
  9766.  
  9767.  Format 
  9768.  
  9769.                     #include <dce\dce_msg.h>
  9770.                     #include <dce\dcesvcmsg.h>
  9771.  
  9772.                     unsigned char *dce_msg_get_cat_msg(
  9773.                             unsigned32  message,
  9774.                             error_status_t  *status);
  9775.  
  9776.  Parameters 
  9777.  
  9778.           Input 
  9779.  
  9780.           message       ID of message to be retrieved. This ID is a 32-bit DCE 
  9781.                         message ID, with the special value of all-bits-zero 
  9782.                         reserved to indicate success. 
  9783.  
  9784.           Output 
  9785.  
  9786.           status        Returns the status code from this operation. On 
  9787.                         successful completion, the routine returns 
  9788.                         msg_s_ok_text. Otherwise, it returns one of the 
  9789.                         following errors: 
  9790.  
  9791.                              msg_s_bad_id The message ID is not valid. A 
  9792.                                   message ID with a technology or component 
  9793.                                   that is not valid was specified. 
  9794.  
  9795.                              msg_s_no_cat_open Could not open the message 
  9796.                                   catalog for the specified message ID. 
  9797.  
  9798.                              msg_s_no_cat_perm Local file permissions prevented 
  9799.                                   the program from opening the message catalog 
  9800.                                   for the specified message ID. 
  9801.  
  9802.                              msg_s_no_catalog The message catalog for the 
  9803.                                   specified message ID does not exist. 
  9804.  
  9805.                              msg_s_no_default Could not find the default 
  9806.                                   message for the specified status code in the 
  9807.                                   internal tables. 
  9808.  
  9809.                              msg_s_no_memory Could not allocate memory for 
  9810.                                   message table, string copy, or other internal 
  9811.                                   requirement. 
  9812.  
  9813.                              msg_s_not_found Could not find the text for the 
  9814.                                   specified status code in either the in-core 
  9815.                                   message tables or the message catalogs. 
  9816.  
  9817.  Usage 
  9818.  
  9819.           The dce_msg_get_cat_msg routine is a convenience form of the 
  9820.           dce_msg_cat_get_msg routine. The difference between it and the latter 
  9821.           routine is that dce_msg_get_cat_msg does not require the message 
  9822.           catalog to be explicitly opened; it determines the correct catalog 
  9823.           from the message parameter, opens it, retrieves the message, and 
  9824.           returns a pointer to space allocated with malloc that contains the 
  9825.           message. If the message catalog is inaccessible, the routine returns 
  9826.           an error. 
  9827.  
  9828.           The routine fails if the message catalog is not correctly installed. 
  9829.  
  9830.  Related Information 
  9831.  
  9832.           Routines: 
  9833.           dce_msg_cat_close 
  9834.           dce_msg_cat_get_msg 
  9835.           dce_msg_cat_open 
  9836.           dce_msg_get 
  9837.           dce_msg_get_msg 
  9838.  
  9839.  
  9840. ΓòÉΓòÉΓòÉ 3.7.11. dce_msg_get_default_msg ΓòÉΓòÉΓòÉ
  9841.  
  9842.  Purpose 
  9843.  
  9844.           Retrieves a DCE message from in-memory tables. 
  9845.  
  9846.  Format 
  9847.  
  9848.                     #include <dce\dce_msg.h>
  9849.                     #include <dce\dcesvcmsg.h>
  9850.  
  9851.                     unsigned char *dce_msg_get_default_msg(
  9852.                              unsigned32  message,
  9853.                              error_status_t  *status);
  9854.  
  9855.  Parameters 
  9856.  
  9857.           Input 
  9858.  
  9859.           message       ID of message to be retrieved. This ID is a 32-bit DCE 
  9860.                         message ID, with the special value of all-bits-zero 
  9861.                         reserved to indicate success. 
  9862.  
  9863.           Output 
  9864.  
  9865.           status        Returns the status code from this operation. On 
  9866.                         successful completion, the routine returns 
  9867.                         msg_s_ok_text. Otherwise, it returns one of the 
  9868.                         following errors: 
  9869.  
  9870.                              msg_s_bad_id The message ID is not valid. A 
  9871.                                   message ID with a technology or component 
  9872.                                   that is not valid was specified. 
  9873.  
  9874.                              msg_s_no_cat_open Could not open the message 
  9875.                                   catalog for the specified message ID. 
  9876.  
  9877.                              msg_s_no_cat_perm Local file permissions prevented 
  9878.                                   the program from opening the message catalog 
  9879.                                   for the specified message ID. 
  9880.  
  9881.                              msg_s_no_catalog The message catalog for the 
  9882.                                   specified message ID does not exist. 
  9883.  
  9884.                              msg_s_no_default Could not find the default 
  9885.                                   message for the specified status code in the 
  9886.                                   internal tables. 
  9887.  
  9888.                              msg_s_no_memory Could not allocate memory for 
  9889.                                   message table, string copy, or other internal 
  9890.                                   requirement. 
  9891.  
  9892.                              msg_s_not_found Could not find the text for the 
  9893.                                   specified status code in either the in-core 
  9894.                                   message tables or the message catalogs. 
  9895.  
  9896.  Usage 
  9897.  
  9898.           The dce_msg_get_default_msg routine retrieves a message from the 
  9899.           application's in-memory tables. It returns a pointer to static space 
  9900.           that should not be freed. If the specified message cannot be found in 
  9901.           the in-memory tables, the routine returns NULL and fills in status 
  9902.           with the appropriate error code. 
  9903.  
  9904.           This routine should be used only for message strings that will never 
  9905.           be translated (see dce_msg_translate_table). 
  9906.  
  9907.           All messages for a given component are stored in a single message 
  9908.           catalog generated by the sams utility when the component is built. 
  9909.           Messages can also be compiled directly into the component code, which 
  9910.           allows the successful retrieval of message text independent of 
  9911.           whether the message catalogs were correctly installed. Generation of 
  9912.           in-memory message tables is specified by the incatalog flag in the 
  9913.           sams file where the message text is defined. If the messages have 
  9914.           been generated at compile time with this option specified, the 
  9915.           dce_msg_define_msg_table routine can be called by the application to 
  9916.           set up an in-memory table containing the messages. 
  9917.  
  9918.  Examples 
  9919.  
  9920.           The following code fragment shows how dce_msg_get_default_msg can be 
  9921.           called to retrieve the in-memory copy of a message defined by a DCE 
  9922.           application (whose serviceability component name is app): 
  9923.  
  9924.                     #include <dce\dce.h>
  9925.                     #include <dce\dce_msg.h>
  9926.                     #include <dce\dcesvcmsg.h>
  9927.                     #include "dceappmsg.h"  /* test_msg is defined in this file */
  9928.  
  9929.                     unsigned char       *my_msg;
  9930.                     error_status_t      status;
  9931.  
  9932.                      .
  9933.                      .
  9934.                      .
  9935.  
  9936.                     my_msg = dce_msg_get_default_msg(test_msg, &status);
  9937.                     printf("Message is: %s\n", my_msg);
  9938.  
  9939.  Related Information 
  9940.  
  9941.           Routines: 
  9942.           dce_msg_define_msg_table 
  9943.           dce_msg_get 
  9944.           dce_msg_get_msg 
  9945.  
  9946.  
  9947. ΓòÉΓòÉΓòÉ 3.7.12. dce_msg_get_msg ΓòÉΓòÉΓòÉ
  9948.  
  9949.  Purpose 
  9950.  
  9951.           Retrieves a DCE message from its ID. 
  9952.  
  9953.  Format 
  9954.  
  9955.                     #include <dce\dce_msg.h>
  9956.                     #include <dce\dcesvcmsg.h>
  9957.  
  9958.                     unsigned char *dce_msg_get_msg(
  9959.                             unsigned32  message,
  9960.                             error_status_t  *status);
  9961.  
  9962.  Parameters 
  9963.  
  9964.           Input 
  9965.  
  9966.           message       ID of message to be retrieved. This ID is a 32-bit DCE 
  9967.                         message ID, with the special value of all-bits-zero 
  9968.                         reserved to indicate success. 
  9969.  
  9970.           Output 
  9971.  
  9972.           status        Returns the status code from this operation. On 
  9973.                         successful completion, the routine returns 
  9974.                         msg_s_ok_text. Otherwise, it returns one of the 
  9975.                         following errors: 
  9976.  
  9977.                              msg_s_bad_id The message ID is not valid. A 
  9978.                                   message ID with a technology or component 
  9979.                                   that is not valid was specified. 
  9980.  
  9981.                              msg_s_no_cat_open Could not open the message 
  9982.                                   catalog for the specified message ID. 
  9983.  
  9984.                              msg_s_no_cat_perm Local file permissions prevented 
  9985.                                   the program from opening the message catalog 
  9986.                                   for the specified message ID. 
  9987.  
  9988.                              msg_s_no_catalog The message catalog for the 
  9989.                                   specified message ID does not exist. 
  9990.  
  9991.                              msg_s_no_default Could not find the default 
  9992.                                   message for the specified status code in the 
  9993.                                   internal tables. 
  9994.  
  9995.                              msg_s_no_memory Could not allocate memory for 
  9996.                                   message table, string copy, or other internal 
  9997.                                   requirement. 
  9998.  
  9999.                              msg_s_not_found Could not find the text for the 
  10000.                                   specified status code in either the in-core 
  10001.                                   message tables or the message catalogs. 
  10002.  
  10003.  Usage 
  10004.  
  10005.           The dce_msg_get_msg routine retrieves the text for a specified 
  10006.           message. The routine implicitly determines the correct message 
  10007.           catalog in which to access the message, and opens it; you only have 
  10008.           to call the routine. 
  10009.  
  10010.           The routine first searches the appropriate message catalog for the 
  10011.           message, and then (if it cannot find the catalog) searches the 
  10012.           in-memory message table. If the message cannot be found in either of 
  10013.           these places, the routine returns a default string and fills in 
  10014.           status with an error code. This routine always returns a string, even 
  10015.           if there is an error (except for msg_s_no_memory). 
  10016.  
  10017.           The message, if found, is returned in allocated space to which the 
  10018.           routine returns a pointer. You must free the pointed-to space by 
  10019.           using dce_free. If memory cannot be allocated, the routine returns 
  10020.           NULL and fills in status with the msg_s_no_memory error code. 
  10021.  
  10022.  Related Information 
  10023.  
  10024.           Routines: 
  10025.           dce_free 
  10026.           dce_msg_define_msg_table 
  10027.           dce_msg_get 
  10028.           dce_msg_get_default_msg 
  10029.  
  10030.  
  10031. ΓòÉΓòÉΓòÉ 3.7.13. dce_msg_translate_table ΓòÉΓòÉΓòÉ
  10032.  
  10033.  Purpose 
  10034.  
  10035.           Translates all in-memory messages in a table. 
  10036.  
  10037.  Format 
  10038.  
  10039.                     #include <dce\dce_msg.h>
  10040.                     #include <dce\dcesvcmsg.h>
  10041.  
  10042.                     void dce_msg_translate_table(
  10043.                             dce_msg_table_t  *table,
  10044.                             unsigned32  count,
  10045.                             error_status_t  *status);
  10046.  
  10047.  Parameters 
  10048.  
  10049.           Input 
  10050.  
  10051.           table         A message table structure defined in a header file 
  10052.                         generated by sams during compilation (see the following 
  10053.                         examples), the contents of which are to be translated. 
  10054.  
  10055.           count         The number of elements contained in the table. 
  10056.  
  10057.           Output 
  10058.  
  10059.           status        Returns the status code from this operation. On 
  10060.                         successful completion, the routine returns 
  10061.                         msg_s_ok_text. Otherwise, it returns one of the 
  10062.                         following errors: 
  10063.  
  10064.                              msg_s_bad_id The message ID is not valid. A 
  10065.                                   message ID with a technology or component 
  10066.                                   that is not valid was specified. 
  10067.  
  10068.                              msg_s_no_cat_open Could not open the message 
  10069.                                   catalog for the specified message ID. 
  10070.  
  10071.                              msg_s_no_cat_perm Local file permissions prevented 
  10072.                                   the program from opening the message catalog 
  10073.                                   for the specified message ID. 
  10074.  
  10075.                              msg_s_no_catalog The message catalog for the 
  10076.                                   specified message ID does not exist. 
  10077.  
  10078.                              msg_s_no_default Could not find the default 
  10079.                                   message for the specified status code in the 
  10080.                                   internal tables. 
  10081.  
  10082.                              msg_s_no_memory Could not allocate memory for 
  10083.                                   message table, string copy, or other internal 
  10084.                                   requirement. 
  10085.  
  10086.                              msg_s_not_found Could not find the text for the 
  10087.                                   specified status code in either the in-core 
  10088.                                   message tables or the message catalogs. 
  10089.  
  10090.  Usage 
  10091.  
  10092.           The dce_msg_translate_table routine overwrites the specified 
  10093.           in-memory message table (that is, updates the in-memory table with 
  10094.           the contents of a message table that has changed for some reason; for 
  10095.           example, because of a change in locale). 
  10096.  
  10097.           If any in-memory message is not found in the message catalog, all 
  10098.           in-memory messages are left unchanged. 
  10099.  
  10100.  Examples 
  10101.  
  10102.           The following code fragment shows how dce_msg_translate_table can be 
  10103.           called (in an application whose serviceability component name is app) 
  10104.           to translate the DCE application's in-memory message table, set up by 
  10105.           an earlier call to dce_msg_define_msg_table: 
  10106.  
  10107.                     #include <dce\dce.h>
  10108.                     #include <dce\dce_msg.h>
  10109.                     #include <dce\dcesvcmsg.h>
  10110.                     #include "dceappmsg.h"
  10111.  
  10112.                     char  *loc_return;
  10113.                     error_status_t  status;
  10114.  
  10115.                                  <...>
  10116.  
  10117.                     dce_msg_translate_table(app_msg_table,
  10118.                                             sizeof(app_msg_table) / sizeof(app_msg_table[0]),
  10119.                                             &status);
  10120.  
  10121.  Related Information 
  10122.  
  10123.           Routines: 
  10124.           dce_msg_define_msg_table 
  10125.  
  10126.  
  10127. ΓòÉΓòÉΓòÉ 3.7.14. dce_pgm_printf, dce_pgm_fprintf, and dce_pgm_sprintf ΓòÉΓòÉΓòÉ
  10128.  
  10129.  Purpose 
  10130.  
  10131.           Generates formatted DCE message output. 
  10132.  
  10133.  Format 
  10134.  
  10135.                     #include <dce\dce.h>
  10136.  
  10137.                     int dce_pgm_printf(
  10138.                             unsigned32 messageid,
  10139.                             ...);
  10140.  
  10141.                     int dce_pgm_fprintf(
  10142.                             FILE *stream,
  10143.                             unsigned32 messageid,
  10144.                             ...);
  10145.  
  10146.                     unsigned char *dce_pgm_sprintf(
  10147.                             unsigned32 messageid,
  10148.                             ...);
  10149.  
  10150.  Parameters 
  10151.  
  10152.           Input 
  10153.           messageid     The message ID, defined in the message's code field in 
  10154.                         the sams file. 
  10155.           stream        An open file pointer. 
  10156.           ...           Any format arguments for the message string. 
  10157.  
  10158.  Usage 
  10159.  
  10160.           The dce_pgm_printf routine is equivalent to dce_printf, except that 
  10161.           it prefixes the program name to the message (in the standard style of 
  10162.           DCE error messages), and appends a newline character to the end of 
  10163.           the message. This allows clients that do not usually use the 
  10164.           serviceability interface to produce error (or other) messages that 
  10165.           automatically include the originating application's name.  Note that 
  10166.           the application should call dce_svc_set_progname first to set the 
  10167.           desired application name. Otherwise, the default program name is 
  10168.           PID#nnnn, where nnnn is the process ID of the application making the 
  10169.           call. 
  10170.  
  10171.           The dce_pgm_sprintf routine is similarly equivalent to dce_sprintf, 
  10172.           and the dce_pgm_fprintf routine is similarly equivalent to 
  10173.           dce_fprintf. 
  10174.  
  10175.  Notes 
  10176.  
  10177.           The dce_pgm_sprintf allocates storage that the user needs to free. 
  10178.           Use the dce_free routine to do this. See dce_printf, dce_fprintf, and 
  10179.           dce_sprintf for an example using dce_sprintf and dce_free. 
  10180.  
  10181.  Related Information 
  10182.  
  10183.           Routines: 
  10184.           dce_free 
  10185.           dce_printf, dce_fprintf, and dce_sprintf 
  10186.           dce_msg_get_msg 
  10187.           dce_svc_set_progname 
  10188.  
  10189.  
  10190. ΓòÉΓòÉΓòÉ 3.7.15. dce_printf, dce_fprintf, and dce_sprintf ΓòÉΓòÉΓòÉ
  10191.  
  10192.  Purpose 
  10193.  
  10194.           Generates formatted DCE message output. 
  10195.  
  10196.  Format 
  10197.  
  10198.                     #include <dce\dce.h>
  10199.  
  10200.                     int dce_printf(
  10201.                            unsigned32 messageid,
  10202.                             ...);
  10203.  
  10204.                     int dce_fprintf(
  10205.                            FILE *stream,
  10206.                            unsigned32 messageid,
  10207.                             ...);
  10208.  
  10209.                     unsigned char *dce_sprintf(
  10210.                            unsigned32 messageid,
  10211.                             ...);
  10212.  
  10213.  Parameters 
  10214.  
  10215.           Input 
  10216.           messageid     The message ID, defined in the message's code field in 
  10217.                         the sams file. 
  10218.           stream        An open file pointer. 
  10219.           ...           Any format arguments for the message string. 
  10220.  
  10221.  Usage 
  10222.  
  10223.           The dce_printf routine retrieves the message text associated with the 
  10224.           specified messageid and prints the message and its arguments on the 
  10225.           standard output. 
  10226.  
  10227.           The dce_fprintf routine functions similarly to dce_printf, except 
  10228.           that it prints the message and its arguments on the specified stream. 
  10229.  
  10230.           The dce_sprintf routine retrieves the message text associated with 
  10231.           the specified messageid and prints the message and its arguments into 
  10232.           an allocated string that is returned. 
  10233.  
  10234.           These routines determine the correct message catalog and, if 
  10235.           necessary, open it. If the message catalog is inaccessible and the 
  10236.           message exists in an in-memory table, this message is printed. If 
  10237.           neither the catalog nor the in-memory message is available, a default 
  10238.           message is printed. 
  10239.  
  10240.           The dce_pgm_printf routine is equivalent to dce_printf, except that 
  10241.           it prefixes the program name to the message (in the standard style of 
  10242.           DCE error messages) and appends a newline character to the end of the 
  10243.           message. 
  10244.  
  10245.  Notes 
  10246.  
  10247.           The dce_sprintf routine allocates memory for messageid that must be 
  10248.           freed by the caller using dce_free. 
  10249.  
  10250.           The final formatted string generated by dce_sprintf must not exceed 
  10251.           1024 bytes. 
  10252.  
  10253.  Examples 
  10254.  
  10255.           Assume that the following message is defined in the application's 
  10256.           sams file: 
  10257.  
  10258.                         start
  10259.                         code         arg_msg
  10260.                         text         "This message has exactly %d, not %d argument(s)"
  10261.                         action       "None required"
  10262.                         explanation  "Test message with format arguments"
  10263.                         end
  10264.  
  10265.           The following code fragment shows how dce_sprintf can be called to 
  10266.           write the message (with some argument values) into a string: 
  10267.  
  10268.                         unsigned char  *my_msg;
  10269.                         my_msg = dce_sprintf(arg_msg, 2, 8);
  10270.                         puts(my_msg);
  10271.                         dce_free(my_msg);
  10272.  
  10273.           Of course, dce_printf could also be called to print the message and 
  10274.           arguments: 
  10275.  
  10276.                         dce_printf(arg_msg, 2, 8);
  10277.  
  10278.  Related Information 
  10279.  
  10280.           Routines: 
  10281.           dce_free 
  10282.           dce_msg_get_msg 
  10283.           dce_pgm_printf, dce_pgm_fprintf, and dce_pgm_sprintf 
  10284.  
  10285.  
  10286. ΓòÉΓòÉΓòÉ 3.8. The DCE Server Routines ΓòÉΓòÉΓòÉ
  10287.  
  10288. The routines described on this reference page are used by servers to register 
  10289. themselves with DCE. This includes registering with the RPC runtime, the local 
  10290. endpoint mapper, and the namespace. Routines are also available to set up DCE 
  10291. security so that servers can receive and invoke authenticated RPCs. 
  10292.  
  10293. See the following subtopics for more information: 
  10294.  
  10295.       List of Server Routines 
  10296.       Server Data Types and Structures 
  10297.       Server Related Information 
  10298.  
  10299.  
  10300. ΓòÉΓòÉΓòÉ 3.8.1. List of Server Routines ΓòÉΓòÉΓòÉ
  10301.  
  10302. The server routines are listed in alphabetical order: 
  10303.  
  10304.  dce_server_disable_service    Unregisters an individual interface of a DCE 
  10305.                                server from the RPC runtime and marks the 
  10306.                                server's endpoints as disabled in the dced 
  10307.                                endpoint mapper service. 
  10308.  
  10309.  dce_server_enable_service     Registers an individual interface (application 
  10310.                                service) of a DCE server with the RPC runtime 
  10311.                                and marks the server's endpoints as enabled in 
  10312.                                the dced endpoint mapper service. 
  10313.  
  10314.  dce_server_inq_attr           Obtains application-specific attribute data from 
  10315.                                the dced server configuration data. 
  10316.  
  10317.  dce_server_inq_server         Obtains the server configuration data dced used 
  10318.                                to start the server. 
  10319.  
  10320.  dce_server_inq_uuids          Obtains the UUIDs that dced used in its srvrconf 
  10321.                                and srvrexec facilities to identify the server's 
  10322.                                configuration and execution data. 
  10323.  
  10324.  dce_server_register           Registers a DCE server by establishing a 
  10325.                                server's binding information, registering its 
  10326.                                services (represented by interface IDs) with the 
  10327.                                RPC runtime, and entering its endpoints in the 
  10328.                                dced endpoint mapper service. 
  10329.  
  10330.  dce_server_sec_begin          Prepares a server to receive and generate 
  10331.                                authenticated RPCs. 
  10332.  
  10333.  dce_server_sec_done           Releases the resources previously set up by a 
  10334.                                call to dce_server_sec_begin. 
  10335.  
  10336.  dce_server_unregister         Unregisters a DCE server by unregistering the 
  10337.                                server's services (interfaces) from the RPC 
  10338.                                runtime, and removing the endpoints from the 
  10339.                                dced endpoint mapper service. 
  10340.  
  10341.  dce_server_use_protseq        Registers a protocol sequence to use for the 
  10342.                                server. 
  10343.  
  10344.  
  10345. ΓòÉΓòÉΓòÉ 3.8.2. Server Data Types and Structures ΓòÉΓòÉΓòÉ
  10346.  
  10347.  dce_server_handle_t           An opaque data structure containing information 
  10348.                                the runtime uses to establish the server with 
  10349.                                DCE. 
  10350.  
  10351.  dce_server_register_data_t    A structure that contains an interface handle 
  10352.                                (generated by IDL), a default EPV, and a count 
  10353.                                and array of dce_server_type_ts for services 
  10354.                                that use RPC object types. 
  10355.  
  10356.  dce_server_type_t             A structure containing a manager type UUID and 
  10357.                                an RPC entry-point vector (EPV) that specifies 
  10358.                                the routines that implement the IDL interface 
  10359.                                for the specific type. 
  10360.  
  10361.  server_t                      See The DCE Host Daemon Routines for a complete 
  10362.                                description of the server_t data type. 
  10363.  
  10364.  
  10365. ΓòÉΓòÉΓòÉ 3.8.3. Server Related Information ΓòÉΓòÉΓòÉ
  10366.  
  10367. Files: 
  10368. dce\dced.h 
  10369. dce\dced_base.idl 
  10370.  
  10371. Books: 
  10372. DCE for OS/2 Warp: Application Development Guide - Core Components 
  10373.  
  10374.  
  10375. ΓòÉΓòÉΓòÉ 3.8.4. dce_server_disable_service ΓòÉΓòÉΓòÉ
  10376.  
  10377.  Purpose 
  10378.  
  10379.           Disables an individual service of a server. (This routine is not 
  10380.           currently supported.) 
  10381.  
  10382.  Format 
  10383.  
  10384.                     #include <dce\dced.h>
  10385.  
  10386.                     void dce_server_disable_service(
  10387.                             dce_server_handle_t server_handle,
  10388.                             rpc_if_handle_t  interface,
  10389.                             error_status_t  *status);
  10390.  
  10391.  Parameters 
  10392.  
  10393.           Input 
  10394.  
  10395.           server_handle An opaque handle returned by dce_server_register. 
  10396.  
  10397.           interface     Specifies an opaque variable containing information the 
  10398.                         runtime uses to access interface specification data. 
  10399.  
  10400.           Output 
  10401.  
  10402.           status        Returns the status code from this routine.  This status 
  10403.                         code indicates whether the routine completed 
  10404.                         successfully. The only status code is error_status_ok. 
  10405.  
  10406.  Usage 
  10407.  
  10408.           The dce_server_disable_service routine disables an individual service 
  10409.           that a server provides by unregistering the service's interface from 
  10410.           the RPC runtime and marking the server's endpoints as disabled in the 
  10411.           local dced endpoint mapper service. 
  10412.  
  10413.           For dced to recognize all server services, a server should register 
  10414.           all its application services using the dce_server_register routine. 
  10415.           If it later becomes necessary for the server to disable an interface, 
  10416.           it can use the dce_server_disable_service routine rather than 
  10417.           unregistering the entire server. 
  10418.  
  10419.  Related Information 
  10420.  
  10421.           Routines: 
  10422.           dce_server_enable_service 
  10423.           dce_server_register 
  10424.  
  10425.           Books: 
  10426.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10427.  
  10428.  
  10429. ΓòÉΓòÉΓòÉ 3.8.5. dce_server_enable_service ΓòÉΓòÉΓòÉ
  10430.  
  10431.  Purpose 
  10432.  
  10433.           Enables an individual service for a server. (This routine is not 
  10434.           currently supported.) 
  10435.  
  10436.  Format 
  10437.  
  10438.                     #include <dce\dced.h>
  10439.  
  10440.                     void dce_server_enable_service(
  10441.                             dce_server_handle_t  server_handle,
  10442.                             rpc_if_handle_t  interface,
  10443.                             error_status_t  *status);
  10444.  
  10445.  Parameters 
  10446.  
  10447.           Input 
  10448.  
  10449.           server_handle An opaque handle returned by dce_server_register. 
  10450.  
  10451.           interface     Specifies an opaque variable containing information the 
  10452.                         runtime uses to access interface specification data. 
  10453.  
  10454.           Output 
  10455.  
  10456.           status        Returns the status code from this routine.  This status 
  10457.                         code indicates whether the routine completed 
  10458.                         successfully. The only status code is error_status_ok. 
  10459.  
  10460.  Usage 
  10461.  
  10462.           The dce_server_enable_service routine enables an individual service 
  10463.           that a server provides by registering the service's interface with 
  10464.           the RPC runtime, and registering the endpoints in the endpoint map. 
  10465.           If the dce_server_c_no_endpoints flag was set with the 
  10466.           dce_server_register routine prior to calling this routine, the 
  10467.           endpoints are not registered in the endpoint map. 
  10468.  
  10469.           A server commonly registers all its services with DCE at once by 
  10470.           using the dce_server_register routine. If necessary, a server can use 
  10471.           the dce_server_disable_service routine to disable individual services 
  10472.           and then reenable them by using dce_server_enable_service.  However, 
  10473.           a server may need its services registered in a certain order, or it 
  10474.           may require application-specific activities between the registration 
  10475.           of services.  If a server requires this kind of control as services 
  10476.           are registered, you can set the server->services.list[i].flags field 
  10477.           of the server_t structure to service_c_disabled for individual 
  10478.           services prior to calling dce_server_register. The server can then 
  10479.           call dce_server_enable_service for each service when needed. 
  10480.  
  10481.  Related Information 
  10482.  
  10483.           Routines: 
  10484.           dce_server_disable_service 
  10485.           dce_server_register 
  10486.  
  10487.           Books: 
  10488.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10489.  
  10490.  
  10491. ΓòÉΓòÉΓòÉ 3.8.6. dce_server_inq_attr ΓòÉΓòÉΓòÉ
  10492.  
  10493.  Purpose 
  10494.  
  10495.           Obtains from dced the value of an attribute known to the server. 
  10496.           (This routine is not currently supported.) 
  10497.  
  10498.  Format 
  10499.  
  10500.                     #include <dce\dced.h>
  10501.  
  10502.                     void dce_server_inq_attr(
  10503.                             uuid_t  *attribute_uuid,
  10504.                             sec_attr_t *value,
  10505.                             error_status_t *status);
  10506.  
  10507.  Parameters 
  10508.  
  10509.           Input 
  10510.  
  10511.           attribute_uuid      The UUID dced uses to identify an attribute. 
  10512.  
  10513.           Output 
  10514.  
  10515.           value               Returns the attribute. 
  10516.  
  10517.           status              Returns the error_status_ok status code upon 
  10518.                               successful completion. Otherwise, one of the 
  10519.                               following is returned: 
  10520.  
  10521.                                    dced_s_server_attr_not_found 
  10522.                                    dced_s_not_started_by_dced 
  10523.  
  10524.  Usage 
  10525.  
  10526.           The dce_server_inq_attr routine obtains an attribute from the 
  10527.           environment created by dced when it started the server. Each server 
  10528.           maintains, among other things, a list of attributes that are used to 
  10529.           describe application-specific behavior. 
  10530.  
  10531.  Related Information 
  10532.  
  10533.           Routines: 
  10534.           dce_server_inq_server 
  10535.           dce_server_inq_uuids 
  10536.  
  10537.           Books: 
  10538.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10539.  
  10540.  
  10541. ΓòÉΓòÉΓòÉ 3.8.7. dce_server_inq_server ΓòÉΓòÉΓòÉ
  10542.  
  10543.  Purpose 
  10544.  
  10545.           Obtains the server configuration data dced used to start the server. 
  10546.           (This routine is not currently supported.) 
  10547.  
  10548.  Format 
  10549.  
  10550.                     #include <dce\dced.h>
  10551.  
  10552.                     void dce_server_inq_server(
  10553.                             server_t  **server,
  10554.                             error_status_t  *status);
  10555.  
  10556.  Parameters 
  10557.  
  10558.           Output 
  10559.  
  10560.           server        Returns the structure that describes the server's 
  10561.                         configuration. 
  10562.  
  10563.           status        Returns the error_status_ok status code upon successful 
  10564.                         completion. Otherwise, one of the following is 
  10565.                         returned: 
  10566.  
  10567.                              dced_s_not_started_by_dced 
  10568.                              dced_s_data_unavailable 
  10569.  
  10570.  Usage 
  10571.  
  10572.           The dce_server_inq_server routine obtains the server configuration 
  10573.           data (srvrconf) maintained by dced and used by dced to start the 
  10574.           server. This routine is commonly called prior to registering the 
  10575.           server to obtain the server data used as input to 
  10576.           dce_server_register. 
  10577.  
  10578.  Related Information 
  10579.  
  10580.           Routines: 
  10581.           dce_server_register 
  10582.  
  10583.           Books: 
  10584.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10585.  
  10586.  
  10587. ΓòÉΓòÉΓòÉ 3.8.8. dce_server_inq_uuids ΓòÉΓòÉΓòÉ
  10588.  
  10589.  Purpose 
  10590.  
  10591.           Obtains the UUIDs that dced associates with the server's 
  10592.           configuration and execution data. (This routine is not currently 
  10593.           supported.) 
  10594.  
  10595.  Format 
  10596.  
  10597.                     #include <dce\dced.h>
  10598.  
  10599.                     void dce_server_inq_uuids(
  10600.                             uuid_t  *conf_uuid,
  10601.                             uuid_t  *exec_uuid,
  10602.                             error_status_t  *status);
  10603.  
  10604.  Parameters 
  10605.  
  10606.           Output 
  10607.  
  10608.           conf_uuid     Returns the UUID that dced uses to identify the 
  10609.                         server's configuration data. If a NULL value is input, 
  10610.                         no value is returned. 
  10611.  
  10612.           exec_uuid     Returns the UUID that dced uses to identify the 
  10613.                         executing server. If a NULL value is input, no value is 
  10614.                         returned. 
  10615.  
  10616.           status        Returns the error_status_ok status code upon successful 
  10617.                         completion. Otherwise, dced_s_not_started_by_dced is 
  10618.                         returned. 
  10619.  
  10620.  Usage 
  10621.  
  10622.           The dce_server_inq_uuids routine obtains the UUIDs that dced uses in 
  10623.           its srvrconf and srvrexec services to identify the server's 
  10624.           configuration and execution data.  The server can then use dced API 
  10625.           routines to access the data and perform other server management 
  10626.           functions. 
  10627.  
  10628.  Related Information 
  10629.  
  10630.           Routines: 
  10631.           dce_server_inq_server 
  10632.  
  10633.           Books: 
  10634.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10635.  
  10636.  
  10637. ΓòÉΓòÉΓòÉ 3.8.9. dce_server_register ΓòÉΓòÉΓòÉ
  10638.  
  10639.  Purpose 
  10640.  
  10641.           Registers a server with DCE. (This routine is not currently 
  10642.           supported.) 
  10643.  
  10644.  Format 
  10645.  
  10646.                     #include <dce\dced.h>
  10647.  
  10648.                     void dce_server_register(
  10649.                             unsigned32  flags,
  10650.                             server_t  *server,
  10651.                             dce_server_register_data_t  *data,
  10652.                             dce_server_handle_t  *server_handle,
  10653.                             error_status_t  *status);
  10654.  
  10655.  Parameters 
  10656.  
  10657.           Input 
  10658.  
  10659.           flags         Specifies options for server registration. Combinations 
  10660.                         of the following values can be used: 
  10661.  
  10662.                              dce_server_c_no_protseqs 
  10663.                              dce_server_c_no_endpoints 
  10664.                              dce_server_c_ns_export 
  10665.  
  10666.           server        Specifies the server data, commonly obtained from dced 
  10667.                         by calling dce_server_inq_server. The server_t 
  10668.                         structure is described in DCE Security Services API. 
  10669.  
  10670.           data          Specifies the array of data structures that contain the 
  10671.                         additional information required for the server to 
  10672.                         service requests for specific remote procedures. Each 
  10673.                         structure of the array includes: 
  10674.  
  10675.                           o  An interface handle (ifhandle) of type 
  10676.                              rpc_if_handle_t 
  10677.  
  10678.                           o  An entry point vector (epv) of type rpc_mgr_epv_t 
  10679.  
  10680.                           o  A number (num_types) of type unsigned32 
  10681.                              representing the number in the following array 
  10682.  
  10683.                           o  An array of server types (types) of type 
  10684.                              dce_server_type_t 
  10685.  
  10686.                         The dce_server_type_t structure contains a UUID (type) 
  10687.                         of type uuid_t representing the object type, and a 
  10688.                         manager entry point vector (epv) of type rpc_mgr_epv_t 
  10689.                         representing the set of procedures implemented for the 
  10690.                         object type. 
  10691.  
  10692.           Output 
  10693.  
  10694.           server_handle Returns a server handle, which is a pointer to an 
  10695.                         opaque data structure containing information about the 
  10696.                         server. 
  10697.  
  10698.           status        Returns the error_status_ok status code upon successful 
  10699.                         completion. Otherwise, rpc_s_no_memory is returned. 
  10700.  
  10701.  Usage 
  10702.  
  10703.           By default, the dce_server_register routine registers a DCE server by 
  10704.           establishing a server's binding information for all valid protocol 
  10705.           sequences, registering all the server's services with the RPC 
  10706.           runtime, and entering the server's endpoints in the dced endpoint 
  10707.           mapper service. 
  10708.  
  10709.           Prior to calling the dce_server_register routine, the server obtains 
  10710.           the server configuration data from dced by calling 
  10711.           dce_server_inq_server. The server must also set up an array of 
  10712.           registration data, where the size of the array represents all the 
  10713.           server's services that are currently registered in the server 
  10714.           configuration data of dced (server->services.count).  If the memory 
  10715.           for the array is dynamically allocated, it must not be freed until 
  10716.           after the corresponding dce_server_unregister routine is called. 
  10717.  
  10718.           You can modify the behavior of dce_server_register, depending on the 
  10719.           values of the flags parameter.  If the flag has the value 
  10720.           dce_server_c_ns_export, the binding information is also exported to 
  10721.           the name space.  The name space entry is determined for each service 
  10722.           by the server->services.list[i].entryname parameter. If this 
  10723.           parameter has no value, the default value for the entire server is 
  10724.           used (server->entryname).  If the flag has the value 
  10725.           dce_server_c_no_endpoints, the binding information is not registered 
  10726.           with the endpoint map.  Your application can use rpc_ep_register to 
  10727.           register specific binding information. If the flag has the value 
  10728.           dce_server_c_no_protseqs, specific protocol sequences are used rather 
  10729.           than all valid protocol sequences. Use of this flag requires that the 
  10730.           server first call dce_server_use_protseq at least once for a valid 
  10731.           protocol sequence. 
  10732.  
  10733.  Related Information 
  10734.  
  10735.           Routines: 
  10736.           dce_server_inq_server 
  10737.           dce_server_sec_begin 
  10738.           dce_server_unregister 
  10739.           rpc_server_listen 
  10740.  
  10741.           Books: 
  10742.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10743.  
  10744.  
  10745. ΓòÉΓòÉΓòÉ 3.8.10. dce_server_sec_begin ΓòÉΓòÉΓòÉ
  10746.  
  10747.  Purpose 
  10748.  
  10749.           Establishes a server to receive fully authenticated remote procedure 
  10750.           calls (RPCs) and to also act as a client to do authenticated RPCs. 
  10751.           (This routine is not currently supported.) 
  10752.  
  10753.  Format 
  10754.  
  10755.                     #include <dce\dced.h>
  10756.  
  10757.                     void dce_server_sec_begin(
  10758.                             unsigned32  flags,
  10759.                             error_status_t  *status);
  10760.  
  10761.  Parameters 
  10762.  
  10763.           Input 
  10764.  
  10765.           flags         Flags are set to manage keys and set up a login 
  10766.                         context. Valid values include the following: 
  10767.  
  10768.                              dce_server_c_manage_key 
  10769.                              dce_server_c_login 
  10770.  
  10771.           Output 
  10772.  
  10773.           status        Returns the error_status_ok status code upon successful 
  10774.                         completion. Otherwise, one of the following errors is 
  10775.                         returned: 
  10776.  
  10777.                              dced_s_need_one_server_prin 
  10778.                              dced_s_not_started_by_dced 
  10779.                              dced_s_no_server_keyfile 
  10780.                              dced_s_cannot_create_key_mgmt_thr 
  10781.                              dced_s_cannot_detach_key_mgmt_thr 
  10782.  
  10783.  Usage 
  10784.  
  10785.           The dce_server_sec_begin routine prepares a server to receive 
  10786.           authenticated RPCs.  It also sets up all that is required for the 
  10787.           application, when behaving as a client to other servers, to do 
  10788.           authenticated RPCs as a client.  When authentication is required, 
  10789.           this call must precede all other RPC and DCE server initialization 
  10790.           calls, including dce_server_register.  When your application has 
  10791.           stopped listening for RPCs, it should call the dce_server_sec_done 
  10792.           routine. 
  10793.  
  10794.  Related Information 
  10795.  
  10796.           Routines: 
  10797.           dce_server_register 
  10798.           dce_server_sec_done 
  10799.           rpc_server_listen 
  10800.  
  10801.           Books: 
  10802.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10803.  
  10804.  
  10805. ΓòÉΓòÉΓòÉ 3.8.11. dce_server_sec_done ΓòÉΓòÉΓòÉ
  10806.  
  10807.  Purpose 
  10808.  
  10809.           Releases resources established for a server to receive (and when 
  10810.           acting as a client, to send) fully authenticated remote procedure 
  10811.           calls (RPCs). (This routine is not currently supported.) 
  10812.  
  10813.  Format 
  10814.  
  10815.                     #include <dce\dced.h>
  10816.  
  10817.                     void dce_server_sec_done(
  10818.                             error_status_t  *status);
  10819.  
  10820.  Parameters 
  10821.  
  10822.           Output 
  10823.  
  10824.           status        Returns the status code from this routine. This status 
  10825.                         code indicates whether the routine completed 
  10826.                         successfully. The only status code is error_status_ok. 
  10827.  
  10828.  Usage 
  10829.  
  10830.           The dce_server_sec_done routine releases the resources previously set 
  10831.           up by a call to dce_server_sec_begin. The dce_server_sec_begin 
  10832.           routine sets all that is needed for a server to receive authenticated 
  10833.           RPCs and it also sets up all that is required for the application to 
  10834.           do authenticated RPCs as a client. If this routine is used, it must 
  10835.           follow all other server DCE and RPC initialization and cleanup calls. 
  10836.  
  10837.  Related Information 
  10838.  
  10839.           Routines: 
  10840.           dce_server_sec_begin 
  10841.           rpc_server_listen 
  10842.  
  10843.           Books: 
  10844.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10845.  
  10846.  
  10847. ΓòÉΓòÉΓòÉ 3.8.12. dce_server_unregister ΓòÉΓòÉΓòÉ
  10848.  
  10849.  Purpose 
  10850.  
  10851.           Unregisters a DCE server. (This routine is not currently supported.) 
  10852.  
  10853.  Format 
  10854.  
  10855.                     #include <dce\dced.h>
  10856.  
  10857.                     void dce_server_unregister(
  10858.                             dce_server_handle_t  *server_handle,
  10859.                             error_status_t  *status);
  10860.  
  10861.  Parameters 
  10862.  
  10863.           Input 
  10864.  
  10865.           server_handle       An opaque handle returned by dce_server_register. 
  10866.  
  10867.           Output 
  10868.  
  10869.           status              Returns the status code from this routine. This 
  10870.                               status code indicates whether the routine 
  10871.                               completed successfully. The only status code is 
  10872.                               error_status_ok. 
  10873.  
  10874.  Usage 
  10875.  
  10876.           The dce_server_unregister routine unregisters a DCE server by 
  10877.           unregistering a server's services (interfaces) from the RPC runtime. 
  10878.           When a server has stopped listening for remote procedure calls, it 
  10879.           should call this routine. 
  10880.  
  10881.           The flags set with the corresponding dce_server_register routine are 
  10882.           part of the server handle's information used to determine the action 
  10883.           to take.  These actions include removing the server's endpoints from 
  10884.           the dced endpoint mapper service and unexporting binding information 
  10885.           from the name space. 
  10886.  
  10887.           Use the dce_server_disable_service routine to disable specific 
  10888.           application services rather than to unregister the whole server. 
  10889.  
  10890.  Related Information 
  10891.  
  10892.           Routines: 
  10893.           dce_server_disable_service 
  10894.           dce_server_register 
  10895.           rpc_server_listen 
  10896.  
  10897.           Books: 
  10898.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10899.  
  10900.  
  10901. ΓòÉΓòÉΓòÉ 3.8.13. dce_server_use_protseq ΓòÉΓòÉΓòÉ
  10902.  
  10903.  Purpose 
  10904.  
  10905.           Tells DCE to use the specified protocol sequence for receiving remote 
  10906.           procedure calls. This routine is used by server applications. (This 
  10907.           routine is not currently supported.) 
  10908.  
  10909.  Format 
  10910.  
  10911.                     #include <dce\dced.h>
  10912.  
  10913.                     void dce_server_use_protseq(
  10914.                             dce_server_handle_t  server_handle,
  10915.                             unsigned char  *protseq,
  10916.                             error_status_t  *status);
  10917.  
  10918.  Parameters 
  10919.  
  10920.           Input 
  10921.  
  10922.           server_handle       An opaque handle. Use the value of NULL. 
  10923.  
  10924.           protseq             Specifies a string identifier for the protocol 
  10925.                               sequence to register with the RPC runtime. (For a 
  10926.                               list of string identifiers, see the table of 
  10927.                               valid protocol sequences in The DCE Remote 
  10928.                               Procedure Call API.) 
  10929.  
  10930.           Output 
  10931.  
  10932.           status              Returns the status code from this routine.  This 
  10933.                               status code indicates whether the routine 
  10934.                               completed successfully. The only status code is 
  10935.                               error_status_ok. 
  10936.  
  10937.  Usage 
  10938.  
  10939.           The dce_server_use_protseq routine registers an individual protocol 
  10940.           sequence with DCE. Typical servers use all valid protocol sequences, 
  10941.           which is the default behavior for the dce_server_register routine, 
  10942.           which means that most servers do not need to call the 
  10943.           dce_server_use_protseq routine. However, this routine can be called 
  10944.           prior to dce_server_register, to restrict the protocol sequences 
  10945.           used. A server must register at least one protocol sequence with the 
  10946.           RPC runtime to receive remote procedure call requests.  A server can 
  10947.           call this routine multiple times to register additional protocol 
  10948.           sequences. 
  10949.  
  10950.  Related Information 
  10951.  
  10952.           Routines: 
  10953.           The DCE Remote Procedure Call API 
  10954.           dce_server_register 
  10955.           rpc_server_use_protseq 
  10956.  
  10957.           Books: 
  10958.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  10959.  
  10960.  
  10961. ΓòÉΓòÉΓòÉ 3.9. The DCE Serviceability Interface ΓòÉΓòÉΓòÉ
  10962.  
  10963. The following routines are intended to be used by servers that export the 
  10964. serviceability interface defined in service.idl.  The complete list of these 
  10965. remote serviceability implementation routines is as follows (the remote 
  10966. operation name is given in the left column and the corresponding implementation 
  10967. routine is given in the right column). 
  10968.  
  10969.  dce_svc_set_route                  dce_svc_routing 
  10970.  dce_svc_set_dbg_route              dce_svc_debug_routing 
  10971.  dce_svc_set_dbg_levels             dce_svc_debug_set_levels 
  10972.  dce_svc_inq_components             dce_svc_components 
  10973.  dce_svc_inq_table                  dce_svc_table 
  10974.  dce_svc_filter_control             dce_svc_filter 
  10975.  dce_svc_inq_stats                  dce_svc_inq_stats 
  10976.  
  10977.  These routines perform all the necessary processing (except for checking 
  10978.  client authorization) that must be done by the application manager to 
  10979.  implement the remote serviceability operations. 
  10980.  
  10981.  Note:  Most of these routines have little meaning except as implementations of 
  10982.         remote operations. However, the dce_svc_routing, dce_svc_filter, 
  10983.         dce_svc_debug_routing and dce_svc_debug_set_levels routines can 
  10984.         conceivably be used by servers as purely local operations (for example, 
  10985.         in order to allow routing and debug levels to be set by means of 
  10986.         command line flags when the server is called). 
  10987.  
  10988.  The dce_svc_log_ routines provide read access to BINFILE format logs that are 
  10989.  created and written by the DCE serviceability routines; see the svcroute 
  10990.  serviceability file for further information. The dce_svc_log_handle_t typedef 
  10991.  is an opaque pointer to a handle for an opened log file. 
  10992.  
  10993.  Applications that use the serviceability interface can install a routine that 
  10994.  is effectively hooked into the operation of the interface. If a filter is 
  10995.  installed, it is called whenever one of the serviceability output routines 
  10996.  (dce_svc_printf) is about to output a message. When this happens, the filter 
  10997.  receives a group of parameters that describe the message that is about to be 
  10998.  output and the circumstances that provoked the action. The filter can then 
  10999.  allow the message output to proceed or suppress the message. 
  11000.  
  11001.  Along with the filter routine itself, the application also installs a filter 
  11002.  control routine, which permits the behavior of the filter to be altered 
  11003.  dynamically while the application is running. The dce_svc_filter routine is 
  11004.  the interface call-in to such an installed filter control. 
  11005.  
  11006.  There is also a set of macros that you can use in debugging production code. 
  11007.  See The DCE Serviceability Macros for more information. 
  11008.  
  11009.  See the following subtopics for more information: 
  11010.  
  11011.       The DCE Serviceability Routines 
  11012.       Serviceability Data Types and Structures 
  11013.       Serviceability Related Information 
  11014.  
  11015.  
  11016. ΓòÉΓòÉΓòÉ 3.9.1. The DCE Serviceability Routines ΓòÉΓòÉΓòÉ
  11017.  
  11018. The serviceability routines listed in alphabetical order: 
  11019.  
  11020.  dce_setlocale                 Explicitly sets the DCE locale. 
  11021.  
  11022.  dce_svc_components            Returns an array containing the names of all 
  11023.                                components in the program that have been 
  11024.                                registered with the dce_svc_register routine. 
  11025.  
  11026.  dce_svc_debug_routing         Specifies both the level of an application's 
  11027.                                serviceability debug messaging and where the 
  11028.                                messages are routed. 
  11029.  
  11030.  dce_svc_debug_set_levels      Sets serviceability debugging message levels for 
  11031.                                a component. 
  11032.  
  11033.  dce_svc_define_filter         Lets applications define serviceability 
  11034.                                filtering routines. 
  11035.  
  11036.  dce_svc_filter                Controls the behavior of the serviceability 
  11037.                                message filtering routine, if one exists. 
  11038.  
  11039.  dce_svc_log_close             Closes an open binary format serviceability log 
  11040.                                and releases all internal states associated with 
  11041.                                the handle. 
  11042.  
  11043.  dce_svc_log_get               Reads the next entry from a binary format 
  11044.                                serviceability log. 
  11045.  
  11046.  dce_svc_log_open              Opens the specified file for reading. 
  11047.  
  11048.  dce_svc_log_rewind            Rewinds the current reading position of the 
  11049.                                specified (by handle) log file to the first 
  11050.                                record. 
  11051.  
  11052.  dce_svc_printf                Provides the normal routine for writing or 
  11053.                                displaying serviceability messages. 
  11054.  
  11055.  dce_svc_register              Registers a serviceability handle and 
  11056.                                subcomponent table. 
  11057.  
  11058.  dce_svc_routing               Specifies how normal (nondebug) serviceability 
  11059.                                messages are routed. 
  11060.  
  11061.  dce_svc_set_progname          If not called, the application's generated 
  11062.                                serviceability messages are identified by its 
  11063.                                process ID. 
  11064.  
  11065.  dce_svc_table                 Returns the serviceability subcomponent table 
  11066.                                registered with the specified component. 
  11067.  
  11068.  dce_svc_unregister            Destroys a serviceability handle and releases 
  11069.                                all allocated resources associated with the 
  11070.                                handle. 
  11071.  
  11072.  
  11073. ΓòÉΓòÉΓòÉ 3.9.2. Serviceability Data Types and Structures ΓòÉΓòÉΓòÉ
  11074.  
  11075.  dce_svc_filter_proc_t         The prototype of a serviceability filtering 
  11076.                                routine. 
  11077.  
  11078.  dce_svc_filterctl_proc_t      The prototype of a serviceability filter-control 
  11079.                                routine. 
  11080.  
  11081.  dce_svc_handle_t              An opaque handle to generate serviceability 
  11082.                                messages. (Use dce_svc_register or 
  11083.                                DCE_DEFINE_SVC_HANDLE to obtain one.) 
  11084.  
  11085.  dce_svc_log_handle_t          An opaque handle to an open serviceability 
  11086.                                binary format log file. (Use dce_svc_log_open to 
  11087.                                obtain one.) 
  11088.  
  11089.  dce_svc_log_prolog_t          A structure containing data about a 
  11090.                                serviceability binary format log entry. 
  11091.  
  11092.  dce_svc_prolog_t              A structure containing the initial message 
  11093.                                parameters passed to the filtering routine. 
  11094.  
  11095.  
  11096. ΓòÉΓòÉΓòÉ 3.9.3. Serviceability Related Information ΓòÉΓòÉΓòÉ
  11097.  
  11098. Files: 
  11099. dce\service.idl 
  11100. dce\dce_svc.h 
  11101.  
  11102. Books: 
  11103. DCE for OS/2 Warp: Application Development Guide - Core Components 
  11104.  
  11105.  
  11106. ΓòÉΓòÉΓòÉ 3.9.4. dce_setlocale ΓòÉΓòÉΓòÉ
  11107.  
  11108.  Purpose 
  11109.  
  11110.           Explicitly sets the DCE locale. 
  11111.  
  11112.  Format 
  11113.  
  11114.                     #include <dce\dce_msg.h>
  11115.  
  11116.                     char *dce_setlocale(DCE_LC_ALL,
  11117.                             const char  *locale);
  11118.  
  11119.  Parameters 
  11120.  
  11121.           Input 
  11122.  
  11123.           DCE_LC_ALL    Set all locale categories. 
  11124.  
  11125.           locale        Locale name expressed as a quoted string. See the DCE 
  11126.                         for OS/2 Warp: Application Development Guide - Core 
  11127.                         Components for information on valid locales. 
  11128.  
  11129.  Usage 
  11130.  
  11131.           The dce_setlocale routine: 
  11132.  
  11133.             o  Is a wrapper function. The dce_setlocale routine calls the 
  11134.                runtime version of the setlocale routine, which is used by the 
  11135.                DCE code. 
  11136.  
  11137.             o  Supports a subset of the standard setlocale routine. 
  11138.  
  11139.             o  Supports the setting of all locale categories to a single locale 
  11140.                (but does not support the setting of individual locale 
  11141.                categories). 
  11142.  
  11143.             o  Returns a pointer to a string that lists the values of the 
  11144.                locale categories. These values match the locale parameter of 
  11145.                the call. 
  11146.  
  11147.  Return Values 
  11148.  
  11149.           On error dce_setlocale returns NULL, and the locale is not changed. 
  11150.  
  11151.  Notes 
  11152.  
  11153.           DCE programs that do not use the locale model do not need to call 
  11154.           dce_setlocale because DCE will initialize a locale that matches the 
  11155.           OS/2 country and code page environment. DCE programs that call 
  11156.           setlocale, however, should also call dce_setlocale to ensure that 
  11157.           DCE's locale matches the locale of the program. 
  11158.  
  11159.           Because dce_setlocale is only used on OS/2, you should make sure that 
  11160.           any calls to dce_setlocale are within the bounds of an #ifdef for 
  11161.           portability. 
  11162.  
  11163.  Example 
  11164.  
  11165.           The following code fragment shows how the dce_setlocale routine is 
  11166.           used. 
  11167.  
  11168.                     #include <dce_msg.h>
  11169.  
  11170.                     char *string;
  11171.  
  11172.                     void main(void)
  11173.                     {
  11174.  
  11175.                        /*  Set the DCE locale to jajp932.  Note that unless the
  11176.                        **  DCE Japanese message files are present, DCE messages
  11177.                        **  will be displayed or logged in English.
  11178.                        */
  11179.  
  11180.                        #ifdef OS2
  11181.                            string = dce_setlocale(DCE_LC_ALL, "jajp932");
  11182.                            if (string != NULL)
  11183.                            {
  11184.                                printf(" %s \n",string);
  11185.                            }
  11186.                        #endif
  11187.  
  11188.                     }
  11189.  
  11190.           The output is: 
  11191.  
  11192.                     JAJP932 JAJP932 JAJP932 JAJP932 JAJP932 JAJP932
  11193.  
  11194.  Related Information 
  11195.  
  11196.           Books: 
  11197.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  11198.  
  11199.  
  11200. ΓòÉΓòÉΓòÉ 3.9.5. dce_svc_components ΓòÉΓòÉΓòÉ
  11201.  
  11202.  Purpose 
  11203.  
  11204.           Returns registered component names. 
  11205.  
  11206.  Format 
  11207.  
  11208.                     #include <dce\dce.h>
  11209.                     #include <dce\svcremote.h>
  11210.  
  11211.                     void dce_svc_components(
  11212.                             dce_svc_stringarray_t  *table,
  11213.                             error_status_t  *status);
  11214.  
  11215.  Parameters 
  11216.  
  11217.           Output 
  11218.  
  11219.           table         An array containing the names of all components that 
  11220.                         have been registered with the dce_svc_register routine. 
  11221.  
  11222.           status        Returns the status code from this operation. The 
  11223.                         following status codes are defined for serviceability: 
  11224.  
  11225.                              svc_s_assertion_failed A programmer-developed 
  11226.                                   compile-time assertion failed. 
  11227.  
  11228.                              svc_s_at_end No more data is available. 
  11229.  
  11230.                              svc_s_bad_routespec See svcroute for information 
  11231.                                   on routing specification format. 
  11232.  
  11233.                              svc_s_cantopen Permission is denied or the file 
  11234.                                   does not exist; consult errno. 
  11235.  
  11236.                              svc_s_no_filter Attempted to send data to the 
  11237.                                   filter-control handle for a component that 
  11238.                                   does not have a filter registered. 
  11239.  
  11240.                              svc_s_no_memory Could not allocate memory for 
  11241.                                   message table, string copy, or other internal 
  11242.                                   requirement. 
  11243.  
  11244.                              svc_s_no_stats The definition of the return value 
  11245.                                   has not been specified. 
  11246.  
  11247.                              svc_s_ok Operation performed. 
  11248.  
  11249.                              svc_s_unknown_component Could not find the service 
  11250.                                   handle for a component. 
  11251.  
  11252.  Usage 
  11253.  
  11254.           The dce_svc_components routine returns an array containing the names 
  11255.           of all components in the program that have been registered with the 
  11256.           dce_svc_register routine. 
  11257.  
  11258.  Examples 
  11259.  
  11260.           The following code fragment shows how the dce_svc_components routine 
  11261.           should be used in the DCE application's implementation of the 
  11262.           serviceability remote interface. The following routine is the 
  11263.           implementation of the app_svc_inq_components operation defined in the 
  11264.           application's serviceability &per.epv file. Clients call this routine 
  11265.           remotely, and the routine, when called, first checks the caller's 
  11266.           authorization and then (if the client is authorized to perform the 
  11267.           operation) calls the dce_svc_components routine to perform the actual 
  11268.           operation. 
  11269.  
  11270.                     /*****
  11271.                     *
  11272.                     * app_svc_inq_components -- remote request for list of all components registered
  11273.                     *                           by dce_svc_register().
  11274.                     *
  11275.                     *****/
  11276.                     static void app_svc_inq_components(
  11277.                                     handle_t  h,
  11278.                                     dce_svc_stringarray_t  *table,
  11279.                                     error_status_t  *st)
  11280.                     {
  11281.                          int ret;
  11282.  
  11283.                         /* Check the client's permissions here; if they are insufficient,  */
  11284.                         /*  deny the request. Otherwise, proceed with the operation...     */
  11285.  
  11286.                          dce_svc_components(table, st);
  11287.                     }
  11288.  
  11289.  Related Information 
  11290.  
  11291.           Files: 
  11292.           var\svc\routing 
  11293.           dce\service.idl 
  11294.  
  11295.  
  11296. ΓòÉΓòÉΓòÉ 3.9.6. dce_svc_debug_routing ΓòÉΓòÉΓòÉ
  11297.  
  11298.  Purpose 
  11299.  
  11300.           Specifies how debugging messages are routed. 
  11301.  
  11302.  Format 
  11303.  
  11304.                     #include <dce\dce.h>
  11305.                     #include <dce\svcremote.h>
  11306.  
  11307.                     void dce_svc_debug_routing(
  11308.                             unsigned char  *where,
  11309.                             error_status_t  *status);
  11310.  
  11311.  Parameters 
  11312.  
  11313.           Input 
  11314.  
  11315.           where         A four-field routing string; the format is described in 
  11316.                         svcroute. 
  11317.  
  11318.           Output 
  11319.  
  11320.           status        Returns the status code from this operation. The 
  11321.                         following status codes are defined for serviceability: 
  11322.  
  11323.                              svc_s_assertion_failed A programmer-developed 
  11324.                                   compile-time assertion failed. 
  11325.  
  11326.                              svc_s_at_end No more data is available. 
  11327.  
  11328.                              svc_s_bad_routespec See svcroute for information 
  11329.                                   on routing specification format. 
  11330.  
  11331.                              svc_s_cantopen Permission is denied or the file 
  11332.                                   does not exist; consult errno. 
  11333.  
  11334.                              svc_s_no_filter Attempted to send data to the 
  11335.                                   filter-control handle for a component that 
  11336.                                   does not have a filter registered. 
  11337.  
  11338.                              svc_s_no_memory Could not allocate memory for 
  11339.                                   message table, string copy, or other internal 
  11340.                                   requirement. 
  11341.  
  11342.                              svc_s_no_stats The definition of the return value 
  11343.                                   has not been specified. 
  11344.  
  11345.                              svc_s_ok Operation performed. 
  11346.  
  11347.                              svc_s_unknown_component Could not find the service 
  11348.                                   handle for a component. 
  11349.  
  11350.  Usage 
  11351.  
  11352.           The dce_svc_debug_routing routine specifies both the level of the 
  11353.           application's serviceability debug messaging, and where the messages 
  11354.           are routed. The where parameter is a four-field routing string, as 
  11355.           described in svcroute. All four fields are required. 
  11356.  
  11357.           The routine is used to specify the disposition of serviceability 
  11358.           debug messages. If called before the component is registered (with 
  11359.           dce_svc_register), the disposition is stored until it is needed. In 
  11360.           case of error, the status parameter is filled in with an error code. 
  11361.  
  11362.           To set only the debugging level for a component, use the 
  11363.           dce_svc_debug_set_levels routine. 
  11364.  
  11365.  Related Information 
  11366.  
  11367.           Routines: 
  11368.           dce_svc_debug_set_levels 
  11369.  
  11370.           Files: 
  11371.           var\svc\routing 
  11372.  
  11373.  
  11374. ΓòÉΓòÉΓòÉ 3.9.7. dce_svc_debug_set_levels ΓòÉΓòÉΓòÉ
  11375.  
  11376.  Purpose 
  11377.  
  11378.           Sets the debugging level for a component. 
  11379.  
  11380.  Format 
  11381.  
  11382.                     #include <dce\dce.h>
  11383.                     #include <dce\svcremote.h>
  11384.  
  11385.                     void dce_svc_debug_set_levels(
  11386.                             unsigned char  *where,
  11387.                             error_status_t  *status);
  11388.  
  11389.  Parameters 
  11390.  
  11391.           Input 
  11392.  
  11393.           where         A multifield string consisting of the component name 
  11394.                         separated by a colon from a comma-separated list of 
  11395.                         subcomponent/level pairs, as described in svcroute. 
  11396.  
  11397.           Output 
  11398.  
  11399.           status        Returns the status code from this operation. The 
  11400.                         following status codes are defined for serviceability: 
  11401.  
  11402.                              svc_s_assertion_failed A programmer-developed 
  11403.                                   compile-time assertion failed. 
  11404.  
  11405.                              svc_s_at_end No more data is available. 
  11406.  
  11407.                              svc_s_bad_routespec See svcroute for information 
  11408.                                   on routing specification format. 
  11409.  
  11410.                              svc_s_cantopen Permission is denied or the file 
  11411.                                   does not exist; consult errno. 
  11412.  
  11413.                              svc_s_no_filter Attempted to send data to the 
  11414.                                   filter-control handle for a component that 
  11415.                                   does not have a filter registered. 
  11416.  
  11417.                              svc_s_no_memory Could not allocate memory for 
  11418.                                   message table, string copy, or other internal 
  11419.                                   requirement. 
  11420.  
  11421.                              svc_s_no_stats The definition of the return value 
  11422.                                   has not been specified. 
  11423.  
  11424.                              svc_s_ok Operation performed. 
  11425.  
  11426.                              svc_s_unknown_component Could not find the service 
  11427.                                   handle for a component. 
  11428.  
  11429.  Usage 
  11430.  
  11431.           The dce_svc_debug_set_levels routine sets serviceability debugging 
  11432.           message levels for a component.  The where parameter is a multifield 
  11433.           string consisting of the component name separated by a colon from a 
  11434.           comma-separated list of subcomponent/level pairs, as described in 
  11435.           svcroute. The subcomponents are specified by codes defined in the 
  11436.           component's sams file; the levels are specified by single digits (1 
  11437.           through 9). 
  11438.  
  11439.           If the routine is called before the component is registered (with 
  11440.           dce_svc_register), the disposition is stored until it is needed.  In 
  11441.           case of error, the status parameter is filled in with an error code. 
  11442.  
  11443.           To set both the debug level and routing for a component, use the 
  11444.           dce_svc_debug_routing routine. 
  11445.  
  11446.  Related Information 
  11447.  
  11448.           Routines: 
  11449.           dce_svc_debug_routing 
  11450.  
  11451.           Files: 
  11452.           var\svc\routing 
  11453.  
  11454.  
  11455. ΓòÉΓòÉΓòÉ 3.9.8. dce_svc_define_filter ΓòÉΓòÉΓòÉ
  11456.  
  11457.  Purpose 
  11458.  
  11459.           Defines DCE serviceability filtering routines. 
  11460.  
  11461.  Format 
  11462.  
  11463.                     #include <stdarg.h>
  11464.                     #include <dce\dce.h>
  11465.                     #include <pthread.h>
  11466.                     #include <dce\svcfilter.h>
  11467.  
  11468.                     void dce_svc_define_filter(
  11469.                             dce_svc_handle_t  handle,
  11470.                             dce_svc_filter_proc_t  filter_function,
  11471.                             dce_svc_filterctl_proc_t  filter_ctl_function,
  11472.                             error_status_t  *status);
  11473.  
  11474.  Parameters 
  11475.  
  11476.           Input 
  11477.           handle        The handle (returned by dce_svc_log_open) of the log 
  11478.                         file to be read. 
  11479.           filter_function The filter routine to be installed in the 
  11480.                         serviceability mechanism. 
  11481.           filter_ctl_function A routine that can be called remotely to alter 
  11482.                         the operation of the filtering routine. 
  11483.  
  11484.           Output 
  11485.  
  11486.           status        Returns the status code from this operation. The 
  11487.                         following status codes are defined for serviceability: 
  11488.  
  11489.                              svc_s_assertion_failed A programmer-developed 
  11490.                                   compile-time assertion failed. 
  11491.  
  11492.                              svc_s_at_end No more data is available. 
  11493.  
  11494.                              svc_s_bad_routespec See svcroute for information 
  11495.                                   on routing specification format. 
  11496.  
  11497.                              svc_s_cantopen Permission is denied or the file 
  11498.                                   does not exist; consult errno. 
  11499.  
  11500.                              svc_s_no_filter Attempted to send data to the 
  11501.                                   filter-control handle for a component that 
  11502.                                   does not have a filter registered. 
  11503.  
  11504.                              svc_s_no_memory Could not allocate memory for 
  11505.                                   message table, string copy, or other internal 
  11506.                                   requirement. 
  11507.  
  11508.                              svc_s_no_stats The definition of the return value 
  11509.                                   has not been specified. 
  11510.  
  11511.                              svc_s_ok Operation performed. 
  11512.  
  11513.                              svc_s_unknown_component Could not find the service 
  11514.                                   handle for a component. 
  11515.  
  11516.  Usage 
  11517.  
  11518.           The serviceability interface provides a hook into the message-output 
  11519.           mechanism that allows applications to decide at the time of messaging 
  11520.           whether the given message should be output.  The application defines 
  11521.           its own routine to perform whatever checking is desired, and installs 
  11522.           the routine (the filter_function parameter) with a call to 
  11523.           dce_svc_define_filter. 
  11524.  
  11525.           The filter routine to be installed must have the signature defined by 
  11526.           the dce_svc_filter_proc_t typedef. After it is installed, the routine 
  11527.           is automatically called every time a serviceability routine is called 
  11528.           to output a message.  The filter receives a prolog argument that 
  11529.           contains all the pertinent information about the message. If the 
  11530.           filter returns TRUE, the message is output using the original 
  11531.           serviceability call. If the filter returns FALSE, the message is not 
  11532.           output. The information in the prolog allows these decisions to be 
  11533.           made on the basis of severity level, subcomponent, message index, and 
  11534.           so on. For details, see the header file dce\svcfilter.h. 
  11535.  
  11536.           In addition, an application that installs a message-filtering routine 
  11537.           must also define a routine that can be called remotely to alter the 
  11538.           operation of the filter routine.  This procedure must have the 
  11539.           signature defined by the dce_svc_filterctl_proc_t typedef. The 
  11540.           routine is called with an opaque byte array parameter (and its 
  11541.           length), which it is free to interpret in an appropriate manner. The 
  11542.           remote-control routine is installed by the same call to 
  11543.           dce_svc_define_filter (as the filter_ctl_function parameter) in which 
  11544.           the filter itself is installed. See dce_svc_filter. 
  11545.  
  11546.  Examples 
  11547.  
  11548.           The following code fragment consists of example versions of an 
  11549.           application's routines to:  filter serviceability messages; alter the 
  11550.           behavior of the filter routine; install the two routines. 
  11551.  
  11552.                     /*****
  11553.                     * Filter routine-- this is the routine that is hooked into the serviceability
  11554.                     *                  mechanism when you install it by calling dce_svc_define_filter.
  11555.                     *****/
  11556.                     boolean app_filter(prolog, args)
  11557.                     dce_svc_prolog_t prolog;
  11558.                     va_list args;
  11559.                     {
  11560.                         if (filter_setting) {
  11561.                             printf("The value of filter_setting is TRUE\n");
  11562.                             printf("The progname is %s\n", prolog->progname);
  11563.                             if (prolog->attributes & svc_c_sev_notice)
  11564.                                 printf("This is a Notice-type message\n");
  11565.  
  11566.                             switch (prolog->table_index) {
  11567.                                 case app_s_server:
  11568.                                     printf("Server sub-component\n");
  11569.                                     break;
  11570.                                 case app_s_refmon:
  11571.                                     printf("Refmon sub-component\n");
  11572.                                     break;
  11573.                                 case app_s_manager:
  11574.                                     printf("Manager sub-component\n");
  11575.                                     break;
  11576.                             }
  11577.                         }
  11578.                         return 1;
  11579.                     }
  11580.  
  11581.                     /*****
  11582.                     * Filter Control routine-- this is the entry point for the remote-control
  11583.                     *                          call to modify the filter routine's behavior.
  11584.                     *****/
  11585.                     void app_filter_control(arg_size, arg, status)
  11586.                     idl_long_int  arg_size;
  11587.                     idl_byte  *arg;
  11588.                     error_status_t  *status;
  11589.                     {
  11590.                         if (strncmp(arg, "Toggle", arg_size) != 0)
  11591.                              return;
  11592.                         else {
  11593.                              filter_setting = (filter_setting == FALSE) ? TRUE : FALSE;
  11594.                              if (filter_setting)
  11595.                                  printf("     FILTER IS TURNED ON\n");
  11596.                              else
  11597.                                  printf("     FILTER IS TURNED OFF\n");
  11598.                         }
  11599.                         return;
  11600.                     }
  11601.  
  11602.                     /*****
  11603.                     * install_filters-- calls dce_svc_define_filter to install the 2 previous routines.
  11604.                     *****/
  11605.                     void install_filters()
  11606.                     {
  11607.                      unsigned32  status;
  11608.                      filter_setting = TRUE;
  11609.                     dce_svc_define_filter(app_svc_handle,
  11610.                             (dce_svc_filter_proc_t)app_filter,
  11611.                             (dce_svc_filterctl_proc_t)app_filter_control, &status);
  11612.                     }
  11613.  
  11614.  Related Information 
  11615.  
  11616.           Routines: 
  11617.           dce_svc_register 
  11618.  
  11619.           Macros: 
  11620.           DCE_SVC_DEFINE_HANDLE 
  11621.  
  11622.  
  11623. ΓòÉΓòÉΓòÉ 3.9.9. dce_svc_filter ΓòÉΓòÉΓòÉ
  11624.  
  11625.  Purpose 
  11626.  
  11627.           Controls the behavior of a serviceability filter. 
  11628.  
  11629.  Format 
  11630.  
  11631.                     #include <dce\dce.h>
  11632.                     #include <dce\svcremote.h>
  11633.  
  11634.                     void dce_svc_filter(
  11635.                             dce_svc_string_t  component,
  11636.                             idl_long_int  arg_size,
  11637.                             idl_byte  *argument,
  11638.                             error_status_t  *status);
  11639.  
  11640.  Parameters 
  11641.  
  11642.           Input 
  11643.  
  11644.           component     The name of the serviceability-registered component, 
  11645.                         defined in the component field of the sams file. 
  11646.  
  11647.           arg_size      The number of characters contained in argument. 
  11648.  
  11649.           argument      A string value to be interpreted by the target 
  11650.                         component's filter control routine. 
  11651.  
  11652.           Output 
  11653.  
  11654.           status        Returns the status code from this operation. The 
  11655.                         following status codes are defined for serviceability: 
  11656.  
  11657.                              svc_s_assertion_failed A programmer-developed 
  11658.                                   compile-time assertion failed. 
  11659.  
  11660.                              svc_s_at_end No more data is available. 
  11661.  
  11662.                              svc_s_bad_routespec See svcroute for information 
  11663.                                   on routing specification format. 
  11664.  
  11665.                              svc_s_cantopen Permission is denied or the file 
  11666.                                   does not exist; consult errno. 
  11667.  
  11668.                              svc_s_no_filter Attempted to send data to the 
  11669.                                   filter-control handle for a component that 
  11670.                                   does not have a filter registered. 
  11671.  
  11672.                              svc_s_no_memory Could not allocate memory for 
  11673.                                   message table, string copy, or other internal 
  11674.                                   requirement. 
  11675.  
  11676.                              svc_s_no_stats The definition of the return value 
  11677.                                   has not been specified. 
  11678.  
  11679.                              svc_s_ok Operation performed. 
  11680.  
  11681.                              svc_s_unknown_component Could not find the service 
  11682.                                   handle for a component. 
  11683.  
  11684.  Usage 
  11685.  
  11686.           The dce_svc_filter routine controls the behavior of the 
  11687.           serviceability message filtering routine, if one exists. 
  11688.  
  11689.           Along with the filter routine itself, the application also installs a 
  11690.           filter control routine. The purpose of this routine is to permit the 
  11691.           behavior of the filter to be altered dynamically while the 
  11692.           application is running. The dce_svc_filter routine is the interface's 
  11693.           call-in to such an installed filter control. 
  11694.  
  11695.           If an application has installed a serviceability filtering routine, 
  11696.           and if filter remote control is desired, the application's filter 
  11697.           routine (installed by the call to dce_svc_define_filter) should be 
  11698.           coded so that its operation can be switched to the various desired 
  11699.           alternatives by the values of static variables to which it has 
  11700.           access. These variables should also be accessible to the filter 
  11701.           control routine. The filter control routine thus receives from 
  11702.           dce_svc_filter an argument string, which it uses to set the 
  11703.           variables.  The meaning of the contents of this string are entirely 
  11704.           application-defined. 
  11705.  
  11706.  Related Information 
  11707.  
  11708.           Files: 
  11709.           dce\service.idl 
  11710.           var\svc\routing 
  11711.  
  11712.  
  11713. ΓòÉΓòÉΓòÉ 3.9.10. dce_svc_log_close ΓòÉΓòÉΓòÉ
  11714.  
  11715.  Purpose 
  11716.  
  11717.           Closes an open log file. 
  11718.  
  11719.  Format 
  11720.  
  11721.                     #include <dce\dce.h>
  11722.                     #include <pthread.h>
  11723.                     #include <dce\svclog.h>
  11724.  
  11725.                     void dce_svc_log_close(
  11726.                             dce_svc_log_handle_t  handle,
  11727.                             error_status_t  *status);
  11728.  
  11729.  Parameters 
  11730.  
  11731.           Input 
  11732.  
  11733.           handle        The handle (returned by dce_svc_log_open) of the log 
  11734.                         file to be closed. 
  11735.  
  11736.           Output 
  11737.  
  11738.           status        Returns the status code from this operation. The 
  11739.                         following status codes are defined for serviceability: 
  11740.  
  11741.                              svc_s_assertion_failed A programmer-developed 
  11742.                                   compile-time assertion failed. 
  11743.  
  11744.                              svc_s_at_end No more data is available. 
  11745.  
  11746.                              svc_s_bad_routespec See svcroute for information 
  11747.                                   on routing specification format. 
  11748.  
  11749.                              svc_s_cantopen Permission is denied or the file 
  11750.                                   does not exist; consult errno. 
  11751.  
  11752.                              svc_s_no_filter Attempted to send data to the 
  11753.                                   filter-control handle for a component that 
  11754.                                   does not have a filter registered. 
  11755.  
  11756.                              svc_s_no_memory Could not allocate memory for 
  11757.                                   message table, string copy, or other internal 
  11758.                                   requirement. 
  11759.  
  11760.                              svc_s_no_stats The definition of the return value 
  11761.                                   has not been specified. 
  11762.  
  11763.                              svc_s_ok Operation performed. 
  11764.  
  11765.                              svc_s_unknown_component Could not find the service 
  11766.                                   handle for a component. 
  11767.  
  11768.  Usage 
  11769.  
  11770.           The dce_svc_log_close routine closes an open binary format 
  11771.           serviceability log and releases all internal state associated with 
  11772.           the handle. 
  11773.  
  11774.  Related Information 
  11775.  
  11776.           Routines: 
  11777.           dce_svc_log_get 
  11778.           dce_svc_log_open 
  11779.           dce_svc_log_rewind 
  11780.  
  11781.           Files: 
  11782.           var\svc\routing 
  11783.  
  11784.  
  11785. ΓòÉΓòÉΓòÉ 3.9.11. dce_svc_log_get ΓòÉΓòÉΓòÉ
  11786.  
  11787.  Purpose 
  11788.  
  11789.           Reads the next record from a binary log file. 
  11790.  
  11791.  Format 
  11792.  
  11793.                     #include <dce\dce.h>
  11794.                     #include <pthread.h>
  11795.                     #include <dce\svclog.h>
  11796.  
  11797.                     void dce_svc_log_get(
  11798.                             dce_svc_log_handle_t  handle,
  11799.                             dce_svc_log_prolog_t  *prolog,
  11800.                             error_status_t  *status);
  11801.  
  11802.  Parameters 
  11803.  
  11804.           Input 
  11805.  
  11806.           handle        The handle (returned by dce_svc_log_open) of the log 
  11807.                         file to be read. 
  11808.  
  11809.           Output 
  11810.  
  11811.           prolog        A pointer to a structure containing information read 
  11812.                         from the log file record. 
  11813.  
  11814.           status        Returns the status code from this operation. The 
  11815.                         following status codes are defined for serviceability: 
  11816.  
  11817.                              svc_s_assertion_failed A programmer-developed 
  11818.                                   compile-time assertion failed. 
  11819.  
  11820.                              svc_s_at_end No more data is available. 
  11821.  
  11822.                              svc_s_bad_routespec See svcroute for information 
  11823.                                   on routing specification format. 
  11824.  
  11825.                              svc_s_cantopen Permission is denied or the file 
  11826.                                   does not exist; consult errno. 
  11827.  
  11828.                              svc_s_no_filter Attempted to send data to the 
  11829.                                   filter-control handle for a component that 
  11830.                                   does not have a filter registered. 
  11831.  
  11832.                              svc_s_no_memory Could not allocate memory for 
  11833.                                   message table, string copy, or other internal 
  11834.                                   requirement. 
  11835.  
  11836.                              svc_s_no_stats The definition of the return value 
  11837.                                   has not been specified. 
  11838.  
  11839.                              svc_s_ok Operation performed. 
  11840.  
  11841.                              svc_s_unknown_component Could not find the service 
  11842.                                   handle for a component. 
  11843.  
  11844.  Usage 
  11845.  
  11846.           The dce_svc_log_get routine reads the next entry from a binary format 
  11847.           serviceability log, and fills in prolog with a pointer to a private 
  11848.           data area containing the data read.  The contents of the prolog 
  11849.           structure are defined in dce\svclog.h. 
  11850.  
  11851.  Related Information 
  11852.  
  11853.           Routines: 
  11854.           dce_svc_log_close 
  11855.           dce_svc_log_open 
  11856.           dce_svc_log_rewind 
  11857.  
  11858.           Files: 
  11859.           var\svc\routing 
  11860.  
  11861.  
  11862. ΓòÉΓòÉΓòÉ 3.9.12. dce_svc_log_open ΓòÉΓòÉΓòÉ
  11863.  
  11864.  Purpose 
  11865.  
  11866.           Opens a binary log file. 
  11867.  
  11868.  Format 
  11869.  
  11870.                     #include <dce\dce.h>
  11871.                     #include <pthread.h>
  11872.                     #include <dce\svclog.h>
  11873.  
  11874.                     void dce_svc_log_open(
  11875.                             const char  *name,
  11876.                             dce_svc_log_handle_t  *handle,
  11877.                             error_status_t  *status);
  11878.  
  11879.  Parameters 
  11880.  
  11881.           Input 
  11882.  
  11883.           name          The path name of the log file to be opened. 
  11884.  
  11885.           Output 
  11886.  
  11887.           handle        A filled-in handle to the opened log file specified by 
  11888.                         name. 
  11889.  
  11890.           status        Returns the status code from this operation. The 
  11891.                         following status codes are defined for serviceability: 
  11892.  
  11893.                              svc_s_assertion_failed A programmer-developed 
  11894.                                   compile-time assertion failed. 
  11895.  
  11896.                              svc_s_at_end No more data is available. 
  11897.  
  11898.                              svc_s_bad_routespec See svcroute for information 
  11899.                                   on routing specification format. 
  11900.  
  11901.                              svc_s_cantopen Permission is denied or the file 
  11902.                                   does not exist; consult errno. 
  11903.  
  11904.                              svc_s_no_filter Attempted to send data to the 
  11905.                                   filter-control handle for a component that 
  11906.                                   does not have a filter registered. 
  11907.  
  11908.                              svc_s_no_memory Could not allocate memory for 
  11909.                                   message table, string copy, or other internal 
  11910.                                   requirement. 
  11911.  
  11912.                              svc_s_no_stats The definition of the return value 
  11913.                                   has not been specified. 
  11914.  
  11915.                              svc_s_ok Operation performed. 
  11916.  
  11917.                              svc_s_unknown_component Could not find the service 
  11918.                                   handle for a component. 
  11919.  
  11920.  Usage 
  11921.  
  11922.           The dce_svc_log_open routine opens the binary log file specified by 
  11923.           name for reading. If the call is successful, handle is filled in with 
  11924.           a handle to be used with the other dce_svc_log_ calls. On error, 
  11925.           status contains an error code. 
  11926.  
  11927.  Related Information 
  11928.  
  11929.           Routines: 
  11930.           dce_svc_log_close 
  11931.           dce_svc_log_get 
  11932.           dce_svc_log_rewind 
  11933.  
  11934.  
  11935. ΓòÉΓòÉΓòÉ 3.9.13. dce_svc_log_rewind ΓòÉΓòÉΓòÉ
  11936.  
  11937.  Purpose 
  11938.  
  11939.           Rewinds a binary log file to the first record. 
  11940.  
  11941.  Format 
  11942.  
  11943.                     #include <dce\dce.h>
  11944.                     #include <pthread.h>
  11945.                     #include <dce\svclog.h>
  11946.  
  11947.                     void dce_svc_log_rewind(
  11948.                             dce_svc_log_handle_t  handle,
  11949.                             error_status_t  *status);
  11950.  
  11951.  Parameters 
  11952.  
  11953.           Input 
  11954.  
  11955.           handle        The handle (returned by dce_svc_log_open) of the log 
  11956.                         file to be rewound. 
  11957.  
  11958.           Output 
  11959.  
  11960.           status        Returns the status code from this operation. The 
  11961.                         following status codes are defined for serviceability: 
  11962.  
  11963.                              svc_s_assertion_failed A programmer-developed 
  11964.                                   compile-time assertion failed. 
  11965.  
  11966.                              svc_s_at_end No more data is available. 
  11967.  
  11968.                              svc_s_bad_routespec See svcroute for information 
  11969.                                   on routing specification format. 
  11970.  
  11971.                              svc_s_cantopen Permission is denied or the file 
  11972.                                   does not exist; consult errno. 
  11973.  
  11974.                              svc_s_no_filter Attempted to send data to the 
  11975.                                   filter-control handle for a component that 
  11976.                                   does not have a filter registered. 
  11977.  
  11978.                              svc_s_no_memory Could not allocate memory for 
  11979.                                   message table, string copy, or other internal 
  11980.                                   requirement. 
  11981.  
  11982.                              svc_s_no_stats The definition of the return value 
  11983.                                   has not been specified. 
  11984.  
  11985.                              svc_s_ok Operation performed. 
  11986.  
  11987.                              svc_s_unknown_component Could not find the service 
  11988.                                   handle for a component. 
  11989.  
  11990.  Usage 
  11991.  
  11992.           The dce_svc_log_rewind routine rewinds the current reading position 
  11993.           of the specified (by handle) binary log file to the first record. 
  11994.  
  11995.  Related Information 
  11996.  
  11997.           Routines: 
  11998.           dce_svc_log_close 
  11999.           dce_svc_log_get 
  12000.           dce_svc_log_open 
  12001.  
  12002.  
  12003. ΓòÉΓòÉΓòÉ 3.9.14. dce_svc_printf ΓòÉΓòÉΓòÉ
  12004.  
  12005.  Purpose 
  12006.  
  12007.           Generates a serviceability message. 
  12008.  
  12009.  Format 
  12010.  
  12011.                     #include <dce\dce.h>
  12012.  
  12013.                     void dce_svc_printf(
  12014.                             DCE_SVC(dce_svc_handle_t  handle,
  12015.                                char  *argtypes),
  12016.                             const unsigned32  table_index,
  12017.                             const unsigned32  attributes,
  12018.                             const unsigned32  messageID,
  12019.                             ...);
  12020.  
  12021.  Parameters 
  12022.  
  12023.           Input 
  12024.  
  12025.           handle        The serviceability handle of the caller. 
  12026.  
  12027.           argtypes      Format string for the message. 
  12028.  
  12029.           table_index   The message's subcomponent name. This symbol is 
  12030.                         declared in the subcomponent list coded in Part II of 
  12031.                         the sams file; its value is used to index into the 
  12032.                         subtable of messages where the desired message is 
  12033.                         located. 
  12034.  
  12035.           attributes    Any routing, severity, action, or debug attributes that 
  12036.                         are to associated with the generated message, ORed 
  12037.                         together. 
  12038.  
  12039.                         There are four categories of message attributes: 
  12040.  
  12041.                              Routing        The available routing attribute 
  12042.                                             constants are: 
  12043.  
  12044.                                               o  svc_c_route_stderr 
  12045.                                               o  svc_c_route_nolog 
  12046.  
  12047.                                             However, most routing is done 
  12048.                                             either by passing 
  12049.                                             specially-formatted strings to 
  12050.                                             dce_svc_routing or by environment 
  12051.                                             variable values. Note that using 
  12052.                                             the svc_c_route_nolog constant 
  12053.                                             without using svc_c_route_stderr 
  12054.                                             results in no message being 
  12055.                                             generated. 
  12056.  
  12057.                              Severity       The available severity attribute 
  12058.                                             constants are: 
  12059.  
  12060.                                               o  svc_c_sev_fatal 
  12061.                                               o  svc_c_sev_error 
  12062.                                               o  svc_c_sev_warning 
  12063.                                               o  svc_c_sev_notice 
  12064.                                               o  svc_c_sev_notice_verbose 
  12065.  
  12066.                              Action         The available message action 
  12067.                                             attribute constants are: 
  12068.  
  12069.                                               o  svc_c_action_abort 
  12070.                                               o  svc_c_action_exit_bad 
  12071.                                               o  svc_c_action_exit_ok 
  12072.                                               o  svc_c_action_brief 
  12073.                                               o  svc_c_action_none 
  12074.  
  12075.                                             Note that svc_c_action_brief is 
  12076.                                             used to suppress the standard 
  12077.                                             prolog. 
  12078.  
  12079.                              Debug Level    Nine different debug levels can be 
  12080.                                             specified 
  12081.                                             (svc_c_debug1...svc_c_debug9 or 
  12082.                                             svc_c_debug_off). 
  12083.  
  12084.           messageID     The message ID, defined in the message code field in 
  12085.                         the sams file. This parameter consists of one or more 
  12086.                         attributes to be applied to the message that is to be 
  12087.                         printed. 
  12088.  
  12089.                         Note:  You must specify at least one severity here. 
  12090.                                Multiple attributes are ORed together. 
  12091.  
  12092.           ...           Any format arguments for the message string. 
  12093.  
  12094.  Usage 
  12095.  
  12096.           The dce_svc_printf routine is the normal routine for writing or 
  12097.           displaying serviceability messages. It cannot be called with a 
  12098.           literal text parameter. Instead, the message text is retrieved from a 
  12099.           message catalog or an in-core message table.  These are generated by 
  12100.           the sams utility, which in turn outputs sets of tables from which the 
  12101.           messages are extracted for output. 
  12102.  
  12103.           There are two main ways to call the routine.  If a message has been 
  12104.           defined in the sams file with both sub-component and attributes 
  12105.           specified, the sams output includes a convenience macro for the 
  12106.           message that can be passed as the single parameter to dce_svc_printf, 
  12107.           for example: 
  12108.  
  12109.                         dce_svc_printf(SIGN_ON_MSG);
  12110.  
  12111.           The convenience macro's name is generated from the uppercase version 
  12112.           of the message's code value (as specified in the sams file), with the 
  12113.           string _MSG appended. 
  12114.  
  12115.           If a convenience macro is not generated, or if you want to override 
  12116.           some of the message attributes at the time of output, you must call 
  12117.           the routine in its long form. An example of this form of the call is: 
  12118.  
  12119.                         dce_svc_printf(DCE_SVC(app_svc_handle,""), app_subcomponent,\
  12120.                                        svc_c_sev_error | svc_c_route_stderr, messageID);
  12121.  
  12122.           DCE_SVC is a macro that must be passed as the first parameter to 
  12123.           dce_svc_printf if a convenience macro is not being used.  It takes 
  12124.           two arguments: 
  12125.  
  12126.             o  The caller's serviceability handle 
  12127.             o  A format string for the message that is to be output 
  12128.  
  12129.           The format string is for use with messages that have been coded with 
  12130.           argument specifiers. It is a character string consisting of the 
  12131.           argument types as they would be passed to a printf call. If the 
  12132.           message is to be routed to a binary file, the format is extended to 
  12133.           include a %b specifier; using %b in a different routing gives 
  12134.           unpredictable results. The %b specifier takes two arguments, an 
  12135.           integer size and a buffer pointer. 
  12136.  
  12137.  Related Information 
  12138.  
  12139.           Routines: 
  12140.           dce_svc_register 
  12141.  
  12142.           Macros: 
  12143.           DCE_SVC_DEFINE_HANDLE 
  12144.  
  12145.  
  12146. ΓòÉΓòÉΓòÉ 3.9.15. dce_svc_register ΓòÉΓòÉΓòÉ
  12147.  
  12148.  Purpose 
  12149.  
  12150.           Registers a serviceability message table. 
  12151.  
  12152.  Format 
  12153.  
  12154.                     #include <dce\dce.h>
  12155.  
  12156.                     dce_svc_handle_t dce_svc_register(
  12157.                             dce_svc_subcomp_t  *table,
  12158.                             const idl_char  *component_name,
  12159.                             error_status_t  *status);
  12160.  
  12161.  Parameters 
  12162.  
  12163.           Input 
  12164.  
  12165.           table         A message table structure (defined in a header file 
  12166.                         generated by sams during compilation). 
  12167.  
  12168.           component_name The serviceability name of the component, defined in 
  12169.                         the component field of the sams file. 
  12170.  
  12171.           Output 
  12172.  
  12173.           status        Returns the status code from this operation. The 
  12174.                         following status codes are defined for serviceability: 
  12175.  
  12176.                              svc_s_assertion_failed A programmer-developed 
  12177.                                   compile-time assertion failed. 
  12178.  
  12179.                              svc_s_at_end No more data is available. 
  12180.  
  12181.                              svc_s_bad_routespec See svcroute for information 
  12182.                                   on routing specification format. 
  12183.  
  12184.                              svc_s_cantopen Permission is denied or the file 
  12185.                                   does not exist; consult errno. 
  12186.  
  12187.                              svc_s_no_filter Attempted to send data to the 
  12188.                                   filter-control handle for a component that 
  12189.                                   does not have a filter registered. 
  12190.  
  12191.                              svc_s_no_memory Could not allocate memory for 
  12192.                                   message table, string copy, or other internal 
  12193.                                   requirement. 
  12194.  
  12195.                              svc_s_no_stats The definition of the return value 
  12196.                                   has not been specified. 
  12197.  
  12198.                              svc_s_ok Operation performed. 
  12199.  
  12200.                              svc_s_unknown_component Could not find the service 
  12201.                                   handle for a component. 
  12202.  
  12203.  Usage 
  12204.  
  12205.           The dce_svc_register routine registers a serviceability message 
  12206.           table.  An application must call either this routine or the 
  12207.           DCE_SVC_DEFINE_HANDLE macro to set up its tables and obtain the 
  12208.           serviceability handle it must have in order to use the serviceability 
  12209.           interface. 
  12210.  
  12211.           Two parameters are required for the call:  table is a pointer to the 
  12212.           application's serviceability table, defined in a file called 
  12213.           dceappsvc.h generated by the sams utility. component_name is a string 
  12214.           of the value app, which is defined in the component field of the sams 
  12215.           file where the serviceability messages are defined. 
  12216.  
  12217.           On error, this routine returns NULL and fills in status with an error 
  12218.           code. 
  12219.  
  12220.  Related Information 
  12221.  
  12222.           Routines: 
  12223.           dce_svc_debug_routing 
  12224.           dce_svc_debug_set_levels 
  12225.           dce_svc_define_filter 
  12226.           dce_svc_routing 
  12227.           dce_svc_unregister 
  12228.  
  12229.           Files: 
  12230.           var\svc\routing 
  12231.  
  12232.           Macros: 
  12233.           DCE_SVC_DEFINE_HANDLE 
  12234.  
  12235.  
  12236. ΓòÉΓòÉΓòÉ 3.9.16. dce_svc_routing ΓòÉΓòÉΓòÉ
  12237.  
  12238.  Purpose 
  12239.  
  12240.           Specifies routing of serviceability messages. 
  12241.  
  12242.  Format 
  12243.  
  12244.                     #include <dce\dce.h>
  12245.                     #include <dce\svcremote.h>
  12246.  
  12247.                     void dce_svc_routing(
  12248.                             unsigned char  *where,
  12249.                             error_status_t  *status);
  12250.  
  12251.  Parameters 
  12252.  
  12253.           Input 
  12254.  
  12255.           where         A three-field routing string, as described in svcroute. 
  12256.  
  12257.           Output 
  12258.  
  12259.           status        Returns the status code from this operation. The 
  12260.                         following status codes are defined for serviceability: 
  12261.  
  12262.                              svc_s_assertion_failed A programmer-developed 
  12263.                                   compile-time assertion failed. 
  12264.  
  12265.                              svc_s_at_end No more data is available. 
  12266.  
  12267.                              svc_s_bad_routespec See svcroute for information 
  12268.                                   on routing specification format. 
  12269.  
  12270.                              svc_s_cantopen Permission is denied or the file 
  12271.                                   does not exist; consult errno. 
  12272.  
  12273.                              svc_s_no_filter Attempted to send data to the 
  12274.                                   filter-control handle for a component that 
  12275.                                   does not have a filter registered. 
  12276.  
  12277.                              svc_s_no_memory Could not allocate memory for 
  12278.                                   message table, string copy, or other internal 
  12279.                                   requirement. 
  12280.  
  12281.                              svc_s_no_stats The definition of the return value 
  12282.                                   has not been specified. 
  12283.  
  12284.                              svc_s_ok Operation performed. 
  12285.  
  12286.                              svc_s_unknown_component Could not find the service 
  12287.                                   handle for a component. 
  12288.  
  12289.  Usage 
  12290.  
  12291.           The dce_svc_routing routine specifies how normal (nondebug) 
  12292.           serviceability messages are routed.  The where parameter is a 
  12293.           three-field routing string, as described in svcroute.  For 
  12294.           convenience, the first field of the routing specifier, which 
  12295.           indicates the message severity type to which the routing is to be 
  12296.           applied, can be an asterisk (*) to indicate that all messages, 
  12297.           whatever their severity, should be routed as specified. 
  12298.  
  12299.           If the routine is called before the component is registered (with the 
  12300.           dce_svc_register routine), the routing is stored until it is needed. 
  12301.           In case of error, the status parameter is filled in with an error 
  12302.           code. 
  12303.  
  12304.  Related Information 
  12305.  
  12306.           Files: 
  12307.           dce\service.idl 
  12308.           var\svc\routing 
  12309.  
  12310.  
  12311. ΓòÉΓòÉΓòÉ 3.9.17. dce_svc_set_progname ΓòÉΓòÉΓòÉ
  12312.  
  12313.  Purpose 
  12314.  
  12315.           Sets an application's program name. 
  12316.  
  12317.  Format 
  12318.  
  12319.                     #include <dce\dce.h>
  12320.  
  12321.                     void dce_svc_set_progname(
  12322.                             char  *program_name,
  12323.                             error_status_t  *status);
  12324.  
  12325.  Parameters 
  12326.  
  12327.           Input 
  12328.  
  12329.           program_name  A string containing the name that is to be included in 
  12330.                         the text of all serviceability messages that the 
  12331.                         application generates during the session. 
  12332.  
  12333.           Output 
  12334.  
  12335.           status        Returns the status code from this operation. The 
  12336.                         following status codes are defined for serviceability: 
  12337.  
  12338.                              svc_s_assertion_failed A programmer-developed 
  12339.                                   compile-time assertion failed. 
  12340.  
  12341.                              svc_s_at_end No more data is available. 
  12342.  
  12343.                              svc_s_bad_routespec See svcroute for information 
  12344.                                   on routing specification format. 
  12345.  
  12346.                              svc_s_cantopen Permission is denied or the file 
  12347.                                   does not exist; consult errno. 
  12348.  
  12349.                              svc_s_no_filter Attempted to send data to the 
  12350.                                   filter-control handle for a component that 
  12351.                                   does not have a filter registered. 
  12352.  
  12353.                              svc_s_no_memory Could not allocate memory for 
  12354.                                   message table, string copy, or other internal 
  12355.                                   requirement. 
  12356.  
  12357.                              svc_s_no_stats The definition of the return value 
  12358.                                   has not been specified. 
  12359.  
  12360.                              svc_s_ok Operation performed. 
  12361.  
  12362.                              svc_s_unknown_component Could not find the service 
  12363.                                   handle for a component. 
  12364.  
  12365.  Usage 
  12366.  
  12367.           The dce_svc_set_progname routine sets the application's program name, 
  12368.           which is included in serviceability messages.  This allows 
  12369.           serviceability messages from more than one application to be written 
  12370.           to the same file and still be distinguishable as to their separate 
  12371.           origins. 
  12372.  
  12373.           If dce_svc_set_progname is not called, the application-generated 
  12374.           serviceability messages are identified by its process ID. 
  12375.  
  12376.  Examples 
  12377.  
  12378.           If an application sets its program name to be demo_program, as shown: 
  12379.  
  12380.                         dce_svc_set_progname("demo_program", &status);
  12381.  
  12382.           serviceability messages generated by the program resemble the 
  12383.           following: 
  12384.  
  12385.                         1994-04-05-20:13:34.500+00:00I----- demo_program NOTICE app main.c 123 0xa444e208
  12386.                         <message text>
  12387.  
  12388.           If the application does not set its program name, its generated 
  12389.           serviceability messages have the following form: 
  12390.  
  12391.                         1994-04-05-20:13:34.500+00:00I----- PID#9467 NOTICE app main.c 123 0xa444e208
  12392.                         <message text>
  12393.  
  12394.  Related Information 
  12395.  
  12396.           Routines: 
  12397.           dce_printf, dce_fprintf, and dce_sprintf 
  12398.           dce_svc_printf 
  12399.  
  12400.           Macros: 
  12401.           DCE_SVC_DEBUG 
  12402.  
  12403.  
  12404. ΓòÉΓòÉΓòÉ 3.9.18. dce_svc_table ΓòÉΓòÉΓòÉ
  12405.  
  12406.  Purpose 
  12407.  
  12408.           Returns a registered component's subcomponent table. 
  12409.  
  12410.  Format 
  12411.  
  12412.                     #include <dce\dce.h>
  12413.                     #include <dce\svcremote.h>
  12414.  
  12415.                     void dce_svc_table(
  12416.                             dce_svc_string_t  component,
  12417.                             dce_svc_subcomparray_t  *table,
  12418.                             error_status_t  *status);
  12419.  
  12420.  Parameters 
  12421.  
  12422.           Input 
  12423.  
  12424.           component     The name of the serviceability-registered component, 
  12425.                         defined in the component field of the application's 
  12426.                         sams file. 
  12427.  
  12428.           Output 
  12429.  
  12430.           table         An array of elements, each of which describes one 
  12431.                         serviceability subcomponent (as defined in its sams 
  12432.                         file). 
  12433.  
  12434.           status        Returns the status code from this operation. The 
  12435.                         following status codes are defined for serviceability: 
  12436.  
  12437.                              svc_s_assertion_failed A programmer-developed 
  12438.                                   compile-time assertion failed. 
  12439.  
  12440.                              svc_s_at_end No more data is available. 
  12441.  
  12442.                              svc_s_bad_routespec See svcroute for information 
  12443.                                   on routing specification format. 
  12444.  
  12445.                              svc_s_cantopen Permission is denied or the file 
  12446.                                   does not exist; consult errno. 
  12447.  
  12448.                              svc_s_no_filter Attempted to send data to the 
  12449.                                   filter-control handle for a component that 
  12450.                                   does not have a filter registered. 
  12451.  
  12452.                              svc_s_no_memory Could not allocate memory for 
  12453.                                   message table, string copy, or other internal 
  12454.                                   requirement. 
  12455.  
  12456.                              svc_s_no_stats The definition of the return value 
  12457.                                   has not been specified. 
  12458.  
  12459.                              svc_s_ok Operation performed. 
  12460.  
  12461.                              svc_s_unknown_component Could not find the service 
  12462.                                   handle for a component. 
  12463.  
  12464.  Usage 
  12465.  
  12466.           The dce_svc_table routine returns the serviceability subcomponent 
  12467.           table registered with the specified component.  The returned table 
  12468.           consists of an array of elements; each describes one subcomponent. 
  12469.           Each element consists of four fields, which contain the subcomponent 
  12470.           name, its description, its message catalog ID, and the current value 
  12471.           of its debug message level.  The first three of these values are 
  12472.           specified in the sams file that is processed during the compiling of 
  12473.           the application, and from which the application's message catalogs 
  12474.           and other serviceability and message files are generated. 
  12475.  
  12476.  Examples 
  12477.  
  12478.           The following code fragment shows how the remote operation can be 
  12479.           called from the client side of an application, and how the results 
  12480.           might print out: 
  12481.  
  12482.                     #include <dce\rpc.h>
  12483.                     #include <dce\service.h>
  12484.  
  12485.                     handle_t svc_bind_handle;
  12486.                     dce_svc_string_t component;
  12487.                     dce_svc_subcomparray_t subcomponents_table;
  12488.                     error_status_t remote_status;
  12489.                     int i;
  12490.  
  12491.                     dce_svc_inq_table(svc_bind_handle, component, &subcomponents_table, &remote_status);
  12492.  
  12493.                     fprintf(stdout, "Subcomponent table size received is: %d...\n",
  12494.                             subcomponents_table.tab_size);
  12495.                     fprintf(stdout, "Subcomponent table contents are:\n");
  12496.                     for (i = 0; i < subcomponents_table.tab_size; i++)
  12497.                     {
  12498.                         fprintf(stdout, "Name: %s\n",
  12499.                             subcomponents_table.table[i].sc_name);
  12500.                         fprintf(stdout, "Desc: %s\n",
  12501.                             subcomponents_table.table[i].sc_descr);
  12502.                         fprintf(stdout, "Msg Cat ID: 0x%8.8lx\n",
  12503.                             (long) subcomponents_table.table[i].sc_descr_msgid);
  12504.                         fprintf(stdout, "Active debug level: %d\n\n",
  12505.                             subcomponents_table.table[i].sc_level);
  12506.                     }
  12507.  
  12508.  Related Information 
  12509.  
  12510.           Files: 
  12511.           dce\service.idl 
  12512.  
  12513.  
  12514. ΓòÉΓòÉΓòÉ 3.9.19. dce_svc_unregister ΓòÉΓòÉΓòÉ
  12515.  
  12516.  Purpose 
  12517.  
  12518.           Destroys a serviceability handle. 
  12519.  
  12520.  Format 
  12521.  
  12522.                     #include <dce\dce.h>
  12523.  
  12524.                     void dce_svc_unregister(
  12525.                             dce_svc_handle_t  handle,
  12526.                             error_status_t  *status);
  12527.  
  12528.  Parameters 
  12529.  
  12530.           Input 
  12531.  
  12532.           handle        The application's serviceability handle, originally 
  12533.                         returned by a call to dce_svc_register or filled in by 
  12534.                         the DCE_SVC_DEFINE_HANDLE macro. 
  12535.  
  12536.           Output 
  12537.  
  12538.           status        Returns the status code from this operation. The 
  12539.                         following status codes are defined for serviceability: 
  12540.  
  12541.                              svc_s_assertion_failed A programmer-developed 
  12542.                                   compile-time assertion failed. 
  12543.  
  12544.                              svc_s_at_end No more data is available. 
  12545.  
  12546.                              svc_s_bad_routespec See svcroute for information 
  12547.                                   on routing specification format. 
  12548.  
  12549.                              svc_s_cantopen Permission is denied or the file 
  12550.                                   does not exist; consult errno. 
  12551.  
  12552.                              svc_s_no_filter Attempted to send data to the 
  12553.                                   filter-control handle for a component that 
  12554.                                   does not have a filter registered. 
  12555.  
  12556.                              svc_s_no_memory Could not allocate memory for 
  12557.                                   message table, string copy, or other internal 
  12558.                                   requirement. 
  12559.  
  12560.                              svc_s_no_stats The definition of the return value 
  12561.                                   has not been specified. 
  12562.  
  12563.                              svc_s_ok Operation performed. 
  12564.  
  12565.                              svc_s_unknown_component Could not find the service 
  12566.                                   handle for a component. 
  12567.  
  12568.  Usage 
  12569.  
  12570.           The dce_svc_unregister routine destroys a serviceability handle. 
  12571.           Calling this routine closes any open serviceability message routes 
  12572.           and frees all allocated resources associated with the handle. 
  12573.  
  12574.           The handle parameter is the serviceability handle that was originally 
  12575.           returned by the call to dce_svc_register, or filled in by the 
  12576.           DCE_SVC_DEFINE_HANDLE macro. On error, the routine fills in status 
  12577.           with an error code. 
  12578.  
  12579.           Note that it is not usually necessary to call this routine, because 
  12580.           the normal process exit will perform the required cleanup. 
  12581.  
  12582.  Related Information 
  12583.  
  12584.           Routines: 
  12585.           dce_svc_register 
  12586.  
  12587.           Macros: 
  12588.           DCE_SVC_DEFINE_HANDLE 
  12589.  
  12590.  
  12591. ΓòÉΓòÉΓòÉ 3.9.20. svcroute ΓòÉΓòÉΓòÉ
  12592.  
  12593.  Purpose 
  12594.  
  12595.           The routing control file for DCE serviceability messages. 
  12596.  
  12597.  Usage 
  12598.  
  12599.           The file svc\routing specifies routing for serviceability messages. 
  12600.           The default location for svc\routing is the DCE local data directory 
  12601.           (typically \opt\dcelocal\var). The environment variable 
  12602.           DCE_SVC_ROUTING_FILE, if set, specifies a different location for the 
  12603.           file. 
  12604.  
  12605.           The file consists of a series of text lines. Blank lines and lines 
  12606.           that begin with a # (number sign) character are ignored when the 
  12607.           file's contents are interpreted. All other lines must consist of 
  12608.           either three or four fields, each separated by a : (colon). Leading 
  12609.           white space is ignored. 
  12610.  
  12611.           Lines consisting of three fields specify routing for non-debug 
  12612.           serviceability messages. Their format is: 
  12613.  
  12614.                       sev:out_form:dest[;out_form:dest...] \
  12615.                       [GOESTO:{sev | comp}]
  12616.  
  12617.             o  The sev (severity) field specifies one of the following message 
  12618.                severities: 
  12619.  
  12620.                     FATAL         Irrecoverable error exit.  An unrecoverable 
  12621.                                   error (such as database corruption) has 
  12622.                                   occurred and probably requires manual 
  12623.                                   intervention to be corrected.  The program 
  12624.                                   usually terminates immediately after such an 
  12625.                                   error. 
  12626.  
  12627.                     ERROR         Error detected. An unexpected event that is 
  12628.                                   non-terminal (such as a timeout), or is 
  12629.                                   correctable by human intervention, has 
  12630.                                   occurred. The program continues operation, 
  12631.                                   although some functions or services may no 
  12632.                                   longer be available. This severity level can 
  12633.                                   also be used to indicate that a particular 
  12634.                                   request or action could not be completed. 
  12635.  
  12636.                     WARNING       Correctable error.  An error occurred that 
  12637.                                   was automatically corrected (for example, a 
  12638.                                   configuration file was not found and default 
  12639.                                   values were used instead).  This severity 
  12640.                                   level may also be used to indicate a 
  12641.                                   condition that could be an error if the 
  12642.                                   effects are undesirable (for example, 
  12643.                                   removing all files as a side-effect of 
  12644.                                   removing a non-empty directory).  This 
  12645.                                   severity level can also be used to indicate a 
  12646.                                   condition that, if not corrected, eventually 
  12647.                                   results in an error (for example, a printer 
  12648.                                   that is running low on paper). 
  12649.  
  12650.                     NOTICE        Informational notice.  A significant routine 
  12651.                                   major event has occurred; for example, a 
  12652.                                   server has started. 
  12653.  
  12654.                     NOTICE_VERBOSE Verbose information notice.  A significant 
  12655.                                   routine event has occurred; for example, a 
  12656.                                   directory entry was removed. 
  12657.  
  12658.             o  The out_form (output form) field specifies how the messages of a 
  12659.                given severity level should be processed, and must be one of the 
  12660.                following: 
  12661.  
  12662.                     BINFILE        Write these messages as a binary log entry 
  12663.                                    to the specified file. 
  12664.  
  12665.                     TEXTFILE       Write these messages as human-readable text. 
  12666.  
  12667.                     FILE           Equivalent to TEXTFILE. 
  12668.  
  12669.                     DISCARD        Do not record messages of this severity 
  12670.                                    level. 
  12671.  
  12672.                     STDOUT         Write these messages as human-readable text 
  12673.                                    to standard output. 
  12674.  
  12675.                     STDERR         Write these messages as human-readable text 
  12676.                                    to standard error. 
  12677.  
  12678.                   Files written as BINFILEs can be read and manipulated with a 
  12679.                   set of log file functions (for more information, see 
  12680.                   dce_svc_log_open and dce_svc_log_get) or by the svcdumplog 
  12681.                   command. 
  12682.  
  12683.                   The out_form specifier can be followed by a two-number 
  12684.                   specifier of the form .gens.count where: 
  12685.  
  12686.                  -  gens is an integer that specifies the number of files (that 
  12687.                     is, generations) that should be kept 
  12688.  
  12689.                  -  count is an integer specifying how many entries (that is, 
  12690.                     messages) should be written to each file 
  12691.  
  12692.                   The multiple files are named by appending a dot to the simple 
  12693.                   specified name, dest, followed by the current generation 
  12694.                   number.  When the number of entries in a file reaches the 
  12695.                   maximum specified by count, the file is closed, the 
  12696.                   generation number is incremented, and the next file is 
  12697.                   opened. When the maximum number of files has been created and 
  12698.                   filled, the generation number is reset to 1, and a new file 
  12699.                   with that number is created and written to (thus overwriting 
  12700.                   the already-existing file with the same name), and so on, as 
  12701.                   long as messages are being written.  Thus the files wrap 
  12702.                   around to the beginning, and the total number of log files 
  12703.                   never exceeds gens, although messages continue to be written 
  12704.                   as long as the program continues writing them. Note that when 
  12705.                   a program starts, the generation starts at 1. 
  12706.  
  12707.             o  The dest (destination) field is a path name that specifies where 
  12708.                the message should be sent.  This field can be left blank if the 
  12709.                out_form specified is DISCARD, STDOUT, or STDERR. The field can 
  12710.                also contain a %ld string in the file name, which, when the file 
  12711.                is written, is replaced by the process ID of the program that 
  12712.                wrote the message. File names must not contain colons or 
  12713.                periods. 
  12714.  
  12715.                Multiple routings for the same severity level can be specified 
  12716.                by adding the additional desired routings as semicolon-separated 
  12717.                out_form:dest strings.  For example, 
  12718.  
  12719.                                   FATAL:TEXTFILE:\dev\console
  12720.                                   WARNING:DISCARD:--
  12721.                                   NOTICE:STDERR:-;BINFILE.50.100:\tmp\log%ld
  12722.  
  12723.                specifies that: 
  12724.  
  12725.                  -  Fatal error messages should be sent to the console. 
  12726.  
  12727.                  -  Warnings should be discarded. 
  12728.  
  12729.                  -  Notices should be written to both standard error and as 
  12730.                     binary entries in files located in the \tmp directory. No 
  12731.                     more than 50 files should be written, and there should be 
  12732.                     no more than 100 messages written to each file.  The files 
  12733.                     have names of the form: 
  12734.  
  12735.                                           \tmp\logprocess_id.n
  12736.  
  12737.                     where process_id is the process ID of the program 
  12738.                     originating the messages, and n is the generation number of 
  12739.                     the file (expressed with only as many digits as needed). 
  12740.  
  12741.             o  The GOESTO specifier allows messages for the severity whose 
  12742.                routing specification it occurs in to be routed to the same 
  12743.                destination (and in the same output form) as those for the 
  12744.                other, specified, severity level (or component name). For 
  12745.                example, the following specification: 
  12746.  
  12747.                                   WARNING:STDERR:;GOESTO:FATAL
  12748.                                   FATAL:STDERR:;FILE:\tmp\foo
  12749.  
  12750.                means that WARNING messages should show up in three places: 
  12751.                twice to stderr, and once to the file \tmp\foo. 
  12752.  
  12753.                Note that a GOESTO specification should be the last element in a 
  12754.                multidestination route specification. 
  12755.  
  12756.  Routing Serviceability Messages by Environment Variable 
  12757.  
  12758.           Serviceability message routing can also be specified by the values of 
  12759.           certain environment variables.  If environment variables are used, 
  12760.           the routings they specify override any conflicting routes specified 
  12761.           by the routing file. 
  12762.  
  12763.           The routes are specified on the basis of severity level by putting 
  12764.           the desired routing instructions in their corresponding environment 
  12765.           variables: 
  12766.  
  12767.             o  SVC_FATAL 
  12768.             o  SVC_ERROR 
  12769.             o  SVC_WARNING 
  12770.             o  SVC_NOTICE 
  12771.             o  SVC_NOTICE_VERBOSE 
  12772.  
  12773.           Each variable should contain a single string in the following format: 
  12774.  
  12775.                       out_form:dest[;out_form:dest...]
  12776.  
  12777.           where out_form and dest have the same meanings and form as previously 
  12778.           stated. Multiple routings can be specified with semicolon-separated 
  12779.           additional substrings specifying the additional routes, as shown. 
  12780.  
  12781.  Setting Serviceability Debug Message Levels 
  12782.  
  12783.           Nine serviceability debug message levels (specified respectively by 
  12784.           single digits from 1 to 9) are available.  The precise meaning of 
  12785.           each level varies with the application or DCE component in question, 
  12786.           but the general notion is that ascending to a higher level (for 
  12787.           example, from 2 to 3) increases the level of informational detail in 
  12788.           the messages. 
  12789.  
  12790.           Setting debug messaging at a certain level means that all levels up 
  12791.           to and including the specified level are enabled.  For example, if 
  12792.           the debug level is set at 4, the 1, 2, and 3 levels are enabled as 
  12793.           well. 
  12794.  
  12795.           The general format for the debug level specifier string is: 
  12796.  
  12797.                       component:sub_comp.level,sub_comp.level,...
  12798.           where: 
  12799.  
  12800.             o  component is the 3-character serviceability component code for 
  12801.                the program whose debug message levels are being specified. 
  12802.  
  12803.             o  sub_comp.level is a serviceability subcomponent name, followed 
  12804.                (after a dot) by a debug level (expressed as a single digit from 
  12805.                1 to 9).  Note that multiple subcomponent/level pairs can be 
  12806.                specified in the string. 
  12807.  
  12808.           If there are multiple subcomponents and you want to set the debug 
  12809.           level to be the same for all of them, the form: 
  12810.  
  12811.                       component:*.level
  12812.  
  12813.           does this (where the * (asterisk) specifies all subcomponents). 
  12814.  
  12815.  Routing Serviceability Debug Messages 
  12816.  
  12817.           Routing for serviceability debug messages can be specified in either 
  12818.           of the two following ways: 
  12819.  
  12820.             o  By the contents of the SVC_COMP_DBG environment variable (where 
  12821.                COMP is the code of the component, converted to uppercase, where 
  12822.                debug message routing is to be set). 
  12823.  
  12824.             o  By the contents of the \svc\routing routing file. 
  12825.  
  12826.           The routing is specified by the contents of a specially-formatted 
  12827.           string that is either included in the value of the environment 
  12828.           variable or in the contents of the routing file. 
  12829.  
  12830.           The general format for the debug routing specifier string is: 
  12831.  
  12832.                       component:sub_comp.level,...:out_form::dest[;out_form:dest...]\
  12833.                       [GOESTO:{sev | component}]
  12834.  
  12835.           where component, sub_comp.level, out_form, dest, and sev have the 
  12836.           same meanings as defined earlier in this reference page. 
  12837.  
  12838.           For example, consider the following string value: 
  12839.  
  12840.                         hel:*.4:STDERR:-;TEXTFILE:\tmp\hel_debug_log_%ld
  12841.  
  12842.           This value, when assigned to the SVC_HEL_DBG environment variable, 
  12843.           sets the debug level and routing for all hel subcomponents. A debug 
  12844.           level of 4 is specified, and all debug messages of that level or 
  12845.           lower are written both to standard error, and in text form to the 
  12846.           file \tmp\hel_debug_log_process_ID, where process_ID is the process 
  12847.           ID of the program writing the messages. 
  12848.  
  12849.  
  12850. ΓòÉΓòÉΓòÉ 3.10. The DCE Serviceability Macros ΓòÉΓòÉΓòÉ
  12851.  
  12852. The DCE_SVC_DEFINE_HANDLE macro is used to create a serviceability handle. This 
  12853. handle can be useful in a library that has no explicit initialization routine 
  12854. where a call to dce_svc_register could be added. The remaining macros can be 
  12855. "compiled out" of production code or left in to aid diagnostics, depending on 
  12856. whether DCE_DEBUG (normally found in dce\dce.h) is defined. 
  12857.  
  12858. See the following subtopics for more information: 
  12859.  
  12860.       List of Serviceability Macros 
  12861.       Related Information for Macros 
  12862.  
  12863.  
  12864. ΓòÉΓòÉΓòÉ 3.10.1. List of Serviceability Macros ΓòÉΓòÉΓòÉ
  12865.  
  12866. The serviceability macros are listed in alphabetical order: 
  12867.  
  12868.  dce_assert                    Adds runtime "can't happen" assertions (such as 
  12869.                                programming errors) to programs. 
  12870.  
  12871.  DCE_SVC_DEBUG                 Used to generate debugging output. 
  12872.  
  12873.  DCE_SVC_DEBUG_ATLEAST         Can be used to test the debug level of a 
  12874.                                subcomponent for a specified handle. Tests 
  12875.                                whether the debug level is at least at the 
  12876.                                specified level. 
  12877.  
  12878.  DCE_SVC_DEBUG_IS              Can be used to test the debug level of a 
  12879.                                subcomponent for a specified handle. The macro 
  12880.                                tests for an exact match with the specified 
  12881.                                level. 
  12882.  
  12883.  DCE_SVC_DEFINE_HANDLE         Registers a serviceability message table. 
  12884.  
  12885.  DCE_SVC_LOG                   Generates debugging output based on a message 
  12886.                                defined in an application's sams file. 
  12887.  
  12888.  
  12889. ΓòÉΓòÉΓòÉ 3.10.2. Related Information for Macros ΓòÉΓòÉΓòÉ
  12890.  
  12891. Books: 
  12892. DCE for OS/2 Warp: Application Development Guide - Core Components 
  12893.  
  12894. Files: 
  12895. dce\service.idl 
  12896. dce\dce_svc.h 
  12897.  
  12898.  
  12899. ΓòÉΓòÉΓòÉ 3.10.3. dce_assert ΓòÉΓòÉΓòÉ
  12900.  
  12901.  Purpose 
  12902.  
  12903.           Inserts program diagnostics. 
  12904.  
  12905.  Format 
  12906.  
  12907.                     #define DCE_ASSERT
  12908.                     #include <dce\assert.h>
  12909.  
  12910.                     void dce_assert(
  12911.                             dce_svc_handle_t  handle,
  12912.                             int  expression);
  12913.  
  12914.  Parameters 
  12915.  
  12916.           Input 
  12917.  
  12918.           handle        A registered serviceability handle. 
  12919.  
  12920.           expression    An expression that is to be tested for truth. 
  12921.  
  12922.  Usage 
  12923.  
  12924.           The dce_assert macro is used to add runtime "can't happen" assertions 
  12925.           to programs (that is, programming errors). On execution, when 
  12926.           expression evaluates to 0 (that is, to FALSE), dce_svc_printf is 
  12927.           called with parameters to generate a message identifying the 
  12928.           expression, source file, and line number. The message is generated 
  12929.           with a severity level of svc_c_sev_fatal, with the svc_c_action_abort 
  12930.           flag specified (which causes the program to end when the assertion 
  12931.           fails and the message is generated). See the dce_svc_register 
  12932.           reference page for more information. 
  12933.  
  12934.           The handle parameter should be a registered serviceability handle; it 
  12935.           can also be NULL, which means that an internal serviceability handle 
  12936.           is used. 
  12937.  
  12938.           Assertion-checking can be enabled or disabled at compile time.  The 
  12939.           header file dce\assert.h can be included multiple times. If 
  12940.           DCE_ASSERT is defined before the header is included, assertion 
  12941.           checking is performed. If it is not so defined, the 
  12942.           assertion-checking code is not compiled in.  The system default is 
  12943.           set in dce\dce.h. 
  12944.  
  12945.  Related Information 
  12946.  
  12947.           Routines: 
  12948.           dce_svc_register 
  12949.  
  12950.  
  12951. ΓòÉΓòÉΓòÉ 3.10.4. DCE_SVC_DEBUG ΓòÉΓòÉΓòÉ
  12952.  
  12953.  Purpose 
  12954.  
  12955.           Output a serviceability debug message. 
  12956.  
  12957.  Format 
  12958.  
  12959.                     #include <dce\dce.h>
  12960.  
  12961.                     DCE_SVC_DEBUG((
  12962.                             dce_svc_handle_t  handle,
  12963.                             const unsigned32  table_index,
  12964.                             unsigned32  debug_level,
  12965.                             char  *format,
  12966.                             ...));
  12967.  
  12968.  Parameters 
  12969.  
  12970.           Input 
  12971.  
  12972.           handle        The caller's serviceability handle. 
  12973.  
  12974.           table_index   The message's subcomponent name (defined in the sams 
  12975.                         file). 
  12976.  
  12977.           debug_level   Serviceability debug level for the message. 
  12978.  
  12979.           format        The message string. 
  12980.  
  12981.           ...           Format arguments, if any. 
  12982.  
  12983.  Usage 
  12984.  
  12985.           The DCE_SVC_DEBUG macro is used to generate debugging output. Because 
  12986.           it is a macro that takes a variable number of arguments, the entire 
  12987.           parameter list must be enclosed in two sets of parentheses. The 
  12988.           handle and table_index parameters are as described for 
  12989.           dce_svc_printf. 
  12990.  
  12991.           In contrast to the normal operation of the serviceability interface, 
  12992.           DCE_SVC_DEBUG requires the caller to specify the message as a string 
  12993.           literal in the call, rather than to define it in the application's 
  12994.           sams file with a message ID. 
  12995.  
  12996.           The debug_level argument indicates the level of detail associated 
  12997.           with this message and must be in the range svc_c_debug1 to 
  12998.           svc_c_debug9. 
  12999.  
  13000.           The value of debug_level associates the message with one of nine 
  13001.           levels, and whether the message is actually generated at run time 
  13002.           depends on the debugging level that has been set for the application. 
  13003.           The level can be set by the application itself (by a call to 
  13004.           dce_svc_debug_set_levels or dce_svc_debug_routing) or by the value of 
  13005.           an environment variable or a serviceability routing file; see 
  13006.           svcroute for further information. 
  13007.  
  13008.           The significance of the various levels is application-defined, but in 
  13009.           general, the higher levels (numbers) imply more detail in debugging 
  13010.           output. 
  13011.  
  13012.           The format and ... parameters are passed directly to fprintf or its 
  13013.           equivalent. 
  13014.  
  13015.  Related Information 
  13016.  
  13017.           Routines: 
  13018.           dce_svc_debug_routing 
  13019.           dce_svc_debug_set_levels 
  13020.           dce_svc_printf 
  13021.           dce_svc_routing 
  13022.  
  13023.           Files: 
  13024.           var\svc\routing 
  13025.  
  13026.  
  13027. ΓòÉΓòÉΓòÉ 3.10.5. DCE_SVC_DEBUG_ATLEAST ΓòÉΓòÉΓòÉ
  13028.  
  13029.  Purpose 
  13030.  
  13031.           Tests a component's serviceability debug level. 
  13032.  
  13033.  Format 
  13034.  
  13035.                     #include <dce\dce.h>
  13036.  
  13037.                     DCE_SVC_DEBUG_ATLEAST(
  13038.                             dce_svc_handle_t  handle,
  13039.                             const unsigned32  table_index,
  13040.                             unsigned32  debug_level);
  13041.  
  13042.  Parameters 
  13043.  
  13044.           Input 
  13045.  
  13046.           handle        The caller's serviceability handle. 
  13047.  
  13048.           table_index   The subcomponent name (defined in the sams file) that 
  13049.                         is being tested for debug level. 
  13050.  
  13051.           debug_level   Debug level being tested. 
  13052.  
  13053.  Usage 
  13054.  
  13055.           If serviceability debug code was enabled (by defining DCE_DEBUG) 
  13056.           during compilation, the DCE_SVC_DEBUG_ATLEAST and DCE_SVC_DEBUG_IS 
  13057.           macros can be used to test the debug level of a subcomponent 
  13058.           (specified by table_index) for the specified handle. 
  13059.           DCE_SVC_DEBUG_ATLEAST tests whether the debug level is at least at 
  13060.           the specified level.  DCE_SVC_DEBUG_IS tests for an exact match with 
  13061.           the specified level. In either case, the specified level should be a 
  13062.           number between 1 and 9. 
  13063.  
  13064.  Related Information 
  13065.  
  13066.           Macros: 
  13067.           DCE_SVC_DEBUG 
  13068.           DCE_SVC_DEBUG_IS 
  13069.           DCE_SVC_LOG 
  13070.  
  13071.  
  13072. ΓòÉΓòÉΓòÉ 3.10.6. DCE_SVC_DEBUG_IS ΓòÉΓòÉΓòÉ
  13073.  
  13074.  Purpose 
  13075.  
  13076.           Tests a component's serviceability debug level. 
  13077.  
  13078.  Format 
  13079.  
  13080.                     #include <dce\dce.h>
  13081.  
  13082.                     DCE_SVC_DEBUG_IS(
  13083.                             dce_svc_handle_t  handle,
  13084.                             const unsigned32  table_index,
  13085.                             unsigned32  debug_level);
  13086.  
  13087.  Parameters 
  13088.  
  13089.           Input 
  13090.  
  13091.           handle        The caller's serviceability handle. 
  13092.  
  13093.           table_index   The name of the subcomponent (defined in the sams file) 
  13094.                         that is being tested for debug level. 
  13095.  
  13096.           debug_level   The serviceability debug level being tested. 
  13097.  
  13098.  Usage 
  13099.  
  13100.           If serviceability debug code was enabled (by defining DCE_DEBUG) 
  13101.           during compilation, the DCE_SVC_DEBUG_ATLEAST and DCE_SVC_DEBUG_IS 
  13102.           macros can be used to test the debug level of a subcomponent 
  13103.           (specified by table_index) for the specified handle. 
  13104.           DCE_SVC_DEBUG_ATLEAST tests whether the debug level is at least at 
  13105.           the specified level. DCE_SVC_DEBUG_IS tests for an exact match with 
  13106.           the specified level.  In either case, the specified level should be a 
  13107.           number between 1 and 9. 
  13108.  
  13109.  Related Information 
  13110.  
  13111.           Macros: 
  13112.           DCE_SVC_DEBUG 
  13113.           DCE_SVC_DEBUG_ATLEAST 
  13114.           DCE_SVC_LOG 
  13115.  
  13116.  
  13117. ΓòÉΓòÉΓòÉ 3.10.7. DCE_SVC_DEFINE_HANDLE ΓòÉΓòÉΓòÉ
  13118.  
  13119.  Purpose 
  13120.  
  13121.           Creates a serviceability handle. 
  13122.  
  13123.  Format 
  13124.  
  13125.                     #include <dce\dce.h>
  13126.  
  13127.                     DCE_SVC_DEFINE_HANDLE(dce_svc_handle_t  handle,
  13128.                             dce_svc_subcomp_t  *table,
  13129.                             const idl_char  *component_name);
  13130.  
  13131.  Parameters 
  13132.  
  13133.           Input 
  13134.  
  13135.           table         A message table structure (defined in a header file 
  13136.                         generated by sams during compilation). 
  13137.  
  13138.           component_name The serviceability name of the component, defined in 
  13139.                         the component field of the sams file. 
  13140.  
  13141.           Output 
  13142.  
  13143.           handle        A serviceability handle structure filled in by the 
  13144.                         macro. 
  13145.  
  13146.  Usage 
  13147.  
  13148.           There are two ways to register a serviceability table before using 
  13149.           the serviceability interface in an application. The first is to 
  13150.           create a global variable using the DCE_SVC_DEFINE_HANDLE macro. The 
  13151.           handle parameter is the serviceability handle, table is a pointer to 
  13152.           the component's message table, and component_name is the name of the 
  13153.           serviceability component (application). The macro creates a skeleton 
  13154.           variable that is completed the first time the handle is used.  This 
  13155.           can be useful when writing library code that has no explicit 
  13156.           initialization routine. 
  13157.  
  13158.           The second method is to call the dce_svc_register routine. 
  13159.  
  13160.  Notes 
  13161.  
  13162.           Syntax errors will occur under some compile-time environments if 
  13163.           spaces are inserted between the parentheses and the parameters. This 
  13164.           macro defines data structures, not executable code. Therefore, you 
  13165.           must include it in the global definitions section of a program. 
  13166.  
  13167.   Related Information 
  13168.  
  13169.           Routines: 
  13170.           dce_svc_register 
  13171.  
  13172.  
  13173. ΓòÉΓòÉΓòÉ 3.10.8. DCE_SVC_LOG ΓòÉΓòÉΓòÉ
  13174.  
  13175.  Purpose 
  13176.  
  13177.           Outputs a binary form of a serviceability debug message. 
  13178.  
  13179.  Format 
  13180.  
  13181.                     #include <dce\dce.h>
  13182.  
  13183.                     DCE_SVC_LOG((
  13184.                             dce_svc_handle_t  handle,
  13185.                             const unsigned32  table_index,
  13186.                             unsigned32  debug_level,
  13187.                             const unsigned32  messageid,
  13188.                             ...));
  13189.  
  13190.  Parameters 
  13191.  
  13192.           Input 
  13193.  
  13194.           handle        The caller's serviceability handle. 
  13195.  
  13196.           table_index   The message's subcomponent name (defined in the sams 
  13197.                         file). 
  13198.  
  13199.           debug_level   Serviceability debug level for the message. 
  13200.  
  13201.           messageid     A message ID, defined in the message's code field in 
  13202.                         the sams file. 
  13203.  
  13204.           ...           Any format arguments for the message string. 
  13205.  
  13206.  Usage 
  13207.  
  13208.           The DCE_SVC_LOG macro is used to generate debugging output based on a 
  13209.           message defined in an application's sams file (in this respect it is 
  13210.           unlike DCE_SVC_DEBUG, where the message is specified as a literal 
  13211.           string parameter). Because it is a macro that takes a variable number 
  13212.           of arguments, the entire parameter list must be enclosed in two sets 
  13213.           of parentheses. The handle and table_index parameters are as 
  13214.           described for dce_svc_printf. 
  13215.  
  13216.           DCE_SVC_LOG generates a record in the serviceability binary format; 
  13217.           it is not a conventional serviceability message as such. When the 
  13218.           binary log is read (see svcdumplog), the text of the message is 
  13219.           reconstructed from the application's installed message catalog. 
  13220.  
  13221.           The debug_level argument indicates the level of detail associated 
  13222.           with the message and must be in the range svc_c_debug1 to 
  13223.           svc_c_debug9. 
  13224.  
  13225.           The value of debug_level associates the message with one of nine 
  13226.           levels, and whether the message is actually generated at run time 
  13227.           depends on the debugging level that has been set for the application. 
  13228.           The level can be set by the application itself (by a call to 
  13229.           dce_svc_debug_set_levels or dce_svc_debug_routing) or by the value of 
  13230.           an environment variable or a serviceability routing file; see 
  13231.           svcroute for further information. 
  13232.  
  13233.           The significance of the various levels is application-defined, but in 
  13234.           general the higher levels (numbers) imply more detail in debugging 
  13235.           output. 
  13236.  
  13237.  Related Information 
  13238.  
  13239.           Macros: 
  13240.           DCE_SVC_DEBUG 
  13241.           DCE_SVC_DEBUG_ATLEAST 
  13242.           DCE_SVC_DEBUG_IS 
  13243.  
  13244.           Files: 
  13245.           var\svc\routing 
  13246.  
  13247.  
  13248. ΓòÉΓòÉΓòÉ 3.11. The DCE Host Daemon Routines ΓòÉΓòÉΓòÉ
  13249.  
  13250. This introduces the DCE Host Daemon application programming interface: the dced 
  13251. API. This API gives management applications remote access to various data, 
  13252. servers, and services on DCE hosts. Servers manage their own configuration in 
  13253. the local dced by using the routines starting with dce_server, introduced in 
  13254. The DCE Server Routines. 
  13255.  
  13256. See the following subtopics for more information: 
  13257.  
  13258.       The dced API Naming Conventions 
  13259.       dced Binding Routines 
  13260.       Generic Entry Routines 
  13261.       Generic Routines to Read Data Objects 
  13262.       Host Data Management Routines 
  13263.       Server Configuration Control Routines 
  13264.       Server Execution Control Routines 
  13265.       Security Validation Routines 
  13266.       Key Table Management Routines 
  13267.       Host Daemon Data Types and Structures 
  13268.       Related Information for Host Daemon 
  13269.  
  13270.  
  13271. ΓòÉΓòÉΓòÉ 3.11.1. The dced API Naming Conventions ΓòÉΓòÉΓòÉ
  13272.  
  13273. All of the dced API routine names begin with the dced_ prefix. This API 
  13274. contains some specialized routines that operate on services represented by the 
  13275. following keywords in the routine names: 
  13276.  
  13277.  hostdata       The host data management service stores host-specific data such 
  13278.                 as the DCE host name, the host's cell name, and other data, and 
  13279.                 it provides access to these data items. 
  13280.  
  13281.  server         The server control service configures, starts, and stops 
  13282.                 servers, among other things. Applications must distinguish two 
  13283.                 general states of server control: server configuration 
  13284.                 (srvrconf) and server execution (srvrexec). 
  13285.  
  13286.  secval         The security validation service maintains a host's principal 
  13287.                 identity and ensures applications that the DCE Security daemon 
  13288.                 is genuine. 
  13289.  
  13290.  keytab         The key table management service remotely manages key tables. 
  13291.  
  13292.  The dced also provides the endpoint mapper service, which has its own API, 
  13293.  described with the RPC API. These routines begin with rpc_ep_ and 
  13294.  rpc_mgmt_ep_. 
  13295.  
  13296.  Because some of the dced daemon services require the same operations (but on 
  13297.  different data types), the dced API also contains generic routines that can 
  13298.  operate on more than one of the preceding services. For example, you use the 
  13299.  routine dced_object_read to read a data item (object) from the hostdata, 
  13300.  srvrconf, srvrexec, or keytab services. 
  13301.  
  13302.  
  13303. ΓòÉΓòÉΓòÉ 3.11.2. dced Binding Routines ΓòÉΓòÉΓòÉ
  13304.  
  13305. A binding must be established to a dced service on a particular host before you 
  13306. can use any other dced routines. The resources of the dced binding should also 
  13307. be released when an application is finished with the service. 
  13308.  
  13309.  dced_binding_create             Establishes a dced binding to a host service. 
  13310.  
  13311.  dced_binding_from_rpc_binding   Establishes a dced binding to a dced service 
  13312.                                  on the host specified in a previously 
  13313.                                  established RPC binding handle to any server. 
  13314.  
  13315.  dced_binding_set_auth_info      Sets authentication, authorization, and 
  13316.                                  protection level information for a dced 
  13317.                                  binding handle. 
  13318.  
  13319.  dced_binding_free               Releases the resources of a dced binding 
  13320.                                  handle. 
  13321.  
  13322.  
  13323. ΓòÉΓòÉΓòÉ 3.11.3. Generic Entry Routines ΓòÉΓòÉΓòÉ
  13324.  
  13325. All data maintained by dced is managed as entries.  Most of the services of 
  13326. dced have lists of entries traversed with a cursor that describe where the 
  13327. actual data is maintained. 
  13328.  
  13329.  dced_entry_add              Adds a keytab or hostdata entry. 
  13330.  
  13331.  dced_entry_get_next         Obtains the next data entry from a list of 
  13332.                              entries. 
  13333.  
  13334.  dced_entry_remove           Removes a hostdata or keytab data entry from dced. 
  13335.  
  13336.  dced_initialize_cursor      Obtains a list of data entries from dced and sets 
  13337.                              a cursor at the beginning of the list. 
  13338.  
  13339.  dced_release_cursor         Releases the resources associated with a cursor 
  13340.                              that traverses a service's list of entries. 
  13341.  
  13342.  dced_list_get               Returns the list of data entries maintained by a 
  13343.                              DCE Host service. 
  13344.  
  13345.  dced_list_release           Releases the resources of a list of entries. 
  13346.  
  13347.  dced_inq_id                 Obtains the UUID associated with an entry name. 
  13348.  
  13349.  dced_inq_name               Obtains the name associated with an entry UUID. 
  13350.  
  13351.  
  13352. ΓòÉΓòÉΓòÉ 3.11.4. Generic Routines to Read Data Objects ΓòÉΓòÉΓòÉ
  13353.  
  13354. These routines obtain the actual data for items to which entries refer 
  13355. (objects). 
  13356.  
  13357.  dced_object_read            Reads one data item of a dced service, based on 
  13358.                              the entry UUID. 
  13359.  
  13360.  dced_object_read_all        Reads all the data of a dced service's entry list. 
  13361.  
  13362.  dced_objects_release        Releases the resources allocated for data 
  13363.                              obtained. 
  13364.  
  13365.  
  13366. ΓòÉΓòÉΓòÉ 3.11.5. Host Data Management Routines ΓòÉΓòÉΓòÉ
  13367.  
  13368.  dced_hostdata_create        Creates a hostdata item and the associated entry. 
  13369.  
  13370.  dced_hostdata_read          Reads a hostdata item. 
  13371.  
  13372.  dced_hostdata_write         Replaces an existing hostdata item. 
  13373.  
  13374.  dced_hostdata_delete        Deletes a hostdata item from a specific host and 
  13375.                              removes the associated entry. 
  13376.  
  13377.  
  13378. ΓòÉΓòÉΓòÉ 3.11.6. Server Configuration Control Routines ΓòÉΓòÉΓòÉ
  13379.  
  13380.  dced_server_create          Creates a DCE server's configuration data. 
  13381.  
  13382.  dced_server_modify_attributes Modifies a DCE server's configuration data. 
  13383.  
  13384.  dced_server_delete          Deletes a DCE server's configuration data. 
  13385.  
  13386.  dced_server_start           Starts a DCE-configured server. 
  13387.  
  13388.  
  13389. ΓòÉΓòÉΓòÉ 3.11.7. Server Execution Control Routines ΓòÉΓòÉΓòÉ
  13390.  
  13391.  dced_server_disable_if      Disables a service provided by a server. 
  13392.  
  13393.  dced_server_enable_if       Re-enables a service provided by a server. 
  13394.  
  13395.  dced_server_stop            Stops a DCE-configured server. 
  13396.  
  13397.  
  13398. ΓòÉΓòÉΓòÉ 3.11.8. Security Validation Routines ΓòÉΓòÉΓòÉ
  13399.  
  13400.  dced_secval_start           Starts a host's security validation service. 
  13401.  
  13402.  dced_secval_validate        Validates that the DCE Security daemon (secd) used 
  13403.                              by a specific host is legitimate. 
  13404.  
  13405.  dced_secval_status          Returns a status parameter of TRUE if the security 
  13406.                              validation service is activated and FALSE if it is 
  13407.                              not activated. 
  13408.  
  13409.  dced_secval_stop            Stops a host's security validation service. 
  13410.  
  13411.  
  13412. ΓòÉΓòÉΓòÉ 3.11.9. Key Table Management Routines ΓòÉΓòÉΓòÉ
  13413.  
  13414.  dced_keytab_create          Creates a key table with a list of keys in a new 
  13415.                              file. 
  13416.  
  13417.  dced_keytab_delete          Deletes a key table file and removes the 
  13418.                              associated entry. 
  13419.  
  13420.  dced_keytab_initialize_cursor Obtains a list of keys from a key table and sets 
  13421.                              a cursor at the beginning of the list. 
  13422.  
  13423.  dced_keytab_get_next_key    Returns a key from a cached list and advances the 
  13424.                              cursor. 
  13425.  
  13426.  dced_keytab_release_cursor  Releases the resources associated with a cursor 
  13427.                              that traverses a key table. 
  13428.  
  13429.  dced_keytab_add_key         Adds a key to a key table. 
  13430.  
  13431.  dced_keytab_change_key      Changes a key in both a key table and in the 
  13432.                              security registry. 
  13433.  
  13434.  dced_keytab_remove_key      Removes a key from a key table. 
  13435.  
  13436.  
  13437. ΓòÉΓòÉΓòÉ 3.11.10. Host Daemon Data Types and Structures ΓòÉΓòÉΓòÉ
  13438.  
  13439. The following data types used with the dced API are defined in 
  13440. dce\dced_base.idl and are shown here in alphabetical order. 
  13441.  
  13442.  dced_attr_list_t         This data structure specifies the configuration 
  13443.                           attributes to use when you start a server with dced. 
  13444.                           The structure consists of the following: 
  13445.  
  13446.                                count     An unsigned32 number representing the 
  13447.                                          number of attributes in the list. 
  13448.  
  13449.                                list      An array of configuration attributes 
  13450.                                          where each element is of type 
  13451.                                          sec_attr_t. This data type is 
  13452.                                          described in DCE Security Services 
  13453.                                          API. For dced, the list[i].attr_id 
  13454.                                          field can have values of either 
  13455.                                          dced_g_uuid_fileattr, specifying plain 
  13456.                                          text, or dced_g_uuid_binfileattr, 
  13457.                                          specifying binary data. 
  13458.  
  13459.  dced_binding_handle_t    A dced binding handle is an opaque pointer that 
  13460.                           refers to information that includes a dced service 
  13461.                           (hostdata, srvrconf, srvrexec, secval, or keytab) and 
  13462.                           RPC binding information for a specific DCE Host 
  13463.                           daemon. 
  13464.  
  13465.  dced_cursor_t            The entry list cursor is an opaque pointer used to 
  13466.                           keep track of a location in an entry list between 
  13467.                           calls that traverse the list. 
  13468.  
  13469.  dced_entry_t             An entry is the structure that contains information 
  13470.                           about a data item (or object) maintained by a dced 
  13471.                           service. The actual data is maintained elsewhere. 
  13472.                           Each entry consists of the following structure 
  13473.                           members: 
  13474.  
  13475.                                id             A unique identifier of type 
  13476.                                               uuid_t that dced maintains for 
  13477.                                               every data item it maintains. 
  13478.  
  13479.                                name           The name for the data item. The 
  13480.                                               data type is dced_string_t. 
  13481.  
  13482.                                description    A brief description of the data 
  13483.                                               item (of type dced_string_t) for 
  13484.                                               the convenience of human users. 
  13485.  
  13486.                                storage_tag    A string of type dced_string_t 
  13487.                                               describing the location of the 
  13488.                                               actual data. This is 
  13489.                                               implementation-specific and can 
  13490.                                               be a file (with a path name) on 
  13491.                                               the host system or a storage 
  13492.                                               identifier for the dced process. 
  13493.  
  13494.  dced_entry_list_t        An entry list is a uniform way to list the data items 
  13495.                           a dced service maintains. The entry list structure 
  13496.                           contains a list of all the entries for a given 
  13497.                           service. For example, the complete list of all 
  13498.                           entries of hostdata, server configuration data, 
  13499.                           server execution data, and keytab data are each 
  13500.                           maintained in separate entry lists. The structure 
  13501.                           consists of the following: 
  13502.  
  13503.                                count     An unsigned32 number representing the 
  13504.                                          number of entries in the list. 
  13505.  
  13506.                                list      An array of entries where each element 
  13507.                                          is of type dced_entry_t. 
  13508.  
  13509.  dced_key_t               A key consists of the following structure members: 
  13510.  
  13511.                                principal           A dced_string_t type string 
  13512.                                                    representing the principal 
  13513.                                                    for the key. 
  13514.  
  13515.                                version             An unsigned32 number 
  13516.                                                    representing the version 
  13517.                                                    number of the key. 
  13518.  
  13519.                                authn_service       An unsigned32 number 
  13520.                                                    representing the 
  13521.                                                    authentication service used. 
  13522.  
  13523.                                passwd              A pointer to a password. 
  13524.                                                    This is of type 
  13525.                                                    sec_passwd_rec_t. See also 
  13526.                           DCE Security Services API. 
  13527.  
  13528.  dced_key_list_t          A key list contains all the keys for a given key 
  13529.                           table and consists of the following structure 
  13530.                           elements: 
  13531.  
  13532.                                count     An unsigned32 number representing the 
  13533.                                          number of keys in the list. 
  13534.  
  13535.                                list      An array of keys where each element is 
  13536.                                          of type dced_key_t. 
  13537.  
  13538.  dced_keytab_cursor_t     The keytab cursor is an opaque pointer used to keep 
  13539.                           track of a location in a key list between calls that 
  13540.                           traverse the list. 
  13541.  
  13542.  dced_opnum_list_t        A list of operation numbers is used in the service_t 
  13543.                           structure. This structure consists of the following 
  13544.                           fields: 
  13545.  
  13546.                                count     An unsigned32 number representing the 
  13547.                                          number of operations in the list. 
  13548.  
  13549.                                list      An array of UUIDs where each element 
  13550.                                          is of type uuid_t. 
  13551.  
  13552.  dced_service_type_t      The dced service type distinguishes the services 
  13553.                           provided by dced. It is an enumerated type used 
  13554.                           mainly in a parameter of the 
  13555.                           dced_binding_from_rpc_binding routine. It can have 
  13556.                           one of the following values: 
  13557.  
  13558.                                dced_e_service_type_hostdata    The host data 
  13559.                                                                management 
  13560.                                                                service 
  13561.  
  13562.                                dced_e_service_type_srvrconf    The server 
  13563.                                                                configuration 
  13564.                                                                management 
  13565.                                                                service 
  13566.  
  13567.                                dced_e_service_type_srvrexec    The server 
  13568.                                                                execution 
  13569.                                                                management 
  13570.                                                                service 
  13571.  
  13572.                                dced_e_service_type_secval      The security 
  13573.                                                                validation 
  13574.                                                                service 
  13575.  
  13576.                                dced_e_service_type_keytab      The key table 
  13577.                                                                management 
  13578.                                                                service 
  13579.  
  13580.                                dced_e_service_type_null        A NULL service 
  13581.                                                                type used 
  13582.                                                                internally 
  13583.  
  13584.  dced_string_t            This data type is a character string from the 
  13585.                           Portable Character Set (PCS). 
  13586.  
  13587.  dced_string_list_t       A list of strings with the following format: 
  13588.  
  13589.                                count     An unsigned32 number representing the 
  13590.                                          number of strings in the list. 
  13591.  
  13592.                                list      An array of strings where each element 
  13593.                                          is of type dced_string_t. 
  13594.  
  13595.  dced_tower_list_t        A list of protocol towers used in the service_t 
  13596.                           structure. This structure consists of the following 
  13597.                           fields: 
  13598.  
  13599.                                count     An unsigned32 number representing the 
  13600.                                          number of protocol towers in the list. 
  13601.  
  13602.                                list      An array of pointers where each 
  13603.                                          element is a pointer to a protocol 
  13604.                                          tower of the type 
  13605.                                          sec_attr_twr_set_p_t. This data type 
  13606.                                          is described in DCE Security Services 
  13607.                                          API. 
  13608.  
  13609.  server_fixedattr_t       This structure is a field in the server_t structure. 
  13610.                           It contains the following fields: 
  13611.  
  13612.                                startupflags     This field is of type 
  13613.                                                 unsigned32 and can be any 
  13614.                                                 combination of the following 
  13615.                                                 bits: 
  13616.  
  13617.                                                      server_c_startup_at_boot 
  13618.                                                                This means that 
  13619.                                                                dced should 
  13620.                                                                start the server 
  13621.                                                                when dced is 
  13622.                                                                started. 
  13623.  
  13624.                                                      server_c_startup_auto This 
  13625.                                                                means that the 
  13626.                                                                server can be 
  13627.                                                                started 
  13628.                                                                automatically if 
  13629.                                                                dced determines 
  13630.                                                                there is a need. 
  13631.  
  13632.                                                      server_c_startup_explicit 
  13633.                                                                This means dced 
  13634.                                                                can start the 
  13635.                                                                server if it 
  13636.                                                                receives an 
  13637.                                                                explicit command 
  13638.                                                                to do so from 
  13639.                                                                dced_server_start 
  13640.                                                                or the dcecp 
  13641.                                                                operation server 
  13642.                                                                start. 
  13643.  
  13644.                                                      server_c_startup_on_failure 
  13645.                                                                This means that 
  13646.                                                                the server 
  13647.                                                                should be 
  13648.                                                                restarted by 
  13649.                                                                dced if it exits 
  13650.                                                                with an 
  13651.                                                                unsuccessful 
  13652.                                                                exit status. 
  13653.  
  13654.                                                 Several bits are also reserved 
  13655.                                                 for vendor-specific startup and 
  13656.                                                 include: 
  13657.  
  13658.                                                      server_c_startup_vendor1 
  13659.                                                      server_c_startup_vendor2 
  13660.                                                      server_c_startup_vendor3 
  13661.                                                      server_c_startup_vendor4 
  13662.  
  13663.                                flags            This represents the execution 
  13664.                                                 state of the server and is the 
  13665.                                                 unsigned32 type. This field is 
  13666.                                                 maintained by dced only and 
  13667.                                                 should not be modified. Valid 
  13668.                                                 values to check for are 
  13669.                                                 self-explanatory and include 
  13670.                                                 the following: 
  13671.  
  13672.                                                      server_c_exec_notrunning 
  13673.                                                      server_c_exec_running 
  13674.  
  13675.                                Several bits are also reserved for 
  13676.                                vendor-specific execution states and include: 
  13677.  
  13678.                                                      server_c_exec_vendor1 
  13679.                                                      server_c_exec_vendor2 
  13680.                                                      server_c_exec_vendor3 
  13681.                                                      server_c_exec_vendor4 
  13682.  
  13683.                                program          This is the full path name of 
  13684.                                                 the server and is of type 
  13685.                                                 dced_string_t. 
  13686.  
  13687.                                arguments        This is a list of arguments for 
  13688.                                                 the server and is of type 
  13689.                                                 dced_string_list_t. 
  13690.  
  13691.                                prerequisites    This is an advisory field that 
  13692.                                                 means this server is a client 
  13693.                                                 of other prerequisite servers 
  13694.                                                 whose IDs are in a list of type 
  13695.                                                 uuid_list_t. The UUIDs should 
  13696.                                                 be the id fields from the 
  13697.                                                 server_t structures of the 
  13698.                                                 relevant servers. 
  13699.  
  13700.                                keytables        This is a list of keytab entry 
  13701.                                                 UUIDs representing the key 
  13702.                                                 tables for this server and is 
  13703.                                                 of type uuid_list_t. 
  13704.  
  13705.                                posix_uid        This is a POSIX execution 
  13706.                                                 attribute for the user ID. It 
  13707.                                                 is of type unsigned32. 
  13708.  
  13709.                                posix_gid        This is a POSIX execution 
  13710.                                                 attribute for the group ID. It 
  13711.                                                 is of type unsigned32. 
  13712.  
  13713.                                posix_dir        This is a POSIX execution 
  13714.                                                 attribute for the directory 
  13715.                                                 where the server started when 
  13716.                                                 it is invoked. It is of type 
  13717.                                                 dced_string_t. 
  13718.  
  13719.  server_t                 The DCE Host daemon describes a server as follows: 
  13720.  
  13721.                                id             Each server has a unique ID of 
  13722.                                               type uuid_t. 
  13723.  
  13724.                                name           Each server's name is of type 
  13725.                                               dced_string_t. 
  13726.  
  13727.                                entryname      The server's entry name is a hint 
  13728.                                               as to where the server occurs in 
  13729.                                               the name space. This is of type 
  13730.                                               dced_string_t. 
  13731.  
  13732.                                services       Each server offers a list of 
  13733.                                               services specified in a list of 
  13734.                                               type service_list_t.  This 
  13735.                                               structure has the following 
  13736.                                               members: 
  13737.  
  13738.                                                    count     An unsigned32 
  13739.                                                              number 
  13740.                                                              representing the 
  13741.                                                              number of services 
  13742.                                                              in the list. 
  13743.  
  13744.                                                    list      A pointer to an 
  13745.                                                              array of services 
  13746.                                                              where each element 
  13747.                                                              is of type 
  13748.                                                              service_t. 
  13749.  
  13750.                                fixed          This is a set of attributes 
  13751.                                               common to all DCE 
  13752.                                               implementations.  The data type 
  13753.                                               is server_fixedattr_t. 
  13754.  
  13755.                                attributes     This field is of type 
  13756.                                               dced_attr_list_t and contains a 
  13757.                                               list of attributes representing 
  13758.                                               the behavior specific to a 
  13759.                                               particular server or host. 
  13760.  
  13761.                                prin_names     This field is a list of principal 
  13762.                                               names for the server and is of 
  13763.                                               type dced_string_list_t. 
  13764.  
  13765.                                exec_data      Data about an executing server is 
  13766.                                               maintained in a tagged union 
  13767.                                               (named tagged_union) with a 
  13768.                                               discriminator of type unsigned32 
  13769.                                               named execstate representing the 
  13770.                                               server's execution state. The 
  13771.                                               union has the following two 
  13772.                                               execution states: 
  13773.  
  13774.                                                    server_c_exec_notrunning For 
  13775.                                                              the case where the 
  13776.                                                              server is not 
  13777.                                                              running, the union 
  13778.                                                              member has no 
  13779.                                                              value. For 
  13780.                                                              example: 
  13781.  
  13782.                                                                                                                           if(server->exec_data.execstate ==
  13783.                                                                                                                                      server_c_exec_notrunning)
  13784.                                                                                                                              server->exec_data.tagged_union = NULL;
  13785.  
  13786.                                                    server_c_exec_running For 
  13787.                                                              the case where the 
  13788.                                                              server is running, 
  13789.                                                              and the value of 
  13790.                                                              the union member 
  13791.                                                              is a 
  13792.                                                              srvrexec_data_t 
  13793.                                                              data type named 
  13794.                                                              running_data. A 
  13795.                                                              srvrexec_data_t 
  13796.                                                              structure contains 
  13797.                                                              the following 
  13798.                                                              members: 
  13799.  
  13800.                                                                   instance  Each 
  13801.                                                                             instance 
  13802.                                                                             of 
  13803.                                                                             a 
  13804.                                                                             server 
  13805.                                                                             on 
  13806.                                                                             a 
  13807.                                                                             host 
  13808.                                                                             is 
  13809.                                                                             identified 
  13810.                                                                             with 
  13811.                                                                             a 
  13812.                                                                             UUID 
  13813.                                                                             (type 
  13814.                                                                             uuid_t). 
  13815.  
  13816.                                                                   posix_pid 
  13817.                                                                             Each 
  13818.                                                                             server 
  13819.                                                                             has 
  13820.                                                                             a 
  13821.                                                                             POSIX 
  13822.                                                                             process 
  13823.                                                                             ID 
  13824.                                                                             of 
  13825.                                                                             type 
  13826.                                                                             unsigned32. 
  13827.  
  13828.  service_t                This structure describes each service offered by a 
  13829.                           server. The server_t structure, described earlier, 
  13830.                           contains an array of these structures. The service_t 
  13831.                           structure contains the following fields: 
  13832.  
  13833.                                ifspec         An interface specification of 
  13834.                                               type rpc_if_id_t, generated by an 
  13835.                                               idl compilation of the interface 
  13836.                                               definition representing the 
  13837.                                               service. This data type is 
  13838.                                               described in The DCE Remote 
  13839.                                               Procedure Call API. 
  13840.  
  13841.                                ifname         An interface name of type 
  13842.                                               dced_string_t. 
  13843.  
  13844.                                annotation     An annotation about the purpose 
  13845.                                               of the interface (type 
  13846.                                               dced_string_t). This field is for 
  13847.                                               user display purposes only. 
  13848.  
  13849.                                flags          The flag field is of type 
  13850.                                               unsigned32 and currently has only 
  13851.                                               one bit field defined, 
  13852.                                               service_c_disabled. If this flag 
  13853.                                               is set, it indicates that the 
  13854.                                               service is not currently 
  13855.                                               available for the server. Also, 
  13856.                                               the dced Endpoint Mapper will not 
  13857.                                               map an endpoint to a disabled 
  13858.                                               service. Several values are also 
  13859.                                               reserved for vendor-specific use 
  13860.                                               and include 
  13861.  
  13862.                                                    service_c_vendor1 
  13863.                                                    service_c_vendor2 
  13864.                                                    service_c_vendor3 
  13865.                                                    service_c_vendor4 
  13866.  
  13867.                                entryname      The entry name (type 
  13868.                                               dced_string_t) is a clue to the 
  13869.                                               location of this service in the 
  13870.                                               name space. If the value is NULL, 
  13871.                                               the value in the entryname field 
  13872.                                               of the server_t structure is 
  13873.                                               used. 
  13874.  
  13875.                                objects        This is a list of objects 
  13876.                                               supported by the service. The 
  13877.                                               list is of type uuid_list_t. 
  13878.  
  13879.                                operations     This is a list of operation 
  13880.                                               numbers of type 
  13881.                                               dced_opnum_list_t.  This field is 
  13882.                                               not currently used. 
  13883.  
  13884.                                towers         This is a list of protocol towers 
  13885.                                               of type dced_tower_list_t, 
  13886.                                               specifying the endpoints where 
  13887.                                               this server can be reached. 
  13888.  
  13889.  srvrexec_stop_method_t   The server execution stop method is an enumerated 
  13890.                           type with one of the following values: 
  13891.  
  13892.                                srvrexec_stop_rpc      Stops the running server 
  13893.                                                       gracefully by letting the 
  13894.                                                       server complete all 
  13895.                                                       outstanding remote 
  13896.                                                       procedure calls. This 
  13897.                                                       causes dced to invoke the 
  13898.                                                       rpc_mgmt_server_stop_listening 
  13899.                                                       routine in that server. 
  13900.  
  13901.                                srvrexec_stop_soft     This uses a 
  13902.                                                       system-specific 
  13903.                                                       mechanism, such as the 
  13904.                                                       SIGTERM signal. It stops 
  13905.                                                       the running server with a 
  13906.                                                       mechanism that the server 
  13907.                                                       can ignore or intercept 
  13908.                                                       in order to do 
  13909.                                                       application-specific 
  13910.                                                       cleanup. 
  13911.  
  13912.                                srvrexec_stop_hard     This uses a 
  13913.                                                       system-specific 
  13914.                                                       mechanism, such as the 
  13915.                                                       SIGKILL signal. It stops 
  13916.                                                       the running server 
  13917.                                                       immediately with a 
  13918.                                                       mechanism that the server 
  13919.                                                       cannot intercept. 
  13920.  
  13921.                                srvrexec_stop_error    This uses a 
  13922.                                                       system-specific 
  13923.                                                       mechanism, such as the 
  13924.                                                       SIGABRT signal. The local 
  13925.                                                       operating system captures 
  13926.                                                       the server state before 
  13927.                                                       stopping it, and the 
  13928.                                                       server can also intercept 
  13929.                                                       it. 
  13930.  
  13931.  uuid_list_t              A list of UUIDs in the following format: 
  13932.  
  13933.                                count     An unsigned32 number representing the 
  13934.                                          number of UUIDs in the list. 
  13935.                                list      A pointer to an array of UUIDs where 
  13936.                                          each element is of type uuid_t. 
  13937.  
  13938.  
  13939. ΓòÉΓòÉΓòÉ 3.11.11. Related Information for Host Daemon ΓòÉΓòÉΓòÉ
  13940.  
  13941. Books: 
  13942. DCE for OS/2 Warp: Application Development Guide - Core Components 
  13943.  
  13944. Files: 
  13945. dce\dced_base.h 
  13946. dce\dced.h 
  13947. dce\dced_data.h 
  13948. dce\rpctypes.idl 
  13949. dce\passwd.idl 
  13950. dce\sec_attr_base.idl 
  13951.  
  13952.  
  13953. ΓòÉΓòÉΓòÉ 3.11.12. dced_binding_create ΓòÉΓòÉΓòÉ
  13954.  
  13955.  Purpose 
  13956.  
  13957.           Establishes a dced binding to one of the host services of a remote 
  13958.           (or the local) dced. 
  13959.  
  13960.  Format 
  13961.  
  13962.                     #include <dce\dced.h>
  13963.  
  13964.                     void dced_binding_create(
  13965.                              dced_string_t  service,
  13966.                              unsigned32  binding_flags,
  13967.                              dced_binding_handle_t  *dced_bh,
  13968.                              error_status_t  *status);
  13969.  
  13970.  Parameters 
  13971.  
  13972.           Input 
  13973.  
  13974.           service       A character string that specifies a host daemon service 
  13975.                         name and an optional remote host. A service name is 
  13976.                         specified with one of the following: hostdata, 
  13977.                         srvrconf, srvrexec, secval, or keytab. The format of a 
  13978.                         complete service and host specification is one of the 
  13979.                         following: 
  13980.  
  13981.                              service_name        A service at the local host. 
  13982.                                                  Pre-existing defined values 
  13983.                                                  include: 
  13984.  
  13985.                                                       dced_c_service_hostdata 
  13986.                                                       dced_c_service_srvrconf 
  13987.                                                       dced_c_service_srvrexec 
  13988.                                                       dced_c_service_secval 
  13989.                                                       dced_c_service_keytab 
  13990.  
  13991.                              service_name@hosts\host_name A service at a host 
  13992.                                                  anywhere in the local name 
  13993.                                                  space. 
  13994.  
  13995.                              \.:\hosts\host_name\config\service_name A complete 
  13996.                                                  specification for 
  13997.                                                  service_name@host, where the 
  13998.                                                  host is anywhere in the local 
  13999.                                                  name space. 
  14000.  
  14001.                              \...\cell\hosts\host_name\config\service_name A 
  14002.                                                  service at a host anywhere in 
  14003.                                                  the global name space. 
  14004.  
  14005.           binding_flags Currently, the only valid flag value is 
  14006.                         dced_c_binding_syntax_default. 
  14007.  
  14008.           Output 
  14009.  
  14010.           dced_bh       Returns a dced binding handle, which is a pointer to an 
  14011.                         opaque data structure containing information about an 
  14012.                         RPC binding, the host, the host service, and a local 
  14013.                         cache. 
  14014.  
  14015.           status        Returns the status code from this routine. This status 
  14016.                         code indicates whether the routine completed 
  14017.                         successfully or, if not, why not. The possible status 
  14018.                         codes are: 
  14019.  
  14020.                              error_status_ok 
  14021.                              dce_cf_e_no_mem 
  14022.                              dced_s_invalid_arg 
  14023.                              dced_s_no_memory 
  14024.                              dced_s_unknown_service 
  14025.                              rpc_s_entry_not_found 
  14026.                              rpc_s_incomplete_name 
  14027.                              rpc_s_invalid_object 
  14028.                              rpc_s_name_service_unavailable 
  14029.                              rpc_s_no_memory 
  14030.                              rpc_s_no_more_bindings 
  14031.                              rpc_s_no_ns_permission 
  14032.  
  14033.  Usage 
  14034.  
  14035.           The dced on each DCE host maintains the host services and provides a 
  14036.           remote interface to them.  The host services include: 
  14037.  
  14038.             o  Endpoint Mapper 
  14039.             o  Host Data Management (hostdata) 
  14040.             o  Server Management, including Server Configuration (srvrconf) and 
  14041.                Server Execution (srvrexec) 
  14042.             o  Security Validation (secval) 
  14043.             o  Key Table Management (keytab) 
  14044.  
  14045.           The dced_binding_create routine establishes a dced binding to a dced 
  14046.           service and it (or dced_binding_from_rpc_binding) must be the first 
  14047.           dced API routine called before an application can access one of the 
  14048.           host services with other dced API routines. When an application is 
  14049.           finished with the service, it should call the dced_binding_free 
  14050.           routine to free resources. To establish a dced binding to your local 
  14051.           host's dced, you can use the service name by itself, and do not need 
  14052.           to specify a host. 
  14053.  
  14054.           To access the endpoint map directly, use rpc_mgmt_ep_elt_inq_begin 
  14055.           and associated routines. 
  14056.  
  14057.  Examples 
  14058.  
  14059.           This example establishes a dced binding to the server configuration 
  14060.           service on the host patrick. 
  14061.  
  14062.                     dced_binding_handle_t dced_bh;
  14063.                     error_status_t status;
  14064.  
  14065.                     dced_binding_create("srvrconf@hosts\patrick",
  14066.                                         dced_c_binding_syntax_default,
  14067.                                         &dced_bh,
  14068.                                         &status);
  14069.                      .
  14070.                      .
  14071.                      .
  14072.                        /* Other routines including dced API routines. */
  14073.                      .
  14074.                      .
  14075.                      .
  14076.                     dced_binding_free(dced_bh, &status);
  14077.  
  14078.  Related Information 
  14079.  
  14080.           Routines: 
  14081.           dced_binding_free 
  14082.           dced_binding_from_rpc_binding 
  14083.  
  14084.           Books: 
  14085.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14086.  
  14087.  
  14088. ΓòÉΓòÉΓòÉ 3.11.13. dced_binding_free ΓòÉΓòÉΓòÉ
  14089.  
  14090.  Purpose 
  14091.  
  14092.           Releases the resources associated with a dced binding handle. 
  14093.  
  14094.  Format 
  14095.  
  14096.                     #include <dce\dced.h>
  14097.  
  14098.                     void dced_binding_free(
  14099.                              dced_binding_handle_t  dced_bh,
  14100.                              error_status_t  *status);
  14101.  
  14102.  Parameters 
  14103.  
  14104.           Input 
  14105.  
  14106.           dced_bh       Specifies a dced binding handle to free for a dced 
  14107.                         service on a specific host. 
  14108.  
  14109.           Output 
  14110.  
  14111.           status        Returns the status code from this routine. This status 
  14112.                         code indicates whether the routine completed 
  14113.                         successfully or, if not, why not. The possible status 
  14114.                         codes are: 
  14115.  
  14116.                              error_status_ok 
  14117.                              rpc_s_invalid_binding 
  14118.                              rpc_s_wrong_kind_of_binding 
  14119.  
  14120.  Usage 
  14121.  
  14122.           The dced_binding_free routine frees resources used by a dced binding 
  14123.           handle and referenced information. Use this routine when your 
  14124.           application has finished using a host service to break the 
  14125.           communication between your application and the dced. The dced binding 
  14126.           handle and referenced information is created with the 
  14127.           dced_binding_create or dced_binding_from_rpc_binding routine. 
  14128.  
  14129.  Related Information 
  14130.  
  14131.           Routines: 
  14132.           dced_binding_create 
  14133.           dced_binding_from_rpc_binding 
  14134.  
  14135.           Books: 
  14136.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14137.  
  14138.  
  14139. ΓòÉΓòÉΓòÉ 3.11.14. dced_binding_from_rpc_binding ΓòÉΓòÉΓòÉ
  14140.  
  14141.  Purpose 
  14142.  
  14143.           Establishes a dced binding to one of the host services on the host 
  14144.           specified in an existing RPC binding handle. 
  14145.  
  14146.  Format 
  14147.  
  14148.                     #include <dce\dced.h>
  14149.  
  14150.                     void dced_binding_from_rpc_binding(
  14151.                              dced_service_type_t  service,
  14152.                              handle_t  rpc_bh,
  14153.                              dced_binding_handle_t  *dced_bh,
  14154.                              error_status_t  *status);
  14155.  
  14156.  Parameters 
  14157.  
  14158.           Input 
  14159.  
  14160.           service       A variable that specifies one of the host services. A 
  14161.                         valid variable name includes one of the following: 
  14162.  
  14163.                              dced_e_service_type_hostdata 
  14164.                              dced_e_service_type_srvrconf 
  14165.                              dced_e_service_type_srvrexec 
  14166.                              dced_e_service_type_secval 
  14167.                              dced_e_service_type_keytab 
  14168.  
  14169.           rpc_bh        An RPC binding handle to some server. 
  14170.  
  14171.           Output 
  14172.  
  14173.           dced_bh       Returns a dced binding handle, which is a pointer to an 
  14174.                         opaque data structure containing information about an 
  14175.                         RPC binding, the host, the host service, and a local 
  14176.                         cache. 
  14177.  
  14178.           status        Returns the status code from this routine.  This status 
  14179.                         code indicates whether the routine completed 
  14180.                         successfully or, if not, why not. The possible status 
  14181.                         codes are: 
  14182.  
  14183.                              error_status_ok 
  14184.                              dced_s_no_memory 
  14185.                              dced_s_unknown_service 
  14186.                              ept_s_cant_perform_op 
  14187.                              ept_s_database_invalid 
  14188.                              ept_s_invalid_context 
  14189.                              ept_s_invalid_entry 
  14190.                              rpc_s_comm_failure 
  14191.                              rpc_s_fault_context_mismatch 
  14192.                              rpc_s_invalid_arg 
  14193.                              rpc_s_invalid_binding 
  14194.                              rpc_s_no_more_elements 
  14195.                              rpc_s_wrong_kind_of_binding 
  14196.  
  14197.  Usage 
  14198.  
  14199.           The dced on each DCE host maintains the host services and provides a 
  14200.           remote interface to the services. The dced_binding_from_rpc_binding 
  14201.           routine establishes a dced binding to a dced service, and it (or 
  14202.           dced_binding_create) must be the first dced API routine called before 
  14203.           an application can access one of the host services with other dced 
  14204.           routines. When an application finishes using the service, it should 
  14205.           call the dced_binding_free routine to free resources. 
  14206.  
  14207.           Prior to using the RPC binding in this routine, make a copy of the 
  14208.           binding by using the rpc_binding_copy routine.  This is necessary if 
  14209.           the application needs to continue using the RPC binding, because 
  14210.           otherwise the dced binding takes over the RPC binding. 
  14211.  
  14212.           The RPC binding can be obtained from a call to specific RPC runtime 
  14213.           routines such as rpc_binding_from_string_binding, 
  14214.           rpc_ns_binding_import_next, or rpc_ns_binding_lookup_next. 
  14215.  
  14216.  Examples 
  14217.  
  14218.           The following example obtains an RPC binding from a string binding, 
  14219.           and it later makes a copy of the RPC binding for use in the 
  14220.           dced_binding_from_rpc_binding routine. 
  14221.  
  14222.                     handle_t rpc_bh, binding_handle;
  14223.                     dced_binding_handle_t dced_bh;
  14224.                     dced_service_type_t service_type;
  14225.                     error_status_t status;
  14226.                     unsigned_char_t string_binding[STRINGLEN];
  14227.                      .
  14228.                      .
  14229.                      .
  14230.                     rpc_binding_from_string_binding(string_binding, &binding_handle, &status);
  14231.                      .
  14232.                      .
  14233.                      .
  14234.                     rpc_binding_copy(binding_handle, &rpc_bh, &status);
  14235.                     dced_binding_from_rpc_binding(service_type, rpc_bh, &dced_bh, &status);
  14236.                      .
  14237.                      .
  14238.                      .
  14239.                         /* Other routines including dced API routines. */
  14240.                      .
  14241.                      .
  14242.                      .
  14243.                     dced_binding_free(dced_bh, &status);
  14244.  
  14245.  Related Information 
  14246.  
  14247.           Routines: 
  14248.           dced_binding_free 
  14249.           dced_binding_create 
  14250.           rpc_ns_binding_import_next 
  14251.           rpc_ns_binding_lookup_next 
  14252.           rpc_binding_from_string_binding 
  14253.           rpc_binding_copy 
  14254.  
  14255.           Books: 
  14256.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14257.  
  14258.  
  14259. ΓòÉΓòÉΓòÉ 3.11.15. dced_binding_set_auth_info ΓòÉΓòÉΓòÉ
  14260.  
  14261.  Purpose 
  14262.  
  14263.           Sets authentication and authorization information for a dced binding 
  14264.           handle. 
  14265.  
  14266.  Format 
  14267.  
  14268.                     #include <dce\dced.h>
  14269.  
  14270.                     void dced_binding_set_auth_info(
  14271.                              dced_binding_handle_t  dced_bh,
  14272.                              unsigned32  protect_level,
  14273.                              unsigned32  authn_service,
  14274.                              rpc_auth_identity_handle_t  authn_identity,
  14275.                              unsigned32  authz_service,
  14276.                              error_status_t  *status);
  14277.  
  14278.  Parameters 
  14279.  
  14280.           Input 
  14281.  
  14282.           dced_bh       Specifies the dced binding handle for which to set the 
  14283.                         authentication and authorization information. 
  14284.  
  14285.           protect_level Specifies the protection level for dced API calls that 
  14286.                         will use the dced binding handle dced_bh. 
  14287.  
  14288.           authn_service Specifies the authentication service to use for dced 
  14289.                         API calls that will use the dced binding handle 
  14290.                         dced_bh. 
  14291.  
  14292.           authn_identity Specifies a handle for the data structure that 
  14293.                         contains the calling application's authentication and 
  14294.                         authorization credentials appropriate for the selected 
  14295.                         authn_service and authz_service services. 
  14296.  
  14297.                         Specify NULL to use the default security login context 
  14298.                         for the current address space. 
  14299.  
  14300.           authz_service Specifies the authorization service to be implemented 
  14301.                         by dced for the host service accessed. 
  14302.  
  14303.           Output 
  14304.  
  14305.           status        Returns the status code from this routine. This status 
  14306.                         code indicates whether the routine completed 
  14307.                         successfully or, if not, why not. The possible status 
  14308.                         codes are: 
  14309.  
  14310.                              error_status_ok 
  14311.                              dced_s_bad_binding 
  14312.                              dced_s_no_support 
  14313.                              ept_s_not_registered 
  14314.                              rpc_s_authn_authz_mismatch 
  14315.                              rpc_s_binding_incomplete 
  14316.                              rpc_s_comm_failure 
  14317.                              rpc_s_invalid_binding 
  14318.                              rpc_s_mgmt_op_disallowed 
  14319.                              rpc_s_rpcd_comm_failure 
  14320.                              rpc_s_unknown_authn_service 
  14321.                              rpc_s_unsupported_protect_level 
  14322.                              rpc_s_wrong_kind_of_binding 
  14323.  
  14324.  Usage 
  14325.  
  14326.           The dced_binding_set_auth_info routine sets up the dced binding 
  14327.           handle so that it can be used for authenticated calls that include 
  14328.           authorization information. The rpc_binding_set_auth_info routine 
  14329.           performs in the same way as this one. Prior to calling this routine, 
  14330.           the application must have established a valid dced binding handle by 
  14331.           calling either the dced_binding_create or 
  14332.           dced_binding_from_rpc_binding routine. 
  14333.  
  14334.  Examples 
  14335.  
  14336.           This example establishes a dced binding to a host's key table 
  14337.           service, and then it calls dced_binding_set_auth_info so that the 
  14338.           application is authorized to access remote key tables by using 
  14339.           additional calls to the key table service. 
  14340.  
  14341.                      dced_binding_handle_t dced_bh;
  14342.                      error_status_t status;
  14343.  
  14344.                      dced_binding_create((dced_string_t)"keytab@hosts\patrick",
  14345.                                           dced_c_binding_syntax_default,
  14346.                                           &dced_bh, &status);
  14347.                     dced_binding_set_auth_info(dced_bh,
  14348.                                                rpc_c_protect_level_default,
  14349.                                                rpc_c_authn_pkt_privacy,
  14350.                                                NULL, rpc_c_authz_dce, &status);
  14351.                      .
  14352.                      .
  14353.                      .
  14354.                        /* Other routines including dced API routines. */
  14355.                      .
  14356.                      .
  14357.                      .
  14358.  
  14359.  Related Information 
  14360.  
  14361.           Routines: 
  14362.           rpc_binding_set_auth_info 
  14363.           dced_binding_create 
  14364.           dced_binding_from_rpc_binding 
  14365.  
  14366.           Books: 
  14367.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14368.  
  14369.  
  14370. ΓòÉΓòÉΓòÉ 3.11.16. dced_entry_add ΓòÉΓòÉΓòÉ
  14371.  
  14372.  Purpose 
  14373.  
  14374.           Adds a keytab or hostdata entry to a host's dced for an existing file 
  14375.           on that host. 
  14376.  
  14377.  Format 
  14378.  
  14379.                     #include <dce\dced.h>
  14380.  
  14381.                     void dced_entry_add(
  14382.                              dced_binding_handle_t  dced_bh,
  14383.                              dced_entry_t  *entry,
  14384.                              error_status_t  *status);
  14385.  
  14386.  Parameters 
  14387.  
  14388.           Input 
  14389.  
  14390.           dced_bh       Specifies the dced binding handle for a dced service on 
  14391.                         a specific host. 
  14392.  
  14393.           Input/Output 
  14394.  
  14395.           entry         Specifies the data entry to add to the service. 
  14396.  
  14397.           Output 
  14398.  
  14399.           status        Returns the status code from this routine.  This status 
  14400.                         code indicates whether the routine completed 
  14401.                         successfully or, if not, why not. The possible status 
  14402.                         codes are: 
  14403.  
  14404.                              error_status_ok 
  14405.                              db_s_readonly 
  14406.                              db_s_store_failed 
  14407.                              dced_s_already_exists 
  14408.                              dced_s_bad_binding 
  14409.                              dced_s_import_cant_access 
  14410.                              dced_s_no_support 
  14411.                              rpc_s_binding_has_no_auth 
  14412.                              sec_acl_invalid_permission 
  14413.                              uuid_s_no_address 
  14414.  
  14415.  Usage 
  14416.  
  14417.           The dced_entry_add routine adds a data entry to a dced service.  The 
  14418.           data it refers to must already exist in a file on the dced's host. 
  14419.           You can add only hostdata or keytab entries. 
  14420.  
  14421.           A service's data entries do not contain the actual data.  Instead, 
  14422.           they contain a UUID, a name for the entry, a brief description of the 
  14423.           item, and a storage tag that describes the location of the actual 
  14424.           data.  In the cases of the hostdata and keytab services, the data for 
  14425.           each entry is stored in a file.  The dced uses this two-level scheme 
  14426.           so that it can manipulate different kinds of data in the same way and 
  14427.           so names are independent of local file system requirements. 
  14428.  
  14429.           The hostdata and keytab services each have their respective routines 
  14430.           to create new data and, at the same time, add a new entry to the 
  14431.           appropriate service. These routines are dced_hostdata_create and 
  14432.           dced_keytab_create. 
  14433.  
  14434.           Prior to calling the dced_entry_add routine, the application must 
  14435.           have established a valid dced binding handle for the hostdata or 
  14436.           keytab service by calling either the dced_binding_create or the 
  14437.           dced_binding_from_rpc_binding routine. 
  14438.  
  14439.  Examples 
  14440.  
  14441.           The following example shows how to add a printer configuration file 
  14442.           to the hostdata service. The example creates a dced binding to the 
  14443.           local hostdata service, fills an entry data structure with the 
  14444.           storage tag containing the full path of the existing configuration 
  14445.           file, and finally calls the dced_entry_add routine. 
  14446.  
  14447.                         dced_binding_handle_t dced_bh;
  14448.                         error_status_t status;
  14449.                         dced_entry_t entry;
  14450.  
  14451.                         dced_binding_create(dced_c_service_hostdata,
  14452.                               dced_c_binding_syntax_default,
  14453.                               &dced_bh, &status);
  14454.                         uuid_create(&(entry.id), &status);
  14455.                         entry.name = (dced_string_t)("NEWERprinter");
  14456.                         entry.description = (dced_string_t)("Configuration for a new printer.");
  14457.                         entry.storage_tag = (dced_string_t)("/etc/NEWprinter");
  14458.  
  14459.                         dced_entry_add(dced_bh, &entry, &status);
  14460.                      .
  14461.                      .
  14462.                      .
  14463.  
  14464.  Related Information 
  14465.  
  14466.           Routines: 
  14467.           dced_entry_remove 
  14468.           dced_hostdata_create 
  14469.           dced_keytab_create 
  14470.           dced_binding_create 
  14471.           dced_binding_from_rpc_binding 
  14472.  
  14473.           Books: 
  14474.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14475.  
  14476.  
  14477. ΓòÉΓòÉΓòÉ 3.11.17. dced_entry_get_next ΓòÉΓòÉΓòÉ
  14478.  
  14479.  Purpose 
  14480.  
  14481.           Obtains one data entry from a list of entries of a dced service. 
  14482.  
  14483.  Format 
  14484.  
  14485.                     #include <dce\dced.h>
  14486.  
  14487.                     void dced_entry_get_next(
  14488.                              dced_cursor_t  cursor,
  14489.                              dced_entry_t  **entry,
  14490.                              error_status_t  *status);
  14491.  
  14492.  Parameters 
  14493.  
  14494.           Input/Output 
  14495.  
  14496.           cursor        Specifies the entry list's cursor that points to an 
  14497.                         entry, and returns the cursor advanced to the next 
  14498.                         entry in the list. 
  14499.  
  14500.           Output 
  14501.  
  14502.           entry         Returns a pointer to an entry. 
  14503.  
  14504.           status        Returns the error_status_ok status code upon successful 
  14505.                         completion. Otherwise, dced_s_no_more_entries is 
  14506.                         returned. 
  14507.  
  14508.  Usage 
  14509.  
  14510.           The dced_entry_get_next routine obtains a pointer to a data entry, 
  14511.           and advances the cursor to the next entry in the list.  This routine 
  14512.           is commonly used in a loop to traverse a host service's entry list. 
  14513.           The data is obtained in an undetermined order.  Prior to using this 
  14514.           routine, the application must call dced_initialize_cursor to obtain a 
  14515.           list of entries and to establish the beginning of the cursor.  When 
  14516.           the application is finished traversing the entry list, it should call 
  14517.           dced_release_cursor to release resources. 
  14518.  
  14519.           A data entry does not contain the actual data, but it contains the 
  14520.           name, identity, description, and storage location of the data.  In 
  14521.           the cases of hostdata and keytab services, the data for each entry is 
  14522.           stored in a file.  In the cases of srvrconf and srvrexec services, 
  14523.           data is stored in memory.  The dced uses this two-level scheme so 
  14524.           that it can manipulate different kinds of data in the same way. 
  14525.  
  14526.           Prior to using the dced_entry_get_next routine, the application must 
  14527.           have established a valid dced binding handle by calling either the 
  14528.           dced_binding_create or dced_binding_from_rpc_binding routine. 
  14529.  
  14530.  Examples 
  14531.  
  14532.           In the following example, a dced binding is obtained from a service 
  14533.           type and an existing rpc binding handle. After establishing an entry 
  14534.           list cursor, the dced_entry_get_next routine obtains entries, one at 
  14535.           a time, and the name and description of each entry is displayed until 
  14536.           the entry list is exhausted. 
  14537.  
  14538.                     dced_binding_from_rpc_binding(service_type, rpc_bh, &dced_bh, &status);
  14539.                     dced_initialize_cursor(dced_bh, &cursor, &status);
  14540.                     for( ; ; )   {         /* infinite loop */
  14541.                        dced_entry_get_next(cursor, &entry, &status);
  14542.                        if(status != error_status_ok) break;
  14543.                        display(entry->name, entry->description); /* application specific */
  14544.                     }
  14545.                     dced_release_cursor(&cursor, &status);
  14546.                     dced_binding_free( dced_bh, &status);
  14547.  
  14548.  Related Information 
  14549.  
  14550.           Routines: 
  14551.           dced_initialize_cursor 
  14552.           dced_release_cursor 
  14553.           dced_binding_create 
  14554.           dced_binding_from_rpc_binding 
  14555.  
  14556.           Books: 
  14557.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14558.  
  14559.  
  14560. ΓòÉΓòÉΓòÉ 3.11.18. dced_entry_remove ΓòÉΓòÉΓòÉ
  14561.  
  14562.  Purpose 
  14563.  
  14564.           Removes a hostdata or keytab data entry from a dced service's list of 
  14565.           entries. 
  14566.  
  14567.  Format 
  14568.  
  14569.                     #include <dce\dced.h>
  14570.  
  14571.                     void dced_entry_remove(
  14572.                              dced_binding_handle_t  dced_bh,
  14573.                              uuid_t  *entry_uuid,
  14574.                              error_status_t  *status);
  14575.  
  14576.  Parameters 
  14577.  
  14578.           Input 
  14579.  
  14580.           dced_bh       Specifies the dced binding handle for a dced service on 
  14581.                         a specific host. 
  14582.  
  14583.           entry_uuid    Specifies the UUID of the entry to be removed from the 
  14584.                         service. 
  14585.  
  14586.           Output 
  14587.  
  14588.           status        Returns the status code from this routine.  This status 
  14589.                         code indicates whether the routine completed 
  14590.                         successfully or, if not, why not. The possible status 
  14591.                         codes are: 
  14592.  
  14593.                              error_status_ok 
  14594.                              db_s_del_failed 
  14595.                              db_s_key_not_found 
  14596.                              db_s_readonly 
  14597.                              dced_s_bad_binding 
  14598.                              dced_s_no_support 
  14599.                              dced_s_not_found 
  14600.                              sec_acl_invalid_permission 
  14601.  
  14602.  Usage 
  14603.  
  14604.           The dced_entry_remove routine removes an entry from the hostdata or 
  14605.           keytab service entry list of dced. It does not remove the actual data 
  14606.           stored in the file, but makes it inaccessible from a remote host by 
  14607.           using the dced user interfaces, which include the dced API and the 
  14608.           DCE control program, dcecp. Each host service that maintains data 
  14609.           also maintains a list of data entries.  A data entry contains a name, 
  14610.           a UUID, a brief description, and a storage tag indicating the 
  14611.           location of the actual data. 
  14612.  
  14613.           To delete both the data and entry for the hostdata, keytab, or 
  14614.           srvrconf services use dced_hostdata_delete, dced_keytab_delete, or 
  14615.           dced_server_delete, respectively. (The srvrexec service is maintained 
  14616.           by dced only and the secval service does not maintain data, so you 
  14617.           cannot remove data for these services.) 
  14618.  
  14619.           Applications commonly obtain an entry by traversing the entry list 
  14620.           using the dced_entry_get_next routine with its associated cursor 
  14621.           routines. 
  14622.  
  14623.           Prior to calling the dced_entry_remove routine, the application must 
  14624.           have established a valid dced binding handle to the hostdata or 
  14625.           keytab service by calling either the dced_binding_create or 
  14626.           dced_binding_from_rpc_binding routine. 
  14627.  
  14628.  Related Information 
  14629.  
  14630.           Routines: 
  14631.           dced_hostdata_delete 
  14632.           dced_keytab_delete 
  14633.           dced_server_delete 
  14634.           dced_initialize_cursor 
  14635.           dced_binding_create 
  14636.           dced_binding_from_rpc_binding 
  14637.  
  14638.           Books: 
  14639.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14640.  
  14641.  
  14642. ΓòÉΓòÉΓòÉ 3.11.19. dced_hostdata_create ΓòÉΓòÉΓòÉ
  14643.  
  14644.  Purpose 
  14645.  
  14646.           Creates a hostdata item and the associated entry in dced on a 
  14647.           specific host. 
  14648.  
  14649.  Format 
  14650.  
  14651.                     #include <dce\dced.h>
  14652.  
  14653.                     void dced_hostdata_create(
  14654.                              dced_binding_handle_t  dced_bh,
  14655.                              dced_entry_t  *entry,
  14656.                              dced_attr_list_t  *data,
  14657.                              error_status_t  *status);
  14658.  
  14659.  Parameters 
  14660.  
  14661.           Input 
  14662.  
  14663.           dced_bh       Specifies the dced binding handle for the host data 
  14664.                         service on a specific host. 
  14665.  
  14666.           data          Specifies the data created and written to a file on the 
  14667.                         host. The dced_attr_list_t consists of a count of the 
  14668.                         number of attributes and an array of attributes of type 
  14669.                         sec_attr_t. The reference implementation has one 
  14670.                         attribute for a hostdata item (file contents). However, 
  14671.                         some vendors may provide multiple attributes. 
  14672.  
  14673.           Input/Output 
  14674.  
  14675.           entry         Specifies the hostdata entry to create. You supply a 
  14676.                         name (entry->name), description (entry->description), 
  14677.                         and file name (entry->storage_tag), in the form of dced 
  14678.                         strings. You can supply a UUID (entry->id) for dced to 
  14679.                         use or you can use a NULL value and dced generates a 
  14680.                         new UUID for the entry. 
  14681.  
  14682.           Output 
  14683.  
  14684.           status        Returns the status code from this routine.  This status 
  14685.                         code indicates whether the routine completed 
  14686.                         successfully or, if not, why not. The possible status 
  14687.                         codes are: 
  14688.  
  14689.                              error_status_ok 
  14690.                              db_s_key_not_found 
  14691.                              db_s_readonly 
  14692.                              db_s_store_failed 
  14693.                              dced_s_already_exists 
  14694.                              dced_s_bad_binding 
  14695.                              dced_s_cant_open_storage_file 
  14696.                              dced_s_import_already_exists 
  14697.                              dced_s_unknown_attr_type 
  14698.                              sec_acl_invalid_permission 
  14699.  
  14700.  Usage 
  14701.  
  14702.           The dced_hostdata_create routine creates a new host data item in a 
  14703.           file on the host to which the dced binding handle refers, and it 
  14704.           generates the associated hostdata entry in the host's dced. 
  14705.  
  14706.           If data that you want to add to the host data service already exists 
  14707.           on the host (in a file), you can add it to the service by calling 
  14708.           dced_entry_add, which creates the new data entry for dced only. 
  14709.  
  14710.           Prior to calling the dced_hostdata_create routine, the application 
  14711.           must have established a valid dced binding handle to the hostdata 
  14712.           service by calling either the dced_binding_create or 
  14713.           dced_binding_from_rpc_binding routine. 
  14714.  
  14715.  Examples 
  14716.  
  14717.           The following example creates a binding to the host data service on 
  14718.           the local host, creates the entry data, and fills in the data 
  14719.           structure for one attribute to a hypothetical printer configuration. 
  14720.           The attribute represents a plain-text file containing one string of 
  14721.           data. 
  14722.  
  14723.                     dced_binding_handle_t dced_bh;
  14724.                     error_status_t status;
  14725.                     dced_entry_t entry;
  14726.                     dced_attr_list_t data;
  14727.                     int num_strings, str_size;
  14728.                     sec_attr_enc_str_array_t *attr_array;
  14729.  
  14730.                     dced_binding_create(dced_c_service_hostdata,
  14731.                                         dced_c_binding_syntax_default,
  14732.                                         &dced_bh, &status);
  14733.  
  14734.                     /*Create an Entry. */
  14735.                     uuid_create(&entry.id, &status);
  14736.                     entry.name = (dced_string_t)("NEWERprinter");
  14737.                     entry.description = (dced_string_t)("Configuration for a new printer.");
  14738.                     entry.storage_tag = (dced_string_t)("/etc/NEWprinter");
  14739.  
  14740.                     /* create the attributes */
  14741.                     data.count = 1;
  14742.                     num_strings = 1;
  14743.                     data.list = (sec_attr_t *)malloc(data.count * sizeof(sec_attr_t) );
  14744.                     data.list->attr_id = dced_g_uuid_fileattr;
  14745.                     data.list->attr_value.attr_encoding = sec_attr_enc_printstring_array;
  14746.                     str_size = sizeof(sec_attr_enc_str_array_t) +
  14747.                                           num_strings * sizeof(sec_attr_enc_printstring_p_t);
  14748.                     attr_array = (sec_attr_enc_str_array_t *)malloc(str_size);
  14749.                     data.list->attr_value.tagged_union.string_array = attr_array;
  14750.                     attr_array->num_strings = num_strings;
  14751.                     attr_array->strings[0] = (dced_string_t)("New printer configuration data");
  14752.  
  14753.                     dced_hostdata_create(dced_bh, &entry, &data, &status);
  14754.                     dced_binding_free(dced_bh, &status);
  14755.  
  14756.  Related Information 
  14757.  
  14758.           Routines: 
  14759.           dced_entry_add 
  14760.           dced_hostdata_read 
  14761.           dced_binding_create 
  14762.           dced_binding_from_rpc_binding 
  14763.  
  14764.           Books: 
  14765.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14766.  
  14767.  
  14768. ΓòÉΓòÉΓòÉ 3.11.20. dced_hostdata_delete ΓòÉΓòÉΓòÉ
  14769.  
  14770.  Purpose 
  14771.  
  14772.           Deletes a hostdata item from a specific host and removes the 
  14773.           associated entry from dced. 
  14774.  
  14775.  Format 
  14776.  
  14777.                     #include <dce\dced.h>
  14778.  
  14779.                     void dced_hostdata_delete(
  14780.                              dced_binding_handle_t  dced_bh,
  14781.                              uuid_t  *entry_uuid,
  14782.                              error_status_t  *status);
  14783.  
  14784.  Parameters 
  14785.  
  14786.           Input 
  14787.  
  14788.           dced_bh       Specifies the dced binding handle for the hostdata 
  14789.                         service on a specific host. 
  14790.  
  14791.           entry_uuid    Specifies the UUID of the hostdata entry (and 
  14792.                         associated data) to delete. 
  14793.  
  14794.           Output 
  14795.  
  14796.           status        Returns the status code from this routine.  This status 
  14797.                         code indicates whether the routine completed 
  14798.                         successfully or, if not, why not. The possible status 
  14799.                         codes are: 
  14800.  
  14801.                              error_status_ok 
  14802.                              db_s_bad_index_type 
  14803.                              db_s_del_failed 
  14804.                              db_s_iter_not_allowed 
  14805.                              db_s_key_not_found 
  14806.                              dced_s_bad_binding 
  14807.                              dced_s_cant_remove_storage_file 
  14808.                              dced_s_not_found 
  14809.                              sec_acl_invalid_permission 
  14810.  
  14811.  Usage 
  14812.  
  14813.           The dced_hostdata_delete routine deletes a hostdata item (a file) 
  14814.           from a specific host and removes the associated entry from the 
  14815.           hostdata service of the dced for that host. 
  14816.  
  14817.           If you want to make the data inaccessible remotely but not delete it, 
  14818.           use the dced_entry_remove routine, which removes the data's hostdata 
  14819.           entry only. 
  14820.  
  14821.           Prior to calling the dced_hostdata_delete routine, the application 
  14822.           must have established a valid dced binding handle for the hostdata 
  14823.           service by calling either the dced_binding_create or 
  14824.           dced_binding_from_rpc_binding routine. 
  14825.  
  14826.  Attention 
  14827.  
  14828.           Do not delete the standard hostdata items such as cell_name, 
  14829.           cell_aliases, host_name, post_processors, or dce_cf.db. Removal of 
  14830.           any of these items causes operational problems for the host. 
  14831.  
  14832.  Related Information 
  14833.  
  14834.           Routines: 
  14835.           dced_entry_remove 
  14836.           dced_hostdata_read 
  14837.           dced_binding_create 
  14838.           dced_binding_from_rpc_binding 
  14839.  
  14840.           Books: 
  14841.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14842.  
  14843.  
  14844. ΓòÉΓòÉΓòÉ 3.11.21. dced_hostdata_read ΓòÉΓòÉΓòÉ
  14845.  
  14846.  Purpose 
  14847.  
  14848.           Reads a hostdata item maintained by dced on a specific host. 
  14849.  
  14850.  Format 
  14851.  
  14852.                     #include <dce\dced.h>
  14853.  
  14854.                     void dced_hostdata_read(
  14855.                              dced_binding_handle_t  dced_bh,
  14856.                              uuid_t  *entry_uuid,
  14857.                              uuid_t  *attr_uuid,
  14858.                              sec_attr_t  **data,
  14859.                              error_status_t  *status);
  14860.  
  14861.  Parameters 
  14862.  
  14863.           Input 
  14864.  
  14865.           dced_bh       Specifies the dced binding handle for the hostdata 
  14866.                         service on a specific host. 
  14867.  
  14868.           entry_uuid    Specifies the hostdata entry UUID associated with the 
  14869.                         data to read. 
  14870.  
  14871.           attr_uuid     Specifies the UUID associated with an attribute of the 
  14872.                         data. The attribute is either plain text 
  14873.                         (dced_g_uuid_fileattr) or binary 
  14874.                         (dced_g_uuid_binfileattr). Some vendors might allow 
  14875.                         other attributes. 
  14876.  
  14877.           Output 
  14878.  
  14879.           data          Returns the data for the item. See DCE Security 
  14880.                         Services API for details on the sec_attr_t data type. 
  14881.  
  14882.           status        Returns the status code from this routine.  This status 
  14883.                         code indicates whether the routine completed 
  14884.                         successfully or, if not, why not. The possible status 
  14885.                         codes are: 
  14886.  
  14887.                              error_status_ok 
  14888.                              db_s_bad_index_type 
  14889.                              db_s_key_not_found 
  14890.                              dce_cf_e_file_open 
  14891.                              dce_cf_e_no_match 
  14892.                              dce_cf_e_no_mem 
  14893.                              dced_s_bad_binding 
  14894.                              dced_s_cant_open_storage_file 
  14895.                              dced_s_invalid_attr_type 
  14896.                              dced_s_no_memory 
  14897.                              sec_acl_invalid_permission 
  14898.                              uuid_s_bad_version 
  14899.  
  14900.  Usage 
  14901.  
  14902.           The dced_hostdata_read routine returns a hostdata item maintained by 
  14903.           dced on a specific host. The standard data items include the cell 
  14904.           name, a list of cell aliases, the DCE host name, a list of 
  14905.           UUID-program pairs (post_processors), and the DCE configuration 
  14906.           database, among other items. For programming convenience, the 
  14907.           following global variables are defined for the entry_uuid of some 
  14908.           standard data items: 
  14909.  
  14910.                dced_g_uuid_cell_name 
  14911.                dced_g_uuid_cell_aliases 
  14912.                dced_g_uuid_host_name 
  14913.                dced_g_uuid_hostdata_post_proc 
  14914.                dced_g_uuid_dce_cf_db 
  14915.                dced_g_uuid_pe_site 
  14916.                dced_g_uuid_svc_routing 
  14917.  
  14918.           Other host-specific data items can also be maintained by the hostdata 
  14919.           service. The UUIDs for these are established when the data item is 
  14920.           created (See dced_hostdata_create). After the application reads host 
  14921.           data and when it is done with the data, it should call the 
  14922.           dced_objects_release routine to release the resources allocated. 
  14923.  
  14924.           Each hostdata item for a specific host is stored in a local file. 
  14925.           The name of an item's storage file is indicated in the storage tag 
  14926.           field of each dced hostdata entry. 
  14927.  
  14928.           You can also use the dced_object_read routine to read the text of a 
  14929.           hostdata item. You can use this routine if your application needs to 
  14930.           read data for other host services (srvrconf, srvrexec, or keytab) in 
  14931.           addition to data for the hostdata service. 
  14932.  
  14933.           Prior to calling the dced_hostdata_read routine, the application must 
  14934.           have established a valid dced binding handle to the hostdata service 
  14935.           by calling either the dced_binding_create or 
  14936.           dced_binding_from_rpc_binding routine. 
  14937.  
  14938.  Related Information 
  14939.  
  14940.           Routines: 
  14941.           dced_objects_release 
  14942.           dced_object_read 
  14943.           dced_binding_create 
  14944.           dced_binding_from_rpc_binding 
  14945.  
  14946.           Books: 
  14947.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  14948.  
  14949.  
  14950. ΓòÉΓòÉΓòÉ 3.11.22. dced_hostdata_write ΓòÉΓòÉΓòÉ
  14951.  
  14952.  Purpose 
  14953.  
  14954.           Replaces an existing hostdata item maintained by dced on a specific 
  14955.           host. 
  14956.  
  14957.  Format 
  14958.  
  14959.                     #include <dce\dced.h>
  14960.  
  14961.                     void dced_hostdata_write(
  14962.                              dced_binding_handle_t  dced_bh,
  14963.                              uuid_t  *entry_uuid,
  14964.                              dced_attr_list_t  *data,
  14965.                              error_status_t  *status);
  14966.  
  14967.  Parameters 
  14968.  
  14969.           Input 
  14970.  
  14971.           dced_bh       Specifies the dced binding handle for the Host Data 
  14972.                         service on a specific host. 
  14973.  
  14974.           entry_uuid    Specifies the hostdata entry UUID to associate with the 
  14975.                         data to be written. 
  14976.  
  14977.           data          Specifies the data to write. The dced_attr_list_t 
  14978.                         consists of a count of the number of attributes and an 
  14979.                         array of attributes of type sec_attr_t. The reference 
  14980.                         implementation has one attribute for a hostdata item 
  14981.                         (file contents). Some vendors may require multiple 
  14982.                         attributes. 
  14983.  
  14984.           Output 
  14985.  
  14986.           status        Returns the status code from this routine.  This status 
  14987.                         code indicates whether the routine completed 
  14988.                         successfully or, if not, why not. The possible status 
  14989.                         codes are: 
  14990.  
  14991.                              error_status_ok 
  14992.                              db_s_bad_index_type 
  14993.                              db_s_key_not_found 
  14994.                              dced_s_bad_binding 
  14995.                              dced_s_cant_open_storage_file 
  14996.                              dced_s_no_postprocessors 
  14997.                              dced_s_postprocessor_file_fail 
  14998.                              dced_s_postprocessor_spawn_fail 
  14999.                              dced_s_unknown_attr_type 
  15000.                              sec_acl_invalid_permission 
  15001.                              uuid_s_bad_version 
  15002.  
  15003.  Usage 
  15004.  
  15005.           The dced_hostdata_write routine replaces existing data for a hostdata 
  15006.           item maintained by dced on a specific host. If the entry_uuid is not 
  15007.           one maintained be dced, an error is returned and a new entry is not 
  15008.           created. Use dced_hostdata_create to create a new entry. 
  15009.  
  15010.           Prior to calling the dced_hostdata_write routine, the application 
  15011.           must have established a valid dced binding handle to the hostdata 
  15012.           service by calling either the dced_binding_create or 
  15013.           dced_binding_from_rpc_binding routine. 
  15014.  
  15015.  Related Information 
  15016.  
  15017.           Routines: 
  15018.           dced_hostdata_read 
  15019.           dced_hostdata_create 
  15020.           dced_binding_create 
  15021.           dced_binding_from_rpc_binding 
  15022.  
  15023.           Books: 
  15024.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15025.  
  15026.  
  15027. ΓòÉΓòÉΓòÉ 3.11.23. dced_initialize_cursor ΓòÉΓòÉΓòÉ
  15028.  
  15029.  Purpose 
  15030.  
  15031.           Sets a cursor to the start of a cached list of data entries for a 
  15032.           dced service. 
  15033.  
  15034.  Format 
  15035.  
  15036.                     #include <dce\dced.h>
  15037.  
  15038.                     void dced_initialize_cursor(
  15039.                              dced_binding_handle_t  dced_bh,
  15040.                              dced_cursor_t  *cursor,
  15041.                              error_status_t  *status);
  15042.  
  15043.  Parameters 
  15044.  
  15045.           Input 
  15046.  
  15047.           dced_bh       Specifies the dced binding handle for a dced service on 
  15048.                         a specific host. 
  15049.  
  15050.           Output 
  15051.  
  15052.           cursor        Returns the cursor used to traverse the list of data 
  15053.                         entries, one at a time. The cursor is an opaque data 
  15054.                         structure that is used to keep track of the entries 
  15055.                         between invocations of the dced_entry_get_next routine. 
  15056.  
  15057.           status        Returns the status code from this routine.  This status 
  15058.                         code indicates whether the routine completed 
  15059.                         successfully or, if not, why not. The possible status 
  15060.                         codes are: 
  15061.  
  15062.                              error_status_ok 
  15063.                              db_s_bad_index_type 
  15064.                              db_s_iter_not_allowed 
  15065.                              db_s_key_not_found 
  15066.                              dced_s_bad_binding 
  15067.                              dced_s_no_memory 
  15068.                              dced_s_no_support 
  15069.                              sec_acl_invalid_permission 
  15070.  
  15071.  Usage 
  15072.  
  15073.           The dced_initialize_cursor routine sets a cursor at the start of a 
  15074.           DCE host service's list of data entries. The cursor is then used in 
  15075.           subsequent calls to dced_entry_get_next to obtain individual data 
  15076.           entries. When the application finishes traversing the entry list, it 
  15077.           should call dced_release_cursor to free the resources allocated for 
  15078.           the cursor. 
  15079.  
  15080.           The valid services for this routine that have entry lists include 
  15081.           hostdata, srvrconf, srvrexec, and keytab. 
  15082.  
  15083.           If a service's entry list is small, it may be more efficient to 
  15084.           obtain the entire list using the dced_list_get routine rather than 
  15085.           using cursor routines.  This is because dced_list_get guarantees the 
  15086.           list is obtained with one remote procedure call. However, your 
  15087.           application is scalable if you use the cursor routines, because if an 
  15088.           entry list is very large, it may be more efficient (or even 
  15089.           necessary) to obtain the list in chunks with more than one remote 
  15090.           procedure call. 
  15091.  
  15092.           Prior to calling the dced_initialize_cursor routine, the application 
  15093.           must have established a valid dced binding handle by calling either 
  15094.           the dced_binding_create or dced_binding_from_rpc_binding routine. 
  15095.  
  15096.  Related Information 
  15097.  
  15098.           Routines: 
  15099.           dced_entry_get_next 
  15100.           dced_release_cursor 
  15101.           dced_list_get 
  15102.           dced_binding_create 
  15103.           dced_binding_from_rpc_binding 
  15104.  
  15105.           Books: 
  15106.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15107.  
  15108.  
  15109. ΓòÉΓòÉΓòÉ 3.11.24. dced_inq_id ΓòÉΓòÉΓòÉ
  15110.  
  15111.  Purpose 
  15112.  
  15113.           Obtains the entry UUID that dced associates with a name. 
  15114.  
  15115.  Format 
  15116.  
  15117.                     #include <dce\dced.h>
  15118.  
  15119.                     void dced_inq_id(
  15120.                              dced_binding_handle_t  dced_bh,
  15121.                              dced_string_t  name,
  15122.                              uuid_t  *uuid,
  15123.                              error_status_t  *status);
  15124.  
  15125.  Parameters 
  15126.  
  15127.           Input 
  15128.  
  15129.           dced_bh       Specifies the dced binding handle for a dced service on 
  15130.                         a specific host. 
  15131.  
  15132.           name          Specifies the name for which to obtain the UUID. 
  15133.  
  15134.           Output 
  15135.  
  15136.           uuid          Returns the UUID associated with the name input. 
  15137.  
  15138.           status        Returns the status code from this routine.  This status 
  15139.                         code indicates whether the routine completed 
  15140.                         successfully or, if not, why not. The possible status 
  15141.                         codes are: 
  15142.  
  15143.                              error_status_ok 
  15144.                              db_s_bad_index_type 
  15145.                              db_s_iter_not_allowed 
  15146.                              db_s_key_not_found 
  15147.                              dced_s_not_found 
  15148.                              sec_acl_invalid_permission 
  15149.  
  15150.  Usage 
  15151.  
  15152.           The dced_inq_id routine obtains the UUID associated with a name in a 
  15153.           service of a specific host's dced.  Applications and administrators 
  15154.           use strings maintained by dced to identify data, but dced and its API 
  15155.           must associate each data entry with a UUID. This routine is valid for 
  15156.           the hostdata, srvrconf, srvrexec, and keytab services. 
  15157.  
  15158.           Prior to calling this routine, the application must have established 
  15159.           a valid dced binding handle by calling either the dced_binding_create 
  15160.           or dced_binding_from_rpc_binding routine. 
  15161.  
  15162.  Examples 
  15163.  
  15164.           The following example establishes a dced binding to a host's server 
  15165.           configuration service. The example then obtains the UUID of some 
  15166.           known server to read the server's configuration data. 
  15167.  
  15168.                     dced_binding_handle_t dced_bh;
  15169.                     server_t conf;
  15170.                     dced_string_t server_name;
  15171.                     uuid_t srvrconf_id;
  15172.                     error_status_t status;
  15173.  
  15174.                     dced_binding_create("srvrconf@hosts/patrick",
  15175.                                         dced_c_binding_syntax_default,
  15176.                                         &dced_bh, &status);
  15177.                     dced_inq_id(dced_bh, server_name, &srvrconf_id, &status);
  15178.                     dced_object_read(dced_bh, &srvrconf_id, (void**)&(conf), &status);
  15179.                      .
  15180.                      .
  15181.                      .
  15182.  
  15183.  Related Information 
  15184.  
  15185.           Routines: 
  15186.           dced_inq_name 
  15187.           dced_binding_create 
  15188.           dced_binding_from_rpc_binding 
  15189.  
  15190.           Books: 
  15191.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15192.  
  15193.  
  15194. ΓòÉΓòÉΓòÉ 3.11.25. dced_inq_name ΓòÉΓòÉΓòÉ
  15195.  
  15196.  Purpose 
  15197.  
  15198.           Obtains the entry name that dced associates with a UUID. 
  15199.  
  15200.  Format 
  15201.  
  15202.                     #include <dce\dced.h>
  15203.  
  15204.                     void dced_inq_name(
  15205.                              dced_binding_handle_t  dced_bh,
  15206.                              uuid_t  *uuid,
  15207.                              dced_string_t  *name,
  15208.                              error_status_t  *status);
  15209.  
  15210.  Parameters 
  15211.  
  15212.           Input 
  15213.  
  15214.           dced_bh       Specifies the dced binding handle for a dced service on 
  15215.                         a specific host. 
  15216.  
  15217.           uuid          Specifies the UUID for which to obtain the name. 
  15218.  
  15219.           Output 
  15220.  
  15221.           name          Returns the name associated with the uuid input. 
  15222.  
  15223.           status        Returns the status code from this routine.  This status 
  15224.                         code indicates whether the routine completed 
  15225.                         successfully or, if not, why not. The possible status 
  15226.                         codes are: 
  15227.  
  15228.                              error_status_ok 
  15229.                              db_s_bad_index_type 
  15230.                              db_s_iter_not_allowed 
  15231.                              db_s_key_not_found 
  15232.                              dced_s_not_found 
  15233.                              sec_acl_invalid_permission 
  15234.                              uuid_s_bad_version 
  15235.  
  15236.  Usage 
  15237.  
  15238.           The dced_inq_name routine obtains the name associated with a UUID in 
  15239.           a service of a specific host's dced. 
  15240.  
  15241.           A name is a label for each data entry to help applications and 
  15242.           administrators identify all data maintained by dced.  The dced 
  15243.           requires UUIDs to keep track of the data it maintains.  But it also 
  15244.           maintains a mapping of UUIDs to names so that other applications and 
  15245.           administrators can more easily access the data by using a 
  15246.           recognizable name rather than a cumbersome UUID.  A name is a label 
  15247.           for hostdata items, srvrconf and srvrexec servers, and keytab tables. 
  15248.  
  15249.           Prior to calling this routine, the application must have established 
  15250.           a valid dced binding handle by calling either the dced_binding_create 
  15251.           or dced_binding_from_rpc_binding routine. 
  15252.  
  15253.  Examples 
  15254.  
  15255.           The following example establishes a dced binding handle to the local 
  15256.           host data service, reads an entry, and uses dced_inq_name to get the 
  15257.           name associated with the attribute ID. 
  15258.  
  15259.                     dced_binding_handle_t dced_bh;
  15260.                     uuid_t entry_uuid;
  15261.                     sec_attr_t *data_ptr;
  15262.                     error_status_t status;
  15263.                      .
  15264.                      .
  15265.                      .
  15266.                     dced_binding_create(dced_c_service_hostdata,
  15267.                                         dced_c_binding_syntax_default,
  15268.                                         &dced_bh, &status);
  15269.                     dced_hostdata_read(dced_bh, &entry_uuid,
  15270.                                        &dced_g_uuid_fileattr,
  15271.                                        &data_ptr, &status);
  15272.                     dced_inq_name(dced_bh, data_ptr->sec_attr.attr_id, &name, &status);
  15273.                      .
  15274.                      .
  15275.                      .
  15276.  
  15277.  Related Information 
  15278.  
  15279.           Routines: 
  15280.           dced_inq_id 
  15281.           dced_binding_create 
  15282.           dced_binding_from_rpc_binding 
  15283.  
  15284.           Books: 
  15285.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15286.  
  15287.  
  15288. ΓòÉΓòÉΓòÉ 3.11.26. dced_keytab_add_key ΓòÉΓòÉΓòÉ
  15289.  
  15290.  Purpose 
  15291.  
  15292.           Adds a key (server password) to a specified key table on a specific 
  15293.           host. 
  15294.  
  15295.  Format 
  15296.  
  15297.                     #include <dce\dced.h>
  15298.  
  15299.                     void dced_keytab_add_key(
  15300.                              dced_binding_handle_t  dced_bh,
  15301.                              uuid_t  *keytab_uuid,
  15302.                              dced_key_t  *key,
  15303.                              error_status_t  *status);
  15304.  
  15305.  Parameters 
  15306.  
  15307.           Input 
  15308.  
  15309.           dced_bh       Specifies the dced binding handle for the keytab 
  15310.                         service on a specific host. 
  15311.  
  15312.           keytab_uuid   Specifies the UUID that dced uses to identify the key 
  15313.                         table to which the key is to be added. 
  15314.  
  15315.           Input/Output 
  15316.  
  15317.           key           Specifies the key to be added. 
  15318.  
  15319.           Output 
  15320.  
  15321.           status        Returns the status code from this routine.  This status 
  15322.                         code indicates whether the routine completed 
  15323.                         successfully or, if not, why not. The possible status 
  15324.                         codes are: 
  15325.  
  15326.                              error_status_ok 
  15327.                              db_s_bad_index_type 
  15328.                              db_s_key_not_found 
  15329.                              dced_s_bad_binding 
  15330.                              dced_s_key_v0_not_allowed 
  15331.                              dced_s_key_version_mismatch 
  15332.                              dced_s_need_privacy 
  15333.                              dced_s_random_key_not_allowed 
  15334.                              rpc_s_binding_has_no_auth 
  15335.                              rpc_s_invalid_binding 
  15336.                              rpc_s_wrong_kind_of_binding 
  15337.                              sec_acl_invalid_permission 
  15338.                              sec_key_mgmt_e_authn_invalid 
  15339.                              sec_key_mgmt_e_key_unavailable 
  15340.                              sec_key_mgmt_e_key_unsupported 
  15341.                              sec_key_mgmt_e_key_version_exists 
  15342.                              sec_key_mgmt_e_unauthorized 
  15343.  
  15344.  Usage 
  15345.  
  15346.           The dced_keytab_add_key routine adds a key to a server key table 
  15347.           (file) on a specific host, without changing the key in the security 
  15348.           registry.  (Servers use sec_key_mgmt_set_key to do this for their own 
  15349.           local key table.) 
  15350.  
  15351.           Most management applications use the dced_keytab_change_key routine 
  15352.           to remotely change a key, because it also changes the key in the 
  15353.           Security Registry. 
  15354.  
  15355.           Managing the same key in multiple key tables is a more complex 
  15356.           process. The Security Registry needs a copy of the server's key so 
  15357.           that during the authentication process, it can encrypt tickets that 
  15358.           only a server with that key can later decrypt.  Part of updating a 
  15359.           key in the Security Registry also includes automatic version number 
  15360.           updating.  When servers share the same principal identity, they use 
  15361.           the same key.  If these servers are on different hosts, the key must 
  15362.           be in more than one key table.  (Even if the servers are on the same 
  15363.           host, it is possible for their keys to be in different key tables, 
  15364.           although this is not a recommended key management practice.)  When 
  15365.           the same keys in different tables need changing, one (perhaps the 
  15366.           master server or the busiest one) is changed using 
  15367.           dced_keytab_change_key, which also causes an automatic version 
  15368.           update. However, all other copies of the key must be changed using 
  15369.           the dced_keytab_add_key routine so that the version number does not 
  15370.           change again. 
  15371.  
  15372.           Prior to calling dced_keytab_add_key, the application must have 
  15373.           established a valid dced binding handle to the keytab service by 
  15374.           calling either the dced_binding_create or 
  15375.           dced_binding_from_rpc_binding routine. 
  15376.  
  15377.  Related Information 
  15378.  
  15379.           Routines: 
  15380.           dced_keytab_change_key 
  15381.           sec_key_mgmt_set_key 
  15382.           dced_binding_create 
  15383.           dced_binding_from_rpc_binding 
  15384.  
  15385.           Books: 
  15386.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15387.  
  15388.  
  15389. ΓòÉΓòÉΓòÉ 3.11.27. dced_keytab_change_key ΓòÉΓòÉΓòÉ
  15390.  
  15391.  Purpose 
  15392.  
  15393.           Changes a key (server password) in both a key table and the security 
  15394.           registry. 
  15395.  
  15396.  Format 
  15397.  
  15398.                     #include <dce\dced.h>
  15399.  
  15400.                     void dced_keytab_change_key(
  15401.                              dced_binding_handle_t  dced_bh,
  15402.                              uuid_t  *keytab_uuid,
  15403.                              dced_key_t  *key,
  15404.                              error_status_t  *status);
  15405.  
  15406.  Parameters 
  15407.  
  15408.           Input 
  15409.  
  15410.           dced_bh       Specifies the dced binding handle for the keytab 
  15411.                         service on a specific host. 
  15412.  
  15413.           keytab_uuid   Specifies the UUID that dced uses to identify the key 
  15414.                         table where the key is to be changed. 
  15415.  
  15416.           Input/Output 
  15417.  
  15418.           key           Specifies the new key.  Some fields are modified by 
  15419.                         dced. 
  15420.  
  15421.           Output 
  15422.  
  15423.           status        Returns the status code from this routine.  This status 
  15424.                         code indicates whether the routine completed 
  15425.                         successfully or, if not, why not. The possible status 
  15426.                         codes are: 
  15427.  
  15428.                              error_status_ok 
  15429.                              db_s_bad_index_type 
  15430.                              db_s_key_not_found 
  15431.                              dced_s_bad_binding 
  15432.                              dced_s_key_version_mismatch 
  15433.                              dced_s_need_privacy 
  15434.                              rpc_s_binding_has_no_auth 
  15435.                              rpc_s_invalid_binding 
  15436.                              rpc_s_wrong_kind_of_binding 
  15437.                              sec_acl_invalid_permission 
  15438.                              sec_key_mgmt_e_authn_invalid 
  15439.                              sec_key_mgmt_e_authn_unavailable 
  15440.                              sec_key_mgmt_e_key_unavailable 
  15441.                              sec_key_mgmt_e_key_unsupported 
  15442.                              sec_key_mgmt_e_key_version_exists 
  15443.                              sec_key_mgmt_e_not_implemented 
  15444.                              sec_key_mgmt_e_unauthorized 
  15445.                              sec_rgy_object_not_found 
  15446.                              sec_rgy_server_unavailable 
  15447.  
  15448.  Usage 
  15449.  
  15450.           The dced_keytab_change_key routine updates a key in both the key 
  15451.           table on a specific host and in the Security Registry. Management 
  15452.           applications change keys remotely with this routine.  (Servers can 
  15453.           change their own keys locally with the sec_key_mgmt_change_key 
  15454.           routine.) 
  15455.  
  15456.           The Security Registry needs a copy of the server's current key so 
  15457.           that during the authentication process, it can encrypt tickets that 
  15458.           only a server with that key can later decrypt.  When a management 
  15459.           application calls dced_keytab_change_key, dced first tries to make 
  15460.           the modification in the Security Registry, and, if successful, it 
  15461.           then modifies the key in the key table.  The old key is not really 
  15462.           replaced, but a new version and key are established for all new 
  15463.           authenticated communication.  The old version is maintained in the 
  15464.           key table (and Registry too) for a time so that existing clients with 
  15465.           valid tickets can still communicate with the server.  The old key is 
  15466.           removed, depending on the local cell's change policy and if the 
  15467.           server calls sec_key_mgmt_garbage_collect to purge its old keys 
  15468.           explicitly, or sec_key_mgmt_manage_key to purge them implicitly. 
  15469.  
  15470.           When more than one server shares the same principal identity, they 
  15471.           use the same key.  If you need to change the same key in more than 
  15472.           one key table, use decd_keytab_change_key for one change and then use 
  15473.           the dced_keytab_add_key routine for all others. 
  15474.  
  15475.  Related Information 
  15476.  
  15477.           Routines: 
  15478.           dced_keytab_add_key 
  15479.           sec_key_mgmt_change_key 
  15480.           dced_binding_create 
  15481.           dced_binding_from_rpc_binding 
  15482.  
  15483.           Books: 
  15484.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15485.  
  15486.  
  15487. ΓòÉΓòÉΓòÉ 3.11.28. dced_keytab_create ΓòÉΓòÉΓòÉ
  15488.  
  15489.  Purpose 
  15490.  
  15491.           Creates a key table with a list of keys (server passwords) in a new 
  15492.           file on a specific host. 
  15493.  
  15494.  Format 
  15495.  
  15496.                     #include <dce\dced.h>
  15497.  
  15498.                     void dced_keytab_create(
  15499.                              dced_binding_handle_t  dced_bh,
  15500.                              dced_entry_t  *keytab_entry,
  15501.                              dced_key_list_t  *keys,
  15502.                              error_status_t  *status);
  15503.  
  15504.  Parameters 
  15505.  
  15506.           Input 
  15507.  
  15508.           dced_bh       Specifies the dced binding handle for the keytab 
  15509.                         service on a specific host. 
  15510.  
  15511.           Input/Output 
  15512.  
  15513.           keytab_entry  Specifies the keytab entry to create for dced. 
  15514.  
  15515.           keys          Specifies the list of keys to be written to the key 
  15516.                         table file. 
  15517.  
  15518.           Output 
  15519.  
  15520.           status        Returns the status code from this routine.  This status 
  15521.                         code indicates whether the routine completed 
  15522.                         successfully or, if not, why not. The possible status 
  15523.                         codes are: 
  15524.  
  15525.                              error_status_ok 
  15526.                              db_s_bad_header_type 
  15527.                              db_s_bad_index_type 
  15528.                              db_s_iter_not_allowed 
  15529.                              db_s_key_not_found 
  15530.                              db_s_readonly 
  15531.                              db_s_store_failed 
  15532.                              dced_s_already_exists 
  15533.                              dced_s_bad_binding 
  15534.                              dced_s_import_already_exists 
  15535.                              dced_s_need_privacy 
  15536.                              rpc_s_binding_has_no_auth 
  15537.                              rpc_s_invalid_binding 
  15538.                              rpc_s_wrong_kind_of_binding 
  15539.                              sec_acl_invalid_permission 
  15540.                              sec_key_mgmt_e_authn_invalid 
  15541.                              sec_key_mgmt_e_key_unavailable 
  15542.                              sec_key_mgmt_e_key_unsupported 
  15543.                              sec_key_mgmt_e_key_version_exists 
  15544.                              sec_key_mgmt_e_unauthorized 
  15545.                              uuid_s_bad_version 
  15546.  
  15547.  Usage 
  15548.  
  15549.           The dced_keytab_create routine creates a new key table file on a 
  15550.           specific host, and it generates the associated keytab service entry 
  15551.           in dced. This routine is used by management applications to remotely 
  15552.           create a key table. Servers typically create their own key table 
  15553.           locally using the sec_key_mgmt_set_key routine. However, if several 
  15554.           servers on different hosts share the same principal, each host 
  15555.           requires a local copy of the key table. 
  15556.  
  15557.           If a key table that you want to add to the keytab service already 
  15558.           exists on the host, you can add it to the service by calling 
  15559.           dced_entry_add. This routine creates a new keytab service entry by 
  15560.           associating the existing key table file with a new UUID in dced. 
  15561.  
  15562.           Prior to calling the dced_keytab_create routine, the application must 
  15563.           have established a valid dced binding handle to the keytab service by 
  15564.           calling either the dced_binding_create or 
  15565.           dced_binding_from_rpc_binding routine. 
  15566.  
  15567.  Related Information 
  15568.  
  15569.           Routines: 
  15570.           sec_key_mgmt_set_key 
  15571.           dced_entry_add 
  15572.           dced_binding_create 
  15573.           dced_binding_from_rpc_binding 
  15574.  
  15575.           Books: 
  15576.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15577.  
  15578.  
  15579. ΓòÉΓòÉΓòÉ 3.11.29. dced_keytab_delete ΓòÉΓòÉΓòÉ
  15580.  
  15581.  Purpose 
  15582.  
  15583.           Deletes a key table file from a specific host. 
  15584.  
  15585.  Format 
  15586.  
  15587.                     #include <dce\dced.h>
  15588.  
  15589.                     void dced_keytab_delete(
  15590.                              dced_binding_handle_t  dced_bh,
  15591.                              uuid_t  *keytab_uuid,
  15592.                              error_status_t  *status);
  15593.  
  15594.  Parameters 
  15595.  
  15596.           Input 
  15597.           dced_bh       Specifies the dced binding handle for the keytab 
  15598.                         service on a specific host. 
  15599.           keytab_uuid   Specifies the UUID of the keytab entry and associated 
  15600.                         key table to be deleted. 
  15601.  
  15602.           Output 
  15603.  
  15604.           status        Returns the status code from this routine.  This status 
  15605.                         code indicates whether the routine completed 
  15606.                         successfully or, if not, why not. The possible status 
  15607.                         codes are: 
  15608.  
  15609.                              error_status_ok 
  15610.                              db_s_bad_index_type 
  15611.                              db_s_del_failed 
  15612.                              db_s_iter_not_allowed 
  15613.                              db_s_key_not_found 
  15614.                              dced_s_bad_binding 
  15615.                              dced_s_cant_remove_storage_file 
  15616.                              dced_s_need_privacy 
  15617.                              rpc_s_binding_has_no_auth 
  15618.                              rpc_s_invalid_binding 
  15619.                              rpc_s_wrong_kind_of_binding 
  15620.                              sec_acl_invalid_permission 
  15621.  
  15622.  Usage 
  15623.  
  15624.           The dced_keytab_delete routine deletes a key table (file) from a 
  15625.           specific host and removes the associated entry from the keytab 
  15626.           service of the host's dced. A key table is a file containing a list 
  15627.           of server keys (passwords).  This routine is used by management 
  15628.           applications to remotely delete a key table. 
  15629.  
  15630.           To remove individual keys from a remote key table, use the 
  15631.           dced_keytab_remove_key routine.  If you want to only make the key 
  15632.           table inaccessible remotely (with dced) but not delete it, use the 
  15633.           dced_entry_remove routine.  This routine only removes the key table's 
  15634.           keytab entry from dced. 
  15635.  
  15636.           Prior to calling the dced_keytab_delete routine, the application must 
  15637.           have established a valid dced binding handle to the keytab service by 
  15638.           calling either the dced_binding_create or 
  15639.           dced_binding_from_rpc_binding routine. 
  15640.  
  15641.  Related Information 
  15642.  
  15643.           Routines: 
  15644.           dced_keytab_remove_key 
  15645.           dced_entry_remove 
  15646.           dced_binding_create 
  15647.           dced_binding_from_rpc_binding 
  15648.  
  15649.           Books: 
  15650.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15651.  
  15652.  
  15653. ΓòÉΓòÉΓòÉ 3.11.30. dced_keytab_get_next_key ΓòÉΓòÉΓòÉ
  15654.  
  15655.  Purpose 
  15656.  
  15657.           Returns a key from a cached list, and advances the cursor in the 
  15658.           list. 
  15659.  
  15660.  Format 
  15661.  
  15662.                     #include <dce\dced.h>
  15663.  
  15664.                     void dced_keytab_get_next_key(
  15665.                              dced_keytab_cursor_t  cursor,
  15666.                              dced_key_t  **key,
  15667.                              error_status_t  *status);
  15668.  
  15669.  Parameters 
  15670.  
  15671.           Input/Output 
  15672.  
  15673.           cursor        Specifies the cursor that points to a key and returns 
  15674.                         the cursor advanced to the next key in the list. 
  15675.  
  15676.           Output 
  15677.  
  15678.           key           Returns the current key to which cursor points. 
  15679.  
  15680.           status        Returns the status code from this routine.  This status 
  15681.                         code indicates whether the routine completed 
  15682.                         successfully or, if not, why not. The possible status 
  15683.                         codes are: 
  15684.  
  15685.                              error_status_ok 
  15686.                              dced_s_no_more_entries 
  15687.  
  15688.  Usage 
  15689.  
  15690.           The dced_keytab_get_next_key routine obtains the current key to which 
  15691.           the key-list cursor points.  This routine is commonly used in a loop 
  15692.           to traverse a key table's keys.  The keys are returned in an 
  15693.           undetermined order. Prior to using this routine in the loop, the 
  15694.           application must call dced_keytab_initialize_cursor to obtain the key 
  15695.           list and establish the beginning of the cursor. When the application 
  15696.           finishes traversing the key list, it should call 
  15697.           dced_keytab_release_cursor to release the resources allocated. 
  15698.  
  15699.           Management applications use dced_keytab_get_next_key to remotely 
  15700.           access the server's individual keys. Servers use 
  15701.           sec_key_mgmt_get_next_key to access their own local keys 
  15702.           individually. 
  15703.  
  15704.           You can also use the dced_object_read routine to read an entire key 
  15705.           table. You can use dced_object_read if your application needs to bind 
  15706.           to and read data for other host services (srvrconf, srvrexec, or 
  15707.           hostdata) in addition to data for the keytab service. 
  15708.  
  15709.  Related Information 
  15710.  
  15711.           Routines: 
  15712.           dced_keytab_initialize_cursor 
  15713.           dced_keytab_release_cursor 
  15714.           sec_key_mgmt_get_next_key 
  15715.           dced_object_read 
  15716.  
  15717.           Books: 
  15718.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15719.  
  15720.  
  15721. ΓòÉΓòÉΓòÉ 3.11.31. dced_keytab_initialize_cursor ΓòÉΓòÉΓòÉ
  15722.  
  15723.  Purpose 
  15724.  
  15725.           Obtains a list of keys from a key table and sets a cursor at the 
  15726.           beginning of the list. 
  15727.  
  15728.  Format 
  15729.  
  15730.                     #include <dce\dced.h>
  15731.  
  15732.                     void dced_keytab_initialize_cursor(
  15733.                              dced_binding_handle_t  dced_bh,
  15734.                              uuid_t  *keytab_uuid,
  15735.                              dced_keytab_cursor_t  *cursor,
  15736.                              error_status_t  *status);
  15737.  
  15738.  Parameters 
  15739.  
  15740.           Input 
  15741.  
  15742.           dced_bh       Specifies the dced binding handle for the keytab 
  15743.                         service on a specific host. 
  15744.  
  15745.           keytab_uuid   Specifies the keytab entry dced associates with a key 
  15746.                         table. 
  15747.  
  15748.           Output 
  15749.  
  15750.           cursor        Returns the cursor that is used to traverse the list of 
  15751.                         keys. 
  15752.  
  15753.           status        Returns the status code from this routine.  This status 
  15754.                         code indicates whether the routine completed 
  15755.                         successfully or, if not, why not. The possible status 
  15756.                         codes are: 
  15757.  
  15758.                              error_status_ok 
  15759.                              dced_s_bad_binding 
  15760.                              dced_s_need_privacy 
  15761.                              dced_s_no_memory 
  15762.                              dced_s_no_support 
  15763.                              sec_acl_invalid_permission 
  15764.                              sec_key_mgmt_e_authn_invalid 
  15765.                              sec_key_mgmt_e_unauthorized 
  15766.  
  15767.  Usage 
  15768.  
  15769.           The dced_keytab_initialize_cursor routine obtains the complete list 
  15770.           of keys from a remote key table and sets a cursor at the beginning of 
  15771.           the cached list keys. In order to minimize the security risks of keys 
  15772.           exposed to the network, the entire set of keys is encrypted and 
  15773.           transferred in one remote procedure call rather than individually or 
  15774.           in chunks. The cursor is then used in subsequent calls to 
  15775.           dced_keytab_get_next_key to obtain individual keys. When the 
  15776.           application finishes traversing the key list, it should call 
  15777.           dced_keytab_release_cursor to release the resources previously 
  15778.           allocated. 
  15779.  
  15780.           Management applications use dced_keytab_initialize_cursor and its 
  15781.           associated routines to remotely access server keys.  Servers use 
  15782.           sec_key_mgmt_initialize_cursor and its associated routines to manage 
  15783.           their own keys locally. 
  15784.  
  15785.           Prior to calling the dced_keytab_initialize_cursor routine, the 
  15786.           application must have established a valid dced binding handle to the 
  15787.           keytab service by calling either the dced_binding_create or 
  15788.           dced_binding_from_rpc_binding routine. 
  15789.  
  15790.  Related Information 
  15791.  
  15792.           Routines: 
  15793.           dced_keytab_get_next_key 
  15794.           dced_keytab_release_cursor 
  15795.           sec_key_mgmt_initialize_cursor 
  15796.           dced_binding_create 
  15797.           dced_binding_from_rpc_binding 
  15798.  
  15799.           Books: 
  15800.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15801.  
  15802.  
  15803. ΓòÉΓòÉΓòÉ 3.11.32. dced_keytab_release_cursor ΓòÉΓòÉΓòÉ
  15804.  
  15805.  Purpose 
  15806.  
  15807.           Releases the resources of a cursor that traverses a key table's list 
  15808.           of keys (server passwords). 
  15809.  
  15810.  Format 
  15811.  
  15812.                     #include <dce\dced.h>
  15813.  
  15814.                     void dced_keytab_release_cursor(
  15815.                              dced_keytab_cursor_t  *cursor,
  15816.                              error_status_t  *status);
  15817.  
  15818.  Parameters 
  15819.  
  15820.           Input/Output 
  15821.  
  15822.           cursor        Specifies the cursor for which resources are released. 
  15823.  
  15824.           Output 
  15825.  
  15826.           status        Returns the status code from this routine.  This status 
  15827.                         code indicates whether the routine completed 
  15828.                         successfully or, if not, why not. The possible status 
  15829.                         codes are: 
  15830.  
  15831.                              error_status_ok 
  15832.                              dced_s_bad_binding 
  15833.                              dced_s_no_support 
  15834.  
  15835.  Usage 
  15836.  
  15837.           The dced_keytab_release_cursor routine releases the cursor and 
  15838.           resources initially set by the dced_keytab_initialize_cursor routine 
  15839.           and used by the dced_keytab_get_next_key routine. 
  15840.  
  15841.           Prior to calling this routine, the application must have first 
  15842.           established a valid dced binding handle by calling either 
  15843.           dced_binding_create or dced_binding_from_rpc_binding, and then the 
  15844.           application must have called the dced_keytab_initialize_cursor 
  15845.           routine. 
  15846.  
  15847.  Related Information 
  15848.  
  15849.           Routines: 
  15850.           dced_keytab_initialize_cursor 
  15851.           dced_keytab_get_next_key 
  15852.  
  15853.           Books: 
  15854.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15855.  
  15856.  
  15857. ΓòÉΓòÉΓòÉ 3.11.33. dced_keytab_remove_key ΓòÉΓòÉΓòÉ
  15858.  
  15859.  Purpose 
  15860.  
  15861.           Removes a key (server password) from a specified key table on a 
  15862.           specific host. 
  15863.  
  15864.  Format 
  15865.  
  15866.                     #include <dce\dced.h>
  15867.  
  15868.                     void dced_keytab_remove_key(
  15869.                              dced_binding_handle_t  dced_bh,
  15870.                              uuid_t  *keytab_uuid,
  15871.                              dced_key_t  *key,
  15872.                              error_status_t  *status);
  15873.  
  15874.  Parameters 
  15875.  
  15876.           Input 
  15877.  
  15878.           dced_bh       Specifies the dced binding handle for the keytab 
  15879.                         service on a specific host. 
  15880.  
  15881.           keytab_uuid   Specifies the UUID dced maintains to identify the key 
  15882.                         table from which the key is to be removed. 
  15883.  
  15884.           key           Specifies the key to be removed from the key table. 
  15885.  
  15886.           Output 
  15887.  
  15888.           status        Returns the status code from this routine.  This status 
  15889.                         code indicates whether the routine completed 
  15890.                         successfully or, if not, why not. The possible status 
  15891.                         codes are: 
  15892.  
  15893.                              error_status_ok 
  15894.                              db_s_bad_index_type 
  15895.                              db_s_key_not_found 
  15896.                              dced_s_bad_binding 
  15897.                              dced_s_need_privacy 
  15898.                              rpc_s_binding_has_no_auth 
  15899.                              rpc_s_invalid_binding 
  15900.                              rpc_s_wrong_kind_of_binding 
  15901.                              sec_acl_invalid_permission 
  15902.                              sec_key_mgmt_e_authn_invalid 
  15903.                              sec_key_mgmt_e_key_unavailable 
  15904.                              sec_key_mgmt_e_unauthorized 
  15905.  
  15906.  Usage 
  15907.  
  15908.           The dced_keytab_remove_key routine removes a key from a key table 
  15909.           (file) on a specific host.  The key table is specified with a keytab 
  15910.           entry UUID from the host's dced. Management applications use 
  15911.           dced_keytab_remove_key to remotely remove server keys from key 
  15912.           tables.  Typically, servers delete their own keys from their local 
  15913.           key tables implicitly by calling sec_key_mgmt_manage_key, or 
  15914.           explicitly by calling sec_key_mgmt_delete_key.  Applications can 
  15915.           delete an entire key table file using the dced_keytab_delete routine. 
  15916.  
  15917.           Prior to calling this routine, the application must have established 
  15918.           a valid dced binding handle to the keytab service by calling either 
  15919.           the dced_binding_create or dced_binding_from_rpc_binding routine. 
  15920.  
  15921.  Related Information 
  15922.  
  15923.           Routines: 
  15924.           sec_key_mgmt_delete_key_type 
  15925.           dced_keytab_delete 
  15926.           dced_binding_create 
  15927.           dced_binding_from_rpc_binding 
  15928.  
  15929.           Books: 
  15930.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  15931.  
  15932.  
  15933. ΓòÉΓòÉΓòÉ 3.11.34. dced_list_get ΓòÉΓòÉΓòÉ
  15934.  
  15935.  Purpose 
  15936.  
  15937.           Returns the list of data entries maintained by a dced service on a 
  15938.           specific host. 
  15939.  
  15940.  Format 
  15941.  
  15942.                     #include <dce\dced.h>
  15943.  
  15944.                     void dced_list_get(
  15945.                              dced_binding_handle_t  dced_bh,
  15946.                              dced_entry_list_t  *list,
  15947.                              error_status_t  *status);
  15948.  
  15949.  Parameters 
  15950.  
  15951.           Input 
  15952.  
  15953.           dced_bh       Specifies the dced binding handle for a dced service on 
  15954.                         a specific host. 
  15955.  
  15956.           Output 
  15957.  
  15958.           list          Returns a list of data entries for the service. 
  15959.  
  15960.           status        Returns the status code from this routine.  This status 
  15961.                         code indicates whether the routine completed 
  15962.                         successfully or, if not, why not. The possible status 
  15963.                         codes are: 
  15964.  
  15965.                              error_status_ok 
  15966.                              dced_s_bad_binding 
  15967.                              dced_s_no_memory 
  15968.                              dced_s_no_support 
  15969.                              sec_acl_invalid_permission 
  15970.  
  15971.  Usage 
  15972.  
  15973.           The dced_list_get routine obtains all the data entries for a dced 
  15974.           service on a specific host. The list of data entries obtained is not 
  15975.           the actual data.  Each entry contains a UUID, name, description, and 
  15976.           storage tag that describes where the data is located (for example, a 
  15977.           file name or memory location).  Call the dced_list_release routine 
  15978.           when your application finishes with the entry list to release 
  15979.           resources allocated with dced_list_get routine. 
  15980.  
  15981.           If a service's entry list is small, it may be efficient to obtain the 
  15982.           entire list using the dced_list_get routine because it guarantees 
  15983.           that the list is obtained with one remote procedure call. However, to 
  15984.           make your application scalable, use the dced_initialize_cursor, 
  15985.           dced_entry_get_next, and dced_release_cursor set of routines, because 
  15986.           if an entry list is very large, it may be more efficient (or even 
  15987.           necessary) to obtain the list in chunks with more than one remote 
  15988.           procedure call. 
  15989.  
  15990.           Prior to calling this routine, the application must have established 
  15991.           a valid dced binding handle by calling either the dced_binding_create 
  15992.           or dced_binding_from_rpc_binding routine. 
  15993.  
  15994.  Examples 
  15995.  
  15996.           In the following example, a dced binding is obtained from a service 
  15997.           type and an existing RPC binding handle.  The list of entries for the 
  15998.           service is obtained with the dced_list_get routine and each entry's 
  15999.           name and description are displayed. 
  16000.  
  16001.                     dced_binding_from_rpc_binding(service_type, rpc_bh, &dced_bh, &status);
  16002.                     dced_list_get(dced_bh, &entries, &status);
  16003.                     for(i=0; i<entries.count; i++)
  16004.                         display(&entries);  /* application specific */
  16005.                     dced_list_release(dced_bh, &entries, &status);
  16006.                     dced_binding_free( dced_bh, &status);
  16007.  
  16008.  Related Information 
  16009.  
  16010.           Routines: 
  16011.           dced_list_release 
  16012.           dced_initialize_cursor 
  16013.           dced_binding_create 
  16014.           dced_binding_from_rpc_binding 
  16015.  
  16016.           Books: 
  16017.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16018.  
  16019.  
  16020. ΓòÉΓòÉΓòÉ 3.11.35. dced_list_release ΓòÉΓòÉΓòÉ
  16021.  
  16022.  Purpose 
  16023.  
  16024.           Releases the resources for a list of entries of a dced service. 
  16025.  
  16026.  Format 
  16027.  
  16028.                     #include <dce\dced.h>
  16029.  
  16030.                     void dced_list_release(
  16031.                              dced_binding_handle_t  dced_bh,
  16032.                              dced_entry_list_t  *list,
  16033.                              error_status_t  *status);
  16034.  
  16035.  Parameters 
  16036.  
  16037.           Input 
  16038.  
  16039.           dced_bh       Specifies the dced binding handle for a dced service on 
  16040.                         a specific host. 
  16041.  
  16042.           Input/Output 
  16043.  
  16044.           list          Specifies a list of data entries for the service. 
  16045.  
  16046.           Output 
  16047.  
  16048.           status        Returns the status code from this routine.  This status 
  16049.                         code indicates whether the routine completed 
  16050.                         successfully or, if not, why not. The only possible 
  16051.                         status code is error_status_ok. 
  16052.  
  16053.  Usage 
  16054.  
  16055.           The dced_list_release routine releases the resources allocated for a 
  16056.           list of data entries previously retrieved by the dced_list_get 
  16057.           routine. 
  16058.  
  16059.           Prior to calling this routine, the application must have first 
  16060.           established a valid dced binding handle by calling either the 
  16061.           dced_binding_create or dced_binding_from_rpc_binding routine, and 
  16062.           then the application must have called the dced_list_get routine. 
  16063.  
  16064.  Related Information 
  16065.  
  16066.           Routines: 
  16067.           dced_list_get 
  16068.           dced_binding_create 
  16069.           dced_binding_from_rpc_binding 
  16070.  
  16071.           Books: 
  16072.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16073.  
  16074.  
  16075. ΓòÉΓòÉΓòÉ 3.11.36. dced_object_read ΓòÉΓòÉΓòÉ
  16076.  
  16077.  Purpose 
  16078.  
  16079.           Reads a data item of a dced service on a specific host. 
  16080.  
  16081.  Format 
  16082.  
  16083.                     #include <dce\dced.h>
  16084.  
  16085.                     void dced_object_read(
  16086.                              dced_binding_handle_t  dced_bh,
  16087.                              uuid_t  *entry_uuid,
  16088.                              void  **data,
  16089.                              error_status_t  *status);
  16090.  
  16091.  Parameters 
  16092.  
  16093.           Input 
  16094.  
  16095.           dced_bh       Specifies the dced binding handle for a dced service on 
  16096.                         a specific host. 
  16097.  
  16098.           entry_uuid    Specifies the UUID of the dced service's data entry 
  16099.                         associated with the data item. 
  16100.  
  16101.           Output 
  16102.  
  16103.           data          Returns the data read. The data returned is one of the 
  16104.                         following structures, depending on the service: 
  16105.  
  16106.                              Service     Data Type Returned 
  16107.                              hostdata    sec_attr_t 
  16108.                              srvrconf    server_t 
  16109.                              srvrexec    server_t 
  16110.                              keytab      dced_key_list_t 
  16111.  
  16112.           status        Returns the status code from this routine.  This status 
  16113.                         code indicates whether the routine completed 
  16114.                         successfully or, if not, why not. The possible status 
  16115.                         codes are: 
  16116.  
  16117.                              error_status_ok 
  16118.                              db_s_bad_index_type 
  16119.                              db_s_key_not_found 
  16120.                              dce_cf_e_file_open 
  16121.                              dce_cf_e_no_match 
  16122.                              dce_cf_e_no_mem 
  16123.                              dced_s_bad_binding 
  16124.                              dced_s_need_privacy 
  16125.                              dced_s_no_memory 
  16126.                              dced_s_no_support 
  16127.                              dced_s_not_found 
  16128.                              rpc_s_binding_has_no_auth 
  16129.                              rpc_s_invalid_binding 
  16130.                              rpc_s_wrong_kind_of_binding 
  16131.                              sec_acl_invalid_permission 
  16132.                              sec_key_mgmt_e_authn_invalid 
  16133.                              sec_key_mgmt_e_key_unavailable 
  16134.                              sec_key_mgmt_e_unauthorized 
  16135.                              uuid_s_bad_version 
  16136.  
  16137.  Usage 
  16138.  
  16139.           The dced_object_read routine reads the data for a specified entry of 
  16140.           a dced service.  When the application finishes with the data, it 
  16141.           should call the dced_objects_release routine with a value of 1 for 
  16142.           the count parameter. 
  16143.  
  16144.           The valid services for which you can read data include hostdata, 
  16145.           srvrconf, srvrexec, and keytab. Each of these host services has a 
  16146.           list of data entries maintained by dced. The entries do not contain 
  16147.           the actual data, but contain the data's identity and an indicator of 
  16148.           the location of the data item. The hostdata service also has the 
  16149.           dced_hostdata_read routine to read data, and the keytab service has a 
  16150.           series of routines that traverse over the keys in a key table. (See 
  16151.           the dced_keytab_initialize_cursor routine.) The secval and endpoint 
  16152.           services do not have data items to read with this routine. 
  16153.  
  16154.           Applications can also read the data for all entries of a service 
  16155.           using one call to dced_objects_read_all. 
  16156.  
  16157.           Before reading the actual data, an application commonly obtains the 
  16158.           entries to read using the series of cursor routines that begin with 
  16159.           dced_entry_initialize_cursor. 
  16160.  
  16161.           Before calling the dced_object_read routine, the application must 
  16162.           have established a valid dced binding handle by calling either the 
  16163.           dced_binding_create or dced_binding_from_rpc_binding routine. 
  16164.  
  16165.  Examples 
  16166.  
  16167.           The following example creates a dced binding to a dced service based 
  16168.           on a service type and host in an RPC binding handle. The example then 
  16169.           obtains the service's entry list and reads the data associated with 
  16170.           each entry. 
  16171.  
  16172.                     dced_binding_from_rpc_binding(service_type, rpc_bh, &dced_bh, &status);
  16173.                     dced_list_get(dced_bh, &entries, &status);
  16174.                     for(i=0; i<entries.count; i++) {
  16175.                        dced_object_read(dced_bh, &entries.list[i.]id, &data, &status);
  16176.                      .
  16177.                      .
  16178.                      .
  16179.                        dced_objects_release(dced_bh, 1, data, &status);
  16180.                     }
  16181.  
  16182.  Related Information 
  16183.  
  16184.           Routines: 
  16185.           dced_objects_release 
  16186.           dced_object_read_all 
  16187.           dced_hostdata_read 
  16188.           dced_keytab_initialize_cursor 
  16189.           dced_initialize_cursor 
  16190.           dced_binding_create 
  16191.           dced_binding_from_rpc_binding 
  16192.  
  16193.           Books: 
  16194.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16195.  
  16196.  
  16197. ΓòÉΓòÉΓòÉ 3.11.37. dced_object_read_all ΓòÉΓòÉΓòÉ
  16198.  
  16199.  Purpose 
  16200.  
  16201.           Reads all the data for a service of the DCE Host daemon (dced) on a 
  16202.           specific host. 
  16203.  
  16204.  Format 
  16205.  
  16206.                     #include <dce\dced.h>
  16207.  
  16208.                     void dced_object_read_all(
  16209.                              dced_binding_handle_t  dced_bh,
  16210.                              unsigned32  *count,
  16211.                              void  **data_list,
  16212.                              error_status_t  *status);
  16213.  
  16214.  Parameters 
  16215.  
  16216.           Input 
  16217.  
  16218.           dced_bh       Specifies the dced binding handle for a dced service on 
  16219.                         a specific host. 
  16220.  
  16221.           Output 
  16222.  
  16223.           count         Returns the count of the number of data items read. 
  16224.  
  16225.           data_list     Returns the list of data items read. The data returned 
  16226.                         is an array of one of the following types, depending on 
  16227.                         the service: 
  16228.  
  16229.                              Service        Data Type of Array Returned 
  16230.                              hostdata       sec_attr_t 
  16231.                              srvrconf       server_t 
  16232.                              srvrexec       server_t 
  16233.                              keytab         dced_key_list_t 
  16234.  
  16235.           status        Returns the status code from this routine.  This status 
  16236.                         code indicates whether the routine completed 
  16237.                         successfully or, if not, why not. The possible status 
  16238.                         codes are: 
  16239.  
  16240.                              error_status_ok 
  16241.                              db_s_bad_index_type 
  16242.                              db_s_key_not_found 
  16243.                              dce_cf_e_file_open 
  16244.                              dce_cf_e_no_match 
  16245.                              dce_cf_e_no_mem 
  16246.                              dced_s_bad_binding 
  16247.                              dced_s_need_privacy 
  16248.                              dced_s_no_memory 
  16249.                              dced_s_no_support 
  16250.                              dced_s_not_found 
  16251.                              rpc_s_binding_has_no_auth 
  16252.                              rpc_s_invalid_binding 
  16253.                              rpc_s_wrong_kind_of_binding 
  16254.                              sec_acl_invalid_permission 
  16255.                              sec_key_mgmt_e_authn_invalid 
  16256.                              sec_key_mgmt_e_key_unavailable 
  16257.                              sec_key_mgmt_e_unauthorized 
  16258.                              sec_s_no_memory 
  16259.                              uuid_s_bad_version 
  16260.  
  16261.  Usage 
  16262.  
  16263.           The dced_object_read_all routine reads all the data for a specified 
  16264.           host service on a specific host.  When the application finishes with 
  16265.           the data, it should call the dced_objects_release routine. 
  16266.           Applications can also read individual data objects for a service 
  16267.           using the dced_object_read routine. 
  16268.  
  16269.           The valid services for which you can read data include hostdata, 
  16270.           srvrconf, srvrexec, and keytab. 
  16271.  
  16272.           Prior to calling the dced_object_read_all routine, the application 
  16273.           must have established a valid dced binding handle by calling either 
  16274.           the dced_binding_create or dced_binding_from_rpc_binding routine. 
  16275.  
  16276.  Examples 
  16277.  
  16278.           The following example reads and displays all the data for a 
  16279.           particular dced service. 
  16280.  
  16281.                     dced_binding_handle_t dced_bh;
  16282.                     dced_string_t host_service;
  16283.                     void *data_list;
  16284.                     unsigned32 count;
  16285.                     error_status_t status;
  16286.  
  16287.                     dced_binding_create(host_service, dced_c_binding_syntax_default, &dced_bh, &status);
  16288.                     dced_object_read_all(dced_bh, &count, &data_list, &status);
  16289.                     display(host_service, count, &data_list); /* application specific */
  16290.                     dced_objects_release(dced_bh, count, data_list, &status);
  16291.                     dced_binding_free(dced_bh, &status);
  16292.  
  16293.  Related Information 
  16294.  
  16295.           Routines: 
  16296.           dced_objects_release 
  16297.           dced_object_read 
  16298.           dced_binding_create 
  16299.           dced_binding_from_rpc_binding 
  16300.  
  16301.           Books: 
  16302.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16303.  
  16304.  
  16305. ΓòÉΓòÉΓòÉ 3.11.38. dced_objects_release ΓòÉΓòÉΓòÉ
  16306.  
  16307.  Purpose 
  16308.  
  16309.           Releases the resources allocated for data read from a dced service. 
  16310.  
  16311.  Format 
  16312.  
  16313.                     #include <dce\dced.h>
  16314.  
  16315.                     void dced_objects_release(
  16316.                              dced_binding_handle_t  dced_bh,
  16317.                              unsigned32  count,
  16318.                              void  *data,
  16319.                              error_status_t  *status);
  16320.  
  16321.  Parameters 
  16322.  
  16323.           Input 
  16324.  
  16325.           dced_bh       Specifies the dced binding handle for a dced service on 
  16326.                         a specific host. 
  16327.  
  16328.           count         Specifies the number of data items previously read and 
  16329.                         now to be released. 
  16330.  
  16331.           Input/Output 
  16332.  
  16333.           data          Specifies the data for which resources are released. 
  16334.  
  16335.           Output 
  16336.  
  16337.           status        Returns the status code from this routine.  This status 
  16338.                         code indicates whether the routine completed 
  16339.                         successfully or, if not, why not. The possible status 
  16340.                         codes are: 
  16341.  
  16342.                              error_status_ok 
  16343.                              dced_s_bad_binding 
  16344.                              dced_s_no_support 
  16345.  
  16346.  Usage 
  16347.  
  16348.           The dced_objects_release routine releases the resources allocated 
  16349.           when data for dced is read.  Applications should call 
  16350.           dced_objects_release when finished with data allocated by the 
  16351.           following dced API routines: 
  16352.  
  16353.                dced_object_read_all 
  16354.                dced_object_read 
  16355.                dced_hostdata_read 
  16356.  
  16357.           If the data being released was read by using dced_object_read_all, 
  16358.           the count returned from this routine is used as input to the 
  16359.           dced_objects_release routine. If the data being released was read by 
  16360.           using dced_object_read or dced_hostdata_read, the count value 
  16361.           required as input for the dced_objects_release routine is 1. 
  16362.  
  16363.  Examples 
  16364.  
  16365.           In the following example, a binding is created to a dced service on 
  16366.           some host for a service that stores data, and the service's entry 
  16367.           list is obtained.  For each entry, the data is read, displayed, and 
  16368.           released. 
  16369.  
  16370.                     dced_binding_handle_t dced_bh;
  16371.                     dced_entry_list_t entries;
  16372.                     unsigned32 i;
  16373.                     void *data;
  16374.                     error_status_t status;
  16375.  
  16376.                     dced_binding_create(host_service, dced_c_binding_syntax_default, &dced_bh, &status);
  16377.                     dced_list_get(dced_bh, &entries, &status);
  16378.                     for(i=0; i<entries.count; i++) {
  16379.                        dced_object_read(dced_bh, &(entries.list[i].id), &data, &status);
  16380.                        display(host_service, 1, &data);      /* application specific */
  16381.                        dced_objects_release(dced_bh, 1, data, &status);
  16382.                      .
  16383.                      .
  16384.                      .
  16385.  
  16386.  Related Information 
  16387.  
  16388.           Routines: 
  16389.           dced_object_read 
  16390.           dced_object_read_all 
  16391.           dced_hostdata_read 
  16392.           dced_binding_create 
  16393.           dced_binding_from_rpc_binding 
  16394.  
  16395.           Books: 
  16396.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16397.  
  16398.  
  16399. ΓòÉΓòÉΓòÉ 3.11.39. dced_release_cursor ΓòÉΓòÉΓòÉ
  16400.  
  16401.  Purpose 
  16402.  
  16403.           Releases the resources of a cursor that traverses a dced service's 
  16404.           list of entries. 
  16405.  
  16406.  Format 
  16407.  
  16408.                     #include <dce\dced.h>
  16409.  
  16410.                     void dced_release_cursor(
  16411.                              dced_cursor_t  *cursor,
  16412.                              error_status_t  *status);
  16413.  
  16414.  Parameters 
  16415.  
  16416.           Input/Output 
  16417.  
  16418.           cursor        Specifies the cursor for which resources are released. 
  16419.  
  16420.           Output 
  16421.  
  16422.           status        Returns the status code from this routine.  This status 
  16423.                         code indicates whether the routine completed 
  16424.                         successfully or, if not, why not. The only possible 
  16425.                         status code is error_status_ok. 
  16426.  
  16427.  Usage 
  16428.  
  16429.           The dced_release_cursor routine releases the resources of a cursor 
  16430.           initially set by the dced_initilalize_cursor routine and used by the 
  16431.           dced_entry_get_next routine. 
  16432.  
  16433.           Prior to calling this routine, the application must have first 
  16434.           established a valid dced binding handle by calling either the 
  16435.           dced_binding_create or dced_binding_from_rpc_binding routine, and 
  16436.           then the application must have called the dced_initialize_cursor 
  16437.           routine. 
  16438.  
  16439.  Related Information 
  16440.  
  16441.           Routines: 
  16442.           dced_initialize_cursor 
  16443.           dced_entry_get_next 
  16444.           dced_binding_create 
  16445.           dced_binding_from_rpc_binding 
  16446.  
  16447.           Books: 
  16448.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16449.  
  16450.  
  16451. ΓòÉΓòÉΓòÉ 3.11.40. dced_secval_start ΓòÉΓòÉΓòÉ
  16452.  
  16453.  Purpose 
  16454.  
  16455.           Starts the security validation (secval) service of a specific host's 
  16456.           dced. 
  16457.  
  16458.  Format 
  16459.  
  16460.                     #include <dce\dced.h>
  16461.  
  16462.                     void dced_secval_start(
  16463.                              dced_binding_handle_t  dced_bh,
  16464.                              error_status_t  *status);
  16465.  
  16466.  Parameters 
  16467.  
  16468.           Input 
  16469.  
  16470.           dced_bh       Specifies the dced binding handle for the secval 
  16471.                         service on a specific host. 
  16472.  
  16473.           Output 
  16474.  
  16475.           status        Returns the status code from this routine.  This status 
  16476.                         code indicates whether the routine completed 
  16477.                         successfully or, if not, why not. The possible status 
  16478.                         codes are: 
  16479.  
  16480.                              error_status_ok 
  16481.                              dced_s_bad_binding 
  16482.                              dced_s_sv_already_enabled 
  16483.                              sec_acl_invalid_permission 
  16484.  
  16485.  Usage 
  16486.  
  16487.           The dced_secval_start routine starts the Security Validation service 
  16488.           of a specific host's dced.  This routine is typically used by 
  16489.           management applications. 
  16490.  
  16491.           The Security Validation service (secval) has two major functions: 
  16492.  
  16493.             o  Maintains a login context for the host's self identity. 
  16494.             o  Validates and certifies to applications (usually login programs) 
  16495.                that the DCE Security daemon (secd) is legitimate. 
  16496.  
  16497.           The secval is commonly started by default when dced starts.  See the 
  16498.           dced_secval_stop routine for a discussion of when to use the 
  16499.           combination of dced_secval_stop and dced_secval_start. 
  16500.  
  16501.           Prior to calling this routine, the application must have established 
  16502.           a valid dced binding handle to the secval service by calling either 
  16503.           the dced_binding_create or dced_binding_from_rpc_binding routine. 
  16504.  
  16505.  Related Information 
  16506.  
  16507.           Routines: 
  16508.           dced_secval_stop 
  16509.           dced_binding_create 
  16510.           dced_binding_from_rpc_binding 
  16511.  
  16512.           Commands: 
  16513.           dced - The secval object of dcecp. 
  16514.  
  16515.           Books: 
  16516.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16517.  
  16518.  
  16519. ΓòÉΓòÉΓòÉ 3.11.41. dced_secval_status ΓòÉΓòÉΓòÉ
  16520.  
  16521.  Purpose 
  16522.  
  16523.           Indicates whether a specific host's dced security validation service 
  16524.           is running. 
  16525.  
  16526.  Format 
  16527.  
  16528.                     #include <dce\dced.h>
  16529.  
  16530.                     void dced_secval_status(
  16531.                              dced_binding_handle_t  dced_bh,
  16532.                              boolean32  *secval_active,
  16533.                              error_status_t  *status);
  16534.  
  16535.  Parameters 
  16536.  
  16537.           Input 
  16538.  
  16539.           dced_bh       Specifies the dced binding handle for the secval 
  16540.                         service on a specific host. 
  16541.  
  16542.           Output 
  16543.  
  16544.           secval_active Returns a value of TRUE if the security validation 
  16545.                         service is running and FALSE if it is not running. 
  16546.  
  16547.           status        Returns the status code from this routine.  This status 
  16548.                         code indicates whether the routine completed 
  16549.                         successfully or, if not, why not. The possible status 
  16550.                         codes are: 
  16551.  
  16552.                              error_status_ok 
  16553.                              dced_s_bad_binding 
  16554.  
  16555.  Usage 
  16556.  
  16557.           The dced_secval_status routine sets a parameter to TRUE or FALSE 
  16558.           depending on whether the security validation service has been 
  16559.           activated or deactivated. 
  16560.  
  16561.           Prior to calling this routine, the application must have established 
  16562.           a valid dced binding handle to the secval service by calling either 
  16563.           the dced_binding_create or dced_binding_from_rpc_binding routine. 
  16564.  
  16565.  Related Information 
  16566.  
  16567.           Routines: 
  16568.           dced_secval_start 
  16569.           dced_secval_stop 
  16570.           dced_binding_create 
  16571.           dced_binding_from_rpc_binding 
  16572.  
  16573.           Commands: 
  16574.           dced - The secval object of dcecp. 
  16575.  
  16576.           Books: 
  16577.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16578.  
  16579.  
  16580. ΓòÉΓòÉΓòÉ 3.11.42. dced_secval_stop ΓòÉΓòÉΓòÉ
  16581.  
  16582.  Purpose 
  16583.  
  16584.           Stops the security validation (secval) service of a specific host's 
  16585.           dced. 
  16586.  
  16587.  Format 
  16588.  
  16589.                     #include <dce\dced.h>
  16590.  
  16591.                     void dced_secval_stop(
  16592.                              dced_binding_handle_t dced_bh,
  16593.                              error_status_t  *status);
  16594.  
  16595.  Parameters 
  16596.  
  16597.           Input 
  16598.  
  16599.           dced_bh       Specifies the dced binding handle for the secval 
  16600.                         service on a specific host. 
  16601.  
  16602.           Output 
  16603.  
  16604.           status        Returns the status code from this routine.  This status 
  16605.                         code indicates whether the routine completed 
  16606.                         successfully or, if not, why not. The possible status 
  16607.                         codes are: 
  16608.  
  16609.                              error_status_ok 
  16610.                              dced_s_bad_binding 
  16611.                              dced_s_sv_not_enabled 
  16612.                              sec_acl_invalid_permission 
  16613.  
  16614.  Usage 
  16615.  
  16616.           The dced_secval_stop routine stops the security validation service 
  16617.           (secval) of a specific host's dced. This routine is typically used by 
  16618.           management applications. 
  16619.  
  16620.           The secval service is commonly started by default when dced starts. 
  16621.           The main use of dced_secval_stop and dced_secval_start is to force a 
  16622.           refresh of the host principal credentials.  This is the only way to 
  16623.           force certain registry changes made by the host principal (such as 
  16624.           groupset membership) to be seen by processes running on the host. 
  16625.  
  16626.           You can easily stop and then start the secval service with the 
  16627.           following operations: 
  16628.  
  16629.                dcecp -c secval deactivate 
  16630.                dcecp -c secval activate 
  16631.  
  16632.           It is not a good idea to remove the machine principal self 
  16633.           credentials for an extended period of time, because this causes 
  16634.           processes running as self to fail in their attempts to perform 
  16635.           authenticated operations. 
  16636.  
  16637.  Related Information 
  16638.  
  16639.           Routines: 
  16640.           dced_secval_start 
  16641.           dced_binding_create 
  16642.           dced_binding_from_rpc_binding 
  16643.  
  16644.           Commands: 
  16645.           dced - The secval object of dcecp. 
  16646.  
  16647.           Books: 
  16648.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16649.  
  16650.  
  16651. ΓòÉΓòÉΓòÉ 3.11.43. dced_secval_validate ΓòÉΓòÉΓòÉ
  16652.  
  16653.  Purpose 
  16654.  
  16655.           Validates that the secd used by a specific host is legitimate. 
  16656.  
  16657.  Format 
  16658.  
  16659.                     #include <dce\dced.h>
  16660.  
  16661.                     void dced_secval_validate(
  16662.                              dced_binding_handle_t  dced_bh,
  16663.                              error_status_t  *status);
  16664.  
  16665.  Parameters 
  16666.  
  16667.           Input 
  16668.  
  16669.           dced_bh       Specifies the dced binding handle for the secval 
  16670.                         service on a specific host. 
  16671.  
  16672.           Output 
  16673.  
  16674.           status        Returns the status code from this routine. This status 
  16675.                         code indicates whether the routine completed 
  16676.                         successfully or, if not, why not. The possible status 
  16677.                         codes are: 
  16678.  
  16679.                              error_status_ok 
  16680.                              dced_s_bad_binding 
  16681.                              ept_s_not_registered 
  16682.                              rpc_s_comm_failure 
  16683.                              rpc_s_invalid_binding 
  16684.                              rpc_s_rpcd_comm_failure 
  16685.                              rpc_s_wrong_kind_of_binding 
  16686.                              sec_login_s_no_current_context 
  16687.  
  16688.  Usage 
  16689.  
  16690.           The dced_secval_validate routine validates and certifies for a 
  16691.           specific host that the DCE Security daemon (secd) is legitimate. 
  16692.           Typically, a login program uses the security validation service when 
  16693.           it uses the Security Service's Login API (routines that begin with 
  16694.           sec_login). However, if a management application trusts some remote 
  16695.           host, it can use dced_secval_validate to validate secd without 
  16696.           logging in to the host. 
  16697.  
  16698.  Related Information 
  16699.  
  16700.           Routines: 
  16701.           DCE Login API 
  16702.           dced_secval_start 
  16703.           dced_binding_create 
  16704.           dced_binding_from_rpc_binding 
  16705.  
  16706.           Commands: 
  16707.           dced - The secval object of dcecp. 
  16708.  
  16709.           Books: 
  16710.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16711.  
  16712.  
  16713. ΓòÉΓòÉΓòÉ 3.11.44. dced_server_create ΓòÉΓòÉΓòÉ
  16714.  
  16715.  Purpose 
  16716.  
  16717.           Creates DCE server configuration data for the host's dced. 
  16718.  
  16719.  Format 
  16720.  
  16721.                     #include <dce\dced.h>
  16722.  
  16723.                     void dced_server_create(
  16724.                              dced_binding_handle_t  dced_bh,
  16725.                              server_t  *conf_data,
  16726.                              error_status_t  *status);
  16727.  
  16728.  Parameters 
  16729.  
  16730.           Input 
  16731.  
  16732.           dced_bh       Specifies the dced binding handle for the srvrconf 
  16733.                         service on a specific host. 
  16734.  
  16735.           Input/Output 
  16736.  
  16737.           conf_data     Specifies the configuration data for the server.  The 
  16738.                         dced_intro reference page describes the server_t 
  16739.                         structure. 
  16740.  
  16741.           Output 
  16742.  
  16743.           status        Returns the status code from this routine.  This status 
  16744.                         code indicates whether the routine completed 
  16745.                         successfully or, if not, why not. The possible status 
  16746.                         codes are: 
  16747.  
  16748.                              error_status_ok 
  16749.                              db_s_bad_header_type 
  16750.                              db_s_bad_index_type 
  16751.                              db_s_iter_not_allowed 
  16752.                              db_s_key_not_found 
  16753.                              db_s_readonly 
  16754.                              db_s_store_failed 
  16755.                              dced_s_already_exists 
  16756.                              dced_s_bad_binding 
  16757.                              dced_s_name_missing 
  16758.                              sec_acl_invalid_permission 
  16759.  
  16760.  Usage 
  16761.  
  16762.           The dced_server_create routine creates server configuration data. 
  16763.           This routine is used by management installation applications to 
  16764.           remotely (or locally) establish the data used to control how a DCE 
  16765.           server starts. However, it does not create the program or start it. 
  16766.           Because this activity is typically part of a server's installation, 
  16767.           you can also use the dcecp server create operation. 
  16768.  
  16769.           Management applications use the dced_object_read routine to read the 
  16770.           configuration data. 
  16771.  
  16772.           Prior to calling dced_server_create, the application must have 
  16773.           established a valid dced binding handle to the srvrconf service by 
  16774.           calling either dced_binding_create or dced_binding_from_rpc_binding. 
  16775.  
  16776.  Examples 
  16777.  
  16778.           The following example shows how to fill in some of the fields of a 
  16779.           server_t structure and then create the configuration in dced. 
  16780.  
  16781.                     dced_binding_handle_t dced_bh;
  16782.                     server_t conf;
  16783.                     error_status_t status;
  16784.  
  16785.                     dced_binding_create("srvrconf@hosts/katharine",
  16786.                                         dced_c_binding_syntax_default,
  16787.                                         &dced_bh, &status);
  16788.                     /* setup a server_t structure */
  16789.                     uuid_create(&conf.id, &status);
  16790.                     conf.name = (dced_string_t)"application";
  16791.                     conf.entryname = (dced_string_t)"/.:/development/new_app";
  16792.                     conf.services.count = 1;
  16793.  
  16794.                     /* service_t structure(s) */
  16795.                     conf.services.list = malloc(conf.services.count * sizeof(service_t));
  16796.                     rpc_if_inq_id(application_v1_0_c_ifspec, &(conf.services.list[0].ifspec), &status);
  16797.                     conf.services.list[0].ifname = (dced_string_t)"application";
  16798.                     conf.services.list[0].annotation = (dced_string_t)"A new application";
  16799.                     conf.services.list[0].flags = 0;
  16800.  
  16801.                     /* server_fixedattr_t structure */
  16802.                     conf.fixed.startupflags = server_c_startup_explicit | server_c_startup_on_failure;
  16803.                     conf.fixed.flags = 0;
  16804.                     conf.fixed.program = (dced_string_t)"/usr/users/bin/new_app";
  16805.  
  16806.                     dced_server_create(dced_bh, &conf, &status);
  16807.                      .
  16808.                      .
  16809.                      .
  16810.  
  16811.  Related Information 
  16812.  
  16813.           Routines: 
  16814.           dced_object_read 
  16815.           dced_binding_create 
  16816.           dced_binding_from_rpc_binding 
  16817.  
  16818.           Commands: 
  16819.           The server object of dcecp 
  16820.  
  16821.           Books: 
  16822.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16823.  
  16824.  
  16825. ΓòÉΓòÉΓòÉ 3.11.45. dced_server_delete ΓòÉΓòÉΓòÉ
  16826.  
  16827.  Purpose 
  16828.  
  16829.           Deletes DCE server configuration data from dced. 
  16830.  
  16831.  Format 
  16832.  
  16833.                     #include <dce\dced.h>
  16834.  
  16835.                     void dced_server_delete(
  16836.                              dced_binding_handle_t  dced_bh,
  16837.                              uuid_t  *conf_uuid,
  16838.                              error_status_t  *status);
  16839.  
  16840.  Parameters 
  16841.  
  16842.           Input 
  16843.  
  16844.           dced_bh       Specifies the dced binding handle for the srvrconf 
  16845.                         service on a specific host. 
  16846.  
  16847.           conf_uuid     Specifies the UUID that dced uses to identify the 
  16848.                         server configuration data to delete. 
  16849.  
  16850.           Output 
  16851.  
  16852.           status        Returns the status code from this routine.  This status 
  16853.                         code indicates whether the routine completed 
  16854.                         successfully or, if not, why not. The possible status 
  16855.                         codes are: 
  16856.  
  16857.                              error_status_ok 
  16858.                              db_s_bad_index_type 
  16859.                              db_s_del_failed 
  16860.                              db_s_iter_not_allowed 
  16861.                              dced_s_bad_binding 
  16862.                              dced_s_not_found 
  16863.                              sec_acl_invalid_permission 
  16864.  
  16865.  Usage 
  16866.  
  16867.           The dced_server_delete routine deletes server configuration data from 
  16868.           the server's dced.  This routine removes a server from DCE control by 
  16869.           making it incapable of being starting by dced.  It does not delete 
  16870.           the program from disk, nor does it affect the server if it is 
  16871.           currently running. 
  16872.  
  16873.           Prior to using dced_server_delete, the server configuration data must 
  16874.           be created by an administrator using the dcecp server create 
  16875.           operation or by an application that is using dced_server_create. 
  16876.  
  16877.           Prior to calling dced_server_delete, the application must have 
  16878.           established a valid dced binding handle to the srvrconf service by 
  16879.           calling either dced_binding_create or dced_binding_from_rpc_binding. 
  16880.  
  16881.  Examples 
  16882.  
  16883.           In the following example, a dced binding is created to the server 
  16884.           configuration service on a host, and then an inquiry is made to 
  16885.           determine UUID associated with a particular server. The 
  16886.           dced_server_delete routine is then used to delete the configuration. 
  16887.  
  16888.                     dced_binding_handle_t dced_bh;
  16889.                     dced_string_t server_name;
  16890.                     uuid_t srvrconf_id;
  16891.                     error_status_t status;
  16892.  
  16893.                     name_server(&server_name); /* application specific */
  16894.                     dced_binding_create("srvrconf@hosts/katharine",
  16895.                                         dced_c_binding_syntax_default, &dced_bh, &status);
  16896.                     dced_inq_id(dced_bh, server_name, &srvrconf_id, &status);
  16897.                     dced_server_delete(dced_bh, &srvrconf_id, &status);
  16898.                     dced_binding_free(dced_bh, &status);
  16899.  
  16900.  Related Information 
  16901.  
  16902.           Routines: 
  16903.           dced_server_create 
  16904.           dced_server_modify_attributes 
  16905.           dced_binding_create 
  16906.           dced_binding_from_rpc_binding 
  16907.  
  16908.           Commands: 
  16909.           The server object of dcecp 
  16910.  
  16911.           Books: 
  16912.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  16913.  
  16914.  
  16915. ΓòÉΓòÉΓòÉ 3.11.46. dced_server_disable_if ΓòÉΓòÉΓòÉ
  16916.  
  16917.  Purpose 
  16918.  
  16919.           Disables a service (rpc interface) provided by a specific server on a 
  16920.           specific host. 
  16921.  
  16922.  Format 
  16923.  
  16924.                     #include <dce\dced.h>
  16925.  
  16926.                     void dced_server_disable_if(
  16927.                              dced_binding_handle_t  dced_bh,
  16928.                              uuid_t  *exec_uuid,
  16929.                              rpc_if_id_t  *interface,
  16930.                              error_status_t  *status);
  16931.  
  16932.  Parameters 
  16933.  
  16934.           Input 
  16935.  
  16936.           dced_bh       Specifies the dced binding handle for the srvrexec 
  16937.                         service on a specific host. 
  16938.  
  16939.           exec_uuid     Specifies the UUID that dced uses to identify the 
  16940.                         running server. 
  16941.  
  16942.           interface     Specifies the RPC interface identifier that represents 
  16943.                         the service to disable.  The interface identifier is 
  16944.                         generated when idl compiles an interface definition 
  16945.                         file.  The interface identifier is an rpc_if_id_t 
  16946.                         structure that contains the interface UUID (uuid) of 
  16947.                         type uuid_t, and numbers of type unsigned16 
  16948.                         representing the major (vers_major) and minor 
  16949.                         (vers_minor) version numbers for the interface. 
  16950.  
  16951.           Output 
  16952.  
  16953.           status        Returns the status code from this routine.  This status 
  16954.                         code indicates whether the routine completed 
  16955.                         successfully or, if not, why not. The possible status 
  16956.                         codes are: 
  16957.  
  16958.                              error_status_ok 
  16959.                              db_s_bad_index_type 
  16960.                              db_s_iter_not_allowed 
  16961.                              db_s_readonly 
  16962.                              db_s_store_failed 
  16963.                              dced_s_bad_binding 
  16964.                              dced_s_not_found 
  16965.                              sec_acl_invalid_permission 
  16966.  
  16967.  Usage 
  16968.  
  16969.           The dced_server_disable_if routine disables a service provided by a 
  16970.           server on a specific host. A service is represented by an RPC 
  16971.           interface identifier. Management applications use this routine to 
  16972.           remotely disable an interface so that it is inaccessible by clients, 
  16973.           without completely stopping the entire server. 
  16974.  
  16975.           When a server starts and initializes itself, it must call the 
  16976.           dce_server_register routine to enable all of its services. The server 
  16977.           can then disable its own individual services by using 
  16978.           dce_server_disable_service. This routine unregisters the service's 
  16979.           interface from the RPC runtime and marks the interface as disabled in 
  16980.           the endpoint map.  As an alternative, a management application can 
  16981.           use dced_server_disable_if to disable individual services. However, 
  16982.           this routine affects only the endpoint map in dced by marking the 
  16983.           interface as disabled and does not affect the server's runtime. 
  16984.  
  16985.           A management application can re-enable a service by calling the 
  16986.           dced_server_enable_if routine. (Servers re-enable their own services 
  16987.           using the dce_server_enable_if routine.) 
  16988.  
  16989.           Prior to calling dced_server_disable_if, the application must have 
  16990.           established a valid dced binding handle to the srvrexec service by 
  16991.           calling either dced_binding_create or dced_binding_from_rpc_binding. 
  16992.  
  16993.  Related Information 
  16994.  
  16995.           Routines: 
  16996.           dce_server_register 
  16997.           dced_server_enable_if 
  16998.           dced_binding_create 
  16999.           dced_binding_from_rpc_binding 
  17000.  
  17001.           Commands: 
  17002.           The server object of dcecp 
  17003.  
  17004.           Books: 
  17005.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  17006.  
  17007.  
  17008. ΓòÉΓòÉΓòÉ 3.11.47. dced_server_enable_if ΓòÉΓòÉΓòÉ
  17009.  
  17010.  Purpose 
  17011.  
  17012.           Enables a service (rpc interface) of a specific server on a specific 
  17013.           host. 
  17014.  
  17015.  Format 
  17016.  
  17017.                     #include <dce\dced.h>
  17018.  
  17019.                     void dced_server_enable_if(
  17020.                              dced_binding_handle_t  dced_bh,
  17021.                              uuid_t  *exec_uuid,
  17022.                              rpc_if_id_t  *interface,
  17023.                              error_status_t  *status);
  17024.  
  17025.  Parameters 
  17026.  
  17027.           Input 
  17028.  
  17029.           dced_bh       Specifies the dced binding handle for the srvrexec 
  17030.                         service on a specific host. 
  17031.  
  17032.           exec_uuid     Specifies the UUID that dced uses to identify the 
  17033.                         running server. 
  17034.  
  17035.           interface     Specifies the RPC interface identifier that represents 
  17036.                         the service to enable. The interface identifier is 
  17037.                         generated when idl compiles an interface definition 
  17038.                         file. The interface identifier is a structure that 
  17039.                         contains the interface UUID (interface->uuid), and the 
  17040.                         major (interface->vers_major) and minor 
  17041.                         (interface->vers_minor) version numbers for the 
  17042.                         interface. 
  17043.  
  17044.           Output 
  17045.  
  17046.           status        Returns the status code from this routine.  This status 
  17047.                         code indicates whether the routine completed 
  17048.                         successfully or, if not, why not. The possible status 
  17049.                         codes are: 
  17050.  
  17051.                              error_status_ok 
  17052.                              db_s_bad_index_type 
  17053.                              db_s_iter_not_allowed 
  17054.                              db_s_readonly 
  17055.                              db_s_store_failed 
  17056.                              dced_s_bad_binding 
  17057.                              dced_s_not_found 
  17058.                              sec_acl_invalid_permission 
  17059.  
  17060.  Usage 
  17061.  
  17062.           The dced_server_enable_if routine enables a service (or re-enables a 
  17063.           previously disabled service) that a specific server provides. 
  17064.           Management applications use this routine. A service is represented by 
  17065.           an RPC interface identifier. 
  17066.  
  17067.           When a server starts and initializes itself, it typically calls the 
  17068.           dce_server_register routine to enable all of its services. The 
  17069.           services can then be disabled and re-enabled, as needed. A server 
  17070.           enables and disables its own services by using 
  17071.           dce_server_enable_service and dce_server_disable_service and a 
  17072.           management application enables and disables a remote server's service 
  17073.           using dced_server_enable_if and dced_server_disable_if. The 
  17074.           dce_server_xxx routines affect both the RPC runtime and the local 
  17075.           endpoint map by registering (or unregistering) with the runtime and 
  17076.           setting a flag for the interface in the endpoint map as enabled (or 
  17077.           disabled). The dced_server_enable_if and dced_server_disable_if 
  17078.           routines affect only the remote endpoint map by setting the flag. 
  17079.  
  17080.           Before calling dced_server_enable_if, the application must have 
  17081.           established a valid dced binding handle to the srvrexec service by 
  17082.           calling either dced_binding_create or dced_binding_from_rpc_binding. 
  17083.  
  17084.  Related Information 
  17085.  
  17086.           Routines: 
  17087.           dce_server_register 
  17088.           dced_server_disable_if 
  17089.           dced_binding_create 
  17090.           dced_binding_from_rpc_binding 
  17091.  
  17092.           Commands: 
  17093.           The server object of dcecp 
  17094.  
  17095.           Books: 
  17096.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  17097.  
  17098.  
  17099. ΓòÉΓòÉΓòÉ 3.11.48. dced_server_modify_attributes ΓòÉΓòÉΓòÉ
  17100.  
  17101.  Purpose 
  17102.  
  17103.           Modifies attributes for a DCE server's configuration data. 
  17104.  
  17105.  Format 
  17106.  
  17107.                     #include <dce\dced.h>
  17108.  
  17109.                     void dced_server_modify_attributes(
  17110.                              dced_binding_handle_t  dced_bh,
  17111.                              uuid_t  *conf_uuid,
  17112.                              dced_attr_list_t  *data,
  17113.                              error_status_t  *status);
  17114.  
  17115.  Parameters 
  17116.  
  17117.           Input 
  17118.  
  17119.           dced_bh       Specifies the dced binding handle for the srvrconf 
  17120.                         service on a specific host. 
  17121.  
  17122.           conf_uuid     Specifies the UUID that dced uses to identify a 
  17123.                         server's configuration data to modify. 
  17124.  
  17125.           data          Specifies the attributes to be modified. 
  17126.  
  17127.           Output 
  17128.  
  17129.           status        Returns the status code from this routine.  This status 
  17130.                         code indicates whether the routine completed 
  17131.                         successfully or, if not, why not. The possible status 
  17132.                         codes are: 
  17133.  
  17134.                              error_status_ok 
  17135.                              db_s_bad_index_type 
  17136.                              db_s_iter_not_allowed 
  17137.                              db_s_readonly 
  17138.                              db_s_store_failed 
  17139.                              dced_s_bad_binding 
  17140.                              dced_s_not_found 
  17141.                              sec_acl_invalid_permission 
  17142.  
  17143.  Usage 
  17144.  
  17145.           The dced_server_modify_attributes routine replaces the attributes of 
  17146.           a server's configuration data that are maintained by dced on a 
  17147.           specific host. This routine is typically called after a configuration 
  17148.           is created with the dced_server_create routine. 
  17149.  
  17150.           A server's configuration is manipulated in a server_t data structure, 
  17151.           and the dced_server_modify_attributes routine affects only the 
  17152.           attributes member of this structure. To change other server 
  17153.           configuration data, you must first delete the configuration by using 
  17154.           dced_server_delete and then create the configuration again by using 
  17155.           dced_server_create. 
  17156.  
  17157.           Prior to calling dced_server_modify_attributes, the application must 
  17158.           have established a valid dced binding handle to the srvrconf service 
  17159.           by calling either dced_binding_create or 
  17160.           dced_binding_from_rpc_binding. 
  17161.  
  17162.  Related Information 
  17163.  
  17164.           Routines: 
  17165.           dced_object_read 
  17166.           dced_binding_create 
  17167.           dced_binding_from_rpc_binding 
  17168.  
  17169.           Commands: 
  17170.           The server object of dcecp 
  17171.  
  17172.           Books: 
  17173.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  17174.  
  17175.  
  17176. ΓòÉΓòÉΓòÉ 3.11.49. dced_server_start ΓòÉΓòÉΓòÉ
  17177.  
  17178.  Purpose 
  17179.  
  17180.           Starts a DCE-configured server on a specified host. 
  17181.  
  17182.  Format 
  17183.  
  17184.                     #include <dce\dced.h>
  17185.  
  17186.                     void dced_server_start(
  17187.                              dced_binding_handle_t  dced_bh,
  17188.                              uuid_t  *conf_uuid,
  17189.                              dced_attr_list_t  *attributes,
  17190.                              uuid_t  *exec_uuid,
  17191.                              error_status_t  *status);
  17192.  
  17193.  Parameters 
  17194.  
  17195.           Input 
  17196.  
  17197.           dced_bh       Specifies the dced binding handle for the srvrconf 
  17198.                         service on a specific host. 
  17199.  
  17200.           conf_uuid     Specifies the UUID that dced uses to identify the 
  17201.                         server to start.  If the value input is that of a 
  17202.                         server that is already running, dced starts a new 
  17203.                         instance. 
  17204.  
  17205.           attributes    Specifies the configuration attributes to use to start 
  17206.                         the server. If the value is NULL, the default 
  17207.                         configuration defined in dced is used. 
  17208.  
  17209.           Input/Output 
  17210.  
  17211.           exec_uuid     Specifies a new UUID for dced to use to identify the 
  17212.                         running server.  If a NIL UUID is input, a new UUID is 
  17213.                         created and returned.  If the value input is that of a 
  17214.                         server that is already running, dced starts a new 
  17215.                         instance and returns a new value. 
  17216.  
  17217.           Output 
  17218.  
  17219.           status        Returns the status code from this routine.  This status 
  17220.                         code indicates whether the routine completed 
  17221.                         successfully or, if not, why not. The possible status 
  17222.                         codes are: 
  17223.  
  17224.                              error_status_ok 
  17225.                              db_s_bad_header_type 
  17226.                              db_s_iter_not_allowed 
  17227.                              db_s_key_not_found 
  17228.                              db_s_readonly 
  17229.                              db_s_store_failed 
  17230.                              dced_s_bad_binding 
  17231.                              dced_s_no_support 
  17232.                              dced_s_not_found 
  17233.                              dced_s_sc_cant_fork 
  17234.                              dced_s_sc_invalid_attr_type 
  17235.                              dced_s_sc_open_file_failed 
  17236.                              sec_acl_invalid_permission 
  17237.                              uuid_s_bad_version 
  17238.  
  17239.  Usage 
  17240.  
  17241.           The dced_server_start routine starts DCE-configured servers on a 
  17242.           specific remote host (or the local host).  The configuration data is 
  17243.           stored in an object in the srvrconf service of dced.  When the server 
  17244.           starts, dced uses the server configuration object and creates a 
  17245.           server execution object in the srvrexec service.  A server execution 
  17246.           object consists of data that describes the executing server. 
  17247.  
  17248.           Management applications create the configuration data by using the 
  17249.           dced_server_create. Use the dced_object_read routine to read the 
  17250.           configuration or execution data. 
  17251.  
  17252.           Prior to calling dced_server_start, the application must have 
  17253.           established a valid dced binding handle to the srvrconf service by 
  17254.           calling either dced_binding_create or dced_binding_from_rpc_binding. 
  17255.  
  17256.  Examples 
  17257.  
  17258.           The following example starts a configured server using a nil UUID as 
  17259.           input for the executing server. 
  17260.  
  17261.                     dced_binding_handle_t conf_bh;
  17262.                     dced_string_t server_name;
  17263.                     uuid_t srvrconf_id, srvrexec_id;
  17264.                     error_status_t status;
  17265.  
  17266.                     dced_binding_create("srvrconf@hosts/patrick",
  17267.                                         dced_c_binding_syntax_default,
  17268.                                         &conf_bh, &status);
  17269.                     dced_inq_id(conf_bh, server_name, &srvrconf_id, &status);
  17270.                     uuid_create_nil(&srvrexec_id, &status);
  17271.                     dced_server_start(conf_bh, &srvrconf_id, NULL, &srvrexec_id, &status);
  17272.                      .
  17273.                      .
  17274.                      .
  17275.  
  17276.  Related Information 
  17277.  
  17278.           Routines: 
  17279.           dced_server_create 
  17280.           dced_server_stop 
  17281.           dced_binding_create 
  17282.           dced_binding_from_rpc_binding 
  17283.  
  17284.           Commands: 
  17285.           The server object of dcecp 
  17286.  
  17287.           Books: 
  17288.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  17289.  
  17290.  
  17291. ΓòÉΓòÉΓòÉ 3.11.50. dced_server_stop ΓòÉΓòÉΓòÉ
  17292.  
  17293.  Purpose 
  17294.  
  17295.           Stops a DCE-configured server running on a specific host. 
  17296.  
  17297.  Format 
  17298.  
  17299.                     #include <dce\dced.h>
  17300.  
  17301.                     void dced_server_stop(
  17302.                              dced_binding_handle_t  dced_bh,
  17303.                              uuid_t  *exec_uuid,
  17304.                              srvrexec_stop_method_t  method,
  17305.                              error_status_t  *status);
  17306.  
  17307.  Parameters 
  17308.  
  17309.           Input 
  17310.  
  17311.           dced_bh       Specifies the dced binding handle for the srvrexec 
  17312.                         service on a specific host. 
  17313.  
  17314.           exec_uuid     Specifies a UUID that dced uses to identify the running 
  17315.                         server. If the value input is dced_g_uuid_all_servers, 
  17316.                         dced attempts to stop all the DCE servers running on 
  17317.                         that host. 
  17318.  
  17319.           method        Specifies the method dced uses to stop a server. A 
  17320.                         method is represented by one of the following values: 
  17321.  
  17322.                              srvrexec_stop_rpc   Uses the 
  17323.                                                  rpc_mgmt_stop_server_listening 
  17324.                                                  routine.  This is the cleanest 
  17325.                                                  way to stop a server, because 
  17326.                                                  it waits for outstanding 
  17327.                                                  remote procedure calls to 
  17328.                                                  finish before making the 
  17329.                                                  server's rpc_server_listen 
  17330.                                                  routine return. 
  17331.  
  17332.                              srvrexec_stop_soft  Uses a soft local host 
  17333.                                                  mechanism (such as the TERM 
  17334.                                                  signal in UNIX). 
  17335.  
  17336.                              srvrexec_stop_hard  Uses a hard local host 
  17337.                                                  mechanism (such as the KILL 
  17338.                                                  signal in UNIX). 
  17339.  
  17340.                              srvrexec_stop_error Uses a mechanism that saves 
  17341.                                                  the program state (such as the 
  17342.                                                  ABORT signal in UNIX). 
  17343.  
  17344.           Output 
  17345.  
  17346.           status        Returns the status code from this routine.  This status 
  17347.                         code indicates whether the routine completed 
  17348.                         successfully or, if not, why not. The possible status 
  17349.                         codes are: 
  17350.  
  17351.                              error_status_ok 
  17352.                              dced_s_bad_binding 
  17353.                              dced_s_no_support 
  17354.                              dced_s_not_found 
  17355.                              rpc_s_binding_incomplete 
  17356.                              rpc_s_comm_failure 
  17357.                              rpc_s_invalid_binding 
  17358.                              rpc_s_mgmt_op_disallowed 
  17359.                              rpc_s_unknown_if 
  17360.                              rpc_s_wrong_kind_of_binding 
  17361.                              sec_acl_invalid_permission 
  17362.                              uuid_s_bad_version 
  17363.  
  17364.  Usage 
  17365.  
  17366.           The dced_server_stop routine stops DCE-configured servers on specific 
  17367.           hosts.  When the server is completely stopped and no longer a running 
  17368.           process, dced deletes the associated execution data it maintained. 
  17369.  
  17370.           Administrators use the dcecp operations server create and server 
  17371.           start to configure and start a server, and management applications 
  17372.           use the associated dced_server_create and dced_server_start routines. 
  17373.  
  17374.           Prior to calling dced_server_stop, the application must have 
  17375.           established a valid dced binding handle to the srvrexec service by 
  17376.           calling either dced_binding_create or dced_binding_from_rpc_binding. 
  17377.  
  17378.  Cautions 
  17379.  
  17380.           Using the value dced_g_uuid_all_servers for the exec_uuid parameter 
  17381.           causes dced to shut down all servers including itself. 
  17382.  
  17383.  Examples 
  17384.  
  17385.           The following example obtains dced binding handles to the server 
  17386.           configuration and execution services of dced on the host patrick. The 
  17387.           example then checks to see if the server is running by seeing if dced 
  17388.           has a UUID and entry for the executing server. However, the server 
  17389.           may be in the process of starting up or stopping, so the example also 
  17390.           checks to be sure the instance UUID of the running server matches the 
  17391.           UUID of the configuration for that server. If there is a match, the 
  17392.           server is running. Finally, the example stops the server by calling 
  17393.           dced_server_stop with the srvrexec_stop_rpc parameter. 
  17394.  
  17395.                     dced_binding_handle_t conf_bh, exec_bh;
  17396.                     dced_string_t server_name;
  17397.                     void *data;
  17398.                     server_t *exec_ptr;
  17399.                     uuid_t svrconf_id, srvrexec_id;
  17400.                     error_status_t status;
  17401.                      .
  17402.                      .
  17403.                      .
  17404.                     dced_binding_create("srvrconf@hosts/patrick",
  17405.                                         dced_c_binding_syntax_default,
  17406.                                         &conf_bh, &status);
  17407.                     dced_binding_create("srvrexec@hosts/patrick",
  17408.                                         dced_c_binding_syntax_default,
  17409.                                         &exec_bh, &status);
  17410.                         /* is server running? */
  17411.                     dced_inq_id(exec_bh, server_name, &srvrexec_id, &status);
  17412.                         /* also check to be sure server is not coming up or going down */
  17413.                     dced_object_read(exec_bh, &srvrexec_id, &data, &status);
  17414.                     exec_ptr = (server_t*)data;
  17415.                     dced_inq_id(conf_bh, server_name, &srvrconf_id, &status);
  17416.                     if(uuid_equal(&srvrconf_id,
  17417.                                   &exec_ptr->exec_data.tagged_union.running_data.instance,
  17418.                                   &status) ) {
  17419.                         dced_server_stop(exec_bh, &srvrexec_id, srvrexec_stop_rpc, &status);
  17420.                     }
  17421.                     dced_objects_release(exec_bh, 1, data, &status);
  17422.                     dced_binding_free(conf_bh, &status);
  17423.                     dced_binding_free(exec_bh, &status);
  17424.  
  17425.  Related Information 
  17426.  
  17427.           Routines: 
  17428.           dced_server_create 
  17429.           dced_server_start 
  17430.           rpc_mgmt_stop_server_listening 
  17431.           dced_binding_create 
  17432.           dced_binding_from_rpc_binding 
  17433.  
  17434.           Commands: 
  17435.           The server object of dcecp 
  17436.  
  17437.           Books: 
  17438.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  17439.  
  17440.  
  17441. ΓòÉΓòÉΓòÉ 4. The DCE Threads API ΓòÉΓòÉΓòÉ
  17442.  
  17443. DCE Threads is a set of routines that you can call to create a multithreaded 
  17444. program. Multithreading is used to improve the performance of a program. 
  17445. Routines implemented by DCE Threads that are not specified by draft 4 of the 
  17446. POSIX 1003.4a standard are indicated with an _np suffix. These routines are not 
  17447. portable. 
  17448.  
  17449. See the following subtopics for more information: 
  17450.  
  17451.       Exception Handling in DCE Threads 
  17452.       Data Types Used by DCE Threads 
  17453.       Threads Routines 
  17454.  
  17455.  
  17456. ΓòÉΓòÉΓòÉ 4.1. Exception Handling in DCE Threads ΓòÉΓòÉΓòÉ
  17457.  
  17458. DCE Threads provides two ways to obtain information about the status of a 
  17459. threads routine: 
  17460.  
  17461.    o  The routine returns a status value to the thread. 
  17462.    o  The routine raises an exception. 
  17463.  
  17464.  Before you write a multithreaded program, you must choose only one of these 
  17465.  two methods of receiving status. These two methods cannot be used together in 
  17466.  the same code module. 
  17467.  
  17468.  The POSIX P1003.4a (pthreads) draft standard specifies that errors be reported 
  17469.  to the thread by setting the external variable errno to an error code and 
  17470.  returning a routine value of -1. The threads reference pages document this 
  17471.  status value-returning interface. However, an alternative to status values is 
  17472.  provided by DCE Threads in the exception-returning interface. 
  17473.  
  17474.  Access to exceptions from the C language is defined by the macros in the 
  17475.  exc_handling.h file. The exc_handling.h header file is included automatically 
  17476.  when you include pthread_exc.h. 
  17477.  
  17478.  In order to catch DCE exceptions in the main thread, the main routine in a C 
  17479.  language program must make a call to the macro pthread_inst_exception_handler 
  17480.  as the first executable statement in that routine. Additionally, the macro 
  17481.  pthread_dinst_exception_handler must be called as the last executable 
  17482.  statement just before any return statement in the main routine. This macro 
  17483.  does not need to be installed at exit points that use the exit routine. 
  17484.  Exception handling is automatically installed in all threads created through 
  17485.  pthread_create. 
  17486.  
  17487.  The following example shows the syntax for handling exceptions: 
  17488.  
  17489.   TRY
  17490.         try_block
  17491.   [CATCH (exception_name)
  17492.           handler_block]....
  17493.   [CATCH_ALL
  17494.           handler_block]
  17495.   ENDTRY
  17496.  
  17497.  
  17498. ΓòÉΓòÉΓòÉ 4.2. Data Types Used by DCE Threads ΓòÉΓòÉΓòÉ
  17499.  
  17500. The DCE Threads data types can be divided into two broad categories, primitive 
  17501. system and application level. 
  17502.  
  17503. Primitive system data types consist of types that represent structures used by 
  17504. (and internal to) DCE Threads. The following are defined as being primitive 
  17505. system data types: 
  17506.  
  17507.       pthread_attr_t 
  17508.       pthread_cond_t 
  17509.       pthread_condattr_t 
  17510.       pthread_key_t 
  17511.       pthread_mutex_t 
  17512.       pthread_mutexattr_t 
  17513.       pthread_once_t 
  17514.       pthread_t 
  17515.  
  17516.  Although applications must know about these types, passing them in and 
  17517.  receiving them from various DCE Threads routines, the structures themselves 
  17518.  are opaque:  they cannot be directly modified by applications, and they can be 
  17519.  manipulated only (and only in some cases) through specific DCE Threads 
  17520.  routines.  (The pthread_key_t type is somewhat different from the others in 
  17521.  this list in that it is essentially a handle to a thread-private block of 
  17522.  memory requested by a call to pthread_keycreate.) 
  17523.  
  17524.  The application level data types consist of types used to describe objects 
  17525.  that originate in the application: 
  17526.  
  17527.       pthread_addr_t 
  17528.       pthread_destructor_t 
  17529.       pthread_initroutine_t 
  17530.       pthread_startroutine_t 
  17531.       sigset_t 
  17532.  
  17533.  All of the above types, with the exception of the last, are various kinds of 
  17534.  memory addresses that must be passed by callers of certain DCE Threads 
  17535.  routines. These types are extensions to POSIX. They permit DCE Threads to be 
  17536.  used on platforms that are not fully ANSI C compliant. While being extensions 
  17537.  to permit the use of compilers that are not ANSI C compatible, they are fully 
  17538.  portable data types. 
  17539.  
  17540.  The last data type, sigset_t, exhibits properties of both primitive system and 
  17541.  application level data types. While objects of this type originate in the 
  17542.  application, the data type is opaque. A set of routines is provided to 
  17543.  manipulate objects of this type. 
  17544.  
  17545.  Following are individual descriptions of each of the DCE Threads data types. 
  17546.  The descriptions include the routines where the data type is modified, for 
  17547.  example, created, changed or deleted, but not the routines referencing or 
  17548.  using them that do not change them. 
  17549.  
  17550.  pthread_addr_t      A miscellaneous data type representing an address value 
  17551.                      that must be passed by the caller of various Threads 
  17552.                      routines. Usually the pthread_addr_t value is the address 
  17553.                      of an area which contains various parameters to be made 
  17554.                      accessible to an implicitly called routine.  For example, 
  17555.                      when the pthread_create routine is called, one of the 
  17556.                      parameters passed is a pthread_addr_t value that contains 
  17557.                      an address that will be passed to the start_routine, which 
  17558.                      the thread is being created to run.  Presumably the 
  17559.                      routine will extract necessary parameters from the area 
  17560.                      referenced by this address. 
  17561.  
  17562.  pthread_attr_t      Threads attribute object, used to specify the attributes 
  17563.                      of a thread when it is created by a call to 
  17564.                      pthread_create. The object is created by a call to 
  17565.                      pthread_attr_create, then modified as desired by calls to: 
  17566.  
  17567.                           pthread_attr_setinheritsched 
  17568.                           pthread_attr_setprio 
  17569.                           pthread_attr_setsched 
  17570.                           pthread_attr_setstacksize 
  17571.  
  17572.  (Note that there are _get versions of these four calls, which can be used to 
  17573.  retrieve the respective values.) 
  17574.  
  17575.  pthread_cond_t      Data type representing a Threads condition variable. The 
  17576.                      variable is created by a call to pthread_cond_init, and 
  17577.                      destroyed by a call to pthread_cond_destroy. 
  17578.  
  17579.  pthread_condattr_t  Data type representing a Threads condition variable 
  17580.                      attributes object, created by a call to 
  17581.                      pthread_condattr_create. The range of possible 
  17582.                      modifications to a condition variable attributes object is 
  17583.                      not great: creation (by means of pthread_condattr_create) 
  17584.                      and deletion (by means of pthread_condattr_delete) are 
  17585.                      all. The object is created with default values. 
  17586.  
  17587.  pthread_destructor_t Data type, passed in a call to pthread_keycreate, 
  17588.                      representing the address of a procedure to be called to 
  17589.                      destroy a data value associated with a unique 
  17590.                      thread-specific data key value when the thread terminates. 
  17591.  
  17592.  pthread_initroutine_t Data type representing the address of a procedure that 
  17593.                      performs a one-time initialization for a thread. It is 
  17594.                      passed in a call to pthread_once. The pthread_once 
  17595.                      routine, when called, runs the initialization routine. The 
  17596.                      specified routine is guaranteed to be run only once, even 
  17597.                      though the pthread_once call occurs in multi-threaded 
  17598.                      code. 
  17599.  
  17600.  pthread_key_t       Data type representing a thread-specific data key, created 
  17601.                      by a call to pthread_keycreate. The key is an address of 
  17602.                      memory. Associating a static block of memory with a 
  17603.                      specific thread in this way is an alternative to using 
  17604.                      stack memory for the thread. The key is destroyed by the 
  17605.                      application-supplied procedure specified by the routine 
  17606.                      specified using the pthread_destructor_t data type in the 
  17607.                      call to pthread_keycreate. 
  17608.  
  17609.  pthread_mutex_t     Data type representing a mutex object. It is created by a 
  17610.                      call to pthread_mutex_init and destroyed by a call to 
  17611.                      pthread_mutex_destroy. Care should be taken not to attempt 
  17612.                      to destroy a locked mutex. 
  17613.  
  17614.  pthread_mutexattr_t Data type representing an attributes object which defines 
  17615.                      the characteristics of a mutex. The mutex attributes 
  17616.                      object is created by a call to pthread_mutexattr_create. 
  17617.                      Objects of this data type can be modified by calls to 
  17618.                      pthread_mutexattr_setkind_np (which allows you to specify 
  17619.                      fast, recursive, or non-recursive mutexes), and passed to 
  17620.                      pthread_mutex_init to create a mutex with the specified 
  17621.                      attributes. The only other modification allowed is to 
  17622.                      destroy the mutex attributes object, with 
  17623.                      pthread_mutexattr_delete. 
  17624.  
  17625.  pthread_once_t      A data structure that defines the characteristics of the 
  17626.                      one-time initialization routine run by calling 
  17627.                      pthread_once. The structure is opaque to the application, 
  17628.                      and cannot be modified by it, but it must be explicitly 
  17629.                      declared by the client code, and initialized by a call to 
  17630.                      pthread_once_init. The pthread_once_t type must not be an 
  17631.                      array. 
  17632.  
  17633.  pthread_startroutine_t Data type representing the address of the application 
  17634.                      routine or other routine that a new thread is created to 
  17635.                      run as its start routine. 
  17636.  
  17637.  pthread_t           Data type representing a thread handle, created by a call 
  17638.                      to pthread_create. The thread handle is used to identify 
  17639.                      the thread to calls such as pthread_cancel, 
  17640.                      pthread_detach, pthread_equal (to which two handles are 
  17641.                      passed for comparison). 
  17642.  
  17643.  sigset_t            Data type representing a set of signals. It is always an 
  17644.                      integer or structure type. If a structure, it is intended 
  17645.                      to be a simple structure, for example, a set of arrays as 
  17646.                      opposed to a set of pointers. It is opaque in that a set 
  17647.                      of routines called the sigsetops primitives is provided to 
  17648.                      manipulate signal sets. These routines operate on signal 
  17649.                      set data objects addressable by the application, not on 
  17650.                      any objects known to the system. 
  17651.  
  17652.                      The primitives are sigemptyset and sigfillset, which 
  17653.                      initialize the set as either empty or full, sigaddset and 
  17654.                      sigdelset, which add or delete signals from the set, and 
  17655.                      sigismember, which permits the application to check if an 
  17656.                      object (signal) of type sigset_t is a member of the signal 
  17657.                      set. Applications must call at least one of the 
  17658.                      initialization primitives at least once for each object of 
  17659.                      type sigset_t prior to any other use of that object 
  17660.                      (signal set). 
  17661.  
  17662.                      The object, or objects, represented by this data type when 
  17663.                      used by sigaction are used in conjunction with a sigaction 
  17664.                      structure by the sigaction routine to describe an action 
  17665.                      to be taken with specified sigset_t objects. 
  17666.  
  17667.  
  17668. ΓòÉΓòÉΓòÉ 4.3. Threads Routines ΓòÉΓòÉΓòÉ
  17669.  
  17670. The Threads routines can be divided into ten different functional groups. They 
  17671. include: 
  17672.  
  17673.    o  Threads Routines 
  17674.    o  Routines that Implicitly Perform Threads Initialization 
  17675.    o  Attributes Object Routines 
  17676.    o  Mutex Routines 
  17677.    o  Condition Variable Routines 
  17678.    o  Thread-Specific Data Routines 
  17679.    o  Threads Cancelation Routines 
  17680.    o  Threads Priority and Scheduling Routines 
  17681.    o  Threads Cleanup Routines 
  17682.  
  17683.  
  17684. ΓòÉΓòÉΓòÉ 4.3.1. Threads Routines ΓòÉΓòÉΓòÉ
  17685.  
  17686.  pthread_create                Creates a thread. 
  17687.  
  17688.  pthread_delay_np              Causes a thread to wait for a period of time. 
  17689.  
  17690.  pthread_detach                Marks a thread for deletion. 
  17691.  
  17692.  pthread_equal                 Compares one thread identifier to another thread 
  17693.                                identifier. 
  17694.  
  17695.  pthread_exit                  Terminates the calling thread. 
  17696.  
  17697.  pthread_getunique_np          Obtains the sequence number associated with a 
  17698.                                thread. 
  17699.  
  17700.  pthread_join                  Causes the calling thread to wait for the 
  17701.                                termination of a specified thread. 
  17702.  
  17703.  pthread_once                  Calls an initialization routine to be executed 
  17704.                                only once. 
  17705.  
  17706.  pthread_self                  Obtains the identifier of the current thread. 
  17707.  
  17708.  pthread_yield                 Notifies the scheduler that the current thread 
  17709.                                will release its processor to other threads of 
  17710.                                the same or higher priority. 
  17711.  
  17712.  
  17713. ΓòÉΓòÉΓòÉ 4.3.2. Routines that Implicitly Perform Threads Initialization ΓòÉΓòÉΓòÉ
  17714.  
  17715.  pthread_attr_create           Creates a thread attributes object. 
  17716.  
  17717.  pthread_create                Creates a thread. 
  17718.  
  17719.  pthread_cond_init             Creates a condition variable. 
  17720.  
  17721.  pthread_condattr_create       Creates a condition variable attributes object. 
  17722.  
  17723.  pthread_delay_np              Causes a thread to wait for a period of time. 
  17724.  
  17725.  pthread_attr_getprio          Obtains the scheduling priority attribute. 
  17726.  
  17727.  pthread_attr_getsched         Obtains the scheduling policy attribute. 
  17728.  
  17729.  pthread_keycreate             Generates a unique thread-specific data key 
  17730.                                value. 
  17731.  
  17732.  pthread_mutex_init            Creates a mutex. 
  17733.  
  17734.  pthread_mutexattr_create      Creates a mutex attributes object. 
  17735.  
  17736.  pthread_once                  Calls an initialization routine to be executed 
  17737.                                only once. 
  17738.  
  17739.  pthread_self                  Obtains the identifier of the current thread. 
  17740.  
  17741.  pthread_setasynccancel        Enables or disables the current thread's 
  17742.                                asynchronous cancelling ability. 
  17743.  
  17744.  pthread_cancel                Enables or disables the current thread's general 
  17745.                                cancelability. 
  17746.  
  17747.  pthread_setprio               Changes the scheduling priority attribute. 
  17748.  
  17749.  pthread_setscheduler          Obtains the scheduling policy attribute 
  17750.  
  17751.  pthread_testcancel            Requests delivery of a pending cancel. 
  17752.  
  17753.  
  17754. ΓòÉΓòÉΓòÉ 4.3.3. Attributes Object Routines ΓòÉΓòÉΓòÉ
  17755.  
  17756.  pthread_attr_create           Creates a thread attributes object. 
  17757.  
  17758.  pthread_attr_delete           Deletes a thread attributes object. 
  17759.  
  17760.  pthread_attr_getinheritsched  Obtains the inherit scheduling attribute 
  17761.  
  17762.  pthread_attr_getprio          Obtains the scheduling priority attribute. 
  17763.  
  17764.  pthread_attr_getsched         Obtains the scheduling policy attribute. 
  17765.  
  17766.  pthread_attr_getstacksize     Obtains the stacksize attribute. 
  17767.  
  17768.  pthread_attr_setinheritsched  Changes the inherit scheduling attribute. 
  17769.  
  17770.  pthread_attr_setprio          Changes the scheduling priority attribute. 
  17771.  
  17772.  pthread_attr_setsched         Changes the scheduling policy attribute. 
  17773.  
  17774.  pthread_attr_setstacksize     Changes the stacksize attribute. 
  17775.  
  17776.  pthread_condattr_create       Creates a condition variable attributes object. 
  17777.  
  17778.  pthread_condattr_delete       Deletes a condition variable attributes object. 
  17779.  
  17780.  pthread_mutexattr_create      Creates a mutex attributes object. 
  17781.  
  17782.  pthread_mutexattr_delete      Deletes a mutex attributes object. 
  17783.  
  17784.  pthread_mutexattr_getkind_np  Obtains the mutex type attribute. 
  17785.  
  17786.  pthread_mutexattr_setkind_np  Changes the mutex type attribute. 
  17787.  
  17788.  
  17789. ΓòÉΓòÉΓòÉ 4.3.4. Mutex Routines ΓòÉΓòÉΓòÉ
  17790.  
  17791.  pthread_lock_global_np        Locks a global mutex. 
  17792.  
  17793.  pthread_mutex_destroy         Deletes a mutex. 
  17794.  
  17795.  pthread_mutex_init            Creates a mutex. 
  17796.  
  17797.  pthread_mutex_lock            Locks a mutex and waits if the mutex is already 
  17798.                                locked. 
  17799.  
  17800.  pthread_mutex_trylock         Locks a mutex and returns if the mutex is 
  17801.                                already locked. 
  17802.  
  17803.  pthread_mutex_unlock          Unlocks a mutex. 
  17804.  
  17805.  pthread_unlock_global_np      Unlocks a global mutex. 
  17806.  
  17807.  
  17808. ΓòÉΓòÉΓòÉ 4.3.5. Condition Variable Routines ΓòÉΓòÉΓòÉ
  17809.  
  17810.  pthread_cond_broadcast        Wakes all threads waiting on a condition 
  17811.                                variable. 
  17812.  
  17813.  pthread_cond_destroy          Deletes a condition variable. 
  17814.  
  17815.  pthread_cond_init             Creates a condition variable. 
  17816.  
  17817.  pthread_cond_signal           Wakes one thread waiting on a condition 
  17818.                                variable. 
  17819.  
  17820.  pthread_cond_timedwait        Causes a thread to wait for a specified period 
  17821.                                of time for a condition variable to be signaled 
  17822.                                or broadcast. 
  17823.  
  17824.  pthread_cond_wait             Causes a thread to wait for a condition variable 
  17825.                                to be signaled or broadcast. 
  17826.  
  17827.  pthread_get_expiration_np     Obtains a value representing a desired 
  17828.                                expiration time. 
  17829.  
  17830.  
  17831. ΓòÉΓòÉΓòÉ 4.3.6. Thread-Specific Data Routines ΓòÉΓòÉΓòÉ
  17832.  
  17833.  pthread_getspecific           Obtains the thread-specific data associated with 
  17834.                                the specified key. 
  17835.  
  17836.  pthread_keycreate             Generates a unique thread-specific data key 
  17837.                                value. 
  17838.  
  17839.  pthread_setspecific           Sets the thread-specific data associated with 
  17840.                                the specified key. 
  17841.  
  17842.  
  17843. ΓòÉΓòÉΓòÉ 4.3.7. Threads Cancelation Routines ΓòÉΓòÉΓòÉ
  17844.  
  17845.  pthread_cancel                Allows a thread to request termination. 
  17846.  
  17847.  pthread_setasynccancel        Enables or disables the current thread's 
  17848.                                asynchronous cancelability. 
  17849.  
  17850.  pthread_setcancel             Enables or disables the current thread's general 
  17851.                                cancelability. 
  17852.  
  17853.  pthread_testcancel            Requests delivery of a pending cancel. 
  17854.  
  17855.  
  17856. ΓòÉΓòÉΓòÉ 4.3.8. Threads Priority and Scheduling Routines ΓòÉΓòÉΓòÉ
  17857.  
  17858.  pthread_getprio               Obtains the current priority of a thread. 
  17859.  
  17860.  pthread_getscheduler          Obtains the current scheduling policy of a 
  17861.                                thread. 
  17862.  
  17863.  pthread_setprio               Changes the current priority of a thread. 
  17864.  
  17865.  pthread_setscheduler          Changes the current scheduling policy and 
  17866.                                priority of a thread. 
  17867.  
  17868.  
  17869. ΓòÉΓòÉΓòÉ 4.3.9. Threads Cleanup Routines ΓòÉΓòÉΓòÉ
  17870.  
  17871.  pthread_cleanup_pop           Removes a cleanup handler from the stack. 
  17872.  
  17873.  pthread_cleanup_push          Establishes a cleanup handler. 
  17874.  
  17875.  
  17876. ΓòÉΓòÉΓòÉ 4.3.10. pthread_attr_create ΓòÉΓòÉΓòÉ
  17877.  
  17878.  Purpose 
  17879.  
  17880.           Creates a thread attributes object. 
  17881.  
  17882.  Format 
  17883.  
  17884.                     #include <pthread.h>
  17885.  
  17886.                     int pthread_attr_create(
  17887.                              pthread_attr_t  *attr);
  17888.  
  17889.  Parameters 
  17890.  
  17891.           attr          Thread attributes object created. 
  17892.  
  17893.  Usage 
  17894.  
  17895.           The pthread_attr_create routine creates a thread attributes object 
  17896.           that is used to specify the attributes of threads when they are 
  17897.           created.  The attributes object created by this routine is used in 
  17898.           calls to pthread_create. 
  17899.  
  17900.           The individual attributes (internal fields) of the attributes object 
  17901.           are set to default values. (The default values of each attribute are 
  17902.           discussed in the descriptions of the following services.) Use the 
  17903.           following routines to change the individual attributes: 
  17904.  
  17905.             o  pthread_attr_setinheritsched 
  17906.             o  pthread_attr_setprio 
  17907.             o  pthread_attr_setsched 
  17908.             o  pthread_attr_setstacksize 
  17909.  
  17910.           When an attributes object is used to create a thread, the values of 
  17911.           the individual attributes determine the characteristics of the new 
  17912.           thread. Attributes objects perform in a manner similar to additional 
  17913.           parameters. Changing individual attributes does not affect any 
  17914.           threads that were previously created using the attributes object. 
  17915.           Note that if the pthreads exception handling header file 
  17916.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  17917.           raised. 
  17918.  
  17919.  Return Codes 
  17920.  
  17921.           If the routine fails, -1 is returned and errno may be set to one of 
  17922.           the following values: 
  17923.  
  17924.           Error         Description 
  17925.  
  17926.           -1 [ENOMEM]   Insufficient memory exists to create the thread 
  17927.                         attributes object. 
  17928.  
  17929.           -1 [EINVAL]   The value specified by attr is invalid. 
  17930.  
  17931.  Related Information 
  17932.  
  17933.           Routines: pthread_attr_delete 
  17934.           pthread_attr_setinheritsched 
  17935.           pthread_attr_setprio 
  17936.           pthread_attr_setsched 
  17937.           pthread_attr_setstacksize 
  17938.           pthread_create 
  17939.  
  17940.  
  17941. ΓòÉΓòÉΓòÉ 4.3.11. pthread_attr_delete ΓòÉΓòÉΓòÉ
  17942.  
  17943.  Purpose 
  17944.  
  17945.           Deletes a thread attributes object. 
  17946.  
  17947.  Format 
  17948.  
  17949.                     #include <pthread.h>
  17950.  
  17951.                     int pthread_attr_delete(
  17952.                              pthread_attr_t  *attr);
  17953.  
  17954.  Parameters 
  17955.  
  17956.           attr          Thread attributes object deleted. 
  17957.  
  17958.  Usage 
  17959.  
  17960.           The pthread_attr_delete routine deletes a thread attributes object 
  17961.           and gives permission to reclaim storage for the thread attributes 
  17962.           object. Threads that were created using the thread attributes object 
  17963.           are not affected by the deletion of the thread attributes object. 
  17964.  
  17965.           The results of calling this routine are unpredictable if the value 
  17966.           specified by the attr parameter refers to a thread attributes object 
  17967.           that does not exist. Note that if the pthreads exception handling 
  17968.           header file pthread_exc.h is used instead of pthread.h, then a DCE 
  17969.           exception is raised. 
  17970.  
  17971.  Return Codes 
  17972.  
  17973.           If the routine fails, errno may be set to the following value: 
  17974.  
  17975.           Error         Description 
  17976.  
  17977.           -1 [EINVAL]   The value specified by attr is invalid. 
  17978.  
  17979.  Related Information 
  17980.  
  17981.           Routines: 
  17982.           pthread_attr_create 
  17983.  
  17984.  
  17985. ΓòÉΓòÉΓòÉ 4.3.12. pthread_attr_getinheritsched ΓòÉΓòÉΓòÉ
  17986.  
  17987.  Purpose 
  17988.  
  17989.           Obtains the inherit scheduling attribute of the specified thread 
  17990.           attributes object. 
  17991.  
  17992.  Format 
  17993.  
  17994.                     #include <pthread.h>
  17995.  
  17996.                     int pthread_attr_getinheritsched(
  17997.                              pthread_attr_t  attr);
  17998.  
  17999.  Parameters 
  18000.  
  18001.           attr          Thread attributes object whose inherit scheduling 
  18002.                         attribute is obtained. 
  18003.  
  18004.  Usage 
  18005.  
  18006.           The pthread_attr_getinheritsched routine obtains the value of the 
  18007.           inherit scheduling attribute in the specified thread attributes 
  18008.           object. The inherit scheduling attribute specifies whether threads 
  18009.           created using the attributes object inherit the scheduling attributes 
  18010.           of the creating thread, or use the scheduling attributes stored in 
  18011.           the attributes object that is passed to pthread_create. 
  18012.  
  18013.           The default value of the inherit scheduling attribute is 
  18014.           PTHREAD_INHERIT_SCHED. 
  18015.  
  18016.  Return Codes 
  18017.  
  18018.           On successful completion, this routine returns the inherit scheduling 
  18019.           attribute value. 
  18020.  
  18021.           If the routine fails, errno may be set to the following value: 
  18022.  
  18023.           Error         Description 
  18024.  
  18025.           -1 [EINVAL]   The value specified by attr is invalid. 
  18026.  
  18027.  Related Information 
  18028.  
  18029.           Routines: pthread_attr_create 
  18030.           pthread_attr_setinheritsched 
  18031.           pthread_create 
  18032.  
  18033.  
  18034. ΓòÉΓòÉΓòÉ 4.3.13. pthread_attr_getprio ΓòÉΓòÉΓòÉ
  18035.  
  18036.  Purpose 
  18037.  
  18038.           Obtains the scheduling priority attribute of the specified thread 
  18039.           attributes object. 
  18040.  
  18041.  Format 
  18042.  
  18043.                     #include <pthread.h>
  18044.  
  18045.                     int pthread_attr_getprio(
  18046.                              pthread_attr_t  attr);
  18047.  
  18048.  Parameters 
  18049.  
  18050.           attr          Thread attributes object whose priority attribute is 
  18051.                         obtained. 
  18052.  
  18053.  Usage 
  18054.  
  18055.           The pthread_attr_getprio routine obtains the value of the scheduling 
  18056.           priority of threads created using the thread attributes object 
  18057.           specified by the attr parameter. 
  18058.  
  18059.  Return Codes 
  18060.  
  18061.           On successful completion, this routine returns the scheduling 
  18062.           priority attribute value. 
  18063.  
  18064.           If the routine fails, errno may be set to the following value: 
  18065.  
  18066.           Error         Description 
  18067.  
  18068.           -1 [EINVAL]   The value specified by attr is invalid. 
  18069.  
  18070.  Related Information 
  18071.  
  18072.           Routines: pthread_attr_create 
  18073.           pthread_attr_setprio 
  18074.           pthread_create 
  18075.  
  18076.  
  18077. ΓòÉΓòÉΓòÉ 4.3.14. pthread_attr_getsched ΓòÉΓòÉΓòÉ
  18078.  
  18079.  Purpose 
  18080.  
  18081.           Obtains the value of the scheduling policy attribute in the specified 
  18082.           thread attributes object. 
  18083.  
  18084.  Format 
  18085.  
  18086.                     #include <pthread.h>
  18087.  
  18088.                     int pthread_attr_getsched(
  18089.                              pthread_attr_t  attr);
  18090.  
  18091.  Parameters 
  18092.  
  18093.           attr          Thread attributes object whose scheduling policy 
  18094.                         attribute is obtained. 
  18095.  
  18096.  Usage 
  18097.  
  18098.           The pthread_attr_getsched routine obtains the scheduling policy of 
  18099.           threads created using the thread attributes object specified by the 
  18100.           attr parameter. The default value of the scheduling attribute is 
  18101.           SCHED_HRR. 
  18102.  
  18103.  Return Codes 
  18104.  
  18105.           On successful completion, this routine returns the value of the 
  18106.           scheduling policy attribute. 
  18107.  
  18108.           If the routine fails, errno may be set to the following value: 
  18109.  
  18110.           Error         Description 
  18111.  
  18112.           -1 [EINVAL]   The value specified by attr is invalid. 
  18113.  
  18114.  Related Information 
  18115.  
  18116.           Routines: pthread_attr_create 
  18117.           pthread_attr_setsched 
  18118.           pthread_create 
  18119.  
  18120.  
  18121. ΓòÉΓòÉΓòÉ 4.3.15. pthread_attr_getstacksize ΓòÉΓòÉΓòÉ
  18122.  
  18123.  Purpose 
  18124.  
  18125.           Obtains the value of the stacksize attribute in the specified thread 
  18126.           attributes object. 
  18127.  
  18128.  Format 
  18129.  
  18130.                     #include <pthread.h>
  18131.  
  18132.                     long pthread_attr_getstacksize(
  18133.                               pthread_attr_t  attr);
  18134.  
  18135.  Parameters 
  18136.  
  18137.           attr          Thread attributes object whose stacksize attribute is 
  18138.                         obtained. 
  18139.  
  18140.  Usage 
  18141.  
  18142.           The pthread_attr_getstacksize routine obtains the minimum size (in 
  18143.           bytes) of the stack for a thread created using the thread attributes 
  18144.           object specified by the attr parameter. 
  18145.  
  18146.  Return Codes 
  18147.  
  18148.           On successful completion, this routine returns the stacksize 
  18149.           attribute value. 
  18150.  
  18151.           If the routine fails, errno may be set to the following value: 
  18152.  
  18153.           Error         Description 
  18154.  
  18155.           -1 [EINVAL]   The value specified by attr is invalid. 
  18156.  
  18157.  Related Information 
  18158.  
  18159.           Routines: pthread_attr_create 
  18160.           pthread_attr_setstacksize 
  18161.           pthread_create 
  18162.  
  18163.  
  18164. ΓòÉΓòÉΓòÉ 4.3.16. pthread_attr_setinheritsched ΓòÉΓòÉΓòÉ
  18165.  
  18166.  Purpose 
  18167.  
  18168.           Changes the inherit scheduling attribute of the specified thread 
  18169.           attributes object. 
  18170.  
  18171.  Format 
  18172.  
  18173.                     #include <pthread.h>
  18174.  
  18175.                     int pthread_attr_setinheritsched(
  18176.                              pthread_attr_t  *attr,
  18177.                              int  inherit);
  18178.  
  18179.  Parameters 
  18180.  
  18181.           attr          Thread attributes object to be modified. 
  18182.  
  18183.           inherit       New value for the inherit scheduling attribute. Valid 
  18184.                         values are as follows: 
  18185.  
  18186.                              PTHREAD_INHERIT_SCHED This is the default value. 
  18187.                                                   The created thread inherits 
  18188.                                                   the current priority and 
  18189.                                                   scheduling policy of the 
  18190.                                                   thread calling 
  18191.                                                   pthread_create. 
  18192.  
  18193.                              PTHREAD_DEFAULT_SCHED The created thread starts 
  18194.                                                   execution with the priority 
  18195.                                                   and scheduling policy stored 
  18196.                                                   in the thread attributes 
  18197.                                                   object. 
  18198.  
  18199.  Usage 
  18200.  
  18201.           The pthread_attr_setinheritsched routine changes the inherit 
  18202.           scheduling attribute of thread creation. The inherit scheduling 
  18203.           attribute specifies whether threads created using the specified 
  18204.           thread attributes object inherit the scheduling attributes of the 
  18205.           creating thread, or use the scheduling attributes stored in the 
  18206.           thread attributes object that is passed to pthread_create. 
  18207.  
  18208.           The first thread in an application that is not created by an explicit 
  18209.           call to pthread_create has a scheduling policy of SCHED_HRR. See the 
  18210.           pthread_attr_setprio and pthread_attr_setsched routines for more 
  18211.           information on valid priority values and valid scheduling policy 
  18212.           values, respectively. 
  18213.  
  18214.           Inheriting scheduling attributes (instead of using the scheduling 
  18215.           attributes stored in the attributes object) is useful when a thread 
  18216.           is creating several helper threads. That is, threads that are 
  18217.           intended to work closely with the creating thread to cooperatively 
  18218.           solve the same problem.  For example, inherited scheduling attributes 
  18219.           ensure that helper threads created in a sort routine run with the 
  18220.           same priority as the calling thread. Note that if the pthreads 
  18221.           exception handling header file pthread_exc.h is used instead of 
  18222.           pthread.h, then a DCE exception is raised. 
  18223.  
  18224.  Return Codes 
  18225.  
  18226.           If the routine fails, -1 is returned and errno may be set to one of 
  18227.           the following values: 
  18228.  
  18229.           Error         Description 
  18230.  
  18231.           -1 [EINVAL]   The value specified by attr is invalid. 
  18232.  
  18233.           -1 [EINVAL]   The value specified by inherit is invalid. 
  18234.  
  18235.  Related Information 
  18236.  
  18237.           Routines: pthread_attr_create 
  18238.           pthread_attr_getinheritsched 
  18239.           pthread_attr_setprio 
  18240.           pthread_attr_setsched 
  18241.           pthread_create 
  18242.  
  18243.  
  18244. ΓòÉΓòÉΓòÉ 4.3.17. pthread_attr_setprio ΓòÉΓòÉΓòÉ
  18245.  
  18246.  Purpose 
  18247.  
  18248.           Changes the scheduling priority attribute of thread creation. 
  18249.  
  18250.  Format 
  18251.  
  18252.                     #include <pthread.h>
  18253.  
  18254.                     int pthread_attr_setprio(
  18255.                              pthread_attr_t  *attr,
  18256.                              int  priority);
  18257.  
  18258.  Parameters 
  18259.  
  18260.           attr          Thread attributes object modified. 
  18261.  
  18262.           priority      New value for the priority attribute. The priority 
  18263.                         attribute depends upon scheduling policy. Valid values 
  18264.                         fall within the following range: 
  18265.  
  18266.                           o  PRI_HRR_MIN <= priority <= PRI_HRR_MAX 
  18267.  
  18268.                         The default priority is PRI_HRR_MIN. To specify a 
  18269.                         minimum or maximum priority, use the appropriate 
  18270.                         symbol. For example, PRI_HRR_MIN or PRI_HRR_MAX.  To 
  18271.                         specify a value between the minimum and maximum, use an 
  18272.                         appropriate arithmetic expression.  For example, to set 
  18273.                         a priority midway between the minimum and maximum, 
  18274.                         specify the following concept using your programming 
  18275.                         language's syntax: 
  18276.  
  18277.                                                 pri_hrr_mid = (PRI_HRR_MIN + PRI_HRR_MAX + 1)/2
  18278.  
  18279.                         If your expression results in a value outside the range 
  18280.                         of minimum to maximum, an error results when you 
  18281.                         attempt to use it. 
  18282.  
  18283.  Usage 
  18284.  
  18285.           The pthread_attr_setprio routine sets the execution priority of 
  18286.           threads that are created using the attributes object specified by the 
  18287.           attr parameter. 
  18288.  
  18289.           By default, a created thread inherits the priority of the thread 
  18290.           calling pthread_create.  To specify a priority using this routine, 
  18291.           scheduling inheritance must be disabled at the time the thread is 
  18292.           created. Call pthread_attr_setinheritsched and specify the value 
  18293.           PTHREAD_DEFAULT_SCHED for the inherit parameter before calling this 
  18294.           routine and pthread_create. 
  18295.  
  18296.           An application specifies priority only to express the urgency of 
  18297.           executing the thread relative to other threads.  Priority is not used 
  18298.           to control mutual exclusion when accessing shared data.  With a 
  18299.           sufficient number of processors executing, all ready threads, 
  18300.           regardless of priority, run simultaneously. 
  18301.  
  18302.           Note:  Changing the scheduling priority of a thread should only be 
  18303.                  done from root. 
  18304.  
  18305.           Note that if the pthreads exception handling header file 
  18306.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  18307.           raised. 
  18308.  
  18309.  Return Codes 
  18310.  
  18311.           If the routine fails, errno may be set to one of the following 
  18312.           values: 
  18313.  
  18314.           Error         Description 
  18315.  
  18316.           -1 [EINVAL]   The value specified by attr is invalid. 
  18317.  
  18318.           -1 [ERANGE]   One or more parameters supplied have an invalid value. 
  18319.  
  18320.  Related Information 
  18321.  
  18322.           Routines: 
  18323.           pthread_attr_create 
  18324.           pthread_attr_getprio 
  18325.           pthread_attr_setinheritsched 
  18326.           pthread_create 
  18327.  
  18328.  
  18329. ΓòÉΓòÉΓòÉ 4.3.18. pthread_attr_setsched ΓòÉΓòÉΓòÉ
  18330.  
  18331.  Purpose 
  18332.  
  18333.           Changes the scheduling policy attribute of thread creation. 
  18334.  
  18335.  Format 
  18336.  
  18337.                     #include <pthread.h>
  18338.  
  18339.                     int pthread_attr_setsched(
  18340.                              pthread_attr_t  *attr,
  18341.                              int  scheduler);
  18342.  
  18343.  Parameters 
  18344.  
  18345.           attr          Thread attributes object modified. 
  18346.  
  18347.           scheduler     New value for the scheduling policy attribute. Valid 
  18348.                         values are as follows: 
  18349.  
  18350.                              SCHED_HRR    (Hierarchical Round Robin).  Each 
  18351.                                           thread has a priority associated with 
  18352.                                           it. Threads of a higher priority are 
  18353.                                           given access to the CPU before 
  18354.                                           threads of lower priority.  If a 
  18355.                                           thread with a higher priority than 
  18356.                                           the currently running thread becomes 
  18357.                                           ready to run, the current thread is 
  18358.                                           stopped immediately. Threads of the 
  18359.                                           same priority are given time-slices 
  18360.                                           in a round robin manner. 
  18361.  
  18362.  Usage 
  18363.  
  18364.           The pthread_attr_setsched routine sets the scheduling policy of a 
  18365.           thread that is created using the attributes object specified by the 
  18366.           attr parameter. The default value of the scheduling attribute is 
  18367.           SCHED_HRR. 
  18368.  
  18369.           Note:  Setting and changing the scheduling policy should only be done 
  18370.                  from root. 
  18371.  
  18372.           Note that if the pthreads exception handling header file 
  18373.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  18374.           raised. 
  18375.  
  18376.  Return Codes 
  18377.  
  18378.           If the routine fails, errno may be set to one of the following 
  18379.           values: 
  18380.  
  18381.           Error         Description 
  18382.  
  18383.           -1 [EINVAL]   The value specified by attr is invalid. 
  18384.  
  18385.           -1 [EINVAL]   The value specified by scheduler is invalid. 
  18386.  
  18387.           -1 [EPERM]    The caller does not have the appropriate privileges to 
  18388.                         set the scheduling policy attribute of the specified 
  18389.                         thread attributes object. 
  18390.  
  18391.  Related Information 
  18392.  
  18393.           Routines: 
  18394.           pthread_attr_create 
  18395.           pthread_attr_getsched 
  18396.           pthread_attr_setinheritsched 
  18397.           pthread_create 
  18398.  
  18399.  
  18400. ΓòÉΓòÉΓòÉ 4.3.19. pthread_attr_setstacksize ΓòÉΓòÉΓòÉ
  18401.  
  18402.  Purpose 
  18403.  
  18404.           Changes the stacksize attribute of thread creation. 
  18405.  
  18406.  Format 
  18407.  
  18408.                     #include <pthread.h>
  18409.  
  18410.                     int pthread_attr_setstacksize(
  18411.                              pthread_attr_t  *attr,
  18412.                              long  stacksize);
  18413.  
  18414.  Parameters 
  18415.  
  18416.           attr          Thread attributes object modified. 
  18417.  
  18418.           stacksize     New value for the stacksize attribute. The stacksize 
  18419.                         parameter specifies the minimum size (in bytes) of the 
  18420.                         stack needed for a thread. 
  18421.  
  18422.  Usage 
  18423.  
  18424.           The pthread_attr_setstacksize routine sets the minimum size (in 
  18425.           bytes) of the stack needed for a thread created using the attributes 
  18426.           object specified by the attr parameter.  Use this routine to adjust 
  18427.           the size of the writable area of the stack. The default value of the 
  18428.           stacksize attribute is 32,768 bytes. 
  18429.  
  18430.           A thread's stack is fixed at the time of thread creation. Only the 
  18431.           main or initial thread can dynamically extend its stack. 
  18432.  
  18433.           Most compilers do not check for stack overflow. Ensure that your 
  18434.           thread stack is large enough for anything that you call from the 
  18435.           thread. Note that if the pthreads exception handling header file 
  18436.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  18437.           raised. 
  18438.  
  18439.  Return Codes 
  18440.  
  18441.           If the routine fails, errno may be set to one of the following 
  18442.           values: 
  18443.  
  18444.           Error         Description 
  18445.  
  18446.           -1 [EINVAL]   The value specified by attr is invalid. 
  18447.  
  18448.           -1 [EINVAL]   The value specified by stacksize is invalid. 
  18449.  
  18450.  Related Information 
  18451.  
  18452.           Routines: pthread_attr_create 
  18453.           pthread_attr_getstacksize 
  18454.           pthread_create 
  18455.  
  18456.  
  18457. ΓòÉΓòÉΓòÉ 4.3.20. pthread_cancel ΓòÉΓòÉΓòÉ
  18458.  
  18459.  Purpose 
  18460.  
  18461.           Allows a thread to request that it or another thread stop running. 
  18462.  
  18463.  Format 
  18464.  
  18465.                     #include <pthread.h>
  18466.  
  18467.                     int pthread_cancel(
  18468.                              pthread_t  thread);
  18469.  
  18470.  Parameters 
  18471.  
  18472.           thread        Thread that receives a cancel request. 
  18473.  
  18474.  Usage 
  18475.  
  18476.           The pthread_cancel routine sends a cancel to the specified thread.  A 
  18477.           cancel is a mechanism by which a calling thread informs either itself 
  18478.           or the called thread to terminate as quickly as possible.  Issuing a 
  18479.           cancel does not guarantee that the canceled thread receives or 
  18480.           handles the cancel.  The canceled thread can delay processing the 
  18481.           cancel after receiving it. For instance, if a cancel arrives during 
  18482.           an important operation, the canceled thread can continue if what it 
  18483.           is doing cannot be interrupted at the point where the cancel is 
  18484.           requested. 
  18485.  
  18486.           Because of communication delays, the calling thread can only rely on 
  18487.           the fact that a cancel eventually becomes pending in the designated 
  18488.           thread (provided that the thread does not terminate beforehand). 
  18489.           Furthermore, the calling thread has no guarantee that a pending 
  18490.           cancel is to be delivered because delivery is controlled by the 
  18491.           designated thread. 
  18492.  
  18493.           Termination processing when a cancel is delivered to a thread is 
  18494.           similar to pthread_exit.  Outstanding cleanup routines are run in the 
  18495.           context of the target thread, and a status of -1 is made available to 
  18496.           any threads joining with the target thread. 
  18497.  
  18498.           The results of this routine are unpredictable if the value specified 
  18499.           in thread refers to a thread that does not currently exist. Note that 
  18500.           if the pthreads exception handling header file pthread_exc.h is used 
  18501.           instead of pthread.h, then a DCE exception is raised. 
  18502.  
  18503.  Return Codes 
  18504.  
  18505.           If the routine fails, errno may be set to one of the following 
  18506.           values: 
  18507.  
  18508.           Error         Description 
  18509.  
  18510.           -1 [EINVAL]   The specified thread is invalid. 
  18511.  
  18512.           -1 [ERSCH]    The specified thread does not refer to a currently 
  18513.                         existing thread. 
  18514.  
  18515.  Related Information 
  18516.  
  18517.           Routines: pthread_exit 
  18518.           pthread_join 
  18519.           pthread_setasynccancel 
  18520.           pthread_setcancel 
  18521.           pthread_testcancel 
  18522.  
  18523.  
  18524. ΓòÉΓòÉΓòÉ 4.3.21. pthread_cleanup_pop ΓòÉΓòÉΓòÉ
  18525.  
  18526.  Purpose 
  18527.  
  18528.           Removes the cleanup handler at the top of the cleanup stack and 
  18529.           optionally runs it. 
  18530.  
  18531.  Format 
  18532.  
  18533.                     #include <pthread.h>
  18534.  
  18535.                     void pthread_cleanup_pop(
  18536.                               int  execute);
  18537.  
  18538.  Parameters 
  18539.  
  18540.           execute       Integer that specifies whether the cleanup routine that 
  18541.                         is popped should be run or just discarded.  If the 
  18542.                         value is non-zero, the cleanup routine is run. 
  18543.  
  18544.  Usage 
  18545.  
  18546.           The pthread_cleanup_pop routine removes the routine specified in 
  18547.           pthread_cleanup_push from the top of the calling thread's cleanup 
  18548.           stack and runs it if the value specified in execute is nonzero. 
  18549.  
  18550.           This routine and pthread_cleanup_push are implemented as macros and 
  18551.           must be displayed as statements and in pairs within the same lexical 
  18552.           scope.  You can think of the pthread_cleanup_push macro as expanding 
  18553.           to a string whose first character is a left brace ({) and 
  18554.           pthread_cleanup_pop expanding to a string containing the 
  18555.           corresponding right brace (}). 
  18556.  
  18557.           This routine must be used as a statement. 
  18558.  
  18559.  Related Information 
  18560.  
  18561.           Routines: 
  18562.           pthread_cleanup_push 
  18563.  
  18564.  
  18565. ΓòÉΓòÉΓòÉ 4.3.22. pthread_cleanup_push ΓòÉΓòÉΓòÉ
  18566.  
  18567.  Purpose 
  18568.  
  18569.           Establishes a cleanup handler. 
  18570.  
  18571.  Format 
  18572.  
  18573.                     #include <pthread.h>
  18574.  
  18575.                     void pthread_cleanup_push(
  18576.                               void(  *routine) (),
  18577.                               pthread_addr_t  arg);
  18578.  
  18579.  Parameters 
  18580.  
  18581.           routine       Routine run as the cleanup handler. 
  18582.  
  18583.           arg           Parameter run with the cleanup routine. 
  18584.  
  18585.  Usage 
  18586.  
  18587.           The pthread_cleanup_push routine pushes the specified routine onto 
  18588.           the calling thread's cleanup stack.  The cleanup routine is popped 
  18589.           from the stack and run with the arg parameter when any of the 
  18590.           following actions occur: 
  18591.  
  18592.             o  The thread calls pthread_exit. 
  18593.             o  The thread is canceled. 
  18594.             o  The thread calls pthread_cleanup_pop and specifies a nonzero 
  18595.                value for the execute parameter. 
  18596.  
  18597.           This routine and pthread_cleanup_pop are implemented as macros and 
  18598.           must be displayed as statements and in pairs within the same lexical 
  18599.           scope. You can think of the pthread_cleanup_push macro as expanding 
  18600.           to a string whose first character is a left brace ({) and 
  18601.           pthread_cleanup_pop as expanding to a string containing the 
  18602.           corresponding right brace (}). 
  18603.  
  18604.           This routine must be used as a statement. 
  18605.  
  18606.  Related Information 
  18607.  
  18608.           Routines: pthread_cancel 
  18609.           pthread_cleanup_pop 
  18610.           pthread_exit 
  18611.           pthread_testcancel 
  18612.  
  18613.  
  18614. ΓòÉΓòÉΓòÉ 4.3.23. pthread_cond_broadcast ΓòÉΓòÉΓòÉ
  18615.  
  18616.  Purpose 
  18617.  
  18618.           Wakes all threads that are waiting for a condition variable. 
  18619.  
  18620.  Format 
  18621.  
  18622.                     #include <pthread.h>
  18623.  
  18624.                     int pthread_cond_broadcast(
  18625.                              pthread_cond_t  *cond);
  18626.  
  18627.  Parameters 
  18628.  
  18629.           cond          Condition variable broadcast. 
  18630.  
  18631.  Usage 
  18632.  
  18633.           The pthread_cond_broadcast routine wakes all threads waiting for a 
  18634.           condition variable. Calling this routine implies that data guarded by 
  18635.           the associated mutex has changed.  This allows one or more waiting 
  18636.           threads to proceed. If any thread is waiting to proceed, call 
  18637.           pthread_cond_signal. 
  18638.  
  18639.           You can call this routine when the associated mutex is either locked 
  18640.           or unlocked. Note that if the pthreads exception handling header file 
  18641.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  18642.           raised. 
  18643.  
  18644.  Return Codes 
  18645.  
  18646.           If the routine fails, errno may be set to one of the following 
  18647.           values: 
  18648.  
  18649.           Error         Description 
  18650.  
  18651.           0             Successful completion. 
  18652.  
  18653.           -1 [EINVAL]   The value specified by cond is invalid. 
  18654.  
  18655.  Related Information 
  18656.  
  18657.           Routines: pthread_cond_destroy 
  18658.           pthread_cond_init 
  18659.           pthread_cond_signal 
  18660.           pthread_cond_timedwait 
  18661.           pthread_cond_wait 
  18662.  
  18663.  
  18664. ΓòÉΓòÉΓòÉ 4.3.24. pthread_cond_destroy ΓòÉΓòÉΓòÉ
  18665.  
  18666.  Purpose 
  18667.  
  18668.           Deletes a condition variable. 
  18669.  
  18670.  Format 
  18671.  
  18672.                     #include <pthread.h>
  18673.  
  18674.                     int pthread_cond_destroy(
  18675.                              pthread_cond_t  *cond);
  18676.  
  18677.  Parameters 
  18678.  
  18679.           cond          Condition variable deleted. 
  18680.  
  18681.  Usage 
  18682.  
  18683.           The pthread_cond_destroy routine deletes a condition variable.  Call 
  18684.           this routine when a condition variable is no longer referenced.  The 
  18685.           effect of calling this routine is to give permission to reclaim 
  18686.           storage for the condition variable. 
  18687.  
  18688.           The results of this routine are unpredictable if the condition 
  18689.           variable specified in cond does not exist. 
  18690.  
  18691.           The results of this routine are also unpredictable if there are 
  18692.           threads waiting for the specified condition variable to be signaled 
  18693.           or broadcast when it is deleted. Note that if the pthreads exception 
  18694.           handling header file pthread_exc.h is used instead of pthread.h, then 
  18695.           a DCE exception is raised. 
  18696.  
  18697.  Return Codes 
  18698.  
  18699.           If the routine fails, errno may be set to one of the following 
  18700.           values: 
  18701.  
  18702.           Error         Description 
  18703.  
  18704.           0             Successful completion. 
  18705.  
  18706.           -1 [EINVAL]   The value specified by cond is invalid. 
  18707.  
  18708.           -1 [EBUSY]    A thread is currently executing a pthread_cond_wait  or 
  18709.                         pthread_cond_timedwait on the condition variable 
  18710.                         specified in cond. 
  18711.  
  18712.  Related Information 
  18713.  
  18714.           Routines: pthread_cond_broadcast 
  18715.           pthread_cond_init 
  18716.           pthread_cond_signal 
  18717.           pthread_cond_timedwait 
  18718.           pthread_cond_wait 
  18719.  
  18720.  
  18721. ΓòÉΓòÉΓòÉ 4.3.25. pthread_cond_init ΓòÉΓòÉΓòÉ
  18722.  
  18723.  Purpose 
  18724.  
  18725.           Creates a condition variable. 
  18726.  
  18727.  Format 
  18728.  
  18729.                     #include <pthread.h>
  18730.  
  18731.                     int pthread_cond_init(
  18732.                              pthread_cond_t  *cond,
  18733.                              pthread_condattr_t  attr);
  18734.  
  18735.  Parameters 
  18736.  
  18737.           cond          Condition variable that is created. 
  18738.  
  18739.           attr          Condition variable attributes object that defines the 
  18740.                         characteristics of the condition variable created.  If 
  18741.                         you specify pthread_condattr_default, default 
  18742.                         attributes are used. 
  18743.  
  18744.  Usage 
  18745.  
  18746.           The pthread_cond_init routine creates and initializes a condition 
  18747.           variable. A condition variable is a synchronization object used in 
  18748.           conjunction with a mutex. A mutex controls access to shared data, 
  18749.           whereas a condition variable allows threads to wait for that data to 
  18750.           enter a defined state. The state is defined by a Boolean expression 
  18751.           called a predicate. 
  18752.  
  18753.           A condition variable is signaled or broadcast to indicate that a 
  18754.           predicate may have become true.  The broadcast operation indicates 
  18755.           that all waiting threads need to resume and re-evaluate the 
  18756.           predicate. The signal operation is used when any one waiting thread 
  18757.           can continue. 
  18758.  
  18759.           If a thread that holds a mutex determines that the shared data is not 
  18760.           in the correct state for it to proceed (the associated predicate is 
  18761.           not true), it waits for a condition variable associated with the 
  18762.           desired state.  Waiting for the condition variable automatically 
  18763.           releases the mutex so that other threads can modify or examine the 
  18764.           shared data. When a thread modifies the state of the shared data so 
  18765.           that a predicate might be true, it signals or broadcasts on the 
  18766.           appropriate condition variable so that threads waiting for that 
  18767.           predicate can continue. 
  18768.  
  18769.           It is important that all threads waiting for a particular condition 
  18770.           variable at any time hold the same mutex.  If they do not, the 
  18771.           behavior of the wait operation is unpredictable (an implementation 
  18772.           can use the mutex to control internal access to the condition 
  18773.           variable object).  However, it is legal for a client to store 
  18774.           condition variables and mutexes and later reuse them in different 
  18775.           combinations. The client must ensure that no threads use the 
  18776.           condition variable with the old mutex.  At any time, an arbitrary 
  18777.           number of condition variables can be associated with a single mutex, 
  18778.           each representing a different predicate of the shared data protected 
  18779.           by that mutex. 
  18780.  
  18781.           Condition variables are not owned by a particular thread.  Any 
  18782.           associated storage is not automatically deallocated when the creating 
  18783.           thread terminates. Note that if the pthreads exception handling 
  18784.           header file pthread_exc.h is used instead of pthread.h, then a DCE 
  18785.           exception is raised. 
  18786.  
  18787.  Return Codes 
  18788.  
  18789.           If the routine fails, errno may be set to one of the following 
  18790.           values: 
  18791.  
  18792.           Error         Description 
  18793.  
  18794.           0             Successful completion. 
  18795.  
  18796.           -1 [EAGAIN]   The system lacks the necessary resources to initialize 
  18797.                         another condition variable. 
  18798.  
  18799.           -1 [EINVAL]   Invalid attributes object. 
  18800.  
  18801.           -1 [ENOMEM]   Insufficient memory exists to initialize the condition 
  18802.                         variable. 
  18803.  
  18804.  Related Information 
  18805.  
  18806.           Routines: pthread_cond_broadcast 
  18807.           pthread_cond_destroy 
  18808.           pthread_cond_signal 
  18809.           pthread_cond_timedwait 
  18810.           pthread_cond_wait 
  18811.  
  18812.  
  18813. ΓòÉΓòÉΓòÉ 4.3.26. pthread_cond_signal ΓòÉΓòÉΓòÉ
  18814.  
  18815.  Purpose 
  18816.  
  18817.           Wakes one thread that is waiting for a condition variable. 
  18818.  
  18819.  Format 
  18820.  
  18821.                     #include <pthread.h>
  18822.  
  18823.                     int pthread_cond_signal(
  18824.                              pthread_cond_t  *cond);
  18825.  
  18826.  Parameters 
  18827.  
  18828.           cond          Condition variable signaled. 
  18829.  
  18830.  Usage 
  18831.  
  18832.           The pthread_cond_signal routine wakes one thread waiting for a 
  18833.           condition variable. Calling this routine implies that data guarded by 
  18834.           the associated mutex has changed so that it is possible for a single 
  18835.           waiting thread to proceed.  Call this routine when any thread waiting 
  18836.           for the specified condition variable might find its predicate true, 
  18837.           but only if one thread needs to proceed. 
  18838.  
  18839.           The scheduling policy determines which thread is awakened. For policy 
  18840.           SCHED_HRR a thread is chosen in priority order. 
  18841.  
  18842.           You can call this routine when the associated mutex is either locked 
  18843.           or unlocked. Note that if the pthreads exception handling header file 
  18844.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  18845.           raised. 
  18846.  
  18847.  Return Codes 
  18848.  
  18849.           If the routine fails, errno may be set to one of the following 
  18850.           values: 
  18851.  
  18852.           Error         Description 
  18853.  
  18854.           0             Successful completion. 
  18855.  
  18856.           -1 [EINVAL]   The value specified by cond is invalid. 
  18857.  
  18858.  Related Information 
  18859.  
  18860.           Routines: 
  18861.           pthread_cond_broadcast 
  18862.           pthread_cond_destroy 
  18863.           pthread_cond_init 
  18864.           pthread_cond_timedwait 
  18865.           pthread_cond_wait 
  18866.  
  18867.  
  18868. ΓòÉΓòÉΓòÉ 4.3.27. pthread_cond_timedwait ΓòÉΓòÉΓòÉ
  18869.  
  18870.  Purpose 
  18871.  
  18872.           Causes a thread to wait for a condition variable to be signaled or 
  18873.           broadcast for a specified period of time. 
  18874.  
  18875.  Format 
  18876.  
  18877.                     #include <pthread.h>
  18878.  
  18879.                     int pthread_cond_timedwait(
  18880.                              pthread_cond_t  *cond,
  18881.                              pthread_mutex_t  *mutex,
  18882.                              struct timespec  *abstime);
  18883.  
  18884.  Parameters 
  18885.  
  18886.           cond          Condition variable waited for. 
  18887.  
  18888.           mutex         Mutex associated with the condition variable specified 
  18889.                         in cond. 
  18890.  
  18891.           abstime       Absolute time at which the wait expires, if the 
  18892.                         condition has not been signaled or broadcast. (See 
  18893.                         pthread_get_expiration_np, which you can use to obtain 
  18894.                         a value for this parameter.) 
  18895.  
  18896.  Usage 
  18897.  
  18898.           The pthread_cond_timedwait routine causes a thread to wait until one 
  18899.           of the following occurs: 
  18900.  
  18901.             o  The specified condition variable is signaled or broadcast. 
  18902.  
  18903.             o  The current system clock time is greater than or equal to the 
  18904.                time specified by the abstime parameter. 
  18905.  
  18906.           This routine is identical to pthread_cond_wait except that this 
  18907.           routine can return before a condition variable is signaled or 
  18908.           broadcast - specifically, when a specified time expires. 
  18909.  
  18910.           If the current time equals or exceeds the expiration time, this 
  18911.           routine returns immediately, without causing the current thread to 
  18912.           wait. 
  18913.  
  18914.           Call this routine after you lock the mutex specified in mutex. The 
  18915.           results of this routine are unpredictable if this routine is called 
  18916.           without first locking the mutex. 
  18917.  
  18918.  Return Codes 
  18919.  
  18920.           If the routine fails, errno may be set to one of the following 
  18921.           values: 
  18922.  
  18923.           Error         Description 
  18924.  
  18925.           0             Successful completion. 
  18926.  
  18927.           -1 [EINVAL]   The value specified by cond, mutex or abstime is 
  18928.                         invalid. 
  18929.  
  18930.           -1 [EAGAIN]   The time specified by abstime expired. 
  18931.  
  18932.           -1 [EDEADLK]  A deadlock condition is detected. 
  18933.  
  18934.  Related Information 
  18935.  
  18936.           Routines: pthread_cond_broadcast 
  18937.           pthread_cond_destroy 
  18938.           pthread_cond_init 
  18939.           pthread_cond_signal 
  18940.           pthread_cond_wait 
  18941.           pthread_get_expiration_np 
  18942.  
  18943.  
  18944. ΓòÉΓòÉΓòÉ 4.3.28. pthread_cond_wait ΓòÉΓòÉΓòÉ
  18945.  
  18946.  Purpose 
  18947.  
  18948.           Causes a thread to wait for a condition variable to be signaled or 
  18949.           broadcast. 
  18950.  
  18951.  Format 
  18952.  
  18953.                     #include <pthread.h>
  18954.  
  18955.                     int pthread_cond_wait(
  18956.                              pthread_cond_t  *cond,
  18957.                              pthread_mutex_t  *mutex);
  18958.  
  18959.  Parameters 
  18960.  
  18961.           cond          Condition variable waited for. 
  18962.  
  18963.           mutex         Mutex associated with the condition variable specified 
  18964.                         in cond. 
  18965.  
  18966.  Usage 
  18967.  
  18968.           The pthread_cond_wait routine causes a thread to wait for a condition 
  18969.           variable to be signaled or broadcast.  Each condition corresponds to 
  18970.           one or more predicates based on shared data.  The calling thread 
  18971.           waits for the data to reach a particular state (for the predicate to 
  18972.           become true). 
  18973.  
  18974.           Call this routine after you have locked the mutex specified in mutex. 
  18975.           The results of this routine are unpredictable if this routine is 
  18976.           called without first locking the mutex. 
  18977.  
  18978.           This routine automatically releases the mutex and causes the calling 
  18979.           thread to wait for the condition.  If the wait is satisfied as a 
  18980.           result of some thread calling pthread_cond_signal or 
  18981.           pthread_cond_broadcast, the mutex is re-acquired and the routine 
  18982.           returns. 
  18983.  
  18984.           A thread that changes the state of storage protected by the mutex in 
  18985.           such a way that a predicate associated with a condition variable 
  18986.           might now be true must call either pthread_cond_signal or 
  18987.           pthread_cond_broadcast for that condition variable. If neither call 
  18988.           is made, any thread waiting for the condition variable continues to 
  18989.           wait. 
  18990.  
  18991.           This routine will, with low probability, return when the condition 
  18992.           variable has not been signaled or broadcast.  When a spurious wakeup 
  18993.           occurs, the mutex is re-acquired before the routine returns.  (To 
  18994.           handle this situation, enclose the routine in a loop that checks the 
  18995.           predicate.) Note that if the pthreads exception handling header file 
  18996.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  18997.           raised. 
  18998.  
  18999.  Return Codes 
  19000.  
  19001.           If the routine fails, errno may be set to one of the following 
  19002.           values: 
  19003.  
  19004.           Error         Description 
  19005.  
  19006.           0             Successful completion. 
  19007.  
  19008.           -1 [EINVAL]   The value specified by cond or mutex is invalid. 
  19009.  
  19010.           -1 [EDEADLK]  A deadlock condition is detected. 
  19011.  
  19012.  Related Information 
  19013.  
  19014.           Routines: 
  19015.           pthread_cond_broadcast 
  19016.           pthread_cond_destroy 
  19017.           pthread_cond_init 
  19018.           pthread_cond_signal 
  19019.           pthread_cond_timedwait 
  19020.  
  19021.  
  19022. ΓòÉΓòÉΓòÉ 4.3.29. pthread_condattr_create ΓòÉΓòÉΓòÉ
  19023.  
  19024.  Purpose 
  19025.  
  19026.           Creates a condition variable attributes object. 
  19027.  
  19028.  Format 
  19029.  
  19030.                     #include <pthread.h>
  19031.  
  19032.                     int pthread_condattr_create(
  19033.                     pthread_condattr_t  *attr);
  19034.  
  19035.  Parameters 
  19036.  
  19037.           attr          Condition variable attributes object that is created. 
  19038.  
  19039.  Usage 
  19040.  
  19041.           The pthread_condattr_create routine creates a condition variable 
  19042.           attributes object that is used to specify the attributes of condition 
  19043.           variables when they are created.  The condition variable attributes 
  19044.           object is initialized with the default value for all of the 
  19045.           attributes defined by a given implementation. 
  19046.  
  19047.           When a condition variable attributes object is used to create a 
  19048.           condition variable, the values of the individual attributes determine 
  19049.           the characteristics of the new object.  Attributes objects act like 
  19050.           additional parameters to object creation.  Changing individual 
  19051.           attributes does not affect objects that were previously created using 
  19052.           the attributes object. Note that if the pthreads exception handling 
  19053.           header file pthread_exc.h is used instead of pthread.h, then a DCE 
  19054.           exception is raised. 
  19055.  
  19056.  Return Codes 
  19057.  
  19058.           The created condition variable attributes object is returned to the 
  19059.           attr parameter. 
  19060.  
  19061.           If the routine fails, errno may be set to one of the following 
  19062.           values: 
  19063.  
  19064.           Error         Description 
  19065.  
  19066.           0             Successful completion 
  19067.  
  19068.           -1 [EINVAL]   The value specified by attr is invalid. 
  19069.  
  19070.           -1 [ENOMEM]   Insufficient memory exists to create the condition 
  19071.                         variable attributes object. 
  19072.  
  19073.  Related Information 
  19074.  
  19075.           Routines: pthread_condattr_delete 
  19076.           pthread_cond_init 
  19077.  
  19078.  
  19079. ΓòÉΓòÉΓòÉ 4.3.30. pthread_condattr_delete ΓòÉΓòÉΓòÉ
  19080.  
  19081.  Purpose 
  19082.  
  19083.           Deletes a condition variable attributes object. 
  19084.  
  19085.  Format 
  19086.  
  19087.                     #include <pthread.h>
  19088.  
  19089.                     int pthread_condattr_delete(
  19090.                              pthread_condattr_t  *attr);
  19091.  
  19092.  Parameters 
  19093.  
  19094.           attr          Condition variable attributes object deleted. 
  19095.  
  19096.  Usage 
  19097.  
  19098.           The pthread_condattr_delete routine deletes a condition variable 
  19099.           attributes object.  Call this routine when a condition variable 
  19100.           attributes object created by pthread_condattr_create is no longer 
  19101.           referenced. 
  19102.  
  19103.           This routine gives permission to reclaim storage for the condition 
  19104.           variable attributes object.  Condition variables that are created 
  19105.           using this attributes object are not affected by the deletion of the 
  19106.           condition variable attributes object. 
  19107.  
  19108.           The results of calling this routine are unpredictable if the handle 
  19109.           specified by the attr parameter refers to an attributes object that 
  19110.           does not exist. Note that if the pthreads exception handling header 
  19111.           file pthread_exc.h is used instead of pthread.h, then a DCE exception 
  19112.           is raised. 
  19113.  
  19114.  Return Codes 
  19115.  
  19116.           If the routine fails, errno may be set to one of the following 
  19117.           values: 
  19118.  
  19119.           Error         Description 
  19120.  
  19121.           0             Successful completion 
  19122.  
  19123.           -1 [EINVAL]   The value specified by attr is invalid. 
  19124.  
  19125.  Related Information 
  19126.  
  19127.           Routines: 
  19128.           pthread_condattr_create 
  19129.  
  19130.  
  19131. ΓòÉΓòÉΓòÉ 4.3.31. pthread_create ΓòÉΓòÉΓòÉ
  19132.  
  19133.  Purpose 
  19134.  
  19135.           Creates a thread object and thread. 
  19136.  
  19137.  Format 
  19138.  
  19139.                     #include <pthread.h>
  19140.  
  19141.                     int pthread_create(
  19142.                              pthread_t  *thread,
  19143.                              pthread_attr_t  attr,
  19144.                              pthread_startroutine_t  start_routine,
  19145.                              pthread_addr_t  arg);
  19146.  
  19147.  Parameters 
  19148.  
  19149.           thread        Handle to the thread object created. 
  19150.  
  19151.           attr          Thread attributes object that defines the 
  19152.                         characteristics of the thread being created.  If you 
  19153.                         specify pthread_attr_default, default attributes are 
  19154.                         used. 
  19155.  
  19156.           start_routine Routine run as the new thread's start routine. If the 
  19157.                         start routine is defined as having the IBM C/Set2 
  19158.                         _optlink calling convention, then the application 
  19159.                         module containing the pthread_create call must use 
  19160.                         #define DCEOS2_THREAD_OPTLINK_LINKAGE prior to the 
  19161.                         statement #include [pthread.h] or #include 
  19162.                         [pthread_exc.h]. 
  19163.  
  19164.           arg           Address value copied and passed to the thread's start 
  19165.                         routine. 
  19166.  
  19167.  Usage 
  19168.  
  19169.           The pthread_create routine creates a thread object and a thread. A 
  19170.           thread is a single, sequential flow of control within a program. It 
  19171.           is the active execution of a designated routine, including any nested 
  19172.           routine invocations. A thread object defines and controls the running 
  19173.           thread. 
  19174.  
  19175.           Calling this routine sets in motion the following actions: 
  19176.  
  19177.             o  An internal thread object is created to describe the thread. 
  19178.  
  19179.             o  The associated executable thread is created with attributes 
  19180.                specified by the attr parameter (or with default attributes if 
  19181.                pthread_attr_default is specified). 
  19182.  
  19183.             o  The thread parameter receives the new thread. 
  19184.  
  19185.             o  The start_routine routine is called when this routine 
  19186.                successfully completes. 
  19187.  
  19188.           The thread is created in the ready state and therefore might 
  19189.           immediately begin running the routine specified by the start_routine 
  19190.           parameter. The newly created thread can begin running before 
  19191.           pthread_create completes. This is true, if the new thread follows the 
  19192.           SCHED_HRR scheduling policy or has a priority higher than the 
  19193.           creating thread, or both. Otherwise, the new thread begins running at 
  19194.           its turn, which with sufficient processors might also be before 
  19195.           pthread_create returns. 
  19196.  
  19197.           The routine specified in start_routine is passed a copy of the arg 
  19198.           parameter. The value of the arg parameter is unspecified. 
  19199.  
  19200.           The thread object exists until the pthread_detach routine is called 
  19201.           or the thread terminates, whichever occurs last. 
  19202.  
  19203.           The synchronization between the caller of pthread_create and the 
  19204.           newly created thread is through the use of the pthread_join routine 
  19205.           (or any other mutexes or condition variables they agree to use). 
  19206.  
  19207.           A thread terminates when one of the following events occurs: 
  19208.  
  19209.             o  The thread returns from its start routine. 
  19210.             o  The thread exits (within a routine) as the result of calling the 
  19211.                pthread_exit routine. 
  19212.             o  The thread is canceled. 
  19213.  
  19214.           The following actions are performed when a thread terminates: 
  19215.  
  19216.             o  If the thread terminates by returning from its start routine or 
  19217.                calling pthread_exit, the return value is copied into the thread 
  19218.                object. If the start routine returns normally and the start 
  19219.                routine is a procedure that does not return a value, then the 
  19220.                result obtained by pthread_join is unpredictable. If the thread 
  19221.                has been cancelled, a return value of -1 is copied into the 
  19222.                thread object.  The return value can be retrieved by other 
  19223.                threads by calling the pthread_join routine. 
  19224.  
  19225.             o  A destructor for each thread-specific data point is removed from 
  19226.                the list of destructors for this thread and then is called. 
  19227.                This step destroys all the thread-specific data associated with 
  19228.                the current thread. 
  19229.  
  19230.             o  Each cleanup handler that has been declared by 
  19231.                pthread_cleanup_push and not yet removed by pthread_cleanup_pop 
  19232.                is called.  The most recently pushed handler is called first. 
  19233.  
  19234.             o  A flag is set in the thread object indicating that the thread 
  19235.                has terminated.  This flag must be set in order for callers of 
  19236.                pthread_join to return from the call. 
  19237.  
  19238.             o  A broadcast is made so that all threads currently waiting in a 
  19239.                call to pthread_join can return from the call. 
  19240.  
  19241.             o  The thread object is marked to indicate that it is no longer 
  19242.                needed by the thread itself.  A check is made to determine if 
  19243.                the thread object is no longer needed by other threads, that is, 
  19244.                if pthread_detach has been called.  If that routine is called, 
  19245.                then the thread object is deallocated. 
  19246.           Note that if the pthreads exception handling header file 
  19247.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  19248.           raised. 
  19249.  
  19250.  Return Codes 
  19251.  
  19252.           Upon successful completion, this routine stores the identifier of the 
  19253.           created thread at threadand returns 0.  Otherwise, a value of -1 is 
  19254.           returned and no thread is created, the contents of thread are 
  19255.           undefined, and errno may be set to one of the following values: 
  19256.  
  19257.           Error         Description 
  19258.  
  19259.           -1 [EAGAIN]   The system lacks the necessary resources to create 
  19260.                         another thread. 
  19261.  
  19262.           -1 [ENOMEM]   Insufficient memory exists to create the thread object. 
  19263.                         This is not a temporary condition. 
  19264.  
  19265.  Related Information 
  19266.  
  19267.           Routines: pthread_attr_create 
  19268.           pthread_cancel 
  19269.           pthread_detach 
  19270.           pthread_exit 
  19271.           pthread_join 
  19272.  
  19273.  
  19274. ΓòÉΓòÉΓòÉ 4.3.32. pthread_delay_np ΓòÉΓòÉΓòÉ
  19275.  
  19276.  Purpose 
  19277.  
  19278.           Causes a thread to wait for a specified period of time before 
  19279.           continuing. 
  19280.  
  19281.  Format 
  19282.  
  19283.                     #include <pthread.h>
  19284.  
  19285.                     int pthread_delay_np(
  19286.                              struct timespec  *interval);
  19287.  
  19288.  Parameters 
  19289.  
  19290.           interval      Number of seconds and nanoseconds that the calling 
  19291.                         thread waits before continuing execution.  The value 
  19292.                         specified must be greater than or equal to zero. 
  19293.  
  19294.  Usage 
  19295.  
  19296.           The pthread_delay_np routine causes a thread to delay execution for a 
  19297.           specified period of elapsed wall clock time.  The period of time the 
  19298.           thread waits is at least as long as the number of seconds and 
  19299.           nanoseconds specified in the interval parameter. 
  19300.  
  19301.           Specifying an interval of 0 (zero) seconds and 0 (zero) nanoseconds 
  19302.           is allowed and can result in the thread giving up the processor or 
  19303.           delivering a pending cancel. 
  19304.  
  19305.           The struct timespec structure contains two fields, as follows: 
  19306.  
  19307.           tv_sec     An integer number of seconds. 
  19308.  
  19309.           tv_nsec    An integer number of nanoseconds. 
  19310.  
  19311.           Usage of this routine is not portable. Note that if the pthreads 
  19312.           exception handling header file pthread_exc.h is used instead of 
  19313.           pthread.h, then a DCE exception is raised. 
  19314.  
  19315.  Return Codes 
  19316.  
  19317.           If the routine fails, errno may be set to one of the following 
  19318.           values: 
  19319.  
  19320.           Error         Description 
  19321.  
  19322.           0             Successful completion 
  19323.  
  19324.           -1 [EINVAL]   The value specified by interval is invalid. 
  19325.  
  19326.  Related Information 
  19327.  
  19328.           Routines: 
  19329.           pthread_yield 
  19330.  
  19331.  
  19332. ΓòÉΓòÉΓòÉ 4.3.33. pthread_detach ΓòÉΓòÉΓòÉ
  19333.  
  19334.  Purpose 
  19335.  
  19336.           Marks a thread object for deletion. 
  19337.  
  19338.  Format 
  19339.  
  19340.                     #include <pthread.h>
  19341.  
  19342.                     int pthread_detach(
  19343.                              pthread_t  *thread);
  19344.  
  19345.  Parameters 
  19346.  
  19347.           thread        Thread object marked for deletion. 
  19348.  
  19349.  Usage 
  19350.  
  19351.           The pthread_detach routine indicates that storage for the specified 
  19352.           thread is reclaimed when the thread terminates.  This includes 
  19353.           storage for the thread parameter's return value.  If thread has not 
  19354.           terminated when this routine is called, this routine does not cause 
  19355.           it to terminate. 
  19356.  
  19357.           Call this routine when a thread object is no longer referenced. 
  19358.           Additionally, call this routine for every thread that is created to 
  19359.           ensure that storage for thread objects does not accumulate. 
  19360.  
  19361.           You cannot join with a thread after the thread has been detached. 
  19362.  
  19363.           The results of this routine are unpredictable if the value of thread 
  19364.           refers to a thread object that does not exist. Note that if the 
  19365.           pthreads exception handling header file pthread_exc.h is used instead 
  19366.           of pthread.h, then a DCE exception is raised. 
  19367.  
  19368.  Return Codes 
  19369.  
  19370.           If the routine fails, errno may be set to one of the following 
  19371.           values: 
  19372.  
  19373.           Error         Description 
  19374.  
  19375.           0             Successful completion 
  19376.  
  19377.           -1 [EINVAL]   The value specified by thread is invalid. 
  19378.  
  19379.           -1 [ERSCH]    The value specified by thread does not refer to an 
  19380.                         existing thread. 
  19381.  
  19382.  Related Information 
  19383.  
  19384.           Routines: pthread_cancel 
  19385.           pthread_create 
  19386.           pthread_exit 
  19387.           pthread_join 
  19388.  
  19389.  
  19390. ΓòÉΓòÉΓòÉ 4.3.34. pthread_equal ΓòÉΓòÉΓòÉ
  19391.  
  19392.  Purpose 
  19393.  
  19394.           Compares one thread identifier to another thread identifier. 
  19395.  
  19396.  Format 
  19397.  
  19398.                     #include <pthread.h>
  19399.  
  19400.                     boolean32 pthread_equal(
  19401.                              pthread_t  *thread1,
  19402.                              pthread_t  *thread2);
  19403.  
  19404.  Parameters 
  19405.  
  19406.           thread1       The first thread identifier to be compared. 
  19407.  
  19408.           thread2       The second thread identifier to be compared. 
  19409.  
  19410.  Usage 
  19411.  
  19412.           The pthread_equal routine compares one thread identifier to another 
  19413.           thread identifier.  (This routine does not check whether the objects 
  19414.           that correspond to the identifiers currently exist.)  If the 
  19415.           identifiers have values indicating that they designate the same 
  19416.           object, 1 (true) is returned.  If the values do not designate the 
  19417.           same object, 0 (false) is returned. 
  19418.  
  19419.           This routine is implemented as a C macro. 
  19420.  
  19421.  Return Codes 
  19422.  
  19423.           Possible return values are as follows: 
  19424.  
  19425.           Error         Description 
  19426.  
  19427.           0             Values of thread1 and thread2 do not designate the same 
  19428.                         object. 
  19429.  
  19430.           1             Values of thread1 and thread2 designate the same 
  19431.                         object. 
  19432.  
  19433.  Examples 
  19434.  
  19435.                     equal = pthread_equal (thread1, thread2)
  19436.  
  19437.  Related Information 
  19438.  
  19439.           Routine: 
  19440.           pthread_create 
  19441.  
  19442.  
  19443. ΓòÉΓòÉΓòÉ 4.3.35. pthread_exit ΓòÉΓòÉΓòÉ
  19444.  
  19445.  Purpose 
  19446.  
  19447.           Terminates the calling thread. 
  19448.  
  19449.  Format 
  19450.  
  19451.                     #include <pthread.h>
  19452.  
  19453.                     void pthread_exit(
  19454.                             pthread_addr_t  status);
  19455.  
  19456.  Parameters 
  19457.  
  19458.           status        Address value copied and returned to the caller of 
  19459.                         pthread_join. 
  19460.  
  19461.  Usage 
  19462.  
  19463.           The pthread_exit routine terminates the calling thread and makes a 
  19464.           status value available to any thread that calls pthread_join and 
  19465.           specifies the terminating thread. 
  19466.  
  19467.           An implicit call to pthread_exit is issued when a thread returns from 
  19468.           the start routine that was used to create it.  The routine's return 
  19469.           value serves as the thread's exit status.  If the return value is -1, 
  19470.           an error exit is forced for the thread instead of a normal exit.  The 
  19471.           process exits when the last running thread calls pthread_exit, with 
  19472.           an undefined exit status. Note that if the pthreads exception 
  19473.           handling header file pthread_exc.h is used instead of pthread.h, a 
  19474.           DCE exception is raised. 
  19475.  
  19476.  Restrictions 
  19477.  
  19478.           The pthread_exit routine does not work in the main (initial) thread 
  19479.           because DCE Threads relies on information at the base of thread 
  19480.           stacks; this information does not exist in the main thread. 
  19481.  
  19482.  Related Information 
  19483.  
  19484.           Routines: pthread_create 
  19485.           pthread_detach 
  19486.           pthread_join 
  19487.  
  19488.  
  19489. ΓòÉΓòÉΓòÉ 4.3.36. pthread_get_expiration_np ΓòÉΓòÉΓòÉ
  19490.  
  19491.  Purpose 
  19492.  
  19493.           Obtains a value representing a desired expiration time. 
  19494.  
  19495.  Format 
  19496.  
  19497.                     #include <pthread.h>
  19498.  
  19499.                     int pthread_get_expiration_np(
  19500.                             struct timespec  *delta,
  19501.                             struct timespec  *abstime);
  19502.  
  19503.  Parameters 
  19504.  
  19505.           delta         Number of seconds and nanoseconds to add to the current 
  19506.                         system time.  The result is the time when a timed wait 
  19507.                         expires. 
  19508.  
  19509.           abstime       Value representing the expiration time. 
  19510.  
  19511.  Usage 
  19512.  
  19513.           The pthread_get_expiration_np routine adds a specified interval to 
  19514.           the current absolute system time and returns a new absolute time. 
  19515.           This new absolute time is used as the expiration time in a call to 
  19516.           pthread_cond_timedwait. 
  19517.  
  19518.           The struct timespec structure contains two fields: 
  19519.  
  19520.           tv_sec     An integer number of seconds. 
  19521.  
  19522.           tv_nsec    An integer number of nanoseconds. 
  19523.  
  19524.  Return Codes 
  19525.  
  19526.           If the routine fails, errno may be set to one of the following 
  19527.           values: 
  19528.  
  19529.           Error         Description 
  19530.  
  19531.           -1 [EINVAL]   The value specified by delta is not valid. 
  19532.  
  19533.  Related Information 
  19534.  
  19535.           Routines: 
  19536.           pthread_cond_timedwait 
  19537.  
  19538.  
  19539. ΓòÉΓòÉΓòÉ 4.3.37. pthread_getprio ΓòÉΓòÉΓòÉ
  19540.  
  19541.  Purpose 
  19542.  
  19543.           Obtains the current priority of a thread. 
  19544.  
  19545.  Format 
  19546.  
  19547.                     #include <pthread.h>
  19548.  
  19549.                     int pthread_getprio(
  19550.                              pthread_t  thread);
  19551.  
  19552.  Parameters 
  19553.  
  19554.           thread        Thread whose priority is obtained. 
  19555.  
  19556.  Usage 
  19557.  
  19558.           The pthread_getprio routine obtains the current priority of a thread. 
  19559.           The current priority is different from the initial priority of the 
  19560.           thread if the pthread_setprio routine is called. 
  19561.  
  19562.           The exact effect of different priority values depends upon the 
  19563.           scheduling policy assigned to the thread. 
  19564.  
  19565.  Return Codes 
  19566.  
  19567.           The current priority value of the thread specified in thread is 
  19568.           returned. See pthread_setprio for valid values. 
  19569.  
  19570.           If the routine fails, errno may be set to one of the following 
  19571.           values: 
  19572.  
  19573.           Error         Description 
  19574.  
  19575.           -1 [EINVAL]   The value specified by thread is not valid. 
  19576.  
  19577.           -1 [ESRCH]    The value specified by thread does not refer to an 
  19578.                         existing thread. 
  19579.  
  19580.  Related Information 
  19581.  
  19582.           Routines: pthread_attr_setprio 
  19583.           pthread_setprio 
  19584.           pthread_setscheduler 
  19585.  
  19586.  
  19587. ΓòÉΓòÉΓòÉ 4.3.38. pthread_getscheduler ΓòÉΓòÉΓòÉ
  19588.  
  19589.  Purpose 
  19590.  
  19591.           Obtains the current scheduling policy of a thread. 
  19592.  
  19593.  Format 
  19594.  
  19595.                     #include <pthread.h>
  19596.  
  19597.                     int pthread_getscheduler(
  19598.                              pthread_t  thread);
  19599.  
  19600.  Parameters 
  19601.  
  19602.           thread        Thread whose scheduling policy is obtained. 
  19603.  
  19604.  Usage 
  19605.  
  19606.           The pthread_getscheduler routine obtains the current scheduling 
  19607.           policy of a thread. The current scheduling policy of a thread is 
  19608.           different from the initial scheduling policy if the 
  19609.           pthread_setscheduler routine is called. 
  19610.  
  19611.  Return Codes 
  19612.  
  19613.           The current scheduling policy value of the thread specified in thread 
  19614.           is returned. See pthread_setscheduler for valid values. 
  19615.  
  19616.           If the routine fails, errno may be set to one of the following 
  19617.           values: 
  19618.  
  19619.           Error         Description 
  19620.  
  19621.           -1 [EINVAL]   The value specified by thread is not valid. 
  19622.  
  19623.           -1 [ESRCH]    The value specified by thread does not refer to an 
  19624.                         existing thread. 
  19625.  
  19626.  Related Information 
  19627.  
  19628.           Routines: pthread_attr_setsched 
  19629.           pthread_setscheduler 
  19630.  
  19631.  
  19632. ΓòÉΓòÉΓòÉ 4.3.39. pthread_getspecific ΓòÉΓòÉΓòÉ
  19633.  
  19634.  Purpose 
  19635.  
  19636.           Obtains the thread-specific data associated with the specified key. 
  19637.  
  19638.  Format 
  19639.  
  19640.                     #include <pthread.h>
  19641.  
  19642.                     int pthread_getspecific(
  19643.                              pthread_key_t  key,
  19644.                              pthread_addr_t  *value);
  19645.  
  19646.  Parameters 
  19647.  
  19648.           key           Context key value that identifies the data value 
  19649.                         obtained. This key value must be obtained from 
  19650.                         pthread_keycreate. 
  19651.  
  19652.           value         Address of the current thread-specific data value 
  19653.                         associated with the specified key. 
  19654.  
  19655.  Usage 
  19656.  
  19657.           The pthread_getspecific routine obtains the thread-specific data 
  19658.           associated with the specified key for the current thread. Note that 
  19659.           if the pthreads exception handling header file pthread_exc.h is used 
  19660.           instead of pthread.h, a DCE exception is raised. 
  19661.  
  19662.  Return Codes 
  19663.  
  19664.           If the routine fails, errno may be set to one of the following 
  19665.           values: 
  19666.  
  19667.           Error         Description 
  19668.  
  19669.           -1 [EINVAL]   The key value is not valid. 
  19670.  
  19671.  Related Information 
  19672.  
  19673.           Routines: pthread_keycreate 
  19674.           pthread_setspecific 
  19675.  
  19676.  
  19677. ΓòÉΓòÉΓòÉ 4.3.40. pthread_getunique_np ΓòÉΓòÉΓòÉ
  19678.  
  19679.  Purpose 
  19680.  
  19681.           Obtains the sequence number associated with a thread. 
  19682.  
  19683.  Format 
  19684.  
  19685.                     #include <pthread.h>
  19686.  
  19687.                     unsigned int pthread_getunique_np(
  19688.                              pthread_t  *thread);
  19689.  
  19690.  Parameters 
  19691.  
  19692.           thread        Thread whose priority is obtained. 
  19693.  
  19694.  Usage 
  19695.  
  19696.           The pthread_getunique_np routine returns the sequence number 
  19697.           associated with the thread identifier passed to it. Note that if the 
  19698.           pthreads exception handling header file pthread_exc.h is used instead 
  19699.           of pthread.h, a DCE exception is raised. 
  19700.  
  19701.  Return Codes 
  19702.  
  19703.           The pthread_getunique_np routine returns the sequence number 
  19704.           associated with the thread identifier passed to it. 
  19705.  
  19706.  Related Information 
  19707.  
  19708.           Routines: pthread_create 
  19709.           pthread_self 
  19710.  
  19711.  
  19712. ΓòÉΓòÉΓòÉ 4.3.41. pthread_join ΓòÉΓòÉΓòÉ
  19713.  
  19714.  Purpose 
  19715.  
  19716.           Causes the calling thread to wait for the termination of a specified 
  19717.           thread. 
  19718.  
  19719.  Format 
  19720.  
  19721.                     #include <pthread.h>
  19722.  
  19723.                     int pthread_join(
  19724.                              pthread_t  thread,
  19725.                              pthread_addr_t  *status);
  19726.  
  19727.  Parameters 
  19728.  
  19729.           thread        Thread whose termination is awaited by the caller of 
  19730.                         this routine. 
  19731.  
  19732.           status        Status value of the terminating thread when that thread 
  19733.                         calls pthread_exit. 
  19734.  
  19735.  Usage 
  19736.  
  19737.           The pthread_join routine causes the calling thread to wait for the 
  19738.           termination of a specified thread.  A call to this routine returns 
  19739.           after the specified thread has terminated. 
  19740.  
  19741.           Any number of threads can call this routine.  All threads are 
  19742.           awakened when the specified thread terminates. 
  19743.  
  19744.           If the current thread calls this routine to join with itself, an 
  19745.           error is returned. 
  19746.  
  19747.           The results of this routine are unpredictable if the value for thread 
  19748.           refers to a thread object that no longer exists. Note that if the 
  19749.           pthreads exception handling header file pthread_exc.h is used instead 
  19750.           of pthread.h, then a DCE exception is raised. 
  19751.  
  19752.  Return Codes 
  19753.  
  19754.           If the routine fails, errno may be set to one of the following 
  19755.           values: 
  19756.  
  19757.           Error         Description 
  19758.  
  19759.           -1 [EINVAL]   The value specified by thread is not valid. 
  19760.  
  19761.           -1 [ESRCH]    The value specified by thread does not refer to a 
  19762.                         currently existing thread. 
  19763.  
  19764.           -1 [EDEADLK]  A deadlock is detected. 
  19765.  
  19766.  Related Information 
  19767.  
  19768.           Routines: pthread_create 
  19769.           pthread_detach 
  19770.           pthread_exit 
  19771.  
  19772.  
  19773. ΓòÉΓòÉΓòÉ 4.3.42. pthread_keycreate ΓòÉΓòÉΓòÉ
  19774.  
  19775.  Purpose 
  19776.  
  19777.           Generates a unique thread-specific data key value. 
  19778.  
  19779.  Format 
  19780.  
  19781.                     #include <pthread.h>
  19782.  
  19783.                     int pthread_keycreate(
  19784.                              pthread_key_t  *key,
  19785.                              void  (*destructor) (void  *value));
  19786.  
  19787.  Parameters 
  19788.  
  19789.           key           Value of the new thread-specific data key. 
  19790.  
  19791.           destructor    Procedure to be called to destroy a data value 
  19792.                         associated with the created key when the thread 
  19793.                         terminates. 
  19794.  
  19795.  Usage 
  19796.  
  19797.           The pthread_keycreate routine generates a unique thread-specific data 
  19798.           key value. This key value identifies a thread-specific data value, 
  19799.           which is an address of memory generated by the client containing 
  19800.           arbitrary data of any size. 
  19801.  
  19802.           Thread-specific data allow client software to associate information 
  19803.           with the current thread. 
  19804.  
  19805.           For example, thread-specific data can be used by a language run-time 
  19806.           library that needs to associate a language-specific thread-private 
  19807.           data structure with an individual thread.  The thread-specific data 
  19808.           routines also provide a portable means of implementing the class of 
  19809.           storage called thread-private static, which is needed to support 
  19810.           parallel decomposition in the FORTRAN language. 
  19811.  
  19812.           This routine generates and returns a new key value.  Each call to 
  19813.           this routine within a process returns a key value that is unique 
  19814.           within an application invocation. Calls to pthread_keycreate must 
  19815.           occur in initialization code guaranteed to run only once in each 
  19816.           process. The pthread_once routine provides a way of specifying such 
  19817.           code. 
  19818.  
  19819.           When multiple facilities share access to thread-specific data, the 
  19820.           facilities must agree on the key value that is associated with the 
  19821.           context.  The key value must be created only once and needs to be 
  19822.           stored in a location known to each facility.  (It may be desirable to 
  19823.           encapsulate the creation of a key, and the setting and getting of 
  19824.           context values for that key, within a special facility created for 
  19825.           that purpose.) 
  19826.  
  19827.           When a thread terminates, thread-specific data is automatically 
  19828.           destroyed.  For each thread-specific datum currently associated with 
  19829.           the thread, the destructor routine associated with the key value of 
  19830.           that context is called.  The order in which per-thread context 
  19831.           destructors are called at thread termination is undefined. Note that 
  19832.           if the pthreads exception handling header file pthread_exc.h is used 
  19833.           instead of pthread.h, then a DCE exception is raised. 
  19834.  
  19835.  Return Codes 
  19836.  
  19837.           If the routine fails, errno may be set to one of the following 
  19838.           values: 
  19839.  
  19840.           Error         Description 
  19841.  
  19842.           -1 [EINVAL]   The value specified by key is not valid. 
  19843.  
  19844.           -1 [EAGAIN]   An attempt was made to allocate a key when the key name 
  19845.                         space is exhausted.  This is not a temporary condition. 
  19846.  
  19847.           -1 [ENOMEM]   Insufficient memory exists to create the key. 
  19848.  
  19849.  Related Information 
  19850.  
  19851.           Routines: pthread_getspecific 
  19852.           pthread_setspecific 
  19853.  
  19854.  
  19855. ΓòÉΓòÉΓòÉ 4.3.43. pthread_lock_global_np ΓòÉΓòÉΓòÉ
  19856.  
  19857.  Purpose 
  19858.  
  19859.           Locks the global mutex. 
  19860.  
  19861.  Format 
  19862.  
  19863.                     #include <pthread.h>
  19864.  
  19865.                     void pthread_lock_global_np( );
  19866.  
  19867.  Usage 
  19868.  
  19869.           The pthread_lock_global_np routine locks the global mutex.  If the 
  19870.           global mutex is currently held by another thread when a thread calls 
  19871.           this routine, the thread waits for the global mutex to become 
  19872.           available. 
  19873.  
  19874.           The thread that has locked the global mutex becomes its current owner 
  19875.           and remains the owner until the same thread has unlocked it. This 
  19876.           routine returns with the global mutex in the locked state and with 
  19877.           the current thread as the current owner of the global mutex. 
  19878.  
  19879.           Use the global mutex when calling a library package that is not 
  19880.           designed to run in a multithreaded environment. Assume that the 
  19881.           library routine is always non-compatible or nonreentrant, unless the 
  19882.           documentation for it specifically states that it is compatible with 
  19883.           multithreading. 
  19884.  
  19885.           The global mutex is one lock.  Any code that calls any routine that 
  19886.           is not known to be reentrant uses the same lock.  This prevents 
  19887.           dependencies among threads calling library routines and those 
  19888.           routines calling other routines, and so on. 
  19889.  
  19890.           The global mutex is a recursive mutex.  A thread that has locked the 
  19891.           global mutex can relock it without deadlocking.  (The locking thread 
  19892.           must call pthread_unlock_global_np as many times as it called this 
  19893.           routine to allow another thread to lock the global mutex.) 
  19894.  
  19895.           Usage of this routine is not portable. 
  19896.  
  19897.  Related Information 
  19898.  
  19899.           Routines: pthread_mutexattr_setkind_np 
  19900.           pthread_mutex_lock 
  19901.           pthread_mutex_unlock 
  19902.           pthread_unlock_global_np 
  19903.  
  19904.  
  19905. ΓòÉΓòÉΓòÉ 4.3.44. pthread_mutex_destroy ΓòÉΓòÉΓòÉ
  19906.  
  19907.  Purpose 
  19908.  
  19909.           Deletes a mutex. 
  19910.  
  19911.  Format 
  19912.  
  19913.                     #include <pthread.h>
  19914.  
  19915.                     int pthread_mutex_destroy(
  19916.                              pthread_mutex_t  *mutex);
  19917.  
  19918.  Parameters 
  19919.  
  19920.           mutex         Mutex to be deleted. 
  19921.  
  19922.  Usage 
  19923.  
  19924.           The pthread_mutex_destroy routine deletes a mutex and must be called 
  19925.           when a mutex object is no longer referenced.  The effect of calling 
  19926.           this routine is to reclaim storage for the mutex object. 
  19927.  
  19928.           It is illegal to delete a mutex that has a current owner (in other 
  19929.           words, is locked). 
  19930.  
  19931.           The results of this routine are unpredictable if the mutex object 
  19932.           specified in the mutex parameter does not currently exist. Note that 
  19933.           if the pthreads exception handling header file pthread_exc.h is used 
  19934.           instead of pthread.h, then a DCE exception is raised. 
  19935.  
  19936.  Return Codes 
  19937.  
  19938.           If the function fails, errno may be set to one of the following 
  19939.           values: 
  19940.  
  19941.           Error         Description 
  19942.  
  19943.           -1 [EBUSY]    An attempt was made to destroy a mutex that is locked. 
  19944.  
  19945.           -1 [EINVAL]   The value specified by mutex is not valid. 
  19946.  
  19947.  Related Information 
  19948.  
  19949.           Routines: pthread_mutex_init 
  19950.           pthread_mutex_lock 
  19951.           pthread_mutex_trylock 
  19952.           pthread_mutex_unlock 
  19953.  
  19954.  
  19955. ΓòÉΓòÉΓòÉ 4.3.45. pthread_mutex_init ΓòÉΓòÉΓòÉ
  19956.  
  19957.  Purpose 
  19958.  
  19959.           Creates a mutex. 
  19960.  
  19961.  Format 
  19962.  
  19963.                     #include <pthread.h>
  19964.  
  19965.                     int pthread_mutex_init(
  19966.                              pthread_mutex_t  *mutex,
  19967.                              pthread_mutexattr_t  attr);
  19968.  
  19969.  Parameters 
  19970.  
  19971.           mutex         Mutex that is created. 
  19972.  
  19973.           attr          Mutex attributes object that defines the 
  19974.                         characteristics of the created mutex.  If you specify 
  19975.                         pthread_mutexattr_default, default attributes are used. 
  19976.  
  19977.  Usage 
  19978.  
  19979.           The pthread_mutex_init routine creates a mutex and initializes it to 
  19980.           the unlocked state. 
  19981.  
  19982.           If the thread that called this routine terminates, the created mutex 
  19983.           is not automatically deallocated, because it is considered shared 
  19984.           among multiple threads. Note that if the pthreads exception handling 
  19985.           header file pthread_exc.h is used instead of pthread.h, then a DCE 
  19986.           exception is raised. 
  19987.  
  19988.  Return Codes 
  19989.  
  19990.           If an error condition occurs, this routine returns -1, the mutex is 
  19991.           not initialized, the contents of mutex are undefined, and errno may 
  19992.           be set to one of the following values: 
  19993.  
  19994.           Error         Description 
  19995.  
  19996.           -1 [EINVAL]   The value specified by attr is not valid. 
  19997.  
  19998.           -1 [EAGAIN]   The system lacks the necessary resources to initialize 
  19999.                         another mutex. 
  20000.  
  20001.           -1 [ENOMEM]   Insufficient memory exists to initialize the mutex. 
  20002.  
  20003.  Related Information 
  20004.  
  20005.           Routines: 
  20006.           pthread_mutexattr_create 
  20007.           pthread_mutexattr_getkind_np 
  20008.           pthread_mutexattr_setkind_np 
  20009.           pthread_mutex_lock 
  20010.           pthread_mutex_trylock 
  20011.           pthread_mutex_unlock 
  20012.  
  20013.  
  20014. ΓòÉΓòÉΓòÉ 4.3.46. pthread_mutex_lock ΓòÉΓòÉΓòÉ
  20015.  
  20016.  Purpose 
  20017.  
  20018.           Locks an unlocked mutex. 
  20019.  
  20020.  Format 
  20021.  
  20022.                     #include <pthread.h>
  20023.  
  20024.                     int pthread_mutex_lock(
  20025.                              pthread_mutex_t  *mutex);
  20026.  
  20027.  Parameters 
  20028.  
  20029.           mutex         Mutex that is locked. 
  20030.  
  20031.  Usage 
  20032.  
  20033.           The pthread_mutex_lock routine locks a mutex.  If the mutex is locked 
  20034.           when a thread calls this routine, the thread waits for the mutex to 
  20035.           become available. 
  20036.  
  20037.           The thread that has locked a mutex becomes its current owner and 
  20038.           remains the owner until the same thread has unlocked it. This routine 
  20039.           returns with the mutex in the locked state and with the current 
  20040.           thread as the mutex's current owner. 
  20041.  
  20042.           If you specified a fast mutex in a call to 
  20043.           pthread_mutexattr_setkind_np, a deadlock can result if the current 
  20044.           owner of a mutex calls this routine in an attempt to lock the mutex a 
  20045.           second time.  If you specified a recursive mutex in a call to 
  20046.           pthread_mutexattr_setkind_np, the current owner of a mutex can relock 
  20047.           the same mutex without blocking. If you specify a nonrecursive mutex 
  20048.           in a call to pthread_mutexattr_setkind_np, an error is returned and 
  20049.           the thread does not block if the current owner of a mutex calls this 
  20050.           routine in an attempt to lock the mutex a second time. 
  20051.  
  20052.           The preemption of a lower-priority thread that locks a mutex possibly 
  20053.           results in the indefinite blocking of higher-priority threads waiting 
  20054.           for the same mutex.  The execution of the waiting, higher-priority 
  20055.           threads are blocked for as long as there is a sufficient number of 
  20056.           runable threads of any priority between the lower- and higher- 
  20057.           priority values. Priority inversion occurs when any resource is 
  20058.           shared between threads with different priorities. Note that if the 
  20059.           pthreads exception handling header file pthread_exc.h is used instead 
  20060.           of pthread.h, then a DCE exception is raised. 
  20061.  
  20062.  Return Codes 
  20063.  
  20064.           If the routine fails, errno may be set to one of the following 
  20065.           values: 
  20066.  
  20067.           Error         Description 
  20068.  
  20069.           0             Successful completion 
  20070.  
  20071.           -1 [EINVAL]   The value specified by mutex is not valid. 
  20072.  
  20073.           -1 [EDEADLK]  A deadlock condition is detected. 
  20074.  
  20075.  Related Information 
  20076.  
  20077.           Routines: pthread_mutexattr_setkind_np 
  20078.           pthread_mutex_destroy 
  20079.           pthread_mutex_init 
  20080.           pthread_mutex_trylock 
  20081.           pthread_mutex_unlock 
  20082.  
  20083.  
  20084. ΓòÉΓòÉΓòÉ 4.3.47. pthread_mutex_trylock ΓòÉΓòÉΓòÉ
  20085.  
  20086.  Purpose 
  20087.  
  20088.           Locks a mutex. 
  20089.  
  20090.  Format 
  20091.  
  20092.                     #include <pthread.h>
  20093.  
  20094.                     int pthread_mutex_trylock(
  20095.                              pthread_mutex_t  *mutex);
  20096.  
  20097.  Parameters 
  20098.  
  20099.           mutex         Mutex that is locked. 
  20100.  
  20101.  Usage 
  20102.  
  20103.           The pthread_mutex_trylock routine locks a mutex.  If the specified 
  20104.           mutex is locked when a thread calls this routine, the calling thread 
  20105.           does not wait for the mutex to become available. 
  20106.  
  20107.           When a thread calls this routine, an attempt is made to immediately 
  20108.           lock the mutex. If the mutex is successfully locked, 1 is returned 
  20109.           and the current thread is then the current owner of the mutex. 
  20110.  
  20111.           If the mutex is locked by another thread when this routine is called, 
  20112.           0 (zero) is returned and the thread does not wait to acquire the 
  20113.           lock. If a recursive mutex is owned by the current thread, 1 is 
  20114.           returned and the mutex is relocked. (To unlock a recursive mutex, 
  20115.           each call to pthread_mutex_trylock must be matched by a call to the 
  20116.           pthread_mutex_unlock routine.) 
  20117.  
  20118.  Return Codes 
  20119.  
  20120.           If the routine fails, errno may be set to one of the following 
  20121.           values: 
  20122.  
  20123.           Error         Description 
  20124.  
  20125.           1             Successful completion 
  20126.  
  20127.           0             The mutex is locked; therefore, it was not acquired. 
  20128.  
  20129.           -1 [EINVAL]   The value specified by mutex is not valid. 
  20130.  
  20131.  Related Information 
  20132.  
  20133.           Routines: pthread_mutexattr_setkind_np 
  20134.           pthread_mutex_destroy 
  20135.           pthread_mutex_init 
  20136.           pthread_mutex_lock 
  20137.           pthread_mutex_unlock 
  20138.  
  20139.  
  20140. ΓòÉΓòÉΓòÉ 4.3.48. pthread_mutex_unlock ΓòÉΓòÉΓòÉ
  20141.  
  20142.  Purpose 
  20143.  
  20144.           Unlocks a mutex. 
  20145.  
  20146.  Format 
  20147.  
  20148.                     #include <pthread.h>
  20149.  
  20150.                     int pthread_mutex_unlock(
  20151.                              pthread_mutex_t  *mutex);
  20152.  
  20153.  Parameters 
  20154.  
  20155.           mutex         Mutex that is unlocked. 
  20156.  
  20157.  Usage 
  20158.  
  20159.           The pthread_mutex_unlock routine unlocks a mutex.  If no threads are 
  20160.           waiting for the mutex, the mutex unlocks with no current owner.  If 
  20161.           one or more threads are waiting to lock the specified mutex, this 
  20162.           routine causes one thread to return from its call to 
  20163.           pthread_mutex_lock. The scheduling policy is used to determine the 
  20164.           thread that acquires the mutex. For the SCHED_HRR policy, a blocked 
  20165.           thread is chosen in priority order. 
  20166.  
  20167.           The results of calling this routine are unpredictable if the mutex 
  20168.           specified in mutex is unlocked. The results of calling this routine 
  20169.           are also unpredictable if the mutex specified in mutex is currently 
  20170.           owned by a thread other than the calling thread. Note that if the 
  20171.           pthreads exception handling header file pthread_exc.h is used instead 
  20172.           of pthread.h, then a DCE exception is raised. 
  20173.  
  20174.  Return Codes 
  20175.  
  20176.           If the routine fails, errno may be set to one of the following 
  20177.           values: 
  20178.  
  20179.           Error         Description 
  20180.  
  20181.           0             Successful completion 
  20182.  
  20183.           -1 [EINVAL]   The value specified by mutex is not valid. 
  20184.  
  20185.  Related Information 
  20186.  
  20187.           Routines: 
  20188.           pthread_mutexattr_setkind_np 
  20189.           pthread_mutex_destroy 
  20190.           pthread_mutex_init 
  20191.           pthread_mutex_lock 
  20192.           pthread_mutex_trylock 
  20193.           pthread_unlock_global_np 
  20194.  
  20195.  
  20196. ΓòÉΓòÉΓòÉ 4.3.49. pthread_mutexattr_create ΓòÉΓòÉΓòÉ
  20197.  
  20198.  Purpose 
  20199.  
  20200.           Creates a mutex attributes object. 
  20201.  
  20202.  Format 
  20203.  
  20204.                     #include <pthread.h>
  20205.  
  20206.                     int pthread_mutexattr_create(
  20207.                              pthread_mutexattr_t  *attr);
  20208.  
  20209.  Parameters 
  20210.  
  20211.           attr          Mutex attributes object that is created. 
  20212.  
  20213.  Usage 
  20214.  
  20215.           The pthread_mutexattr_create routine creates a mutex attributes 
  20216.           object used to specify the attributes of mutexes when they are 
  20217.           created.  The mutex attributes object is initialized with the default 
  20218.           value for all of the attributes defined by a given implementation. 
  20219.  
  20220.           When a mutex attributes object is used to create a mutex, the values 
  20221.           of the individual attributes determine the characteristics of the new 
  20222.           object.  Attributes objects act like additional parameters to object 
  20223.           creation.  Changing individual attributes does not affect any objects 
  20224.           that were previously created using the attributes object. Note that 
  20225.           if the pthreads exception handling header file pthread_exc.h is used 
  20226.           instead of pthread.h, then a DCE exception is raised. 
  20227.  
  20228.  Return Codes 
  20229.  
  20230.           The created mutex attributes object is returned to the attr 
  20231.           parameter. 
  20232.  
  20233.           If the routine fails, errno may be set to one of the following 
  20234.           values: 
  20235.  
  20236.           Error         Description 
  20237.  
  20238.           0             Successful completion 
  20239.  
  20240.           -1 [EINVAL]   The value specified by attr is not valid. 
  20241.  
  20242.           -1 [ENOMEM]   Insufficient memory exists to create the mutex 
  20243.                         attributes object. 
  20244.  
  20245.  Related Information 
  20246.  
  20247.           Routines: 
  20248.           pthread_create 
  20249.           pthread_mutexattr_delete 
  20250.           pthread_mutexattr_getkind_np 
  20251.           pthread_mutexattr_setkind_np 
  20252.           pthread_mutex_init 
  20253.  
  20254.  
  20255. ΓòÉΓòÉΓòÉ 4.3.50. pthread_mutexattr_delete ΓòÉΓòÉΓòÉ
  20256.  
  20257.  Purpose 
  20258.  
  20259.           Deletes a mutex attributes object. 
  20260.  
  20261.  Format 
  20262.  
  20263.                     #include <pthread.h>
  20264.  
  20265.                     int pthread_mutexattr_delete(
  20266.                              pthread_mutexattr_t  *attr);
  20267.  
  20268.  Parameters 
  20269.  
  20270.           attr          Mutex attributes object that is deleted. 
  20271.  
  20272.  Usage 
  20273.  
  20274.           The pthread_mutexattr_delete routine deletes a mutex attributes 
  20275.           object.  Call this routine when a mutex attributes object is no 
  20276.           longer referenced by the pthread_mutexattr_create routine. 
  20277.  
  20278.           This routine gives permission to reclaim storage for the mutex 
  20279.           attributes object.  Mutexes that were created using this attributes 
  20280.           object are not affected by the deletion of the mutex attributes 
  20281.           object. 
  20282.  
  20283.           The results of calling this routine are unpredictable if the 
  20284.           attributes object specified in the attr parameter does not exist. 
  20285.           Note that if the pthreads exception handling header file 
  20286.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  20287.           raised. 
  20288.  
  20289.  Return Codes 
  20290.  
  20291.           If the routine fails, errno may be set to one of the following 
  20292.           values: 
  20293.  
  20294.           Error         Description 
  20295.  
  20296.           0             Successful completion 
  20297.  
  20298.           -1 [EINVAL]   The value specified by attr is not valid. 
  20299.  
  20300.  Related Information 
  20301.  
  20302.           Routines: 
  20303.           pthread_mutexattr_create 
  20304.  
  20305.  
  20306. ΓòÉΓòÉΓòÉ 4.3.51. pthread_mutexattr_getkind_np ΓòÉΓòÉΓòÉ
  20307.  
  20308.  Purpose 
  20309.  
  20310.           Obtains the mutex type attribute used when a mutex is created. 
  20311.  
  20312.  Format 
  20313.  
  20314.                     #include <pthread.h>
  20315.  
  20316.                     int pthread_mutexattr_getkind_np(
  20317.                              pthread_mutexattr_t  attr);
  20318.  
  20319.  Parameters 
  20320.  
  20321.           attr          Mutex attributes object whose mutex type is obtained. 
  20322.  
  20323.  Usage 
  20324.  
  20325.           The pthread_mutexattr_getkind_np routine obtains the mutex type 
  20326.           attribute that is used when a mutex is created. See 
  20327.           pthread_mutexattr_setkind_np for information about mutex type 
  20328.           attributes. 
  20329.  
  20330.           This routine is not portable. 
  20331.  
  20332.  Return Codes 
  20333.  
  20334.           If the routine fails, errno may be set to one of the following 
  20335.           values: 
  20336.  
  20337.           Error         Description 
  20338.  
  20339.           Mutex type attribute Successful completion 
  20340.  
  20341.           -1 [EINVAL]   The value specified by attr is not valid. 
  20342.  
  20343.  Related Information 
  20344.  
  20345.           Routines: 
  20346.           pthread_mutexattr_create 
  20347.           pthread_mutexattr_setkind_np 
  20348.           pthread_mutex_init 
  20349.  
  20350.  
  20351. ΓòÉΓòÉΓòÉ 4.3.52. pthread_mutexattr_setkind_np ΓòÉΓòÉΓòÉ
  20352.  
  20353.  Purpose 
  20354.  
  20355.           Specifies the mutex type attribute that is used when a mutex is 
  20356.           created. 
  20357.  
  20358.  Format 
  20359.  
  20360.                     #include <pthread.h>
  20361.  
  20362.                     int pthread_mutexattr_setkind_np(
  20363.                              pthread_mutexattr_t  *attr,
  20364.                              int  kind);
  20365.  
  20366.  Parameters 
  20367.  
  20368.           attr          Mutex attributes object modified. 
  20369.  
  20370.           kind          New value for the mutex type attribute.  The kind 
  20371.                         parameter specifies the type of mutex that is created. 
  20372.                         Valid values are: 
  20373.  
  20374.                           o  MUTEX_FAST_NP (the default) 
  20375.                           o  MUTEX_RECURSIVE_NP 
  20376.                           o  MUTEX_NONRECURSIVE_NP 
  20377.  
  20378.  Usage 
  20379.  
  20380.           This routine sets the mutex type attribute that is used when a mutex 
  20381.           is created. 
  20382.  
  20383.           A fast mutex is locked and unlocked in the fastest manner possible. A 
  20384.           fast mutex can only be locked (obtained) once. All subsequent calls 
  20385.           to pthread_mutex_lock cause the calling thread to block until the 
  20386.           mutex is freed by the thread that owns it.  If the thread that owns 
  20387.           the mutex attempts to lock it again, the thread waits for itself to 
  20388.           release the mutex (causing a deadlock). 
  20389.  
  20390.           A recursive mutex can be locked more than once by the same thread 
  20391.           without causing that thread to deadlock.  In other words, a single 
  20392.           thread can make consecutive calls to pthread_mutex_lock without 
  20393.           blocking.  The thread must then call pthread_mutex_unlock the same 
  20394.           number of times as it called pthread_mutex_lock before another thread 
  20395.           can lock the mutex. 
  20396.  
  20397.           A nonrecursive mutex is locked only once by a thread, like a fast 
  20398.           mutex.  If the thread tries to lock the mutex again without first 
  20399.           unlocking it, the thread receives an error.  Thus, nonrecursive 
  20400.           mutexes are more informative than fast mutexes because fast mutexes 
  20401.           block in such a case, leaving it up to you to determine why the 
  20402.           thread no longer runs.  Also, if someone other than the owner tries 
  20403.           to unlock a nonrecursive mutex, an error is returned. 
  20404.  
  20405.           Never use a recursive mutex with condition variables because the 
  20406.           implicit unlock performed for a pthread_cond_wait or 
  20407.           pthread_cond_timedwait might not actually release the mutex. In that 
  20408.           case, no other thread can satisfy the condition of the predicate. 
  20409.  
  20410.           This routine is not portable. Note that if the pthreads exception 
  20411.           handling header file pthread_exc.h is used instead of pthread.h, then 
  20412.           a DCE exception is raised. 
  20413.  
  20414.  Return Codes 
  20415.  
  20416.           If the routine fails, errno may be set to one of the following 
  20417.           values: 
  20418.  
  20419.           Error         Description 
  20420.  
  20421.           0             Successful completion 
  20422.  
  20423.           -1 [EINVAL]   The value specified by attr or kind is not valid. 
  20424.  
  20425.           -1 [EPERM]    The caller does not have the appropriate privileges. 
  20426.  
  20427.           -1 [ERANGE]   One or more parameters supplied have an not valid 
  20428.                         value. 
  20429.  
  20430.  Related Information 
  20431.  
  20432.           Routines: 
  20433.           pthread_mutexattr_create 
  20434.           pthread_mutexattr_getkind_np 
  20435.           pthread_mutex_init 
  20436.  
  20437.  
  20438. ΓòÉΓòÉΓòÉ 4.3.53. pthread_once ΓòÉΓòÉΓòÉ
  20439.  
  20440.  Purpose 
  20441.  
  20442.           Calls an initialization routine run by one thread, a single time. 
  20443.  
  20444.  Format 
  20445.  
  20446.                     #include <pthread.h>
  20447.  
  20448.                     int pthread_once(
  20449.                              pthread_once_t  *once_block,
  20450.                              pthread_initroutine_t  init_routine);
  20451.  
  20452.  Parameters 
  20453.  
  20454.           once_block    Address of a record that defines the one-time 
  20455.                         initialization code. Each one-time initialization 
  20456.                         routine must have its own unique pthread_once_t data 
  20457.                         structure. 
  20458.  
  20459.           init_routine  Address of a procedure that performs the 
  20460.                         initialization. This routine is called only once, 
  20461.                         regardless of the number of times it and its associated 
  20462.                         once_block are passed to pthread_once. 
  20463.  
  20464.  Usage 
  20465.  
  20466.           The pthread_once routine calls an initialization routine run by one 
  20467.           thread, a single time. This routine allows you to create your own 
  20468.           initialization code that is guaranteed to be run only once, even if 
  20469.           called simultaneously by multiple threads or multiple times in the 
  20470.           same thread. 
  20471.  
  20472.           For example, a mutex or a thread-specific data key must be created 
  20473.           exactly once.  Calling pthread_once prevents the code that creates a 
  20474.           mutex or thread-specific data from being called by multiple threads. 
  20475.           Without this routine, the execution must be serialized so that only 
  20476.           one thread performs the initialization.  Other threads that reach the 
  20477.           same point in the code are delayed until the first thread is 
  20478.           finished. 
  20479.  
  20480.           This routine initializes the control record if it has not been 
  20481.           initialized and then determines if the client one-time initialization 
  20482.           routine has run once.  If it has not run, this routine calls the 
  20483.           initialization routine specified in init_routine.  If the client 
  20484.           one-time initialization code has run once, this routine returns. 
  20485.  
  20486.           The pthread_once_t data structure is a record that allows client 
  20487.           initialization operations to guarantee mutual exclusion of access to 
  20488.           the initialization routine, and that each initialization routine is 
  20489.           run exactly once. 
  20490.  
  20491.           The client code must declare a variable of type pthread_once_t to use 
  20492.           the client initialization operations.  This variable must be 
  20493.           initialized using the pthread_once_init macro, as follows: 
  20494.  
  20495.                     static pthread_once_t myOnceBlock = pthread_once_init;
  20496.           Note that if the pthreads exception handling header file 
  20497.           pthread_exc.h is used instead of pthread.h, then a DCE exception is 
  20498.           raised. 
  20499.  
  20500.  Return Codes 
  20501.  
  20502.           If the routine fails, errno may be set to one of the following 
  20503.           values: 
  20504.  
  20505.           Error         Description 
  20506.  
  20507.           -1 [EINVAL]   The value specified by a parameter is not valid. 
  20508.  
  20509.  
  20510. ΓòÉΓòÉΓòÉ 4.3.54. pthread_pseudo_thread_base_end ΓòÉΓòÉΓòÉ
  20511.  
  20512.  Purpose 
  20513.  
  20514.           A macro that ends a pseudo-pthread wrapper, which allows OS/2 threads 
  20515.           to function within a DCE threads environment and use DCE threads 
  20516.           routines. 
  20517.  
  20518.  Format 
  20519.  
  20520.                     #include <pthread.h>
  20521.  
  20522.                     void pthread_pseudo_thread_base_end(  );
  20523.  
  20524.  Usage 
  20525.  
  20526.           The pthread_pseudo_thread_base_end routine allows threads that were 
  20527.           created in an OS/2 environment to use DCE pthread libraries and 
  20528.           routines. This routine must be used with the 
  20529.           pthread_pseudo_thread_base_start routine to bracket code that uses 
  20530.           the DCE pthread environment. These two routines, called a 
  20531.           pseudo-pthread wrapper, are written as macros that are intended 
  20532.           primarily for use in existing OS/2 threads libraries to enable OS/2 
  20533.           threads applications to use DCE routines, which require a thread to 
  20534.           be of pthread type. This wrapper is not intended to be used by the 
  20535.           applications directly; you can write a new application to use pthread 
  20536.           routines directly, without using the wrapper. 
  20537.  
  20538.           The pseudo-pthread wrapper has some limits: 
  20539.  
  20540.             o  You can only put one wrapper in the same routine 
  20541.  
  20542.             o  There must be no returns from the code within the wrapper 
  20543.                because returning from within the code bypasses the 
  20544.                pthread_pseudo_thread_base_end routine. 
  20545.  
  20546.             o  For maximum performance, the pair of macros should only be used 
  20547.                once.  Do not locate them within a loop or other structure that 
  20548.                calls these routines repeatedly. 
  20549.  
  20550.             o  You cannot nest these macros within the same routine. However, 
  20551.                the pseudo-thread wrapper supports recursion; code within the 
  20552.                wrapper can call another routine that also uses the wrapper. 
  20553.  
  20554.           When an OS/2 thread calls the library routine that contains the 
  20555.           pseudo-pthread wrapper, that thread temporarily becomes a DCE pthread 
  20556.           that can use the pthread libraries and routines.  If the thread that 
  20557.           calls the library routine is already a pthread, the wrapper has no 
  20558.           effect. 
  20559.  
  20560.  Examples 
  20561.  
  20562.           The following is an example, in pseudocode, of a library routine with 
  20563.           a pseudo-pthread wrapper: 
  20564.  
  20565.                     #include <pthread.h>
  20566.  
  20567.                     user_written_library_function
  20568.                     {
  20569.                         pthread_pseudo_thread_base_start( );
  20570.                      .
  20571.                      .
  20572.                      .
  20573.                             /*
  20574.                                 existing code using the DCE pthread library
  20575.                             */
  20576.                      .
  20577.                      .
  20578.                      .
  20579.                         pthread_pseudo_thread_base_end( );
  20580.                     }
  20581.  
  20582.  Related Information 
  20583.  
  20584.           Routines: 
  20585.           pthread_pseudo_thread_base_start 
  20586.  
  20587.  
  20588. ΓòÉΓòÉΓòÉ 4.3.55. pthread_pseudo_thread_base_start ΓòÉΓòÉΓòÉ
  20589.  
  20590.  Purpose 
  20591.  
  20592.           A macro that starts a pseudo-pthread wrapper that allows OS/2 threads 
  20593.           to function within a DCE threads environment and use DCE pthread 
  20594.           routines. 
  20595.  
  20596.  Format 
  20597.  
  20598.                     #include <pthread.h>
  20599.  
  20600.                     void pthread_pseudo_thread_base_start(  );
  20601.  
  20602.  Usage 
  20603.  
  20604.           The pthread_pseudo_thread_base_start routine allows threads that were 
  20605.           created in an OS/2 environment to use DCE pthread libraries and 
  20606.           routines. This routine must be used with the 
  20607.           pthread_pseudo_thread_base_end routine to bracket code that uses the 
  20608.           DCE pthread environment. These two routines, called a pseudo-pthread 
  20609.           wrapper, are written as macros that are intended primarily for use in 
  20610.           existing OS/2 threads libraries to enable OS/2 threads applications 
  20611.           to use DCE routines, which require a thread to be of pthread type. 
  20612.           This wrapper is not intended to be used by the applications directly; 
  20613.           you can write a new application to use pthread routines directly, 
  20614.           without using the wrapper. 
  20615.  
  20616.           The pseudo-pthread wrapper has some limits: 
  20617.  
  20618.             o  You can only put one wrapper in the same routine 
  20619.  
  20620.             o  There must be no returns from the code within the wrapper 
  20621.                because returning from within the code bypasses the 
  20622.                pthread_pseudo_thread_base_end routine. 
  20623.  
  20624.             o  For maximum performance, the pair of macros should only be used 
  20625.                once.  Do not locate them within a loop or other structure that 
  20626.                calls these routines repeatedly. 
  20627.  
  20628.             o  You cannot nest these macros within the same routine. However, 
  20629.                the pseudo-thread wrapper supports recursion; code within the 
  20630.                wrapper can call another routine that also uses the wrapper. 
  20631.  
  20632.           When an OS/2 thread calls the library routine that contains the 
  20633.           pseudo-pthread wrapper, that thread temporarily becomes a DCE pthread 
  20634.           that can use the pthread libraries and routines.  If the thread that 
  20635.           calls the library routine is already a pthread, the wrapper has no 
  20636.           effect. 
  20637.  
  20638.  Examples 
  20639.  
  20640.           The following is an example, in pseudocode, of a library routine with 
  20641.           a pseudo-pthread wrapper: 
  20642.  
  20643.                     #include <pthread.h>
  20644.  
  20645.                     user_written_library_function
  20646.                     {
  20647.                         pthread_pseudo_thread_base_start( );
  20648.                      .
  20649.                      .
  20650.                      .
  20651.                             /*
  20652.                                 existing code using the DCE pthread library
  20653.                             */
  20654.                      .
  20655.                      .
  20656.                      .
  20657.                         pthread_pseudo_thread_base_end( );
  20658.                     }
  20659.  
  20660.  Related Information 
  20661.  
  20662.           Routines: 
  20663.           pthread_pseudo_thread_base_end 
  20664.  
  20665.  
  20666. ΓòÉΓòÉΓòÉ 4.3.56. pthread_self ΓòÉΓòÉΓòÉ
  20667.  
  20668.  Purpose 
  20669.  
  20670.           Obtains the identifier of the current thread. 
  20671.  
  20672.  Format 
  20673.  
  20674.                     #include <pthread.h>
  20675.  
  20676.                     pthread_t  pthread_self( );
  20677.  
  20678.  Usage 
  20679.  
  20680.           The pthread_self routine allows a thread to obtain its own 
  20681.           identifier. For example, this identifier allows a thread to set its 
  20682.           own priority. 
  20683.  
  20684.           This value becomes meaningless when the thread object is deleted - 
  20685.           that is, when the thread terminates its execution and pthread_detach 
  20686.           is called. 
  20687.  
  20688.  Return Codes 
  20689.  
  20690.           Returns the identifier of the calling thread to pthread_t. 
  20691.  
  20692.  Related Information 
  20693.  
  20694.           Routines: 
  20695.           pthread_create 
  20696.           pthread_setprio 
  20697.           pthread_setscheduler 
  20698.  
  20699.  
  20700. ΓòÉΓòÉΓòÉ 4.3.57. pthread_setasynccancel ΓòÉΓòÉΓòÉ
  20701.  
  20702.  Purpose 
  20703.  
  20704.           Enables or disables the current thread's asynchronous cancelability. 
  20705.  
  20706.  Format 
  20707.  
  20708.                     #include <pthread.h>
  20709.  
  20710.                     int pthread_setasynccancel(
  20711.                              int  state);
  20712.  
  20713.  Parameters 
  20714.  
  20715.           state         State of asynchronous cancelability set for the calling 
  20716.                         thread. On return, this parameter receives the prior 
  20717.                         state of asynchronous cancelability. Valid values are: 
  20718.  
  20719.                              CANCEL_ON     Asynchronous cancelability is 
  20720.                                            enabled. 
  20721.  
  20722.                              CANCEL_OFF    Asynchronous cancelability is 
  20723.                                            disabled. 
  20724.  
  20725.  Usage 
  20726.  
  20727.           The pthread_setasynccancel routine enables or disables the current 
  20728.           thread's asynchronous cancelability and returns the previous 
  20729.           cancelability state to the state parameter. 
  20730.  
  20731.           When general cancelability is set to CANCEL_OFF, a cancel cannot be 
  20732.           delivered to the thread, even if a cancelable routine is called or 
  20733.           asynchronous cancelability is enabled.  When general cancelability is 
  20734.           set to CANCEL_ON, cancelability depends on the state of the thread's 
  20735.           asynchronous cancelability. 
  20736.  
  20737.           When general cancelability is set to CANCEL_ON and asynchronous 
  20738.           cancelability is set to CANCEL_OFF, the thread can only receive a 
  20739.           cancel at specific cancelation points (for example, condition waits, 
  20740.           thread joins, and calls to pthread_testcancel).  If both general 
  20741.           cancelability and asynchronous cancelability are set to CANCEL_ON, 
  20742.           the thread can be canceled at any point in its execution. 
  20743.  
  20744.           When a thread is created, the default asynchronous cancelability 
  20745.           state is CANCEL_OFF. 
  20746.  
  20747.           If you call this routine to enable asynchronous cancels, call it in a 
  20748.           region of code where asynchronous delivery of cancels is disabled by 
  20749.           a previous call to this routine.  Do not call threads routines in 
  20750.           regions of code where asynchronous delivery of cancels is enabled. 
  20751.           The previous state of asynchronous delivery can be restored later by 
  20752.           another call to this routine. 
  20753.  
  20754.  Return Codes 
  20755.  
  20756.           On successful completion, the previous state of asynchronous 
  20757.           cancelability is returned.  If the routine fails, -1 is returned. 
  20758.           Following are the possible return values and the possible 
  20759.           corresponding values (if any) for errno: 
  20760.  
  20761.           Error         Description 
  20762.  
  20763.           CANCEL_ON     Asynchronous cancelability was on. 
  20764.  
  20765.           CANCEL_OFF    Asynchronous cancelability was off. 
  20766.  
  20767.           -1 [EINVAL]   The specified state is not CANCEL_ON or CANCEL_OFF. 
  20768.  
  20769.  Related Information 
  20770.  
  20771.           Routines: 
  20772.           pthread_cancel 
  20773.           pthread_setcancel 
  20774.           pthread_testcancel 
  20775.  
  20776.  
  20777. ΓòÉΓòÉΓòÉ 4.3.58. pthread_setcancel ΓòÉΓòÉΓòÉ
  20778.  
  20779.  Purpose 
  20780.  
  20781.           Enables or disables the general cancelability of the current thread. 
  20782.  
  20783.  Format 
  20784.  
  20785.                     #include <pthread.h>
  20786.  
  20787.                     int pthread_setcancel(
  20788.                              int  state);
  20789.  
  20790.  Parameters 
  20791.  
  20792.           state         State of general cancelability set for the calling 
  20793.                         thread. On return, it receives the prior state of 
  20794.                         general cancelability. Valid values are: 
  20795.  
  20796.                              CANCEL_ON  General cancelability is enabled. 
  20797.  
  20798.                              CANCEL_OFF General cancelability is disabled. 
  20799.  
  20800.  Usage 
  20801.  
  20802.           The pthread_setcancel routine enables or disables the general 
  20803.           cancelability of the current thread and returns the previous 
  20804.           cancelability state to the state parameter. 
  20805.  
  20806.           When general cancelability is set to CANCEL_OFF, a cancel cannot be 
  20807.           delivered to the thread, even if a cancelable routine is called or 
  20808.           asynchronous cancelability is enabled. 
  20809.  
  20810.           When a thread is created, the default general cancelability state is 
  20811.           CANCEL_ON. 
  20812.  
  20813.  Possible Dangers of Disabling Cancelability 
  20814.  
  20815.           The most important use of cancels is to ensure that indefinite wait 
  20816.           operations are terminated.  For example, a thread waiting for some 
  20817.           network connection, which may take days to respond (or may never 
  20818.           respond), is normally made cancelable. 
  20819.  
  20820.           However, when cancelability is disabled, no routine can be canceled. 
  20821.           Waits must be completed normally before a cancel can be delivered. 
  20822.           As a result, the program stops working and the user is unable to 
  20823.           cancel the operation. 
  20824.  
  20825.           When disabling cancelability, be sure that no long waits can occur or 
  20826.           that it is necessary for other reasons to defer cancels around that 
  20827.           particular region of code. 
  20828.  
  20829.  Return Codes 
  20830.  
  20831.           On successful completion, the previous state of general cancelability 
  20832.           is returned.  If the routine fails, -1 is returned.  Following are 
  20833.           the possible return values and the possible corresponding values (if 
  20834.           any) for errno: 
  20835.  
  20836.           Error         Description 
  20837.  
  20838.           CANCEL_ON     General cancelability was on. 
  20839.  
  20840.           CANCEL_OFF    General cancelability was off. 
  20841.  
  20842.           -1 [EINVAL]   The specified state is not CANCEL_ON or CANCEL_OFF. 
  20843.  
  20844.  Related Information 
  20845.  
  20846.           Routines: 
  20847.           pthread_cancel 
  20848.           pthread_setasynccancel 
  20849.           pthread_testcancel 
  20850.  
  20851.  
  20852. ΓòÉΓòÉΓòÉ 4.3.59. pthread_setprio ΓòÉΓòÉΓòÉ
  20853.  
  20854.  Purpose 
  20855.  
  20856.           Changes the current priority of a thread. 
  20857.  
  20858.  Format 
  20859.  
  20860.                     #include <pthread.h>
  20861.  
  20862.                     int pthread_setprio(
  20863.                              pthread_t  thread,
  20864.                              int  priority);
  20865.  
  20866.  Parameters 
  20867.  
  20868.           thread        Thread whose priority is changed. 
  20869.  
  20870.           priority      New priority value of the thread specified in thread. 
  20871.                         The priority value is dependent on scheduling policy. 
  20872.                         Valid values fall within the following range: 
  20873.  
  20874.                              PRI_HRR_MIN <= priority <= PRI_HRR_MAX 
  20875.  
  20876.           If you create a new thread without specifying a thread attributes 
  20877.           object that contains a changed priority attribute, the default 
  20878.           priority of the newly created thread is PRI_HRR_MIN. 
  20879.  
  20880.           When you call this routine to specify a minimum or maximum priority, 
  20881.           use the appropriate symbol - for example, PRI_HRR_MIN or PRI_HRR_MAX. 
  20882.           To specify a value between the minimum and maximum, use an 
  20883.           appropriate arithmetic expression. For example, to set a priority 
  20884.           midway between the minimum and maximum, specify the following concept 
  20885.           using your programming language's syntax: 
  20886.  
  20887.                     pri_hrr_mid = (PRI_HRR_MIN + PRI_HRR_MAX + 1)/2
  20888.  
  20889.           If your expression results in a value outside the range of minimum to 
  20890.           maximum, an error results when you use it. 
  20891.  
  20892.  Usage 
  20893.  
  20894.           The pthread_setprio routine changes the current priority of a thread. 
  20895.           A thread can change its own priority using the identifier returned by 
  20896.           pthread_self. 
  20897.  
  20898.           Changing the priority of a thread can cause it to start running or be 
  20899.           preempted by another thread. The effect of setting different priority 
  20900.           values depends on the scheduling priority assigned to the thread. The 
  20901.           initial scheduling priority is set by calling the 
  20902.           pthread_attr_setprio routine. 
  20903.  
  20904.           Note that pthread_attr_setprio sets the priority attribute that is 
  20905.           used to establish the priority of a new thread when it is created. 
  20906.           However, pthread_setprio changes the priority of an existing thread. 
  20907.  
  20908.           Note:  Setting and changing the priority of a thread can only be done 
  20909.                  from root. 
  20910.  
  20911.  Return Codes 
  20912.  
  20913.           If successful, this routine returns the previous priority. If the 
  20914.           routine fails, errno may be set to one of the following values: 
  20915.  
  20916.           Error         Description 
  20917.  
  20918.           -1 [EINVAL]   The value specified by thread is invalid. 
  20919.  
  20920.           -1 [ESRCH]    The value specified by thread does not refer to an 
  20921.                         existing thread. 
  20922.  
  20923.           -1 [EPERM]    The caller does not have the appropriate privileges to 
  20924.                         set the priority of the specified thread. 
  20925.  
  20926.  Related Information 
  20927.  
  20928.           Routines: 
  20929.           pthread_attr_setprio 
  20930.           pthread_attr_setsched 
  20931.           pthread_create 
  20932.           pthread_self 
  20933.           pthread_setscheduler 
  20934.  
  20935.  
  20936. ΓòÉΓòÉΓòÉ 4.3.60. pthread_setscheduler ΓòÉΓòÉΓòÉ
  20937.  
  20938.  Purpose 
  20939.  
  20940.           Changes the current scheduling policy and priority of a thread. 
  20941.  
  20942.  Format 
  20943.  
  20944.                     #include <pthread.h>
  20945.  
  20946.                     int pthread_setscheduler(
  20947.                              pthread_t  thread,
  20948.                              int  scheduler,
  20949.                              int  priority);
  20950.  
  20951.  Parameters 
  20952.  
  20953.           thread        Thread whose scheduling policy is to be changed. 
  20954.  
  20955.           scheduler     New scheduling policy value for the thread specified in 
  20956.                         thread. Valid values are as follows: 
  20957.  
  20958.                              SCHED_HRR    (Hierarchical Round Robin) Each 
  20959.                                           thread has a priority associated with 
  20960.                                           it.  threads of a higher priority are 
  20961.                                           given access to the CPU before 
  20962.                                           threads of lower priority.  If a 
  20963.                                           thread with a higher priority than 
  20964.                                           the currently running thread becomes 
  20965.                                           ready to run, the current thread is 
  20966.                                           stopped immediately.  Threads of the 
  20967.                                           same priority are given time-slices 
  20968.                                           in a round robin manner. 
  20969.  
  20970.           priority      New priority value of the thread specified in thread. 
  20971.                         The priority attribute is dependent upon scheduling 
  20972.                         policy. Valid values fall within the following range: 
  20973.  
  20974.                              PRI_HRR_MIN <= priority <= PRI_HRR_MAX 
  20975.  
  20976.           If you create a new thread without specifying a thread attributes 
  20977.           object that contains a changed priority attribute, the default 
  20978.           priority of the newly created thread is PRI_HRR_MIN. 
  20979.  
  20980.           When you call this routine to specify a minimum or maximum priority, 
  20981.           use the appropriate symbol, for example, PRI_HRR_MIN or PRI_HRR_MAX. 
  20982.           To specify a value between the minimum and maximum, use an 
  20983.           appropriate arithmetic expression.  For example, to set a priority 
  20984.           mid-way between the minimum and maximum, specify the following 
  20985.           concept using your programming language's syntax: 
  20986.  
  20987.                     pri_hrr_mid = (PRI_HRR_MIN + PRI_HRR_MAX)/2
  20988.  
  20989.           If your expression results in a value outside the range of minimum to 
  20990.           maximum, an error results when you use it. 
  20991.  
  20992.  Usage 
  20993.  
  20994.           The pthread_setscheduler routine changes the current scheduling 
  20995.           policy and priority of a thread. Call this routine to change both the 
  20996.           priority and scheduling policy of a thread at the same time. To 
  20997.           change only the priority, call the pthread_setprio routine. 
  20998.  
  20999.           A thread changes its own scheduling policy and priority by using the 
  21000.           identifier returned by pthread_self. Changing the scheduling policy 
  21001.           or priority, or both, of a thread can cause it to start running or to 
  21002.           be pre-empted by another thread. 
  21003.  
  21004.           This routine is different from pthread_attr_setprio and 
  21005.           pthread_attr_setsched because those routines set the priority and 
  21006.           scheduling policy attributes that are used to establish the priority 
  21007.           and scheduling policy of a new thread when it is created. This 
  21008.           routine, however, changes the priority and scheduling policy of an 
  21009.           existing thread. 
  21010.  
  21011.           Note:  Setting and changing the scheduling policy or priority of a 
  21012.                  thread can only be done from root. 
  21013.  
  21014.  Return Codes 
  21015.  
  21016.           If successful, the previous scheduling policy value is returned. If 
  21017.           the routine fails, errno may be set to one of the following values: 
  21018.  
  21019.           Error         Description 
  21020.  
  21021.           Previous policy Successful completion 
  21022.  
  21023.           -1 [EINVAL]   The value specified by thread is invalid. 
  21024.  
  21025.           -1 [ESRCH]    The value specified by thread does not refer to an 
  21026.                         existing thread. 
  21027.  
  21028.           -1 [EPERM]    The caller does not have the appropriate privileges to 
  21029.                         set the priority of the specified thread. 
  21030.  
  21031.  Related Information 
  21032.  
  21033.           Routines: 
  21034.           pthread_attr_setprio 
  21035.           pthread_attr_setsched 
  21036.           pthread_create 
  21037.           pthread_self 
  21038.           pthread_setprio 
  21039.  
  21040.  
  21041. ΓòÉΓòÉΓòÉ 4.3.61. pthread_setspecific ΓòÉΓòÉΓòÉ
  21042.  
  21043.  Purpose 
  21044.  
  21045.           Sets the thread-specific data associated with the specified key for 
  21046.           the current thread. 
  21047.  
  21048.  Format 
  21049.  
  21050.                     #include <pthread.h>
  21051.  
  21052.                     int pthread_setspecific(
  21053.                              pthread_key_t  key,
  21054.                              pthread_attr_t  value);
  21055.  
  21056.  Parameters 
  21057.  
  21058.           key           Context key value that uniquely identifies the context 
  21059.                         value specified in value.  This key value must have 
  21060.                         been obtained from pthread_keycreate. 
  21061.  
  21062.           value         Address containing data to be associated with the 
  21063.                         specified key for the current thread; this is the 
  21064.                         thread-specific data. 
  21065.  
  21066.  Usage 
  21067.  
  21068.           The pthread_setspecific routine sets the thread-specific data 
  21069.           associated with the specified key for the current thread.  If a value 
  21070.           has already been defined for the key in this thread, the new value is 
  21071.           substituted for it. 
  21072.  
  21073.           Different threads can bind different values to the same key.  These 
  21074.           values are typically pointers to blocks of dynamically allocated 
  21075.           memory that are reserved for use by the calling thread. Note that if 
  21076.           the pthreads exception handling header file pthread_exc.h is used 
  21077.           instead of pthread.h, then a DCE exception is raised. 
  21078.  
  21079.  Return Codes 
  21080.  
  21081.           If the routine fails, -1 is returned and errno may be set to one of 
  21082.           the following values: 
  21083.  
  21084.           Error         Description 
  21085.  
  21086.           0             Successful completion 
  21087.  
  21088.           -1 [EINVAL]   The key value is invalid. 
  21089.  
  21090.  Related Information 
  21091.  
  21092.           Routines: 
  21093.           pthread_getspecific 
  21094.           pthread_keycreate 
  21095.  
  21096.  
  21097. ΓòÉΓòÉΓòÉ 4.3.62. pthread_signal_to_cancel_np ΓòÉΓòÉΓòÉ
  21098.  
  21099.  Purpose 
  21100.  
  21101.           Cancels the specified thread. 
  21102.  
  21103.  Format 
  21104.  
  21105.                     #include <pthread.h>
  21106.  
  21107.                     int pthread_signal_to_cancel_np(
  21108.                              sigset_t  *sigset,
  21109.                              pthread_t  *thread);
  21110.  
  21111.  Parameters 
  21112.  
  21113.           sigset        Signal mask containing a list of signals that, when 
  21114.                         received by the process, cancels the specified thread. 
  21115.  
  21116.           thread        Thread canceled if a valid signal is received by the 
  21117.                         process. 
  21118.  
  21119.  Usage 
  21120.  
  21121.           The pthread_signal_to_cancel_np routine requests that the specified 
  21122.           thread be canceled if one of the signals specified in the signal mask 
  21123.           is received by the process. The set of legal signals is the same as 
  21124.           that for the sigwait service. The sigset parameter is not validated. 
  21125.           If it is invalid, this routine will return successfully but neither 
  21126.           the specified thread nor the previously specified thread will be 
  21127.           canceled if a signal occurs. 
  21128.  
  21129.           Note that the address of the specified thread is saved in a 
  21130.           per-process global variable. Therefore, any subsequent call to this 
  21131.           routine by your application or any library routine supersedes the 
  21132.           thread specified in the previous call, and that thread is not to be 
  21133.           canceled if one of the signals specified for it is delivered to the 
  21134.           process. In other words, be careful when you call this routine; if 
  21135.           another thread calls it after you do, the expected result of this 
  21136.           routine does not occur. 
  21137.  
  21138.  Return Codes 
  21139.  
  21140.           If the routine fails, errno may be set to one of the following 
  21141.           values: 
  21142.  
  21143.           0             Successful completion. 
  21144.  
  21145.           -1 [EINVAL]   The value specified by sigset or thread is invalid. 
  21146.  
  21147.  Related Information 
  21148.  
  21149.           Routines: 
  21150.           pthread_cancel 
  21151.           sigwait 
  21152.  
  21153.  
  21154. ΓòÉΓòÉΓòÉ 4.3.63. pthread_testcancel ΓòÉΓòÉΓòÉ
  21155.  
  21156.  Purpose 
  21157.  
  21158.           Requests delivery of a pending cancel to the current thread. 
  21159.  
  21160.  Format 
  21161.  
  21162.                     #include <pthread.h>
  21163.  
  21164.                     void  pthread_testcancel( );
  21165.  
  21166.  Usage 
  21167.  
  21168.           The pthread_testcancel routine requests delivery of a pending cancel 
  21169.           to the current thread. The cancel is delivered only if a cancel is 
  21170.           pending for the current thread and general cancel delivery is not 
  21171.           currently disabled. (A thread disables delivery of cancels to itself 
  21172.           by calling pthread_setcancel.) 
  21173.  
  21174.           This routine, when called within very long loops, ensures that a 
  21175.           pending cancel is noticed within a reasonable amount of time. 
  21176.  
  21177.  Related Information 
  21178.  
  21179.           Routines: 
  21180.           pthread_cancel 
  21181.           pthread_setasynccancel 
  21182.           pthread_setcancel 
  21183.  
  21184.  
  21185. ΓòÉΓòÉΓòÉ 4.3.64. pthread_unlock_global_np ΓòÉΓòÉΓòÉ
  21186.  
  21187.  Purpose 
  21188.  
  21189.           Unlocks a global mutex. 
  21190.  
  21191.  Format 
  21192.  
  21193.                     #include <pthread.h>
  21194.  
  21195.                     void  pthread_unlock_global_np( );
  21196.  
  21197.  Usage 
  21198.  
  21199.           The pthread_unlock_global_np routine unlocks the global mutex when 
  21200.           each call to pthread_lock_global_np is matched by a call to this 
  21201.           routine. For example, if you called pthread_lock_global_np three 
  21202.           times, pthread_unlock_global_np unlocks the global mutex when you 
  21203.           call it the third time. If no threads are waiting for the global 
  21204.           mutex, it becomes unlocked with no current owner.  If one or more 
  21205.           threads are waiting to lock the global mutex, one thread returns from 
  21206.           its call to pthread_lock_global_np. The scheduling policy is used to 
  21207.           determine which thread acquires the global mutex. For the policy 
  21208.           SCHED_HRR, a blocked thread is chosen in priority order. 
  21209.  
  21210.           The results of calling this routine are unpredictable if the global 
  21211.           mutex is already unlocked.  The results of calling this routine are 
  21212.           also unpredictable if the global mutex is owned by a thread other 
  21213.           than the calling thread. 
  21214.  
  21215.           This routine is not portable. 
  21216.  
  21217.  Related Information 
  21218.  
  21219.           Routines: 
  21220.           pthread_lock_global_np 
  21221.           pthread_mutexattr_setkind_np 
  21222.           pthread_mutex_lock 
  21223.           pthread_mutex_unlock 
  21224.  
  21225.  
  21226. ΓòÉΓòÉΓòÉ 4.3.65. pthread_yield ΓòÉΓòÉΓòÉ
  21227.  
  21228.  Purpose 
  21229.  
  21230.           Notifies the scheduler that the current thread is willing to release 
  21231.           its processor to other threads of the same or higher priority. 
  21232.  
  21233.  Format 
  21234.  
  21235.                     #include <pthread.h>
  21236.  
  21237.                     void  pthread_yield( );
  21238.  
  21239.  Usage 
  21240.  
  21241.           The pthread_yield routine notifies the scheduler that the current 
  21242.           thread is willing to release its processor to other threads of the 
  21243.           same priority. (A thread releases its processor to a thread of a 
  21244.           higher priority without calling this routine.) 
  21245.  
  21246.           If the current thread's scheduling policy (as specified in a call to 
  21247.           pthread_attr_setsched or pthread_setscheduler) is SCHED_HRR, this 
  21248.           routine yields the processor to other threads of the same or a higher 
  21249.           priority. If no threads of the same or higher priority are ready to 
  21250.           run, the thread continues. 
  21251.  
  21252.           This routine allows knowledge of the details of an application to be 
  21253.           used to increase fairness.  It increases fairness of access to the 
  21254.           processor by removing the current thread from the processor.  It also 
  21255.           increases fairness of access to shared resources by removing the 
  21256.           current thread from the processor as soon as it is finished with the 
  21257.           resource. 
  21258.  
  21259.           Use pthread_yield carefully because misuse causes unnecessary context 
  21260.           switching, which increases overhead without increasing fairness. For 
  21261.           example, it is counter-productive for a thread to yield while it has 
  21262.           a needed resource locked. 
  21263.  
  21264.  Related Information 
  21265.  
  21266.           Routines: 
  21267.           pthread_attr_setsched 
  21268.           pthread_setscheduler 
  21269.  
  21270.  
  21271. ΓòÉΓòÉΓòÉ 4.3.66. sigwait ΓòÉΓòÉΓòÉ
  21272.  
  21273.  Purpose 
  21274.  
  21275.           Suspends a calling thread. 
  21276.  
  21277.  Library 
  21278.  
  21279.           Threads Library (libpthreads.a) 
  21280.  
  21281.  Format 
  21282.  
  21283.                     #include <signal.h>
  21284.  
  21285.                     int sigwait(
  21286.                            sigset  *set);
  21287.  
  21288.  Parameters 
  21289.  
  21290.           set           Specifies the set of signals to wait for. 
  21291.  
  21292.  Usage 
  21293.  
  21294.           The sigwait routine suspends the calling thread until at least one of 
  21295.           the signals in the set parameter is in the threads set of pending 
  21296.           signals. When this happens, one of those signals is atomically chosen 
  21297.           and removed from the set of pending signals and that signal number is 
  21298.           returned. 
  21299.  
  21300.           The effect is unspecified if any signals in the set parameter are not 
  21301.           blocked when the sigwait routine is called. 
  21302.  
  21303.           The set parameter is created using the set manipulation routines 
  21304.           sigemptyset, sigfillset, sigaddset, and sigdelset. 
  21305.  
  21306.  Return Codes 
  21307.  
  21308.           Upon successful completion, the signal number of the pending signal 
  21309.           is returned. Otherwise, a value of -1 is returned, and errno is set 
  21310.           to indicate the error. 
  21311.  
  21312.           If the following condition occurs, the sigwait routine sets errno to 
  21313.           the corresponding value: 
  21314.  
  21315.           -1 [EINVAL]   The value specified by set contains an invalid or 
  21316.                         unsupported signal number. 
  21317.  
  21318.  Prerequisite Information 
  21319.  
  21320.           Subroutines Overview in AIX Version 3.2 General Programming Concepts. 
  21321.  
  21322.  
  21323. ΓòÉΓòÉΓòÉ 5. The DCE Remote Procedure Call API ΓòÉΓòÉΓòÉ
  21324.  
  21325. This introduction gives general information about the DCE RPC Application 
  21326. Programming Interface (API) and an overview of the different parts of the DCE 
  21327. RPC API runtime.  The following topics are covered in this introduction: 
  21328.  
  21329.    o  IDL-to-C Mappings 
  21330.    o  Management Commands for Programmers 
  21331.    o  Overview of DCE RPC Runtime Services 
  21332.    o  RPC Environment Variables 
  21333.    o  RPC Data Types and Structures 
  21334.    o  Permissions Required for RPC 
  21335.    o  Frequently Used RPC Routine Parameters 
  21336.    o  RPC Related Information 
  21337.  
  21338.  
  21339. ΓòÉΓòÉΓòÉ 5.1. IDL-to-C Mappings ΓòÉΓòÉΓòÉ
  21340.  
  21341. The Interface Definition Language (IDL) compiler converts an interface 
  21342. definition into output files. The DCE for OS/2 Warp: Administration Command 
  21343. Reference contains a summary of the idl command, which runs the IDL compiler. 
  21344.  
  21345. Additional information about the IDL compiler appears in the following table, 
  21346. which shows the IDL base types and the IDL-to-C mappings. 
  21347.  
  21348. The following table lists the IDL base data type specifiers. Where applicable, 
  21349. the table shows the size of the corresponding transmittable type and the type 
  21350. macro emitted by the IDL compiler for resulting declarations. 
  21351.  
  21352. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  21353. Γöé Table 2. Base Data Type Specifiers                  Γöé
  21354. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21355. Γöé        SPECIFIER        Γöé       Γöé          Γöé
  21356. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ       Γöé   TYPE MACRO   Γöé
  21357. Γöé  (SIGN)  Γöé  (SIZE)  Γöé  (TYPE)  Γöé   SIZE   Γöé  EMITTED BY IDL  Γöé
  21358. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21359. Γöé       Γöé small    Γöé int     Γöé 8 bits   Γöé idl_small_int   Γöé
  21360. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21361. Γöé       Γöé short    Γöé int     Γöé 16 bits   Γöé idl_short_int   Γöé
  21362. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21363. Γöé       Γöé long    Γöé int     Γöé 32 bits   Γöé idl_long_int   Γöé
  21364. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21365. Γöé       Γöé hyper    Γöé int     Γöé 64 bits   Γöé idl_hyper_int   Γöé
  21366. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21367. Γöé  unsigned  Γöé small    Γöé int     Γöé 8 bits   Γöé idl_usmall_int  Γöé
  21368. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21369. Γöé  unsigned  Γöé short    Γöé int     Γöé 16 bits   Γöé idl_ushort_int  Γöé
  21370. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21371. Γöé  unsigned  Γöé long    Γöé int     Γöé 32 bits   Γöé idl_ulong_int   Γöé
  21372. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21373. Γöé  unsigned  Γöé hyper    Γöé int     Γöé 64 bits   Γöé idl_uhyper_int  Γöé
  21374. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21375. Γöé       Γöé       Γöé float    Γöé 32 bits   Γöé idl_short_float  Γöé
  21376. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21377. Γöé       Γöé       Γöé double   Γöé 64 bits   Γöé idl_long_float  Γöé
  21378. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21379. Γöé       Γöé       Γöé char    Γöé 8 bits   Γöé idl_char     Γöé
  21380. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21381. Γöé       Γöé       Γöé boolean   Γöé 8 bits   Γöé idl_boolean    Γöé
  21382. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21383. Γöé       Γöé       Γöé byte    Γöé 8 bits   Γöé idl_byte     Γöé
  21384. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21385. Γöé       Γöé       Γöé void    Γöé ΓöÇΓöÇ     Γöé idl_void_p_t   Γöé
  21386. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  21387. Γöé       Γöé       Γöé handle_t  Γöé ΓöÇΓöÇ     Γöé ΓöÇΓöÇ        Γöé
  21388. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  21389.  
  21390. Note that you can use the idl_ macros in the code you write for an application 
  21391. to ensure that your type declarations are consistent with those in the stubs, 
  21392. even when the application is ported to another platform. The idl_ macros are 
  21393. especially useful when passing constant values to RPC calls. For maximum 
  21394. portability, all constants passed to RPC calls declared in your network 
  21395. interfaces should be cast to the appropriate type because the size of integer 
  21396. constants (like the size of the int data type) is unspecified in the C 
  21397. language. 
  21398.  
  21399. The idl_ macros are defined in dce/idlbase.h, which is included by header files 
  21400. that the IDL compiler generates. 
  21401.  
  21402.  
  21403. ΓòÉΓòÉΓòÉ 5.2. Management Commands for Programmers ΓòÉΓòÉΓòÉ
  21404.  
  21405. In addition to the idl command for programmers, DCE RPC provides two management 
  21406. commands for the RPC control program and the DCE Host daemon, as follows: 
  21407.  
  21408.    o  The rpccp command accesses RPCCP, the RPC control program. This program 
  21409.       provides a set of commands for accessing the RPC Name Service Interface 
  21410.       (NSI) operations. RPCCP also supports the display of the elements of the 
  21411.       local endpoint map and the removal of elements from it. 
  21412.  
  21413.       You can manage the Name Service Interface with RPCCP commands or with DCE 
  21414.       RPC runtime routines. For example, suppose you want to obtain a list of 
  21415.       the members of a group.  You can give the show group command to RPCCP or 
  21416.       you can write an application program that calls the following DCE RPC 
  21417.       runtime routines: 
  21418.  
  21419.            rpc_ns_group_mbr_inq_begin 
  21420.            rpc_ns_group_mbr_inq_next 
  21421.            rpc_ns_group_mbr_inq_done 
  21422.  
  21423.    o  The dced command starts the DCE Host daemon. The daemon maintains the 
  21424.       local endpoint map for RPC servers and looks up endpoints for RPC 
  21425.       clients. 
  21426.  
  21427.  See the DCE for OS/2 Warp: Administration Command Reference for more 
  21428.  information about these two management commands. 
  21429.  
  21430.  
  21431. ΓòÉΓòÉΓòÉ 5.3. Overview of DCE RPC Runtime Services ΓòÉΓòÉΓòÉ
  21432.  
  21433. The RPC runtime services consist of RPC routines that perform a variety of 
  21434. operations. 
  21435.  
  21436. Note:  The RPC API is thread safe and synchronous cancel safe (in the context 
  21437.        of POSIX threads). However, the RPC API is not asynchronous cancel safe. 
  21438.        For more information about threads and their cancellation, see the DCE 
  21439.        for OS/2 Warp: Application Development Guide - Core Components. 
  21440.  
  21441.  The rest of this overview consists of the following items: 
  21442.  
  21443.  RPC Routine Abbreviations An explanation of abbreviations in the names of the 
  21444.                RPC runtime routines 
  21445.  
  21446.  RPC Runtime Routines An alphabetical list of DCE RPC runtime routines. With 
  21447.                each routine name is its description and the type of application 
  21448.                program that most likely calls the routine. 
  21449.  
  21450.  
  21451. ΓòÉΓòÉΓòÉ 5.3.1. RPC Routine Abbreviations ΓòÉΓòÉΓòÉ
  21452.  
  21453. An alphabetical list of abbreviations in the names of the nonstub support 
  21454. routines follows. The list can help you remember the names more easily. For 
  21455. example, consider the routine name rpc_mgmt_ep_elt_inq_begin. Use the next list 
  21456. to expand the name to "RPC management endpoint element inquiry begin," which 
  21457. summarizes the description "Creates an inquiry context for viewing the elements 
  21458. in a local or remote endpoint map." 
  21459.  
  21460.  auth          authentication, authorization 
  21461.  com           communication 
  21462.  cs            character/code set interoperability 
  21463.  dce           distributed computing environment 
  21464.  dflt          default 
  21465.  elt           element 
  21466.  ep            endpoint 
  21467.  exp           expiration 
  21468.  fn            function 
  21469.  id            identifier 
  21470.  idl_es        IDL encoding services 
  21471.  if            interface 
  21472.  inq           inquiry 
  21473.  mbr           member 
  21474.  mgmt          management 
  21475.  ns            name service 
  21476.  protseq       protocol sequence 
  21477.  rgy           DCE character and code set registry 
  21478.  rpc           remote procedure call 
  21479.  stats         statistics. 
  21480.  
  21481.  
  21482. ΓòÉΓòÉΓòÉ 5.3.2. RPC Runtime Routines ΓòÉΓòÉΓòÉ
  21483.  
  21484. The following is an alphabetical list of the RPC routines. With each routine 
  21485. name is its description and the type of application program that most likely 
  21486. calls the routine. 
  21487.  
  21488.  cs_byte_from_netcs            Converts international character data from a 
  21489.                                network code set to a local code set (client, 
  21490.                                server). 
  21491.  
  21492.  cs_byte_local_size            Calculates the necessary buffer size for code 
  21493.                                set conversion from a network code set to a 
  21494.                                local code set (client, server). 
  21495.  
  21496.  cs_byte_net_size              Calculates the necessary buffer size for code 
  21497.                                set conversion from a local code set to a 
  21498.                                network code set (client, server). 
  21499.  
  21500.  cs_byte_to_netcs              Converts international character data from a 
  21501.                                local code set to a network code set (client, 
  21502.                                server). 
  21503.  
  21504.  dce_cs_loc_to_rgy             Maps a local name for a code set to a code set 
  21505.                                value in the code set registry (client, server). 
  21506.  
  21507.  dce_cs_rgy_to_loc             Maps a code set value in the code set registry 
  21508.                                to the local name for a code set (client, 
  21509.                                server). 
  21510.  
  21511.  idl_es_decode_buffer          Returns a buffer decoding handle (client, 
  21512.                                server). 
  21513.  
  21514.  idl_es_decode_incremental     Returns an incremental decoding handle (client, 
  21515.                                server). 
  21516.  
  21517.  idl_es_encode_dyn_buffer      Returns a dynamic buffer encoding handle 
  21518.                                (client, server). 
  21519.  
  21520.  idl_es_encode_fixed_buffer    Returns a fixed buffer encoding handle (client, 
  21521.                                server). 
  21522.  
  21523.  idl_es_encode_incremental     Returns an incremental encoding handle (client, 
  21524.                                server). 
  21525.  
  21526.  idl_es_handle_free            Frees an IDL encoding services handle (client, 
  21527.                                server). 
  21528.  
  21529.  idl_es_inq_attrs              Gets the flags from an IDL encoding services 
  21530.                                handle (client, server). 
  21531.  
  21532.  idl_es_inq_encoding_id        Identifies an application encoding operation 
  21533.                                (client, server). 
  21534.  
  21535.  idl_es_set_attrs              Sets attribute flags in an IDL encoding services 
  21536.                                handle (client, server). 
  21537.  
  21538.  idl_es_set_transfer_syntax    Sets a transfer syntax (client, server). 
  21539.  
  21540.  rpc_binding_copy              Returns a copy of a binding handle (client or 
  21541.                                server). 
  21542.  
  21543.  rpc_binding_free              Releases binding handle resources (client or 
  21544.                                server). 
  21545.  
  21546.  rpc_binding_from_string_binding Returns a binding handle from a string 
  21547.                                representation of a binding handle (client or 
  21548.                                management). 
  21549.  
  21550.  rpc_binding_inq_auth_caller   Returns authentication and authorization 
  21551.                                information from the binding handle for an 
  21552.                                authenticated client (server). 
  21553.  
  21554.  rpc_binding_inq_auth_client   Returns authentication and authorization 
  21555.                                information from the client binding handle for 
  21556.                                an authenticated client (server). 
  21557.  
  21558.  rpc_binding_inq_auth_info     Returns authentication and authorization 
  21559.                                information from a server binding handle 
  21560.                                (client). 
  21561.  
  21562.  rpc_binding_inq_object        Returns the object UUID from a binding handle 
  21563.                                (client or server). 
  21564.  
  21565.  rpc_binding_reset             Resets a server binding handle so the host 
  21566.                                remains specified, but the server instance on 
  21567.                                that host is unspecified (client or management). 
  21568.  
  21569.  rpc_binding_server_from_client Converts a client binding handle to a server 
  21570.                                binding handle (server). 
  21571.  
  21572.  rpc_binding_set_auth_info     Sets authentication and authorization 
  21573.                                information into a server binding handle 
  21574.                                (client). 
  21575.  
  21576.  rpc_binding_set_object        Sets the object UUID value into a server binding 
  21577.                                handle (client). 
  21578.  
  21579.  rpc_binding_to_string_binding Returns a string representation of a binding 
  21580.                                handle (client, server, or management). 
  21581.  
  21582.  rpc_binding_vector_free       Frees the memory used to store a vector and 
  21583.                                binding handles (client or server). 
  21584.  
  21585.  rpc_cs_binding_set_tags       Places code set tags into a server binding 
  21586.                                handle (client). 
  21587.  
  21588.  rpc_cs_char_set_compat_check  Evaluates character set compatibility between a 
  21589.                                client and a server (client). 
  21590.  
  21591.  rpc_cs_eval_with_universal    Evaluates a server's supported character sets 
  21592.                                and code sets during the server binding 
  21593.                                selection process (client). 
  21594.  
  21595.  rpc_cs_eval_without_universal Evaluates a server's supported character sets 
  21596.                                and code sets during the server binding 
  21597.                                selection process (client). 
  21598.  
  21599.  rpc_cs_get_tags               Retrieves code set tags from a binding handle 
  21600.                                (client, server). 
  21601.  
  21602.  rpc_ep_register               Adds to, or replaces, server address information 
  21603.                                in the local endpoint map (server). 
  21604.  
  21605.  rpc_ep_register_no_replace    Adds to server address information in the local 
  21606.                                endpoint map (server). 
  21607.  
  21608.  rpc_ep_resolve_binding        Resolves a partially bound server binding handle 
  21609.                                into a fully bound server binding handle (client 
  21610.                                or management). 
  21611.  
  21612.  rpc_ep_unregister             Removes server address information from the 
  21613.                                local endpoint map (server). 
  21614.  
  21615.  rpc_if_id_vector_free         Frees a vector and the interface identifier 
  21616.                                structures it contains. (client, server, or 
  21617.                                management). 
  21618.  
  21619.  rpc_if_inq_id                 Returns the interface identifier for an 
  21620.                                interface specification (client or server). 
  21621.  
  21622.  rpc_mgmt_ep_elt_inq_begin     Creates an inquiry context for viewing the 
  21623.                                elements in a local or remote endpoint map 
  21624.                                (management). 
  21625.  
  21626.  rpc_mgmt_ep_elt_inq_done      Deletes the inquiry context for viewing the 
  21627.                                elements in a local or remote endpoint map 
  21628.                                (management). 
  21629.  
  21630.  rpc_mgmt_ep_elt_inq_next      Returns one element at a time from a local or 
  21631.                                remote endpoint map (management). 
  21632.  
  21633.  rpc_mgmt_ep_unregister        Removes server address information from a local 
  21634.                                or remote endpoint map (management). 
  21635.  
  21636.  rpc_mgmt_inq_com_timeout      Returns the communication timeout value in a 
  21637.                                binding handle (client). 
  21638.  
  21639.  rpc_mgmt_inq_dflt_protect_level Returns the default protection level for an 
  21640.                                authentication service (client or server). 
  21641.  
  21642.  rpc_mgmt_inq_if_ids           Returns a vector of interface identifiers of 
  21643.                                interfaces a server offers (client, server, or 
  21644.                                management). 
  21645.  
  21646.  rpc_mgmt_inq_server_princ_name Returns a server's principal name (client, 
  21647.                                server, or management). 
  21648.  
  21649.  rpc_mgmt_inq_stats            Returns RPC runtime statistics (client, server, 
  21650.                                or management). 
  21651.  
  21652.  rpc_mgmt_is_server_listening  Tells whether a server is listening for remote 
  21653.                                procedure calls (client, server, or management). 
  21654.  
  21655.  rpc_mgmt_set_authorization_fn Establishes an authorization function for 
  21656.                                processing remote calls to a server's management 
  21657.                                routines (server). 
  21658.  
  21659.  rpc_mgmt_set_call_timeout     Sets the amount of time the RPC runtime is to 
  21660.                                wait for a server to complete (client). 
  21661.  
  21662.  rpc_mgmt_set_cancel_timeout   Sets the lower bound on the time to wait before 
  21663.                                timing out after forwarding a cancel (client). 
  21664.  
  21665.  rpc_mgmt_set_com_timeout      Sets the communication timeout value in a 
  21666.                                binding handle (client). 
  21667.  
  21668.  rpc_mgmt_set_server_stack_size Specifies the stack size for each server thread 
  21669.                                (server). 
  21670.  
  21671.  rpc_mgmt_stats_vector_free    Frees a statistics vector (client, server, or 
  21672.                                management). 
  21673.  
  21674.  rpc_mgmt_stop_server_listening Tells a server to stop listening for remote 
  21675.                                procedure calls (client, server, or management). 
  21676.  
  21677.  rpc_network_inq_protseqs      Returns all protocol sequences supported by both 
  21678.                                the RPC runtime and the operating system (client 
  21679.                                or server). 
  21680.  
  21681.  rpc_network_is_protseq_valid  Tells whether the specified protocol sequence is 
  21682.                                supported by both the RPC runtime and the 
  21683.                                operating system (client or server). 
  21684.  
  21685.  rpc_ns_binding_export         Establishes a name service database entry with 
  21686.                                binding handles or object UUIDs for a server 
  21687.                                (server). 
  21688.  
  21689.  rpc_ns_binding_import_begin   Creates an import context for an interface and 
  21690.                                an object in the name service database (client). 
  21691.  
  21692.  rpc_ns_binding_import_done    Deletes the import context for searching the 
  21693.                                name service database (client). 
  21694.  
  21695.  rpc_ns_binding_import_next    Returns a binding handle of a compatible server 
  21696.                                (if found) from the name service database 
  21697.                                (client). 
  21698.  
  21699.  rpc_ns_binding_inq_entry_name Returns the name of an entry in the name service 
  21700.                                database from which the server binding handle 
  21701.                                came (client). 
  21702.  
  21703.  rpc_ns_binding_lookup_begin   Creates a lookup context for an interface and an 
  21704.                                object in the name service database (client). 
  21705.  
  21706.  rpc_ns_binding_lookup_done    Deletes the lookup context for searching the 
  21707.                                name service database (client). 
  21708.  
  21709.  rpc_ns_binding_lookup_next    Returns a list of binding handles of one or more 
  21710.                                compatible servers (if found) from the name 
  21711.                                service database (client). 
  21712.  
  21713.  rpc_ns_binding_select         Returns a binding handle from a list of 
  21714.                                compatible server binding handles (client). 
  21715.  
  21716.  rpc_ns_binding_unexport       Removes the binding handles for an interface, or 
  21717.                                object UUIDs, from an entry in the name service 
  21718.                                database (server). 
  21719.  
  21720.  rpc_ns_entry_expand_name      Expands the name of a name service entry 
  21721.                                (client, server, or management). 
  21722.  
  21723.  rpc_ns_entry_inq_resolution   Resolves the cell namespace components of a name 
  21724.                                and returns partial results (client, server). 
  21725.  
  21726.  rpc_ns_entry_object_inq_begin Creates an inquiry context for viewing the 
  21727.                                objects of an entry in the name service database 
  21728.                                (client, server, or management). 
  21729.  
  21730.  rpc_ns_entry_object_inq_done  Deletes the inquiry context for viewing the 
  21731.                                objects of an entry in the name service database 
  21732.                                (client, server, or management). 
  21733.  
  21734.  rpc_ns_entry_object_inq_next  Returns one object at a time from an entry in 
  21735.                                the name service database (client, server, or 
  21736.                                management). 
  21737.  
  21738.  rpc_ns_group_delete           Deletes a group attribute (client, server, or 
  21739.                                management). 
  21740.  
  21741.  rpc_ns_group_mbr_add          Adds an entry name to a group; if necessary, 
  21742.                                creates the entry (client, server, or 
  21743.                                management). 
  21744.  
  21745.  rpc_ns_group_mbr_inq_begin    Creates an inquiry context for viewing group 
  21746.                                members (client, server, or management). 
  21747.  
  21748.  rpc_ns_group_mbr_inq_done     Deletes the inquiry context for a group (client, 
  21749.                                server, or management). 
  21750.  
  21751.  rpc_ns_group_mbr_inq_next     Returns one member name at a time from a group 
  21752.                                (client, server, or management). 
  21753.  
  21754.  rpc_ns_group_mbr_remove       Removes an entry name from a group (client, 
  21755.                                server, or management). 
  21756.  
  21757.  rpc_ns_import_ctx_add_eval     Adds an evaluation routine to an import context 
  21758.                                (client). 
  21759.  
  21760.  rpc_ns_mgmt_binding_unexport  Removes multiple binding handles, or object 
  21761.                                UUIDs, from an entry in the name service 
  21762.                                database (management). 
  21763.  
  21764.  rpc_ns_mgmt_entry_create      Creates an entry in the name service database 
  21765.                                (management). 
  21766.  
  21767.  rpc_ns_mgmt_entry_delete      Deletes an entry from the name service database 
  21768.                                (management). 
  21769.  
  21770.  rpc_ns_mgmt_entry_inq_if_ids  Returns the list of interfaces exported to an 
  21771.                                entry in the name service database (client, 
  21772.                                server, or management). 
  21773.  
  21774.  rpc_ns_mgmt_free_codesets     Frees a code sets array that has been allocated 
  21775.                                by the RPC runtime (client, server). 
  21776.  
  21777.  rpc_ns_mgmt_handle_set_exp_age Sets a handle's expiration age for local copies 
  21778.                                of name service data (client, server, or 
  21779.                                management). 
  21780.  
  21781.  rpc_ns_mgmt_inq_exp_age       Returns the application's global expiration age 
  21782.                                for local copies of name service data (client, 
  21783.                                server, or management). 
  21784.  
  21785.  rpc_ns_mgmt_read_codesets     Reads the code sets attribute associated with an 
  21786.                                RPC server entry in the name service database 
  21787.                                (client). 
  21788.  
  21789.  rpc_ns_mgmt_remove_attribute  Removes an attribute from an RPC server entry in 
  21790.                                the name service database (server or 
  21791.                                management). 
  21792.  
  21793.  rpc_ns_mgmt_set_attribute     Adds an attribute to an RPC server entry in the 
  21794.                                name service database (server or management). 
  21795.  
  21796.  rpc_ns_mgmt_set_exp_age       Modifies the application's global expiration age 
  21797.                                for local copies of name service data (client, 
  21798.                                server, or management). 
  21799.  
  21800.  rpc_ns_profile_delete         Deletes a profile attribute (client, server, or 
  21801.                                management). 
  21802.  
  21803.  rpc_ns_profile_elt_add        Adds an element to a profile. If necessary, 
  21804.                                creates the entry (client, server, or 
  21805.                                management). 
  21806.  
  21807.  rpc_ns_profile_elt_inq_begin  Creates an inquiry context for viewing the 
  21808.                                elements in a profile (client, server, or 
  21809.                                management). 
  21810.  
  21811.  rpc_ns_profile_elt_inq_done   Deletes the inquiry context for a profile 
  21812.                                (client, server, or management). 
  21813.  
  21814.  rpc_ns_profile_elt_inq_next   Returns one element at a time from a profile 
  21815.                                (client, server, or management). 
  21816.  
  21817.  rpc_ns_profile_elt_remove     Removes an element from a profile (client, 
  21818.                                server, or management). 
  21819.  
  21820.  rpc_object_inq_type           Returns the type of an object (server). 
  21821.  
  21822.  rpc_object_set_inq_fn         Registers an object inquiry function (server). 
  21823.  
  21824.  rpc_object_set_type           Assigns the type of an object (server). 
  21825.  
  21826.  rpc_protseq_vector_free       Frees the memory used by a vector and its 
  21827.                                protocol sequences (client or server). 
  21828.  
  21829.  rpc_rgy_get_codesets          Gets supported code sets information from the 
  21830.                                local host (client, server). 
  21831.  
  21832.  rpc_rgy_get_max_bytes         Gets the maximum number of bytes that a code set 
  21833.                                uses to encode one character from the code set 
  21834.                                registry on a host (client, server). 
  21835.  
  21836.  rpc_server_inq_bindings       Returns binding handles for communication with a 
  21837.                                server (server). 
  21838.  
  21839.  rpc_server_inq_if             Returns the manager entry point vector 
  21840.                                registered for an interface (server). 
  21841.  
  21842.  rpc_server_listen             Tells the RPC runtime to listen for remote 
  21843.                                procedure calls (server). 
  21844.  
  21845.  rpc_server_register_auth_info Registers authentication information with the 
  21846.                                RPC runtime (server). 
  21847.  
  21848.  rpc_server_register_if        Registers an interface with the RPC runtime 
  21849.                                (server). 
  21850.  
  21851.  rpc_server_unregister_if      Unregisters an interface from the RPC runtime 
  21852.                                (server). 
  21853.  
  21854.  rpc_server_use_all_protseqs   Tells the RPC runtime to use all supported 
  21855.                                protocol sequences for receiving remote 
  21856.                                procedure calls (server). 
  21857.  
  21858.  rpc_server_use_all_protseqs_if Tells the RPC runtime to use all the protocol 
  21859.                                sequences and endpoints specified in the 
  21860.                                interface specification for receiving remote 
  21861.                                procedure calls (server). 
  21862.  
  21863.  rpc_server_use_protseq        Tells the RPC runtime to use the specified 
  21864.                                protocol sequence for receiving remote procedure 
  21865.                                calls (server). 
  21866.  
  21867.  rpc_server_use_protseq_ep     Tells the RPC runtime to use the specified 
  21868.                                protocol sequence combined with the specified 
  21869.                                endpoint for receiving remote procedure calls 
  21870.                                (server). 
  21871.  
  21872.  rpc_server_use_protseq_if     Tells the RPC runtime to use the specified 
  21873.                                protocol sequence combined with the endpoints in 
  21874.                                the interface specification for receiving remote 
  21875.                                procedure calls (server). 
  21876.  
  21877.  rpc_sm_allocate               Allocates memory within the RPC stub memory 
  21878.                                management scheme (usually server, possibly 
  21879.                                client) 
  21880.  
  21881.  rpc_sm_client_free            Frees memory returned from a client stub 
  21882.                                (usually server, possibly client) 
  21883.  
  21884.  rpc_sm_destroy_client_context Reclaims the client memory resources for the 
  21885.                                context handle, and sets the context handle to 
  21886.                                NULL (client). 
  21887.  
  21888.  rpc_sm_disable_allocate       Releases resources and allocated memory 
  21889.                                (client). 
  21890.  
  21891.  rpc_sm_enable_allocate        Enables the allocation of memory by the 
  21892.                                rpc_sm_allocate  routine when not in manager 
  21893.                                code (client). 
  21894.  
  21895.  rpc_sm_free                   Frees memory allocated by the rpc_sm_allocate 
  21896.                                routine (usually server, possibly client). 
  21897.  
  21898.  rpc_sm_get_thread_handle      Gets a thread handle for the manager code before 
  21899.                                it spawns additional threads, or for the client 
  21900.                                code when it becomes a server (usually server, 
  21901.                                possibly client). 
  21902.  
  21903.  rpc_sm_set_client_alloc_free  Sets the memory allocation and freeing mechanism 
  21904.                                used by the client stubs. This overrides the 
  21905.                                default routines that the client stub uses to 
  21906.                                manage memory for pointed-to nodes (client). 
  21907.  
  21908.  rpc_sm_set_thread_handle      Sets the thread handle for either a newly 
  21909.                                created spawned thread or for a server that was 
  21910.                                formerly a client and is ready to be a client 
  21911.                                again (usually server, possibly client). 
  21912.  
  21913.  rpc_sm_swap_client_alloc_free Exchanges the current memory allocation and 
  21914.                                freeing mechanism used by the client stubs with 
  21915.                                one supplied by the client (client). 
  21916.  
  21917.  rpc_ss_allocate               Allocates memory within the RPC stub memory 
  21918.                                management scheme (usually server, possibly 
  21919.                                client). 
  21920.  
  21921.  rpc_ss_bind_authn_client      Authenticates a client's identity to a server 
  21922.                                from a client stub. 
  21923.  
  21924.  rpc_ss_client_free            Frees memory returned from a client stub 
  21925.                                (usually server, possibly client). 
  21926.  
  21927.  rpc_ss_destroy_client_context Reclaims the client memory resources for the 
  21928.                                context handle, and sets the context handle to 
  21929.                                NULL (client). 
  21930.  
  21931.  rpc_ss_disable_allocate       Releases resources and allocated memory 
  21932.                                (client). 
  21933.  
  21934.  rpc_ss_enable_allocate        Enables the allocation of memory by the 
  21935.                                rpc_ss_allocate  routine when not in manager 
  21936.                                code (client). 
  21937.  
  21938.  rpc_ss_free                   Frees memory allocated by the rpc_ss_allocate 
  21939.                                routine (usually server, possibly client). 
  21940.  
  21941.  rpc_ss_get_thread_handle      Gets a thread handle for the manager code before 
  21942.                                it spawns additional threads, or for the client 
  21943.                                code when it becomes a server (usually server, 
  21944.                                possibly client). 
  21945.  
  21946.  rpc_ss_set_client_alloc_free  Sets the memory allocation and freeing mechanism 
  21947.                                used by the client stubs.  This overrides the 
  21948.                                default routines that the client stub uses to 
  21949.                                manage memory for pointed-to nodes (client). 
  21950.  
  21951.  rpc_ss_set_thread_handle      Sets the thread handle for either a newly 
  21952.                                created spawned thread or for a server that was 
  21953.                                formerly a client and is ready to be a client 
  21954.                                again (usually server, possibly client). 
  21955.  
  21956.  rpc_ss_swap_client_alloc_free Exchanges the current memory allocation and 
  21957.                                freeing mechanism used by the client stubs with 
  21958.                                one supplied by the client (client). 
  21959.  
  21960.  rpc_string_binding_compose    Combines the components of a string binding into 
  21961.                                a string binding (client or server). 
  21962.  
  21963.  rpc_string_binding_parse      Returns, as separate strings, the components of 
  21964.                                a string binding (client or server). 
  21965.  
  21966.  rpc_string_free               Frees a character string allocated by the 
  21967.                                runtime (client, server, or management). 
  21968.  
  21969.  rpc_tower_to_binding          Returns a binding handle from a tower 
  21970.                                representation. 
  21971.  
  21972.  rpc_tower_vector_free         Releases memory associated with a tower vector. 
  21973.  
  21974.  rpc_tower_vector_from_binding Creates a tower vector from a binding handle. 
  21975.  
  21976.  uuid_compare                  Compares two UUIDs and determines their order 
  21977.                                (client, server, or management). 
  21978.  
  21979.  uuid_create                   Creates a new UUID (client, server, or 
  21980.                                management). 
  21981.  
  21982.  uuid_create_nil               Creates a nil UUID (client, server, or 
  21983.                                management). 
  21984.  
  21985.  uuid_equal                    Determines if two UUIDs are equal (client, 
  21986.                                server, or management). 
  21987.  
  21988.  uuid_from_string              Converts a string UUID to its binary 
  21989.                                representation (client, server, or management). 
  21990.  
  21991.  uuid_hash                     Creates a hash value for a UUID (client, server, 
  21992.                                or management). 
  21993.  
  21994.  uuid_is_nil                   Determines if a UUID is nil (client, server, or 
  21995.                                management). 
  21996.  
  21997.  uuid_to_string                Converts a UUID from a binary representation to 
  21998.                                a string representation (client, server, or 
  21999.                                management). 
  22000.  
  22001.  
  22002. ΓòÉΓòÉΓòÉ 5.4. RPC Environment Variables ΓòÉΓòÉΓòÉ
  22003.  
  22004. The RPC name service interface (NSI) routines use the following environment 
  22005. variables: 
  22006.  
  22007.  RPC_DEFAULT_ENTRY Designates the default entry in the name service database 
  22008.                that the import and lookup routines use as the starting point to 
  22009.                search for binding information for a compatible server. 
  22010.                Normally, the starting entry is a profile. 
  22011.  
  22012.                An application that uses a default entry name must define this 
  22013.                environment variable. The RPC runtime does not provide a 
  22014.                default. 
  22015.  
  22016.                For example, suppose that a client application needs to search 
  22017.                the name service database for a server binding handle. The 
  22018.                application can use the rpc_ns_binding_import_begin routine as 
  22019.                part of the search. If so, the application must specify, to the 
  22020.                routine's entry_name parameter, the name of the entry in the 
  22021.                name service database at which to begin the search. If the 
  22022.                search is to begin at the entry that the RPC_DEFAULT_ENTRY 
  22023.                environment variable specifies, then the application must 
  22024.                specify the value NULL to parameter entry_name in routine 
  22025.                rpc_ns_binding_import_begin. 
  22026.  
  22027.  RPC_DEFAULT_ENTRY_SYNTAX Specifies the syntax for the name provided in the 
  22028.                RPC_DEFAULT_ENTRY environment variable. In addition, it provides 
  22029.                syntax for those RPC NSI routines that allow a default value for 
  22030.                the name syntax parameter. 
  22031.  
  22032.                If the RPC_DEFAULT_ENTRY_SYNTAX environment variable is not 
  22033.                defined, the RPC runtime uses the rpc_c_ns_syntax_dce name 
  22034.                syntax. 
  22035.  
  22036.                For the valid name syntaxes and syntax values, see name_syntax 
  22037.                in Frequently Used RPC Routine Parameters. 
  22038.  
  22039.                Each application may define either or both of the previous 
  22040.                environment variables. The application can change the value of 
  22041.                either one, or both, at any time during runtime. 
  22042.  
  22043.  RPC_UNSUPPORTED_NETADDRS Controls how a server registers itself in the CDS 
  22044.                database and endpoint map by masking out one or more networks 
  22045.                through TCP/IP addresses. 
  22046.  
  22047.                This is useful in a machine that has multiple network adapters 
  22048.                where the DCE traffic should be excluded from some of the 
  22049.                networks. For example, consider a server machine that has one 
  22050.                FDDI network connection for normal day-to-day traffic and is 
  22051.                also connected to two ethernet networks that are used only for 
  22052.                X-station traffic. If a DCE server is started on this machine, 
  22053.                it will register all three addresses in the CDS namespace and 
  22054.                also in the dced endpoint map. This means that all machines on 
  22055.                the FDDI network that want to communicate with this server have 
  22056.                to have valid routing interfaces to the ethernet networks 
  22057.                because when querying CDS for an address to the server, CDS 
  22058.                could return one of the ethernet addresses to a machine that is 
  22059.                only on the FDDI ring. 
  22060.  
  22061.                Suppose the machine described above has the following 
  22062.                interfaces: 
  22063.  
  22064.                     Interface     Address 
  22065.                     en0           125.46.78.91 
  22066.                     en1           125.46.125.91 
  22067.                     fi0           9.25.47.91 
  22068.  
  22069.                The following example uses the RPC_UNSUPPORTED_NETADDRS 
  22070.                environment variable to eliminate both ethernet networks by 
  22071.                address: 
  22072.  
  22073.                               RPC_UNSUPPORTED_NETADDRS=125.46.78.91:125.46.125.91
  22074.  
  22075.  RPC_UNSUPPORTED_NETIFS Controls how a server registers itself in the CDS 
  22076.                database and endpoint map by masking out one or more networks 
  22077.                through TCP/IP interfaces. 
  22078.  
  22079.                The following example uses the RPC_UNSUPPORTED_NETIFS 
  22080.                environment variable to eliminate both ethernet networks by 
  22081.                interface: 
  22082.  
  22083.                               RPC_UNSUPPORTED_NETIFS=en0:en1
  22084.  
  22085.                It is probably better to mask out the networks by address 
  22086.                instead of by interface because in some instances the addresses 
  22087.                assigned to a specific interface could be changed while the 
  22088.                machine is running. 
  22089.  
  22090.  
  22091. ΓòÉΓòÉΓòÉ 5.5. RPC Data Types and Structures ΓòÉΓòÉΓòÉ
  22092.  
  22093. This section contains the data types and structures used by client, server, and 
  22094. management application programs. 
  22095.  
  22096. Much of the information in this section is derived from the DCE for OS/2 
  22097. Warp:Application Development Guide - Core Components. You might want to refer 
  22098. to this book as you read this section. For example, this section contains a 
  22099. brief description of a binding handle. The RPC chapters of the DCE for OS/2 
  22100. Warp:Application Development Guide - Core Components explains binding handles 
  22101. in detail. It also explains concepts related to binding handles, such as 
  22102. binding information and string bindings. 
  22103.  
  22104. The following are the data types used in the RPC interface: 
  22105.  
  22106.       Binding Handle 
  22107.       Binding Vector 
  22108.       Boolean 
  22109.       Code Set 
  22110.       Code Sets Array 
  22111.       Conversion Type 
  22112.       Endpoint Map Inquiry Handle 
  22113.       Global Name 
  22114.       IDL Encoding Service Handle 
  22115.       Interface Handle and Specification 
  22116.       Interface Identifier 
  22117.       Interface Identifier Vector 
  22118.       Manager Entry Point Vector 
  22119.       Name Service Handle 
  22120.       Protocol Sequence 
  22121.       Protocol Sequence Vector 
  22122.       Statistics Vector 
  22123.       String Binding 
  22124.       String UUID 
  22125.       Unsigned Character String 
  22126.       UUID Vector 
  22127.  
  22128.  
  22129. ΓòÉΓòÉΓòÉ 5.5.1. Binding Handle ΓòÉΓòÉΓòÉ
  22130.  
  22131. A binding handle is a pointer-size opaque variable containing information the 
  22132. RPC runtime uses to manage binding information. The RPC runtime uses binding 
  22133. information to establish a client-server relationship that allows the running 
  22134. of remote procedure calls. 
  22135.  
  22136. Based on the context where it is created, a binding handle is considered a 
  22137. server binding handle or a client binding handle. 
  22138.  
  22139. A server binding handle is a reference to the binding information necessary for 
  22140. a client to establish a relationship with a specific server. Many RPC API 
  22141. runtime routines return a server binding handle that you can use to make a 
  22142. remote procedure call. 
  22143.  
  22144. A server binding handle refers to several components of binding information. 
  22145. One is the network address of a server's host system. Each server instance has 
  22146. one or more transport addresses (endpoints). A well-known endpoint is a stable 
  22147. address on the host, while a dynamic endpoint is an address that the RPC 
  22148. runtime requests for the server. Some transport protocols provide fewer 
  22149. well-known endpoints than dynamic endpoints. 
  22150.  
  22151. If binding information contains an endpoint, the corresponding binding handle 
  22152. is a fully bound binding handle. If the information lacks an endpoint, the 
  22153. binding handle is a partially bound binding handle. 
  22154.  
  22155. The RPC runtime creates and provides a client binding handle to a called remote 
  22156. procedure as a handle_t parameter.  The client binding handle contains 
  22157. information about the calling client. A client binding handle cannot be used to 
  22158. make a remote procedure call. A server uses the client binding handle. The 
  22159. rpc_binding_server_from_client routine converts a client binding handle to a 
  22160. server binding handle. You can use the resulting server binding handle to make 
  22161. a remote procedure call. 
  22162.  
  22163. For an explanation of making a remote procedure call with a partially bound 
  22164. binding handle, see the DCE for OS/2 Warp: Application Development Guide - Core 
  22165. Components. 
  22166.  
  22167. Binding information can contain an object UUID. The default object UUID 
  22168. associated with a binding handle is a nil UUID. Clients can obtain a non-nil 
  22169. UUID in various ways, such as from a string representation of binding 
  22170. information (a string binding), or by importing it. 
  22171.  
  22172. Client and Server Binding Handles contains RPC runtime routines that operate on 
  22173. binding handles. The table also specifies the type of binding handle, client or 
  22174. server, allowed. 
  22175.  
  22176. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  22177. Γöé Table 3. Client and Server Binding Handles              Γöé
  22178. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22179. Γöé ROUTINE              Γöé INPUT PARAMETER Γöé OUTPUT     Γöé
  22180. Γöé                  Γöé         Γöé PARAMETER    Γöé
  22181. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22182. Γöé rpc_binding_copy          Γöé server      Γöé server     Γöé
  22183. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22184. Γöé rpc_binding_free          Γöé server      Γöé none      Γöé
  22185. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22186. Γöé rpc_binding_from_string_binding  Γöé none       Γöé server     Γöé
  22187. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22188. Γöé rpc_binding_inq_auth_caller    Γöé client      Γöé none      Γöé
  22189. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22190. Γöé rpc_binding_inq_auth_client    Γöé client      Γöé none      Γöé
  22191. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22192. Γöé rpc_binding_inq_auth_info     Γöé server      Γöé none      Γöé
  22193. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22194. Γöé rpc_binding_inq_object       Γöé server or    Γöé none      Γöé
  22195. Γöé                  Γöé client      Γöé         Γöé
  22196. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22197. Γöé rpc_binding_reset         Γöé server      Γöé none      Γöé
  22198. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22199. Γöé rpc_binding_server_from_client   Γöé client      Γöé server     Γöé
  22200. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22201. Γöé rpc_binding_set_auth_info     Γöé server      Γöé none      Γöé
  22202. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22203. Γöé rpc_binding_set_object       Γöé server      Γöé none      Γöé
  22204. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22205. Γöé rpc_binding_to_string_binding   Γöé server or    Γöé none      Γöé
  22206. Γöé                  Γöé client      Γöé         Γöé
  22207. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22208. Γöé rpc_binding_vector_free      Γöé server      Γöé none      Γöé
  22209. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22210. Γöé rpc_ns_binding_export       Γöé server      Γöé none      Γöé
  22211. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22212. Γöé rpc_ns_binding_import_next     Γöé none       Γöé server     Γöé
  22213. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22214. Γöé rpc_ns_binding_inq_entry_name   Γöé server      Γöé none      Γöé
  22215. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22216. Γöé rpc_ns_binding_lookup_next     Γöé none       Γöé server     Γöé
  22217. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22218. Γöé rpc_ns_binding_select       Γöé server      Γöé server     Γöé
  22219. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  22220. Γöé rpc_server_inq_bindings      Γöé none       Γöé server     Γöé
  22221. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  22222.  
  22223. If the input argument type is only a client or only a server, the routines 
  22224. return the status code rpc_s_wrong_kind_of_binding when an application provides 
  22225. the incorrect binding handle type. 
  22226.  
  22227. An application can share a single binding handle across multiple threads of 
  22228. execution.  The RPC runtime, instead of the application, manages binding handle 
  22229. concurrency control across concurrent remote procedure calls that use a single 
  22230. binding handle.  However, the client application has responsibility for binding 
  22231. handle concurrency control for operations that read or modify a binding handle. 
  22232. The related routines are as follows: 
  22233.  
  22234.       rpc_binding_free 
  22235.       rpc_binding_reset 
  22236.       rpc_binding_set_auth_info 
  22237.       rpc_binding_set_object 
  22238.       rpc_ep_resolve_binding 
  22239.       rpc_mgmt_set_com_timeout. 
  22240.  
  22241.  For example, suppose an application shares a binding handle across two threads 
  22242.  of execution and it resets the binding handle endpoint in one of the threads 
  22243.  (by calling the rpc_binding_reset routine). The binding handle in the other 
  22244.  thread is then also reset. Similarly, freeing the binding handle in one thread 
  22245.  (by calling the rpc_binding_free routine) also frees the binding handle in the 
  22246.  other thread. 
  22247.  
  22248.  If you do not want this effect, your application can create a copy of a 
  22249.  binding handle by calling the rpc_binding_copy routine. An operation on one 
  22250.  binding handle then has no effect on the second binding handle. 
  22251.  
  22252.  Clients and servers can access and set object UUIDs using the 
  22253.  rpc_binding_inq_object and rpc_binding_set_object routines. 
  22254.  
  22255.  Routines requiring a binding handle as an parameter show a data type of 
  22256.  rpc_binding_handle_t. Binding handle parameters are passed by value. 
  22257.  
  22258.  
  22259. ΓòÉΓòÉΓòÉ 5.5.2. Binding Vector ΓòÉΓòÉΓòÉ
  22260.  
  22261. The binding vector data structure contains a list of binding handles over which 
  22262. a server application can receive remote procedure calls. 
  22263.  
  22264. The binding vector contains a count member count, followed by an array of 
  22265. binding handle binding_h elements. 
  22266.  
  22267. The C language representation of a binding vector is as follows: 
  22268.  
  22269. typedef struct {
  22270.                unsigned32  count;
  22271.                rpc_binding_handle_t  binding_h[1];
  22272.                } rpc_binding_vector_t;
  22273.  
  22274. The RPC runtime creates binding handles when a server application registers 
  22275. protocol sequences. To obtain a binding vector, a server application calls the 
  22276. rpc_server_inq_bindings routine. 
  22277.  
  22278. A client application obtains a binding vector of compatible servers from the 
  22279. name service database by calling the rpc_ns_binding_lookup_next routine. 
  22280.  
  22281. In both routines, the RPC runtime allocates memory for the binding vector.  An 
  22282. application calls the rpc_binding_vector_free routine to free the binding 
  22283. vector. 
  22284.  
  22285. To remove an individual binding handle from the vector, set its value in the 
  22286. vector to NULL. When this is done, the application must free the individual 
  22287. binding by calling the rpc_binding_free routine when it is finished with it. It 
  22288. also cannot change the value of count before calling the 
  22289. rpc_binding_vector_free routine because this allows the application to free the 
  22290. unwanted binding handle and to set the vector entry to NULL. 
  22291.  
  22292. An application, when it is finished with an individual binding handle in a 
  22293. binding vector, frees the binding handle by calling the rpc_binding_free 
  22294. routine. This routine also sets the corresponding pointer in the binding vector 
  22295. to NULL. 
  22296.  
  22297. Note that you should not decrement the field count in a binding vector 
  22298. structure when you call routine rpc_binding_free to free an individual binding 
  22299. handle. 
  22300.  
  22301. The following routines require a binding vector and they show an parameter data 
  22302. type of rpc_binding_vector_t: 
  22303.  
  22304.       rpc_binding_vector_free 
  22305.       rpc_ep_register 
  22306.       rpc_ep_register_no_replace 
  22307.       rpc_ep_unregister 
  22308.       rpc_ns_binding_export 
  22309.       rpc_ns_binding_lookup_next 
  22310.       rpc_ns_binding_select 
  22311.       rpc_server_inq_bindings 
  22312.  
  22313.  
  22314. ΓòÉΓòÉΓòÉ 5.5.3. Boolean ΓòÉΓòÉΓòÉ
  22315.  
  22316. Routines that require a Boolean-valued parameter or return a Boolean value show 
  22317. a data type of boolean32. DCE RPC provides the integer constants TRUE (1) and 
  22318. FALSE (0) for use as Boolean values. 
  22319.  
  22320.  
  22321. ΓòÉΓòÉΓòÉ 5.5.4. Code Set ΓòÉΓòÉΓòÉ
  22322.  
  22323. A code set is a mapping of the members of a character set to specific numeric 
  22324. code values. Different code sets use different numeric code values to represent 
  22325. the same character. In general, operating systems use string names to refer to 
  22326. the code sets that the system supports. It is common for different operating 
  22327. systems to use different string names to refer to the same code set. 
  22328.  
  22329. Distributed applications that run in a network of heterogeneous operating 
  22330. systems need to be able to identify the character sets and code sets that 
  22331. client and server machines are using to avoid losing data during communications 
  22332. between each other. DCE RPC supports transparent automatic conversion for 
  22333. characters that are members of the DCE Portable Character Set (DCE PCS) and 
  22334. which are encoded in the ASCII and U.S. EBCDIC code sets. The RPC runtime 
  22335. automatically converts DCE PCS characters encoded in ASCII or U.S. EBCDIC, if 
  22336. necessary, when they are passed over the network between client and server. 
  22337.  
  22338. DCE RPC applications that need to transfer character data that is outside the 
  22339. DCE PCS character set and ASCII and U.S. EBCDIC encodings (international 
  22340. characters) can use special IDL constructs and a set of DCE RPC routines to set 
  22341. up their applications so that they can pass this international character data 
  22342. with minimal or no loss between client and server applications. An example of 
  22343. such an application would be one that used European, Chinese, or Japanese 
  22344. characters mapped to EUC, Big5, or SJIS encodings. Together, the IDL constructs 
  22345. and the DCE RPC routines provide a method of automatic code set conversion for 
  22346. applications that transfer international character data in heterogeneous code 
  22347. set environments. 
  22348.  
  22349. DCE provides a mechanism to uniquely identify a code set; this mechanism is the 
  22350. code set registry. The code set registry assigns a unique identifier to each 
  22351. character set and code set. Because the registry provides code set identifiers 
  22352. that are consistent across a network of heterogeneous operating systems, it 
  22353. provides a method for clients and servers in a heterogeneous environment to use 
  22354. to identify code sets without having to rely on operating system-specific 
  22355. string names. 
  22356.  
  22357. The code set data structure contains the following fields: 
  22358.  
  22359.  c_set         A 32-bit hexadecimal value that uniquely identifies the code 
  22360.                set. This value is one of the registered values in the code set 
  22361.                registry. 
  22362.  
  22363.  c_max_bytes   A 16-bit decimal value that indicates the maximum number of 
  22364.                bytes this code set uses to encode one character in this code 
  22365.                set. 
  22366.  
  22367.  ch_sets_num   A 16-bit decimal value that indicates the number of character 
  22368.                sets supported by the codeset. 
  22369.  
  22370.  ch_sets       A 32-bit pointer to a dynamically allocated array of OSF 
  22371.                assigned character set identifiers. 
  22372.  
  22373.  The following routines require a code set value: 
  22374.  
  22375.       cs_byte_from_netcs 
  22376.       cs_byte_local_size 
  22377.       cs_byte_net_size 
  22378.       cs_byte_to_netcs 
  22379.       dce_cs_loc_to_rgy 
  22380.       dce_cs_rgy_to_loc 
  22381.       rpc_cs_get_tags 
  22382.       rpc_cs_binding_set_tags 
  22383.       rpc_rgy_get_max_bytes 
  22384.  
  22385.  In these routines, the code set value shows a data type of unsigned32. 
  22386.  
  22387.  The RPC stub buffer sizing routines xxx_net_size and xxx_local_size use the 
  22388.  value of c_max_bytes to calculate the size of a buffer for code set 
  22389.  conversion. 
  22390.  
  22391.  The RPC character set compatibility evaluation routine 
  22392.  rpc_cs_char_set_compat_check uses the value of ch_sets_num and values pointed 
  22393.  to by ch_sets to evaluate character set compatibility between a client and a 
  22394.  server. 
  22395.  
  22396.  The C language representation of a code set structure is as follows: 
  22397.  
  22398.   typedef struct {
  22399.           long  c_set;
  22400.           short  c_max_bytes;
  22401.           short  ch_sets_num;
  22402.           short  *ch_sets;
  22403.   } rpc_cs_c_set_t;
  22404.  
  22405.  The code set data structure is a member of the code sets array. 
  22406.  
  22407.  
  22408. ΓòÉΓòÉΓòÉ 5.5.5. Code Sets Array ΓòÉΓòÉΓòÉ
  22409.  
  22410. The code sets array contains the list of the code sets that a client or server 
  22411. supports. The structure consists of a version number member (version), followed 
  22412. by a count member (count), followed by an array of code set data structures 
  22413. (rpc_cs_c_set_t). This array is declared to be a conformant array so that its 
  22414. size is determined at runtime. The count member indicates the number of code 
  22415. sets contained in the array. 
  22416.  
  22417. The first element in the code sets array represents the local code set of the 
  22418. client or server process. 
  22419.  
  22420. DCE RPC routines for character/code sets compatibility evaluation and code set 
  22421. conversion support one intermediate code set, which is the ISO 10646 Universal 
  22422. character/code set (UCS-2, Level 1). Consequently, DCE requires host systems 
  22423. running applications that transfer international characters to provide 
  22424. converters for this code set. 
  22425.  
  22426. The remaining elements in the array represent other code sets that the 
  22427. process's host supports (that is, code sets for which the system provides 
  22428. converters). 
  22429.  
  22430. The C language representation of a code sets array is: 
  22431.  
  22432. typedef struct rpc_codeset_mgmt_s_t {
  22433.         unsigned32  version;
  22434.         unsigned32  count;
  22435.         [size_is(count)]  rpc_cs_c_set_t codesets[];
  22436. } rpc_codeset_mgmt_t,  *rpc_codeset_mgmt_p_t;
  22437.  
  22438. Client and server applications and DCE RPC routines for automatic code set 
  22439. conversion obtain a code sets array by calling the routine 
  22440. rpc_rgy_get_codesets. Server applications use the code sets array as input to 
  22441. the rpc_ns_mgmt_set_attribute routine, which registers their supported 
  22442. character and code sets in the name service database. Client applications look 
  22443. up a server's supported character and code sets in the name service database by 
  22444. calling the routine rpc_ns_mgmt_read_codesets and then use their code sets 
  22445. array to evaluate their supported code sets against the code sets that the 
  22446. server supports. 
  22447.  
  22448. The following DCE RPC routines require a code sets array and show an argument 
  22449. data type of rpc_codeset_mgmt_t: 
  22450.  
  22451.       rpc_cs_char_set_compat_check 
  22452.       rpc_ns_mgmt_read_codesets 
  22453.       rpc_rgy_get_codesets 
  22454.  
  22455.  Server applications that use the routine rpc_ns_mgmt_set_attribute to register 
  22456.  their supported code sets in the name service database also specify the code 
  22457.  sets array, but show an argument data type of void. 
  22458.  
  22459.  
  22460. ΓòÉΓòÉΓòÉ 5.5.6. Conversion Type ΓòÉΓòÉΓòÉ
  22461.  
  22462. The conversion type data structure is an enumerated type that RPC stub buffer 
  22463. sizing routines return to indicate whether character data conversion is 
  22464. necessary and whether existing storage is sufficient for the stub to store the 
  22465. results of the conversion. The conversion type can be one of the following 
  22466. values: 
  22467.  
  22468.  idl_cs_no_convert                No code set conversion is required. 
  22469.  idl_cs_new_buffer_convert        The converted data must be written to a new 
  22470.                                   storage area. 
  22471.  
  22472.  The C language representation of a conversion type structure is: 
  22473.  
  22474.   typedef enum {
  22475.           idl_cs_no_convert,
  22476.           idl_cs_new_buffer_convert,
  22477.   } idl_cs_convert_t;
  22478.  
  22479.  
  22480. ΓòÉΓòÉΓòÉ 5.5.7. Endpoint Map Inquiry Handle ΓòÉΓòÉΓòÉ
  22481.  
  22482. An endpoint map inquiry handle is a pointer-size opaque variable. It contains 
  22483. information the RPC runtime uses to access the elements in a local or remote 
  22484. endpoint map.  The description of the rpc_ep_register routine lists the 
  22485. contents of an element. 
  22486.  
  22487. The following routines require an endpoint map inquiry handle and they show an 
  22488. parameter data type of rpc_ep_inq_handle_t: 
  22489.  
  22490.       rpc_mgmt_ep_elt_inq_begin 
  22491.       rpc_mgmt_ep_elt_inq_done 
  22492.       rpc_mgmt_ep_elt_inq_next. 
  22493.  
  22494.  
  22495. ΓòÉΓòÉΓòÉ 5.5.8. Global Name ΓòÉΓòÉΓòÉ
  22496.  
  22497. The Name Service Interface (NSI) uses global names as the names of name service 
  22498. entries. A global name includes both a cell name and a cell-relative name 
  22499. composed of a directory path name and a leaf name. (For a description of global 
  22500. names, see the DCE for OS/2 Warp: Application Development Guide - Core 
  22501. Components). The cell name is assigned to a cell root at its creation.  When 
  22502. you specify only a cell-relative name to an NSI operation, the NSI 
  22503. automatically expands the name into a global name by inserting the local cell 
  22504. name. Thus, the name of a member in a group or in a profile element is always 
  22505. stored as a global name.  When returning the name of a name service entry or a 
  22506. member, NSI operations return global names. 
  22507.  
  22508. For example, when you specify a cell-relative name as the member_name parameter 
  22509. to the rpc_ns_group_mbr_add routine, you can receive the corresponding global 
  22510. name by calling the rpc_ns_group_mbr_inq_next routine. 
  22511.  
  22512.  
  22513. ΓòÉΓòÉΓòÉ 5.5.9. IDL Encoding Service Handle ΓòÉΓòÉΓòÉ
  22514.  
  22515. An IDL encoding service handle is a pointer-size opaque variable that points to 
  22516. routines that control how data encoding or decoding is performed. The following 
  22517. routines return an IDL encoding service handle and show an argument data type 
  22518. of idl_es_handle_t: 
  22519.  
  22520.       idl_es_encode_incremental 
  22521.       idl_es_decode_buffer 
  22522.       idl_es_decode_incremental 
  22523.       idl_es_encode_dyn_buffer 
  22524.       idl_es_encode_fixed_buffer 
  22525.  
  22526.  The idl_es_handle_free and idl_es_inq_encoding_id routines require an IDL 
  22527.  encoding service handle. 
  22528.  
  22529.  Note that in order to use the IDL encoding services, you must include a header 
  22530.  file that has been generated for an application that has used the encode and 
  22531.  decode ACF attributes on one or more of its operations. 
  22532.  
  22533.  
  22534. ΓòÉΓòÉΓòÉ 5.5.10. Interface Handle and Specification ΓòÉΓòÉΓòÉ
  22535.  
  22536. An interface handle is a pointer-size opaque variable. It contains information 
  22537. the RPC runtime uses to access the interface specification data structure. 
  22538.  
  22539. The DCE IDL compiler automatically creates an interface specification data 
  22540. structure from each IDL file, and it creates a global variable of type 
  22541. rpc_if_handle_t for the interface specification. 
  22542.  
  22543. The DCE IDL compiler places an interface handle declaration in the generated 
  22544. interface-name.h file. The compiler generates this include file for each 
  22545. interface. 
  22546.  
  22547. Routines requiring the interface handle as a parameter show a data type of 
  22548. rpc_if_handle_t. 
  22549.  
  22550. The form of each interface handle name is as follows: 
  22551.  
  22552.    o  For the client: 
  22553.  
  22554.       if-name_vmajor-version_minor-version_c_ifspec 
  22555.  
  22556.    o  For the server: 
  22557.  
  22558.       if-name_vmajor-version_minor-version_s_ifspec 
  22559.  
  22560.  where: 
  22561.  
  22562.    o  if-name is the interface identifier specified in the IDL file. 
  22563.    o  major-version is the interface's major-version number specified in the 
  22564.       IDL file. 
  22565.    o  minor-version is the interface's minor-version number specified in the 
  22566.       IDL file. 
  22567.  
  22568.  An example is notes_v1_2_c_ifspec. 
  22569.  
  22570.  The maximum combined length of the interface identifier and interface version 
  22571.  number is 19 characters. Since the major-version and minor-version numbers 
  22572.  must each be at least 1 character, the interface name can be no more than 17 
  22573.  characters. This limits the interface handle name to 31 or fewer characters. 
  22574.  
  22575.  No concurrency control is required for interface handles. 
  22576.  
  22577.  The following routines require an interface handle and show an parameter data 
  22578.  type of rpc_if_handle_t: 
  22579.  
  22580.       rpc_ep_register 
  22581.       rpc_ep_register_no_replace 
  22582.       rpc_ep_resolve_binding 
  22583.       rpc_ep_unregister 
  22584.       rpc_if_inq_id 
  22585.       rpc_ns_binding_export 
  22586.       rpc_ns_binding_import_begin 
  22587.       rpc_ns_binding_lookup_begin 
  22588.       rpc_ns_binding_unexport 
  22589.       rpc_server_inq_if 
  22590.       rpc_server_register_if 
  22591.       rpc_server_unregister_if 
  22592.       rpc_server_use_all_protseqs_if 
  22593.       rpc_server_use_protseq_if 
  22594.  
  22595.  
  22596. ΓòÉΓòÉΓòÉ 5.5.11. Interface Identifier ΓòÉΓòÉΓòÉ
  22597.  
  22598. The interface identifier (ID) data structure contains the interface UUID and 
  22599. major-version and minor-version numbers of an interface. The interface 
  22600. identifier is a subset of the data contained in the interface specification 
  22601. structure. 
  22602.  
  22603. The C language representation of an interface identifier structure is as 
  22604. follows: 
  22605.  
  22606. typedef struct {
  22607.                uuid_t  uuid;
  22608.                unsigned16  vers_major;
  22609.                unsigned16  vers_minor;
  22610.                } rpc_if_id_t;
  22611.  
  22612. Routines that require an interface identifier structure show a data type of 
  22613. rpc_if_id_t. In these routines, the application is responsible for providing 
  22614. memory for the structure. 
  22615.  
  22616. The rpc_if_inq_id routine returns the interface identifier from an interface 
  22617. specification. The following routines require an interface identifier: 
  22618.  
  22619.       rpc_mgmt_ep_elt_inq_begin 
  22620.       rpc_mgmt_ep_elt_inq_next 
  22621.       rpc_mgmt_ep_unregister 
  22622.       rpc_ns_mgmt_binding_unexport 
  22623.       rpc_ns_profile_elt_add 
  22624.       rpc_ns_profile_elt_inq_begin 
  22625.       rpc_ns_profile_elt_inq_next 
  22626.       rpc_ns_profile_elt_remove. 
  22627.  
  22628.  
  22629. ΓòÉΓòÉΓòÉ 5.5.12. Interface Identifier Vector ΓòÉΓòÉΓòÉ
  22630.  
  22631. The interface identifier (ID) vector data structure contains a list of 
  22632. interfaces offered by a server. The interface identifier vector contains a 
  22633. count member count, followed by an array of pointers (of pointer type 
  22634. rpc_if_id_t) to interface identifiers. 
  22635.  
  22636. The C language representation of an interface identifier vector is as follows: 
  22637.  
  22638. typedef struct {
  22639.                unsigned32  count;
  22640.                rpc_if_id_t  *if_id[1];
  22641.                } rpc_if_id_vector_t;
  22642.  
  22643. The interface identifier vector is a read-only vector. To obtain a vector of 
  22644. the interface identifiers registered by a server with the RPC runtime, an 
  22645. application calls the rpc_mgmt_inq_if_ids routine. To obtain a vector of the 
  22646. interface identifiers exported by a server to a name service database, an 
  22647. application calls the rpc_ns_mgmt_entry_inq_if_ids routine. 
  22648.  
  22649. The RPC runtime allocates memory for the interface identifier vector. The 
  22650. application calls the rpc_if_id_vector_free routine to free the interface 
  22651. identifier vector. 
  22652.  
  22653.  
  22654. ΓòÉΓòÉΓòÉ 5.5.13. Manager Entry Point Vector ΓòÉΓòÉΓòÉ
  22655.  
  22656. The manager Entry Point Vector (EPV) is an array of pointers to remote 
  22657. procedures. 
  22658.  
  22659. The DCE IDL compiler automatically generates a manager EPV data type, into the 
  22660. header file generated by the IDL compiler, for use in constructing manager 
  22661. EPVs. The data type is named as follows: 
  22662.  
  22663. if-name_v major-version_minor-version_epv_t 
  22664.  
  22665. where: 
  22666.  
  22667.    o  if-name is the interface identifier specified in the IDL file. 
  22668.    o  major-version is the interface's major version number specified in the 
  22669.       IDL file. 
  22670.    o  minor-version is the interface's minor version number specified in the 
  22671.       IDL file. 
  22672.  
  22673.  By default, the DCE IDL compiler automatically creates and initializes a 
  22674.  manager EPV. DCE IDL creates this EPV assuming that a manager routine of the 
  22675.  same name exists for each procedure in the interface (as specified in the IDL 
  22676.  file). 
  22677.  
  22678.  The DCE IDL compiler can define a client Entry Point Vector with addresses of 
  22679.  local routines. Client applications can call these routines.  For more 
  22680.  information about client entry point vectors, see the explanation of the -cepv 
  22681.  parameter in the DCE for OS/2 Warp: Administration Command Reference. 
  22682.  
  22683.  If the server offers multiple implementations of the same interface, the 
  22684.  server must create additional manager EPVs, one for each implementation.  Each 
  22685.  EPV must contain exactly one entry point (address of a routine) for each 
  22686.  procedure defined in the IDL file. The server application declares and 
  22687.  initializes one manager EPV variable of type 
  22688.  if-name_vmajor-version_minor-version_epv_t for each implementation of the 
  22689.  interface. 
  22690.  
  22691.  The rpc_server_register_if and rpc_server_inq_if routines use the manager EPV 
  22692.  data type and show the manager EPV parameter as having an rpc_mgr_epv_t data 
  22693.  type. 
  22694.  
  22695.  
  22696. ΓòÉΓòÉΓòÉ 5.5.14. Name Service Handle ΓòÉΓòÉΓòÉ
  22697.  
  22698. A name service handle is a pointer-size opaque variable containing information 
  22699. the RPC runtime uses to return the following RPC data from the name service 
  22700. database: 
  22701.  
  22702.    o  Server binding handles 
  22703.    o  UUIDs of resources offered by a server 
  22704.    o  Profile members 
  22705.    o  Group members. 
  22706.  
  22707.  The following routines require a name service handle and show an parameter 
  22708.  data type of rpc_ns_handle_t: 
  22709.  
  22710.       rpc_ns_binding_import_begin 
  22711.       rpc_ns_binding_import_next 
  22712.       rpc_ns_binding_import_done 
  22713.       rpc_ns_binding_lookup_begin 
  22714.       rpc_ns_binding_lookup_next 
  22715.       rpc_ns_binding_lookup_done 
  22716.       rpc_ns_entry_object_inq_begin 
  22717.       rpc_ns_entry_object_inq_next 
  22718.       rpc_ns_entry_object_inq_done 
  22719.       rpc_ns_group_mbr_inq_begin 
  22720.       rpc_ns_group_mbr_inq_next 
  22721.       rpc_ns_group_mbr_inq_done 
  22722.       rpc_ns_profile_elt_inq_begin 
  22723.       rpc_ns_profile_elt_inq_next 
  22724.       rpc_ns_profile_elt_inq_done 
  22725.       rpc_ns_mgmt_handle_set_exp_age. 
  22726.  
  22727.  The scope of a name service handle is from a xxx_begin routine through the 
  22728.  corresponding xxx_done routine. 
  22729.  
  22730.  Applications have responsibility for concurrency control of name service 
  22731.  handles across threads. 
  22732.  
  22733.  
  22734. ΓòÉΓòÉΓòÉ 5.5.15. Protocol Sequence ΓòÉΓòÉΓòÉ
  22735.  
  22736. A protocol sequence is a character string identifying the network protocols 
  22737. used to establish a relationship between a client and server. The protocol 
  22738. sequence contains a set of options that the RPC runtime must know about.  The 
  22739. following options are in this set: 
  22740.  
  22741.    o  The RPC protocol used for communications (choices are ncacn and ncadg). 
  22742.    o  The format used in the network address supplied in the binding (choices 
  22743.       are AF-INET and AF-NETBIOS). 
  22744.    o  The transport protocol used for communications. 
  22745.  
  22746.  Only certain combinations of these options are useful for interoperation.  RPC 
  22747.  provides predefined strings that represent the valid combinations.  RPC 
  22748.  applications use only these strings. 
  22749.  
  22750.  The following list contains predefined strings representing valid protocol 
  22751.  sequences. In the descriptions, NCA is an abbreviation of Network Computing 
  22752.  Architecture. 
  22753.  
  22754.  Protocol Sequence Description 
  22755.  ncacn_ip_tcp  NCA Connection over Internet Protocol: Transmission Control 
  22756.                Protocol 
  22757.  ncadg_ip_udp  NCA Datagram over Internet Protocol: User Datagram Protocol 
  22758.  ncacn_nb_stream NCA Connection over NetBIOS 
  22759.  
  22760.  A server application can use a particular protocol sequence only if the 
  22761.  operating system software supports that protocol. A server chooses to accept 
  22762.  remote procedure calls over some or all of the supported protocol sequences. 
  22763.  
  22764.  Client and server applications can determine if a protocol sequence is 
  22765.  supported by the RPC runtime and the operating system.  The applications 
  22766.  determine this by calling the following routines: 
  22767.  
  22768.    o  rpc_network_inq_protseqs 
  22769.    o  rpc_network_is_protseq_valid. 
  22770.  
  22771.  The following routines allow server applications to register protocol 
  22772.  sequences with the runtime: 
  22773.  
  22774.    o  rpc_server_use_all_protseqs 
  22775.    o  rpc_server_use_all_protseqs_if 
  22776.    o  rpc_server_use_protseq 
  22777.    o  rpc_server_use_protseq_ep 
  22778.    o  rpc_server_use_protseq_if. 
  22779.  
  22780.  Those routines requiring a protocol sequence parameter show a data type of 
  22781.  unsigned_char_t *. 
  22782.  
  22783.  A client can use the protocol sequence strings to construct a string binding 
  22784.  using the rpc_string_binding_compose routine. 
  22785.  
  22786.  
  22787. ΓòÉΓòÉΓòÉ 5.5.16. Protocol Sequence Vector ΓòÉΓòÉΓòÉ
  22788.  
  22789. The protocol sequence vector data structure contains a list of protocol 
  22790. sequences over which the RPC runtime can send or receive remote procedure 
  22791. calls. The protocol sequence vector contains a count member (count), followed 
  22792. by an array of pointers to protocol sequence strings (protseq). 
  22793.  
  22794. The C language representation of a protocol sequence vector is as follows: 
  22795.  
  22796. typedef struct {
  22797.                unsigned32  count;
  22798.                unsigned_char_t  *protseq[1];
  22799.                } rpc_protseq_vector_t;
  22800.  
  22801. The protocol sequence vector is a read-only vector. To obtain a protocol 
  22802. sequence vector, a server application calls the rpc_network_inq_protseqs 
  22803. routine. RPC runtime allocates memory for the protocol sequence vector. The 
  22804. server application calls the rpc_protseq_vector_free routine to free the 
  22805. protocol sequence vector. 
  22806.  
  22807.  
  22808. ΓòÉΓòÉΓòÉ 5.5.17. Statistics Vector ΓòÉΓòÉΓòÉ
  22809.  
  22810. The statistics vector data structure contains statistics from the RPC runtime 
  22811. on a per address space basis. The statistics vector contains a count member 
  22812. (count), followed by an array of statistics. Each array element contains an 
  22813. unsigned32 value. The following list describes the statistics indexed by the 
  22814. specified constant: 
  22815.  
  22816.  rpc_c_stats_calls_in The number of remote procedure calls received by the 
  22817.                      runtime. 
  22818.  rpc_c_stats_calls_out The number of remote procedure calls initiated by the 
  22819.                      runtime. 
  22820.  rpc_c_stats_pkts_in The number of network packets received by the runtime. 
  22821.  rpc_c_stats_pkts_out The number of network packets sent by the runtime. 
  22822.  
  22823.  The C language representation of a statistics vector is as follows: 
  22824.  
  22825.   typedef struct {
  22826.           unsigned32  count;
  22827.           unsigned32  stats[1];
  22828.           } rpc_stats_vector_t;
  22829.  
  22830.  To obtain runtime statistics, an application calls the rpc_mgmt_inq_stats 
  22831.  routine. The RPC runtime allocates memory for the statistics vector. The 
  22832.  application calls the rpc_mgmt_stats_vector_free routine to free the 
  22833.  statistics vector. 
  22834.  
  22835.  
  22836. ΓòÉΓòÉΓòÉ 5.5.18. String Binding ΓòÉΓòÉΓòÉ
  22837.  
  22838. A string binding contains the character representation of a binding handle. 
  22839.  
  22840. String bindings are a convenient way of representing portions of a binding 
  22841. handle. However, you cannot use string bindings directly to make remote 
  22842. procedure calls. You must first call the routine 
  22843. rpc_binding_from_string_binding, which converts a string binding to a binding 
  22844. handle. 
  22845.  
  22846. A string binding does not contain all the information from a binding handle. 
  22847. For example, a call to the rpc_binding_to_string_binding routine does not 
  22848. translate the authentication information sometimes associated with a binding 
  22849. handle into the resulting string binding. 
  22850.  
  22851. You can begin the development of a distributed application by having its 
  22852. servers communicate their binding information to clients by using string 
  22853. bindings. This communication allows a server to establish a client-server 
  22854. relationship without using the local endpoint map or the name service database. 
  22855.  
  22856. In this case, the server calls none of the rpc_ep_register, 
  22857. rpc_ep_register_no_replace, and rpc_ns_binding_export routines. Instead, the 
  22858. server calls only the rpc_server_inq_bindings routine to obtain a vector of 
  22859. binding handles. The server obtains binding handles one at a time from the 
  22860. vector and calls the rpc_binding_to_string_binding routine to convert each 
  22861. binding handle into a string binding. The resulting string binding is always 
  22862. fully bound and may contain a non-nil object UUID.  The server then makes some 
  22863. or all of its string bindings available to clients.  The server can place the 
  22864. string bindings in a file to be read by clients or users or both. It can also 
  22865. deliver the string bindings to clients or users by means of a file, mail, or 
  22866. paper. 
  22867.  
  22868. You can continue the distributed application's development by changing the 
  22869. application so that servers use the local endpoint map and the name service 
  22870. database to communicate their binding information. 
  22871.  
  22872. To find the server, a client obtains a string binding containing a protocol 
  22873. sequence that the client runtime supports and, optionally, an object UUID that 
  22874. the client requires. The client then calls the rpc_binding_from_string_binding 
  22875. routine to convert the string binding into a server binding handle. 
  22876.  
  22877. Other useful routines for working with string bindings are: 
  22878.  
  22879.  rpc_string_binding_compose       Creates a string binding from its component 
  22880.                                   parts. 
  22881.  rpc_string_binding_parse         Separates a string binding into its component 
  22882.                                   parts. 
  22883.  
  22884.  Look at the two formats of a string binding that follow this paragraph. The 
  22885.  four fields represent the object UUID, RPC protocol sequence, network address, 
  22886.  and endpoint and network options of the binding. A delimiter character such as 
  22887.  @ (at sign) or : (colon) separates each field. A string binding does not 
  22888.  contain any white space. 
  22889.  
  22890.   object-uuid@rpc-protocol-sequence:nw-addr[endpoint,option...]
  22891.  
  22892.   object-uuid@rpc-protocol-sequence:nw-addr[endpoint=endpoint,option...]
  22893.  
  22894.  where: 
  22895.  
  22896.  object-uuid   Specifies the UUID of the object operated on by the remote 
  22897.                procedure that is called with this string binding. The RPC 
  22898.                runtime, at the server, maps the object's type to a manager 
  22899.                entry point vector (EPV) to call the correct manager routine. 
  22900.                The explanation of the rpc_server_register_if routine discusses 
  22901.                mapping object UUIDs to manager EPVs. This field is optional. If 
  22902.                you do not provide a value, the RPC runtime assumes a nil UUID. 
  22903.  
  22904.  @             Delimiter character for the object UUID field. If you specify an 
  22905.                object UUID you must follow it with this symbol. 
  22906.  
  22907.  rpc-protocol-sequence Specifies the protocol sequence used for making remote 
  22908.                procedure calls. The valid protocol sequences are: 
  22909.  
  22910.                  o  ncacn_ip_tcp 
  22911.                  o  ncadg_ip_udp 
  22912.                  o  ncacn_nb_stream 
  22913.  
  22914.                More information about these valid protocol sequences is in a 
  22915.                list in Frequently Used RPC Routine Parameters. 
  22916.  
  22917.                This field is required. 
  22918.  
  22919.  : (colon)     Delimiter character for the RPC protocol sequence field. 
  22920.  
  22921.  nw-addr       Specifies the address (addr) of a host on a network (nw) that 
  22922.                receives remote procedure calls made with this string binding. 
  22923.                The format and content of the network address depends on the 
  22924.                value of rpc-protocol-sequence. 
  22925.  
  22926.                The ncadg_ip_udp and ncacn_ip_tcp protocol sequences specify an 
  22927.                Internet address using the common Internet address notation or 
  22928.                host name. 
  22929.  
  22930.  
  22931.                The ncacn_nb_stream protocol sequences specify a NetBIOS 
  22932.                address. 
  22933.  
  22934.                Two examples with common Internet address notation are 
  22935.                128.10.2.30 and #126.15.1.28. The second example shows the use 
  22936.                of the optional # (number sign) character. 
  22937.  
  22938.                An example with a host name is ko. If the specified host name is 
  22939.                multihomed, the binding handle returned from the 
  22940.                rpc_binding_from_string_binding routine contains a host address. 
  22941.                It is the first host address returned from the system library 
  22942.                call that translates a host name to a host address for the 
  22943.                network address format in the protocol sequence. To control the 
  22944.                host address used, specify the network address using the common 
  22945.                Internet address notation instead of a host name. 
  22946.  
  22947.                The network address field is optional.  If you do not supply 
  22948.                this field, the string binding refers to your local host. 
  22949.  
  22950.  [ (left bracket) Delimiter character specifying that one endpoint and zero or 
  22951.                more options follow. If the string binding contains at least one 
  22952.                endpoint, this symbol is required. 
  22953.  
  22954.  endpoint      Specifies the endpoint, or address of a specific server instance 
  22955.                on a host, to receive remote procedure calls made with this 
  22956.                string binding.  Optionally, the keyword endpoint= can precede 
  22957.                the endpoint specifier. 
  22958.  
  22959.                The format and content of the endpoint depends on the specified 
  22960.                protocol sequence. The ncadg_ip_udp and ncacn_ip_tcp protocol 
  22961.                sequences specify an Internet port number. 
  22962.  
  22963.                The ncacn_nb_stream protocol sequences specify a NetBIOS 
  22964.                address. 
  22965.  
  22966.                An example of an Internet port number is 1025. 
  22967.  
  22968.                The endpoint field is optional.  For more information about 
  22969.                endpoints, see the section on Binding Handle. 
  22970.  
  22971.  , (comma)     Delimiter character specifying that option data follows. If an 
  22972.                option follows, this delimiter is required. 
  22973.  
  22974.  option        Specifies any options. Each option is specified as option 
  22975.                name=option value. 
  22976.  
  22977.                There are no Internet options or options for ncadg_ip_udp, 
  22978.                ncacn_ip_tcp, and ncacn_nb_stream. 
  22979.  
  22980.                The option field is not required. 
  22981.  
  22982.  ] (right bracket) Delimiter character specifying that one endpoint and zero or 
  22983.                more options precede. If the string binding contains at least 
  22984.                one endpoint, this symbol is required. 
  22985.  
  22986.  \ (backslash) Escape character for all string binding fields. 
  22987.  
  22988.  Look at the following examples of valid string bindings. In each example 
  22989.  obj-uuid represents a UUID in string form. In other words, the symbol obj-uuid 
  22990.  can represent the UUID 308fb580-1eb2-11ca-923b-08002b1075a7. 
  22991.  
  22992.   obj-uuid@ncacn_ip_tcp:16.20.16.27[2001]
  22993.   obj-uuid@ncacn_ip_tcp:16.20.16.27[endpoint=2001]
  22994.  
  22995.  Cleaning Up Stale Socket Files 
  22996.  
  22997.  When a well-written DCE server application exits under normal conditions, it 
  22998.  will unregister its endpoints from the RPC endpoint map, among other things, 
  22999.  before it exits. In the case of ip-based protocols, such as ncacn_ip_tcp and 
  23000.  ncadg_ip_udp, the ports that the DCE application was listening on are cleaned 
  23001.  up by the operating system, so no application action is required to free up 
  23002.  the ports. 
  23003.  
  23004.  
  23005. ΓòÉΓòÉΓòÉ 5.5.19. String UUID ΓòÉΓòÉΓòÉ
  23006.  
  23007. A string UUID contains the character representation of a UUID. A string UUID 
  23008. consists of multiple fields of hexadecimal characters. Each field has a fixed 
  23009. length, and hyphens separate the fields. An example of a string UUID is: 
  23010.  
  23011. 989c6e5c-2cc1-11ca-a044-08002b1bb4f5
  23012.  
  23013. When you supply a string UUID as an input parameter to an RPC runtime routine, 
  23014. you can enter the alphabetic hexadecimal characters in either uppercase or 
  23015. lowercase.  The RPC runtime routines that return a string UUID always return 
  23016. the hexadecimal characters in lowercase letters. 
  23017.  
  23018. The following routines require a string UUID: 
  23019.  
  23020.       rpc_string_binding_compose 
  23021.       uuid_from_string 
  23022.  
  23023.  The following routines return a string UUID: 
  23024.  
  23025.       rpc_string_binding_parse 
  23026.       uuid_to_string 
  23027.  
  23028.  
  23029. ΓòÉΓòÉΓòÉ 5.5.20. Unsigned Character String ΓòÉΓòÉΓòÉ
  23030.  
  23031. DCE RPC treats all characters in strings as unsigned characters. Routines with 
  23032. character string parameters show a data type of unsigned_char_t *. 
  23033.  
  23034.  
  23035. ΓòÉΓòÉΓòÉ 5.5.21. UUID Vector ΓòÉΓòÉΓòÉ
  23036.  
  23037. The UUID vector data structure contains a list of UUIDs. The UUID vector 
  23038. contains a count member (count), followed by an array of pointers to UUIDs. 
  23039.  
  23040. The C language representation of a UUID vector is as follows: 
  23041.  
  23042. typedef struct
  23043. {
  23044.     unsigned32  count;
  23045.     uuid_t  *uuid[1];
  23046. } uuid_vector_t;
  23047.  
  23048. An application constructs a UUID vector to contain object UUIDs to be exported 
  23049. or unexported from the name service database. The following routines require a 
  23050. UUID vector and show a data type of uuid_vector_t: 
  23051.  
  23052.       rpc_ep_register 
  23053.       rpc_ep_register_no_replace 
  23054.       rpc_ep_unregister 
  23055.       rpc_ns_binding_export 
  23056.       rpc_ns_binding_unexport 
  23057.       rpc_ns_mgmt_binding_unexport. 
  23058.  
  23059.  
  23060. ΓòÉΓòÉΓòÉ 5.6. Permissions Required for RPC ΓòÉΓòÉΓòÉ
  23061.  
  23062. To use the Name Service Interface (NSI) routines to access entries in a Cell 
  23063. Directory Service (CDS) database, you need access control list (ACL) 
  23064. permissions. Depending on the NSI operation, you need ACL permissions to the 
  23065. parent directory or the CDS object entry (the name service entry) or both. The 
  23066. ACL permissions are as follows: 
  23067.  
  23068.    o  To create an entry, you need insert permission to the parent directory. 
  23069.  
  23070.    o  To read an entry, you need read permission to the CDS object entry. 
  23071.  
  23072.    o  To write to an entry, you need write permission to the CDS object entry. 
  23073.  
  23074.    o  To delete an entry, you need delete permission either to the CDS object 
  23075.       entry or to the parent directory. 
  23076.  
  23077.    o  To test an entry, you need either test permission or read permission to 
  23078.       the CDS object entry. 
  23079.  Note that write permission does not imply read permission. 
  23080.  
  23081.  To find the ACL permissions for the NSI routines (whose names begin with 
  23082.  rpc_ns), see the Permissions Required parts in the routines' reference 
  23083.  sections. 
  23084.  
  23085.  The non-NSI routines (whose names do not begin with rpc_ns) do not need ACL 
  23086.  permissions, so their reference sections have no "Permissions Required" parts. 
  23087.  
  23088.  
  23089. ΓòÉΓòÉΓòÉ 5.7. Frequently Used RPC Routine Parameters ΓòÉΓòÉΓòÉ
  23090.  
  23091. A few parameters are common to many of the DCE RPC routines. These parameters 
  23092. are described fully here and again briefly on the specific routine reference 
  23093. pages. 
  23094.  
  23095.  binding       Used as an input or output parameter. This parameter returns a 
  23096.                binding handle for making remote procedure calls to a server. A 
  23097.                client obtains a binding handle by calling one of the following 
  23098.                routines: 
  23099.  
  23100.                     rpc_binding_copy 
  23101.                     rpc_binding_from_string_binding 
  23102.                     rpc_ns_binding_import_next 
  23103.                     rpc_ns_binding_select. 
  23104.  
  23105.  Creating a binding handle establishes a relationship between a client and a 
  23106.  server.  However, the relationship does not involve any communication between 
  23107.  the client and server. The communication occurs when a client makes a remote 
  23108.  procedure call. 
  23109.  
  23110.  As an input parameter to a remote procedure call, binding specifies a binding 
  23111.  handle that refers to binding information.  The client's RPC runtime uses this 
  23112.  binding information to make a remote procedure call to a server. 
  23113.  
  23114.  Server manager routines can extract client information from a client binding 
  23115.  handle by using the following routines: 
  23116.  
  23117.                     rpc_binding_inq_auth_caller 
  23118.                     rpc_binding_inq_auth_client 
  23119.                     rpc_binding_inq_object 
  23120.                     rpc_binding_to_string_binding 
  23121.                     rpc_string_binding_parse. 
  23122.  
  23123.  name          Used as an input or output parameter. 
  23124.  
  23125.                When used as an input parameter, the value of this parameter 
  23126.                depends on the syntax selected in the name_syntax parameter. If 
  23127.                it is allowed by the called routine, the value NULL specifies 
  23128.                that the routine uses the name specified in the 
  23129.                RPC_DEFAULT_ENTRY environment variable. Specifying NULL also has 
  23130.                the called routine use the name syntax that the environment 
  23131.                variable RPC_DEFAULT_ENTRY_SYNTAX specifies. 
  23132.  
  23133.                For a name_syntax value of rpc_c_ns_syntax_dce, use the DCE 
  23134.                naming rules to specify the name parameter. 
  23135.  
  23136.                As an output parameter, name returns an entry in the name 
  23137.                service database in the form of a character string that includes 
  23138.                a terminating null character. The value of this parameter 
  23139.                depends on the syntax selected in name_syntax. 
  23140.  
  23141.                For a name_syntax value of rpc_c_ns_syntax_dce, name is returned 
  23142.                using the DCE naming syntax. 
  23143.  
  23144.                The DCE RPC runtime allocates memory for the returned string. 
  23145.                The application is responsible for calling the rpc_string_free 
  23146.                routine to deallocate the string. 
  23147.  
  23148.                If an application does not want a returned name string, the 
  23149.                application usually specifies NULL for this parameter.  The one 
  23150.                exception is the rpc_ns_entry_expand_name routine.  It always 
  23151.                returns a name string. 
  23152.  
  23153.  name_syntax   Used only as an input parameter. It is an integer value that 
  23154.                specifies the syntax of an entry name. When allowed by the 
  23155.                called routine, a value of rpc_c_ns_syntax_default specifies 
  23156.                that the routine uses the syntax specified in the 
  23157.                RPC_DEFAULT_ENTRY_SYNTAX environment variable. The following 
  23158.                table lists the valid syntaxes that applications can use in DCE 
  23159.                RPC for entries in the name service database. 
  23160.  
  23161.                               ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  23162.                               Γöé Table 4. Valid Name Syntaxes                     Γöé
  23163.                               Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  23164.                               Γöé CONSTANT            Γöé VALUE     Γöé DESCRIPTION      Γöé
  23165.                               Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  23166.                               Γöé rpc_c_ns_syntax_default    Γöé 0       Γöé Default syntax    Γöé
  23167.                               Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  23168.                               Γöé rpc_c_ns_syntax_dce      Γöé 3       Γöé DCE          Γöé
  23169.                               ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  23170.  
  23171.                The name_syntax parameter tells routines how to parse the entry 
  23172.                name specified in an input name parameter or specifies the 
  23173.                syntax to use when returning an entry name as an output name 
  23174.                parameter. 
  23175.  
  23176.                If the RPC_DEFAULT_ENTRY_SYNTAX environment variable is not 
  23177.                defined, the RPC runtime uses the rpc_c_ns_syntax_dce name 
  23178.                syntax. 
  23179.  
  23180.  string        Used as an input or output parameter. 
  23181.  
  23182.                It returns a character string, which always includes the 
  23183.                terminating NULL character \0.  The DCE RPC runtime allocates 
  23184.                memory for the returned string. The application calls the 
  23185.                rpc_string_free routine to deallocate the memory occupied by the 
  23186.                string. 
  23187.  
  23188.                If there is no data for the requested string, the routine 
  23189.                returns the string \0.  For example, if the string binding 
  23190.                passed to the rpc_string_binding_parse routine does not contain 
  23191.                an object UUID, the routine returns \0 as the value of the 
  23192.                object UUID string. The application must call the 
  23193.                rpc_string_free routine to deallocate the memory occupied by 
  23194.                this string. 
  23195.  
  23196.                If an application does not require a returned output string, the 
  23197.                application specifies NULL for this parameter. 
  23198.  
  23199.  status        Each routine in the RPC API returns a DCE status code indicating 
  23200.                whether the routine completed successfully or, if not, why not. 
  23201.                A return value of rpc_s_ok indicates success. All other return 
  23202.                values signify routine failure.  The status codes listed for 
  23203.                each RPC runtime routine are the most likely, but not 
  23204.                necessarily all, the status codes that the routine can return. 
  23205.                The status code parameter has a data type of unsigned32. To 
  23206.                translate a DCE status code to a text message, call the 
  23207.                dce_error_inq_text routine. Note that RPC exceptions are 
  23208.                equivalent to RPC status codes. To identify the status code that 
  23209.                corresponds to a given exception, replace the _x_ string of the 
  23210.                exception with the string _s_; for example, the exception 
  23211.                rpc_x_already_listening is equivalent to the status code 
  23212.                rpc_s_already_listening. 
  23213.  
  23214.                The documentation for each status code includes the message 
  23215.                text, the explanation, and the suggested user action. These can 
  23216.                be found in the online helps. 
  23217.  
  23218.  uuid          Used as an input or output parameter. When you need to specify a 
  23219.                nil UUID to a uuid input parameter in any of the DCE RPC 
  23220.                routines, you can supply the value NULL. 
  23221.  
  23222.  
  23223. ΓòÉΓòÉΓòÉ 5.8. RPC Related Information ΓòÉΓòÉΓòÉ
  23224.  
  23225. Books: 
  23226. DCE for OS/2 Warp: Administration Command Reference 
  23227. DCE for OS/2 Warp: Application Development Guide - Core Components 
  23228.  
  23229.  
  23230. ΓòÉΓòÉΓòÉ 5.8.1. cs_byte_from_netcs ΓòÉΓòÉΓòÉ
  23231.  
  23232.  Purpose 
  23233.  
  23234.           Converts international character data from a network code set to a 
  23235.           local code set. This routine is used by client and server 
  23236.           applications. 
  23237.  
  23238.  Format 
  23239.  
  23240.                     #include <dce/codesets_stub.h>
  23241.  
  23242.                     void cs_byte_from_netcs(
  23243.                             rpc_binding_handle_t  binding,
  23244.                             unsigned32  network_code_set_value,
  23245.                             idl_byte  *network_data,
  23246.                             unsigned32  network_data_length,
  23247.                             unsigned32  local_buffer_size,
  23248.                             idl_byte  *local_data,
  23249.                             unsigned32  *local_data_length,
  23250.                             error_status_t  *status);
  23251.  
  23252.  Parameters 
  23253.  
  23254.           Input 
  23255.  
  23256.           binding       Specifies the target binding handle from which to 
  23257.                         obtain code set conversion information. When called 
  23258.                         from the client stub, this value is the binding handle 
  23259.                         of a compatible server returned by the 
  23260.                         rpc_ns_binding_import_next or rpc_ns_binding_select 
  23261.                         routine. When called from the server stub, this value 
  23262.                         is a pointer to binding information that the client 
  23263.                         stub passed in the RPC call. 
  23264.  
  23265.           network_code_set_value The registered hexadecimal integer value that 
  23266.                         represents the code set that was used to transmit 
  23267.                         character data over the network. In general, the 
  23268.                         network code set is the code set that the client 
  23269.                         application's code sets evaluation routine has 
  23270.                         determined to be compatible for this client and server. 
  23271.                         When the caller is the client stub, this value is the 
  23272.                         receiving tag. When the caller is the server stub, this 
  23273.                         value is the sending tag. 
  23274.  
  23275.           network_data  A pointer to the international character data that has 
  23276.                         been received, in the network code set encoding. 
  23277.  
  23278.           network_data_length The number of idl_byte data elements to be 
  23279.                         converted. For a conformant array, this value is the 
  23280.                         local value of the size_is variable. 
  23281.  
  23282.           local_buffer_size A pointer to the buffer size to be allocated to 
  23283.                         contain the converted data, in units of byte. The value 
  23284.                         specified in this parameter is the local buffer size 
  23285.                         returned from the cs_byte_local_size routine. 
  23286.  
  23287.           Output 
  23288.  
  23289.           local_data    A pointer to the converted data, in idl_byte format. 
  23290.  
  23291.           local_data_length The length of the converted data, in units of 
  23292.                         idl_byte. 
  23293.  
  23294.           status        Returns the status code from this routine. On 
  23295.                         successful completion, the routine returns rpc_s_ok. 
  23296.                         Otherwise, it returns one of the following errors: 
  23297.  
  23298.                              rpc_s_ss_incompatible_codesets The specified code 
  23299.                                            set does not match the code set 
  23300.                                            specified in the sending tag in the 
  23301.                                            binding handle. If this error occurs 
  23302.                                            in the server stub, an exception is 
  23303.                                            raised to the client application. 
  23304.  
  23305.                         When running the host converter, the following errors 
  23306.                         can occur: 
  23307.  
  23308.                              rpc_s_ss_invalid_char_input 
  23309.                              rpc_s_ss_short_conv_buffer 
  23310.                              rpc_s_ss_iconv_error (HP-UX reference platform 
  23311.                              only) 
  23312.                              rpc_s_ss_no_memory (HP-UX reference platform only) 
  23313.  
  23314.           When called from the server stub, the routine calls the 
  23315.           dce_cs_loc_to_rgy routine and the host converter routines. If these 
  23316.           routines return an error, an exception is raised to the client 
  23317.           application. 
  23318.  
  23319.  Usage 
  23320.  
  23321.           The cs_byte_from_netcs routine belongs to a set of DCE RPC routines 
  23322.           for use by client and server applications that are transferring 
  23323.           international character data in a heterogeneous character set and 
  23324.           code sets environment. 
  23325.  
  23326.           The cs_byte_from_netcs routine is one of the DCE RPC stub code set 
  23327.           conversion routines that RPC stubs use before they marshall or 
  23328.           unmarshall data to convert international character data to and from 
  23329.           local and network code sets. 
  23330.  
  23331.           Client and server stubs call the cs_byte_xxx_netcs routines when the 
  23332.           cs_byte type has been specified as the local data type using the 
  23333.           cs_char attribute in the attribute configuration file for the 
  23334.           application (the cs_byte type is equivalent to the byte type.) 
  23335.  
  23336.           Client and server stubs call the cs_byte_from_netcs routine before 
  23337.           they unmarshall the international character data received from the 
  23338.           network. The routine takes a binding handle, a code set value that 
  23339.           identifies the code set used to transfer international character data 
  23340.           over the network, the address of the network data, in idl_byte 
  23341.           format, that may need to be converted, and the data length, in units 
  23342.           of idl_byte. 
  23343.  
  23344.           The routine compares the sending code set to the local code set 
  23345.           currently in use. If the routine finds that code set conversion is 
  23346.           necessary (because the local code set differs from the code set 
  23347.           specified to be used on the network), it determines which host code 
  23348.           set converter to call to convert the data and then calls that 
  23349.           converter. 
  23350.  
  23351.           The routine then returns the converted conformant data, in idl_byte 
  23352.           format. The routine also returns the length of the converted data, in 
  23353.           units of idl_byte. 
  23354.  
  23355.           Applications can specify local data types other than cs_byte (the 
  23356.           local data type for which DCE RPC supplies stub code set conversion 
  23357.           routines) with the cs_char ACF attribute. In this case, the 
  23358.           application must also supply local_type_to_netcs and 
  23359.           local_type_from_netcs stub conversion routines for this type. 
  23360.  
  23361.  Note 
  23362.  
  23363.           In this release, arrays of cs_char must be conformant. Subject to 
  23364.           additional restrictions, fixed and varying arrays may be used. See 
  23365.           the README file for details. 
  23366.  
  23367.  Related Information 
  23368.  
  23369.           Routines: 
  23370.           cs_byte_to_netcs 
  23371.  
  23372.  
  23373. ΓòÉΓòÉΓòÉ 5.8.2. cs_byte_local_size ΓòÉΓòÉΓòÉ
  23374.  
  23375.  Purpose 
  23376.  
  23377.           Calculates the necessary buffer size for code set conversion from a 
  23378.           network code set to a local code set. This routine is used by client 
  23379.           and server applications. 
  23380.  
  23381.  Format 
  23382.  
  23383.                     #include <dce/codesets_stub.h>
  23384.  
  23385.                     void cs_byte_local_size(
  23386.                             rpc_binding_handle_t  binding,
  23387.                             unsigned32  network_code_set_value,
  23388.                             unsigned32  network_buffer_size,
  23389.                             idl_cs_convert_t  *conversion_type,
  23390.                             unsigned32  *local_buffer_size,
  23391.                             error_status_t  *status);
  23392.  
  23393.  Parameters 
  23394.  
  23395.           Input 
  23396.  
  23397.           binding       Specifies the target binding handle from which to 
  23398.                         obtain buffer size evaluation information. When called 
  23399.                         from the client stub, this value is the binding handle 
  23400.                         of a compatible server returned by the 
  23401.                         rpc_ns_binding_import_next or rpc_ns_binding_select 
  23402.                         routine. When called from the server stub, this value 
  23403.                         is a pointer to binding information that the client 
  23404.                         stub passed in the RPC call. 
  23405.  
  23406.           network_code_set_value The registered hexadecimal integer value that 
  23407.                         represents the code set used to transmit character data 
  23408.                         over the network. In general, the network code set is 
  23409.                         the code set that the client application's code sets 
  23410.                         evaluation routine has determined to be compatible for 
  23411.                         this client and server. When the caller is the client 
  23412.                         stub, this value is the receiving tag. When the caller 
  23413.                         is the server stub, this value is the sending tag. 
  23414.  
  23415.           network_buffer_size The size, in units of idl_byte, of the buffer 
  23416.                         that is allocated for the international character data. 
  23417.                         For a conformant array, this value is the network value 
  23418.                         of the size_is variable for the array; that is, the 
  23419.                         value is the size of the unmarshalled string if no 
  23420.                         conversion is done. 
  23421.  
  23422.           Output 
  23423.  
  23424.           conversion_type A pointer to the enumerated type defined in 
  23425.                         dce/idlbase.h that indicates whether data conversion is 
  23426.                         necessary and whether the existing buffer is sufficient 
  23427.                         for storing the results of the conversion. The 
  23428.                         conversion type can be one of the following values: 
  23429.  
  23430.                              idl_cs_no_convert        No code set conversion is 
  23431.                                                       required. 
  23432.  
  23433.                              idl_cs_new_buffer_convert The converted data must 
  23434.                                                       be written to a new 
  23435.                                                       buffer. 
  23436.  
  23437.           local_buffer_size A pointer to the buffer size that needs to be 
  23438.                         allocated to contain the converted data, in units of 
  23439.                         idl_byte. This value is to be used as the local value 
  23440.                         of the size_is variable for the array, and is non-NULL 
  23441.                         if a conformant array is to be unmarshalled. 
  23442.  
  23443.           status        Returns the status code from this routine. On 
  23444.                         successful completion, the routine returns rpc_s_ok. 
  23445.                         Otherwise, it returns rpc_s_ss_incompatible_codesets, 
  23446.                         which indicates that the specified code set does not 
  23447.                         match the code set specified in the sending tag in the 
  23448.                         binding handle. If this error occurs in the server 
  23449.                         stub, an exception is raised to the client application. 
  23450.  
  23451.                         When called from the server stub, this routine calls 
  23452.                         the routines dce_cs_loc_to_rgy and 
  23453.                         rpc_rgy_get_max_bytes. If either of these routines 
  23454.                         returns an error, the cs_byte_local_size routine raises 
  23455.                         an exception to the client application. 
  23456.  
  23457.  Usage 
  23458.  
  23459.           The cs_byte_local_size routine belongs to a set of DCE RPC routines 
  23460.           for use by client and server applications that are transferring 
  23461.           international character data in a heterogeneous character set and 
  23462.           code sets environment. 
  23463.  
  23464.           The cs_byte_local_size routine is one of the DCE RPC buffer sizing 
  23465.           routines that RPC stubs use before they marshall or unmarshall data 
  23466.           to determine whether the buffers allocated for code set conversion 
  23467.           need to be enlarged to hold the converted data. The buffer sizing 
  23468.           routines determine the type of conversion required and calculate the 
  23469.           size of the necessary buffer (if a new one is required); the RPC stub 
  23470.           then allocates a buffer of that size before it calls one of the code 
  23471.           set conversion routines. 
  23472.  
  23473.           Client and server stubs call the cs_byte_xxx_size routines when the 
  23474.           cs_byte type has been specified as the local data type using the 
  23475.           cs_char attribute in the attribute configuration file for the 
  23476.           application. 
  23477.  
  23478.           Applications do not call the cs_byte_local_size routine directly. 
  23479.           Client and server stubs call the routine before they unmarshall any 
  23480.           data. The stubs pass the routine a binding handle and a code set 
  23481.           value that identifies the code set that was used to transfer 
  23482.           international character data over the network. The stubs also specify 
  23483.           the network storage size of the data, in units of idl_byte, if a 
  23484.           conformant array is to be unmarshalled. 
  23485.  
  23486.           When called from a client stub, the cs_byte_local_size routine 
  23487.           determines the value of conversion_type from the client and server's 
  23488.           code set tag information stored in the binding handle by a code sets 
  23489.           evaluation routine or a tag-setting routine. If the conversion type 
  23490.           specified in the handle is idl_cs_new_buffer_convert, the routine 
  23491.           sets the conversion_type parameter to this value and, if a conformant 
  23492.           array is to be unmarshalled, calculates a new buffer size by 
  23493.           multiplying the value of local_buffer_size by the c_max_bytes value 
  23494.           and by an expansion factor for the code set specified in 
  23495.           network_code_set_value. The routine returns the new buffer size in 
  23496.           the local_buffer_size parameter. The size is specified in units of 
  23497.           cs_byte, which is the local representation used for international 
  23498.           character data (and is equivalent to the byte data type). 
  23499.  
  23500.           If the handle information specifies idl_cs_no_convert, the routine 
  23501.           assumes that no conversion is necessary and returns idl_cs_no_convert 
  23502.           in the conversion_type parameter. The routine also returns the value 
  23503.           of network_buffer_size in local_buffer_size if a conformant array is 
  23504.           to be marshalled. 
  23505.  
  23506.           In cases where the binding handle does not contain the results of 
  23507.           character and code sets evaluation, or where it is being called from 
  23508.           the server stub, the cs_byte_local_size routine determines the value 
  23509.           of conversion_type itself using the local code set value and the code 
  23510.           set value passed in the network_code_set_value parameter and returns 
  23511.           the appropriate conversion_type value. If a conformant array is to be 
  23512.           unmarshalled, and the routine finds that a new buffer is required to 
  23513.           hold the converted data, the routine calculates the size of this new 
  23514.           buffer (by multiplying the value of network_buffer_size by the local 
  23515.           code set c_max_bytes value and by an expansion factor) and returns 
  23516.           the results in units of cs_byte in local_buffer_size. 
  23517.  
  23518.  Note 
  23519.  
  23520.           In this release, arrays of cs_char must be conformant. Subject to 
  23521.           additional restrictions, fixed and varying arrays may be used. See 
  23522.           the README file for details. 
  23523.  
  23524.  Related Information 
  23525.  
  23526.           Routines: 
  23527.           cs_byte_net_size 
  23528.  
  23529.  
  23530. ΓòÉΓòÉΓòÉ 5.8.3. cs_byte_net_size ΓòÉΓòÉΓòÉ
  23531.  
  23532.  Purpose 
  23533.  
  23534.           Calculates the necessary buffer size for code set conversion from a 
  23535.           local code set to a network code set. This routine is used by client 
  23536.           and server applications. 
  23537.  
  23538.  Format 
  23539.  
  23540.                     #include <dce/codesets_stub.h>
  23541.  
  23542.                     void cs_byte_net_size(
  23543.                             rpc_binding_handle_t  binding,
  23544.                             unsigned32  network_code_set_value,
  23545.                             unsigned32  local_buffer_size,
  23546.                             idl_cs_convert_t  *conversion_type,
  23547.                             unsigned32  *network_buffer_size,
  23548.                             error_status_t  *status);
  23549.  
  23550.  Parameters 
  23551.  
  23552.           Input 
  23553.  
  23554.           binding       Specifies the target binding handle from which to 
  23555.                         obtain buffer size evaluation information. When called 
  23556.                         from the client stub, this value is the binding handle 
  23557.                         of a compatible server returned by the 
  23558.                         rpc_ns_binding_import_next or rpc_ns_binding_select 
  23559.                         routine. When called from the server stub, this value 
  23560.                         is a pointer to binding information that the client 
  23561.                         stub passed in the RPC call. 
  23562.  
  23563.           network_code_set_value The registered hexadecimal integer value that 
  23564.                         represents the code set to be used to transmit 
  23565.                         character data over the network. In general, the 
  23566.                         network code set is the code set that the client 
  23567.                         application's code sets evaluation routine has 
  23568.                         determined to be compatible for this client and server. 
  23569.                         When the caller is the client stub, this value is the 
  23570.                         sending tag. When the caller is the server stub, this 
  23571.                         value is the receiving tag. 
  23572.  
  23573.           local_buffer_size The size, in units of idl_byte, of the buffer that 
  23574.                         is allocated for the international character data. This 
  23575.                         value is the local value of the size_is variable for 
  23576.                         the array; that is, the value is the size of the 
  23577.                         marshalled string if no conversion is done. 
  23578.  
  23579.           Output 
  23580.  
  23581.           conversion_type A pointer to the enumerated type defined in 
  23582.                         dce/idlbase.h that indicates whether data conversion is 
  23583.                         necessary and whether existing storage is sufficient 
  23584.                         for storing the results of the conversion. The 
  23585.                         conversion type can be one of the following values: 
  23586.  
  23587.                              idl_cs_no_convert        No code set conversion is 
  23588.                                                       required. 
  23589.  
  23590.                              idl_cs_new_buffer_convert The converted data must 
  23591.                                                       be written to a new 
  23592.                                                       buffer. 
  23593.  
  23594.           network_buffer_size A pointer to the buffer size that needs to be 
  23595.                         allocated to contain the converted data, in units of 
  23596.                         idl_byte. This value is to be used as the network value 
  23597.                         of the size_is variable for the array, and is non-NULL 
  23598.                         if a conformant array is to be marshalled. 
  23599.  
  23600.           status        Returns the status code from this routine. On 
  23601.                         successful completion, the routine returns rpc_s_ok. 
  23602.                         Otherwise, it returns rpc_s_ss_incompatible_codesets, 
  23603.                         which indicates that the specified code set does not 
  23604.                         match the code set specified in the sending tag in the 
  23605.                         binding handle. If this error occurs in the server 
  23606.                         stub, an exception is raised to the client application. 
  23607.  
  23608.                         When called from the server stub, this routine calls 
  23609.                         the routines dcs_cs_loc_to_rgy and 
  23610.                         rpc_rgy_get_max_bytes. If either of these routines 
  23611.                         returns an error, the cs_byte_net_size routine raises 
  23612.                         an exception to the client application. 
  23613.  
  23614.  Usage 
  23615.  
  23616.           The cs_byte_net_size routine belongs to a set of DCE RPC routines for 
  23617.           use by client and server applications that are transferring 
  23618.           international character data in a heterogeneous character set and 
  23619.           code sets environment. 
  23620.  
  23621.           The cs_byte_net_size routine is one of the DCE RPC buffer sizing 
  23622.           routines that RPC stubs use before they marshall or unmarshall data 
  23623.           to determine whether the buffers allocated for code set conversion 
  23624.           need to be enlarged to hold the converted data. The buffer sizing 
  23625.           routines determine the type of conversion required and calculate the 
  23626.           size of the necessary buffer (if a new one is required). The RPC stub 
  23627.           then allocates a buffer of that size before it calls one of the code 
  23628.           set conversion routines. 
  23629.  
  23630.           Client and server stubs call the cs_byte_xxx_size routines when the 
  23631.           cs_byte type (which is equivalent to byte) has been specified as the 
  23632.           local data type using the cs_char attribute in the attribute 
  23633.           configuration file for the application. Applications do not call the 
  23634.           cs_byte_net_size routine directly. Client and server stubs call the 
  23635.           routine before they marshall any data. The stubs pass the routine a 
  23636.           binding handle and a code set value that identifies the code set to 
  23637.           be used to transfer international character data over the network. 
  23638.           The stubs also specify the local storage size of the data, in units 
  23639.           of byte. 
  23640.  
  23641.           When called from a client stub, the cs_byte_net_size routine 
  23642.           determines the value of conversion_type from the client and server's 
  23643.           code set tag information and set up the binding handle by a code sets 
  23644.           evaluation routine or a tag-setting routine. If the conversion type 
  23645.           specified in the handle is idl_cs_new_buffer_convert, the routine 
  23646.           sets the conversion_type parameter to this value and, if a conformant 
  23647.           array is to be marshalled, calculates a new buffer size by 
  23648.           multiplying the value of local_buffer_size by the c_max_bytes value 
  23649.           for the code set specified in network_code_set_value (the sending tag 
  23650.           parameter) and by an expansion factor. 
  23651.  
  23652.           The routine returns the new buffer size in the network_buffer_size 
  23653.           parameter. The size is specified in units of cs_byte, which is the 
  23654.           network representation used for international character data (and is 
  23655.           equivalent to the byte type). 
  23656.  
  23657.           If the handle information specifies idl_cs_no_convert, the routine 
  23658.           assumes that no conversion is necessary and returns idl_cs_no_convert 
  23659.           in the conversion_type parameter. The routine also returns the value 
  23660.           of local_buffer_size in network_buffer_size if a conformant array is 
  23661.           to be marshalled. 
  23662.  
  23663.           In cases where the binding handle does not contain the results of 
  23664.           character and code sets evaluation, or where it is being called from 
  23665.           the server stub, the cs_byte_net_size routine determines the value of 
  23666.           conversion_type itself using the local code set value and the code 
  23667.           set value passed in the network_code_set_value parameter and returns 
  23668.           the appropriate conversion_type value. If a conformant array is to be 
  23669.           marshalled, and the routine finds that a new buffer is required to 
  23670.           hold the converted data, the routine calculates the size of this new 
  23671.           buffer (by multiplying the value of local_buffer_size by the network 
  23672.           code set c_max_bytes value and by an expansion factor) and returns 
  23673.           the results, in units of cs_byte, in network_buffer_size. 
  23674.  
  23675.  Note 
  23676.  
  23677.           In this release, arrays of cs_char must be conformant. Subject to 
  23678.           additional restrictions, fixed and varying arrays may be used. See 
  23679.           the README file for details. 
  23680.  
  23681.  Related Information 
  23682.  
  23683.           Routines: 
  23684.           cs_byte_local_size 
  23685.  
  23686.  
  23687. ΓòÉΓòÉΓòÉ 5.8.4. cs_byte_to_netcs ΓòÉΓòÉΓòÉ
  23688.  
  23689.  Purpose 
  23690.  
  23691.           Converts international character data from a local code set to a 
  23692.           network code set. This routine is used by client and server 
  23693.           applications. 
  23694.  
  23695.  Format 
  23696.  
  23697.                     #include <dce/codesets_stub.h>
  23698.  
  23699.                     void cs_byte_to_netcs(
  23700.                             rpc_binding_handle_t  binding,
  23701.                             unsigned32  network_code_set_value,
  23702.                             idl_byte  *local_data,
  23703.                             unsigned32  local_data_length,
  23704.                             idl_byte  *network_data,
  23705.                             unsigned32  *network_data_length,
  23706.                             error_status_t  *status);
  23707.  
  23708.  Parameters 
  23709.  
  23710.           Input 
  23711.  
  23712.           binding       Specifies the target binding handle from which to 
  23713.                         obtain code set conversion information. When called 
  23714.                         from the client stub, this value is the binding handle 
  23715.                         of a compatible server returned by the 
  23716.                         rpc_ns_binding_import_next or rpc_ns_binding_select 
  23717.                         routine. When called from the server stub, this value 
  23718.                         is a pointer to binding information that the client 
  23719.                         stub passed in the RPC call. 
  23720.  
  23721.           network_code_set_value The registered hexadecimal integer value that 
  23722.                         represents the code set to be used to transmit 
  23723.                         character data over the network. In general, the 
  23724.                         network code set is the code set that the client 
  23725.                         application's code sets evaluation routine has 
  23726.                         determined to be compatible for this client and server. 
  23727.                         When the caller is the client stub, this value is the 
  23728.                         sending tag. When the caller is the server stub, this 
  23729.                         value is the receiving tag. 
  23730.  
  23731.           local_data    A pointer to the international character data to be 
  23732.                         transmitted, in the local code set encoding. 
  23733.  
  23734.           local_data_length The number of idl_byte data elements to be 
  23735.                         converted. For a conformant array, this value is the 
  23736.                         local value of the size_is variable. 
  23737.  
  23738.           Output 
  23739.  
  23740.           network_data  A pointer to the converted data, in units of idl_byte. 
  23741.  
  23742.           network_data_length A pointer to the length of the converted data, in 
  23743.                         units of idl_byte. 
  23744.  
  23745.           status        Returns the status code from this routine. On 
  23746.                         successful completion, the routine returns rpc_s_ok. 
  23747.                         Otherwise, it returns rpc_s_ss_incompatible_codesets, 
  23748.                         which indicates that the specified code set does not 
  23749.                         match the code set specified in the sending tag in the 
  23750.                         binding handle. If this error occurs in the server 
  23751.                         stub, an exception is raised to the client application. 
  23752.  
  23753.                         When running the host converter, the following errors 
  23754.                         can occur: 
  23755.  
  23756.                              rpc_s_ss_invalid_char_input 
  23757.                              rpc_s_ss_short_conv_buffer 
  23758.                              rpc_s_ss_iconv_error  (HP-UX reference platform 
  23759.                              only) 
  23760.                              rpc_s_ss_no_memory  (HP-UX reference platform 
  23761.                              only) 
  23762.  
  23763.           When called from the server stub, the routine calls the 
  23764.           dce_cs_loc_to_rgy routine and the host converter routines. If these 
  23765.           routines return an error, an exception is raised to the client 
  23766.           application. 
  23767.  
  23768.  Usage 
  23769.  
  23770.           The cs_byte_to_netcs routine belongs to a set of DCE RPC routines for 
  23771.           use by client and server applications that are transferring 
  23772.           international character data in a heterogeneous character set and 
  23773.           code sets environment. 
  23774.  
  23775.           The cs_byte_to_netcs routine is one of the DCE RPC stub code set 
  23776.           conversion routines that RPC stubs use before they marshall or 
  23777.           unmarshall data to convert international character data to and from 
  23778.           local and network code sets. 
  23779.  
  23780.           Client and server stubs call the cs_byte_xxx_netcs routines when the 
  23781.           cs_byte type has been specified as the local data type using the 
  23782.           cs_char attribute in the attribute configuration file for the 
  23783.           application. (The cs_byte type is equivalent to the byte type.) 
  23784.  
  23785.           Client and server stubs call the cs_byte_to_netcs routine before they 
  23786.           marshall any data. The routine takes a binding handle, a code set 
  23787.           value that identifies the code set to be used to transfer 
  23788.           international character data over the network, the address of the 
  23789.           data to be converted, and the length of the data to be converted, in 
  23790.           units of idl_byte. 
  23791.  
  23792.           The routine compares the code set specified as the network code set 
  23793.           to the local code set currently in use. If the routine finds that 
  23794.           code set conversion is necessary (because the local code set differs 
  23795.           from the code set specified to be used on the network), it determines 
  23796.           which host code set converter to call to convert the data and then 
  23797.           calls that converter. 
  23798.  
  23799.           The routine then returns the converted data, in idl_byte format. If 
  23800.           the data is a conformant array, the routine also returns the length 
  23801.           of the converted data, in units of idl_byte. 
  23802.  
  23803.           Applications can specify local data types other than cs_byte (the 
  23804.           local data type for which DCE RPC supplies stub code set conversion 
  23805.           routines) with the cs_char ACF attribute. In this case, the 
  23806.           application must also supply local_type_to_netcs and 
  23807.           local_type_from_netcs stub conversion routines for this type. 
  23808.  
  23809.  Note 
  23810.  
  23811.           In this release, arrays of cs_char must be conformant. Subject to 
  23812.           additional restrictions, fixed and varying arrays may be used. See 
  23813.           the README file for details. 
  23814.  
  23815.  Related Information 
  23816.  
  23817.           Routines: 
  23818.           cs_byte_from_netcs 
  23819.  
  23820.  
  23821. ΓòÉΓòÉΓòÉ 5.8.5. dce_cs_loc_to_rgy ΓòÉΓòÉΓòÉ
  23822.  
  23823.  Purpose 
  23824.  
  23825.           Maps a local name for a code set to a code set value in the code set 
  23826.           registry. This routine is used by client and server applications. 
  23827.  
  23828.  Format 
  23829.  
  23830.                     #include <dce/rpc.h>
  23831.  
  23832.                     void dce_cs_loc_to_rgy(
  23833.                             idl_char  *local_code_set_name,
  23834.                             unsigned32  *rgy_code_set_value,
  23835.                             unsigned16  *rgy_char_sets_number,
  23836.                             unsigned16  **rgy_char_sets_value,
  23837.                             error_status_t  *status);
  23838.  
  23839.  Parameters 
  23840.  
  23841.           Input 
  23842.  
  23843.           local_code_set_name A string that specifies the name that the local 
  23844.                         host's locale environment uses to refer to the code 
  23845.                         set. The string is a maximum of 32 bytes: 31 character 
  23846.                         data bytes plus a terminating NULL character. 
  23847.  
  23848.           Output 
  23849.  
  23850.           rgy_code_set_value The registered integer value that uniquely 
  23851.                         identifies the code set specified by 
  23852.                         local_code_set_name. 
  23853.  
  23854.           rgy_char_sets_number The number of character sets that the specified 
  23855.                         code set encodes. Specifying NULL prevents this routine 
  23856.                         from returning this parameter. 
  23857.  
  23858.           rgy_char_sets_value A pointer to an array of registered integer 
  23859.                         values that uniquely identify the character sets that 
  23860.                         the specified code set encodes. Specifying NULL 
  23861.                         prevents this routine from returning this parameter. 
  23862.                         The routine dynamically allocates this value. 
  23863.  
  23864.           status        Returns the status code from this routine. On 
  23865.                         successful completion, the routine returns dce_cs_c_ok. 
  23866.                         Otherwise, it returns one of the following errors: 
  23867.  
  23868.                              dce_cs_c_cannot_allocate_memory 
  23869.                              dce_cs_c_cannot_open_file 
  23870.                              dce_cs_c_cannot_read_file 
  23871.                              dce_cs_c_unknown 
  23872.                              dce_cs_c_not_found 
  23873.  
  23874.  Usage 
  23875.  
  23876.           The dce_cs_loc_to_rgy routine is a DCE function that maps operating 
  23877.           system-specific names for character/code set encodings to their 
  23878.           unique identifiers in the code set registry. 
  23879.  
  23880.           The routine is currently used by the DCE RPC routines for character 
  23881.           and code set interoperability, which permit DCE RPC clients and 
  23882.           servers to transfer international character data in a heterogeneous 
  23883.           character set and code sets environment. 
  23884.  
  23885.           The dce_cs_loc_to_rgy routine takes as input a string that holds the 
  23886.           host-specific local name of a code set and returns the corresponding 
  23887.           integer value that uniquely identifies that code set, as registered 
  23888.           in the host's code set registry. If the integer value does not exist 
  23889.           in the registry, the routine returns the status dce_cs_c_unknown. The 
  23890.           routine also returns the number of character sets that the code set 
  23891.           encodes and the registered integer values that uniquely identify 
  23892.           those character sets. Specifying NULL in the rgy_char_sets_number and 
  23893.           rgy_char_sets_value parameters prevents the routine from performing 
  23894.           the additional search for these values. Applications that want only 
  23895.           to obtain a code set value from the code set registry can specify 
  23896.           NULL for these parameters in order to improve the routine's 
  23897.           performance. If the value is returned from the routine, application 
  23898.           developers should free the array after it is used, since the array is 
  23899.           dynamically allocated. 
  23900.  
  23901.           The DCE RPC stub support routines for code set conversion can use 
  23902.           this routine to obtain the registered code set value that corresponds 
  23903.           to the code set they are currently using; that is, the local code set 
  23904.           specified in their host's locale environment. The stub routines for 
  23905.           code set conversion then compare their local code set value to the 
  23906.           code set value specified in the sending tag for the call to determine 
  23907.           whether code set conversion is necessary. 
  23908.  
  23909.           In general, programmers who are developing RPC applications that 
  23910.           transfer international characters do not need to call this routine 
  23911.           directly; the DCE RPC routines provided for code sets evaluation and 
  23912.           the DCE RPC stub support routines for code set conversion call this 
  23913.           routine on the client or server application's behalf. 
  23914.  
  23915.           However, programmers who are developing their own stub support 
  23916.           routines for code set conversion may want to include this routine in 
  23917.           their conversion code to map their current locale information to a 
  23918.           code set value in order to perform local-to-sending tag code set 
  23919.           comparison. 
  23920.  
  23921.  Related Information 
  23922.  
  23923.           Routines: 
  23924.           cs_byte_from_netcs 
  23925.           cs_byte_local_size 
  23926.           cs_byte_net_size 
  23927.           cs_byte_to_netcs 
  23928.           dce_cf_get_csrgy_filename 
  23929.           dce_cs_rgy_to_loc 
  23930.           rpc_rgy_get_codesets 
  23931.  
  23932.  
  23933. ΓòÉΓòÉΓòÉ 5.8.6. dce_cs_rgy_to_loc ΓòÉΓòÉΓòÉ
  23934.  
  23935.  Purpose 
  23936.  
  23937.           Maps a code set value in the code set registry to the local name for 
  23938.           a code set. This routine is used by client and server applications. 
  23939.  
  23940.  Format 
  23941.  
  23942.                     #include <dce/rpc.h>
  23943.  
  23944.                     void dce_cs_rgy_to_loc(
  23945.                             unsigned32  *rgy_code_set_value,
  23946.                             idl_char  **local_code_set_name,
  23947.                             unsigned16  *rgy_char_sets_number,
  23948.                             unsigned16  **rgy_char_sets_value,
  23949.                             error_status_t  *status);
  23950.  
  23951.  Parameters 
  23952.  
  23953.           Input 
  23954.  
  23955.           rgy_code_set_value The registered hexadecimal value that uniquely 
  23956.                         identifies the code set. 
  23957.  
  23958.           Output 
  23959.  
  23960.           local_code_set_name A string that specifies the name that the local 
  23961.                         host's locale environment uses to refer to the code 
  23962.                         set. The string is a maximum of 32 bytes: 31 character 
  23963.                         data bytes and a terminating NULL character. 
  23964.  
  23965.           rgy_char_sets_number The number of character sets that the specified 
  23966.                         code set encodes. Specifying NULL in this parameter 
  23967.                         prevents the routine from returning this value. 
  23968.  
  23969.           rgy_char_sets_value A pointer to an array of registered integer 
  23970.                         values that uniquely identify the character sets that 
  23971.                         the specified code set encodes. Specifying NULL in this 
  23972.                         parameter prevents the routine from returning this 
  23973.                         value. The routine dynamically allocates this value. 
  23974.  
  23975.           status        Returns the status code from this routine. On 
  23976.                         successful completion, the routine returns dce_cs_c_ok. 
  23977.                         Otherwise, it returns one of the following errors: 
  23978.  
  23979.                              dce_cs_c_cannot_allocate_memory 
  23980.                              dce_cs_c_cannot_open_file 
  23981.                              dce_cs_c_cannot_read_file 
  23982.                              dce_cs_c_unknown 
  23983.                              dce_cs_c_not_found 
  23984.  
  23985.  Usage 
  23986.  
  23987.           The dce_cs_rgy_to_loc routine is a DCE function that maps a unique 
  23988.           identifier for a code set in the code set registry to the operating 
  23989.           system-specific name for the code set, if it exists in the code set 
  23990.           registry. 
  23991.  
  23992.           The routine is currently used by the DCE RPC routines for character 
  23993.           and code set interoperability, which permit DCE applications to 
  23994.           transfer international characters in a heterogeneous character and 
  23995.           code sets environment. 
  23996.  
  23997.           The dce_cs_rgy_to_loc routine takes as input a registered integer 
  23998.           value of a code set and returns a string that holds the operating 
  23999.           system-specific, or local name, of the code set. 
  24000.  
  24001.           If the local code set name does not exist in the registry, the 
  24002.           routine returns the status dce_cs_c_unknown and returns an undefined 
  24003.           string. 
  24004.  
  24005.           The routine also returns the number of character sets that the code 
  24006.           set encodes and the registered integer values that uniquely identify 
  24007.           those character sets. Specifying NULL in the rgy_char_sets_number and 
  24008.           rgy_char_sets_value parameters prevents the routine from performing 
  24009.           the additional search for these values. Applications that want only 
  24010.           to obtain a local code set name from the code set registry can 
  24011.           specify NULL for these parameters in order to improve the routine's 
  24012.           performance. If the value is returned from the routine, application 
  24013.           developers should free the rgy_char_sets_value array after it is 
  24014.           used. 
  24015.  
  24016.           In general, client and server applications that use the DCE RPC 
  24017.           character and code set interoperablity features do not need to call 
  24018.           this routine directly; the DCE RPC stub support routines provided for 
  24019.           code set conversion call this routine on the client or server 
  24020.           application's behalf to obtain the string name that matches the name 
  24021.           of the host code set converter that they will call to perform the 
  24022.           actual code set conversion. 
  24023.  
  24024.           However, application programmers who are developing their own RPC 
  24025.           stub support routines for code set conversion might want to include 
  24026.           this routine in their conversion code to map code set values sent in 
  24027.           code set tags into the local names for the code sets so that they can 
  24028.           locate the correct operating system code set converter. 
  24029.  
  24030.  Related Information 
  24031.  
  24032.           Routines: 
  24033.           dce_cf_get_csrgy_filename 
  24034.           dce_cs_loc_to_rgy 
  24035.           rpc_rgy_get_codesets 
  24036.  
  24037.  
  24038. ΓòÉΓòÉΓòÉ 5.8.7. idl_es_decode_buffer ΓòÉΓòÉΓòÉ
  24039.  
  24040.  Purpose 
  24041.  
  24042.           Returns a buffer decoding handle to the IDL encoding services. 
  24043.  
  24044.  Format 
  24045.  
  24046.                     void idl_es_decode_buffer(
  24047.                             idl_byte  *encoded_data_buffer,
  24048.                             idl_ulong_int  buffer_size,
  24049.                             idl_es_handle_t  *es_handle,
  24050.                             error_status_t  *status);
  24051.  
  24052.  Parameters 
  24053.  
  24054.           Input 
  24055.  
  24056.           encoded_data_buffer The address of the buffer that contains the data 
  24057.                         to be decoded. 
  24058.  
  24059.           buffer_size   The number of bytes of data in the buffer to be 
  24060.                         decoded. 
  24061.  
  24062.           Output 
  24063.  
  24064.           es_handle     Returns the address of an IDL encoding services handle 
  24065.                         for use by a client or server decoding operation. 
  24066.  
  24067.           status        Returns the status code from this routine. On 
  24068.                         successful completion, the routine returns rpc_s_ok. 
  24069.                         Otherwise, it returns one of the following errors: 
  24070.  
  24071.                              rpc_s_ss_bad_buffer Bad buffer operation. 
  24072.                              rpc_s_no_memory Insufficient memory is available 
  24073.                                            to complete the operation. 
  24074.  
  24075.  Usage 
  24076.  
  24077.           The IDL encoding services provide client and server RPC applications 
  24078.           with a method for encoding data types in input parameters into a byte 
  24079.           stream and decoding data types in output parameters from a byte 
  24080.           stream without calling the RPC runtime. Encoding and decoding 
  24081.           operations are analogous to marshalling and unmarshalling, except 
  24082.           that the data is stored locally, and is not transmitted over the 
  24083.           network. Client and server applications can use the IDL encoding 
  24084.           services to create persistent storage for their data. Encoding 
  24085.           flattens complex data types into a byte stream for storage on disk, 
  24086.           while decoding restores the flattened data to complex form. 
  24087.  
  24088.           The idl_es_decode_buffer routine belongs to a set of routines that 
  24089.           return handles to the IDL encoding services for use by client and 
  24090.           server encoding and decoding operations. The information in the 
  24091.           handle controls the way in which the IDL encoding services manage 
  24092.           memory when encoding or decoding data. 
  24093.  
  24094.           The idl_es_decode_buffer routine returns a buffer decoding handle, 
  24095.           which directs the IDL encoding services to decode data from a single 
  24096.           application-supplied buffer of encoded data. 
  24097.  
  24098.  Related Information 
  24099.  
  24100.           Routine: 
  24101.           idl_es_decode_incremental 
  24102.  
  24103.  
  24104. ΓòÉΓòÉΓòÉ 5.8.8. idl_es_decode_incremental ΓòÉΓòÉΓòÉ
  24105.  
  24106.  Purpose 
  24107.  
  24108.           Returns an incremental decoding handle to the IDL encoding services. 
  24109.           This routine is used by client and server applications. 
  24110.  
  24111.  Format 
  24112.  
  24113.                     void idl_es_decode_incremental(
  24114.                             idl_void_p_t  state,
  24115.                             idl_es_read_fn_t  read_fn,
  24116.                             idl_es_handle_t  *es_handle,
  24117.                             error_status_t  *status);
  24118.  
  24119.  Parameters 
  24120.  
  24121.           Input/Output 
  24122.  
  24123.           state         Specifies the address of an application-provided data 
  24124.                         structure that coordinates the actions of successive 
  24125.                         calls to the routine specified in read_fn. The state 
  24126.                         data structure acts as a communications channel between 
  24127.                         the application and the read_fn routine. 
  24128.  
  24129.           Input 
  24130.  
  24131.           read_fn       Specifies the address of a user-provided routine that 
  24132.                         generates a buffer of encoded data for decoding by the 
  24133.                         IDL encoding services. The IDL encoding services call 
  24134.                         the routine in read_fn repeatedly until all of the data 
  24135.                         has been decoded. 
  24136.  
  24137.                         The following C definition for idl_es_read_fn_t 
  24138.                         illustrates the prototype for the read_fn routine: 
  24139.  
  24140.                                                 typedef void (*idl_es_read_fn_t)
  24141.                                                 (
  24142.                                                     idl_void_p_t  state,         /* in/out */
  24143.                                                     idl_byte  **buffer,          /* in */
  24144.                                                     idl_ulong_int  *size,        /* in */
  24145.                                                 );
  24146.  
  24147.                         The idl_es_decode_incremental routine passes the 
  24148.                         specified state parameter value as input to the routine 
  24149.                         in read_fn. The state data structure is the 
  24150.                         communications path between the application and the 
  24151.                         read_fn routine. For example, the application can use 
  24152.                         the state parameter to pass in an open file pointer 
  24153.                         from which the read_fn routine is to read encoded data. 
  24154.  
  24155.                         The buffer parameter specifies the address of the data 
  24156.                         to be decoded; this address must be 8-byte aligned. The 
  24157.                         size parameter specifies the size of the buffer to be 
  24158.                         decoded, and must be a multiple of 8 bytes unless it 
  24159.                         represents the size of the last buffer to be decoded. 
  24160.  
  24161.                         The read_fn routine should return an exception on 
  24162.                         error. 
  24163.  
  24164.           Output 
  24165.  
  24166.           es_handle     Returns the address of an IDL encoding services handle 
  24167.                         for use by a client or server decoding operation. 
  24168.  
  24169.           status        Returns the status code from this routine. On 
  24170.                         successful completion, the routine returns rpc_s_ok. 
  24171.                         Otherwise, it returns rpc_s_no_memory, which indicates 
  24172.                         that insufficient memory is available to complete the 
  24173.                         operation. 
  24174.  
  24175.  Usage 
  24176.  
  24177.           The IDL encoding services provide client and server RPC applications 
  24178.           with a method for encoding data types in input parameters into a byte 
  24179.           stream and decoding data types in output parameters from a byte 
  24180.           stream without calling the RPC runtime. Encoding and decoding 
  24181.           operations are analogous to marshalling and unmarshalling, except 
  24182.           that the data is stored locally and is not transmitted over the 
  24183.           network. Client and server applications can use the IDL encoding 
  24184.           services to create persistent storage for their data. Encoding 
  24185.           flattens complex data types into a byte stream for storage on disk, 
  24186.           while decoding restores the flattened data to complex form. 
  24187.  
  24188.           The idl_es_decode_incremental routine belongs to a set of routines 
  24189.           that return handles to the IDL encoding services for use by client 
  24190.           and server encoding and decoding operations. The information in the 
  24191.           handle controls the way in which the IDL encoding services manage 
  24192.           memory when encoding or decoding data. 
  24193.  
  24194.           The idl_es_decode_incremental routine returns an incremental decoding 
  24195.           handle, which directs the IDL encoding services to decode data by 
  24196.           calling the user-supplied read_fn routine, which generates a small 
  24197.           buffer of encoded data for the IDL encoding services to decode. The 
  24198.           routine passes the buffer address and size to the IDL encoding 
  24199.           services, which then decode the buffer. The IDL encoding services 
  24200.           call the read_fn routine repeatedly until there is no more data to 
  24201.           decode. 
  24202.  
  24203.  Related Information 
  24204.  
  24205.           Routines: 
  24206.           idl_es_decode_buffer 
  24207.           idl_es_encode_incremental 
  24208.  
  24209.  
  24210. ΓòÉΓòÉΓòÉ 5.8.9. idl_es_encode_dyn_buffer ΓòÉΓòÉΓòÉ
  24211.  
  24212.  Purpose 
  24213.  
  24214.           Returns a dynamic buffer encoding handle to the IDL encoding 
  24215.           services. 
  24216.  
  24217.           This routine is used by client and server applications. 
  24218.  
  24219.  Format 
  24220.  
  24221.                     void idl_es_encode_dyn_buffer(
  24222.                             idl_byte  **encoded_data_buffer,
  24223.                             idl_ulong_int  *buffer_size,
  24224.                             idl_es_handle_t  *es_handle,
  24225.                             error_status_t  *status);
  24226.  
  24227.  Parameters 
  24228.  
  24229.           Output 
  24230.  
  24231.           encoded_data_buffer The address to which the IDL encoding services 
  24232.                         writes the address of the buffer that contains the 
  24233.                         encoded data, when the encoding process is complete. 
  24234.                         When the application no longer needs the buffer, it 
  24235.                         should release the memory resource. See the DCE for 
  24236.                         OS/2 Warp: Administration Guide for an explanation of 
  24237.                         how to manage memory when using the IDL encoding 
  24238.                         services. 
  24239.  
  24240.           buffer_size   The address to which the IDL encoding services writes 
  24241.                         the size of the buffer that contains the encoded data 
  24242.                         when the encoding process is complete. 
  24243.  
  24244.           es_handle     Returns the address of an IDL encoding services handle 
  24245.                         for use by a client or server encoding operation. 
  24246.  
  24247.           status        Returns the status code from this routine. On 
  24248.                         successful completion, the routine returns rpc_s_ok. 
  24249.                         Otherwise, it returns one of the following errors: 
  24250.  
  24251.                              rpc_s_ss_bad_buffer Bad buffer operation. 
  24252.                              rpc_s_no_memory Insufficient memory is available 
  24253.                                            to complete the operation. 
  24254.  
  24255.  Usage 
  24256.  
  24257.           The IDL encoding services provide client and server RPC applications 
  24258.           with a method for encoding data types in input parameters into a byte 
  24259.           stream and decoding data types in output parameters from a byte 
  24260.           stream without calling the RPC runtime. Encoding and decoding 
  24261.           operations are analogous to marshalling and unmarshalling, except 
  24262.           that the data is stored locally, and is not transmitted over the 
  24263.           network. Client and server applications can use the IDL encoding 
  24264.           services to create persistent storage for their data. Encoding 
  24265.           flattens complex data types into a byte stream for storage on disk, 
  24266.           while decoding restores the flattened data to complex form. 
  24267.  
  24268.           The idl_es_encode_dyn_buffer routine belongs to a set of routines 
  24269.           that return handles to the IDL encoding services for use by client 
  24270.           and server encoding and decoding operations. The information in the 
  24271.           handle controls the way in which the IDL encoding services manage 
  24272.           memory when encoding or decoding data. 
  24273.  
  24274.           The idl_es_encode_dyn_buffer routine returns a dynamic buffer 
  24275.           encoding handle, which directs the IDL encoding services to store the 
  24276.           encoded data in a chain of small buffers, build an additional single 
  24277.           buffer that contains the encoded data, and pass that buffer's address 
  24278.           to the application. Dynamic buffering is the most expensive style of 
  24279.           IDL encoding services buffering, since two copies of the encoded data 
  24280.           exist (one in the chain of buffers, and one in the single buffer). 
  24281.  
  24282.  Related Information 
  24283.  
  24284.           Routines: 
  24285.           idl_es_encode_fixed_buffer 
  24286.           idl_es_encode_incremental 
  24287.  
  24288.  
  24289. ΓòÉΓòÉΓòÉ 5.8.10. idl_es_encode_fixed_buffer ΓòÉΓòÉΓòÉ
  24290.  
  24291.  Purpose 
  24292.  
  24293.           Returns a fixed buffer encoding handle to the IDL encoding services. 
  24294.  
  24295.  Format 
  24296.  
  24297.                     void idl_es_encode_fixed_buffer(
  24298.                             idl_byte  *data_buffer,
  24299.                             idl_ulong_int  data_buffer_size,
  24300.                             idl_ulong_int  *encoded_buffer_size,
  24301.                             idl_es_handle_t  *es_handle,
  24302.                             error_status_t  *status);
  24303.  
  24304.  Parameters 
  24305.  
  24306.           Input 
  24307.  
  24308.           data_buffer   The address of the application-supplied buffer. This 
  24309.                         address must be 8-byte aligned. 
  24310.  
  24311.           data_buffer_size The size of the application-supplied buffer. The 
  24312.                         size must be a multiple of 8 bytes. 
  24313.  
  24314.           Output 
  24315.  
  24316.           encoded_buffer_size Returns the address to which the IDL encoding 
  24317.                         services write the size of the encoded buffer when they 
  24318.                         have completed encoding the data. 
  24319.  
  24320.           es_handle     Returns the address of an IDL encoding services handle 
  24321.                         for use by a client or server encoding operation. 
  24322.  
  24323.           status        Returns the status code from this routine. On 
  24324.                         successful completion, the routine returns rpc_s_ok. 
  24325.                         Otherwise, it returns one of the following errors: 
  24326.  
  24327.                              rpc_s_bad_buffer Bad buffer operation. 
  24328.                              rpc_s_no_memory Insufficient memory is available 
  24329.                                            to complete the operation. 
  24330.  
  24331.  Usage 
  24332.  
  24333.           The IDL encoding services provide client and server RPC applications 
  24334.           with a method for encoding data types in input parameters into a byte 
  24335.           stream and decoding data types in output parameters from a byte 
  24336.           stream without calling the RPC runtime. Encoding and decoding 
  24337.           operations are analogous to marshalling and unmarshalling, except 
  24338.           that the data is stored locally, and is not transmitted over the 
  24339.           network. Client and server applications can use the IDL encoding 
  24340.           services to create persistent storage for their data. Encoding 
  24341.           flattens complex data types into a byte stream for storage on disk, 
  24342.           while decoding restores the flattened data to complex form. 
  24343.  
  24344.           The idl_es_encode_fixed_buffer routine belongs to a set of routines 
  24345.           that return handles to the IDL encoding services for use by client 
  24346.           and server encoding and decoding operations. The information in the 
  24347.           handle controls the way in which the IDL encoding services manage 
  24348.           memory when encoding or decoding data. 
  24349.  
  24350.           The idl_es_encode_fixed_buffer routine returns a fixed buffer 
  24351.           encoding handle, which directs the IDL encoding services to encode 
  24352.           data into a single buffer that the application has provided. The 
  24353.           fixed buffer encoding style is useful for applications that need only 
  24354.           one buffer for their encoding and decoding process. The buffer that 
  24355.           the application allocates must be large enough to hold all of the 
  24356.           encoded data, and must also allocate 56 bytes for each encoding 
  24357.           operation that the application has defined (this space is used to 
  24358.           hold per-operation header information.) 
  24359.  
  24360.  Related Information 
  24361.  
  24362.           Routines: 
  24363.           idl_es_encode_dyn_buffer 
  24364.           idl_es_encode_incremental 
  24365.  
  24366.  
  24367. ΓòÉΓòÉΓòÉ 5.8.11. idl_es_encode_incremental ΓòÉΓòÉΓòÉ
  24368.  
  24369.  Purpose 
  24370.  
  24371.           Returns an incremental encoding handle to the IDL encoding services. 
  24372.           This routine is used by client and server applications. 
  24373.  
  24374.  Format 
  24375.  
  24376.                     void idl_es_encode_incremental(
  24377.                             idl_void_p_t  state,
  24378.                             idl_es_allocate_fn_t  allocate_fn,
  24379.                             idl_es_write_fn_t  write_fn,
  24380.                             idl_es_handle_t  *es_handle,
  24381.                             error_status_t  *status);
  24382.  
  24383.  Parameters 
  24384.  
  24385.           Input/Output 
  24386.  
  24387.           state         Specifies the address of an application-provided data 
  24388.                         structure that coordinates the actions of the routines 
  24389.                         in allocate_fn and write_fn. The state data structure 
  24390.                         acts as a communications channel between the 
  24391.                         application and the allocate_fn and write_fn routines. 
  24392.  
  24393.           Input 
  24394.  
  24395.           allocate_fn   Specifies the address of a user-provided routine that 
  24396.                         allocates an empty buffer. The encoding stub uses the 
  24397.                         allocated buffer to store encoded data. 
  24398.  
  24399.                         The following C definition for idl_es_allocate_fn_t 
  24400.                         illustrates the prototype for the buffer allocation 
  24401.                         routine: 
  24402.  
  24403.                                                 typedef void (*idl_es_allocate_fn_t)
  24404.                                                 (
  24405.                                                     idl_void_p_t  state,            /* in/out */
  24406.                                                     idl_byte  **buffer,             /* out */
  24407.                                                     idl_ulong_int  *size,           /* in/out */
  24408.                                                 );
  24409.  
  24410.                         The idl_es_encode_incremental routine passes the 
  24411.                         specified state parameter value as input to the 
  24412.                         allocate_fn buffer allocation routine. When the IDL 
  24413.                         encoding services call the allocate_fn routine, the 
  24414.                         value at the address indicated by size represents the 
  24415.                         buffer size that the IDL encoding services have 
  24416.                         requested the routine to allocate. When the allocate_fn 
  24417.                         buffer allocation routine allocates the buffer, it 
  24418.                         writes the actual size of the allocated buffer to this 
  24419.                         parameter; the value must be a multiple of eight bytes. 
  24420.                         The buffer parameter specifies the address of the 
  24421.                         allocated buffer; this address must be 8-byte aligned. 
  24422.  
  24423.                         The allocate_fn routine should return an exception on 
  24424.                         error. 
  24425.  
  24426.           write_fn      Specifies the address of a user-provided routine that 
  24427.                         writes the contents of a buffer that contains data that 
  24428.                         has been encoded by the IDL encoding services. The IDL 
  24429.                         encoding services call this routine when the buffer 
  24430.                         allocated by allocate_fn is full, or when all of the 
  24431.                         application's encoding operation parameters have been 
  24432.                         encoded. 
  24433.  
  24434.                         The following C definition for idl_es_write_fn_t 
  24435.                         illustrates the prototype for the write_fn routine: 
  24436.  
  24437.                                                 typedef void (*idl_es_write_fn_t)
  24438.                                                 (
  24439.                                                     idl_void_p_t  state,            /* in/out */
  24440.                                                     idl_byte  *buffer,              /* in */
  24441.                                                     idl_ulong_int  size,             /* in */
  24442.                                                 );
  24443.  
  24444.                         The idl_es_encode_incremental routine passes the 
  24445.                         specified state parameter value as input to the 
  24446.                         write_fn routine. The buffer parameter value is the 
  24447.                         address of the data that the IDL encoding services have 
  24448.                         encoded. The size parameter value is the size, in 
  24449.                         bytes, of the encoded data. 
  24450.  
  24451.                         The write_fn routine should return an exception on 
  24452.                         error. 
  24453.  
  24454.           Output 
  24455.  
  24456.           es_handle     Returns the address of an IDL encoding services handle 
  24457.                         for use by a client or server encoding operation. 
  24458.  
  24459.           status        Returns the status code from this routine. On 
  24460.                         successful completion, the routine returns rpc_s_ok. 
  24461.                         Otherwise, it returns rpc_s_no_memory, which indicates 
  24462.                         that insufficient memory is available to complete the 
  24463.                         operation. 
  24464.  
  24465.  Usage 
  24466.  
  24467.           The IDL encoding services provide client and server RPC applications 
  24468.           with a method for encoding data types in input parameters into a byte 
  24469.           stream and decoding data types in output parameters from a byte 
  24470.           stream without calling the RPC runtime. Encoding and decoding 
  24471.           operations are analogous to marshalling and unmarshalling, except 
  24472.           that the data is stored locally, and is not transmitted over the 
  24473.           network. Client and server applications can use the IDL encoding 
  24474.           services to create persistent storage for their data. Encoding 
  24475.           flattens complex data types into a byte stream for storage on disk, 
  24476.           while decoding restores the flattened data to complex form. 
  24477.  
  24478.           The idl_es_encode_incremental routine belongs to a set of routines 
  24479.           that return handles to the IDL encoding services for use by client 
  24480.           and server encoding and decoding operations. The information in the 
  24481.           handle controls the way in which the IDL encoding services manage 
  24482.           memory when encoding or decoding data. 
  24483.  
  24484.           The idl_es_encode_incremental routine returns an incremental encoding 
  24485.           handle, which directs the IDL encoding services to encode data into a 
  24486.           chain of small buffers that the user-provided allocate_fn routine 
  24487.           manages. The user-provided write_fn routine writes the encoded data 
  24488.           in these buffers back for access by the application. 
  24489.  
  24490.           The state data structure is the communications path between the 
  24491.           application and the routines in allocate_fn and write_fn. For 
  24492.           example, the application can build a cache of pre-allocated memory to 
  24493.           store encoded data, and store pointers to that pre-allocated memory 
  24494.           in the state data structure. When called by the IDL encoding services 
  24495.           to allocate a buffer, the allocate_fn routine can search the state 
  24496.           data structure for a free memory location to use. 
  24497.  
  24498.  Related Information 
  24499.  
  24500.           Routines: 
  24501.           idl_es_decode_incremental 
  24502.           idl_es_encode_dyn_buffer 
  24503.           idl_es_encode_fixed_buffer 
  24504.  
  24505.  
  24506. ΓòÉΓòÉΓòÉ 5.8.12. idl_es_handle_free ΓòÉΓòÉΓòÉ
  24507.  
  24508.  Purpose 
  24509.  
  24510.           Frees an IDL encoding services handle. 
  24511.  
  24512.  Format 
  24513.  
  24514.                     void idl_es_handle_free(
  24515.                             idl_es_handle_t  *es_handle,
  24516.                             error_status_t  *status);
  24517.  
  24518.  Parameters 
  24519.  
  24520.           Input/Output 
  24521.  
  24522.           es_handle     The address of the handle whose resources are to be 
  24523.                         freed. The handle is made NULL by this operation. 
  24524.  
  24525.           Output 
  24526.  
  24527.           status        Returns the status code from this routine. On 
  24528.                         successful completion, the routine returns rpc_s_ok. 
  24529.                         Otherwise, it returns an error. 
  24530.  
  24531.  Usage 
  24532.  
  24533.           The idl_es_handle_free routine frees an IDL encoding services handle 
  24534.           that has been allocated by one of the IDL encoding services 
  24535.           handle-returning routines. 
  24536.  
  24537.  Related Information 
  24538.  
  24539.           Routines: 
  24540.           idl_es_decode_buffer 
  24541.           idl_es_decode_incremental 
  24542.           idl_es_encode_dyn_buffer 
  24543.           idl_es_encode_fixed_buffer 
  24544.           idl_es_encode_incremental 
  24545.  
  24546.  
  24547. ΓòÉΓòÉΓòÉ 5.8.13. idl_es_inq_attrs ΓòÉΓòÉΓòÉ
  24548.  
  24549.  Purpose 
  24550.  
  24551.           Returns the flags from an IDL encoding services handle. 
  24552.  
  24553.  Format 
  24554.  
  24555.                     void idl_es_inq_attrs(
  24556.                             idl_es_handle_t  es_handle,
  24557.                             unsigned32  *flags,
  24558.                             error_status_t  *status);
  24559.  
  24560.  Parameters 
  24561.  
  24562.           Input 
  24563.  
  24564.           es_handle     An encoding services handle returned by one of the IDL 
  24565.                         encoding services routines. 
  24566.  
  24567.           Output 
  24568.  
  24569.           flags         Returns the flags stored in the IDL encoding services 
  24570.                         handle that is associated with the encoded data. 
  24571.  
  24572.           status        Returns the status code from this routine. The possible 
  24573.                         status code is rpc_s_ok, which indicates success. 
  24574.  
  24575.  Usage 
  24576.  
  24577.           The idl_es_inq_attrs routine returns the flags stored in the IDL 
  24578.           encoding services handle that is associated with the encoded data. 
  24579.           Applications can use the idl_es_set_attrs routine to set the flags. 
  24580.           Currently, the only valid flag that can be set is 
  24581.           IDL_ES_NO_ENCODING_CHECK, which tells the encoding services to not 
  24582.           check the interface ID so an interface that did not encode data can 
  24583.           decode parts of it, such as a common header. 
  24584.  
  24585.  Related Information 
  24586.  
  24587.           Routines: 
  24588.           idl_es_set_attrs 
  24589.           idl_es_set_transfer_syntax 
  24590.  
  24591.  
  24592. ΓòÉΓòÉΓòÉ 5.8.14. idl_es_inq_encoding_id ΓòÉΓòÉΓòÉ
  24593.  
  24594.  Purpose 
  24595.  
  24596.           Identifies an operation within an interface that has been called to 
  24597.           encode data using the IDL encoding services. 
  24598.  
  24599.  Format 
  24600.  
  24601.                     void idl_es_inq_encoding_id(
  24602.                             idl_es_handle_t  es_handle,
  24603.                             rpc_if_id_t  *if_id,
  24604.                             idl_ulong_int  *op_num,
  24605.                             error_status_t  *status);
  24606.  
  24607.  Parameters 
  24608.  
  24609.           Input 
  24610.  
  24611.           es_handle     An encoding services handle returned by one of the IDL 
  24612.                         encoding services handle-returning routines. 
  24613.  
  24614.           Output 
  24615.  
  24616.           if_id         Returns the interface UUID and version number assigned 
  24617.                         to the interface that defines the operation that 
  24618.                         encoded the data. This information is stored in the IDL 
  24619.                         encoding services handle that is associated with the 
  24620.                         encoded data. 
  24621.  
  24622.           op_num        Returns the operation number assigned to the operation 
  24623.                         that encoded the data. Operations are numbered in the 
  24624.                         order in which they appear in the interface definition, 
  24625.                         starting with zero (0). The operation number for the 
  24626.                         operation that encoded the data is stored in the IDL 
  24627.                         encoding services handle that is associated with the 
  24628.                         encoded data. 
  24629.  
  24630.           status        Returns the status code from this routine. On 
  24631.                         successful completion, the routine returns rpc_s_ok. 
  24632.                         Otherwise, it returns rpc_s_unknown_if, which indicates 
  24633.                         that the interface identifier and operation number are 
  24634.                         unavailable. 
  24635.  
  24636.  Usage 
  24637.  
  24638.           The IDL encoding services provide client and server RPC applications 
  24639.           with a method for encoding data types in input parameters into a byte 
  24640.           stream and decoding data types in output parameters from a byte 
  24641.           stream without calling the RPC runtime. Encoding and decoding 
  24642.           operations are analogous to marshalling and unmarshalling, except 
  24643.           that the data is stored locally, and is not transmitted over the 
  24644.           network. Client and server applications can use the IDL encoding 
  24645.           services to create persistent storage for their data. Encoding 
  24646.           flattens complex data types into a byte stream for storage on disk, 
  24647.           while decoding restores the flattened data to complex form. 
  24648.  
  24649.           The idl_es_inq_encoding_id routine returns the identity of an 
  24650.           operation within an application that has been used to encode data 
  24651.           using the IDL encoding services. Applications can use this routine to 
  24652.           determine the identity of an encoding operation, for example, before 
  24653.           calling their decoding operations. 
  24654.  
  24655.  Related Information 
  24656.  
  24657.           Routines: 
  24658.           idl_es_decode_buffer 
  24659.           idl_es_decode_incremental 
  24660.           idl_es_encode_dyn_buffer 
  24661.           idl_es_encode_fixed_buffer 
  24662.           idl_es_encode_incremental 
  24663.  
  24664.  
  24665. ΓòÉΓòÉΓòÉ 5.8.15. idl_es_set_attrs ΓòÉΓòÉΓòÉ
  24666.  
  24667.  Purpose 
  24668.  
  24669.           Sets attribute flags in an IDL encoding services handle. 
  24670.  
  24671.  Format 
  24672.  
  24673.                     void idl_es_set_attrs(
  24674.                             idl_es_handle_t  es_handle,
  24675.                             unsigned32  *flags,
  24676.                             error_status_t  *status);
  24677.  
  24678.  Parameters 
  24679.  
  24680.           Input 
  24681.  
  24682.           es_handle     An encoding services handle returned by one of the IDL 
  24683.                         encoding services routines. 
  24684.  
  24685.           flags         Specifies the flags to be stored in association with 
  24686.                         the IDL encoding services handle. 
  24687.  
  24688.           Output 
  24689.  
  24690.           status        Returns the status code from this routine. The possible 
  24691.                         status code is rpc_s_ok, which indicates success. 
  24692.  
  24693.  Usage 
  24694.  
  24695.           The idl_es_set_attrs routine sets the attribute flags to be stored in 
  24696.           the IDL encoding services handle that is associated with the encoded 
  24697.           data. Applications can use the idl_es_inq_attrs routine to get the 
  24698.           flags set by this routine. Currently, the only valid flag that can be 
  24699.           set is IDL_ES_NO_ENCODING_CHECK. 
  24700.  
  24701.           Using idl_es_set_attrs with the IDL_ES_NO_ENCODING_CHECK flag causes 
  24702.           IDL, during decoding, to not check the validity of the interface 
  24703.           UUIDs and version numbers. This allows an interface that did not 
  24704.           encode the data to decode it or parts of it, such as a common header. 
  24705.  
  24706.  Related Information 
  24707.  
  24708.           Routines: 
  24709.           idl_es_inq_attrs 
  24710.           idl_es_set_transfer_syntax 
  24711.  
  24712.  
  24713. ΓòÉΓòÉΓòÉ 5.8.16. idl_es_set_transfer_syntax ΓòÉΓòÉΓòÉ
  24714.  
  24715.  Purpose 
  24716.  
  24717.           Sets a transfer syntax. 
  24718.  
  24719.  Format 
  24720.  
  24721.                     void idl_es_set_transfer_syntax(
  24722.                             idl_es_handle_t  es_handle,
  24723.                             idl_es_transfer_syntax_t  es_transfer_syntax,
  24724.                             error_status_t  *status);
  24725.  
  24726.  Parameters 
  24727.  
  24728.           Input/Output 
  24729.  
  24730.           es_handle     Specifies the user's encoding services handle. 
  24731.  
  24732.           Input 
  24733.  
  24734.           es_transfer_syntax Specifies the requested transfer syntax. 
  24735.  
  24736.           Output 
  24737.  
  24738.           status        Returns the status code from this routine. On 
  24739.                         successful completion, the routine returns rpc_s_ok. 
  24740.                         Otherwise, it returns rpc_s_tsyntaxes_unsupported, 
  24741.                         which indicates that the transfer syntaxes are 
  24742.                         unsupported. 
  24743.  
  24744.  Usage 
  24745.  
  24746.           The idl_es_set_transfer_syntax routine is a machinery for platforms 
  24747.           that support encodings in more than one transfer syntax. You must 
  24748.           call this routine before encoding data if you want a transfer syntax 
  24749.           other than the default.  If only one transfer syntax is supported by 
  24750.           the platform, this routine can be used to explicitly specify the 
  24751.           transfer syntax. Currently, the only valid syntax that can be set is 
  24752.           idl_es_transfer_syntax_ndr. 
  24753.  
  24754.  Related Information 
  24755.  
  24756.           Routines: 
  24757.           idl_es_inq_attrs 
  24758.           idl_es_set_attrs 
  24759.  
  24760.  
  24761. ΓòÉΓòÉΓòÉ 5.8.17. rpc_binding_copy ΓòÉΓòÉΓòÉ
  24762.  
  24763.  Purpose 
  24764.  
  24765.           Returns a copy of a binding handle. This routine is used by client or 
  24766.           server applications. 
  24767.  
  24768.  Format 
  24769.  
  24770.                     #include <dce/rpc.h>
  24771.  
  24772.                     void rpc_binding_copy(
  24773.                             rpc_binding_handle_t  source_binding,
  24774.                             rpc_binding_handle_t  *destination_binding,
  24775.                             unsigned32  *status);
  24776.  
  24777.  Parameters 
  24778.  
  24779.           Input 
  24780.  
  24781.           source_binding Specifies the server binding handle whose referenced 
  24782.                         binding information is copied. 
  24783.  
  24784.           Output 
  24785.  
  24786.           destination_binding Returns the server binding handle that refers to 
  24787.                         the copied binding information. 
  24788.  
  24789.           status        Returns the status code from this routine. On 
  24790.                         successful completion, the routine returns rpc_s_ok. 
  24791.                         Otherwise, it returns one of the following errors: 
  24792.  
  24793.                              rpc_s_invalid_binding The binding handle is not 
  24794.                                                    valid. 
  24795.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  24796.                                                    for the operation. 
  24797.  
  24798.  Usage 
  24799.  
  24800.           The rpc_binding_copy routine copies the server binding information 
  24801.           referenced by the binding handle specified in the source_binding 
  24802.           parameter. This routine returns a new server binding handle for the 
  24803.           copied binding information. The new server binding handle is returned 
  24804.           in the destination_binding parameter. 
  24805.  
  24806.           Use the rpc_binding_copy routine if you want a change (made to 
  24807.           binding information by one thread) not to affect the binding 
  24808.           information used by other threads. See Binding Handle for more 
  24809.           details about the use of the rpc_binding_copy routine. 
  24810.  
  24811.           After calling this routine, operations performed on the 
  24812.           source_binding binding handle do not affect the binding information 
  24813.           referenced by the destination_binding binding handle. Similarly, 
  24814.           operations performed on the destination_binding binding handle do not 
  24815.           affect the binding information referenced by the source_binding 
  24816.           binding handle. 
  24817.  
  24818.           If you want the changes made to binding information by one thread to 
  24819.           affect the binding information used by other threads, your program 
  24820.           must share a single binding handle across the threads. In this case 
  24821.           the application controls binding handle concurrency. 
  24822.  
  24823.           When an application is finished using the binding handle specified by 
  24824.           the destination_binding parameter, the application calls the 
  24825.           rpc_binding_free routine to release the memory used by the 
  24826.           destination_binding binding handle and its referenced binding 
  24827.           information. 
  24828.  
  24829.  Related Information 
  24830.  
  24831.           Routines: 
  24832.           rpc_binding_free 
  24833.  
  24834.  
  24835. ΓòÉΓòÉΓòÉ 5.8.18. rpc_binding_free ΓòÉΓòÉΓòÉ
  24836.  
  24837.  Purpose 
  24838.  
  24839.           Releases binding handle resources. This routine is used by client or 
  24840.           server applications. 
  24841.  
  24842.  Format 
  24843.  
  24844.                     #include <dce/rpc.h>
  24845.  
  24846.                     void rpc_binding_free(
  24847.                             rpc_binding_handle_t  *binding,
  24848.                             unsigned32  *status);
  24849.  
  24850.  Parameters 
  24851.  
  24852.           Input/Output 
  24853.  
  24854.           binding       Specifies the server binding handle to free. 
  24855.  
  24856.           Output 
  24857.  
  24858.           status        Returns the status code from this routine. On 
  24859.                         successful completion, the routine returns rpc_s_ok. 
  24860.                         Otherwise, it returns one of the following errors: 
  24861.  
  24862.                              rpc_s_invalid_binding The binding handle is not 
  24863.                                                   valid. 
  24864.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  24865.                                                   for the operation. 
  24866.  
  24867.  Usage 
  24868.  
  24869.           The rpc_binding_free routine frees the memory used by a server 
  24870.           binding handle and its referenced binding information. Use this 
  24871.           routine when your application is finished using a server binding 
  24872.           handle that was dynamically created during program execution. 
  24873.  
  24874.           If the free-binding operation succeeds, the binding parameter returns 
  24875.           the value NULL. 
  24876.  
  24877.           An application can dynamically create binding handles by calling any 
  24878.           of the following routines: 
  24879.  
  24880.             o  rpc_binding_copy 
  24881.             o  rpc_binding_from_string_binding 
  24882.             o  rpc_ns_binding_import_next 
  24883.             o  rpc_ns_binding_select 
  24884.             o  rpc_server_inq_bindings. 
  24885.  
  24886.  Related Information 
  24887.  
  24888.           Routines: 
  24889.           rpc_binding_copy 
  24890.           rpc_binding_from_string_binding 
  24891.           rpc_binding_vector_free 
  24892.           rpc_ns_binding_import_next 
  24893.           rpc_ns_binding_lookup_next 
  24894.           rpc_ns_binding_select 
  24895.           rpc_server_inq_bindings 
  24896.  
  24897.  
  24898. ΓòÉΓòÉΓòÉ 5.8.19. rpc_binding_from_string_binding ΓòÉΓòÉΓòÉ
  24899.  
  24900.  Purpose 
  24901.  
  24902.           Returns a binding handle from a string representation of a binding 
  24903.           handle. This routine is used by client or management applications. 
  24904.  
  24905.  Format 
  24906.  
  24907.                     #include <dce/rpc.h>
  24908.  
  24909.                     void rpc_binding_from_string_binding(
  24910.                             unsigned_char_t  *string_binding,
  24911.                             rpc_binding_handle_t   *binding,
  24912.                             unsigned32  *status);
  24913.  
  24914.  Parameters 
  24915.  
  24916.           Input 
  24917.  
  24918.           string_binding Specifies a string representation of a binding handle. 
  24919.  
  24920.           Output 
  24921.  
  24922.           binding       Returns the server binding handle. 
  24923.  
  24924.           status        Returns the status code from this routine. On 
  24925.                         successful completion, the routine returns rpc_s_ok. 
  24926.                         Otherwise, it returns one of the following errors: 
  24927.  
  24928.                              rpc_s_invalid_arg    The argument is not valid. 
  24929.                              rpc_s_invalid_endpoint_format The endpoint format 
  24930.                                                   is not valid. 
  24931.                              rpc_s_invalid_rpc_protseq The protocol sequence is 
  24932.                                                   not valid. 
  24933.                              rpc_s_invalid_string_binding The string binding is 
  24934.                                                   not valid. 
  24935.                              rpc_s_protseq_not_supported Protocol sequence not 
  24936.                                                   supported on this host. 
  24937.                              uuid_s_bad_version   Bad UUID version. 
  24938.                              uuid_s_invalid_string_uuid The string UUID format 
  24939.                                                   is not valid. 
  24940.  
  24941.  Usage 
  24942.  
  24943.           The rpc_binding_from_string_binding routine creates a server binding 
  24944.           handle from a string representation of a binding handle. 
  24945.  
  24946.           The string_binding parameter does not need to contain an object UUID. 
  24947.           In this case, the returned binding contains a nil UUID. 
  24948.  
  24949.           If the provided string_binding parameter does not contain an endpoint 
  24950.           field, the returned binding parameter is a partially bound server 
  24951.           binding handle. 
  24952.  
  24953.           If the provided string_binding parameter does contain an endpoint 
  24954.           field, the returned binding parameter is a fully bound server binding 
  24955.           handle with a well-known endpoint. 
  24956.  
  24957.           If the provided string_binding parameter does not contain a host 
  24958.           address field, the returned binding parameter refers to the local 
  24959.           host. 
  24960.  
  24961.           To create a string binding, call the rpc_string_binding_compose 
  24962.           routine or call the rpc_binding_to_string_binding routine or provide 
  24963.           a character string constant. 
  24964.  
  24965.           When an application finishes using the binding parameter, the 
  24966.           application calls the rpc_binding_free routine to release the memory 
  24967.           used by the binding handle. 
  24968.  
  24969.           See Binding Handle for an explanation of partially and fully bound 
  24970.           binding handles. 
  24971.  
  24972.  Related Information 
  24973.  
  24974.           Routines: 
  24975.           rpc_binding_copy 
  24976.           rpc_binding_free 
  24977.           rpc_binding_to_string_binding 
  24978.           rpc_string_binding_compose 
  24979.  
  24980.  
  24981. ΓòÉΓòÉΓòÉ 5.8.20. rpc_binding_inq_auth_caller ΓòÉΓòÉΓòÉ
  24982.  
  24983.  Purpose 
  24984.  
  24985.           Returns authentication and authorization information from the binding 
  24986.           handle for an authenticated client. This routine is used by server 
  24987.           applications. 
  24988.  
  24989.  Format 
  24990.  
  24991.                     #include <dce/rpc.h>
  24992.                     #include <dce/id_base.h>
  24993.  
  24994.                     void rpc_binding_inq_auth_caller(
  24995.                             rpc_binding_handle_t  binding_handle,
  24996.                             rpc_authz_cred_handle_t  *privs,
  24997.                             unsigned_char_p_t  *server_princ_name,
  24998.                             unsigned32  *protect_level,
  24999.                             unsigned32  *authn_svc,
  25000.                             unsigned32  *authz_svc,
  25001.                             unsigned32  *status);
  25002.  
  25003.  Parameters 
  25004.  
  25005.           Input 
  25006.  
  25007.           binding_handle Specifies the client binding handle from which to 
  25008.                         return the authentication and authorization 
  25009.                         information. 
  25010.  
  25011.           Output 
  25012.  
  25013.           privs         Returns an opaque handle to the authorization 
  25014.                         information for the client that made the remote 
  25015.                         procedure call on binding_handle. The data referenced 
  25016.                         by this parameter is read-only and should not be 
  25017.                         modified by the server. If the server wants to preserve 
  25018.                         any of the returned data, it must copy the data into 
  25019.                         server-allocated memory. 
  25020.  
  25021.           server_princ_name Returns a pointer to the server principal name 
  25022.                         specified by the client that made the remote procedure 
  25023.                         call on binding_handle. The content of the returned 
  25024.                         name and its syntax is defined by the authentication 
  25025.                         service in use. 
  25026.  
  25027.                         Specifying NULL prevents the routine from returning 
  25028.                         this parameter. In this case, the caller does not have 
  25029.                         to call the rpc_string_free routine. 
  25030.  
  25031.           protect_level Returns the protection level requested by the client 
  25032.                         that made the remote procedure call on binding_handle. 
  25033.                         The protection level determines the degree to which 
  25034.                         authenticated communications between the client and the 
  25035.                         server are protected. Specifying NULL prevents the 
  25036.                         routine from returning this parameter. 
  25037.  
  25038.                         The possible protection levels are: 
  25039.  
  25040.                              rpc_c_protect_level_default Uses the default 
  25041.                                                       protection level for the 
  25042.                                                       specified authentication 
  25043.                                                       service. 
  25044.  
  25045.                              rpc_c_protect_level_none Performs no protection. 
  25046.  
  25047.                              rpc_c_protect_level_connect Performs protection 
  25048.                                                       only when the client 
  25049.                                                       establishes a 
  25050.                                                       relationship with the 
  25051.                                                       server. 
  25052.  
  25053.                              rpc_c_protect_level_call Performs protection only 
  25054.                                                       at the beginning of each 
  25055.                                                       remote procedure call 
  25056.                                                       when the server receives 
  25057.                                                       the request. 
  25058.  
  25059.                              rpc_c_protect_level_pkt  Ensures that all data 
  25060.                                                       received is from the 
  25061.                                                       expected client. 
  25062.  
  25063.                              rpc_c_protect_level_pkt_integ Ensures and verifies 
  25064.                                                       that none of the data 
  25065.                                                       transferred between 
  25066.                                                       client and server has 
  25067.                                                       been modified. 
  25068.  
  25069.                              rpc_c_protect_level_cdmf_priv Performs protection 
  25070.                                                       as specified by all of 
  25071.                                                       the previous levels and 
  25072.                                                       also encrypts each remote 
  25073.                                                       procedure call parameter 
  25074.                                                       value. This protection 
  25075.                                                       level provides a little 
  25076.                                                       lower level of packet 
  25077.                                                       privacy than 
  25078.                                                       rpc_c_protect_level_pkt_privacy. 
  25079.  
  25080.                              rpc_c_protect_level_pkt_privacy Performs 
  25081.                                                       protection as specified 
  25082.                                                       by all of the previous 
  25083.                                                       levels and also encrypts 
  25084.                                                       each remote procedure 
  25085.                                                       call argument value. 
  25086.  
  25087.           authn_svc     Returns the authentication service requested by the 
  25088.                         client that made the remote procedure call on 
  25089.                         binding_handle. Specifying NULL prevents the routine 
  25090.                         from returning this parameter. 
  25091.  
  25092.                         The possible authentication services are: 
  25093.  
  25094.                              rpc_c_authn_none         No authentication. 
  25095.  
  25096.                              rpc_c_authn_dce_secret   DCE shared-secret key 
  25097.                                                       authentication. 
  25098.  
  25099.                              rpc_c_authn_dce_public   DCE public key 
  25100.                                                       authentication (reserved 
  25101.                                                       for future use). 
  25102.  
  25103.                              rpc_c_authn_default      DCE default 
  25104.                                                       authentication service. 
  25105.  
  25106.           authz_svc     Returns the authorization service requested by the 
  25107.                         client that made the remote procedure call on 
  25108.                         binding_handle. Specifying NULL prevents the routine 
  25109.                         from returning this parameter. 
  25110.  
  25111.                         The possible authorization services are: 
  25112.  
  25113.                              rpc_c_authz_none         The server performs no 
  25114.                                                       authorization. This is 
  25115.                                                       valid only if the 
  25116.                                                       authn_svc parameter is 
  25117.                                                       rpc_c_authn_none. 
  25118.  
  25119.                              rpc_c_authz_name         The server performs 
  25120.                                                       authorization based on 
  25121.                                                       the client principal 
  25122.                                                       name. 
  25123.  
  25124.                              rpc_c_authz_dce          The server performs 
  25125.                                                       authorization using the 
  25126.                                                       client's DCE privilege 
  25127.                                                       attribute certificate 
  25128.                                                       (PAC) sent to the server 
  25129.                                                       with each remote 
  25130.                                                       procedure call made with 
  25131.                                                       binding_handle. 
  25132.                                                       Generally, access is 
  25133.                                                       checked against DCE 
  25134.                                                       access control lists 
  25135.                                                       (ACLs). 
  25136.  
  25137.           status        Returns the status code from this routine. On 
  25138.                         successful completion, the routine returns rpc_s_ok. 
  25139.                         Otherwise, it returns one of the following errors: 
  25140.  
  25141.                              rpc_s_invalid_binding 
  25142.                              rpc_s_wrong_kind_of_binding 
  25143.                              rpc_s_binding_has_no_auth 
  25144.                              sec_login_s_default_use 
  25145.                              sec_login_s_context_invalid 
  25146.  
  25147.  Usage 
  25148.  
  25149.           The rpc_binding_inq_auth_caller routine returns authentication and 
  25150.           authorization information associated with the client identified by 
  25151.           binding_handle. The calling server manager routine can use the 
  25152.           returned data for authorization purposes. 
  25153.  
  25154.           If the client is part of a delegation chain, the routine returns the 
  25155.           authentication and authorization information for each member of the 
  25156.           chain, the initiator, and all subsequent delegates. You can use the 
  25157.           sec_cred_get_initiator routine or sec_cred_get_delegate routines to 
  25158.           obtain the authorization information for a specific member of the 
  25159.           chain. 
  25160.  
  25161.           The RPC runtime allocates memory for the returned server_princ_name 
  25162.           parameter. The server is responsible for calling the rpc_string_free 
  25163.           routine for the returned parameter string. 
  25164.  
  25165.           For applications in which the client side uses the IDL auto_handle or 
  25166.           implicit_handle attribute, the server side needs to be built with the 
  25167.           IDL explicit_handle attribute specified in the attribute 
  25168.           configuration file (ACF). Using explicit_handle provides 
  25169.           binding_handle as the first parameter to each server manager routine. 
  25170.  
  25171.  Related Information 
  25172.  
  25173.           Routines: dce_acl_is_unauthenticated 
  25174.           rpc_binding_inq_auth_info 
  25175.           rpc_binding_set_auth_info 
  25176.           rpc_string_free 
  25177.           sec_cred_get_initiator 
  25178.           sec_cred_get_delegate 
  25179.           sec_cred_inq_auth_service_info 
  25180.  
  25181.  
  25182. ΓòÉΓòÉΓòÉ 5.8.21. rpc_binding_inq_auth_client ΓòÉΓòÉΓòÉ
  25183.  
  25184.  Purpose 
  25185.  
  25186.           Returns authentication and authorization information from the client 
  25187.           binding handle for an authenticated client. This routine is used by 
  25188.           server applications. 
  25189.  
  25190.  Format 
  25191.  
  25192.                     #include <dce/rpc.h>
  25193.                     #include <dce/id_base.h>
  25194.  
  25195.                     void rpc_binding_inq_auth_client(
  25196.                             rpc_binding_handle_t  binding,
  25197.                             rpc_authz_handle_t  *privs,
  25198.                             unsigned_char_t  **server_princ_name,
  25199.                             unsigned32  *protect_level,
  25200.                             unsigned32  *authn_svc,
  25201.                             unsigned32  *authz_svc,
  25202.                             unsigned32  *status);
  25203.  
  25204.  Parameters 
  25205.  
  25206.           Input 
  25207.  
  25208.           binding       Specifies the client binding handle from which to 
  25209.                         return the authentication and authorization 
  25210.                         information. 
  25211.  
  25212.           Output 
  25213.  
  25214.           privs         Returns a handle to the authorization information for 
  25215.                         the client that made the remote procedure call on 
  25216.                         binding. 
  25217.  
  25218.                         The server must cast this handle to the data type 
  25219.                         specified by authz_svc. The following table shows how 
  25220.                         to cast the return value: 
  25221.  
  25222.                                                 ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  25223.                                                 Γöé Table 5. Casts for Authorization Information             Γöé
  25224.                                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  25225.                                                 Γöé For authz_svc value:  Γöé privs contains this  Γöé Use this cast:    Γöé
  25226.                                                 Γöé            Γöé data:         Γöé            Γöé
  25227.                                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  25228.                                                 Γöé rpc_authz_none     Γöé A NULL value.     Γöé None         Γöé
  25229.                                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  25230.                                                 Γöé rpc_authz_name     Γöé The calling client's  Γöé (unsigned_char_t *)  Γöé
  25231.                                                 Γöé            Γöé principal name.    Γöé            Γöé
  25232.                                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  25233.                                                 Γöé rpc_authz_dce     Γöé The calling client's  Γöé (sec_id_pac_pac_t *) Γöé
  25234.                                                 Γöé            Γöé privilege attribute  Γöé            Γöé
  25235.                                                 Γöé            Γöé certificate.      Γöé            Γöé
  25236.                                                 ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  25237.  
  25238.                         Note that rpc_c_authz_none is valid only if the 
  25239.                         authn_svc parameter is rpc_c_authn_none. 
  25240.  
  25241.                         The data referenced by this parameter is read-only and 
  25242.                         should not be modified by the server. If the server 
  25243.                         wants to preserve any of the returned data, it must 
  25244.                         copy the data into server-allocated memory. 
  25245.  
  25246.           server_princ_name Returns a pointer to the server principal name 
  25247.                         specified by the client that made the remote procedure 
  25248.                         call on binding. The content of the returned name and 
  25249.                         its syntax is defined by the authentication service in 
  25250.                         use. 
  25251.  
  25252.                         Specifying NULL prevents the routine from returning 
  25253.                         this parameter. In this case, the caller does not have 
  25254.                         to call the rpc_string_free routine. 
  25255.  
  25256.           protect_level Returns the protection level requested by the client 
  25257.                         that made the remote procedure call on binding. The 
  25258.                         protection level determines the degree to which 
  25259.                         authenticated communications between the client and the 
  25260.                         server are protected. 
  25261.  
  25262.                         Specifying NULL prevents the routine from returning 
  25263.                         this parameter. 
  25264.  
  25265.                         The possible protection levels are: 
  25266.  
  25267.                              rpc_c_protect_level_default Uses the default 
  25268.                                                       protection level for the 
  25269.                                                       specified authentication 
  25270.                                                       service. 
  25271.  
  25272.                              rpc_c_protect_level_none Performs no protection. 
  25273.  
  25274.                              rpc_c_protect_level_connect Performs protection 
  25275.                                                       only when the client 
  25276.                                                       establishes a 
  25277.                                                       relationship with the 
  25278.                                                       server. 
  25279.  
  25280.                              rpc_c_protect_level_call Performs protection only 
  25281.                                                       at the beginning of each 
  25282.                                                       remote procedure call 
  25283.                                                       when the server receives 
  25284.                                                       the request. 
  25285.  
  25286.                              rpc_c_protect_level_pkt  Ensures that all data 
  25287.                                                       received is from the 
  25288.                                                       expected client. 
  25289.  
  25290.                              rpc_c_protect_level_pkt_integ Ensures and verifies 
  25291.                                                       that none of the data 
  25292.                                                       transferred between 
  25293.                                                       client and server has 
  25294.                                                       been modified. 
  25295.  
  25296.                              rpc_c_protect_level_cdmf_priv Performs protection 
  25297.                                                       as specified by all of 
  25298.                                                       the previous levels and 
  25299.                                                       also encrypts each remote 
  25300.                                                       procedure call parameter 
  25301.                                                       value. This protection 
  25302.                                                       level provides a little 
  25303.                                                       lower level of packet 
  25304.                                                       privacy than 
  25305.                                                       rpc_c_protect_level_pkt_privacy. 
  25306.  
  25307.                              rpc_c_protect_level_pkt_privacy Performs 
  25308.                                                       protection as specified 
  25309.                                                       by all of the previous 
  25310.                                                       levels and also encrypts 
  25311.                                                       each remote procedure 
  25312.                                                       call parameter value. 
  25313.  
  25314.           authn_svc     Returns the authentication service requested by the 
  25315.                         client that made the remote procedure call on binding. 
  25316.  
  25317.                         Specifying NULL prevents the routine from returning 
  25318.                         this parameter. 
  25319.  
  25320.                         The possible authentication services are: 
  25321.  
  25322.                              rpc_c_authn_none     No authentication 
  25323.  
  25324.                              rpc_c_authn_dce_secret DCE shared-secret key 
  25325.                                                   authentication 
  25326.  
  25327.                              rpc_c_authn_dce_public DCE public key 
  25328.                                                   authentication (reserved for 
  25329.                                                   future use) 
  25330.  
  25331.                              rpc_c_authn_default  DCE default authentication 
  25332.                                                   service. 
  25333.  
  25334.           authz_svc     Returns the authorization service requested by the 
  25335.                         client that made the remote procedure call on binding. 
  25336.  
  25337.                         Specifying NULL prevents the routine from returning 
  25338.                         this parameter. 
  25339.  
  25340.                         The possible authorization services are: 
  25341.  
  25342.                              rpc_c_authz_none     The server performs no 
  25343.                                                   authorization.  This is valid 
  25344.                                                   only if the authn_svc 
  25345.                                                   parameter is 
  25346.                                                   rpc_c_authn_none. 
  25347.  
  25348.                              rpc_c_authz_name     The server performs 
  25349.                                                   authorization based on the 
  25350.                                                   client principal name. 
  25351.  
  25352.                              rpc_c_authz_dce      The server performs 
  25353.                                                   authorization using the 
  25354.                                                   client's DCE privilege 
  25355.                                                   attribute certificate (PAC) 
  25356.                                                   sent to the server with each 
  25357.                                                   remote procedure call made 
  25358.                                                   with binding. Generally, 
  25359.                                                   access is checked against DCE 
  25360.                                                   access control lists (ACLs). 
  25361.  
  25362.           status        Returns the status code from this routine. On 
  25363.                         successful completion, the routine returns rpc_s_ok. 
  25364.                         Otherwise, it returns one of the following errors: 
  25365.  
  25366.                              rpc_s_invalid_binding The binding handle is not 
  25367.                                                   valid. 
  25368.  
  25369.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  25370.                                                   for the operation. 
  25371.  
  25372.                              rpc_s_binding_has_no_auth The binding has no 
  25373.                                                   authentication information. 
  25374.  
  25375.  Usage 
  25376.  
  25377.           The rpc_binding_inq_auth_client routine returns authentication and 
  25378.           authorization information associated with the client identified by 
  25379.           binding. The calling server manager routine can use the returned data 
  25380.           for authorization purposes. 
  25381.  
  25382.           The RPC runtime allocates memory for the returned server_princ_name 
  25383.           parameter. The server is responsible for calling the rpc_string_free 
  25384.           routine for the returned parameter string. 
  25385.  
  25386.           For applications in which the client side uses the IDL auto_handle or 
  25387.           implicit_handle attribute, the server side needs to be built with the 
  25388.           IDL explicit_handle attribute specified in the Attribute 
  25389.           Configuration File (ACF). Using explicit_handle provides binding as 
  25390.           the first parameter to each server manager routine. 
  25391.  
  25392.  Related Information 
  25393.  
  25394.           Routines: 
  25395.           rpc_binding_inq_auth_info 
  25396.           rpc_binding_set_auth_info 
  25397.           rpc_string_free 
  25398.  
  25399.  
  25400. ΓòÉΓòÉΓòÉ 5.8.22. rpc_binding_inq_auth_info ΓòÉΓòÉΓòÉ
  25401.  
  25402.  Purpose 
  25403.  
  25404.           Returns authentication and authorization information from a server 
  25405.           binding handle. This routine is used by client applications. 
  25406.  
  25407.  Format 
  25408.  
  25409.                     #include <dce/rpc.h>
  25410.                     #include <dce/sec_login.h>
  25411.  
  25412.                     void rpc_binding_inq_auth_info(
  25413.                             rpc_binding_handle_t  binding,
  25414.                             unsigned_char_t  **server_princ_name,
  25415.                             unsigned32  *protect_level,
  25416.                             unsigned32  *authn_svc,
  25417.                             rpc_auth_identity_handle_t  *auth_identity,
  25418.                             unsigned32  *authz_svc,
  25419.                             unsigned32  *status);
  25420.  
  25421.  Parameters 
  25422.  
  25423.           Input 
  25424.  
  25425.           binding       Specifies the server binding handle from which to 
  25426.                         return the authentication and authorization 
  25427.                         information. 
  25428.  
  25429.           Output 
  25430.  
  25431.           server_princ_name Returns a pointer to the expected principal name of 
  25432.                         the server referenced by binding. The content of the 
  25433.                         returned name and its syntax is defined by the 
  25434.                         authentication service in use. 
  25435.  
  25436.                         Specifying NULL prevents the routine from returning 
  25437.                         this parameter. In this case, the caller does not have 
  25438.                         to call the rpc_string_free routine. 
  25439.  
  25440.           protect_level Returns the protection level used for remote procedure 
  25441.                         calls made with binding. The protection level 
  25442.                         determines the degree to which authenticated 
  25443.                         communications between the client and the server are 
  25444.                         protected. 
  25445.  
  25446.                         Note that the returned level may be different from the 
  25447.                         level specified for protect_level on the call to 
  25448.                         rpc_binding_set_auth_info. If the RPC runtime or the 
  25449.                         RPC protocol in the bound protocol sequence does not 
  25450.                         support a specified level, the level is automatically 
  25451.                         upgraded to the next higher supported level. 
  25452.  
  25453.                         Specifying NULL prevents the routine from returning 
  25454.                         this parameter. 
  25455.  
  25456.                         The possible protection levels are: 
  25457.  
  25458.                              rpc_c_protect_level_default Uses the default 
  25459.                                                   protection level for the 
  25460.                                                   specified authentication 
  25461.                                                   service. 
  25462.  
  25463.                              rpc_c_protect_level_none Performs no protection. 
  25464.  
  25465.                              rpc_c_protect_level_connect Performs protection 
  25466.                                                   only when the client 
  25467.                                                   establishes a relationship 
  25468.                                                   with the server. 
  25469.  
  25470.                              rpc_c_protect_level_call Performs protection only 
  25471.                                                   at the beginning of each 
  25472.                                                   remote procedure call when 
  25473.                                                   the server receives the 
  25474.                                                   request. 
  25475.  
  25476.                              rpc_c_protect_level_pkt Ensures that all data 
  25477.                                                   received is from the expected 
  25478.                                                   client. 
  25479.  
  25480.                              rpc_c_protect_level_pkt_integ Ensures and verifies 
  25481.                                                   that none of the data 
  25482.                                                   transferred between client 
  25483.                                                   and server has been modified. 
  25484.  
  25485.                              rpc_c_protect_level_cdmf_priv Performs protection 
  25486.                                                   as specified by all of the 
  25487.                                                   previous levels and also 
  25488.                                                   encrypts each remote 
  25489.                                                   procedure call parameter 
  25490.                                                   value. This protection level 
  25491.                                                   provides a little lower level 
  25492.                                                   of packet privacy than 
  25493.                                                   rpc_c_protect_level_pkt_privacy. 
  25494.  
  25495.                              rpc_c_protect_level_pkt_privacy Performs 
  25496.                                                   protection as specified by 
  25497.                                                   all of the previous levels 
  25498.                                                   and also encrypts each remote 
  25499.                                                   procedure call parameter 
  25500.                                                   value. 
  25501.  
  25502.           authn_svc     Returns the authentication service used for remote 
  25503.                         procedure calls made with binding. 
  25504.  
  25505.                         Specifying NULL prevents the routine from returning 
  25506.                         this parameter. 
  25507.  
  25508.                         The possible authentication services are: 
  25509.  
  25510.                              rpc_c_authn_none     No authentication 
  25511.  
  25512.                              rpc_c_authn_dce_secret DCE shared-secret key 
  25513.                                                   authentication 
  25514.  
  25515.                              rpc_c_authn_dce_public DCE public key 
  25516.                                                   authentication (reserved for 
  25517.                                                   future use) 
  25518.  
  25519.                              rpc_c_authn_default  DCE default authentication 
  25520.                                                   service 
  25521.  
  25522.           auth_identity Returns a handle for the data structure that contains 
  25523.                         the client's authentication and authorization 
  25524.                         credentials. This parameter must be cast as appropriate 
  25525.                         for the authentication and authorization services 
  25526.                         established using rpc_binding_set_auth_info. 
  25527.  
  25528.                         When using the rpc_c_authn_dce_secret authentication 
  25529.                         service and any authorization service, this value must 
  25530.                         be a sec_login_handle_t obtained from one of the 
  25531.                         following routines: 
  25532.  
  25533.                           o  sec_login_setup_identity 
  25534.                           o  sec_login_get_current_context 
  25535.                           o  sec_login_newgroups. 
  25536.  
  25537.                         These routines are described in DCE Security Services 
  25538.                         API. 
  25539.  
  25540.                         Specifying NULL prevents the routine from returning 
  25541.                         this parameter. 
  25542.  
  25543.           authz_svc     Returns the authorization service used for remote 
  25544.                         procedure calls made with binding. 
  25545.  
  25546.                         Specifying NULL prevents the routine from returning 
  25547.                         this parameter. 
  25548.  
  25549.                         The possible authorization services are: 
  25550.  
  25551.                              rpc_c_authz_none     The server performs no 
  25552.                                                   authorization. This is valid 
  25553.                                                   only if the authn_svc 
  25554.                                                   parameter is 
  25555.                                                   rpc_c_authn_none. 
  25556.  
  25557.                              rpc_c_authz_name     The server performs 
  25558.                                                   authorization based on the 
  25559.                                                   client principal name. 
  25560.  
  25561.                              rpc_c_authz_dce      The server performs 
  25562.                                                   authorization using the 
  25563.                                                   client's DCE privilege 
  25564.                                                   attribute certificate (PAC) 
  25565.                                                   sent to the server with each 
  25566.                                                   remote procedure call made 
  25567.                                                   with binding. Generally, 
  25568.                                                   access is checked against DCE 
  25569.                                                   access control lists (ACLs). 
  25570.  
  25571.           status        Returns the status code from this routine. On 
  25572.                         successful completion, the routine returns rpc_s_ok. 
  25573.                         Otherwise, it returns one of the following errors: 
  25574.  
  25575.                              rpc_s_invalid_binding The binding handle is not 
  25576.                                                    valid. 
  25577.  
  25578.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  25579.                                                    for the operation. 
  25580.  
  25581.                              rpc_s_binding_has_no_auth The binding has no 
  25582.                                                    authentication information. 
  25583.  
  25584.  Usage 
  25585.  
  25586.           The rpc_binding_inq_auth_info routine returns authentication and 
  25587.           authorization information associated with the specified server 
  25588.           binding handle. The calling client associates the authentication and 
  25589.           authorization data with the server binding handle by a prior call to 
  25590.           the rpc_binding_set_auth_info routine. 
  25591.  
  25592.           The RPC runtime allocates memory for the returned server_princ_name 
  25593.           parameter. The caller is responsible for calling the rpc_string_free 
  25594.           routine for the returned parameter string. 
  25595.  
  25596.  Related Information 
  25597.  
  25598.           Routines: 
  25599.           rpc_binding_set_auth_info 
  25600.           rpc_string_free 
  25601.  
  25602.  
  25603. ΓòÉΓòÉΓòÉ 5.8.23. rpc_binding_inq_object ΓòÉΓòÉΓòÉ
  25604.  
  25605.  Purpose 
  25606.  
  25607.           Returns the object UUID from a binding handle. This routine is used 
  25608.           by client or server applications. 
  25609.  
  25610.  Format 
  25611.  
  25612.                     #include <dce/rpc.h>
  25613.  
  25614.                     void rpc_binding_inq_object(
  25615.                             rpc_binding_handle_t  binding,
  25616.                             uuid_t  *object_uuid,
  25617.                             unsigned32  *status);
  25618.  
  25619.  Parameters 
  25620.  
  25621.           Input 
  25622.  
  25623.           binding       Specifies a client or server binding handle. 
  25624.  
  25625.           Output 
  25626.  
  25627.           object_uuid   Returns the object UUID found in the binding parameter. 
  25628.                         The object UUID is a unique identifier for an object 
  25629.                         for which a remote procedure call can be made. 
  25630.  
  25631.           status        Returns the status code from this routine. On 
  25632.                         successful completion, the routine returns rpc_s_ok. 
  25633.                         Otherwise, it returns the following error: 
  25634.  
  25635.                              rpc_s_invalid_binding The binding handle is not 
  25636.                                             valid. 
  25637.  
  25638.  Usage 
  25639.  
  25640.           The rpc_binding_inq_object routine obtains the object UUID associated 
  25641.           with a client or server binding handle. If no object UUID has been 
  25642.           associated with the binding handle, this routine returns a nil UUID. 
  25643.  
  25644.  Related Information 
  25645.  
  25646.           Routines: 
  25647.           rpc_binding_set_object 
  25648.  
  25649.  
  25650. ΓòÉΓòÉΓòÉ 5.8.24. rpc_binding_reset ΓòÉΓòÉΓòÉ
  25651.  
  25652.  Purpose 
  25653.  
  25654.           Resets a server binding handle. This routine is used by client or 
  25655.           management applications. 
  25656.  
  25657.  Format 
  25658.  
  25659.                     #include <dce/rpc.h>
  25660.  
  25661.                     void rpc_binding_reset(
  25662.                             rpc_binding_handle_t  binding,
  25663.                             unsigned32  *status);
  25664.  
  25665.  Parameters 
  25666.  
  25667.           Input 
  25668.  
  25669.           binding       Specifies the server binding handle to reset. 
  25670.  
  25671.           Output 
  25672.  
  25673.           status        Returns the status code from this routine. On 
  25674.                         successful completion, the routine returns rpc_s_ok. 
  25675.                         Otherwise, it returns one of the following errors: 
  25676.  
  25677.                              rpc_s_invalid_binding The binding handle is not 
  25678.                                                   valid. 
  25679.  
  25680.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  25681.                                                   for the operation. 
  25682.  
  25683.  Usage 
  25684.  
  25685.           The rpc_binding_reset routine disassociates a server instance from 
  25686.           the server binding handle specified in the binding parameter. This 
  25687.           routine removes the endpoint portion of the server address in the 
  25688.           binding handle as well as any other server instance information in 
  25689.           the binding handle. The host portion of the server address remains 
  25690.           unchanged. The result is a partially bound server binding handle. 
  25691.           This binding handle can rebind to another server instance on the 
  25692.           previous host when it is later used to make a remote procedure call. 
  25693.           See Binding Handle for an explanation of partially and fully bound 
  25694.           binding handles. 
  25695.  
  25696.           This routine does not affect any authentication information for the 
  25697.           binding parameter. 
  25698.  
  25699.           Suppose that a client can be serviced by any compatible server 
  25700.           instance on the host specified in the binding handle. Then, the 
  25701.           client can call the rpc_binding_reset routine before making a remote 
  25702.           procedure call using the binding handle specified in binding. 
  25703.  
  25704.           When the client makes the next remote procedure call using the reset 
  25705.           server binding handle in binding, the client's RPC runtime uses a 
  25706.           well-known endpoint from the client's interface specification, if 
  25707.           any. Otherwise, the client's RPC runtime automatically communicates 
  25708.           with the DCE Host daemon (dced) on the specified remote host, to 
  25709.           obtain the endpoint of a compatible server from the local endpoint 
  25710.           map. If a compatible server is located, the RPC runtime updates 
  25711.           binding with a new endpoint. 
  25712.  
  25713.           However, if a compatible server is not located, the client's remote 
  25714.           procedure call fails. If the failed call uses a connection protocol 
  25715.           (ncacn), it receives the rpc_s_endpoint_not_found status code. If the 
  25716.           failed call uses a datagram protocol (ncadg), it receives the 
  25717.           rpc_s_comm_failure status code. 
  25718.  
  25719.           If a server application wants to be available to clients making a 
  25720.           remote procedure call on a reset binding handle, it registers all 
  25721.           binding handles by calling rpc_ep_register or 
  25722.           rpc_ep_register_no_replace. If however, the IDL-generated file 
  25723.           contains endpoint address information, the application does not have 
  25724.           to call either of these two routines. 
  25725.  
  25726.  Related Information 
  25727.  
  25728.           Routines: 
  25729.           rpc_ep_register 
  25730.           rpc_ep_register_no_replace 
  25731.  
  25732.  
  25733. ΓòÉΓòÉΓòÉ 5.8.25. rpc_binding_server_from_client ΓòÉΓòÉΓòÉ
  25734.  
  25735.  Purpose 
  25736.  
  25737.           Converts a client binding handle to a server binding handle. This 
  25738.           routine is used by server applications. 
  25739.  
  25740.  Format 
  25741.  
  25742.                     #include <dce/rpc.h>
  25743.  
  25744.                     void rpc_binding_server_from_client(
  25745.                             rpc_binding_handle_t  client_binding,
  25746.                             rpc_binding_handle_t  *server_binding,
  25747.                             unsigned32  *status);
  25748.  
  25749.  Parameters 
  25750.  
  25751.           Input 
  25752.  
  25753.           client_binding Specifies the client binding handle to convert to a 
  25754.                         server binding handle. 
  25755.  
  25756.           Output 
  25757.  
  25758.           server_binding Returns a server binding handle. 
  25759.  
  25760.           status        Returns the status code from this routine. On 
  25761.                         successful completion, the routine returns rpc_s_ok. 
  25762.                         Otherwise, it returns one of the following errors: 
  25763.  
  25764.                              rpc_s_cant_getpeername Cannot get peer name. 
  25765.  
  25766.                              rpc_s_connection_closed Connection closed. 
  25767.  
  25768.                              rpc_s_invalid_binding The binding handle is not 
  25769.                                                   valid. 
  25770.  
  25771.                              rpc_s_wrong_kind_of_binding Wrong kind of binding. 
  25772.  
  25773.  Usage 
  25774.  
  25775.           When a remote procedure call arrives at a server, the RPC runtime 
  25776.           creates a client binding handle to refer to information about the 
  25777.           calling client (client binding information). The RPC runtime passes 
  25778.           the client binding handle to the called remote procedure as the first 
  25779.           input parameter (which uses the handle_t type). 
  25780.  
  25781.           The rpc_binding_server_from_client routine converts client binding 
  25782.           information into server binding information corresponding to the 
  25783.           client's system. When calling this routine, the called remote 
  25784.           procedure specifies the client binding handle, and the routine 
  25785.           returns a partially bound server binding handle (that is, the newly 
  25786.           constructed server binding information contains a network address for 
  25787.           the client's system but lacks an endpoint). The server binding 
  25788.           information also lacks authentication information, but the called 
  25789.           procedure can add it by calling rpc_binding_set_auth_info. The object 
  25790.           UUID from the client binding information remains. 
  25791.  
  25792.           The rpc_binding_server_from_client routine is relevant when a called 
  25793.           remote procedure (the first remote procedure) needs to make its own 
  25794.           remote procedure call (a nested procedure call) to a second remote 
  25795.           procedure offered by a server on the system of the client that called 
  25796.           the first remote procedure (that is, the original client). The 
  25797.           partially bound server binding handle returned by the 
  25798.           rpc_binding_server_from_client routine ensures that a nested call 
  25799.           requests the second remote procedure on the original client's system. 
  25800.  
  25801.           In a multithreaded RPC application, the second remote procedure can 
  25802.           belong to a server that shares the original client's address space 
  25803.           (that is, the server and client can operate jointly as a 
  25804.           server-client instance). If the original client belongs to a 
  25805.           server-client instance and the application requires the nested call 
  25806.           to run in that instance, the application must guarantee that the 
  25807.           nested remote procedure call uses the endpoints of one of the 
  25808.           instances. 
  25809.  
  25810.           An application can provide this guarantee by meeting any of the 
  25811.           following conditions: 
  25812.  
  25813.             o  The interface possesses its own well-known endpoints, and the 
  25814.                server elects to use these interface-specific endpoints (by 
  25815.                calling rpc_server_use_protseq_if or 
  25816.                rpc_server_use_all_protseqs_if). 
  25817.  
  25818.             o  The server uses server-specific endpoints, and the interface is 
  25819.                offered by only one server-client instance per system. 
  25820.  
  25821.                To use server-specific endpoints, a server either requests 
  25822.                dynamic endpoints (by calling rpc_server_use_protseq or 
  25823.                rpc_server_use_all_protseqs) or specifies its own well-known 
  25824.                endpoints (by calling rpc_server_use_protseq_ep). The server 
  25825.                must also register its server-specific endpoints in the local 
  25826.                endpoint map (by calling rpc_ep_register). 
  25827.  
  25828.             o  The original client sets an object UUID into the server binding 
  25829.                information of the first call (by calling 
  25830.                rpc_binding_set_object); the object UUID identifies the 
  25831.                server-client instance. 
  25832.  
  25833.                The client can obtain the object UUID from the list of object 
  25834.                UUIDs used to register the endpoints of the server-client 
  25835.                instance.  The client must select an object UUID that belongs 
  25836.                exclusively to its instance. 
  25837.  
  25838.                Server binding information containing an object UUID impacts the 
  25839.                selection of a manager for a remote procedure call. See the DCE 
  25840.                for OS/2 Warp: Application Development Guide - Core Components 
  25841.                for a description of manager selection. The object UUID can 
  25842.                either identify a particular resource offered by the companion 
  25843.                server or, used as an instance UUID, the object UUID can 
  25844.                identify the original client's server-client instance. 
  25845.  
  25846.                The object UUID is passed in the first remote procedure call as 
  25847.                part of the client binding information and is retained in the 
  25848.                server binding information.  This server binding information is 
  25849.                newly constructed by the rpc_binding_server_from_client routine. 
  25850.                When the second remote procedure call arrives at the original 
  25851.                client's system, the DCE Host daemon uses the object UUID to 
  25852.                look for associated endpoints in the local endpoint map. To 
  25853.                ensure that the object UUID is associated with the endpoints of 
  25854.                original server-client instance, the server must complete the 
  25855.                following steps: 
  25856.  
  25857.                  1. Obtain the UUID (for example, by calling uuid_create). 
  25858.  
  25859.                  2. Specify the UUID as part of registering endpoints for the 
  25860.                     interface of the second remote procedure (by calling 
  25861.                     rpc_ep_register or rpc_ep_register_no_replace). 
  25862.  
  25863.                   If the second remote procedure call is routed to a manager of 
  25864.                   a non-nil type, then the server must also: 
  25865.  
  25866.                  1. Specify the type for the manager that implements that 
  25867.                     interface (by calling rpc_server_register_if). 
  25868.  
  25869.                  2. Set the object UUID to the same type as the manager (by 
  25870.                     calling rpc_object_set_type). 
  25871.  
  25872.             o  The first remote procedure call contains a distinct call 
  25873.                parameter used by the original client to pass server information 
  25874.                that identifies its server-client instance. 
  25875.  
  25876.                The first remote procedure call uses this information to route 
  25877.                the second remote procedure call to the original server-client 
  25878.                instance. For example, server information can be: 
  25879.  
  25880.                  -  A fully bound string binding that identifies the client's 
  25881.                     server-client instance. 
  25882.  
  25883.                     If the first remote procedure receives this string binding, 
  25884.                     calling rpc_binding_server_from_client is unnecessary. 
  25885.                     Instead, the first remote procedure requests a server 
  25886.                     binding handle for the string binding (by calling 
  25887.                     rpc_binding_from_string_binding). 
  25888.  
  25889.                  -  An object UUID that is associated in the endpoint map with 
  25890.                     one or more endpoints of the original server-client 
  25891.                     instance. 
  25892.  
  25893.                     The client can obtain the object UUID from the list of 
  25894.                     object UUIDs used to register the endpoints of the 
  25895.                     server-client instance. The client must select an object 
  25896.                     UUID that belongs exclusively to its instance, and pass 
  25897.                     that UUID as a call parameter. 
  25898.  
  25899.                     After calling rpc_binding_server_from_client, add the 
  25900.                     object UUID from the call parameter to the newly 
  25901.                     constructed server binding information (by calling 
  25902.                     rpc_binding_set_object). 
  25903.  
  25904.  Related Information 
  25905.  
  25906.           Routines: 
  25907.           rpc_binding_free 
  25908.           rpc_binding_set_object 
  25909.           rpc_ep_register 
  25910.           rpc_ep_register_no_replace 
  25911.  
  25912.  
  25913. ΓòÉΓòÉΓòÉ 5.8.26. rpc_binding_set_auth_info ΓòÉΓòÉΓòÉ
  25914.  
  25915.  Purpose 
  25916.  
  25917.           Sets authentication and authorization information for a server 
  25918.           binding handle. This routine is used by client applications. 
  25919.  
  25920.  Format 
  25921.  
  25922.                     #include <dce/rpc.h>
  25923.                     #include <dce/sec_login.h>
  25924.  
  25925.                     void rpc_binding_set_auth_info(
  25926.                             rpc_binding_handle_t  binding,
  25927.                             unsigned_char_t  *server_princ_name,
  25928.                             unsigned32  protect_level,
  25929.                             unsigned32  authn_svc,
  25930.                             rpc_auth_identity_handle_t  auth_identity,
  25931.                             unsigned32  authz_svc,
  25932.                             unsigned32  *status);
  25933.  
  25934.  Parameters 
  25935.  
  25936.           Input 
  25937.  
  25938.           binding       Specifies the server binding handle for which to set 
  25939.                         the authentication and authorization information. 
  25940.  
  25941.           server_princ_name Specifies the principal name of the server 
  25942.                         referenced by binding. The content of the name and its 
  25943.                         syntax is defined by the authentication service in use. 
  25944.  
  25945.                         A client that does not know the server principal name 
  25946.                         can call the rpc_mgmt_inq_server_princ_name routine to 
  25947.                         obtain the principal name of a server that is 
  25948.                         registered for the required authentication service. 
  25949.                         Using a principal name obtained in this way means that 
  25950.                         the client is interested in one-way authentication. In 
  25951.                         other words, it means that the client does not care 
  25952.                         which server principal received the remote procedure 
  25953.                         call request. The server, though, still verifies that 
  25954.                         the client is who the client claims to be. 
  25955.  
  25956.                         Note:  Note that you can use a NULL server name only if 
  25957.                                the binding handle is either fully bound or is 
  25958.                                bound to a non-null object UUID. For related 
  25959.                                information, refer to the RPC and NSI related 
  25960.                                sections of the DCE for OS/2 Warp: Application 
  25961.                                Development Guide - Core Components. 
  25962.  
  25963.           protect_level Specifies the protection level for remote procedure 
  25964.                         calls made using binding. The protection level 
  25965.                         determines the degree to which authenticated 
  25966.                         communications between the client and the server are 
  25967.                         protected by the authentication service specified by 
  25968.                         authn_svc The possible protection levels are: 
  25969.  
  25970.                              rpc_c_protect_level_default Uses the default 
  25971.                                                    protection level for the 
  25972.                                                    specified authentication 
  25973.                                                    service. 
  25974.  
  25975.                                                    The default protection level 
  25976.                                                    for the DCE shared-secret 
  25977.                                                    key authentication service 
  25978.                                                    is 
  25979.                                                    rpc_c_protect_level_pkt_integ. 
  25980.  
  25981.                              rpc_c_protect_level_none Performs no 
  25982.                                                    authentication: tickets are 
  25983.                                                    not exchanged, session keys 
  25984.                                                    are not established, client 
  25985.                                                    PACS or names are not 
  25986.                                                    certified, and transmissions 
  25987.                                                    are in the clear. Note that 
  25988.                                                    although uncertified PACs 
  25989.                                                    should not be trusted, they 
  25990.                                                    can be useful for debugging, 
  25991.                                                    tracing, and measurement 
  25992.                                                    purposes. 
  25993.  
  25994.                              rpc_c_protect_level_connect Performs protection 
  25995.                                                    only when the client 
  25996.                                                    establishes a relationship 
  25997.                                                    with the server. 
  25998.  
  25999.                              rpc_c_protect_level_call Performs protection only 
  26000.                                                    at the beginning of each 
  26001.                                                    remote procedure call when 
  26002.                                                    the server receives the 
  26003.                                                    request. 
  26004.  
  26005.                                                    This level does not apply to 
  26006.                                                    remote procedure calls made 
  26007.                                                    over a connection-based 
  26008.                                                    protocol sequence (that is, 
  26009.                                                    ncacn_ip_tcp). If this level 
  26010.                                                    is specified and the binding 
  26011.                                                    handle uses a 
  26012.                                                    connection-based protocol 
  26013.                                                    sequence, the routine uses 
  26014.                                                    the rpc_c_protect_level_pkt 
  26015.                                                    level instead. 
  26016.  
  26017.                              rpc_c_protect_level_pkt Ensure that all data 
  26018.                                                    received is from the 
  26019.                                                    expected client. 
  26020.  
  26021.                              rpc_c_protect_level_pkt_integ Ensures and verifies 
  26022.                                                    that none of the data 
  26023.                                                    transferred between client 
  26024.                                                    and server has been 
  26025.                                                    modified. 
  26026.  
  26027.                                                    This is the highest 
  26028.                                                    protection level that is 
  26029.                                                    guaranteed to be present in 
  26030.                                                    the RPC runtime. 
  26031.  
  26032.                              rpc_c_protect_level_cdmf_priv Performs protection 
  26033.                                                    as specified by all of the 
  26034.                                                    previous levels and also 
  26035.                                                    encrypts each remote 
  26036.                                                    procedure call parameter 
  26037.                                                    value. This protection level 
  26038.                                                    provides a little lower 
  26039.                                                    level of packet privacy than 
  26040.                                                    rpc_c_protect_level_pkt_privacy. 
  26041.  
  26042.                              rpc_c_protect_level_pkt_privacy Performs 
  26043.                                                    protection as specified by 
  26044.                                                    all of the previous levels 
  26045.                                                    and also encrypts each 
  26046.                                                    remote procedure call 
  26047.                                                    parameter value. 
  26048.  
  26049.                                                    This is the highest 
  26050.                                                    protection level, but it may 
  26051.                                                    not be available in the RPC 
  26052.                                                    runtime. 
  26053.  
  26054.           authn_svc     Specifies the authentication service to use. The exact 
  26055.                         level of protection provided by the authentication 
  26056.                         service is specified by the protect_level parameter. 
  26057.  
  26058.                         The supported authentication services are: 
  26059.  
  26060.                              rpc_c_authn_none     No authentication: no tickets 
  26061.                                                   are exchanged, no session 
  26062.                                                   keys established, client PACS 
  26063.                                                   or names are not transmitted, 
  26064.                                                   and transmissions are in the 
  26065.                                                   clear. Specify 
  26066.                                                   rpc_c_authn_none to turn 
  26067.                                                   authentication off for remote 
  26068.                                                   procedure calls made using 
  26069.                                                   binding. 
  26070.  
  26071.                              rpc_c_authn_dce_secret DCE shared-secret key 
  26072.                                                   authentication 
  26073.  
  26074.                              rpc_c_authn_dce_public DCE public key 
  26075.                                                   authentication ( reserved for 
  26076.                                                   future use) 
  26077.  
  26078.                              rpc_c_authn_default  DCE default authentication 
  26079.                                                   service. 
  26080.  
  26081.                         Note:  The current default authentication service is 
  26082.                                SCE shared-secret key; therefore, specifying 
  26083.                                rpc_c_authn_default is equivalent to specifying 
  26084.                                rpc_c_authn_dce_secret. 
  26085.  
  26086.           auth_identity Specifies a handle for the data structure that contains 
  26087.                         the client's authentication and authorization 
  26088.                         credentials appropriate for the selected authentication 
  26089.                         and authorization services. 
  26090.  
  26091.                         When using the rpc_c_authn_dce_secret authentication 
  26092.                         service and any authorization service, this value must 
  26093.                         be a sec_login_handle_t obtained from one of the 
  26094.                         following routines: 
  26095.  
  26096.                           o  sec_login_setup_identity 
  26097.                           o  sec_login_get_current_context 
  26098.                           o  sec_login_newgroups. 
  26099.  
  26100.                         These routines are described in DCE Security Services 
  26101.                         API. 
  26102.  
  26103.                         Specify NULL to use the default security login context 
  26104.                         for the current address space. 
  26105.  
  26106.           authz_svc     Specifies the authorization service implemented by the 
  26107.                         server for the interface of interest. The validity and 
  26108.                         trustworthiness of authorization data, like any 
  26109.                         application data, is dependent on the authentication 
  26110.                         service and protection level specified. The supported 
  26111.                         authorization services are: 
  26112.  
  26113.                              rpc_c_authz_none     Server performs no 
  26114.                                                   authorization. This is valid 
  26115.                                                   only if the authn_svc 
  26116.                                                   parameter is 
  26117.                                                   rpc_c_authn_none, specifying 
  26118.                                                   that no authentication is 
  26119.                                                   being performed. 
  26120.  
  26121.                              rpc_c_authz_name     Server performs authorization 
  26122.                                                   based on the client principal 
  26123.                                                   name. 
  26124.  
  26125.                                                   This value cannot be used if 
  26126.                                                   authn_svc is 
  26127.                                                   rpc_c_authn_none. 
  26128.  
  26129.                              rpc_c_authz_dce      Server performs authorization 
  26130.                                                   using the client's DCE 
  26131.                                                   privilege attribute 
  26132.                                                   certificate (PAC) sent to the 
  26133.                                                   server with each remote 
  26134.                                                   procedure call made with 
  26135.                                                   binding. Generally, access is 
  26136.                                                   checked against DCE access 
  26137.                                                   control lists (ACLs). 
  26138.  
  26139.                                                   This value cannot be used if 
  26140.                                                   authn_svc is 
  26141.                                                   rpc_c_authn_none. 
  26142.  
  26143.           Output 
  26144.  
  26145.           status        Returns the status code from this routine. On 
  26146.                         successful completion, the routine returns rpc_s_ok. 
  26147.                         Otherwise, it returns one of the following errors: 
  26148.  
  26149.                              rpc_s_invalid_binding The binding handle is not 
  26150.                                                    valid. 
  26151.  
  26152.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  26153.                                                    for the operation. 
  26154.  
  26155.                              rpc_s_unknown_authn_service Unknown authentication 
  26156.                                                    service. 
  26157.  
  26158.  Usage 
  26159.  
  26160.           The rpc_binding_set_auth_info routine sets up the specified server 
  26161.           binding handle so that it can be used to make authenticated remote 
  26162.           procedure calls, that include authorization information. 
  26163.  
  26164.           Unless a client calls this routine with the parameters set to 
  26165.           establish authentication and authorization methods, all remote 
  26166.           procedure calls made on the binding binding handle are 
  26167.           unauthenticated. A client is not required to call this routine. 
  26168.  
  26169.           Some authentication services (authn_svc) might need to communicate 
  26170.           with the Security service to perform this operation. Otherwise, they 
  26171.           might receive the rpc_s_comm_failure status. 
  26172.  
  26173.           The authn_svc parameter specifies the authentication service to use. 
  26174.           Since currently, there is only one available authentication service 
  26175.           (DCE shared-secret key), the parameter currently functions to specify 
  26176.           whether RPC calls will be authenticated and client PACs certified. If 
  26177.           authentication is chosen, the protect_level parameter can specify a 
  26178.           variety of protection levels, ranging from no authentication to the 
  26179.           highest level of authentication and encryption. If the protect_level 
  26180.           parameter is set to rpc_c_protect_level_none, no authentication is 
  26181.           performed, regardless of the authentication service chosen. 
  26182.  
  26183.           The authz_svc parameter specifies the authorization service to use. 
  26184.           If no authentication has been chosen (authn_svc of the 
  26185.           rpc_c_authn_none), then no authorization (authn_svc of the 
  26186.           rpc_c_authz_none), must be chosen as well. If authentication will be 
  26187.           performed, you have two choices for authorization: name-based 
  26188.           authorization and DCE authorization. The use of name based 
  26189.           authorization, which provides a server with a client's principal 
  26190.           name, is not recommended. DCE authorization uses PACs, a trusted 
  26191.           mechanism for conveying client authorization data to authenticated 
  26192.           servers. PACs are designed to be used with the DCE ACL facility. 
  26193.  
  26194.           Whether the call actually wakes up in the server manager code or is 
  26195.           rejected by the runtime depends on the following conditions: 
  26196.  
  26197.             o  If the client specified no authentication, then none is 
  26198.                attempted by the RPC runtime. The call wakes up in the manager 
  26199.                code whether the server specified authentication or not. This 
  26200.                permits both authenticated and unauthenticated clients to call 
  26201.                authenticated servers. When the manager receives an 
  26202.                unauthenticated call, it needs to make a decision about how to 
  26203.                proceed. 
  26204.  
  26205.             o  If the client specified DCE secret-key authentication and the 
  26206.                server specified no authentication, then the runtime fails the 
  26207.                call, and it never reaches the manager routine. 
  26208.  
  26209.             o  If both client and server specified DCE secret-key 
  26210.                authentication, then authentication is carried out by the RPC 
  26211.                runtime transparently. Whether the call reaches the server 
  26212.                manager code or is rejected by the runtime depends on whether 
  26213.                the authentication succeeded. 
  26214.  
  26215.           Although the RPC runtime is responsible for any authentication that 
  26216.           is carried out, the fact that the runtime always permits 
  26217.           unauthenticated clients to reach the manager code means that a 
  26218.           manager access function typically does need to make an authentication 
  26219.           check. When the manager access routine calls 
  26220.           rpc_binding_inq_auth_client it needs to check for a status of 
  26221.           rpc_s_binding_has_no_auth. In this case, the client has specified no 
  26222.           authentication and the manager access function needs to make an 
  26223.           access decision based on this fact. Note that in such a case, no 
  26224.           meaningful authentication or authorization information is returned 
  26225.           from rpc_binding_inq_auth_client. 
  26226.  
  26227.  Notes 
  26228.  
  26229.           The DCE runtime library caches data structures from rpc activity and 
  26230.           authentication activity, in order to improve performance on repeated 
  26231.           RPC calls to the same server.  This information is generally kept for 
  26232.           up to 10 minutes after the last call before it is freed.  Under 
  26233.           certain circumstances, this caching can result in increased memory 
  26234.           usage. 
  26235.  
  26236.           If a client does repeated calls to the rpc_binding_set_auth_info 
  26237.           routine with different identities each time, new data structures are 
  26238.           created and cached for each new identity. Clients or intermediate 
  26239.           servers that make many repeated calls like this will show memory 
  26240.           growth proportional to the number of new identities created in a 10 
  26241.           minute interval.  This memory is eventually reused for new 
  26242.           identities, but the steady state process size can be large in very 
  26243.           active scenarios. 
  26244.  
  26245.  Related Information 
  26246.  
  26247.           Routines: 
  26248.           rpc_binding_inq_auth_info 
  26249.           rpc_mgmt_inq_dflt_protect_level 
  26250.           rpc_mgmt_inq_server_princ_name 
  26251.           sec_login_get_current_context 
  26252.           sec_login_newgroups 
  26253.           sec_login_setup_identity 
  26254.  
  26255.  
  26256. ΓòÉΓòÉΓòÉ 5.8.27. rpc_binding_set_object ΓòÉΓòÉΓòÉ
  26257.  
  26258.  Purpose 
  26259.  
  26260.           Sets the object UUID value into a server binding handle. This routine 
  26261.           is used by client applications. 
  26262.  
  26263.  Format 
  26264.  
  26265.                     #include <dce/rpc.h>
  26266.  
  26267.                     void rpc_binding_set_object(
  26268.                             rpc_binding_handle_t  binding,
  26269.                             uuid_t   *object_uuid,
  26270.                             unsigned32  *status);
  26271.  
  26272.  Parameters 
  26273.  
  26274.           Input 
  26275.  
  26276.           binding       Specifies the server binding into which parameter 
  26277.                         object_uuid is set. Supply NULL to specify a nil UUID 
  26278.                         for this parameter. 
  26279.  
  26280.           object_uuid   Specifies the UUID of the object serviced by the server 
  26281.                         specified in the binding parameter. The object UUID is 
  26282.                         a unique identifier for an object for which a remote 
  26283.                         procedure call can be made. Supply NULL to specify a 
  26284.                         nil UUID for this parameter. 
  26285.  
  26286.           Output 
  26287.  
  26288.           status        Returns the status code from this routine. On 
  26289.                         successful completion, the routine returns rpc_s_ok. 
  26290.                         Otherwise, it returns one of the following errors: 
  26291.  
  26292.                              rpc_s_invalid_binding The binding handle is not 
  26293.                                                   valid. 
  26294.  
  26295.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  26296.                                                   for the operation. 
  26297.  
  26298.  Usage 
  26299.  
  26300.           The rpc_binding_set_object routine associates an object UUID with a 
  26301.           server binding handle. This operation replaces the previously 
  26302.           associated object UUID with the UUID in the object_uuid parameter. 
  26303.  
  26304.           To set the object UUID to the nil UUID, specify NULL or the nil UUID 
  26305.           for the object_uuid parameter. 
  26306.  
  26307.  Related Information 
  26308.  
  26309.           Routines: 
  26310.           rpc_binding_from_string_binding 
  26311.           rpc_binding_inq_object 
  26312.  
  26313.  
  26314. ΓòÉΓòÉΓòÉ 5.8.28. rpc_binding_to_string_binding ΓòÉΓòÉΓòÉ
  26315.  
  26316.  Purpose 
  26317.  
  26318.           Returns a string representation of a binding handle. This routine is 
  26319.           used by client, server, or management applications. 
  26320.  
  26321.  Format 
  26322.  
  26323.                     #include <dce/rpc.h>
  26324.  
  26325.                     void rpc_binding_to_string_binding(
  26326.                             rpc_binding_handle_t   binding,
  26327.                             unsigned_char_t  **string_binding,
  26328.                             unsigned32  *status);
  26329.  
  26330.  Parameters 
  26331.  
  26332.           Input 
  26333.  
  26334.           binding       Specifies a client or server binding handle to convert 
  26335.                         to a string representation of a binding handle. 
  26336.  
  26337.           Output 
  26338.  
  26339.           string_binding Returns a pointer to the string representation of the 
  26340.                         binding handle specified in the binding parameter. 
  26341.  
  26342.           status        Returns the status code from this routine. On 
  26343.                         successful completion, the routine returns rpc_s_ok. 
  26344.                         Otherwise, it returns one of the following errors: 
  26345.  
  26346.                              rpc_s_cant_getpeername Cannot get peer name. 
  26347.  
  26348.                              rpc_s_connection_closed Connection closed. 
  26349.  
  26350.                              rpc_s_invalid_binding The binding handle is not 
  26351.                                                   valid. 
  26352.  
  26353.  Usage 
  26354.  
  26355.           The rpc_binding_to_string_binding routine converts a client or server 
  26356.           binding handle to its string representation. 
  26357.  
  26358.           The RPC runtime allocates memory for the string returned in the 
  26359.           string_binding parameter. The application calls the rpc_string_free 
  26360.           routine to deallocate that memory. 
  26361.  
  26362.           If the binding handle in the binding parameter contains a nil object 
  26363.           UUID, the object UUID field is not included in the returned string. 
  26364.  
  26365.           To parse the returned string_binding parameter, call 
  26366.           rpc_string_binding_parse. 
  26367.  
  26368.  Related Information 
  26369.  
  26370.           Routines: 
  26371.           rpc_binding_from_string_binding 
  26372.           rpc_string_binding_parse 
  26373.           rpc_string_free 
  26374.  
  26375.  
  26376. ΓòÉΓòÉΓòÉ 5.8.29. rpc_binding_vector_free ΓòÉΓòÉΓòÉ
  26377.  
  26378.  Purpose 
  26379.  
  26380.           Frees the memory used to store a vector and binding handles. This 
  26381.           routine is used by client or server applications. 
  26382.  
  26383.  Format 
  26384.  
  26385.                     #include <dce/rpc.h>
  26386.  
  26387.                     void rpc_binding_vector_free(
  26388.                             rpc_binding_vector_t  **binding_vector,
  26389.                             unsigned32  *status);
  26390.  
  26391.  Parameters 
  26392.  
  26393.           Input/Output 
  26394.  
  26395.           binding_vector Specifies the address of a pointer to a vector of 
  26396.                         server binding handles. On return the pointer is set to 
  26397.                         NULL. 
  26398.  
  26399.           Output 
  26400.  
  26401.           status        Returns the status code from this routine. On 
  26402.                         successful completion, the routine returns rpc_s_ok. 
  26403.                         Otherwise, it returns one of the following errors: 
  26404.  
  26405.                              rpc_s_invalid_arg    The argument is not valid. 
  26406.  
  26407.                              rpc_s_invalid_binding The binding handle is not 
  26408.                                                   valid. 
  26409.  
  26410.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  26411.                                                   for the operation. 
  26412.  
  26413.  Usage 
  26414.  
  26415.           The rpc_binding_vector_free routine frees the memory used to store a 
  26416.           vector of server binding handles. The freed memory includes both the 
  26417.           binding handles and the vector itself. 
  26418.  
  26419.           A server obtains a vector of binding handles by calling 
  26420.           rpc_server_inq_bindings. A client obtains a vector of binding handles 
  26421.           by calling rpc_ns_binding_lookup_next. Call rpc_binding_vector_free 
  26422.           if you have used either of these routines. 
  26423.  
  26424.           The rpc_binding_free routine frees individual elements of the vector. 
  26425.           If an element is freed with this routine, the NULL element entry 
  26426.           replaces it; rpc_binding_vector_free ignores such an entry. 
  26427.  
  26428.  Related Information 
  26429.  
  26430.           Routines: 
  26431.           rpc_binding_free 
  26432.           rpc_ns_binding_lookup_next 
  26433.           rpc_server_inq_bindings 
  26434.  
  26435.  
  26436. ΓòÉΓòÉΓòÉ 5.8.30. rpc_cs_binding_set_tags ΓòÉΓòÉΓòÉ
  26437.  
  26438.  Purpose 
  26439.  
  26440.           Places code set tags into a server binding handle. Used by client 
  26441.           applications. 
  26442.  
  26443.  Format 
  26444.  
  26445.                     #include <dce/rpc.h>
  26446.  
  26447.                     void rpc_cs_binding_set_tags(
  26448.                             rpc_binding_handle_t  *binding,
  26449.                             unsigned32  sending_tag,
  26450.                             unsigned32  desired_receiving_tag,
  26451.                             unsigned16  sending_tag_max_bytes,
  26452.                             error_status_t  *status);
  26453.  
  26454.  Parameters 
  26455.  
  26456.           Input/Output 
  26457.  
  26458.           binding       On input, specifies the server binding handle to modify 
  26459.                         with tag information. This handle is the binding handle 
  26460.                         returned by the rpc_ns_binding_import_next or 
  26461.                         rpc_ns_binding_select routine. On output, this 
  26462.                         parameter returns the server binding handle modified 
  26463.                         with code set tag information. The server stub 
  26464.                         retrieves the tag information from the binding handle 
  26465.                         and uses it to call the appropriate buffer sizing and 
  26466.                         code set conversion routines. 
  26467.  
  26468.           Input 
  26469.  
  26470.           sending_tag   Specifies the code set value for the code set in which 
  26471.                         client data to be sent to the server is to be encoded. 
  26472.                         If the client is not sending any data, set this value 
  26473.                         to the client's current code set. This step prevents 
  26474.                         the code set conversion routine from being called. 
  26475.  
  26476.           desired_receiving_tag Specifies the code set value for the code set 
  26477.                         in which the client prefers data to be encoded when 
  26478.                         sent back from the server. If the client is not 
  26479.                         planning to receive any data from the server, set this 
  26480.                         value to the server's current code set. This step 
  26481.                         prevents the code set conversion routine from being 
  26482.                         called. 
  26483.  
  26484.           sending_tag_max_bytes Specifies the maximum number of bytes that a 
  26485.                         code set requires to encode one character. The value is 
  26486.                         the c_max_bytes value associated with the code set 
  26487.                         value (c_set) used as the sending_tag value. 
  26488.  
  26489.           Output 
  26490.  
  26491.           status        Returns the status code from this routine. On 
  26492.                         successful completion, the routine returns rpc_s_ok. 
  26493.                         Otherwise, it returns rpc_s_no_memory. 
  26494.  
  26495.                         The routine can also return status codes generated by 
  26496.                         the rpc_rgy_get_codesets routine. 
  26497.  
  26498.  Usage 
  26499.  
  26500.           The rpc_cs_binding_set_tags routine belongs to a set of DCE RPC 
  26501.           routines for use by client and server applications that are 
  26502.           transferring international character data in a heterogeneous 
  26503.           character set and code sets environment. These routines are used to 
  26504.           enable automatic code set conversion between client and server for 
  26505.           character representations that are not part of the DCE Portable 
  26506.           Character Set. 
  26507.  
  26508.           Client applications use the rpc_cs_binding_set_tags routine to add 
  26509.           code sets tag information to the binding handle of a compatible 
  26510.           server. The tag information specified in the routine is usually 
  26511.           obtained from a character and code sets evaluation routine (which is 
  26512.           typically a user-written routine). 
  26513.  
  26514.           The sending_tag value identifies the code set encoding that the 
  26515.           client is using to send international character data to the server. 
  26516.           The desired_receiving_tag value indicates to the server the code set 
  26517.           that the client prefers the server to use when sending return 
  26518.           international character data. The sending_tag_max_bytes value is the 
  26519.           number of bytes the sending code set uses to encode one character. 
  26520.  
  26521.           Client applications that use the rpc_cs_eval_with_universal or 
  26522.           rpc_cs_eval_without_universal routines do not need to call this 
  26523.           routine because these routines set tag information in the server 
  26524.           binding handle as part of their operation. Application developers who 
  26525.           are writing their own character and code sets evaluation routines 
  26526.           need to include code that sets tags in a server binding handle. The 
  26527.           rpc_cs_binding_set_tags routine provides this function and can be 
  26528.           used in user-written evaluation routines, or alone if the application 
  26529.           does not need to perform evaluation. In this case, the routine 
  26530.           provides a short cut for application programmers whose applications 
  26531.           do not need to evaluate for character and code set compatibility. 
  26532.  
  26533.  Related Information 
  26534.  
  26535.           Routines: 
  26536.           rpc_cs_eval_with_universal 
  26537.           rpc_cs_eval_without_universal 
  26538.           rpc_cs_get_tags 
  26539.  
  26540.  
  26541. ΓòÉΓòÉΓòÉ 5.8.31. rpc_cs_char_set_compat_check ΓòÉΓòÉΓòÉ
  26542.  
  26543.  Purpose 
  26544.  
  26545.           Evaluates character set compatibility between a client and a server. 
  26546.           This routine is used by client applications. 
  26547.  
  26548.  Format 
  26549.  
  26550.                     #include <dce/rpc.h>
  26551.  
  26552.                     void rpc_cs_char_set_compat_check(
  26553.                             rpc_codeset_mgmt_p_t  client_code_sets_array,
  26554.                             rpc_codeset_mgmt_p_t  server_code_sets_array,
  26555.                             error_status_t  *status);
  26556.  
  26557.  Parameters 
  26558.  
  26559.           Input 
  26560.  
  26561.           client_code_sets_array The list of character and code sets supported 
  26562.                         by the client machine. 
  26563.  
  26564.           server_code_sets_array The list of character and code sets supported 
  26565.                         by the server machine. 
  26566.  
  26567.           Output 
  26568.  
  26569.           status        Returns the status code from this routine. On 
  26570.                         successful completion, the routine returns rpc_s_ok. 
  26571.                         Otherwise, it returns rpc_s_ss_no_compat_charsets. 
  26572.  
  26573.  Usage 
  26574.  
  26575.           The rpc_cs_char_set_compat_check routine belongs to a set of DCE RPC 
  26576.           routines for use by client and server applications that are 
  26577.           transferring international character data in a heterogeneous 
  26578.           character set and code sets environment. 
  26579.  
  26580.           The rpc_cs_char_set_compat_check routine provides a method for 
  26581.           determining character set compatibility between a client and a 
  26582.           server; if the server's character set is incompatible with that of 
  26583.           the client, then connecting to that server is most likely not 
  26584.           acceptable, since massive data loss would result from such a 
  26585.           connection. 
  26586.  
  26587.           The RPC routines that perform character and code sets evaluation use 
  26588.           the rpc_cs_char_set_compat_check routine in their character sets and 
  26589.           code sets compatibility checking procedure. Before calling this 
  26590.           routine, client applications must use the rpc_rgy_get_codesets 
  26591.           routine to get the client's supported character and code sets, and 
  26592.           use the rpc_ns_mgmt_read_codesets routine to retrieve the server's 
  26593.           supported character and code sets from the name service database in 
  26594.           order to do the character sets compatibility checking. If both client 
  26595.           and server support just one character set, the routine compares 
  26596.           client and server registered character set values to determine 
  26597.           whether the sets are compatible. If they are not, the routine returns 
  26598.           the status message rpc_s_ss_no_compat_charsets. 
  26599.  
  26600.           If the client and server support multiple character sets, the routine 
  26601.           determines whether at least two of the sets are compatible. If two or 
  26602.           more sets match, the routine considers the character sets compatible, 
  26603.           and returns a success status code to the caller. 
  26604.  
  26605.           Client and server applications that use the DCE RPC code sets 
  26606.           evaluation routines rpc_cs_eval_with_universal and 
  26607.           rpc_cs_eval_without_universal do not need to call this routine 
  26608.           explicitly because these DCE RPC routines call it on their behalf. 
  26609.  
  26610.           Client applications that do not use the DCE RPC code sets evaluation 
  26611.           routines can use the rpc_cs_char_set_compat_check routine in their 
  26612.           code sets evaluation code as part of their procedure for determining 
  26613.           character and code set compatibility with a server. 
  26614.  
  26615.  Related Information 
  26616.  
  26617.           Routines: 
  26618.           rpc_cs_eval_with_universal 
  26619.           rpc_cs_eval_without_universal 
  26620.           rpc_cs_get_tags 
  26621.           rpc_ns_mgmt_read_codesets 
  26622.           rpc_rgy_get_codesets 
  26623.  
  26624.  
  26625. ΓòÉΓòÉΓòÉ 5.8.32. rpc_cs_eval_with_universal ΓòÉΓòÉΓòÉ
  26626.  
  26627.  Purpose 
  26628.  
  26629.           Evaluates a server's supported character sets and code sets during 
  26630.           the server binding selection process. This routine is used indirectly 
  26631.           by client applications. 
  26632.  
  26633.  Format 
  26634.  
  26635.                     #include <dce/rpc.h>
  26636.  
  26637.                     void rpc_cs_eval_with_universal(
  26638.                             rpc_ns_handle_t  binding_handle,
  26639.                             idl_void_p_t  eval_args,
  26640.                             idl_void_p_t  *context);
  26641.  
  26642.  Parameters 
  26643.  
  26644.           Input 
  26645.  
  26646.           binding_handle The server binding handle. 
  26647.  
  26648.           eval_args     An opaque data type that contains matching criteria 
  26649.                         that the routine uses to perform character and code 
  26650.                         sets compatibility evaluation. 
  26651.  
  26652.           Input/Output 
  26653.  
  26654.           context       An opaque data type that contains a search context to 
  26655.                         perform character and code sets compatibility 
  26656.                         evaluation. The routine returns the result of the 
  26657.                         evaluation in a field within context. 
  26658.  
  26659.  Usage 
  26660.  
  26661.           The rpc_cs_eval_with_universal routine is a DCE RPC character and 
  26662.           code sets evaluation routine that can be added to an import context. 
  26663.           The routine provides a mechanism for a client application that is 
  26664.           passing character data in a heterogeneous character set and code sets 
  26665.           environment to evaluate a server's character and code sets 
  26666.           compatibility before establishing a connection with it. 
  26667.  
  26668.           Client applications do not call rpc_cs_eval_with_universal directly. 
  26669.           Instead, they add it to the import context created by the 
  26670.           rpc_ns_binding_import_begin routine by calling the routine 
  26671.           rpc_ns_import_ctx_add_eval and specifying the routine name and the 
  26672.           RPC server entry name to be evaluated. When the client application 
  26673.           calls the rpc_ns_binding_import_next routine to import compatible 
  26674.           binding handles for servers, this routine calls 
  26675.           rpc_cs_eval_with_universal, which applies client-server code sets 
  26676.           compatibility checking as another criterion for compatible binding 
  26677.           selection. 
  26678.  
  26679.           The rpc_cs_eval_with_universal routine directs the 
  26680.           rpc_ns_binding_import_next routine to reject servers with 
  26681.           incompatible character sets. If client and server character sets are 
  26682.           compatible but their supported code sets are not, the routine 
  26683.           establishes tags that direct the client and server stubs to convert 
  26684.           character data to the default intermediate code set, which is the 
  26685.           ISO10646 (or universal) code set (USC-2, Level 1). 
  26686.  
  26687.           Note:  Application programmers can ignore the parameters of this 
  26688.                  routine. They only need to use rpc_ns_import_ctx_add_eval to 
  26689.                  set the routine, for example: 
  26690.  
  26691.                                   rpc_ns_import_ctx_add_eval(
  26692.                                          &import_context,
  26693.                                          rpc_c_eval_type_codesets,
  26694.                                          (void *) nsi_entry_name,
  26695.                                          rpc_cs_eval_with_universal,
  26696.                                          NULL,
  26697.                                          &status);
  26698.  
  26699.  Related Information 
  26700.  
  26701.           Routines: 
  26702.           rpc_cs_eval_without_universal 
  26703.           rpc_cs_get_tags 
  26704.           rpc_ns_binding_import_begin 
  26705.           rpc_ns_binding_import_done 
  26706.           rpc_ns_binding_import_next 
  26707.           rpc_ns_import_ctx_add_eval 
  26708.           rpc_ns_mgmt_handle_set_exp_age 
  26709.  
  26710.  
  26711. ΓòÉΓòÉΓòÉ 5.8.33. rpc_cs_eval_without_universal ΓòÉΓòÉΓòÉ
  26712.  
  26713.  Purpose 
  26714.  
  26715.           Evaluates a server's supported character sets and code sets during 
  26716.           the server binding selection process. This routine is used indirectly 
  26717.           by client applications. 
  26718.  
  26719.  Format 
  26720.  
  26721.                     #include <dce/rpc.h>
  26722.  
  26723.                     void rpc_cs_eval_without_universal(
  26724.                             rpc_ns_handle_t  binding_handle,
  26725.                             idl_void_p_t  eval_args,
  26726.                             idl_void_p_t  *context);
  26727.  
  26728.  Parameters 
  26729.  
  26730.           Input 
  26731.  
  26732.           binding_handle The server binding handle. 
  26733.  
  26734.           eval_args     An opaque data type that contains matching criteria 
  26735.                         that the routine uses to perform code sets 
  26736.                         compatibility evaluation. 
  26737.  
  26738.           Input/Output 
  26739.  
  26740.           context       An opaque data type that contains a search context to 
  26741.                         perform character and code sets compatibility 
  26742.                         evaluation. The routine returns the result of the 
  26743.                         evaluation in a field within context. 
  26744.  
  26745.  Usage 
  26746.  
  26747.           The rpc_cs_eval_without_universal routine is a DCE RPC character and 
  26748.           code sets evaluation routine that can be added to an import context. 
  26749.           The routine provides a mechanism for a client application that is 
  26750.           passing character data in a heterogeneous character set and code sets 
  26751.           environment to evaluate a server's character and code sets 
  26752.           compatibility before establishing a connection with it. 
  26753.  
  26754.           Client applications do not call rpc_cs_eval_without_universal 
  26755.           directly. Instead, they add it to the import context created by the 
  26756.           rpc_ns_binding_import_begin routine by calling the routine 
  26757.           rpc_ns_import_ctx_add_eval and specifying the routine name and the 
  26758.           RPC server entry name to be evaluated. When the client application 
  26759.           calls the rpc_ns_binding_import_next routine to import compatible 
  26760.           binding handles for servers, this routine calls 
  26761.           rpc_cs_eval_without_universal, which applies client-server code sets 
  26762.           compatibility checking as another criterion for compatible binding 
  26763.           selection. 
  26764.  
  26765.           The rpc_cs_eval_without_universal routine directs the 
  26766.           rpc_ns_binding_import_next routine to reject servers with 
  26767.           incompatible character sets. The routine also directs the 
  26768.           rpc_ns_binding_import_next routine to reject servers whose supported 
  26769.           code sets are incompatible with the client's supported code sets; 
  26770.           that is, it does not resort to using an intermediate code set as a 
  26771.           last resort. 
  26772.  
  26773.           Note:  Application programmers can ignore the arguments of this 
  26774.                  routine. They only need to use rpc_ns_import_ctx_add_eval to 
  26775.                  set the routine, for example: 
  26776.  
  26777.                                   rpc_ns_import_ctx_add_eval(
  26778.                                            &import_context,
  26779.                                            rpc_c_eval_type_codesets,
  26780.                                            (void *) nsi_entry_name,
  26781.                                            rpc_cs_eval_without_universal,
  26782.                                            NULL,
  26783.                                            &status);
  26784.  
  26785.  Related Information 
  26786.  
  26787.           Routines: 
  26788.           rpc_cs_get_tags 
  26789.           rpc_ns_binding_import_begin 
  26790.           rpc_ns_binding_import_done 
  26791.           rpc_ns_binding_import_next 
  26792.           rpc_ns_import_ctx_add_eval 
  26793.           rpc_ns_mgmt_handle_set_exp_age 
  26794.  
  26795.  
  26796. ΓòÉΓòÉΓòÉ 5.8.34. rpc_cs_get_tags ΓòÉΓòÉΓòÉ
  26797.  
  26798.  Purpose 
  26799.  
  26800.           Retrieves code set tags from a binding handle. This routine is used 
  26801.           by client and server applications. 
  26802.  
  26803.  Format 
  26804.  
  26805.                     #include <dce/codesets_stub.h>
  26806.  
  26807.                     void rpc_cs_get_tags(
  26808.                             rpc_binding_handle_t  binding,
  26809.                             boolean32  server_side,
  26810.                             unsigned32  *sending_tag,
  26811.                             unsigned32  *desired_receiving_tag,
  26812.                             unsigned32  *receiving_tag,
  26813.                             error_status_t  *status);
  26814.  
  26815.  Parameters 
  26816.  
  26817.           Input 
  26818.  
  26819.           binding       Specifies the target binding handle from which to 
  26820.                         obtain the code set tag information. When called from 
  26821.                         the client stub, this value is the binding handle of a 
  26822.                         compatible server returned by the 
  26823.                         rpc_ns_binding_import_next or rpc_ns_binding_select 
  26824.                         routines. When called from the server stub, this value 
  26825.                         is a pointer to the tag information that the client 
  26826.                         stub passed in the RPC call. 
  26827.  
  26828.           server_side   Indicates whether a client stub or a server stub is 
  26829.                         calling the routine. If a server stub is doing the 
  26830.                         calling, this parameter should contain TRUE. 
  26831.  
  26832.           desired_receiving_tag (Server stub only.)  Specifies the code set 
  26833.                         value for the code set in which the client prefers data 
  26834.                         to be encoded when sent back from the server. The 
  26835.                         client stub passes this value in the RPC call. If the 
  26836.                         routine is retrieving code set tags for an operation 
  26837.                         that does not specify a desired receiving tag parameter 
  26838.                         (the cs_drtag ACF parameter attribute has not been 
  26839.                         applied to one of the operation's parameters), this 
  26840.                         value is NULL. 
  26841.  
  26842.           Output 
  26843.  
  26844.           sending_tag   (Client stub only.)  Specifies the code set value for 
  26845.                         the code set in which client data to be sent to the 
  26846.                         server is to be encoded. If the routine is retrieving 
  26847.                         code set tags for an operation that does not specify a 
  26848.                         sending tag parameter (the cs_stag ACF parameter 
  26849.                         attribute has not been applied to one of the 
  26850.                         operation's parameters), this value is NULL. 
  26851.  
  26852.           desired_receiving_tag (Client stub only.)  Specifies the code set 
  26853.                         value for the code set in which the client prefers to 
  26854.                         receive data sent back to it from the server. If the 
  26855.                         routine is retrieving code set tags for an operation 
  26856.                         that does not specify a desired receiving tag parameter 
  26857.                         (the cs_drtag ACF parameter attribute has not been 
  26858.                         applied to one of the operation's parameters), this 
  26859.                         value is NULL. 
  26860.  
  26861.           receiving_tag (Server stub only.)  Specifies the code set value for 
  26862.                         the code set in which the server is to encode data to 
  26863.                         be sent back to the client. If the routine is 
  26864.                         retrieving code set tags for an operation that does not 
  26865.                         specify a receiving tag parameter (the cs_rtag ACF 
  26866.                         parameter attribute has not been applied to one of the 
  26867.                         operation's parameters), this value is NULL. 
  26868.  
  26869.           status        Returns the status code from this routine. On 
  26870.                         successful completion, the routine returns rpc_s_ok. 
  26871.                         Otherwise, it returns one of the following errors: 
  26872.  
  26873.                              rpc_s_ss_incompatible_codesets The server cannot 
  26874.                                            handle the data in the code set that 
  26875.                                            the client has specified. This 
  26876.                                            status code is returned if the 
  26877.                                            application performs code set 
  26878.                                            compatibility evaluation in the 
  26879.                                            server stub. 
  26880.  
  26881.                              rpc_s_ss_invalid_codeset_tag The result if the 
  26882.                                            client-side evaluation used an 
  26883.                                            invalid code set tag. 
  26884.  
  26885.                         If code set compatibility evaluation is performed, 
  26886.                         error values can also be returned from 
  26887.                         rpc_rgy_get_codesets, rpc_ns_binding_inq_entry_name, 
  26888.                         and rpc_ns_mgmt_read_codesets. 
  26889.  
  26890.  Usage 
  26891.  
  26892.           The rpc_cs_get_tags routine belongs to a set of DCE RPC routines for 
  26893.           use by client and server applications that are transferring 
  26894.           international character data in a heterogeneous character set and 
  26895.           code sets environment. 
  26896.  
  26897.           The rpc_cs_get_tags routine is a DCE RPC routine that RPC stubs can 
  26898.           use to retrieve the code set values to be used to tag international 
  26899.           character data to be sent over the network. In general, the code set 
  26900.           values to be used as tags are determined by a character and code sets 
  26901.           evaluation routine, which is called from the client application code. 
  26902.           However, application programmers can use other methods to establish 
  26903.           values for code set tags. 
  26904.  
  26905.           RPC stubs call the rpc_cs_get_tags routine before they call the 
  26906.           buffer sizing routines xxx_net_size and the code set conversion 
  26907.           routines xxx_netcs. The rpc_cs_get_tags routine provides the stubs 
  26908.           with code set values to use as input to the buffer sizing routines 
  26909.           (to determine whether buffer storage needs to be allocated for 
  26910.           conversion) and as input to the code set conversion routines (to 
  26911.           determine whether conversion is necessary, and if so, which host code 
  26912.           set converter to use). 
  26913.  
  26914.           Client and server stubs call the rpc_cs_get_tags routine before they 
  26915.           marshall any data. When called from the client stub, the boolean 
  26916.           value server_side is set to FALSE to indicate that the client stub 
  26917.           has called the routine. The binding parameter is the handle to a 
  26918.           compatible server returned by the rpc_ns_binding_import_next or 
  26919.           rpc_ns_binding_select routines. If the client has added a code sets 
  26920.           evaluation routine to the binding import procedure (by calling the 
  26921.           routine rpc_ns_import_ctx_add_eval), the binding parameter contains 
  26922.           the conversion method and the code set values to set for the client's 
  26923.           sending tag and desired receiving tag. If binding does not contain 
  26924.           the results of an evaluation, the rpc_cs_get_tags routine performs 
  26925.           the character/code sets evaluation within the client stub and sets 
  26926.           the client code set tag values itself. 
  26927.  
  26928.           On the client side, the output of the routine is the code set value 
  26929.           that represents the client's sending tag and the code set value that 
  26930.           represents the client's desired receiving tag. If the conversion 
  26931.           method is "client makes it right" (CMIR), the sending tag and desired 
  26932.           receiving tags are set to the code set value of the server's local 
  26933.           code set. If the conversion method is "server makes it right" (SMIR), 
  26934.           the sending tag and desired receiving tag are set to the client's 
  26935.           local code set value. If the conversion method is "receiver makes it 
  26936.           right" (RMIR), the sending tag is the client's code set, and the 
  26937.           desired receiving tag is the server's code set. 
  26938.  
  26939.           When called from the server stub, the boolean value server_side is 
  26940.           set to TRUE to indicate that the server stub has called the routine. 
  26941.           The binding parameter is a pointer to the tag data sent by the client 
  26942.           stub. 
  26943.  
  26944.           The server stub specifies the code set value given in the client's 
  26945.           desired receiving tag as input to the routine. The rpc_cs_get_tags 
  26946.           routine sets the code set value in desired_receiving_tag to 
  26947.           receiving_tag and returns this value as output to the server stub. 
  26948.           The server stub then uses the code set value in receiving_tag as the 
  26949.           code set to use for data it sends back to the client. 
  26950.  
  26951.           Application programmers who want their applications to use the 
  26952.           rpc_cs_get_tags routine to retrieve code set tag information as part 
  26953.           of the automatic code set conversion process specify the routine name 
  26954.           as the argument to the ACF attribute cs_tag_rtn when developing their 
  26955.           internationalized RPC application. 
  26956.  
  26957.           Application programmers can also write their own code set tags 
  26958.           retrieval routine that RPC stubs can call; in this case, they specify 
  26959.           the name of this routine as the argument to the ACF attribute instead 
  26960.           of specifying the DCE RPC routine rpc_cs_get_tags. Application 
  26961.           programmers can also use the automatic code conversion mechanism, but 
  26962.           design their applications so that the code set tags are set 
  26963.           explicitly in the application instead of in the stubs. 
  26964.  
  26965.  Related Information 
  26966.  
  26967.           Routines: 
  26968.           cs_byte_from_netcs 
  26969.           cs_byte_local_size 
  26970.           cs_byte_net_size 
  26971.           cs_byte_to_netcs 
  26972.  
  26973.  
  26974. ΓòÉΓòÉΓòÉ 5.8.35. rpc_ep_register ΓòÉΓòÉΓòÉ
  26975.  
  26976.  Purpose 
  26977.  
  26978.           Adds to, or replaces, server address information in the local 
  26979.           endpoint map. This routine is used by server applications. 
  26980.  
  26981.  Format 
  26982.  
  26983.                     #include <dce/rpc.h>
  26984.  
  26985.                     void rpc_ep_register(
  26986.                             rpc_if_handle_t  if_handle,
  26987.                             rpc_binding_vector_t  *binding_vec,
  26988.                             uuid_vector_t  *object_uuid_vec,
  26989.                             unsigned_char_t  *annotation,
  26990.                             unsigned32  *status);
  26991.  
  26992.  Parameters 
  26993.  
  26994.           Input 
  26995.  
  26996.           if_handle     Specifies an interface specification to register with 
  26997.                         the local endpoint map. 
  26998.  
  26999.           binding_vec   Specifies a vector of binding handles over which the 
  27000.                         server can receive remote procedure calls. 
  27001.  
  27002.                         Note:  The vector must contain fully bound server 
  27003.                                binding handles. 
  27004.  
  27005.           object_uuid_vec Specifies a vector of object UUIDs that the server 
  27006.                         offers. The server application constructs this vector. 
  27007.  
  27008.                         Supply the value NULL to indicate that there are no 
  27009.                         object UUIDs to register. 
  27010.  
  27011.           annotation    Defines a character string comment applied to each 
  27012.                         cross product element added to the local endpoint map. 
  27013.                         The string can contain up to 64 characters, including 
  27014.                         the NULL terminating character. Specify NULL or the 
  27015.                         string \0 if there is no annotation string. 
  27016.  
  27017.                         The string is used by applications for informational 
  27018.                         purposes only. The RPC runtime does not use this string 
  27019.                         to determine the server instance that a client 
  27020.                         communicates with or to enumerate endpoint map 
  27021.                         elements. 
  27022.  
  27023.           Output 
  27024.  
  27025.           status        Returns the status code from this routine. On 
  27026.                         successful completion, the routine returns rpc_s_ok. 
  27027.                         Otherwise, it returns one of the following errors: 
  27028.  
  27029.                              ept_s_cant_access             Error reading the 
  27030.                                                            endpoint database. 
  27031.  
  27032.                              ept_s_cant_create             Error creating the 
  27033.                                                            endpoint database. 
  27034.  
  27035.                              ept_s_cant_perform_op         Cannot perform 
  27036.                                                            requested operation. 
  27037.  
  27038.                              ept_s_database_invalid        The endpoint map 
  27039.                                                            database is not 
  27040.                                                            valid. 
  27041.  
  27042.                              ept_s_invalid_entry           The database entry 
  27043.                                                            is not valid. 
  27044.  
  27045.                              ept_s_update_failed           Update failed. 
  27046.  
  27047.                              rpc_s_comm_failure            Communications 
  27048.                                                            failure. 
  27049.  
  27050.                              rpc_s_invalid_binding         The binding handle 
  27051.                                                            is not valid. 
  27052.  
  27053.                              rpc_s_no_bindings             No bindings. 
  27054.  
  27055.                              rpc_s_wrong_kind_of_binding   Wrong kind of 
  27056.                                                            binding for the 
  27057.                                                            operation. 
  27058.  
  27059.  Usage 
  27060.  
  27061.           The rpc_ep_register routine adds elements to, or replaces elements 
  27062.           in, the local host's endpoint map. 
  27063.  
  27064.           Each element in the local endpoint map logically contains the 
  27065.           following: 
  27066.  
  27067.             o  Interface ID, consisting of an interface UUID and versions 
  27068.                (major and minor) 
  27069.             o  Binding information 
  27070.             o  Object UUID (optional) 
  27071.             o  Annotation (optional). 
  27072.  
  27073.           A server uses this routine, instead of rpc_ep_register_no_replace, 
  27074.           when only a single instance of the server runs on the server's host. 
  27075.           Use this routine if, at any time, no more than one server instance 
  27076.           offers the same interface UUID, object UUID, and protocol sequence. 
  27077.  
  27078.           When local endpoint map elements are not replaced, obsolete elements 
  27079.           accumulate each time a server instance stops running without calling 
  27080.           rpc_ep_unregister. Periodically the DCE Host daemon (dced) identifies 
  27081.           these obsolete elements and removes them. However, during the time 
  27082.           between these removals the obsolete elements increase the chance that 
  27083.           a client receives endpoints to nonexistent servers. The client then 
  27084.           wastes time trying to communicate with these servers before obtaining 
  27085.           another endpoint. 
  27086.  
  27087.           Using this routine to replace any existing local endpoint map 
  27088.           elements reduces the chance that a client receives the endpoint of a 
  27089.           nonexistent server instance. 
  27090.  
  27091.           If an existing element in the local endpoint map matches the 
  27092.           interface UUID, binding information exclusive of the endpoint, and 
  27093.           object UUID of an element this routine provides, the routine changes 
  27094.           the endpoint map according to the major and minor version numbers of 
  27095.           the element interface as shown in the following table: 
  27096.  
  27097.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  27098.                     Γöé EXISTING ELEMENT Γöé RELATION-  Γöé PROVIDED ELEMENT  Γöé ROUTINE'S ACTION Γöé
  27099.                     Γöé          Γöé SHIP    Γöé          Γöé          Γöé
  27100.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  27101.                     Γöé Major version   Γöé Not equal  Γöé Major version   Γöé Ignores minor   Γöé
  27102.                     Γöé number      Γöé to     Γöé number       Γöé version number  Γöé
  27103.                     Γöé          Γöé       Γöé          Γöé relationship and Γöé
  27104.                     Γöé          Γöé       Γöé          Γöé adds a new    Γöé
  27105.                     Γöé          Γöé       Γöé          Γöé endpoint map   Γöé
  27106.                     Γöé          Γöé       Γöé          Γöé element.  The   Γöé
  27107.                     Γöé          Γöé       Γöé          Γöé existing element Γöé
  27108.                     Γöé          Γöé       Γöé          Γöé remains      Γöé
  27109.                     Γöé          Γöé       Γöé          Γöé unchanged.    Γöé
  27110.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  27111.                     Γöé Major version   Γöé Equal to  Γöé Major version   Γöé Acts according  Γöé
  27112.                     Γöé number      Γöé       Γöé number       Γöé to the minor   Γöé
  27113.                     Γöé          Γöé       Γöé          Γöé version number  Γöé
  27114.                     Γöé          Γöé       Γöé          Γöé relationship.   Γöé
  27115.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  27116.                     Γöé Minor version   Γöé Equal to  Γöé Minor version   Γöé Replaces the   Γöé
  27117.                     Γöé number      Γöé       Γöé number       Γöé endpoint of the  Γöé
  27118.                     Γöé          Γöé       Γöé          Γöé existing element Γöé
  27119.                     Γöé          Γöé       Γöé          Γöé based on the   Γöé
  27120.                     Γöé          Γöé       Γöé          Γöé provided infor-  Γöé
  27121.                     Γöé          Γöé       Γöé          Γöé mation.      Γöé
  27122.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  27123.                     Γöé Minor version   Γöé Less than  Γöé Minor version   Γöé Replaces the   Γöé
  27124.                     Γöé number      Γöé       Γöé number       Γöé existing element Γöé
  27125.                     Γöé          Γöé       Γöé          Γöé based on the   Γöé
  27126.                     Γöé          Γöé       Γöé          Γöé provided infor-  Γöé
  27127.                     Γöé          Γöé       Γöé          Γöé mation.      Γöé
  27128.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  27129.                     Γöé Minor version   Γöé Greater   Γöé Minor version   Γöé Ignores the pro- Γöé
  27130.                     Γöé number      Γöé than    Γöé number       Γöé vided informa-  Γöé
  27131.                     Γöé          Γöé       Γöé          Γöé tion.  The    Γöé
  27132.                     Γöé          Γöé       Γöé          Γöé existing element Γöé
  27133.                     Γöé          Γöé       Γöé          Γöé remains      Γöé
  27134.                     Γöé          Γöé       Γöé          Γöé unchanged.    Γöé
  27135.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  27136.  
  27137.           For example, under these circumstances if the existing interface 
  27138.           version number is 1.3 (major.minor) and the provided version number 
  27139.           is 2.0, the routine adds a new endpoint map element with interface 
  27140.           version number 2.0 and does not change the element with version 
  27141.           number 1.3. However, if the existing interface version number is 1.5 
  27142.           and the provided version number is 1.4, the routine does not change 
  27143.           the endpoint map. 
  27144.  
  27145.           A server program that uses rpc_server_use_all_protseqs or 
  27146.           rpc_server_use_protseq has dynamically allocated endpoints. These 
  27147.           servers must call rpc_ep_register or rpc_ep_register_no_replace to 
  27148.           register itself with the local endpoint map. 
  27149.  
  27150.           A server that calls only rpc_server_use_all_protseqs_if or 
  27151.           rpc_server_use_protseq_if does not need to call this routine. In such 
  27152.           cases, the client's runtime uses an endpoint from the client's 
  27153.           interface specification to fill in a partially bound binding handle. 
  27154.           However, it is recommended that you also register well known 
  27155.           endpoints that the server specifies (registering endpoints from 
  27156.           interface definitions is unnecessary). 
  27157.  
  27158.           If the server also exports to the name service database, the server 
  27159.           calls this routine with the same if_handle, binding_vec and 
  27160.           object_uuid_vec parameters as the server uses when calling the 
  27161.           rpc_ns_binding_export routine. 
  27162.  
  27163.           For automatically started servers running over the 
  27164.           connection-oriented protocol sequence ncacn_ip_tcp, the RPC runtime 
  27165.           automatically generates a dynamic endpoint. In this case, the server 
  27166.           can call rpc_server_inq_bindings followed by rpc_ep_register in order 
  27167.           to make itself available to multiple clients. Otherwise, the 
  27168.           automatically started server is known only to the client for which 
  27169.           the server was started. 
  27170.  
  27171.           The rpc_ep_register routine communicates with the DCE Host daemon 
  27172.           (dced) which in turn communicates with the local endpoint map. The 
  27173.           routine communicates using one of the protocol sequences specified in 
  27174.           one of the binding handles in binding_vec. Attempting to register a 
  27175.           binding that specifies a protocol sequence that the DCE Host daemon 
  27176.           is not listening on results in the failure of the rpc_ep_register 
  27177.           routine. The routine indicates this failure by placing the value 
  27178.           rpc_s_comm_failure into status. 
  27179.  
  27180.           For information about how the endpoint map service selects an element 
  27181.           for an interface ID and an object UUID, see the DCE for OS/2 
  27182.           Warp:Application Development Guide - Core Components. This guide 
  27183.           explains how the endpoint map service searches for the endpoint of a 
  27184.           server that is compatible with a client. If the client supplies a 
  27185.           non-nil object UUID that is not in the endpoint map or the client 
  27186.           supplies a nil object UUID, the search can succeed - but only if the 
  27187.           server has registered a nil object UUID using rpc_ep_register or 
  27188.           rpc_ep_register_no_replace. The object_uuid_vec parameter can contain 
  27189.           both nil and non-nil object UUIDs for the routine to place into 
  27190.           endpoint map elements. 
  27191.  
  27192.           For an explanation of how a server can establish a client-server 
  27193.           relationship without using the local endpoint map, see String Binding 
  27194.           for an explanation. 
  27195.  
  27196.           This routine creates a cross-product from the if_handle, binding_vec 
  27197.           and object_uuid_vec parameters, and adds each element in the 
  27198.           cross-product as a separate registration in the local endpoint map. 
  27199.           If you supply NULL to the object_uuid_vec parameter, the 
  27200.           corresponding elements in the cross-product contain a nil object 
  27201.           UUID. 
  27202.  
  27203.           For example, suppose that if_handle has the value ifhand, binding_vec 
  27204.           has the values b1, b2, b3, and object_uuid_vec has the values u1, u2, 
  27205.           u3, u4. The resulting 12 elements in the cross-product are as 
  27206.           follows. 
  27207.  
  27208.                     (ifhand,b1,u1)  (ifhand,b1,u2)  (ifhand,b1,u3)  (ifhand,b1,u4)
  27209.                     (ifhand,b2,u1)  (ifhand,b2,u2)  (ifhand,b2,u3)  (ifhand,b2,u4)
  27210.                     (ifhand,b3,u1)  (ifhand,b3,u2)  (ifhand,b3,u3)  (ifhand,b3,u4)
  27211.  
  27212.           (An annotation string is part of each of these 12 elements.) 
  27213.  
  27214.  Related Information 
  27215.  
  27216.           Routines: 
  27217.           rpc_ep_register_no_replace 
  27218.           rpc_ep_resolve_binding 
  27219.           rpc_ep_unregister 
  27220.           rpc_mgmt_ep_unregister 
  27221.           rpc_ns_binding_export 
  27222.           rpc_server_inq_bindings 
  27223.           rpc_server_use_all_protseqs 
  27224.           rpc_server_use_all_protseqs_if 
  27225.           rpc_server_use_protseq 
  27226.           rpc_server_use_protseq_ep 
  27227.           rpc_server_use_protseq_if 
  27228.  
  27229.  
  27230. ΓòÉΓòÉΓòÉ 5.8.36. rpc_ep_register_no_replace ΓòÉΓòÉΓòÉ
  27231.  
  27232.  Purpose 
  27233.  
  27234.           Adds to server address information in the local endpoint map. This 
  27235.           routine is used by server applications. 
  27236.  
  27237.  Format 
  27238.  
  27239.                     #include <dce/rpc.h>
  27240.  
  27241.                     void rpc_ep_register_no_replace(
  27242.                             rpc_if_handle_t  if_handle,
  27243.                             rpc_binding_vector_t  *binding_vec,
  27244.                             uuid_vector_t  *object_uuid_vec,
  27245.                             unsigned_char_t  *annotation,
  27246.                             unsigned32  *status);
  27247.  
  27248.  Parameters 
  27249.  
  27250.           Input 
  27251.  
  27252.           if_handle     Specifies an interface specification to register with 
  27253.                         the local endpoint map. 
  27254.  
  27255.           binding_vec   Specifies a vector of binding handles over which the 
  27256.                         server can receive remote procedure calls. Note that 
  27257.                         the vector must contain fully bound server binding 
  27258.                         handles. 
  27259.  
  27260.           object_uuid_vec Specifies a vector of object UUIDs that the server 
  27261.                         offers. The server application constructs this vector. 
  27262.  
  27263.                         Supply the value NULL to indicate there are no object 
  27264.                         UUIDs to register. 
  27265.  
  27266.           annotation    Defines a character string comment applied to each 
  27267.                         cross-product added to the local endpoint map. The 
  27268.                         string can contain up to 64 characters, including the 
  27269.                         NULL terminating character. Specify NULL or the string 
  27270.                         \0 if there is no annotation string. 
  27271.  
  27272.                         The string is used by applications for informational 
  27273.                         purposes only. The RPC runtime does not use this string 
  27274.                         to determine which server instance a client 
  27275.                         communicates with, or for enumerating endpoint map 
  27276.                         elements. 
  27277.  
  27278.           Output 
  27279.  
  27280.           status        Returns the status code from this routine. On 
  27281.                         successful completion, the routine returns rpc_s_ok. 
  27282.                         Otherwise, it returns one of the following errors: 
  27283.  
  27284.                              ept_s_cant_access     Error reading the endpoint 
  27285.                                                    database. 
  27286.  
  27287.                              ept_s_cant_create     Error creating the endpoint 
  27288.                                                    database. 
  27289.  
  27290.                              ept_s_cant_perform_op Cannot perform the requested 
  27291.                                                    operation. 
  27292.  
  27293.                              ept_s_database_invalid The endpoint map database 
  27294.                                                    is not valid. 
  27295.  
  27296.                              ept_s_invalid_entry   The database entry is not 
  27297.                                                    valid. 
  27298.  
  27299.                              ept_s_update_failed   Update failed. 
  27300.  
  27301.                              rpc_s_comm_failure    Communications failure. 
  27302.  
  27303.                              rpc_s_invalid_binding The binding handle is not 
  27304.                                                    valid. 
  27305.  
  27306.                              rpc_s_no_bindings     No bindings. 
  27307.  
  27308.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  27309.                                                    for the operation. 
  27310.  
  27311.  Usage 
  27312.  
  27313.           The rpc_ep_register_no_replace routine adds elements to the local 
  27314.           host's endpoint map. The routine does not replace existing elements. 
  27315.           Otherwise, this routine is identical to rpc_ep_register. 
  27316.  
  27317.           Each element in the local endpoint map logically contains the 
  27318.           following: 
  27319.  
  27320.             o  Interface ID, consisting of an interface UUID and versions 
  27321.                (major and minor) 
  27322.             o  Binding information 
  27323.             o  Object UUID (optional) 
  27324.             o  Annotation (optional) 
  27325.  
  27326.           A server uses this routine, instead of rpc_ep_register, when multiple 
  27327.           instances of the server run on the same host. Use this routine if, at 
  27328.           any time, more than one server instance offers the same interface 
  27329.           UUID, object UUID, and protocol sequence. 
  27330.  
  27331.           Since this routine does not replace elements, calling servers must 
  27332.           unregister (that is, remove) themselves before they stop running. 
  27333.           Otherwise, when local endpoint map elements are not replaced, 
  27334.           obsolete elements accumulate each time a server instance stops 
  27335.           running without calling rpc_ep_unregister. Periodically the DCE Host 
  27336.           daemon (dced) identifies obsolete elements and removes them from the 
  27337.           local endpoint map. However, during the time between these removals, 
  27338.           the obsolete elements increase the chance that a client receives 
  27339.           endpoints to nonexistent servers. The client then wastes time trying 
  27340.           to communicate with these servers before obtaining another endpoint. 
  27341.  
  27342.           A server program calls this routine to register endpoints that were 
  27343.           specified by calling any of the following routines: 
  27344.  
  27345.             o  rpc_server_use_all_protseqs 
  27346.             o  rpc_server_use_protseq 
  27347.             o  rpc_server_use_protseq_ep. 
  27348.  
  27349.           A server program that uses rpc_server_use_all_protseqs or 
  27350.           rpc_server_use_protseq has dynamically allocated endpoints. These 
  27351.           servers must call rpc_ep_register or rpc_ep_register_no_replace to 
  27352.           register itself with the local endpoint map. 
  27353.  
  27354.           A server that calls only the rpc_server_use_all_protseqs_if or 
  27355.           rpc_server_use_protseq_if routines does not need to call this 
  27356.           routine. In such cases, the client's runtime uses an endpoint from 
  27357.           the client's interface specification to fill in a partially bound 
  27358.           binding handle. However, it is recommended that you also register 
  27359.           well-known endpoints that the server specifies (registering endpoints 
  27360.           from interface definitions is unnecessary). 
  27361.  
  27362.           If the server also exports to the name service database, the server 
  27363.           calls this routine with the same if_handle, binding_vec and 
  27364.           object_uuid_vec parameters as the server uses when calling 
  27365.           rpc_ns_binding_export. 
  27366.  
  27367.           For automatically started servers running over the 
  27368.           connection-oriented protocol sequence ncacn_ip_tcp, the RPC runtime 
  27369.           automatically generates a dynamic endpoint. In this case, the server 
  27370.           can call rpc_server_inq_bindings followed by 
  27371.           rpc_ep_register_no_replace in order to make itself available to 
  27372.           multiple clients. Otherwise, the automatically started server is 
  27373.           known only to the client for which the server was started. 
  27374.  
  27375.           The rpc_ep_register_no_replace routine communicates with the DCE Host 
  27376.           daemon (dced), which in turn communicates with the local endpoint 
  27377.           map. The routine communicates using one of the protocol sequences 
  27378.           specified in one of the binding handles in the binding_vec parameter. 
  27379.           Attempting to register a binding that specifies a protocol sequence 
  27380.           that the DCE Host daemon is not listening on results in the failure 
  27381.           of the rpc_ep_register_no_replace routine. The routine indicates this 
  27382.           failure by placing the value rpc_s_comm_failure into the status 
  27383.           parameter. 
  27384.  
  27385.           For information about how the endpoint map service selects an element 
  27386.           for an interface ID and an object UUID, see the DCE for OS/2 
  27387.           Warp:Application Development Guide - Core Components. This guide 
  27388.           explains how the endpoint map service searches for the endpoint of a 
  27389.           server that is compatible with a client. If the client supplies a 
  27390.           non-nil object UUID that is not in the endpoint map or the client 
  27391.           supplies a nil object UUID, the search can succeed, but only if the 
  27392.           server has registered a nil object UUID using 
  27393.           rpc_ep_register_no_replace or rpc_ep_register. The object_uuid_vec 
  27394.           parameter can contain both nil and non-nil object UUIDs for the 
  27395.           routine to place into endpoint map elements. 
  27396.  
  27397.           For an explanation of how a server can establish a client-server 
  27398.           relationship without using the local endpoint map, see String Binding 
  27399.           for an explanation. 
  27400.  
  27401.           This routine creates a cross-product from the if_handle, binding_vec 
  27402.           and object_uuid_vec parameters, and adds each element in the 
  27403.           cross-product as a separate registration in the local endpoint map. 
  27404.           If you supply NULL to parameter object_uuid_vec, the corresponding 
  27405.           elements in the cross-product contain a nil object UUID. The 
  27406.           description of rpc_ep_register summarizes the contents of an element 
  27407.           in the local endpoint map. 
  27408.  
  27409.  Related Information 
  27410.  
  27411.           Routines: 
  27412.           rpc_ep_register 
  27413.           rpc_ep_resolve_binding 
  27414.           rpc_ep_unregister 
  27415.           rpc_mgmt_ep_unregister 
  27416.           rpc_ns_binding_export 
  27417.           rpc_server_inq_bindings 
  27418.           rpc_server_use_all_protseqs 
  27419.           rpc_server_use_all_protseqs_if 
  27420.           rpc_server_use_protseq 
  27421.           rpc_server_use_protseq_ep 
  27422.           rpc_server_use_protseq_if 
  27423.  
  27424.  
  27425. ΓòÉΓòÉΓòÉ 5.8.37. rpc_ep_resolve_binding ΓòÉΓòÉΓòÉ
  27426.  
  27427.  Purpose 
  27428.  
  27429.           Resolves a partially bound server binding handle into a fully bound 
  27430.           server binding handle. This routine is used by client and management 
  27431.           applications. 
  27432.  
  27433.  Format 
  27434.  
  27435.                     #include <dce/rpc.h>
  27436.  
  27437.                     void rpc_ep_resolve_binding(
  27438.                             rpc_binding_handle_t   binding,
  27439.                             rpc_if_handle_t  if_handle,
  27440.                             unsigned32  *status);
  27441.  
  27442.  Parameters 
  27443.  
  27444.           Input/Output 
  27445.  
  27446.           binding       Specifies a partially bound server binding handle to 
  27447.                         resolve into a fully bound server binding handle. 
  27448.  
  27449.           if_handle     Contains a stub-generated data structure that specifies 
  27450.                         the interface of interest. 
  27451.  
  27452.           Output 
  27453.  
  27454.           status        Returns the status code from this routine. On 
  27455.                         successful completion, the routine returns rpc_s_ok. 
  27456.                         Otherwise, it returns one of the following errors: 
  27457.  
  27458.                              ept_s_not_registered  No entries found. 
  27459.  
  27460.                              rpc_s_invalid_binding The binding handle is not 
  27461.                                                    valid. 
  27462.  
  27463.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  27464.                                                    for the operation. 
  27465.  
  27466.                              rpc_s_rpcd_comm_failure Communications failure 
  27467.                                                    while trying to reach the 
  27468.                                                    endpoint map 
  27469.  
  27470.  Usage 
  27471.  
  27472.           An application calls the rpc_ep_resolve_binding routine to resolve a 
  27473.           partially bound server binding handle into a fully bound server 
  27474.           binding handle. 
  27475.  
  27476.           Resolving binding handles requires an interface UUID and an object 
  27477.           UUID. The object UUID can be a nil UUID. The RPC runtime requests the 
  27478.           DCE Host daemon's Endpoint Mapper Service, on the host that the 
  27479.           binding parameter specifies, to look up an endpoint for a compatible 
  27480.           server instance. The Endpoint Mapper Service finds the endpoint by 
  27481.           looking in the local endpoint map for the interface UUID from the 
  27482.           if_handle parameter and for the object UUID in the binding parameter. 
  27483.  
  27484.           The rpc_ep_resolve_binding routine depends on whether the specified 
  27485.           binding handle is partially bound or fully bound. When the 
  27486.           application specifies a partially bound handle, the routine produces 
  27487.           the following results: 
  27488.  
  27489.             o  If no compatible server instances are registered in the local 
  27490.                endpoint map, the routine returns the ept_s_not_registered 
  27491.                status code. 
  27492.  
  27493.             o  If one compatible server instance is registered in the local 
  27494.                endpoint map, the routine returns a fully bound binding handle 
  27495.                in the binding parameter and the rpc_s_ok status code. 
  27496.  
  27497.             o  If more than one compatible server instance is registered in the 
  27498.                local endpoint map, the routine randomly selects one. It then 
  27499.                returns the corresponding fully bound binding handle in 
  27500.                parameter binding and the rpc_s_ok status code. 
  27501.  
  27502.           When the application specifies a fully bound binding handle, the 
  27503.           routine returns the specified binding handle in binding and the 
  27504.           rpc_s_ok status code. The routine makes no request of the DCE Host 
  27505.           daemon. 
  27506.  
  27507.           In neither the partially bound case nor the fully bound case does the 
  27508.           routine contact a compatible server instance. 
  27509.  
  27510.  Using This Routine 
  27511.  
  27512.           For each server instance, the RPC runtime automatically provides 
  27513.           routines (the rpc_mgmt_xxx routines) that form an RPC management 
  27514.           interface. If a server instance registers any application-provided 
  27515.           interfaces, the RPC runtime automatically registers the RPC-provided 
  27516.           management interface with the local endpoint map for that server 
  27517.           instance. 
  27518.  
  27519.           An application can call rpc_ep_resolve_binding at any time with 
  27520.           either a partially bound or a fully bound handle. However, 
  27521.           applications typically call this routine to avoid calling a routine 
  27522.           in the management interface with a partially bound handle. 
  27523.  
  27524.           An application can have a partially bound binding handle after: 
  27525.  
  27526.             o  Importing a binding handle 
  27527.             o  Resetting a binding handle 
  27528.             o  Converting a string binding without an endpoint to a binding 
  27529.                handle 
  27530.  
  27531.           If an application calls an application-provided remote procedure 
  27532.           using a partially bound handle, the RPC runtime automatically asks 
  27533.           the DCE Host daemon to resolve the binding handle into a fully bound 
  27534.           handle. This fully bound binding handle corresponds to the RPC 
  27535.           interface of the called remote procedure and the requested object, if 
  27536.           any. The application can then use this fully bound handle to make 
  27537.           remote management calls, so calling rpc_ep_resolve_binding is 
  27538.           unnecessary. 
  27539.  
  27540.           When a high proportion of all servers in an environment offers the 
  27541.           same interface, the interface is known as a pervasive one. The RPC 
  27542.           management interface is a pervasive interface in all environments 
  27543.           that use DCE RPC. 
  27544.  
  27545.           Using this routine to unambiguously locate compatible server 
  27546.           instances applies to application-pervasive interfaces as well as to 
  27547.           the RPC management interface. 
  27548.  
  27549.           For each server instance, the RPC runtime provides routines (the 
  27550.           rpc_mgmt_* routines) that form an RPC interface. This management 
  27551.           interface is automatically registered with the runtime. A server 
  27552.           typically does not register the management interface with the local 
  27553.           endpoint map. Even if it does, it would also be a pervasive 
  27554.           interface. 
  27555.  
  27556.           To unambiguously locate a compatible server instance, an application 
  27557.           needs to call rpc_ep_resove_binding before calling a routine in the 
  27558.           management or a pervasive interface. 
  27559.  
  27560.  Partially Bound Handles With a Non-nil Object UUID 
  27561.  
  27562.           If the application has a partially bound handle with a non-nil object 
  27563.           UUID, the application can decide not to call rpc_ep_resolve_binding 
  27564.           before calling a procedure in the management interface. In this case 
  27565.           the remote management call is sent to a server instance, registered 
  27566.           on the remote host, that offers that object UUID. 
  27567.  
  27568.           After completing the remote management call, the application has a 
  27569.           fully bound handle to that server instance. The server instance that 
  27570.           the handle specifies probably offers the non-management interfaces of 
  27571.           interest to the calling application. However, if you want to be 
  27572.           certain of obtaining a fully bound handle to a server instance that 
  27573.           offers the interfaces needed for later remote procedure calls, call 
  27574.           rpc_ep_resolve_binding. 
  27575.  
  27576.  Partially Bound Handles With a Nil Object UUID 
  27577.  
  27578.           When an application makes a remote procedure or management call using 
  27579.           a partially bound handle with a nil object UUID, the DCE Host daemon 
  27580.           searches for a compatible server instance. The search is based on the 
  27581.           nil object UUID and the UUID of the interface to which the call 
  27582.           belongs. 
  27583.  
  27584.           All server instances that register any RPC interface automatically 
  27585.           offer the RPC management interface. When an application makes a 
  27586.           remote management call using a partially bound handle with a nil 
  27587.           object UUID, the DCE Host daemon on the remote host cannot 
  27588.           distinguish among server instances registered in the local endpoint 
  27589.           map. 
  27590.  
  27591.           When the DCE Host daemon cannot distinguish among these instances it 
  27592.           selects any server instance. After completing the remote management 
  27593.           call the calling application has a fully bound handle. However, the 
  27594.           server instance that the handle represents probably does not offer 
  27595.           the non-management interfaces that interest the application. 
  27596.  
  27597.           The remote RPC management routines avoid this ambiguity. They do this 
  27598.           by returning the status rpc_s_binding_incomplete if the provided 
  27599.           binding handle is a partially bound one with a nil object UUID. 
  27600.  
  27601.           An application wanting to contact servers that have exported and 
  27602.           registered interfaces with a nil object UUID calls the 
  27603.           rpc_ep_resolve_binding routine. The application obtains a fully bound 
  27604.           binding handle for calling remote management procedures in a server 
  27605.           instance that also offers the remote procedures in the 
  27606.           application-specific interface. Note that an application that wants 
  27607.           to manage all the server instances on a host does not call 
  27608.           rpc_ep_resolve_binding. Instead, the application obtains fully bound 
  27609.           binding handles for each server instance by calling 
  27610.           rpc_mgmt_ep_elt_inq_begin, rpc_mgmt_ep_elt_inq_next, and 
  27611.           rpc_mgmt_ep_elt_inq_done. 
  27612.  
  27613.  Related Information 
  27614.  
  27615.           Routines: 
  27616.           rpc_ep_register 
  27617.           rpc_ep_register_no_replace 
  27618.           rpc_mgmt_ep_elt_inq_begin 
  27619.           rpc_mgmt_ep_elt_inq_done 
  27620.           rpc_mgmt_ep_elt_inq_next 
  27621.           rpc_binding_from_string_binding 
  27622.           rpc_binding_reset 
  27623.  
  27624.  
  27625. ΓòÉΓòÉΓòÉ 5.8.38. rpc_ep_unregister ΓòÉΓòÉΓòÉ
  27626.  
  27627.  Purpose 
  27628.  
  27629.           Removes server address information from the local endpoint map. This 
  27630.           routine is used by server applications. 
  27631.  
  27632.  Format 
  27633.  
  27634.                     #include <dce/rpc.h>
  27635.  
  27636.                     void rpc_ep_unregister(
  27637.                             rpc_if_handle_t  if_handle,
  27638.                             rpc_binding_vector_t  *binding_vec,
  27639.                             uuid_vector_t  *object_uuid_vec,
  27640.                             unsigned32  *status);
  27641.  
  27642.  Parameters 
  27643.  
  27644.           Input 
  27645.  
  27646.           if_handle     Specifies an interface specification to remove (that 
  27647.                         is, unregister) from the local endpoint map. 
  27648.  
  27649.           binding_vec   Specifies a vector of binding handles to remove. 
  27650.  
  27651.           object_uuid_vec Specifies a vector of object UUIDs to remove. The 
  27652.                         server application constructs this vector. This routine 
  27653.                         removes all local endpoint map elements that match the 
  27654.                         specified if_handle parameter, binding_vec parameter, 
  27655.                         and object UUIDs. 
  27656.  
  27657.                         This is an optional parameter. The value NULL indicates 
  27658.                         there are no object UUIDs to remove. 
  27659.  
  27660.           Output 
  27661.  
  27662.           status        Returns the status code from this routine. On 
  27663.                         successful completion, the routine returns rpc_s_ok. 
  27664.                         Otherwise, it returns one of the following errors: 
  27665.  
  27666.                              ept_s_cant_access             Error reading the 
  27667.                                                            endpoint database. 
  27668.  
  27669.                              ept_s_cant_create             Error creating the 
  27670.                                                            endpoint database. 
  27671.  
  27672.                              ept_s_cant_perform_op         Cannot perform the 
  27673.                                                            requested operation. 
  27674.  
  27675.                              ept_s_database_invalid        The endpoint map 
  27676.                                                            database is not 
  27677.                                                            valid. 
  27678.  
  27679.                              ept_s_invalid_entry           The database entry 
  27680.                                                            is not valid. 
  27681.  
  27682.                              ept_s_update_failed           Update failed. 
  27683.  
  27684.                              rpc_s_invalid_binding         The binding handle 
  27685.                                                            is not valid. 
  27686.  
  27687.                              rpc_s_no_bindings             No bindings. 
  27688.  
  27689.                              rpc_s_wrong_kind_of_binding   Wrong kind of 
  27690.                                                            binding for the 
  27691.                                                            operation. 
  27692.  
  27693.  Usage 
  27694.  
  27695.           The rpc_ep_unregister routine removes elements from the local host's 
  27696.           endpoint map. A server application calls this routine only if the 
  27697.           server has registered endpoints previously and the server wishes to 
  27698.           remove that address information from the local endpoint map. 
  27699.  
  27700.           A server program is able to remove its own local endpoint map 
  27701.           elements (server address information) based on either of the 
  27702.           following: 
  27703.  
  27704.             o  The interface specification 
  27705.             o  The interface specification and the object UUIDs of resources 
  27706.                offered 
  27707.  
  27708.           The server calls the rpc_server_inq_bindings routine to obtain the 
  27709.           required binding_vec parameter. To remove selected endpoints, the 
  27710.           server can remove individual elements from binding_vec before calling 
  27711.           this routine. See Binding Vector for more information about removing 
  27712.           a single element from a vector of binding handles. 
  27713.  
  27714.           This routine creates a cross-product from the if_handle, binding_vec 
  27715.           and object_uuid_vec parameters and removes each element in the 
  27716.           cross-product from the local endpoint map. The description of the 
  27717.           rpc_ep_register routine summarizes the contents of a cross-product in 
  27718.           the local endpoint map. 
  27719.  
  27720.           Servers must always call rpc_ep_unregister to remove their endpoints 
  27721.           from the local endpoint map before they exit. Otherwise, stale 
  27722.           information will be in the local endpoint map. However, if a server 
  27723.           prematurely removes endpoints (the server is not in the process of 
  27724.           exiting), clients that do not already have fully bound binding 
  27725.           handles to the server will not be able to send remote procedure calls 
  27726.           to the server. 
  27727.  
  27728.  Related Information 
  27729.  
  27730.           Routines: 
  27731.           rpc_ep_register 
  27732.           rpc_ep_register_no_replace 
  27733.           rpc_mgmt_ep_unregister 
  27734.           rpc_ns_binding_unexport 
  27735.           rpc_server_inq_bindings 
  27736.  
  27737.  
  27738. ΓòÉΓòÉΓòÉ 5.8.39. rpc_if_id_vector_free ΓòÉΓòÉΓòÉ
  27739.  
  27740.  Purpose 
  27741.  
  27742.           Frees a vector and the interface identifier structures it contains. 
  27743.           This routine is used by client, server, or management applications. 
  27744.  
  27745.  Format 
  27746.  
  27747.                     #include <dce/rpc.h>
  27748.  
  27749.                     void rpc_if_id_vector_free(
  27750.                             rpc_if_id_vector_t  **if_id_vector,
  27751.                             unsigned32  *status);
  27752.  
  27753.  Parameters 
  27754.  
  27755.           Input/Output 
  27756.  
  27757.           if_id_vector  Specifies the address of a pointer to a vector of 
  27758.                         interface information. On return, the pointer is set to 
  27759.                         NULL. 
  27760.  
  27761.           Output 
  27762.  
  27763.           status        Returns the status code from this routine. On 
  27764.                         successful completion, the routine returns rpc_s_ok. 
  27765.                         Otherwise, it returns rpc_s_invalid_arg, which 
  27766.                         indicates that the argument is not valid. 
  27767.  
  27768.  Usage 
  27769.  
  27770.           The rpc_if_id_vector_free routine frees the memory used to store a 
  27771.           vector of interface identifiers. This includes memory used by the 
  27772.           interface identifiers and the vector itself. On return this routine 
  27773.           sets the if_id_vector parameter to NULL. 
  27774.  
  27775.           To obtain a vector of interface identifiers, call the 
  27776.           rpc_ns_mgmt_entry_inq_if_ids or rpc_mgmt_inq_if_ids. Call 
  27777.           rpc_if_id_vector_free if you have used either of these routines. 
  27778.  
  27779.  Related Information 
  27780.  
  27781.           Routines: 
  27782.           rpc_if_inq_id 
  27783.           rpc_mgmt_inq_if_ids 
  27784.           rpc_ns_mgmt_entry_inq_if_ids 
  27785.  
  27786.  
  27787. ΓòÉΓòÉΓòÉ 5.8.40. rpc_if_inq_id ΓòÉΓòÉΓòÉ
  27788.  
  27789.  Purpose 
  27790.  
  27791.           Returns the interface identifier for an interface specification. This 
  27792.           routine is used by client or server applications. 
  27793.  
  27794.  Format 
  27795.  
  27796.                     #include <dce/rpc.h>
  27797.  
  27798.                     void rpc_if_inq_id(
  27799.                             rpc_if_handle_t  if_handle,
  27800.                             rpc_if_id_t  *if_id,
  27801.                             unsigned32  *status);
  27802.  
  27803.  Parameters 
  27804.  
  27805.           Input 
  27806.  
  27807.           if_handle     Represents a stub-generated data structure that 
  27808.                         specifies the interface specification to inquire about. 
  27809.  
  27810.           Output 
  27811.  
  27812.           if_id         Returns the interface identifier. The application 
  27813.                         provides memory for the returned data. 
  27814.  
  27815.           status        Returns the status code from this routine. On 
  27816.                         successful completion, the routine returns rpc_s_ok. 
  27817.                         Otherwise, it returns an error. 
  27818.  
  27819.  Usage 
  27820.  
  27821.           An application calls the rpc_if_inq_id routine to obtain a copy of 
  27822.           the interface identifier from the provided interface specification. 
  27823.  
  27824.           The returned interface identifier consists of the interface UUID and 
  27825.           interface version numbers (major and minor) specified in the DCE IDL 
  27826.           file's interface specification. 
  27827.  
  27828.  Related Information 
  27829.  
  27830.           Routines: 
  27831.           rpc_if_id_vector_free 
  27832.           rpc_mgmt_inq_if_ids 
  27833.           rpc_ns_mgmt_entry_inq_if_ids 
  27834.  
  27835.  
  27836. ΓòÉΓòÉΓòÉ 5.8.41. rpc_mgmt_ep_elt_inq_begin ΓòÉΓòÉΓòÉ
  27837.  
  27838.  Purpose 
  27839.  
  27840.           Creates an inquiry context for viewing the elements in an endpoint 
  27841.           map. This routine is used by management applications. 
  27842.  
  27843.  Format 
  27844.  
  27845.                     #include <dce/rpc.h>
  27846.  
  27847.                     void rpc_mgmt_ep_elt_inq_begin(
  27848.                             rpc_binding_handle_t  ep_binding,
  27849.                             unsigned32  inquiry_type,
  27850.                             rpc_if_id_t  *if_id,
  27851.                             unsigned32  vers_option,
  27852.                             uuid_t  *object_uuid,
  27853.                             rpc_ep_inq_handle_t  *inquiry_context,
  27854.                             unsigned32  *status);
  27855.  
  27856.  Parameters 
  27857.  
  27858.           Input 
  27859.  
  27860.           ep_binding    Specifies the host for the local endpoint map elements 
  27861.                         you receive. To receive elements from the same host as 
  27862.                         the calling application, specify NULL. 
  27863.  
  27864.                         To receive local endpoint map elements from another 
  27865.                         host, specify a server binding handle for that host. 
  27866.                         You can specify the same binding handle you are using 
  27867.                         to make other remote procedure calls. The object UUID 
  27868.                         associated with this parameter must be a nil UUID. If 
  27869.                         you specify a non-nil UUID, the routine fails with the 
  27870.                         status code ept_s_cant_perform_op. Other than the host 
  27871.                         information and object UUID, all information in this 
  27872.                         parameter is ignored. 
  27873.  
  27874.           inquiry_type  Specifies an integer value that indicates the type of 
  27875.                         inquiry to perform on the local endpoint map. The list 
  27876.                         shows the valid inquiry types: 
  27877.  
  27878.                              Value             Description 
  27879.  
  27880.                              rpc_c_ep_all_elts Returns every element from the 
  27881.                                                local endpoint map. 
  27882.  
  27883.                                                The if_id, vers_option, and 
  27884.                                                object_uuid parameters are 
  27885.                                                ignored. 
  27886.  
  27887.                              rpc_c_ep_match_by_if Searches the local endpoint 
  27888.                                                map for those elements that 
  27889.                                                contain the interface identifier 
  27890.                                                specified by the if_id and 
  27891.                                                vers_option values. The 
  27892.                                                object_uuid parameter is 
  27893.                                                ignored. 
  27894.  
  27895.                              rpc_c_ep_match_by_obj Searches the local endpoint 
  27896.                                                map for those elements that 
  27897.                                                contain the object UUID 
  27898.                                                specified by the object_uuid 
  27899.                                                parameter. The if_id and 
  27900.                                                vers_option parameters are 
  27901.                                                ignored. 
  27902.  
  27903.                              rpc_c_ep_match_by_both Searches the local endpoint 
  27904.                                                map for those elements that 
  27905.                                                contain the interface identifier 
  27906.                                                and object UUID specified by the 
  27907.                                                if_id, vers_option, and 
  27908.                                                object_uuid parameters. 
  27909.  
  27910.           if_id         Specifies the interface identifier of the local 
  27911.                         endpoint map elements to be returned by 
  27912.                         rpc_mgmt_ep_elt_inq_next. 
  27913.  
  27914.                         Use this parameter only when specifying a value of 
  27915.                         rpc_c_ep_match_by_if or rpc_c_ep_match_by_both for the 
  27916.                         inquiry_type parameter. Otherwise, this parameter is 
  27917.                         ignored and the value NULL can be specified. 
  27918.  
  27919.           vers_option   Specifies how the rpc_mgmt_ep_elt_inq_next routine uses 
  27920.                         the if_id parameter. Use this parameter only when 
  27921.                         specifying a value of rpc_c_ep_match_by_if or 
  27922.                         rpc_c_ep_match_by_both for the inquiry_type parameter. 
  27923.                         Otherwise, this parameter is ignored and a 0 (zero) 
  27924.                         value can be specified. 
  27925.  
  27926.                         The following list presents the valid values for this 
  27927.                         parameter: 
  27928.  
  27929.                              Value            Description 
  27930.  
  27931.                              rpc_c_vers_all   Returns local endpoint map 
  27932.                                               elements that offer the specified 
  27933.                                               interface UUID, regardless of the 
  27934.                                               version numbers. 
  27935.  
  27936.                                               For this value, specify 0 (zero) 
  27937.                                               for both the major and minor 
  27938.                                               versions in if_id. 
  27939.  
  27940.                              rpc_c_vers_compatible Returns local endpoint map 
  27941.                                               elements that offer the same 
  27942.                                               major version of the specified 
  27943.                                               interface UUID and a minor 
  27944.                                               version greater than or equal to 
  27945.                                               the minor version of the 
  27946.                                               specified interface UUID. 
  27947.  
  27948.                              rpc_c_vers_exact Returns local endpoint map 
  27949.                                               elements that offer the specified 
  27950.                                               version of the specified 
  27951.                                               interface UUID. 
  27952.  
  27953.                              rpc_c_vers_major_only Returns local endpoint map 
  27954.                                               elements that offer the same 
  27955.                                               major version of the specified 
  27956.                                               interface UUID (ignores the minor 
  27957.                                               version). For this value, specify 
  27958.                                               0 (zero) for the minor version in 
  27959.                                               if_id. 
  27960.  
  27961.                              rpc_c_vers_upto  Returns local endpoint map 
  27962.                                               elements that offer a version of 
  27963.                                               the specified interface UUID less 
  27964.                                               than or equal to the specified 
  27965.                                               major and minor version.  (For 
  27966.                                               example, suppose if_id contains 
  27967.                                               V2.0 and the local endpoint map 
  27968.                                               contained elements with the 
  27969.                                               following versions: V1.3, V2.0, 
  27970.                                               and V2.1. The 
  27971.                                               rpc_mgmt_ep_elt_inq_next routine 
  27972.                                               returns the elements with V1.3 
  27973.                                               and V2.0.) 
  27974.  
  27975.           object_uuid   Specifies the object UUID that rpc_mgmt_ep_elt_inq_next 
  27976.                         looks for in local endpoint map elements. 
  27977.  
  27978.                         This parameter is used only when you specify a value of 
  27979.                         rpc_c_ep_match_by_obj or rpc_c_ep_match_by_both for the 
  27980.                         inquiry_type parameter. Otherwise, this parameter is 
  27981.                         ignored and you can supply NULL to specify a nil UUID. 
  27982.  
  27983.           Output 
  27984.  
  27985.           inquiry_context Returns an inquiry context for use with the 
  27986.                         rpc_mgmt_ep_elt_inq_next and rpc_mgmt_ep_elt_inq_done 
  27987.                         routines. 
  27988.  
  27989.           status        Returns the status code from this routine. On 
  27990.                         successful completion, the routine returns rpc_s_ok. 
  27991.                         Otherwise, it returns one of the following errors: 
  27992.  
  27993.                              rpc_s_invalid_inquiry_context The inquiry context 
  27994.                                                    is not valid. 
  27995.  
  27996.                              rpc_s_invalid_inquiry_type The inquiry type is not 
  27997.                                                    valid. 
  27998.  
  27999.                              rpc_s_invalid_vers_option The version option is 
  28000.                                                    not valid. 
  28001.  
  28002.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  28003.                                                    for the operation. 
  28004.  
  28005.  Usage 
  28006.  
  28007.           The rpc_mgmt_ep_elt_inq_begin routine creates an inquiry context for 
  28008.           viewing server address information stored in the local endpoint map. 
  28009.  
  28010.           Using the inquiry_type and vers_option parameters, an application 
  28011.           specifies which of the following local endpoint map elements are 
  28012.           returned from calls to rpc_mgmt_ep_elt_inq_next: 
  28013.  
  28014.             o  All elements. 
  28015.             o  Those elements with the specified interface identifier. 
  28016.             o  Those elements with the specified object UUID. 
  28017.             o  Those elements with both the specified interface identifier and 
  28018.                object UUID. 
  28019.  
  28020.           Before calling rpc_mgmt_ep_elt_inq_next, the application must first 
  28021.           call this routine to create an inquiry context. 
  28022.  
  28023.           After viewing the local endpoint map elements, the application calls 
  28024.           rpc_mgmt_ep_elt_inq_done to delete the inquiry context. 
  28025.  
  28026.  Related Information 
  28027.  
  28028.           Routines: 
  28029.           rpc_ep_register 
  28030.           rpc_ep_register_no_replace 
  28031.           rpc_ep_unregister 
  28032.           rpc_mgmt_ep_elt_inq_done 
  28033.           rpc_mgmt_ep_elt_inq_next 
  28034.           rpc_mgmt_ep_unregister 
  28035.  
  28036.  
  28037. ΓòÉΓòÉΓòÉ 5.8.42. rpc_mgmt_ep_elt_inq_done ΓòÉΓòÉΓòÉ
  28038.  
  28039.  Purpose 
  28040.  
  28041.           Deletes the inquiry context for viewing the elements in an endpoint 
  28042.           map. This routine is used by management applications. 
  28043.  
  28044.  Format 
  28045.  
  28046.                     #include <dce/rpc.h>
  28047.  
  28048.                     void rpc_mgmt_ep_elt_inq_done(
  28049.                             rpc_ep_inq_handle_t  *inquiry_context,
  28050.                             unsigned32  *status);
  28051.  
  28052.  Parameters 
  28053.  
  28054.           Input/Output 
  28055.  
  28056.           inquiry_context Specifies the inquiry context to delete. (An inquiry 
  28057.                         context is created by calling 
  28058.                         rpc_mgmt_ep_elt_inq_begin.) Returns the value NULL. 
  28059.  
  28060.           Output 
  28061.  
  28062.           status        Returns the status code from this routine. On 
  28063.                         successful completion, the routine returns rpc_s_ok. 
  28064.                         Otherwise, it returns the following error: 
  28065.  
  28066.                              rpc_s_invalid_inquiry_context The inquiry context 
  28067.                                                   is not valid. 
  28068.  
  28069.  Usage 
  28070.  
  28071.           The rpc_mgmt_ep_elt_inq_done routine deletes an inquiry context. The 
  28072.           rpc_mgmt_ep_elt_inq_begin routine created the inquiry context. 
  28073.  
  28074.           An application calls this routine after viewing local endpoint map 
  28075.           elements using the rpc_mgmt_ep_elt_inq_next routine. 
  28076.  
  28077.  Related Information 
  28078.  
  28079.           Routines: 
  28080.           rpc_mgmt_ep_elt_inq_begin 
  28081.           rpc_mgmt_ep_elt_inq_next 
  28082.  
  28083.  
  28084. ΓòÉΓòÉΓòÉ 5.8.43. rpc_mgmt_ep_elt_inq_next ΓòÉΓòÉΓòÉ
  28085.  
  28086.  Purpose 
  28087.  
  28088.           Returns one element from an endpoint map. This routine is used by 
  28089.           management applications. 
  28090.  
  28091.  Format 
  28092.  
  28093.                     #include <dce/rpc.h>
  28094.  
  28095.                     void rpc_mgmt_ep_elt_inq_next(
  28096.                             rpc_ep_inq_handle_t  inquiry_context,
  28097.                             rpc_if_id_t  *if_id,
  28098.                             rpc_binding_handle_t  *binding,
  28099.                             uuid_t  *object_uuid,
  28100.                             unsigned_char_t  **annotation,
  28101.                             unsigned32  *status);
  28102.  
  28103.  Parameters 
  28104.  
  28105.           Input 
  28106.  
  28107.           inquiry_context Specifies an inquiry context. This inquiry context is 
  28108.                         returned from the rpc_mgmt_ep_elt_inq_begin routine. 
  28109.  
  28110.           Output 
  28111.  
  28112.           if_id         Returns the interface identifier of the local endpoint 
  28113.                         map element. 
  28114.  
  28115.           binding       Returns the binding handle from the local endpoint map 
  28116.                         element. 
  28117.  
  28118.                         Specify NULL to prevent the routine from returning this 
  28119.                         parameter. In this case, the application does not call 
  28120.                         rpc_binding_free. 
  28121.  
  28122.           object_uuid   Returns the object UUID from the local endpoint map 
  28123.                         element. Specify NULL to prevent the routine from 
  28124.                         returning this parameter. 
  28125.  
  28126.           annotation    Returns the annotation string for the local endpoint 
  28127.                         map element. If there is no annotation string in the 
  28128.                         local endpoint map element, the string \0 is returned. 
  28129.  
  28130.                         Specify NULL to prevent the routine from returning this 
  28131.                         parameter. In this case, the application does not call 
  28132.                         rpc_string_free. 
  28133.  
  28134.           status        Returns the status code from this routine. On 
  28135.                         successful completion, the routine returns rpc_s_ok. 
  28136.                         Otherwise, it returns one of the following errors: 
  28137.  
  28138.                              ept_s_cant_perform_op Cannot perform requested 
  28139.                                                   operation. 
  28140.  
  28141.                              rpc_s_comm_failure   Communications failure. 
  28142.  
  28143.                              ept_s_database_invalid The endpoint map database 
  28144.                                                   is not valid. 
  28145.  
  28146.                              rpc_s_fault_context_mismatch Fault context 
  28147.                                                   mismatch. 
  28148.  
  28149.                              ept_s_invalid_context The inquiry type for this 
  28150.                                                   context is not valid. 
  28151.  
  28152.                              ept_s_invalid_entry  The database entry is not 
  28153.                                                   valid. 
  28154.  
  28155.                              rpc_s_invalid_arg    The argument is not valid. 
  28156.  
  28157.                              rpc_s_invalid_inquiry_context The inquiry context 
  28158.                                                   is not valid. 
  28159.  
  28160.                              rpc_s_invalid_inquiry_type The inquiry type is not 
  28161.                                                   valid. 
  28162.  
  28163.                              rpc_s_no_more_elements No more elements. 
  28164.  
  28165.  Usage 
  28166.  
  28167.           The rpc_mgmt_ep_elt_inq_next routine returns one element from the 
  28168.           local endpoint map. Regardless of the selector value specified for 
  28169.           the inquiry_type parameter in rpc_mgmt_ep_elt_inq_begin, this routine 
  28170.           returns all the components of a selected local endpoint map element. 
  28171.           The description of rpc_ep_register summarizes the contents of an 
  28172.           element in the local endpoint map. 
  28173.  
  28174.           An application can view all the selected local endpoint map elements 
  28175.           by repeatedly calling rpc_mgmt_ep_elt_inq_next. When all the elements 
  28176.           have been viewed, this routine returns an rpc_s_no_more_elements 
  28177.           status. The returned elements are unordered. 
  28178.  
  28179.           If a remote endpoint map contains elements that include a protocol 
  28180.           sequence that your system does not support, this routine does not 
  28181.           return the elements. (A protocol sequence is part of the binding 
  28182.           information component of an endpoint map element.) To receive all 
  28183.           possible elements from a remote endpoint map, your application must 
  28184.           run on a system that supports the protocol sequences included in the 
  28185.           elements. 
  28186.  
  28187.           For example, if your system does not support protocol sequence 
  28188.           ncacn_ip_tcp and a remote endpoint map contains elements that include 
  28189.           this protocol sequence, this routine does not return these elements 
  28190.           to your application. If your application runs on a system that 
  28191.           supported protocol sequence ncacn_ip_tcp, this routine returns the 
  28192.           elements. 
  28193.  
  28194.           The RPC runtime allocates memory for the returned binding and the 
  28195.           annotation string on each call to this routine. The application calls 
  28196.           rpc_binding_free for each returned binding and rpc_string_free for 
  28197.           each returned annotation string. 
  28198.  
  28199.           After viewing the local endpoint map's elements, the application must 
  28200.           call rpc_mgmt_ep_elt_inq_done to delete the inquiry context. 
  28201.  
  28202.  Related Information 
  28203.  
  28204.           Routines: 
  28205.           rpc_binding_free 
  28206.           rpc_ep_register 
  28207.           rpc_ep_register_no_replace 
  28208.           rpc_mgmt_ep_elt_inq_begin 
  28209.           rpc_mgmt_ep_elt_inq_done 
  28210.           rpc_string_free 
  28211.  
  28212.  
  28213. ΓòÉΓòÉΓòÉ 5.8.44. rpc_mgmt_ep_unregister ΓòÉΓòÉΓòÉ
  28214.  
  28215.  Purpose 
  28216.  
  28217.           Removes server address information from an endpoint map. This routine 
  28218.           is used by management applications. 
  28219.  
  28220.  Format 
  28221.  
  28222.                     #include <dce/rpc.h>
  28223.  
  28224.                     void rpc_mgmt_ep_unregister(
  28225.                             rpc_binding_handle_t  ep_binding,
  28226.                             rpc_if_id_t  *if_id,
  28227.                             rpc_binding_handle_t  binding,
  28228.                             uuid_t  *object_uuid,
  28229.                             unsigned32  *status);
  28230.  
  28231.  Parameters 
  28232.  
  28233.           Input 
  28234.  
  28235.           ep_binding    Specifies the host whose local endpoint map elements 
  28236.                         you unregister (that is, remove). To remove elements 
  28237.                         from the same host as the calling application, specify 
  28238.                         NULL. 
  28239.  
  28240.                         To remove local endpoint map elements from another 
  28241.                         host, specify a server binding handle for that host. 
  28242.                         You can specify the same binding handle you are using 
  28243.                         to make other remote procedure calls. The object UUID 
  28244.                         associated with this parameter must be a nil UUID.  If 
  28245.                         you specify a non-nil UUID, the routine fails with the 
  28246.                         status code ept_s_cant_perform_op. Other than the host 
  28247.                         information and object UUID, all information in this 
  28248.                         parameter is ignored. 
  28249.  
  28250.           if_id         Specifies the interface identifier to remove from the 
  28251.                         local endpoint map. 
  28252.  
  28253.           binding       Specifies the binding handle to remove. 
  28254.  
  28255.           object_uuid   Specifies an optional object UUID to remove. 
  28256.  
  28257.                         The value NULL indicates there is no object UUID to 
  28258.                         consider in the removal. 
  28259.  
  28260.           Output 
  28261.  
  28262.           status        Returns the status code from this routine. On 
  28263.                         successful completion, the routine returns rpc_s_ok. 
  28264.                         Otherwise, it returns one of the following errors: 
  28265.  
  28266.                              ept_s_cant_access    Error reading the endpoint 
  28267.                                                   database. 
  28268.  
  28269.                              ept_s_cant_perform_op Cannot perform the requested 
  28270.                                                   operation. 
  28271.  
  28272.                              rpc_s_comm_failure   Communications failure. 
  28273.  
  28274.                              ept_s_database_invalid Endpoint map database is 
  28275.                                                   invalid. 
  28276.  
  28277.                              ept_s_invalid_entry  The database entry is not 
  28278.                                                   valid. 
  28279.  
  28280.                              ept_s_not_registered No entries found. 
  28281.  
  28282.                              ept_s_update_failed  Update failed. 
  28283.  
  28284.                              rpc_s_invalid_binding The binding handle is not 
  28285.                                                   valid. 
  28286.  
  28287.                              rpc_s_no_interfaces  No interfaces registered. 
  28288.  
  28289.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  28290.                                                   for the operation. 
  28291.  
  28292.  Usage 
  28293.  
  28294.           The rpc_mgmt_ep_unregister routine unregisters (that is, removes) an 
  28295.           element from an endpoint map. A management program calls this routine 
  28296.           to remove addresses of servers that are no longer available, or to 
  28297.           remove addresses of servers that support objects that are no longer 
  28298.           offered. 
  28299.  
  28300.           Use this routine cautiously; removing elements from the local 
  28301.           endpoint map may make servers unavailable to client applications that 
  28302.           do not already have a fully bound binding handle to the server. 
  28303.  
  28304.           A management application calls the rpc_mgmt_ep_inq_next routine to 
  28305.           view local endpoint map elements. The application can then remove the 
  28306.           elements using rpc_mgmt_ep_unregister. 
  28307.  
  28308.  Related Information 
  28309.  
  28310.           Routines: 
  28311.           rpc_ep_register 
  28312.           rpc_ep_register_no_replace 
  28313.           rpc_ns_binding_unexport 
  28314.           rpc_mgmt_ep_elt_inq_begin 
  28315.           rpc_mgmt_ep_elt_inq_done 
  28316.           rpc_mgmt_ep_elt_inq_next 
  28317.  
  28318.  
  28319. ΓòÉΓòÉΓòÉ 5.8.45. rpc_mgmt_inq_com_timeout ΓòÉΓòÉΓòÉ
  28320.  
  28321.  Purpose 
  28322.  
  28323.           Returns the communication timeout value in a binding handle. This 
  28324.           routine is used by client applications. 
  28325.  
  28326.  Format 
  28327.  
  28328.                     #include <dce/rpc.h>
  28329.  
  28330.                     void rpc_mgmt_inq_com_timeout(
  28331.                             rpc_binding_handle_t   binding,
  28332.                             unsigned32  *timeout,
  28333.                             unsigned32  *status);
  28334.  
  28335.  Parameters 
  28336.  
  28337.           Input 
  28338.  
  28339.           binding       Specifies a server binding handle. 
  28340.  
  28341.           Output 
  28342.  
  28343.           timeout       Returns the communication timeout value from the 
  28344.                         binding parameter. 
  28345.  
  28346.           status        Returns the status code from this routine. On 
  28347.                         successful completion, the routine returns rpc_s_ok. 
  28348.                         Otherwise, it returns one of the following errors: 
  28349.  
  28350.                              rpc_s_invalid_binding The binding handle is not 
  28351.                                                    valid. 
  28352.  
  28353.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  28354.                                                    for the operation. 
  28355.  
  28356.  Usage 
  28357.  
  28358.           The rpc_mgmt_inq_com_timeout routine returns the communication 
  28359.           timeout value in a server binding handle. The timeout value specifies 
  28360.           the relative amount of time to spend trying to communicate with the 
  28361.           server. The time-out value has no effect on the normal processing of 
  28362.           a remote procedure. A remote procedure can run for as long as it 
  28363.           requires. Depending on the protocol sequence for the specified 
  28364.           binding handle, the value in the timeout parameter acts only as 
  28365.           advice to the RPC runtime. 
  28366.  
  28367.           The rpc_mgmt_set_com_timeout reference page explains the timeout 
  28368.           values returned in timeout. 
  28369.  
  28370.           To change the timeout value, a client calls rpc_mgmt_set_com_timeout. 
  28371.  
  28372.  Related Information 
  28373.  
  28374.           Routines: 
  28375.           rpc_mgmt_set_com_timeout 
  28376.  
  28377.  
  28378. ΓòÉΓòÉΓòÉ 5.8.46. rpc_mgmt_inq_dflt_protect_level ΓòÉΓòÉΓòÉ
  28379.  
  28380.  Purpose 
  28381.  
  28382.           Returns the default protection level for an authentication service. 
  28383.           This routine is used by client and server applications. 
  28384.  
  28385.  Format 
  28386.  
  28387.                     #include <dce/rpc.h>
  28388.  
  28389.                     void rpc_mgmt_inq_dflt_protect_level(
  28390.                             unsigned32  authn_svc,
  28391.                             unsigned32  *protect_level,
  28392.                             unsigned32  *status);
  28393.  
  28394.  Parameters 
  28395.  
  28396.           Input 
  28397.  
  28398.           authn_svc     Specifies the authentication service for which to 
  28399.                         return the default protection level. 
  28400.  
  28401.                         The supported authentication services are: 
  28402.  
  28403.                              rpc_c_authn_none     No authentication. 
  28404.  
  28405.                              rpc_c_authn_dce_secret DCE shared-secret key 
  28406.                                                   authentication. 
  28407.  
  28408.                              rpc_c_authn_dce_public DCE public key 
  28409.                                                   authentication (reserved for 
  28410.                                                   future use). 
  28411.  
  28412.                              rpc_c_authn_default  DCE default authentication 
  28413.                                                   service. 
  28414.  
  28415.           Output 
  28416.  
  28417.           protect_level Returns the default protection level for the specified 
  28418.                         authentication service. The protection level determines 
  28419.                         the degree to which authenticated communications 
  28420.                         between the client and the server are protected. 
  28421.  
  28422.                         The possible protection levels are as follows: 
  28423.  
  28424.                              rpc_c_protect_level_default Uses the default 
  28425.                                                    protection level for the 
  28426.                                                    specified authentication 
  28427.                                                    service. 
  28428.  
  28429.                              rpc_c_protect_level_none Performs no protection. 
  28430.  
  28431.                              rpc_c_protect_level_connect Performs protection 
  28432.                                                    only when the client 
  28433.                                                    establishes a relationship 
  28434.                                                    with the server. 
  28435.  
  28436.                              rpc_c_protect_level_call Performs protection only 
  28437.                                                    at the beginning of each 
  28438.                                                    remote procedure call when 
  28439.                                                    the server receives the 
  28440.                                                    request. 
  28441.  
  28442.                              rpc_c_protect_level_pkt Ensures that all data 
  28443.                                                    received is from the 
  28444.                                                    expected client. 
  28445.  
  28446.                              rpc_c_protect_level_pkt_integ Ensures and verifies 
  28447.                                                    that none of the data 
  28448.                                                    transferred between client 
  28449.                                                    and server has been 
  28450.                                                    modified. 
  28451.  
  28452.                              rpc_c_protect_level_cdmf_priv Performs protection 
  28453.                                                    as specified by all of the 
  28454.                                                    previous levels and also 
  28455.                                                    encrypts each remote 
  28456.                                                    procedure call parameter 
  28457.                                                    value. This protection level 
  28458.                                                    provides a lower level of 
  28459.                                                    packet privacy than 
  28460.                                                    rpc_c_protect_level_pkt_privacy. 
  28461.  
  28462.                              rpc_c_protect_level_pkt_privacy Performs 
  28463.                                                    protection as specified by 
  28464.                                                    all of the previous levels 
  28465.                                                    and also encrypts each 
  28466.                                                    remote procedure call 
  28467.                                                    parameter value. 
  28468.  
  28469.           status        Returns the status code from this routine. On 
  28470.                         successful completion, the routine returns rpc_s_ok. 
  28471.                         Otherwise, it returns the following error: 
  28472.  
  28473.                              rpc_s_unknown_authn_service Unknown authentication 
  28474.                                                   service. 
  28475.  
  28476.  Usage 
  28477.  
  28478.           The rpc_mgmt_inq_dflt_protect_level routine returns the default 
  28479.           protection level for the specified authentication service. 
  28480.  
  28481.           A client can call this routine to learn the default protection level 
  28482.           before specifying rpc_c_protect_level_default for the protect_level 
  28483.           parameter in rpc_binding_set_auth_info. If the default level is 
  28484.           inappropriate, the client can specify a different, explicit level. 
  28485.  
  28486.           A called remote procedure within a server application can call this 
  28487.           routine to obtain the default protection level for a given 
  28488.           authentication service. By calling rpc_binding_inq_auth_client in the 
  28489.           remote procedure, the server can obtain the protection level set up 
  28490.           by the calling client. The server can then compare the 
  28491.           client-specified protection level with the default level to determine 
  28492.           whether to allow the remote procedure to run. 
  28493.  
  28494.           Alternatively, a remote procedure can compare the client's protection 
  28495.           level against a level other than the default level. In this case, 
  28496.           there is no need for the server's remote procedure to call this 
  28497.           routine. 
  28498.  
  28499.  Related Information 
  28500.  
  28501.           Routines: 
  28502.           rpc_binding_inq_auth_client 
  28503.           rpc_binding_set_auth_info 
  28504.  
  28505.  
  28506. ΓòÉΓòÉΓòÉ 5.8.47. rpc_mgmt_inq_if_ids ΓòÉΓòÉΓòÉ
  28507.  
  28508.  Purpose 
  28509.  
  28510.           Returns a vector of interface identifiers of the interfaces a server 
  28511.           offers. This routine is used by client, server, or management 
  28512.           applications. 
  28513.  
  28514.  Format 
  28515.  
  28516.                     #include <dce/rpc.h>
  28517.  
  28518.                     void rpc_mgmt_inq_if_ids(
  28519.                             rpc_binding_handle_t  binding,
  28520.                             rpc_if_id_vector_t  **if_id_vector,
  28521.                             unsigned32  *status);
  28522.  
  28523.  Parameters 
  28524.  
  28525.           Input 
  28526.  
  28527.           binding       Specifies a binding handle. To receive interface 
  28528.                         identifiers from a remote application, specify a server 
  28529.                         binding handle for that application. To receive 
  28530.                         interface information about your own (local) 
  28531.                         application, specify NULL. 
  28532.  
  28533.                         If the binding handle you supply refers to partially 
  28534.                         bound binding information and the binding information 
  28535.                         contains a nil object UUID, this routine returns the 
  28536.                         rpc_s_binding_incomplete status code. In this case, the 
  28537.                         DCE Host daemon (dced) does not know which server 
  28538.                         instance to select from the local endpoint map because 
  28539.                         the RPC management interface is automatically 
  28540.                         registered with the runtime (by the runtime) for all 
  28541.                         RPC servers. 
  28542.  
  28543.                         You can avoid this situation by calling the 
  28544.                         rpc_ep_resolve_binding routine to obtain a fully bound 
  28545.                         server binding handle. 
  28546.  
  28547.           Output 
  28548.  
  28549.           if_id_vector  Returns the address of an interface identifier vector. 
  28550.  
  28551.           status        Returns the status code from this routine. On 
  28552.                         successful completion, the routine returns rpc_s_ok. 
  28553.                         Otherwise, it returns one of the following errors: 
  28554.  
  28555.                              rpc_s_binding_incomplete Binding incomplete (no 
  28556.                                                   object ID and no endpoint). 
  28557.  
  28558.                              rpc_s_comm_failure   Communications failure. 
  28559.  
  28560.                              rpc_s_invalid_arg    The argument is not valid. 
  28561.  
  28562.                              rpc_s_invalid_binding The binding handle is not 
  28563.                                                   valid. 
  28564.  
  28565.                              rpc_s_no_interfaces  No interfaces registered. 
  28566.  
  28567.                              rpc_s_mgmt_op_disallowed The management operation 
  28568.                                                   is disallowed. 
  28569.  
  28570.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  28571.                                                   for the operation. 
  28572.  
  28573.           In addition to the preceding values, status can return the value of 
  28574.           the status parameter from the application-defined authorization 
  28575.           routine (rpc_mgmt_authorization_fn_t). The prototype for such a 
  28576.           routine is defined in the authorization_fn parameter in 
  28577.           rpc_mgmt_set_authorization_fn. 
  28578.  
  28579.  Usage 
  28580.  
  28581.           An application calls the rpc_mgmt_inq_if_ids routine to obtain a 
  28582.           vector of interface identifiers listing the interfaces registered by 
  28583.           a server with the RPC runtime. 
  28584.  
  28585.           If a server has not registered any interfaces with the runtime, this 
  28586.           routine returns a rpc_s_no_interfaces status code and an if_id_vector 
  28587.           parameter value of NULL. 
  28588.  
  28589.           The application calls the rpc_if_id_vector_free routine to release 
  28590.           the memory used by the vector. 
  28591.  
  28592.           By default, the RPC runtime allows all clients to remotely call this 
  28593.           routine. To restrict remote calls of this routine, a server 
  28594.           application supplies an authorization routine using 
  28595.           rpc_mgmt_set_authorization_fn. 
  28596.  
  28597.  Related Information 
  28598.  
  28599.           Routines: 
  28600.           rpc_ep_resolve_binding 
  28601.           rpc_if_id_vector_free 
  28602.           rpc_mgmt_set_authorization_fn 
  28603.           rpc_server_register_if 
  28604.  
  28605.  
  28606. ΓòÉΓòÉΓòÉ 5.8.48. rpc_mgmt_inq_server_princ_name ΓòÉΓòÉΓòÉ
  28607.  
  28608.  Purpose 
  28609.  
  28610.           Returns a server's principal name. This routine is used by client, 
  28611.           server, or management applications. 
  28612.  
  28613.  Format 
  28614.  
  28615.                     #include <dce/rpc.h>
  28616.  
  28617.                     void rpc_mgmt_inq_server_princ_name(
  28618.                             rpc_binding_handle_t  binding,
  28619.                             unsigned32  authn_svc,
  28620.                             unsigned_char_t  **server_princ_name,
  28621.                             unsigned32  *status);
  28622.  
  28623.  Parameters 
  28624.  
  28625.           Input 
  28626.  
  28627.           binding       Specifies a binding handle. If a client application 
  28628.                         wants the principal name from a server application, 
  28629.                         supply a server binding handle for that server. To 
  28630.                         enable a server application to receive its own 
  28631.                         principal name, supply the value NULL. 
  28632.  
  28633.                         If the binding handle you supply refers to partially 
  28634.                         bound binding information and the binding information 
  28635.                         contains a nil object UUID, this routine returns the 
  28636.                         rpc_s_binding_incomplete status code. In this case, the 
  28637.                         DCE Host daemon (dced) does not know which server 
  28638.                         instance to select from the local endpoint map because 
  28639.                         the RPC runtime automatically registers the RPC 
  28640.                         management interface for all RPC servers. 
  28641.  
  28642.                         You can avoid this situation by calling 
  28643.                         rpc_ep_resolve_binding to obtain a fully bound server 
  28644.                         binding handle. 
  28645.  
  28646.           authn_svc     Specifies the authentication service for which a 
  28647.                         principal name is returned. To obtain a list of 
  28648.                         supported authentication services, see the description 
  28649.                         of authn_svc in rpc_binding_set_auth_info. 
  28650.  
  28651.           Output 
  28652.  
  28653.           server_princ_name Returns a principal name. This name is registered 
  28654.                         for the authentication service in the authn_svc 
  28655.                         parameter by the server referenced in the binding 
  28656.                         parameter. If the server registered multiple principal 
  28657.                         names, only one of them is returned. 
  28658.  
  28659.           status        Returns the status code from this routine. On 
  28660.                         successful completion, the routine returns rpc_s_ok. 
  28661.                         Otherwise, it returns one of the following errors: 
  28662.  
  28663.                              rpc_s_binding_incomplete Binding incomplete (no 
  28664.                                                      object ID and no 
  28665.                                                      endpoint). 
  28666.  
  28667.                              rpc_s_comm_failure      Communications failure. 
  28668.  
  28669.                              rpc_s_mgmt_op_disallowed The management operation 
  28670.                                                      is disallowed. 
  28671.  
  28672.                              rpc_s_unknown_authn_service Unknown authentication 
  28673.                                                      service. 
  28674.  
  28675.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  28676.                                                      for the operation. 
  28677.  
  28678.                              sec_s_none_registered   The server has not 
  28679.                                                      registered the server 
  28680.                                                      name. 
  28681.  
  28682.                         In addition to the preceding values, status can return 
  28683.                         the value of the status parameter from the 
  28684.                         application-defined authorization routine 
  28685.                         (rpc_mgmt_authorization_fn_t). The prototype for such a 
  28686.                         routine is defined in the authorization_fn parameter in 
  28687.                         the rpc_mgmt_set_authorization_fn routine. 
  28688.  
  28689.  Usage 
  28690.  
  28691.           An application calls rpc_mgmt_inq_server_princ_name to obtain the 
  28692.           principal name a server registered for a specified authentication 
  28693.           service. 
  28694.  
  28695.           A client (or management) application uses this routine when it wants 
  28696.           to allow one-way authentication with the server specified by binding. 
  28697.           This means that the client does not care which server principal 
  28698.           receives the remote procedure call request. However, the server 
  28699.           verifies that the client is who the client claims to be. For one-way 
  28700.           authentication, a client calls this routine before calling 
  28701.           rpc_binding_set_auth_info. 
  28702.  
  28703.           A server application uses this routine to obtain the principal name 
  28704.           it registered by calling rpc_server_register_auth_info. 
  28705.  
  28706.           The RPC runtime allocates memory for the string returned in the 
  28707.           server_princ_name parameter.  The application calls rpc_string_free 
  28708.           to deallocate that memory. 
  28709.  
  28710.           By default, the RPC runtime allows all clients to call this routine 
  28711.           remotely.  To restrict these calls, a server application supplies an 
  28712.           authorization routine by calling rpc_mgmt_set_authorization_fn. 
  28713.  
  28714.  Related Information 
  28715.  
  28716.           Routines: 
  28717.           rpc_binding_inq_object 
  28718.           rpc_binding_set_auth_info 
  28719.           rpc_ep_resolve_binding 
  28720.           rpc_mgmt_set_authorization_fn 
  28721.           rpc_server_register_auth_info 
  28722.           rpc_string_free 
  28723.           uuid_is_nil 
  28724.  
  28725.  
  28726. ΓòÉΓòÉΓòÉ 5.8.49. rpc_mgmt_inq_stats ΓòÉΓòÉΓòÉ
  28727.  
  28728.  Purpose 
  28729.  
  28730.           Returns RPC runtime statistics. This routine is used by client, 
  28731.           server, or management applications. 
  28732.  
  28733.  Format 
  28734.  
  28735.                     #include <dce/rpc.h>
  28736.  
  28737.                     void rpc_mgmt_inq_stats(
  28738.                             rpc_binding_handle_t  binding,
  28739.                             rpc_stats_vector_t  **statistics,
  28740.                             unsigned32  *status);
  28741.  
  28742.  Parameters 
  28743.  
  28744.           Input 
  28745.  
  28746.           binding       Specifies a binding handle. To receive statistics about 
  28747.                         a remote application, specify a server binding handle 
  28748.                         for that application. To receive statistics about your 
  28749.                         own (local) application, specify NULL. 
  28750.  
  28751.                         If the binding handle you supply refers to partially 
  28752.                         bound binding information and the binding information 
  28753.                         contains a nil object UUID, this routine returns the 
  28754.                         rpc_s_binding_incomplete status code. In this case, the 
  28755.                         DCE Host daemon (dced) does not know which server 
  28756.                         instance to select from the local endpoint map because 
  28757.                         the RPC management interface is automatically 
  28758.                         registered by the runtime for all RPC servers. 
  28759.  
  28760.                         You can avoid this situation by calling 
  28761.                         rpc_ep_resolve_binding to obtain a fully bound server 
  28762.                         binding handle. 
  28763.  
  28764.           Output 
  28765.  
  28766.           statistics    Returns the statistics vector for the server specified 
  28767.                         by the binding parameter. Each statistic is a value of 
  28768.                         the type unsigned32. 
  28769.  
  28770.           status        Returns the status code from this routine. On 
  28771.                         successful completion, the routine returns rpc_s_ok. 
  28772.                         Otherwise, it returns one of the following errors: 
  28773.  
  28774.                              rpc_s_binding_incomplete Binding incomplete (no 
  28775.                                                    object ID and no endpoint). 
  28776.  
  28777.                              rpc_s_comm_failure    Communications failure. 
  28778.  
  28779.                              rpc_s_invalid_binding The binding handle is not 
  28780.                                                    valid. 
  28781.  
  28782.                              rpc_s_mgmt_op_disallowed The management operation 
  28783.                                                    is disallowed. 
  28784.  
  28785.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  28786.                                                    for the operation. 
  28787.  
  28788.                         In addition to the above values, status can return the 
  28789.                         value of parameter status from the application-defined 
  28790.                         authorization routine (rpc_mgmt_authorization_fn_t). 
  28791.                         The prototype for such a routine is defined in the 
  28792.                         authorization_fn parameter in 
  28793.                         rpc_mgmt_set_authorization_fn. 
  28794.  
  28795.  Usage 
  28796.  
  28797.           The rpc_mgmt_inq_stats routine returns statistics from the RPC 
  28798.           runtime about a specified server. The RPC runtime allocates memory 
  28799.           for the statistics vector. The application calls 
  28800.           rpc_mgmt_stat_vector_free to release the memory that the statistics 
  28801.           vector used. See Statistics Vector, which lists the elements of the 
  28802.           vector. 
  28803.  
  28804.           By default, the RPC runtime allows all clients to remotely call this 
  28805.           routine. To restrict remote calls of this routine, a server 
  28806.           application supplies an authorization routine using 
  28807.           rpc_mgmt_set_authorization_fn. 
  28808.  
  28809.  Related Information 
  28810.  
  28811.           Routines: 
  28812.           rpc_ep_resolve_binding 
  28813.           rpc_mgmt_set_authorization_fn 
  28814.           rpc_mgmt_stats_vector_free 
  28815.  
  28816.  
  28817. ΓòÉΓòÉΓòÉ 5.8.50. rpc_mgmt_is_server_listening ΓòÉΓòÉΓòÉ
  28818.  
  28819.  Purpose 
  28820.  
  28821.           Tells whether a server is listening for remote procedure calls. This 
  28822.           routine is used by client, server, or management applications. 
  28823.  
  28824.  Format 
  28825.  
  28826.                     #include <dce/rpc.h>
  28827.  
  28828.                     boolean32 rpc_mgmt_is_server_listening(
  28829.                              rpc_binding_handle_t  binding,
  28830.                              unsigned32  *status);
  28831.  
  28832.  Parameters 
  28833.  
  28834.           Input 
  28835.  
  28836.           binding       Specifies a server binding handle. To determine if a 
  28837.                         remote application is listening for remote procedure 
  28838.                         calls, specify a server binding handle for that 
  28839.                         application. To determine if your own (local) 
  28840.                         application is listening for remote procedure calls, 
  28841.                         specify NULL. 
  28842.  
  28843.                         If the binding handle you supply refers to partially 
  28844.                         bound binding information and the binding information 
  28845.                         contains a nil object UUID, this routine returns the 
  28846.                         rpc_s_binding_incomplete status code. In this case, the 
  28847.                         DCE Host daemon (dced) does not know which server 
  28848.                         instance to select from the local endpoint map because 
  28849.                         the RPC management interface is automatically 
  28850.                         registered by the runtime for all RPC servers. 
  28851.  
  28852.                         You can avoid this situation by calling the 
  28853.                         rpc_ep_resolve_binding routine to obtain a fully bound 
  28854.                         server binding handle. 
  28855.  
  28856.           Output 
  28857.  
  28858.           status        Returns the status code from this routine. On 
  28859.                         successful completion, the routine returns rpc_s_ok. 
  28860.                         Otherwise, it returns one of the following errors: 
  28861.  
  28862.                              rpc_s_binding_incomplete Binding incomplete (no 
  28863.                                                    object ID and no endpoint). 
  28864.  
  28865.                              rpc_s_comm_failure    Communications failure. 
  28866.  
  28867.                              rpc_s_invalid_binding The binding handle is not 
  28868.                                                    valid. 
  28869.  
  28870.                              rpc_s_mgmt_op_disallowed The management operation 
  28871.                                                    is disallowed. 
  28872.  
  28873.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  28874.                                                    for the operation. 
  28875.  
  28876.                         In addition to the above values, status can return the 
  28877.                         value of the status parameter from the 
  28878.                         application-defined authorization routine 
  28879.                         (rpc_mgmt_authorization_fn_t). The prototype for such a 
  28880.                         routine is defined in the authorization_fn parameter in 
  28881.                         rpc_mgmt_set_authorization_fn. 
  28882.  
  28883.  Usage 
  28884.  
  28885.           The rpc_mgmt_is_server_listening routine determines whether the 
  28886.           server specified in the binding parameter is listening for remote 
  28887.           procedure calls. 
  28888.  
  28889.           This routine returns a value of TRUE if the server is blocked in the 
  28890.           rpc_server_listen routine. 
  28891.  
  28892.           By default, the RPC runtime allows all clients to remotely call this 
  28893.           routine. To restrict remote calls of this routine, a server 
  28894.           application supplies an authorization routine using 
  28895.           rpc_mgmt_set_authorization_fn. 
  28896.  
  28897.  Return Codes 
  28898.  
  28899.           Your program must examine the return value of the status parameter 
  28900.           and the return value of the routine to understand the meaning of the 
  28901.           routine value. The following table summarizes the values that this 
  28902.           routine can return: 
  28903.  
  28904.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  28905.                     Γöé Table 6. Values Returned by the rpc_mgmt_is_server_listening Routine Γöé
  28906.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  28907.                     Γöé VALUE    Γöé STATUS CODE         Γöé EXPLANATION        Γöé
  28908.                     Γöé RETURNED   Γöé               Γöé              Γöé
  28909.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  28910.                     Γöé TRUE     Γöé RPC_S_OK          Γöé The specified server is  Γöé
  28911.                     Γöé       Γöé               Γöé listening for remote pro- Γöé
  28912.                     Γöé       Γöé               Γöé cedure calls.       Γöé
  28913.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  28914.                     Γöé FALSE    Γöé ONE OF THE STATUS CODES   Γöé The specified server is  Γöé
  28915.                     Γöé       Γöé LISTED FOR THE status    Γöé not listening for remote  Γöé
  28916.                     Γöé       Γöé PARAMETER          Γöé procedure calls, or the  Γöé
  28917.                     Γöé       Γöé               Γöé server cannot be reached. Γöé
  28918.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  28919.  
  28920.  Related Information 
  28921.  
  28922.           Routines: 
  28923.           rpc_ep_resolve_binding 
  28924.           rpc_mgmt_set_authorization_fn 
  28925.           rpc_server_listen 
  28926.  
  28927.  
  28928. ΓòÉΓòÉΓòÉ 5.8.51. rpc_mgmt_set_authorization_fn ΓòÉΓòÉΓòÉ
  28929.  
  28930.  Purpose 
  28931.  
  28932.           Establishes an authorization routine for processing remote calls to a 
  28933.           server's management routines. This routine is used by server 
  28934.           applications. 
  28935.  
  28936.  Format 
  28937.  
  28938.                     #include <dce/rpc.h>
  28939.  
  28940.                     void rpc_mgmt_set_authorization_fn(
  28941.                             rpc_mgmt_authorization_fn_t  authorization_fn,
  28942.                             unsigned32  *status);
  28943.  
  28944.  Parameters 
  28945.  
  28946.           Input 
  28947.  
  28948.           authorization_fn Specifies a pointer to an authorization routine. The 
  28949.                         RPC server runtime automatically calls this routine 
  28950.                         whenever the server runtime receives a client request 
  28951.                         to run one of the RPC management routines. 
  28952.  
  28953.                         Specify NULL to unregister a previously registered 
  28954.                         authorization routine. In this case, the default 
  28955.                         authorizations (as described later) are used. 
  28956.  
  28957.                         The following C definition for 
  28958.                         rpc_mgmt_authorization_fn_t illustrates the prototype 
  28959.                         for the authorization routine: 
  28960.  
  28961.                                                 typedef boolean32 (*rpc_mgmt_authorization_fn_t)
  28962.                                                 (
  28963.                                                     rpc_binding_handle_t  client_binding,           /* in  */
  28964.                                                     unsigned32  requested_mgmt_operation, /* in  */
  28965.                                                     unsigned32  *status                   /* out */
  28966.                                                 );
  28967.  
  28968.                         The following list shows the requested_mgmt_operation 
  28969.                         values passed by the RPC runtime to the authorization 
  28970.                         routine: 
  28971.  
  28972.                              Called Remote Routine 
  28973.                                                                 requested_mgmt_operation 
  28974.                                                                 Value 
  28975.  
  28976.                              rpc_mgmt_inq_if_ids 
  28977.                                                                 rpc_c_mgmt_inq_if_ids 
  28978.  
  28979.                              rpc_mgmt_inq_server_princ_name 
  28980.                                                                 rpc_c_mgmt_inq_princ_name 
  28981.  
  28982.                              rpc_mgmt_inq_stats 
  28983.                                                                 rpc_c_mgmt_inq_stats 
  28984.  
  28985.                              rpc_mgmt_is_server_listening 
  28986.                                                                 rpc_c_mgmt_is_server_listen 
  28987.  
  28988.                              rpc_mgmt_stop_server_listening 
  28989.                                                                 rpc_c_mgmt_stop_server_listen 
  28990.  
  28991.           Output 
  28992.  
  28993.           status        Returns the status code from this routine. On 
  28994.                         successful completion, the routine returns rpc_s_ok. 
  28995.                         Otherwise, it returns an error. 
  28996.  
  28997.  Usage 
  28998.  
  28999.           The rpc_mgmt_set_authorization_fn routine sets up an authorization 
  29000.           routine to control remote access to the calling server's remote 
  29001.           management routines. 
  29002.  
  29003.           If a server does not provide an authorization routine, the RPC 
  29004.           runtime controls client application access to the server's remote 
  29005.           management routines as shown in the following table. In the table, an 
  29006.           enabled authorization allows all clients to run the remote routine 
  29007.           and a disabled authorization prevents all clients from running the 
  29008.           remote routine. 
  29009.  
  29010.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  29011.                     Γöé Table 7. Default Controls for Remote Management Routines       Γöé
  29012.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29013.                     Γöé REMOTE ROUTINE           Γöé DEFAULT AUTHORIZATION       Γöé
  29014.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29015.                     Γöé RPC_MGMT_INQ_IF_IDS        Γöé enabled              Γöé
  29016.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29017.                     Γöé RPC_MGMT_INQ_SERVER_PRINC_NAME   Γöé enabled              Γöé
  29018.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29019.                     Γöé RPC_MGMT_INQ_STATS         Γöé enabled              Γöé
  29020.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29021.                     Γöé RPC_MGMT_IS_SERVER_LISTENING    Γöé enabled              Γöé
  29022.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29023.                     Γöé RPC_MGMT_STOP_SERVER_LISTENING   Γöé disabled             Γöé
  29024.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  29025.  
  29026.           A server can modify the default authorizations by calling the 
  29027.           rpc_mgmt_set_authorization_fn routine to specify an authorization 
  29028.           routine. When an authorization routine is provided, the RPC runtime 
  29029.           automatically calls that routine to control the running of all remote 
  29030.           management routines called by clients. 
  29031.  
  29032.           The specified routine must provide access control for all of the 
  29033.           remote management routines. 
  29034.  
  29035.           If the authorization routine returns TRUE, the management routine is 
  29036.           allowed to run. If the authorization routine returns FALSE, the 
  29037.           management routine does not run and the called routine returns to the 
  29038.           client the status code returned from the rpc_mgmt_authorization_fn_t 
  29039.           routine. However, if the status code that the 
  29040.           rpc_mgmt_authorization_fn_t routine returns is 0 (zero) or rpc_s_ok, 
  29041.           then the status code rpc_s_mgmt_op_disallowed is returned to the 
  29042.           client. 
  29043.  
  29044.           The RPC runtime calls the server-provided authorization routine with 
  29045.           the following two input parameters: 
  29046.  
  29047.             o  The binding handle of the calling client 
  29048.             o  An integer value denoting which management routine the client 
  29049.                has called. 
  29050.  
  29051.           Using these parameters, the authorization routine determines whether 
  29052.           the calling client is allowed to run the requested management 
  29053.           routine. For example, the authorization routine can call 
  29054.           rpc_binding_inq_auth_client to obtain authentication and 
  29055.           authorization information about the calling client and determine if 
  29056.           that client is authorized to run the requested management routine. 
  29057.  
  29058.  Related Information 
  29059.  
  29060.           Routines: 
  29061.           rpc_mgmt_ep_unregister 
  29062.           rpc_mgmt_inq_if_ids 
  29063.           rpc_mgmt_inq_server_princ_name 
  29064.           rpc_mgmt_inq_stats 
  29065.           rpc_mgmt_is_server_listening 
  29066.           rpc_mgmt_stop_server_listening 
  29067.  
  29068.  
  29069. ΓòÉΓòÉΓòÉ 5.8.52. rpc_mgmt_set_call_timeout ΓòÉΓòÉΓòÉ
  29070.  
  29071.  Purpose 
  29072.  
  29073.           Sets the amount of time the RPC runtime is to wait for a server to 
  29074.           complete a call. 
  29075.  
  29076.           Note:  This routine is not a documented API operation. Initially, 
  29077.                  only the ncadg_xxx protocols support the use of this timeout. 
  29078.                  It might not be supported by other DCE products due to 
  29079.                  implementation changes. 
  29080.  
  29081.  Format 
  29082.  
  29083.                     void rpc_mgmt_set_call_timeout(
  29084.                             rpc_binding_handle_t  *binding,
  29085.                             unsigned32  seconds);
  29086.                             unsigned32  *status);
  29087.  
  29088.  Parameters 
  29089.  
  29090.           Input 
  29091.  
  29092.           binding       The binding handle to use. 
  29093.  
  29094.           seconds       The number of seconds to wait for call completion. 
  29095.  
  29096.           Output 
  29097.  
  29098.           status        Returns the status code from this routine. On 
  29099.                         successful completion, the routine returns rpc_s_ok. 
  29100.                         Otherwise, it returns one of the following errors: 
  29101.  
  29102.                              rpc_s_no_memory 
  29103.                              rpc_s_coding_error 
  29104.                              rpc_s_invalid_binding 
  29105.  
  29106.  Usage 
  29107.  
  29108.           The rpc_mgmt_set_call_timeout routine is a local management routine 
  29109.           that sets the amount of time the RPC runtime is to wait for a server 
  29110.           to complete a call. A timeout of 0 (zero) means no maximum call 
  29111.           execution time is imposed (this is the default). 
  29112.  
  29113.           The value for the call timeout applies to all remote procedure calls 
  29114.           made using the specified binding handle. 
  29115.  
  29116.  Related Information 
  29117.  
  29118.           Routines: 
  29119.           rpc_mgmt_set_com_timeout 
  29120.  
  29121.  
  29122. ΓòÉΓòÉΓòÉ 5.8.53. rpc_mgmt_set_cancel_timeout ΓòÉΓòÉΓòÉ
  29123.  
  29124.  Purpose 
  29125.  
  29126.           Sets the lower bound on the time to wait before timing out after 
  29127.           forwarding a cancel. This routine is used by client applications. 
  29128.  
  29129.  Format 
  29130.  
  29131.                     #include <dce/rpc.h>
  29132.  
  29133.                     void rpc_mgmt_set_cancel_timeout(
  29134.                             signed32  seconds,
  29135.                             unsigned32  *status);
  29136.  
  29137.  Parameters 
  29138.  
  29139.           Input 
  29140.  
  29141.           seconds       An integer specifying the number of seconds to wait for 
  29142.                         a server to acknowledge a cancel. To specify that a 
  29143.                         client waits an infinite amount of time, supply the 
  29144.                         value rpc_c_cancel_infinite_timeout. 
  29145.  
  29146.           Output 
  29147.  
  29148.           status        Returns the status code from this routine. On 
  29149.                         successful completion, the routine returns rpc_s_ok. 
  29150.                         Otherwise, it returns an error. 
  29151.  
  29152.  Usage 
  29153.  
  29154.           The rpc_mgmt_set_cancel_timeout routine resets the amount of time the 
  29155.           RPC runtime waits for a server to acknowledge a cancel before 
  29156.           orphaning the call. 
  29157.  
  29158.           The application specifies either to wait forever or to wait a length 
  29159.           of time specified in seconds. If the value of seconds is 0 (zero), 
  29160.           the remote procedure call is immediately orphaned when the RPC 
  29161.           runtime detects and forwards a pending cancel; control returns 
  29162.           immediately to the client application. The default value, 
  29163.           rpc_c_cancel_infinite_timeout, specifies waiting forever for the call 
  29164.           to complete. 
  29165.  
  29166.           The value for the cancel timeout applies to all remote procedure 
  29167.           calls made in the current thread. A multithreaded client that wishes 
  29168.           to change the timeout value must call this routine in each thread of 
  29169.           execution. 
  29170.  
  29171.           For more information about canceled threads and orphaned remote 
  29172.           procedure calls, see the DCE for OS/2 Warp: Application Development 
  29173.           Guide - Core Components. 
  29174.  
  29175.  Related Information 
  29176.  
  29177.           Routines: 
  29178.           pthread_cancel 
  29179.           pthread_setcancel 
  29180.  
  29181.  
  29182. ΓòÉΓòÉΓòÉ 5.8.54. rpc_mgmt_set_com_timeout ΓòÉΓòÉΓòÉ
  29183.  
  29184.  Purpose 
  29185.  
  29186.           Sets the communications timeout value in a binding handle. This 
  29187.           routine is used by client applications. 
  29188.  
  29189.  Format 
  29190.  
  29191.                     #include <dce/rpc.h>
  29192.  
  29193.                     void rpc_mgmt_set_com_timeout(
  29194.                             rpc_binding_handle_t  binding,
  29195.                             unsigned32  timeout,
  29196.                             unsigned32  *status);
  29197.  
  29198.  Parameters 
  29199.  
  29200.           Input 
  29201.  
  29202.           binding       Specifies the server binding handle whose timeout value 
  29203.                         is set. 
  29204.  
  29205.           timeout       Specifies a communications timeout value. 
  29206.  
  29207.           Output 
  29208.  
  29209.           status        Returns the status code from this routine. On 
  29210.                         successful completion, the routine returns rpc_s_ok. 
  29211.                         Otherwise, it returns one of the following errors: 
  29212.  
  29213.                              rpc_s_invalid_binding The binding handle is not 
  29214.                                                   valid. 
  29215.  
  29216.                              rpc_s_invalid_timeout The timeout value is not 
  29217.                                                   valid. 
  29218.  
  29219.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  29220.                                                   for the operation. 
  29221.  
  29222.  Usage 
  29223.  
  29224.           The rpc_mgmt_set_com_timeout routine resets the communication timeout 
  29225.           value in a server binding handle. The timeout value specifies the 
  29226.           relative amount of time to spend trying to communicate with the 
  29227.           server. Depending on the protocol sequence for the specified binding 
  29228.           handle, the timeout value acts only as advice to the RPC runtime. 
  29229.  
  29230.           After the initial relationship is established, subsequent 
  29231.           communications for the binding handle can revert to not less than the 
  29232.           default timeouts for the protocol service. This means that after 
  29233.           setting a short initial timeout establishing a connection, calls in 
  29234.           progress are not timed out any sooner than the default. 
  29235.  
  29236.           The timeout value can be any integer value from 0 (zero) to 10. Note 
  29237.           that these values do not represent seconds. They represent a relative 
  29238.           amount of time to spend to establish a client-server relationship (a 
  29239.           binding). 
  29240.  
  29241.           Constants are provided for certain values in the timeout range. The 
  29242.           following table of binding timeout values describes the DCE RPC 
  29243.           predefined values that an application can use for the timeout 
  29244.           parameter: 
  29245.  
  29246.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  29247.                     Γöé Table 8. Predefined Timeout Values                  Γöé
  29248.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29249.                     Γöé NAME                Γöé VALUEΓöé DESCRIPTION        Γöé
  29250.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29251.                     Γöé RPC_C_BINDING_MIN_TIMEOUT     Γöé 0   Γöé Attempts to communicate  Γöé
  29252.                     Γöé                  Γöé    Γöé for the minimum amount of Γöé
  29253.                     Γöé                  Γöé    Γöé time for the network pro- Γöé
  29254.                     Γöé                  Γöé    Γöé tocol being used.  This  Γöé
  29255.                     Γöé                  Γöé    Γöé value favors response   Γöé
  29256.                     Γöé                  Γöé    Γöé time over correctness in  Γöé
  29257.                     Γöé                  Γöé    Γöé determining whether the  Γöé
  29258.                     Γöé                  Γöé    Γöé server is running.     Γöé
  29259.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29260.                     Γöé RPC_C_BINDING_DEFAULT_TIMEOUT   Γöé 5   Γöé Attempts to communicate  Γöé
  29261.                     Γöé                  Γöé    Γöé for an average amount of  Γöé
  29262.                     Γöé                  Γöé    Γöé time for the network pro- Γöé
  29263.                     Γöé                  Γöé    Γöé tocol being used.  This  Γöé
  29264.                     Γöé                  Γöé    Γöé value gives equal consid- Γöé
  29265.                     Γöé                  Γöé    Γöé eration to response time  Γöé
  29266.                     Γöé                  Γöé    Γöé and correctness in deter- Γöé
  29267.                     Γöé                  Γöé    Γöé mining whether a server  Γöé
  29268.                     Γöé                  Γöé    Γöé is running.  This is the  Γöé
  29269.                     Γöé                  Γöé    Γöé default value.       Γöé
  29270.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29271.                     Γöé RPC_C_BINDING_MAX_TIMEOUT     Γöé 9   Γöé Attempts to communicate  Γöé
  29272.                     Γöé                  Γöé    Γöé for the longest finite   Γöé
  29273.                     Γöé                  Γöé    Γöé amount of time for the   Γöé
  29274.                     Γöé                  Γöé    Γöé network protocol being   Γöé
  29275.                     Γöé                  Γöé    Γöé used.  This value favors  Γöé
  29276.                     Γöé                  Γöé    Γöé correctness in deter-   Γöé
  29277.                     Γöé                  Γöé    Γöé mining whether a server  Γöé
  29278.                     Γöé                  Γöé    Γöé is running over response  Γöé
  29279.                     Γöé                  Γöé    Γöé time.           Γöé
  29280.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  29281.                     Γöé RPC_C_BINDING_INFINITE_TIMEOUT   Γöé 10  Γöé Attempts to communicate  Γöé
  29282.                     Γöé                  Γöé    Γöé forever.          Γöé
  29283.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  29284.  
  29285.           Note that connection-oriented RPC handles the time-out value 
  29286.           differently from Datagram RPC. Because connection-oriented RPC is 
  29287.           based on a reliable transport layer, communications time-outs are not 
  29288.           as significant as they are under datagram protocol. When 
  29289.           rpc_mgmt_set_com_timeout is called on a binding using 
  29290.           connection-oriented protocol, only the input parameter 
  29291.           rpc_c_binding_infinite_timeout changes binding behavior. All other 
  29292.           values are ignored. 
  29293.  
  29294.  Related Information 
  29295.  
  29296.           Routines: 
  29297.           rpc_mgmt_inq_com_timeout 
  29298.  
  29299.  
  29300. ΓòÉΓòÉΓòÉ 5.8.55. rpc_mgmt_set_server_stack_size ΓòÉΓòÉΓòÉ
  29301.  
  29302.  Purpose 
  29303.  
  29304.           Specifies the stack size for each server thread. This routine is used 
  29305.           by server applications. 
  29306.  
  29307.  Format 
  29308.  
  29309.                     #include <dce/rpc.h>
  29310.  
  29311.                     void rpc_mgmt_set_server_stack_size(
  29312.                             unsigned32  thread_stack_size,
  29313.                             unsigned32  *status);
  29314.  
  29315.  Parameters 
  29316.  
  29317.           Input 
  29318.  
  29319.           thread_stack_size Specifies, in bytes, the stack size allocated for 
  29320.                         each thread created by rpc_server_listen. This value is 
  29321.                         applied to all threads created for the server. Select 
  29322.                         this value based on the stack requirements of the 
  29323.                         remote procedures offered by the server. 
  29324.  
  29325.           Output 
  29326.  
  29327.           status        Returns the status code from this routine. On 
  29328.                         successful completion, the routine returns rpc_s_ok. 
  29329.                         Otherwise, it returns one of the following errors: 
  29330.  
  29331.                              rpc_s_invalid_arg The argument is not valid. 
  29332.  
  29333.                              rpc_s_not_supported Not supported. 
  29334.  
  29335.  Usage 
  29336.  
  29337.           The rpc_mgmt_set_server_stack_size routine specifies the thread stack 
  29338.           size to use when the RPC runtime creates call threads for running 
  29339.           remote procedure calls. The max_calls_exec parameter in 
  29340.           rpc_server_listen specifies the number of call execution threads 
  29341.           created. 
  29342.  
  29343.           If a server knows the stack requirements of all the manager routines 
  29344.           in the interfaces it offers, it can call 
  29345.           rpc_mgmt_set_server_stack_size to ensure that each call thread has 
  29346.           the necessary stack size. 
  29347.  
  29348.           This routine is optional. When used, this routine must be called 
  29349.           before the server calls rpc_server_listen. If a server does not call 
  29350.           this routine, the default per thread stack size from the underlying 
  29351.           threads package is used. 
  29352.  
  29353.           Some thread packages do not support the specification or modification 
  29354.           of thread stack sizes. The packages cannot perform such operations or 
  29355.           the concept of a thread stack size is meaningless to them. 
  29356.  
  29357.  Related Information 
  29358.  
  29359.           Routines: 
  29360.           rpc_server_listen 
  29361.  
  29362.  
  29363. ΓòÉΓòÉΓòÉ 5.8.56. rpc_mgmt_stats_vector_free ΓòÉΓòÉΓòÉ
  29364.  
  29365.  Purpose 
  29366.  
  29367.           Frees a statistics vector. This routine is used by client, server, or 
  29368.           management applications. 
  29369.  
  29370.  Format 
  29371.  
  29372.                     #include <dce/rpc.h>
  29373.  
  29374.                     void rpc_mgmt_stats_vector_free(
  29375.                             rpc_stats_vector_t  **stats_vector,
  29376.                             unsigned32  *status);
  29377.  
  29378.  Parameters 
  29379.  
  29380.           Input/Output 
  29381.  
  29382.           stats_vector  Specifies the address of a pointer to a statistics 
  29383.                         vector. On return, stats_vector contains the value 
  29384.                         NULL. 
  29385.  
  29386.           Output 
  29387.  
  29388.           status        Returns the status code from this routine. On 
  29389.                         successful completion, the routine returns rpc_s_ok. 
  29390.                         Otherwise, it returns an error. 
  29391.  
  29392.  Usage 
  29393.  
  29394.           An application calls rpc_mgmt_stats_vector_free to release the memory 
  29395.           used to store a vector of statistics. 
  29396.  
  29397.           An application calls rpc_mgmt_inq_stats to obtain a vector of 
  29398.           statistics. Follow a call to rpc_mgmt_inq_stats with a call to 
  29399.           rpc_mgmt_stats_vector_free. 
  29400.  
  29401.  Related Information 
  29402.  
  29403.           Routines: 
  29404.           rpc_mgmt_inq_stats 
  29405.  
  29406.  
  29407. ΓòÉΓòÉΓòÉ 5.8.57. rpc_mgmt_stop_server_listening ΓòÉΓòÉΓòÉ
  29408.  
  29409.  Purpose 
  29410.  
  29411.           Tells a server to stop listening for remote procedure calls. This 
  29412.           routine is used by client, server, or management applications. 
  29413.  
  29414.  Format 
  29415.  
  29416.                     #include <dce/rpc.h>
  29417.  
  29418.                     void rpc_mgmt_stop_server_listening(
  29419.                             rpc_binding_handle_t  binding,
  29420.                             unsigned32  *status);
  29421.  
  29422.  Parameters 
  29423.  
  29424.           Input 
  29425.  
  29426.           binding       Specifies a server binding handle. To direct a remote 
  29427.                         server to stop listening for remote procedure calls, 
  29428.                         specify a server binding handle to that server. To 
  29429.                         direct your own (local) server to stop listening for 
  29430.                         remote procedure calls, specify NULL. 
  29431.  
  29432.                         If the binding handle you supply refers to partially 
  29433.                         bound binding information and the binding information 
  29434.                         contains a nil object UUID, this routine returns the 
  29435.                         rpc_s_binding_incomplete status code. In this case, the 
  29436.                         DCE Host daemon (dced) does not know which server 
  29437.                         instance to select from the local endpoint map because 
  29438.                         the RPC management interface is automatically 
  29439.                         registered (by the RPC runtime) for all RPC servers. 
  29440.  
  29441.                         To avoid this situation, you can obtain a fully bound 
  29442.                         server binding handle by calling 
  29443.                         rpc_ep_resolve_binding. 
  29444.  
  29445.           Output 
  29446.  
  29447.           status        Returns the status code from this routine. On 
  29448.                         successful completion, the routine returns rpc_s_ok. 
  29449.                         Otherwise, it returns one of the following errors: 
  29450.  
  29451.                              rpc_s_binding_incomplete Binding incomplete (no 
  29452.                                                   object ID and no endpoint). 
  29453.  
  29454.                              rpc_s_comm_failure   Communications failure. 
  29455.  
  29456.                              rpc_s_invalid_binding The binding handle is not 
  29457.                                                   valid. 
  29458.  
  29459.                              rpc_s_mgmt_op_disallowed The management operation 
  29460.                                                   is disallowed. 
  29461.  
  29462.                              rpc_s_unknown_if     Unknown interface. 
  29463.  
  29464.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  29465.                                                   for the operation. 
  29466.  
  29467.                         In addition to the above values, status can return the 
  29468.                         value of the status parameter from the 
  29469.                         application-defined authorization routine 
  29470.                         (rpc_mgmt_authorization_fn_t). The prototype for such a 
  29471.                         routine is defined in the authorization_fn parameter in 
  29472.                         rpc_mgmt_set_authorization_fn. 
  29473.  
  29474.  Usage 
  29475.  
  29476.           The rpc_mgmt_stop_server_listening routine directs a server to stop 
  29477.           listening for remote procedure calls. 
  29478.  
  29479.           On receiving such a request, the DCE RPC runtime stops accepting new 
  29480.           remote procedure calls. Running calls are allowed to complete. 
  29481.  
  29482.           After all calls complete, rpc_server_listen returns to the caller. 
  29483.  
  29484.           By default, the RPC runtime does not allow any client to remotely 
  29485.           call this routine. To allow clients to run this routine, a server 
  29486.           application supplies an authorization routine using 
  29487.           rpc_mgmt_set_authorization_fn. 
  29488.  
  29489.  Related Information 
  29490.  
  29491.           Routines: 
  29492.  
  29493.  
  29494.           rpc_ep_resolve_binding 
  29495.           rpc_mgmt_set_authorization_fn 
  29496.           rpc_server_listen 
  29497.  
  29498.  
  29499. ΓòÉΓòÉΓòÉ 5.8.58. rpc_network_inq_protseqs ΓòÉΓòÉΓòÉ
  29500.  
  29501.  Purpose 
  29502.  
  29503.           Returns all protocol sequences supported by both the RPC runtime and 
  29504.           the operating system. This routine is used by client and server 
  29505.           applications. 
  29506.  
  29507.  Format 
  29508.  
  29509.                     #include <dce/rpc.h>
  29510.  
  29511.                     void rpc_network_inq_protseqs(
  29512.                             rpc_protseq_vector_t  **protseq_vector,
  29513.                             unsigned32  *status);
  29514.  
  29515.  Parameters 
  29516.  
  29517.           Output 
  29518.  
  29519.           protseq_vector Returns the address of a protocol sequence vector. 
  29520.  
  29521.           status        Returns the status code from this routine. On 
  29522.                         successful completion, the routine returns rpc_s_ok. 
  29523.                         Otherwise, it returns one of the following errors: 
  29524.  
  29525.                              rpc_s_no_protseqs No supported protocol sequences. 
  29526.  
  29527.                              rpc_s_no_memory No memory. 
  29528.  
  29529.  Usage 
  29530.  
  29531.           The rpc_network_inq_protseqs routine obtains a vector containing the 
  29532.           protocol sequences supported by the RPC runtime and the operating 
  29533.           system. A server chooses to accept remote procedure calls over some 
  29534.           or all of the supported protocol sequences. If there are no supported 
  29535.           protocol sequences, this routine returns the rpc_s_no_protseqs status 
  29536.           code and the value NULL in its protseq_vector parameter. 
  29537.  
  29538.           The application calls rpc_protseq_vector_free to release the memory 
  29539.           used by the vector. 
  29540.  
  29541.  Related Information 
  29542.  
  29543.           Routines: 
  29544.           rpc_network_is_protseq_valid 
  29545.           rpc_protseq_vector_free 
  29546.  
  29547.  
  29548. ΓòÉΓòÉΓòÉ 5.8.59. rpc_network_is_protseq_valid ΓòÉΓòÉΓòÉ
  29549.  
  29550.  Purpose 
  29551.  
  29552.           Tells whether the specified protocol sequence is supported by both 
  29553.           the RPC runtime and the operating system. This routine is used by 
  29554.           client and server applications. 
  29555.  
  29556.  Format 
  29557.  
  29558.                     #include <dce/rpc.h>
  29559.  
  29560.                     boolean32 rpc_network_is_protseq_valid(
  29561.                               unsigned_char_t  *protseq,
  29562.                               unsigned32  *status);
  29563.  
  29564.  Parameters 
  29565.  
  29566.           Input 
  29567.  
  29568.           protseq       Specifies a string identifier for a protocol sequence. 
  29569.                         See Protocol Sequence for a list of acceptable values. 
  29570.  
  29571.                         The rpc_network_is_protseq_valid routine determines 
  29572.                         whether this parameter contains a valid protocol 
  29573.                         sequence. If not, the routine returns FALSE and the 
  29574.                         status parameter contains the rpc_s_invalid_rpc_protseq 
  29575.                         status code. 
  29576.  
  29577.           Output 
  29578.  
  29579.           status        Returns the status code from this routine. On 
  29580.                         successful completion, the routine returns rpc_s_ok. 
  29581.                         Otherwise, it returns one of the following errors: 
  29582.  
  29583.                              rpc_s_invalid_rpc_protseq The protocol sequence is 
  29584.                                                   not valid. 
  29585.  
  29586.                              rpc_s_protseq_not_supported Protocol sequence not 
  29587.                                                   supported on this host. 
  29588.  
  29589.  Usage 
  29590.  
  29591.           The rpc_network_is_protseq_valid routine determines whether a 
  29592.           specified protocol sequence is available for making remote procedure 
  29593.           calls. A server chooses to accept remote procedure calls over some or 
  29594.           all of the supported protocol sequences. 
  29595.  
  29596.           A protocol sequence is valid if the RPC runtime and the operating 
  29597.           system support the protocol sequence. DCE RPC supports the protocol 
  29598.           sequences pointed to by the explanation of the protseq parameter. 
  29599.  
  29600.           An application calls rpc_network_inq_protseqs to obtain all the 
  29601.           supported protocol sequences. 
  29602.  
  29603.  Return Codes 
  29604.  
  29605.           This routine can return the following values: 
  29606.  
  29607.           TRUE   The RPC runtime supports the protocol sequence specified in 
  29608.                  the protseq parameter. The routine returns the status code 
  29609.                  rpc_s_ok in the status parameter. 
  29610.  
  29611.           FALSE  The RPC runtime does not support the protocol sequence 
  29612.                  specified in the protseq parameter. 
  29613.  
  29614.  Related Information 
  29615.  
  29616.           Routines: 
  29617.           rpc_network_inq_protseqs 
  29618.           rpc_string_binding_parse 
  29619.  
  29620.  
  29621. ΓòÉΓòÉΓòÉ 5.8.60. rpc_ns_binding_export ΓòÉΓòÉΓòÉ
  29622.  
  29623.  Purpose 
  29624.  
  29625.           Establishes a name service database entry with binding handles or 
  29626.           object UUIDs for a server. This routine is used by server 
  29627.           applications. 
  29628.  
  29629.  Format 
  29630.  
  29631.                     #include <dce/rpc.h>
  29632.  
  29633.                     void rpc_ns_binding_export(
  29634.                             unsigned32  entry_name_syntax,
  29635.                             unsigned_char_t  *entry_name,
  29636.                             rpc_if_handle_t  if_handle,
  29637.                             rpc_binding_vector_t  *binding_vec,
  29638.                             uuid_vector_t  *object_uuid_vec,
  29639.                             unsigned32  *status);
  29640.  
  29641.  Parameters 
  29642.  
  29643.           Input 
  29644.  
  29645.           entry_name_syntax An integer value that specifies the syntax of the 
  29646.                         entry_name parameter. 
  29647.  
  29648.                         To use the syntax specified in the 
  29649.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  29650.                         the value rpc_c_ns_syntax_default. 
  29651.  
  29652.                         For more information, see the name_syntax section in 
  29653.                         Frequently Used RPC Routine Parameters. 
  29654.  
  29655.           entry_name    Specifies the entry name to which binding handles and 
  29656.                         object UUIDs are exported. This can be either the 
  29657.                         global or cell-relative name. 
  29658.  
  29659.           if_handle     Specifies a stub-generated data structure that 
  29660.                         identifies the interface to export. Specifying the 
  29661.                         value NULL indicates there are no binding handles to 
  29662.                         export (only object UUIDs are exported) and the 
  29663.                         binding_vec parameter is ignored. 
  29664.  
  29665.           binding_vec   Specifies a vector of server bindings to export. 
  29666.                         Specify the value NULL for this parameter in cases 
  29667.                         where there are no binding handles to export (only 
  29668.                         object UUIDs are exported). 
  29669.  
  29670.           object_uuid_vec Identifies a vector of object UUIDs offered by the 
  29671.                         server. The server application constructs this vector. 
  29672.                         NULL indicates there are no object UUIDs to export 
  29673.                         (only binding handles are exported). 
  29674.  
  29675.           Output 
  29676.  
  29677.           status        Returns the status code from this routine. On 
  29678.                         successful completion, the routine returns rpc_s_ok. 
  29679.                         Otherwise, it returns one of the following errors: 
  29680.  
  29681.                              rpc_s_incomplete_name Incomplete name. 
  29682.  
  29683.                              rpc_s_invalid_binding The binding handle is not 
  29684.                                                    valid. 
  29685.  
  29686.                              rpc_s_invalid_name_syntax The name syntax is not 
  29687.                                                    valid. 
  29688.  
  29689.                              rpc_s_name_service_unavailable The name service is 
  29690.                                                    unavailable. 
  29691.  
  29692.                              rpc_s_no_ns_permission No permission for the name 
  29693.                                                    service operation. 
  29694.  
  29695.                              rpc_s_nothing_to_export Nothing to export. 
  29696.  
  29697.                              rpc_s_unsupported_name_syntax Unsupported name 
  29698.                                                    syntax. 
  29699.  
  29700.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  29701.                                                    for the operation. 
  29702.  
  29703.  Usage 
  29704.  
  29705.           The rpc_ns_binding_export routine allows a server application to 
  29706.           publicly offer, in the name service database, an interface that any 
  29707.           client application can use. A server application can also use this 
  29708.           routine to publicly offer the object UUIDs of the application's 
  29709.           resources. 
  29710.  
  29711.           To export an interface, the server application calls the routine with 
  29712.           an interface and the server binding handles a client can use to 
  29713.           access the server. 
  29714.  
  29715.           A server can export interfaces and objects in a single call to this 
  29716.           routine, or it can export them separately. 
  29717.  
  29718.           If the entry in the name service database specified by the entry_name 
  29719.           parameter does not exist, rpc_ns_binding_export tries to create it. 
  29720.           In this case a server must have the correct permissions to create the 
  29721.           entry. Otherwise, a management application with the necessary 
  29722.           permissions creates the entry by calling rpc_ns_mgmt_entry_create 
  29723.           before the server runs. 
  29724.  
  29725.           A server is not required to export its interfaces to the name service 
  29726.           database. When a server does not export any interfaces, only clients 
  29727.           that privately know of that server's binding information can access 
  29728.           its interfaces. For example, a client that has the information needed 
  29729.           to construct a string binding can call 
  29730.           rpc_binding_from_string_binding to create a binding handle for making 
  29731.           remote procedure calls to a server. 
  29732.  
  29733.           Before calling rpc_ns_binding_export to export interfaces (but not to 
  29734.           export object UUIDs), a server must do the following: 
  29735.  
  29736.             o  Register one or more protocol sequences with the local RPC 
  29737.                runtime by calling one of the following routines: 
  29738.  
  29739.                     rpc_server_use_protseq 
  29740.                     rpc_server_use_protseq_if 
  29741.                     rpc_server_use_protseq_ep 
  29742.                     rpc_server_use_all_protseq 
  29743.                     rpc_server_use_all_protseqs_if 
  29744.  
  29745.             o  Obtain a list of server bindings by calling 
  29746.                rpc_server_inq_bindings. 
  29747.  
  29748.                The vector returned from rpc_server_inq_bindings becomes the 
  29749.                binding_vec parameter for this routine. To prevent a binding 
  29750.                from being exported, set the selected vector element to the 
  29751.                value NULL. See RPC Data Types and Structures. 
  29752.  
  29753.           A server that uses the rpc_server_use_protseq or 
  29754.           rpc_server_use_all_protseq has dynamic endpoints. The bindings 
  29755.           exported to the name service database will automatically contain a 
  29756.           NULL endpoint. The servers must also register with the local endpoint 
  29757.           map by calling rpc_ep_register or rpc_ep_register_no_replace. 
  29758.  
  29759.           If a server exports an interface to the same entry in the name 
  29760.           service database more than once, the second and subsequent calls to 
  29761.           this routine add the binding information and object UUIDs only if 
  29762.           they differ from the ones in the server entry. Existing data is not 
  29763.           removed from the entry. 
  29764.  
  29765.           To remove binding handles and object UUIDs from the name service 
  29766.           database, a server application calls rpc_ns_binding_unexport and a 
  29767.           management application calls rpc_ns_mgmt_binding_unexport. 
  29768.  
  29769.           For an explanation of how a server can establish a client-server 
  29770.           relationship without using the name service database, see the 
  29771.           explanation of a String Binding. 
  29772.  
  29773.           In addition to calling this routine, a server that called either 
  29774.           rpc_server_use_all_protseq or rpc_server_use_protseq must also 
  29775.           register with the local endpoint map by calling rpc_ep_register or 
  29776.           rpc_ep_register_no_replace. 
  29777.  
  29778.  Permissions Required 
  29779.  
  29780.           You need both read permission and write permission to the CDS object 
  29781.           entry (the target name service entry). If the entry does not exist, 
  29782.           you also need insert permission to the parent directory. 
  29783.  
  29784.  Related Information 
  29785.  
  29786.           Routines: 
  29787.  
  29788.  
  29789.           rpc_ep_register 
  29790.           rpc_ep_register_no_replace 
  29791.           rpc_ns_binding_unexport 
  29792.           rpc_ns_mgmt_binding_unexport 
  29793.           rpc_ns_mgmt_entry_create 
  29794.           rpc_server_inq_bindings 
  29795.           rpc_server_use_all_protseqs 
  29796.           rpc_server_use_all_protseqs_if 
  29797.           rpc_server_use_protseq 
  29798.           rpc_server_use_protseq_ep 
  29799.           rpc_server_use_protseq_if 
  29800.  
  29801.  
  29802. ΓòÉΓòÉΓòÉ 5.8.61. rpc_ns_binding_import_begin ΓòÉΓòÉΓòÉ
  29803.  
  29804.  Purpose 
  29805.  
  29806.           Creates an import context for an interface and an object in the name 
  29807.           service database. This routine is used by client applications. 
  29808.  
  29809.  Format 
  29810.  
  29811.                     #include <dce/rpc.h>
  29812.  
  29813.                     void rpc_ns_binding_import_begin(
  29814.                             unsigned32  entry_name_syntax,
  29815.                             unsigned_char_t  *entry_name,
  29816.                             rpc_if_handle_t  if_handle,
  29817.                             uuid_t  *obj_uuid,
  29818.                             rpc_ns_handle_t  *import_context,
  29819.                             unsigned32  *status);
  29820.  
  29821.  Parameters 
  29822.  
  29823.           Input 
  29824.  
  29825.           entry_name_syntax An integer value that specifies the syntax of the 
  29826.                         entry_name parameter. 
  29827.  
  29828.                         To use the syntax specified in the 
  29829.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  29830.                         the value rpc_c_ns_syntax_default. 
  29831.  
  29832.                         For more information, see the name_syntax section in 
  29833.                         Frequently Used RPC Routine Parameters. 
  29834.  
  29835.           entry_name    Specifies the entry name where the search for 
  29836.                         compatible binding handles begins. This can be either 
  29837.                         the global or cell-relative name. 
  29838.  
  29839.                         To use the entry name found in the RPC_DEFAULT_ENTRY 
  29840.                         environment variable, supply NULL or a null string (\0) 
  29841.                         for this parameter. When this entry name is used, the 
  29842.                         RPC runtime automatically uses the default name syntax 
  29843.                         specified in the RPC_DEFAULT_ENTRY_SYNTAX environment 
  29844.                         variable. 
  29845.  
  29846.           if_handle     A stub-generated data structure specifying the 
  29847.                         interface to import. If the interface specification has 
  29848.                         not been exported or is of no concern to the caller, 
  29849.                         specify NULL for this parameter. In this case the 
  29850.                         bindings returned are only guaranteed to be of a 
  29851.                         compatible and supported protocol sequence and, 
  29852.                         depending on the value of the obj_uuid parameter, 
  29853.                         contain the specified object UUID. The desired 
  29854.                         interface may not be supported by the contacted server. 
  29855.  
  29856.           obj_uuid      Specifies an optional object UUID. 
  29857.  
  29858.                         If you specify NULL or a nil UUID for this parameter, 
  29859.                         the returned binding handles contain one of the object 
  29860.                         UUIDs that the compatible server exported. If the 
  29861.                         server did not export any object UUIDs, the returned 
  29862.                         compatible binding handles contain a nil object UUID. 
  29863.  
  29864.                         If you specify a non-nil UUID, compatible binding 
  29865.                         handles are returned from an entry only if the server 
  29866.                         has exported the specified object UUID. Each returned 
  29867.                         binding handle contains the specified non-nil object 
  29868.                         UUID. 
  29869.  
  29870.           Output 
  29871.  
  29872.           import_context Returns the name service handle for use with 
  29873.                         rpc_ns_binding_import_next and 
  29874.                         rpc_ns_binding_import_done. 
  29875.  
  29876.           status        Returns the status code from this routine. On 
  29877.                         successful completion, the routine returns rpc_s_ok. 
  29878.                         Otherwise, it returns one of the following errors: 
  29879.  
  29880.                              rpc_s_incomplete_name Incomplete name. 
  29881.  
  29882.                              rpc_s_invalid_name_syntax The name syntax is not 
  29883.                                                    valid. 
  29884.  
  29885.                              rpc_s_invalid_object  The object is not valid. 
  29886.  
  29887.                              rpc_s_no_env_setup    The environment variable was 
  29888.                                                    not set up. 
  29889.  
  29890.                              rpc_s_unsupported_name_syntax Unsupported name 
  29891.                                                    syntax. 
  29892.  
  29893.  Usage 
  29894.  
  29895.           The rpc_ns_binding_import_begin routine creates an import context for 
  29896.           importing compatible server binding handles for servers. These 
  29897.           servers offer the specified interface and object UUID in the 
  29898.           respective if_handle and obj_uuid parameters. 
  29899.  
  29900.           Before calling rpc_ns_binding_import_next, the client must first call 
  29901.           this routine to create an import context. The parameters to this 
  29902.           routine control the operation of the rpc_ns_binding_import_next 
  29903.           routine. 
  29904.  
  29905.           After importing binding handles, the client calls the 
  29906.           rpc_ns_binding_import_done routine to delete the import context. 
  29907.  
  29908.  Related Information 
  29909.  
  29910.           Routines: 
  29911.           rpc_ns_binding_import_done 
  29912.           rpc_ns_binding_import_next 
  29913.           rpc_ns_mgmt_handle_set_exp_age 
  29914.  
  29915.  
  29916. ΓòÉΓòÉΓòÉ 5.8.62. rpc_ns_binding_import_done ΓòÉΓòÉΓòÉ
  29917.  
  29918.  Purpose 
  29919.  
  29920.           Deletes the import context for searching the name service database. 
  29921.           This routine is used by client applications. 
  29922.  
  29923.  Format 
  29924.  
  29925.                     #include <dce/rpc.h>
  29926.  
  29927.                     void rpc_ns_binding_import_done(
  29928.                             rpc_ns_handle_t  *import_context,
  29929.                             unsigned32  *status);
  29930.  
  29931.  Parameters 
  29932.  
  29933.           Input/Output 
  29934.  
  29935.           import_context Specifies the name service handle to delete. (A name 
  29936.                         service handle is created by calling 
  29937.                         rpc_ns_binding_import_begin.) Returns the value NULL. 
  29938.  
  29939.           Output 
  29940.  
  29941.           status        Returns the status code from this routine. On 
  29942.                         successful completion, the routine returns rpc_s_ok. 
  29943.                         Otherwise, it returns rpc_s_invalid_ns_handle, which 
  29944.                         indicates that the name service handle is not valid. 
  29945.  
  29946.  Usage 
  29947.  
  29948.           The rpc_ns_binding_import_done routine deletes an import context 
  29949.           created by calling rpc_ns_binding_import_begin. This deletion does 
  29950.           not affect any previously imported bindings. 
  29951.  
  29952.           Typically, a client calls this routine after completing remote 
  29953.           procedure calls to a server using a binding handle returned from 
  29954.           rpc_ns_binding_import_next. A client program calls this routine for 
  29955.           each created import context, regardless of the status returned from 
  29956.           rpc_ns_binding_import_next, or the success in making remote procedure 
  29957.           calls. 
  29958.  
  29959.  Related Information 
  29960.  
  29961.           Routines: 
  29962.           rpc_ns_binding_import_begin 
  29963.           rpc_ns_binding_import_next 
  29964.  
  29965.  
  29966. ΓòÉΓòÉΓòÉ 5.8.63. rpc_ns_binding_import_next ΓòÉΓòÉΓòÉ
  29967.  
  29968.  Purpose 
  29969.  
  29970.           Returns a binding handle of a compatible server (if found) from the 
  29971.           name service database. This routine is used by client applications. 
  29972.  
  29973.  Format 
  29974.  
  29975.                     #include <dce/rpc.h>
  29976.  
  29977.                     void rpc_ns_binding_import_next(
  29978.                             rpc_ns_handle_t  import_context,
  29979.                             rpc_binding_handle_t  *binding,
  29980.                             unsigned32  *status);
  29981.  
  29982.  Parameters 
  29983.  
  29984.           Input 
  29985.  
  29986.           import_context Specifies a name service handle. This handle is 
  29987.                         returned from the rpc_ns_binding_import_begin routine. 
  29988.  
  29989.           Output 
  29990.  
  29991.           binding       Returns a compatible server binding handle. 
  29992.  
  29993.           status        Returns the status code from this routine. On 
  29994.                         successful completion, the routine returns rpc_s_ok. 
  29995.                         Otherwise, it returns one of the following errors: 
  29996.  
  29997.                              rpc_s_class_version_mismatch RPC class version 
  29998.                                                    mismatch. 
  29999.  
  30000.                              rpc_s_entry_not_found Name service entry not 
  30001.                                                    found. 
  30002.  
  30003.                              rpc_s_invalid_ns_handle The name service handle is 
  30004.                                                    not valid. 
  30005.  
  30006.                              rpc_s_name_service_unavailable The name service is 
  30007.                                                    unavailable. 
  30008.  
  30009.                              rpc_s_no_more_bindings No more bindings. 
  30010.  
  30011.                              rpc_s_no_ns_permission No permission for the name 
  30012.                                                    service operation. 
  30013.  
  30014.                              rpc_s_not_rpc_entry   Not an RPC entry. 
  30015.  
  30016.  Usage 
  30017.  
  30018.           The rpc_ns_binding_import_next routine returns one compatible (to the 
  30019.           client) server binding handle selected at random from the name 
  30020.           service database. The server offers the interface and object UUID 
  30021.           specified by the respective if_handle and obj_uuid parameters in 
  30022.           rpc_ns_binding_import_begin. 
  30023.  
  30024.           A similar routine is rpc_ns_binding_lookup_next, which returns a 
  30025.           vector of compatible server binding handles for one or more servers. 
  30026.  
  30027.           Note:  rpc_ns_binding_import_next calls rpc_ns_binding_lookup_next, 
  30028.                  which in turn obtains a vector of server binding handles from 
  30029.                  the name service database. Next, rpc_binding_import_next 
  30030.                  randomly selects one of the elements from the vector. 
  30031.  
  30032.           The rpc_ns_binding_import_next routine communicates only with the 
  30033.           name service database, not directly with servers. 
  30034.  
  30035.           This routine traverses entries in the name service database, 
  30036.           returning compatible server binding handles from each entry.  The 
  30037.           routine can return multiple binding handles from each entry. Search 
  30038.           operations obey the following rules for traversing the entries: 
  30039.  
  30040.             o  At each entry visited, the search operations randomly process 
  30041.                binding information, then group members, then profile members. 
  30042.                Profile members (but not group members) with different 
  30043.                priorities are returned according to their priorities, highest 
  30044.                priority first. 
  30045.  
  30046.             o  The search operation returns members of a group in a random 
  30047.                order. 
  30048.  
  30049.             o  The search operation returns members of a profile with the same 
  30050.                priority in a random order. 
  30051.  
  30052.           The returned compatible binding handle always contains an object 
  30053.           UUID. Its value depends on the value specified in the obj_uuid of 
  30054.           parameter rpc_ns_binding_import_begin as follows: 
  30055.  
  30056.             o  If obj_uuid contains a non-nil object UUID, the returned binding 
  30057.                handle contains that object UUID. 
  30058.  
  30059.             o  If obj_uuid contains a nil object UUID or NULL, the object UUID 
  30060.                returned in the binding handle depends on how the server 
  30061.                exported object UUIDs: 
  30062.  
  30063.                  -  If the server did not export any object UUIDs, the returned 
  30064.                     binding handle contains a nil object UUID. 
  30065.  
  30066.                  -  If the server exported one object UUID, the returned 
  30067.                     binding handle contains that object UUID. 
  30068.  
  30069.                  -  If the server exported multiple object UUIDs, the returned 
  30070.                     binding handle contains one of the object UUIDs, selected 
  30071.                     in an unspecified way. 
  30072.  
  30073.                     Applications should not count on multiple calls to 
  30074.                     rpc_ns_binding_import_next returning different object 
  30075.                     UUIDs. In particular, note that each name service entry 
  30076.                     stores server address information separately from exported 
  30077.                     object UUIDs. Successive calls to 
  30078.                     rpc_ns_binding_import_next using the same import context 
  30079.                     will return exactly one binding for each compatible server 
  30080.                     address, not the cross product of all compatible server 
  30081.                     addresses with all exported UUIDs. Each returned binding 
  30082.                     will contain one of the exported object UUIDs, but 
  30083.                     applications should not count on any specific selection 
  30084.                     mechanism for these object UUIDs. 
  30085.  
  30086.           The client application can use the returned binding handle to make a 
  30087.           remote procedure call to the server. If the client fails to 
  30088.           communicate with the server, it can call rpc_ns_binding_import_next 
  30089.           again. 
  30090.  
  30091.           Each time the client calls rpc_ns_binding_import_next, the routine 
  30092.           returns another server binding handle. The returned binding handles 
  30093.           are unordered. Multiple binding handles can refer to different 
  30094.           protocol sequences from the same server. 
  30095.  
  30096.           When the search finishes, the routine returns a status code of 
  30097.           rpc_s_no_more_bindings and returns the value NULL in the binding 
  30098.           parameter. 
  30099.  
  30100.           A client application calls rpc_ns_binding_inq_entry_name to obtain 
  30101.           the name of the entry in the name service database where the binding 
  30102.           handle came from. 
  30103.  
  30104.           The rpc_ns_binding_import_next routine allocates memory for the 
  30105.           returned binding parameter. When a client application finishes with 
  30106.           the binding handle, it must call rpc_binding_free to deallocate the 
  30107.           memory. Each call to rpc_ns_binding_import_next requires a 
  30108.           corresponding call to rpc_binding_free. 
  30109.  
  30110.           The client calls rpc_ns_binding_import_done after it has 
  30111.           satisfactorily used one or more returned server binding handles. The 
  30112.           rpc_ns_binding_import_done routine deletes the import context. The 
  30113.           client also calls rpc_ns_binding_import_done if the application wants 
  30114.           to start a new search for compatible servers (by calling 
  30115.           rpc_ns_binding_import_begin). The order of binding handles returned 
  30116.           can be different for each new search. This means that the order in 
  30117.           which binding handles are returned to an application can be different 
  30118.           each time the application is run. 
  30119.  
  30120.  Permissions Required 
  30121.  
  30122.           You need read permission to the specified CDS object entry (the 
  30123.           starting name service entry) and to any CDS object entry in the 
  30124.           resulting search path. 
  30125.  
  30126.  Related Information 
  30127.  
  30128.           Routines: 
  30129.           rpc_ns_binding_import_begin 
  30130.           rpc_ns_binding_import_done 
  30131.           rpc_ns_binding_inq_entry_name 
  30132.           rpc_ns_binding_lookup_begin 
  30133.           rpc_ns_binding_lookup_done 
  30134.           rpc_ns_binding_lookup_next 
  30135.           rpc_ns_binding_select 
  30136.  
  30137.  
  30138. ΓòÉΓòÉΓòÉ 5.8.64. rpc_ns_binding_inq_entry_name ΓòÉΓòÉΓòÉ
  30139.  
  30140.  Purpose 
  30141.  
  30142.           Returns the name of an entry in the name service database that the 
  30143.           server binding handle came from. This routine is used by client 
  30144.           applications. 
  30145.  
  30146.  Format 
  30147.  
  30148.                     #include <dce/rpc.h>
  30149.  
  30150.                     void rpc_ns_binding_inq_entry_name(
  30151.                             rpc_binding_handle_t  binding,
  30152.                             unsigned32  entry_name_syntax,
  30153.                             unsigned_char_t  **entry_name,
  30154.                             unsigned32  *status);
  30155.  
  30156.  Parameters 
  30157.  
  30158.           Input 
  30159.  
  30160.           binding       Specifies a server binding handle whose entry name in 
  30161.                         the name service database is returned. 
  30162.  
  30163.           entry_name_syntax An integer value that specifies the syntax of the 
  30164.                         returned entry_name parameter. 
  30165.  
  30166.                         To use the syntax specified in the 
  30167.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  30168.                         the value rpc_c_ns_syntax_default. 
  30169.  
  30170.           Output 
  30171.  
  30172.           entry_name    Returns the name of the entry in the name service 
  30173.                         database in which binding was found. The returned name 
  30174.                         is a global name. 
  30175.  
  30176.                         Specify NULL to prevent the routine from returning this 
  30177.                         parameter. When you specify this value, the client does 
  30178.                         not need to call rpc_string_free. 
  30179.  
  30180.           status        Returns the status code from this routine. On 
  30181.                         successful completion, the routine returns rpc_s_ok. 
  30182.                         Otherwise, it returns one of the following errors: 
  30183.  
  30184.                              rpc_s_incomplete_name Incomplete name. 
  30185.  
  30186.                              rpc_s_invalid_binding The binding handle is not 
  30187.                                                    valid. 
  30188.  
  30189.                              rpc_s_invalid_name_syntax The name syntax is not 
  30190.                                                    valid. 
  30191.  
  30192.                              rpc_s_no_entry_name   No entry name for the 
  30193.                                                    binding. 
  30194.  
  30195.                              rpc_s_unsupported_name_syntax Unsupported name 
  30196.                                                    syntax. 
  30197.  
  30198.                              rpc_s_wrong_kind_of_binding Wrong kind of binding 
  30199.                                                    for the operation. 
  30200.  
  30201.                              rpc_s_no_env_setup    RPC_DEFAULT_ENTRY not set 
  30202.                                                    up. 
  30203.  
  30204.  Usage 
  30205.  
  30206.           The rpc_ns_binding_inq_entry_name routine returns the global name of 
  30207.           the entry in the name service database from which a binding handle 
  30208.           for a compatible server came. 
  30209.  
  30210.           The RPC runtime allocates memory for the string returned in the 
  30211.           entry_name parameter. Your application calls rpc_string_free to 
  30212.           deallocate that memory. 
  30213.  
  30214.           An entry name is associated only with binding handles returned from 
  30215.           the rpc_ns_binding_import_next, rpc_ns_binding_lookup_next, and 
  30216.           rpc_ns_binding_select routines. 
  30217.  
  30218.           If the binding handle specified in the binding parameter is not 
  30219.           returned from an entry in the name service database (for example, the 
  30220.           binding handle is created by calling 
  30221.           rpc_binding_from_string_binding), this routine returns the 
  30222.           rpc_s_no_entry_name status code. 
  30223.  
  30224.  Related Information 
  30225.  
  30226.           Routines: 
  30227.           rpc_binding_from_string_binding 
  30228.           rpc_ns_binding_import_next 
  30229.           rpc_ns_binding_lookup_next 
  30230.           rpc_ns_binding_select 
  30231.           rpc_string_free 
  30232.  
  30233.  
  30234. ΓòÉΓòÉΓòÉ 5.8.65. rpc_ns_binding_lookup_begin ΓòÉΓòÉΓòÉ
  30235.  
  30236.  Purpose 
  30237.  
  30238.           Creates a lookup context for an interface and an object in the name 
  30239.           service database. This routine is used by client applications. 
  30240.  
  30241.  Format 
  30242.  
  30243.                     #include <dce/rpc.h>
  30244.  
  30245.                     void rpc_ns_binding_lookup_begin(
  30246.                             unsigned32  entry_name_syntax,
  30247.                             unsigned_char_t  *entry_name,
  30248.                             rpc_if_handle_t  if_handle,
  30249.                             uuid_t  *object_uuid,
  30250.                             unsigned32  binding_max_count,
  30251.                             rpc_ns_handle_t  *lookup_context,
  30252.                             unsigned32  *status);
  30253.  
  30254.  Parameters 
  30255.  
  30256.           Input 
  30257.  
  30258.           entry_name_syntax An integer value that specifies the syntax of the 
  30259.                         entry_name parameter. 
  30260.  
  30261.                         To use the syntax specified in the 
  30262.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  30263.                         the value rpc_c_ns_syntax_default. 
  30264.  
  30265.           entry_name    Specifies the entry name at which the search for 
  30266.                         compatible binding handles begins. This can be either 
  30267.                         the global or cell-relative name. 
  30268.  
  30269.                         To use the entry name found in the RPC_DEFAULT_ENTRY 
  30270.                         environment variable, supply NULL or a null string (\0) 
  30271.                         for this parameter. When this entry name is used, the 
  30272.                         RPC runtime automatically uses the default name syntax 
  30273.                         specified in the RPC_DEFAULT_ENTRY_SYNTAX environment 
  30274.                         variable. 
  30275.  
  30276.           if_handle     A stub-generated data structure specifying the 
  30277.                         interface to look up. If the interface specification 
  30278.                         has not been exported or is of no concern to the 
  30279.                         caller, specify NULL for this parameter. In this case 
  30280.                         the bindings returned are only guaranteed to be of a 
  30281.                         compatible and supported protocol sequence and contain 
  30282.                         the specified object UUID. The desired interface might 
  30283.                         not be supported by the contacted server. 
  30284.  
  30285.           object_uuid   Specifies an optional object UUID. 
  30286.  
  30287.                         If you specify NULL or a nil UUID for this parameter, 
  30288.                         the returned binding handles contain one of the object 
  30289.                         UUIDs exported by the compatible server. If the server 
  30290.                         did not export any object UUIDs, the returned 
  30291.                         compatible binding handles contain a nil object UUID. 
  30292.  
  30293.                         For a non-nil UUID, compatible binding handles are 
  30294.                         returned from an entry only if the server has exported 
  30295.                         the specified object UUID. Each returned binding handle 
  30296.                         contains the specified non-nil object UUID. 
  30297.  
  30298.           binding_max_count Sets the maximum number of bindings to return in 
  30299.                         the binding_vector parameter of 
  30300.                         rpc_ns_binding_lookup_next. Specify 
  30301.                         rpc_c_binding_max_count_default to use the default 
  30302.                         count. 
  30303.  
  30304.           Output 
  30305.  
  30306.           lookup_context Returns the name service handle for use with the 
  30307.                         rpc_ns_binding_lookup_next and 
  30308.                         rpc_ns_binding_lookup_done routines. 
  30309.  
  30310.           status        Returns the status code from this routine. On 
  30311.                         successful completion, the routine returns rpc_s_ok. 
  30312.                         Otherwise, it returns one of the following errors: 
  30313.  
  30314.                              rpc_s_incomplete_name Incomplete name. 
  30315.  
  30316.                              rpc_s_invalid_name_syntax The name syntax is not 
  30317.                                                    valid. 
  30318.  
  30319.                              rpc_s_invalid_object  The object is not valid. 
  30320.  
  30321.                              rpc_s_no_env_setup    The environment variable is 
  30322.                                                    not set up. 
  30323.  
  30324.                              rpc_s_not_rpc_entry   Not an RPC entry. 
  30325.  
  30326.                              rpc_s_unsupported_name_syntax Unsupported name 
  30327.                                                    syntax. 
  30328.  
  30329.  Usage 
  30330.  
  30331.           The rpc_ns_binding_lookup_begin routine creates a lookup context for 
  30332.           locating compatible server binding handles for servers. These servers 
  30333.           offer the specified interface and object UUID in the respective 
  30334.           if_handle and object_uuid parameters. 
  30335.  
  30336.           Before calling the rpc_ns_binding_lookup_next routine, the client 
  30337.           application must first create a lookup context by calling the 
  30338.           rpc_ns_binding_lookup_begin routine. The parameters to this routine 
  30339.           control the operation of the rpc_ns_binding_lookup_next routine. 
  30340.  
  30341.           When finished locating binding handles, the client application calls 
  30342.           the rpc_ns_binding_lookup_done routine to delete the lookup context. 
  30343.  
  30344.  Related Information 
  30345.  
  30346.           Routines: 
  30347.           rpc_ns_binding_lookup_done 
  30348.           rpc_ns_binding_lookup_next 
  30349.           rpc_ns_mgmt_handle_set_exp_age 
  30350.  
  30351.  
  30352. ΓòÉΓòÉΓòÉ 5.8.66. rpc_ns_binding_lookup_done ΓòÉΓòÉΓòÉ
  30353.  
  30354.  Purpose 
  30355.  
  30356.           Deletes the lookup context for searching the name service database. 
  30357.           This routine is used by client applications. 
  30358.  
  30359.  Format 
  30360.  
  30361.                     #include <dce/rpc.h>
  30362.  
  30363.                     void rpc_ns_binding_lookup_done(
  30364.                             rpc_ns_handle_t  *lookup_context,
  30365.                             unsigned32  *status);
  30366.  
  30367.  Parameters 
  30368.  
  30369.           Input/Output 
  30370.  
  30371.           lookup_context Specifies the name service handle to delete. (A name 
  30372.                         service handle is created by calling 
  30373.                         rpc_ns_binding_lookup_begin.) Returns the value NULL. 
  30374.  
  30375.           Output 
  30376.  
  30377.           status        Returns the status code from this routine. On 
  30378.                         successful completion, the routine returns rpc_s_ok. 
  30379.                         Otherwise, it returns the following error: 
  30380.  
  30381.                              rpc_s_invalid_ns_handle The name service handle is 
  30382.                                                  not valid. 
  30383.  
  30384.  Usage 
  30385.  
  30386.           The rpc_ns_binding_lookup_done routine deletes a lookup context 
  30387.           created by calling rpc_ns_binding_lookup_begin. 
  30388.  
  30389.           Typically, a client calls this routine after completing remote 
  30390.           procedure calls to a server using a binding handle returned from 
  30391.           rpc_ns_binding_lookup_next. A client program calls this routine for 
  30392.           each created lookup context, regardless of the status returned from 
  30393.           rpc_ns_binding_lookup_next, or success in making remote procedure 
  30394.           calls. 
  30395.  
  30396.  Related Information 
  30397.  
  30398.           Routines: 
  30399.           rpc_ns_binding_lookup_begin 
  30400.           rpc_ns_binding_lookup_next 
  30401.  
  30402.  
  30403. ΓòÉΓòÉΓòÉ 5.8.67. rpc_ns_binding_lookup_next ΓòÉΓòÉΓòÉ
  30404.  
  30405.  Purpose 
  30406.  
  30407.           Returns a list of binding handles of one or more compatible servers 
  30408.           (if found) from the name service database. This routine is used by 
  30409.           client applications. 
  30410.  
  30411.  Format 
  30412.  
  30413.                     #include <dce/rpc.h>
  30414.  
  30415.                     void rpc_ns_binding_lookup_next(
  30416.                             rpc_ns_handle_t  lookup_context,
  30417.                             rpc_binding_vector_t  **binding_vec,
  30418.                             unsigned32  *status);
  30419.  
  30420.  Parameters 
  30421.  
  30422.           Input 
  30423.  
  30424.           lookup_context Specifies a name service handle. This handle is 
  30425.                         returned from rpc_ns_binding_lookup_begin. 
  30426.  
  30427.           Output 
  30428.  
  30429.           binding_vec   Returns a vector of compatible server binding handles. 
  30430.  
  30431.           status        Returns the status code from this routine. On 
  30432.                         successful completion, the routine returns rpc_s_ok. 
  30433.                         Otherwise, it returns one of the following errors: 
  30434.  
  30435.                              rpc_s_class_version_mismatch RPC class version 
  30436.                                                    mismatch. 
  30437.  
  30438.                              rpc_s_entry_not_found The name service entry was 
  30439.                                                    not found. 
  30440.  
  30441.                              rpc_s_invalid_ns_handle The name service handle is 
  30442.                                                    not valid. 
  30443.  
  30444.                              rpc_s_name_service_unavailable The name service is 
  30445.                                                    unavailable. 
  30446.  
  30447.                              rpc_s_no_more_bindings No more bindings. 
  30448.  
  30449.                              rpc_s_no_ns_permission No permission for name 
  30450.                                                    service operation. 
  30451.  
  30452.                              rpc_s_not_rpc_entry   Not an RPC entry. 
  30453.  
  30454.  Usage 
  30455.  
  30456.           The rpc_ns_binding_lookup_next routine returns a vector of compatible 
  30457.           (to the client) server binding handles. The servers offer the 
  30458.           interface and object UUID specified by the respective if_handle and 
  30459.           object_uuid parameters in rpc_ns_binding_lookup_begin. The number of 
  30460.           binding handles that rpc_ns_binding_lookup_next attempts to return is 
  30461.           the value of the binding_max_count parameter in 
  30462.           rpc_ns_binding_lookup_begin. 
  30463.  
  30464.           A similar routine is rpc_ns_binding_import_next, which returns one 
  30465.           compatible server binding handle. 
  30466.  
  30467.           The rpc_ns_binding_lookup_next routine communicates only with the 
  30468.           name service database, not directly with servers. 
  30469.  
  30470.           This routine traverses entries in the name service database, 
  30471.           returning compatible server binding handles from each entry. Search 
  30472.           operations obey the following rules for traversing the entries: 
  30473.  
  30474.             o  At each entry visited, the search operations randomly process 
  30475.                binding information, then group members, then profile members. 
  30476.                Profile members with different priorities are returned according 
  30477.                to their priorities, highest priority first. 
  30478.  
  30479.             o  The search operation returns members of a group in random order. 
  30480.  
  30481.             o  The search operation returns members of a profile with the same 
  30482.                priority in random order. 
  30483.  
  30484.           If the entry where the search begins (see entry_name in 
  30485.           rpc_ns_binding_lookup_begin) contains binding handles as well as an 
  30486.           RPC group and a profile, rpc_ns_binding_lookup_next returns the 
  30487.           binding handles from entry_name before searching the group or 
  30488.           profile. This means that rpc_ns_binding_lookup_next can return a 
  30489.           partially full vector before processing the members of the group or 
  30490.           profile. 
  30491.  
  30492.           Each binding handle in the returned vector always contains an object 
  30493.           UUID. Its value depends on the value specified in the object_uuid 
  30494.           parameter of rpc_ns_binding_lookup_begin as follows: 
  30495.  
  30496.             o  If object_uuid contains a non-nil object UUID, each returned 
  30497.                binding handle contains that object UUID. 
  30498.  
  30499.             o  If object_uuid contains a nil object UUID or NULL, the object 
  30500.                UUID returned in each binding handle depends on how the server 
  30501.                exported object UUIDs: 
  30502.  
  30503.                  -  If the server did not export any object UUIDs, each 
  30504.                     returned binding handle contains a nil object UUID. 
  30505.  
  30506.                  -  If the server exported one object UUID, each returned 
  30507.                     binding handle contains that object UUID. 
  30508.  
  30509.                  -  Applications should not count on the binding handles 
  30510.                     returned from a given entry to contain different object 
  30511.                     UUIDs. In particular, not that each name service entry 
  30512.                     stores server address information separately from exported 
  30513.                     object UUIDs. One or more calls to 
  30514.                     rpc_ns_binding_lookup_next returns exactly one binding for 
  30515.                     each compatible server address, not the cross product of 
  30516.                     all compatible server addresses with all exported UUIDs. 
  30517.                     Each returned binding contains one of the exported object 
  30518.                     UUIDs, but applications should not count on any specific 
  30519.                     selection mechanism for these object UUIDs. 
  30520.  
  30521.           From the returned vector of server binding handles, the client 
  30522.           application can employ its own criteria for selecting individual 
  30523.           binding handles, or the application can call rpc_ns_binding_select to 
  30524.           select a binding handle. The rpc_binding_to_string_binding and 
  30525.           rpc_string_binding_parse routines are useful for a client creating 
  30526.           its own selection criteria. 
  30527.  
  30528.           The client application can use the selected binding handle to attempt 
  30529.           a remote procedure call to the server. If the client fails to 
  30530.           communicate with the server, it can select another binding handle 
  30531.           from the vector. When all of the binding handles in the vector are 
  30532.           used, the client application calls rpc_ns_binding_lookup_next again. 
  30533.  
  30534.           Each time the client calls rpc_ns_binding_lookup_next, the routine 
  30535.           returns another vector of binding handles. The binding handles 
  30536.           returned in each vector are unordered, as is the order in which the 
  30537.           vectors are returned from multiple calls to this routine. 
  30538.  
  30539.           When looking up compatible binding handles from a profile, the 
  30540.           binding handles from entries of equal profile priority are unordered 
  30541.           in the returned vector. In addition, the vector returned from a call 
  30542.           to rpc_ns_binding_lookup_next contains only compatible binding 
  30543.           handles from entries of equal profile priority. This means the 
  30544.           returned vector may be partially full. 
  30545.  
  30546.           For example, if the binding_max_count parameter value in 
  30547.           rpc_ns_binding_lookup_begin was 5 and rpc_ns_binding_lookup_begin 
  30548.           finds only three compatible binding handles from profile entries of 
  30549.           priority 0 (zero), rpc_ns_binding_lookup_next returns a partially 
  30550.           full binding vector (with three binding handles). The next call to 
  30551.           rpc_ns_binding_lookup_next creates a new binding vector and begins 
  30552.           looking for compatible binding handles from profile entries of 
  30553.           priority 1. 
  30554.  
  30555.           When the search finishes, the routine returns a status code of 
  30556.           rpc_s_no_more_bindings and returns the value NULL in the binding_vec 
  30557.           parameter. 
  30558.  
  30559.           A client application calls rpc_ns_binding_inq_entry_name to obtain 
  30560.           the name of the entry in the name service database where the binding 
  30561.           handle came from. 
  30562.  
  30563.           The rpc_ns_binding_lookup_next routine allocates memory for the 
  30564.           returned binding_vec parameter. When a client application finishes 
  30565.           with the vector, it must call rpc_binding_vector_free to deallocate 
  30566.           the memory. Each call to rpc_ns_binding_lookup_next requires a 
  30567.           corresponding call to rpc_binding_vector_free. 
  30568.  
  30569.           The client calls rpc_ns_binding_lookup_done, which deletes the lookup 
  30570.           context. The client also calls rpc_ns_binding_lookup_done if the 
  30571.           application wants to start a new search for compatible servers (by 
  30572.           calling rpc_ns_binding_lookup_begin). The order of binding handles 
  30573.           returned can be different for each new search.  This means that the 
  30574.           order in which binding handles are returned to an application can be 
  30575.           different each time the application is run. 
  30576.  
  30577.  Permissions Required 
  30578.  
  30579.           You need read permission to the specified CDS object entry (the 
  30580.           starting name service entry) and to any CDS object entry in the 
  30581.           resulting search path. 
  30582.  
  30583.  Related Information 
  30584.  
  30585.           Routines: 
  30586.           rpc_binding_to_string_binding 
  30587.           rpc_binding_vector_free 
  30588.           rpc_ns_binding_import_next 
  30589.           rpc_ns_binding_inq_entry_name 
  30590.           rpc_ns_binding_lookup_begin 
  30591.           rpc_ns_binding_lookup_done 
  30592.           rpc_ns_binding_select 
  30593.           rpc_string_binding_parse 
  30594.  
  30595.  
  30596. ΓòÉΓòÉΓòÉ 5.8.68. rpc_ns_binding_select ΓòÉΓòÉΓòÉ
  30597.  
  30598.  Purpose 
  30599.  
  30600.           Returns a binding handle from a list of compatible server binding 
  30601.           handles. This routine is used by client applications. 
  30602.  
  30603.  Format 
  30604.  
  30605.                     #include <dce/rpc.h>
  30606.  
  30607.                     void rpc_ns_binding_select(
  30608.                             rpc_binding_vector_t  *binding_vec,
  30609.                             rpc_binding_handle_t  *binding,
  30610.                             unsigned32  *status);
  30611.  
  30612.  Parameters 
  30613.  
  30614.           Input/Output 
  30615.  
  30616.           binding_vec   Specifies the vector of compatible server binding 
  30617.                         handles from which a binding handle is selected. The 
  30618.                         returned binding vector no longer references the 
  30619.                         selected binding handle (returned separately in the 
  30620.                         binding parameter). 
  30621.  
  30622.           Output 
  30623.  
  30624.           binding       Returns a selected server binding handle. 
  30625.  
  30626.           status        Returns the status code from this routine. On 
  30627.                         successful completion, the routine returns rpc_s_ok. 
  30628.                         Otherwise, it returns rpc_s_no_more_bindings, which 
  30629.                         indicates that there are no more bindings. 
  30630.  
  30631.  Usage 
  30632.  
  30633.           The rpc_ns_binding_select routine randomly chooses and returns a 
  30634.           server binding handle from a vector of server binding handles. 
  30635.  
  30636.           Each time the client calls rpc_ns_binding_select, the routine returns 
  30637.           another binding handle from the vector. 
  30638.  
  30639.           When all of the binding handles are returned from the vector, the 
  30640.           routine returns a status code of rpc_s_no_more_bindings and returns 
  30641.           the value NULL in the binding parameter. 
  30642.  
  30643.           The select operation allocates storage for the data referenced by the 
  30644.           returned binding parameter. When a client finishes with the binding 
  30645.           handle, it calls rpc_binding_free to deallocate the storage. Each 
  30646.           call to rpc_ns_binding_select requires a corresponding call to the 
  30647.           rpc_binding_free routine. 
  30648.  
  30649.           Instead of using this routine, client applications can select a 
  30650.           binding handle according to their specific needs. In this case 
  30651.           rpc_binding_to_string_binding and rpc_string_binding_parse are useful 
  30652.           to the applications since the routines work together to extract the 
  30653.           individual fields of a binding handle for examination. 
  30654.  
  30655.  Related Information 
  30656.  
  30657.           Routines: 
  30658.           rpc_binding_free 
  30659.           rpc_binding_to_string_binding 
  30660.           rpc_ns_binding_lookup_next 
  30661.           rpc_string_binding_parse 
  30662.  
  30663.  
  30664. ΓòÉΓòÉΓòÉ 5.8.69. rpc_ns_binding_unexport ΓòÉΓòÉΓòÉ
  30665.  
  30666.  Purpose 
  30667.  
  30668.           Removes the binding handles for an interface or object UUIDs from an 
  30669.           entry in the name service database. This routine is used by server 
  30670.           applications. 
  30671.  
  30672.  Format 
  30673.  
  30674.                     #include <dce/rpc.h>
  30675.  
  30676.                     void rpc_ns_binding_unexport(
  30677.                             unsigned32  entry_name_syntax,
  30678.                             unsigned_char_t  *entry_name,
  30679.                             rpc_if_handle_t  if_handle,
  30680.                             uuid_vector_t  *object_uuid_vec,
  30681.                             unsigned32  *status);
  30682.  
  30683.  Parameters 
  30684.  
  30685.           Input 
  30686.  
  30687.           entry_name_syntax An integer value that specifies the syntax of the 
  30688.                         entry_name parameter. 
  30689.  
  30690.                         To use the syntax specified in the 
  30691.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  30692.                         the value rpc_c_ns_syntax_default. 
  30693.  
  30694.           entry_name    Specifies an entry name whose binding handles or object 
  30695.                         UUIDs are removed. This can be either the global or 
  30696.                         cell-relative name. 
  30697.  
  30698.           if_handle     Specifies an interface specification for the binding 
  30699.                         handles to be removed from the name service database. 
  30700.                         The value NULL indicates that no binding handles are 
  30701.                         removed (only object UUIDs are removed). 
  30702.  
  30703.           object_uuid_vec Specifies a vector of object UUIDs to be removed from 
  30704.                         the name service database. The application constructs 
  30705.                         this vector. The value NULL indicates that no object 
  30706.                         UUIDs are removed (only binding handles are removed). 
  30707.  
  30708.           Output 
  30709.  
  30710.           status       Returns the status code from this routine. On successful 
  30711.                        completion, the routine returns rpc_s_ok. Otherwise, it 
  30712.                        returns one of the following errors: 
  30713.  
  30714.                             rpc_s_class_version_mismatch RPC class version 
  30715.                                                   mismatch. 
  30716.  
  30717.                             rpc_s_entry_not_found The name service entry was 
  30718.                                                   not found. 
  30719.  
  30720.                             rpc_s_incomplete_name Incomplete name. 
  30721.  
  30722.                             rpc_s_interface_not_found The interface was not 
  30723.                                                   found. 
  30724.  
  30725.                             rpc_s_invalid_name_syntax The name syntax is not 
  30726.                                                   valid. 
  30727.  
  30728.                             rpc_s_invalid_vers_option The version option is not 
  30729.                                                   valid. 
  30730.  
  30731.                             rpc_s_name_service_unavailable The name service is 
  30732.                                                   unavailable. 
  30733.  
  30734.                             rpc_s_no_ns_permission No permission for the name 
  30735.                                                   service operation. 
  30736.  
  30737.                             rpc_s_not_all_objs_unexported Not all objects were 
  30738.                                                   unexported. 
  30739.  
  30740.                             rpc_s_nothing_to_unexport Nothing to unexport. 
  30741.  
  30742.                             rpc_s_not_rpc_entry   Not an RPC entry. 
  30743.  
  30744.                             rpc_s_unsupported_name_syntax Unsupported name 
  30745.                                                   syntax. 
  30746.  
  30747.  Usage 
  30748.  
  30749.           The rpc_ns_binding_unexport routine allows a server application to 
  30750.           unexport (that is, remove) one of the following from an entry in the 
  30751.           name service database: 
  30752.  
  30753.             o  All the binding handles for an interface 
  30754.             o  One or more object UUIDs for a resource or resources 
  30755.             o  Both binding handles and object UUIDs 
  30756.  
  30757.           The rpc_ns_binding_unexport routine removes only those binding 
  30758.           handles that match the interface UUID and the major and minor 
  30759.           interface version numbers found in the if_handle parameter. To remove 
  30760.           multiple versions of an interface, use rpc_ns_mgmt_binding_unexport. 
  30761.  
  30762.           A server application can remove an interface and objects in a single 
  30763.           call to this routine, or it can remove them separately. 
  30764.  
  30765.           If rpc_ns_binding_unexport does not find any binding handles for the 
  30766.           specified interface, the routine returns an rpc_s_interface_not_found 
  30767.           status code and does not remove the object UUIDs, if any are 
  30768.           specified. 
  30769.  
  30770.           If one or more binding handles for the specified interface are found 
  30771.           and removed without error, rpc_ns_binding_unexport removes the 
  30772.           specified object UUIDs, if any. 
  30773.  
  30774.           If any of the specified object UUIDs are not found, 
  30775.           rpc_ns_binding_unexport returns the status code 
  30776.           rpc_s_not_all_objs_unexported. 
  30777.  
  30778.           A server application, in addition to calling this routine, also calls 
  30779.           rpc_ep_unregister to unregister any endpoints that the server 
  30780.           previously registered with the local endpoint map. 
  30781.  
  30782.           Use this routine with caution, only when you expect a server to be 
  30783.           unavailable for an extended time, for example, when it is permanently 
  30784.           removed from service. 
  30785.  
  30786.           Additionally, keep in mind that name service databases are designed 
  30787.           to be relatively stable. In replicated name service databases, 
  30788.           frequent use of rpc_ns_binding_export and rpc_ns_binding_unexport 
  30789.           causes the name service to repeatedly remove and replace the same 
  30790.           entry and can cause performance problems. 
  30791.  
  30792.  Permissions Required 
  30793.  
  30794.           You need both read permission and write permission to the CDS object 
  30795.           entry (the target name service entry). 
  30796.  
  30797.  Related Information 
  30798.  
  30799.           Routines: 
  30800.           rpc_ep_unregister 
  30801.           rpc_ns_binding_export 
  30802.           rpc_ns_mgmt_binding_unexport 
  30803.  
  30804.  
  30805. ΓòÉΓòÉΓòÉ 5.8.70. rpc_ns_entry_expand_name ΓòÉΓòÉΓòÉ
  30806.  
  30807.  Purpose 
  30808.  
  30809.           Expands the name of a name service entry. This routine is used by 
  30810.           client, server, or management applications. 
  30811.  
  30812.  Format 
  30813.  
  30814.                     #include <dce/rpc.h>
  30815.  
  30816.                     void rpc_ns_entry_expand_name(
  30817.                             unsigned32  entry_name_syntax,
  30818.                             unsigned_char_t  *entry_name,
  30819.                             unsigned_char_t  **expanded_name,
  30820.                             unsigned32  *status);
  30821.  
  30822.  Parameters 
  30823.  
  30824.           Input 
  30825.  
  30826.           entry_name_syntax An integer value that specifies the syntax of the 
  30827.                         entry_name parameter. 
  30828.  
  30829.                         To use the syntax specified in the 
  30830.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  30831.                         a value of rpc_c_ns_syntax_default. 
  30832.  
  30833.           entry_name    Specifies the entry name to expand. This can be either 
  30834.                         the global or the cell-relative name. 
  30835.  
  30836.           Output 
  30837.  
  30838.           expanded_name Returns a pointer to the expanded version of 
  30839.                         entry_name. Do not specify NULL since the routine 
  30840.                         always returns a name string. 
  30841.  
  30842.           status        Returns the status code from this routine. On 
  30843.                         successful completion, the routine returns rpc_s_ok. 
  30844.                         Otherwise, it returns rpc_s_incomplete_name, which 
  30845.                         indicates that the name is incomplete. 
  30846.  
  30847.  Usage 
  30848.  
  30849.           An application calls rpc_ns_entry_expand_name to obtain a fully 
  30850.           expanded entry name. 
  30851.  
  30852.           The RPC runtime allocates memory for the returned expanded_name 
  30853.           parameter. The application is responsible for calling rpc_string_free 
  30854.           for that returned parameter string. 
  30855.  
  30856.           The returned and expanded entry name accounts for local name 
  30857.           translations and differences in locally defined naming schemas. For 
  30858.           example, suppose the entry in the name service is 
  30859.  
  30860.                     /.:/subsys/PrintQ/server1
  30861.  
  30862.           Upon return from rpc_ns_entry_expand_name, the expanded name could be 
  30863.  
  30864.                     /.../abc.com/subsys/PrintQ/server1
  30865.  
  30866.           For more information about local names and their expansions, see the 
  30867.           DCE for OS/2 Warp: Administration Guide. 
  30868.  
  30869.  Related Information 
  30870.  
  30871.           Routines: 
  30872.           rpc_string_free 
  30873.  
  30874.  
  30875. ΓòÉΓòÉΓòÉ 5.8.71. rpc_ns_entry_inq_resolution ΓòÉΓòÉΓòÉ
  30876.  
  30877.  Purpose 
  30878.  
  30879.           Resolves the cell name space components of a name and returns partial 
  30880.           results. 
  30881.  
  30882.  Format 
  30883.  
  30884.                     #include <dce/rpc.h>
  30885.  
  30886.                     void rpc_ns_entry_inq_resolution(
  30887.                             unsigned32  entry_name_syntax,
  30888.                             unsigned_char_t  *entry_name,
  30889.                             unsigned_char_t  **resolved_name,
  30890.                             unsigned_char_t  **unresolved_name,
  30891.                             unsigned32  *status);
  30892.  
  30893.  Parameters 
  30894.  
  30895.           Input 
  30896.  
  30897.           entry_name_syntax An integer value that specifies the syntax of the 
  30898.                         parameter entry_name. 
  30899.  
  30900.                         To use the syntax specified in the 
  30901.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, supply a 
  30902.                         value of rpc_c_ns_syntax_default. 
  30903.  
  30904.           entry_name    The entry name on which the attempted name resolution 
  30905.                         is to be done. The name can be specified in either 
  30906.                         cell-relative or global form. 
  30907.  
  30908.           Input/Output 
  30909.  
  30910.           resolved_name Returns a pointer to the resolved portion of the entry 
  30911.                         name. The resolved_name string returned is null 
  30912.                         terminated and does not contain trailing component 
  30913.                         separators (that is, no trailing slash (/) characters). 
  30914.  
  30915.                         If NULL is specified on input for this parameter, 
  30916.                         nothing is returned. 
  30917.  
  30918.           unresolved_name Returns a pointer to the unresolved portion of the 
  30919.                         entry name. The unresolved_name string returned is a 
  30920.                         relative name containing no leading component 
  30921.                         separators (that is, it contains no leading slash (/) 
  30922.                         characters). 
  30923.  
  30924.                         If NULL is specified on input for this parameter, 
  30925.                         nothing is returned. 
  30926.  
  30927.            Output 
  30928.  
  30929.           status        Returns the status code from this routine. On 
  30930.                         successful completion, the routine returns rpc_s_ok. 
  30931.                         Otherwise, it returns one of the following errors: 
  30932.  
  30933.                              rpc_s_partial_results The entry name was only 
  30934.                                            partially resolved within the cell 
  30935.                                            name space and the value of 
  30936.                                            unresolved_name points to the 
  30937.                                            residual of the name. 
  30938.  
  30939.                              rpc_s_invalid_name_syntax The requested name 
  30940.                                            syntax is invalid. 
  30941.  
  30942.                              rpc_s_unsupported_name_syntax The requested name 
  30943.                                            syntax is not supported. 
  30944.  
  30945.  Usage 
  30946.  
  30947.           The rpc_ns_entry_inq_resolution routine attempts to read an entry in 
  30948.           the cell name space. If the entire entry name as specified is 
  30949.           successfully read, the full resolution of the entry name (that is, 
  30950.           the originally-specified entry_name) is returned in resolved_name and 
  30951.           the status is set to rpc_s_ok. 
  30952.  
  30953.           If the read was unsuccessful because the full entry was not found in 
  30954.           the cell name space, the status code is set to rpc_s_partial_results 
  30955.           and: 
  30956.  
  30957.             o  The part of the name successfully read is returned in 
  30958.                resolved_name. 
  30959.             o  The remaining (unresolved) part of the name is returned in 
  30960.                unresolved_name. 
  30961.  
  30962.           If the status code is rpc_s_partial_results and the (non-empty) 
  30963.           return parameter resolved_name specifies a leaf (not a directory) 
  30964.           entry, the contents of resolved_name can be used in subsequent calls 
  30965.           to the NSI interface to obtain a binding handle for the server that 
  30966.           exported to the entry. This behavior allows applications to implement 
  30967.           name space junctions to their own internally-implemented name spaces. 
  30968.           Using this routine, clients can attempt to bind to overqualified name 
  30969.           entries whose resolved_name part is the name of the server entry and 
  30970.           whose unresolved_name part is the path name (meaningful to the 
  30971.           server) of some object managed by the application. Calling 
  30972.           rpc_ns_entry_inq_resolution with the full name allows the client to 
  30973.           learn the part of the name that denotes the server entry it must 
  30974.           import bindings from; it can then bind to the server, and pass the 
  30975.           rest of the name, which the server interprets as appropriate. The 
  30976.           sec_acl_bind routine, for example, works this way. 
  30977.  
  30978.           The RPC runtime allocates memory for the returned resolved_name and 
  30979.           unresolved_name parameters. The application is responsible for 
  30980.           calling rpc_string_free to free the allocated memory. 
  30981.  
  30982.  Permissions Required 
  30983.  
  30984.           The application requires read permission for the name entries that 
  30985.           are resolved within the cell name space. 
  30986.  
  30987.  Related Information 
  30988.  
  30989.           Routines: 
  30990.           rpc_ns_binding_export 
  30991.           rpc_ns_binding_import_begin 
  30992.           rpc_ns_binding_import_done 
  30993.           rpc_ns_binding_import_next 
  30994.           rpc_ns_binding_inq_entry_name 
  30995.           rpc_ns_binding_lookup_begin 
  30996.           rpc_ns_binding_lookup_done 
  30997.           rpc_ns_binding_lookup_next 
  30998.           rpc_ns_binding_select 
  30999.           rpc_ns_binding_unexport 
  31000.  
  31001.  
  31002. ΓòÉΓòÉΓòÉ 5.8.72. rpc_ns_entry_object_inq_begin ΓòÉΓòÉΓòÉ
  31003.  
  31004.  Purpose 
  31005.  
  31006.           Creates an inquiry context for viewing the objects of an entry in the 
  31007.           name service database. This routine is used by client, server, or 
  31008.           management applications. 
  31009.  
  31010.  Format 
  31011.  
  31012.                     #include <dce/rpc.h>
  31013.  
  31014.                     void rpc_ns_entry_object_inq_begin(
  31015.                             unsigned32  entry_name_syntax,
  31016.                             unsigned_char_t  *entry_name,
  31017.                             rpc_ns_handle_t  *inquiry_context,
  31018.                             unsigned32  *status);
  31019.  
  31020.  Parameters 
  31021.  
  31022.           Input 
  31023.  
  31024.           entry_name_syntax An integer value that specifies the syntax of the 
  31025.                         entry_name parameter. To use the syntax specified in 
  31026.                         the RPC_DEFAULT_ENTRY_SYNTAX environment variable, 
  31027.                         provide a value of rpc_c_ns_syntax_default. 
  31028.  
  31029.           entry_name    Specifies the entry in the name service database for 
  31030.                         which object UUIDs are viewed. This can be either the 
  31031.                         global or the cell-relative name. 
  31032.  
  31033.           Output 
  31034.  
  31035.           inquiry_context Returns a name service handle for use with 
  31036.                         rpc_ns_entry_object_inq_next and 
  31037.                         rpc_ns_entry_object_inq_done. 
  31038.  
  31039.           status        Returns the status code from this routine. On 
  31040.                         successful completion, the routine returns rpc_s_ok. 
  31041.                         Otherwise, it returns one of the following errors: 
  31042.  
  31043.                              rpc_s_incomplete_name Incomplete name. 
  31044.  
  31045.                              rpc_s_invalid_name_syntax The name syntax is not 
  31046.                                                    valid. 
  31047.  
  31048.                              rpc_s_unsupported_name_syntax Unsupported name 
  31049.                                                    syntax. 
  31050.  
  31051.  Usage 
  31052.  
  31053.           The rpc_ns_entry_object_inq_begin routine creates an inquiry context 
  31054.           for viewing the object UUIDs exported to entry_name. 
  31055.  
  31056.           Before calling rpc_ns_entry_object_inq_next, the application must 
  31057.           first call this routine to create an inquiry context. 
  31058.  
  31059.           When finished viewing the object UUIDs, the application calls 
  31060.           rpc_ns_entry_object_inq_done to delete the inquiry context. 
  31061.  
  31062.  Related Information 
  31063.  
  31064.           Routines: 
  31065.           rpc_ns_binding_export 
  31066.           rpc_ns_entry_object_inq_done 
  31067.           rpc_ns_entry_object_inq_next 
  31068.           rpc_ns_mgmt_handle_set_exp_age 
  31069.  
  31070.  
  31071. ΓòÉΓòÉΓòÉ 5.8.73. rpc_ns_entry_object_inq_done ΓòÉΓòÉΓòÉ
  31072.  
  31073.  Purpose 
  31074.  
  31075.           Deletes the inquiry context for viewing the objects of an entry in 
  31076.           the name service database. This routine is used by client, server, or 
  31077.           management applications. 
  31078.  
  31079.  Format 
  31080.  
  31081.                     #include <dce/rpc.h>
  31082.  
  31083.                     void rpc_ns_entry_object_inq_done(
  31084.                             rpc_ns_handle_t  *inquiry_context,
  31085.                             unsigned32  *status);
  31086.  
  31087.  Parameters 
  31088.  
  31089.           Input/Output 
  31090.  
  31091.           inquiry_context Specifies the name service handle to delete. (A name 
  31092.                         service handle is created by calling 
  31093.                         rpc_ns_entry_object_inq_begin.) Returns the value NULL. 
  31094.  
  31095.           Output 
  31096.  
  31097.           status        Returns the status code from this routine. On 
  31098.                         successful completion, the routine returns rpc_s_ok. 
  31099.                         Otherwise, it returns rpc_s_invalid_ns_handle, which 
  31100.                         indicates that the name service handle is not valid. 
  31101.  
  31102.  Usage 
  31103.  
  31104.           The rpc_ns_entry_object_inq_done routine deletes an inquiry context 
  31105.           created by calling rpc_ns_entry_object_inq_begin. 
  31106.  
  31107.           An application calls this routine after viewing exported object UUIDs 
  31108.           using the rpc_ns_entry_object_inq_next routine. 
  31109.  
  31110.  Related Information 
  31111.  
  31112.           Routines: 
  31113.           rpc_ns_entry_object_inq_begin 
  31114.           rpc_ns_entry_object_inq_next 
  31115.  
  31116.  
  31117. ΓòÉΓòÉΓòÉ 5.8.74. rpc_ns_entry_object_inq_next ΓòÉΓòÉΓòÉ
  31118.  
  31119.  Purpose 
  31120.  
  31121.           Returns one object at a time from an entry in the name service 
  31122.           database. This routine is used by client, server, or management 
  31123.           applications. 
  31124.  
  31125.  Format 
  31126.  
  31127.                     #include <dce/rpc.h>
  31128.  
  31129.                     void rpc_ns_entry_object_inq_next(
  31130.                             rpc_ns_handle_t  inquiry_context,
  31131.                             uuid_t  *obj_uuid,
  31132.                             unsigned32  *status);
  31133.  
  31134.  Parameters 
  31135.  
  31136.           Input 
  31137.  
  31138.           inquiry_context Specifies a name service handle.  This handle is 
  31139.                         returned from rpc_ns_entry_object_inq_begin. 
  31140.  
  31141.           Output 
  31142.  
  31143.           obj_uuid      Returns an exported object UUID. 
  31144.  
  31145.           status        Returns the status code from this routine. On 
  31146.                         successful completion, the routine returns rpc_s_ok. 
  31147.                         Otherwise, it returns one of the following errors: 
  31148.  
  31149.                              rpc_s_class_version_mismatch RPC class version 
  31150.                                                    mismatch. 
  31151.  
  31152.                              rpc_s_entry_not_found The name service entry was 
  31153.                                                    not found. 
  31154.  
  31155.                              rpc_s_incomplete_name Incomplete name. 
  31156.  
  31157.                              rpc_s_invalid_ns_handle The name service handle is 
  31158.                                                    not valid. 
  31159.  
  31160.                              rpc_s_name_service_unavailable The name service is 
  31161.                                                    unavailable. 
  31162.  
  31163.                              rpc_s_no_more_members No more members. 
  31164.  
  31165.                              rpc_s_no_ns_permission There is no permission for 
  31166.                                                    the name service operation. 
  31167.  
  31168.                              rpc_s_not_rpc_entry   Not an RPC entry. 
  31169.  
  31170.  Usage 
  31171.  
  31172.           The rpc_ns_entry_object_inq_next routine returns one of the object 
  31173.           UUIDs exported to an entry in the name service database. The 
  31174.           entry_name parameter in rpc_ns_entry_object_inq_begin specifies the 
  31175.           entry. 
  31176.  
  31177.           An application can view all of the exported object UUIDs by 
  31178.           repeatedly calling rpc_ns_entry_object_inq_next. When all the object 
  31179.           UUIDs are viewed, this routine returns rpc_s_no_more_members to the 
  31180.           status parameter. The returned object UUIDs are unordered. 
  31181.  
  31182.           The application supplies the memory for the object UUID returned in 
  31183.           the obj_uuid parameter. 
  31184.  
  31185.           After viewing the object UUIDs, the application must call 
  31186.           rpc_ns_entry_object_inq_done to delete the inquiry context. 
  31187.  
  31188.           The order that rpc_ns_entry_object_inq_next returns object UUIDs in 
  31189.           can be different for each viewing of an entry. This means that the 
  31190.           order that an application receives object UUIDs in can be different 
  31191.           each time the application runs. 
  31192.  
  31193.  Permissions Required 
  31194.  
  31195.           You need read permission to the CDS object entry (the target name 
  31196.           service entry). 
  31197.  
  31198.  Related Information 
  31199.  
  31200.           Routines: 
  31201.           rpc_ns_binding_export 
  31202.           rpc_ns_entry_object_inq_begin 
  31203.           rpc_ns_entry_object_inq_done 
  31204.  
  31205.  
  31206. ΓòÉΓòÉΓòÉ 5.8.75. rpc_ns_group_delete ΓòÉΓòÉΓòÉ
  31207.  
  31208.  Purpose 
  31209.  
  31210.           Deletes a group attribute. This routine is used by client, server, or 
  31211.           management applications. 
  31212.  
  31213.  Format 
  31214.  
  31215.                     #include <dce/rpc.h>
  31216.  
  31217.                     void rpc_ns_group_delete(
  31218.                             unsigned32  group_name_syntax,
  31219.                             unsigned_char_t  *group_name,
  31220.                             unsigned32  *status);
  31221.  
  31222.  Parameters 
  31223.  
  31224.           Input 
  31225.  
  31226.           group_name_syntax An integer value that specifies the syntax of the 
  31227.                         group_name parameter. To use the syntax specified in 
  31228.                         the RPC_DEFAULT_ENTRY_SYNTAX environment variable, 
  31229.                         provide the integer value rpc_c_ns_syntax_default. 
  31230.  
  31231.           group_name    Specifies the RPC group to delete. This can be either 
  31232.                         the global or the cell-relative name. 
  31233.  
  31234.           Output 
  31235.  
  31236.           status        Returns the status code from this routine. On 
  31237.                         successful completion, the routine returns rpc_s_ok. 
  31238.                         Otherwise, it returns one of the following errors: 
  31239.  
  31240.                              rpc_s_entry_not_found The name service entry was 
  31241.                                                    not found. 
  31242.  
  31243.                              rpc_s_incomplete_name Incomplete name. 
  31244.  
  31245.                              rpc_s_invalid_name_syntax The name syntax is not 
  31246.                                                    valid. 
  31247.  
  31248.                              rpc_s_name_service_unavailable The name service is 
  31249.                                                    unavailable. 
  31250.  
  31251.                              rpc_s_no_ns_permission There is no permission for 
  31252.                                                    the name service operation. 
  31253.  
  31254.                              rpc_s_unsupported_name_syntax Unsupported name 
  31255.                                                    syntax. 
  31256.  
  31257.  Usage 
  31258.  
  31259.           The rpc_ns_group_delete routine deletes the group attribute from the 
  31260.           specified entry in the name service database. 
  31261.  
  31262.           Neither the specified entry nor the entries represented by the group 
  31263.           members are deleted. 
  31264.  
  31265.  Permissions Required 
  31266.  
  31267.           You need write permission to the CDS object entry (the target group 
  31268.           entry). 
  31269.  
  31270.  Related Information 
  31271.  
  31272.           Routines: 
  31273.           rpc_ns_group_mbr_add 
  31274.           rpc_ns_group_mbr_remove 
  31275.  
  31276.  
  31277. ΓòÉΓòÉΓòÉ 5.8.76. rpc_ns_group_mbr_add ΓòÉΓòÉΓòÉ
  31278.  
  31279.  Purpose 
  31280.  
  31281.           Adds an entry name to a group. If necessary, this routine creates the 
  31282.           group entry. This routine is used by client, server, or management 
  31283.           applications. 
  31284.  
  31285.  Format 
  31286.  
  31287.                     #include <dce/rpc.h>
  31288.  
  31289.                     void rpc_ns_group_mbr_add(
  31290.                             unsigned32  group_name_syntax,
  31291.                             unsigned_char_t  *group_name,
  31292.                             unsigned32  member_name_syntax,
  31293.                             unsigned_char_t  *member_name,
  31294.                             unsigned32  *status);
  31295.  
  31296.  Parameters 
  31297.  
  31298.           Input 
  31299.  
  31300.           group_name_syntax An integer value that specifies the syntax of the 
  31301.                         group_name parameter. 
  31302.  
  31303.                         To use the syntax specified in the 
  31304.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  31305.                         the rpc_c_ns_syntax_default. 
  31306.  
  31307.           group_name    Specifies the RPC group that receives a new member. 
  31308.                         This can be either the global or cell-relative name. 
  31309.  
  31310.           member_name_syntax An integer value that specifies the syntax of the 
  31311.                         member_name parameter. 
  31312.  
  31313.                         To use the syntax specified in the 
  31314.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  31315.                         the rpc_c_ns_syntax_default. 
  31316.  
  31317.           member_name   Name of the new RPC group member. This can be either 
  31318.                         the global or cell-relative name. 
  31319.  
  31320.           Output 
  31321.  
  31322.           status        Returns the status code from this routine. On 
  31323.                         successful completion, the routine returns rpc_s_ok. 
  31324.                         Otherwise, it returns one of the following errors: 
  31325.  
  31326.                              rpc_s_class_version_mismatch RPC class version 
  31327.                                                    mismatch. 
  31328.  
  31329.                              rpc_s_incomplete_name Incomplete name. 
  31330.  
  31331.                              rpc_s_invalid_name_syntax The name syntax is not 
  31332.                                                    valid. 
  31333.  
  31334.                              rpc_s_name_service_unavailable The name service is 
  31335.                                                    unavailable. 
  31336.  
  31337.                              rpc_s_no_ns_permission There is no permission for 
  31338.                                                    the name service operation. 
  31339.  
  31340.                              rpc_s_unsupported_name_syntax Unsupported name 
  31341.                                                    syntax. 
  31342.  
  31343.  Usage 
  31344.  
  31345.           The rpc_ns_group_mbr_add routine adds, to the name service database, 
  31346.           an entry name as a member to the name service interface (NSI) group 
  31347.           attribute of an entry. The group_name parameter specifies the group 
  31348.           entry. 
  31349.  
  31350.           If the specified group_name entry does not exist, this routine 
  31351.           creates the entry with a group attribute and adds the group member 
  31352.           specified by the member_name parameter. In this case, the application 
  31353.           must have permission to create the entry. Otherwise, a management 
  31354.           application with the necessary permissions creates the entry by 
  31355.           calling rpc_ns_mgmt_entry_create before the application is run. 
  31356.  
  31357.           An application can add the entry in the member_name parameter to a 
  31358.           group before it creates the entry itself. 
  31359.  
  31360.  Permissions Required 
  31361.  
  31362.           You need both read permission and write permission to the CDS object 
  31363.           entry (the target group entry). If the entry does not exist, you also 
  31364.           need insert permission to the parent directory. 
  31365.  
  31366.  Related Information 
  31367.  
  31368.           Routines: 
  31369.           rpc_ns_group_mbr_remove 
  31370.           rpc_ns_mgmt_entry_create 
  31371.  
  31372.  
  31373. ΓòÉΓòÉΓòÉ 5.8.77. rpc_ns_group_mbr_inq_begin ΓòÉΓòÉΓòÉ
  31374.  
  31375.  Purpose 
  31376.  
  31377.           Creates an inquiry context for viewing group members. This routine is 
  31378.           used by client, server, or management applications. 
  31379.  
  31380.  Format 
  31381.  
  31382.                     #include <dce/rpc.h>
  31383.  
  31384.                     void rpc_ns_group_mbr_inq_begin(
  31385.                             unsigned32  group_name_syntax,
  31386.                             unsigned_char_t  *group_name,
  31387.                             unsigned32  member_name_syntax,
  31388.                             rpc_ns_handle_t  *inquiry_context,
  31389.                             unsigned32  *status);
  31390.  
  31391.  Parameters 
  31392.  
  31393.           Input 
  31394.  
  31395.           group_name_syntax An integer value that specifies the syntax of the 
  31396.                         group_name parameter. 
  31397.  
  31398.                         To use the syntax specified in the 
  31399.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  31400.                         the rpc_c_ns_syntax_default. 
  31401.  
  31402.           group_name    Specifies the name of the RPC group to view. 
  31403.  
  31404.           member_name_syntax An integer value that specifies the syntax of the 
  31405.                         member_name parameter in the rpc_ns_group_mbr_inq_next 
  31406.                         routine. 
  31407.  
  31408.                         To use the syntax specified in the 
  31409.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  31410.                         rpc_c_ns_syntax_default. 
  31411.  
  31412.           Output 
  31413.  
  31414.           inquiry_context Returns a name service handle for use with 
  31415.                         rpc_ns_group_mbr_inq_next and 
  31416.                         rpc_ns_group_mbr_inq_done. 
  31417.  
  31418.           status        Returns the status code from this routine. On 
  31419.                         successful completion, the routine returns rpc_s_ok. 
  31420.                         Otherwise, it returns one of the following errors: 
  31421.  
  31422.                              rpc_s_incomplete_name Incomplete name. 
  31423.  
  31424.                              rpc_s_invalid_name_syntax The name syntax is not 
  31425.                                                    valid. 
  31426.  
  31427.                              rpc_s_unsupported_name_syntax Unsupported name 
  31428.                                                    syntax. 
  31429.  
  31430.  Usage 
  31431.  
  31432.           The rpc_ns_group_mbr_inq_begin routine creates an inquiry context for 
  31433.           viewing the members of an RPC group. 
  31434.  
  31435.           Before calling rpc_ns_group_mbr_inq_next, the application must first 
  31436.           call this routine to create an inquiry context. 
  31437.  
  31438.           When the application finishes viewing the RPC group members, it calls 
  31439.           the rpc_ns_group_mbr_inq_done routine to delete the inquiry context. 
  31440.  
  31441.  Related Information 
  31442.  
  31443.           Routines: 
  31444.           rpc_ns_group_mbr_add 
  31445.           rpc_ns_group_mbr_inq_done 
  31446.           rpc_ns_group_mbr_inq_next 
  31447.           rpc_ns_mgmt_handle_set_exp_age 
  31448.  
  31449.  
  31450. ΓòÉΓòÉΓòÉ 5.8.78. rpc_ns_group_mbr_inq_done ΓòÉΓòÉΓòÉ
  31451.  
  31452.  Purpose 
  31453.  
  31454.           Deletes the inquiry context for a group. This routine is used by 
  31455.           client, server, or management applications. 
  31456.  
  31457.  Format 
  31458.  
  31459.                     #include <dce/rpc.h>
  31460.  
  31461.                     void rpc_ns_group_mbr_inq_done(
  31462.                             rpc_ns_handle_t  *inquiry_context,
  31463.                             unsigned32  *status);
  31464.  
  31465.  Parameters 
  31466.  
  31467.           Input/Output 
  31468.  
  31469.           inquiry_context Specifies the name service handle to delete. (A name 
  31470.                         service handle is created by calling 
  31471.                         rpc_ns_group_mbr_inq_begin.) Returns the value NULL. 
  31472.  
  31473.           Output 
  31474.  
  31475.           status        Returns the status code from this routine. On 
  31476.                         successful completion, the routine returns rpc_s_ok. 
  31477.                         Otherwise, it returns rpc_s_invalid_ns_handle, which 
  31478.                         indicates that the name service handle is not valid. 
  31479.  
  31480.  Usage 
  31481.  
  31482.           The rpc_ns_group_mbr_inq_done routine deletes an inquiry context 
  31483.           created by calling rpc_ns_group_mbr_inq_begin. 
  31484.  
  31485.           An application calls this routine after viewing RPC group members 
  31486.           using rpc_ns_group_mbr_inq_next. 
  31487.  
  31488.  Related Information 
  31489.  
  31490.           Routines: 
  31491.           rpc_ns_group_mbr_inq_begin 
  31492.           rpc_ns_group_mbr_inq_next 
  31493.  
  31494.  
  31495. ΓòÉΓòÉΓòÉ 5.8.79. rpc_ns_group_mbr_inq_next ΓòÉΓòÉΓòÉ
  31496.  
  31497.  Purpose 
  31498.  
  31499.           Returns one member name at a time from a group. This routine is used 
  31500.           by client, server, or management applications. 
  31501.  
  31502.  Format 
  31503.  
  31504.                     #include <dce/rpc.h>
  31505.  
  31506.                     void rpc_ns_group_mbr_inq_next(
  31507.                             rpc_ns_handle_t  inquiry_context,
  31508.                             unsigned_char_t  **member_name,
  31509.                             unsigned32  *status);
  31510.  
  31511.  Parameters 
  31512.  
  31513.           Input 
  31514.  
  31515.           inquiry_context Specifies a name service handle. This handle is 
  31516.                         returned from the rpc_ns_group_mbr_inq_begin routine. 
  31517.  
  31518.           Output 
  31519.  
  31520.           member_name   Returns a pointer to an RPC group member name. The name 
  31521.                         is a global name. 
  31522.  
  31523.                         The syntax of the returned name is specified by the 
  31524.                         member_name_syntax parameter in the 
  31525.                         rpc_ns_group_mbr_inq_begin routine. 
  31526.  
  31527.                         Specify NULL to prevent the routine from returning this 
  31528.                         parameter. In this case, the application does not call 
  31529.                         rpc_string_free. 
  31530.  
  31531.           status        Returns the status code from this routine. On 
  31532.                         successful completion, the routine returns rpc_s_ok. 
  31533.                         Otherwise, it returns one of the following errors: 
  31534.  
  31535.                              rpc_s_class_version_mismatch RPC class version 
  31536.                                                    mismatch. 
  31537.  
  31538.                              rpc_s_entry_not_found The name service entry was 
  31539.                                                    not found. 
  31540.  
  31541.                              rpc_s_invalid_ns_handle The name service handle is 
  31542.                                                    not valid. 
  31543.  
  31544.                              rpc_s_name_service_unavailable The name service is 
  31545.                                                    unavailable. 
  31546.  
  31547.                              rpc_s_no_more_members No more members. 
  31548.  
  31549.                              rpc_s_no_ns_permission There is no permission for 
  31550.                                                    the name service operation. 
  31551.  
  31552.                              rpc_s_not_rpc_entry   Not an RPC entry. 
  31553.  
  31554.  Usage 
  31555.  
  31556.           The rpc_ns_group_mbr_inq_next routine returns one member of the RPC 
  31557.           group specified by the group_name parameter in 
  31558.           rpc_ns_group_mbr_inq_begin. 
  31559.  
  31560.           An application can view all the members of an RPC group by repeatedly 
  31561.           calling rpc_ns_group_mbr_inq_next. When all the group members have 
  31562.           been viewed, this routine returns an rpc_s_no_more_members status. 
  31563.           The returned group members are unordered. 
  31564.  
  31565.           On each call to this routine that returns a member name (as a global 
  31566.           name), the RPC runtime allocates memory for the returned member_name. 
  31567.           The application calls rpc_string_free for each returned member_name 
  31568.           string. 
  31569.  
  31570.           After viewing the RPC group's members, the application must call 
  31571.           rpc_ns_group_mbr_inq_done to delete the inquiry context. 
  31572.  
  31573.  Permissions Required 
  31574.  
  31575.           You need read permission to the CDS object entry (the target group 
  31576.           entry). 
  31577.  
  31578.  Related Information 
  31579.  
  31580.           Routines: 
  31581.           rpc_ns_group_mbr_inq_begin 
  31582.           rpc_ns_group_mbr_inq_done 
  31583.           rpc_string_free 
  31584.  
  31585.  
  31586. ΓòÉΓòÉΓòÉ 5.8.80. rpc_ns_group_mbr_remove ΓòÉΓòÉΓòÉ
  31587.  
  31588.  Purpose 
  31589.  
  31590.           Removes an entry name from a group. This routine is used by client, 
  31591.           server, or management applications. 
  31592.  
  31593.  Format 
  31594.  
  31595.                     #include <dce/rpc.h>
  31596.  
  31597.                     void rpc_ns_group_mbr_remove(
  31598.                             unsigned32  group_name_syntax,
  31599.                             unsigned_char_t  *group_name,
  31600.                             unsigned32  member_name_syntax,
  31601.                             unsigned_char_t  *member_name,
  31602.                             unsigned32  *status);
  31603.  
  31604.  Parameters 
  31605.  
  31606.           Input 
  31607.  
  31608.           group_name_syntax An integer value that specifies the syntax of the 
  31609.                         group_name parameter. 
  31610.  
  31611.                         To use the syntax specified in the 
  31612.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  31613.                         rpc_c_ns_syntax_default. 
  31614.  
  31615.           group_name    Specifies the RPC group from which to remove 
  31616.                         member_name. This can be either the global or 
  31617.                         cell-relative name. 
  31618.  
  31619.           member_name_syntax An integer value that specifies the syntax of the 
  31620.                         member_name parameter. 
  31621.  
  31622.                         To use the syntax specified in the 
  31623.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  31624.                         rpc_c_ns_syntax_default. 
  31625.  
  31626.           member_name   Specifies the member to remove from the name service 
  31627.                         interface (NSI) group attribute in the group_name 
  31628.                         entry. This can be either the global or cell-relative 
  31629.                         name. 
  31630.  
  31631.           Output 
  31632.  
  31633.           status        Returns the status code from this routine. On 
  31634.                         successful completion, the routine returns rpc_s_ok. 
  31635.                         Otherwise, it returns one of the following errors: 
  31636.  
  31637.                              rpc_s_entry_not_found The name service entry was 
  31638.                                                    not found. 
  31639.  
  31640.                              rpc_s_group_member_not_found The group member was 
  31641.                                                    not found. 
  31642.  
  31643.                              rpc_s_incomplete_name Incomplete name. 
  31644.  
  31645.                              rpc_s_invalid_name_syntax The name syntax is not 
  31646.                                                    valid. 
  31647.  
  31648.                              rpc_s_name_service_unavailable The name service is 
  31649.                                                    unavailable. 
  31650.  
  31651.                              rpc_s_no_ns_permission There is no permission for 
  31652.                                                    the name service operation. 
  31653.  
  31654.                              rpc_s_unsupported_name_syntax Unsupported name 
  31655.                                                    syntax. 
  31656.  
  31657.  Usage 
  31658.  
  31659.           The rpc_ns_group_mbr_remove routine removes a member from the NSI 
  31660.           group attribute in the group_name entry. 
  31661.  
  31662.  Permissions Required 
  31663.  
  31664.           You need both read permission and write permission to the CDS object 
  31665.           entry (the target group entry). 
  31666.  
  31667.  Related Information 
  31668.  
  31669.           Routines: 
  31670.           rpc_ns_group_mbr_add 
  31671.  
  31672.  
  31673. ΓòÉΓòÉΓòÉ 5.8.81. rpc_ns_import_ctx_add_eval ΓòÉΓòÉΓòÉ
  31674.  
  31675.  Purpose 
  31676.  
  31677.                      Adds an evaluation routine to an import context.
  31678.           This routine is used by client applications. 
  31679.  
  31680.  Format 
  31681.  
  31682.                     #include <dce/rpc.h>
  31683.  
  31684.                     void rpc_ns_import_ctx_add_eval(
  31685.                             rpc_ns_handle_t  *import_context,
  31686.                             unsigned32  function_type,
  31687.                             rpc_ns_handle_t  *eval_args,
  31688.                             void  *eval_func,
  31689.                             void  *free_func,
  31690.                             error_status_t  *status);
  31691.  
  31692.  Parameters 
  31693.  
  31694.           Input 
  31695.  
  31696.           import_context The name service handle obtained from the 
  31697.                         rpc_ns_binding_import_begin routine. 
  31698.  
  31699.           func_type     The type of evaluation routine. This value currently 
  31700.                         must be rpc_cs_code_eval_func. 
  31701.  
  31702.           eval_args     An opaque data type that contains data used by the 
  31703.                         evaluation routine. 
  31704.  
  31705.                         Client applications adding a DCE RPC code sets 
  31706.                         evaluation routine (rpc_cs_eval_with_universal or 
  31707.                         rpc_cs_eval_without_universal) specify the server's NSI 
  31708.                         entry name in this parameter. 
  31709.  
  31710.           eval_func     A function pointer to the evaluation routine to be 
  31711.                         called from the rpc_ns_binding_import_next routine. The 
  31712.                         void declaration for eval_func means that the routine 
  31713.                         does not return a value. 
  31714.  
  31715.                         Client applications adding a DCE RPC code sets 
  31716.                         evaluation routine (rpc_cs_eval_with_universal or 
  31717.                         rpc_cs_eval_without_universal) specify the routine name 
  31718.                         in this parameter. 
  31719.  
  31720.           free_func     A function pointer to a routine that is called from 
  31721.                         rpc_ns_binding_import_done and which performs 
  31722.                         application-specific cleanup. Client applications 
  31723.                         adding a DCE RPC code sets evaluation routine 
  31724.                         (rpc_cs_eval_with_universal or 
  31725.                         rpc_cs_eval_without_universal) specify NULL in this 
  31726.                         parameter. 
  31727.  
  31728.           Output 
  31729.  
  31730.           import_context Returns the name service handle which contains the 
  31731.                         rpc_ns_binding_import_next and 
  31732.                         rpc_ns_binding_import_done routines. 
  31733.  
  31734.           status        Returns the status code from this routine. On 
  31735.                         successful completion, the routine returns rpc_s_ok. 
  31736.                         Otherwise, it returns one of the following errors: 
  31737.  
  31738.                              rpc_s_no_memory The RPC runtime could not allocate 
  31739.                                            heap storage. 
  31740.  
  31741.                              rpc_s_invalid_ns_handle The import_context 
  31742.                                            parameter was not valid. 
  31743.  
  31744.  Usage 
  31745.  
  31746.           The rpc_ns_import_ctx_add_eval routine adds an evaluation routine to 
  31747.           an import context created by the rpc_ns_binding_import_begin routine. 
  31748.           The evaluation routine adds additional criteria to that used by 
  31749.           rpc_ns_binding_import_next (that is, protocol and interface 
  31750.           information) for importing compatible server binding handles. Client 
  31751.           applications call the rpc_ns_import_ctx_add_eval routine once for 
  31752.           each evaluation routine to be added to an import context (if there 
  31753.           are multiple evaluation routines to be set up.) 
  31754.  
  31755.           If the user-specified evaluation routine needs to perform special 
  31756.           cleanup routines, such as deleting a temporary file from a disk, use 
  31757.           the free_func parameter to specify the cleanup routine to be called 
  31758.           from rpc_ns_binding_import_done. 
  31759.  
  31760.           For DCE 1.1, client applications that transfer international 
  31761.           character data in a heterogeneous character set and code set 
  31762.           environment use the rpc_ns_import_ctx_add_eval routine to add one or 
  31763.           more code sets evaluation routines to the import context returned by 
  31764.           the rpc_ns_binding_import_begin routine. When the client application 
  31765.           calls the rpc_ns_binding_import_next routine to import compatible 
  31766.           binding handles for servers, this routine calls the code sets 
  31767.           evaluation routine, which applies client-server character set and 
  31768.           code sets compatibility checking as other criteria for compatible 
  31769.           binding selection. 
  31770.  
  31771.           The code sets compatibility evaluation routine specified can be one 
  31772.           of the following: 
  31773.  
  31774.           rpc_cs_eval_with_universal A DCE RPC code sets evaluation routine 
  31775.                         that evaluates character set and code sets 
  31776.                         compatibility between client and server. If client and 
  31777.                         server character sets are compatible but their 
  31778.                         supported code sets are not, the routine sets code set 
  31779.                         tags that direct the client and server stubs to convert 
  31780.                         character data to the DCE intermediate code set, which 
  31781.                         is the ISO 10646 (or universal) code set (UCS-2, Level 
  31782.                         1). 
  31783.  
  31784.           rpc_cs_eval_without_universal A DCE RPC code sets evaluation routine 
  31785.                         that evaluates character set and code sets 
  31786.                         compatibility between client and server. If client and 
  31787.                         server character sets are compatible, but their 
  31788.                         supported code sets are not, the routine attempts to 
  31789.                         return the message rpc_s_no_compat_codesets to the 
  31790.                         rpc_ns_binding_import_next routine. 
  31791.  
  31792.           application_supplied_routine A user-written code sets evaluation 
  31793.                         routine. Application developers writing 
  31794.                         internationalized DCE applications can develop their 
  31795.                         own code sets evaluation routines for client-server 
  31796.                         code sets evaluation if the DCE-supplied routines do 
  31797.                         not meet their application's needs. 
  31798.  
  31799.  Restrictions 
  31800.  
  31801.           Client applications that add evaluation routines to the server 
  31802.           binding import context cannot use the automatic binding method to 
  31803.           bind to a server. 
  31804.  
  31805.  Related Information 
  31806.  
  31807.           Routines: 
  31808.           rpc_cs_eval_with_universal 
  31809.           rpc_cs_eval_without_universal 
  31810.           rpc_ns_binding_import_begin 
  31811.           rpc_ns_binding_import_done 
  31812.           rpc_ns_binding_import_next 
  31813.           rpc_ns_mgmt_handle_set_exp_age 
  31814.  
  31815.  
  31816. ΓòÉΓòÉΓòÉ 5.8.82. rpc_ns_mgmt_binding_unexport ΓòÉΓòÉΓòÉ
  31817.  
  31818.  Purpose 
  31819.  
  31820.           Removes multiple binding handles or object UUIDs from an entry in the 
  31821.           name service database. This routine is used by management 
  31822.           applications. 
  31823.  
  31824.  Format 
  31825.  
  31826.                     #include <dce/rpc.h>
  31827.  
  31828.                     void rpc_ns_mgmt_binding_unexport(
  31829.                             unsigned32  entry_name_syntax,
  31830.                             unsigned_char_t  *entry_name,
  31831.                             rpc_if_id_t  *if_id,
  31832.                             unsigned32  vers_option,
  31833.                             uuid_vector_t  *object_uuid_vec,
  31834.                             unsigned32  *status);
  31835.  
  31836.  Parameters 
  31837.  
  31838.           Input 
  31839.  
  31840.           entry_name_syntax An integer value that specifies the syntax of the 
  31841.                         entry_name parameter. 
  31842.  
  31843.                         To use the syntax specified in the 
  31844.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  31845.                         rpc_c_ns_syntax_default. 
  31846.  
  31847.           entry_name    Specifies an entry name whose binding handles or object 
  31848.                         UUIDs are removed. This can be either the global or 
  31849.                         cell-relative name. 
  31850.  
  31851.           if_id         Specifies an interface identifier for the binding 
  31852.                         handles to be removed from the name service database. 
  31853.                         The value NULL indicates that no binding handles are 
  31854.                         removed (only object UUIDs are removed). 
  31855.  
  31856.           vers_option   Specifies how the rpc_ns_mgmt_binding_unexport routine 
  31857.                         uses the vers_major and the vers_minor fields of the 
  31858.                         if_id parameter. 
  31859.  
  31860.                         The following list presents the accepted values for 
  31861.                         this parameter: 
  31862.  
  31863.                              Value            Description 
  31864.  
  31865.                              rpc_c_vers_all   Unexports (removes) all bindings 
  31866.                                               for the interface UUID in if_id, 
  31867.                                               regardless of the version 
  31868.                                               numbers. For this value, specify 
  31869.                                               0 (zero) for both the major and 
  31870.                                               minor versions in if_id. 
  31871.  
  31872.                              rpc_c_vers_compatible Removes those bindings for 
  31873.                                               the interface UUID in if_id with 
  31874.                                               the same major version as in 
  31875.                                               if_id, and with a minor version 
  31876.                                               greater than or equal to the 
  31877.                                               minor version in if_id. 
  31878.  
  31879.                              rpc_c_vers_exact Removes those bindings for the 
  31880.                                               interface UUID in if_id with the 
  31881.                                               same major and minor versions as 
  31882.                                               in if_id. 
  31883.  
  31884.                              rpc_c_vers_major_only Removes those bindings for 
  31885.                                               the interface UUID in if_id with 
  31886.                                               the same major version as in 
  31887.                                               if_id (ignores the minor 
  31888.                                               version). For this value, specify 
  31889.                                               0 (zero) for the minor version in 
  31890.                                               if_id. 
  31891.  
  31892.                              rpc_c_vers_upto  Removes those bindings that offer 
  31893.                                               a version of the specified 
  31894.                                               interface UUID less than or equal 
  31895.                                               to the specified major and minor 
  31896.                                               version. (For example, if the 
  31897.                                               if_id parameter contains V2.0 and 
  31898.                                               the name service entry contains 
  31899.                                               binding handles with the versions 
  31900.                                               V1.3, V2.0, and V2.1, 
  31901.                                               rpc_ns_mgmt_binding_unexport 
  31902.                                               removes the binding handles with 
  31903.                                               V1.3 and V2.0.) 
  31904.  
  31905.           object_uuid_vec Specifies a vector of object UUIDs to be removed from 
  31906.                         the name service database. The application constructs 
  31907.                         this vector. The value NULL indicates that no object 
  31908.                         UUIDs are removed (only binding handles are removed). 
  31909.  
  31910.           Output 
  31911.  
  31912.           status        Returns the status code from this routine. On 
  31913.                         successful completion, the routine returns rpc_s_ok. 
  31914.                         Otherwise, it returns one of the following errors: 
  31915.  
  31916.                              rpc_s_entry_not_found The name service entry was 
  31917.                                                    not found. 
  31918.  
  31919.                              rpc_s_incomplete_name Incomplete name. 
  31920.  
  31921.                              rpc_s_interface_not_found The interface was not 
  31922.                                                    found. 
  31923.  
  31924.                              rpc_s_invalid_name_syntax The name syntax is not 
  31925.                                                    valid. 
  31926.  
  31927.                              rpc_s_invalid_vers_option The version option is 
  31928.                                                    not valid. 
  31929.  
  31930.                              rpc_s_name_service_unavailable The name service is 
  31931.                                                    unavailable. 
  31932.  
  31933.                              rpc_s_no_ns_permission There is no permission for 
  31934.                                                    the name service operation. 
  31935.  
  31936.                              rpc_s_not_all_objs_unexported Not all objects 
  31937.                                                    unexported. 
  31938.  
  31939.                              rpc_s_nothing_to_unexport Nothing to unexport. 
  31940.  
  31941.                              rpc_s_not_rpc_entry   Not an RPC entry. 
  31942.  
  31943.                              rpc_s_unsupported_name_syntax Unsupported name 
  31944.                                                    syntax. 
  31945.  
  31946.  Usage 
  31947.  
  31948.           The rpc_ns_mgmt_binding_unexport routine allows a management 
  31949.           application to unexport (that is, remove) any of the following from 
  31950.           an entry in the name service database: 
  31951.  
  31952.             o  All the binding handles for a specified interface UUID, 
  31953.                qualified by the interface version numbers (major and minor) 
  31954.  
  31955.             o  One or more object UUIDs of resources 
  31956.  
  31957.             o  Both binding handles and object UUIDs of resources 
  31958.  
  31959.           A management application can remove an interface and objects in a 
  31960.           single call to this routine, or it can remove them separately. 
  31961.  
  31962.           If the rpc_ns_mgmt_binding_unexport routine does not find any binding 
  31963.           handles for the specified interface, the routine returns an 
  31964.           rpc_s_interface_not_found status code and does not remove the object 
  31965.           UUIDs, if any are specified. 
  31966.  
  31967.           If one or more binding handles for the specified interface are found 
  31968.           and removed without error, rpc_ns_mgmt_binding_unexport removes the 
  31969.           specified object UUIDs, if any. 
  31970.  
  31971.           If any of the specified object UUIDs are not found, 
  31972.           rpc_ns_mgmt_binding_unexport returns the rpc_not_all_objs_unexported 
  31973.           status code. 
  31974.  
  31975.           A management application, in addition to calling this routine, also 
  31976.           calls rpc_mgmt_ep_unregister to remove any servers that have 
  31977.           registered with the local endpoint map. 
  31978.  
  31979.           Use this routine with caution and only when you expect a server to be 
  31980.           unavailable for an extended time; for example, when it is permanently 
  31981.           removed from service. 
  31982.  
  31983.           Additionally, keep in mind that name service databases are designed 
  31984.           to be relatively stable. In replicated name service databases, 
  31985.           frequent use of rpc_ns_binding_export and 
  31986.           rpc_ns_mgmt_binding_unexport causes the name service to repeatedly 
  31987.           remove and replace the same entry, which can cause performance 
  31988.           problems. 
  31989.  
  31990.  Permissions Required 
  31991.  
  31992.           You need both read permission and write permission to the CDS object 
  31993.           entry (the target name service entry). 
  31994.  
  31995.  Related Information 
  31996.  
  31997.           Routines: 
  31998.           rpc_mgmt_ep_unregister 
  31999.           rpc_ns_binding_export 
  32000.           rpc_ns_binding_unexport 
  32001.  
  32002.  
  32003. ΓòÉΓòÉΓòÉ 5.8.83. rpc_ns_mgmt_entry_create ΓòÉΓòÉΓòÉ
  32004.  
  32005.  Purpose 
  32006.  
  32007.           Creates an entry in the name service database. This routine is used 
  32008.           by management applications. 
  32009.  
  32010.  Format 
  32011.  
  32012.                     #include <dce/rpc.h>
  32013.  
  32014.                     void rpc_ns_mgmt_entry_create(
  32015.                             unsigned32  entry_name_syntax,
  32016.                             unsigned_char_t  *entry_name,
  32017.                             unsigned32  *status);
  32018.  
  32019.  Parameters 
  32020.  
  32021.           Input 
  32022.  
  32023.           entry_name_syntax An integer value that specifies the syntax of the 
  32024.                         entry_name parameter. To use the syntax specified in 
  32025.                         the RPC_DEFAULT_ENTRY_SYNTAX environment variable, 
  32026.                         provide rpc_c_ns_syntax_default. 
  32027.  
  32028.           entry_name    Specifies the name of the entry to create. This can be 
  32029.                         either the global or cell-relative name. 
  32030.  
  32031.           Output 
  32032.  
  32033.           status        Returns the status code from this routine. On 
  32034.                         successful completion, the routine returns rpc_s_ok. 
  32035.                         Otherwise, it returns one of the following errors: 
  32036.  
  32037.                              rpc_s_entry_already_exists The name service entry 
  32038.                                                    already exists. 
  32039.  
  32040.                              rpc_s_incomplete_name Incomplete name. 
  32041.  
  32042.                              rpc_s_invalid_name_syntax The name syntax is not 
  32043.                                                    valid. 
  32044.  
  32045.                              rpc_s_name_service_unavailable The name service is 
  32046.                                                    unavailable. 
  32047.  
  32048.                              rpc_s_no_ns_permission There is no permission for 
  32049.                                                    the name service operation. 
  32050.  
  32051.                              rpc_s_unsupported_name_syntax Unsupported name 
  32052.                                                    syntax. 
  32053.  
  32054.  Usage 
  32055.  
  32056.           The rpc_ns_mgmt_entry_create routine creates an entry in the name 
  32057.           service database. 
  32058.  
  32059.           A management application can call rpc_ns_mgmt_entry_create to create 
  32060.           an entry in the name service database for use by another application 
  32061.           that does not itself have the necessary name service permissions to 
  32062.           create an entry. 
  32063.  
  32064.  Permissions Required 
  32065.  
  32066.           You need both read permission and write permission to the CDS object 
  32067.           entry (the target name service entry). You also need insert 
  32068.           permission to the parent directory. 
  32069.  
  32070.  Related Information 
  32071.  
  32072.           Routines: 
  32073.           rpc_ns_mgmt_entry_delete 
  32074.  
  32075.  
  32076. ΓòÉΓòÉΓòÉ 5.8.84. rpc_ns_mgmt_entry_delete ΓòÉΓòÉΓòÉ
  32077.  
  32078.  Purpose 
  32079.  
  32080.           Deletes an entry from the name service database. This routine is used 
  32081.           by management applications. 
  32082.  
  32083.  Format 
  32084.  
  32085.                     #include <dce/rpc.h>
  32086.  
  32087.                     void rpc_ns_mgmt_entry_delete(
  32088.                             unsigned32  entry_name_syntax,
  32089.                             unsigned_char_t  *entry_name,
  32090.                             unsigned32  *status);
  32091.  
  32092.  Parameters 
  32093.  
  32094.           Input 
  32095.  
  32096.           entry_name_syntax An integer value that specifies the syntax of the 
  32097.                         entry_name parameter. To use the syntax specified in 
  32098.                         the RPC_DEFAULT_ENTRY_SYNTAX environment variable, 
  32099.                         provide rpc_c_ns_syntax_default. 
  32100.  
  32101.           entry_name    Specifies the name of the entry to delete. This can be 
  32102.                         either the global or cell-relative name. 
  32103.  
  32104.           Output 
  32105.  
  32106.           status        Returns the status code from this routine. On 
  32107.                         successful completion, the routine returns rpc_s_ok. 
  32108.                         Otherwise, it returns one of the following errors: 
  32109.  
  32110.                              rpc_s_entry_not_found The name service entry was 
  32111.                                                    not found. 
  32112.  
  32113.                              rpc_s_incomplete_name Incomplete name. 
  32114.  
  32115.                              rpc_s_invalid_name_syntax The name syntax is not 
  32116.                                                    valid. 
  32117.  
  32118.                              rpc_s_name_service_unavailable The name service is 
  32119.                                                    unavailable. 
  32120.  
  32121.                              rpc_s_no_ns_permission There is no permission for 
  32122.                                                    the name service operation. 
  32123.  
  32124.                              rpc_s_not_rpc_entry   Not an RPC entry. 
  32125.  
  32126.                              rpc_s_unsupported_name_syntax Unsupported name 
  32127.                                                    syntax. 
  32128.  
  32129.  Usage 
  32130.  
  32131.           The rpc_ns_mgmt_entry_delete routine removes an RPC entry from the 
  32132.           name service database. 
  32133.  
  32134.           Management applications use this routine only when an entry is no 
  32135.           longer needed, such as when a server is permanently removed from 
  32136.           service. If the entry is a member of a group or profile, it must also 
  32137.           be deleted from the group or profile. 
  32138.  
  32139.           Use this routine cautiously.  Since name service databases are 
  32140.           designed to be relatively stable, the frequent use of 
  32141.           rpc_ns_mgmt_entry_delete can result in the following difficulties: 
  32142.  
  32143.             o  Performance problems - Creating and deleting entries in client 
  32144.                or server applications causes the name service to repeatedly 
  32145.                remove and replace the same entry in the name service database, 
  32146.                which can lead to performance problems. 
  32147.  
  32148.             o  Lost entry updates - When multiple applications access a single 
  32149.                entry through different replicas of a name service database, 
  32150.                updates to the entry can be lost. 
  32151.  
  32152.                In this situation, if one application deletes the entry and 
  32153.                another application updates the entry before the replicas are 
  32154.                synchronized, the delete operation takes precedence over the 
  32155.                update operation. When the replicas are synchronized, the update 
  32156.                is lost because the entry is deleted from all replicas. 
  32157.  
  32158.  Permissions Required 
  32159.  
  32160.           You need read permission to the CDS object entry (the target name 
  32161.           service entry). You also need delete permission to the CDS object 
  32162.           entry or to the parent directory. 
  32163.  
  32164.  Related Information 
  32165.  
  32166.           Routines: 
  32167.           rpc_ns_mgmt_entry_create 
  32168.  
  32169.  
  32170. ΓòÉΓòÉΓòÉ 5.8.85. rpc_ns_mgmt_entry_inq_if_ids ΓòÉΓòÉΓòÉ
  32171.  
  32172.  Purpose 
  32173.  
  32174.           Returns the list of interfaces exported to an entry in the name 
  32175.           service database. This routine is used by client, server, or 
  32176.           management applications. 
  32177.  
  32178.  Format 
  32179.  
  32180.                     #include <dce/rpc.h>
  32181.  
  32182.                     void rpc_ns_mgmt_entry_inq_if_ids(
  32183.                             unsigned32  entry_name_syntax,
  32184.                             unsigned_char_t  *entry_name,
  32185.                             rpc_if_id_vector_t  **if_id_vec,
  32186.                             unsigned32  *status);
  32187.  
  32188.  Parameters 
  32189.  
  32190.           Input 
  32191.  
  32192.           entry_name_syntax An integer value that specifies the syntax of the 
  32193.                         entry_name parameter. To use the syntax specified in 
  32194.                         the RPC_DEFAULT_ENTRY_SYNTAX environment variable, 
  32195.                         provide rpc_c_ns_syntax_default. 
  32196.  
  32197.           entry_name    Specifies the entry in the name service database for 
  32198.                         which an interface identifier vector is returned. This 
  32199.                         can be either the global or cell-relative name. 
  32200.  
  32201.           Output 
  32202.  
  32203.           if_id_vec     Returns the address of the interface identifier vector. 
  32204.  
  32205.           status        Returns the status code from this routine. On 
  32206.                         successful completion, the routine returns rpc_s_ok. 
  32207.                         Otherwise, it returns one of the following errors: 
  32208.  
  32209.                              rpc_s_entry_not_found The name service entry was 
  32210.                                                    not found. 
  32211.  
  32212.                              rpc_s_incomplete_name Incomplete name. 
  32213.  
  32214.                              rpc_s_invalid_name_syntax The name syntax is not 
  32215.                                                    valid. 
  32216.  
  32217.                              pc_s_name_service_unavailable The name service is 
  32218.                                                    unavailable. 
  32219.  
  32220.                              rpc_s_no_interfaces_exported No interfaces were 
  32221.                                                    exported to the entry. 
  32222.  
  32223.                              rpc_s_no_ns_permission There is no permission for 
  32224.                                                    the name service operation. 
  32225.  
  32226.                              rpc_s_unsupported_name_syntax Unsupported name 
  32227.                                                    syntax. 
  32228.  
  32229.  Usage 
  32230.  
  32231.           The rpc_ns_mgmt_entry_inq_if_ids routine returns an interface 
  32232.           identifier vector containing the interfaces of binding handles 
  32233.           exported to the entry_name parameter. 
  32234.  
  32235.           This routine uses an expiration age of 0 (zero) to cause an immediate 
  32236.           update of the local copy of name service data. The description of 
  32237.           rpc_ns_mgmt_inq_exp_age contains an explanation of the expiration 
  32238.           age. 
  32239.  
  32240.           The application calls rpc_if_id_vector_free to release memory used by 
  32241.           the returned vector. 
  32242.  
  32243.  Permissions Required 
  32244.  
  32245.           You need read permission to the CDS object entry (the target name 
  32246.           service entry). 
  32247.  
  32248.  Related Information 
  32249.  
  32250.           Routines: 
  32251.           rpc_if_id_vector_free 
  32252.           rpc_if_inq_id 
  32253.           rpc_ns_binding_export 
  32254.  
  32255.  
  32256. ΓòÉΓòÉΓòÉ 5.8.86. rpc_ns_mgmt_free_codesets ΓòÉΓòÉΓòÉ
  32257.  
  32258.  Purpose 
  32259.  
  32260.           Frees a code sets array that has been allocated by the RPC runtime. 
  32261.           This routine is used by client and server applications. 
  32262.  
  32263.  Format 
  32264.  
  32265.                     #include <dce/rpc.h>
  32266.  
  32267.                     void rpc_ns_mgmt_free_codesets(
  32268.                             pc_codeset_mgmt_p_t  *code_sets_array,
  32269.                             error_status_t  *status);
  32270.  
  32271.  Parameters 
  32272.  
  32273.           Input/Output 
  32274.  
  32275.           code_sets_array A pointer to a code sets array that has been 
  32276.                         allocated by a call to the rpc_ns_mgmt_read_codesets 
  32277.                         routine or the rpc_rgy_get_codesets routine. 
  32278.  
  32279.           Output 
  32280.  
  32281.           status        Returns the status code from this routine. On 
  32282.                         successful completion, the routine returns rpc_s_ok. 
  32283.                         Otherwise, it returns an error. 
  32284.  
  32285.  Usage 
  32286.  
  32287.           The rpc_ns_mgmt_free_codesets routine belongs to a set of DCE RPC 
  32288.           routines for character and code set interoperability. These routines 
  32289.           permit client and server applications to transfer international 
  32290.           character data in a heterogeneous character set and code sets 
  32291.           environment. 
  32292.  
  32293.           The rpc_ns_mgmt_free_codesets routine frees from the client 
  32294.           application's memory a code sets array allocated by a client call to 
  32295.           the rpc_ns_mgmt_read_codesets or the rpc_rgy_get_codesets routines. 
  32296.           The routine frees from a server application's memory a code sets 
  32297.           array allocated by a server call to the rpc_rgy_get_codesets routine. 
  32298.  
  32299.           Client applications use the rpc_ns_mgmt_read_codesets routine to 
  32300.           retrieve a server's supported code sets from the name service 
  32301.           database in order to evaluate them against the code sets that the 
  32302.           client supports. Clients and servers use the rpc_rgy_get_codesets 
  32303.           routine to get their supported code sets from the code set registry. 
  32304.           Server applications then export them into the name service database 
  32305.           with the rpc_ns_mgmt_set_attribute routine. Clients and servers use 
  32306.           the rpc_ns_mgmt_free_codesets routine to free the memory allocated to 
  32307.           the code sets array as part of their cleanup procedures. 
  32308.  
  32309.  Related Information 
  32310.  
  32311.           Routines: 
  32312.           rpc_ns_mgmt_read_codesets 
  32313.           rpc_rgy_get_codesets 
  32314.  
  32315.  
  32316. ΓòÉΓòÉΓòÉ 5.8.87. rpc_ns_mgmt_handle_set_exp_age ΓòÉΓòÉΓòÉ
  32317.  
  32318.  Purpose 
  32319.  
  32320.           Sets a handle's expiration age for local copies of name service data. 
  32321.           This routine is used by client, server, or management applications. 
  32322.  
  32323.  Format 
  32324.  
  32325.                     #include <dce/rpc.h>
  32326.  
  32327.                     void rpc_ns_mgmt_handle_set_exp_age(
  32328.                             rpc_ns_handle_t  ns_handle,
  32329.                             unsigned32  expiration_age,
  32330.                             unsigned32  *status);
  32331.  
  32332.  Parameters 
  32333.  
  32334.           Input 
  32335.  
  32336.           ns_handle     Specifies the name service handle for which you supply 
  32337.                         an expiration age. An RPC name service interface (NSI) 
  32338.                         inquiry begin operation returns a name service handle. 
  32339.                         An example is the operation that routine 
  32340.                         rpc_ns_entry_object_inq_begin performs; it returns a 
  32341.                         name service handle in its inquiry_context parameter. 
  32342.  
  32343.           expiration_age This integer value specifies the expiration age, in 
  32344.                         seconds, of local name service data. This data is read 
  32345.                         by all RPC NSI next routines that use the specified 
  32346.                         ns_handle parameter. An example is the 
  32347.                         rpc_ns_entry_object_inq_next routine; it accepts a name 
  32348.                         service handle in its inquiry_context parameter. 
  32349.  
  32350.                         An expiration age of 0 (zero) causes an immediate 
  32351.                         update of the local name service data. 
  32352.  
  32353.           Output 
  32354.  
  32355.           status        Returns the status code from this routine. On 
  32356.                         successful completion, the routine returns rpc_s_ok. 
  32357.                         Otherwise, it returns rpc_s_invalid_ns_handle, which 
  32358.                         indicates that the name service handle is not valid. 
  32359.  
  32360.  Usage 
  32361.  
  32362.           The rpc_ns_mgmt_handle_set_exp_age routine sets an expiration age for 
  32363.           a specified name service handle (in ns_handle). The expiration age is 
  32364.           the amount of time, in seconds, that a local copy of data from a name 
  32365.           service attribute can exist before a request from the application for 
  32366.           the attribute requires updating the local copy. When an application 
  32367.           begins running, the RPC runtime specifies a random value of between 8 
  32368.           and 12 hours as the default expiration age. The default is global to 
  32369.           the application. An expiration age applies only to a specific name 
  32370.           service handle and temporarily overrides the current global 
  32371.           expiration age. 
  32372.  
  32373.           Normally, avoid using this routine; instead, rely on the 
  32374.           application's global expiration age. 
  32375.  
  32376.           A handle's expiration age is used exclusively by RPC NSI next 
  32377.           operations (which read data from name service attributes). A next 
  32378.           operation normally starts by looking for a local copy of the 
  32379.           attribute data being requested by an application. In the absence of a 
  32380.           local copy, the next operation creates one with fresh attribute data 
  32381.           from the name service database. If a local copy already exists, the 
  32382.           operation compares its actual age to the expiration age being used by 
  32383.           the application (which in this case is the expiration age set for the 
  32384.           name service handle). If the actual age exceeds the handle's 
  32385.           expiration age, the operation automatically tries to update the local 
  32386.           copy with fresh attribute data. If updating is impossible, the old 
  32387.           local data remains in place and the next operation fails, returning 
  32388.           the rpc_s_name_service_unavailable status code. 
  32389.  
  32390.           The scope of a handle's expiration age is a single series of RPC NSI 
  32391.           next operations. The rpc_ns_mgmt_handle_set_exp_age routine operates 
  32392.           as follows: 
  32393.  
  32394.             1. An RPC NSI begin operation, such as the one that 
  32395.                rpc_ns_group_mbr_inq_begin performs, creates a name service 
  32396.                handle. 
  32397.  
  32398.             2. A call to rpc_ns_mgmt_handle_set_exp_age creates an expiration 
  32399.                age for the handle. 
  32400.  
  32401.             3. A series of corresponding RPC NSI next operations for the name 
  32402.                service handle uses the handle's expiration age. 
  32403.  
  32404.             4. A corresponding RPC NSI done operation for the name service 
  32405.                handle deletes both the handle and its expiration age. 
  32406.  
  32407.  Cautions 
  32408.  
  32409.           Use this routine with extreme caution. 
  32410.  
  32411.           Setting the handle's expiration age to a small value causes the RPC 
  32412.           NSI next operations to frequently update local data for any name 
  32413.           service attribute requested by your application. For example, setting 
  32414.           the expiration age to 0 (zero) forces the next operation to update 
  32415.           local data for the name service attribute requested by your 
  32416.           application. Therefore, setting a small expiration age for a name 
  32417.           service handle can create performance problems for your application. 
  32418.           Also, if your application is using a remote server with the name 
  32419.           service database, a small expiration age can adversely affect network 
  32420.           performance for all applications. 
  32421.  
  32422.           Limit the use of this routine to the following types of situations: 
  32423.  
  32424.             o  When you must always get accurate name service data. 
  32425.  
  32426.                For example, during management operations to update a profile, 
  32427.                you might need to always see the profile's current contents. In 
  32428.                this case, before beginning to inquire about a profile, your 
  32429.                application must call rpc_ns_mgmt_handle_set_exp_age and specify 
  32430.                0 (zero) for the expiration_age parameter. 
  32431.  
  32432.             o  When a request using the default expiration age fails, and your 
  32433.                application needs to retry the operation. 
  32434.  
  32435.                For example, a client application using import must first try to 
  32436.                obtain bindings using the application's default expiration age. 
  32437.                However, sometimes the import-next operation returns either no 
  32438.                binding handles or an insufficient number of them. In this case, 
  32439.                the client can retry the import operation and, after 
  32440.                rpc_ns_binding_import_begin terminates, include a call to 
  32441.                rpc_ns_mgmt_handle_set_exp_age that specifies 0 (zero) for the 
  32442.                expiration_age parameter. When the client calls the import-next 
  32443.                routine again, the small expiration age for the name service 
  32444.                handle causes the import-next operation to update the local 
  32445.                attribute data. 
  32446.  
  32447.  Related Information 
  32448.  
  32449.           Routines: 
  32450.           rpc_ns_binding_import_begin 
  32451.           rpc_ns_binding_lookup_begin 
  32452.           rpc_ns_group_mbr_inq_begin 
  32453.           rpc_ns_mgmt_inq_exp_age 
  32454.           rpc_ns_mgmt_set_exp_age 
  32455.           rpc_ns_profile_elt_inq_begin 
  32456.  
  32457.  
  32458. ΓòÉΓòÉΓòÉ 5.8.88. rpc_ns_mgmt_inq_exp_age ΓòÉΓòÉΓòÉ
  32459.  
  32460.  Purpose 
  32461.  
  32462.           Returns the application's global expiration age for local copies of 
  32463.           name service data. This routine is used by client, server, or 
  32464.           management applications. 
  32465.  
  32466.  Format 
  32467.  
  32468.                     #include <dce/rpc.h>
  32469.  
  32470.                     void rpc_ns_mgmt_inq_exp_age(
  32471.                             unsigned32  *expiration_age,
  32472.                             unsigned32  *status);
  32473.  
  32474.  Parameters 
  32475.  
  32476.           Output 
  32477.  
  32478.           expiration_age Returns the default expiration age (in seconds). All 
  32479.                         the RPC Name Service Interface (NSI) read operations 
  32480.                         (all the next operations) use this value. 
  32481.  
  32482.           status        Returns the status code from this routine. On 
  32483.                         successful completion, the routine returns rpc_s_ok. 
  32484.                         Otherwise, it returns an error. 
  32485.  
  32486.  Usage 
  32487.  
  32488.           The rpc_ns_mgmt_inq_exp_age routine returns the global expiration age 
  32489.           that the application is using. The expiration_age parameter 
  32490.           represents the amount of time, in seconds, that a local copy of data 
  32491.           from a name service attribute can exist before a request from the 
  32492.           application for the attribute requires updating the local copy. When 
  32493.           an application begins running, the RPC runtime specifies a random 
  32494.           value of between 8 and 12 hours as the default expiration age. The 
  32495.           default is global to the application. 
  32496.  
  32497.           The RPC NSI next operations, which read data from name service 
  32498.           attributes, use an expiration age. A next operation normally starts 
  32499.           by looking for a local copy of the attribute data that an application 
  32500.           requests. In the absence of a local copy, the next operation creates 
  32501.           one with fresh attribute data from the name service database. If a 
  32502.           local copy already exists, the operation compares its actual age to 
  32503.           the expiration age being used by the application. If the actual age 
  32504.           exceeds the expiration age, the operation automatically tries to 
  32505.           update the local copy with fresh attribute data from the name service 
  32506.           database. If updating is impossible, the old local data remains in 
  32507.           place and the next operation fails, returning the 
  32508.           rpc_s_name_service_unavailable status code. 
  32509.  
  32510.           Applications normally use only the default expiration age. For 
  32511.           special cases, an application can substitute a user-supplied global 
  32512.           expiration age for the default by calling rpc_ns_mgmt_set_exp_age. 
  32513.           The rpc_ns_mgmt_inq_exp_age routine returns the current global 
  32514.           expiration age, whether it is a default or a user-supplied value. 
  32515.  
  32516.           An application can also override the global expiration age 
  32517.           temporarily by calling rpc_ns_mgmt_handle_set_exp_age. 
  32518.  
  32519.  Related Information 
  32520.  
  32521.           Routines: 
  32522.           rpc_ns_mgmt_handle_set_exp_age 
  32523.           rpc_ns_mgmt_set_exp_age 
  32524.  
  32525.  
  32526. ΓòÉΓòÉΓòÉ 5.8.89. rpc_ns_mgmt_read_codesets ΓòÉΓòÉΓòÉ
  32527.  
  32528.  Purpose 
  32529.  
  32530.           Reads the code sets attribute associated with an RPC server entry in 
  32531.           the name service database. This routine is used by client 
  32532.           applications. 
  32533.  
  32534.  Format 
  32535.  
  32536.                     #include <dce/rpc.h>
  32537.  
  32538.                     void rpc_ns_mgmt_read_codesets(
  32539.                             unsigned32  entry_name_syntax,
  32540.                             unsigned_char_t  *entry_name,
  32541.                             rpc_codeset_mgmt_p_t  *code_sets_array,
  32542.                             error_status_t  *status);
  32543.  
  32544.  Parameters 
  32545.  
  32546.           Input 
  32547.  
  32548.           entry_name_syntax An integer value that specifies the syntax of the 
  32549.                         entry_name parameter. 
  32550.  
  32551.                         To use the syntax specified in the 
  32552.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  32553.                         rpc_c_ns_syntax_default. 
  32554.  
  32555.           entry_name    Specifies the name of the RPC server entry in the name 
  32556.                         service database from which to read the code sets 
  32557.                         attribute. The name can be either the global or 
  32558.                         cell-relative name. 
  32559.  
  32560.           Output 
  32561.  
  32562.           code_sets_array A code sets array that specifies the code sets that 
  32563.                         the RPC server supports. 
  32564.  
  32565.           status        Returns the status code from this routine. On 
  32566.                         successful completion, the routine returns rpc_s_ok. 
  32567.                         Otherwise, it returns one of the following errors: 
  32568.  
  32569.                              rpc_s_invalid_name_syntax 
  32570.                              rpc_s_mgmt_bad_type 
  32571.                              rpc_s_name_service_unavailable 
  32572.                              rpc_s_no_permission 
  32573.                              rpc_s_incomplete_name 
  32574.                              rpc_s_no_memory 
  32575.  
  32576.  Usage 
  32577.  
  32578.           The rpc_ns_mgmt_read_codesets routine belongs to a set of DCE RPC 
  32579.           routines for character and code set interoperability. These routines 
  32580.           permit client and server applications to transfer international 
  32581.           character data in a heterogeneous character set and code sets 
  32582.           environment. 
  32583.  
  32584.           The rpc_ns_mgmt_read_codesets routine reads the code sets attribute 
  32585.           associated with an RPC server entry in the name service database. The 
  32586.           routine takes the name of an RPC server entry and returns a code sets 
  32587.           array that corresponds to the code sets that this RPC server 
  32588.           supports. 
  32589.  
  32590.           Client applications use the rpc_ns_mgmt_read_codesets routine to 
  32591.           retrieve a server's supported code sets in order to evaluate them 
  32592.           against the code sets that the client supports. Client applications 
  32593.           that use the evaluation routines rpc_cs_eval_with_universal and 
  32594.           rpc_cs_eval_without_universal do not need to call this routine 
  32595.           explicitly, because these code sets evaluation routines call it on 
  32596.           the client's behalf. Application developers who are writing their own 
  32597.           character and code set evaluation routines may need to include 
  32598.           rpc_ns_mgmt_read_codesets in their user-written evaluation routines. 
  32599.  
  32600.  Permissions Required 
  32601.  
  32602.           You need read permission to the target RPC server entry (which is a 
  32603.           CDS object). 
  32604.  
  32605.  Related Information 
  32606.  
  32607.           Routines: 
  32608.           dce_cs_rgy_to_loc 
  32609.           dce_cs_loc_to_rgy 
  32610.           rpc_ns_mgmt_free_codesets 
  32611.           rpc_ns_mgmt_remove_attribute 
  32612.           rpc_ns_mgmt_set_attribute 
  32613.           rpc_rgy_get_codesets 
  32614.           rpc_rgy_get_max_bytes 
  32615.  
  32616.  
  32617. ΓòÉΓòÉΓòÉ 5.8.90. rpc_ns_mgmt_remove_attribute ΓòÉΓòÉΓòÉ
  32618.  
  32619.  Purpose 
  32620.  
  32621.           Removes an attribute from an RPC server entry in the name service 
  32622.           database. This routine is used mainly by server applications, but can 
  32623.           also be used by management applications. 
  32624.  
  32625.  Format 
  32626.  
  32627.                     #include <dce/rpc.h>
  32628.                     #include <dce/nsattrid.h>
  32629.  
  32630.                     void rpc_ns_mgmt_remove_attribute(
  32631.                             unsigned32  entry_name_syntax,
  32632.                             unsigned_char_t  *entry_name,
  32633.                             uuid_t  *attr_type,
  32634.                             error_status_t  *status);
  32635.  
  32636.  Parameters 
  32637.  
  32638.           Input 
  32639.  
  32640.           entry_name_syntax An integer value that specifies the syntax of the 
  32641.                         entry_name parameter. 
  32642.  
  32643.                         To use the syntax specified in the 
  32644.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  32645.                         rpc_c_ns_syntax_default. 
  32646.  
  32647.           entry_name    Specifies the name of the RPC server entry in the name 
  32648.                         service database from which the attribute will be 
  32649.                         removed. The name can be either the global or 
  32650.                         cell-relative name. If you are using this routine to 
  32651.                         remove a code sets attribute from an RPC server entry 
  32652.                         in the Cell Directory Service database, this parameter 
  32653.                         specifies the CDS name of the server entry that 
  32654.                         contains the code sets attribute to be removed. 
  32655.  
  32656.           attr_type     A UUID that specifies the attribute type. For DCE 1.1, 
  32657.                         this value must be rpc_c_attr_codesets. 
  32658.  
  32659.           Output 
  32660.  
  32661.           status        Returns the status code from this routine. On 
  32662.                         successful completion, the routine returns rpc_s_ok. 
  32663.                         Otherwise, it returns one of the following errors: 
  32664.  
  32665.                              rpc_s_entry_not_found The routine cannot find the 
  32666.                                            RPC server entry specified in the 
  32667.                                            routine in the name service 
  32668.                                            database. 
  32669.  
  32670.                              rpc_s_incomplete_name The routine cannot expand 
  32671.                                            the RPC server entry name specified 
  32672.                                            in the routine. 
  32673.  
  32674.                              rpc_s_invalid_name_syntax The name syntax 
  32675.                                            specified in the routine is not 
  32676.                                            valid. 
  32677.  
  32678.                              rpc_s_mgmt_bad_type The attribute type specified 
  32679.                                            in the routine does not match that 
  32680.                                            of the attribute to be removed from 
  32681.                                            the name service database. 
  32682.  
  32683.                              rpc_s_name_service_unavailable The routine was 
  32684.                                            unable to communicate with the name 
  32685.                                            service. 
  32686.  
  32687.                              rpc_s_no_ns_permission The routine's caller does 
  32688.                                            not have the proper permission for 
  32689.                                            an NSI operation. 
  32690.  
  32691.  Usage 
  32692.  
  32693.           The rpc_ns_mgmt_remove_attribute routine belongs to a set of DCE RPC 
  32694.           routines for use by client and server applications that are 
  32695.           transferring international character data in a heterogeneous 
  32696.           character set and code sets environment. 
  32697.  
  32698.           The rpc_ns_mgmt_remove_attribute routine is designed to be a generic 
  32699.           routine for removing an attribute from an RPC server entry in the 
  32700.           name service database. The routine removes the attribute from the 
  32701.           specified RPC server entry in the name service database. The routine 
  32702.           does not remove the RPC server entry. 
  32703.  
  32704.           For DCE 1.1, you use rpc_ns_mgmt_remove_attribute in your application 
  32705.           server initialization routine or signal handling routine to remove a 
  32706.           code sets attribute from the server's entry in the Cell Directory 
  32707.           Service database as part of the server cleanup procedure carried out 
  32708.           prior to the server's termination. 
  32709.  
  32710.           A management application can call rpc_ns_mgmt_remove_attribute to 
  32711.           remove an attribute from an RPC server entry in the name service 
  32712.           database on behalf of an application that does not itself have the 
  32713.           necessary name service permissions to remove one. 
  32714.  
  32715.  Permissions Required 
  32716.  
  32717.           You need write permission to the target RPC server entry (which is a 
  32718.           CDS object). 
  32719.  
  32720.  Related Information 
  32721.  
  32722.           Routines: 
  32723.           rpc_ns_mgmt_read_codesets 
  32724.           rpc_ns_mgmt_set_attribute 
  32725.           rpc_rgy_get_codesets 
  32726.  
  32727.  
  32728. ΓòÉΓòÉΓòÉ 5.8.91. rpc_ns_mgmt_set_attribute ΓòÉΓòÉΓòÉ
  32729.  
  32730.  Purpose 
  32731.  
  32732.           Adds an attribute to an RPC server entry in the name service 
  32733.           database. This routine is used mainly by server applications, but can 
  32734.           also be used by management applications. 
  32735.  
  32736.  Format 
  32737.  
  32738.                     #include <dce/rpc.h>
  32739.                     #include <dce/nsattrid.h>
  32740.  
  32741.                     void rpc_ns_mgmt_set_attribute(
  32742.                             unsigned32  entry_name_syntax,
  32743.                             unsigned_char_t  *entry_name,
  32744.                             uuid_t  *attr_type,
  32745.                             void  *attr_value,
  32746.                             error_status_t  *status);
  32747.  
  32748.  Parameters 
  32749.  
  32750.           Input 
  32751.  
  32752.           entry_name_syntax An integer value that specifies the syntax of the 
  32753.                         entry_name parameter. 
  32754.  
  32755.                         To use the syntax specified in the 
  32756.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  32757.                         rpc_c_ns_syntax_default. 
  32758.  
  32759.           entry_name    Specifies the name of the RPC server entry in the name 
  32760.                         service database with which the attribute is 
  32761.                         associated. The name can be either the global or 
  32762.                         cell-relative name. If you are using this routine to 
  32763.                         add a code sets attribute to an RPC server entry in the 
  32764.                         name service database, this parameter specifies the 
  32765.                         name of the server entry with which the code sets 
  32766.                         attribute is associated. 
  32767.  
  32768.           attr_type     A UUID that specifies the attribute type. For DCE 1.1, 
  32769.                         this value must be rpc_c_attr_codesets. 
  32770.  
  32771.           attr_val      An opaque data structure that specifies the attribute 
  32772.                         value to be stored in the name service database. If you 
  32773.                         are using this routine to add a code sets attribute to 
  32774.                         an RPC server entry, you must cast the representation 
  32775.                         of the code set data from the data type 
  32776.                         rpc_codeset_mgmt_p_t to the data type void*. 
  32777.  
  32778.           Output 
  32779.  
  32780.           status        Returns the status code from this routine. On 
  32781.                         successful completion, the routine returns rpc_s_ok. 
  32782.                         Otherwise, it returns one of the following errors: 
  32783.  
  32784.                              rpc_s_invalid_name_syntax The name syntax 
  32785.                                            specified in the routine is not 
  32786.                                            valid. 
  32787.  
  32788.                              rpc_s_mgmt_bad_type The attribute type specified 
  32789.                                            in the routine does not match that 
  32790.                                            of the attribute to be added to the 
  32791.                                            name service database. 
  32792.  
  32793.                              rpc_s_no_memory The routine was unable to allocate 
  32794.                                            memory to encode the value. 
  32795.  
  32796.                              rpc_s_name_service_unavailable The routine was 
  32797.                                            unable to communicate with the name 
  32798.                                            service. 
  32799.  
  32800.                              rpc_s_no_ns_permission The routine's caller does 
  32801.                                            not have the proper permission for 
  32802.                                            an NSI operation. 
  32803.  
  32804.  Usage 
  32805.  
  32806.           The rpc_ns_mgmt_set_attribute routine belongs to a set of DCE RPC 
  32807.           routines for use by client and server applications that are 
  32808.           transferring international character data in a heterogeneous 
  32809.           character set and code sets environment. 
  32810.  
  32811.           The rpc_ns_mgmt_set_attribute routine is designed to be a generic 
  32812.           routine for adding an attribute to an RPC server entry in the name 
  32813.           service database. The routine takes an attribute type and a pointer 
  32814.           to the value, and stores the attribute value in the name service 
  32815.           database. 
  32816.  
  32817.           For DCE 1.1, you use rpc_ns_mgmt_set_attribute in your application 
  32818.           server initialization routine to add a code sets attribute to the 
  32819.           server's entry in the Cell Directory Service database (which the 
  32820.           initialization routine has created with the rpc_ns_binding_export 
  32821.           routine). Because CDS stores integer values in little-endian format, 
  32822.           the rpc_ns_mgmt_set_attribute routine also encodes the code sets 
  32823.           attribute value into an endian-safe format before storing it in the 
  32824.           name service database. 
  32825.  
  32826.           A management application can call rpc_ns_mgmt_set_attribute to add an 
  32827.           attribute to an RPC server entry in the name service database on 
  32828.           behalf of an application that does not itself have the necessary name 
  32829.           service permissions to add one. 
  32830.  
  32831.  Permissions Required 
  32832.  
  32833.           You need both read permission and write permission to the target RPC 
  32834.           server entry (which is a CDS object). You also need insert permission 
  32835.           to the parent directory. 
  32836.  
  32837.  Related Information 
  32838.  
  32839.           Routines: 
  32840.           rpc_ns_mgmt_read_codesets 
  32841.           rpc_ns_mgmt_remove_attribute 
  32842.           rpc_rgy_get_codesets 
  32843.  
  32844.  
  32845. ΓòÉΓòÉΓòÉ 5.8.92. rpc_ns_mgmt_set_exp_age ΓòÉΓòÉΓòÉ
  32846.  
  32847.  Purpose 
  32848.  
  32849.           Modifies the application's global expiration age for local copies of 
  32850.           name service data. This routine is used by client, server, or 
  32851.           management applications. 
  32852.  
  32853.  Format 
  32854.  
  32855.                     #include <dce/rpc.h>
  32856.  
  32857.                     void rpc_ns_mgmt_set_exp_age(
  32858.                             unsigned32  expiration_age,
  32859.                             unsigned32  *status);
  32860.  
  32861.  Parameters 
  32862.  
  32863.           Input 
  32864.  
  32865.           expiration_age An integer value that specifies the default expiration 
  32866.                         age, in seconds, for local name service data. This 
  32867.                         expiration age applies to all RPC name service 
  32868.                         interface (NSI) read operations (all the next 
  32869.                         operations). 
  32870.  
  32871.                         An expiration age of 0 (zero) causes an immediate 
  32872.                         update of the local name service data. 
  32873.  
  32874.                         To reset the expiration age to an RPC-assigned random 
  32875.                         value between 8 and 12 hours, specify a value of 
  32876.                         rpc_c_ns_default_exp_age. 
  32877.  
  32878.           Output 
  32879.  
  32880.           status        Returns the status code from this routine. On 
  32881.                         successful completion, the routine returns rpc_s_ok. 
  32882.                         Otherwise, it returns an error. 
  32883.  
  32884.  Usage 
  32885.  
  32886.           The rpc_ns_mgmt_set_exp_age routine modifies the global expiration 
  32887.           age that the application is using. The expiration age parameter 
  32888.           represents the amount of time, in seconds, that a local copy of data 
  32889.           from a name service attribute can exist before a request from the 
  32890.           application for the attribute requires updating the local copy. When 
  32891.           an application begins running, the RPC runtime specifies a random 
  32892.           value of between 8 and 12 hours as the default expiration age. The 
  32893.           default is global to the application. 
  32894.  
  32895.           Normally, you should avoid using this routine; instead, rely on the 
  32896.           default expiration age. 
  32897.  
  32898.           The RPC NSI next operations, which read data from name service 
  32899.           attributes, use an expiration age. A next operation normally starts 
  32900.           by looking for a local copy of the attribute data that an application 
  32901.           requests. In the absence of a local copy, the next operation creates 
  32902.           one with fresh attribute data from the name service database. If a 
  32903.           local copy already exists, the operation compares its actual age to 
  32904.           the expiration age being used by the application. If the actual age 
  32905.           exceeds the expiration age, the operation automatically tries to 
  32906.           update the local copy with fresh attribute data from the name service 
  32907.           database. If updating is impossible, the old local data remains in 
  32908.           place and the next operation fails, returning the 
  32909.           rpc_s_name_service_unavailable status code. 
  32910.  
  32911.  Cautions 
  32912.  
  32913.           Use this routine with extreme caution. 
  32914.  
  32915.           Setting the expiration age to a small value causes the RPC NSI next 
  32916.           operations to frequently update local data for any name service 
  32917.           attribute that your application requests. For example, setting the 
  32918.           expiration age to 0 (zero) forces all next operations to update local 
  32919.           data for the name service attribute that your application has 
  32920.           requested. Therefore, setting small expiration ages can create 
  32921.           performance problems for your application. Also, if your application 
  32922.           is using a remote server with the name service database, a small 
  32923.           expiration age can adversely affect network performance for all 
  32924.           applications. 
  32925.  
  32926.  Related Information 
  32927.  
  32928.           Routines: 
  32929.           rpc_ns_mgmt_handle_set_exp_age 
  32930.           rpc_ns_mgmt_inq_exp_age 
  32931.  
  32932.  
  32933. ΓòÉΓòÉΓòÉ 5.8.93. rpc_ns_profile_delete ΓòÉΓòÉΓòÉ
  32934.  
  32935.  Purpose 
  32936.  
  32937.           Deletes a profile attribute. This routine is used by client, server, 
  32938.           or management applications. 
  32939.  
  32940.  Format 
  32941.  
  32942.                     #include <dce/rpc.h>
  32943.  
  32944.                     void rpc_ns_profile_delete(
  32945.                             unsigned32  profile_name_syntax,
  32946.                             unsigned_char_t  *profile_name,
  32947.                             unsigned32  *status);
  32948.  
  32949.  Parameters 
  32950.  
  32951.           Input 
  32952.  
  32953.           profile_name_syntax An integer value that specifies the syntax of the 
  32954.                         profile_name parameter. 
  32955.  
  32956.                         To use the syntax specified in the 
  32957.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  32958.                         rpc_c_ns_syntax_default. 
  32959.  
  32960.           profile_name  Specifies the name of the profile to delete. This can 
  32961.                         be either the global or the cell-relative name. 
  32962.  
  32963.           Output 
  32964.  
  32965.           status        Returns the status code from this routine. On 
  32966.                         successful completion, the routine returns rpc_s_ok. 
  32967.                         Otherwise, it returns one of the following errors: 
  32968.  
  32969.                              rpc_s_entry_not_found The name service entry was 
  32970.                                                    not found. 
  32971.  
  32972.                              rpc_s_incomplete_name Incomplete name. 
  32973.  
  32974.                              rpc_s_invalid_name_syntax The name syntax is not 
  32975.                                                    valid. 
  32976.  
  32977.                              rpc_s_name_service_unavailable The name service is 
  32978.                                                    unavailable. 
  32979.  
  32980.                              rpc_s_no_ns_permission There is no permission for 
  32981.                                                    the name service operation. 
  32982.  
  32983.                              rpc_s_unsupported_name_syntax Unsupported name 
  32984.                                                    syntax. 
  32985.  
  32986.  Usage 
  32987.  
  32988.           The rpc_ns_profile_delete routine deletes the profile attribute from 
  32989.           the specified entry in the name service database (the profile_name 
  32990.           parameter). 
  32991.  
  32992.           Neither the specified entry nor the entries included as members in 
  32993.           each profile element are deleted. 
  32994.  
  32995.           Use this routine cautiously; deleting a profile can break a hierarchy 
  32996.           of profiles. 
  32997.  
  32998.  Permissions Required 
  32999.  
  33000.           You need write permission to the CDS object entry (the target profile 
  33001.           entry). 
  33002.  
  33003.  Related Information 
  33004.  
  33005.           Routines: 
  33006.           rpc_ns_profile_elt_add 
  33007.           rpc_ns_profile_elt_remove 
  33008.  
  33009.  
  33010. ΓòÉΓòÉΓòÉ 5.8.94. rpc_ns_profile_elt_add ΓòÉΓòÉΓòÉ
  33011.  
  33012.  Purpose 
  33013.  
  33014.           Adds an element to a profile. If necessary, this routine creates the 
  33015.           profile entry. This routine is used by client, server, or management 
  33016.           applications. 
  33017.  
  33018.  Format 
  33019.  
  33020.                     #include <dce/rpc.h>
  33021.  
  33022.                     void rpc_ns_profile_elt_add(
  33023.                             unsigned32  profile_name_syntax,
  33024.                             unsigned_char_t  *profile_name,
  33025.                             rpc_if_id_t  *if_id,
  33026.                             unsigned32  member_name_syntax,
  33027.                             unsigned_char_t  *member_name,
  33028.                             unsigned32  priority,
  33029.                             unsigned_char_t  *annotation,
  33030.                             unsigned32  *status);
  33031.  
  33032.  Parameters 
  33033.  
  33034.           Input 
  33035.  
  33036.           profile_name_syntax An integer value that specifies the syntax of the 
  33037.                         profile_name parameter. 
  33038.  
  33039.                         To use the syntax specified in the 
  33040.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  33041.                         rpc_c_ns_syntax_default. 
  33042.  
  33043.           profile_name  Specifies the RPC profile that receives a new element. 
  33044.                         This can be either the global or the cell-relative 
  33045.                         name. 
  33046.  
  33047.           if_id         Specifies the interface identifier of the new profile 
  33048.                         element. To add or replace the default profile element, 
  33049.                         specify NULL. 
  33050.  
  33051.           member_name_syntax An integer value that specifies the syntax of the 
  33052.                         member_name parameter. 
  33053.  
  33054.                         To use the syntax specified in the 
  33055.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  33056.                         rpc_c_ns_syntax_default. 
  33057.  
  33058.           member_name   Specifies the entry in the name service database to 
  33059.                         include in the new profile element. This can be either 
  33060.                         the global or the cell-relative name. 
  33061.  
  33062.           priority      An integer value (from 0 to 7) that specifies the 
  33063.                         relative priority for using the new profile element 
  33064.                         during the import and lookup operations. A value of 0 
  33065.                         (zero) is the highest priority. A value of 7 is the 
  33066.                         lowest priority. Two or more elements can have the same 
  33067.                         priority. 
  33068.  
  33069.                         When adding the default profile member, use a value of 
  33070.                         0 (zero). 
  33071.  
  33072.           annotation    Specifies an annotation string that is stored as part 
  33073.                         of the new profile element. The string can contain up 
  33074.                         to 17 characters. Specify NULL or the string \0 if 
  33075.                         there is no annotation string. 
  33076.  
  33077.                         The string is used by applications for informational 
  33078.                         purposes only. For example, an application can use this 
  33079.                         string to store the interface name string (specified in 
  33080.                         the IDL file). 
  33081.  
  33082.                         DCE RPC does not use this string during lookup or 
  33083.                         import operations, or for enumerating profile elements. 
  33084.  
  33085.           Output 
  33086.  
  33087.           status        Returns the status code from this routine. On 
  33088.                         successful completion, the routine returns rpc_s_ok. 
  33089.                         Otherwise, it returns one of the following errors: 
  33090.  
  33091.                              rpc_s_class_version_mismatch RPC class version 
  33092.                                                    mismatch. 
  33093.  
  33094.                              rpc_s_incomplete_name Incomplete name. 
  33095.  
  33096.                              rpc_s_invalid_name_syntax The name syntax is not 
  33097.                                                    valid. 
  33098.  
  33099.                              rpc_s_invalid_priority The profile element 
  33100.                                                    priority is not valid. 
  33101.  
  33102.                              rpc_s_name_service_unavailable The name service is 
  33103.                                                    unavailable. 
  33104.  
  33105.                              rpc_s_no_ns_permission There is no permission for 
  33106.                                                    the name service operation. 
  33107.  
  33108.                              rpc_s_unsupported_name_syntax Unsupported name 
  33109.                                                    syntax. 
  33110.  
  33111.  Usage 
  33112.  
  33113.           The rpc_ns_profile_elt_add routine adds an element to the profile 
  33114.           attribute of the entry in the name service database specified by the 
  33115.           profile_name parameter. 
  33116.  
  33117.           If the profile_name entry does not exist, this routine creates the 
  33118.           entry with a profile attribute and adds the profile element specified 
  33119.           by the if_id, member_name, priority, and annotation parameters. In 
  33120.           this case, the application must have permission to create the entry. 
  33121.           Otherwise, a management application with the necessary permissions 
  33122.           creates the entry by calling rpc_ns_mgmt_entry_create before the 
  33123.           application is run. 
  33124.  
  33125.           If an element with the specified member name and interface identifier 
  33126.           are already in the profile, this routine updates the element's 
  33127.           priority and annotation string using the values provided in the 
  33128.           priority and annotation parameters. 
  33129.  
  33130.           An application can add the entry in the member_name parameter to a 
  33131.           profile before it creates the entry itself. 
  33132.  
  33133.  Permissions Required 
  33134.  
  33135.           You need both read permission and write permission to the CDS object 
  33136.           entry (the target profile entry). If the entry does not exist, you 
  33137.           also need insert permission to the parent directory. 
  33138.  
  33139.  Related Information 
  33140.  
  33141.           Routines: 
  33142.           rpc_if_inq_id 
  33143.           rpc_ns_mgmt_entry_create 
  33144.           rpc_ns_profile_elt_remove 
  33145.  
  33146.  
  33147. ΓòÉΓòÉΓòÉ 5.8.95. rpc_ns_profile_elt_inq_begin ΓòÉΓòÉΓòÉ
  33148.  
  33149.  Purpose 
  33150.  
  33151.           Creates an inquiry context for viewing the elements in a profile. 
  33152.           This routine is used by client, server, or management applications. 
  33153.  
  33154.  Format 
  33155.  
  33156.                     #include <dce/rpc.h>
  33157.  
  33158.                     void rpc_ns_profile_elt_inq_begin(
  33159.                             unsigned32  profile_name_syntax,
  33160.                             unsigned_char_t  *profile_name,
  33161.                             unsigned32  inquiry_type,
  33162.                             rpc_if_id_t  *if_id,
  33163.                             unsigned32  vers_option,
  33164.                             unsigned32  member_name_syntax,
  33165.                             unsigned_char_t  *member_name,
  33166.                             rpc_ns_handle_t  *inquiry_context,
  33167.                             unsigned32  *status);
  33168.  
  33169.  Parameters 
  33170.  
  33171.           Input 
  33172.  
  33173.           profile_name_syntax An integer value that specifies the syntax of the 
  33174.                         profile_name parameter. 
  33175.  
  33176.                         To use the syntax specified in the 
  33177.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  33178.                         rpc_c_ns_syntax_default. 
  33179.  
  33180.           profile_name  Specifies the name of the profile to view. This can be 
  33181.                         either the global or the cell-relative name. 
  33182.  
  33183.           inquiry_type  An integer value that specifies the type of inquiry to 
  33184.                         perform on the profile. The following list describes 
  33185.                         the valid inquiry types: 
  33186.  
  33187.                              Value               Description 
  33188.  
  33189.                              rpc_c_profile_default_elt Searches the profile for 
  33190.                                                  the default profile element, 
  33191.                                                  if any. The if_id, 
  33192.                                                  vers_option, and member_name 
  33193.                                                  parameters are ignored. 
  33194.  
  33195.                              rpc_c_profile_all_elts Returns every element from 
  33196.                                                  the profile. The if_id, 
  33197.                                                  vers_option, and member_name 
  33198.                                                  parameters are ignored. 
  33199.  
  33200.                              rpc_c_profile_match_by_if Searches the profile for 
  33201.                                                  those elements that contain 
  33202.                                                  the interface identifier 
  33203.                                                  specified by the if_id and 
  33204.                                                  vers_option values. The 
  33205.                                                  member_name parameter is 
  33206.                                                  ignored. 
  33207.  
  33208.                              rpc_c_profile_match_by_mbr Searches the profile 
  33209.                                                  for those elements that 
  33210.                                                  contain the member name 
  33211.                                                  specified by the member_name 
  33212.                                                  parameter. The if_id and 
  33213.                                                  vers_option parameters are 
  33214.                                                  ignored. 
  33215.  
  33216.                              rpc_c_profile_match_by_both Searches the profile 
  33217.                                                  for those elements that 
  33218.                                                  contain the interface 
  33219.                                                  identifier and member name 
  33220.                                                  specified by the if_id, 
  33221.                                                  vers_option, and member_name 
  33222.                                                  parameters. 
  33223.  
  33224.           if_id         Specifies the interface identifier of the profile 
  33225.                         elements to be returned by rpc_ns_profile_elt_inq_next. 
  33226.  
  33227.                         This parameter is used only when specifying a value of 
  33228.                         rpc_c_profile_match_by_if or 
  33229.                         rpc_c_profile_match_by_both for the inquiry_type 
  33230.                         parameter. Otherwise, this parameter is ignored and you 
  33231.                         can specify the value NULL. 
  33232.  
  33233.           vers_option   Specifies how the rpc_ns_profile_elt_inq_next routine 
  33234.                         uses the if_id parameter. 
  33235.  
  33236.                         This parameter is used only when specifying a value of 
  33237.                         either rpc_c_profile_match_by_if or 
  33238.                         rpc_c_profile_match_by_both for the inquiry_type 
  33239.                         parameter. Otherwise, this parameter is ignored and you 
  33240.                         can specify the value 0 (zero). 
  33241.  
  33242.                         The following are the valid values for this parameter: 
  33243.  
  33244.                              Value            Description 
  33245.  
  33246.                              rpc_c_vers_all   Returns profile elements that 
  33247.                                               offer the specified interface 
  33248.                                               UUID, regardless of the version 
  33249.                                               numbers. For this value, specify 
  33250.                                               0 (zero) for both the major and 
  33251.                                               minor versions in the if_id 
  33252.                                               parameter. 
  33253.  
  33254.                              rpc_c_vers_compatible Returns profile elements 
  33255.                                               that offer the same major version 
  33256.                                               of the specified interface UUID 
  33257.                                               and a minor version greater than 
  33258.                                               or equal to the minor version of 
  33259.                                               the specified interface UUID. 
  33260.  
  33261.                              rpc_c_vers_exact Returns profile elements that 
  33262.                                               offer the specified version of 
  33263.                                               the specified interface UUID. 
  33264.  
  33265.                              rpc_c_vers_major_only Returns profile elements 
  33266.                                               that offer the same major version 
  33267.                                               of the specified interface UUID 
  33268.                                               (ignores the minor version). For 
  33269.                                               this value, specify 0 (zero) for 
  33270.                                               the minor version in the if_id 
  33271.                                               parameter. 
  33272.  
  33273.                              rpc_c_vers_upto  Returns profile elements that 
  33274.                                               offer a version of the specified 
  33275.                                               interface UUID less than or equal 
  33276.                                               to the specified major and minor 
  33277.                                               version. (For example, if the 
  33278.                                               if_id parameter contains V2.0 and 
  33279.                                               the profile contains elements 
  33280.                                               with the versions V1.3, V2.0, and 
  33281.                                               V2.1, rpc_ns_profile_elt_inq_next 
  33282.                                               returns the elements with V1.3 
  33283.                                               and V2.0.) 
  33284.  
  33285.           member_name_syntax An integer value that specifies the syntax of the 
  33286.                         member_name parameter in this routine and the syntax of 
  33287.                         the member_name parameter in 
  33288.                         rpc_ns_profile_elt_inq_next. 
  33289.  
  33290.                         To use the syntax specified in the 
  33291.                         RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide 
  33292.                         rpc_c_ns_syntax_default. 
  33293.  
  33294.           member_name   Specifies the member name that 
  33295.                         rpc_ns_profile_elt_inq_next looks for in profile 
  33296.                         elements. This can be either the global or the 
  33297.                         cell-relative name. 
  33298.  
  33299.                         This parameter is used only when specifying a value of 
  33300.                         rpc_c_profile_match_by_mbr or 
  33301.                         rpc_c_profile_match_by_both for the inquiry_type 
  33302.                         parameter. Otherwise, this parameter is ignored and you 
  33303.                         specify the value NULL. 
  33304.  
  33305.           Output 
  33306.  
  33307.           inquiry_context Returns a name service handle for use with 
  33308.                         rpc_ns_profile_elt_inq_next and 
  33309.                         rpc_ns_profile_elt_inq_done. 
  33310.  
  33311.           status        Returns the status code from this routine. On 
  33312.                         successful completion, the routine returns rpc_s_ok. 
  33313.                         Otherwise, it returns one of the following errors: 
  33314.  
  33315.                              rpc_s_incomplete_name Incomplete name. 
  33316.  
  33317.                              rpc_s_invalid_inquiry_type The inquiry type is not 
  33318.                                                    valid. 
  33319.  
  33320.                              rpc_s_invalid_name_syntax The name syntax is not 
  33321.                                                    valid. 
  33322.  
  33323.                              rpc_s_invalid_vers_option The version option is 
  33324.                                                    not valid. 
  33325.  
  33326.                              rpc_s_unsupported_name_syntax Unsupported name 
  33327.                                                    syntax. 
  33328.  
  33329.  Usage 
  33330.  
  33331.           The rpc_ns_profile_elt_inq_begin routine creates an inquiry context 
  33332.           for viewing the elements in a profile. 
  33333.  
  33334.           Using the inquiry_type and vers_option parameters, an application 
  33335.           specifies which of the following profile elements are returned from 
  33336.           calls to rpc_ns_profile_elt_inq_next: 
  33337.  
  33338.             o  The default element 
  33339.             o  All elements 
  33340.             o  Those elements with the specified interface identifier 
  33341.             o  Those elements with the specified member name 
  33342.             o  Those elements with both the specified interface identifier and 
  33343.                member name. 
  33344.  
  33345.           Before calling rpc_ns_profile_elt_inq_next, the application must 
  33346.           first call this routine to create an inquiry context. 
  33347.  
  33348.           When the application finishes viewing the profile elements, it calls 
  33349.           rpc_ns_profile_elt_inq_done to delete the inquiry context. 
  33350.  
  33351.  Related Information 
  33352.  
  33353.           Routines: 
  33354.  
  33355.  
  33356.           rpc_if_inq_id 
  33357.           rpc_ns_mgmt_handle_set_exp_age 
  33358.           rpc_ns_profile_elt_inq_done 
  33359.           rpc_ns_profile_elt_inq_next 
  33360.  
  33361.  
  33362. ΓòÉΓòÉΓòÉ 5.8.96. rpc_ns_profile_elt_inq_done ΓòÉΓòÉΓòÉ
  33363.  
  33364.  Purpose 
  33365.  
  33366.           Deletes the inquiry context for a profile. This routine is used by 
  33367.           client, server, or management applications. 
  33368.  
  33369.  Format 
  33370.  
  33371.                     #include <dce/rpc.h>
  33372.  
  33373.                     void rpc_ns_profile_elt_inq_done(
  33374.                             rpc_ns_handle_t  *inquiry_context,
  33375.                             unsigned32  *status);
  33376.  
  33377.  Parameters 
  33378.  
  33379.           Input/Output 
  33380.  
  33381.           inquiry_context Specifies the name service handle to delete. (A name 
  33382.                         service handle is created by calling 
  33383.                         rpc_ns_profile_elt_inq_begin.) Returns the value NULL. 
  33384.  
  33385.           Output 
  33386.  
  33387.           status        Returns the status code from this routine. On 
  33388.                         successful completion, the routine returns rpc_s_ok. 
  33389.                         Otherwise, it returns rpc_s_invalid_ns_handle, which 
  33390.                         indicates that the name service handle is not valid. 
  33391.  
  33392.  Usage 
  33393.  
  33394.           The rpc_ns_profile_elt_inq_done routine deletes an inquiry context 
  33395.           created by calling rpc_ns_profile_elt_inq_begin. 
  33396.  
  33397.           An application calls this routine after viewing profile elements 
  33398.           using rpc_ns_profile_elt_inq_next. 
  33399.  
  33400.  Related Information 
  33401.  
  33402.           Routines: 
  33403.  
  33404.  
  33405.           rpc_ns_profile_elt_inq_begin 
  33406.           rpc_ns_profile_elt_inq_next 
  33407.  
  33408.  
  33409. ΓòÉΓòÉΓòÉ 5.8.97. rpc_ns_profile_elt_inq_next ΓòÉΓòÉΓòÉ
  33410.  
  33411.  Purpose 
  33412.  
  33413.           Returns one element at a time from a profile. This routine is used by 
  33414.           client, server, or management applications. 
  33415.  
  33416.  Format 
  33417.  
  33418.                     #include <dce/rpc.h>
  33419.  
  33420.                     void rpc_ns_profile_elt_inq_next(
  33421.                             rpc_ns_handle_t  inquiry_context,
  33422.                             rpc_if_id_t  *if_id,
  33423.                             unsigned_char_t  **member_name,
  33424.                             unsigned32  *priority,
  33425.                             unsigned_char_t  **annotation,
  33426.                             unsigned32  *status);
  33427.  
  33428.  Parameters 
  33429.  
  33430.           Input 
  33431.  
  33432.           inquiry_context Specifies a name service handle.  This handle is 
  33433.                         returned from the rpc_ns_profile_elt_inq_begin routine. 
  33434.  
  33435.           Output 
  33436.  
  33437.           if_id         Returns the interface identifier of the profile 
  33438.                         element. 
  33439.  
  33440.           member_name   Returns a pointer to the profile element's member name. 
  33441.                         The name is a global name. 
  33442.  
  33443.                         The syntax of the returned name is specified by the 
  33444.                         member_name_syntax parameter in the 
  33445.                         rpc_ns_profile_elt_inq_begin. 
  33446.  
  33447.                         Specify NULL to prevent the routine from returning this 
  33448.                         parameter. In this case the application does not call 
  33449.                         rpc_string_free. 
  33450.  
  33451.           priority      Returns the profile element priority. 
  33452.  
  33453.           annotation    Returns the annotation string for the profile element. 
  33454.                         If there is no annotation string in the profile 
  33455.                         element, the string \0 is returned. 
  33456.  
  33457.                         Specify NULL to prevent the routine from returning this 
  33458.                         parameter. In this case the application does not need 
  33459.                         to call rpc_string_free. 
  33460.  
  33461.           status        Returns the status code from this routine. On 
  33462.                         successful completion, the routine returns rpc_s_ok. 
  33463.                         Otherwise, it returns one of the following errors: 
  33464.  
  33465.                              rpc_s_class_version_mismatch RPC class version 
  33466.                                                       mismatch. 
  33467.  
  33468.                              rpc_s_entry_not_found    The name service entry 
  33469.                                                       was not found. 
  33470.  
  33471.                              rpc_s_incomplete_name    Incomplete name. 
  33472.  
  33473.                              rpc_s_invalid_ns_handle  The name service handle 
  33474.                                                       is not valid. 
  33475.  
  33476.                              rpc_s_name_service_unavailable The name service is 
  33477.                                                       unavailable. 
  33478.  
  33479.                              rpc_s_no_more_elements   No more elements. 
  33480.  
  33481.                              rpc_s_no_ns_permission   There is no permission 
  33482.                                                       for the name service 
  33483.                                                       operation. 
  33484.  
  33485.                              rpc_s_not_rpc_entry      Not an RPC entry. 
  33486.  
  33487.  Usage 
  33488.  
  33489.           The rpc_ns_profile_elt_inq_next routine returns one element from the 
  33490.           profile specified by the profile_name parameter in 
  33491.           rpc_ns_profile_elt_inq_begin. 
  33492.  
  33493.           The selection criteria for the element returned are based on the 
  33494.           inquiry_type parameter in rpc_ns_profile_elt_inq_begin. The 
  33495.           rpc_ns_profile_elt_inq_next routine returns all the components 
  33496.           (interface identifier, member name, priority, annotation string) of a 
  33497.           profile element. 
  33498.  
  33499.           An application can view all the selected profile entries by 
  33500.           repeatedly calling rpc_ns_profile_elt_inq_next. When all the elements 
  33501.           have been viewed, this routine returns an rpc_s_no_more_elements 
  33502.           status code. The returned elements are unordered. 
  33503.  
  33504.           On each call to this routine that returns a profile element, the DCE 
  33505.           RPC runtime allocates memory for the returned member_name (which 
  33506.           points to a global name) and annotation strings. The application is 
  33507.           responsible for calling rpc_string_free for each returned member_name 
  33508.           and annotation string. 
  33509.  
  33510.           After viewing the profile elements, the application must call 
  33511.           rpc_ns_profile_elt_inq_done to delete the inquiry context. 
  33512.  
  33513.  Permissions Required 
  33514.  
  33515.           You need read permission to the CDS object entry (the target profile 
  33516.           entry). 
  33517.  
  33518.  Related Information 
  33519.  
  33520.           Routines: 
  33521.           rpc_ns_profile_elt_inq_begin 
  33522.           rpc_ns_profile_elt_inq_done 
  33523.           rpc_string_free 
  33524.  
  33525.  
  33526. ΓòÉΓòÉΓòÉ 5.8.98. rpc_ns_profile_elt_remove ΓòÉΓòÉΓòÉ
  33527.  
  33528.  Purpose 
  33529.  
  33530.           Removes an element from a profile. This routine is used by client, 
  33531.           server, or management applications. 
  33532.  
  33533.  Format 
  33534.  
  33535.                     #include <dce/rpc.h>
  33536.  
  33537.                     void rpc_ns_profile_elt_remove(
  33538.                             unsigned32  profile_name_syntax,
  33539.                             unsigned_char_t  *profile_name,
  33540.                             rpc_if_id_t  *if_id,
  33541.                             unsigned32  member_name_syntax,
  33542.                             unsigned_char_t  *member_name,
  33543.                             unsigned32  *status);
  33544.  
  33545.  Parameters 
  33546.  
  33547.           Input 
  33548.  
  33549.           profile_name_syntax An integer value that specifies the syntax of the 
  33550.                         profile_name parameter. To use the syntax specified in 
  33551.                         the RPC_DEFAULT_ENTRY_SYNTAX environment variable, 
  33552.                         provide rpc_c_ns_syntax_default. 
  33553.  
  33554.           profile_name  Specifies the profile from which to remove an element. 
  33555.                         This can be either the global or the cell-relative 
  33556.                         name. 
  33557.  
  33558.           if_id         Specifies the interface identifier of the profile 
  33559.                         element to be removed. 
  33560.  
  33561.                         Specify NULL to remove the default profile member. 
  33562.  
  33563.           member_name_syntax An integer value that specifies the syntax of the 
  33564.                         member_name parameter. To use the syntax specified in 
  33565.                         the RPC_DEFAULT_ENTRY_SYNTAX environment variable, 
  33566.                         provide rpc_c_ns_syntax_default. 
  33567.  
  33568.           member_name   Specifies the name service entry name in the profile 
  33569.                         element to remove. This can be either the global or the 
  33570.                         cell-relative name. 
  33571.  
  33572.           Output 
  33573.  
  33574.           status        Returns the status code from this routine. On 
  33575.                         successful completion, the routine returns rpc_s_ok. 
  33576.                         Otherwise, it returns one of the following errors: 
  33577.  
  33578.                              rpc_s_entry_not_found The name service entry was 
  33579.                                        not found. 
  33580.  
  33581.                              rpc_s_incomplete_name Incomplete name. 
  33582.  
  33583.                              rpc_s_invalid_name_syntax The name syntax is not 
  33584.                                        valid. 
  33585.  
  33586.                              rpc_s_name_service_unavailable The name service is 
  33587.                                        unavailable. 
  33588.  
  33589.                              rpc_s_no_ns_permission There is no permission for 
  33590.                                        the name service operation. 
  33591.  
  33592.                              rpc_s_profile_element_not_found The profile 
  33593.                                        element was not found. 
  33594.  
  33595.                              rpc_s_unsupported_name_syntax Unsupported name 
  33596.                                        syntax. 
  33597.  
  33598.  Usage 
  33599.  
  33600.           The rpc_ns_profile_elt_remove routine removes a profile element from 
  33601.           the profile specified by profile_name. Unless if_id is NULL, the 
  33602.           member_name parameter and the if_id parameter must match the 
  33603.           corresponding profile element attributes exactly for an element to be 
  33604.           removed. When if_id is NULL, the default profile element is removed, 
  33605.           and the member_name parameter is ignored. 
  33606.  
  33607.           The routine removes the reference to the entry specified by 
  33608.           (member_name) from the profile; it does not delete the entry itself. 
  33609.  
  33610.           Use this routine cautiously; removing elements from a profile can 
  33611.           break a hierarchy of profiles. 
  33612.  
  33613.  Permissions Required 
  33614.  
  33615.           You need both read permission and write permission to the CDS object 
  33616.           entry (the target profile entry). 
  33617.  
  33618.  Related Information 
  33619.  
  33620.           Routines: 
  33621.           rpc_ns_profile_delete 
  33622.           rpc_ns_profile_elt_add 
  33623.  
  33624.  
  33625. ΓòÉΓòÉΓòÉ 5.8.99. rpc_object_inq_type ΓòÉΓòÉΓòÉ
  33626.  
  33627.  Purpose 
  33628.  
  33629.           Returns the type of an object. This routine is used by server 
  33630.           applications. 
  33631.  
  33632.  Format 
  33633.  
  33634.                     #include <dce/rpc.h>
  33635.  
  33636.                     void rpc_object_inq_type(
  33637.                             uuid_t  *obj_uuid,
  33638.                             uuid_t  *type_uuid,
  33639.                             unsigned32  *status);
  33640.  
  33641.  Parameters 
  33642.  
  33643.           Input 
  33644.  
  33645.           obj_uuid      Specifies the object UUID whose associated type UUID is 
  33646.                         returned. Supply NULL to specify a nil UUID for this 
  33647.                         parameter. 
  33648.  
  33649.           Output 
  33650.  
  33651.           type_uuid     Returns the type UUID corresponding to the object UUID 
  33652.                         supplied in the obj_uuid parameter. 
  33653.  
  33654.                         Specifying NULL here prevents the return of a type 
  33655.                         UUID. An application, by specifying NULL here, can 
  33656.                         determine from the value returned in the status 
  33657.                         parameter whether obj_uuid is registered. This 
  33658.                         determination occurs without the application specifying 
  33659.                         an output type UUID variable. 
  33660.  
  33661.           status        Returns the status code from this routine. On 
  33662.                         successful completion, the routine returns rpc_s_ok. 
  33663.                         Otherwise, it returns one of the following errors: 
  33664.  
  33665.                              rpc_s_object_not_found The object was not found. 
  33666.  
  33667.                              uuid_s_bad_version The UUID version is not valid. 
  33668.  
  33669.  Usage 
  33670.  
  33671.           A server application calls rpc_object_inq_type to obtain the type 
  33672.           UUID of an object. 
  33673.  
  33674.           If the object is registered with the RPC runtime using 
  33675.           rpc_object_set_type, the registered type is returned. 
  33676.  
  33677.           Optionally, an application can privately maintain an object and type 
  33678.           registration. In this case, if the application provides an object 
  33679.           inquiry routine the RPC runtime uses that routine to determine the 
  33680.           object type. 
  33681.  
  33682.           The following table summarizes how rpc_object_inq_type obtains the 
  33683.           returned type UUID. 
  33684.  
  33685.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  33686.                     Γöé Table 9. Rules for Returning an Object's Type             Γöé
  33687.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  33688.                     Γöé Was object UUID reg-  Γöé Was an object inquiry Γöé Return Value     Γöé
  33689.                     Γöé istered (using     Γöé routine registered   Γöé            Γöé
  33690.                     Γöé rpc_object_set_type)? Γöé (using         Γöé            Γöé
  33691.                     Γöé            Γöé rpc_object_set_inq_fn)Γöé            Γöé
  33692.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  33693.                     Γöé yes          Γöé ignored        Γöé Return the object's  Γöé
  33694.                     Γöé            Γöé            Γöé registered type    Γöé
  33695.                     Γöé            Γöé            Γöé UUID.         Γöé
  33696.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  33697.                     Γöé no           Γöé yes          Γöé Return the type UUID Γöé
  33698.                     Γöé            Γöé            Γöé returned from     Γöé
  33699.                     Γöé            Γöé            Γöé calling the inquiry  Γöé
  33700.                     Γöé            Γöé            Γöé routine.       Γöé
  33701.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  33702.                     Γöé no           Γöé no           Γöé Return the nil UUID. Γöé
  33703.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  33704.  
  33705.  Related Information 
  33706.  
  33707.           Routines: 
  33708.           rpc_object_set_inq_fn 
  33709.           rpc_object_set_type 
  33710.  
  33711.  
  33712. ΓòÉΓòÉΓòÉ 5.8.100. rpc_object_set_inq_fn ΓòÉΓòÉΓòÉ
  33713.  
  33714.  Purpose 
  33715.  
  33716.           Registers an object inquiry routine. This routine is used by server 
  33717.           applications. 
  33718.  
  33719.  Format 
  33720.  
  33721.                     #include <dce/rpc.h>
  33722.  
  33723.                     void rpc_object_set_inq_fn(
  33724.                             rpc_object_inq_fn_t  inquiry_fn,
  33725.                             unsigned32  *status);
  33726.  
  33727.  Parameters 
  33728.  
  33729.           Input 
  33730.  
  33731.           inquiry_fn    Specifies a pointer to an object type inquiry routine. 
  33732.                         When an application calls rpc_object_inq_type and the 
  33733.                         RPC runtime finds that the specified object is not 
  33734.                         registered, the runtime automatically calls the 
  33735.                         registered inquiry routine to determine the object's 
  33736.                         type. Specify NULL to remove a previously set inquiry 
  33737.                         routine. 
  33738.  
  33739.                         The following C language definition for 
  33740.                         rpc_object_inq_fn_t illustrates the prototype for this 
  33741.                         routine: 
  33742.  
  33743.                                                 typedef void (*rpc_object_inq_fn_t)
  33744.                                                 (
  33745.                                                     uuid_t  *object_uuid,  /* in  */
  33746.                                                     uuid_t  *type_uuid,    /* out */
  33747.                                                     unsigned32  *status        /* out */
  33748.                                                 );
  33749.  
  33750.                         The returned type_uuid and status values are returned 
  33751.                         as the output parameters from rpc_object_inq_type. 
  33752.  
  33753.                         If you specify NULL, rpc_object_set_inq_fn unregisters 
  33754.                         (that is, removes) a previously registered object type 
  33755.                         inquiry routine. 
  33756.  
  33757.           Output 
  33758.  
  33759.           status        Returns the status code from this routine. On 
  33760.                         successful completion, the routine returns rpc_s_ok. 
  33761.                         Otherwise, it returns an error. 
  33762.  
  33763.  Usage 
  33764.  
  33765.           A server application calls rpc_object_set_inq_fn to specify a routine 
  33766.           to determine the object type. If an application privately maintains 
  33767.           object and type registrations, the specified inquiry routine returns 
  33768.           the type UUID of an object from that registration. 
  33769.  
  33770.           The RPC runtime automatically calls the inquiry routine when the 
  33771.           application calls rpc_object_inq_type and the object was not 
  33772.           previously registered by rpc_object_set_type. The RPC runtime also 
  33773.           automatically calls the inquiry routine for every remote procedure 
  33774.           call it receives if the object was not previously registered. 
  33775.  
  33776.  Cautions 
  33777.  
  33778.           Use this routine with caution. When the RPC runtime automatically 
  33779.           calls this routine in response to a received remote procedure call, 
  33780.           the inquiry routine can be called from the context of runtime 
  33781.           internal threads with runtime internal locks held. The inquiry 
  33782.           routine should not block or at least not block for long (for example, 
  33783.           the inquiry routine should not perform a remote procedure call). 
  33784.           Also, the inquiry routine must not unwind because of an exception. In 
  33785.           general, the inquiry routine should not call back into the RPC 
  33786.           runtime. It is legal to call rpc_object_set_type or any of the 
  33787.           uuid_xxx routines. Failure to comply with these restrictions will 
  33788.           result in undefined behavior. 
  33789.  
  33790.  Related Information 
  33791.  
  33792.           Routines: 
  33793.           rpc_object_inq_type 
  33794.           rpc_object_set_type 
  33795.  
  33796.  
  33797. ΓòÉΓòÉΓòÉ 5.8.101. rpc_object_set_type ΓòÉΓòÉΓòÉ
  33798.  
  33799.  Purpose 
  33800.  
  33801.           Registers the type of an object with the RPC runtime. This routine is 
  33802.           used by server applications. 
  33803.  
  33804.  Format 
  33805.  
  33806.                     #include <dce/rpc.h>
  33807.  
  33808.                     void rpc_object_set_type(
  33809.                             uuid_t  *obj_uuid,
  33810.                             uuid_t  *type_uuid,
  33811.                             unsigned32  *status);
  33812.  
  33813.  Parameters 
  33814.  
  33815.           Input 
  33816.  
  33817.           obj_uuid      Specifies an object UUID to associate with the type 
  33818.                         UUID in the type_uuid parameter. Do not specify NULL or 
  33819.                         a nil UUID. 
  33820.  
  33821.           type_uuid     Specifies the type UUID of the obj_uuid parameter. 
  33822.  
  33823.                         Specify an parameter value of NULL or a nil UUID to 
  33824.                         reset the object type to the default association of 
  33825.                         object UUID/nil type UUID. 
  33826.  
  33827.           Output 
  33828.  
  33829.           status        Returns the status code from this routine. On 
  33830.                         successful completion, the routine returns rpc_s_ok. 
  33831.                         Otherwise, it returns one of the following errors: 
  33832.  
  33833.                              rpc_s_already_registered The object is already 
  33834.                                                  registered. 
  33835.  
  33836.                              rpc_s_invalid_object The object is not valid. 
  33837.  
  33838.                              uuid_s_bad_version  Bad UUID version. 
  33839.  
  33840.  Usage 
  33841.  
  33842.           The rpc_object_set_type routine assigns a type UUID to an object 
  33843.           UUID. 
  33844.  
  33845.           By default, the RPC runtime assumes that the type of all objects is 
  33846.           nil. A server program that contains one implementation of an 
  33847.           interface (one manager entry point vector) does not need to call this 
  33848.           routine, provided that the server registered the interface with the 
  33849.           nil type UUID. See the rpc_server_register_ifroutine. 
  33850.  
  33851.           A server program that contains multiple implementations of an 
  33852.           interface (multiple manager entry point vectors; that is, multiple 
  33853.           type UUIDs) calls this routine once for each object UUID the server 
  33854.           offers. Associating each object with a type UUID tells the RPC 
  33855.           runtime the manager entry point vector (interface implementation) to 
  33856.           use when the server receives a remote procedure call for a non-nil 
  33857.           object UUID. 
  33858.  
  33859.           The RPC runtime allows an application to set the type for an 
  33860.           unlimited number of objects. 
  33861.  
  33862.           To remove the association between an object UUID and its type UUID 
  33863.           (established by calling this routine), a server calls this routine 
  33864.           again and specifies the value NULL or a nil UUID for the type_uuid 
  33865.           parameter. This resets the association between an object UUID and 
  33866.           type UUID to the default. 
  33867.  
  33868.           A server cannot register a nil object UUID. The RPC runtime 
  33869.           automatically registers the nil object UUID with a nil type UUID. 
  33870.           Attempting to set the type of a nil object UUID results in the 
  33871.           routine's returning the status code rpc_s_invalid_object. 
  33872.  
  33873.           Servers that want to maintain their own object UUID to type UUID 
  33874.           mapping can use rpc_object_set_inq_fn in place of, or in addition to, 
  33875.           rpc_object_set_type. 
  33876.  
  33877.  Related Information 
  33878.  
  33879.           Routines: 
  33880.           rpc_object_set_inq_fn 
  33881.           rpc_server_register_if 
  33882.  
  33883.  
  33884. ΓòÉΓòÉΓòÉ 5.8.102. rpc_protseq_vector_free ΓòÉΓòÉΓòÉ
  33885.  
  33886.  Purpose 
  33887.  
  33888.           Frees the memory used by a vector and its protocol sequences. This 
  33889.           routine is used by client or server applications. 
  33890.  
  33891.  Format 
  33892.  
  33893.                     #include <dce/rpc.h>
  33894.  
  33895.                     void rpc_protseq_vector_free(
  33896.                             rpc_protseq_vector_t  **protseq_vector,
  33897.                             unsigned32  *status);
  33898.  
  33899.  Parameters 
  33900.  
  33901.           Input/Output 
  33902.  
  33903.           protseq_vector Specifies the address of a pointer to a vector of 
  33904.                         protocol sequences. On return the pointer is set to 
  33905.                         NULL. 
  33906.  
  33907.           Output 
  33908.  
  33909.           status        Returns the status code from this routine. On 
  33910.                         successful completion, the routine returns rpc_s_ok. 
  33911.                         Otherwise, it returns an error. 
  33912.  
  33913.  Usage 
  33914.  
  33915.           The rpc_protseq_vector_free routine frees the memory used to store a 
  33916.           vector of protocol sequences.  The freed memory includes both the 
  33917.           protocol sequences and the vector itself. 
  33918.  
  33919.           Call rpc_network_inq_protseqs to obtain a vector of protocol 
  33920.           sequences. Follow a call to rpc_network_inq_protseqs with a call to 
  33921.           rpc_protseq_vector_free. 
  33922.  
  33923.  Related Information 
  33924.  
  33925.           Routines: 
  33926.           rpc_network_inq_protseqs 
  33927.  
  33928.  
  33929. ΓòÉΓòÉΓòÉ 5.8.103. rpc_rgy_get_codesets ΓòÉΓòÉΓòÉ
  33930.  
  33931.  Purpose 
  33932.  
  33933.           Gets supported code sets information from the local host. This 
  33934.           routine is used by client and server applications. 
  33935.  
  33936.  Format 
  33937.  
  33938.                     #include <dce/rpc.h>
  33939.  
  33940.                     void rpc_rgy_get_codesets(
  33941.                             rpc_codeset_mgmt_p_t  *code_sets_array,
  33942.                             error_status_t  *status);
  33943.  
  33944.  Parameters 
  33945.  
  33946.           Output 
  33947.  
  33948.           code_sets_array An integer array that specifies the code sets that 
  33949.                         the client's or server's host environment supports. 
  33950.                         Each array element is an integer value that uniquely 
  33951.                         identifies one code set. 
  33952.  
  33953.           status        Returns the status code from this routine. On 
  33954.                         successful completion, the routine returns rpc_s_ok. 
  33955.                         Otherwise, it returns one of the following errors: 
  33956.  
  33957.                              dce_cs_c_cannot_open_file 
  33958.                              dce_cs_c_cannot_read_file 
  33959.                              rpc_s_no_memory 
  33960.  
  33961.  Usage 
  33962.  
  33963.           The rpc_rgy_get_codesets routine belongs to a set of DCE RPC routines 
  33964.           for use by client and server applications that are transferring 
  33965.           international character data in a heterogeneous character set and 
  33966.           code sets environment. 
  33967.  
  33968.           The rpc_rgy_get_codesets routine examines the locale environment of 
  33969.           the host on which the client or server process is running to 
  33970.           determine the local code set currently in use by the client or server 
  33971.           process and the set of supported code set conversion routines that 
  33972.           exist on the host into which the client or server process can convert 
  33973.           if necessary. It then reads the code sets registry on the local host 
  33974.           to retrieve the unique identifiers associated with these supported 
  33975.           code sets. 
  33976.  
  33977.           The routine returns a code sets array. The set of values returned in 
  33978.           this structure correspond to the process's local code set and the 
  33979.           code sets into which processes that run on this host can convert. The 
  33980.           array also contains, for each code set, the maximum number of bytes 
  33981.           that code set uses to encode one character (c_max_bytes). 
  33982.  
  33983.           Server applications use the rpc_rgy_get_codesets routine in their 
  33984.           initialization code to get their host's supported character and code 
  33985.           sets values in order to export them into the name service database 
  33986.           with rpc_ns_mgmt_set_attribute. 
  33987.  
  33988.           Client applications use the rpc_rgy_get_codesets routine during the 
  33989.           server binding selection process to retrieve the supported character 
  33990.           and code sets at their host in order to evaluate them against the 
  33991.           character and code sets that a server supports. Client applications 
  33992.           that use the evaluation routines rpc_cs_eval_with_universal and 
  33993.           rpc_cs_eval_without_universal do not need to call this routine 
  33994.           explicitly, because these code sets evaluation routines call it on 
  33995.           the client's behalf. Application developers who are writing their own 
  33996.           character and code set evaluation routines might need to include 
  33997.           rpc_rgy_get_codesets in their user-written evaluation routines. 
  33998.  
  33999.  Related Information 
  34000.  
  34001.           Commands: 
  34002.           csrc 
  34003.  
  34004.           Routines: 
  34005.           dce_cf_get_csrgy_filename 
  34006.           rpc_ns_mgmt_read_codesets 
  34007.           rpc_ns_mgmt_remove_attribute 
  34008.           rpc_ns_mgmt_set_attribute 
  34009.  
  34010.  
  34011. ΓòÉΓòÉΓòÉ 5.8.104. rpc_rgy_get_max_bytes ΓòÉΓòÉΓòÉ
  34012.  
  34013.  Purpose 
  34014.  
  34015.           Gets the maximum number of bytes that a code set uses to encode one 
  34016.           character from the code set registry on a host. This routine is used 
  34017.           by client and server applications. 
  34018.  
  34019.  Format 
  34020.  
  34021.                     #include <dce/rpc.h>
  34022.  
  34023.                     void rpc_rgy_get_max_bytes(
  34024.                             unsigned32  rgy_code_set_value,
  34025.                             unsigned16  *rgy_max_bytes,
  34026.                             error_status_t  *status);
  34027.  
  34028.  Parameters 
  34029.  
  34030.           Input 
  34031.  
  34032.           rgy_code_set_value The registered hexadecimal value that uniquely 
  34033.                         identifies the code set. 
  34034.  
  34035.           Output 
  34036.  
  34037.           rgy_max_bytes The registered decimal value that indicates the number 
  34038.                         of bytes this code set uses to encode one character. 
  34039.  
  34040.           status        Returns the status code from this routine. On 
  34041.                         successful completion, the routine returns rpc_s_ok. 
  34042.                         Otherwise, it returns one of the following errors: 
  34043.  
  34044.                              dce_cs_c_cannot_open_file 
  34045.                              dce_cs_c_cannot_read_file 
  34046.                              dce_cs_c_notfound 
  34047.                              dce_cs_c_unknown 
  34048.  
  34049.  Usage 
  34050.  
  34051.           The rpc_rgy_get_max_bytes routine belongs to a set of DCE RPC 
  34052.           routines for use by client and server applications that are 
  34053.           transferring international character data in a heterogeneous 
  34054.           character set and code sets environment. 
  34055.  
  34056.           The rpc_rgy_get_max_bytes routine reads the code set registry on the 
  34057.           local host. It takes the specified registered code set value, uses it 
  34058.           as an index into the registry, and returns the decimal value that 
  34059.           indicates the number of bytes that the code set uses to encode one 
  34060.           character. 
  34061.  
  34062.           The DCE RPC stub support routines for buffer sizing use the 
  34063.           rpc_rgy_get_max_bytes routine as part of their procedure to determine 
  34064.           whether additional storage needs to be allocated for conversion 
  34065.           between local and network code sets. The DCE RPC stub support 
  34066.           routines call the rpc_rgy_get_max_bytes routine once to get the 
  34067.           rgy_max_bytes value for the code set to be used to transfer the data 
  34068.           over the network (the network code set) then call the routine again 
  34069.           to get the rgy_max_bytes value of their local code set. The stubs 
  34070.           then compare the two values to determine whether additional buffers 
  34071.           are necessary or whether the conversion can be done in place. 
  34072.  
  34073.           Client and server applications that use the DCE RPC buffer sizing 
  34074.           routines byte_net_size and byte_local_size do not need to call this 
  34075.           routine explicitly because these DCE RPC stub support routines call 
  34076.           it on their behalf. Application programmers who are developing their 
  34077.           own stub support routines for buffer sizing can use the 
  34078.           rpc_rgy_get_max_bytes routine in their code to get code set max_byte 
  34079.           information for their user-written buffer sizing routines. 
  34080.  
  34081.  Related Information 
  34082.  
  34083.           Commands: 
  34084.           csrc 
  34085.  
  34086.           Routines: 
  34087.           dce_cs_loc_to_rgy 
  34088.           dce_cs_rgy_to_loc 
  34089.           rpc_ns_mgmt_read_codesets 
  34090.           rpc_rgy_get_codesets 
  34091.  
  34092.  
  34093. ΓòÉΓòÉΓòÉ 5.8.105. rpc_server_inq_bindings ΓòÉΓòÉΓòÉ
  34094.  
  34095.  Purpose 
  34096.  
  34097.           Returns binding handles for communication with a server. This routine 
  34098.           is used by server applications. 
  34099.  
  34100.  Format 
  34101.  
  34102.                     #include <dce/rpc.h>
  34103.  
  34104.                     void rpc_server_inq_bindings(
  34105.                             rpc_binding_vector_t  **binding_vector,
  34106.                             unsigned32  *status);
  34107.  
  34108.  Parameters 
  34109.  
  34110.           Output 
  34111.  
  34112.           binding_vector Returns the address of a vector of server binding 
  34113.                         handles. 
  34114.  
  34115.           status        Returns the status code from this routine. On 
  34116.                         successful completion, the routine returns rpc_s_ok. 
  34117.                         Otherwise, it returns rpc_s_no_bindings, which 
  34118.                         indicates that there are no bindings. 
  34119.  
  34120.  Usage 
  34121.  
  34122.           The rpc_server_inq_bindings routine obtains a vector of server 
  34123.           binding handles. Binding handles are created by the RPC runtime when 
  34124.           a server application calls any of the following routines to register 
  34125.           protocol sequences. 
  34126.  
  34127.             o  rpc_server_use_all_protseqs 
  34128.             o  rpc_server_use_all_protseqs_if 
  34129.             o  rpc_server_use_protseq 
  34130.             o  rpc_server_use_protseq_ep 
  34131.             o  rpc_server_use_protseq_if 
  34132.  
  34133.           The returned binding vector can contain binding handles with dynamic 
  34134.           endpoints and binding handles with well known endpoints, depending on 
  34135.           which of the preceding routines the server application called. See 
  34136.           Binding Handle for an explanation of dynamic and well-known 
  34137.           endpoints. 
  34138.  
  34139.           A server uses the vector of binding handles for exporting to the name 
  34140.           service, for registering with the local endpoint map, or for 
  34141.           conversion to string bindings. 
  34142.  
  34143.           If there are no binding handles (no registered protocol sequences), 
  34144.           this routine returns the rpc_s_no_bindings status code and returns 
  34145.           the value NULL to the binding_vector parameter. 
  34146.  
  34147.           The server is responsible for calling rpc_binding_vector_free to 
  34148.           deallocate the memory used by the vector. 
  34149.  
  34150.  Related Information 
  34151.  
  34152.           Routines: 
  34153.           rpc_binding_vector_free 
  34154.           rpc_ep_register 
  34155.           rpc_ep_register_no_replace 
  34156.           rpc_ns_binding_export 
  34157.           rpc_server_use_all_protseqs 
  34158.           rpc_server_use_all_protseqs_if 
  34159.           rpc_server_use_protseq 
  34160.           rpc_server_use_protseq_ep 
  34161.           rpc_server_use_protseq_if 
  34162.  
  34163.  
  34164. ΓòÉΓòÉΓòÉ 5.8.106. rpc_server_inq_if ΓòÉΓòÉΓòÉ
  34165.  
  34166.  Purpose 
  34167.  
  34168.           Returns the manager entry point vector registered for an interface. 
  34169.           This routine is used by server applications. 
  34170.  
  34171.  Format 
  34172.  
  34173.                     #include <dce/rpc.h>
  34174.  
  34175.                     void rpc_server_inq_if(
  34176.                             rpc_if_handle_t  if_handle,
  34177.                             uuid_t  *mgr_type_uuid,
  34178.                             rpc_mgr_epv_t  *mgr_epv,
  34179.                             unsigned32  *status);
  34180.  
  34181.  Parameters 
  34182.  
  34183.           Input 
  34184.  
  34185.           if_handle     Specifies the interface specification whose manager 
  34186.                         entry point vector (EPV) pointer is returned in the 
  34187.                         mgr_epv parameter. 
  34188.  
  34189.           mgr_type_uuid Specifies a type UUID for the manager whose EPV pointer 
  34190.                         is returned in  the mgr_epv parameter. 
  34191.  
  34192.                         Specifying the value NULL (or a nil UUID) has this 
  34193.                         routine return a pointer to the manager EPV that is 
  34194.                         registered with if_handle and the nil type UUID of the 
  34195.                         manager. 
  34196.  
  34197.           Output 
  34198.  
  34199.           mgr_epv       Returns a pointer to the manager EPV corresponding to 
  34200.                         the if_handle and mgr_type_uuid parameters. 
  34201.  
  34202.           status        Returns the status code from this routine. On 
  34203.                         successful completion, the routine returns rpc_s_ok. 
  34204.                         Otherwise, it returns one of the following errors: 
  34205.  
  34206.                              rpc_s_unknown_if  The interface is unknown. 
  34207.  
  34208.                              rpc_s_unknown_mgr_type The manager type is 
  34209.                                                unknown. 
  34210.  
  34211.  Usage 
  34212.  
  34213.           A server application calls rpc_server_inq_if to determine the manager 
  34214.           EPV for a registered interface and type UUID of the manager. 
  34215.  
  34216.  Related Information 
  34217.  
  34218.           Routines: 
  34219.           rpc_server_register_if 
  34220.  
  34221.  
  34222. ΓòÉΓòÉΓòÉ 5.8.107. rpc_server_listen ΓòÉΓòÉΓòÉ
  34223.  
  34224.  Purpose 
  34225.  
  34226.           Tells the RPC runtime to listen for remote procedure calls. This 
  34227.           routine is used by server applications. 
  34228.  
  34229.  Format 
  34230.  
  34231.                     #include <dce/rpc.h>
  34232.  
  34233.                     void rpc_server_listen(
  34234.                             unsigned32  max_calls_exec,
  34235.                             unsigned32  *status);
  34236.  
  34237.  Parameters 
  34238.  
  34239.           Input 
  34240.  
  34241.           max_calls_exec Specifies the maximum number of concurrently running 
  34242.                         remote procedure calls. 
  34243.  
  34244.                         Use the value rpc_c_listen_max_calls_default to specify 
  34245.                         the default value. 
  34246.  
  34247.                         Also, the five rpc_server_use_xxx_protseq_xxx routines 
  34248.                         limit (according to their max_call_requests parameter) 
  34249.                         the number of concurrent remote procedure call requests 
  34250.                         that a server can accept. 
  34251.  
  34252.           Output 
  34253.  
  34254.           status        Returns the status code from this routine. On 
  34255.                         successful completion, the routine returns rpc_s_ok. 
  34256.                         Otherwise, it returns one of the following errors: 
  34257.  
  34258.                              rpc_s_already_listening The server is already 
  34259.                                                   listening. 
  34260.  
  34261.                              rpc_s_max_calls_too_small The maximum calls value 
  34262.                                                   is too small. 
  34263.  
  34264.                              rpc_s_no_protseqs_registered No protocol sequences 
  34265.                                                   are registered. 
  34266.  
  34267.  Usage 
  34268.  
  34269.           The rpc_server_listen routine makes a server listen for remote 
  34270.           procedure calls. DCE RPC allows a server to simultaneously process 
  34271.           multiple calls. The max_calls_exec parameter specifies the maximum 
  34272.           number of concurrent remote procedure calls the server runs. Each 
  34273.           remote procedure call runs in a call execution thread. The 
  34274.           implementation of the RPC architecture determines whether it reuses 
  34275.           call execution threads for the execution of subsequent remote 
  34276.           procedure calls or, instead, it creates a new thread for each use of 
  34277.           a subsequent remote procedure call. 
  34278.  
  34279.           The following conditions affect the number of concurrent remote 
  34280.           procedure calls that a server can process: 
  34281.  
  34282.             o  Sufficient network resources must be available to accept 
  34283.                simultaneous call requests arriving over a particular protocol 
  34284.                sequence. The value of the max_call_requests parameter in the 
  34285.                five rpc_server_use_xxx_protseq_xxx routines advises the RPC 
  34286.                runtime about the runtime's request for network resources. 
  34287.  
  34288.             o  Enough call threads must be available to run the simultaneous 
  34289.                call requests after they have been accepted. The value of the 
  34290.                max_calls_exec parameter in rpc_server_listen specifies the 
  34291.                number of call threads. 
  34292.  
  34293.           These conditions are independent of each other. 
  34294.  
  34295.           A server application that specifies a value for max_calls_exec 
  34296.           greater than 1 is responsible for concurrency control among the 
  34297.           remote procedures, because each runs in a separate thread. 
  34298.  
  34299.           If the server receives more remote procedure calls than it can run 
  34300.           (more calls than the value of max_calls_exec), the RPC runtime 
  34301.           accepts and queues additional remote procedure calls until a call 
  34302.           execution thread is available. From the client's perspective, a 
  34303.           queued remote procedure call looks the same as one that the server is 
  34304.           actively running. A client call remains blocked and in the queue 
  34305.           until any of the following events occurs: 
  34306.  
  34307.             o  The remote procedure call is assigned to an available call 
  34308.                execution thread and the call runs to completion. 
  34309.  
  34310.             o  The client can no longer communicate with the server. 
  34311.  
  34312.             o  The client thread is canceled and the remote procedure call does 
  34313.                not complete within the cancel timeout limits. 
  34314.  
  34315.           The implementation of the RPC architecture determines the amount of 
  34316.           queuing it provides. 
  34317.  
  34318.           The RPC runtime continues listening for remote procedure calls (that 
  34319.           is, the routine does not return to the server) until one of the 
  34320.           following events occurs: 
  34321.  
  34322.             o  One of the server application's manager routines calls 
  34323.                rpc_mgmt_stop_server_listening. 
  34324.  
  34325.             o  A client is allowed to, and makes, a remote 
  34326.                rpc_mgmt_stop_server_listening call to the server. 
  34327.  
  34328.             o  The communication function supporting datagram services has an 
  34329.                unrecoverable error. 
  34330.  
  34331.           On receiving a request to stop listening, the RPC runtime stops 
  34332.           accepting new remote procedure calls for all registered interfaces. 
  34333.           Running calls and existing queued calls are allowed to complete. 
  34334.  
  34335.           After all calls complete, rpc_server_listen returns to the caller, 
  34336.           which is a server application. 
  34337.  
  34338.           For more information about a server's listening for and handling 
  34339.           incoming remote procedure calls, see DCE for OS/2 Warp: Application 
  34340.           Development Guide - Core Components. This guide also contains 
  34341.           information about canceled threads. 
  34342.  
  34343.  Related Information 
  34344.  
  34345.           Routines: rpc_mgmt_stop_server_listening 
  34346.           rpc_server_register_if 
  34347.           rpc_server_use_all_protseqs 
  34348.           rpc_server_use_all_protseqs_if 
  34349.           rpc_server_use_protseq 
  34350.           rpc_server_use_protseq_ep 
  34351.           rpc_server_use_protseq_if 
  34352.  
  34353.  
  34354. ΓòÉΓòÉΓòÉ 5.8.108. rpc_server_register_auth_info ΓòÉΓòÉΓòÉ
  34355.  
  34356.  Purpose 
  34357.  
  34358.           Registers authentication information with the RPC runtime. This 
  34359.           routine is used by server applications. 
  34360.  
  34361.  Format 
  34362.  
  34363.                     #include <dce/rpc.h>
  34364.  
  34365.                     void rpc_server_register_auth_info(
  34366.                             unsigned_char_t  *server_princ_name,
  34367.                             unsigned32  authn_svc,
  34368.                             rpc_auth_key_retrieval_fn_t  get_key_fn,
  34369.                             void  *arg,
  34370.                             unsigned32  *status);
  34371.  
  34372.  Parameters 
  34373.  
  34374.           Input 
  34375.  
  34376.           server_princ_name Specifies the principal name to use for the server 
  34377.                         when authenticating remote procedure calls using the 
  34378.                         service specified by authn_svc. The content of the name 
  34379.                         and its syntax is defined by the authentication service 
  34380.                         in use. 
  34381.  
  34382.           authn_svc     Specifies the authentication service to use when the 
  34383.                         server receives a remote procedure call request. The 
  34384.                         following authentication services are supported: 
  34385.  
  34386.                              rpc_c_authn_none     No authentication 
  34387.  
  34388.                              rpc_c_authn_dce_secret DCE shared-secret key 
  34389.                                                   authentication 
  34390.  
  34391.                              rpc_c_authn_dce_public DCE public key 
  34392.                                                   authentication (reserved for 
  34393.                                                   future use) 
  34394.  
  34395.                              rpc_c_authn_default  DCE default authentication 
  34396.                                                   service 
  34397.  
  34398.           get_key_fn    Specifies the address of a server-provided routine that 
  34399.                         returns encryption keys. 
  34400.  
  34401.                         The following C definition for 
  34402.                         rpc_auth_key_retrieval_fn_t illustrates the prototype 
  34403.                         for the encryption key acquisition routine: 
  34404.  
  34405.                                                 typedef void (*rpc_auth_key_retrieval_fn_t)
  34406.                                                 (
  34407.                                                    void  *arg,               /* in */
  34408.                                                    unsigned_char_t  *server_princ_name, /* in */
  34409.                                                    unsigned32  key_type,           /* in */
  34410.                                                    unsigned32  key_ver,            /* in */
  34411.                                                    void  **key,              /* out */
  34412.                                                    unsigned32  *status             /* out */
  34413.                                                 );
  34414.  
  34415.                         The RPC runtime passes the server_princ_name parameter 
  34416.                         value specified on the call to 
  34417.                         rpc_server_register_auth_info, as the server_princ_name 
  34418.                         parameter value, to the get_key_fn key acquisition 
  34419.                         routine. The RPC runtime automatically provides a value 
  34420.                         for the key version (key_ver) parameter. For a key_ver 
  34421.                         value of 0 (zero), the key acquisition routine must 
  34422.                         return the most recent key available. The routine 
  34423.                         returns the key in the key parameter. 
  34424.  
  34425.                         Note:  The key_type parameter specifies a Kerberos 
  34426.                                encryption key type. Because currently the DCE 
  34427.                                supports only DES encryption, this parameter can 
  34428.                                be ignored. 
  34429.  
  34430.                         If the key acquisition routine, when called from 
  34431.                         rpc_server_register_auth_info, returns a status other 
  34432.                         than rpc_s_ok, the rpc_server_register_auth_info 
  34433.                         routines fails and returns the error status to the 
  34434.                         calling server. 
  34435.  
  34436.                         If the key acquisition routine, when called by the RPC 
  34437.                         runtime while authenticating a client remote procedure 
  34438.                         call request, returns a status other than rpc_s_ok, the 
  34439.                         request fails and the RPC runtime returns the error 
  34440.                         status to the client. 
  34441.  
  34442.           arg           Specifies a parameter to pass to the get_key_fn key 
  34443.                         acquisition routine, if specified. See the get_key_fn 
  34444.                         parameter for details. 
  34445.  
  34446.                         Specify NULL for arg to use the default key table file, 
  34447.                         /krb/v5srvtab. The calling server must be root to 
  34448.                         access this file. 
  34449.  
  34450.                         If arg is a key table file name, the file must have 
  34451.                         been created with the ktadd command. If the specified 
  34452.                         key table file resides in /krb5, you can supply only 
  34453.                         the file name. If the file does not reside in /krb5, 
  34454.                         you must supply the full path name. You must prepend 
  34455.                         the file's absolute path name using the prefix FILE:. 
  34456.  
  34457.           Output 
  34458.  
  34459.           status        Returns the status code from this routine. On 
  34460.                         successful completion, the routine returns rpc_s_ok. 
  34461.                         Otherwise, it returns one of the following errors: 
  34462.  
  34463.                              rpc_s_unknown_authn_service The authentication 
  34464.                                                   service is unknown. 
  34465.  
  34466.                              rpc_s_key_func_not_allowed The authn_svc parameter 
  34467.                                                   contains rpc_c_authn_default 
  34468.                                                   and a non-null value was 
  34469.                                                   supplied for the get_key_fn 
  34470.                                                   parameter. 
  34471.  
  34472.  Usage 
  34473.  
  34474.           The rpc_server_register_auth_info routine registers an authentication 
  34475.           service to use for authenticating remote procedure calls to a 
  34476.           particular server principal. A server calls this routine once for 
  34477.           each authentication service and principal name combination that it 
  34478.           wants to register. 
  34479.  
  34480.           The authentication service specified by a client (using the 
  34481.           rpc_binding_set_auth_info routine) must be one of the authentication 
  34482.           services registered by the server. If it is not, the client's remote 
  34483.           procedure call request fails with a rpc_s_unknown_authn_service 
  34484.           status code. 
  34485.  
  34486.           The following table shows the RPC runtime behavior for acquiring 
  34487.           encryption keys for each supported authentication service. Note that 
  34488.           if authn_svc is rpc_c_authn_default, get_key_fn must be NULL. 
  34489.  
  34490.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  34491.                     Γöé Table 10. RPC Key Acquisition for Authentication Services       Γöé
  34492.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34493.                     Γöé authn_svc         Γöé get_key_fn  Γöé arg  Γöé Runtime Behavior  Γöé
  34494.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34495.                     Γöé rpc_c_authn_default    Γöé NULL     Γöé NULL Γöé Uses the default  Γöé
  34496.                     Γöé              Γöé        Γöé    Γöé method of      Γöé
  34497.                     Γöé              Γöé        Γöé    Γöé encryption key   Γöé
  34498.                     Γöé              Γöé        Γöé    Γöé acquisition from  Γöé
  34499.                     Γöé              Γöé        Γöé    Γöé the default key   Γöé
  34500.                     Γöé              Γöé        Γöé    Γöé table.       Γöé
  34501.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34502.                     Γöé rpc_c_authn_default    Γöé NULL     Γöé non-NΓöéLUses the default  Γöé
  34503.                     Γöé              Γöé        Γöé    Γöé method of      Γöé
  34504.                     Γöé              Γöé        Γöé    Γöé encryption key   Γöé
  34505.                     Γöé              Γöé        Γöé    Γöé acquisition from  Γöé
  34506.                     Γöé              Γöé        Γöé    Γöé the specified key  Γöé
  34507.                     Γöé              Γöé        Γöé    Γöé table.       Γöé
  34508.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34509.                     Γöé rpc_c_authn_default    Γöé non-NULL   Γöé IgnorΓöédError returned.   Γöé
  34510.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34511.                     Γöé rpc_c_authn_none      Γöé ignored    Γöé ignorΓöédNo authentication  Γöé
  34512.                     Γöé              Γöé        Γöé    Γöé performed.     Γöé
  34513.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34514.                     Γöé rpc_c_authn_dce_secret   Γöé NULL     Γöé NULL Γöé Uses the default  Γöé
  34515.                     Γöé              Γöé        Γöé    Γöé method of      Γöé
  34516.                     Γöé              Γöé        Γöé    Γöé encryption key   Γöé
  34517.                     Γöé              Γöé        Γöé    Γöé acquisition from  Γöé
  34518.                     Γöé              Γöé        Γöé    Γöé the default key   Γöé
  34519.                     Γöé              Γöé        Γöé    Γöé table.       Γöé
  34520.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34521.                     Γöé rpc_c_authn_dce_secret   Γöé NULL     Γöé non-NΓöéLUses the default  Γöé
  34522.                     Γöé              Γöé        Γöé    Γöé method of      Γöé
  34523.                     Γöé              Γöé        Γöé    Γöé encryption key   Γöé
  34524.                     Γöé              Γöé        Γöé    Γöé acquisition from  Γöé
  34525.                     Γöé              Γöé        Γöé    Γöé the specified key  Γöé
  34526.                     Γöé              Γöé        Γöé    Γöé table.       Γöé
  34527.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34528.                     Γöé rpc_c_authn_dce_secret   Γöé non-NULL   Γöé NULL Γöé Uses the specified Γöé
  34529.                     Γöé              Γöé        Γöé    Γöé encryption key   Γöé
  34530.                     Γöé              Γöé        Γöé    Γöé acquisition     Γöé
  34531.                     Γöé              Γöé        Γöé    Γöé routine to obtain  Γöé
  34532.                     Γöé              Γöé        Γöé    Γöé keys from the    Γöé
  34533.                     Γöé              Γöé        Γöé    Γöé default key table. Γöé
  34534.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34535.                     Γöé rpc_c_authn_dce_secret   Γöé non-NULL   Γöé non-NΓöéLUses the specified Γöé
  34536.                     Γöé              Γöé        Γöé    Γöé encryption key   Γöé
  34537.                     Γöé              Γöé        Γöé    Γöé acquisition     Γöé
  34538.                     Γöé              Γöé        Γöé    Γöé routine to obtain  Γöé
  34539.                     Γöé              Γöé        Γöé    Γöé keys from the    Γöé
  34540.                     Γöé              Γöé        Γöé    Γöé specified key    Γöé
  34541.                     Γöé              Γöé        Γöé    Γöé table.       Γöé
  34542.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34543.                     Γöé rpc_c_authn_dce_public   Γöé ignored    Γöé ignorΓöéd(Reserved for    Γöé
  34544.                     Γöé              Γöé        Γöé    Γöé future use)     Γöé
  34545.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  34546.  
  34547.  Related Information 
  34548.  
  34549.           Routines: 
  34550.           rpc_binding_set_auth_info 
  34551.           sec_key_mgmt_get_nth_key 
  34552.  
  34553.  
  34554. ΓòÉΓòÉΓòÉ 5.8.109. rpc_server_register_if ΓòÉΓòÉΓòÉ
  34555.  
  34556.  Purpose 
  34557.  
  34558.           Registers an interface with the RPC runtime. This routine is used by 
  34559.           server applications. 
  34560.  
  34561.  Format 
  34562.  
  34563.                     #include <dce/rpc.h>
  34564.  
  34565.                     void rpc_server_register_if(
  34566.                             rpc_if_handle_t  if_handle,
  34567.                             uuid_t  *mgr_type_uuid,
  34568.                             rpc_mgr_epv_t  mgr_epv,
  34569.                             unsigned32  *status);
  34570.  
  34571.  Parameters 
  34572.  
  34573.           Input 
  34574.  
  34575.           if_handle     An IDL-generated data structure specifying the 
  34576.                         interface to register. 
  34577.  
  34578.           mgr_type_uuid Specifies a type UUID to associate with the mgr_epv 
  34579.                         parameter. Specifying the value NULL (or a nil UUID) 
  34580.                         registers the if_handle with a nil type UUID. 
  34581.  
  34582.           mgr_epv       Specifies the manager routine's entry point vector. To 
  34583.                         use the IDL-generated default entry point vector, 
  34584.                         specify NULL. 
  34585.  
  34586.           Output 
  34587.  
  34588.           status        Returns the status code from this routine. On 
  34589.                         successful completion, the routine returns rpc_s_ok. 
  34590.                         Otherwise, it returns one of the following errors: 
  34591.  
  34592.                              rpc_s_type_already_registered An interface with 
  34593.                                                   the given type UUID is 
  34594.                                                   already registered. 
  34595.  
  34596.                              rpc_s_no_memory      No memory. 
  34597.  
  34598.                              rpc_no_epv           If mgr_epv has value NULL and 
  34599.                                                   there is no default epv in 
  34600.                                                   the interface handle. 
  34601.  
  34602.  Usage 
  34603.  
  34604.           The rpc_server_register_if routine registers a server interface with 
  34605.           the RPC runtime. A server can register an unlimited number of 
  34606.           interfaces. After it is registered, an interface is available to 
  34607.           clients through any binding handle of the server, provided that the 
  34608.           binding handle is compatible for the client. 
  34609.  
  34610.           A server must provide the following information to register an 
  34611.           interface: 
  34612.  
  34613.             o  An interface specification, which is a data structure generated 
  34614.                by the IDL compiler. The server specifies the interface 
  34615.                specification of the interface using the if_handle parameter. 
  34616.  
  34617.             o  A type UUID and manager entry point vector (EPV), a data pair 
  34618.                that determines the manager routine that runs when a server 
  34619.                receives a remote procedure call request from a client. 
  34620.  
  34621.                The server specifies the type UUID and EPV using the 
  34622.                mgr_type_uuid and mgr_epv parameters, respectively. Note that 
  34623.                when a non-nil type UUID is specified, the server must also call 
  34624.                rpc_object_set_type to register objects of this non-nil type. 
  34625.  
  34626.           A server that offers only a single manager for an interface calls 
  34627.           rpc_server_register_if once for that interface. In the simple case 
  34628.           where the single manager's entry point names are the same as the 
  34629.           operation names in the IDL interface definition, the IDL-generated 
  34630.           default manager EPV for the interface can be used. The value NULL in 
  34631.           the mgr_epv parameter specifies the default manager EPV. 
  34632.  
  34633.           Note that if a server offers multiple implementations of an 
  34634.           interface, the server code must register a separate manager entry 
  34635.           point vector for each interface implementation. 
  34636.  
  34637.  Rules for Calling Manager Routines 
  34638.  
  34639.           The RPC runtime dispatches an incoming remote procedure call to a 
  34640.           manager that offers the requested RPC interface. When multiple 
  34641.           managers are registered for an interface, the RPC runtime must select 
  34642.           one of them. To select a manager, the RPC runtime uses the object 
  34643.           UUID specified by the binding handle of the call. 
  34644.  
  34645.           The following table summarizes the rules applied for calling manager 
  34646.           routines. 
  34647.  
  34648.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  34649.                     Γöé Table 11. Rules for Invoking Manager Routines             Γöé
  34650.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34651.                     Γöé Object UUID Γöé Has Server  Γöé Has Server  Γöé Dispatching Action     Γöé
  34652.                     Γöé of Call(1)  Γöé Set Type of Γöé Registered  Γöé              Γöé
  34653.                     Γöé       Γöé Object    Γöé Type for   Γöé              Γöé
  34654.                     Γöé       Γöé UUID?(2)   Γöé Manager    Γöé              Γöé
  34655.                     Γöé       Γöé       Γöé EPV?(3)    Γöé              Γöé
  34656.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34657.                     Γöé nil     Γöé Not appli-  Γöé yes      Γöé Uses the manager with the Γöé
  34658.                     Γöé       Γöé cable(4)   Γöé        Γöé nil type UUID.       Γöé
  34659.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34660.                     Γöé nil     Γöé Not appli-  Γöé no      Γöé Error           Γöé
  34661.                     Γöé       Γöé cable(4)   Γöé        Γöé (RPC_S_UNKNOWN_MGR_TYPE). Γöé
  34662.                     Γöé       Γöé       Γöé        Γöé Rejects the remote proce- Γöé
  34663.                     Γöé       Γöé       Γöé        Γöé dure call.         Γöé
  34664.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34665.                     Γöé non-nil   Γöé yes     Γöé yes      Γöé Uses the manager with the Γöé
  34666.                     Γöé       Γöé       Γöé        Γöé same type UUID.      Γöé
  34667.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34668.                     Γöé non-nil   Γöé no      Γöé ignored    Γöé Uses the manager with the Γöé
  34669.                     Γöé       Γöé       Γöé        Γöé nil type UUID.  If no   Γöé
  34670.                     Γöé       Γöé       Γöé        Γöé manager with the nil type Γöé
  34671.                     Γöé       Γöé       Γöé        Γöé UUID was registered,    Γöé
  34672.                     Γöé       Γöé       Γöé        Γöé (error           Γöé
  34673.                     Γöé       Γöé       Γöé        Γöé RPC_S_UNKNOWN_MGR_TYPE),  Γöé
  34674.                     Γöé       Γöé       Γöé        Γöé rejects the remote proce- Γöé
  34675.                     Γöé       Γöé       Γöé        Γöé dure call.         Γöé
  34676.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34677.                     Γöé non-nil   Γöé yes     Γöé no      Γöé Error           Γöé
  34678.                     Γöé       Γöé       Γöé        Γöé (RPC_S_UNKNOWN_MGR_TYPE). Γöé
  34679.                     Γöé       Γöé       Γöé        Γöé Rejects the remote proce- Γöé
  34680.                     Γöé       Γöé       Γöé        Γöé dure call.         Γöé
  34681.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34682.                     Γöé NOTES:                                Γöé
  34683.                     Γöé                                    Γöé
  34684.                     Γöé (1)                                  Γöé
  34685.                     Γöé  This is the object UUID found in a binding handle for a remote   Γöé
  34686.                     Γöé  procedure.                             Γöé
  34687.                     Γöé (2)                                  Γöé
  34688.                     Γöé  By calling RPC_OBJECT_SET_TYPE to specify the type UUID for an   Γöé
  34689.                     Γöé  object.                               Γöé
  34690.                     Γöé (3)                                  Γöé
  34691.                     Γöé  By calling RPC_SERVER_REGISTER_IF using the same type UUID.     Γöé
  34692.                     Γöé (4)                                  Γöé
  34693.                     Γöé  The nil object UUID is always automatically assigned the nil type  Γöé
  34694.                     Γöé  UUID.  It is illegal to specify a nil object UUID in        Γöé
  34695.                     Γöé  RPC_OBJECT_SET_TYPE.                        Γöé
  34696.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  34697.  
  34698.           For more information about registering server interfaces and calling 
  34699.           manager routines, see the DCE for OS/2 Warp: Application Development 
  34700.           Guide - Core Components. 
  34701.  
  34702.  Related Information 
  34703.  
  34704.           Routines: 
  34705.           rpc_binding_set_object 
  34706.           rpc_ep_register 
  34707.           rpc_ep_register_no_replace 
  34708.           rpc_ns_binding_export 
  34709.           rpc_object_set_type 
  34710.           rpc_server_unregister_if 
  34711.  
  34712.  
  34713. ΓòÉΓòÉΓòÉ 5.8.110. rpc_server_unregister_if ΓòÉΓòÉΓòÉ
  34714.  
  34715.  Purpose 
  34716.  
  34717.           Removes an interface from the RPC runtime. This routine is used by 
  34718.           server applications. 
  34719.  
  34720.  Format 
  34721.  
  34722.                     #include <dce/rpc.h>
  34723.  
  34724.                     void rpc_server_unregister_if(
  34725.                             rpc_if_handle_t  if_handle,
  34726.                             uuid_t  *mgr_type_uuid,
  34727.                             unsigned32  *status);
  34728.  
  34729.  Parameters 
  34730.  
  34731.           Input 
  34732.  
  34733.           if_handle     Specifies an interface specification to unregister 
  34734.                         (remove). 
  34735.  
  34736.                         Specify NULL to remove all interfaces previously 
  34737.                         registered with the type UUID value given in the 
  34738.                         mgr_type_uuid parameter. 
  34739.  
  34740.           mgr_type_uuid Specifies the type UUID for the manager entry point 
  34741.                         vector (EPV) to remove. This needs to be the same value 
  34742.                         as provided in a call to the rpc_server_register_if 
  34743.                         routine. 
  34744.  
  34745.                         Specify NULL to remove the interface given in the 
  34746.                         if_handle parameter for all previously registered type 
  34747.                         UUIDs. 
  34748.  
  34749.                         Specify a nil UUID to remove the IDL-generated default 
  34750.                         manager EPV. In this case all manager EPVs registered 
  34751.                         with a non-nil type UUID remain registered. 
  34752.  
  34753.           Output 
  34754.  
  34755.           status        Returns the status code from this routine. On 
  34756.                         successful completion, the routine returns rpc_s_ok. 
  34757.                         Otherwise, it returns one of the following errors: 
  34758.  
  34759.                              rpc_s_unknown_if  The interface is unknown. 
  34760.  
  34761.                              rpc_s_unknown_mgr_type The manager type is 
  34762.                                                unknown. 
  34763.  
  34764.  Usage 
  34765.  
  34766.           The rpc_server_unregister_if routine removes the association between 
  34767.           an interface and a manager entry point vector (EPV). 
  34768.  
  34769.           Specify the manager EPV to remove by providing, in the mgr_type_uuid 
  34770.           parameter, the type UUID value specified in a call to the 
  34771.           rpc_server_register_if routine. Once removed, an interface is no 
  34772.           longer available to client applications. 
  34773.  
  34774.           When an interface is removed, the RPC runtime stops accepting new 
  34775.           calls for that interface. Currently running calls (on that interface) 
  34776.           are allowed to complete. 
  34777.  
  34778.           The following table summarizes the actions of this routine. 
  34779.  
  34780.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  34781.                     Γöé Table 12. Rules for Removing an Interface               Γöé
  34782.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34783.                     Γöé if_handle    Γöé mgr_type_uuid  Γöé Action              Γöé
  34784.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34785.                     Γöé non-NULL     Γöé non-NULL     Γöé Removes the manager EPV associ-  Γöé
  34786.                     Γöé         Γöé         Γöé ated with the specified parame-  Γöé
  34787.                     Γöé         Γöé         Γöé ters.               Γöé
  34788.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34789.                     Γöé non-NULL     Γöé NULL       Γöé Removes all manager EPVs associ- Γöé
  34790.                     Γöé         Γöé         Γöé ated with the if_handle param-  Γöé
  34791.                     Γöé         Γöé         Γöé eter.               Γöé
  34792.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34793.                     Γöé NULL       Γöé non-NULL     Γöé Removes all manager EPVs associ- Γöé
  34794.                     Γöé         Γöé         Γöé ated with the mgr_type_uuid    Γöé
  34795.                     Γöé         Γöé         Γöé parameter.            Γöé
  34796.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34797.                     Γöé NULL       Γöé NULL       Γöé Removes all manager EPVs.     Γöé
  34798.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  34799.                     Γöé NOTE:  When both of the parameters if_handle and save mgr_type_uuid  Γöé
  34800.                     Γöé are given the value NULL, this routine has the effect of preventing  Γöé
  34801.                     Γöé the server from receiving any new remote procedure calls because all Γöé
  34802.                     Γöé the manager EPVs for all interfaces have been removed.        Γöé
  34803.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  34804.  
  34805.  Related Information 
  34806.  
  34807.           Routines: 
  34808.           rpc_server_register_if 
  34809.  
  34810.  
  34811. ΓòÉΓòÉΓòÉ 5.8.111. rpc_server_use_all_protseqs ΓòÉΓòÉΓòÉ
  34812.  
  34813.  Purpose 
  34814.  
  34815.           Tells the RPC runtime to use all supported protocol sequences for 
  34816.           receiving remote procedure calls. This routine is used by server 
  34817.           applications. 
  34818.  
  34819.  Format 
  34820.  
  34821.                     #include <dce/rpc.h>
  34822.  
  34823.                     void rpc_server_use_all_protseqs(
  34824.                             unsigned32  max_call_requests,
  34825.                             unsigned32  *status);
  34826.  
  34827.  Parameters 
  34828.  
  34829.           Input 
  34830.  
  34831.           max_call_requests Specifies the maximum number of concurrent remote 
  34832.                         procedure call requests that the server can accept. 
  34833.  
  34834.                         The RPC runtime guarantees that the server can accept 
  34835.                         at least this number of concurrent call requests.  The 
  34836.                         actual number of these requests can be greater than the 
  34837.                         value of max_call_requests and can vary for each 
  34838.                         protocol sequence. 
  34839.  
  34840.                         Use the value rpc_c_protseq_max_reqs_default to specify 
  34841.                         the default parameter value. 
  34842.  
  34843.                         Note that in this version of DCE RPC, any number you 
  34844.                         specify is replaced by the default value. 
  34845.  
  34846.                         Also, rpc_server_listen limits (according to its 
  34847.                         max_calls_exec parameter) the amount of concurrent 
  34848.                         remote procedure call execution. See rpc_server_listen 
  34849.                         for more information. 
  34850.  
  34851.           Output 
  34852.  
  34853.           status        Returns the status code from this routine. On 
  34854.                         successful completion, the routine returns rpc_s_ok. 
  34855.                         Otherwise, it returns one of the following errors: 
  34856.  
  34857.                              rpc_s_cant_create_socket Cannot create a socket. 
  34858.  
  34859.                              rpc_s_max_descs_exceeded Exceeded the maximum 
  34860.                                                  number of network descriptors. 
  34861.  
  34862.                              rpc_s_no_protseqs   No supported protocol 
  34863.                                                  sequences. 
  34864.  
  34865.  Usage 
  34866.  
  34867.           The rpc_server_use_all_protseqs routine registers all supported 
  34868.           protocol sequences with the RPC runtime. A server must register at 
  34869.           least one protocol sequence with the RPC runtime to receive remote 
  34870.           procedure call requests. 
  34871.  
  34872.           For each protocol sequence registered by a server, the RPC runtime 
  34873.           creates one or more binding handles. Each binding handle contains a 
  34874.           dynamic endpoint that the RPC runtime and operating system generated. 
  34875.  
  34876.           The max_call_requests parameter allows you to specify the maximum 
  34877.           number of concurrent remote procedure call requests the server 
  34878.           handles. 
  34879.  
  34880.           After registering protocol sequences, a server typically calls the 
  34881.           following routines: 
  34882.  
  34883.           rpc_server_inq_bindings Obtains a vector containing all of the 
  34884.                                server's binding handles. 
  34885.  
  34886.           rpc_ep_register      Registers the binding handles with the local 
  34887.                                endpoint map. 
  34888.  
  34889.           rpc_ep_register_no_replace Registers the binding handles with the 
  34890.                                local endpoint map. 
  34891.  
  34892.           rpc_ns_binding_export Places the binding handles in the name service 
  34893.                                database for access by any client. 
  34894.  
  34895.           rpc_binding_vector_free Frees the vector of server binding handles. 
  34896.  
  34897.           rpc_server_register_if Registers with the RPC runtime those 
  34898.                                interfaces that the server offers. 
  34899.  
  34900.           rpc_server_listen    Enables the reception of remote procedure calls. 
  34901.  
  34902.           To register protocol sequences selectively, a server calls: 
  34903.  
  34904.             o  rpc_server_use_protseq 
  34905.             o  rpc_server_use_all_protseqs_if 
  34906.             o  rpc_server_use_protseq_if 
  34907.             o  rpc_server_use_protseq_ep 
  34908.  
  34909.           For an explanation of how a server can establish a client-server 
  34910.           relationship without using the local endpoint map or the name service 
  34911.           database, see String Binding. 
  34912.  
  34913.  Related Information 
  34914.  
  34915.           Routines: 
  34916.           rpc_binding_from_string_binding 
  34917.           rpc_binding_to_string_binding 
  34918.           rpc_binding_vector_free 
  34919.           rpc_ep_register 
  34920.           rpc_ep_register_no_replace 
  34921.           rpc_ns_binding_export 
  34922.           rpc_server_inq_bindings 
  34923.           rpc_server_listen 
  34924.           rpc_server_register_if 
  34925.           rpc_server_use_all_protseqs_if 
  34926.           rpc_server_use_protseq 
  34927.           rpc_server_use_protseq_ep 
  34928.           rpc_server_use_protseq_if 
  34929.  
  34930.  
  34931. ΓòÉΓòÉΓòÉ 5.8.112. rpc_server_use_all_protseqs_if ΓòÉΓòÉΓòÉ
  34932.  
  34933.  Purpose 
  34934.  
  34935.           Tells the RPC runtime to use all the protocol sequences and endpoints 
  34936.           specified in the interface specification for receiving remote 
  34937.           procedure calls. This routine is used by server applications. 
  34938.  
  34939.  Format 
  34940.  
  34941.                     #include <dce/rpc.h>
  34942.  
  34943.                     void rpc_server_use_all_protseqs_if(
  34944.                             unsigned32  max_call_requests,
  34945.                             rpc_if_handle_t  if_handle,
  34946.                             unsigned32  *status);
  34947.  
  34948.  Parameters 
  34949.  
  34950.           Input 
  34951.  
  34952.           max_call_requests Specifies the maximum number of concurrent remote 
  34953.                         procedure call requests that the server can accept. 
  34954.  
  34955.                         The RPC runtime guarantees that the server can accept 
  34956.                         at least this number of concurrent call requests. The 
  34957.                         actual number of these requests can be greater than the 
  34958.                         value of max_call_requests and can vary for each 
  34959.                         protocol sequence. 
  34960.  
  34961.                         Use the value rpc_c_protseq_max_reqs_default to specify 
  34962.                         the default parameter value. Note that in this version 
  34963.                         of DCE RPC, any number you specify is replaced by the 
  34964.                         default value. 
  34965.  
  34966.                         Also, the rpc_server_listen routine limits (according 
  34967.                         to its max_calls_exec parameter) the amount of 
  34968.                         concurrent remote procedure call execution. See 
  34969.                         rpc_server_listen for more information. 
  34970.  
  34971.           if_handle     Specifies an interface specification containing the 
  34972.                         protocol sequences and their corresponding endpoint 
  34973.                         information to use in creating binding handles. Each 
  34974.                         created binding handle contains a well known 
  34975.                         (nondynamic) endpoint contained in the interface 
  34976.                         specification. 
  34977.  
  34978.           Output 
  34979.  
  34980.           status        Returns the status code from this routine. On 
  34981.                         successful completion, the routine returns rpc_s_ok. 
  34982.                         Otherwise, it returns one of the following errors: 
  34983.  
  34984.                              rpc_s_calls_too_large_for_wk_ep The maximum number 
  34985.                                                      of concurrent calls is too 
  34986.                                                      large. 
  34987.  
  34988.                              rpc_s_cant_bind_socket  Cannot bind to a socket. 
  34989.  
  34990.                              rpc_s_cant_create_socket Cannot create a socket. 
  34991.  
  34992.                              rpc_s_cant_inq_socket   Cannot obtain an endpoint 
  34993.                                                      from the socket. 
  34994.  
  34995.                              rpc_s_invalid_endpoint_format The interface handle 
  34996.                                                      is not valid. 
  34997.  
  34998.                              rpc_s_max_descs_exceeded Exceeded the maximum 
  34999.                                                      number of network 
  35000.                                                      descriptors. 
  35001.  
  35002.                              rpc_s_no_protseqs       No supported protocol 
  35003.                                                      sequences. 
  35004.  
  35005.  Usage 
  35006.  
  35007.           The rpc_server_use_all_protseqs_if routine registers all protocol 
  35008.           sequences and associated endpoint address information provided in the 
  35009.           IDL file with the RPC runtime. A server must register at least one 
  35010.           protocol sequence with the RPC runtime to receive remote procedure 
  35011.           call requests. 
  35012.  
  35013.           For each protocol sequence registered by a server, the RPC runtime 
  35014.           creates one or more binding handles. Each binding handle contains the 
  35015.           well known endpoint specified in the IDL file. 
  35016.  
  35017.           The max_call_requests parameter allows you to specify the maximum 
  35018.           number of concurrent remote procedure call requests the server 
  35019.           handles. 
  35020.  
  35021.           If you want to register selected protocol sequences specified in the 
  35022.           IDL, your server uses rpc_server_use_protseq_if. 
  35023.  
  35024.           The rpc_server_use_all_protseqs routine contains a list of the 
  35025.           routines a server typically calls after calling this routine. 
  35026.           (However, a server that uses only rpc_server_use_all_protseqs_if does 
  35027.           not subsequently call rpc_ep_register or rpc_ep_register_no_replace.) 
  35028.           For an explanation of how a server can establish a client-server 
  35029.           relationship without using the local endpoint map or the name service 
  35030.           database, see String Binding. 
  35031.  
  35032.  Related Information 
  35033.  
  35034.           Routines: 
  35035.           rpc_binding_vector_free 
  35036.           rpc_ep_register 
  35037.           rpc_ep_register_no_replace 
  35038.           rpc_ns_binding_export 
  35039.           rpc_server_inq_bindings 
  35040.           rpc_server_listen 
  35041.           rpc_server_register_if 
  35042.           rpc_server_use_all_protseqs 
  35043.           rpc_server_use_protseq 
  35044.           rpc_server_use_protseq_ep 
  35045.           rpc_server_use_protseq_if 
  35046.  
  35047.  
  35048. ΓòÉΓòÉΓòÉ 5.8.113. rpc_server_use_protseq ΓòÉΓòÉΓòÉ
  35049.  
  35050.  Purpose 
  35051.  
  35052.           Tells the RPC runtime to use the specified protocol sequence for 
  35053.           receiving remote procedure calls. This routine is used by server 
  35054.           applications. 
  35055.  
  35056.  Format 
  35057.  
  35058.                     #include <dce/rpc.h>
  35059.  
  35060.                     void rpc_server_use_protseq(
  35061.                             unsigned_char_t  *protseq,
  35062.                             unsigned32  max_call_requests,
  35063.                             unsigned32  *status);
  35064.  
  35065.  Parameters 
  35066.  
  35067.           Input 
  35068.  
  35069.           protseq       Specifies a string identifier for the protocol sequence 
  35070.                         to register with the RPC runtime. See Protocol Sequence 
  35071.                         for a list of string identifiers. 
  35072.  
  35073.           max_call_requests Specifies the maximum number of concurrent remote 
  35074.                         procedure call requests that the server can accept. 
  35075.  
  35076.                         The RPC runtime guarantees that the server can accept 
  35077.                         at least this number of concurrent call requests. The 
  35078.                         actual number of these requests can be greater than the 
  35079.                         value of max_call_requests and can vary for each 
  35080.                         protocol sequence. 
  35081.  
  35082.                         Use the value rpc_c_protseq_max_reqs_default to specify 
  35083.                         the default parameter value. 
  35084.  
  35085.                         Note that in this version of DCE RPC, any number you 
  35086.                         specify is replaced by the default value. 
  35087.  
  35088.                         Also, the rpc_server_listen routine limits (according 
  35089.                         to its max_calls_exec parameter) the amount of 
  35090.                         concurrent remote procedure call execution. See 
  35091.                         rpc_server_listen for more information. 
  35092.  
  35093.           Output 
  35094.  
  35095.           status        Returns the status code from this routine. On 
  35096.                         successful completion, the routine returns rpc_s_ok. 
  35097.                         Otherwise, it returns one of the following errors: 
  35098.  
  35099.                              rpc_s_cant_create_socket Cannot create a socket. 
  35100.  
  35101.                              rpc_s_invalid_rpc_protseq The protocol sequence is 
  35102.                                                   not valid. 
  35103.  
  35104.                              rpc_s_max_descs_exceeded Exceeded the maximum 
  35105.                                                   number of network 
  35106.                                                   descriptors. 
  35107.  
  35108.                              rpc_s_protseq_not_supported The protocol sequence 
  35109.                                                   is not supported on this 
  35110.                                                   host. 
  35111.  
  35112.  Usage 
  35113.  
  35114.           The rpc_server_use_protseq routine registers a single protocol 
  35115.           sequence with the RPC runtime. A server must register at least one 
  35116.           protocol sequence with the RPC runtime to receive remote procedure 
  35117.           call requests. A server can call this routine multiple times to 
  35118.           register additional protocol sequences. 
  35119.  
  35120.           For each protocol sequence registered by a server, the RPC runtime 
  35121.           creates one or more binding handles. Each binding handle contains a 
  35122.           dynamic endpoint that the RPC runtime and operating system generated. 
  35123.  
  35124.           The max_call_requests parameter allows you to specify the maximum 
  35125.           number of concurrent remote procedure call requests the server 
  35126.           handles. 
  35127.  
  35128.           A server calls rpc_server_use_all_protseqs to register all protocol 
  35129.           sequences. 
  35130.  
  35131.           The description of rpc_server_use_all_protseqs contains a list of the 
  35132.           routines a server typically calls after calling this routine. For an 
  35133.           explanation of how a server can establish a client-server 
  35134.           relationship without using the local endpoint map or the name service 
  35135.           database, see String Binding. 
  35136.  
  35137.  Related Information 
  35138.  
  35139.           Routines: 
  35140.           rpc_binding_vector_free 
  35141.           rpc_ep_register 
  35142.           rpc_ep_register_no_replace 
  35143.           rpc_network_is_protseq_valid 
  35144.           rpc_ns_binding_export 
  35145.           rpc_server_inq_bindings 
  35146.           rpc_server_listen 
  35147.           rpc_server_register_if 
  35148.           rpc_server_use_all_protseqs 
  35149.           rpc_server_use_all_protseqs_if 
  35150.           rpc_server_use_protseq_ep 
  35151.           rpc_server_use_protseq_if 
  35152.  
  35153.  
  35154. ΓòÉΓòÉΓòÉ 5.8.114. rpc_server_use_protseq_ep ΓòÉΓòÉΓòÉ
  35155.  
  35156.  Purpose 
  35157.  
  35158.           Tells the RPC runtime to use the specified protocol sequence combined 
  35159.           with the specified endpoint for receiving remote procedure calls. 
  35160.           This routine is used by server applications. 
  35161.  
  35162.  Format 
  35163.  
  35164.                     #include <dce/rpc.h>
  35165.  
  35166.                     void rpc_server_use_protseq_ep(
  35167.                             unsigned_char_t  *protseq ,
  35168.                             unsigned32  max_call_requests,
  35169.                             unsigned_char_t  *endpoint,
  35170.                             unsigned32  *status);
  35171.  
  35172.  Parameters 
  35173.  
  35174.           Input 
  35175.  
  35176.           protseq       Specifies a string identifier for the protocol sequence 
  35177.                         to register with the RPC runtime. See Protocol Sequence 
  35178.                         for a list of string identifiers. 
  35179.  
  35180.           max_call_requests Specifies the maximum number of concurrent remote 
  35181.                         procedure call requests that the server can accept. 
  35182.  
  35183.                         The RPC runtime guarantees that the server can accept 
  35184.                         at least this number of concurrent call requests. The 
  35185.                         actual number of these requests can be greater than the 
  35186.                         value of max_call_requests and can vary for each 
  35187.                         protocol sequence. 
  35188.  
  35189.                         Use the value rpc_c_protseq_max_reqs_default to specify 
  35190.                         the default parameter value. Note that in this version 
  35191.                         of DCE RPC, any number you specify is replaced by the 
  35192.                         default value. 
  35193.  
  35194.                         Also, rpc_server_listen limits (according to its 
  35195.                         max_calls_exec parameter) the amount of concurrent 
  35196.                         remote procedure call execution. See rpc_server_listen 
  35197.                         for more information. 
  35198.  
  35199.           endpoint      Specifies address information for an endpoint. This 
  35200.                         information is used in creating a binding handle for 
  35201.                         the protocol sequence specified in the protseq 
  35202.                         parameter. 
  35203.  
  35204.           Output 
  35205.  
  35206.           status        Returns the status code from this routine. On 
  35207.                         successful completion, the routine returns rpc_s_ok. 
  35208.                         Otherwise, it returns one of the following errors: 
  35209.  
  35210.                              rpc_s_calls_too_large_for_wk_ep The maximum number 
  35211.                                                    of concurrent calls is too 
  35212.                                                    large. 
  35213.  
  35214.                              rpc_s_cant_bind_socket Cannot bind to a socket. 
  35215.  
  35216.                              rpc_s_cant_create_socket Cannot create a socket. 
  35217.  
  35218.                              rpc_s_invalid_endpoint_format The endpoint format 
  35219.                                                    is not valid. 
  35220.  
  35221.                              rpc_s_invalid_rpc_protseq The protocol sequence is 
  35222.                                                    not valid. 
  35223.  
  35224.                              rpc_s_max_descs_exceeded Exceeded the maximum 
  35225.                                                    number of network 
  35226.                                                    descriptors. 
  35227.  
  35228.                              rpc_s_protseq_not_supported The protocol sequence 
  35229.                                                    is not supported on this 
  35230.                                                    host. 
  35231.  
  35232.  Usage 
  35233.  
  35234.           The rpc_server_use_protseq_ep routine registers a protocol sequence 
  35235.           and its specified endpoint address information with the RPC runtime. 
  35236.           A server must register at least one protocol sequence with the RPC 
  35237.           runtime to receive remote procedure call requests. A server can call 
  35238.           this routine multiple times to register additional protocol sequences 
  35239.           and endpoints. 
  35240.  
  35241.           For each protocol sequence registered by a server, the RPC runtime 
  35242.           creates one or more binding handles. Each binding handle contains the 
  35243.           well known endpoint specified in the endpoint parameter. 
  35244.  
  35245.           The max_call_requests parameter allows you to specify the maximum 
  35246.           number of concurrent remote procedure call requests the server 
  35247.           handles. 
  35248.  
  35249.           The explanation of rpc_server_use_all_protseqs contains a list of the 
  35250.           routines a server typically calls after calling this routine. For an 
  35251.           explanation of how a server can establish a client-server 
  35252.           relationship without using the local endpoint map or the name service 
  35253.           database, see String Binding. 
  35254.  
  35255.  Related Information 
  35256.  
  35257.           Routines: 
  35258.           rpc_binding_vector_free 
  35259.           rpc_ep_register 
  35260.           rpc_ep_register_no_replace 
  35261.           rpc_ns_binding_export 
  35262.           rpc_server_inq_bindings 
  35263.           rpc_server_listen 
  35264.           rpc_server_register_if 
  35265.           rpc_server_use_all_protseqs 
  35266.           rpc_server_use_all_protseqs_if 
  35267.           rpc_server_use_protseq 
  35268.  
  35269.  
  35270. ΓòÉΓòÉΓòÉ 5.8.115. rpc_server_use_protseq_if ΓòÉΓòÉΓòÉ
  35271.  
  35272.  Purpose 
  35273.  
  35274.           Tells the RPC runtime to use the specified protocol sequence combined 
  35275.           with the endpoints in the interface specification for receiving 
  35276.           remote procedure calls. This routine is used by server applications. 
  35277.  
  35278.  Format 
  35279.  
  35280.                     #include <dce/rpc.h>
  35281.  
  35282.                     void rpc_server_use_protseq_if(
  35283.                             unsigned_char_t  *protseq,
  35284.                             unsigned32  max_call_requests,
  35285.                             rpc_if_handle_t  if_handle,
  35286.                             unsigned32  *status);
  35287.  
  35288.  Parameters 
  35289.  
  35290.           Input 
  35291.  
  35292.           protseq       Specifies a string identifier for the protocol sequence 
  35293.                         to register with the RPC runtime. See Protocol Sequence 
  35294.                         for a list of string identifiers. 
  35295.  
  35296.           max_call_requests Specifies the maximum number of concurrent remote 
  35297.                         procedure call requests that the server can accept. 
  35298.  
  35299.                         The RPC runtime guarantees that the server can accept 
  35300.                         at least this number of concurrent call requests. The 
  35301.                         actual number of these requests can be greater than the 
  35302.                         value of max_call_requests and can vary for each 
  35303.                         protocol sequence. 
  35304.  
  35305.                         Use the value rpc_c_protseq_max_reqs_default to specify 
  35306.                         the default parameter value. 
  35307.  
  35308.                         Note that in this version of DCE RPC, any number you 
  35309.                         specify is replaced by the default value. 
  35310.  
  35311.                         Also, the rpc_server_listen routine limits (according 
  35312.                         to its max_calls_exec parameter) the amount of 
  35313.                         concurrent remote procedure call execution. See 
  35314.                         rpc_server_listen for more information. 
  35315.  
  35316.           if_handle     Specifies the interface specification whose endpoint 
  35317.                         information is used in creating a binding for the 
  35318.                         protocol sequence specified in the protseq parameter. 
  35319.                         Each created binding handle contains a well-known 
  35320.                         (nondynamic) endpoint contained in the interface 
  35321.                         specification. 
  35322.  
  35323.           Output 
  35324.  
  35325.           status        Returns the status code from this routine. On 
  35326.                         successful completion, the routine returns rpc_s_ok. 
  35327.                         Otherwise, it returns one of the following errors: 
  35328.  
  35329.                              rpc_s_calls_too_large_for_wk_ep The maximum number 
  35330.                                                    of concurrent calls is too 
  35331.                                                    large. 
  35332.  
  35333.                              rpc_s_cant_bind_socket Cannot bind to a socket. 
  35334.  
  35335.                              rpc_s_invalid_endpoint_format The endpoint format 
  35336.                                                    is not valid. 
  35337.  
  35338.                              rpc_s_invalid_rpc_protseq The protocol sequence is 
  35339.                                                    not valid. 
  35340.  
  35341.                              rpc_s_max_descs_exceeded Exceeded the maximum 
  35342.                                                    number of network 
  35343.                                                    descriptors. 
  35344.  
  35345.                              rpc_s_protseq_not_supported The protocol sequence 
  35346.                                                    is not supported on this 
  35347.                                                    host. 
  35348.  
  35349.  Usage 
  35350.  
  35351.           The rpc_server_use_protseq_if routine registers one protocol sequence 
  35352.           with the RPC runtime, including its endpoint address information as 
  35353.           provided in the specified IDL file. 
  35354.  
  35355.           A server must register at least one protocol sequence with the RPC 
  35356.           runtime to receive remote procedure call requests. A server can call 
  35357.           this routine multiple times to register additional protocol 
  35358.           sequences. 
  35359.  
  35360.           For each protocol sequence registered by a server, the RPC runtime 
  35361.           creates one or more binding handles.  Each binding handle contains 
  35362.           the well known endpoint specified in the IDL file. 
  35363.  
  35364.           The max_call_requests parameter allows you to specify the maximum 
  35365.           number of concurrent remote procedure call requests the server 
  35366.           handles. 
  35367.  
  35368.           To register all protocol sequences from the IDL, a server calls 
  35369.           rpc_server_use_all_protseqs_if. 
  35370.  
  35371.           The explanation of rpc_server_use_all_protseqs contains a list of the 
  35372.           routines a server typically calls after calling this routine. 
  35373.           (However, a server that uses only rpc_server_use_protseq_if does not 
  35374.           subsequently call rpc_ep_register or rpc_ep_register_no_replace.) For 
  35375.           an explanation of how a server can establish a client-server 
  35376.           relationship without using the local endpoint map or the name service 
  35377.           database, see String Binding. 
  35378.  
  35379.  Related Information 
  35380.  
  35381.           Routines: 
  35382.           rpc_binding_vector_free 
  35383.           rpc_ep_register 
  35384.           rpc_ep_register_no_replace 
  35385.           rpc_ns_binding_export 
  35386.           rpc_server_inq_bindings 
  35387.           rpc_server_listen 
  35388.           rpc_server_register_if 
  35389.           rpc_server_use_all_protseqs 
  35390.           rpc_server_use_all_protseqs_if 
  35391.           rpc_server_use_protseq 
  35392.           rpc_server_use_protseq_ep 
  35393.  
  35394.  
  35395. ΓòÉΓòÉΓòÉ 5.8.116. rpc_sm_allocate ΓòÉΓòÉΓòÉ
  35396.  
  35397.  Purpose 
  35398.  
  35399.           Allocates memory within the RPC stub memory management scheme. 
  35400.  
  35401.  Format 
  35402.  
  35403.                     #include <rpc.h>
  35404.  
  35405.                     idl_void_p_t rpc_sm_allocate(
  35406.                                unsigned long  size,
  35407.                                unsigned32  *status);
  35408.  
  35409.  Parameters 
  35410.  
  35411.           Input 
  35412.  
  35413.           size          Specifies, in bytes, the size of memory to be 
  35414.                         allocated. 
  35415.  
  35416.           Output 
  35417.  
  35418.           status        Returns the status code from this routine. On 
  35419.                         successful completion, the routine returns rpc_s_ok. 
  35420.                         Otherwise, it returns an error. 
  35421.  
  35422.  Usage 
  35423.  
  35424.           Applications call rpc_sm_allocate to allocate memory within the RPC 
  35425.           stub memory management scheme. Before a call to this routine, the 
  35426.           stub memory management environment must have been established. For 
  35427.           manager code that is called from the stub, the stub itself normally 
  35428.           established the necessary environment. When rpc_sm_allocate is used 
  35429.           by code that is not called from the stub, the application must 
  35430.           establish the required memory management environment by calling 
  35431.           rpc_sm_enable_allocate. 
  35432.  
  35433.           When the stub establishes the memory management environment, the stub 
  35434.           itself frees any memory allocated by rpc_sm_allocate. The application 
  35435.           can free such memory before returning to the calling stub by calling 
  35436.           rpc_sm_free. 
  35437.  
  35438.           When the application establishes the memory management environment, 
  35439.           it must free any memory allocated, either by calling rpc_sm_free or 
  35440.           by calling rpc_sm_disable_allocate. 
  35441.  
  35442.           Multiple threads may call rpc_sm_allocate and rpc_sm_free to manage 
  35443.           the same memory within the stub memory management environment. To do 
  35444.           so the threads must share the same stub memory management thread 
  35445.           handle. Applications pass thread handles from thread to thread by 
  35446.           calling rpc_sm_get_thread_handle and rpc_sm_set_thread_handle. 
  35447.  
  35448.  Related Information 
  35449.  
  35450.           Routines: 
  35451.           rpc_sm_free 
  35452.           rpc_sm_enable_allocate 
  35453.           rpc_sm_disable_allocate 
  35454.           rpc_sm_get_thread_handle 
  35455.           rpc_sm_set_thread_handle 
  35456.  
  35457.  
  35458. ΓòÉΓòÉΓòÉ 5.8.117. rpc_sm_client_free ΓòÉΓòÉΓòÉ
  35459.  
  35460.  Purpose 
  35461.  
  35462.           Frees memory returned from a client stub. 
  35463.  
  35464.  Format 
  35465.  
  35466.                     #include <rpc.h>
  35467.  
  35468.                     void rpc_sm_client_free(
  35469.                             idl_void_p_t  node_to_free,
  35470.                             unsigned32  *status);
  35471.  
  35472.  Parameters 
  35473.  
  35474.           Input 
  35475.  
  35476.           node_to_free  Specifies a pointer to memory returned from a client 
  35477.                         stub. 
  35478.  
  35479.           Output 
  35480.  
  35481.           status        Returns the status code from this routine. On 
  35482.                         successful completion, the routine returns rpc_s_ok. 
  35483.                         Otherwise, it returns an error. 
  35484.  
  35485.  Usage 
  35486.  
  35487.           The rpc_sm_client_free routine releases memory allocated and returned 
  35488.           from a client stub. The thread calling this routine must have the 
  35489.           same thread handle as the thread that made the remote procedure call. 
  35490.           Applications pass thread handles from thread to thread by calling 
  35491.           rpc_sm_get_thread_handle and rpc_sm_set_thread_handle. 
  35492.  
  35493.           This routine enables a routine to deallocate dynamically allocated 
  35494.           memory returned by a remote procedure call without knowledge of the 
  35495.           memory management environment from which it was called. 
  35496.  
  35497.  Related Information 
  35498.  
  35499.           Routines: 
  35500.           rpc_sm_free 
  35501.           rpc_sm_set_client_alloc_free 
  35502.           rpc_sm_swap_client_alloc_free 
  35503.           rpc_sm_get_thread_handle 
  35504.           rpc_sm_set_thread_handle 
  35505.  
  35506.  
  35507. ΓòÉΓòÉΓòÉ 5.8.118. rpc_sm_destroy_client_context ΓòÉΓòÉΓòÉ
  35508.  
  35509.  Purpose 
  35510.  
  35511.           Reclaims the client memory resources for a context handle and sets 
  35512.           the context handle to NULL. 
  35513.  
  35514.  Format 
  35515.  
  35516.                     #include <rpc.h>
  35517.  
  35518.                     void rpc_sm_destroy_client_context(
  35519.                             idl_void_p_t  p_unusable_context_handle,
  35520.                             unsigned32  *status);
  35521.  
  35522.  Parameters 
  35523.  
  35524.           Input 
  35525.  
  35526.           p_unusable_context_handle Specifies the context handle that can no 
  35527.                         longer be accessed. 
  35528.  
  35529.           Output 
  35530.  
  35531.           status        Returns the status code from this routine. On 
  35532.                         successful completion, the routine returns rpc_s_ok. 
  35533.                         Otherwise, it returns an error. 
  35534.  
  35535.  Usage 
  35536.  
  35537.           The rpc_sm_destroy_client_context routine is used by client 
  35538.           applications to reclaim the client resources used in maintaining an 
  35539.           active context handle. Applications call this routine after a 
  35540.           communications error makes the context handle unusable. When the 
  35541.           rpc_sm_destroy_client_context routine reclaims the memory resources, 
  35542.           it also sets the context handle to NULL. 
  35543.  
  35544.  
  35545. ΓòÉΓòÉΓòÉ 5.8.119. rpc_sm_disable_allocate ΓòÉΓòÉΓòÉ
  35546.  
  35547.  Purpose 
  35548.  
  35549.           Releases resources and allocated memory within the stub memory 
  35550.           management scheme. 
  35551.  
  35552.  Format 
  35553.  
  35554.                     #include <rpc.h>
  35555.  
  35556.                     void rpc_sm_disable_allocate(
  35557.                             unsigned32  *status);
  35558.  
  35559.  Parameters 
  35560.  
  35561.           Output 
  35562.  
  35563.           status        Returns the status code from this routine. On 
  35564.                         successful completion, the routine returns rpc_s_ok. 
  35565.                         Otherwise, it returns an error. 
  35566.  
  35567.  Usage 
  35568.  
  35569.           The rpc_sm_disable_allocate routine releases all resources acquired 
  35570.           by a call to rpc_sm_enable_allocate and any memory allocated by calls 
  35571.           to rpc_sm_allocate after the call to rpc_sm_enable_allocate was made. 
  35572.  
  35573.           When the stub establishes the memory management environment, the stub 
  35574.           itself frees any memory allocated by rpc_sm_allocate. The application 
  35575.           can free such memory before returning to the calling stub by calling 
  35576.           rpc_sm_free. 
  35577.  
  35578.           The rpc_sm_enable_allocate and rpc_sm_disable_allocate routines must 
  35579.           be used in matching pairs. 
  35580.  
  35581.  Related Information 
  35582.  
  35583.           Routines: 
  35584.           rpc_sm_enable_allocate 
  35585.           rpc_sm_allocate 
  35586.  
  35587.  
  35588. ΓòÉΓòÉΓòÉ 5.8.120. rpc_sm_enable_allocate ΓòÉΓòÉΓòÉ
  35589.  
  35590.  Purpose 
  35591.  
  35592.           Enables the stub memory management environment. 
  35593.  
  35594.  Format 
  35595.  
  35596.                     #include <rpc.h>
  35597.  
  35598.                     void rpc_sm_enable_allocate(
  35599.                             unsigned32  *status);
  35600.  
  35601.  Parameters 
  35602.  
  35603.           Output 
  35604.  
  35605.           status        Returns the status code from this routine. On 
  35606.                         successful completion, the routine returns rpc_s_ok. 
  35607.                         Otherwise, it returns an error. 
  35608.  
  35609.  Usage 
  35610.  
  35611.           Applications can call rpc_sm_enable_allocate to establish a stub 
  35612.           memory management environment in cases where one is not established 
  35613.           by the stub itself. A stub memory management environment must be 
  35614.           established before any calls are made to rpc_sm_allocate. For server 
  35615.           manager code called from the stub itself, the stub memory management 
  35616.           environment is normally established by the stub itself. Code that is 
  35617.           called from other contexts needs to call rpc_sm_enable_allocate 
  35618.           before calling rpc_sm_allocate. 
  35619.  
  35620.           Note:  For a discussion of how spawned threads acquire a stub memory 
  35621.                  management environment, see the rpc_sm_get_thread_handle and 
  35622.                  rpc_sm_set_thread_handle routines. 
  35623.  
  35624.  Related Information 
  35625.  
  35626.           Routines: 
  35627.           rpc_sm_disable_allocate 
  35628.           rpc_sm_allocate 
  35629.  
  35630.  
  35631. ΓòÉΓòÉΓòÉ 5.8.121. rpc_sm_free ΓòÉΓòÉΓòÉ
  35632.  
  35633.  Purpose 
  35634.  
  35635.           Frees memory allocated by the rpc_sm_allocate routine. 
  35636.  
  35637.  Format 
  35638.  
  35639.                     #include <rpc.h>
  35640.  
  35641.                     void rpc_sm_free(
  35642.                             idl_void_p_t  node_to_free,
  35643.                             unsigned32  *status);
  35644.  
  35645.  Parameters 
  35646.  
  35647.           Input 
  35648.  
  35649.           node_to_free  Specifies a pointer to memory allocated by 
  35650.                         rpc_sm_allocate. 
  35651.  
  35652.           Output 
  35653.  
  35654.           status        Returns the status code from this routine. On 
  35655.                         successful completion, the routine returns rpc_s_ok. 
  35656.                         Otherwise, it returns an error. 
  35657.  
  35658.  Usage 
  35659.  
  35660.           Applications call rpc_sm_free to release memory allocated by 
  35661.           rpc_sm_allocate. 
  35662.  
  35663.           When the stub allocates memory within the stub memory management 
  35664.           environment, manager code called from the stub can also use 
  35665.           rpc_sm_free to release memory allocated by the stub. 
  35666.  
  35667.           The thread calling rpc_sm_free must have the same thread handle as 
  35668.           the thread that allocated the memory with rpc_sm_allocate. 
  35669.           Applications pass thread handles from thread to thread by calling 
  35670.           rpc_sm_get_thread_handle and rpc_sm_set_thread_handle. 
  35671.  
  35672.  Related Information 
  35673.  
  35674.           Routines: 
  35675.           rpc_sm_allocate 
  35676.           rpc_sm_get_thread_handle 
  35677.           rpc_sm_set_thread_handle 
  35678.  
  35679.  
  35680. ΓòÉΓòÉΓòÉ 5.8.122. rpc_sm_get_thread_handle ΓòÉΓòÉΓòÉ
  35681.  
  35682.  Purpose 
  35683.  
  35684.           Gets a thread handle for the stub memory management environment. 
  35685.  
  35686.  Format 
  35687.  
  35688.                     #include <rpc.h>
  35689.  
  35690.                     rpc_sm_thread_handle_t rpc_sm_get_thread_handle(
  35691.                              unsigned32  *status);
  35692.  
  35693.  Parameters 
  35694.  
  35695.           Output 
  35696.  
  35697.           status        Returns the status code from this routine. On 
  35698.                         successful completion, the routine returns rpc_s_ok. 
  35699.                         Otherwise, it returns an error. 
  35700.  
  35701.  Usage 
  35702.  
  35703.           Applications call rpc_sm_get_thread_handle to get a thread handle for 
  35704.           the current stub memory management environment. A thread that is 
  35705.           managing memory within the stub memory management scheme calls 
  35706.           rpc_sm_get_thread_handle to get a thread handle for its current stub 
  35707.           memory management environment. A thread that calls 
  35708.           rpc_sm_set_thread_handle with this handle, is able to use the same 
  35709.           memory management environment. 
  35710.  
  35711.           When multiple threads call rpc_sm_allocate and rpc_sm_free to manage 
  35712.           the same memory, they must share the same thread handle. The thread 
  35713.           that established the stub memory management environment calls 
  35714.           rpc_sm_get_thread_handle to get a thread handle before spawning new 
  35715.           threads that manage the same memory. The spawned threads then call 
  35716.           rpc_sm_set_thread_handle with the handle provided by the parent 
  35717.           thread. 
  35718.  
  35719.           Application Note: Typically, rpc_sm_get_thread_handle is called by a 
  35720.                      server manager routine before it spawns additional 
  35721.                      threads.  Normally, the stub sets up the memory management 
  35722.                      environment for the manager routine.  The manager calls 
  35723.                      rpc_sm_get_thread_handle to make this environment 
  35724.                      available to the spawned threads. 
  35725.  
  35726.                      A thread can also use rpc_sm_get_thread_handle and 
  35727.                      rpc_sm_set_thread_handle to save and restore its memory 
  35728.                      management environment. 
  35729.  
  35730.  Return Codes 
  35731.  
  35732.           This routine returns a thread handle to the rpc_sm_thread_handle_t 
  35733.           variable. 
  35734.  
  35735.  Related Information 
  35736.  
  35737.           Routines: 
  35738.           rpc_sm_allocate 
  35739.           rpc_sm_free 
  35740.           rpc_sm_set_thread_handle 
  35741.  
  35742.  
  35743. ΓòÉΓòÉΓòÉ 5.8.123. rpc_sm_set_client_alloc_free ΓòÉΓòÉΓòÉ
  35744.  
  35745.  Purpose 
  35746.  
  35747.           Sets the memory allocation and freeing mechanisms used by the client 
  35748.           stubs. 
  35749.  
  35750.  Format 
  35751.  
  35752.                     #include <rpc.h>
  35753.  
  35754.                     void rpc_sm_set_client_alloc_free (
  35755.                             idl_void_p_t (*p_allocate) (        unsigned long size),
  35756.                             void (p_free) (        idl_void_p_t ptr),
  35757.                             unsigned32  *status),
  35758.  
  35759.  Parameters 
  35760.  
  35761.           Input 
  35762.  
  35763.           p_allocate    Specifies a memory allocator routine. 
  35764.  
  35765.           p_free        Specifies a memory freeing routine. This routine is 
  35766.                         used to free memory allocated with the routine 
  35767.                         specified by p_allocate. 
  35768.  
  35769.           Output 
  35770.  
  35771.           status        Returns the status code from this routine. On 
  35772.                         successful completion, the routine returns rpc_s_ok. 
  35773.                         Otherwise, it returns an error. 
  35774.  
  35775.  Usage 
  35776.  
  35777.           The rpc_sm_set_client_alloc_free routine overrides the default 
  35778.           routines that the client stub uses to manage memory. 
  35779.  
  35780.           Application Note: The default memory management routines are ISO 
  35781.                      malloc and ISO free, except when the remote call occurs 
  35782.                      within manager code; in which case, the default memory 
  35783.                      management routines are rpc_sm_allocate and rpc_sm_free. 
  35784.  
  35785.  Related Information 
  35786.  
  35787.           Routines: 
  35788.           rpc_sm_allocate 
  35789.           rpc_sm_free 
  35790.  
  35791.  
  35792. ΓòÉΓòÉΓòÉ 5.8.124. rpc_sm_set_thread_handle ΓòÉΓòÉΓòÉ
  35793.  
  35794.  Purpose 
  35795.  
  35796.           Sets a thread handle for the stub memory management environment. 
  35797.  
  35798.  Format 
  35799.  
  35800.                     #include <rpc.h>
  35801.  
  35802.                     void rpc_sm_set_thread_handle (
  35803.                             rpc_sm_thread_handle_t  id,
  35804.                             unsigned32  *status),
  35805.  
  35806.  Parameters 
  35807.  
  35808.           Input 
  35809.  
  35810.           id            Specifies a thread handle returned by a call to 
  35811.                         rpc_sm_set_thread_handle. 
  35812.  
  35813.           Output 
  35814.  
  35815.           status        Returns the status code from this routine. On 
  35816.                         successful completion, the routine returns rpc_s_ok. 
  35817.                         Otherwise, it returns an error. 
  35818.  
  35819.  Usage 
  35820.  
  35821.           An application thread calls rpc_sm_set_thread_handle to set a thread 
  35822.           handle for memory management within the stub memory management 
  35823.           environment. A thread that is managing memory within the stub memory 
  35824.           management scheme calls rpc_sm_get_thread_handle to get a thread 
  35825.           handle for its current stub memory management environment. A thread 
  35826.           that calls rpc_sm_set_thread_handle with this handle is able to use 
  35827.           the same memory management environment. 
  35828.  
  35829.           When multiple threads call rpc_sm_allocate and rpc_sm_free to manage 
  35830.           the same memory, they must share the same thread handle. The thread 
  35831.           that established the stub memory management environment calls 
  35832.           rpc_sm_get_thread_handle to get a thread handle before spawning new 
  35833.           threads that will manage the same memory. The spawned threads then 
  35834.           call rpc_sm_set_thread_handle with the handle provided by the parent 
  35835.           thread. 
  35836.  
  35837.           Application Note: Typically, rpc_sm_set_thread_handle is called by a 
  35838.                      thread spawned by a server manager routine. Normally, the 
  35839.                      stub sets up the memory management environment for the 
  35840.                      manager routine and the manager calls 
  35841.                      rpc_sm_get_thread_handle to get a thread handle. Each 
  35842.                      spawned thread then calls rpc_sm_get_thread_handle to get 
  35843.                      access to the manager's memory management environment. 
  35844.  
  35845.                      A thread can also use rpc_sm_get_thread_handle and 
  35846.                      rpc_sm_set_thread_handle to save and restore its memory 
  35847.                      management environment. 
  35848.  
  35849.  Related Information 
  35850.  
  35851.           Routines: 
  35852.           rpc_sm_get_thread_handle 
  35853.           rpc_sm_allocate 
  35854.           rpc_sm_free 
  35855.  
  35856.  
  35857. ΓòÉΓòÉΓòÉ 5.8.125. rpc_sm_swap_client_alloc_free ΓòÉΓòÉΓòÉ
  35858.  
  35859.  Purpose 
  35860.  
  35861.           Exchanges the current memory allocation and freeing mechanism used by 
  35862.           the client stubs with one supplied by the client. 
  35863.  
  35864.  Format 
  35865.  
  35866.                     #include <rpc.h>
  35867.  
  35868.                     void rpc_sm_swap_client_alloc_free
  35869.                             idl_void_p_t (*p_allocate) (        unsigned long size),
  35870.                             void (p_free) (idl_void_p_t ptr)
  35871.                             idl_void_p_t  (**p_p_old_allocate) (unsigned long size),
  35872.                             void  (**p_p_old_free) (        idl_void_p_t  ptr)
  35873.                             unsigned32  *status),
  35874.  
  35875.  Parameters 
  35876.  
  35877.           Input 
  35878.  
  35879.           p_allocate    Specifies a new memory allocation routine. 
  35880.  
  35881.           p_free        Specifies a new memory freeing routine. 
  35882.  
  35883.           Output 
  35884.  
  35885.           p_p_old_allocate Returns the memory allocation routine in use before 
  35886.                         the call to this routine. 
  35887.  
  35888.           p_p_old_free  Returns the memory freeing routine in use before the 
  35889.                         call to this routine. 
  35890.  
  35891.           status        Returns the status code from this routine. On 
  35892.                         successful completion, the routine returns rpc_s_ok. 
  35893.                         Otherwise, it returns an error. 
  35894.  
  35895.  Usage 
  35896.  
  35897.           The rpc_sm_swap_client_alloc_free routine exchanges the current 
  35898.           allocating and freeing mechanisms used by the client stubs for 
  35899.           routines supplied by the caller. 
  35900.  
  35901.  Related Information 
  35902.  
  35903.           Routines: 
  35904.           rpc_sm_allocate 
  35905.           rpc_sm_free 
  35906.           rpc_sm_set_client_alloc_free 
  35907.  
  35908.  
  35909. ΓòÉΓòÉΓòÉ 5.8.126. rpc_ss_allocate ΓòÉΓòÉΓòÉ
  35910.  
  35911.  Purpose 
  35912.  
  35913.           Allocates memory within the RPC stub memory management scheme. This 
  35914.           routine is used by server or possibly by client applications. 
  35915.  
  35916.  Format 
  35917.  
  35918.                     #include <dce/rpc.h>
  35919.  
  35920.                     idl_void_p_t rpc_ss_allocate (idl_size_t size);
  35921.  
  35922.  Parameters 
  35923.  
  35924.           Input 
  35925.  
  35926.           size          Specifies, in bytes, the size of memory to be 
  35927.                         allocated. Note that in ANSI standard C environments, 
  35928.                         idl_void_p_t is defined as void * and in other 
  35929.                         environments is defined as char *. 
  35930.  
  35931.  Usage 
  35932.  
  35933.           Usually, the rpc_ss_allocate routine is used in the manager code that 
  35934.           is called from a server stub. Memory allocated by rpc_ss_allocate is 
  35935.           released by the server stub after marshalling any output parameters 
  35936.           at the end of the remote call in which the memory was allocated. If 
  35937.           you want to release memory allocated by rpc_ss_allocate before 
  35938.           returning from the manager code, use rpc_ss_free. 
  35939.  
  35940.           You can also use rpc_ss_free in manager code to release memory 
  35941.           pointed to by a full pointer (ptr) in an input parameter. 
  35942.  
  35943.           When the server uses rpc_ss_allocate, the server stub creates the 
  35944.           environment the routine needs. If the parameters of the operation 
  35945.           include any pointers other than those used for passing parameters by 
  35946.           reference, the environment is set up automatically. 
  35947.  
  35948.           If you need to use rpc_ss_allocate in a manager code routine that 
  35949.           does not have a pointer in any of its parameters, use an ACF and 
  35950.           apply the enable_allocate attribute to the relevant operation. This 
  35951.           causes the generated server stub to set up the necessary environment. 
  35952.           Note that memory allocated by allocators other than rpc_ss_allocate 
  35953.           is not released when the operation on the server side finishes 
  35954.           running. 
  35955.  
  35956.           If you want to use rpc_ss_allocate outside the code called from a 
  35957.           server stub, you must first create an environment for it by calling 
  35958.           rpc_ss_enable_allocate. 
  35959.  
  35960.           See the DCE for OS/2 Warp: Application Development Guide - Core 
  35961.           Components for more information. 
  35962.  
  35963.  Related Information 
  35964.  
  35965.           Routines: 
  35966.           rpc_ss_free 
  35967.           rpc_ss_enable_allocate 
  35968.           rpc_ss_disable_allocate 
  35969.           rpc_ss_get_thread_handle 
  35970.           rpc_ss_set_thread_handle 
  35971.  
  35972.  
  35973. ΓòÉΓòÉΓòÉ 5.8.127. rpc_ss_bind_authn_client ΓòÉΓòÉΓòÉ
  35974.  
  35975.  Purpose 
  35976.  
  35977.           Authenticates a client's identity to a server from a client stub. 
  35978.  
  35979.  Format 
  35980.  
  35981.                     #include <rpc.h>
  35982.  
  35983.                     void rpc_ss_bind_authn_client(
  35984.                             rpc_binding_handle_t  *binding,
  35985.                             if_handle_t  if_handle,
  35986.                             error_status_t  *status);
  35987.  
  35988.  Parameters 
  35989.  
  35990.           Input/Output 
  35991.  
  35992.           binding       A pointer to the server binding handle for the remote 
  35993.                         procedure call where the routine adds authentication 
  35994.                         and authorization context. 
  35995.  
  35996.           Input 
  35997.  
  35998.           if_handle     A stub-generated data structure that specifies the 
  35999.                         interface of interest. The routine can use this 
  36000.                         parameter to resolve a partial binding or to 
  36001.                         distinguish between interfaces. 
  36002.  
  36003.           Output 
  36004.  
  36005.           status        Returns the status code from this routine. On 
  36006.                         successful completion, the routine returns rpc_s_ok. 
  36007.                         Otherwise, it returns rpc_s_no_more_bindings, which 
  36008.                         directs the client stub not to look for another server 
  36009.                         binding. 
  36010.  
  36011.  Usage 
  36012.  
  36013.           The rpc_ss_bind_authn_client routine is a DCE-supplied binding 
  36014.           callout routine for use with the binding_callout ACF interface 
  36015.           attribute. 
  36016.  
  36017.           The binding_callout attribute enables applications to specify the 
  36018.           name of a routine that the client stub calls automatically to modify 
  36019.           a server binding handle with additional information before it 
  36020.           initiates a remote procedure call. This attribute is especially 
  36021.           useful for applications using the automatic binding method, where it 
  36022.           is the client stub that obtains the binding handle, rather than the 
  36023.           application code. The binding_callout attribute provides these 
  36024.           applications with a way to gain access to a server binding handle 
  36025.           from the client stub, because the handle is not accessible from the 
  36026.           application code. 
  36027.  
  36028.           Applications can specify rpc_ss_bind_authn_client to the 
  36029.           binding_callout ACF interface attribute in order to authenticate the 
  36030.           client's identity to a server from the client stub before the remote 
  36031.           procedure call to the server is initiated. This routine performs 
  36032.           one-way authentication: the client does not care which server 
  36033.           principal receives the remote procedure call request, but the server 
  36034.           verifies that the client is who the client claims to be. 
  36035.  
  36036.           The routine sets the protection level used, the authentication 
  36037.           identity, and the authentication service used to their default 
  36038.           values; see the rpc_binding_set_auth_info routine for more 
  36039.           information on these default values. It sets the authorization 
  36040.           service to perform authorization based on the client's principal 
  36041.           name. 
  36042.  
  36043.           Applications can also specify user-written binding callout routines 
  36044.           with the binding_callout attribute to modify server binding handles 
  36045.           from client stubs with other types of information. See the DCE for 
  36046.           OS/2 Warp: Application Development Guide - Core Components for more 
  36047.           information on using the binding_callout ACF attribute. 
  36048.  
  36049.  Related Information 
  36050.  
  36051.           Routines: 
  36052.           rpc_binding_set_auth_info 
  36053.           rpc_ep_resolve_binding 
  36054.           rpc_mgmt_inq_server_princ_name 
  36055.  
  36056.  
  36057. ΓòÉΓòÉΓòÉ 5.8.128. rpc_ss_client_free ΓòÉΓòÉΓòÉ
  36058.  
  36059.  Purpose 
  36060.  
  36061.           Frees memory returned from a client stub. This routine is used by 
  36062.           client applications. 
  36063.  
  36064.  Format 
  36065.  
  36066.                     #include <dce/rpc.h>
  36067.  
  36068.                              void_rpc_ss_client_free (         idl_void_p_t  node_to_free);
  36069.  
  36070.  Parameters 
  36071.  
  36072.           Input 
  36073.  
  36074.           node_to_free  Identifies a pointer to memory returned from a client 
  36075.                         stub. 
  36076.  
  36077.  Usage 
  36078.  
  36079.           The rpc_ss_client_free routine releases memory allocated and returned 
  36080.           from a client stub. The thread calling rpc_ss_client_free must have 
  36081.           the same thread handle as the thread that made the remote procedure 
  36082.           call. 
  36083.  
  36084.           This routine enables a routine to deallocate dynamically allocated 
  36085.           memory returned by a remote procedure call without knowledge of the 
  36086.           memory management environment from which it was called. 
  36087.  
  36088.  Related Information 
  36089.  
  36090.           Routines: 
  36091.           rpc_ss_free 
  36092.           rpc_ss_get_thread_handle 
  36093.           rpc_ss_set_client_alloc_free 
  36094.           rpc_ss_set_thread_handle 
  36095.           rpc_ss_swap_client_alloc_free 
  36096.  
  36097.  
  36098. ΓòÉΓòÉΓòÉ 5.8.129. rpc_ss_destroy_client_context ΓòÉΓòÉΓòÉ
  36099.  
  36100.  Purpose 
  36101.  
  36102.           Reclaims the client memory resources for the context handle and sets 
  36103.           the context handle to NULL. This routine is used by client 
  36104.           applications. 
  36105.  
  36106.  Format 
  36107.  
  36108.                     #include <dce/rpc.h>
  36109.  
  36110.                     void rpc_ss_destroy_client_context(void  *p_unusable_context_handle);
  36111.  
  36112.  Parameters 
  36113.  
  36114.           Input 
  36115.  
  36116.           p_unusable_context_handle Specifies the context handle that can no 
  36117.                         longer be accessed. 
  36118.  
  36119.  Usage 
  36120.  
  36121.           The rpc_ss_destroy_client_context routine is used by the client 
  36122.           application to reclaim the client resources used in maintaining an 
  36123.           active context handle. Call this only after a communications error 
  36124.           makes the context handle unusable. When rpc_ss_destroy_client_context 
  36125.           reclaims the memory resources, it also sets the context handle to 
  36126.           NULL. 
  36127.  
  36128.           The rpc_ss_destroy_client_context routine raises no exceptions. 
  36129.  
  36130.  
  36131. ΓòÉΓòÉΓòÉ 5.8.130. rpc_ss_disable_allocate ΓòÉΓòÉΓòÉ
  36132.  
  36133.  Purpose 
  36134.  
  36135.           Releases resources and allocated memory. This routine is used by 
  36136.           client applications. 
  36137.  
  36138.  Format 
  36139.  
  36140.                     #include <dce/rpc.h>
  36141.  
  36142.                     void rpc_ss_disable_allocate (void);
  36143.  
  36144.  Usage 
  36145.  
  36146.           The rpc_ss_disable_allocate routine releases (disables) all resources 
  36147.           acquired by a call to rpc_ss_enable_allocate, and any memory 
  36148.           allocated by calls to rpc_ss_allocate after the call to 
  36149.           rpc_ss_enable_allocate was made. 
  36150.  
  36151.           The rpc_ss_enable_allocate and rpc_ss_disable_allocate routines must 
  36152.           be used in matching pairs. 
  36153.  
  36154.           For information about rules for using memory management routines, see 
  36155.           the DCE for OS/2 Warp: Application Development Guide - Core 
  36156.           Components. 
  36157.  
  36158.  Related Information 
  36159.  
  36160.           Routines: 
  36161.           rpc_ss_allocate 
  36162.           rpc_ss_enable_allocate 
  36163.  
  36164.           Book: 
  36165.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  36166.  
  36167.  
  36168. ΓòÉΓòÉΓòÉ 5.8.131. rpc_ss_enable_allocate ΓòÉΓòÉΓòÉ
  36169.  
  36170.  Purpose 
  36171.  
  36172.           Enables the allocation of memory by rpc_ss_allocate when not in 
  36173.           manager code. This routine is used by client applications. 
  36174.  
  36175.  Format 
  36176.  
  36177.                     #include <dce/rpc.h>
  36178.  
  36179.                     void rpc_ss_enable_allocate(void);
  36180.  
  36181.  Usage 
  36182.  
  36183.           In sophisticated servers, it may be necessary to call manager code 
  36184.           routines from different environments. This occurs, for example, when 
  36185.           the application is both a client and a server of the same interface. 
  36186.           Therefore, a manager code routine may need to be called both by the 
  36187.           application code and by the stub code. If code, other than manager 
  36188.           code, calls rpc_ss_allocate it must first call rpc_ss_enable_allocate 
  36189.           to initialize the memory management environment that rpc_ss_allocate 
  36190.           uses. 
  36191.  
  36192.           For information about rules for using memory management routines, see 
  36193.           the DCE for OS/2 Warp: Application Development Guide - Core 
  36194.           Components. 
  36195.  
  36196.  Return Codes 
  36197.  
  36198.           An exception, rpc_x_no_memory, when there is insufficient memory 
  36199.           available to set up necessary data structures. 
  36200.  
  36201.  Related Information 
  36202.  
  36203.           Routines: 
  36204.           rpc_ss_allocate 
  36205.           rpc_ss_disable_allocate 
  36206.  
  36207.           Books: 
  36208.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  36209.  
  36210.  
  36211. ΓòÉΓòÉΓòÉ 5.8.132. rpc_ss_free ΓòÉΓòÉΓòÉ
  36212.  
  36213.  Purpose 
  36214.  
  36215.           Frees memory allocated by rpc_ss_allocate. This routine is used by 
  36216.           server or possibly by client applications. 
  36217.  
  36218.  Format 
  36219.  
  36220.                     #include <dce/rpc.h>
  36221.  
  36222.                     void rpc_ss_free (idl_void_p_t  node_to_free);
  36223.  
  36224.  Parameters 
  36225.  
  36226.           Input 
  36227.  
  36228.           node_to_free  Specifies a pointer to memory allocated by 
  36229.                         rpc_ss_allocate. 
  36230.  
  36231.           Note that in ANSI standard C environments, idl_void_p_t is defined as 
  36232.           void * and in other environments is defined as char *. 
  36233.  
  36234.  Usage 
  36235.  
  36236.           This routine releases memory allocated by rpc_ss_allocate. The thread 
  36237.           calling rpc_ss_free must have the same thread handle as the thread 
  36238.           that allocated the memory with rpc_ss_allocate. Use it only in an 
  36239.           environment where rpc_ss_allocate is used. 
  36240.  
  36241.           If the manager code allocates memory with rpc_ss_allocate and the 
  36242.           memory is not released by rpc_ss_free during the running of the 
  36243.           manager code, the server stub automatically releases the memory when 
  36244.           the manager code finishes running and returns control to the stub. 
  36245.  
  36246.           Manager code can also use rpc_ss_free to release memory that is 
  36247.           pointed to by a full pointer in an input parameter. 
  36248.  
  36249.           For information about rules for using memory management routines, see 
  36250.           DCE for OS/2 Warp: Application Development Guide - Core Components. 
  36251.  
  36252.  Related Information 
  36253.  
  36254.           Routines: 
  36255.           rpc_ss_allocate 
  36256.           rpc_ss_get_thread_handle 
  36257.           rpc_ss_set_thread_handle 
  36258.  
  36259.           Book: 
  36260.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  36261.  
  36262.  
  36263. ΓòÉΓòÉΓòÉ 5.8.133. rpc_ss_get_thread_handle ΓòÉΓòÉΓòÉ
  36264.  
  36265.  Purpose 
  36266.  
  36267.           Gets a thread handle for the manager code before it spawns additional 
  36268.           threads or for the client code when it becomes a server. This routine 
  36269.           is used by server or possibly by client applications. 
  36270.  
  36271.  Format 
  36272.  
  36273.                     #include <dce/rpc.h>
  36274.  
  36275.                     rpc_ss_thread_handle_t  rpc_ss_get_thread_handle(void);
  36276.  
  36277.  Usage 
  36278.  
  36279.           The rpc_ss_get_thread_handle routine is used by a server manager 
  36280.           thread when it spawns additional threads. To spawn additional threads 
  36281.           that are able to perform memory management, the server manager code 
  36282.           calls rpc_ss_get_thread_handle and passes the thread handle to each 
  36283.           spawned thread. Each spawned thread that uses the rpc_ss_allocate and 
  36284.           rpc_ss_free for memory management must first call the 
  36285.           rpc_ss_set_thread_handle routine, using the handle obtained by the 
  36286.           original manager thread. 
  36287.  
  36288.           The rpc_ss_get_thread_handle routine can also be used when a program 
  36289.           changes from being a client to being a server. The program gets a 
  36290.           handle on its environment as a client by calling 
  36291.           rpc_ss_get_thread_handle. When the program reverts to being a client 
  36292.           it reestablishes the client environment by calling 
  36293.           rpc_ss_set_thread_handle, supplying the previously obtained handle as 
  36294.           a parameter. 
  36295.  
  36296.  Return Codes 
  36297.  
  36298.           This routine returns a thread handle to the rpc_sm_thread_handle_t 
  36299.           variable. 
  36300.  
  36301.  Example 
  36302.  
  36303.           This routine determines the thread handle, creates a thread, and 
  36304.           passes the thread handle to the thread so it can share the memory 
  36305.           management environment of the calling thread. 
  36306.  
  36307.                     #include <pthread.h>
  36308.                     #include <idlbase.h>
  36309.  
  36310.                     pthread_t Launch_thread(
  36311.                         int (*routine_to_launch)(
  36312.                            pthread_addr_t th
  36313.                            )
  36314.                         )
  36315.                     {
  36316.                         rpc_ss_thread_handle_t th = rpc_ss_get_thread_handle;
  36317.                         pthread_t t;
  36318.  
  36319.                         /*
  36320.                          * Create the thread and pass to it the thread handle
  36321.                          * so it can use rpc_ss_set_thread_handle.
  36322.                          */
  36323.                         pthread_create (&t, pthread_attr_default,
  36324.                             (pthread_startroutine_t)routine_to_launch,
  36325.                             (pthread_addr_t)th);
  36326.  
  36327.                         return t;
  36328.                     }
  36329.  
  36330.  Related Information 
  36331.  
  36332.           Routines: 
  36333.           rpc_ss_allocate 
  36334.           rpc_ss_free 
  36335.           rpc_ss_set_thread_handle 
  36336.  
  36337.  
  36338. ΓòÉΓòÉΓòÉ 5.8.134. rpc_ss_set_client_alloc_free ΓòÉΓòÉΓòÉ
  36339.  
  36340.  Purpose 
  36341.  
  36342.           Sets the memory allocation and freeing mechanism used by the client 
  36343.           stubs, which overrides the default routines the client stub uses to 
  36344.           manage memory for pointed-to nodes. This routine is used by client 
  36345.           applications. 
  36346.  
  36347.  Format 
  36348.  
  36349.                     #include <dce/rpc.h>
  36350.  
  36351.                     void rpc_ss_set_client_alloc_free(
  36352.                             idl_void_p_t  (*p_allocate) (        idl_size_t  size),
  36353.                             void  (*p_free) (idl_void_p_t  ptr)
  36354.                             );
  36355.  
  36356.  Parameters 
  36357.  
  36358.           Input 
  36359.  
  36360.           p_allocate    Specifies a pointer to a routine that has the same 
  36361.                         procedure declaration as the C language malloc routine 
  36362.                         and that is used by the client stub to allocate memory. 
  36363.  
  36364.           p_free        Specifies a pointer to a routine that has the same 
  36365.                         procedure declaration as the C language free routine 
  36366.                         and that is used to free memory that was allocated 
  36367.                         using the routine pointed at by p_allocate. 
  36368.           Note that in ANSI standard C environments, idl_void_p_t is defined as 
  36369.           void * and in other environments is defined as char *.) 
  36370.  
  36371.  Usage 
  36372.  
  36373.           The rpc_ss_set_client_alloc_free routine overrides the default 
  36374.           routines that the client stub uses to manage memory for pointed-to 
  36375.           nodes. The default memory management routines are malloc and free, 
  36376.           except when the remote call occurs within manager code; in which 
  36377.           case, the default memory management routines are rpc_ss_allocate and 
  36378.           rpc_ss_free. 
  36379.  
  36380.           For information about rules for using memory management routines, see 
  36381.           the DCE for OS/2 Warp: Application Development Guide - Core 
  36382.           Components. 
  36383.  
  36384.  Return Codes 
  36385.  
  36386.           This routine returns an exception, rpc_x_no_memory, when there is 
  36387.           insufficient memory available to set up necessary data structures. 
  36388.  
  36389.  Related Information 
  36390.  
  36391.           Routines: 
  36392.           rpc_ss_allocate 
  36393.           rpc_ss_free 
  36394.  
  36395.           Books: 
  36396.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  36397.  
  36398.  
  36399. ΓòÉΓòÉΓòÉ 5.8.135. rpc_ss_set_thread_handle ΓòÉΓòÉΓòÉ
  36400.  
  36401.  Purpose 
  36402.  
  36403.           Sets the thread handle for either a newly created spawned thread or 
  36404.           for a server that was formerly a client and is ready to be a client 
  36405.           again. This routine is used by server or possibly by client 
  36406.           applications. 
  36407.  
  36408.  Format 
  36409.  
  36410.                     #include <dce/rpc.h>
  36411.  
  36412.                     void rpc_ss_set_thread_handle (
  36413.                             rpc_ss_thread_handle_t  id);
  36414.  
  36415.  Parameters 
  36416.  
  36417.           Input 
  36418.  
  36419.           id            A thread handle returned by a call to 
  36420.                         rpc_ss_get_thread_handle. 
  36421.  
  36422.  Usage 
  36423.  
  36424.           The rpc_ss_set_thread_handle routine is used by a thread spawned in 
  36425.           the manager code to associate itself with the main RPC manager 
  36426.           thread. Each spawned thread that uses rpc_ss_allocate and rpc_ss_free 
  36427.           for memory management must call rpc_ss_set_thread_handle, using the 
  36428.           handle that the main RPC manager thread obtained through 
  36429.           rpc_ss_get_thread_handle. 
  36430.  
  36431.           The rpc_ss_set_thread_handle routine can also be used by a program 
  36432.           that originally was a client, then became a server, and is now 
  36433.           reverting to a client. The program must re-establish the client 
  36434.           environment by calling rpc_ss_set_thread_handle, and by supplying the 
  36435.           handle it received (through rpc_ss_get_thread_handle) prior to 
  36436.           becoming a server as a parameter. 
  36437.  
  36438.  Return Codes 
  36439.  
  36440.           This routine returns an exception, rpc_x_no_memory, when there is 
  36441.           insufficient memory available to set up necessary data structures. 
  36442.  
  36443.  Examples 
  36444.  
  36445.           When this routine is invoked within a spawned thread, its parameter 
  36446.           is the thread handle of the calling thread. This example assumes the 
  36447.           data passed to the thread consists of only the middle thread. 
  36448.  
  36449.                     #include <pthread.h>
  36450.                     #include <dce/idlbase.h>
  36451.  
  36452.                     int helper_thread (
  36453.                          pthread_addr_t th
  36454.                          )
  36455.                     {
  36456.                          /*
  36457.                           * Set the memory management environment to match the parent environment.
  36458.                           */
  36459.  
  36460.                           rpc_ss_set_thread_handle(rpc_ss_thread_handle_t)th;
  36461.                          /*
  36462.                           * Real work of this thread follows here ...
  36463.                           */
  36464.                     }
  36465.  
  36466.  Related Information 
  36467.  
  36468.           Routines: 
  36469.  
  36470.  
  36471.           rpc_ss_get_thread_handle 
  36472.           rpc_ss_allocate 
  36473.           rpc_ss_free 
  36474.  
  36475.           Book: 
  36476.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  36477.  
  36478.  
  36479. ΓòÉΓòÉΓòÉ 5.8.136. rpc_ss_swap_client_alloc_free ΓòÉΓòÉΓòÉ
  36480.  
  36481.  Purpose 
  36482.  
  36483.           Exchanges the current memory allocation and freeing mechanism used by 
  36484.           the client stubs with one supplied by the client. This routine is 
  36485.           used by client applications. 
  36486.  
  36487.  Format 
  36488.  
  36489.                     #include <dce/rpc.h>
  36490.  
  36491.                     void rpc_ss_swap_client_alloc_free (
  36492.                             idl_void_p_t  (* p_allocate) (        idl_size_t  size),
  36493.                             void  (*p_free) (idl_void_p_t  ptr),
  36494.                             idl_void_p_t  (**p_p_old_allocate) (idl_size_t  size),
  36495.                             void  (**p_p_old_free) (idl_void_p_t  ptr)
  36496.                             );
  36497.  
  36498.  Parameters 
  36499.  
  36500.           Input 
  36501.  
  36502.           p_allocate    Specifies a pointer to a routine that has the same 
  36503.                         procedure declaration as the malloc routine and that is 
  36504.                         used for allocating client stub memory. 
  36505.  
  36506.           p_free        Specifies a pointer to a routine that has the same 
  36507.                         procedure declaration as the free routine and that is 
  36508.                         used for freeing client stub memory. 
  36509.  
  36510.           Output 
  36511.  
  36512.           p_p_old_allocate Specifies a pointer to a pointer to a routine that 
  36513.                         has the same procedure declaration as the malloc 
  36514.                         routine. A pointer to the routine that was previously 
  36515.                         used to allocate client stub memory is returned in this 
  36516.                         parameter. 
  36517.  
  36518.           p_p_old_free  Specifies a pointer to a pointer to a routine that has 
  36519.                         the same procedure declaration as the free routine. A 
  36520.                         pointer to the routine that was previously used to free 
  36521.                         client stub memory is returned in this parameter. 
  36522.  
  36523.           Note that in ANSI standard C environments, idl_void_p_t is defined as 
  36524.           void * and in other environments is defined as char *. 
  36525.  
  36526.  Usage 
  36527.  
  36528.           The rpc_ss_swap_client_alloc_free routine exchanges the current 
  36529.           client allocating and freeing mechanism used by the client stubs for 
  36530.           one supplied by the caller. If it is appropriate for the client code 
  36531.           called by an application to use a certain memory allocation and 
  36532.           freeing mechanism, regardless of its caller's state, the client code 
  36533.           can swap its own mechanism into place on entry, replacing its 
  36534.           caller's mechanism. It can then swap the caller's mechanism back into 
  36535.           place prior to returning. 
  36536.  
  36537.           See the DCE for OS/2 Warp: Application Development Guide - Core 
  36538.           Components. 
  36539.  
  36540.  Return Codes 
  36541.  
  36542.           This routine returns an exception, rpc_x_no_memory, when there is 
  36543.           insufficient memory available to set up necessary data structures. 
  36544.  
  36545.  Related Information 
  36546.  
  36547.           Routines: 
  36548.           rpc_ss_allocate 
  36549.           rpc_ss_free 
  36550.           rpc_ss_set_client_alloc_free 
  36551.  
  36552.           Book: 
  36553.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  36554.  
  36555.  
  36556. ΓòÉΓòÉΓòÉ 5.8.137. rpc_string_binding_compose ΓòÉΓòÉΓòÉ
  36557.  
  36558.  Purpose 
  36559.  
  36560.           Combines the components of a string binding into a string binding. 
  36561.           This routine is used by client or server applications. 
  36562.  
  36563.  Format 
  36564.  
  36565.                     #include <dce/rpc.h>
  36566.  
  36567.                     void rpc_string_binding_compose(
  36568.                             unsigned_char_t  *obj_uuid,
  36569.                             unsigned_char_t  *protseq,
  36570.                             unsigned_char_t  *network_addr,
  36571.                             unsigned_char_t  *endpoint,
  36572.                             unsigned_char_t  *options,
  36573.                             unsigned_char_t  **string_binding,
  36574.                             unsigned32  *status );
  36575.  
  36576.  Parameters 
  36577.  
  36578.           Input 
  36579.  
  36580.           obj_uuid      Specifies a NULL-terminated string representation of an 
  36581.                         object UUID. 
  36582.  
  36583.           protseq       Specifies a NULL-terminated string representation of a 
  36584.                         protocol sequence. 
  36585.  
  36586.           network_addr  Specifies a NULL-terminated string representation of a 
  36587.                         network address. 
  36588.  
  36589.           endpoint      Specifies a NULL-terminated string representation of an 
  36590.                         endpoint. 
  36591.  
  36592.           options       Specifies a NULL-terminated string representation of 
  36593.                         network options. 
  36594.  
  36595.           Output 
  36596.  
  36597.           string_binding Returns a pointer to a NULL-terminated string 
  36598.                         representation of a binding handle. 
  36599.  
  36600.                         Specify NULL to prevent the routine from returning this 
  36601.                         parameter. In this case, the application does not call 
  36602.                         rpc_string_free. 
  36603.  
  36604.           status        Returns the status code from this routine. On 
  36605.                         successful completion, the routine returns rpc_s_ok. 
  36606.                         Otherwise, it returns an error. 
  36607.  
  36608.  Usage 
  36609.  
  36610.           The rpc_string_binding_compose routine combines string binding handle 
  36611.           components into a string binding handle. 
  36612.  
  36613.           The RPC runtime allocates memory for the string returned in the 
  36614.           string_binding parameter. The application calls rpc_string_free to 
  36615.           deallocate that memory. 
  36616.  
  36617.           Specify NULL or provide a null string (\0) for each input string that 
  36618.           has no data. 
  36619.  
  36620.  Related Information 
  36621.  
  36622.           Routines: 
  36623.           rpc_binding_from_string_binding 
  36624.           rpc_binding_to_string_binding 
  36625.           rpc_string_binding_parse 
  36626.           rpc_string_free 
  36627.           uuid_to_string 
  36628.  
  36629.  
  36630. ΓòÉΓòÉΓòÉ 5.8.138. rpc_string_binding_parse ΓòÉΓòÉΓòÉ
  36631.  
  36632.  Purpose 
  36633.  
  36634.           Returns, as separate strings, the components of a string binding. 
  36635.           This routine is used by client or server applications. 
  36636.  
  36637.  Format 
  36638.  
  36639.                     #include <dce/rpc.h>
  36640.  
  36641.                     void rpc_string_binding_parse(
  36642.                             unsigned_char_t  *string_binding,
  36643.                             unsigned_char_t  **obj_uuid,
  36644.                             unsigned_char_t  **protseq,
  36645.                             unsigned_char_t  **network_addr,
  36646.                             unsigned_char_t  **endpoint,
  36647.                             unsigned_char_t  **network_options,
  36648.                             unsigned32  *status);
  36649.  
  36650.  Parameters 
  36651.  
  36652.           Input 
  36653.  
  36654.           string_binding Specifies a NULL-terminated string representation of a 
  36655.                         binding. 
  36656.  
  36657.           Output 
  36658.  
  36659.           obj_uuid      Returns a pointer to a NULL-terminated string 
  36660.                         representation of an object UUID. 
  36661.  
  36662.                         Specify NULL to prevent the routine from returning this 
  36663.                         parameter. In this case, the application does not call 
  36664.                         rpc_string_free. 
  36665.  
  36666.           protseq       Returns a pointer to a NULL-terminated string 
  36667.                         representation of a protocol sequence. 
  36668.  
  36669.                         Specify NULL to prevent the routine from returning this 
  36670.                         parameter. In this case, the application does not call 
  36671.                         rpc_string_free. 
  36672.  
  36673.           network_addr  Returns a pointer to a NULL-terminated string 
  36674.                         representation of a network address. 
  36675.  
  36676.                         Specify NULL to prevent the routine from returning this 
  36677.                         parameter. In this case, the application does not call 
  36678.                         rpc_string_free. 
  36679.  
  36680.           endpoint      Returns a pointer to a NULL-terminated string 
  36681.                         representation of an endpoint. 
  36682.  
  36683.                         Specify NULL to prevent the routine from returning this 
  36684.                         parameter. In this case, the application does not call 
  36685.                         rpc_string_free. 
  36686.  
  36687.           network_options Returns a pointer to a NULL-terminated string 
  36688.                         representation of network options. 
  36689.  
  36690.                         Specify NULL to prevent the routine from returning this 
  36691.                         parameter. In this case, the application does not call 
  36692.                         rpc_string_free. 
  36693.  
  36694.           status        Returns the status code from this routine. On 
  36695.                         successful completion, the routine returns rpc_s_ok. 
  36696.                         Otherwise, it returns rpc_s_invalid_string_binding, 
  36697.                         which indicates that the string binding is not valid. 
  36698.  
  36699.  Usage 
  36700.  
  36701.           The rpc_string_binding_parse routine parses a string representation 
  36702.           of a binding handle into its component fields. 
  36703.  
  36704.           The RPC runtime allocates memory for each component string the 
  36705.           routine returns. The application calls rpc_string_free once for each 
  36706.           returned string to deallocate the memory for that string. 
  36707.  
  36708.           If any field of the string_binding is empty, rpc_string_binding_parse 
  36709.           returns the empty string in the corresponding output parameter. 
  36710.  
  36711.  Related Information 
  36712.  
  36713.           Routines: 
  36714.           rpc_binding_from_string_binding 
  36715.           rpc_binding_to_string_binding 
  36716.           rpc_string_binding_compose 
  36717.           rpc_string_free 
  36718.           uuid_from_string 
  36719.  
  36720.  
  36721. ΓòÉΓòÉΓòÉ 5.8.139. rpc_string_free ΓòÉΓòÉΓòÉ
  36722.  
  36723.  Purpose 
  36724.  
  36725.           Frees a character string allocated by the RPC runtime. This routine 
  36726.           is used by client, server, or management applications. 
  36727.  
  36728.  Format 
  36729.  
  36730.                     #include <dce/rpc.h>
  36731.  
  36732.                     void rpc_string_free(
  36733.                             unsigned_char_t  **string,
  36734.                             unsigned32  *status);
  36735.  
  36736.  Parameters 
  36737.  
  36738.           Input/Output 
  36739.  
  36740.           string        Specifies the address of the pointer to the character 
  36741.                         string to free. 
  36742.  
  36743.                         The value NULL is returned. 
  36744.  
  36745.           Output 
  36746.  
  36747.           status        Returns the status code from this routine. On 
  36748.                         successful completion, the routine returns rpc_s_ok. 
  36749.                         Otherwise, it returns an error. 
  36750.  
  36751.  Usage 
  36752.  
  36753.           The rpc_string_free routine deallocates the memory occupied by a 
  36754.           character string returned by the RPC runtime. 
  36755.  
  36756.           An application must call this routine once for each character string 
  36757.           allocated and returned by calls to other RPC runtime routines. These 
  36758.           routines are listed in the "Related Information" section. 
  36759.  
  36760.  Related Information 
  36761.  
  36762.           Routines: 
  36763.           rpc_binding_inq_auth_client 
  36764.           rpc_binding_inq_auth_info 
  36765.           rpc_binding_to_string_binding 
  36766.           rpc_mgmt_ep_elt_inq_next 
  36767.           rpc_mgmt_inq_server_princ_name 
  36768.           rpc_ns_binding_inq_entry_name 
  36769.           rpc_ns_entry_expand_name 
  36770.           rpc_ns_group_mbr_inq_next 
  36771.           rpc_ns_profile_elt_inq_next 
  36772.           rpc_string_binding_compose 
  36773.           rpc_string_binding_parse 
  36774.           sec_rgy_site_binding_get_info 
  36775.           uuid_to_string 
  36776.  
  36777.  
  36778. ΓòÉΓòÉΓòÉ 5.8.140. rpc_tower_to_binding ΓòÉΓòÉΓòÉ
  36779.  
  36780.  Purpose 
  36781.  
  36782.           Returns a binding handle from a tower representation. 
  36783.  
  36784.  Format 
  36785.  
  36786.                     #include <dce/rpc.h>
  36787.  
  36788.                     void rpc_tower_to_binding(
  36789.                             byte_p_t  prot_tower,
  36790.                             rpc_binding_handle_t  *binding,
  36791.                             unsigned32  *status);
  36792.  
  36793.  Parameters 
  36794.  
  36795.           Input 
  36796.  
  36797.           prot_tower    Specifies a single protocol tower to convert to a 
  36798.                         binding handle. 
  36799.  
  36800.           Output 
  36801.  
  36802.           binding       Returns the server binding handle. 
  36803.  
  36804.           status        Returns the status code from this routine. On 
  36805.                         successful completion, the routine returns rpc_s_ok. 
  36806.                         Otherwise, it returns one of the following errors: 
  36807.  
  36808.                              rpc_s_invalid_arg The argument is not valid. 
  36809.  
  36810.                              rpc_s_invalid_endpoint_format The endpoint format 
  36811.                                            is not valid. 
  36812.  
  36813.                              rpc_s_protseq_not_supported The protocol sequence 
  36814.                                            is not supported on this host. 
  36815.  
  36816.  Usage 
  36817.  
  36818.           The rpc_tower_to_binding routine creates a server binding handle that 
  36819.           is a canonical representation of a protocol tower. 
  36820.  
  36821.           When the application finishes using the binding parameter, it calls 
  36822.           the rpc_binding_free routine to release the memory used by the 
  36823.           binding handle. 
  36824.  
  36825.  Related Information 
  36826.  
  36827.           Routines: 
  36828.           rpc_binding_copy 
  36829.           rpc_binding_free 
  36830.           rpc_tower_vector_free 
  36831.           rpc_tower_vector_from_binding 
  36832.  
  36833.  
  36834. ΓòÉΓòÉΓòÉ 5.8.141. rpc_tower_vector_free ΓòÉΓòÉΓòÉ
  36835.  
  36836.  Purpose 
  36837.  
  36838.           Releases memory associated with a tower vector. 
  36839.  
  36840.  Format 
  36841.  
  36842.                     #include <dce/rpc.h>
  36843.  
  36844.                     void rpc_tower_vector_free(
  36845.                             rpc_tower_vector_p_t  *twr_vector,
  36846.                             unsigned32  *status);
  36847.  
  36848.  Parameters 
  36849.  
  36850.           Input 
  36851.  
  36852.           twr_vector    Specifies the tower vector to be freed. On return, its 
  36853.                         value is NULL. 
  36854.  
  36855.           Output 
  36856.  
  36857.           status        Returns the status code from this routine. The status 
  36858.                         code is either rpc_s_ok or a value returned from a 
  36859.                         called routine. 
  36860.  
  36861.  Usage 
  36862.  
  36863.           The rpc_tower_vector_free routine releases memory associated with a 
  36864.           tower vector, including the towers as well as the vector. 
  36865.  
  36866.  Related Information 
  36867.  
  36868.           Routines: 
  36869.           rpc_binding_copy 
  36870.           rpc_binding_free 
  36871.           rpc_tower_vector_from_binding 
  36872.           rpc_tower_to_binding 
  36873.  
  36874.  
  36875. ΓòÉΓòÉΓòÉ 5.8.142. rpc_tower_vector_from_binding ΓòÉΓòÉΓòÉ
  36876.  
  36877.  Purpose 
  36878.  
  36879.           Creates a tower vector from a binding handle. 
  36880.  
  36881.  Format 
  36882.  
  36883.                     #include <dce/rpc.h>
  36884.  
  36885.                     void rpc_tower_vector_from_binding(
  36886.                             rpc_if_handle_t  if_spec,
  36887.                             rpc_binding_handle_t  binding,
  36888.                             rpc_tower_vector_p_t  *twr_vector,
  36889.                             unsigned32  *status);
  36890.  
  36891.  Parameters 
  36892.  
  36893.           Input 
  36894.  
  36895.           if_spec       The interface specification that is combined with a 
  36896.                         binding handle to form a tower vector. 
  36897.  
  36898.           binding       The binding handle that is combined with an interface 
  36899.                         specification to form a tower vector. 
  36900.  
  36901.           Output 
  36902.  
  36903.           twr_vector    Returns the allocated tower vector. 
  36904.  
  36905.           status        Returns the status code from this routine. The status 
  36906.                         code is either rpc_s_ok, or rpc_s_no_interfaces, or a 
  36907.                         value returned from a called routine. 
  36908.  
  36909.  Usage 
  36910.  
  36911.           The rpc_tower_vector_from_binding routine creates a vector of towers 
  36912.           from a binding handle. After the caller is finished with the tower 
  36913.           vector, the rpc_tower_vector_free routine must be called to release 
  36914.           the memory used by the vector. 
  36915.  
  36916.  Related Information 
  36917.  
  36918.           Routines: 
  36919.           rpc_binding_copy 
  36920.           rpc_binding_free 
  36921.           rpc_tower_to_binding 
  36922.           rpc_tower_vector_free 
  36923.  
  36924.  
  36925. ΓòÉΓòÉΓòÉ 5.8.143. uuid_compare ΓòÉΓòÉΓòÉ
  36926.  
  36927.  Purpose 
  36928.  
  36929.           Compares two UUIDs and determines their order. This routine is used 
  36930.           by client, server, or management applications. 
  36931.  
  36932.  Format 
  36933.  
  36934.                     #include <dce/uuid.h>
  36935.  
  36936.                     signed32 uuid_compare(
  36937.                              uuid_t  *uuid1,
  36938.                              uuid_t  *uuid2,
  36939.                              unsigned32  *status);
  36940.  
  36941.  Parameters 
  36942.  
  36943.           Input 
  36944.  
  36945.           uuid1         Specifies a pointer to a UUID. This UUID is compared 
  36946.                         with the UUID specified in uuid2. Use the value NULL to 
  36947.                         specify a nil UUID for this parameter. 
  36948.  
  36949.           uuid2         Specifies a pointer to a UUID. This UUID is compared 
  36950.                         with the UUID specified in uuid1. Use the value NULL to 
  36951.                         specify a nil UUID for this parameter. 
  36952.  
  36953.           Output 
  36954.  
  36955.           status        Returns the status code from this routine. On 
  36956.                         successful completion, the routine returns uuid_s_ok. 
  36957.                         Otherwise, it returns uuid_s_bad_version, which 
  36958.                         indicates a bad UUID version. 
  36959.  
  36960.  Usage 
  36961.  
  36962.           The uuid_compare routine compares two UUIDs and determines their 
  36963.           order. A nil UUID is considered the first element in order. The order 
  36964.           of UUIDs is defined by the RPC architecture and is not a temporal 
  36965.           (related to time) ordering. Comparing two specific UUIDs always 
  36966.           returns the same result, regardless of the implementation or system 
  36967.           architecture. 
  36968.  
  36969.           You can use this routine to sort data with UUIDs as a key. 
  36970.  
  36971.  Return Codes 
  36972.  
  36973.           Returns one of the following constants 
  36974.  
  36975.           -1     The uuid1 parameter precedes the uuid2 parameter in order. 
  36976.  
  36977.           0      The uuid1 parameter is equal to the uuid2 parameter in order. 
  36978.  
  36979.           1      The uuid1 parameter follows the uuid2 parameter in order. 
  36980.  
  36981.           Note that a value of 0 (zero) has the same meaning as if 
  36982.           uuid_equal(&uuid1, &uuid2) returned a value of TRUE. 
  36983.  
  36984.           A nil UUID is the first UUID in order. This means the following: 
  36985.  
  36986.             o  If uuid1 is NULL and uuid2 is non-nil, the routine returns -1. 
  36987.  
  36988.             o  If uuid1 is NULL and uuid2 is NULL, the routine returns 0. 
  36989.  
  36990.             o  If uuid1 is non-nil and uuid2 is NULL, the routine returns 1. 
  36991.  
  36992.  Related Information 
  36993.  
  36994.           Routines: 
  36995.           uuid_equal 
  36996.           uuid_is_nil 
  36997.  
  36998.  
  36999. ΓòÉΓòÉΓòÉ 5.8.144. uuid_create ΓòÉΓòÉΓòÉ
  37000.  
  37001.  Purpose 
  37002.  
  37003.           Creates a new UUID. This routine is used by client, server, or 
  37004.           management applications. 
  37005.  
  37006.  Format 
  37007.  
  37008.                     #include <dce/uuid.h>
  37009.  
  37010.                     void uuid_create(
  37011.                             uuid_t  *uuid,
  37012.                             unsigned32  *status);
  37013.  
  37014.  Parameters 
  37015.  
  37016.           Output 
  37017.  
  37018.           uuid          Returns the new UUID. 
  37019.  
  37020.           status        Returns the status code from this routine. On 
  37021.                         successful completion, the routine returns uuid_s_ok. 
  37022.                         Otherwise, it returns uuid_s_no_address, which 
  37023.                         indicates that it cannot get the Ethernet hardware 
  37024.                         address. 
  37025.  
  37026.  Usage 
  37027.  
  37028.           The uuid_create routine creates a new UUID. 
  37029.  
  37030.  Related Information 
  37031.  
  37032.           Routines: 
  37033.           uuid_create_nil 
  37034.           uuid_from_string 
  37035.           uuid_to_string 
  37036.  
  37037.  
  37038. ΓòÉΓòÉΓòÉ 5.8.145. uuid_create_nil ΓòÉΓòÉΓòÉ
  37039.  
  37040.  Purpose 
  37041.  
  37042.           Creates a nil UUID. This routine is used by client, server, or 
  37043.           management applications. 
  37044.  
  37045.  Format 
  37046.  
  37047.                     #include <dce/uuid.h>
  37048.  
  37049.                     void uuid_create_nil(
  37050.                              uuid_t  *nil_uuid,
  37051.                              unsigned32  *status);
  37052.  
  37053.  Parameters 
  37054.  
  37055.           Output 
  37056.  
  37057.           nil_uuid      Returns a nil UUID. 
  37058.  
  37059.           status        Returns the status code from this routine. On 
  37060.                         successful completion, the routine returns uuid_s_ok. 
  37061.                         Otherwise, it returns an error. 
  37062.  
  37063.  Usage 
  37064.  
  37065.           The uuid_create_nil routine creates a nil UUID. 
  37066.  
  37067.  Related Information 
  37068.  
  37069.           Routines: 
  37070.           uuid_create 
  37071.  
  37072.  
  37073. ΓòÉΓòÉΓòÉ 5.8.146. uuid_equal ΓòÉΓòÉΓòÉ
  37074.  
  37075.  Purpose 
  37076.  
  37077.           Determines if two UUIDs are equal. This routine is used by client, 
  37078.           server, or management applications. 
  37079.  
  37080.  Format 
  37081.  
  37082.                     #include <dce/uuid.h>
  37083.  
  37084.                     boolean32 uuid_equal(
  37085.                              uuid_t  *uuid1,
  37086.                              uuid_t  *uuid2,
  37087.                              unsigned32  *status);
  37088.  
  37089.  Parameters 
  37090.  
  37091.           Input 
  37092.  
  37093.           uuid1         Specifies a pointer to a UUID. This UUID is compared 
  37094.                         with the UUID specified in uuid2. Supply the value NULL 
  37095.                         to specify a nil UUID for this parameter. 
  37096.  
  37097.           uuid2         Specifies a pointer to a UUID. This UUID is compared 
  37098.                         with the UUID specified in uuid1. Supply the value NULL 
  37099.                         to specify a nil UUID for this parameter. 
  37100.  
  37101.           Output 
  37102.  
  37103.           status        Returns the status code from this routine. On 
  37104.                         successful completion, the routine returns uuid_s_ok. 
  37105.                         Otherwise, it returns uuid_s_bad_version, which 
  37106.                         indicates that the UUID version is not valid. 
  37107.  
  37108.  Usage 
  37109.  
  37110.           The uuid_equal routine compares two UUIDs and determines if they are 
  37111.           equal. 
  37112.  
  37113.  Return Codes 
  37114.  
  37115.           The possible return values and their meanings are as follows: 
  37116.  
  37117.           TRUE   The uuid1 parameter is equal to the uuid2 parameter. The 
  37118.                  status parameter contains the status code uuid_s_ok. 
  37119.  
  37120.           FALSE  The uuid1 parameter is not equal to the uuid2 parameter. 
  37121.  
  37122.  Related Information 
  37123.  
  37124.           Routines: 
  37125.           uuid_compare 
  37126.  
  37127.  
  37128. ΓòÉΓòÉΓòÉ 5.8.147. uuid_from_string ΓòÉΓòÉΓòÉ
  37129.  
  37130.  Purpose 
  37131.  
  37132.           Converts a string UUID to its binary representation. This routine is 
  37133.           used by client, server, or management applications. 
  37134.  
  37135.  Format 
  37136.  
  37137.                     #include <dce/uuid.h>
  37138.  
  37139.                     void uuid_from_string(
  37140.                              unsigned_char_t  *string_uuid,
  37141.                              uuid_t  *uuid,
  37142.                              unsigned32  *status);
  37143.  
  37144.  Parameters 
  37145.  
  37146.           Input 
  37147.  
  37148.           string_uuid   Specifies a string representation of a UUID. Supply the 
  37149.                         value NULL or the NULL string (\0) to specify a nil 
  37150.                         UUID. 
  37151.  
  37152.           Output 
  37153.  
  37154.           uuid          Returns the binary form of the UUID specified by the 
  37155.                         string_uuid parameter into the address specified by 
  37156.                         this parameter. 
  37157.  
  37158.           status        Returns the status code from this routine. On 
  37159.                         successful completion, the routine returns uuid_s_ok. 
  37160.                         Otherwise, it returns one of the following errors: 
  37161.  
  37162.                              uuid_s_bad_version   Bad UUID version. 
  37163.  
  37164.                              uuid_s_invalid_string_uuid The string UUID format 
  37165.                                                   is not valid. 
  37166.  
  37167.  Usage 
  37168.  
  37169.           An application calls the uuid_from_string routine to convert a string 
  37170.           UUID to its binary representation. 
  37171.  
  37172.  Related Information 
  37173.  
  37174.           Routines: 
  37175.           uuid_to_string 
  37176.  
  37177.  
  37178. ΓòÉΓòÉΓòÉ 5.8.148. uuid_hash ΓòÉΓòÉΓòÉ
  37179.  
  37180.  Purpose 
  37181.  
  37182.           Creates a hash value for a UUID. This routine is used by client, 
  37183.           server, or management applications. 
  37184.  
  37185.  Format 
  37186.  
  37187.                     #include <dce/uuid.h>
  37188.  
  37189.                     unsigned16 uuid_hash(
  37190.                              uuid_t  *uuid,
  37191.                              unsigned32  *status);
  37192.  
  37193.  Parameters 
  37194.  
  37195.           Input 
  37196.  
  37197.           uuid          Specifies the UUID for which a hash value is created. 
  37198.                         Supply NULL to specify a nil UUID for this parameter. 
  37199.  
  37200.           Output 
  37201.  
  37202.           status        Returns the status code from this routine. On 
  37203.                         successful completion, the routine returns uuid_s_ok. 
  37204.                         Otherwise, it returns the following error: 
  37205.  
  37206.                              uuid_s_bad_version Bad UUID version. 
  37207.  
  37208.  Usage 
  37209.  
  37210.           The uuid_hash routine generates a hash value for a specified UUID. 
  37211.  
  37212.           Note that the return value for a single uuid value can differ across 
  37213.           platforms. 
  37214.  
  37215.  Return Codes 
  37216.  
  37217.           This routine returns a hash value for the specified UUID. 
  37218.  
  37219.  
  37220. ΓòÉΓòÉΓòÉ 5.8.149. uuid_is_nil ΓòÉΓòÉΓòÉ
  37221.  
  37222.  Purpose 
  37223.  
  37224.           Determines if a UUID is nil. This routine is used by client, server, 
  37225.           or management applications. 
  37226.  
  37227.  Format 
  37228.  
  37229.                     #include <dce/uuid.h>
  37230.  
  37231.                     boolean32 uuid_is_nil(
  37232.                             uuid_t  *uuid,
  37233.                             unsigned32  *status);
  37234.  
  37235.  Parameters 
  37236.  
  37237.           Input 
  37238.  
  37239.           uuid          Specifies a UUID to test as a nil UUID. Supply NULL to 
  37240.                         specify a nil UUID for this parameter. 
  37241.  
  37242.           Output 
  37243.  
  37244.           status        Returns the status code from this routine. On 
  37245.                         successful completion, the routine returns uuid_s_ok. 
  37246.                         Otherwise, it returns uuid_s_bad_version, which 
  37247.                         indicates a bad UUID version. 
  37248.  
  37249.  Usage 
  37250.  
  37251.           The uuid_is_nil routine determines whether the specified UUID is a 
  37252.           nil UUID. This routine yields the same result as though an 
  37253.           application: 
  37254.  
  37255.             o  Called the uuid_create_nil routine. 
  37256.  
  37257.             o  Called the uuid_equal routine to compare the returned nil UUID 
  37258.                to the UUID specified in the uuid parameter. 
  37259.  
  37260.  Return Codes 
  37261.  
  37262.           The possible return values and their meanings are as follows: 
  37263.  
  37264.           TRUE   The uuid parameter is a nil UUID. The status parameter 
  37265.                  contains the status code uuid_s_ok. 
  37266.  
  37267.           FALSE  The uuid parameter is not a nil UUID. 
  37268.  
  37269.  Related Information 
  37270.  
  37271.           Routines: 
  37272.           uuid_compare 
  37273.           uuid_create_nil 
  37274.           uuid_equal 
  37275.  
  37276.  
  37277. ΓòÉΓòÉΓòÉ 5.8.150. uuid_to_string ΓòÉΓòÉΓòÉ
  37278.  
  37279.  Purpose 
  37280.  
  37281.           Converts a UUID from a binary representation to a string 
  37282.           representation. This routine is used by client, server, or management 
  37283.           applications. 
  37284.  
  37285.  Format 
  37286.  
  37287.                     #include <dce/uuid.h>
  37288.  
  37289.                     void uuid_to_string(
  37290.                              uuid_t  *uuid,
  37291.                              unsigned_char_t  **string_uuid,
  37292.                              unsigned32  *status);
  37293.  
  37294.  Parameters 
  37295.  
  37296.           Input 
  37297.  
  37298.           uuid          Specifies a UUID in its binary format. Supply NULL to 
  37299.                         specify a nil UUID for this parameter. 
  37300.  
  37301.           Output 
  37302.  
  37303.           string_uuid   Returns a pointer to the string representation of the 
  37304.                         UUID specified in the uuid parameter. Specify NULL for 
  37305.                         this parameter to prevent the routine from returning 
  37306.                         this information. 
  37307.  
  37308.           status        Returns the status code from this routine. On 
  37309.                         successful completion, the routine returns uuid_s_ok. 
  37310.                         Otherwise, it returns uuid_s_bad_version, which 
  37311.                         indicates that the UUID version is not valid. 
  37312.  
  37313.  Usage 
  37314.  
  37315.           The uuid_to_string routine converts a UUID from its binary 
  37316.           representation to its string representation. 
  37317.  
  37318.           The RPC runtime allocates memory for the string returned in the 
  37319.           string_uuid parameter. The application calls rpc_string_free to 
  37320.           deallocate that memory. It is not necessary to call rpc_string_free 
  37321.           when you supply NULL for the string_uuid parameter. 
  37322.  
  37323.  Related Information 
  37324.  
  37325.           Routines: 
  37326.           rpc_string_free 
  37327.           uuid_from_string 
  37328.  
  37329.  
  37330. ΓòÉΓòÉΓòÉ 6. Directory Service API ΓòÉΓòÉΓòÉ
  37331.  
  37332. This section describes the directory service routines and header files. This 
  37333. interface allows access to Cell Directory Service (CDS) objects, and comprises 
  37334. two parts, the X/OPEN Directory Services (XDS) and the X/Open Object Management 
  37335. (XOM) interfaces. 
  37336.  
  37337.  XDS Routines  Describes the XDS routines. 
  37338.  
  37339.  XDS Header Files Describes the XDS header files included in the XDS routines. 
  37340.  
  37341.  X/OPEN OSI-Abstract-Data Manipulation Routines Describes the XOM routines. 
  37342.  
  37343.  XOM Header Files Describes the xom.h header files. 
  37344.  
  37345.  
  37346. ΓòÉΓòÉΓòÉ 6.1. XDS Routines ΓòÉΓòÉΓòÉ
  37347.  
  37348. This is an introduction to X/OPEN Directory Services (XDS) routines. XDS 
  37349. provides a C language binding. 
  37350.  
  37351. Note:  This service interface only supports access to CDS objects. Access to 
  37352.        GDS objects is not supported. 
  37353.  
  37354.  The service interface comprises a number of routines whose descriptions are 
  37355.  summarized in the following list: 
  37356.  
  37357.  ds_adbandon              This routine is not supported. 
  37358.  
  37359.  ds_add_entry             Adds a leaf entry to the directory information tree 
  37360.                           (DIT). 
  37361.  
  37362.  ds_bind                  Opens a session with a directory user agent. 
  37363.  
  37364.  ds_compare               Compares a purported attribute value with the 
  37365.                           attribute value stored in the directory for a 
  37366.                           particular entry. 
  37367.  
  37368.  ds_initialize            Initializes the interface. 
  37369.  
  37370.  ds_list                  Enumerates the immediate subordinates of a particular 
  37371.                           directory entry. 
  37372.  
  37373.  ds_modify_entry          Performs a modification of a directory entry. 
  37374.  
  37375.  ds_modify_rdn            This routine is not supported. 
  37376.  
  37377.  ds_read                  Queries information on a directory entry by name. 
  37378.  
  37379.  ds_receive_result        This routine is not supported. 
  37380.  
  37381.  ds_remove_entry          Removes a leaf entry from the directory information 
  37382.                           tree (DIT). 
  37383.  
  37384.  ds_search                This routine is not supported. 
  37385.  
  37386.  ds_shutdown              Shuts down the interface. 
  37387.  
  37388.  ds_unbind                Unbinds from a directory session. 
  37389.  
  37390.  ds_version               Negotiates features of the interface and service. 
  37391.  
  37392.  dsX_extract_attr_values  Extracts attribute values from an OM object. 
  37393.  
  37394.  The Distributed Computing Environment (DCE) XDS interface does not support 
  37395.  asynchronous operations within the same thread. Therefore, ds_abandon is 
  37396.  redundant. A ds_abandon call returns with a DS_C_ABANDON_FAILED 
  37397.  (DS_E_TOO_LATE) error. Refer to the DCE for OS/2 Warp: Application Development 
  37398.  Guide - Core Components for information on how to abandon an operation. For 
  37399.  ds_receive_result, if there are any outstanding operations (when multiple 
  37400.  threads issue XDS calls in parallel), this routine returns DS_SUCCESS with the 
  37401.  completion_flag_return parameter set to DS_OUTSTANDING_OPERATIONS. If no XDS 
  37402.  calls are outstanding, then ds_receive_result returns with DS_status set to 
  37403.  DS_NO_OUTSTANDING_OPERATION. 
  37404.  
  37405.  The following restrictions apply to this service interface when accessing the 
  37406.  Cell Directory Service (CDS): 
  37407.  
  37408.    o  CDS does not support the ds_modify_rdn or ds_search routines. The error 
  37409.       message DS_C_SERVICE_ERROR (DS_E_UNWILLING_TO_PERFORM) is returned if 
  37410.       either of these two routines are attempted on CDS. 
  37411.  
  37412.    o  In CDS, no X.500 schema rules apply. There is no: 
  37413.  
  37414.         -  Concept of an object class 
  37415.         -  Mandatory attributes for a given object 
  37416.         -  Set of attributes expressly permitted for a given object 
  37417.         -  Predefined definition of single and multivalued attributes 
  37418.  
  37419.  The absence of these schema rules means that errors, which are returned for 
  37420.  breach of schema rules, are not returned. 
  37421.  
  37422.  The CDS naming Directory Information Tree (DIT) is modeled on a typical file 
  37423.  system architecture, where directories are used for storing objects and 
  37424.  directories can contain subdirectories. Leaf objects in the CDS DIT are 
  37425.  similar to X.500 naming objects. However, subtree objects are called 
  37426.  directories as in a file system directory. All new objects must be added to an 
  37427.  existing directory. CDS directory objects cannot be added, removed, modified, 
  37428.  or compared using the XDS programming interface. 
  37429.  
  37430.  In CDS, the naming attribute of an object is not stored in the object. 
  37431.  Consequently, in CDS, ds_read never returns this attribute, and ds_compare 
  37432.  returns with DS_C_ATTRIBUTE_ERROR (DS_E_CONSTRAINT_VIOLATION). 
  37433.  
  37434.  Updates to the directory are not guaranteed to be atomic when using XDS/XOM 
  37435.  over CDS. 
  37436.  
  37437.  Notes 
  37438.  
  37439.    o  XDS routines check for NULL pointers and return an error. 
  37440.  
  37441.    o  The pointers are checked at the routine interface only.  The check is for 
  37442.       NULL only and not for validity. 
  37443.  
  37444.  
  37445. ΓòÉΓòÉΓòÉ 6.1.1. ds_add_entry ΓòÉΓòÉΓòÉ
  37446.  
  37447.  Purpose 
  37448.  
  37449.           Adds a leaf entry to the Directory Information Tree (DIT). 
  37450.  
  37451.  Format 
  37452.  
  37453.                     #include <xom.h>
  37454.                     #include <xds.h>
  37455.  
  37456.                     DS_status ds_add_entry(
  37457.                             OM_private_object  session,
  37458.                             OM_private_object  context,
  37459.                             OM_object  name,
  37460.                             OM_object  entry,
  37461.                             OM_sint  *invoke_id_return);
  37462.  
  37463.  Parameters 
  37464.  
  37465.           Input 
  37466.  
  37467.           session       (Object(DS_C_SESSION)). The directory session this 
  37468.                         operation is performed against. This must be a private 
  37469.                         object. 
  37470.  
  37471.           context       (Object(DS_C_CONTEXT)). The directory context to be 
  37472.                         used for this operation. This parameter must be a 
  37473.                         private object or the DS_DEFAULT_CONTEXT constant. 
  37474.                         (Note that DS_SIZE_LIMIT and 
  37475.                         DS_DONT_DEREFERENCE_ALIASES do not apply to this 
  37476.                         operation.) 
  37477.  
  37478.           name          (Object(DS_C_NAME)). The name of the entry to be added. 
  37479.                         The immediate superior of the new entry is determined 
  37480.                         by removing the last RDN component, which belongs to 
  37481.                         the new entry. Any aliases in the name are not 
  37482.                         de-referenced. 
  37483.  
  37484.           entry         (Object(DS_C_ATTRIBUTE_LIST)). The attribute 
  37485.                         information that, together with that from the RDN, 
  37486.                         constitutes the entry to be created. Note that an 
  37487.                         instance of Object Management (OM) class 
  37488.                         DS_C_ENTRY_INFO can be supplied as the value of this 
  37489.                         parameter, since DS_C_ENTRY_INFO is a subclass of 
  37490.                         DS_C_ATTRIBUTE_LIST. 
  37491.  
  37492.           Output 
  37493.  
  37494.           invoke_id_return (integer).  Not supported. 
  37495.  
  37496.  Usage 
  37497.  
  37498.           The ds_add_entry routine adds a leaf entry to the Directory. The 
  37499.           entry can be either an object or an alias. 
  37500.  
  37501.  Notes 
  37502.  
  37503.           Note the following issues for the ds_add_entry operation: 
  37504.  
  37505.             o  Only leaf objects (that is, objects that are not CDS directory 
  37506.                objects) can be added to CDS through the XDS interface. 
  37507.  
  37508.             o  Only the DS_A_COMMON_NAME and DS_A_MEMBER attributes are valid 
  37509.                for the DS_O_GROUP_OF_NAMES object in CDS. 
  37510.  
  37511.             o  GDS-structured attribute types are not supported by CDS. If an 
  37512.                attempt is made to add a GDS-structured attribute type to CDS, 
  37513.                then it returns with a DS_C_ATTRIBUTE_ERROR 
  37514.                (DS_E_CONSTRAINT_VIOLATION). 
  37515.           Since CDS does not implement the X.500 schema rules, some CDS objects 
  37516.           may not contain mandatory attributes like object class and so on. 
  37517.  
  37518.  Return Codes 
  37519.  
  37520.           On successful completion, the routine returns DS_SUCCESS. Otherwise, 
  37521.           it returns one of the following errors: 
  37522.  
  37523.             o  DS_C_SYSTEM_ERROR 
  37524.  
  37525.             o  The following DS_C_LIBRARY_ERROR errors: 
  37526.  
  37527.                     DS_E_BAD_ARGUMENT 
  37528.                     DS_E_BAD_CONTEXT 
  37529.                     DS_E_BAD_NAME 
  37530.                     DS_E_BAD_SESSION 
  37531.                     DS_E_MISCELLANEOUS 
  37532.                     DS_E_MISSING_TYPE 
  37533.                     DS_E_TOO_MANY_OPERATIONS 
  37534.  
  37535.             o  The following directory errors: 
  37536.  
  37537.                     DS_C_ATTRIBUTE_ERROR 
  37538.                     DS_C_NAME_ERROR 
  37539.                     DS_C_REFERRAL 
  37540.                     DS_C_SECURITY_ERROR 
  37541.                     DS_C_SERVICE_ERROR 
  37542.                     DS_C_UPDATE_ERROR 
  37543.  
  37544.                Note:  DS_C_UPDATE_ERROR (DS_E_AFFECTS_MULTIPLE_DSAS), which is 
  37545.                       referred to in the parameter descriptions, need not be 
  37546.                       returned if there is local agreement between the DSAs to 
  37547.                       allow the entry to be added. 
  37548.  
  37549.             o  DS_C_COMMUNICATIONS_ERROR 
  37550.  
  37551.             o  The DS_NO_WORKSPACE error constant. 
  37552.  
  37553.  
  37554. ΓòÉΓòÉΓòÉ 6.1.2. ds_bind ΓòÉΓòÉΓòÉ
  37555.  
  37556.  Purpose 
  37557.  
  37558.           Opens a session with the Directory. 
  37559.  
  37560.  Format 
  37561.  
  37562.                     #include <xom.h>
  37563.                     #include <xds.h>
  37564.  
  37565.                     DS_status ds_bind(
  37566.                            OM_object  session,
  37567.                            OM_workspace  workspace,
  37568.                            OM_private_object  *bound_session_return);
  37569.  
  37570.  Parameters 
  37571.  
  37572.           Input 
  37573.  
  37574.           session       (object(DS_C_SESSION)). Specifies a particular 
  37575.                         directory service provider, together with other details 
  37576.                         of the service required. This parameter can be either a 
  37577.                         public object or a private object. The 
  37578.                         DS_DEFAULT_SESSION constant can also be used as the 
  37579.                         value of this parameter, causing a new session to be 
  37580.                         created with default values for all its OM attributes. 
  37581.  
  37582.           workspace     Specifies the workspace (obtained from a call to 
  37583.                         ds_initialize) that is to be associated with the 
  37584.                         session. All results from directory operations using 
  37585.                         this session will be returned as private objects in 
  37586.                         this workspace. If the session parameter is a private 
  37587.                         object, it must be a private object in this workspace. 
  37588.  
  37589.           Output 
  37590.  
  37591.           bound_session_return (object (DS_C_SESSION)). Upon successful 
  37592.                         completion, this parameter contains an instance of a 
  37593.                         directory session that can be used as a parameter to 
  37594.                         other routines (for example, ds_read). This is a new 
  37595.                         private object if the value of the session parameter 
  37596.                         was DS_DEFAULT_SESSION or a public object; otherwise, 
  37597.                         it is that supplied as a parameter. The routine 
  37598.                         supplies default values for any of the OM attributes 
  37599.                         that are not present in the session parameter instance 
  37600.                         supplied as a parameter. It also sets the value of the 
  37601.                         DS_FILE_DESCRIPTOR OM attribute to 
  37602.                         DS_NO_VALID_FILE_DESCRIPTOR since this function is not 
  37603.                         supported. 
  37604.  
  37605.  Usage 
  37606.  
  37607.           The ds_bind routine sets up a link to the CDS namespace. 
  37608.  
  37609.  Notes 
  37610.  
  37611.           Note that in order to use CDS, ds_bind must be called with the value 
  37612.           of the session parameter set to DS_DEFAULT_SESSION. 
  37613.  
  37614.  Return Codes 
  37615.  
  37616.           On successful completion, the routine returns DS_SUCCESS. Otherwise, 
  37617.           it returns one of the following errors: 
  37618.  
  37619.             o  DS_C_SYSTEM_ERROR 
  37620.  
  37621.             o  The following DS_C_LIBRARY_ERROR errors: 
  37622.  
  37623.                     DS_E_BAD_SESSION 
  37624.                     DS_E_BAD_WORKSPACE 
  37625.                     DS_E_MISCELLANEOUS 
  37626.                     DS_E_NOT_SUPPORTED 
  37627.                     DS_E_TOO_MANY_SESSIONS 
  37628.  
  37629.             o  The following directory errors: 
  37630.  
  37631.                     DS_C_SECURITY_ERROR 
  37632.                     DS_C_SERVICE_ERROR 
  37633.  
  37634.             o  DS_COMMUNICATIONS_ERROR 
  37635.  
  37636.             o  The DS_NO_WORKSPACE error constant. 
  37637.  
  37638.  Related Information 
  37639.  
  37640.           Routines: 
  37641.           ds_unbind 
  37642.  
  37643.  
  37644. ΓòÉΓòÉΓòÉ 6.1.3. ds_compare ΓòÉΓòÉΓòÉ
  37645.  
  37646.  Purpose 
  37647.  
  37648.           Compares a purported attribute value with the attribute value stored 
  37649.           in the directory for a particular entry. 
  37650.  
  37651.  Format 
  37652.  
  37653.                     #include <xom.h>
  37654.                     #include <xds.h>
  37655.  
  37656.                     DS_status ds_compare(
  37657.                            OM_private_object  session,
  37658.                            OM_private_object  context,
  37659.                            OM_object  name,
  37660.                            OM_object  ava,
  37661.                            OM_private_object  *result_return,
  37662.                            OM_sint  *invoke_id_return);
  37663.  
  37664.  Parameters 
  37665.  
  37666.           Input 
  37667.  
  37668.           session       (Object(DS_C_SESSION)). The directory session against 
  37669.                         which this operation is performed.  This must be a 
  37670.                         private object. 
  37671.  
  37672.           context       (Object(DS_C_CONTEXT)). The directory context to be 
  37673.                         used for this operation. Note that DS_SIZE_LIMIT does 
  37674.                         not apply to this operation.  This parameter must be a 
  37675.                         private object or the DS_DEFAULT_CONTEXT constant. 
  37676.  
  37677.           name          (Object(DS_C_NAME)). The name of the target object 
  37678.                         entry. Any aliases in the name are dereferenced unless 
  37679.                         prohibited by the DS_DONT_DEREFERENCE_ALIASES service 
  37680.                         control attribute of the DS_C_CONTEXT object. 
  37681.  
  37682.           ava           (Object(DS_C_AVA)). The attribute value assertion (AVA) 
  37683.                         that specifies the attribute type and value to be 
  37684.                         compared with those in the entry. 
  37685.  
  37686.           Output 
  37687.  
  37688.           result_return (Object(DS_C_COMPARE_RESULT)).  Upon successful 
  37689.                         completion, the result contains flags indicating 
  37690.                         whether the values matched and whether the comparison 
  37691.                         was made against the original entry. It also contains 
  37692.                         the distinguished name (DN) of the target object if an 
  37693.                         alias is dereferenced. 
  37694.  
  37695.           invoke_id_return (integer).  Not supported. 
  37696.  
  37697.  Usage 
  37698.  
  37699.           The ds_compare routine compares the value supplied in the given ava 
  37700.           parameter with the value or values of the same attribute type in the 
  37701.           named entry. 
  37702.  
  37703.  Notes 
  37704.  
  37705.           Note the following issues for the ds_compare operation: 
  37706.  
  37707.             o  In CDS, the naming attribute of an object is not stored in the 
  37708.                attribute list of an object. Thus in CDS, a ds_compare of the 
  37709.                purported naming attribute value with the naming attribute value 
  37710.                of the directory object always fails to match. 
  37711.  
  37712.             o  GDS-structured types are not supported by CDS. If a 
  37713.                GDS-structured attribute type is used as a parameter to 
  37714.                ds_compare on a CDS object, then it returns with the error 
  37715.                DS_C_ATTRIBUTE_ERROR (DS_E_CONSTRAINT_VIOLATION). 
  37716.  
  37717.             o  In CDS, ds_compare can only be used on leaf objects. Otherwise, 
  37718.                a DS_C_NAME_ERROR (DS_E_NO_SUCH_OBJECT) is returned. 
  37719.  
  37720.  Return Codes 
  37721.  
  37722.           On successful completion, the routine returns DS_SUCCESS. Otherwise, 
  37723.           it returns one of the following errors: 
  37724.  
  37725.             o  DS_C_SYSTEM_ERROR 
  37726.  
  37727.             o  The following DS_C_LIBRARY_ERROR errors: 
  37728.  
  37729.                     DS_E_BAD_ARGUMENT 
  37730.                     DS_E_BAD_CONTEXT 
  37731.                     DS_E_BAD_NAME 
  37732.                     DS_E_BAD_SESSION 
  37733.                     DS_E_MISCELLANEOUS 
  37734.                     DS_E_MISSING_TYPE 
  37735.                     DS_E_TOO_MANY_OPERATIONS 
  37736.  
  37737.             o  The following directory errors: 
  37738.  
  37739.                     DS_C_ATTRIBUTE_ERROR 
  37740.                     DS_C_NAME_ERROR 
  37741.                     DS_C_REFERRAL 
  37742.                     DS_C_SECURITY_ERROR 
  37743.                     DS_C_SERVICE_ERROR 
  37744.  
  37745.             o  DS_COMMUNICATIONS_ERROR 
  37746.  
  37747.             o  The DS_NO_WORKSPACE error constant. 
  37748.           Note that the operation fails and an error is returned either if the 
  37749.           target object is not found or if it does not have an attribute of the 
  37750.           required type. 
  37751.  
  37752.  
  37753. ΓòÉΓòÉΓòÉ 6.1.4. ds_initialize ΓòÉΓòÉΓòÉ
  37754.  
  37755.  Purpose 
  37756.  
  37757.           Initializes the XDS interface. 
  37758.  
  37759.  Format 
  37760.  
  37761.                     #include <xom.h>
  37762.                     #include <xds.h>
  37763.  
  37764.                     OM_workspace ds_initialize(void);
  37765.  
  37766.  Usage 
  37767.  
  37768.           The ds_initialize routine performs any necessary initialization of 
  37769.           the XDS Application Program Interface (API) including the creation of 
  37770.           a workspace. It must be called before any other directory interface 
  37771.           routines are called. This routine can be called multiple times, in 
  37772.           which case each call returns a workspace that is distinct from other 
  37773.           workspaces created by ds_initialize but not yet deleted by 
  37774.           ds_shutdown. 
  37775.  
  37776.  Return Codes 
  37777.  
  37778.           Upon successful completion, OM_workspace contains a handle to a 
  37779.           workspace in which OM objects can be created and manipulated. Objects 
  37780.           created in this workspace, and only such objects, can be used as 
  37781.           parameters to the other directory interface routines. This routine 
  37782.           returns NULL if it fails. 
  37783.  
  37784.  Related Information 
  37785.  
  37786.           Routines: 
  37787.           ds_shutdown 
  37788.  
  37789.  
  37790. ΓòÉΓòÉΓòÉ 6.1.5. ds_list ΓòÉΓòÉΓòÉ
  37791.  
  37792.  Purpose 
  37793.  
  37794.           Enumerates the immediate subordinates of a particular directory 
  37795.           entry. 
  37796.  
  37797.  Format 
  37798.  
  37799.                     #include <xom.h>
  37800.                     #include <xds.h>
  37801.  
  37802.                     DS_status ds_list(
  37803.                             OM_private_object  session,
  37804.                             OM_private_object  context,
  37805.                             OM_object  name,
  37806.                             OM_private_object  *result_return,
  37807.                             OM_sint  *invoke_id_return);
  37808.  
  37809.  Parameters 
  37810.  
  37811.           Input 
  37812.  
  37813.           session       (Object(DS_C_SESSION)). The directory session against 
  37814.                         which this operation is performed. This must be a 
  37815.                         private object. 
  37816.  
  37817.           context       (Object(DS_C_CONTEXT)). The directory context to be 
  37818.                         used for this operation. This parameter must be a 
  37819.                         private object or the DS_DEFAULT_CONTEXT constant. 
  37820.  
  37821.           name          (Object(DS_C_NAME)). The name of the object entry whose 
  37822.                         immediate subordinates are to be listed. Any aliases in 
  37823.                         the name are dereferenced unless prohibited by the 
  37824.                         DS_DONT_DEREFERENCE_ALIASES service control attribute 
  37825.                         of the DS_C_CONTEXT object. 
  37826.  
  37827.           Output 
  37828.  
  37829.           result_return (Object(DS_C_LIST_RESULT)). Upon successful completion, 
  37830.                         the result contains some information about the target 
  37831.                         object's immediate subordinates. It also contains the 
  37832.                         distinguished names of the target object, if an alias 
  37833.                         was dereferenced to find it. Aliases in the subordinate 
  37834.                         names are not dereferenced. 
  37835.  
  37836.           invoke_id_return (integer).  Not supported. 
  37837.  
  37838.  Usage 
  37839.  
  37840.           The ds_list routine is used to obtain a list of the immediate 
  37841.           subordinates of the named entry. 
  37842.  
  37843.           Note:  The DS_SIZE_LIMIT and DS_TIME_LIMIT environment variables are 
  37844.                  not supported when listing the contents of a CDS directory. 
  37845.  
  37846.  Return Codes 
  37847.  
  37848.           If the named object is located (even if there are no subordinates), 
  37849.           the routine returns DS_SUCCESS. Otherwise, it returns one of the 
  37850.           following errors: 
  37851.  
  37852.             o  DS_C_SYSTEM_ERROR 
  37853.  
  37854.             o  The following DS_C_LIBRARY_ERROR errors: 
  37855.  
  37856.                     DS_E_BAD_ARGUMENT 
  37857.                     DS_E_BAD_CONTEXT 
  37858.                     DS_E_BAD_NAME 
  37859.                     DS_E_BAD_SESSION 
  37860.                     DS_E_MISCELLANEOUS 
  37861.                     DS_E_MISSING_TYPE 
  37862.                     DS_E_TOO_MANY_OPERATIONS 
  37863.  
  37864.             o  The following directory errors: 
  37865.  
  37866.                     DS_C_NAME_ERROR 
  37867.                     DS_C_REFERRAL 
  37868.                     DS_C_SECURITY_ERROR 
  37869.                     DS_C_SERVICE_ERROR 
  37870.  
  37871.             o  DS_COMMUNICATIONS_ERROR 
  37872.  
  37873.             o  The DS_NO_WORKSPACE error constant. 
  37874.  
  37875.  
  37876. ΓòÉΓòÉΓòÉ 6.1.6. ds_modify_entry ΓòÉΓòÉΓòÉ
  37877.  
  37878.  Purpose 
  37879.  
  37880.           Performs a modification on a directory entry. 
  37881.  
  37882.  Format 
  37883.  
  37884.                     #include <xom.h>
  37885.                     #include <xds.h>
  37886.  
  37887.                     DS_status ds_modify_entry(
  37888.                            OM_private_object  session,
  37889.                            OM_private_object  context,
  37890.                            OM_object  name,
  37891.                            OM_object  changes,
  37892.                            OM_sint  *invoke_id_return);
  37893.  
  37894.  Parameters 
  37895.  
  37896.           Input 
  37897.  
  37898.           session       (Object(DS_C_SESSION)). The directory session against 
  37899.                         which this operation is performed.  This must be a 
  37900.                         private object. 
  37901.  
  37902.           context       (Object(DS_C_CONTEXT)). The directory context to be 
  37903.                         used for this operation. Note that DS_SIZE_LIMIT and 
  37904.                         DS_DONT_DEREFERENCE_ALIASES do not apply to this 
  37905.                         operation.  This parameter must be a private object or 
  37906.                         the DS_DEFAULT_CONTEXT constant. 
  37907.  
  37908.           name          (Object(DS_C_NAME)).  The name of the target object 
  37909.                         entry.  Any aliases in the name are not dereferenced. 
  37910.  
  37911.           changes       (Object(DS_C_ENTRY_MODIFICATION_LIST)). A sequence of 
  37912.                         modifications to the named entry. 
  37913.  
  37914.           Output 
  37915.  
  37916.           invoke_id_return (integer).  Not supported. 
  37917.  
  37918.  Usage 
  37919.  
  37920.           The ds_modify_entry routine is used to make a series of one or more 
  37921.           of the following changes to a single directory entry: 
  37922.  
  37923.             o  Add a new attribute (DS_ADD_ATTRIBUTE). 
  37924.             o  Remove an attribute (DS_REMOVE_ATTRIBUTE). 
  37925.             o  Add attribute values (DS_ADD_VALUES). 
  37926.             o  Remove attribute values (DS_REMOVE_VALUES). 
  37927.  
  37928.           Values can be replaced by a combination of adding values and removing 
  37929.           values in a single operation. 
  37930.  
  37931.           The result of the operation is as if each modification is made in the 
  37932.           order specified in the changes parameter. If any of the individual 
  37933.           modifications fails, then a DS_C_ATTRIBUTE_ERROR is reported. 
  37934.  
  37935.  Notes 
  37936.  
  37937.           Note the following issues for the ds_modify_entry operation: 
  37938.  
  37939.             o  Naming schema rules do not apply in CDS. Thus, the following 
  37940.                attribute errors are never returned by CDS: 
  37941.  
  37942.                  -  DS_E_NO_SUCH_ATTRIBUTE_OR_VALUE 
  37943.                  -  DS_E_ATTRIBUTE_OR_VALUE_ALREADY_EXISTS Naming operations 
  37944.                   that would normally return these errors succeed in CDS. In 
  37945.                   particular, the addition of an attribute that already exists 
  37946.                   does not return with an error.  Instead, the values of the 
  37947.                   attribute to be added are combined with the values of the 
  37948.                   existing attribute. 
  37949.  
  37950.             o  GDS-structured attribute types are not supported by CDS. If a 
  37951.                GDS-structured attribute type is used as a parameter to 
  37952.                ds_modify_entry on a CDS object, then it returns with a 
  37953.                DS_C_ATTRIBUTE_ERROR (DS_E_CONSTRAINT_VIOLATION). In CDS, 
  37954.                ds_modify_entry can only be used on leaf objects; otherwise, a 
  37955.                DS_C_NAME_ERROR (DS_E_NO_SUCH_OBJECT) is returned. 
  37956.  
  37957.           This operation is not atomic for XDS/XOM over CDS. 
  37958.  
  37959.  Return Codes 
  37960.  
  37961.           If all the modifications succeeded, the routine returns DS_SUCCESS. 
  37962.           Otherwise, it returns one of the following errors: 
  37963.  
  37964.             o  DS_C_SYSTEM_ERROR 
  37965.  
  37966.             o  The following DS_C_LIBRARY_ERROR errors: 
  37967.  
  37968.                     DS_E_BAD_ARGUMENT 
  37969.                     DS_E_BAD_CONTEXT 
  37970.                     DS_E_BAD_NAME 
  37971.                     DS_E_BAD_SESSION 
  37972.                     DS_E_MISCELLANEOUS 
  37973.                     DS_E_MISSING_TYPE 
  37974.                     DS_E_TOO_MANY_OPERATIONS 
  37975.  
  37976.             o  The following directory errors: 
  37977.  
  37978.                     DS_C_ATTRIBUTE_ERROR 
  37979.                     DS_C_NAME_ERROR 
  37980.                     DS_C_REFERRAL 
  37981.                     DS_C_SECURITY_ERROR 
  37982.                     DS_C_SERVICE_ERROR 
  37983.                     DS_C_UPDATE_ERROR 
  37984.  
  37985.             o  DS_COMMUNICATIONS_ERROR 
  37986.  
  37987.             o  The DS_NO_WORKSPACE error constant. 
  37988.  
  37989.  
  37990. ΓòÉΓòÉΓòÉ 6.1.7. ds_read ΓòÉΓòÉΓòÉ
  37991.  
  37992.  Purpose 
  37993.  
  37994.           Queries information on an entry by name. 
  37995.  
  37996.  Format 
  37997.  
  37998.                     #include <xom.h>
  37999.                     #include <xds.h>
  38000.  
  38001.                     DS_status ds_read(
  38002.                            OM_private_object  session,
  38003.                            OM_private_object  context,
  38004.                            OM_object  name,
  38005.                            OM_object  selection,
  38006.                            OM_private_object  *result_return,
  38007.                            OM_sint  *invoke_id_return);
  38008.  
  38009.  Parameters 
  38010.  
  38011.           Input 
  38012.  
  38013.           session       (Object (DS_C_SESSION)). The directory session this 
  38014.                         operation is performed against. This must be a private 
  38015.                         object. 
  38016.  
  38017.           context       (Object (DS_C_CONTEXT)). The directory context to be 
  38018.                         used for this operation. Note that DS_SIZE_LIMIT does 
  38019.                         not apply to this operation. This parameter must be a 
  38020.                         private object or the DS_DEFAULT_CONTEXT constant. 
  38021.  
  38022.           name          (Object (DS_C_NAME)). The name of the target object 
  38023.                         entry. Any aliases in the name are dereferenced unless 
  38024.                         prohibited by the DS_DONT_DEREFERENCE_ALIASES service 
  38025.                         control attribute of the DS_C_CONTEXT object. 
  38026.  
  38027.           selection     (Object (DS_C_ENTRY_INFORMATION_SELECTION)). Specifies 
  38028.                         what information from the entry is requested. 
  38029.                         Information about no attributes, all attributes, or 
  38030.                         only for a named set can be chosen. Attribute types are 
  38031.                         always returned, but the attribute values need not be 
  38032.                         returned. The possible values of this parameter are 
  38033.                         given in DCE for OS/2 Warp: Application Development 
  38034.                         Guide - Core Components. 
  38035.  
  38036.           Output 
  38037.  
  38038.           result_return (Object (DS_C_READ_RESULT)). Upon successful 
  38039.                         completion, the result contains the DN of the target 
  38040.                         object, and a flag indicating whether the result came 
  38041.                         from the original entry or a copy. It also contains any 
  38042.                         requested attribute types and values. Attribute 
  38043.                         information is only returned if access rights are 
  38044.                         sufficient. 
  38045.  
  38046.           invoke_id_return (integer).  Not supported. 
  38047.  
  38048.  Usage 
  38049.  
  38050.           The ds_read routine is used to extract information from an explicitly 
  38051.           named entry. It can also be used to verify a distinguished name (DN). 
  38052.  
  38053.  Notes 
  38054.  
  38055.           Note the following issues for the ds_read operation: 
  38056.  
  38057.             o  Since CDS does not implement the X.500 schema rules, some CDS 
  38058.                objects may not contain mandatory attributes like object class 
  38059.                and so on. 
  38060.  
  38061.             o  In CDS, the naming attribute of an object is not stored in the 
  38062.                attribute list for the object.  Therefore in CDS, ds_read does 
  38063.                not return this attribute in the attribute list for an object. 
  38064.  
  38065.  Return Codes 
  38066.  
  38067.           On successful completion, the routine returns DS_SUCCESS. Otherwise, 
  38068.           it returns one of the following errors: 
  38069.  
  38070.             o  DS_C_SYSTEM_ERROR 
  38071.  
  38072.             o  The following DS_C_LIBRARY_ERROR errors: 
  38073.  
  38074.                     DS_E_BAD_ARGUMENT 
  38075.                     DS_E_BAD_ATTRIBUTE 
  38076.                     DS_E_BAD_CONTEXT 
  38077.                     DS_E_BAD_NAME 
  38078.                     DS_E_BAD_SESSION 
  38079.                     DS_E_MISCELLANEOUS 
  38080.                     DS_E_MISSING_TYPE 
  38081.                     DS_E_TOO_MANY_OPERATIONS 
  38082.  
  38083.             o  The following directory errors: 
  38084.  
  38085.                     DS_C_ATTRIBUTE_ERROR 
  38086.                     DS_C_NAME_ERROR 
  38087.                     DS_C_REFERRAL 
  38088.                     DS_C_SECURITY_ERROR 
  38089.                     DS_C_SERVICE_ERROR 
  38090.  
  38091.             o  DS_COMMUNICATIONS_ERROR 
  38092.  
  38093.             o  The DS_NO_WORKSPACE error constant. 
  38094.  
  38095.           Notes  In GDS, a DS_C_ATTRIBUTE_ERROR 
  38096.                  (DS_E_NO_SUCH_ATTRIBUTE_OR_VALUE) is reported if an explicit 
  38097.                  list of attributes is specified by the selection parameter, 
  38098.                  but none of them are present in the entry.  This error is not 
  38099.                  reported if any of the selected attributes are present. 
  38100.  
  38101.           A DS_C_SECURITY_ERROR (DS_E_INSUFFICIENT_ACCESS_RIGHTS) is only 
  38102.           reported where access rights preclude the reading of all requested 
  38103.           attribute values. 
  38104.  
  38105.  Related Information 
  38106.  
  38107.           Books: 
  38108.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  38109.  
  38110.  
  38111. ΓòÉΓòÉΓòÉ 6.1.8. ds_remove_entry ΓòÉΓòÉΓòÉ
  38112.  
  38113.  Purpose 
  38114.  
  38115.           Removes a leaf entry from the Directory Information Tree (DIT). 
  38116.  
  38117.  Format 
  38118.  
  38119.                     #include <xom.h>
  38120.                     #include <xds.h>
  38121.  
  38122.                     DS_status ds_remove_entry(
  38123.                            OM_private_object  session,
  38124.                            OM_private_object  context,
  38125.                            OM_object  name,
  38126.                            OM_sint  *invoke_id_return);
  38127.  
  38128.  Parameters 
  38129.  
  38130.           Input 
  38131.  
  38132.           session       (Object (DS_C_SESSION). The directory session this 
  38133.                         operation is performed against. This must be a private 
  38134.                         object. 
  38135.  
  38136.           context       (Object (DS_C_CONTEXT)). The directory context to be 
  38137.                         used for this operation. Note that DS_SIZE_LIMIT and 
  38138.                         DS_DONT_DEREFERENCE_ALIASES do not apply to this 
  38139.                         operation. This parameter must be a private object or 
  38140.                         the DS_DEFAULT_CONTEXT constant. 
  38141.  
  38142.           name          (Object (DS_C_NAME)). The name of the target object 
  38143.                         entry. Any aliases in the name are not dereferenced. 
  38144.  
  38145.           Output 
  38146.  
  38147.           invoke_id_return (Integer).  Not supported. 
  38148.  
  38149.  Usage 
  38150.  
  38151.           The ds_remove_entry routine is used to remove a leaf entry from the 
  38152.           directory (either an object entry or an alias entry). 
  38153.  
  38154.  Return Codes 
  38155.  
  38156.           On successful completion, the routine returns DS_SUCCESS. Otherwise, 
  38157.           it returns one of the following errors: 
  38158.  
  38159.             o  DS_C_SYSTEM_ERROR 
  38160.  
  38161.             o  The following DS_C_LIBRARY_ERROR errors: 
  38162.  
  38163.                     DS_E_BAD_ARGUMENT 
  38164.                     DS_E_BAD_CONTEXT 
  38165.                     DS_E_BAD_NAME 
  38166.                     DS_E_BAD_SESSION 
  38167.                     DS_E_MISCELLANEOUS 
  38168.                     DS_E_MISSING_TYPE 
  38169.                     DS_E_TOO_MANY_OPERATIONS 
  38170.  
  38171.             o  The following directory errors: 
  38172.  
  38173.                     DS_C_NAME_ERROR 
  38174.                     DS_C_REFERRAL 
  38175.                     DS_C_SECURITY_ERROR 
  38176.                     DS_C_SERVICE_ERROR 
  38177.                     DS_C_UPDATE_ERROR 
  38178.  
  38179.             o  DS_C_COMMUNICATIONS_ERROR 
  38180.  
  38181.             o  The DS_NO_WORKSPACE error constant. 
  38182.  
  38183.  
  38184. ΓòÉΓòÉΓòÉ 6.1.9. ds_shutdown ΓòÉΓòÉΓòÉ
  38185.  
  38186.  Purpose 
  38187.  
  38188.           Shuts down the interface. 
  38189.  
  38190.  Format 
  38191.  
  38192.                     #include <xom.h>
  38193.                     #include <xds.h>
  38194.  
  38195.                     DS_status ds_shutdown(
  38196.                            OM_workspace  workspace);
  38197.  
  38198.  Parameters 
  38199.  
  38200.           Input 
  38201.  
  38202.           workspace     Specifies the workspace (obtained from a call to 
  38203.                         ds_initialize) that is to be deleted. 
  38204.  
  38205.  Usage 
  38206.  
  38207.           The ds_shutdown routine deletes the workspace established by 
  38208.           ds_initialize and enables the service to release resources. All 
  38209.           sessions associated with the workspace must be terminated by calling 
  38210.           ds_unbind prior to calling ds_shutdown. No other directory interface 
  38211.           routine can reference the specified workspace after it is deleted. 
  38212.           However, om_delete and om_instance can be called if referring to 
  38213.           public objects. 
  38214.  
  38215.  Return Codes 
  38216.  
  38217.           On successful completion, the routine returns DS_SUCCESS. Otherwise, 
  38218.           it returns one of the following errors: 
  38219.  
  38220.             o  DS_C_SERVICE_ERROR (value DS_E_BUSY) if ds_shutdown is called 
  38221.                before all directory connections have been released with 
  38222.                ds_unbind. 
  38223.  
  38224.             o  The DS_INVALID_WORKSPACE error constant. 
  38225.           This routine does not return a DS_C_COMMUNICATIONS_ERROR or any 
  38226.           directory errors. 
  38227.  
  38228.  Related Information 
  38229.  
  38230.           Routines: 
  38231.           ds_initialize 
  38232.  
  38233.  
  38234. ΓòÉΓòÉΓòÉ 6.1.10. ds_unbind ΓòÉΓòÉΓòÉ
  38235.  
  38236.  Purpose 
  38237.  
  38238.           Unbinds from a directory session. 
  38239.  
  38240.  Format 
  38241.  
  38242.                     #include <xom.h>
  38243.                     #include <xds.h>
  38244.  
  38245.                     DS_status ds_unbind(
  38246.                            OM_private_object  session);
  38247.  
  38248.  Parameters 
  38249.  
  38250.           Input 
  38251.  
  38252.           session       (Object (DS_C_SESSION)). The directory session that is 
  38253.                         to be unbound. This must be a private object. The value 
  38254.                         of the DS_FILE_DESCRIPTOR OM attribute is 
  38255.                         DS_NO_VALID_FILE_DESCRIPTOR if the routine succeeds. 
  38256.                         The remaining OM attributes are unchanged. 
  38257.  
  38258.  Usage 
  38259.  
  38260.           The ds_unbind routine terminates the given directory session, and 
  38261.           makes the parameter unavailable for use with other interface routines 
  38262.           (except ds_bind). 
  38263.  
  38264.           The unbound session can be used again as a parameter to ds_bind 
  38265.           possibly after modification by the Object Management routines. When 
  38266.           it is no longer required, it must be deleted using the Object 
  38267.           Management routines. 
  38268.  
  38269.  Return Codes 
  38270.  
  38271.           On successful completion, the routine returns DS_SUCCESS. Otherwise, 
  38272.           it returns one of the following errors: 
  38273.  
  38274.             o  DS_C_SYSTEM_ERROR 
  38275.  
  38276.             o  DS_C_SERVICE_ERROR (value DS_E_BUSY) if ds_shutdown is called 
  38277.                before all directory connections have been released with 
  38278.                ds_unbind. 
  38279.  
  38280.             o  The following DS_C_LIBRARY_ERROR errors: 
  38281.  
  38282.                     DS_E_BAD_SESSION 
  38283.                     DS_E_MISCELLANEOUS 
  38284.  
  38285.             o  The DS_NO_WORKSPACE error constant. 
  38286.           This routine does not return a DS_C_COMMUNICATIONS_ERROR or any 
  38287.           directory errors. 
  38288.  
  38289.  Related Information 
  38290.  
  38291.           Routines: 
  38292.           ds_bind 
  38293.  
  38294.  
  38295. ΓòÉΓòÉΓòÉ 6.1.11. ds_version ΓòÉΓòÉΓòÉ
  38296.  
  38297.  Purpose 
  38298.  
  38299.           Negotiates features of the interface and service. 
  38300.  
  38301.  Format 
  38302.  
  38303.                     #include <xom.h>
  38304.                     #include <xds.h>
  38305.  
  38306.                     DS_status ds_version(
  38307.                            DS_feature  feature_list[],
  38308.                            OM_workspace  workspace);
  38309.  
  38310.  Parameters 
  38311.  
  38312.           Input 
  38313.  
  38314.           workspace     Specifies the workspace obtained from a call to 
  38315.                         om_initialize for which the features are to be 
  38316.                         negotiated.  The features are in effect for operations 
  38317.                         that use the workspace or directory sessions associated 
  38318.                         with the workspace. 
  38319.  
  38320.           Input/Output 
  38321.  
  38322.           feature_list[] An ordered sequence of features, each represented by 
  38323.                         an object identifier. The sequence is terminated by an 
  38324.                         object identifier having no components (a length of 0 
  38325.                         (zero) and any value for the data pointer.) If the 
  38326.                         routine completed successfully, an ordered sequence of 
  38327.                         boolean values is returned, with the same number of 
  38328.                         elements as the feature_list parameter. If this 
  38329.                         parameter contains OM_TRUE, each value indicates that 
  38330.                         the corresponding feature is now part of the interface. 
  38331.                         If this parameter contains OM_FALSE, each value 
  38332.                         indicates that the corresponding feature is not 
  38333.                         available. 
  38334.  
  38335.                         This result is combined with the feature_list parameter 
  38336.                         as a single array of structures of type DS_feature, 
  38337.                         which is defined as follows: 
  38338.  
  38339.                                                 typedef struct
  38340.                                                 {
  38341.                                                    OM_object_identifier  feature;
  38342.                                                    OM_boolean  activated;
  38343.                                                 } DS_feature;
  38344.  
  38345.  Usage 
  38346.  
  38347.           The ds_version routine negotiates features of the interface, which 
  38348.           are represented by object identifiers. The DS_SERVICE_PACKAGE is 
  38349.           supported for use with CDS. The ds_version routine cannot be issued 
  38350.           until after a workspace is initialized with ds_initialize. 
  38351.  
  38352.           Note:  The user is not required to issue the ds_version routine when 
  38353.                  accessing CDS. 
  38354.  
  38355.  Return Codes 
  38356.  
  38357.           On successful completion, the routine returns DS_SUCCESS. Otherwise, 
  38358.           it returns one of the following errors: 
  38359.  
  38360.             o  DS_C_SYSTEM_ERROR 
  38361.  
  38362.             o  The following DS_C_LIBRARY_ERROR errors: 
  38363.  
  38364.                     DS_E_BAD_WORKSPACE 
  38365.                     DS_E_MISCELLANEOUS 
  38366.  
  38367.             o  The DS_NO_WORKSPACE error constant. 
  38368.  
  38369.  Related Information 
  38370.  
  38371.           Books: 
  38372.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  38373.  
  38374.  
  38375. ΓòÉΓòÉΓòÉ 6.1.12. dsX_extract_attr_values ΓòÉΓòÉΓòÉ
  38376.  
  38377.  Purpose 
  38378.  
  38379.           Extracts attribute values from an OM object. 
  38380.  
  38381.  Format 
  38382.  
  38383.                     #include <xom.h>
  38384.                     #include <xds.h>
  38385.                     #include <xdsext.h>
  38386.  
  38387.                     OM_return_code dsX_extract_attr_values(
  38388.                             OM_private_object  object,
  38389.                             OM_object_identifier  attribute_type,
  38390.                             OM_boolean  local_strings,
  38391.                             OM_public_object  *values,
  38392.                             OM_value_position  *total_number);
  38393.  
  38394.  Parameters 
  38395.  
  38396.           Input 
  38397.  
  38398.           object        The private object from which the attribute values are 
  38399.                         to be extracted. Objects of type DS_C_ATTRIBUTE_LIST or 
  38400.                         DS_C_ENTRY_INFO are supported. 
  38401.  
  38402.           attribute_type The attribute type from which the values are to be 
  38403.                         extracted. 
  38404.  
  38405.           local_strings Indicates whether the conversion to local string format 
  38406.                         should be performed. This parameter is not supported. 
  38407.  
  38408.           Output 
  38409.  
  38410.           values        Present only if the return value from OM_return_code is 
  38411.                         OM_SUCCESS. This parameter points to a public object 
  38412.                         containing an array of OM descriptors with the 
  38413.                         extracted attribute values. 
  38414.  
  38415.           total_number  Contains the total number of attribute values that have 
  38416.                         been extracted. 
  38417.  
  38418.                         Note:  The total includes only the attribute 
  38419.                                descriptors in the values parameter. It excludes 
  38420.                                the special descriptor signaling the end of a 
  38421.                                public object. 
  38422.  
  38423.  
  38424.  Usage 
  38425.  
  38426.           The dsX_extract_attr_values routine is used to extract the attribute 
  38427.           values associated with the specified attribute type from an OM 
  38428.           object. The OM object must be of type DS_C_ATTRIBUTE_LIST or 
  38429.           DS_C_ENTRY_INFO. It returns an object containing an array of OM 
  38430.           descriptors. 
  38431.  
  38432.  Notes 
  38433.  
  38434.           The memory space for the values return parameter is allocated by 
  38435.           dsX_extract_attr_values. The calling application is responsible for 
  38436.           releasing this memory with the om_delete routine. 
  38437.  
  38438.  Return Codes 
  38439.  
  38440.           On successful completion, the routine returns OM_SUCCESS in the 
  38441.           OM_return_code variable. Otherwise, it returns one of the constants 
  38442.           defined in the xom.h header file. 
  38443.  
  38444.  
  38445. ΓòÉΓòÉΓòÉ 6.2. XDS Header Files ΓòÉΓòÉΓòÉ
  38446.  
  38447. There are ten XDS header files. The following four are required for using the 
  38448. XDS API over CDS: 
  38449.  
  38450.  xds.h          Contains definitions for the XDS routines and Directory Service 
  38451.                 Package. This header file must be included by all applications 
  38452.                 using the XDS API. 
  38453.  
  38454.  xdsbdcp.h      Contains definitions for the Basic Directory Contents Package. 
  38455.                 This header file is part of the X/Open XDS specifications and 
  38456.                 is required when using the Basic Directory Contents Package. 
  38457.  
  38458.  xdscds.h       Contains definitions for the Cell Directory Package. This 
  38459.                 header file is a DCE extension to the XDS API, and is required 
  38460.                 when using CDS. 
  38461.  
  38462.  xdsext.h       Contains definitions for the convenience library routines. 
  38463.  
  38464.  The following six header files are shipped for users that have applications 
  38465.  that work with both CDS and GDS: 
  38466.  
  38467.    o  xdsdme.h 
  38468.    o  xdsgds.h 
  38469.    o  xdsmdup.h 
  38470.    o  xdssap.h 
  38471.    o  xmhp.h 
  38472.    o  xmsga.h 
  38473.  Using these files allows the application to compile, but only accesses to CDS 
  38474.  entries will be successful. These header files are found in the directory 
  38475.  d:\opt\dcelocal\include where d: is the drive where DCE is installed. 
  38476.  
  38477.  
  38478. ΓòÉΓòÉΓòÉ 6.3. X/OPEN OSI-Abstract-Data Manipulation Routines ΓòÉΓòÉΓòÉ
  38479.  
  38480. The X/Open Object Management (XOM) routines comprise the C interface. The 
  38481. service interface comprises a number of routines whose purpose and range of 
  38482. capabilities are summarized as follows: 
  38483.  
  38484.  om_copy        This routine creates an independent copy of an existing private 
  38485.                 object and all its subobjects. The copy is placed in the work 
  38486.                 space of the original object, or in another specified by the 
  38487.                 XOM application. 
  38488.  
  38489.  om_copy_value  This routine replaces an existing attribute value or inserts a 
  38490.                 new value in one private object with a copy of an existing 
  38491.                 attribute value found in another. Both values must be strings. 
  38492.  
  38493.  om_create      This routine creates a new private object that is an instance 
  38494.                 of a particular class. The object can be initialized with the 
  38495.                 attribute values specified as initial in the class definition. 
  38496.  
  38497.                 The service does not permit the API user to explicitly create 
  38498.                 instances of all classes, but rather only those indicated by a 
  38499.                 package's definition as having this property. 
  38500.  
  38501.  om_delete      This routine deletes a service-generated public object, or 
  38502.                 makes a private object inaccessible. 
  38503.  
  38504.  om_get         This routine creates a new public object that is an exact but 
  38505.                 independent copy of an existing private object. The client can 
  38506.                 request certain exclusions, each of which reduces the copy to a 
  38507.                 part of the original. The client can also request that values 
  38508.                 be converted from one syntax to another before they are 
  38509.                 returned. 
  38510.  
  38511.                 The copy can exclude attributes of types other than those 
  38512.                 specified, values at positions other than those specified 
  38513.                 within an attribute, the values of multivalued attributes, 
  38514.                 copies of (not handles for) subobjects, or all attribute values 
  38515.                 (revealing only an attribute's presence). 
  38516.  
  38517.  om_instance    This routine determines whether an object is an instance of a 
  38518.                 particular class. The client can determine an object's class 
  38519.                 simply by inspection. This routine is useful since it reveals 
  38520.                 that an object is an instance of a particular class, even if 
  38521.                 the object is an instance of a subclass of that class. 
  38522.  
  38523.  om_put         This routine places or replaces in one private object copies of 
  38524.                 the attribute values of another public or private object. 
  38525.  
  38526.                 The source values can be inserted before any existing 
  38527.                 destination values, before the value at a specified position in 
  38528.                 the destination attribute, or after any existing destination 
  38529.                 values. Alternatively, the source values can be substituted for 
  38530.                 any existing destination values or for the values at specified 
  38531.                 positions in the destination attribute. 
  38532.  
  38533.  om_read        This routine reads a segment of a value of an attribute of a 
  38534.                 private object.  The value must be a string. The value can 
  38535.                 first be converted from one syntax to another. The routine 
  38536.                 enables the client to read an arbitrarily long value without 
  38537.                 requiring that the service place a copy of the entire value in 
  38538.                 memory. 
  38539.  
  38540.  om_remove      This routine removes and discards particular values of an 
  38541.                 attribute of a private object. The attribute itself is removed 
  38542.                 if no values remain. 
  38543.  
  38544.  om_write       This routine writes a segment of a value of an attribute to a 
  38545.                 private object.  The value must be a string. The segment can 
  38546.                 first be converted from one syntax to another. The written 
  38547.                 segment becomes the value's last segment since any elements 
  38548.                 beyond it are discarded. The routine enables the client to 
  38549.                 write an arbitrarily long value without having to place a copy 
  38550.                 of the entire value in memory. 
  38551.  
  38552.  omX_extract    This routine creates a new public object that is an exact but 
  38553.                 independent copy of an existing subobject in a private object. 
  38554.                 It is similar to the om_get routine but includes an additional 
  38555.                 parameter, navigation_path, which contains directions to the 
  38556.                 required object to be extracted. 
  38557.  
  38558.  omX_fill       This routine initializes an OM descriptor structure with 
  38559.                 user-supplied values for it's type, syntax, and value. 
  38560.  
  38561.  omX_fill_oid   This routine initializes an OM descriptor structure with 
  38562.                 user-supplied values for it's type and value. The syntax of the 
  38563.                 descriptor is always set to OM_S_OBJECT_IDENTIFIER_STRING. 
  38564.  
  38565.  omX_object_to_string This routine converts an OM object into a string format. 
  38566.  
  38567.  omX_string_to_object This routine creates a new private object, which is built 
  38568.                 from the string and class input parameters. 
  38569.  
  38570.  In the C interface, the routines are realized by macros. The routine prototype 
  38571.  in the Format section of the routine specification shows the client's view of 
  38572.  the routine. 
  38573.  
  38574.  The intent of the interface definition is that each routine be atomic; that 
  38575.  is, either it carries out its assigned task in full and reports success, or it 
  38576.  fails to carry out even a part of the task and reports an exception.  However, 
  38577.  the service does not guarantee that a task is always carried out in full. 
  38578.  
  38579.  Notes 
  38580.  
  38581.    o  XOM routines check for NULL pointers and return an error except for work 
  38582.       space pointers. 
  38583.  
  38584.    o  Pointers are checked only at the routine interface. The check is only for 
  38585.       NULL and not for validity. If NULL pointers or invalid pointers are 
  38586.       passed this may result in an undetermined behavior. 
  38587.  
  38588.    o  All of the routines in the XOM interface include the xom.h header file. 
  38589.  
  38590.  
  38591. ΓòÉΓòÉΓòÉ 6.4. XOM Header Files ΓòÉΓòÉΓòÉ
  38592.  
  38593. The XOM header files are xom.h, xomi.h, and xomext.h. The xom.h file includes 
  38594. xomi.h, which is used by the service interface. The xom.h header file contains 
  38595. the XOM definition required by applications. The xomext.h file contains 
  38596. definitions for the convenience library routines. All of these files can be 
  38597. found in the directory d:\opt\dcelocal\include where d: is the drive where DCE 
  38598. is installed. 
  38599.  
  38600.  
  38601. ΓòÉΓòÉΓòÉ 6.4.1. om_copy ΓòÉΓòÉΓòÉ
  38602.  
  38603.  Purpose 
  38604.  
  38605.           Creates a new private object that is an exact but independent copy of 
  38606.           an existing private object. 
  38607.  
  38608.  Format 
  38609.  
  38610.                     #include <xom.h>
  38611.  
  38612.                     OM_return_code om_copy(
  38613.                            OM_private_object  original,
  38614.                            OM_workspace  workspace,
  38615.                            OM_private_object  *copy);
  38616.  
  38617.  Parameters 
  38618.  
  38619.           Input 
  38620.  
  38621.           original      The original that remains accessible. 
  38622.  
  38623.           workspace     The work space where the copy is to be created. The 
  38624.                         original's class must be in a package associated with 
  38625.                         this work space. 
  38626.  
  38627.           Output 
  38628.  
  38629.           copy          The new copy of the private object. This result is 
  38630.                         present if, and only if, the return value for 
  38631.                         OM_return_code is OM_SUCCESS. 
  38632.  
  38633.  Usage 
  38634.  
  38635.           The om_copy routine creates a new private object, the copy, that is 
  38636.           an exact but independent copy of an existing private object, the 
  38637.           original. The routine is recursive, which means that copying the 
  38638.           original also copies its subobjects. 
  38639.  
  38640.  Return Codes 
  38641.  
  38642.           On successful completion, the routine returns OM_SUCCESS in the 
  38643.           OM_return_code variable. Otherwise, it returns one of the following 
  38644.           errors: 
  38645.  
  38646.                OM_FUNCTION_INTERRUPTED 
  38647.                OM_MEMORY_INSUFFICIENT 
  38648.                OM_NETWORK_ERROR 
  38649.                OM_NO_SUCH_CLASS 
  38650.                OM_NO_SUCH_OBJECT 
  38651.                OM_NO_SUCH_WORKSPACE 
  38652.                OM_NOT_PRIVATE 
  38653.                OM_PERMANENT_ERROR 
  38654.                OM_POINTER_INVALID 
  38655.                OM_SYSTEM_ERROR 
  38656.                OM_TEMPORARY_ERROR 
  38657.                OM_TOO_MANY_VALUES 
  38658.  
  38659.           The exact constants for OM_return_code are defined in the xom.h 
  38660.           header file. 
  38661.  
  38662.  
  38663. ΓòÉΓòÉΓòÉ 6.4.2. om_copy_value ΓòÉΓòÉΓòÉ
  38664.  
  38665.  Purpose 
  38666.  
  38667.           Places or replaces a string in one private object with a copy of a 
  38668.           string in another private object. 
  38669.  
  38670.  Format 
  38671.  
  38672.                     #include <xom.h>
  38673.  
  38674.                     OM_return_code  om_copy_value(
  38675.                               OM_private_object  source,
  38676.                               OM_type  source_type,
  38677.                               OM_value_position  source_value_position,
  38678.                               OM_private_object  destination,
  38679.                               OM_type  destination_type,
  38680.                               OM_value_position  destination_value_position);
  38681.  
  38682.  Parameters 
  38683.  
  38684.           Input 
  38685.  
  38686.           source        The source that remains accessible. 
  38687.  
  38688.           source_type   Identifies the type of an attribute.  One of the 
  38689.                         attribute values is copied. 
  38690.  
  38691.           source_value_position The position within the attribute referred to 
  38692.                         by source_type of the value copied. 
  38693.  
  38694.           destination   The destination that remains accessible. 
  38695.  
  38696.           destination_type Identifies the type of the attribute. One of the 
  38697.                         attribute values is placed or replaced. 
  38698.  
  38699.           destination_value_position The position within the destination 
  38700.                         attribute of the value placed or replaced. If the value 
  38701.                         position exceeds the number of values present in the 
  38702.                         destination attribute, the parameter is assumed to be 
  38703.                         equal to that number. 
  38704.  
  38705.  Usage 
  38706.  
  38707.           The om_copy_value routine places or replaces an attribute value in 
  38708.           one private object (the destination) with a copy of an attribute 
  38709.           value in another private object (the source). The source value is a 
  38710.           string. The copy's syntax is that of the original. 
  38711.  
  38712.  Return Codes 
  38713.  
  38714.           On successful completion, the routine returns OM_SUCCESS in the 
  38715.           OM_return_code variable. Otherwise, it returns one of the following 
  38716.           errors: 
  38717.  
  38718.                OM_FUNCTION_DECLINED 
  38719.                OM_FUNCTION_INTERRUPTED 
  38720.                OM_MEMORY_INSUFFICIENT 
  38721.                OM_NETWORK_ERROR 
  38722.                OM_NO_SUCH_OBJECT 
  38723.                OM_NO_SUCH_TYPE 
  38724.                OM_NOT_PRESENT 
  38725.                OM_NOT_PRIVATE 
  38726.                OM_PERMANENT_ERROR 
  38727.                OM_POINTER_INVALID 
  38728.                OM_SYSTEM_ERROR 
  38729.                OM_TEMPORARY_ERROR 
  38730.                OM_WRONG_VALUE_LENGTH 
  38731.                OM_WRONG_VALUE_SYNTAX 
  38732.                OM_WRONG_VALUE_TYPE 
  38733.  
  38734.           The exact constants for OM_return_code are defined in the xom.h 
  38735.           header file. 
  38736.  
  38737.  
  38738. ΓòÉΓòÉΓòÉ 6.4.3. om_create ΓòÉΓòÉΓòÉ
  38739.  
  38740.  Purpose 
  38741.  
  38742.           Creates a new private object that is an instance of a particular 
  38743.           class. 
  38744.  
  38745.  Format 
  38746.  
  38747.                     #include <xom.h>
  38748.  
  38749.                     OM_return_code  om_create(
  38750.                            OM_object_identifier  class,
  38751.                            OM_boolean  initialize,
  38752.                            OM_workspace  workspace,
  38753.                            OM_private_object  *object);
  38754.  
  38755.  Parameters 
  38756.  
  38757.           Input 
  38758.  
  38759.           class         Identifies the class of the object to be created. The 
  38760.                         specified class is concrete. 
  38761.  
  38762.           initialize    Determines whether the object created is initialized as 
  38763.                         specified in the definition of its class. If this 
  38764.                         parameter is OM_TRUE, the object is made to comprise 
  38765.                         the attribute values specified as initial values in the 
  38766.                         tabular definitions of the object's class and its 
  38767.                         superclasses. If this parameter is OM_FALSE, the object 
  38768.                         is made to comprise the OM_CLASS attribute alone. 
  38769.  
  38770.           workspace     The work space where the object is created. The 
  38771.                         specified class is in a package associated with this 
  38772.                         work space. 
  38773.  
  38774.           Output 
  38775.  
  38776.           object        The created object.  This result is present if, and 
  38777.                         only if, the return value for OM_return_code is 
  38778.                         OM_SUCCESS. 
  38779.  
  38780.  Usage 
  38781.  
  38782.           The om_create routine creates a new private object that is an 
  38783.           instance of a particular class. 
  38784.  
  38785.  Notes 
  38786.  
  38787.           By subsequently adding new values to the object and replacing and 
  38788.           removing existing values, the client can create all conceivable 
  38789.           instances of the object's class. 
  38790.  
  38791.  Return Codes 
  38792.  
  38793.           On successful completion, the routine returns OM_SUCCESS in the 
  38794.           OM_return_code variable. Otherwise, it returns one of the following 
  38795.           errors: 
  38796.  
  38797.                OM_FUNCTION_DECLINED 
  38798.                OM_FUNCTION_INTERRUPTED 
  38799.                OM_MEMORY_INSUFFICIENT 
  38800.                OM_NETWORK_ERROR 
  38801.                OM_NO_SUCH_CLASS 
  38802.                OM_NO_SUCH_WORKSPACE 
  38803.                OM_NOT_CONCRETE 
  38804.                OM_PERMANENT_ERROR 
  38805.                OM_POINTER_INVALID 
  38806.                OM_SYSTEM_ERROR 
  38807.                OM_TEMPORARY_ERROR 
  38808.  
  38809.           The exact constants for OM_return_code are defined in the xom.h 
  38810.           header file. 
  38811.  
  38812.  
  38813. ΓòÉΓòÉΓòÉ 6.4.4. om_delete ΓòÉΓòÉΓòÉ
  38814.  
  38815.  Purpose 
  38816.  
  38817.           Deletes a private or service-generated object. 
  38818.  
  38819.  Format 
  38820.  
  38821.                     #include <xom.h>
  38822.  
  38823.                     OM_return_code om_delete(
  38824.                            OM_object  subject);
  38825.  
  38826.  Parameters 
  38827.  
  38828.           Input 
  38829.  
  38830.           subject       The object that is to be deleted. 
  38831.  
  38832.  Usage 
  38833.  
  38834.           The om_delete routine deletes a service-generated public object or 
  38835.           makes a private object inaccessible. It is not intended for use on 
  38836.           client-generated public objects. 
  38837.  
  38838.           If applied to a service-generated public object, the routine deletes 
  38839.           the object and releases any resources associated with the object, 
  38840.           including the space occupied by descriptors and attribute values. 
  38841.           The routine is applied recursively to any public subobjects.  This 
  38842.           does not affect any private subobjects. 
  38843.  
  38844.           If applied to a private object, the routine makes the object 
  38845.           inaccessible.  Any existing object handles for the object are 
  38846.           invalidated.  The routine is applied recursively to any private 
  38847.           subobjects. 
  38848.  
  38849.  Return Codes 
  38850.  
  38851.           On successful completion, the routine returns OM_SUCCESS in the 
  38852.           OM_return_code variable. Otherwise, it returns one of the following 
  38853.           errors: 
  38854.  
  38855.                OM_FUNCTION_INTERRUPTED 
  38856.                OM_MEMORY_INSUFFICIENT 
  38857.                OM_NETWORK_ERROR 
  38858.                OM_NO_SUCH_OBJECT 
  38859.                OM_NO_SUCH_SYNTAX 
  38860.                OM_NO_SUCH_TYPE 
  38861.                OM_NOT_THE_SERVICES 
  38862.                OM_PERMANENT_ERROR 
  38863.                OM_POINTER_INVALID 
  38864.                OM_SYSTEM_ERROR 
  38865.                OM_TEMPORARY_ERROR 
  38866.  
  38867.           The exact constants for OM_return_code are defined in the xom.h 
  38868.           header file. 
  38869.  
  38870.  
  38871. ΓòÉΓòÉΓòÉ 6.4.5. om_get ΓòÉΓòÉΓòÉ
  38872.  
  38873.  Purpose 
  38874.  
  38875.           Creates a public copy of all or particular parts of a private object. 
  38876.  
  38877.  Format 
  38878.  
  38879.                     #include <xom.h>
  38880.  
  38881.                     OM_return_code om_get(
  38882.                            OM_private_object  original,
  38883.                            OM_exclusions  exclusions,
  38884.                            OM_type_list  included_types,
  38885.                            OM_boolean  local_strings,
  38886.                            OM_value_position  initial_value,
  38887.                            OM_value_position  limiting_value,
  38888.                            OM_public_object  *copy,
  38889.                            OM_value_position  *total_number);
  38890.  
  38891.  Parameters 
  38892.  
  38893.           Input 
  38894.  
  38895.           original      The original that remains accessible. 
  38896.  
  38897.           exclusions    Explicit requests for 0 (zero) or more exclusions, each 
  38898.                         of which reduces the copy to a prescribed portion of 
  38899.                         the original.  The exclusions apply to the attributes 
  38900.                         of the object but not to those of its subobjects. 
  38901.  
  38902.                         Apart from OM_NO_EXCLUSIONS, each value is chosen from 
  38903.                         the following list. When multiple exclusions are 
  38904.                         specified, each is applied in the order that it is 
  38905.                         displayed in the list with lower-numbered exclusions 
  38906.                         having precedence over higher-numbered exclusions.  If, 
  38907.                         after the application of an exclusion, that portion of 
  38908.                         the object is not returned, no further exclusions need 
  38909.                         be applied to that portion. 
  38910.  
  38911.                              OM_EXCLUDE_ALL_BUT_THESE_TYPES The copy includes 
  38912.                                            descriptors comprising only 
  38913.                                            attributes of specified types. Note 
  38914.                                            that this exclusion provides a means 
  38915.                                            for determining the values of 
  38916.                                            specified attributes, as well as the 
  38917.                                            syntaxes of those values. 
  38918.  
  38919.                              OM_EXCLUDE_MULTIPLES The copy includes a single 
  38920.                                            descriptor for each attribute that 
  38921.                                            has two or more values, rather than 
  38922.                                            one descriptor for each value.  None 
  38923.                                            of these descriptors contains an 
  38924.                                            attribute value, and the 
  38925.                                            OM_S_NO_VALUE bit of the syntax 
  38926.                                            component is set. 
  38927.  
  38928.                                            If the attribute has values of two 
  38929.                                            or more syntaxes, the descriptor 
  38930.                                            identifies one of those syntaxes; 
  38931.                                            however, the syntax identified is 
  38932.                                            not specified. Note that this 
  38933.                                            exclusion provides a means for 
  38934.                                            discerning the presence of 
  38935.                                            multivalued attributes without 
  38936.                                            simultaneously obtaining their 
  38937.                                            values. 
  38938.  
  38939.                              OM_EXCLUDE_ALL_BUT_THESE_VALUES The copy includes 
  38940.                                            descriptors comprising only values 
  38941.                                            at specified positions within an 
  38942.                                            attribute. Note that when this 
  38943.                                            exclusion is used in conjunction 
  38944.                                            with the 
  38945.                                            OM_EXCLUDE_ALL_BUT_THESE_TYPES 
  38946.                                            exclusion, it provides a means for 
  38947.                                            determining the values of a 
  38948.                                            specified attribute, as well as the 
  38949.                                            syntaxes of those values, one or 
  38950.                                            more but not all attributes at a 
  38951.                                            time. 
  38952.  
  38953.                              OM_EXCLUDE_VALUES The copy includes a single 
  38954.                                            descriptor for each attribute value, 
  38955.                                            but the descriptor does not contain 
  38956.                                            the value, and the OM_S_NO_VALUE bit 
  38957.                                            of the syntax component is set. Note 
  38958.                                            that this exclusion provides a means 
  38959.                                            for determining an object's 
  38960.                                            composition, that is, the type and 
  38961.                                            syntax of each of its attribute 
  38962.                                            values. 
  38963.  
  38964.                              OM_EXCLUDE_SUBOBJECTS The copy includes, for each 
  38965.                                            value whose syntax is OM_S_OBJECT, a 
  38966.                                            descriptor containing an object 
  38967.                                            handle for the original private 
  38968.                                            subobject, rather than a public copy 
  38969.                                            of it. This handle makes that 
  38970.                                            subobject accessible for use in 
  38971.                                            subsequent routine calls. Note that 
  38972.                                            this exclusion provides a means for 
  38973.                                            examining an object one level at a 
  38974.                                            time. 
  38975.  
  38976.                              OM_EXCLUDE_DESCRIPTORS When this exclusion is 
  38977.                                            specified, no descriptors are 
  38978.                                            returned and the copy result is not 
  38979.                                            present. The total_number parameter 
  38980.                                            reflects the number of descriptors 
  38981.                                            that would be returned by applying 
  38982.                                            the other inclusion and exclusion 
  38983.                                            specifications. Note that this 
  38984.                                            exclusion provides an attribute 
  38985.                                            analysis capability. For instance, 
  38986.                                            the total number of values in a 
  38987.                                            multivalued attribute can be 
  38988.                                            determined by specifying an 
  38989.                                            inclusion of the specific attribute 
  38990.                                            type, and exclusions of 
  38991.                                            OM_EXCLUDE_DESCRIPTORS, 
  38992.                                            OM_EXCLUDE_SUBOBJECTS, and 
  38993.                                            OM_EXCLUDE_ALL_BUT_THESE_TYPES. 
  38994.  
  38995.                         The OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion affects 
  38996.                         the choice of descriptors, while the OM_EXCLUDE_VALUES 
  38997.                         exclusion affects the composition of descriptors. 
  38998.  
  38999.           included_types Identifies the types of the attributes to be included 
  39000.                         in the copy (provided that they are displayed in the 
  39001.                         original). This parameter contains a value if, and only 
  39002.                         if, OM_EXCLUDE_ALL_BUT_THESE_TYPES exclusion is 
  39003.                         requested. 
  39004.  
  39005.           local_strings This boolean parameter indicates whether conversion to 
  39006.                         local string format should be carried out. This 
  39007.                         parameter is not supported. 
  39008.  
  39009.           initial_value Specifies the position within each attribute of the 
  39010.                         first value to be included in the copy. This parameter 
  39011.                         contains a value if, and only if, the 
  39012.                         OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion is requested. 
  39013.  
  39014.                         If it is OM_ALL_VALUES or exceeds the number of values 
  39015.                         present in an attribute, the parameter is taken to be 
  39016.                         equal to that number. 
  39017.  
  39018.           limiting_value Specifies the position within each attribute one 
  39019.                         beyond that of the last value to be included in the 
  39020.                         copy. This parameter contains a value if, and only if, 
  39021.                         the OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion is 
  39022.                         requested. If this parameter is not greater than the 
  39023.                         initial_value parameter, no values are included (and no 
  39024.                         descriptors are returned). 
  39025.  
  39026.                         If it is OM_ALL_VALUES or exceeds the number of values 
  39027.                         present in an attribute, the parameter is assumed to be 
  39028.                         equal to that number. 
  39029.  
  39030.           Output 
  39031.  
  39032.           copy          The copy parameter is present only if the return value 
  39033.                         from OM_return_code is OM_SUCCESS and the 
  39034.                         OM_EXCLUDE_DESCRIPTORS exclusion is not specified. 
  39035.  
  39036.                         The space occupied by the public object and every 
  39037.                         attribute value that is a string is service-provided. 
  39038.                         If the client alters any part of that space, the effect 
  39039.                         upon the service's subsequent behavior is unspecified. 
  39040.  
  39041.           total_number  The number of attribute descriptors returned in the 
  39042.                         public object, but not in any of its subobjects, based 
  39043.                         on the inclusion and exclusion parameters specified. 
  39044.                         If the OM_EXCLUDE_DESCRIPTORS exclusion is specified, 
  39045.                         no copy result is returned and the total_number result 
  39046.                         reflects the actual number of attribute descriptors 
  39047.                         that would be returned based on the remaining inclusion 
  39048.                         and exclusion values. Note that the total includes only 
  39049.                         the attribute descriptors in the copy parameter. It 
  39050.                         excludes the special descriptor signaling the end of a 
  39051.                         public object. 
  39052.  
  39053.  Usage 
  39054.  
  39055.           The om_get routine creates a new public object (copy) that is an 
  39056.           exact but independent copy of an existing private object, the 
  39057.           original parameter. The client can request certain exclusions, each 
  39058.           of which reduces the copy to a part of the original. 
  39059.  
  39060.           One exclusion is always requested implicitly. For each attribute 
  39061.           value in the original that is a string whose length exceeds an 
  39062.           implementation-defined number, the copy parameter includes a 
  39063.           descriptor that omits the elements (but not the length) of the 
  39064.           string. The elements component of the string component in the 
  39065.           descriptor's value component is OM_ELEMENTS_UNSPECIFIED, and the 
  39066.           OM_S_LONG_STRING bit of the syntax component is set to OM_TRUE. Note 
  39067.           that the client can access long values by means of om_read. 
  39068.  
  39069.  Return Codes 
  39070.  
  39071.           On successful completion, the routine returns OM_SUCCESS in the 
  39072.           OM_return_code variable. Otherwise, it returns one of the following 
  39073.           errors: 
  39074.  
  39075.                OM_FUNCTION_INTERRUPTED 
  39076.                OM_MEMORY_INSUFFICIENT 
  39077.                OM_NETWORK_ERROR 
  39078.                OM_NO_SUCH_EXCLUSION 
  39079.                OM_NO_SUCH_OBJECT 
  39080.                OM_NO_SUCH_TYPE 
  39081.                OM_NOT_PRIVATE 
  39082.                OM_PERMANENT_ERROR 
  39083.                OM_POINTER_INVALID 
  39084.                OM_SYSTEM_ERROR 
  39085.                OM_TEMPORARY_ERROR 
  39086.                OM_WRONG_VALUE_SYNTAX 
  39087.                OM_WRONG_VALUE_TYPE 
  39088.  
  39089.           The exact constants for OM_return_code are defined in the xom.h 
  39090.           header file. 
  39091.  
  39092.  
  39093. ΓòÉΓòÉΓòÉ 6.4.6. om_instance ΓòÉΓòÉΓòÉ
  39094.  
  39095.  Purpose 
  39096.  
  39097.           Determines whether an object is an instance of a particular class or 
  39098.           any of its subclasses. 
  39099.  
  39100.  Format 
  39101.  
  39102.                     #include <xom.h>
  39103.  
  39104.                     OM_return_code om_instance(
  39105.                            OM_object  subject,
  39106.                            OM_object_identifier  class,
  39107.                            OM_boolean  *instance);
  39108.  
  39109.  Parameters 
  39110.  
  39111.           Input 
  39112.  
  39113.           subject       The subject that remains accessible. 
  39114.  
  39115.           class         Identifies the class in question. 
  39116.  
  39117.           Output 
  39118.  
  39119.           instance      Indicates whether the subject is an instance of the 
  39120.                         specified class or any of its subclasses. This result 
  39121.                         is present if, and only if, the value of the 
  39122.                         OM_return_code is set to OM_SUCCESS. 
  39123.  
  39124.  Usage 
  39125.  
  39126.           The om_instance routine determines whether a service-generated public 
  39127.           or private object (subject) is an instance of a particular class or 
  39128.           any of its subclasses. 
  39129.  
  39130.  Notes 
  39131.  
  39132.           The client can determine the object class, C, by inspecting the 
  39133.           object, using programming language constructs if the object is public 
  39134.           or om_get if it is private. The om_instance routine is useful because 
  39135.           it reveals that an object is an instance of the specified class, even 
  39136.           if C is a subclass of that class. 
  39137.  
  39138.  Return Codes 
  39139.  
  39140.           On successful completion, the routine returns OM_SUCCESS in the 
  39141.           OM_return_code variable. Otherwise, it returns one of the following 
  39142.           errors: 
  39143.  
  39144.                OM_FUNCTION_INTERRUPTED 
  39145.                OM_MEMORY_INSUFFICIENT 
  39146.                OM_NETWORK_ERROR 
  39147.                OM_NO_SUCH_CLASS 
  39148.                OM_NO_SUCH_OBJECT 
  39149.                OM_NO_SUCH_SYNTAX 
  39150.                OM_NOT_THE_SERVICES 
  39151.                OM_PERMANENT_ERROR 
  39152.                OM_POINTER_INVALID 
  39153.                OM_SYSTEM_ERROR 
  39154.                OM_TEMPORARY_ERROR 
  39155.  
  39156.           The exact constants for OM_return_code are defined in the xom.h 
  39157.           header file. 
  39158.  
  39159.  
  39160. ΓòÉΓòÉΓòÉ 6.4.7. om_put ΓòÉΓòÉΓòÉ
  39161.  
  39162.  Purpose 
  39163.  
  39164.           Places or replaces in one private object copies of the attribute 
  39165.           values of another public or private object. 
  39166.  
  39167.  Format 
  39168.  
  39169.                     #include <xom.h>
  39170.  
  39171.                     OM_return_code om_put(
  39172.                            OM_private_object  destination,
  39173.                            OM_modification  modification,
  39174.                            OM_object  source,
  39175.                            OM_type_list  included_types,
  39176.                            OM_value_position  initial_value,
  39177.                            OM_value_position  limiting_value);
  39178.  
  39179.  Parameters 
  39180.  
  39181.           Input 
  39182.  
  39183.           destination   The destination that remains accessible.  The 
  39184.                         destination's class is unaffected. 
  39185.  
  39186.           modification  The nature of the requested modification. The 
  39187.                         modification determines how om_put uses the attribute 
  39188.                         values in the source to modify the object. In all 
  39189.                         cases, for each attribute present in the source, copies 
  39190.                         of its values are placed in the object's destination 
  39191.                         attribute of the same type. The data value is chosen 
  39192.                         from among the following: 
  39193.  
  39194.                              OM_INSERT_AT_BEGINNING The source values are 
  39195.                                            inserted before any existing 
  39196.                                            destination values. (The latter are 
  39197.                                            retained.) 
  39198.  
  39199.                              OM_INSERT_AT_CERTAIN_POINT The source values are 
  39200.                                            inserted before the value at a 
  39201.                                            specified position in the 
  39202.                                            destination attribute. (The latter 
  39203.                                            are retained.) 
  39204.  
  39205.                              OM_INSERT_AT_END The source values are inserted 
  39206.                                            after any existing destination 
  39207.                                            values. (The latter are retained.) 
  39208.  
  39209.                              OM_REPLACE_ALL The source values are placed in the 
  39210.                                            destination attribute. The existing 
  39211.                                            destination values, if any, are 
  39212.                                            discarded. 
  39213.  
  39214.                              OM_REPLACE_CERTAIN_VALUES The source values are 
  39215.                                            substituted for the values at 
  39216.                                            specified positions in the 
  39217.                                            destination attribute. (The latter 
  39218.                                            are discarded.) 
  39219.  
  39220.           source        The source that remains accessible.  The source's class 
  39221.                         is ignored. However, the attributes being copied from 
  39222.                         the source must be compatible with the destination's 
  39223.                         class definition. 
  39224.  
  39225.           included_types If present, this parameter identifies the types of the 
  39226.                         attributes to be included in the destination (provided 
  39227.                         that they are displayed in the source); otherwise, all 
  39228.                         attributes are to be included. 
  39229.  
  39230.           initial_value Specifies the position within each destination 
  39231.                         attribute where source values are inserted, or of the 
  39232.                         first value replaced, respectively. This parameter 
  39233.                         contains a value if, and only if, the modification 
  39234.                         parameter is OM_INSERT_AT_CERTAIN_POINT or 
  39235.                         OM_REPLACE_CERTAIN_VALUES. 
  39236.  
  39237.                         If it is OM_ALL_VALUES, or exceeds the number of values 
  39238.                         present in a destination attribute, the parameter is 
  39239.                         taken to be equal to that number. 
  39240.  
  39241.           limiting_value Specifies the position within each destination 
  39242.                         attribute one beyond that of the last value replaced. 
  39243.                         This parameter contains a value if, and only if, the 
  39244.                         modification parameter is OM_REPLACE_CERTAIN_VALUES. If 
  39245.                         this parameter is present, it must be greater than the 
  39246.                         initial_value parameter. 
  39247.  
  39248.                         If the limiting_value parameter is OM_ALL_VALUES or 
  39249.                         exceeds the number of values present in a destination 
  39250.                         attribute, the parameter is taken to be equal to that 
  39251.                         number. 
  39252.  
  39253.  Usage 
  39254.  
  39255.           The om_put routine places or replaces in one private object (that is, 
  39256.           the destination) copies of the attribute values of another public or 
  39257.           private object (that is, the source). The client can specify that the 
  39258.           source's values replace all or particular values in the destination 
  39259.           or are inserted at a particular position within each attribute. All 
  39260.           string values being copied that are in the local representation are 
  39261.           first converted into the nonlocal representation for that syntax 
  39262.           (which may entail the loss of some information). 
  39263.  
  39264.  Return Codes 
  39265.  
  39266.           On successful completion, the routine returns OM_SUCCESS in the 
  39267.           OM_return_code variable. Otherwise, it returns one of the following 
  39268.           errors: 
  39269.  
  39270.                OM_FUNCTION_DECLINED 
  39271.                OM_FUNCTION_INTERRUPTED 
  39272.                OM_MEMORY_INSUFFICIENT 
  39273.                OM_NETWORK_ERROR 
  39274.                OM_NO_SUCH_CLASS 
  39275.                OM_NO_SUCH_MODIFICATION 
  39276.                OM_NO_SUCH_OBJECT 
  39277.                OM_NO_SUCH_SYNTAX 
  39278.                OM_NO_SUCH_TYPE 
  39279.                OM_NOT_CONCRETE 
  39280.                OM_NOT_PRESENT 
  39281.                OM_NOT_PRIVATE 
  39282.                OM_PERMANENT_ERROR 
  39283.                OM_POINTER_INVALID 
  39284.                OM_SYSTEM_ERROR 
  39285.                OM_TEMPORARY_ERROR 
  39286.                OM_TOO_MANY_VALUES 
  39287.                OM_VALUES_NOT_ADJACENT 
  39288.                OM_WRONG_VALUE_LENGTH 
  39289.                OM_WRONG_VALUE_MAKEUP 
  39290.                OM_WRONG_VALUE_NUMBER 
  39291.                OM_WRONG_VALUE_POSITION 
  39292.                OM_WRONG_VALUE_SYNTAX 
  39293.                OM_WRONG_VALUE_TYPE 
  39294.  
  39295.           The exact constants for OM_return_code are defined in the xom.h 
  39296.           header file. 
  39297.  
  39298.  
  39299. ΓòÉΓòÉΓòÉ 6.4.8. om_read ΓòÉΓòÉΓòÉ
  39300.  
  39301.  Purpose 
  39302.  
  39303.           Reads a segment of a string in a private object. 
  39304.  
  39305.  Format 
  39306.  
  39307.                     #include <xom.h>
  39308.  
  39309.                     OM_return_code om_read(
  39310.                            OM_private_object  subject,
  39311.                            OM_type  type,
  39312.                            OM_value_position  value_position,
  39313.                            OM_boolean  local_string,
  39314.                            OM_string_length  *string_offset,
  39315.                            OM_string  *elements);
  39316.  
  39317.  Parameters 
  39318.  
  39319.           Input 
  39320.  
  39321.           subject       The subject that remains accessible. 
  39322.  
  39323.           type          Identifies the type of the attribute one of whose 
  39324.                         values is read. 
  39325.  
  39326.           value_position The position within the attribute of the value read. 
  39327.  
  39328.           local_string  This boolean parameter indicates whether conversion to 
  39329.                         local string format should be carried out.  This 
  39330.                         parameter is ignored. 
  39331.  
  39332.           Input/Output 
  39333.  
  39334.           string_offset On input, the offset, in octets, of the start of the 
  39335.                         string segment to be read. If it exceeds the total 
  39336.                         length of the string, the parameter is equal to the 
  39337.                         string length. On output, it contains the offset, in 
  39338.                         octets, of the start of the next string segment to be 
  39339.                         read, or 0 (zero) if the final segment of the value is 
  39340.                         read. The result is present if, and only if, the 
  39341.                         OM_return_code is OM_SUCCESS. The value returned can be 
  39342.                         used as the input string_offset parameter in the next 
  39343.                         call of this routine. This enables sequential reading 
  39344.                         of a value of a long string. 
  39345.  
  39346.           elements      On input, the space the client provides for the segment 
  39347.                         to be read. The string's contents are initially 
  39348.                         unspecified. The length of the string is initially the 
  39349.                         number of octets required to contain the segment that 
  39350.                         the routine is to read. 
  39351.  
  39352.                         On output, the string's elements become the elements 
  39353.                         actually read. The length of the string becomes the 
  39354.                         number of octets required to hold the segment actually 
  39355.                         read. This can be less than the initial length if the 
  39356.                         segment is the last in a long string. 
  39357.  
  39358.  Usage 
  39359.  
  39360.           The om_read routine reads a segment of an attribute value in a 
  39361.           private object, namely the subject. The segment returned is a segment 
  39362.           of the string value that is returned if the complete value is read in 
  39363.           a single call. Note that this routine enables the client to read an 
  39364.           arbitrarily long value without requiring that the service place a 
  39365.           copy of the entire value in memory. 
  39366.  
  39367.  Return Codes 
  39368.  
  39369.           On successful completion, the routine returns OM_SUCCESS in the 
  39370.           OM_return_code variable. Otherwise, it returns one of the following 
  39371.           errors: 
  39372.  
  39373.                OM_FUNCTION_INTERRUPTED 
  39374.                OM_MEMORY_INSUFFICIENT 
  39375.                OM_NETWORK_ERROR 
  39376.                OM_NO_SUCH_OBJECT 
  39377.                OM_NO_SUCH_TYPE 
  39378.                OM_NOT_PRESENT 
  39379.                OM_NOT_PRIVATE 
  39380.                OM_PERMANENT_ERROR 
  39381.                OM_POINTER_INVALID 
  39382.                OM_SYSTEM_ERROR 
  39383.                OM_TEMPORARY_ERROR 
  39384.                OM_WRONG_VALUE_SYNTAX 
  39385.  
  39386.           The exact constants for OM_return_code are defined in the xom.h 
  39387.           header file. 
  39388.  
  39389.  
  39390. ΓòÉΓòÉΓòÉ 6.4.9. om_remove ΓòÉΓòÉΓòÉ
  39391.  
  39392.  Purpose 
  39393.  
  39394.           Removes and discards values of an attribute of a private object. 
  39395.  
  39396.  Format 
  39397.  
  39398.                     #include <xom.h>
  39399.  
  39400.                     OM_return_code om_remove(
  39401.                            OM_private_object  subject,
  39402.                            OM_type  type,
  39403.                            OM_value_position  initial_value,
  39404.                            OM_value_position  limiting_value);
  39405.  
  39406.  Parameters 
  39407.  
  39408.           Input 
  39409.  
  39410.           subject       The subject that remains accessible. The subject's 
  39411.                         class is unaffected. 
  39412.  
  39413.           type          Identifies the type of the attribute some of whose 
  39414.                         values are removed. The type is not OM_CLASS. 
  39415.  
  39416.           initial_value The position within the attribute of the first value 
  39417.                         removed. 
  39418.  
  39419.                         If it is OM_ALL_VALUES or exceeds the number of values 
  39420.                         present in the attribute, the parameter is taken to be 
  39421.                         equal to that number. 
  39422.  
  39423.           limiting_value The position within the attribute one beyond that of 
  39424.                         the last value removed. If this parameter is not 
  39425.                         greater than the initial_value parameter, no values are 
  39426.                         removed. 
  39427.  
  39428.                         If it is OM_ALL_VALUES or exceeds the number of values 
  39429.                         present in an attribute, the parameter is taken to be 
  39430.                         equal to that number. 
  39431.  
  39432.  Usage 
  39433.  
  39434.           The om_remove routine removes and discards particular values of an 
  39435.           attribute of the private object specified in subject. If no values 
  39436.           remain, the attribute itself is also removed. If the value is a 
  39437.           subobject, the value is first removed and then om_delete is applied 
  39438.           to it, which destroys the object. 
  39439.  
  39440.  Return Codes 
  39441.  
  39442.           On successful completion, the routine returns OM_SUCCESS in the 
  39443.           OM_return_code variable. Otherwise, it returns one of the following 
  39444.           errors: 
  39445.  
  39446.                OM_FUNCTION_DECLINED 
  39447.                OM_FUNCTION_INTERRUPTED 
  39448.                OM_MEMORY_INSUFFICIENT 
  39449.                OM_NETWORK_ERROR 
  39450.                OM_NO_SUCH_OBJECT 
  39451.                OM_NO_SUCH_TYPE 
  39452.                OM_NOT_PRESENT 
  39453.                OM_NOT_PRIVATE 
  39454.                OM_PERMANENT_ERROR 
  39455.                OM_POINTER_INVALID 
  39456.                OM_SYSTEM_ERROR 
  39457.                OM_TEMPORARY_ERROR 
  39458.  
  39459.           The exact constants for OM_return_code are defined in the xom.h 
  39460.           header file. 
  39461.  
  39462.  
  39463. ΓòÉΓòÉΓòÉ 6.4.10. om_write ΓòÉΓòÉΓòÉ
  39464.  
  39465.  Purpose 
  39466.  
  39467.           Writes a segment of a string into a private object. 
  39468.  
  39469.  Format 
  39470.  
  39471.                     #include <xom.h>
  39472.  
  39473.                     OM_return_code om_write(
  39474.                            OM_private_object  subject,
  39475.                            OM_type  type,
  39476.                            OM_value_position  value_position,
  39477.                            OM_syntax  syntax,
  39478.                            OM_string_length  *string_offset,
  39479.                            OM_string  elements);
  39480.  
  39481.  Parameters 
  39482.  
  39483.           Input 
  39484.  
  39485.           subject       The subject that remains accessible. 
  39486.  
  39487.           type          Identifies the type of the attribute one of whose 
  39488.                         values is written. 
  39489.  
  39490.           value_position The position within the above attribute of the value 
  39491.                         to be written. The value position can neither be 
  39492.                         negative nor exceed the number of values present. If it 
  39493.                         equals the number of values present, the segment is 
  39494.                         inserted into the attribute as a new value. 
  39495.  
  39496.           syntax        If the value being written is not already present in 
  39497.                         the subject, this identifies the syntax that the value 
  39498.                         has.  It must be a permissible syntax for the attribute 
  39499.                         of which this is a value. If the value being written is 
  39500.                         already present in the subject, then that value's 
  39501.                         syntax is preserved and this parameter is ignored. 
  39502.  
  39503.           elements      The string segment to be written. A copy of this 
  39504.                         segment occupies a position within the string value 
  39505.                         being written, starting at the offset given by the 
  39506.                         string_offset input parameter.  Any values already at 
  39507.                         or beyond this offset are discarded. 
  39508.  
  39509.           Output 
  39510.  
  39511.           string_offset On input, the offset, in octets, of the start of the 
  39512.                         string segment to be written. If it exceeds the current 
  39513.                         length of the string value being written, the parameter 
  39514.                         is taken to be equal to that current length. On output, 
  39515.                         it contains the offset, in octets, after the last 
  39516.                         string segment written. This result is present if, and 
  39517.                         only if, the OM_return_code result is OM_SUCCESS. The 
  39518.                         value returned in string_offset can be used as the 
  39519.                         input string_offset parameter the next time this 
  39520.                         routine is called. This enables sequential writing of 
  39521.                         the value of a long string. 
  39522.  
  39523.  Usage 
  39524.  
  39525.           The om_write routine writes a segment of an attribute value in the 
  39526.           private object contained in the subject parameter. 
  39527.  
  39528.           The segment supplied is a segment of the string value that is 
  39529.           supplied if the complete value is written in a single call. 
  39530.  
  39531.           The written segment is made the last segment of the value. The 
  39532.           routine discards any values whose offset equals or exceeds the 
  39533.           string_offset result. If the value being written is in the local 
  39534.           representation, it is converted to the nonlocal representation (which 
  39535.           may entail the loss of information and which may yield a different 
  39536.           number of elements than that provided). Note that this routine 
  39537.           enables the client to write an arbitrarily long value without having 
  39538.           to place a copy of the entire value in memory. 
  39539.  
  39540.  Return Codes 
  39541.  
  39542.           On successful completion, the routine returns OM_SUCCESS in the 
  39543.           OM_return_code variable. Otherwise, it returns one of the following 
  39544.           errors: 
  39545.  
  39546.                OM_FUNCTION_DECLINED 
  39547.                OM_FUNCTION_INTERRUPTED 
  39548.                OM_MEMORY_INSUFFICIENT 
  39549.                OM_NETWORK_ERROR 
  39550.                OM_NO_SUCH_OBJECT 
  39551.                OM_NO_SUCH_SYNTAX 
  39552.                OM_NO_SUCH_TYPE 
  39553.                OM_NOT_PRESENT 
  39554.                OM_NOT_PRIVATE 
  39555.                OM_PERMANENT_ERROR 
  39556.                OM_POINTER_INVALID 
  39557.                OM_SYSTEM_ERROR 
  39558.                OM_TEMPORARY_ERROR 
  39559.                OM_WRONG_VALUE_LENGTH 
  39560.                OM_WRONG_VALUE_MAKEUP 
  39561.                OM_WRONG_VALUE_POSITION 
  39562.                OM_WRONG_VALUE_SYNTAX 
  39563.  
  39564.           The exact constants for OM_return_code are defined in the xom.h 
  39565.           header file. 
  39566.  
  39567.  
  39568. ΓòÉΓòÉΓòÉ 6.4.11. omX_extract ΓòÉΓòÉΓòÉ
  39569.  
  39570.  Purpose 
  39571.  
  39572.           Extracts the first occurrence of the requested OM type from an 
  39573.           object. 
  39574.  
  39575.  Format 
  39576.  
  39577.                     #include <xom.h>
  39578.                     #include <xomext.h>
  39579.  
  39580.                     OM_return_code omX_extract(
  39581.                            OM_private_object  object,
  39582.                            OM_type_list  navigation_path,
  39583.                            OM_exclusions  exclusions,
  39584.                            OM_type_list  included_types,
  39585.                            OM_boolean  local_strings,
  39586.                            OM_value_position  initial_value,
  39587.                            OM_value_position  limiting_value,
  39588.                            OM_public_object  *values,
  39589.                            OM_value_position *total_number);
  39590.  
  39591.  Parameters 
  39592.  
  39593.           Input 
  39594.  
  39595.           object        The object from which data is to be extracted. 
  39596.  
  39597.           navigation_path Contains a NULL-terminated list of OM types that lead 
  39598.                         to the target object to be extracted. This parameter 
  39599.                         does not include the OM type of the target object. 
  39600.  
  39601.                         Note:  If the list contains only the NULL-terminator, 
  39602.                                this routine is equivalent to om_get. 
  39603.  
  39604.           exclusions    Explicit requests for zero or more exclusions, each of 
  39605.                         which reduces the copy to a prescribed portion of the 
  39606.                         original. The exclusions apply to the attributes of the 
  39607.                         target object, but not to those of its subobjects. 
  39608.  
  39609.                         Apart from OM_NO_EXCLUSIONS, each value is chosen from 
  39610.                         the following list. When multiple exclusions are 
  39611.                         specified, each is applied in the order in which it is 
  39612.                         displayed in the list, with lower-numbered exclusions 
  39613.                         having precedence over higher-numbered exclusions. If, 
  39614.                         after the application of an exclusion, that portion of 
  39615.                         the object is not returned, no further exclusions need 
  39616.                         to be applied to that portion. 
  39617.  
  39618.                              OM_EXCLUDE_ALL_BUT_THESE_TYPES The copy includes 
  39619.                                   descriptors comprising only attributes of 
  39620.                                   specified types. 
  39621.  
  39622.                                   Note:  This exclusion provides a means for 
  39623.                                          determining the values of specified 
  39624.                                          attributes, as well as the syntaxes of 
  39625.                                          those values. 
  39626.  
  39627.                              OM_EXCLUDE_MULTIPLES The copy includes a single 
  39628.                                   descriptor for each attribute that has two or 
  39629.                                   more values, instead of a single descriptor 
  39630.                                   for each value. None of these descriptors 
  39631.                                   contains an attribute value, and the 
  39632.                                   OM_S_NO_VALUE bit of the syntax component is 
  39633.                                   set. 
  39634.  
  39635.                                   If the attribute has values of two or more 
  39636.                                   syntaxes, the descriptor identifies one of 
  39637.                                   the syntaxes; however, the syntax identified 
  39638.                                   is not specified. 
  39639.  
  39640.                                   Note:  This exclusion provides a means for 
  39641.                                          discerning the presence of multivalued 
  39642.                                          attributes without simultaneously 
  39643.                                          obtaining their values. 
  39644.  
  39645.                              OM_EXCLUDE_ALL_BUT_THESE_VALUES The copy includes 
  39646.                                   descriptors comprising only values at 
  39647.                                   specified positions within an attribute. 
  39648.  
  39649.                                   Note:  When this exclusion is used in 
  39650.                                          conjunction with the 
  39651.                                          OM_EXCLUDE_ALL_BUT_THESE_TYPES 
  39652.                                          exclusion, it provides a means for 
  39653.                                          determining the values of a specified 
  39654.                                          attribute, as well as the syntaxes of 
  39655.                                          those values, for one or more but not 
  39656.                                          all attributes at a time. 
  39657.  
  39658.                              OM_EXCLUDE_VALUES The copy includes a single 
  39659.                                   descriptor for each attribute value, but the 
  39660.                                   descriptor does not contain the value, and 
  39661.                                   the OM_S_NO_VALUE bit of the syntax component 
  39662.                                   is set. 
  39663.  
  39664.                                   Note:  This exclusion provides a means for 
  39665.                                          determining an object's composition 
  39666.                                          (that is, the type and syntax of each 
  39667.                                          of its attribute values). 
  39668.  
  39669.                              OM_EXCLUDE_SUBOBJECTS For each value whose syntax 
  39670.                                   is OM_S_OBJECT, the copy includes a 
  39671.                                   descriptor containing an object handle for 
  39672.                                   the original private subobject, rather than a 
  39673.                                   public copy of it. This handle makes that 
  39674.                                   subobject accessible for use in subsequent 
  39675.                                   function calls. 
  39676.  
  39677.                                   Note:  This exclusion provides a means for 
  39678.                                          examining an object one level at a 
  39679.                                          time. 
  39680.  
  39681.                              OM_EXCLUDE_DESCRIPTORS When this exclusion is 
  39682.                                   specified, no descriptors are returned and 
  39683.                                   the copy result is not present. The 
  39684.                                   total_number parameter reflects the number of 
  39685.                                   descriptors that would be returned by 
  39686.                                   applying the other inclusion and exclusion 
  39687.                                   specifications. 
  39688.  
  39689.                                   Note:  This exclusion provides an attribute 
  39690.                                          analysis capability. For instance, the 
  39691.                                          total number of values in a 
  39692.                                          multivalued attribute can be 
  39693.                                          determined by specifying an inclusion 
  39694.                                          of the specific attribute type, and 
  39695.                                          exclusions of OM_EXCLUDE_DESCRIPTORS, 
  39696.                                          OM_EXCLUDE_SUBOBJECTS, and 
  39697.                                          OM_EXCLUDE_ALL_BUT_THESE_TYPES. 
  39698.  
  39699.                         The OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion affects 
  39700.                         the choice of descriptors, while the OM_EXCLUDE_VALUES 
  39701.                         exclusion affects the composition of descriptors. 
  39702.  
  39703.           included_types Identifies the types of the attributes to be included 
  39704.                         in the copy (provided that they are displayed in the 
  39705.                         original). This parameter contains a value if, and only 
  39706.                         if, the OM_EXCLUDE_ALL_BUT_THESE_TYPES exclusion is 
  39707.                         requested. 
  39708.  
  39709.           local_strings This boolean parameter indicates whether conversion to 
  39710.                         local string format should be carried out. This 
  39711.                         parameter is not supported. 
  39712.  
  39713.           initial_value Specifies the position, within each attribute, of the 
  39714.                         first value to be included in the copy. This parameter 
  39715.                         contains a value if, and only if, the 
  39716.                         OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion is requested. 
  39717.  
  39718.                         If the parameter is OM_ALL_VALUES or exceeds the number 
  39719.                         of values present in an attribute, it is taken to be 
  39720.                         equal to that number. 
  39721.  
  39722.           limiting_value Specifies the position, within each attribute, of one 
  39723.                         beyond that of the last value to be included in the 
  39724.                         copy. If this parameter is not greater than the 
  39725.                         initial_value parameter, no values are included (and no 
  39726.                         descriptors are returned). This parameter contains a 
  39727.                         value if, and only if, the 
  39728.                         OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion is requested. 
  39729.  
  39730.                         If the parameter is OM_ALL_VALUES or exceeds the number 
  39731.                         of values present in an attribute, it is taken to be 
  39732.                         equal to that number. 
  39733.  
  39734.           Output 
  39735.  
  39736.           values        The values parameter is present only if the return 
  39737.                         value from OM_return_code is OM_SUCCESS and the 
  39738.                         OM_EXCLUDE_DESCRIPTORS exclusion is not specified. It 
  39739.                         contains the array of OM descriptors extracted. 
  39740.  
  39741.                         The memory space for values is provided by omX_extract. 
  39742.                         It is the responsibility of the calling application to 
  39743.                         subsequently release this space with a call to 
  39744.                         om_delete. 
  39745.  
  39746.           total_number  The number of attribute descriptors returned in the 
  39747.                         public object, but not in any of its subobjects, based 
  39748.                         on the inclusion and exclusion parameters specified. If 
  39749.                         the OM_EXCLUDE_DESCRIPTORS exclusion is specified, no 
  39750.                         values result is returned and the total_number result 
  39751.                         reflects the actual number of attribute descriptors 
  39752.                         that would be returned based on the remaining inclusion 
  39753.                         and exclusion values. 
  39754.  
  39755.                         Note:  The total includes only the attribute 
  39756.                                descriptors in the values parameter. It excludes 
  39757.                                the special descriptor signaling the end of a 
  39758.                                public object. 
  39759.  
  39760.  
  39761.  Usage 
  39762.  
  39763.           The omX_extract routine creates a new public object that is an exact, 
  39764.           but independent, copy of an existing subobject in a private object. 
  39765.           It is similar to the om_get routine but includes an additional 
  39766.           parameter, navigation_path, which contains directions to the required 
  39767.           object to be extracted. The client can request certain exclusions, 
  39768.           each of which reduces the copy to a part of the original. 
  39769.  
  39770.           One exclusion is always requested implicitly. For each attribute 
  39771.           value in the original that is a string whose length exceeds an 
  39772.           implementation-defined number, the values parameter includes a 
  39773.           descriptor that omits the elements (but not the length) of the 
  39774.           string. The elements component of the string component in the 
  39775.           descriptor's value component is OM_ELEMENTS_UNSPECIFIED, and the 
  39776.           OM_S_LONG_STRING bit of the syntax component is set to OM_TRUE. 
  39777.  
  39778.           The parameters exclusions, included_types, local_strings, 
  39779.           initial_value, and limiting_value only apply to the target object 
  39780.           being extracted. 
  39781.  
  39782.           Note:  String lengths of up to 4000 bytes are valid. The maximum 
  39783.                  length of a CDS attribute value is 4000 bytes. The client can 
  39784.                  also access long values by means of om_read. 
  39785.  
  39786.  Return Codes 
  39787.  
  39788.           On successful completion, the routine returns OM_SUCCESS in the 
  39789.           OM_return_code variable. Otherwise, it returns one of the constants 
  39790.           defined in the xom.h header file. 
  39791.  
  39792.  
  39793. ΓòÉΓòÉΓòÉ 6.4.12. omX_fill ΓòÉΓòÉΓòÉ
  39794.  
  39795.  Purpose 
  39796.  
  39797.           Initializes an OM_descriptor structure. 
  39798.  
  39799.  Format 
  39800.  
  39801.                     #include <xom.h>
  39802.                     #include <xomext.h>
  39803.  
  39804.                     OM_return_code omX_fill(
  39805.                            OM_type  type,
  39806.                            OM_syntax  syntax,
  39807.                            OM_uint32  length,
  39808.                            void  *elements,
  39809.                            OM_descriptor  *destination);
  39810.  
  39811.  Parameters 
  39812.  
  39813.           Input 
  39814.  
  39815.           type          The type of OM descriptor structure. 
  39816.  
  39817.           syntax        The syntax value for this OM descriptor. 
  39818.  
  39819.           length        The data length for values of string syntax. Zero is 
  39820.                         entered for values of type OM_object. When initializing 
  39821.                         an OM_descriptor with an OM_type that has an OM_syntax 
  39822.                         of either OM_S_INTEGER, OM_S_BOOLEAN or 
  39823.                         OM_S_ENUMERATION, the associated value must be entered 
  39824.                         in the length parameter. 
  39825.  
  39826.           elements      The string contents. 
  39827.  
  39828.           Output 
  39829.  
  39830.           destination   Contains the filled descriptor. 
  39831.  
  39832.                         Note:  The user must provide the storage for the 
  39833.                                OM_descriptor. The address is passed as input in 
  39834.                                the destination parameter. 
  39835.  
  39836.  
  39837.  Usage 
  39838.  
  39839.           The omX_fill routine is used to initialize an OM_descriptor structure 
  39840.           with user-supplied values for its type, syntax, and value. 
  39841.  
  39842.  Return Codes 
  39843.  
  39844.           On successful completion, the routine returns OM_SUCCESS in the 
  39845.           OM_return_code variable. Otherwise, it returns one of the constants 
  39846.           defined in the xom.h header file. 
  39847.  
  39848.  
  39849. ΓòÉΓòÉΓòÉ 6.4.13. omX_fill_oid ΓòÉΓòÉΓòÉ
  39850.  
  39851.  Purpose 
  39852.  
  39853.           Initializes an OM_descriptor structure with an object identifier 
  39854.           value. 
  39855.  
  39856.  Format 
  39857.  
  39858.                     #include <xom.h>
  39859.                     #include <xomext.h>
  39860.  
  39861.                     OM_return_code omX_fill_oid(
  39862.                            OM_type  type,
  39863.                            OM_object_identifier  object_id,
  39864.                            OM_descriptor  *destination);
  39865.  
  39866.  Parameters 
  39867.  
  39868.           Input 
  39869.  
  39870.           type          The type of OM_descriptor structure. 
  39871.  
  39872.           object_id     The object identifier value. 
  39873.  
  39874.           Output 
  39875.  
  39876.           destination   Contains the filled descriptor. 
  39877.  
  39878.                         Note:  The user must provide the storage for the 
  39879.                                OM_descriptor. The address is passed as input in 
  39880.                                the destination parameter. 
  39881.  
  39882.  
  39883.  Usage 
  39884.  
  39885.           The omX_fill_oid routine is used to initialize an OM_descriptor 
  39886.           structure with user-supplied values for its type and value. The 
  39887.           syntax of the descriptor is always set to 
  39888.           OM_S_OBJECT_IDENTIFIER_STRING. 
  39889.  
  39890.  Return Codes 
  39891.  
  39892.           On successful completion, the routine returns OM_SUCCESS in the 
  39893.           OM_return_code variable. Otherwise, it returns one of the constants 
  39894.           defined in the xom.h header file. 
  39895.  
  39896.  
  39897. ΓòÉΓòÉΓòÉ 6.4.14. omX_object_to_string ΓòÉΓòÉΓòÉ
  39898.  
  39899.  Purpose 
  39900.  
  39901.           Converts an OM object from descriptor to string format. 
  39902.  
  39903.  Format 
  39904.  
  39905.                     #include <xom.h>
  39906.                     #include <xomext.h>
  39907.  
  39908.                     OM_return_code omX_object_to_string(
  39909.                            OM_object  object,
  39910.                            OM_boolean  local_strings,
  39911.                            OM_string  *string);
  39912.  
  39913.  Parameters 
  39914.  
  39915.           Input 
  39916.  
  39917.           object        Contains the OM object to be converted. 
  39918.  
  39919.           local_strings This boolean parameter indicates whether conversion to 
  39920.                         local string format should be carried out. This 
  39921.                         parameter is not supported. 
  39922.  
  39923.           Output 
  39924.  
  39925.           string        Contains the converted object in string format. The 
  39926.                         calling routine should provide the memory for string. 
  39927.                         The string's contents are initially unspecified. The 
  39928.                         string's length becomes the number of octets required 
  39929.                         to contain the segment that the routine is to read. The 
  39930.                         service modifies this parameter. The string's elements 
  39931.                         become the elements actually read. The string's length 
  39932.                         becomes the number of octets required to hold the 
  39933.                         segment actually read. 
  39934.  
  39935.  Usage 
  39936.  
  39937.           The omX_object_to_string routine converts an OM object into a string 
  39938.           format. The object can either be a client-generated or a 
  39939.           service-generated public or private object. 
  39940.  
  39941.           The objects that can be handled by this routine are restricted to 
  39942.           those defined in the schema file, xschema. Additionally, the OM 
  39943.           objects DS_C_ATTRIBUTE_ERROR and DS_C_ERROR are also handled. For 
  39944.           these, a message string containing the error message is returned. 
  39945.  
  39946.           For the syntax of the output strings please refer to XDS/XOM 
  39947.           Convenience Routines. 
  39948.  
  39949.  Return Codes 
  39950.  
  39951.           On successful completion, the routine returns OM_SUCCESS in the 
  39952.           OM_return_code variable. Otherwise, it returns one of the constants 
  39953.           defined in the xom.h header file. 
  39954.  
  39955.  
  39956. ΓòÉΓòÉΓòÉ 6.4.15. omX_string_to_object ΓòÉΓòÉΓòÉ
  39957.  
  39958.  Purpose 
  39959.  
  39960.           Converts an OM object specified in string format to descriptor 
  39961.           format. 
  39962.  
  39963.  Format 
  39964.  
  39965.                     #include <xom.h>
  39966.                     #include <xomext.h>
  39967.  
  39968.                     OM_return_code omX_string_to_object(
  39969.                            OM_workspace  workspace,
  39970.                            OM_string  *string,
  39971.                            OM_object_identifier  class,
  39972.                            OM_boolean  local_strings,
  39973.                            OM_private_object  *object,
  39974.                            OM_integer  *error_position,
  39975.                            OM_integer  *error_type);
  39976.  
  39977.  Parameters 
  39978.  
  39979.           Input 
  39980.  
  39981.           workspace     The workspace pointer obtained from a ds_initialize 
  39982.                         call. 
  39983.  
  39984.           string        The string to be converted. For details of the string 
  39985.                         syntaxes allowed, refer to XDS/XOM Convenience 
  39986.                         Routines. 
  39987.  
  39988.           class         The OM class of the object to be created. 
  39989.  
  39990.           local_strings This boolean parameter indicates whether conversion to 
  39991.                         local string format should be carried out. This 
  39992.                         parameter is not supported. 
  39993.  
  39994.           Output 
  39995.  
  39996.           object        The converted object. 
  39997.  
  39998.           error_position If the input string contains a syntax error, 
  39999.                         error_position indicates the position in the string 
  40000.                         where the error was detected. 
  40001.  
  40002.           error_type    Indicates the type of error (for example, Attribute 
  40003.                         Abbreviation expected, '/' expected, and so on...). 
  40004.                         Refer to the xomext.h header file for explanations of 
  40005.                         the error types. 
  40006.  
  40007.  Usage 
  40008.  
  40009.           The omX_string_to_object routine creates a new private object, which 
  40010.           is built from the string and class input parameters. The objects that 
  40011.           can be created by this routine are restricted to those defined in the 
  40012.           schema file, xschema. 
  40013.  
  40014.           For the syntax of the input strings please refer to XDS/XOM 
  40015.           Convenience Routines. 
  40016.  
  40017.  Notes 
  40018.  
  40019.           The memory space for the object return parameter is allocated by 
  40020.           omX_string_to_object. The calling application is responsible for 
  40021.           releasing this memory with a call to the om_delete routine. 
  40022.  
  40023.  Return Codes 
  40024.  
  40025.           On successful completion, the routine returns OM_SUCCESS in the 
  40026.           OM_return_code variable. Otherwise, it returns one of the constants 
  40027.           defined in the xom.h header file. 
  40028.  
  40029.           If there is a syntax error in the input string, OM_return_code is set 
  40030.           to OM_WRONG_VALUE_MAKEUP and the type of error is returned in 
  40031.           error_type. Refer to the xomext.h header file for explanations of the 
  40032.           error types. 
  40033.  
  40034.  
  40035. ΓòÉΓòÉΓòÉ 7. The DCE Distributed Time Service API ΓòÉΓòÉΓòÉ
  40036.  
  40037. The DCE Distributed Time Service (DTS) programming routines can obtain 
  40038. timestamps that are based on Coordinated Universal Time (UTC), translate 
  40039. between different timestamp formats, and perform calculations on timestamps. 
  40040. Applications can call the DTS routines from server or clerk systems and use the 
  40041. timestamps that DTS supplies to determine event sequencing, duration, and 
  40042. scheduling. 
  40043.  
  40044. The DTS routines can perform the following basic functions: 
  40045.  
  40046.    o  Retrieve the current (UTC-based) time from DTS. 
  40047.  
  40048.    o  Convert binary timestamps expressed in the utc time structure to or from 
  40049.       tm structure components. 
  40050.  
  40051.    o  Convert the binary timestamps expressed in the utc time structure to or 
  40052.       from timespec structure components. 
  40053.  
  40054.    o  Convert the binary timestamps expressed in the utc time structure to or 
  40055.       from ASCII text strings. 
  40056.  
  40057.    o  Compare two binary time values. 
  40058.  
  40059.    o  Calculate binary time values. 
  40060.  
  40061.    o  Obtain time zone information. 
  40062.  
  40063.  DTS can convert between several types of binary time structures that are based 
  40064.  on different calendars and time unit measurements.  DTS uses UTC-based time 
  40065.  structures, and can convert other types of time structures to its own 
  40066.  presentation of UTC-based time. 
  40067.  
  40068.  See the following subtopics for more information: 
  40069.  
  40070.       Time Service Terms 
  40071.       Time Service Default Values 
  40072.       Time Service Routine Categories 
  40073.       Time Service Routines 
  40074.  
  40075.  
  40076. ΓòÉΓòÉΓòÉ 7.1. Time Service Terms ΓòÉΓòÉΓòÉ
  40077.  
  40078. Following are definitions of terms used throughout this chapter: 
  40079.  
  40080.  Absolute time 
  40081.                An interval on a time scale; absolute time measurements are 
  40082.                derived from system clocks or external time-providers. For DTS, 
  40083.                absolute times reference the UTC standard and include inaccuracy 
  40084.                and other information. When you display an absolute time, DTS 
  40085.                converts the time to ASCII text string: 
  40086.  
  40087.                               1990-11-21-13:30:25.785-04:00I000.082
  40088.  
  40089.  Relative time 
  40090.                A discrete time interval that is often added to or subtracted 
  40091.                from an absolute time. A Time Differential Factor (TDF) 
  40092.                associated with an absolute time is one example of a relative 
  40093.                time.  Note that a relative time does not use the calendar date 
  40094.                fields, since these fields concern absolute time. 
  40095.  
  40096.  Coordinated Universal Time (UTC) 
  40097.                The international time standard that DTS uses.  The zero hour of 
  40098.                UTC is based on the zero hour of Greenwich Mean Time (GMT). The 
  40099.                documentation consistently refers to the time zone of the 
  40100.                Greenwich Meridian as GMT. However, this time zone is also 
  40101.                sometimes referred to as UTC. 
  40102.  
  40103.                Reference information for the localtime system routine provides 
  40104.                additional details. 
  40105.  
  40106.  The Time Differential Factor (TDF) 
  40107.                The difference between UTC and the time in a particular time 
  40108.                zone. 
  40109.  
  40110.  The user's environment determines the time zone rule (details are 
  40111.  system-dependent). 
  40112.  
  40113.  If the user's environment does not specify a time zone rule, the system's rule 
  40114.  is used (details of the rule are system-dependent). 
  40115.  
  40116.  The DCE for OS/2 Warp: Application Development Guide - Core Components 
  40117.  provides additional information about UTC and GMT, TDF and time zones, and 
  40118.  relative and absolute times. 
  40119.  
  40120.  
  40121. ΓòÉΓòÉΓòÉ 7.2. Time Service Default Values ΓòÉΓòÉΓòÉ
  40122.  
  40123. Unless otherwise specified, the default input and output parameters are: 
  40124.  
  40125.    o  If NULL is specified for a utc input parameter, the current time is used. 
  40126.    o  If NULL is specified for any output parameter, no result is returned. 
  40127.  
  40128.  
  40129. ΓòÉΓòÉΓòÉ 7.3. Time Service Routine Categories ΓòÉΓòÉΓòÉ
  40130.  
  40131. The following illustration categorizes the DTS portable interface routines by 
  40132. function. 
  40133.  
  40134.  
  40135. DTS API Routines Shown by Functional Grouping
  40136.  
  40137.  
  40138. ΓòÉΓòÉΓòÉ 7.4. Time Service Routines ΓòÉΓòÉΓòÉ
  40139.  
  40140. An alphabetical listing of the DTS portable interface routines and a brief 
  40141. description of each one follows: 
  40142.  
  40143.  utc_abstime           Computes the absolute value of a relative binary 
  40144.                        timestamp. 
  40145.  
  40146.  utc_addtime           Computes the sum of two binary timestamps; the 
  40147.                        timestamps can be two relative times or a relative time 
  40148.                        and an absolute time. 
  40149.  
  40150.  utc_anytime           Converts a binary timestamp to a tm structure, using the 
  40151.                        TDF information contained in the timestamp to determine 
  40152.                        the TDF returned with the tm structure. 
  40153.  
  40154.  utc_anyzone           Gets the time zone label and offset from GMT, using the 
  40155.                        TDF contained in the utc input parameter. 
  40156.  
  40157.  utc_ascanytime        Converts a binary timestamp to an ASCII text string that 
  40158.                        represents an arbitrary time zone. 
  40159.  
  40160.  utc_ascgmtime         Converts a binary timestamp to an ASCII text string that 
  40161.                        expresses a GMT time. 
  40162.  
  40163.  utc_asclocaltime      Converts a binary timestamp to an ASCII text string that 
  40164.                        represents a local time. 
  40165.  
  40166.  utc_ascreltime        Converts a relative binary timestamp to an ASCII text 
  40167.                        string that represents the time. 
  40168.  
  40169.  utc_binreltime        Converts a relative binary timestamp to two timespec 
  40170.                        structures that express relative time and inaccuracy. 
  40171.  
  40172.  utc_bintime           Converts a binary timestamp to a timespec structure. 
  40173.  
  40174.  utc_boundtime         Returns a single UTC time whose inaccuracy includes an 
  40175.                        event, given two UTC times, one before and one after the 
  40176.                        event. 
  40177.  
  40178.  utc_cmpintervaltime   Compares two binary timestamps or two relative binary 
  40179.                        timestamps. 
  40180.  
  40181.  utc_cmpmidtime        Compares two binary timestamps or two relative binary 
  40182.                        timestamps, ignoring inaccuracies. 
  40183.  
  40184.  utc_gettime           Returns the current system time and inaccuracy as a 
  40185.                        binary timestamp. 
  40186.  
  40187.  utc_getusertime       Returns the time and process-specific TDF, rather than 
  40188.                        the system-specific TDF. 
  40189.  
  40190.  utc_gmtime            Converts a binary timestamp to a tm structure that 
  40191.                        expresses GMT or the equivalent UTC. 
  40192.  
  40193.  utc_gmtzone           Gets the time zone label for GMT. 
  40194.  
  40195.  utc_localtime         Converts a binary timestamp to a tm structure that 
  40196.                        expresses local time. 
  40197.  
  40198.  utc_localzone         Gets the local time zone label and offset from GMT, 
  40199.                        given a utc time. 
  40200.  
  40201.  utc_mkanytime         Converts a tm structure and TDF (expressing the time in 
  40202.                        an arbitrary time zone) to a binary timestamp. 
  40203.  
  40204.  utc_mkascreltime      Converts a NULL-terminated character string that 
  40205.                        represents a relative timestamp to a binary timestamp. 
  40206.  
  40207.  utc_mkasctime         Converts a NULL-terminated character string that 
  40208.                        represents an absolute timestamp to a binary timestamp. 
  40209.  
  40210.  utc_mkbinreltime      Converts a timespec structure expressing a relative time 
  40211.                        to a binary timestamp. 
  40212.  
  40213.  utc_mkbintime         Converts a timespec structure to a binary timestamp. 
  40214.  
  40215.  utc_mkgmtime          Converts a tm structure that expresses GMT or UTC to a 
  40216.                        binary timestamp. 
  40217.  
  40218.  utc_mklocaltime       Converts a tm structure that expresses local time to a 
  40219.                        binary timestamp. 
  40220.  
  40221.  utc_mkreltime         Converts a tm structure that expresses relative time to 
  40222.                        a relative binary timestamp. 
  40223.  
  40224.  utc_mulftime          Multiplies a relative binary timestamp by a 
  40225.                        floating-point value. 
  40226.  
  40227.  utc_multime           Multiplies a relative binary timestamp by an integer 
  40228.                        factor. 
  40229.  
  40230.  utc_pointtime         Converts a binary timestamp to three binary timestamps 
  40231.                        that represent the earliest, most likely, and latest 
  40232.                        time. 
  40233.  
  40234.  utc_reltime           Converts a relative binary timestamp to a tm structure. 
  40235.  
  40236.  utc_spantime          Given two (possibly unordered) binary timestamps, 
  40237.                        returns a single UTC time interval whose inaccuracy 
  40238.                        spans the two input binary timestamps. 
  40239.  
  40240.  utc_subtime           Computes the difference between two binary timestamps 
  40241.                        that express either an absolute time and a relative 
  40242.                        time, two relative times, or two absolute times. 
  40243.  
  40244.  
  40245. ΓòÉΓòÉΓòÉ 7.4.1. utc_abstime ΓòÉΓòÉΓòÉ
  40246.  
  40247.  Purpose 
  40248.  
  40249.           Computes the absolute value of a relative binary timestamp. 
  40250.  
  40251.  Format 
  40252.  
  40253.                     #include <dce\utc.h>
  40254.  
  40255.                     int utc_abstime(
  40256.                   utc_t  *result,
  40257.                   utc_t  *utc);
  40258.  
  40259.  Parameters 
  40260.  
  40261.           Input 
  40262.  
  40263.           utc           Relative binary timestamp. Use NULL if you want this 
  40264.                         routine to use the current time for this parameter. 
  40265.  
  40266.           Output 
  40267.  
  40268.           result        Absolute value of the input relative binary timestamp. 
  40269.  
  40270.  Usage 
  40271.  
  40272.           The utc_abstime routine computes the absolute value of a relative 
  40273.           binary timestamp. The input timestamp represents a relative (delta) 
  40274.           time. 
  40275.  
  40276.  Return Codes 
  40277.  
  40278.            0 Indicates that the routine ran successfully. 
  40279.  
  40280.           -1 Indicates an invalid time parameter or invalid results. 
  40281.  
  40282.  Examples 
  40283.  
  40284.           The following example scales a relative time, computes its absolute 
  40285.           value, and prints the result. 
  40286.  
  40287.  
  40288.                     utc_t       relutc, scaledutc;
  40289.                     char        timstr[UTC_MAX_STR_LEN];
  40290.  
  40291.                     /*
  40292.                      *   Make sure relative timestamp represents a positive interval.
  40293.                      */
  40294.  
  40295.                     utc_abstime(&relutc,                  /* Out:  Abs-value of rel time  */
  40296.                                 &relutc);                 /* In:  Relative time to scale  */
  40297.  
  40298.                     /*
  40299.                      *   Scale it by a factor of 17...
  40300.                      */
  40301.  
  40302.                     utc_multime(&scaledutc,               /* Out:  Scaled relative time   */
  40303.                                 &relutc,                  /* In:  Relative time to scale  */
  40304.                                 17L);                     /* In:  Scale factor            */
  40305.  
  40306.                     utc_ascreltime(timstr,                /* Out:  ASCII relative time    */
  40307.                                    UTC_MAX_STR_LEN,       /* In:  Length of input string  */
  40308.                                    &scaledutc);           /* In:  Relative time to        */
  40309.                                                           /*      convert                 */
  40310.  
  40311.                     printf("%s\n",timstr);
  40312.  
  40313.                     /*
  40314.                      *   Scale it by a factor of 17.65...
  40315.                      */
  40316.  
  40317.                     utc_mulftime(&scaledutc,              /* Out:  Scaled relative time   */
  40318.                                  &relutc,                 /* In:  Relative time to scale  */
  40319.                                  17.65);                  /* In:  Scale factor            */
  40320.  
  40321.                     utc_ascreltime(timstr,                /* Out:  ASCII relative time    */
  40322.                                    UTC_MAX_STR_LEN,       /* In:  Length of input string  */
  40323.                                    &scaledutc);           /* In:  Relative time to        */
  40324.                                                           /*      convert                 */
  40325.  
  40326.                     printf("%s\n",timstr);
  40327.  
  40328.  
  40329. ΓòÉΓòÉΓòÉ 7.4.2. utc_addtime ΓòÉΓòÉΓòÉ
  40330.  
  40331.  Purpose 
  40332.  
  40333.           Computes the sum of two binary timestamps. 
  40334.  
  40335.  Format 
  40336.  
  40337.                     #include <dce\utc.h>
  40338.  
  40339.                     int utc_addtime(
  40340.                   utc_t  result,
  40341.                   utc_t  *utc1,
  40342.                   utc_t  *utc2);
  40343.  
  40344.  Parameters 
  40345.  
  40346.           Input 
  40347.  
  40348.           utc1          Binary timestamp or relative binary timestamp. Use NULL 
  40349.                         if you want this routine to use the current time for 
  40350.                         this parameter. 
  40351.  
  40352.           utc2          Binary timestamp or relative binary timestamp. Use NULL 
  40353.                         if you want this routine to use the current time for 
  40354.                         this parameter. 
  40355.  
  40356.           Output 
  40357.  
  40358.           result        Resulting binary timestamp or relative binary 
  40359.                         timestamp, depending upon the operation performed: 
  40360.  
  40361.                           o  relative time + relative time = relative time 
  40362.                           o  absolute time + relative time = absolute time 
  40363.                           o  relative time + absolute time = absolute time 
  40364.                           o  absolute time + absolute time is undefined (see 
  40365.                              the note later in this section). 
  40366.  
  40367.  Usage 
  40368.  
  40369.           The utc_addtime routine adds two binary timestamps, producing a third 
  40370.           binary timestamp whose inaccuracy is the sum of the two input 
  40371.           inaccuracies. One or both of the input timestamps typically 
  40372.           represents a relative (delta) time.  The TDF in the first input 
  40373.           timestamp is copied to the output. The timestamps can be two relative 
  40374.           times or a relative time and an absolute time. 
  40375.  
  40376.  Notes 
  40377.  
  40378.           Although no error is returned, the combination absolute time + 
  40379.           absolute time should not be used. 
  40380.  
  40381.  Return Codes 
  40382.  
  40383.            0 Indicates that the routine ran successfully. 
  40384.  
  40385.           -1 Indicates an invalid time parameter or invalid results. 
  40386.  
  40387.  Examples 
  40388.  
  40389.           The following example shows how to compute a timestamp that 
  40390.           represents a time at least five seconds in the future. 
  40391.  
  40392.                     utc_t               now, future, fivesec;
  40393.                     reltimespec_t       tfivesec;
  40394.                     timespec_t          tzero;
  40395.  
  40396.                     /*
  40397.                      *   Construct a timestamp that represents 5 seconds...
  40398.                      */
  40399.                     tfivesec.tv_sec = 5;
  40400.                     tfivesec.tv_nsec = 0;
  40401.                     tzero.tv_sec = 0;
  40402.                     tzero.tv_nsec = 0;
  40403.                     utc_mkbinreltime(&fivesec,    /* Out:  5 secs in binary timestamp     */
  40404.                                      &tfivesec,   /* In:  5 secs in timespec              */
  40405.                                      &tzero);     /* In:  0 secs inaccuracy in timespec   */
  40406.  
  40407.                     /*
  40408.                      *   Get the maximum possible current time.*
  40409.                      *    (The NULL input parameter is used to specify the current time.)
  40410.                      */
  40411.                     utc_pointtime((utc_t *)0,     /* Out:  Earliest possible current time */
  40412.                                   (utc_t *)0,     /* Out:  Midpoint of current time       */
  40413.                                   &now,           /* Out:  Latest possible current time   */
  40414.                                   (utc_t *)0);    /* In:  Use current time                */
  40415.  
  40416.                     /*
  40417.                      *   Add 5 seconds to get future timestamp...
  40418.                      */
  40419.                     utc_addtime(&future,          /* Out:  Future binary timestamp        */
  40420.                                 &now,             /* In:  Latest possible time now        */
  40421.                                 &fivesec);        /* In:  5 secs                          */
  40422.  
  40423.  Related Information 
  40424.  
  40425.           Routines: 
  40426.           utc_subtime 
  40427.  
  40428.  
  40429. ΓòÉΓòÉΓòÉ 7.4.3. utc_anytime ΓòÉΓòÉΓòÉ
  40430.  
  40431.  Purpose 
  40432.  
  40433.           Converts a binary timestamp to a tm structure. 
  40434.  
  40435.  Format 
  40436.  
  40437.                     #include <dce\utc.h>
  40438.  
  40439.                     int utc_anytime(
  40440.                   struct tm  *timetm,
  40441.                   long  *tns,
  40442.                   struct tm  *inacctm,
  40443.                   long  *ins,
  40444.                   long  *tdf,
  40445.                   utc_t  *utc);
  40446.  
  40447.  Parameters 
  40448.  
  40449.           Input 
  40450.  
  40451.           utc           Binary timestamp. Use NULL if you want this routine to 
  40452.                         use the current time for this parameter. 
  40453.  
  40454.           Output 
  40455.  
  40456.           timetm        Time component of the binary timestamp expressed in the 
  40457.                         timestamp's local time. 
  40458.  
  40459.           tns           Nanoseconds since the Time component of the binary 
  40460.                         timestamp. 
  40461.  
  40462.           inacctm       Seconds of inaccuracy component of the binary 
  40463.                         timestamp. If the inaccuracy is finite, tm_mday returns 
  40464.                         a value of -1 and tm_mon and tm_year return values of 
  40465.                         0. The field tm_yday contains the inaccuracy in days. 
  40466.                         If the inaccuracy is unspecified, all tm structure 
  40467.                         fields return values of -1. 
  40468.  
  40469.           ins           Nanoseconds of inaccuracy component of the binary 
  40470.                         timestamp. 
  40471.  
  40472.           tdf           TDF component of the binary timestamp in units of 
  40473.                         seconds east of GMT. 
  40474.  
  40475.  Usage 
  40476.  
  40477.           The utc_anytime routine converts a binary timestamp to a tm structure 
  40478.           using the TDF information contained in the timestamp to determine the 
  40479.           TDF returned with the tm structure. The TDF information contained in 
  40480.           the timestamp is returned with the time and inaccuracy components; 
  40481.           the TDF component determines the offset from GMT and the local time 
  40482.           value of the tm structure. Additional returns include nanoseconds 
  40483.           since Time and nanoseconds of inaccuracy. 
  40484.  
  40485.  Return Codes 
  40486.  
  40487.            0 Indicates that the routine ran successfully. 
  40488.  
  40489.           -1 Indicates an invalid time argument or invalid results. 
  40490.  
  40491.  Examples 
  40492.  
  40493.           The following example converts a timestamp, using the TDF information 
  40494.           in the timestamp, and then prints the result. 
  40495.  
  40496.  
  40497.                     utc_t               evnt;
  40498.                     struct tm           tmevnt;
  40499.                     timespec_t          tevnt, ievnt;
  40500.                     char                tznam[80];
  40501.  
  40502.                     /*
  40503.                      *   Assume evnt contains the timestamp to convert...
  40504.                      *
  40505.                      *   Get time as a tm structure, using the time zone information in
  40506.                      *   the timestamp...
  40507.                      */
  40508.                     utc_anytime(&tmevnt,            /* Out: tm struct of time of evnt    */
  40509.                                 (long *)0,          /* Out: nanosec of time of evnt      */
  40510.                                 (struct tm *)0,     /* Out: tm struct of inacc of evnt   */
  40511.                                 (long *)0,          /* Out: nanosec of inacc of evnt     */
  40512.                                 (int *)0,           /* Out: tdf of evnt                  */
  40513.                                 &evnt);             /* In:  binary timestamp of evnt     */
  40514.  
  40515.                     /*
  40516.                      *   Get the time and inaccuracy as timespec structures...
  40517.                      */
  40518.                     utc_bintime(&tevnt,             /* Out: timespec of time of evnt     */
  40519.                                 &ievnt,             /* Out: timespec of inacc of evnt    */
  40520.                                 (int *)0,           /* Out: tdf of evnt                  */
  40521.                                 &evnt);             /* In:  Binary timestamp of evnt     */
  40522.  
  40523.                     /*
  40524.                      *   Construct the time zone name from time zone information in the
  40525.                      *   timestamp...
  40526.                      */
  40527.                     utc_anyzone(tznam,              /* Out: Time zone name               */
  40528.                                 80,                 /* In:  Size of time zone name       */
  40529.                                 (long *)0,          /* Out: tdf of event                 */
  40530.                                 (long *)0,          /* Out: Daylight saving flag         */
  40531.                                 &evnt);             /* In:  Binary timestamp of evnt     */
  40532.  
  40533.                     /*
  40534.                      *   Print timestamp in the format:
  40535.                      *
  40536.                      *           1991-03-05-21:27:50.023I0.140 (GMT-5:00)
  40537.                      *           1992-04-02-12:37:24.003Iinf (GMT+7:00)
  40538.                      *
  40539.                      */
  40540.  
  40541.                     printf("%d-%02d-%02d-%02d:%02d:%02d.%03d",
  40542.                             tmevnt.tm_year+1900, tmevnt.tm_mon+1, tmevnt.tm_mday,
  40543.                             tmevnt.tm_hour, tmevnt.tm_min, tmevnt.tm_sec,
  40544.                             (tevnt.tv_nsec/1000000));
  40545.  
  40546.  
  40547.                     if ((long)ievnt.tv_sec == -1)
  40548.                         printf("Iinf");
  40549.                     else
  40550.                         printf("I%d.%03d", ievnt.tv_sec, (ievnt.tv_nsec/1000000));
  40551.  
  40552.                     printf(" (%s)", tznam);
  40553.  
  40554.  Related Information 
  40555.  
  40556.           Routines: 
  40557.           utc_mkanytime 
  40558.           utc_anyzone 
  40559.           utc_gettime 
  40560.           utc_getusertime 
  40561.           utc_gmtime 
  40562.           utc_localtime 
  40563.  
  40564.  
  40565. ΓòÉΓòÉΓòÉ 7.4.4. utc_anyzone ΓòÉΓòÉΓòÉ
  40566.  
  40567.  Purpose 
  40568.  
  40569.           Gets the time zone label and offset from GMT, using the TDF contained 
  40570.           in the input utc. 
  40571.  
  40572.  Format 
  40573.  
  40574.                     #include <dce\utc.h>
  40575.  
  40576.                     int utc_anyzone(
  40577.                   char  *tzname,
  40578.                   size_t  tzlen,
  40579.                   long  *tdf,
  40580.                   int  *isdst,
  40581.                   utc_t  *utc);
  40582.  
  40583.  Parameters 
  40584.  
  40585.           Input 
  40586.  
  40587.           tzlen         Length of the tzname buffer. 
  40588.  
  40589.           utc           Binary timestamp.  Use NULL if you want this routine to 
  40590.                         use the current time for this parameter. 
  40591.  
  40592.           Output 
  40593.  
  40594.           tzname        Character string that is long enough to hold the time 
  40595.                         zone label. 
  40596.  
  40597.           tdf           Longword with differential in seconds east of GMT. 
  40598.  
  40599.           isdst         Integer with a value of -1, indicating that no 
  40600.                         information is supplied as to whether it is Standard 
  40601.                         Time or Daylight Savings Time. A value of -1 is always 
  40602.                         returned. 
  40603.  
  40604.  Usage 
  40605.  
  40606.           The utc_anyzone routine gets the time zone label and offset from GMT 
  40607.           by using the TDF contained in the utc input parameter. The label 
  40608.           returned is always of the form GMT+n or GMT-n where n is the tdf 
  40609.           expressed in hours:minutes. (The label associated with an arbitrary 
  40610.           time zone is not known; only the offset is known.) 
  40611.  
  40612.  Notes 
  40613.  
  40614.           All of the Output parameters are optional. No value is returned and 
  40615.           no error occurs if the pointer is NULL. 
  40616.  
  40617.  Return Codes 
  40618.  
  40619.            0 Indicates that the routine ran successfully. 
  40620.  
  40621.           -1 Indicates an invalid time argument or an insufficient buffer. 
  40622.  
  40623.  Examples 
  40624.  
  40625.           See the example in utc_anytime. 
  40626.  
  40627.  Related Information 
  40628.  
  40629.           Routines: 
  40630.           utc_anytime 
  40631.           utc_gmtzone 
  40632.           utc_localzone 
  40633.  
  40634.  
  40635. ΓòÉΓòÉΓòÉ 7.4.5. utc_ascanytime ΓòÉΓòÉΓòÉ
  40636.  
  40637.  Purpose 
  40638.  
  40639.           Converts a binary timestamp to an ASCII text string that represents 
  40640.           an arbitrary time zone. 
  40641.  
  40642.  Format 
  40643.  
  40644.                     #include <dce\utc.h>
  40645.  
  40646.                     int utc_ascanytime(
  40647.                   char  *cp,
  40648.                   size_t  stringlen,
  40649.                   utc_t  *utc);
  40650.  
  40651.  Parameters 
  40652.  
  40653.           Input 
  40654.  
  40655.           stringlen     The length of the cp buffer. 
  40656.  
  40657.           utc           Binary timestamp. Use NULL if you want this routine to 
  40658.                         use the current time for this parameter. 
  40659.  
  40660.           Output 
  40661.  
  40662.           cp            An ASCII text string that represents the time. 
  40663.  
  40664.  Usage 
  40665.  
  40666.           The utc_ascanytime routine converts a binary timestamp to an ASCII 
  40667.           string that expresses a time. The TDF component in the timestamp 
  40668.           determines the local time used in the conversion. 
  40669.  
  40670.  Return Codes 
  40671.  
  40672.            0 Indicates that the routine ran successfully. 
  40673.  
  40674.           -1 Indicates an invalid time parameter or invalid results. 
  40675.  
  40676.  Examples 
  40677.  
  40678.           The following example converts a time to an ASCII text string that 
  40679.           expresses the time in the time zone where the timestamp was 
  40680.           generated. 
  40681.  
  40682.  
  40683.                     utc_t      evnt;
  40684.                     char       localTime[UTC_MAX_STR_LEN];
  40685.  
  40686.                     /*
  40687.                      *   Assuming that evnt contains the timestamp to convert, convert
  40688.                      *   the time to ASCII in the following format:
  40689.                      *
  40690.                      *          1991-04-01-12:27:38.37-8:00I2.00
  40691.                      */
  40692.  
  40693.                     utc_ascanytime(localtime,         /* Out:  Converted time            */
  40694.                                    UTC_MAX_STR_LEN,   /* In:  Length of string           */
  40695.                                    &evnt);            /* In:  Time to convert            */
  40696.  
  40697.  Related Information 
  40698.  
  40699.           Routines: 
  40700.           utc_ascgmtime 
  40701.           utc_asclocaltime 
  40702.  
  40703.  
  40704. ΓòÉΓòÉΓòÉ 7.4.6. utc_ascgmtime ΓòÉΓòÉΓòÉ
  40705.  
  40706.  Purpose 
  40707.  
  40708.           Converts a binary timestamp to an ASCII text string that expresses a 
  40709.           GMT time. 
  40710.  
  40711.  Format 
  40712.  
  40713.                     #include <dce\utc.h>
  40714.  
  40715.                     int utc_ascgmtime(
  40716.                   char  *cp,
  40717.                   size_t  stringlen,
  40718.                   utc_t  *utc);
  40719.  
  40720.  Parameters 
  40721.  
  40722.           Input 
  40723.  
  40724.           stringlen     Length of the cp buffer. 
  40725.  
  40726.           utc           Binary timestamp. 
  40727.  
  40728.           Output 
  40729.  
  40730.           cp            An ASCII text string that represents the time. 
  40731.  
  40732.  Usage 
  40733.  
  40734.           The utc_ascgmtime routine converts a binary timestamp to an ASCII 
  40735.           text string that expresses a time in GMT. 
  40736.  
  40737.  Return Codes 
  40738.  
  40739.            0 Indicates that the routine ran successfully. 
  40740.  
  40741.           -1 Indicates an invalid time parameter or invalid results. 
  40742.  
  40743.  Examples 
  40744.  
  40745.           The following example converts the current time to GMT format. 
  40746.  
  40747.  
  40748.                     char   gmTime[UTC_MAX_STR_LEN];
  40749.  
  40750.                     /*
  40751.                      *   Convert the current time to ASCII in the following format:
  40752.                      *
  40753.                      *          1991-04-01-12:27:38.37I2.00
  40754.                      */
  40755.  
  40756.                     utc_ascgmtime(gmTime,                /* Out: Converted time          */
  40757.                                   UTC_MAX_STR_LEN,       /* In:  Length of string        */
  40758.                                   (utc_t*) NULL);        /* In:  Time to convert         */
  40759.                                                          /* Default is current time      */
  40760.  
  40761.  Related Information 
  40762.  
  40763.           Routines: 
  40764.           utc_ascanytime 
  40765.           utc_asclocaltime 
  40766.  
  40767.  
  40768. ΓòÉΓòÉΓòÉ 7.4.7. utc_asclocaltime ΓòÉΓòÉΓòÉ
  40769.  
  40770.  Purpose 
  40771.  
  40772.           Converts a binary timestamp to an ASCII text string that represents a 
  40773.           local time. 
  40774.  
  40775.  Format 
  40776.  
  40777.                     #include <dce\utc.h>
  40778.  
  40779.                     int utc_asclocaltime(
  40780.                   char  *cp,
  40781.                   size_t  stringlen,
  40782.                   utc_t  *utc);
  40783.  
  40784.  Parameters 
  40785.  
  40786.           Input 
  40787.  
  40788.           stringlen     Length of the cp buffer. 
  40789.  
  40790.           utc           Binary timestamp. Use NULL if you want this routine to 
  40791.                         use the current time for this parameter. 
  40792.  
  40793.           Output 
  40794.  
  40795.           cp            An ASCII text string that represents the time. 
  40796.  
  40797.  Usage 
  40798.  
  40799.           The utc_asclocaltime routine converts a binary timestamp to an ASCII 
  40800.           text string that expresses local time. 
  40801.  
  40802.           The user's environment determines the time zone rule (details are 
  40803.           system dependent). For example, on OS/2 systems, the user selects a 
  40804.           time zone by specifying the TZ environment variable. 
  40805.  
  40806.           If the user's environment does not specify a time zone rule, the 
  40807.           system's rule is used (details of the rule are system dependent.) For 
  40808.           example, on OS/2 systems, the rule in the localtime file is used. 
  40809.  
  40810.  Return Codes 
  40811.  
  40812.            0 Indicates that the routine ran successfully. 
  40813.  
  40814.           -1 Indicates an invalid time parameter or invalid results. 
  40815.  
  40816.  Examples 
  40817.  
  40818.           The following example converts the current time to local time. 
  40819.  
  40820.  
  40821.                     char   localTime[UTC_MAX_STR_LEN];
  40822.  
  40823.                     /*
  40824.                      *   Convert the current time...
  40825.                      */
  40826.  
  40827.                     utc_asclocaltime(localTime,        /* Out:  Converted time      */
  40828.                                      UTC_MAX_STR_LEN,  /* In:   Length of string    */
  40829.                                      (utc_t*) NULL);   /* In:   Time to convert     */
  40830.                                                        /* Default is current time   */
  40831.  
  40832.  Related Information 
  40833.  
  40834.           Routines: 
  40835.  
  40836.  
  40837.           utc_ascanytime 
  40838.           utc_ascgmtime 
  40839.  
  40840.  
  40841. ΓòÉΓòÉΓòÉ 7.4.8. utc_ascreltime ΓòÉΓòÉΓòÉ
  40842.  
  40843.  Purpose 
  40844.  
  40845.           Converts a relative binary timestamp to an ASCII text string that 
  40846.           represents the time. 
  40847.  
  40848.  Format 
  40849.  
  40850.                     #include <dce\utc.h>
  40851.  
  40852.                     int utc_ascreltime(
  40853.                   char  *cp,
  40854.                   const  size_t stringlen,
  40855.                   utc_t  *utc);
  40856.  
  40857.  Parameters 
  40858.  
  40859.           Input 
  40860.  
  40861.           utc           Relative binary timestamp. Use NULL if you want this 
  40862.                         routine to use the current time for this parameter. 
  40863.  
  40864.           stringlen     Length of the cp buffer. 
  40865.  
  40866.           Output 
  40867.  
  40868.           cp            An ASCII text string that represents the time. 
  40869.  
  40870.  Usage 
  40871.  
  40872.           The utc_ascreltime routine converts a relative binary timestamp to an 
  40873.           ASCII text string that represents the time. 
  40874.  
  40875.  Return Codes 
  40876.  
  40877.            0 Indicates that the routine ran successfully. 
  40878.  
  40879.           -1 Indicates an invalid time parameter or invalid results. 
  40880.  
  40881.  Examples 
  40882.  
  40883.           See the example in utc_abstime. 
  40884.  
  40885.  Related Information 
  40886.  
  40887.           Routines: 
  40888.  
  40889.  
  40890.           utc_mkascreltime 
  40891.  
  40892.  
  40893. ΓòÉΓòÉΓòÉ 7.4.9. utc_binreltime ΓòÉΓòÉΓòÉ
  40894.  
  40895.  Purpose 
  40896.  
  40897.           Converts a relative binary timestamp to two timespec structures that 
  40898.           express relative time and inaccuracy. 
  40899.  
  40900.  Format 
  40901.  
  40902.                     #include <dce\utc.h>
  40903.  
  40904.                     int utc_binreltime(
  40905.                   reltimespec_t  *timesp,
  40906.                   timespec_t  *inaccsp,
  40907.                   utc_t  *utc);
  40908.  
  40909.  Parameters 
  40910.  
  40911.           Input 
  40912.  
  40913.           utc           Relative binary timestamp. Use NULL if you want this 
  40914.                         routine to use the current time for this parameter. 
  40915.  
  40916.           Output 
  40917.  
  40918.           timesp        Time component of the relative binary timestamp, in the 
  40919.                         form of seconds and nanoseconds since the base time 
  40920.                         (1970-01-01:00:00:00.0+00:00I0). 
  40921.  
  40922.           inaccsp       Inaccuracy component of the relative binary timestamp, 
  40923.                         in the form of seconds and nanoseconds. 
  40924.  
  40925.  Usage 
  40926.  
  40927.           The utc_binreltime routine converts a relative binary timestamp to 
  40928.           two timespec structures that express relative time and inaccuracy. 
  40929.           These timespec structures describe a time interval. 
  40930.  
  40931.  Return Codes 
  40932.  
  40933.            0 Indicates that the routine ran successfully. 
  40934.  
  40935.           -1 Indicates an invalid time argument or invalid results. 
  40936.  
  40937.  Examples 
  40938.  
  40939.           The following example measures the duration of a process, then prints 
  40940.           the resulting relative time and inaccuracy. 
  40941.  
  40942.  
  40943.                     utc_t               before, duration;
  40944.                     reltimespec_t       tduration;
  40945.                     timespec_t          iduration;
  40946.  
  40947.                     /*
  40948.                      *   Get the time before the start of the operation...
  40949.                      */
  40950.  
  40951.                     utc_gettime(&before);           /* Out:  Before binary timestamp     */
  40952.  
  40953.                     /*
  40954.                      *    ...Later...
  40955.                      *    Subtract, getting the duration as a relative time.
  40956.                      *
  40957.                      *         NOTE:  The NULL argument is used to obtain the current time.
  40958.                      */
  40959.  
  40960.                     utc_subtime(&duration,          /* Out:  Duration rel bin timestamp  */
  40961.                                 (utc_t *)0,         /* In:  After binary timestamp       */
  40962.                                 &before);           /* In:  Before binary timestamp      */
  40963.  
  40964.                     /*
  40965.                      *    Convert the relative times to timespec structures...
  40966.                      */
  40967.  
  40968.                     utc_binreltime(&tduration,      /* Out:  Duration time timespec      */
  40969.                                    &iduration,      /* Out:  Duration inacc timespec     */
  40970.                                    &duration);      /* In:  Duration rel bin timestamp   */
  40971.  
  40972.                     /*
  40973.                      *    Print the duration...
  40974.                      */
  40975.  
  40976.                     printf("%d.%04d", tduration.tv_sec, (tduration.tv_nsec/10000));
  40977.  
  40978.                     if ((long)iduration.tv_sec == -1)
  40979.                         printf("Iinf\n");
  40980.                     else
  40981.                         printf("I%d.%04d\n", iduration.tv_sec, (iduration.tv_nsec/100000));
  40982.  
  40983.  Related Information 
  40984.  
  40985.           Routines: 
  40986.  
  40987.  
  40988.           utc_mkbinreltime 
  40989.  
  40990.  
  40991. ΓòÉΓòÉΓòÉ 7.4.10. utc_bintime ΓòÉΓòÉΓòÉ
  40992.  
  40993.  Purpose 
  40994.  
  40995.           Converts a binary timestamp to a timespec structure. 
  40996.  
  40997.  Format 
  40998.  
  40999.                     #include <dce\utc.h>
  41000.  
  41001.                     int utc_bintime(
  41002.                   timespec_t  *timesp,
  41003.                   timespec_t  *inaccsp,
  41004.                   long  *tdf,
  41005.                   utc_t  *utc);
  41006.  
  41007.  Parameters 
  41008.  
  41009.           Input 
  41010.  
  41011.           utc           Binary timestamp. Use NULL if you want this routine to 
  41012.                         use the current time for this parameter. 
  41013.  
  41014.           Output 
  41015.  
  41016.           timesp        Time component of the binary timestamp, in the form of 
  41017.                         seconds and nanoseconds since the base time. 
  41018.  
  41019.           inaccsp       Inaccuracy component of the binary timestamp, in the 
  41020.                         form of seconds and nanoseconds. 
  41021.  
  41022.           tdf           TDF component of the binary timestamp in the form of 
  41023.                         signed number of seconds east of GMT. 
  41024.  
  41025.  Usage 
  41026.  
  41027.           The utc_bintime routine converts a binary timestamp to a timespec 
  41028.           structure. The TDF information contained in the timestamp is 
  41029.           returned. 
  41030.  
  41031.  Return Codes 
  41032.  
  41033.            0 Indicates that the routine ran successfully. 
  41034.  
  41035.           -1 Indicates an invalid time argument or invalid results. 
  41036.  
  41037.  Examples 
  41038.  
  41039.           See the example in utc_anytime. 
  41040.  
  41041.  Related Information 
  41042.  
  41043.           Routines: 
  41044.  
  41045.  
  41046.           utc_binreltime 
  41047.           utc_mkbintime 
  41048.  
  41049.  
  41050. ΓòÉΓòÉΓòÉ 7.4.11. utc_boundtime ΓòÉΓòÉΓòÉ
  41051.  
  41052.  Purpose 
  41053.  
  41054.           Returns a single UTC time whose inaccuracy includes an event, given 
  41055.           two UTC times, one before and one after the event. 
  41056.  
  41057.  Format 
  41058.  
  41059.                     #include <dce\utc.h>
  41060.  
  41061.                     int utc_boundtime(
  41062.                   utc_t  *result,
  41063.                   utc_t  *utc1,
  41064.                   utc_t  *utc2);
  41065.  
  41066.  Parameters 
  41067.  
  41068.           Input 
  41069.  
  41070.           utc1          Before binary timestamp or relative binary timestamp. 
  41071.                         Use NULL if you want this routine to use the current 
  41072.                         time for this parameter. 
  41073.  
  41074.           utc2          After binary timestamp or relative binary timestamp. 
  41075.                         Use NULL if you want this routine to use the current 
  41076.                         time for this parameter. 
  41077.  
  41078.           Output 
  41079.  
  41080.           result        Spanning timestamp. 
  41081.  
  41082.  Usage 
  41083.  
  41084.           Given two UTC times, the utc_boundtime routine returns a single UTC 
  41085.           time whose inaccuracy bounds the two input times. This is useful for 
  41086.           timestamping events; the routine gets the utc values before and after 
  41087.           the event and then calls utc_boundtime to build a timestamp that 
  41088.           includes the event. 
  41089.  
  41090.  Notes 
  41091.  
  41092.           The TDF in the output UTC value is copied from the utc2 input.  If 
  41093.           one or both input values have infinite inaccuracies, the returned 
  41094.           time value also has an unspecified inaccuracy and is the average of 
  41095.           the two input values. 
  41096.  
  41097.  Return Codes 
  41098.  
  41099.            0 Indicates that the routine ran successfully. 
  41100.  
  41101.           -1 Indicates an invalid time parameter or invalid parameter order. 
  41102.  
  41103.  Examples 
  41104.  
  41105.           The following example records the time of an event and constructs a 
  41106.           single timestamp, which includes the time of the event.  Note that 
  41107.           the utc_getusertime routine is called so the time zone information 
  41108.           that is included in the timestamp references the user's environment 
  41109.           rather than the system's default time zone. 
  41110.  
  41111.           The user's environment determines the time zone rule (details are 
  41112.           system dependent). For example, on OS/2 systems, the user selects a 
  41113.           time zone by specifying the TZ environment variable. 
  41114.  
  41115.           If the user's environment does not specify a time zone rule, the 
  41116.           system's rule is used (details of the rule are system dependent). For 
  41117.           example, on OS/2 systems, the rule in the localtime file is used. 
  41118.  
  41119.  
  41120.                     utc_t               before, after, evnt;
  41121.  
  41122.                     /*
  41123.                      *   Get the time before the event...
  41124.                      */
  41125.  
  41126.                     utc_getusertime(&before);       /* Out:  Before binary timestamp    */
  41127.  
  41128.                     /*
  41129.                      *   Get the time after the event...
  41130.                      */
  41131.  
  41132.                     utc_getusertime(&after);        /* Out:  After binary timestamp     */
  41133.  
  41134.                     /*
  41135.                      *   Construct a single timestamp that describes the time of the
  41136.                      *   event...
  41137.                      */
  41138.  
  41139.                     utc_boundtime(&evnt,            /* Out: Timestamp that bounds event */
  41140.                                   &before,          /* In:  Before binary timestamp     */
  41141.                                   &after);          /* In:  After binary timestamp      */
  41142.  
  41143.  Related Information 
  41144.  
  41145.           Routines: 
  41146.  
  41147.  
  41148.           utc_gettime 
  41149.           utc_pointtime 
  41150.           utc_spantime 
  41151.  
  41152.  
  41153. ΓòÉΓòÉΓòÉ 7.4.12. utc_cmpintervaltime ΓòÉΓòÉΓòÉ
  41154.  
  41155.  Purpose 
  41156.  
  41157.           Compares two binary timestamps or two relative binary timestamps. 
  41158.  
  41159.  Format 
  41160.  
  41161.                     #include <dce\utc.h>
  41162.  
  41163.                     int utc_cmpintervaltime(
  41164.                   enum  utc_cmptype *relation,
  41165.                   utc_t  *utc1,
  41166.                   utc_t  *utc2);
  41167.  
  41168.  Parameters 
  41169.  
  41170.           Input 
  41171.  
  41172.           utc1          Binary timestamp or relative binary timestamp. Use NULL 
  41173.                         if you want this routine to use the current time for 
  41174.                         this parameter. 
  41175.  
  41176.           utc2          Binary timestamp or relative binary timestamp. Use NULL 
  41177.                         if you want this routine to use the current time for 
  41178.                         this parameter. 
  41179.  
  41180.           Output 
  41181.  
  41182.           relation      Receives the result of the comparison of utc1:utc2 
  41183.                         where the result is an enumerated type with one of the 
  41184.                         following values: 
  41185.  
  41186.                           o  utc_equalTo 
  41187.                           o  utc_lessThan 
  41188.                           o  utc_greaterThan 
  41189.                           o  utc_indeterminate 
  41190.  
  41191.  Usage 
  41192.  
  41193.           The utc_cmpintervaltime routine compares two binary timestamps and 
  41194.           returns a flag indicating that the first time is greater than, less 
  41195.           than, equal to, or overlapping with the second time. Two times 
  41196.           overlap if the intervals (time - inaccuracy, time - inaccuracy) of 
  41197.           the two times intersect. 
  41198.  
  41199.           The input binary timestamps express two absolute or two relative 
  41200.           times. Do not compare relative binary timestamps and absolute binary 
  41201.           timestamps. If you do, no meaningful results and no errors are 
  41202.           returned. 
  41203.  
  41204.           The following routine does a temporal ordering of the time intervals. 
  41205.  
  41206.  
  41207.                     utc1 is utc_lessThan utc2 iff
  41208.                             utc1.time + utc1.inacc < utc2.time - utc2.inacc
  41209.  
  41210.                     utc1 is utc_greaterThan utc2 iff
  41211.                             utc1.time - utc1.inacc > utc2.time + utc2.inacc
  41212.  
  41213.                     utc1 utc_equalTo utc2 iff
  41214.                             utc1.time == utc2.time and
  41215.                             utc1.inacc == 0 and
  41216.                             utc2.inacc == 0
  41217.  
  41218.                     utc1 is utc_indeterminate with respect to utc2 if the intervals
  41219.                     overlap.
  41220.  
  41221.  Return Codes 
  41222.  
  41223.            0 Indicates that the routine ran successfully. 
  41224.  
  41225.           -1 Indicates an invalid time argument. 
  41226.  
  41227.  Examples 
  41228.  
  41229.           The following example checks to see if the current time is definitely 
  41230.           after 13:00 local time. 
  41231.  
  41232.  
  41233.                     struct tm           tmtime, tmzero;
  41234.                     enum utc_cmptype    relation;
  41235.                     utc_t               testtime;
  41236.  
  41237.                     /*
  41238.                      *   Zero the tm structure for inaccuracy...
  41239.                      */
  41240.  
  41241.                     memset(&tmzero, 0, sizeof(tmzero));
  41242.  
  41243.                     /*
  41244.                      *   Get the current time, mapped to a tm structure...
  41245.                      *
  41246.                      *        NOTE:  The NULL argument is used to get the current time.
  41247.                      */
  41248.  
  41249.                     utc_gmtime(&tmtime,         /* Out:  Current GMT time in tm struct   */
  41250.                                (long *)0,       /* Out:  Nanoseconds of time             */
  41251.                                (struct tm *)0,  /* Out:  Current inaccuracy in tm struct */
  41252.                                (long *)0,       /* Out:  Nanoseconds of inaccuracy       */
  41253.                                (utc_t *)0);     /* In:  Current timestamp                */
  41254.  
  41255.                     /*
  41256.                      *   Construct a tm structure that corresponds to 13:00 local time...
  41257.                      */
  41258.  
  41259.                     tmtime.tm_hour = 13;
  41260.                     tmtime.tm_min = 0;
  41261.                     tmtime.tm_sec = 0;
  41262.  
  41263.                     /*
  41264.                      *   Convert to a binary timestamp...
  41265.                      */
  41266.  
  41267.                     utc_mkgmtime(&testtime,     /* Out:  Binary timestamp of 13:00       */
  41268.                                  &tmtime,       /* In:  1:00 PM in tm struct             */
  41269.                                  0,             /* In:  Nanoseconds of time              */
  41270.                                  &tmzero,       /* In:  Zero inaccuracy in tm struct     */
  41271.                                  0);            /* In:  Nanoseconds of inaccuracy        */
  41272.  
  41273.                     /*
  41274.                      *   Compare to the current time.  Note the use of the NULL argument...
  41275.                      */
  41276.  
  41277.                     utc_cmpintervaltime(&relation,    /* Out:  Comparison relation       */
  41278.                                         (utc_t *)0,   /* In:   Current timestamp         */
  41279.                                         &testtime);   /* In:   13:00 timestamp           */
  41280.                     /*
  41281.                      *   If it is not later - wait, print a message, etc.
  41282.                      */
  41283.  
  41284.                     if (relation != utc_greaterThan) {
  41285.  
  41286.                     /*
  41287.                      *     Note: It could be earlier than 13:00 or it could be
  41288.                      *           indeterminate. If indeterminate, for some applications
  41289.                      *           it might be worth waiting.
  41290.                      */
  41291.                     }
  41292.  
  41293.  Related Information 
  41294.  
  41295.           Routines: 
  41296.  
  41297.  
  41298.           utc_cmpmidtime 
  41299.  
  41300.  
  41301. ΓòÉΓòÉΓòÉ 7.4.13. utc_cmpmidtime ΓòÉΓòÉΓòÉ
  41302.  
  41303.  Purpose 
  41304.  
  41305.           Compares two binary timestamps or two relative binary timestamps, 
  41306.           ignoring inaccuracies. 
  41307.  
  41308.  Format 
  41309.  
  41310.                     #include <dce\utc.h>
  41311.  
  41312.                     int utc_cmpmidtime(
  41313.                   enum utc_cmptype  *relation,
  41314.                   utc_t  *utc1,
  41315.                   utc_t  *utc2);
  41316.  
  41317.  Parameters 
  41318.  
  41319.           Input 
  41320.  
  41321.           utc1          Binary timestamp or relative binary timestamp. Use NULL 
  41322.                         if you want this routine to use the current time for 
  41323.                         this parameter. 
  41324.  
  41325.           utc2          Binary timestamp or relative binary timestamp. Use NULL 
  41326.                         if you want this routine to use the current time for 
  41327.                         this parameter. 
  41328.  
  41329.           Output 
  41330.  
  41331.           relation      Result of the comparison of utc1:utc2 where the result 
  41332.                         is an enumerated type with one of the following values: 
  41333.  
  41334.                           o  utc_equalTo 
  41335.                           o  utc_lessThan 
  41336.                           o  utc_greaterThan. 
  41337.  
  41338.  Usage 
  41339.  
  41340.           The utc_cmpmidtime routine compares two binary timestamps and returns 
  41341.           a flag indicating that the first timestamp is greater than, less 
  41342.           than, or equal to the second timestamp. Inaccuracy information is 
  41343.           ignored for this comparison; the input values are therefore 
  41344.           equivalent to the midpoints of the time intervals described by the 
  41345.           input binary timestamps. 
  41346.  
  41347.           The input binary timestamps express two absolute or two relative 
  41348.           times. Do not compare relative binary timestamps to absolute binary 
  41349.           timestamps. If you do, no meaningful results and no errors are 
  41350.           returned. 
  41351.  
  41352.           The following routine does a lexical ordering on the time interval 
  41353.           midpoints. 
  41354.  
  41355.  
  41356.                     utc1 is utc_lessThan utc2 iff
  41357.                             utc1.time < utc2.time
  41358.  
  41359.                     utc1 is utc_greaterThan utc2 iff
  41360.                             utc1.time > utc2.time
  41361.  
  41362.                     utc1 is utc_equalTo utc2 iff
  41363.                             utc1.time == utc2.time
  41364.  
  41365.  Return Codes 
  41366.  
  41367.            0 Indicates that the routine ran successfully. 
  41368.  
  41369.           -1 Indicates an invalid time argument. 
  41370.  
  41371.  Examples 
  41372.  
  41373.           The following example checks if the current time (ignoring 
  41374.           inaccuracies) is after 13:00 local time. 
  41375.  
  41376.  
  41377.                     struct tm           tmtime, tmzero;
  41378.                     enum utc_cmptype    relation;
  41379.                     utc_t               testtime;
  41380.  
  41381.                     /*
  41382.                      *   Zero the tm structure for inaccuracy...
  41383.                      */
  41384.  
  41385.                     memset(&tmzero, 0, sizeof(tmzero));
  41386.  
  41387.                     /*
  41388.                      *   Get the current time, mapped to a tm structure...
  41389.                      *
  41390.                      *        NOTE:  The NULL argument is used to get the current time.
  41391.                      */
  41392.  
  41393.                     utc_localtime(&tmtime,        /* Out:  Current local time in tm struct */
  41394.                                  (long *)0,       /* Out:  Nanoseconds of time             */
  41395.                                  (struct tm *)0,  /* Out:  Current inacc in tm struct      */
  41396.                                  (long *)0,       /* Out:  Nanoseconds of inaccuracy       */
  41397.                                  (utc_t *)0);     /* In:  Current timestamp                */
  41398.  
  41399.                     /*
  41400.                      *   Alter the tm structure to correspond to 13:00 local time ...
  41401.                      */
  41402.  
  41403.                     tmtime.tm_hour = 13;
  41404.                     tmtime.tm_min = 0;
  41405.                     tmtime.tm_sec = 0;
  41406.  
  41407.                     /*
  41408.                      *   Convert to a binary timestamp...
  41409.                      */
  41410.  
  41411.                     utc_mklocaltime(&testtime,    /* Out:  Binary timestamp of 13:00      */
  41412.                                     &tmtime,      /* In:  13:00 in tm struct              */
  41413.                                     0,            /* In:  Nanoseconds of time             */
  41414.                                     &tmzero,      /* In:  Zero inaccuracy in tm struct    */
  41415.                                     0);           /* In:  Nanoseconds of inaccuracy       */
  41416.  
  41417.                     /*
  41418.                      *   Compare to the current time.  Note the use of the NULL argument...
  41419.                      */
  41420.  
  41421.                     utc_cmpmidtime(&relation,     /* Out:  Comparison relation            */
  41422.                                    (utc_t *)0,    /* In:  Current timestamp               */
  41423.                                    &testtime);    /* In:  13:00 local timestamp           */
  41424.  
  41425.                     /*
  41426.                      *   If the time is not later - wait, print a message, etc.
  41427.                      */
  41428.  
  41429.                     if (relation != utc_greaterThan) {
  41430.  
  41431.                     /*          It is not later than 13:00 local time.  Note that
  41432.                      *          this depends on the setting of the user's environment.
  41433.                      */
  41434.                     }
  41435.  
  41436.  Related Information 
  41437.  
  41438.           Routines: 
  41439.  
  41440.  
  41441.           utc_cmpintervaltime 
  41442.  
  41443.  
  41444. ΓòÉΓòÉΓòÉ 7.4.14. utc_gettime ΓòÉΓòÉΓòÉ
  41445.  
  41446.  Purpose 
  41447.  
  41448.           Returns the current system time and inaccuracy as a binary timestamp. 
  41449.  
  41450.  Format 
  41451.  
  41452.                     #include <dce\utc.h>
  41453.  
  41454.                     int utc_gettime(
  41455.                   utc_t  *utc);
  41456.  
  41457.  Parameters 
  41458.  
  41459.           Output 
  41460.  
  41461.           utc           System time as a binary timestamp. 
  41462.  
  41463.  Usage 
  41464.  
  41465.           The utc_gettime routine returns the current system time and 
  41466.           inaccuracy in a binary timestamp.  The routine takes the TDF from the 
  41467.           operating system's kernel; the TDF is specified in a system dependent 
  41468.           manner. 
  41469.  
  41470.  Return Codes 
  41471.  
  41472.            0 Indicates that the routine ran successfully. 
  41473.  
  41474.           -1 Generic error that indicates the time service cannot be accessed. 
  41475.  
  41476.  Examples 
  41477.  
  41478.           See the example in utc_binreltime. 
  41479.  
  41480.  
  41481. ΓòÉΓòÉΓòÉ 7.4.15. utc_getusertime ΓòÉΓòÉΓòÉ
  41482.  
  41483.  Purpose 
  41484.  
  41485.           Returns the time and process-specific TDF, rather than the 
  41486.           system-specific TDF. 
  41487.  
  41488.  Format 
  41489.  
  41490.                     #include <dce\utc.h>
  41491.  
  41492.                     int utc_getusertime(
  41493.                   utc_t  *utc);
  41494.  
  41495.  Parameters 
  41496.  
  41497.           Output 
  41498.  
  41499.           utc           System time as a binary timestamp. 
  41500.  
  41501.  Usage 
  41502.  
  41503.           The utc_getusertime routine returns the system time and inaccuracy in 
  41504.           a binary timestamp. The routine takes the TDF from the user's 
  41505.           environment, which determines the time zone rule (details are system 
  41506.           dependent). For example, on OS/2 systems, the user selects a time 
  41507.           zone by specifying the TZ environment variable. (See utc_localtime 
  41508.           for additional information.) 
  41509.  
  41510.           If the user's environment does not specify a TDF, the system's TDF is 
  41511.           used.  The system's time zone rule is applied (details of the rule 
  41512.           are system dependent). For example, on OS/2 systems, the rule in the 
  41513.           localtime file is used. 
  41514.  
  41515.  Return Codes 
  41516.  
  41517.            0 Indicates that the routine ran successfully. 
  41518.  
  41519.           -1 Generic error that indicates the time service cannot be accessed. 
  41520.  
  41521.  Examples 
  41522.  
  41523.           See the example in utc_boundtime. 
  41524.  
  41525.  Related Information 
  41526.  
  41527.           Routines: 
  41528.           utc_gettime 
  41529.  
  41530.  
  41531. ΓòÉΓòÉΓòÉ 7.4.16. utc_gmtime ΓòÉΓòÉΓòÉ
  41532.  
  41533.  Purpose 
  41534.  
  41535.           Converts a binary timestamp to a tm structure that expresses 
  41536.           Greenwich Mean Time (GMT) or the equivalent UTC. 
  41537.  
  41538.  Format 
  41539.  
  41540.                     #include <dce\utc.h>
  41541.  
  41542.                     int utc_gmtime(
  41543.                   struct tm  *timetm,
  41544.                   long  *tns,
  41545.                   struct tm  *inacctm,
  41546.                   long  *ins,
  41547.                   utc_t  *utc);
  41548.  
  41549.  Parameters 
  41550.  
  41551.           Input 
  41552.  
  41553.           utc           Binary timestamp to be converted to tm structure 
  41554.                         components. Use NULL if you want this routine to use 
  41555.                         the current time for this parameter. 
  41556.  
  41557.           Output 
  41558.  
  41559.           timetm        Time component of the binary timestamp. 
  41560.  
  41561.           tns           Nanoseconds since Time component of the binary 
  41562.                         timestamp. 
  41563.  
  41564.           inacctm       Seconds of the inaccuracy component of the binary 
  41565.                         timestamp. If the inaccuracy is finite, tm_mday returns 
  41566.                         a value of -1 and tm_mon and tm_year return values of 
  41567.                         zero. The field tm_yday contains the inaccuracy in 
  41568.                         days. If the inaccuracy is unspecified, all tm 
  41569.                         structure fields return values of -1. 
  41570.  
  41571.           ins           Nanoseconds of inaccuracy component of the binary 
  41572.                         timestamp. If the inaccuracy is unspecified, ins 
  41573.                         returns a value of -1. 
  41574.  
  41575.  Usage 
  41576.  
  41577.           The utc_gmtime (GMT) routine converts a binary timestamp to a tm 
  41578.           structure that expresses GMT (or the equivalent UTC). Additional 
  41579.           returns include nanoseconds since Time and nanoseconds of inaccuracy. 
  41580.  
  41581.  Return Codes 
  41582.  
  41583.            0 Indicates that the routine ran successfully. 
  41584.  
  41585.           -1 Indicates an invalid time argument or invalid results. 
  41586.  
  41587.  Examples 
  41588.  
  41589.           See the example in utc_cmpintervaltime. 
  41590.  
  41591.  Related Information 
  41592.  
  41593.           Routines: 
  41594.  
  41595.  
  41596.           utc_anytime 
  41597.           utc_gmtzone 
  41598.           utc_localtime 
  41599.           utc_mkgmtime 
  41600.  
  41601.  
  41602. ΓòÉΓòÉΓòÉ 7.4.17. utc_gmtzone ΓòÉΓòÉΓòÉ
  41603.  
  41604.  Purpose 
  41605.  
  41606.           Gets the time zone label for GMT. 
  41607.  
  41608.  Format 
  41609.  
  41610.                     #include <dce\utc.h>
  41611.  
  41612.                     int utc_gmtzone(
  41613.                   char  *tzname,
  41614.                   size_t  tzlen,
  41615.                   long  *tdf,
  41616.                   int  *isdst,
  41617.                   utc_t  *utc);
  41618.  
  41619.  Parameters 
  41620.  
  41621.           Input 
  41622.  
  41623.           tzlen         Length of buffer tzname. 
  41624.  
  41625.           utc           Binary timestamp.  This parameter is ignored. 
  41626.  
  41627.           Output 
  41628.  
  41629.           tzname        Character string long enough to hold the time zone 
  41630.                         label. 
  41631.  
  41632.           tdf           Long word with differential in seconds east of GMT. A 
  41633.                         value of zero is always returned. 
  41634.  
  41635.           isdst         Integer with a value of zero, indicating that Daylight 
  41636.                         Savings Time is not in effect. A value of zero is 
  41637.                         always returned. 
  41638.  
  41639.  Usage 
  41640.  
  41641.           The utc_gmtzone routine gets the time zone label and zero offset from 
  41642.           GMT. Outputs are always tdf = 0 and tzname = GMT. This routine exists 
  41643.           for symmetry with the utc_anyzone and the utc_localzone routines. 
  41644.  
  41645.           Use NULL if you want this routine to use the current time for this 
  41646.           parameter. 
  41647.  
  41648.  Notes 
  41649.  
  41650.           All of the output parameters are optional. No value is returned and 
  41651.           no error occurs if the tzname pointer is NULL. 
  41652.  
  41653.  Return Codes 
  41654.  
  41655.           0  Indicates that the routine ran successfully (always returned). 
  41656.  
  41657.  Examples 
  41658.  
  41659.           The following example prints out the current time in both local time 
  41660.           and GMT time. 
  41661.  
  41662.  
  41663.                     utc_t       now;
  41664.                     struct tm   tmlocal, tmgmt;
  41665.                     long        tzoffset;
  41666.                     int         tzdaylight;
  41667.                     char        tzlocal[80], tzgmt[80];
  41668.  
  41669.                     /*
  41670.                      *   Get the current time once, so both conversions use the same
  41671.                      *   time...
  41672.                      */
  41673.  
  41674.                     utc_gettime(&now);
  41675.  
  41676.                     /*
  41677.                      *   Convert to local time, using the process TZ environment
  41678.                      *   variable...
  41679.                      */
  41680.  
  41681.                     utc_localtime(&tmlocal,       /* Out:  Local time tm structure       */
  41682.                                   (long *)0,      /* Out:  Nanosec of time               */
  41683.                                   (struct tm *)0, /* Out:  Inaccuracy tm structure       */
  41684.                                   (long *)0,      /* Out:  Nanosec of inaccuracy         */
  41685.                                   (int *)0,       /* Out:  TDF of local time             */
  41686.                                   &now);          /* In:  Current timestamp (ignore)    */
  41687.  
  41688.                     /*
  41689.                      *   Get the local time zone name, offset from GMT, and current
  41690.                      *   daylight savings flag...
  41691.                      */
  41692.  
  41693.                     utc_localzone(tzlocal,        /* Out:  Local time zone name          */
  41694.                                   80,             /* In:   Length of loc time zone name  */
  41695.                                   &tzoffset,      /* Out:  Loc time zone offset in secs  */
  41696.                                   &tzdaylight,    /* Out:  Local time zone daylight flag */
  41697.                                   &now);          /* In:  Current binary timestamp       */
  41698.  
  41699.                     /*
  41700.                      *   Convert to GMT...
  41701.                      */
  41702.  
  41703.                     utc_gmtime(&tmgmt,            /* Out:  GMT tm structure              */
  41704.                                (long *)0,         /* Out:  Nanoseconds of time           */
  41705.                                (struct tm *)0,    /* Out:  Inaccuracy tm structure       */
  41706.                                (long *)0,         /* Out:  Nanoseconds of inaccuracy     */
  41707.                                &now);             /* In:  Current binary timestamp       */
  41708.  
  41709.                     /*
  41710.                      *   Get the GMT time zone name...
  41711.                      */
  41712.  
  41713.                     utc_gmtzone(tzgmt,            /* Out:  GMT time zone name            */
  41714.                                 80,               /* In:  Size of GMT time zone name     */
  41715.                                 (long *)0,        /* Out:  GMT time zone offset in secs  */
  41716.                                 (int *)0,         /* Out:  GMT time zone daylight flag   */
  41717.                                 &now);            /* In:  Current binary timestamp       */
  41718.                                                    /*   (ignore)                          */
  41719.  
  41720.                     /*
  41721.                      *   Print out times and time zone information in the following
  41722.                      *   format:
  41723.                      *
  41724.                      *          12:00:37 (EDT) = 16:00:37 (GMT)
  41725.                      *          EDT is -240 minutes ahead of Greenwich Mean Time.
  41726.                      *          Daylight savings time is in effect.
  41727.                      */
  41728.  
  41729.                     printf("%d:%02d:%02d (%s) = %d:%02d:%02d (%s)\n",
  41730.                            tmlocal.tm_hour, tmlocal.tm_min, tmlocal.tm_sec, tzlocal,
  41731.                            tmgmt.tm_hour, tmgmt.tm_min, tmgmt.tm_sec, tzgmt);
  41732.                     printf("%s is %d minutes ahead of Greenwich Mean Time\n", tzlocal, tzoffset/60);
  41733.  
  41734.                     if (tzdaylight != 0)
  41735.                         printf("Daylight savings time is in effect\n");
  41736.  
  41737.  Related Information 
  41738.  
  41739.           Routines: 
  41740.  
  41741.  
  41742.           utc_anyzone 
  41743.           utc_gmtime 
  41744.           utc_localzone 
  41745.  
  41746.  
  41747. ΓòÉΓòÉΓòÉ 7.4.18. utc_localtime ΓòÉΓòÉΓòÉ
  41748.  
  41749.  Purpose 
  41750.  
  41751.           Converts a binary timestamp to a tm structure that expresses local 
  41752.           time. 
  41753.  
  41754.  Format 
  41755.  
  41756.                     #include <dce\utc.h>
  41757.  
  41758.                     int utc_localtime(
  41759.                   struct tm  *timetm,
  41760.                   long  *tns,
  41761.                   struct tm  *inacctm,
  41762.                   long  *ins,
  41763.                   utc_t  *utc);
  41764.  
  41765.  Parameters 
  41766.  
  41767.           Input 
  41768.  
  41769.           utc           Binary timestamp. Use NULL if you want this routine to 
  41770.                         use the current time for this parameter. 
  41771.  
  41772.           Output 
  41773.  
  41774.           timetm        Time component of the binary timestamp, expressing 
  41775.                         local time. 
  41776.  
  41777.           tns           Nanoseconds since Time component of the binary 
  41778.                         timestamp. 
  41779.  
  41780.           inacctm       Seconds of the inaccuracy component of the binary 
  41781.                         timestamp. If the inaccuracy is finite, tm_mday returns 
  41782.                         a value of -1 and tm_mon and tm_year return values of 
  41783.                         zero. The field tm_yday contains the inaccuracy in 
  41784.                         days. If the inaccuracy is unspecified, all tm 
  41785.                         structure fields return values of -1. 
  41786.  
  41787.           ins           Nanoseconds of inaccuracy component of the binary 
  41788.                         timestamp. If the inaccuracy is unspecified, ins 
  41789.                         returns a value of -1. 
  41790.  
  41791.  Usage 
  41792.  
  41793.           The utc_localtime routine converts a binary timestamp to a tm 
  41794.           structure that expresses local time. 
  41795.  
  41796.           The user's environment determines the time zone rule (details are 
  41797.           system dependent). For example, on OS/2 systems, the user selects a 
  41798.           time zone by specifying the TZ environment variable. 
  41799.  
  41800.           If the user's environment does not specify a time zone rule, the 
  41801.           system's rule is used (details of the rule are system dependent). For 
  41802.           example, on OS/2 systems, the rule in the localtime file is used. 
  41803.  
  41804.           Additional returns include nanoseconds since Time and nanoseconds of 
  41805.           inaccuracy. 
  41806.  
  41807.  Return Codes 
  41808.  
  41809.            0 Indicates that the routine ran successfully. 
  41810.  
  41811.           -1 Indicates an invalid time argument or invalid results. 
  41812.  
  41813.  Examples 
  41814.  
  41815.           See the example in utc_gmtzone. 
  41816.  
  41817.  Related Information 
  41818.  
  41819.           Routines: 
  41820.  
  41821.  
  41822.           utc_anytime 
  41823.           utc_gmtime 
  41824.           utc_localzone 
  41825.           utc_mklocaltime 
  41826.  
  41827.  
  41828. ΓòÉΓòÉΓòÉ 7.4.19. utc_localzone ΓòÉΓòÉΓòÉ
  41829.  
  41830.  Purpose 
  41831.  
  41832.           Gets the local time zone label and offset from GMT, given utc. 
  41833.  
  41834.  Format 
  41835.  
  41836.                     #include <dce\utc.h>
  41837.  
  41838.                     int utc_localzone(
  41839.                   char  *tzname,
  41840.                   size_t  tzlen,
  41841.                   long  *tdf,
  41842.                   int  *isdst,
  41843.                   utc_t  *utc);
  41844.  
  41845.  Parameters 
  41846.  
  41847.           Input 
  41848.  
  41849.           tzlen         Length of the tzname buffer. 
  41850.  
  41851.           utc           Binary timestamp. Use NULL if you want this routine to 
  41852.                         use the current time for this parameter. 
  41853.  
  41854.           Output 
  41855.  
  41856.           tzname        Character string long enough to hold the time zone 
  41857.                         label. 
  41858.  
  41859.           tdf           Long word with differential in seconds east of GMT. 
  41860.  
  41861.           isdst         Integer with a value of zero if Standard Time is in 
  41862.                         effect or a value of 1 if Daylight Savings Time is in 
  41863.                         effect. 
  41864.  
  41865.  Usage 
  41866.  
  41867.           The utc_localzone routine gets the local time zone label and offset 
  41868.           from GMT, given utc. 
  41869.  
  41870.           The user's environment determines the time zone rule (details are 
  41871.           system dependent). For example, on OS/2 systems, the user selects a 
  41872.           time zone by specifying the TZ environment variable. 
  41873.  
  41874.           If the user's environment does not specify a time zone rule, the 
  41875.           system's rule is used (details of the rule are system dependent). For 
  41876.           example, on OS/2 systems, the rule in the localtime file is used. 
  41877.  
  41878.  Notes 
  41879.  
  41880.           All of the Output parameters are optional.  No value is returned and 
  41881.           no error occurs if the pointer is NULL. 
  41882.  
  41883.  Return Codes 
  41884.  
  41885.            0 Indicates that the routine ran successfully. 
  41886.  
  41887.           -1 Indicates an invalid time argument or an insufficient buffer. 
  41888.  
  41889.  Examples 
  41890.  
  41891.           See the example in utc_gmtzone. 
  41892.  
  41893.  Related Information 
  41894.  
  41895.           Routines: 
  41896.  
  41897.  
  41898.           utc_anyzone 
  41899.           utc_gmtzone 
  41900.           utc_localtime 
  41901.  
  41902.  
  41903. ΓòÉΓòÉΓòÉ 7.4.20. utc_mkanytime ΓòÉΓòÉΓòÉ
  41904.  
  41905.  Purpose 
  41906.  
  41907.           Converts a tm structure and TDF (expressing the time in an arbitrary 
  41908.           time zone) to a binary timestamp. 
  41909.  
  41910.  Format 
  41911.  
  41912.                     #include <dce\utc.h>
  41913.  
  41914.                     int utc_mkanytime(
  41915.                   utc_t  *utc,
  41916.                   struct tm  *timetm,
  41917.                   long  tns,
  41918.                   struct tm  *inacctm,
  41919.                   long  ins,
  41920.                   long  tdf);
  41921.  
  41922.  Parameters 
  41923.  
  41924.           Input 
  41925.  
  41926.           timetm        A tm structure that expresses the local time; tm_wday 
  41927.                         and tm_yday are ignored on input; the value of tm_isdt 
  41928.                         should be -1. 
  41929.  
  41930.           tns           Nanoseconds since the Time component. 
  41931.  
  41932.           inacctm       A tm structure that expresses days, hours, minutes, and 
  41933.                         seconds of inaccuracy. If a NULL pointer is passed or 
  41934.                         tm_yday is negative, the inaccuracy is considered to be 
  41935.                         unspecified; tm_mday, tm_mon, tm_wday, and tm_isdst are 
  41936.                         ignored on input. 
  41937.  
  41938.           ins           Nanoseconds of inaccuracy component. 
  41939.  
  41940.           tdf           Time Differential Factor to use in conversion. 
  41941.  
  41942.           Output 
  41943.  
  41944.           utc           Resulting binary timestamp. 
  41945.  
  41946.  Usage 
  41947.  
  41948.           The utc_mkanytime routine converts a tm structure and TDF (expressing 
  41949.           the time in an arbitrary time zone) to a binary timestamp. Required 
  41950.           inputs include nanoseconds since Time and nanoseconds of inaccuracy. 
  41951.  
  41952.  Return Codes 
  41953.  
  41954.            0 Indicates that the routine ran successfully. 
  41955.  
  41956.           -1 Indicates an invalid time argument or invalid results. 
  41957.  
  41958.  Examples 
  41959.  
  41960.           The following example converts a string ISO format time in an 
  41961.           arbitrary time zone to a binary timestamp. This may be part of an 
  41962.           input timestamp routine, although a real implementation will include 
  41963.           range checking. 
  41964.  
  41965.  
  41966.                     utc_t       utc;
  41967.                     struct tm   tmtime, tminacc;
  41968.                     float       tsec, isec;
  41969.                     double      tmp;
  41970.                     long        tnsec, insec;
  41971.                     int         i, offset, tzhour, tzmin, year, mon;
  41972.                     char        *string;
  41973.  
  41974.                     /*  Try to convert the string...                                  */
  41975.  
  41976.                     if(sscanf(string, "%d-%d-%d-%d:%d:%e+%d:%dI%e",
  41977.                               &year, &mon, &tmtime.tm_mday, &tmtime.tm_hour,
  41978.                               &tmtime.tm_min, &tsec, &tzhour, &tzmin, &isec) != 9) {
  41979.  
  41980.                     /*  Try again with a negative TDF...                              */
  41981.  
  41982.                     if (sscanf(string, "%d-%d-%d-%d:%d:%e-%d:%dI%e",
  41983.                                &year, &mon, &tmtime.tm_mday, &tmtime.tm_hour,
  41984.                                &tmtime.tm_min, &tsec, &tzhour, &tzmin, &isec) != 9) {
  41985.  
  41986.                     /*  ERROR                                                         */
  41987.  
  41988.                             exit(1);
  41989.                         }
  41990.  
  41991.                     /*  TDF is negative                                               */
  41992.  
  41993.                         tzhour = -tzhour;
  41994.                         tzmin = -tzmin;
  41995.  
  41996.                     }
  41997.  
  41998.                     /*  Fill in the fields...                                         */
  41999.  
  42000.                     tmtime.tm_year = year - 1900;
  42001.                     tmtime.tm_mon = --mon;
  42002.                     tmtime.tm_sec = tsec;
  42003.                     tnsec = (modf(tsec, &tmp)*1.0E9);
  42004.                     offset = tzhour*3600 + tzmin*60;
  42005.                     tminacc.tm_sec = isec;
  42006.                     insec = (modf(isec, &tmp)*1.0E9);
  42007.  
  42008.                     /* Convert to a binary timestamp...                               */
  42009.  
  42010.                     utc_mkanytime(&utc,       /* Out:  Resultant binary timestamp     */
  42011.                                   &tmtime,    /* In:  tm struct that represents input */
  42012.                                   tnsec,      /* In:  Nanoseconds from input          */
  42013.                                   &tminacc,   /* In:  tm struct that represents inacc */
  42014.                                   insec,      /* In:  Nanoseconds from input          */
  42015.                                   offset);    /* In:  TDF from input                  */
  42016.  
  42017.  Related Information 
  42018.  
  42019.           Routines: 
  42020.  
  42021.  
  42022.           utc_anytime 
  42023.           utc_anyzone 
  42024.  
  42025.  
  42026. ΓòÉΓòÉΓòÉ 7.4.21. utc_mkascreltime ΓòÉΓòÉΓòÉ
  42027.  
  42028.  Purpose 
  42029.  
  42030.           Converts a NULL-terminated character string that represents a 
  42031.           relative timestamp to a binary timestamp. 
  42032.  
  42033.  Format 
  42034.  
  42035.                     #include <dce\utc.h>
  42036.  
  42037.                     int utc_mkascreltime(
  42038.                   utc_t  *utc,
  42039.                   char  *string);
  42040.  
  42041.  Parameters 
  42042.  
  42043.           Input 
  42044.  
  42045.           string        A NULL-terminated string that expresses a relative 
  42046.                         timestamp in its ISO format. 
  42047.  
  42048.           Output 
  42049.  
  42050.           utc           Resulting binary timestamp. 
  42051.  
  42052.  Usage 
  42053.  
  42054.           The utc_mkascreltime routine converts a NULL-terminated string, which 
  42055.           represents a relative timestamp, to a binary timestamp. 
  42056.  
  42057.  Notes 
  42058.  
  42059.           The text string must be NULL-terminated. 
  42060.  
  42061.  Return Codes 
  42062.  
  42063.            0 Indicates that the routine ran successfully. 
  42064.  
  42065.           -1 Indicates an invalid time parameter or invalid results. 
  42066.  
  42067.  Examples 
  42068.  
  42069.           The following example converts an ASCII relative time string to its 
  42070.           binary equivalent. 
  42071.  
  42072.  
  42073.                     utc_t      utc;
  42074.                     char       str[UTC_MAX_STR_LEN];
  42075.  
  42076.                     /*
  42077.                      *   Relative time of -333 days, 12 hours, 1 minute, 37.223 seconds
  42078.                      *   Inaccuracy of 50.22 seconds in the format:  -333-12:01:37.223I50.22
  42079.                      */
  42080.  
  42081.                     (void)strcpy((void *)str,
  42082.                                  "-333-12:01:37.223I50.22");
  42083.  
  42084.                     utc_mkascreltime(&utc,   /* Out:  Binary utc                     */
  42085.                                      str);   /* In:  String                          */
  42086.  
  42087.  Related Information 
  42088.  
  42089.           Routines: 
  42090.  
  42091.  
  42092.           utc_ascreltime 
  42093.  
  42094.  
  42095. ΓòÉΓòÉΓòÉ 7.4.22. utc_mkasctime ΓòÉΓòÉΓòÉ
  42096.  
  42097.  Purpose 
  42098.  
  42099.           Converts a NULL-terminated character string that represents an 
  42100.           absolute timestamp to a binary timestamp. 
  42101.  
  42102.  Format 
  42103.  
  42104.                     #include <dce\utc.h>
  42105.  
  42106.                     int utc_mkasctime(
  42107.                   utc_t  *utc,
  42108.                   char  *string);
  42109.  
  42110.  Parameters 
  42111.  
  42112.           Input 
  42113.  
  42114.           string        A NULL-terminated string that expresses an absolute 
  42115.                         time. 
  42116.  
  42117.           Output 
  42118.  
  42119.           utc           Resulting binary timestamp. 
  42120.  
  42121.  Usage 
  42122.  
  42123.           The utc_mkasctime routine converts a NULL-terminated string that 
  42124.           represents an absolute time to a binary timestamp. 
  42125.  
  42126.  Notes 
  42127.  
  42128.           The text string must be NULL-terminated. 
  42129.  
  42130.  Return Codes 
  42131.  
  42132.            0 Indicates that the routine ran successfully. 
  42133.  
  42134.           -1 Indicates an invalid time parameter or invalid results. 
  42135.  
  42136.  Examples 
  42137.  
  42138.           The following example converts an ASCII time string to its binary 
  42139.           equivalent. 
  42140.  
  42141.  
  42142.                     utc_t     utc;
  42143.                     char      str[UTC_MAX_STR_LEN];
  42144.  
  42145.                     /*
  42146.                      *   July 4, 1776, 12:01:37.223 local time
  42147.                      *   TDF of -5:00 hours
  42148.                      *   Inaccuracy of 3600.32 seconds
  42149.                      */
  42150.  
  42151.                     (void)strcpy((void *)str,
  42152.                                  "1776-07-04-12:01:37.223-5:00I3600.32");
  42153.  
  42154.                     utc_mkasctime(&utc,    /* Out:  Binary utc            */
  42155.                                   str);    /* In:  String                 */
  42156.  
  42157.  Related Information 
  42158.  
  42159.           Routines: 
  42160.  
  42161.  
  42162.           utc_ascanytime 
  42163.           utc_ascgmtime 
  42164.           utc_asclocaltime 
  42165.  
  42166.  
  42167. ΓòÉΓòÉΓòÉ 7.4.23. utc_mkbinreltime ΓòÉΓòÉΓòÉ
  42168.  
  42169.  Purpose 
  42170.  
  42171.           Converts a timespec structure expressing a relative time to a binary 
  42172.           timestamp. 
  42173.  
  42174.  Format 
  42175.  
  42176.                     #include <dce\utc.h>
  42177.  
  42178.                     int utc_mkbinreltime(
  42179.                   utc_t  *utc,
  42180.                   reltimespec_t  *timesp,
  42181.                   timespec_t  *inaccsp);
  42182.  
  42183.  Parameters 
  42184.  
  42185.           Input 
  42186.  
  42187.           timesp        A reltimespec structure that expresses a relative time. 
  42188.  
  42189.           inaccsp       A timespec structure that expresses inaccuracy.  If a 
  42190.                         NULL pointer is passed or if tv_sec is set to a value 
  42191.                         of -1, the inaccuracy is considered to be unspecified. 
  42192.  
  42193.           Output 
  42194.  
  42195.           utc           Resulting relative binary timestamp. 
  42196.  
  42197.  Usage 
  42198.  
  42199.           The utc_mkbinreltime routine converts a timespec structure that 
  42200.           expresses relative time to a binary timestamp. 
  42201.  
  42202.  Return Codes 
  42203.  
  42204.            0 Indicates that the routine ran successfully. 
  42205.  
  42206.           -1 Indicates an invalid time argument or invalid results. 
  42207.  
  42208.  Examples 
  42209.  
  42210.           See the example in utc_addtime. 
  42211.  
  42212.  Related Information 
  42213.  
  42214.           Routines: 
  42215.  
  42216.  
  42217.           utc_binreltime 
  42218.           utc_mkbintime 
  42219.  
  42220.  
  42221. ΓòÉΓòÉΓòÉ 7.4.24. utc_mkbintime ΓòÉΓòÉΓòÉ
  42222.  
  42223.  Purpose 
  42224.  
  42225.           Converts a timespec structure to a binary timestamp. 
  42226.  
  42227.  Format 
  42228.  
  42229.                     #include <dce\utc.h>
  42230.  
  42231.                     int utc_mkbintime(
  42232.                   utc_t  *utc,
  42233.                   timespec_t  *timesp,
  42234.                   timespec_t  *inaccsp,
  42235.                   long  tdf);
  42236.  
  42237.  Parameters 
  42238.  
  42239.           Input 
  42240.  
  42241.           timesp        A timespec structure that expresses time since 
  42242.                         1970-01-01:00:00:00.0+0:00I0. 
  42243.  
  42244.           inaccsp       A timespec structure that expresses inaccuracy.  If a 
  42245.                         NULL pointer is passed or if tv_sec is set to a value 
  42246.                         of -1, the inaccuracy is considered to be unspecified. 
  42247.  
  42248.           tdf           TDF component of the binary timestamp. 
  42249.  
  42250.           Output 
  42251.  
  42252.           utc           Resulting binary timestamp. 
  42253.  
  42254.  Usage 
  42255.  
  42256.           The utc_mkbintime routine converts a timespec structure time to a 
  42257.           binary timestamp.  The TDF input is used as the TDF of the binary 
  42258.           timestamp. 
  42259.  
  42260.  Return Codes 
  42261.  
  42262.            0 Indicates that the routine ran successfully. 
  42263.  
  42264.           -1 Indicates an invalid time argument or invalid results. 
  42265.  
  42266.  Examples 
  42267.  
  42268.           The following example obtains the current time from time, converts it 
  42269.           to a binary timestamp with an inaccuracy of 5.2 seconds, and 
  42270.           specifies GMT. 
  42271.  
  42272.  
  42273.                     timespec_t   ttime, tinacc;
  42274.                     utc_t        utc;
  42275.  
  42276.                     /*
  42277.                      *   Obtain the current time (without the inaccuracy)...
  42278.                      */
  42279.  
  42280.                     ttime.tv_sec = time((time_t *)0);
  42281.                     ttime.tv_nsec = 0;
  42282.  
  42283.                     /*
  42284.                      *   Specify the inaccuracy...
  42285.                      */
  42286.  
  42287.                     tinacc.tv_sec = 5;
  42288.                     tinacc.tv_nsec = 200000000;
  42289.  
  42290.                     /*
  42291.                      *   Convert to a binary timestamp...
  42292.                      */
  42293.  
  42294.                     utc_mkbintime(&utc,            /* Out:  Binary timestamp            */
  42295.                                   &ttime,           /* In:  Current time in timespec    */
  42296.                                   &tinacc,          /* In:  5.2 seconds in timespec     */
  42297.                                   0);               /* In:  TDF of GMT                  */
  42298.  
  42299.  Related Information 
  42300.  
  42301.           Routines: 
  42302.  
  42303.  
  42304.           utc_bintime 
  42305.           utc_mkbinreltime 
  42306.  
  42307.  
  42308. ΓòÉΓòÉΓòÉ 7.4.25. utc_mkgmtime ΓòÉΓòÉΓòÉ
  42309.  
  42310.  Purpose 
  42311.  
  42312.           Converts a tm structure that expresses GMT or UTC to a binary 
  42313.           timestamp. 
  42314.  
  42315.  Format 
  42316.  
  42317.                     #include <dce\utc.h>
  42318.  
  42319.                     int utc_mkgmtime(
  42320.                   utc_t  *utc,
  42321.                   struct tm  *timetm,
  42322.                   long  tns,
  42323.                   struct tm  *inacctm,
  42324.                   long  ins);
  42325.  
  42326.  Parameters 
  42327.  
  42328.           Input 
  42329.  
  42330.           timetm        A tm structure that expresses GMT.  On input, tm_wday 
  42331.                         and tm_yday are ignored; the value of tm_isdt should be 
  42332.                         -1. 
  42333.  
  42334.           tns           Nanoseconds since the Time component. 
  42335.  
  42336.           inacctm       A tm structure that expresses days, hours, minutes, and 
  42337.                         seconds of inaccuracy.  If a NULL pointer is passed, or 
  42338.                         if tm_yday is negative, the inaccuracy is considered to 
  42339.                         be unspecified. On input, tm_mday, tm_mon, tm_wday, and 
  42340.                         tm_isdst are ignored. 
  42341.  
  42342.           ins           Nanoseconds of inaccuracy component. 
  42343.  
  42344.           Output 
  42345.  
  42346.           utc           Resulting binary timestamp. 
  42347.  
  42348.  Usage 
  42349.  
  42350.           The utc_mkgmtime routine converts a tm structure that expresses GMT 
  42351.           or UTC to a binary timestamp.  Additional inputs include nanoseconds 
  42352.           since the last second of Time and nanoseconds of inaccuracy. 
  42353.  
  42354.  Return Codes 
  42355.  
  42356.            0 Indicates that the routine ran successfully. 
  42357.  
  42358.           -1 Indicates an invalid time argument or invalid results. 
  42359.  
  42360.  Examples 
  42361.  
  42362.           See the example in utc_cmpintervaltime. 
  42363.  
  42364.  Related Information 
  42365.  
  42366.           Routines: 
  42367.  
  42368.  
  42369.           utc_gmtime 
  42370.  
  42371.  
  42372. ΓòÉΓòÉΓòÉ 7.4.26. utc_mklocaltime ΓòÉΓòÉΓòÉ
  42373.  
  42374.  Purpose 
  42375.  
  42376.           Converts a tm structure that expresses local time to a binary 
  42377.           timestamp. 
  42378.  
  42379.  Format 
  42380.  
  42381.                     #include <dce\utc.h>
  42382.  
  42383.                     int utc_mklocaltime(
  42384.                   utc_t  *utc,
  42385.                   struct tm  *timetm,
  42386.                   long  tns,
  42387.                   struct tm  *inacctm,
  42388.                   long  ins);
  42389.  
  42390.  Parameters 
  42391.  
  42392.           Input 
  42393.  
  42394.           timetm        A tm structure that expresses the local time.  On 
  42395.                         input, tm_wday and tm_yday are ignored; the value of 
  42396.                         tm_isdt should be -1. 
  42397.  
  42398.           tns           Nanoseconds since Time component. 
  42399.  
  42400.           inacctm       A tm structure that expresses days, hours, minutes, and 
  42401.                         seconds of inaccuracy.  If a NULL pointer is passed, or 
  42402.                         if tm_yday is negative, the inaccuracy is considered to 
  42403.                         be unspecified.  On input, tm_mday, tm_mon, tm_wday, 
  42404.                         and tm_isdst are ignored. 
  42405.  
  42406.           ins           Nanoseconds of inaccuracy component. 
  42407.  
  42408.           Output 
  42409.  
  42410.           utc           Resulting binary timestamp. 
  42411.  
  42412.  Usage 
  42413.  
  42414.           The utc_mklocaltime routine converts a tm structure that expresses 
  42415.           local time to a binary timestamp. 
  42416.  
  42417.           The user's environment determines the time zone rule (details are 
  42418.           system dependent). For example, on OS/2 systems, the user selects a 
  42419.           time zone by specifying the TZ environment variable. (See 
  42420.           utc_localtime for additional information.) 
  42421.  
  42422.           If the user's environment does not specify a time zone rule, the 
  42423.           system's rule is used (details of the rule are system dependent). For 
  42424.           example, on OS/2 systems, the rule in the localtime file is used. 
  42425.  
  42426.           Additional inputs include nanoseconds since the last second of Time 
  42427.           and nanoseconds of inaccuracy. 
  42428.  
  42429.  Return Codes 
  42430.  
  42431.            0 Indicates that the routine ran successfully. 
  42432.  
  42433.           -1 Indicates an invalid time argument or invalid results. 
  42434.  
  42435.  Examples 
  42436.  
  42437.           See the example in utc_cmpmidtime. 
  42438.  
  42439.  Related Information 
  42440.  
  42441.           Routines: 
  42442.  
  42443.  
  42444.           utc_localtime 
  42445.  
  42446.  
  42447. ΓòÉΓòÉΓòÉ 7.4.27. utc_mkreltime ΓòÉΓòÉΓòÉ
  42448.  
  42449.  Purpose 
  42450.  
  42451.           Converts a tm structure that expresses relative time to a relative 
  42452.           binary timestamp. 
  42453.  
  42454.  Format 
  42455.  
  42456.                     #include <dce\utc.h>
  42457.  
  42458.                     int utc_mkreltime(
  42459.                   utc_t  *utc,
  42460.                   struct tm  *timetm,
  42461.                   long  tns,
  42462.                   struct tm  *inacctm,
  42463.                   long  ins);
  42464.  
  42465.  Parameters 
  42466.  
  42467.           Input 
  42468.  
  42469.           timetm        A tm structure that expresses a relative time. On 
  42470.                         input, tm_wday and tm_yday are ignored. The value of 
  42471.                         tm_isdt should be -1. 
  42472.  
  42473.           tns           Nanoseconds since Time component. 
  42474.  
  42475.           inacctm       A tm structure that expresses seconds of inaccuracy. If 
  42476.                         a NULL pointer is passed, or if tm_yday is negative, 
  42477.                         the inaccuracy is considered to be unspecified. On 
  42478.                         input, tm_mday, tm_mon, tm_year, tm_wday, tm_isdst, and 
  42479.                         tm_zone are ignored. 
  42480.  
  42481.           ins           Nanoseconds of inaccuracy component. 
  42482.  
  42483.           Output 
  42484.  
  42485.           utc           Resulting relative binary timestamp. 
  42486.  
  42487.  Usage 
  42488.  
  42489.           The utc_mkreltime routine converts a tm structure that expresses 
  42490.           relative time to a relative binary timestamp. Additional inputs 
  42491.           include nanoseconds since the last second of Time and nanoseconds of 
  42492.           inaccuracy. 
  42493.  
  42494.  Return Codes 
  42495.  
  42496.            0 Indicates that the routine ran successfully. 
  42497.  
  42498.           -1 Indicates an invalid time argument or invalid results. 
  42499.  
  42500.  Examples 
  42501.  
  42502.           The following example converts the relative time 
  42503.           125-03:12:30.1I120.25 to a relative binary timestamp. 
  42504.  
  42505.  
  42506.                     utc_t       utc;
  42507.                     struct tm   tmtime, tminacc;
  42508.                     long        tnsec, insec;
  42509.  
  42510.                     /*
  42511.                      *   Fill in the fields...
  42512.                      */
  42513.  
  42514.                        memset ((void *)&tmtime, 0, sizeof(tmtime));
  42515.                        tmtime.tm_mday = 125;
  42516.                        tmtime.tm_hour = 3;
  42517.                        tmtime.tm_min = 12;
  42518.                        tmtime.tm_sec = 30;
  42519.                        tnsec = 100000000;          /*  .1 * 1.0E9     */
  42520.                        memset((void *)&tminacc, 0, sizeof(tminacc));
  42521.                        tminacc.tm_sec = 120;
  42522.                        tnsec = 250000000;          /*  .25 * 1.0E9    */
  42523.  
  42524.                     /*
  42525.                      * Convert to a relative binary timestamp...
  42526.                      */
  42527.  
  42528.                     utc_mkreltime(&utc,       /* Out:  Resultant binary timestamp      */
  42529.                                   &tmtime,    /* In:  tm struct that represents input  */
  42530.                                   tnsec,      /* In:  Nanoseconds from input           */
  42531.                                   &tminacc,   /* In:  tm struct that represents inacc  */
  42532.                                   insec);     /* In:  Nanoseconds from input           */
  42533.  
  42534.  Related Information 
  42535.  
  42536.           Routines: 
  42537.  
  42538.  
  42539.           utc_reltime 
  42540.  
  42541.  
  42542. ΓòÉΓòÉΓòÉ 7.4.28. utc_mulftime ΓòÉΓòÉΓòÉ
  42543.  
  42544.  Purpose 
  42545.  
  42546.           Multiplies a relative binary timestamp by a floating-point value. 
  42547.  
  42548.  Format 
  42549.  
  42550.                     #include <dce\utc.h>
  42551.  
  42552.                     int utc_mulftime(
  42553.                   utc_t  *result,
  42554.                   utc_t  *utc1,
  42555.                   double  factor);
  42556.  
  42557.  Parameters 
  42558.  
  42559.           Input 
  42560.  
  42561.           utc1          Relative binary timestamp. Use NULL if you want this 
  42562.                         routine to use the current time for this parameter. 
  42563.  
  42564.           factor        Real scale factor (double-precision floating-point 
  42565.                         value). 
  42566.  
  42567.           Output 
  42568.  
  42569.           result        Resulting relative binary timestamp. 
  42570.  
  42571.  Usage 
  42572.  
  42573.           The utc_mulftime routine multiplies a relative binary timestamp by a 
  42574.           floating-point value. Either or both may be negative; the resulting 
  42575.           relative binary timestamp has the appropriate sign. The unsigned 
  42576.           inaccuracy in the relative binary timestamp is also multiplied by the 
  42577.           absolute value of the floating-point value. 
  42578.  
  42579.  Return Codes 
  42580.  
  42581.            0 Indicates that the routine ran successfully. 
  42582.  
  42583.           -1 Indicates an invalid time argument or invalid results. 
  42584.  
  42585.  Examples 
  42586.  
  42587.           The following example scales a relative time by a floating-point 
  42588.           factor and prints the result. 
  42589.  
  42590.  
  42591.                     utc_t       relutc, scaledutc;
  42592.                     struct tm   sacledreltm;
  42593.                     char        timstr[UTC_MAX_STR_LEN];
  42594.  
  42595.                     /*
  42596.                      *   Assume relutc contains the time to scale.
  42597.                      */
  42598.  
  42599.                     utc_multime(&scaledutc,                /* Out:  Scaled rel time    */
  42600.                                 &relutc,                   /* In:  Rel time to scale   */
  42601.                                 17.65);                    /* In:  Scale factor        */
  42602.  
  42603.                     utc_ascreltime(timstr,                 /* Out:  ASCII rel time     */
  42604.                                    UTC_MAX_STR_LEN,        /* In:  Input buffer length */
  42605.                                    &scaledutc);            /* In:  Rel time to convert */
  42606.  
  42607.                     printf("%s\n",timstr);
  42608.  
  42609.                     /*
  42610.                      *    Convert it to a tm structure and print it.
  42611.                      */
  42612.  
  42613.                     utc_reltime(&scaledreltm,              /* Out:  Scaled rel tm       */
  42614.                                 (long *)0,                 /* Out:  Scaled rel nano-sec */
  42615.                                 (struct tm *)0,            /* Out:  Scaled rel inacc tm */
  42616.                                 (long *)0,                 /* Out:  Scd rel inacc nanos */
  42617.                                 &scaledutc);               /* In:  Rel time to convert  */
  42618.  
  42619.                     printf("Approximately %d days, %d hours and %d minutes\n",
  42620.                            scaledreltm.tm_yday, scaledreltm.tm_hour, scaledreltm.tm_min);
  42621.  
  42622.  Related Information 
  42623.  
  42624.           Routines: 
  42625.  
  42626.  
  42627.           utc_multime 
  42628.  
  42629.  
  42630. ΓòÉΓòÉΓòÉ 7.4.29. utc_multime ΓòÉΓòÉΓòÉ
  42631.  
  42632.  Purpose 
  42633.  
  42634.           Multiplies a relative binary timestamp by an integer factor. 
  42635.  
  42636.  Format 
  42637.  
  42638.                     #include <dce\utc.h>
  42639.  
  42640.                     int utc_multime(
  42641.                   utc_t  *result,
  42642.                   utc_t  *utc1,
  42643.                   long  factor);
  42644.  
  42645.  Parameters 
  42646.  
  42647.           Input 
  42648.  
  42649.           utc1          Relative binary timestamp. 
  42650.  
  42651.           factor        Integer scale factor. 
  42652.  
  42653.           Output 
  42654.  
  42655.           result        Resulting relative binary timestamp. 
  42656.  
  42657.  Usage 
  42658.  
  42659.           The utc_multime routine multiplies a relative binary timestamp by an 
  42660.           integer. Either or both may be negative; the resulting binary 
  42661.           timestamp has the appropriate sign. The unsigned inaccuracy in the 
  42662.           binary timestamp is also multiplied by the absolute value of the 
  42663.           integer. 
  42664.  
  42665.  Return Codes 
  42666.  
  42667.            0 Indicates that the routine ran successfully. 
  42668.  
  42669.           -1 Indicates an invalid time argument or invalid results. 
  42670.  
  42671.  Examples 
  42672.  
  42673.           The following example scales a relative time by an integral value and 
  42674.           prints the result. 
  42675.  
  42676.                     utc_t        relutc, scaledutc;
  42677.  
  42678.                     char         timstr[UTC_MAX_STR_LEN];
  42679.  
  42680.                     /*
  42681.                      *   Assume relutc contains the time to scale.  Scale it by a factor
  42682.                      *   of 17...
  42683.                      */
  42684.  
  42685.                     utc_multime(&scaledutc,             /* Out:  Scaled rel time    */
  42686.                                 &relutc,                /* In:  Rel time to scale   */
  42687.                                 17L);                   /* In:  Scale factor        */
  42688.  
  42689.                     utc_ascreltime(timstr,              /* Out:  ASCII rel time     */
  42690.                                    UTC_MAX_STR_LEN,     /* In:  Input buffer length */
  42691.                                    &scaledutc);         /* In:  Rel time to convert */
  42692.  
  42693.                     printf("Scaled result is %s", timstr);
  42694.  
  42695.  Related Information 
  42696.  
  42697.           Routines: 
  42698.  
  42699.  
  42700.           utc_mulftime 
  42701.  
  42702.  
  42703. ΓòÉΓòÉΓòÉ 7.4.30. utc_pointtime ΓòÉΓòÉΓòÉ
  42704.  
  42705.  Purpose 
  42706.  
  42707.           Converts a binary timestamp to three binary timestamps that represent 
  42708.           the earliest, most likely, and latest time. 
  42709.  
  42710.  Format 
  42711.  
  42712.                     #include <dce\utc.h>
  42713.  
  42714.                     int utc_pointtime(
  42715.                   utc_t  *utclp,
  42716.                   utc_t  *utcmp,
  42717.                   utc_t  *utchp,
  42718.                   utc_t  *utc);
  42719.  
  42720.  Parameters 
  42721.  
  42722.           Input 
  42723.  
  42724.           utc           Binary timestamp or relative binary timestamp. Use NULL 
  42725.                         if you want this routine to use the current time for 
  42726.                         this parameter. 
  42727.  
  42728.           Output 
  42729.  
  42730.           utclp         Lowest (earliest) possible absolute time or shortest 
  42731.                         possible relative time that the input timestamp can 
  42732.                         represent. 
  42733.  
  42734.           utcmp         Midpoint of the input binary timestamp. 
  42735.  
  42736.           utchp         Highest (latest) possible absolute time or the longest 
  42737.                         possible relative time that the input timestamp can 
  42738.                         represent. 
  42739.  
  42740.  Usage 
  42741.  
  42742.           The utc_pointtime routine converts a binary timestamp to three binary 
  42743.           timestamps that represent the earliest, latest, and most likely 
  42744.           (midpoint) times.  If the input is a relative binary time, the 
  42745.           outputs represent relative binary times. 
  42746.  
  42747.  Notes 
  42748.  
  42749.           All outputs have zero inaccuracy.  An error is returned if the input 
  42750.           binary timestamp has an unspecified inaccuracy. 
  42751.  
  42752.  Return Codes 
  42753.  
  42754.            0 Indicates that the routine ran successfully. 
  42755.  
  42756.           -1 Indicates an invalid time argument. 
  42757.  
  42758.  Examples 
  42759.  
  42760.           See the example in utc_addtime. 
  42761.  
  42762.  Related Information 
  42763.  
  42764.           Routines: 
  42765.  
  42766.  
  42767.           utc_boundtime 
  42768.           utc_spantime 
  42769.  
  42770.  
  42771. ΓòÉΓòÉΓòÉ 7.4.31. utc_reltime ΓòÉΓòÉΓòÉ
  42772.  
  42773.  Purpose 
  42774.  
  42775.           Converts a relative binary timestamp to a tm structure. 
  42776.  
  42777.  Format 
  42778.  
  42779.                     #include <dce\utc.h>
  42780.  
  42781.                     int utc_reltime(
  42782.                   struct tm  *timetm,
  42783.                   long  *tns,
  42784.                   struct tm  *inacctm,
  42785.                   long  *ins,
  42786.                   utc_t  *utc);
  42787.  
  42788.  Parameters 
  42789.  
  42790.           Input 
  42791.  
  42792.           utc           Relative binary timestamp. 
  42793.  
  42794.           Output 
  42795.  
  42796.           timetm        Relative time component of the relative binary 
  42797.                         timestamp. The field tm_mday returns a value of -1 and 
  42798.                         the fields tm_year and tm_mon return values of zero. 
  42799.                         The field tm_yday contains the number of days of 
  42800.                         relative time. 
  42801.  
  42802.           tns           Nanoseconds since Time component of the relative binary 
  42803.                         timestamp. 
  42804.  
  42805.           inacctm       Seconds of inaccuracy component of the relative binary 
  42806.                         timestamp. If the inaccuracy is finite, tm_mday returns 
  42807.                         a value of -1 and tm_mon and tm_year return values of 
  42808.                         zero. The field tm_yday contains the inaccuracy in 
  42809.                         days. If the inaccuracy is unspecified, all tm 
  42810.                         structure fields return values of -1. 
  42811.  
  42812.           ins           Nanoseconds of inaccuracy component of the relative 
  42813.                         binary timestamp. 
  42814.  
  42815.  Usage 
  42816.  
  42817.           The utc_reltime routine converts a relative binary timestamp to a tm 
  42818.           structure.  Additional returns include nanoseconds since Time and 
  42819.           nanoseconds of inaccuracy. 
  42820.  
  42821.  Return Codes 
  42822.  
  42823.            0 Indicates that the routine ran successfully. 
  42824.  
  42825.           -1 Indicates an invalid time argument or invalid results. 
  42826.  
  42827.  Examples 
  42828.  
  42829.           See the example in utc_mulftime. 
  42830.  
  42831.  Related Information 
  42832.  
  42833.           Routines: 
  42834.  
  42835.  
  42836.           utc_mkreltime 
  42837.  
  42838.  
  42839. ΓòÉΓòÉΓòÉ 7.4.32. utc_spantime ΓòÉΓòÉΓòÉ
  42840.  
  42841.  Purpose 
  42842.  
  42843.           Returns a single UTC time interval whose inaccuracy spans the two 
  42844.           input binary timestamps, given two (possibly unordered) binary 
  42845.           timestamps. 
  42846.  
  42847.  Format 
  42848.  
  42849.                     #include <dce\utc.h>
  42850.  
  42851.                     int utc_spantime(
  42852.                   utc_t  *result,
  42853.                   utc_t  *utc1,
  42854.                   utc_t  *utc2);
  42855.  
  42856.  Parameters 
  42857.  
  42858.           Input 
  42859.  
  42860.           utc1          Binary timestamp. Use NULL if you want this routine to 
  42861.                         use the current time for this parameter. 
  42862.  
  42863.           utc2          Binary timestamp. Use NULL if you want this routine to 
  42864.                         use the current time for this parameter. 
  42865.  
  42866.           Output 
  42867.  
  42868.           result        Spanning timestamp. 
  42869.  
  42870.  Usage 
  42871.  
  42872.           Given two binary timestamps, the utc_spantime routine returns a 
  42873.           single UTC time interval whose inaccuracy spans the two input 
  42874.           timestamps (that is, the interval resulting from the earliest 
  42875.           possible time of either timestamp to the latest possible time of 
  42876.           either timestamp). 
  42877.  
  42878.  Notes 
  42879.  
  42880.           The tdf in the output UTC value is copied from the utc2 input.  If 
  42881.           either input binary timestamp has an unspecified inaccuracy, an error 
  42882.           is returned. 
  42883.  
  42884.  Return Codes 
  42885.  
  42886.            0 Indicates that the routine ran successfully. 
  42887.  
  42888.           -1 Indicates an invalid time argument. 
  42889.  
  42890.  Examples 
  42891.  
  42892.           The following example computes the earliest and latest times for an 
  42893.           array of 10 timestamps. 
  42894.  
  42895.  
  42896.                     utc_t               time_array[10], testtime, earliest, latest;
  42897.                     int                 i;
  42898.  
  42899.                     /*
  42900.                      *   Set the running timestamp to the first entry...
  42901.                      */
  42902.  
  42903.                     testtime = time_array[0];
  42904.  
  42905.                     for (i=1; i<10; i++) {
  42906.  
  42907.                        /*
  42908.                         *   Compute the minimum and the maximum against the next
  42909.                         *   element...
  42910.                         */
  42911.  
  42912.                          utc_spantime(&testtime,        /* Out:  Resultant interval         */
  42913.                                      &testtime,        /* In:  Largest previous interval   */
  42914.                                      16:16:45_array[i]);  /* In:  Element under test          */
  42915.                     }
  42916.  
  42917.                     /*
  42918.                      *   Compute the earliest and latest possible times...
  42919.                      */
  42920.  
  42921.                     utc_pointtime(&earliest,       /* Out:  Earliest poss time in array */
  42922.                                  (utc_t *)0,       /* Out:  Midpoint                    */
  42923.                                  &latest,          /* Out:  Latest poss time in array   */
  42924.                                  &testtime);       /* In:  Spanning interval            */
  42925.  
  42926.  Related Information 
  42927.  
  42928.           Routines: 
  42929.  
  42930.  
  42931.           utc_boundtime 
  42932.           utc_gettime 
  42933.           utc_pointtime 
  42934.  
  42935.  
  42936. ΓòÉΓòÉΓòÉ 7.4.33. utc_subtime ΓòÉΓòÉΓòÉ
  42937.  
  42938.  Purpose 
  42939.  
  42940.           Computes the difference between two binary timestamps. 
  42941.  
  42942.  Format 
  42943.  
  42944.                     #include <dce\utc.h>
  42945.  
  42946.                     int utc_subtime(
  42947.                   utc_t  *result,
  42948.                   utc_t  *utc1,
  42949.                   utc_t  *utc2);
  42950.  
  42951.  Parameters 
  42952.  
  42953.           Input 
  42954.  
  42955.           utc1          Binary timestamp or relative binary timestamp. Use NULL 
  42956.                         if you want this routine to use the current time for 
  42957.                         this parameter. 
  42958.  
  42959.           utc2          Binary timestamp or relative binary timestamp. Use NULL 
  42960.                         if you want this routine to use the current time for 
  42961.                         this parameter. 
  42962.  
  42963.           Output 
  42964.  
  42965.           result        Resulting binary timestamp or relative binary 
  42966.                         timestamp, depending upon the operation performed: 
  42967.  
  42968.                           o  absolute time - absolute time = relative time 
  42969.  
  42970.                           o  relative time - relative time = relative time 
  42971.  
  42972.                           o  absolute time - relative time = absolute time 
  42973.  
  42974.                           o  relative time - absolute time is undefined. See 
  42975.                              the note below. 
  42976.  
  42977.  Usage 
  42978.  
  42979.           The utc_subtime routine subtracts one binary timestamp from another. 
  42980.           The two binary timestamps express either an absolute time and a 
  42981.           relative time, two relative times, or two absolute times. The 
  42982.           resulting timestamp is utc1 minus utc2. The inaccuracies of the two 
  42983.           input timestamps are combined and included in the output timestamp. 
  42984.           The TDF in the first timestamp is copied to the output. 
  42985.  
  42986.  Notes 
  42987.  
  42988.           Although no error is returned, the combination relative time - 
  42989.           absolute time should not be used. 
  42990.  
  42991.  Return Codes 
  42992.  
  42993.            0 Indicates that the routine ran successfully. 
  42994.  
  42995.           -1 Indicates an invalid time argument or invalid results. 
  42996.  
  42997.  Examples 
  42998.  
  42999.           See the example in utc_binreltime. 
  43000.  
  43001.  Related Information 
  43002.  
  43003.           Routines: 
  43004.  
  43005.  
  43006.           utc_addtime 
  43007.  
  43008.  
  43009. ΓòÉΓòÉΓòÉ 8. DCE Security Services API ΓòÉΓòÉΓòÉ
  43010.  
  43011. The Distributed Computing Environment (DCE) Security Services Application 
  43012. Program Interface (API) allows developers to create network services with 
  43013. access to the authentication and authorization capabilities of DCE Security 
  43014. services and facilities. 
  43015.  
  43016. The calling of a network service generally consists of a client process 
  43017. requesting some action from a server process.  The client can itself be a 
  43018. server, or a user, and the server can also be a client of other servers. Before 
  43019. the targeted server runs the specified action, it must be sure of the client's 
  43020. identity, and it must know whether the client is authorized to request the 
  43021. service. 
  43022.  
  43023. The routines in this API are the same routines used by various user-level tools 
  43024. provided as part of the DCE.  For example, the screatdb tool is written with 
  43025. sec_rgy routines, acl_edit is written with sec_acl routines, and the dcelogin 
  43026. program, with which a user logs into a DCE system, is written using sec_login 
  43027. routines.  Most sites will find the user-level tools adequate for their needs 
  43028. and must use the Security API only to customize or replace the function of 
  43029. these tools. 
  43030.  
  43031. Though most of the routines in the Security API represent remote procedure 
  43032. calls, code has been provided on the client side to handle much of the overhead 
  43033. involved with making remote calls.  These stubs handle binding to the requested 
  43034. security server site, the marshalling of data into whatever form is needed for 
  43035. transmission, and other bookkeeping involved with these remote calls.  An 
  43036. application programmer can use the Security Service interfaces as if they were 
  43037. composed of simple C functions. 
  43038.  
  43039. The Security Services API consists of ten sets of remote procedure calls (RPCs) 
  43040. used to communicate with various security-related services and facilities. 
  43041. They include: 
  43042.  
  43043.  DCE Access Control List API Implements an access control list (ACL) protocol 
  43044.               for the authorization of a principal to network services. 
  43045.  
  43046.  DCE Audit API Allows applications to perform auditing and to analyze audit 
  43047.               trails. 
  43048.  
  43049.  DCE Extended Privilege Attribute API Allows clients and servers to run secure 
  43050.               operations using one or more intermediate servers. 
  43051.  
  43052.  DCE Extended Registry Attribute API Provides facilities for extending the 
  43053.               Registry database by creating, maintaining, and viewing attribute 
  43054.               types and instances, and providing information to and receiving 
  43055.               it from outside attribute servers. 
  43056.  
  43057.  DCE Generic Security Service API Provides security services to applications 
  43058.               using peer-to-peer communications. 
  43059.  
  43060.  DCE Login API Validates a principal's network identity. 
  43061.  
  43062.  DCE Key Management API Provides facilities for the maintenance of account keys 
  43063.               for daemon principals. 
  43064.  
  43065.  DCE ID Mapping API Maps file system names to Universal Unique IDs (UUIDs) and 
  43066.               vice versa. 
  43067.  
  43068.  DCE Password Management API Provides the tools necessary to develop customized 
  43069.               password management servers, and to call them from client 
  43070.               password change programs. 
  43071.  
  43072.  Registry API Maintains the network registry of principal identities. 
  43073.  
  43074.  
  43075. ΓòÉΓòÉΓòÉ 8.1. DCE Access Control List API ΓòÉΓòÉΓòÉ
  43076.  
  43077. The ACL facility uses the data types and constant values that are detailed in 
  43078. the following sections: 
  43079.  
  43080.       Data Types 
  43081.       Constants 
  43082.  
  43083.  The two parts of the ACL API are: 
  43084.  
  43085.  Client-Side API (sec_acl_xxx) Enables clients to browse or edit DCE ACLs. 
  43086.  
  43087.  Rdacl Routines (rdacl_xxx)    Enables servers that manage access control (such 
  43088.                                as sec_acl_mgr-based ACL managers) to 
  43089.                                communicate with sec_acl-based clients. 
  43090.  
  43091.  
  43092. ΓòÉΓòÉΓòÉ 8.1.1. Client-Side API ΓòÉΓòÉΓòÉ
  43093.  
  43094. The client-side API is a local interface consisting of a set of routines that 
  43095. are prefixed sec_acl. An application that needs to replace dcecp with a DCE ACL 
  43096. editor or browser of its own calls this interface. 
  43097.  
  43098. Any operation performed on an ACL uses an ACL handle of type handle_t to 
  43099. identify the target of the operation. The handle is bound to the server that 
  43100. manages the object protected by the ACL, not to the ACL itself. Because an 
  43101. object can be protected by more than one ACL manager type, the ACL itself can 
  43102. only be uniquely identified by the ACL handle in combination with the manager 
  43103. type that manages it. ACL editing routines must also specify the ACL type to be 
  43104. read or otherwise manipulated (the object, default container, or default object 
  43105. ACL types). 
  43106.  
  43107. The sec_acl_xxx routines are listed alphabetically as follows: 
  43108.  
  43109.  sec_acl_bind                        Gets an ACL handle. This handle is opaque 
  43110.                                      to the calling program. 
  43111.  
  43112.  sec_acl_bind_to_addr                Binds to a network address rather than a 
  43113.                                      cell namespace entry. Use this routine if 
  43114.                                      a Cell Directory Service is absent. 
  43115.  
  43116.  sec_acl_calc_mask                   Calculates a new sec_acl_e_type_mask_obj 
  43117.                                      entry type. 
  43118.  
  43119.  sec_acl_get_access                  Lists the access (permission set) that the 
  43120.                                      caller has for an object. 
  43121.  
  43122.  sec_acl_get_error_info              Returns the error code last stored in the 
  43123.                                      handle. 
  43124.  
  43125.  sec_acl_get_manager_types           Returns a list of UUIDs of the manager 
  43126.                                      types protecting an object. 
  43127.  
  43128.  sec_acl_get_mgr_types_semantics     Returns a list of UUIDs corresponding to 
  43129.                                      the manager types and the POSIX semantics 
  43130.                                      supported by each manager type. The output 
  43131.                                      of this routine is used by the 
  43132.                                      sec_acl_calc_mask routine. 
  43133.  
  43134.  sec_acl_get_printstring             Receives a print string for displaying the 
  43135.                                      permissions of the ACL in a human-readable 
  43136.                                      form. 
  43137.  
  43138.  sec_acl_lookup                      Returns a copy of an object's ACL. 
  43139.  
  43140.  sec_acl_release                     Frees the memory occupied by an ACL, and 
  43141.                                      returns it to the pool. This is a local 
  43142.                                      operation only. 
  43143.  
  43144.  sec_acl_release_handle              Releases an ACL handle. 
  43145.  
  43146.  sec_acl_replace                     Replaces an ACL. To change an ACL, an 
  43147.                                      editor must read the entire ACL into a 
  43148.                                      sec_acl_t structure, modify it, and 
  43149.                                      replace it entirely using this routine. 
  43150.  
  43151.  sec_acl_test_access                 Allows a server to test whether a client 
  43152.                                      has access to an object to perform the 
  43153.                                      requested operation. 
  43154.  
  43155.  sec_acl_test_access_on_behalf       Allows an application to check an ACL on 
  43156.                                      behalf of a principal other than the one 
  43157.                                      represented by the calling process. 
  43158.  
  43159.  Within the server, the sec_acl_mgr_xxx routines are a local interface into the 
  43160.  ACL routines used by the server itself and by the rdacl_xxx routines as 
  43161.  necessary. 
  43162.  
  43163.  Following is a summary of ACL manager routines: 
  43164.  
  43165.  sec_acl_mgr_configure                         Creates an ACL database and 
  43166.                                                returns a handle to it. 
  43167.  
  43168.  sec_acl_mgr_get_access                        Returns a principal's 
  43169.                                                permissions to an object. 
  43170.  
  43171.  sec_acl_mgr_get_manager_types                 Returns a list of manager types 
  43172.                                                protecting the object. 
  43173.  
  43174.  sec_acl_mgr_get_types_semantics               Returns the types of ACLs and 
  43175.                                                the POSIX semantics that are 
  43176.                                                protecting an object. 
  43177.  
  43178.  sec_acl_mgr_get_printstring                   Returns human-readable 
  43179.                                                representations of permissions. 
  43180.  
  43181.  sec_acl_mgr_is_authorized                     Takes a principal's PAC and the 
  43182.                                                requested permission set and 
  43183.                                                returns TRUE if the permission 
  43184.                                                set is granted. 
  43185.  
  43186.  sec_acl_mgr_lookup                            Returns a copy of the object's 
  43187.                                                ACL. 
  43188.  
  43189.  sec_acl_mgr_replace                           Replaces the specified ACL. 
  43190.  
  43191.  
  43192. ΓòÉΓòÉΓòÉ 8.1.2. Rdacl Routines ΓòÉΓòÉΓòÉ
  43193.  
  43194. The DCE ACL network interface, consisting of routines with a prefix of rdacl, 
  43195. enables servers that manage access control (such as sec_acl_mgr-based ACL 
  43196. managers) to communicate with sec_acl-based clients. 
  43197.  
  43198. Applications never call the rdacl_xxx routines. They call the sec_acl_xxx 
  43199. routines. This arrangement relieves the client application from some details of 
  43200. managing server bindings. 
  43201.  
  43202. The sec_acl_xxx routines use an ACL handle to specify the object whose ACL is 
  43203. to be accessed. The sec_acl_bind routine must always be called to obtain this 
  43204. handle, even if the client is already bound to the object's server. 
  43205.  
  43206. The rdacl_xxx interface consists of the following routines: 
  43207.  
  43208.  rdacl_get_access                              Returns a principal's 
  43209.                                                permissions to an object. This 
  43210.                                                is useful for implementing 
  43211.                                                operations such as the 
  43212.                                                conventional UNIX system access 
  43213.                                                routine and in OS/2, the GUI 
  43214.                                                (Graphical User Interface) 
  43215.                                                interface. 
  43216.  
  43217.  rdacl_get_manager_types                       Returns a list of manager types 
  43218.                                                protecting the object. 
  43219.  
  43220.  rdacl_get_mgr_types_semantics                 Lists the ACL manager types 
  43221.                                                protecting an object and the 
  43222.                                                POSIX semantics supported by 
  43223.                                                each manager type. 
  43224.  
  43225.  rdacl_get_printstring                         Obtains human-readable 
  43226.                                                representations of permissions. 
  43227.  
  43228.  rdacl_get_referral                            Returns a referral to an ACL 
  43229.                                                update site. This routine 
  43230.                                                enables a client that attempts 
  43231.                                                to modify an ACL at a read-only 
  43232.                                                site to recover from the error 
  43233.                                                and rebind to an update site. 
  43234.  
  43235.  rdacl_lookup                                  Retrieves a copy of the object's 
  43236.                                                ACL. 
  43237.  
  43238.  rdacl_replace                                 Replaces the specified ACL. 
  43239.  
  43240.  rdacl_test_access                             Determines whether the calling 
  43241.                                                principal has the requested 
  43242.                                                permissions. 
  43243.  
  43244.  rdacl_test_access_on_behalf                   Determines whether the principal 
  43245.                                                represented by the calling 
  43246.                                                principal has the requested 
  43247.                                                permissions. This routine 
  43248.                                                returns TRUE if both the 
  43249.                                                principal and the calling 
  43250.                                                principal acting as its agent 
  43251.                                                have the requested permissions. 
  43252.  
  43253.  
  43254. ΓòÉΓòÉΓòÉ 8.1.3. Data Types ΓòÉΓòÉΓòÉ
  43255.  
  43256. The following data types are used in the ACL API routines: 
  43257.  
  43258.  sec_acl_handle_t A pointer to an opaque handle bound to an ACL that is the 
  43259.            subject of a test or examination.  The handle is bound to the ACL 
  43260.            with sec_acl_bind.  An unbound handle has the value 
  43261.            sec_acl_default_handle. 
  43262.  
  43263.  sec_acl_posix_semantics_t A flag that indicates which, if any, POSIX ACL 
  43264.            semantics an ACL manager supports.  The following constants are 
  43265.            defined for use with the sec_acl_posix_semantics_t data type: 
  43266.  
  43267.                 sec_acl_posix_no_semantics The manager type does not support 
  43268.                           POSIX semantics. 
  43269.  
  43270.                 sec_acl_posix_mask_obj The manager type supports the mask_obj 
  43271.                           entry type and POSIX 1003.6 Draft 12 ACL mask entry 
  43272.                           semantics. 
  43273.  
  43274.  sec_acl_t This data type is the fundamental type for the ACL manager 
  43275.            interfaces. The sec_acl_t type contains a complete access control 
  43276.            list, made up of a list of entry fields (type sec_acl_entry_t).  The 
  43277.            default cell identifies the authentication authority for simple ACL 
  43278.            entries (foreign entries identify their own foreign cells).  The 
  43279.            sec_acl_manager_type identifies the manager to interpret this ACL. 
  43280.  
  43281.            The sec_acl_t type is a structure containing the following fields: 
  43282.  
  43283.                 default_realm A structure of type sec_acl_id_t that identifies 
  43284.                           the UUID and (optionally) the name of the default 
  43285.                           cell. 
  43286.  
  43287.                 sec_acl_manager_type Contains the UUID of the ACL manager type. 
  43288.  
  43289.                 num_entries An unsigned 32-bit integer containing the number of 
  43290.                           ACL entries in this ACL. 
  43291.  
  43292.                 sec_acl_entries An array containing num_entries pointers to 
  43293.                           different ACL entries, each of type sec_acl_entry_t. 
  43294.  
  43295.  sec_acl_p_t This data type, a pointer to a sec_acl_t, is for use with the 
  43296.            sec_acl_list_t data type. 
  43297.  
  43298.  sec_acl_list_t This data type is a structure containing two members: 
  43299.  
  43300.                 num_acls       An unsigned 32-bit integer that describes the 
  43301.                                number of ACLs indicated by sec_acls. 
  43302.  
  43303.                 sec_acls       An array of pointers of type sec_acl_p_t. 
  43304.  
  43305.  sec_acl_entry_t The sec_acl_entry_t type is a structure made up of the 
  43306.            following components: 
  43307.  
  43308.                 perms     A set of flags of type sec_acl_permset_t that 
  43309.                           describes the permissions granted for the principals 
  43310.                           identified by this ACL entry.  Note that if a 
  43311.                           principal matches more than one ACL entry, the 
  43312.                           effective permissions will be the most restrictive 
  43313.                           combination of all the entries. 
  43314.  
  43315.                 entry_info A structure containing two members: 
  43316.  
  43317.                                entry_type A flag of type sec_acl_entry_type_t, 
  43318.                                          indicating the type of ACL entry. 
  43319.  
  43320.                                tagged_union A tagged union whose contents 
  43321.                                          depend on the type of the entry. The 
  43322.                           types of entries indicated by entry_type can be the 
  43323.                           following: 
  43324.  
  43325.                                sec_acl_e_type_user_obj The entry contains 
  43326.                                          permissions for the implied user 
  43327.                                          object.  This type is described in the 
  43328.                                          POSIX 1003.6 standard. 
  43329.  
  43330.                                sec_acl_e_type_group_obj The entry contains 
  43331.                                          permissions for the implied group 
  43332.                                          object.  This type is described in the 
  43333.                                          POSIX 1003.6 standard. 
  43334.  
  43335.                                sec_acl_e_type_other_obj The entry contains 
  43336.                                          permissions for principals not 
  43337.                                          otherwise named through user or group 
  43338.                                          entries. This type is described in the 
  43339.                                          POSIX 1003.6 standard. 
  43340.  
  43341.                                sec_acl_e_type_user The entry contains a key 
  43342.                                          identifying a user. This type is 
  43343.                                          described in the POSIX 1003.6 
  43344.                                          standard. 
  43345.  
  43346.                                sec_acl_e_type_group The entry contains a key 
  43347.                                          identifying a group. This type is 
  43348.                                          described in the POSIX 1003.6 
  43349.                                          standard. 
  43350.  
  43351.                                sec_acl_e_type_mask_obj The entry contains the 
  43352.                                          maximum permissions for all entries 
  43353.                                          other than mask_obj, unauthenticated, 
  43354.                                          user_obj, and other_obj. 
  43355.  
  43356.                                sec_acl_e_type_foreign_user The entry contains a 
  43357.                                          key identifying a user and the foreign 
  43358.                                          realm. 
  43359.  
  43360.                                sec_acl_e_type_foreign_group The entry contains 
  43361.                                          a key identifying a group and the 
  43362.                                          foreign realm. 
  43363.  
  43364.                                sec_acl_e_type_foreign_other The entry contains 
  43365.                                          a key identifying a foreign realm. 
  43366.                                          Any user that can authenticate to the 
  43367.                                          foreign realm is allowed access. 
  43368.  
  43369.                                sec_acl_e_type_any_other The entry contains 
  43370.                                          permissions to be applied to any 
  43371.                                          accessor who can authenticate to any 
  43372.                                          realm, but is not identified in any 
  43373.                                          other entry (except 
  43374.                                          sec_acl_e_type_unauthenticated). 
  43375.  
  43376.                                sec_acl_e_type_unauthenticated The entry 
  43377.                                          contains permissions to be applied 
  43378.                                          when the accessor does not pass 
  43379.                                          authentication procedures.  A 
  43380.                                          privilege attribute certificate will 
  43381.                                          indicate that the caller's identity is 
  43382.                                          not authenticated.  The identity is 
  43383.                                          used to match against the standard 
  43384.                                          entries, but the access rights are 
  43385.                                          masked by this mask. If this mask does 
  43386.                                          not exist in an ACL, the ACL is 
  43387.                                          assumed to grant no access and all 
  43388.                                          unauthenticated access attempts will 
  43389.                                          be denied. 
  43390.  
  43391.                                          Great care should be exercised when 
  43392.                                          allowing unauthenticated access to an 
  43393.                                          object.  Almost by definition, 
  43394.                                          unauthenticated access is very easy to 
  43395.                                          spoof.  The presence of this mask on 
  43396.                                          an ACL essentially means that anyone 
  43397.                                          can get at least as much access as 
  43398.                                          allowed by the mask. 
  43399.  
  43400.                                sec_acl_e_type_extended The entry contains 
  43401.                                          additional pickled data. This kind of 
  43402.                                          entry cannot be interpreted, but it 
  43403.                                          can be used by an out-of-date client 
  43404.                                          when copying an ACL from one manager 
  43405.                                          to another (assuming that both 
  43406.                                          managers understand the data). 
  43407.  
  43408.                           The contents of the tagged union depend on the entry 
  43409.                           type. 
  43410.  
  43411.                           For the following types, the union contains a UUID 
  43412.                           and an optional print string (called 
  43413.                           entry_info.tagged_union.id with type sec_id_t) for an 
  43414.                           identified local principal, or for an identified 
  43415.                           foreign realm. 
  43416.  
  43417.                             o  sec_acl_e_type_user 
  43418.                             o  sec_acl_e_type_group 
  43419.                             o  sec_acl_e_type_foreign_other. For the following 
  43420.                           entry types, the union contains two UUIDs and 
  43421.                           optional print strings (called entry_info.foreign_id 
  43422.                           with type sec_id_foreign_t) for an identified foreign 
  43423.                           principal and its realm. 
  43424.  
  43425.                             o  sec_acl_e_type_foreign_user 
  43426.                             o  sec_acl_e_type_foreign_group. For an extended 
  43427.                           entry (sec_acl_e_type_extended), the union contains 
  43428.                           entry_info.tagged_union.extended_info, a pointer to 
  43429.                           an information block of type sec_acl_extend_info_t. 
  43430.  
  43431.  sec_acl_permset_t A 32-bit set of permission flags.  The flags currently 
  43432.            represent the conventional file system permissions (read, write, 
  43433.            execute) and the extended DFS permissions (owner, insert, delete). 
  43434.            The unused flags represent permissions that can only be interpreted 
  43435.            by the manager for the object.  For example, 
  43436.            sec_acl_perm_unused_00000080 can mean to one ACL manager that 
  43437.            withdrawals are allowed, and to another ACL manager that rebooting 
  43438.            is allowed. 
  43439.  
  43440.            The following constants are defined for use with the 
  43441.            sec_acl_permset_t data type: 
  43442.  
  43443.                 sec_acl_perm_read The ACL allows read access to the protected 
  43444.                           object. 
  43445.  
  43446.                 sec_acl_perm_write The ACL allows write access to the protected 
  43447.                           object. 
  43448.  
  43449.                 sec_acl_perm_execute The ACL allows execute access to the 
  43450.                           protected object. 
  43451.  
  43452.                 sec_acl_perm_control The ACL allows the ACL itself to be 
  43453.                           modified. 
  43454.  
  43455.                 sec_acl_perm_insert The ACL allows insert access to the 
  43456.                           protected object. 
  43457.  
  43458.                 sec_acl_perm_delete The ACL allows delete access to the 
  43459.                           protected object. 
  43460.  
  43461.                 sec_acl_perm_test The ACL allows access to the protected object 
  43462.                           only to the extent of being able to test for 
  43463.                           existence. The bits from 0x00000080 to 0x80000000 are 
  43464.            not used by the conventional ACL permission set.  Constants of the 
  43465.            form sec_acl_perm_unused_00000080 have been defined so application 
  43466.            programs can easily use these bits for extended ACLs. 
  43467.  
  43468.  sec_acl_extend_info_t This is an extended information block, provided for 
  43469.            future extensibility. Primarily this allows an out-of-date client to 
  43470.            read an ACL from a newer manager and apply it to another 
  43471.            (up-to-date) manager.  The data cannot be interpreted by the 
  43472.            out-of-date client without access to the appropriate pickling 
  43473.            routines (that presumably are unavailable to such a client). 
  43474.  
  43475.            In general, ACL managers should not accept ACLs that contain entries 
  43476.            the manager does not understand.  The manager clearly cannot perform 
  43477.            the security service requested by an uninterpretable entry and it is 
  43478.            considered a security breach to lead a client to believe that the 
  43479.            manager is performing a particular class of service if the manager 
  43480.            cannot do so. 
  43481.  
  43482.            The data structure is made up of the following components: 
  43483.  
  43484.                 extension_type The UUID of the extension type. 
  43485.  
  43486.                 format_label The format of the label, in ndr_format_t form. 
  43487.  
  43488.                 num_bytes An unsigned 32-bit integer indicating the number of 
  43489.                           bytes containing the pickled data. 
  43490.  
  43491.                 pickled_data The byte array containing the pickled data. 
  43492.  
  43493.  sec_acl_type_t The sec_acl_type_t type differentiates between the various 
  43494.            types of ACLs an object can possess.  Most file system objects have 
  43495.            only one ACL, controlling the access to that object, but objects 
  43496.            that control the creation of other objects (sometimes referred to as 
  43497.            containers) can have more.  For example, a directory can have three 
  43498.            different ACLs:  the directory ACL, controlling access to the 
  43499.            directory; the initial object (or default object) ACL, which serves 
  43500.            as a mask when creating new objects in the directory; and the 
  43501.            initial directory (or default directory) ACL, which serves as a mask 
  43502.            when creating new directories (containers). 
  43503.  
  43504.            The sec_acl_type_t data type is an enumerated set containing one of 
  43505.            the following values: 
  43506.  
  43507.                 sec_acl_type_object The ACL refers to the specified object. 
  43508.  
  43509.                 sec_acl_type_default_object The ACL is to be used when creating 
  43510.                           objects in the container. 
  43511.  
  43512.                 sec_acl_type_default_container The ACL is to be used when 
  43513.                           creating nested containers. The following values are 
  43514.            defined but not currently used.  They are available for application 
  43515.            programs that can create an application-specific ACL definition. 
  43516.  
  43517.              o  sec_acl_type_unspecified_3 
  43518.              o  sec_acl_type_unspecified_4 
  43519.              o  sec_acl_type_unspecified_5 
  43520.              o  sec_acl_type_unspecified_6 
  43521.              o  sec_acl_type_unspecified_7. 
  43522.  
  43523.  sec_acl_printstring_t A sec_acl_printstring_t structure contains a printable 
  43524.            representation for a permission in a sec_acl_permset_t permission 
  43525.            set. This allows a generic ACL editing tool to be used for 
  43526.            application-specific ACLs. The tool need not know the printable 
  43527.            representation for each permission bit in a given permission set. 
  43528.            The sec_acl_get_printstring routine queries an ACL manager for the 
  43529.            print strings of the permissions it supports. 
  43530.  
  43531.            The structure consists of three components: 
  43532.  
  43533.                 printstring A character string of maximum length 
  43534.                           sec_acl_printstring_len describing the printable 
  43535.                           representation of a specified permission. 
  43536.  
  43537.                 helpstring A character string of maximum length 
  43538.                           sec_acl_printstring_help_len containing some text 
  43539.                           that can be used to describe the specified 
  43540.                           permission. 
  43541.  
  43542.                 permissions A sec_acl_permset_t permission set describing the 
  43543.                           permissions that will be represented with the 
  43544.                           specified print string. 
  43545.  
  43546.  sec_acl_component_name_t This type is a pointer to a character string, to be 
  43547.            used to specify the entity a given ACL is protecting. 
  43548.  
  43549.  
  43550. ΓòÉΓòÉΓòÉ 8.1.4. Constants ΓòÉΓòÉΓòÉ
  43551.  
  43552. The following constants are used in sec_acl_xxx routines: 
  43553.  
  43554.  sec_acl_default_handle The value of an unbound ACL manager handle. 
  43555.  
  43556.  sec_rgy_pname_t_size The maximum number of characters in a sec_rgy_pname_t. 
  43557.  
  43558.  sec_acl_printstring_len The maximum length of the printable representation of 
  43559.            an ACL permission. (See sec_acl_printstring_t.) 
  43560.  
  43561.  sec_acl_printstring_help_len The maximum length of a help message to be 
  43562.            associated with a supported ACL permission. (See 
  43563.            sec_acl_printstring_t. 
  43564.  
  43565.  The following 32-bit integer constants are used with the sec_rgy_acct_key_t 
  43566.  data type: 
  43567.  
  43568.  sec_rgy_acct_key_none The key is not valid. 
  43569.  
  43570.  sec_rgy_acct_key_person The person name alone is enough. 
  43571.  
  43572.  sec_rgy_acct_key_group The person and group names are both necessary for the 
  43573.            account abbreviation. 
  43574.  
  43575.  sec_rgy_acct_key_org The person, group and organization names are all 
  43576.            necessary. 
  43577.  
  43578.  sec_rgy_acct_key_last Key values must be less than this constant. 
  43579.  
  43580.  The following constants are defined for use with the sec_acl_permset_t data 
  43581.  type: 
  43582.  
  43583.  sec_acl_perm_read The ACL allows read access to the protected object. 
  43584.  
  43585.  sec_acl_perm_write The ACL allows write access to the protected object. 
  43586.  
  43587.  sec_acl_perm_execute The ACL allows execute access to the protected object. 
  43588.  
  43589.  sec_acl_perm_owner The ACL allows owner-level access to the protected object. 
  43590.  
  43591.  sec_acl_perm_insert The ACL allows insert access to the protected object. 
  43592.  
  43593.  sec_acl_perm_delete The ACL allows delete access to the protected object. 
  43594.  
  43595.  sec_acl_perm_test The ACL allows access to the protected object only to the 
  43596.            extent of being able to test for existence. 
  43597.  
  43598.  sec_acl_perm_unused_00000080 - sec_acl_perm_unused_0x80000000 The bits from 
  43599.            0x00000080 to 0x80000000 are not used by the conventional ACL 
  43600.            permission set.  Constants have been defined so application programs 
  43601.            can easily use these bits for extended ACLs. 
  43602.  
  43603.  
  43604. ΓòÉΓòÉΓòÉ 8.1.5. sec_acl_bind ΓòÉΓòÉΓòÉ
  43605.  
  43606.  Purpose 
  43607.  
  43608.           Returns a handle for an object's ACL. 
  43609.  
  43610.  Library 
  43611.  
  43612.           \lib\dceos2.lib 
  43613.  
  43614.  Format 
  43615.  
  43616.                     #include <dce/daclif.h>
  43617.  
  43618.                     void sec_acl_bind(
  43619.                             unsigned_char_p_t  entry_name,
  43620.                             boolean32  bind_to_entry,
  43621.                             sec_acl_handle_t  *h,
  43622.                             error_status_t  *status);
  43623.  
  43624.  Parameters 
  43625.  
  43626.           Input 
  43627.  
  43628.           entry_name    The name of the target object.  Subsequent ACL 
  43629.                         operations using the returned handle will affect the 
  43630.                         ACL of this object. 
  43631.  
  43632.           bind_to_entry Bind indicator, for use when entry_name identifies both 
  43633.                         an entry in the global namespace and an actual object. 
  43634.                         A TRUE value binds the handle to the entry in the 
  43635.                         namespace, while FALSE binds the handle to the actual 
  43636.                         object. 
  43637.  
  43638.           Output 
  43639.  
  43640.           h             A pointer to a sec_acl_handle_t type to receive the 
  43641.                         returned ACL handle. The other sec_acl_xxx routines use 
  43642.                         this handle to refer to the ACL for the object 
  43643.                         specified with entry_name. 
  43644.  
  43645.           status        A pointer to the completion status.  On successful 
  43646.                         completion, the routine returns error_status_ok. 
  43647.                         Otherwise, it returns one of the following errors: 
  43648.  
  43649.                              sec_acl_object_not_found The requested object 
  43650.                                                   could not be found. 
  43651.  
  43652.                              sec_acl_no_acl_found There is no ACL associated 
  43653.                                                   with the specified object. 
  43654.  
  43655.  Usage 
  43656.  
  43657.           The sec_acl_bind routine returns a handle bound to the indicated 
  43658.           object's ACL.  This routine is central to all the other sec_acl_xxx 
  43659.           routines, each of which requires this handle to identify the ACL on 
  43660.           which to operate. 
  43661.  
  43662.  Notes 
  43663.  
  43664.           If the specified name is both an actual object and an entry in the 
  43665.           global namespace, there are two ACLs associated with it.  For 
  43666.           example, in addition to the ACL normally attached to file system 
  43667.           objects, the root directory of a file system has an ACL corresponding 
  43668.           to its entry in the global namespace.  This controls access by 
  43669.           outsiders to the entire file system, whereas the resident ACL for the 
  43670.           root directory only controls access to the directory and, by 
  43671.           inheritance, its subdirectories.  The ambiguity must be resolved with 
  43672.           the bind_to_entry parameter. 
  43673.  
  43674.  Related Information 
  43675.  
  43676.           Files: 
  43677.           \include\dce\daclif.idl - The idl file that dce\daclif.h was derived 
  43678.           from. 
  43679.  
  43680.  
  43681. ΓòÉΓòÉΓòÉ 8.1.6. sec_acl_bind_to_addr ΓòÉΓòÉΓòÉ
  43682.  
  43683.  Purpose 
  43684.  
  43685.           Returns a handle to an object identified by its network address. 
  43686.  
  43687.  Library 
  43688.  
  43689.           \lib\dceos2.lib 
  43690.  
  43691.  Format 
  43692.  
  43693.                     #include <dce/daclif.h>
  43694.  
  43695.                     void sec_acl_bind_to_addr(
  43696.                             unsigned_char_p_t  site_addr,
  43697.                             sec_acl_component_name_t  component_name,
  43698.                             sec_acl_handle_t  *h,
  43699.                             error_status_t  *status);
  43700.  
  43701.  Parameters 
  43702.  
  43703.           Input 
  43704.  
  43705.           site_addr     An RPC string binding to the fully qualified network 
  43706.                         address of the target object. 
  43707.  
  43708.           component_name The name of the target object.  Subsequent ACL 
  43709.                         operations using the returned handle will affect the 
  43710.                         ACL of this object. 
  43711.  
  43712.           Output 
  43713.  
  43714.           h             A pointer to a sec_acl_handle_t type to receive the 
  43715.                         returned ACL handle. The other sec_acl_xxx routines use 
  43716.                         this handle to refer to the ACL for the object 
  43717.                         specified with entry_name. 
  43718.  
  43719.           status        A pointer to the completion status.  On successful 
  43720.                         completion, the routine returns error_status_ok. 
  43721.                         Otherwise, it returns one of the following errors: 
  43722.  
  43723.                              sec_acl_bind_error      The routine could not bind 
  43724.                                                      to the requested site. 
  43725.  
  43726.                              sec_acl_invalid_site_name The site_addr parameter 
  43727.                                                      is not valid. 
  43728.  
  43729.                              sec_acl_cant_allocate_memory Memory allocation 
  43730.                                                      failure. 
  43731.  
  43732.  Usage 
  43733.  
  43734.           The sec_acl_bind_to_addr routine returns a handle bound to the 
  43735.           indicated object's ACL manager. This routine and the sec_acl_bind 
  43736.           routine are central to all the other sec_acl_xxx routines, each of 
  43737.           which requires a handle to identify the ACL on which to operate. 
  43738.  
  43739.           This routine differs from sec_acl_bind in that it binds to the 
  43740.           network address of the target object, rather than to a cell namespace 
  43741.           entry. 
  43742.  
  43743.           Therefore, unlike sec_acl_bind, it is possible to pass 
  43744.           sec_acl_bind_to_addr a null string as a component name and to bind 
  43745.           with a non-existent name.  The purpose of this routine is to 
  43746.           eliminate the necessity of looking up an object's name.  To validate 
  43747.           the name, use sec_acl_bind. 
  43748.  
  43749.  Related Information 
  43750.  
  43751.           Routines: 
  43752.           sec_acl_bind 
  43753.  
  43754.           Files: 
  43755.           \include\dce\daclif.idl - The idl file that dce\daclif.h was derived 
  43756.           from. 
  43757.  
  43758.  
  43759. ΓòÉΓòÉΓòÉ 8.1.7. sec_acl_calc_mask ΓòÉΓòÉΓòÉ
  43760.  
  43761.  Purpose 
  43762.  
  43763.           Returns the sec_acl_type_mask_obj entry for the specified ACL list. 
  43764.  
  43765.  Library 
  43766.  
  43767.           \lib\dceos2.lib 
  43768.  
  43769.  Format 
  43770.  
  43771.                     #include <dce/daclif.h>
  43772.  
  43773.                     void sec_acl_calc_mask(
  43774.                             sec_acl_list_t  *sec_acl_list,
  43775.                             error_status_t  *status);
  43776.  
  43777.  Parameters 
  43778.  
  43779.           Input/Output 
  43780.  
  43781.           sec_acl_list  A pointer to a sec_acl_type_t data type that specifies 
  43782.                         the number of ACLs of each ACL type. The sec_acl_type_t 
  43783.                         data type distinguishes between the various types of 
  43784.                         ACLs an object can posses for a given manager. In the 
  43785.                         file system, for example, most objects have only one 
  43786.                         ACL controlling the access to that object, but objects 
  43787.                         that control the creation of other objects (sometimes 
  43788.                         referred to as containers) can have more. A directory, 
  43789.                         for example, can have ACLs to be used as initial values 
  43790.                         when member objects are created. 
  43791.  
  43792.                         Do not confuse ACL types with the permissions 
  43793.                         corresponding to different ACL manager types or with 
  43794.                         the ACL manager types themselves. 
  43795.  
  43796.           Output 
  43797.  
  43798.           status        A pointer to the completion status.  On successful 
  43799.                         completion, the routine returns error_status_ok. 
  43800.                         Otherwise, it returns the following error: 
  43801.  
  43802.                              sec_acl_cant_allocate_memory The requested 
  43803.                                                      operation requires more 
  43804.                                                      memory than is available. 
  43805.  
  43806.  Usage 
  43807.  
  43808.           The sec_acl_calc_mask routine calculates and sets the 
  43809.           sec_acl_e_type_mask_obj entry of the specified ACL list. The value of 
  43810.           the sec_acl_e_type_mask_obj entry is the union of the permissions of 
  43811.           all ACL entries that refer to members of the file group class. 
  43812.  
  43813.           This operation is performed locally, within the client.  The routine 
  43814.           does not check to determine if the manager to which the specified ACL 
  43815.           list will be submitted supports the sec_acl_e_type_mask_obj entry 
  43816.           type.  The calling application must determine whether to call this 
  43817.           routine, after obtaining the required POSIX semantics, if any, by 
  43818.           means of the sec_acl_get_mgr_types_semantics routine. 
  43819.  
  43820.  Notes 
  43821.  
  43822.           This routine is provided in source code form. 
  43823.  
  43824.  Related Information 
  43825.  
  43826.           Routines: 
  43827.           sec_acl_get_mgr_types_semantics 
  43828.  
  43829.           Files: 
  43830.           \include\dce\daclif.idl - The idl file that dce\daclif.h was derived 
  43831.           from. 
  43832.  
  43833.  
  43834. ΓòÉΓòÉΓòÉ 8.1.8. sec_acl_get_access ΓòÉΓòÉΓòÉ
  43835.  
  43836.  Purpose 
  43837.  
  43838.           Lists the access (permission set) that the caller has for an object. 
  43839.  
  43840.  Library 
  43841.  
  43842.           \lib\dceos2.lib 
  43843.  
  43844.  Format 
  43845.  
  43846.                     #include <dce/daclif.h>
  43847.  
  43848.                     void sec_acl_get_access(
  43849.                             sec_acl_handle_t  h,
  43850.                             uuid_t  *manager_type,
  43851.                             sec_acl_permset_t  *net_rights,
  43852.                             error_status_t  *status);
  43853.  
  43854.  Parameters 
  43855.  
  43856.           Input 
  43857.  
  43858.           h             A handle referring to the object whose ACL is to be 
  43859.                         accessed. Use sec_acl_bind to create this handle. 
  43860.  
  43861.           manager_type  A pointer to the UUID identifying the manager type of 
  43862.                         the ACL in question.  There can be more than one type 
  43863.                         of ACL manager protecting the object whose ACL is bound 
  43864.                         to the input handle.  Use this parameter to distinguish 
  43865.                         them.  Use sec_acl_get_manager_types to acquire a list 
  43866.                         of the manager types protecting a given object. 
  43867.  
  43868.           Output 
  43869.  
  43870.           net_rights    The output list of access rights, in sec_acl_permset_t 
  43871.                         form. This is a 32-bit set of permission flags 
  43872.                         supported by the manager type. 
  43873.  
  43874.           status        A pointer to the completion status.  On successful 
  43875.                         completion, the routine returns error_status_ok. 
  43876.                         Otherwise, it returns an error. 
  43877.  
  43878.  Usage 
  43879.  
  43880.           The sec_acl_get_access routine determines the complete extent of 
  43881.           access to the specified object by the calling process. Although the 
  43882.           sec_acl_test_access and sec_acl_test_access_on_behalf routines are 
  43883.           the preferred method of testing access, this routine is useful for 
  43884.           implementing operations like the conventional UNIX access routine. 
  43885.  
  43886.  Permissions Required 
  43887.  
  43888.           The sec_acl_get_access routine requires at least one permission of 
  43889.           any kind on the object for which the access is to be returned. 
  43890.  
  43891.  Related Information 
  43892.  
  43893.           Routines: sec_acl_test_access 
  43894.           sec_acl_test_access_on_behalf 
  43895.  
  43896.           Files: 
  43897.           \include\dce\daclif.idl - The idl file that dce\daclif.h was derived 
  43898.           from. 
  43899.  
  43900.  
  43901. ΓòÉΓòÉΓòÉ 8.1.9. sec_acl_get_error_info ΓòÉΓòÉΓòÉ
  43902.  
  43903.  Purpose 
  43904.  
  43905.           Returns error information from an ACL handle. 
  43906.  
  43907.  Library 
  43908.  
  43909.           \lib\dceos2.lib 
  43910.  
  43911.  Format 
  43912.  
  43913.                     #include <dce/daclif.h>
  43914.  
  43915.                     error_status_t sec_acl_get_error_info(
  43916.                             sec_acl_handle_t  h);
  43917.  
  43918.  Parameters 
  43919.  
  43920.           Input 
  43921.  
  43922.           h             A handle referring to the target ACL.  The handle is 
  43923.                         bound to the ACL with the sec_acl_bind routine, which 
  43924.                         also specifies the name of the object to which the 
  43925.                         target ACL belongs. 
  43926.  
  43927.  Usage 
  43928.  
  43929.           The sec_acl_get_error_info routine returns error information from the 
  43930.           specified ACL handle. 
  43931.  
  43932.           During a call to a routine in the sec_acl_xxx API, error codes 
  43933.           received from the RPC runtime or other APIs are saved in the ACL 
  43934.           handle and a corresponding error code from the sec_acl_xxx set is 
  43935.           passed back by the ACL API.  The sec_acl_get_error_info routine 
  43936.           returns the last error code stored in the ACL handle, for those 
  43937.           clients who need to know exactly what went wrong. 
  43938.  
  43939.  Return Codes 
  43940.  
  43941.           This routine returns a value of type error_status_t, indicating the 
  43942.           cause of the last error issued by the RPC runtime. The routine can 
  43943.           also return sec_acl_invalid_acl_handle, which indicated that the ACL 
  43944.           handle specified by h is not valid. 
  43945.  
  43946.  Related Information 
  43947.  
  43948.           Routines: sec_acl_bind 
  43949.           sec_acl_lookup 
  43950.  
  43951.           Files: 
  43952.           \include\dce\daclif.idl - The idl file that dce\daclif.h was derived 
  43953.           from. 
  43954.  
  43955.  
  43956. ΓòÉΓòÉΓòÉ 8.1.10. sec_acl_get_manager_types ΓòÉΓòÉΓòÉ
  43957.  
  43958.  Purpose 
  43959.  
  43960.           Lists the manager types of the ACLs protecting an object. 
  43961.  
  43962.  Library 
  43963.  
  43964.           \lib\dceos2.lib 
  43965.  
  43966.  Format 
  43967.  
  43968.                     #include <dce/daclif.h>
  43969.  
  43970.                     void sec_acl_get_manager_types(
  43971.                             sec_acl_handle_t  h,
  43972.                             sec_acl_type_t  sec_acl_type,
  43973.                             unsigned32  size_avail,
  43974.                             unsigned32  *size_used,
  43975.                             unsigned32  *num_types,
  43976.                             uuid_t  manager_types[],
  43977.                             error_status_t  *status);
  43978.  
  43979.  Parameters 
  43980.  
  43981.           Input 
  43982.  
  43983.           h             A handle referring to the target object. Use 
  43984.                         sec_acl_bind to create this handle. 
  43985.  
  43986.           sec_acl_type  The ACL type.  The sec_acl_type_t data type 
  43987.                         distinguishes the various types of ACLs an object can 
  43988.                         possess for a given manager type.  Possible values are: 
  43989.  
  43990.                           o  sec_acl_type_object 
  43991.                           o  sec_acl_type_default_object 
  43992.                           o  sec_acl_type_default_container 
  43993.  
  43994.           size_avail    An unsigned 32-bit integer containing the allocated 
  43995.                         length of the manager_types array. 
  43996.  
  43997.           Output 
  43998.  
  43999.           size_used     An unsigned 32-bit integer containing the number of 
  44000.                         output entries returned in the manager_types array. 
  44001.  
  44002.           num_types     An unsigned 32-bit integer containing the number of 
  44003.                         types returned in the manager_types array.  This can be 
  44004.                         greater than size_used if there was not enough space 
  44005.                         allocated in the manager_types array for all the 
  44006.                         manager types. 
  44007.  
  44008.           manager_types An array of length size_avail to contain UUIDs (of type 
  44009.                         uuid_t) identifying the different types of ACL managers 
  44010.                         protecting the target object. 
  44011.  
  44012.           status        A pointer to the completion status.  On successful 
  44013.                         completion, the routine returns error_status_ok. 
  44014.                         Otherwise, it returns an error. 
  44015.  
  44016.  Usage 
  44017.  
  44018.           The sec_acl_get_manager_types routine returns a list of the manager 
  44019.           types of ACLs of type sec_acl_type that are protecting the object 
  44020.           identified by h.  For example, in addition to the regular file system 
  44021.           ACL, a file representing the stable storage of some database could 
  44022.           have an ACL manager that supported permissions allowing database 
  44023.           updates only on certain days of the week. 
  44024.  
  44025.           ACL editors and browsers can use this operation to determine the ACL 
  44026.           manager types that a particular reference monitor is using to protect 
  44027.           a selected entity. Then, using the sec_acl_get_printstring routine, 
  44028.           they can determine how to format for display the permissions 
  44029.           supported by a specific manager. 
  44030.  
  44031.  Permissions Required 
  44032.  
  44033.           The sec_acl_get_manager_types routine requires at least one 
  44034.           permission of any kind on the object for which the ACL manager types 
  44035.           are to be returned. 
  44036.  
  44037.  Related Information 
  44038.  
  44039.           Routines: sec_acl_bind 
  44040.           sec_acl_get_printstring 
  44041.  
  44042.           Files: 
  44043.           \include\dce\daclif.idl - The idl file that dce\daclif.h was derived 
  44044.           from. 
  44045.  
  44046.  
  44047. ΓòÉΓòÉΓòÉ 8.1.11. sec_acl_get_mgr_types_semantics ΓòÉΓòÉΓòÉ
  44048.  
  44049.  Purpose 
  44050.  
  44051.           Lists the manager types of the ACLs protecting an object. 
  44052.  
  44053.  Library 
  44054.  
  44055.           \lib\dceos2.lib 
  44056.  
  44057.  Format 
  44058.  
  44059.                     #include <dce/daclif.h>
  44060.  
  44061.                     void sec_acl_get_mgr_types_semantics(
  44062.                             sec_acl_handle_t  h,
  44063.                             sec_acl_type_t  sec_acl_type,
  44064.                             unsigned32  size_avail,
  44065.                             unsigned32  *size_used,
  44066.                             unsigned32  *num_types,
  44067.                             uuid_t  manager_types[],
  44068.                             sec_acl_posix_semantics_t  posix_semantics[],
  44069.                             error_status_t  *status);
  44070.  
  44071.  Parameters 
  44072.  
  44073.           Input 
  44074.  
  44075.           h             A handle referring to the target object. Use 
  44076.                         sec_acl_bind to create this handle. 
  44077.  
  44078.           sec_acl_type  The ACL type.  The sec_acl_type_t data type 
  44079.                         distinguishes the various types of ACLs an object can 
  44080.                         possess for a given manager type.  Possible values are: 
  44081.  
  44082.                           o  sec_acl_type_object 
  44083.                           o  sec_acl_type_default_object 
  44084.                           o  sec_acl_type_default_container 
  44085.  
  44086.           size_avail    An unsigned 32-bit integer containing the allocated 
  44087.                         length of the manager_types array. 
  44088.  
  44089.           Output 
  44090.  
  44091.           size_used     An unsigned 32-bit integer containing the number of 
  44092.                         output entries returned in the manager_types array. 
  44093.  
  44094.           num_types     An unsigned 32-bit integer containing the number of 
  44095.                         types returned in the manager_types array. This might 
  44096.                         be greater than size_used if there was not enough space 
  44097.                         allocated in the manager_types array for all the 
  44098.                         manager types. 
  44099.  
  44100.           manager_types An array of length size_avail to contain UUIDs (of type 
  44101.                         uuid_t) identifying the different types of ACL managers 
  44102.                         protecting the target object. 
  44103.  
  44104.           posix_semantics An array of POSIX semantics supported by each manager 
  44105.                         type with entries of type sec_acl_posix_semantics_t. 
  44106.  
  44107.           status        A pointer to the completion status.  On successful 
  44108.                         completion, the routine returns error_status_ok. 
  44109.                         Otherwise, it returns an error. 
  44110.  
  44111.  Usage 
  44112.  
  44113.           The sec_acl_get_mgr_types_semantics routine returns a list of the 
  44114.           manager types of ACLs of type sec_acl_type that are protecting the 
  44115.           object identified by h. For example, in addition to the regular file 
  44116.           system ACL, a file representing the stable storage of some database 
  44117.           could have an ACL manager that supported permissions allowing 
  44118.           database updates only on certain days of the week. 
  44119.  
  44120.           ACL editors and browsers can use this operation to determine the ACL 
  44121.           manager types that a particular reference monitor is using to protect 
  44122.           a selected entity. Then, using the sec_acl_printstring routine, they 
  44123.           can determine how to format for display the permissions supported by 
  44124.           a specific manager. 
  44125.  
  44126.  Permissions Required 
  44127.  
  44128.           The sec_acl_get_mgr_types_semantics routine requires at least one 
  44129.           permission of any kind on the object for which the ACL manager types 
  44130.           are to be returned. 
  44131.  
  44132.  Related Information 
  44133.  
  44134.           Routines: 
  44135.           sec_acl_bind 
  44136.           sec_acl_get_printstring Files: 
  44137.           \include\dce\daclif.idl - The idl file from which dce\daclif.h was 
  44138.           derived. 
  44139.  
  44140.  
  44141. ΓòÉΓòÉΓòÉ 8.1.12. sec_acl_get_printstring ΓòÉΓòÉΓòÉ
  44142.  
  44143.  Purpose 
  44144.  
  44145.           Returns printable ACL strings. 
  44146.  
  44147.  Library 
  44148.  
  44149.           \lib\dceos2.lib 
  44150.  
  44151.  Format 
  44152.  
  44153.                     #include <dce/daclif.h>
  44154.  
  44155.                     void sec_acl_get_printstring(
  44156.                             sec_acl_handle_t  h,
  44157.                             uuid_t  *manager_type,
  44158.                             unsigned32  size_avail,
  44159.                             uuid_t  *manager_type_chain,
  44160.                             sec_acl_printstring_t  *manager_info,
  44161.                             boolean32  *tokenize,
  44162.                             unsigned32  *total_num_printstrings,
  44163.                             unsigned32  *size_used,
  44164.                             sec_acl_printstring_t  *printstrings,
  44165.                             error_status_t  *status);
  44166.  
  44167.  Parameters 
  44168.  
  44169.           Input 
  44170.  
  44171.           h             A handle referring to the target object. Use 
  44172.                         sec_acl_bind to create this handle. 
  44173.  
  44174.           manager_type  A pointer to the UUID identifying the type of the ACL 
  44175.                         manager in question. There may be more than one type of 
  44176.                         ACL manager protecting the object whose ACL is bound to 
  44177.                         the input handle. Use this parameter to distinguish 
  44178.                         them. Use sec_acl_get_manager_types to acquire a list 
  44179.                         of the manager types protecting a given object. 
  44180.  
  44181.           size_avail    An unsigned 32-bit integer containing the allocated 
  44182.                         length of the printstrings array. 
  44183.  
  44184.           Output 
  44185.  
  44186.           manager_type_chain If the target object ACL contains more than 32 
  44187.                         permission bits, multiple manager types are used, one 
  44188.                         for each 32-bit wide slice of permissions. The UUID 
  44189.                         returned in manager_type_chain refers to the next ACL 
  44190.                         manager in the chain.  If there are no more ACL 
  44191.                         managers for this ACL, uuid_nil is returned. 
  44192.  
  44193.           manager_info  Provides a name and help string for the given ACL 
  44194.                         manager. 
  44195.  
  44196.           tokenize      When FALSE this parameter indicates that the returned 
  44197.                         permission print strings are unambiguous and therefore 
  44198.                         may be concatenated when printed without confusion. 
  44199.                         When TRUE, however,  this property does not hold and 
  44200.                         the strings need to be separated when printed or 
  44201.                         passed. 
  44202.  
  44203.           total_num_printstrings A pointer to an unsigned 32-bit integer 
  44204.                         containing the total number of permission print strings 
  44205.                         supported by this ACL manager type. 
  44206.  
  44207.           size_used     A pointer to an unsigned 32-bit integer containing the 
  44208.                         number of permission entries returned in the 
  44209.                         printstrings array. 
  44210.  
  44211.           printstrings  A pointer to a structure of permission print strings of 
  44212.                         type sec_acl_printstring_t. Each structure contains the 
  44213.                         following three components: 
  44214.  
  44215.                              printstring   A character string of maximum length 
  44216.                                            sec_acl_printstring_len describing 
  44217.                                            the printable representation of a 
  44218.                                            specified permission. 
  44219.  
  44220.                              helpstring    A character string of maximum length 
  44221.                                            sec_acl_printstring_help_len 
  44222.                                            containing some text that can be 
  44223.                                            used to describe the specified 
  44224.                                            permission. 
  44225.  
  44226.                              permissions   A sec_acl_permset_t permission set 
  44227.                                            describing the permissions that are 
  44228.                                            represented with the companion print 
  44229.                                            string. 
  44230.  
  44231.                                            There is one such entry for each 
  44232.                                            permission supported by the ACL 
  44233.                                            manager identified by manager_type. 
  44234.  
  44235.           status        A pointer to the completion status.  On successful 
  44236.                         completion, the routine returns error_status_ok. 
  44237.                         Otherwise, it returns one of the following errors: 
  44238.  
  44239.                              sec_acl_unknown_manager_type The manager type 
  44240.                                                    selected is not among those 
  44241.                                                    referenced by the input 
  44242.                                                    handle. 
  44243.  
  44244.                              sec_acl_invalid_acl_handle The ACL handle 
  44245.                                                    specified by h is not valid. 
  44246.  
  44247.  Usage 
  44248.  
  44249.           The sec_acl_get_printstring routine returns an array of printable 
  44250.           representations (print strings) for each permission bit or 
  44251.           combination of permission bits the specified ACL manager supports. 
  44252.           The ACL manager type specified must be one of the types protecting 
  44253.           the object indicated by h. 
  44254.  
  44255.           In addition to returning the print strings, this routine also returns 
  44256.           instructions about how to print the strings. When the tokenize 
  44257.           parameter is set to FALSE, a print string might be r or w, which 
  44258.           could be concatenated in the display as rw without any confusion. 
  44259.           However, when the tokenize parameter is TRUE, it implies the print 
  44260.           strings might be of a form like read or write, which must be 
  44261.           displayed separated by spaces or colons or some other delimiter. 
  44262.  
  44263.           In any list of permission print strings, there may seem to be some 
  44264.           redundancy. ACL managers often define aliases for common permission 
  44265.           combinations. By convention, however, simple entries should begin the 
  44266.           printstrings array, and combinations should end it. 
  44267.  
  44268.  Related Information 
  44269.  
  44270.           Routines: 
  44271.           sec_acl_bind 
  44272.           sec_acl_get_manager_types 
  44273.  
  44274.           Files: 
  44275.           \include\dce\daclif.idl - The idl file from which dce\daclif.h was 
  44276.           derived. 
  44277.  
  44278.  
  44279. ΓòÉΓòÉΓòÉ 8.1.13. sec_acl_lookup ΓòÉΓòÉΓòÉ
  44280.  
  44281.  Purpose 
  44282.  
  44283.           Returns the ACL for an object. 
  44284.  
  44285.  Library 
  44286.  
  44287.           \lib\dceos2.lib 
  44288.  
  44289.  Format 
  44290.  
  44291.                     #include <dce/daclif.h>
  44292.  
  44293.                     void sec_acl_lookup(
  44294.                             sec_acl_handle_t  h,
  44295.                             uuid_t  *manager_type,
  44296.                             sec_acl_type_t  sec_acl_type,
  44297.                             sec_acl_list_t  *sec_acl_list,
  44298.                             error_status_t  *status);
  44299.  
  44300.  Parameters 
  44301.  
  44302.           Input 
  44303.  
  44304.           h             A handle referring to the target object. Use 
  44305.                         sec_acl_bind to create this handle. 
  44306.  
  44307.           manager_type  A pointer to the UUID identifying the type of the ACL 
  44308.                         manager in question.  There may be more than one type 
  44309.                         of ACL manager protecting the object whose ACL is bound 
  44310.                         to the input handle.  Use this parameter to distinguish 
  44311.                         them.  Use sec_acl_get_manager_types to acquire a list 
  44312.                         of the manager types protecting a given object. 
  44313.  
  44314.           sec_acl_type  The ACL type.  The sec_acl_type_t data type 
  44315.                         distinguishes the various types of ACLs an object can 
  44316.                         possess for a given manager type.  Possible values are: 
  44317.  
  44318.                           o  sec_acl_type_object 
  44319.                           o  sec_acl_type_default_object 
  44320.                           o  sec_acl_type_default_container 
  44321.  
  44322.           Output 
  44323.  
  44324.           sec_acl_list  A pointer to the sec_acl_list_t structure to receive 
  44325.                         the complete access control list.  An ACL contains a 
  44326.                         list of ACL entries, the UUID of the default cell where 
  44327.                         authentication takes place (foreign entries in the ACL 
  44328.                         contain the name of their home cell), and the UUID of 
  44329.                         the ACL manager to interpret the list. 
  44330.  
  44331.           status        A pointer to the completion status.  On successful 
  44332.                         completion, the routine returns error_status_ok. 
  44333.                         Otherwise, it returns one of the following errors: 
  44334.  
  44335.                              sec_acl_unknown_manager_type The manager type 
  44336.                                                    selected is not an available 
  44337.                                                    option. 
  44338.  
  44339.                              sec_acl_cant_allocate_memory The requested 
  44340.                                                    operation requires more 
  44341.                                                    memory than is available. 
  44342.  
  44343.                              sec_acl_invalid_acl_handle The ACL handle 
  44344.                                                    specified by h is not valid. 
  44345.  
  44346.  Usage 
  44347.  
  44348.           The sec_acl_lookup routine loads into memory a copy of an object's 
  44349.           ACL corresponding to the specified manager type.  The routine returns 
  44350.           a pointer to the ACL.  This routine is only used by ACL editors and 
  44351.           browsers; an application would use sec_acl_test_access or 
  44352.           sec_acl_test_access_on_behalf to process the contents of an ACL. 
  44353.  
  44354.  Permissions Required 
  44355.  
  44356.           The sec_acl_lookup routine requires at least one permission of any 
  44357.           kind on the object for which the ACL is to be returned. 
  44358.  
  44359.  Notes 
  44360.  
  44361.           The memory containing the sec_acl_t structure for each ACL is 
  44362.           dynamically allocated. Use the sec_acl_release routine to return the 
  44363.           memory block from each ACL to the pool when an application is 
  44364.           finished with the ACLs. 
  44365.  
  44366.  Related Information 
  44367.  
  44368.           Routines: 
  44369.           sec_acl_bind 
  44370.           sec_acl_get_manager_types 
  44371.           sec_acl_release 
  44372.           sec_acl_test_access 
  44373.           sec_acl_test_access_on_behalf 
  44374.  
  44375.           Files: 
  44376.           \include\dce\daclif.idl - The idl file from which dce\daclif.h was 
  44377.           derived. 
  44378.  
  44379.  
  44380. ΓòÉΓòÉΓòÉ 8.1.14. sec_acl_mgr_configure ΓòÉΓòÉΓòÉ
  44381.  
  44382.  Purpose 
  44383.  
  44384.           Configures an ACL manager. 
  44385.  
  44386.  Library 
  44387.  
  44388.           None; provided with the acl_mgr example program. 
  44389.  
  44390.  Format 
  44391.  
  44392.                     #include <dce/daclmgr.h>
  44393.  
  44394.                     void sec_acl_mgr_configure(
  44395.                             sec_acl_mgr_config_t  config_info,
  44396.                             unsigned_char_p_t  db_name,
  44397.                             sec_acl_mgr_handle_t  *sec_acl_mgr,
  44398.                             error_status_t  *status);
  44399.  
  44400.  Parameters 
  44401.  
  44402.           Input 
  44403.  
  44404.           config_info   An unsigned 32-bit set of flags containing 
  44405.                         miscellaneous information about how to treat the 
  44406.                         specified ACL database.  Currently, only the following 
  44407.                         two flags are used: 
  44408.  
  44409.                              sec_acl_mgr_config_create Create a new database 
  44410.                                                   with the given name.  If one 
  44411.                                                   with the input name already 
  44412.                                                   exists, an error is returned. 
  44413.  
  44414.                              sec_acl_mgr_config_stable Provide stable storage 
  44415.                                                   for the database state.  If 
  44416.                                                   not set, 
  44417.                                                   sec_acl_mgr_configure assumes 
  44418.                                                   that the calling program 
  44419.                                                   takes care of storing the ACL 
  44420.                                                   database, and does not save 
  44421.                                                   it. 
  44422.  
  44423.           db_name       Identifies the ACL database to use.  The name generally 
  44424.                         refers to the file system object that represents the 
  44425.                         persistent storage for the database. 
  44426.  
  44427.           Output 
  44428.  
  44429.           sec_acl_mgr   A pointer to a handle for an ACL manager and the 
  44430.                         storage configuration chosen with the config_info 
  44431.                         parameter. Having a distinct handle for the combination 
  44432.                         of ACL manager and configuration allows the application 
  44433.                         to use different storage strategies for different types 
  44434.                         of objects. 
  44435.  
  44436.           status        A pointer to the completion status.  On successful 
  44437.                         completion, the routine returns error_status_ok. 
  44438.  
  44439.  Usage 
  44440.  
  44441.           The sec_acl_mgr_configure routine provides a handle to refer to the 
  44442.           particular ACL database in use and which is necessary for all other 
  44443.           ACL manager operations. 
  44444.  
  44445.           The only storage model supported by the current ACL manager interface 
  44446.           is one with a separate stable storage file. 
  44447.  
  44448.  Notes 
  44449.  
  44450.           This routine is not intended to be used by application programs.  The 
  44451.           sec_acl Application Programming Interface (API) provides all the 
  44452.           functions necessary to use the ACL facility.  This reference page is 
  44453.           provided for programmers who wish to write an ACL manager.  In order 
  44454.           to write an ACL manager, a programmer must implement the entire rdacl 
  44455.           interface.  The sec_acl_mgr reference pages are provided as an 
  44456.           example of a successful implementation. 
  44457.  
  44458.  Examples 
  44459.  
  44460.           Here is an example of the common usage of the ACL manager routines. 
  44461.           The application uses rpc_binding_inq_auth_client to acquire a 
  44462.           privilege attribute certificate. 
  44463.  
  44464.                     application_op(handle_t h, ...) {
  44465.                      ...
  44466.                       sec_acl_mgr_configure(<configuration info>,
  44467.                                         <name of acl file system object>,
  44468.                                         &sec_acl_mgr_handle, &status);
  44469.                      ...
  44470.                       rpc_binding_inq_auth_client(h, PAC, &server_name, &lvl,
  44471.                               &authn_svc, &authz_svc, &status);
  44472.                       rpc_binding_inq_object(h, &object, &status);
  44473.                       if (sec_acl_mgr_is_authorized(acl_mgr_handle,
  44474.                                          <needed permissions>,
  44475.                                          PAC, (sec_acl_key_t) &object,
  44476.                                          sec_acl_type_object, NULL, NULL, &status)) {
  44477.                           /* Application code to perform operation */
  44478.                        } else {
  44479.                           /* Caller is not authorized to have the desired permissions
  44480.                            * over the indicated object.  Act accordingly...
  44481.                            */
  44482.                            ...
  44483.                       }
  44484.                     }
  44485.  
  44486.  Related Information 
  44487.  
  44488.           Files: 
  44489.           \include\dce\daclmgr.idl - The idl file from which dce\daclmgrf.h was 
  44490.           derived. 
  44491.  
  44492.  
  44493. ΓòÉΓòÉΓòÉ 8.1.15. sec_acl_mgr_get_access ΓòÉΓòÉΓòÉ
  44494.  
  44495.  Purpose 
  44496.  
  44497.           Reads a privilege attribute certificate. 
  44498.  
  44499.  Library 
  44500.  
  44501.           None; provided with the acl_mgr example program. 
  44502.  
  44503.  Format 
  44504.  
  44505.                     #include <dce/daclmgr.h>
  44506.  
  44507.                     void sec_acl_mgr_get_access(
  44508.                             sec_acl_mgr_handle_t  sec_acl_mgr,
  44509.                             rpc_authz_cred_handle_t  *accessor_info,
  44510.                             sec_acl_key_t  sec_acl_key,
  44511.                             uuid_t  *manager_type,
  44512.                             sec_id_t  *user_obj,
  44513.                             sec_id_t  *group_obj,
  44514.                             sec_acl_permset_t  *net_rights,
  44515.                             error_status_t  *status);
  44516.  
  44517.  Parameters 
  44518.  
  44519.           Input 
  44520.  
  44521.           sec_acl_mgr   A pointer to a handle for an ACL manager and the 
  44522.                         storage configuration chosen with sec_acl_configure. 
  44523.                         Having a distinct handle for the combination of ACL 
  44524.                         manager and configuration allows the application to use 
  44525.                         different storage strategies for different types of 
  44526.                         objects. 
  44527.  
  44528.           accessor_info The accessor_info parameter refers to the privilege 
  44529.                         attribute certificate (PAC) of the calling process. The 
  44530.                         PAC contains the identity and group membership of the 
  44531.                         calling process, which can then be compared with 
  44532.                         entries in the ACL to determine whether it is 
  44533.                         authorized to have indicated desired privileges. Use 
  44534.                         rpc_binding_inq_auth_client to acquire a certificate 
  44535.                         for the caller process. 
  44536.  
  44537.           sec_acl_key   A pointer indicating the object whose ACL is in 
  44538.                         question. The type of the pointer is dependent on the 
  44539.                         ACL manager involved. For file system ACLs, it points 
  44540.                         to a uuid_t parameter, containing the UUID and name of 
  44541.                         the file system object. 
  44542.  
  44543.           manager_type  A pointer to the UUID identifying the type of the ACL 
  44544.                         manager in question. There may be more than one type of 
  44545.                         ACL manager protecting the object whose ACL is bound to 
  44546.                         the input handle. Use this parameter to distinguish 
  44547.                         them. Use sec_acl_get_manager_types to acquire a list 
  44548.                         of the manager types protecting a given object. 
  44549.  
  44550.           user_obj      Contains the identity of the caller. This is to be used 
  44551.                         when the ACL manager encounters a USER_OBJ field in an 
  44552.                         ACL.  The identity used is generally the person field 
  44553.                         of the caller account. This parameter may be NULL, 
  44554.                         although this produces an error and denial of access to 
  44555.                         the object if the ACL contains a USER_OBJ entry. 
  44556.  
  44557.           group_obj     Identical in use to the user_obj parameter, except this 
  44558.                         refers to the group of the caller account and any 
  44559.                         potential GROUP_OBJ entry in the target object's ACL. 
  44560.  
  44561.           Output 
  44562.  
  44563.           net_rights    The output list of access rights, in sec_acl_permset_t 
  44564.                         form. This is a 32-bit set of permission flags.  The 
  44565.                         flags may represent the conventional file system 
  44566.                         permissions (read, write, execute), the extended AFS 
  44567.                         permissions (owner, insert, delete), or some other 
  44568.                         permissions supported only by the specific ACL manager. 
  44569.                         For example, a bit that is unused for file system 
  44570.                         permissions may mean withdrawals are allowed for a bank 
  44571.                         ACL manager, while it may mean rebooting is allowed for 
  44572.                         a CPU ACL manager. 
  44573.  
  44574.           status        A pointer to the completion status.  On successful 
  44575.                         completion, the routine returns error_status_ok. 
  44576.  
  44577.  Usage 
  44578.  
  44579.           The sec_acl_mgr_get_access routine determines the complete extent of 
  44580.           access to the specified object by the process described in the input 
  44581.           privilege attribute certificate (called a PAC and referred to in the 
  44582.           accessor_info parameter). Although the sec_acl_mgr_is_authorized 
  44583.           routine is the preferred method of testing access, this routine is 
  44584.           useful for implementing operations like the conventional UNIX access 
  44585.           function. 
  44586.  
  44587.           The actual ACL to be compared against the input PAC is not passed 
  44588.           directly to this routine, but is referred to by the sec_acl_key and 
  44589.           the sec_acl_mgr parameters. 
  44590.  
  44591.  Notes 
  44592.  
  44593.           This routine is not intended to be used by application programs. The 
  44594.           sec_acl Application Programming Interface (API) provides all the 
  44595.           functions necessary to use the ACL facility. This reference page is 
  44596.           provided for programmers who wish to write an ACL manager. In order 
  44597.           to write an ACL manager, a programmer must implement the entire rdacl 
  44598.           interface. The sec_acl_mgr reference pages are provided as an example 
  44599.           of a successful implementation. 
  44600.  
  44601.  Related Information 
  44602.  
  44603.           Routines: 
  44604.           rpc_binding_inq_auth_client 
  44605.           sec_acl_mgr_configure 
  44606.           sec_acl_mgr_is_authorized 
  44607.  
  44608.           Files: 
  44609.           \include\dce\daclmgr.idl - The idl file from which dce\daclmgrf.h was 
  44610.           derived. 
  44611.  
  44612.  
  44613. ΓòÉΓòÉΓòÉ 8.1.16. sec_acl_mgr_get_manager_types ΓòÉΓòÉΓòÉ
  44614.  
  44615.  Purpose 
  44616.  
  44617.           Returns the types of ACLs that are protecting an object. 
  44618.  
  44619.  Library 
  44620.  
  44621.           None; provided with the acl_mgr example program. 
  44622.  
  44623.  Format 
  44624.  
  44625.                     #include <dce/daclmgr.h>
  44626.  
  44627.                     void sec_acl_mgr_get_manager_types(
  44628.                       sec_acl_mgr_handle_t  sec_acl_mgr,
  44629.                       sec_acl_key_t  sec_acl_key,
  44630.                       sec_acl_type_t  sec_acl_type,
  44631.                       unsigned32  size_avail,
  44632.                       unsigned32  *size_used,
  44633.                       unsigned32  *num_types,
  44634.                       uuid_t  manager_types[],
  44635.                       error_status_t  *status);
  44636.  
  44637.  Parameters 
  44638.  
  44639.           Input 
  44640.  
  44641.           sec_acl_mgr   A pointer to a handle for an ACL manager and the 
  44642.                         storage configuration chosen with 
  44643.                         sec_acl_mgr_configure. Having a distinct handle for the 
  44644.                         combination of ACL manager and configuration allows the 
  44645.                         application to use different storage strategies for 
  44646.                         different types of objects. 
  44647.  
  44648.           sec_acl_key   A pointer indicating the object whose ACL is in 
  44649.                         question. The type of the pointer is dependent on the 
  44650.                         ACL manager involved. For file system ACLs, it points 
  44651.                         to a uuid_t parameter, containing the UUID and name of 
  44652.                         the file system object. 
  44653.  
  44654.           sec_acl_type  The ACL type.  It is generally sec_acl_type_object. 
  44655.                         The sec_acl_type_t data type distinguishes between the 
  44656.                         various types of ACLs an object can possess for a given 
  44657.                         manager.  In the file system, for example, most objects 
  44658.                         have only one ACL controlling the access to that 
  44659.                         object, but objects that control the creation of other 
  44660.                         objects (sometimes referred to as containers) may have 
  44661.                         more. A directory, for example, can have ACLs to be 
  44662.                         used as initial values when member objects are created. 
  44663.  
  44664.                         Do not confuse ACL types with the permissions 
  44665.                         corresponding to different ACL manager types or with 
  44666.                         the ACL manager types themselves. 
  44667.  
  44668.           size_avail    An unsigned 32-bit integer containing the allocated 
  44669.                         length of the manager_types array. 
  44670.  
  44671.           Output 
  44672.  
  44673.           size_used     An unsigned 32-bit integer containing the actual length 
  44674.                         of the manager_types array. 
  44675.  
  44676.           num_types     An unsigned 32-bit integer containing the actual number 
  44677.                         of manager types returned in the manager_types array. 
  44678.  
  44679.           manager_types An array of manager types in which each entry is of 
  44680.                         type uuid_t. 
  44681.  
  44682.           status        A pointer to the completion status.  On successful 
  44683.                         completion, the routine returns error_status_ok. 
  44684.                         Otherwise, it returns the following error: 
  44685.  
  44686.                              sec_acl_cant_allocate_memory Requested operation 
  44687.                                                   requires more memory than is 
  44688.                                                   available. 
  44689.  
  44690.  Usage 
  44691.  
  44692.           The sec_acl_mgr_get_manager_types routine returns the types of ACLs 
  44693.           that are protecting an object.  ACL editors and browsers can use this 
  44694.           routine to determine the ACL manager types that a particular 
  44695.           reference monitor is using to manage the ACLs of sec_acl_type on the 
  44696.           object identified by sec_acl_key. 
  44697.  
  44698.           The number of the ACL manager types supported by the object for the 
  44699.           specified sec_acl_type is returned in num_types. The actual ACL 
  44700.           manager types are returned as entries in the manager_types array. 
  44701.  
  44702.           If the returned size is greater than the specified size_avail, invoke 
  44703.           the routine again with a buffer large enough to hold the returned 
  44704.           information. 
  44705.  
  44706.           Note that if num_types is greater than 1, it means that the object is 
  44707.           polymorphic and supports ACL manager types for each of its forms. 
  44708.  
  44709.  File 
  44710.  
  44711.           \include\dce\daclmgr.idl The idl file that dce\daclmgrf.h was derived 
  44712.                          from. 
  44713.  
  44714.  Related Information 
  44715.  
  44716.           Routines: 
  44717.  
  44718.  
  44719.           sec_acl_mgr_configure 
  44720.           sec_acl_mgr_get_access 
  44721.           sec_acl_mgr_is_authorized 
  44722.  
  44723.  
  44724. ΓòÉΓòÉΓòÉ 8.1.17. sec_acl_mgr_get_types_semantics ΓòÉΓòÉΓòÉ
  44725.  
  44726.  Purpose 
  44727.  
  44728.           Returns the types of ACLs and the POSIX semantics that are protecting 
  44729.           an object. 
  44730.  
  44731.  Library 
  44732.  
  44733.           None; provided with the acl_mgr example program. 
  44734.  
  44735.  Format 
  44736.  
  44737.                     #include <dce/daclmgr.h>
  44738.  
  44739.                     void sec_acl_mgr_get_types_semantics(
  44740.                       sec_acl_handle_t  sec_acl_mgr,
  44741.                       sec_acl_key_t  sec_acl_key,
  44742.                       sec_acl_type_t  sec_acl_type,
  44743.                       unsigned32  size_avail,
  44744.                       unsigned32  *size_used,
  44745.                       unsigned32  *num_types,
  44746.                       uuid_t  manager_types[],
  44747.                       sec_acl_posix_semantics  posix_semantics[],
  44748.                       error_status_t *status);
  44749.  
  44750.  Parameters 
  44751.  
  44752.           Input 
  44753.  
  44754.           sec_acl_mgr   A pointer to a handle for an ACL manager and the 
  44755.                         storage configuration chosen with 
  44756.                         sec_acl_mgr_configure. Having a distinct handle for the 
  44757.                         combination of ACL manager and configuration allows the 
  44758.                         application to use different storage strategies for 
  44759.                         different types of objects. 
  44760.  
  44761.           sec_acl_key   A pointer indicating the object whose ACL is in 
  44762.                         question. The type of the pointer depends on the ACL 
  44763.                         manager involved. For file system ACLs, it points to a 
  44764.                         uuid_t parameter, containing the UUID and name of the 
  44765.                         system object. 
  44766.  
  44767.           sec_acl_type  The ACL type. It is generally sec_acl_type_object. The 
  44768.                         sec_acl_type_t data type distinguishes between the 
  44769.                         various types of ACLs an object can possess for a given 
  44770.                         manager. In the file system, for example, most objects 
  44771.                         have only one ACL controlling the access to that 
  44772.                         object, but objects that control the creation of other 
  44773.                         objects (sometimes referred to as "containers") may 
  44774.                         have more. A directory, for example, can have ACLs to 
  44775.                         be used as initial values when member objects are 
  44776.                         created. 
  44777.  
  44778.                         Do not confuse ACL types with the permissions 
  44779.                         corresponding to different ACL manager types or with 
  44780.                         the ACL manager types themselves. 
  44781.  
  44782.           size_avail    An unsigned 32-bit integer containing the allocated 
  44783.                         length of the manager_types array. 
  44784.  
  44785.           Output 
  44786.  
  44787.           size_used     An unsigned 32-bit integer containing the actual length 
  44788.                         of the manager_types array. 
  44789.  
  44790.           num_types     An unsigned 32-bit integer containing the actual number 
  44791.                         of manager types returned in the manager_types array. 
  44792.  
  44793.           manager_types An array of manager types in which each entry is of 
  44794.                         type uuid_t. 
  44795.  
  44796.           posix_semantics An array of POSIX semantics supported by each manager 
  44797.                         type with entries of type sec_acl_posix_semantics. 
  44798.  
  44799.           status        A pointer to the completion status. On successful 
  44800.                         completion, the routine returns error_status_ok. 
  44801.                         Otherwise, it returns the following error: 
  44802.  
  44803.                              sec_acl_cant_allocate_memory The requested 
  44804.                                            operation requires more memory than 
  44805.                                            is available. 
  44806.  
  44807.  Usage 
  44808.  
  44809.           The sec_acl_mgr_get_types_semantics routine returns the types of ACLs 
  44810.           that are protecting an object. ACL editors and browsers can use this 
  44811.           routine to determine the ACL manager types that a particular 
  44812.           reference monitor is using to manage the ACLs of sec_acl_type on the 
  44813.           object identified by sec_acl_key. 
  44814.  
  44815.           The number of the ACL manager types supported by the object for the 
  44816.           specified sec_acl_type is returned in num_types. The actual ACL 
  44817.           manager types are returned as entries in the manager_types array. 
  44818.  
  44819.           If the returned size is greater than the specified size_avail, invoke 
  44820.           the routine again, with a buffer large enough to hold the returned 
  44821.           information. 
  44822.  
  44823.           Note that if num_types is greater than 1, it means that the object is 
  44824.           polymorphic and supports ACL manager types for each of its forms. 
  44825.  
  44826.           This routine is provided in source code form. 
  44827.  
  44828.  File 
  44829.  
  44830.           \include\dce\daclmgr.idl The idl file that dce\daclmgrf.h was derived 
  44831.                          from. 
  44832.  
  44833.  Related Information 
  44834.  
  44835.           routines: 
  44836.           sec_acl_mgr_configure 
  44837.           sec_acl_mgr_get_access 
  44838.           sec_acl_mgr_is_authorized 
  44839.  
  44840.  
  44841. ΓòÉΓòÉΓòÉ 8.1.18. sec_acl_mgr_get_printstring ΓòÉΓòÉΓòÉ
  44842.  
  44843.  Purpose 
  44844.  
  44845.           Returns printable ACL strings. 
  44846.  
  44847.  Library 
  44848.  
  44849.           None; provided with the acl_mgr example program. 
  44850.  
  44851.  Format 
  44852.  
  44853.                     #include <dce/daclmgr.h>
  44854.  
  44855.                     void sec_acl_mgr_get_printstring(
  44856.                       sec_acl_mgr_handle_t  sec_acl_mgr,
  44857.                       uuid_t  *manager_type,
  44858.                       unsigned32  size_avail,
  44859.                       uuid_t  *manager_type_chain,
  44860.                       sec_acl_printstring_t  *manager_info,
  44861.                       boolean32  *tokenize,
  44862.                       unsigned32  *total_num_printstrings,
  44863.                       unsigned32  *size_used,
  44864.                       sec_acl_printstring_t  printstrings[],
  44865.                       error_status_t  *status);
  44866.  
  44867.  Parameters 
  44868.  
  44869.           Input 
  44870.  
  44871.           sec_acl_mgr   A pointer to a handle for an ACL manager and the 
  44872.                         storage configuration chosen with sec_acl_configure. 
  44873.                         Having a distinct handle for the combination of ACL 
  44874.                         manager and configuration allows the application to use 
  44875.                         different storage strategies for different types of 
  44876.                         objects. 
  44877.  
  44878.           manager_type  The ACL manager type. 
  44879.  
  44880.           size_avail    An unsigned 32-bit integer containing the allocated 
  44881.                         length of the printstrings array. 
  44882.  
  44883.           Output 
  44884.  
  44885.           manager_type_chain If the target object ACL contains more than 32 
  44886.                         permission bits, multiple manager types are used, one 
  44887.                         for each 32-bit wide slice of permissions. The UUID 
  44888.                         returned in manager_type_chain refers to the next ACL 
  44889.                         manager in the chain.  If there are no more ACL 
  44890.                         managers for this ACL, uuid_nil is returned. 
  44891.  
  44892.           manager_info  A print string providing a name and help string for the 
  44893.                         given ACL manager. 
  44894.  
  44895.           tokenize      When FALSE this parameter indicates that the returned 
  44896.                         permission print strings are unambiguous and therefore 
  44897.                         may be concatenated when printed without confusion. 
  44898.                         When TRUE, however, this property does not hold, and 
  44899.                         the strings need to be separated when printed or 
  44900.                         passed. 
  44901.  
  44902.           total_num_printstrings An output pointer to an unsigned 32-bit 
  44903.                         integer indicating the total number of print strings 
  44904.                         supported by this ACL manager.  If size_avail is 
  44905.                         smaller than total_num_printstrings, multiple calls to 
  44906.                         sec_acl_mgr_get_printstring are necessary to retrieve 
  44907.                         all the supported print strings. 
  44908.  
  44909.           size_used     An unsigned 32-bit integer containing the number of 
  44910.                         permission entries returned in the printstrings array. 
  44911.  
  44912.           printstrings  An array of permission print strings of type 
  44913.                         sec_acl_printstring_t. Each entry of the array is a 
  44914.                         structure containing three components: 
  44915.  
  44916.                              printstring   A character string of maximum length 
  44917.                                            sec_acl_printstring_len describing 
  44918.                                            the printable representation of a 
  44919.                                            specified permission. 
  44920.  
  44921.                              helpstring    A character string of maximum length 
  44922.                                            sec_acl_printstring_help_len 
  44923.                                            containing some text that can be 
  44924.                                            used to describe the specified 
  44925.                                            permission. 
  44926.  
  44927.                              permissions   A sec_acl_permset_t permission set 
  44928.                                            describing the permissions that are 
  44929.                                            represented with the companion print 
  44930.                                            string. The array consists of one 
  44931.                         such entry for each permission supported by the target 
  44932.                         ACL manager. 
  44933.  
  44934.           status        A pointer to the completion status.  On successful 
  44935.                         completion, the routine returns error_status_ok. 
  44936.  
  44937.  Usage 
  44938.  
  44939.           The sec_acl_mgr_get_printstring routine returns an array of printable 
  44940.           representations (print strings) for each permission bit or 
  44941.           combination of permission bits the ACL manager will support. 
  44942.  
  44943.           In addition to returning the print strings, this routine also returns 
  44944.           instructions about how to print the strings.  When the tokenize 
  44945.           parameter is set to FALSE, a print string might be r or w, which 
  44946.           could be concatenated in the display as rw without any confusion. 
  44947.           However, when the tokenize parameter is TRUE, it implies the print 
  44948.           strings might be of a form like read or write, which must be 
  44949.           displayed separated by spaces or colons or some other separator. 
  44950.  
  44951.           In any list of permission print strings, there may appear to be some 
  44952.           redundancy.  ACL managers often define aliases for common permission 
  44953.           combinations.  By convention, however, simple entries should appear 
  44954.           at the beginning of the printstrings array, and combinations should 
  44955.           appear at the end. 
  44956.  
  44957.  Notes 
  44958.  
  44959.           This routine is not intended to be used by application programs.  The 
  44960.           sec_acl Application Programming Interface (API) provides all the 
  44961.           functions necessary to use the ACL facility.  This reference page is 
  44962.           provided for programmers who wish to write an ACL manager.  In order 
  44963.           to write an ACL manager, a programmer must implement the entire rdacl 
  44964.           interface.  The sec_acl_mgr reference pages are provided as an 
  44965.           example of a successful implementation. 
  44966.  
  44967.  File 
  44968.  
  44969.           \include\dce\daclmgr.idl The idl file that dce\daclmgrf.h was derived 
  44970.                          from. 
  44971.  
  44972.  Related Information 
  44973.  
  44974.           Routines: 
  44975.  
  44976.  
  44977.           sec_acl_mgr_configure 
  44978.  
  44979.  
  44980. ΓòÉΓòÉΓòÉ 8.1.19. sec_acl_mgr_is_authorized ΓòÉΓòÉΓòÉ
  44981.  
  44982.  Purpose 
  44983.  
  44984.           Compares a privilege attribute certificate with an ACL. 
  44985.  
  44986.  Library 
  44987.  
  44988.           None; provided with the acl_mgr example program. 
  44989.  
  44990.  Format 
  44991.  
  44992.                     #include <dce/daclmgr.h>
  44993.  
  44994.                     boolean32 sec_acl_mgr_is_authorized(
  44995.                               sec_acl_mgr_handle_t  sec_acl_mgr,
  44996.                               sec_acl_permset_t  desired_access,
  44997.                               rpc_authz_cred_handle_t  *accessor_info,
  44998.                               sec_id_pac_t  *pac,
  44999.                               sec_acl_key_t  sec_acl_key,
  45000.                               uuid_t  *manager_type,
  45001.                               sec_id_t  *user_obj,
  45002.                               sec_id_t  *group_obj,
  45003.                               error_status_t  *status);
  45004.  
  45005.  Parameters 
  45006.  
  45007.           Input 
  45008.  
  45009.           sec_acl_mgr   A pointer to a handle for an ACL manager and the 
  45010.                         storage configuration chosen with sec_acl_configure. 
  45011.                         Having a distinct handle for the combination of ACL 
  45012.                         manager and configuration allows the application to use 
  45013.                         different storage strategies for different types of 
  45014.                         objects. 
  45015.  
  45016.           desired_access A permission set in sec_acl_permset_t form containing 
  45017.                         the desired privileges. This is a 32-bit set of 
  45018.                         permission flags. The flags can represent the 
  45019.                         conventional file system permissions (read, write, 
  45020.                         execute), the extended file system permissions (insert, 
  45021.                         delete), or some other permissions supported only by 
  45022.                         the specific ACL manager. For example, a bit that is 
  45023.                         unused for file system permissions may mean withdrawals 
  45024.                         are allowed for a bank ACL manager, while it may mean 
  45025.                         rebooting is allowed for a CPU ACL manager. 
  45026.  
  45027.           accessor_info The accessor_info parameter refers to the privilege 
  45028.                         attribute certificate (PAC) of the calling process. The 
  45029.                         PAC contains the identity and group membership of the 
  45030.                         calling process, which can then be compared with 
  45031.                         entries in the ACL to determine whether it is 
  45032.                         authorized to have indicated desired privileges. Use 
  45033.                         rpc_binding_inq_auth_client to acquire a certificate 
  45034.                         for the calling process. 
  45035.  
  45036.           sec_acl_key   A pointer indicating the object whose ACL is in 
  45037.                         question. The type of the pointer is dependent on the 
  45038.                         ACL manager involved. For file system ACLs, it points 
  45039.                         to a uuid_t parameter, containing the UUID and name of 
  45040.                         the file system object. 
  45041.  
  45042.           manager_type  The ACL manager type. 
  45043.  
  45044.           user_obj      Contains the identity of the caller. This is to be used 
  45045.                         when the ACL manager encounters a USER_OBJ field in an 
  45046.                         ACL. The identity used is generally the person field of 
  45047.                         the caller account. This parameter may be NULL, 
  45048.                         although this produces an error and denial of access to 
  45049.                         the object if the ACL contains a USER_OBJ entry. 
  45050.  
  45051.           group_obj     Identical in use to the user_obj parameter, except this 
  45052.                         refers to the group of the caller account and any 
  45053.                         potential GROUP_OBJ entry in the target object's ACL. 
  45054.  
  45055.           Output 
  45056.  
  45057.           status        A pointer to the completion status.  On successful 
  45058.                         completion, the routine returns error_status_ok. 
  45059.  
  45060.  Usage 
  45061.  
  45062.           The sec_acl_mgr_is_authorized routine interprets an ACL, compares it 
  45063.           to a privilege attribute certificate (called a PAC and referred to in 
  45064.           the accessor_info parameter) for a process, and declares whether that 
  45065.           process is permitted to have the access implied by the privileges in 
  45066.           desired_access. This is the basic function of an ACL manager. 
  45067.           Applications that provide controlled access to objects must acquire a 
  45068.           PAC and submit that certificate to the ACL manager through this 
  45069.           function. 
  45070.  
  45071.           The actual ACL to be compared against the input PAC is not passed 
  45072.           directly to this routine, but is referred to by the sec_acl_key and 
  45073.           the manager_type parameters. 
  45074.  
  45075.  Notes 
  45076.  
  45077.           This routine is not intended to be used by application programs.  The 
  45078.           sec_acl Application Programming Interface (API) provides all the 
  45079.           functions necessary to use the ACL facility.  This reference page is 
  45080.           provided for programmers who wish to write an ACL manager.  In order 
  45081.           to write an ACL manager, a programmer must implement the entire rdacl 
  45082.           interface.  The sec_acl_mgr reference pages are provided as an 
  45083.           example of a successful implementation. 
  45084.  
  45085.  Return Codes 
  45086.  
  45087.           The routine returns TRUE if the caller process is authorized to 
  45088.           perform the operations implied by the privileges specified in 
  45089.           desired_permset. 
  45090.  
  45091.  Examples 
  45092.  
  45093.           Following is an example of the common usage of the ACL manager 
  45094.           routines. The application uses rpc_binding_inq_auth_client to acquire 
  45095.           a PAC and sec_acl_mgr_configure to acquire the ACL manager handle. 
  45096.  
  45097.                     application_op(handle_t h, ...{
  45098.                      ...
  45099.                       sec_acl_mgr_configure(<configuration info>,
  45100.                                       <name of acl file system object>,
  45101.                                       &sec_acl_mgr_handle, &status);
  45102.                      ...
  45103.                       rpc_binding_inq_auth_client(h, PAC, &server_name,
  45104.                                         &lvl, &authn_svc, &authz_svc, &status);
  45105.                       rpc_binding_inq_object(h, &object, &status);
  45106.                       if (sec_acl_mgr_is_authorized(acl_mgr_handle,
  45107.                                              <needed permissions>,
  45108.                                              PAC, (sec_acl_key_t) &object,
  45109.                                              sec_acl_type_object, NULL, NULL, &status)) {
  45110.                           /* Application code to perform operation */
  45111.                       } else {
  45112.                           /* Caller is not authorized to have the desired permissions over
  45113.                            * the indicated object.  Act accordingly...
  45114.                            */
  45115.                            ...
  45116.                       }
  45117.                     }
  45118.  
  45119.  Related Information 
  45120.  
  45121.           Routines: 
  45122.           sec_acl_mgr_configure 
  45123.           sec_acl_mgr_get_access 
  45124.  
  45125.           Files: 
  45126.           \include\dce\daclmgr.idl - The idl file from which dce\daclmgrf.h was 
  45127.           derived. 
  45128.  
  45129.  
  45130. ΓòÉΓòÉΓòÉ 8.1.20. sec_acl_mgr_lookup ΓòÉΓòÉΓòÉ
  45131.  
  45132.  Purpose 
  45133.  
  45134.           Finds an ACL using its key. 
  45135.  
  45136.  Library 
  45137.  
  45138.           None; provided with the acl_mgr example program. 
  45139.  
  45140.  Format 
  45141.  
  45142.                     #include <dce/daclmgr.h>
  45143.  
  45144.                     void sec_acl_mgr_lookup(
  45145.                       sec_acl_mgr_handle_t  sec_acl_mgr,
  45146.                       sec_acl_key_t  sec_acl_key,
  45147.                       uuid_t  *manager_type,
  45148.                       sec_acl_type_t  sec_acl_type,
  45149.                       sec_acl_list_t  **sec_acl_list,
  45150.                       error_status_t  *status);
  45151.  
  45152.  Parameters 
  45153.  
  45154.           Input 
  45155.  
  45156.           sec_acl_mgr   A pointer to a handle for an ACL manager and the 
  45157.                         storage configuration chosen with 
  45158.                         sec_acl_mgr_configure. Having a distinct handle for the 
  45159.                         combination of ACL manager and configuration allows the 
  45160.                         application to use different storage strategies for 
  45161.                         different types of objects. 
  45162.  
  45163.           sec_acl_key   A pointer indicating the object whose ACL is in 
  45164.                         question. The type of the pointer is dependent on the 
  45165.                         ACL manager involved. For file system ACLs, it points 
  45166.                         to a uuid_t parameter, containing the UUID and name of 
  45167.                         the file system object. 
  45168.  
  45169.           manager_type  The ACL manager type. 
  45170.  
  45171.           sec_acl_type  The ACL type.  It is generally sec_acl_type_object. The 
  45172.                         sec_acl_type_t data type distinguishes between the 
  45173.                         various types of ACLs an object can possess for a given 
  45174.                         manager.  In the file system, for example, most objects 
  45175.                         have only one ACL controlling the access to that 
  45176.                         object, but objects that control the creation of other 
  45177.                         objects (sometimes referred to as containers) may have 
  45178.                         more. A directory, for example, can have ACLs to be 
  45179.                         used as initial values when member objects are created. 
  45180.  
  45181.                         Do not confuse ACL types with the permissions 
  45182.                         corresponding to different ACL manager types or with 
  45183.                         the ACL manager types themselves. 
  45184.  
  45185.           Output 
  45186.  
  45187.           sec_acl_list  A pointer to the sec_acl_list_t structure to receive 
  45188.                         the complete access control list.  An ACL contains a 
  45189.                         list of ACL entries, the UUID of the default cell where 
  45190.                         authentication takes place (foreign entries in the ACL 
  45191.                         contain the name of their parent cell), and the UUID of 
  45192.                         the ACL manager to interpret the list. 
  45193.  
  45194.           status        A pointer to the completion status.  On successful 
  45195.                         completion, the routine returns error_status_ok. 
  45196.                         Otherwise, it returns sec_acl_cant_allocate_memory, 
  45197.                         which indicates that the requested operation requires 
  45198.                         more memory than is available. 
  45199.  
  45200.  Usage 
  45201.  
  45202.           The sec_acl_mgr_lookup routine loads into memory a copy of the ACL 
  45203.           corresponding to the sec_acl_key. The routine returns a pointer to 
  45204.           the ACL.  This routine is only used by ACL editors and browsers; an 
  45205.           application uses sec_acl_mgr_get_access or sec_acl_mgr_is_authorized 
  45206.           to process the contents of an ACL. 
  45207.  
  45208.  Notes 
  45209.  
  45210.           This routine is not intended to be used by application programs.  The 
  45211.           sec_acl Application Programming Interface (API) provides all the 
  45212.           functions necessary to use the ACL facility.  This reference page is 
  45213.           provided for programmers who want to write an ACL manager.  In order 
  45214.           to write an ACL manager, a programmer must implement the entire rdacl 
  45215.           interface.  The sec_acl_mgr reference pages are provided as an 
  45216.           example of a successful implementation. 
  45217.  
  45218.  File 
  45219.  
  45220.           \include\dce\daclmgr.idl The idl file that dce\daclmgrf.h was derived 
  45221.                          from. 
  45222.  
  45223.  Related Information 
  45224.  
  45225.           Routines: 
  45226.  
  45227.  
  45228.           sec_acl_mgr_configure 
  45229.           sec_acl_mgr_get_access 
  45230.           sec_acl_mgr_is_authorized 
  45231.  
  45232.  
  45233. ΓòÉΓòÉΓòÉ 8.1.21. sec_acl_mgr_replace ΓòÉΓòÉΓòÉ
  45234.  
  45235.  Purpose 
  45236.  
  45237.           Replaces an ACL. 
  45238.  
  45239.  Library 
  45240.  
  45241.           None; provided with the acl_mgr example program. 
  45242.  
  45243.  Format 
  45244.  
  45245.                     #include <dce/daclmgr.h>
  45246.  
  45247.                     void sec_acl_mgr_replace(
  45248.                       sec_acl_mgr_handle_t  sec_acl_mgr,
  45249.                       sec_acl_key_t  sec_acl_key,
  45250.                       uuid_t  *manager_type,
  45251.                       sec_acl_type_t  sec_acl_type,
  45252.                       sec_acl_list_t  *sec_acl_list,
  45253.                       error_status_t  *status);
  45254.  
  45255.  Parameters 
  45256.  
  45257.           Input 
  45258.  
  45259.           sec_acl_mgr   A pointer to a handle for an ACL manager and the 
  45260.                         storage configuration chosen with 
  45261.                         sec_acl_mgr_configure. Having a distinct handle for the 
  45262.                         combination of ACL manager and configuration allows the 
  45263.                         application to use different storage strategies for 
  45264.                         different types of objects. 
  45265.  
  45266.           sec_acl_key   A pointer indicating the object whose ACL is in 
  45267.                         question. The type of the pointer depends on the ACL 
  45268.                         manager involved. For file system ACLs, it points to a 
  45269.                         uuid_t parameter, containing the UUID and name of the 
  45270.                         file system object. 
  45271.  
  45272.           manager_type  A pointer indicating the ACL manager type. 
  45273.  
  45274.           sec_acl_type  The ACL type.  It is generally sec_acl_type_object. The 
  45275.                         sec_acl_type_t data type distinguishes between the 
  45276.                         various types of ACLs an object can possess for a given 
  45277.                         manager. In the file system, for example, most objects 
  45278.                         will have only one ACL controlling the access to that 
  45279.                         object, but objects that control the creation of other 
  45280.                         objects (sometimes referred to as containers) may have 
  45281.                         more. A directory, for example, can have ACLs to be 
  45282.                         used as initial values when member objects are created. 
  45283.  
  45284.                         Do not confuse ACL types with the permissions 
  45285.                         corresponding to different ACL manager types or with 
  45286.                         the ACL manager types themselves. 
  45287.  
  45288.           sec_acl_list  The new ACL to use for the target object.  This is 
  45289.                         represented by a pointer to the sec_acl_list_t 
  45290.                         structure containing the complete access control list. 
  45291.                         An ACL contains a list of ACL entries, the UUID of the 
  45292.                         default cell where authentication will take place 
  45293.                         (foreign entries in the ACL contain the name of their 
  45294.                         parent cell), and the UUID of the ACL manager to 
  45295.                         interpret the list. 
  45296.  
  45297.           Output 
  45298.  
  45299.           status        A pointer to the completion status.  On successful 
  45300.                         completion, the routine returns error_status_ok. 
  45301.                         Otherwise, it returns sec_acl_cant_allocate_memory, 
  45302.                         which indicates that the requested operation requires 
  45303.                         more memory than is available. 
  45304.  
  45305.  Usage 
  45306.  
  45307.           The sec_acl_mgr_replace routine replaces the ACL indicated by the 
  45308.           input handle with the information in the sec_acl_list parameter. This 
  45309.           package treats ACLs as immutable, and in order to modify them an 
  45310.           editing application must read an entire ACL (using 
  45311.           sec_acl_mgr_lookup), modify it as needed, and replace it using this 
  45312.           routine. 
  45313.  
  45314.  Cautions 
  45315.  
  45316.           There is no authorization checking performed on this operation; it is 
  45317.           strictly local.  The application needs to call 
  45318.           sec_acl_mgr_is_authorized with desired_permset set to something 
  45319.           indicating permission to set the ACL before actually attempting the 
  45320.           replace. 
  45321.  
  45322.  Notes 
  45323.  
  45324.           The data type that stores an ACL has a limited size. Attempting to 
  45325.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  45326.  
  45327.           This routine is not intended to be used by application programs.  The 
  45328.           sec_acl Application Programming Interface (API) provides all the 
  45329.           functions necessary to use the ACL facility.  This reference page is 
  45330.           provided for programmers who wish to write an ACL manager.  In order 
  45331.           to write an ACL manager, a programmer must implement the entire rdacl 
  45332.           interface.  The sec_acl_mgr reference pages are provided as an 
  45333.           example of a successful implementation. 
  45334.  
  45335.  File 
  45336.  
  45337.           \include\dce\daclmgr.idl The idl file that dce\daclmgrf.h was derived 
  45338.                          from. 
  45339.  
  45340.  Related Information 
  45341.  
  45342.           Routines: 
  45343.  
  45344.  
  45345.           sec_acl_mgr_configure 
  45346.           sec_acl_mgr_is_authorized 
  45347.           sec_acl_mgr_lookup 
  45348.  
  45349.  
  45350. ΓòÉΓòÉΓòÉ 8.1.22. sec_acl_release ΓòÉΓòÉΓòÉ
  45351.  
  45352.  Purpose 
  45353.  
  45354.           Releases ACL storage. 
  45355.  
  45356.  Library 
  45357.  
  45358.           \lib\dceos2.lib 
  45359.  
  45360.  Format 
  45361.  
  45362.                     #include <dce/daclif.h>
  45363.  
  45364.                     void sec_acl_release(
  45365.                       sec_acl_handle_t  h,
  45366.                       sec_acl_t  *sec_acl,
  45367.                       error_status_t  *status);
  45368.  
  45369.  Parameters 
  45370.  
  45371.           Input 
  45372.  
  45373.           h             A handle referring to the target object. Use 
  45374.                         sec_acl_bind to create this handle. 
  45375.  
  45376.           sec_acl       A pointer to the complete ACL associated with the 
  45377.                         target object. 
  45378.  
  45379.           Output 
  45380.  
  45381.           status        A pointer to the completion status.  On successful 
  45382.                         completion, the routine returns error_status_ok. 
  45383.                         Otherwise, it returns an error. 
  45384.  
  45385.  Usage 
  45386.  
  45387.           The sec_acl_release routine releases any local storage associated 
  45388.           with the ACL object, returning it to the pool.  This is strictly a 
  45389.           local operation (since the storage in question is local), and has no 
  45390.           effect on the remote object or its ACL.  The ACL handle is in the 
  45391.           argument list only for consistency with other sec_acl_xxx routines. 
  45392.  
  45393.  File 
  45394.  
  45395.           \include\dce\daclmgr.idl The idl file that dce\daclmgrf.h was derived 
  45396.                          from. 
  45397.  
  45398.  Related Information 
  45399.  
  45400.           Routines: 
  45401.  
  45402.  
  45403.           sec_acl_bind 
  45404.           sec_acl_lookup 
  45405.  
  45406.  
  45407. ΓòÉΓòÉΓòÉ 8.1.23. sec_acl_release_handle ΓòÉΓòÉΓòÉ
  45408.  
  45409.  Purpose 
  45410.  
  45411.           Removes an ACL handle. 
  45412.  
  45413.  Library 
  45414.  
  45415.           \lib\dceos2.lib 
  45416.  
  45417.  Format 
  45418.  
  45419.                     #include <dce/daclif.h>
  45420.  
  45421.                     void sec_acl_release_handle(
  45422.                       sec_acl_handle_t  *h,
  45423.                       error_status_t  *status);
  45424.  
  45425.  Parameters 
  45426.  
  45427.           Input 
  45428.  
  45429.           h             The handle to be removed.  The handle is bound to the 
  45430.                         object to which the ACL belongs with the sec_acl_bind 
  45431.                         routine. 
  45432.  
  45433.           Output 
  45434.  
  45435.           status        A pointer to the completion status.  On successful 
  45436.                         completion, the routine returns error_status_ok. 
  45437.                         Otherwise, it returns an error. 
  45438.  
  45439.  Usage 
  45440.  
  45441.           The sec_acl_release_handle routine removes the specified handle. 
  45442.           This is strictly a local operation, and has no effect on the remote 
  45443.           object or its ACL. 
  45444.  
  45445.  File 
  45446.  
  45447.           \include\dce\daclmgr.idl The idl file that dce\daclmgrf.h was derived 
  45448.                          from. 
  45449.  
  45450.  Related Information 
  45451.  
  45452.           Routines: 
  45453.  
  45454.  
  45455.           sec_acl_bind 
  45456.  
  45457.  
  45458. ΓòÉΓòÉΓòÉ 8.1.24. sec_acl_replace ΓòÉΓòÉΓòÉ
  45459.  
  45460.  Purpose 
  45461.  
  45462.           Replaces an ACL. 
  45463.  
  45464.  Library 
  45465.  
  45466.           \lib\dceos2.lib 
  45467.  
  45468.  Format 
  45469.  
  45470.                     #include <dce/daclif.h>
  45471.  
  45472.                     void sec_acl_replace(
  45473.                       sec_acl_handle_t  h,
  45474.                       uuid_t  *manager_type,
  45475.                       sec_acl_type_t  sec_acl_type,
  45476.                       sec_acl_list_t  *sec_acl_list,
  45477.                       error_status_t  *status);
  45478.  
  45479.  Parameters 
  45480.  
  45481.           Input 
  45482.  
  45483.           h             A handle referring to the target object. Use 
  45484.                         sec_acl_bind to create this handle. 
  45485.  
  45486.           manager_type  A pointer to the UUID identifying the type of the ACL 
  45487.                         manager in question.  There may be more than one type 
  45488.                         of ACL manager protecting the object whose ACL is bound 
  45489.                         to the input handle.  Use this parameter to distinguish 
  45490.                         them.  Use sec_acl_get_manager_types to acquire a list 
  45491.                         of the manager types protecting a given object. 
  45492.  
  45493.           sec_acl_type  The ACL type.  The sec_acl_type_t data type 
  45494.                         distinguishes the various types of ACLs an object can 
  45495.                         possess for a given manager type.  The possible values 
  45496.                         are 
  45497.  
  45498.                           o  sec_acl_type_object 
  45499.                           o  sec_acl_type_default_object 
  45500.                           o  sec_acl_type_default_container 
  45501.  
  45502.           sec_acl_list  The new ACL to use for the target object.  This is 
  45503.                         represented by a pointer to the sec_acl_list_t 
  45504.                         structure containing the complete access control list. 
  45505.                         An ACL contains a list of ACL entries, the UUID of the 
  45506.                         default cell where authentication will take place 
  45507.                         (foreign entries in the ACL contain the name of their 
  45508.                         parent cell), and the UUID of the ACL manager to 
  45509.                         interpret the list. 
  45510.  
  45511.           Output 
  45512.  
  45513.           status        A pointer to the completion status.  On successful 
  45514.                         completion, the routine returns error_status_ok. 
  45515.                         Otherwise, it returns one of the following errors: 
  45516.  
  45517.                              sec_acl_cant_allocate_memory The requested 
  45518.                                            operation requires more memory than 
  45519.                                            is available. 
  45520.  
  45521.                              sec_acl_unknown_manager_type The manager type 
  45522.                                            selected is not an available option. 
  45523.  
  45524.  Usage 
  45525.  
  45526.           The sec_acl_replace routine replaces the ACL indicated by the input 
  45527.           handle with the information in the sec_acl_list parameter.  ACLs are 
  45528.           thought of as immutable, and in order to modify them, an editing 
  45529.           application must read an entire ACL (using sec_acl_lookup), modify it 
  45530.           as needed, and replace it using this routine. 
  45531.  
  45532.           The data type that stores an ACL has a limited size. Attempting to 
  45533.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  45534.  
  45535.  Permissions Required 
  45536.  
  45537.           The sec_acl_replace routine requires the c (control) permission on 
  45538.           the object for which the ACL is to be replaced. 
  45539.  
  45540.  File 
  45541.  
  45542.           \include\dce\daclif.idl The idl file that dce\daclif.h was derived 
  45543.                          from. 
  45544.  
  45545.  Related Information 
  45546.  
  45547.           Routines: 
  45548.  
  45549.  
  45550.           sec_acl_bind 
  45551.           sec_acl_get_manager_types 
  45552.           sec_acl_lookup 
  45553.  
  45554.  
  45555. ΓòÉΓòÉΓòÉ 8.1.25. sec_acl_test_access ΓòÉΓòÉΓòÉ
  45556.  
  45557.  Purpose 
  45558.  
  45559.           Tests access to an object. 
  45560.  
  45561.  Library 
  45562.  
  45563.           \lib\dceos2.lib 
  45564.  
  45565.  Format 
  45566.  
  45567.                     #include <dce/daclif.h>
  45568.  
  45569.                     boolean32 sec_acl_test_access(
  45570.                         sec_acl_handle_t  h,
  45571.                         uuid_t  *manager_type,
  45572.                         sec_acl_permset_t  desired_permset,
  45573.                         error_status_t  *status);
  45574.  
  45575.  Parameters 
  45576.  
  45577.           Input 
  45578.  
  45579.           h             A handle referring to the target object. Use 
  45580.                         sec_acl_bind to create this handle. 
  45581.  
  45582.           manager_type  A pointer to the UUID identifying the type of the ACL 
  45583.                         manager in question.  There may be more than one type 
  45584.                         of ACL manager protecting the object whose ACL is bound 
  45585.                         to the input handle.  Use this parameter to distinguish 
  45586.                         them.  Use sec_acl_get_manager_types to acquire a list 
  45587.                         of the manager types protecting a given object. 
  45588.  
  45589.           desired_permset A permission set in sec_acl_permset_t form containing 
  45590.                         the desired privileges.  This is a 32-bit set of 
  45591.                         permission flags supported by the manager type. 
  45592.  
  45593.           Output 
  45594.  
  45595.           status        A pointer to the completion status.  On successful 
  45596.                         completion, the routine returns error_status_ok. 
  45597.                         Otherwise, it returns the following error: 
  45598.  
  45599.                              sec_acl_unknown_manager_type The manager type 
  45600.                                                    selected is not an available 
  45601.                                                    option. 
  45602.  
  45603.  Usage 
  45604.  
  45605.           The sec_acl_test_access routine determines if the specified ACL 
  45606.           contains entries granting privileges to the calling process matching 
  45607.           those in desired_permset.  An application generally only inquires 
  45608.           after the minimum set of privileges needed to accomplish a specific 
  45609.           task. 
  45610.  
  45611.  Permissions Required 
  45612.  
  45613.           The sec_acl_test_access routine requires at least one permission of 
  45614.           any kind on the object for which the privileges are to be tested. 
  45615.  
  45616.  Return Codes 
  45617.  
  45618.           The routine returns TRUE if the calling application is authorized to 
  45619.           access the target object with the privileges in desired_permset. 
  45620.  
  45621.  File 
  45622.  
  45623.           \include\dce\daclif.idl The idl file that dce\daclif.h was derived 
  45624.                          from. 
  45625.  
  45626.  Related Information 
  45627.  
  45628.           Routines: 
  45629.  
  45630.  
  45631.           sec_acl_bind 
  45632.           sec_acl_get_manager_types 
  45633.           sec_acl_test_access_on_behalf 
  45634.  
  45635.  
  45636. ΓòÉΓòÉΓòÉ 8.1.26. sec_acl_test_access_on_behalf ΓòÉΓòÉΓòÉ
  45637.  
  45638.  Purpose 
  45639.  
  45640.           Tests access to an object on behalf of another process. 
  45641.  
  45642.  Library 
  45643.  
  45644.           \lib\dceos2.lib 
  45645.  
  45646.  Format 
  45647.  
  45648.                     #include <dce/daclif.h>
  45649.  
  45650.                     boolean32 sec_acl_test_access_on_behalf(
  45651.                         sec_acl_handle_t  h,
  45652.                         uuid_t  *manager_type,
  45653.                         sec_id_pac_t  *subject,
  45654.                         sec_acl_permset_t  desired_permset,
  45655.                         error_status_t  *status);
  45656.  
  45657.  Parameters 
  45658.  
  45659.           Input 
  45660.  
  45661.           h             A handle referring to the target object. Use 
  45662.                         sec_acl_bind to create this handle. 
  45663.  
  45664.           manager_type  A pointer to the UUID identifying the type of the ACL 
  45665.                         manager in question.  There may be more than one type 
  45666.                         of ACL manager protecting the object whose ACL is bound 
  45667.                         to the input handle.  Use this parameter to distinguish 
  45668.                         them.  Use sec_acl_get_manager_types to acquire a list 
  45669.                         of the manager types protecting a given object. 
  45670.  
  45671.           subject       A privilege attribute certificate (PAC) for the subject 
  45672.                         process. The PAC contains the name and UUID of the 
  45673.                         principal and cell of the subject process, as well as a 
  45674.                         list of any groups to which it belongs. The PAC also 
  45675.                         contains a flag (named authenticated).  When set, it 
  45676.                         indicates that the certificate was obtained from an 
  45677.                         authenticated source.  When not set, the certificate 
  45678.                         must not be trusted.  (The field is FALSE when it was 
  45679.                         obtained from the rpc_auth layer and the protect level 
  45680.                         was set to rpc_c_protect_level_none. This indicates 
  45681.                         that no authentication protocol was actually used in 
  45682.                         the remote procedure call; the identity was simply 
  45683.                         transmitted from the caller to the procedure being 
  45684.                         called. If an authentication protocol was used, then 
  45685.                         the flag is set to TRUE.) 
  45686.  
  45687.                         If a null PAC is passed, the subject is treated as an 
  45688.                         anonymous user, matching only the any_other and 
  45689.                         unauthenticated entries (if they exist) on the ACL. 
  45690.  
  45691.                         A server uses rpc_binding_inq_auth_client to acquire a 
  45692.                         certificate for the client process. 
  45693.  
  45694.           desired_permset A permission set in sec_acl_permset_t form containing 
  45695.                         the desired privileges. This is a 32-bit set of 
  45696.                         permission flags supported by the manager type. 
  45697.  
  45698.           Output 
  45699.  
  45700.           status        A pointer to the completion status.  On successful 
  45701.                         completion, the routine returns error_status_ok. 
  45702.                         Otherwise, it returns the following error: 
  45703.  
  45704.                              sec_acl_unknown_manager_type The manager type 
  45705.                                                    selected is not an available 
  45706.                                                    option. 
  45707.  
  45708.  Usage 
  45709.  
  45710.           The sec_acl_test_access_on_behalf routine determines if the specified 
  45711.           ACL contains entries that grant the privileges specified in 
  45712.           desired_permset to the subject process. An application generally 
  45713.           inquires about only the minimum set of privileges needed to 
  45714.           accomplish a specific task. 
  45715.  
  45716.  Permissions Required 
  45717.  
  45718.           The sec_acl_test_access_on_behalf routine requires at least one 
  45719.           permission of any kind on the object for which the privileges are to 
  45720.           be tested.  Both the calling process and the identified subject must 
  45721.           have permission on the object. 
  45722.  
  45723.  Return Codes 
  45724.  
  45725.           If the routine completes successfully (with a completion status of 
  45726.           error_status_ok), it returns a value of: 
  45727.  
  45728.             o  TRUE if the caller has any access (at least one permission of 
  45729.                any kind) and the subject has the desired_permset privileges. 
  45730.  
  45731.             o  FALSE if both the caller and the subject have any access, but 
  45732.                the subject does not have the desired_permset privileges. 
  45733.           If the routine does not complete successfully, it returns a bad 
  45734.           completion status code and a return value of FALSE. 
  45735.  
  45736.  File 
  45737.  
  45738.           \include\dce\daclif.idl The idl file that dce\daclif.h was derived 
  45739.                          from. 
  45740.  
  45741.  Related Information 
  45742.  
  45743.           Routines: 
  45744.  
  45745.  
  45746.           rpc_binding_inq_auth_client 
  45747.           sec_acl_bind 
  45748.           sec_acl_get_manager_types 
  45749.           sec_acl_test_access 
  45750.  
  45751.  
  45752. ΓòÉΓòÉΓòÉ 8.1.27. rdacl_get_access ΓòÉΓòÉΓòÉ
  45753.  
  45754.  Purpose 
  45755.  
  45756.           Reads a privilege attribute certificate. 
  45757.  
  45758.  Library 
  45759.  
  45760.           None.  This network interface is called on the client side by the 
  45761.           sec_acl local interface. Developers are responsible for implementing 
  45762.           the server side of this interface. Test server code is included as a 
  45763.           sample implementation in the acl_mgr example program. 
  45764.  
  45765.  Format 
  45766.  
  45767.                     #include <dce/rdaclif.h>
  45768.  
  45769.                     void rdacl_get_access(
  45770.                       handle_t  h,
  45771.                       sec_acl_component_name_t  component_name,
  45772.                       uuid_t  *manager_type,
  45773.                       sec_acl_permset_t  *net_rights,
  45774.                       error_status_t  *status);
  45775.  
  45776.  Parameters 
  45777.  
  45778.           Input 
  45779.  
  45780.           h             A handle referring to the object whose ACL is to be 
  45781.                         accessed. Use sec_acl_bind to create this handle. 
  45782.  
  45783.           component_name A character string containing the name of the target 
  45784.                         object. 
  45785.  
  45786.           manager_type  A pointer to the UUID identifying the type of the ACL 
  45787.                         manager in question.  There may be more than one type 
  45788.                         of ACL manager protecting the object whose ACL is bound 
  45789.                         to the input handle. Use this parameter to distinguish 
  45790.                         them.  Use sec_acl_get_manager_types to acquire a list 
  45791.                         of the manager types protecting a given object. 
  45792.  
  45793.           Output 
  45794.  
  45795.           net_rights    The output list of access rights, in sec_acl_permset_t 
  45796.                         form. This is a 32-bit set of permission flags 
  45797.                         supported by the manager type. 
  45798.  
  45799.           status        A pointer to the completion status.  On successful 
  45800.                         completion, the routine returns error_status_ok. 
  45801.                         Otherwise, it returns one of the following errors: 
  45802.  
  45803.                              sec_acl_invalid_manager_type The manager type is 
  45804.                                                  not valid. 
  45805.  
  45806.                              sec_acl_invalid_acl_type The ACL type is not 
  45807.                                                  valid. 
  45808.  
  45809.                              sec_acl_not_authorized The requested operation is 
  45810.                                                  not allowed. 
  45811.  
  45812.                              sec_acl_object_not_found The requested object 
  45813.                                                  could not be found. 
  45814.  
  45815.  Usage 
  45816.  
  45817.           The rdacl_get_access routine determines the complete extent of access 
  45818.           to the specified object by the calling process. Although the 
  45819.           rdacl_test_access routines are the preferred method of testing 
  45820.           access, this routine is useful for implementing operations like the 
  45821.           conventional UNIX access function. 
  45822.  
  45823.  Notes 
  45824.  
  45825.           This routine is not intended to be used by application programs.  The 
  45826.           sec_acl Application Programming Interface (API) provides all the 
  45827.           routines necessary to use the ACL facility.  This reference page is 
  45828.           provided for programmers who want to write an ACL manager.  To write 
  45829.           an ACL manager, a programmer must implement the entire rdacl 
  45830.           interface. 
  45831.  
  45832.           This network interface is called on the client side by sec_acl local 
  45833.           interface.  Developers are responsible for implementing the server 
  45834.           side of this interface.  Test server code is included as a sample 
  45835.           implementation. 
  45836.  
  45837.  File 
  45838.  
  45839.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  45840.                          from. 
  45841.  
  45842.  Related Information 
  45843.  
  45844.           Routines: 
  45845.  
  45846.  
  45847.           rdacl_test_access 
  45848.           sec_acl_get_manager_types 
  45849.  
  45850.  
  45851. ΓòÉΓòÉΓòÉ 8.1.28. rdacl_get_manager_types ΓòÉΓòÉΓòÉ
  45852.  
  45853.  Purpose 
  45854.  
  45855.           Lists the types of ACLs protecting an object. 
  45856.  
  45857.  Library 
  45858.  
  45859.           None.  This network interface is called on the client side by the 
  45860.           sec_acl local interface.  Developers are responsible for implementing 
  45861.           the server side of this interface. Test server code is included as a 
  45862.           sample implementation in the acl_mgr example program. 
  45863.  
  45864.  Format 
  45865.  
  45866.                     #include <dce/rdaclif.h>
  45867.  
  45868.                     void rdacl_get_manager_types(
  45869.                       handle_t  h ,
  45870.                       sec_acl_component_name_t  component_name,
  45871.                       sec_acl_type_t  sec_acl_type,
  45872.                       unsigned32  size_avail,
  45873.                       unsigned32  *size_used,
  45874.                       unsigned32  *num_types,
  45875.                       uuid_t  manager_types[],
  45876.                       error_status_t  *status);
  45877.  
  45878.  Parameters 
  45879.  
  45880.           Input 
  45881.  
  45882.           h             A handle referring to the target object. Use 
  45883.                         sec_acl_bind to create this handle. 
  45884.  
  45885.           component_name A character string containing the name of the target 
  45886.                         object. 
  45887.  
  45888.           sec_acl_type  The ACL type.  The sec_acl_type_t data type 
  45889.                         distinguishes the various types of ACLs an object can 
  45890.                         possess for a given manager type.  Possible values are 
  45891.  
  45892.                           o  sec_acl_type_object 
  45893.                           o  sec_acl_type_default_object 
  45894.                           o  sec_acl_type_default_container 
  45895.  
  45896.           size_avail    An unsigned 32-bit integer containing the allocated 
  45897.                         length of the manager_types array. 
  45898.  
  45899.           Output 
  45900.  
  45901.           size_used     An unsigned 32-bit integer containing the number of 
  45902.                         output entries returned in the manager_types array. 
  45903.  
  45904.           num_types     An unsigned 32-bit integer containing the number of 
  45905.                         types returned in the manager_types array.  This is 
  45906.                         always equal to size_used. 
  45907.  
  45908.           manager_types An array of length size_avail to contain UUIDs (of type 
  45909.                         uuid_t) identifying the different types of ACL managers 
  45910.                         protecting the target object. 
  45911.  
  45912.           status        A pointer to the completion status.  On successful 
  45913.                         completion, the routine returns error_status_ok. 
  45914.                         Otherwise, it returns an error. 
  45915.  
  45916.  Usage 
  45917.  
  45918.           The rdacl_get_manager_types routine returns a list of the types of 
  45919.           ACLs protecting an object.  For example, in addition to the regular 
  45920.           file system ACL, a file representing the stable storage of some 
  45921.           database could have an ACL manager that supported permissions 
  45922.           allowing database updates only on certain days of the week. 
  45923.  
  45924.           ACL editors and browsers can use this operation to determine the ACL 
  45925.           manager types that a particular reference monitor is using to protect 
  45926.           a selected entity. Using the rdacl_get_printstring routine, they can 
  45927.           determine how to format for display the permissions supported by a 
  45928.           specific manager. 
  45929.  
  45930.  Notes 
  45931.  
  45932.           This routine is not intended to be used by application programs.  The 
  45933.           sec_acl Application Programming Interface (API) provides all the 
  45934.           routines necessary to use the ACL facility.  This reference page is 
  45935.           provided for programmers who want to write an ACL manager.  To write 
  45936.           an ACL manager, a programmer must implement the entire rdacl 
  45937.           interface. 
  45938.  
  45939.           This network interface is called on the client side by the sec_acl 
  45940.           local interface.  Developers are responsible for implementing the 
  45941.           server side of this interface.  Test server code is included as a 
  45942.           sample implementation. 
  45943.  
  45944.  File 
  45945.  
  45946.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  45947.                          from. 
  45948.  
  45949.  Related Information 
  45950.  
  45951.           Routines: 
  45952.  
  45953.  
  45954.           rdacl_get_printstring 
  45955.  
  45956.  
  45957. ΓòÉΓòÉΓòÉ 8.1.29. rdacl_get_mgr_types_semantics ΓòÉΓòÉΓòÉ
  45958.  
  45959.  Purpose 
  45960.  
  45961.           Lists the ACL manager types protecting an object and the POSIX 
  45962.           semantics supported by each manager type. 
  45963.  
  45964.  Library 
  45965.  
  45966.           None. This network interface is called on the client side by the 
  45967.           sec_acl local interface. Developers are responsible for implementing 
  45968.           the server side of this interface. Test server code is included as a 
  45969.           sample implementation in the acl_mgr example program. 
  45970.  
  45971.  Format 
  45972.  
  45973.                     #include <dce/rdaclif.h>
  45974.  
  45975.                     void rdacl_get_mgr_types_semantics(
  45976.                       handle_t  h,
  45977.                       sec_acl_component_name_t  component_name,
  45978.                       sec_acl_type_t  sec_acl_type,
  45979.                       unsigned32  size_avail,
  45980.                       unsigned32  *size_used,
  45981.                       unsigned32  *num_types,
  45982.                       uuid_t  manager_types[],
  45983.                       sec_acl_posix_semantics_t  posix_semantics[]
  45984.                       error_status_t  *status);
  45985.  
  45986.  Parameters 
  45987.  
  45988.           Input 
  45989.  
  45990.           h             A handle referring to the target object. 
  45991.  
  45992.           component_name A character string containing the name of the target 
  45993.                         object. 
  45994.  
  45995.           sec_acl_type  The ACL type used to limit the routine's output to ACL 
  45996.                         managers that control the specified types of ACLs.  The 
  45997.                         possible values are as follows: 
  45998.  
  45999.                           o  sec_acl_type_object 
  46000.                           o  sec_acl_type_default_object 
  46001.                           o  sec_acl_type_default_container 
  46002.  
  46003.           size_avail    An unsigned 32-bit integer containing the allocated 
  46004.                         length of the manager_types and the posix_semantics 
  46005.                         arrays. 
  46006.  
  46007.           Output 
  46008.  
  46009.           size_used     An unsigned 32-bit integer containing the number of 
  46010.                         output entries returned in the manager_types array. 
  46011.  
  46012.           num_types     An unsigned 32-bit integer containing the number of 
  46013.                         types returned in the manager_types array.  This is 
  46014.                         always equal to size_used. 
  46015.  
  46016.           manager_types An array of length size_avail containing the returned 
  46017.                         UUIDs (of type uuid_t) identifying the different ACL 
  46018.                         manager types protecting the target object. 
  46019.  
  46020.           posix_semantics An array of length size_avail containing the POSIX 
  46021.                         semantics (of type sec_acl_posix_semantics_t that are 
  46022.                         supported by each returned ACL manager type. 
  46023.  
  46024.           status        A pointer to the completion status.  On successful 
  46025.                         completion, the routine returns error_status_ok. 
  46026.                         Otherwise, it returns an error. 
  46027.  
  46028.  Usage 
  46029.  
  46030.           The rdacl_get_mgr_types_semantics routine returns a list of the ACL 
  46031.           manager types protecting an object and a list of the POSIX semantics 
  46032.           supported by those ACL manager types. Access to an object can be 
  46033.           controlled by multiple ACL manager types. For example, access to a 
  46034.           file representing the stable storage of a database can be controlled 
  46035.           by two ACL manager types each with completely different sets of 
  46036.           permissions: one to provide standard file system access (read, write, 
  46037.           run, and so forth) and one to provide access that allows database 
  46038.           updates only on certain days of the week. 
  46039.  
  46040.           ACL editors and browsers can use this operation to determine the ACL 
  46041.           manager types that a particular reference monitor is using to protect 
  46042.           a selected entity. Using the rdacl_get_printstring routine, they can 
  46043.           determine how to format for display the permissions supported by a 
  46044.           specific manager. 
  46045.  
  46046.  Notes 
  46047.  
  46048.           This routine is not intended to be used by application programs. The 
  46049.           sec_acl Application Programming Interface (API) provides all the 
  46050.           routines necessary to use the ACL facility. This section is provided 
  46051.           for programmers who want to write an ACL manager. To write an ACL 
  46052.           manager, a programmer must implement the entire rdacl interface. 
  46053.  
  46054.           This network interface is called on the client side by the sec_acl 
  46055.           local interface. Developers are responsible for implementing the 
  46056.           server side of this interface. Test server code is included as a 
  46057.           sample implementation. 
  46058.  
  46059.  File 
  46060.  
  46061.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  46062.                          from. 
  46063.  
  46064.  Related Information 
  46065.  
  46066.           Routines: 
  46067.           rdacl_get_printstring 
  46068.  
  46069.  
  46070. ΓòÉΓòÉΓòÉ 8.1.30. rdacl_get_printstring ΓòÉΓòÉΓòÉ
  46071.  
  46072.  Purpose 
  46073.  
  46074.           Returns printable ACL strings. 
  46075.  
  46076.  Library 
  46077.  
  46078.           None.  This network interface is called on the client side by the 
  46079.           sec_acl local interface.  Developers are responsible for implementing 
  46080.           the server side of this interface. Test server code is included as a 
  46081.           sample implementation in the acl_mgr example program. 
  46082.  
  46083.  Format 
  46084.  
  46085.                     #include <dce/rdaclif.h>
  46086.  
  46087.                     void rdacl_get_printstring(
  46088.                       handle_t  h,
  46089.                       uuid_t  *manager_type,
  46090.                       unsigned32  size_avail,
  46091.                       uuid_t  *manager_type_chain,
  46092.                       sec_acl_printstring_t  *manager_info,
  46093.                       boolean32  *tokenize,
  46094.                       unsigned32  *total_num_printstrings,
  46095.                       unsigned32  *size_used,
  46096.                       sec_acl_printstring_t  printstrings[],
  46097.                       error_status_t  *status);
  46098.  
  46099.  Parameters 
  46100.  
  46101.           Input 
  46102.  
  46103.           h             A handle referring to the target object. Use 
  46104.                         sec_acl_bind to create this handle. 
  46105.  
  46106.           manager_type  A pointer to the UUID identifying the type of the ACL 
  46107.                         manager in question.  There can be more than one type 
  46108.                         of ACL manager protecting the object whose ACL is bound 
  46109.                         to the input handle.  Use this parameter to distinguish 
  46110.                         them.  Use rdacl_get_manager_types to acquire a list of 
  46111.                         the manager types protecting a given object. 
  46112.  
  46113.           size_avail    An unsigned 32-bit integer containing the allocated 
  46114.                         length of the printstrings array. 
  46115.  
  46116.           Output 
  46117.  
  46118.           manager_type_chain If the target object ACL contains more than 32 
  46119.                         permission bits, multiple manager types are used, one 
  46120.                         for each 32-bit-wide slice of permissions. The UUID 
  46121.                         returned in manager_type_chain refers to the next ACL 
  46122.                         manager in the chain.  If there are no more ACL 
  46123.                         managers for this ACL, uuid_nil is returned. 
  46124.  
  46125.           manager_info  Provides a name and help string for the given ACL 
  46126.                         manager. 
  46127.  
  46128.           tokenize      When FALSE, this parameter indicates that the returned 
  46129.                         permission print strings are unambiguous and therefore 
  46130.                         can be concatenated when printed without confusion. 
  46131.                         When TRUE, however, this property does not hold, and 
  46132.                         the strings need to be separated when printed or 
  46133.                         passed. 
  46134.  
  46135.           total_num_printstrings An unsigned 32-bit integer containing the 
  46136.                         total number of permission print strings supported by 
  46137.                         this ACL manager type. 
  46138.  
  46139.           size_used     An unsigned 32-bit integer containing the number of 
  46140.                         permission entries returned in the printstrings array. 
  46141.  
  46142.           printstrings  An array of permission print strings of type 
  46143.                         sec_acl_printstring_t. Each entry of the array is a 
  46144.                         structure containing three components: 
  46145.  
  46146.                              printstring     A character string of maximum 
  46147.                                              length sec_acl_printstring_len 
  46148.                                              containing the printable 
  46149.                                              representation of a specified 
  46150.                                              permission. 
  46151.  
  46152.                              helpstring      A character string of maximum 
  46153.                                              length 
  46154.                                              sec_acl_printstring_help_len 
  46155.                                              containing some text that can be 
  46156.                                              used to describe the specified 
  46157.                                              permission. 
  46158.  
  46159.                              permissions     A sec_acl_permset_t permission set 
  46160.                                              describing the permissions that 
  46161.                                              are be represented with the 
  46162.                                              companion print string. 
  46163.  
  46164.                                              The array consists of one entry 
  46165.                                              for each permission supported by 
  46166.                                              the ACL manager identified by 
  46167.                                              manager_type. 
  46168.  
  46169.           status        A pointer to the completion status.  On successful 
  46170.                         completion, the routine returns error_status_ok. 
  46171.                         Otherwise, it returns the following error: 
  46172.  
  46173.                              sec_acl_unknown_manager_type The manager type 
  46174.                                                    selected is not among those 
  46175.                                                    referenced by the input 
  46176.                                                    handle. 
  46177.  
  46178.  Usage 
  46179.  
  46180.           The rdacl_get_printstring routine returns an array of printable 
  46181.           representations (printstrings) for each permission bit or combination 
  46182.           of permission bits the specified ACL manager will support.  The ACL 
  46183.           manager type specified must be one of the types indicated by the ACL 
  46184.           handle. 
  46185.  
  46186.           In addition to returning the print strings, this routine also returns 
  46187.           instructions about how to print the strings.  When the tokenize 
  46188.           parameter is set to FALSE, a print string may be r or w, which could 
  46189.           be concatenated in the display as rw without any confusion.  However, 
  46190.           when the tokenize parameter is TRUE, it implies the print strings may 
  46191.           be of a form such as read or write, which must be displayed separated 
  46192.           by spaces, colons, or some other character. 
  46193.  
  46194.           In any list of permission print strings, there may seem to be some 
  46195.           redundancy.  ACL managers often define aliases for common permission 
  46196.           combinations.  By convention, however, simple entries are placed at 
  46197.           the beginning of the printstrings array, and combinations are placed 
  46198.           at the end. 
  46199.  
  46200.  Notes 
  46201.  
  46202.           This routine is not intended to be used by application programs.  The 
  46203.           sec_acl Application Programming Interface (API) provides all the 
  46204.           routines necessary to use the ACL facility.  This reference page is 
  46205.           provided for programmers who want to write an ACL manager. To write 
  46206.           an ACL manager, a programmer must implement the entire rdacl 
  46207.           interface. 
  46208.  
  46209.           This network interface is called on the client side by the sec_acl 
  46210.           local interface.  Developers are responsible for implementing the 
  46211.           server side of this interface.  Test server code is included as a 
  46212.           sample implementation. 
  46213.  
  46214.  File 
  46215.  
  46216.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  46217.                          from. 
  46218.  
  46219.  Related Information 
  46220.  
  46221.           Routines: 
  46222.  
  46223.  
  46224.           sec_acl_bind 
  46225.           rdacl_get_manager_types 
  46226.  
  46227.  
  46228. ΓòÉΓòÉΓòÉ 8.1.31. rdacl_get_referral ΓòÉΓòÉΓòÉ
  46229.  
  46230.  Purpose 
  46231.  
  46232.           Gets a referral to an ACL update site. 
  46233.  
  46234.  Library 
  46235.  
  46236.           None.  This network interface is called on the client side by the 
  46237.           sec_acl local interface. Developers are responsible for implementing 
  46238.           the server side of this interface. Test server code is included as a 
  46239.           sample implementation in the acl_mgr example program. 
  46240.  
  46241.  Format 
  46242.  
  46243.                     #include <dce/rdaclif.h>
  46244.  
  46245.                     void rdacl_get_referral(
  46246.                       handle_t  h,
  46247.                       sec_acl_component_name_t  component_name,
  46248.                       uuid_t  *manager_type,
  46249.                       sec_acl_type_t  sec_acl_type,
  46250.                       sec_acl_tower_set_t  *towers,
  46251.                       error_status_t  *status);
  46252.  
  46253.  Parameters 
  46254.  
  46255.           Input 
  46256.  
  46257.           h             A handle referring to the target object. Use 
  46258.                         sec_acl_bind to create this handle. 
  46259.  
  46260.           component_name A character string containing the name of the target 
  46261.                         object. 
  46262.  
  46263.           manager_type  A pointer to the UUID identifying the type of the ACL 
  46264.                         manager in question.  There may be more than one type 
  46265.                         of ACL manager protecting the object whose ACL is bound 
  46266.                         to the input handle.  Use this parameter to distinguish 
  46267.                         them.  Use sec_acl_get_manager_types to acquire a list 
  46268.                         of the manager types protecting a given object. 
  46269.  
  46270.           sec_acl_type  The ACL type. The sec_acl_type_t data type 
  46271.                         distinguishes the various types of ACLs an object can 
  46272.                         possess for a given manager type.  Possible values are: 
  46273.  
  46274.                           o  sec_acl_type_object 
  46275.                           o  sec_acl_type_default_object 
  46276.                           o  sec_acl_type_default_container. 
  46277.  
  46278.           Output 
  46279.  
  46280.           towers        A pointer to address information indicating an ACL 
  46281.                         update site. This information, obtained from the RPC 
  46282.                         runtime, is used by the client-side code to construct a 
  46283.                         new ACL binding handle indicating a site that will not 
  46284.                         return the sec_acl_site_readonly error. 
  46285.  
  46286.                         The sec_acl_tower_set_t structure contains an array of 
  46287.                         towers (called towers) and an unsigned 32-bit integer 
  46288.                         indicating the number of array elements (called count). 
  46289.                         This type enables the client to pass in an unallocated 
  46290.                         array of towers and have the server allocate the 
  46291.                         correct amount. 
  46292.  
  46293.           status        A pointer to the completion status.  On successful 
  46294.                         completion, the routine returns error_status_ok. 
  46295.                         Otherwise, it returns sec_acl_unknown_manager_type, 
  46296.                         which indicates that the manager type selected is not 
  46297.                         an available option. 
  46298.  
  46299.  Usage 
  46300.  
  46301.           The rdacl_get_referral routine obtains a referral to an ACL update 
  46302.           site.  This routine is used when the current ACL site yields a 
  46303.           sec_acl_site_readonly error.  Some replication managers require all 
  46304.           updates for a given object to be directed to a given replica.  If 
  46305.           clients of the generic ACL interface know they are dealing with an 
  46306.           object that is replicated in this way, this routine allows them to 
  46307.           recover from the problem and rebind to the proper update site.  The 
  46308.           DCE network registry, for example, is replicated this way. 
  46309.  
  46310.  Notes 
  46311.  
  46312.           This routine is not intended to be used by application programs.  The 
  46313.           sec_acl Application Programming Interface (API) provides all the 
  46314.           functions necessary to use the ACL facility.  This reference page is 
  46315.           provided for programmers who want to write an ACL manager. To write 
  46316.           an ACL manager, a programmer must implement the entire rdacl 
  46317.           interface. 
  46318.  
  46319.           This network interface is called on the client side by the sec_acl 
  46320.           local interface.  Developers are responsible for implementing the 
  46321.           server side of this interface.  Test server code is included as a 
  46322.           sample implementation. 
  46323.  
  46324.  File 
  46325.  
  46326.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  46327.                          from. 
  46328.  
  46329.  Related Information 
  46330.  
  46331.           Routines: 
  46332.  
  46333.  
  46334.           sec_acl_bind 
  46335.           sec_acl_get_manager_types 
  46336.  
  46337.  
  46338. ΓòÉΓòÉΓòÉ 8.1.32. rdacl_lookup ΓòÉΓòÉΓòÉ
  46339.  
  46340.  Purpose 
  46341.  
  46342.           Returns the ACL for an object. 
  46343.  
  46344.  Library 
  46345.  
  46346.           None.  This network interface is called on the client side by the 
  46347.           sec_acl local interface.  Developers are responsible for implementing 
  46348.           the server side of this interface. Test server code is included as a 
  46349.           sample implementation in the acl_mgr example program. 
  46350.  
  46351.  Format 
  46352.  
  46353.                     #include <dce/rdaclif.h>
  46354.  
  46355.                     void rdacl_lookup(
  46356.                       handle_t  h,
  46357.                       sec_acl_component_name_t  component_name,
  46358.                       uuid_t  *manager_type,
  46359.                       sec_acl_type_t  sec_acl_type,
  46360.                       sec_acl_result_t  *result);
  46361.  
  46362.  Parameters 
  46363.  
  46364.           Input 
  46365.  
  46366.           h             A handle referring to the target object. Use 
  46367.                         sec_acl_bind to create this handle. 
  46368.  
  46369.           component_name A character string containing the name of the target 
  46370.                         object. 
  46371.  
  46372.           manager_type  A pointer to the UUID identifying the type of the ACL 
  46373.                         manager in question.  There may be more than one type 
  46374.                         of ACL manager protecting the object whose ACL is bound 
  46375.                         to the input handle.  Use this parameter to distinguish 
  46376.                         them.  Use sec_acl_get_manager_types to acquire a list 
  46377.                         of the manager types protecting a given object. 
  46378.  
  46379.           sec_acl_type  The ACL type.  The sec_acl_type_t data type 
  46380.                         distinguishes the various types of ACLs an object can 
  46381.                         possess for a given manager type.  Possible values are: 
  46382.  
  46383.                           o  sec_acl_type_object 
  46384.                           o  sec_acl_type_default_object 
  46385.                           o  sec_acl_type_default_container 
  46386.  
  46387.           Output 
  46388.  
  46389.           result        A pointer to a tagged union of type sec_acl_result_t. 
  46390.                         The tag is the completion status, result.st. If 
  46391.                         result.st is equal to error_status_ok, the union 
  46392.                         contains an ACL. Otherwise, the completion status 
  46393.                         indicates an error, and the union is empty. 
  46394.  
  46395.                         If the routine returned successfully, the 
  46396.                         result.tagged_union.sec_acl_list_t structure contains a 
  46397.                         sec_acl_list_t. This data type is an array of pointers 
  46398.                         to sec_acl_ts that define ACLs. If the permission set 
  46399.                         of the returned ACL is 32 bits or smaller, 
  46400.                         sec_acl_list_t points to only one sec_acl_t. If the 
  46401.                         permission set of the returned ACL is larger than 32 
  46402.                         bits, multiple sec_acl_ts are used to hold them, and 
  46403.                         the sec_acl_list_t points to multiple sec_acl_ts. 
  46404.  
  46405.  Usage 
  46406.  
  46407.           The rdacl_lookup routine loads into memory a copy of an object's ACL 
  46408.           corresponding to the specified manager type.  The routine returns a 
  46409.           pointer to the ACL.  This routine is only used by ACL editors and 
  46410.           browsers; an application would use sec_acl_test_access or 
  46411.           sec_acl_test_access_on_behalf to process the contents of an ACL. 
  46412.  
  46413.  Notes 
  46414.  
  46415.           This routine is not intended to be used by application programs.  The 
  46416.           sec_acl Application Programming Interface (API) provides all the 
  46417.           functions necessary to use the ACL facility.  This reference page is 
  46418.           provided for programmers who want to write an ACL manager. To write 
  46419.           an ACL manager, a programmer must implement the entire rdacl 
  46420.           interface. 
  46421.  
  46422.           This network interface is called on the client side by the sec_acl 
  46423.           local interface.  Developers are responsible for implementing the 
  46424.           server side of this interface.  Test server code is included as a 
  46425.           sample implementation. 
  46426.  
  46427.  File 
  46428.  
  46429.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  46430.                          from. 
  46431.  
  46432.  Related Information 
  46433.  
  46434.           Routines: 
  46435.  
  46436.  
  46437.           sec_acl_bind 
  46438.           sec_acl_get_manager_types 
  46439.           sec_acl_test_access 
  46440.           sec_acl_test_access_on_behalf 
  46441.  
  46442.  
  46443. ΓòÉΓòÉΓòÉ 8.1.33. rdacl_replace ΓòÉΓòÉΓòÉ
  46444.  
  46445.  Purpose 
  46446.  
  46447.           Replaces an ACL. 
  46448.  
  46449.  Library 
  46450.  
  46451.           None.  This network interface is called on the client side by the 
  46452.           sec_acl local interface.  Developers are responsible for implementing 
  46453.           the server side of this interface. Test server code is included as a 
  46454.           sample implementation in the acl_mgr example program. 
  46455.  
  46456.  Format 
  46457.  
  46458.                     #include <dce/rdaclif.h>
  46459.  
  46460.                     void rdacl_replace(
  46461.                       handle_t  h,
  46462.                       sec_acl_component_name_t  component_name,
  46463.                       uuid_t  *manager_type,
  46464.                       sec_acl_type_t  sec_acl_type,
  46465.                       sec_acl_list_t  *sec_acl_list,
  46466.                       error_status_t  *status);
  46467.  
  46468.  Parameters 
  46469.  
  46470.           Input 
  46471.  
  46472.           h             A handle referring to the target object. Use 
  46473.                         sec_acl_bind to create this handle. 
  46474.  
  46475.           component_name A character string containing the name of the target 
  46476.                         object. 
  46477.  
  46478.           manager_type  A pointer to the UUID identifying the type of the ACL 
  46479.                         manager in question.  There can be more than one type 
  46480.                         of ACL manager protecting the object whose ACL is bound 
  46481.                         to the input handle.  Use this parameter to distinguish 
  46482.                         them.  Use sec_acl_get_manager_types to acquire a list 
  46483.                         of the manager types protecting a given object. 
  46484.  
  46485.           sec_acl_type  The ACL type.  The sec_acl_type_t data type 
  46486.                         distinguishes the various types of ACLs an object can 
  46487.                         possess for a given manager type.  Possible values are: 
  46488.  
  46489.                           o  sec_acl_type_object 
  46490.                           o  sec_acl_type_default_object 
  46491.                           o  sec_acl_type_default_container 
  46492.  
  46493.           sec_acl_list  The new ACL to use for the target object.  This is 
  46494.                         represented by a pointer to the sec_acl_list_t 
  46495.                         structure containing the complete access control list. 
  46496.                         An ACL contains a list of ACL entries, the UUID of the 
  46497.                         default cell where authentication takes place (foreign 
  46498.                         entries in the ACL contain the name of their parent 
  46499.                         cell), and the UUID of the ACL manager to interpret the 
  46500.                         list. 
  46501.  
  46502.           Output 
  46503.  
  46504.           status        A pointer to the completion status.  On successful 
  46505.                         completion, the routine returns error_status_ok. 
  46506.                         Otherwise, it returns sec_acl_unknown_manager_type, 
  46507.                         which indicates that the manager type selected is not 
  46508.                         an available option. 
  46509.  
  46510.  Usage 
  46511.  
  46512.           The rdacl_replace routine replaces the ACL indicated by the input 
  46513.           handle with the information in the sec_acl_list parameter. ACLs are 
  46514.           assumed to be immutable, but they can be modified if an editing 
  46515.           application reads an entire ACL (using sec_acl_lookup), modifies it 
  46516.           as needed, and replaces it using this routine. 
  46517.  
  46518.  Notes 
  46519.  
  46520.           The data type that stores an ACL has a limited size. Attempting to 
  46521.           add too many entries generates a sec_acl_cant_allocate_memory error. 
  46522.  
  46523.           This routine is not intended to be used by application programs. The 
  46524.           sec_acl Application Programming Interface (API) provides all the 
  46525.           functions necessary to use the ACL facility.  This reference page is 
  46526.           provided for programmers who want to write an ACL manager. To write 
  46527.           an ACL manager, a programmer must implement the entire rdacl 
  46528.           interface. 
  46529.  
  46530.           This network interface is called on the client side by the sec_acl 
  46531.           local interface.  Developers are responsible for implementing the 
  46532.           server side of this interface.  Test server code is included as a 
  46533.           sample implementation. 
  46534.  
  46535.  File 
  46536.  
  46537.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  46538.                          from. 
  46539.  
  46540.  Related Information 
  46541.  
  46542.           Routines: 
  46543.  
  46544.  
  46545.           sec_acl_bind 
  46546.           sec_acl_lookup 
  46547.  
  46548.  
  46549. ΓòÉΓòÉΓòÉ 8.1.34. rdacl_test_access ΓòÉΓòÉΓòÉ
  46550.  
  46551.  Purpose 
  46552.  
  46553.           Tests access to an object. 
  46554.  
  46555.  Library 
  46556.  
  46557.           None.  This network interface is called on the client side by the 
  46558.           sec_acl local interface.  Developers are responsible for implementing 
  46559.           the server side of this interface. Test server code is included as a 
  46560.           sample implementation in the acl_mgr example program. 
  46561.  
  46562.  Format 
  46563.  
  46564.                     #include <dce/rdaclif.h>
  46565.  
  46566.                     boolean32 rdacl_test_access(
  46567.                       handle_t  h,
  46568.                       sec_acl_component_name_t  component_name,
  46569.                       uuid_t  *manager_type,
  46570.                       sec_acl_permset_t  desired_permset,
  46571.                       error_status_t  *status);
  46572.  
  46573.  Parameters 
  46574.  
  46575.           Input 
  46576.  
  46577.           h             A handle referring to the target object. Use 
  46578.                         sec_acl_bind to create this handle. 
  46579.  
  46580.           component_name A character string containing the name of the target 
  46581.                         object. 
  46582.  
  46583.           manager_type  A pointer to the UUID identifying the type of the ACL 
  46584.                         manager in question.  There may be more than one type 
  46585.                         of ACL manager protecting the object whose ACL is bound 
  46586.                         to the input handle.  Use this parameter to distinguish 
  46587.                         them.  Use sec_acl_get_manager_types to acquire a list 
  46588.                         of the manager types protecting a given object. 
  46589.  
  46590.           desired_permset A permission set in sec_acl_permset_t form containing 
  46591.                         the desired privileges.  This is a 32-bit set of 
  46592.                         permission flags supported by the manager type. 
  46593.  
  46594.           Output 
  46595.  
  46596.           status        A pointer to the completion status.  On successful 
  46597.                         completion, the routine returns error_status_ok. 
  46598.                         Otherwise, it returns sec_acl_unknown_manager_type, 
  46599.                         which indicates that the manager type selected is not 
  46600.                         an available option. 
  46601.  
  46602.  Usage 
  46603.  
  46604.           The rdacl_test_access routine determines if the specified ACL 
  46605.           contains entries granting privileges to the calling process matching 
  46606.           those in desired_permset.  An application generally only inquires 
  46607.           after the minimum set of privileges needed to accomplish a specific 
  46608.           task. 
  46609.  
  46610.  Notes 
  46611.  
  46612.           This routine is not intended to be used by application programs.  The 
  46613.           sec_acl Application Programming Interface (API) provides all the 
  46614.           functions necessary to use the ACL facility.  This reference page is 
  46615.           provided for programmers who want to write an ACL manager. To write 
  46616.           an ACL manager, a programmer must implement the entire rdacl 
  46617.           interface. 
  46618.  
  46619.           This network interface is called on the client side by the sec_acl 
  46620.           local interface.  Developers are responsible for implementing the 
  46621.           server side of this interface.  Test server code is included as a 
  46622.           sample implementation. 
  46623.  
  46624.  File 
  46625.  
  46626.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  46627.                          from. 
  46628.  
  46629.  Related Information 
  46630.  
  46631.           Routines: 
  46632.  
  46633.  
  46634.           sec_acl_bind 
  46635.           sec_acl_get_manager_types 
  46636.           rdacl_test_access_on_behalf 
  46637.  
  46638.  
  46639. ΓòÉΓòÉΓòÉ 8.1.35. rdacl_test_access_on_behalf ΓòÉΓòÉΓòÉ
  46640.  
  46641.  Purpose 
  46642.  
  46643.           Tests access to an object on behalf of another process. 
  46644.  
  46645.  Library 
  46646.  
  46647.           None.  This network interface is called on the client side by the 
  46648.           sec_acl local interface.  Developers are responsible for implementing 
  46649.           the server side of this interface. Test server code is included as a 
  46650.           sample implementation in the acl_mgr example program. 
  46651.  
  46652.  Format 
  46653.  
  46654.                     #include <dce/rdaclif.h>
  46655.  
  46656.                     boolean rdacl_test_access_on_behalf(
  46657.                       handle_t  h,
  46658.                       sec_acl_component_name_t  component_name,
  46659.                       uuid_t  *manager_type,
  46660.                       sec_id_pac_t  *subject,
  46661.                       sec_acl_permset_t  desired_permset,
  46662.                       error_status_t  *status);
  46663.  
  46664.  Parameters 
  46665.  
  46666.           Input 
  46667.  
  46668.           h             A handle referring to the target object. Use 
  46669.                         sec_acl_bind to create this handle. 
  46670.  
  46671.           component_name A character string containing the name of the target 
  46672.                         object. 
  46673.  
  46674.           manager_type  A pointer to the UUID identifying the type of the ACL 
  46675.                         manager in question.  There may be more than one type 
  46676.                         of ACL manager protecting the object whose ACL is bound 
  46677.                         to the input handle.  Use this parameter to distinguish 
  46678.                         them.  Use sec_acl_get_manager_types to acquire a list 
  46679.                         of the manager types protecting a given object. 
  46680.  
  46681.           subject       A privilege attribute certificate (PAC) for the subject 
  46682.                         process.  The PAC contains the name and UUID of the 
  46683.                         principal and parent cell of the subject process, as 
  46684.                         well as a list of any groups to which it belongs.  The 
  46685.                         PAC also contains a flag (named authenticated).  When 
  46686.                         set it indicates that the certificate was obtained from 
  46687.                         an authenticated source.  When not set, the certificate 
  46688.                         must not be trusted.  (The field is FALSE when it was 
  46689.                         obtained from the rpc_auth layer and the protect level 
  46690.                         was set to rpc_c_protect_level_none.  This indicates 
  46691.                         that no authentication protocol was actually used in 
  46692.                         the remote procedure call; the identity was simply 
  46693.                         transmitted from the caller to the receiver. If an 
  46694.                         authentication protocol was used, then the flag is set 
  46695.                         to TRUE.) A server uses rpc_binding_inq_auth_client to 
  46696.                         acquire a certificate for the client process. 
  46697.  
  46698.           desired_permset A permission set in sec_acl_permset_t form containing 
  46699.                         the desired privileges.  This is a 32-bit set of 
  46700.                         permission flags supported by the manager type. 
  46701.  
  46702.           Output 
  46703.  
  46704.           status        A pointer to the completion status.  On successful 
  46705.                         completion, the routine returns error_status_ok. 
  46706.                         Otherwise, it returns sec_acl_unknown_manager_type, 
  46707.                         which indicates that the manager type selected is not 
  46708.                         an available option. 
  46709.  
  46710.  Usage 
  46711.  
  46712.           The rdacl_test_access_on_behalf routine determines if the specified 
  46713.           ACL contains entries granting privileges to the subject, a process 
  46714.           besides the calling process, matching those in desired_permset.  This 
  46715.           routine succeeds only if the access is available to both the caller 
  46716.           process as well as the subject identified in the call.  An 
  46717.           application will generally only inquire after the minimum set of 
  46718.           privileges needed to accomplish a specific task. 
  46719.  
  46720.  Notes 
  46721.  
  46722.           This routine is not intended to be used by application programs.  The 
  46723.           sec_acl Application Programming Interface (API) provides all the 
  46724.           functions necessary to use the ACL facility.  This reference page is 
  46725.           provided for programmers who want to write an ACL manager. To write 
  46726.           an ACL manager, a programmer must implement the entire rdacl 
  46727.           interface. 
  46728.  
  46729.           This network interface is called on the client side by the sec_acl 
  46730.           local interface.  Developers are responsible for implementing the 
  46731.           server side of this interface.  Test server code is included as a 
  46732.           sample implementation. 
  46733.  
  46734.  File 
  46735.  
  46736.           \include\dce\rdaclif.idl The idl file that dce\rdaclif.h was derived 
  46737.                          from. 
  46738.  
  46739.  Related Information 
  46740.  
  46741.           Routines: 
  46742.  
  46743.  
  46744.           rdacl_test_access 
  46745.           rpc_binding_inq_auth_client 
  46746.           sec_acl_bind 
  46747.           sec_acl_get_manager_types 
  46748.  
  46749.  
  46750. ΓòÉΓòÉΓòÉ 8.2. DCE Extended Privilege Attribute API ΓòÉΓòÉΓòÉ
  46751.  
  46752. This section describes the Extended Privilege Attribute (EPA) API.  The EPA 
  46753. facility addresses the requirements of complex distributed systems by allowing 
  46754. clients and servers to run secure operations using one or more intermediate 
  46755. servers. 
  46756.  
  46757. To handle these cases, the EPA API provides routines that allow principals to 
  46758. operate on objects on behalf of (as delegates of) an initiating principal.  The 
  46759. collection of the delegation initiator and the intermediaries is referred to as 
  46760. a delegation chain. 
  46761.  
  46762. The EPA interface consists of the Security credential routines (with the prefix 
  46763. sec_cred_) that extract privilege attributes and authorization data from an 
  46764. opaque binding handle to authenticated credentials.  In addition, several of 
  46765. the sec_login_xxx routines from the Login API are used to establish delegation 
  46766. chains and to perform other delegation-related functions. See DCE Login API for 
  46767. more information on the Login API. 
  46768.  
  46769. The EPA API sec_cred and Login API sec_login_cred routines extract privilege 
  46770. attribute information.  These routines return information associated with an 
  46771. opaque handle to an authenticated identity. 
  46772.  
  46773. See the following subtopics for more information: 
  46774.  
  46775.       Format 
  46776.       Data Types 
  46777.       Constants 
  46778.       Extended Privilege Attribute Routines 
  46779.       Files 
  46780.  
  46781.  
  46782. ΓòÉΓòÉΓòÉ 8.2.1. Extended Privilege Attribute Routines ΓòÉΓòÉΓòÉ
  46783.  
  46784. The sec_cred routines are used by servers that have been called by a client 
  46785. with authenticated credentials.  The routines are as follows: 
  46786.  
  46787.    o  sec_cred_free_attr_cursor 
  46788.    o  sec_cred_free_cursor 
  46789.    o  sec_cred_free_pa_handle 
  46790.    o  sec_cred_get_authz_session_info 
  46791.    o  sec_cred_get_client_princ_name 
  46792.    o  sec_cred_get_deleg_restrictions 
  46793.    o  sec_cred_get_delegate 
  46794.    o  sec_cred_get_delegation_type 
  46795.    o  sec_cred_get_extended_attrs 
  46796.    o  sec_cred_get_initiator 
  46797.    o  sec_cred_get_opt_restrictions 
  46798.    o  sec_cred_get_pa_data 
  46799.    o  sec_cred_get_req_restrictions 
  46800.    o  sec_cred_get_tgt_restrictions 
  46801.    o  sec_cred_get_v1_pac 
  46802.    o  sec_cred_initialize_attr_cursor 
  46803.    o  sec_cred_initialize_cursor 
  46804.    o  sec_cred_inq_auth_service_info 
  46805.    o  sec_cred_is_authenticated 
  46806.  
  46807.  The sec_login_cred routines are used by clients that are part of a delegation 
  46808.  chain. 
  46809.  
  46810.  
  46811. ΓòÉΓòÉΓòÉ 8.2.2. Format ΓòÉΓòÉΓòÉ
  46812.  
  46813. #include <dce/id_epac.h>
  46814. #include <dce/nbase.h>
  46815.  
  46816.  
  46817. ΓòÉΓòÉΓòÉ 8.2.3. Data Types ΓòÉΓòÉΓòÉ
  46818.  
  46819. The following data types are used in Extended Privilege Attribute routines and 
  46820. in the sec_login_cred routines that implement extended privilege attributes. 
  46821.  
  46822.  sec_cred_cursor_t A structure that provides an input/output cursor used to 
  46823.            iterate through a set of delegates in the sec_cred_get_delegate or 
  46824.            sec_login_cred_get_delegate routines. This cursor is initialized by 
  46825.            the sec_cred_initialize_cursor or sec_login_cred_init_cursor 
  46826.            routine. 
  46827.  
  46828.  sec_cred_attr_cursor_t A structure that provides an input/output cursor used 
  46829.            to iterate through a set of extended attributes in the 
  46830.            sec_cred_get_extended_attributes routine. This cursor is initialized 
  46831.            by the sec_cred_initialize_attr_cursor routine. 
  46832.  
  46833.  sec_id_opt_req_t A structure that specifies application-defined optional 
  46834.            restrictions. The sec_id_opt_req_t data type is composed of the 
  46835.            following elements: 
  46836.  
  46837.                 restriction_len An unsigned 16-bit integer that defines the 
  46838.                           size of the restriction data. 
  46839.  
  46840.                 restrictions A pointer to a idl_byte that contains the 
  46841.                           restriction data. 
  46842.  
  46843.  sec_rstr_entry_type_t An enumerator that specifies the entry types for 
  46844.            delegate and target restrictions.  This data type is used in 
  46845.            conjunction with the sec_id_restriction_t data type where the 
  46846.            specific UUIDs, if appropriate, are supplied. It consists of the 
  46847.            following components: 
  46848.  
  46849.                 sec_rstr_e_type_user The target is a local principal identified 
  46850.                           by UUID. This type conforms with the POSIX 1003.6 
  46851.                           standard. 
  46852.  
  46853.                 sec_rstr_e_type_group The target is a local group identified by 
  46854.                           UUID. This type conforms with the POSIX 1003.6 
  46855.                           standard. 
  46856.  
  46857.                 sec_rstr_e_type_foreign_user The target is a foreign principal 
  46858.                           identified by principal and cell UUID. 
  46859.  
  46860.                 sec_rstr_e_type_foreign_group The target is a foreign group 
  46861.                           identified by group and cell UUID. 
  46862.  
  46863.                 sec_rstr_e_type_foreign_other The target is any principal that 
  46864.                           can authenticate to the foreign cell identified by 
  46865.                           UUID. 
  46866.  
  46867.                 sec_rstr_e_type_any_other The target is any principal that can 
  46868.                           authenticate to any cell, but is not identified in 
  46869.                           any other type entry. 
  46870.  
  46871.                 sec_rstr_e_type_no_other No principal can act as a target or 
  46872.                           delegate. 
  46873.  
  46874.  sec_id_restriction_t A discriminated union that defines delegate and target 
  46875.            restrictions. The union, which is used in conjunction with the 
  46876.            sec_restriction_set_t data type, consists of the following elements: 
  46877.  
  46878.                 entry_info A structure containing two members: 
  46879.  
  46880.                                entry_type A sec_rstr_entry_type_t containing 
  46881.                                          one of the enumerated values listed 
  46882.                                          for that type that defines the ACL 
  46883.                                          entry types for delegate and target 
  46884.                                          restrictions. The value of 
  46885.                                          tagged_union depends on the value of 
  46886.                                          entry_type. 
  46887.  
  46888.                                tagged_union A tagged union whose contents 
  46889.                                          depend on entry_type as follows: 
  46890.  
  46891.                                               If entry_type is... 
  46892.                                                                                  Tagged_union 
  46893.                                                                                  is... 
  46894.  
  46895.                                               sec_rstr_e_type_any_other          An 
  46896.                                                                                  id 
  46897.                                                                                  of 
  46898.                                                                                  type 
  46899.                                                                                  sec_id_t. 
  46900.  
  46901.                                               sec_rstr_e_type_foreign_other      A 
  46902.                                                                                  foreign_id 
  46903.                                                                                  that 
  46904.                                                                                  identifies 
  46905.                                                                                  the 
  46906.                                                                                  foreign 
  46907.                                                                                  cell. 
  46908.  
  46909.                                               sec_rstr_e_type_user               An 
  46910.                                                                                  id, 
  46911.                                                                                  a 
  46912.                                                                                  sec_id_t 
  46913.                                                                                  that 
  46914.                                                                                  identifies 
  46915.                                                                                  the 
  46916.                                                                                  user. 
  46917.  
  46918.                                               sec_rstr_e_type_group              An 
  46919.                                                                                  id, 
  46920.                                                                                  a 
  46921.                                                                                  sec_id_t 
  46922.                                                                                  that 
  46923.                                                                                  identifies 
  46924.                                                                                  the 
  46925.                                                                                  group. 
  46926.  
  46927.                                               sec_rstr_e_type_foreign_user       A 
  46928.                                                                                  foreign_id, 
  46929.                                                                                  a 
  46930.                                                                                  sec_id_foreign_t 
  46931.                                                                                  that 
  46932.                                                                                  identifies 
  46933.                                                                                  the 
  46934.                                                                                  foreign 
  46935.                                                                                  user. 
  46936.  
  46937.                                               sec_rstr_e_type_foreign_group      A 
  46938.                                                                                  foreign_id, 
  46939.                                                                                  a 
  46940.                                                                                  sec_id_foreign_t 
  46941.                                                                                  that 
  46942.                                                                                  identifies 
  46943.                                                                                  the 
  46944.                                                                                  foreign 
  46945.                                                                                  group. 
  46946.  
  46947.  sec_id_restriction_set_t A structure that supplies delegate and target 
  46948.            restrictions. The structure consists of: 
  46949.  
  46950.                 num_restrictions A 16-bit unsigned integer that defines the 
  46951.                           number of restrictions in restrictions. 
  46952.  
  46953.                 restrictions An array containing num_restrictions pointers to 
  46954.                           restrictions, each of type sec_id_restriction_t. 
  46955.  
  46956.  sec_id_compatibility_mode_t A unsigned 16-bit integer that defines the 
  46957.            compatibility between current and pre-1.1 servers. The data type 
  46958.            uses the following constants: 
  46959.  
  46960.                 sec_id_compat_mode_none Compatibility mode is off. 
  46961.  
  46962.                 sec_id_compat_mode_initiator Compatibility mode is on. The 1.0 
  46963.                           PAC data is extracted from the EPAC of the chain 
  46964.                           initiator. 
  46965.  
  46966.                 sec_id_compat_mode_caller Compatibility mode is on. The 1.0 PAC 
  46967.                           data is extracted from the last delegate in the 
  46968.                           delegation chain. 
  46969.  
  46970.  sec_id_delegation_type_t An unsigned 16-bit integer that defines the 
  46971.            delegation type. The data type uses the following constants: 
  46972.  
  46973.                 sec_id_deleg_type_none Delegation is not allowed. 
  46974.  
  46975.                 sec_id_deleg_type_traced Traced delegation is allowed. 
  46976.  
  46977.                 sec_id_deleg_type_impersonation Simple (impersonation) 
  46978.                           delegation is allowed. 
  46979.  
  46980.  sec_id_pa_t A structure that contains pre-1.1 PAC data extracted from an EPAC 
  46981.            of a current version server.  This data type, which is used for 
  46982.            compatibility with pre-1.1 servers, consists of the following 
  46983.            elements: 
  46984.  
  46985.                 realm     A value of type sec_id_t that contains the UUID that 
  46986.                           identifies the cell in which the principal associated 
  46987.                           with the PAC exists. 
  46988.  
  46989.                 principal A value of type sec_id_t that contains the UUID of 
  46990.                           the principal. 
  46991.  
  46992.                 group     A value of type sec_id_t that contains the UUID of 
  46993.                           the principal's primary group. 
  46994.  
  46995.                 num_groups An unsigned 16-bit integer that specifies the number 
  46996.                           of groups in the principal's group set. 
  46997.  
  46998.                 groups    An array of pointers to sec_id_t structures that 
  46999.                           contain the UUIDs of each group in the principal's 
  47000.                           group set. 
  47001.  
  47002.                 num_foreign_groupsets An unsigned 16-bit integer that specifies 
  47003.                           the number of foreign groups for the principal's 
  47004.                           group set. 
  47005.  
  47006.                 foreign_groupsets An array of pointers to sec_id_t structures 
  47007.                           that contain the UUIDs of each group in the 
  47008.                           principal's group set. 
  47009.  
  47010.  sec_id_pac_t A structure that contains a pre-1.1 PAC. This data type, which is 
  47011.            used as output for the sec_cred_get_v1_pac routine, consists of the 
  47012.            following elements: 
  47013.  
  47014.                 pac_type  A value of type sec_id_pac_format_t that can be used 
  47015.                           to describe the PAC format. 
  47016.  
  47017.                 authenticated A boolean field that indicates whether the PAC is 
  47018.                           authenticated (obtained from an authenticated 
  47019.                           source). FALSE indicates that the PAC is not 
  47020.                           authenticated. No authentication protocol was used in 
  47021.                           the RPC that transmitted the identity of the caller. 
  47022.                           TRUE indicates that the PAC is authenticated. 
  47023.  
  47024.                 realm     A value of type sec_id_t that contains the UUID that 
  47025.                           identifies the cell in which the principal associated 
  47026.                           with the PAC exists. 
  47027.  
  47028.                 principal A value of type sec_id_t that contains the UUID of 
  47029.                           the principal. 
  47030.  
  47031.                 group     For local principals, a value of type sec_id_t that 
  47032.                           contains the UUID of the principal's primary group. 
  47033.  
  47034.                 num_groups An unsigned 16-bit integer that specifies the number 
  47035.                           of groups in the principal's group set. 
  47036.  
  47037.                 groups    An array of pointers to sec_id_t structures that 
  47038.                           contain the UUIDs of each group in the  principal's 
  47039.                           group set. 
  47040.  
  47041.                 num_foreign_groups An unsigned 16-bit integer that specifies 
  47042.                           the number of foreign groups for the principal's 
  47043.                           group set. 
  47044.  
  47045.                 foreign_groups An array of pointers to sec_id_t structures that 
  47046.                           contain the UUIDs of each foreign group in the 
  47047.                           principal's group set. 
  47048.  
  47049.  sec_id_pac_format_t An enumerator that can be used to describe the PAC format. 
  47050.  
  47051.  sec_id_t  A structure that contains UUIDs for principals, groups, or 
  47052.            organizations and an optional print string name. Because a UUID is a 
  47053.            handle for the object's identity, the sec_id_t data type is the 
  47054.            basic unit for identifying principals, groups, and organizations. 
  47055.  
  47056.            Because the print string name is dynamically allocated, this data 
  47057.            type requires a freeing routine. Generally, however, the sec_id_t is 
  47058.            embedded in other data types (ACLs, for example), and these data 
  47059.            types have a freeing routine to release the print string storage. 
  47060.  
  47061.            The sec_id_t data type is composed of the following elements: 
  47062.  
  47063.                 uuid      A value of type uuid_t, the UUID of the principal, 
  47064.                           group, or organization. 
  47065.  
  47066.                 name      A pointer to a character string containing the name 
  47067.                           of the principal, group, or organization. 
  47068.  
  47069.  sec_id_foreign_t A structure that contains UUIDs for principals, groups, or 
  47070.            organizations for objects in a foreign cell and the UUID that 
  47071.            identifies the foreign cell. The sec_id_foreign_t data type is 
  47072.            composed of the following elements: 
  47073.  
  47074.                 id        A value of type sec_id_t that contains the UUIDs of 
  47075.                           the objects from the foreign cell. 
  47076.  
  47077.                 realm     A value of type sec_id_t that contains the UUID of 
  47078.                           the foreign cell. 
  47079.  
  47080.  sec_id_foreign_groupset_t A structure that contains UUIDs for a set of groups 
  47081.            in a foreign cell and the UUID that identifies the foreign cell. The 
  47082.            sec_id_foreign_groupset_t data type is composed of the following 
  47083.            elements: 
  47084.  
  47085.                 realm     A value of type sec_id_t that contains the UUID of 
  47086.                           the foreign cell. 
  47087.  
  47088.                 num_groups An unsigned 16-bit integer specifying the number of 
  47089.                           group UUIDs in groups. 
  47090.  
  47091.                 groups    A pointer to a sec_id_t that contains the UUIDs of 
  47092.                           the group set from the foreign cell. 
  47093.  
  47094.  
  47095. ΓòÉΓòÉΓòÉ 8.2.4. Constants ΓòÉΓòÉΓòÉ
  47096.  
  47097. The following constants are used in the EPA routines and in the sec_login 
  47098. routines that implement extended privilege attributes: 
  47099.  
  47100.  sec_id_compat_mode_none Compatibility mode is off. 
  47101.  
  47102.  sec_id_compat_mode_initiator Compatibility mode is on.  The 1.0 PAC data 
  47103.            extracted from the EPAC of the chain initiator. 
  47104.  
  47105.  sec_id_compat_mode_caller Compatibility mode is on. The 1.0 PAC data extracted 
  47106.            from the last delegate in the delegation chain. 
  47107.  
  47108.  sec_id_deleg_type_none Delegation is not allowed. 
  47109.  
  47110.  sec_id_deleg_type_traced Traced delegation is allowed. 
  47111.  
  47112.  sec_id_deleg_type_impersonation Simple (impersonation) delegation is allowed. 
  47113.  
  47114.  sec_rstr_e_type_user The delegation target is a local principal identified by 
  47115.            UUID. This type conforms with the POSIX 1003.6 standard. 
  47116.  
  47117.  sec_rstr_e_type_group The delegation target is a local group identified by 
  47118.            UUID. This type conforms with the POSIX 1003.6 standard. 
  47119.  
  47120.  sec_rstr_e_type_foreign_user The delegation target is a foreign principal 
  47121.            identified by principal and cell UUID. 
  47122.  
  47123.  sec_rstr_e_type_foreign_group The delegation target is a foreign group 
  47124.            identified by group and cell UUID. 
  47125.  
  47126.  sec_rstr_e_type_foreign_other The delegation target is any principal that can 
  47127.            authenticate to the foreign cell identified by UUID. 
  47128.  
  47129.  sec_rstr_e_type_any_other The delegation target is any principal that can 
  47130.            authenticate to any cell, but is not identified in any other type 
  47131.            entry. 
  47132.  
  47133.  sec_rstr_e_type_no_other No principal can act as a target or delegate. 
  47134.  
  47135.  
  47136. ΓòÉΓòÉΓòÉ 8.2.5. Files ΓòÉΓòÉΓòÉ
  47137.  
  47138.  \usr\include\dce\sec_cred.idl The idl file from which sec_cred.h was derived. 
  47139.  
  47140.  \usr\include\dce\sec_epac.idl The idl file from which sec_epac.h was derived. 
  47141.  
  47142.  \usr\include\dce\sec_nbase.idl The idl file from which sec_nbase.h was 
  47143.                           derived. 
  47144.  
  47145.  
  47146. ΓòÉΓòÉΓòÉ 8.2.6. sec_cred_free_attr_cursor ΓòÉΓòÉΓòÉ
  47147.  
  47148.  Purpose 
  47149.  
  47150.           Frees the local resources allocated to a sec_attr_cursor_t used by 
  47151.           the sec_cred_get_extended_attrs routine. 
  47152.  
  47153.  Format 
  47154.  
  47155.                     #include <dce/sec_cred.h>
  47156.  
  47157.                     void sec_cred_free_attr_cursor (
  47158.                             sec_cred_attr_cursor_t  *cursor,
  47159.                             error_status_t  *status);
  47160.  
  47161.  Parameters 
  47162.  
  47163.           Input/Output 
  47164.  
  47165.           cursor        As input, a pointer to a sec_cred_attr_cursor_t whose 
  47166.                         resources are to be freed. As output, a pointer to an 
  47167.                         initialized sec_cred_attr_cursor_t with allocated 
  47168.                         resources freed. 
  47169.  
  47170.           Output 
  47171.  
  47172.           status        A pointer to the completion status.  On successful 
  47173.                         completion, the routine returns error_status_ok. 
  47174.                         Otherwise, it returns an error. 
  47175.  
  47176.  Usage 
  47177.  
  47178.           The sec_cred_free_attr_cursor routine frees the resources associated 
  47179.           with a cursor of type sec_cred_attr_cursor_t used by the 
  47180.           sec_cred_get_extended_attrs routine. 
  47181.  
  47182.  Related Information 
  47183.  
  47184.           Routines: 
  47185.           sec_cred_get_extended_attrs 
  47186.           sec_cred_initialize_cursor 
  47187.  
  47188.  
  47189. ΓòÉΓòÉΓòÉ 8.2.7. sec_cred_free_cursor ΓòÉΓòÉΓòÉ
  47190.  
  47191.  Purpose 
  47192.  
  47193.           Releases local resources allocated to a sec_cred_cursor_t used by the 
  47194.           sec_cred_get_delegate routine. 
  47195.  
  47196.  Format 
  47197.  
  47198.                     #include <dce/sec_cred.h>
  47199.  
  47200.                     void sec_cred_free_cursor (
  47201.                            sec_cred_cursor_t  *cursor,
  47202.                            error_status_t  *status);
  47203.  
  47204.  Parameters 
  47205.  
  47206.           Input/Output 
  47207.  
  47208.           cursor        As input, a sec_cred_cursor_t whose resources are to be 
  47209.                         freed. As output, a sec_cred_cursor_t whose resources 
  47210.                         are freed. 
  47211.  
  47212.           Output 
  47213.  
  47214.           status        A pointer to the completion status.  On successful 
  47215.                         completion, the routine returns error_status_ok. 
  47216.                         Otherwise, it returns sec_login_s_no_memory. 
  47217.  
  47218.  Usage 
  47219.  
  47220.           The sec_cred_free_cursor routine releases local resources allocated 
  47221.           to a sec_cred_cursor_t used by the sec_cred_get_delegate routine. 
  47222.  
  47223.  Related Information 
  47224.  
  47225.           Routines: 
  47226.           sec_cred_get_delegate 
  47227.           sec_cred_initialize_cursor 
  47228.  
  47229.  
  47230. ΓòÉΓòÉΓòÉ 8.2.8. sec_cred_free_pa_handle ΓòÉΓòÉΓòÉ
  47231.  
  47232.  Purpose 
  47233.  
  47234.           Frees the local resources allocated to a privilege attribute handle 
  47235.           of type sec_cred_pa_handle_t used by the sec_cred_get_initiator and 
  47236.           sec_cred_get_delegate routines. 
  47237.  
  47238.  Format 
  47239.  
  47240.                     #include <dce/sec_cred.h>
  47241.  
  47242.                     void sec_cred_free_pa_handle (
  47243.                             sec_cred_pa_handle_t  *pa_handle,
  47244.                             error_status_t  *status);
  47245.  
  47246.  Parameters 
  47247.  
  47248.           Input/Output 
  47249.  
  47250.           pa_handle     As input, a pointer to a sec_cred_pa_handle_t whose 
  47251.                         resources are to be freed. As output a pointer to a 
  47252.                         sec_cred_pa_handle_t with allocated resources freed. 
  47253.  
  47254.           Output 
  47255.  
  47256.           status        A pointer to the completion status.  On successful 
  47257.                         completion, the routine returns error_status_ok. 
  47258.                         Otherwise, it returns an error. 
  47259.  
  47260.  Usage 
  47261.  
  47262.           The sec_cred_free_pa_handle routine frees the resources associated 
  47263.           with a privilege attribute handle of type sec_cred_pa_handle_t used 
  47264.           by the sec_cred_get_initiator and sec_cred_get_delegate routines. 
  47265.  
  47266.  Related Information 
  47267.  
  47268.           Routines: 
  47269.           sec_cred_get_delegate 
  47270.           sec_cred_get_initiator 
  47271.  
  47272.  
  47273. ΓòÉΓòÉΓòÉ 8.2.9. sec_cred_get_authz_session_info ΓòÉΓòÉΓòÉ
  47274.  
  47275.  Purpose 
  47276.  
  47277.           Returns session-specific information that represents an authenticated 
  47278.           client's credentials. 
  47279.  
  47280.  Format 
  47281.  
  47282.                     #include <dce/sec_cred.h>
  47283.  
  47284.                     void sec_cred_get_authz_session_info(
  47285.                             rpc_authz_cred_handle_t  callers_identity,
  47286.                             uuid_t  *session_id,
  47287.                             sec_timeval_t  *session_expiration,
  47288.                             error_status_t  *status );
  47289.  
  47290.  Parameters 
  47291.  
  47292.           Input 
  47293.  
  47294.           callers_identity A credential handle of type rpc_authz_cred_handle_t. 
  47295.                         This handle is supplied as output of the 
  47296.                         rpc_binding_inq_auth_caller routine. 
  47297.  
  47298.           Output 
  47299.  
  47300.           session_ID    A pointer to a uuid_t that identifies the client's DCE 
  47301.                         authorization session. 
  47302.  
  47303.           session_expiration A pointer to a sec_timeval_t that specifies the 
  47304.                         expiration time of the authenticated client's 
  47305.                         credentials. 
  47306.  
  47307.           status        A pointer to the completion status.  On successful 
  47308.                         completion, status is assigned error_status_ok. 
  47309.                         Otherwise, it returns sec_cred_s_authz_cannot_comply. 
  47310.  
  47311.  Usage 
  47312.  
  47313.           The sec_cred_get_authz_session_info routine retrieves 
  47314.           session-specific information that represents the credentials of an 
  47315.           authenticated client specified by callers_identity. If the client is 
  47316.           a member of a delegation chain, the information represents the 
  47317.           credentials of all members of the chain. 
  47318.  
  47319.           The information can aid application servers in the construction of 
  47320.           identity-based caches. For example, it could be used as a key into a 
  47321.           cache of previously allocated delegation contexts and thus avoid the 
  47322.           overhead of allocating a new login context on every remote operation. 
  47323.           It could also be used as a key into a table of previously computed 
  47324.           authorization decisions. 
  47325.  
  47326.           Before you run this routine, you must run the 
  47327.           rpc_binding_inq_auth_caller routine to obtain an 
  47328.           rpc_authz_cred_handle_t for the callers_identity parameter. 
  47329.  
  47330.  Related Information 
  47331.  
  47332.           Routines: 
  47333.           rpc_binding_inq_auth_caller 
  47334.  
  47335.  
  47336. ΓòÉΓòÉΓòÉ 8.2.10. sec_cred_get_client_princ_name ΓòÉΓòÉΓòÉ
  47337.  
  47338.  Purpose 
  47339.  
  47340.           Returns the principal name associated with a credential handle. 
  47341.  
  47342.  Format 
  47343.  
  47344.                     #include <dce/sec_cred.h>
  47345.  
  47346.                     void sec_cred_get_client_princ_name(
  47347.                             rpc_authz_cred_handle_t  callers_identity,
  47348.                             unsigned_char_p_t  *client_princ_name,
  47349.                             error_status_t  *status);
  47350.  
  47351.  Parameters 
  47352.  
  47353.           Input 
  47354.  
  47355.           callers_identity A handle of type rpc_authz_cred_handle_t to the 
  47356.                         credentials for which to return the principal name. 
  47357.                         This handle is supplied as output of the 
  47358.                         rpc_binding_inq_auth_caller routine. 
  47359.  
  47360.           Output 
  47361.  
  47362.           client_princ_name A pointer to the principal name of the server's RPC 
  47363.                         client. 
  47364.  
  47365.           status        A pointer to the completion status.  On successful 
  47366.                         completion, status is assigned error_status_ok. 
  47367.                         Otherwise, it returns sec_cred_s_authz_cannot_comply. 
  47368.  
  47369.  Usage 
  47370.  
  47371.           The sec_cred_get_client_princ_name routine extracts the principal 
  47372.           name associated with the credentials identified by callers_identity. 
  47373.  
  47374.           This routine can only be called for a non-standard form of 
  47375.           authorization that is based on the client principal name. 
  47376.  
  47377.           To use this routine, call the rpc_binding_set_auth_info routine and 
  47378.           specify rpc_c_authz_name for the authorization service (the authz_svc 
  47379.           parameter). The server receives no PAC or EPAC as part of the RPC, so 
  47380.           the server does not use a standard authorization. You must then get a 
  47381.           handle by using the rpc_binding_inq_auth_caller routine. Use the 
  47382.           rpc_authz_cred_handle_t returned in the privs parameter of that 
  47383.           routine as the input for the callers_identity parameter in 
  47384.           sec_cred_get_client_princ_name. 
  47385.  
  47386.  Related Information 
  47387.  
  47388.           Routines: 
  47389.           rpc_binding_inq_auth_caller 
  47390.  
  47391.  
  47392. ΓòÉΓòÉΓòÉ 8.2.11. sec_cred_get_deleg_restrictions ΓòÉΓòÉΓòÉ
  47393.  
  47394.  Purpose 
  47395.  
  47396.           Returns delegate restrictions from a privilege attribute handle. 
  47397.  
  47398.  Format 
  47399.  
  47400.                     #include <dce/sec_cred.h>
  47401.  
  47402.                     sec_id_restriction_set_t  *sec_cred_get_deleg_restrictions(
  47403.                             sec_cred_pa_handle_t  callers_pas,
  47404.                             error_status_t  *status);
  47405.  
  47406.  Parameters 
  47407.  
  47408.           Input 
  47409.  
  47410.           callers_pas   A value of type sec_cred_pa_handle_t that provides a 
  47411.                         handle to a principal's privilege attributes. This 
  47412.                         handle is supplied as output of the 
  47413.                         sec_cred_get_initiator routine, the 
  47414.                         sec_cred_get_delegate routine, and the 
  47415.                         sec_login_cred_xxx routines. 
  47416.  
  47417.           Output 
  47418.  
  47419.           status        A pointer to the completion status.  On successful 
  47420.                         completion, status is assigned error_status_ok. 
  47421.                         Otherwise, it returns sec_cred_s_invalid_pa_handle. 
  47422.  
  47423.  Usage 
  47424.  
  47425.           The sec_cred_get_deleg_restrictions routine extracts delegate 
  47426.           restrictions from the privilege attribute handle identified by 
  47427.           callers_pas. The restrictions are returned in a 
  47428.           sec_id_restriction_set_t. 
  47429.  
  47430.           Before you run sec_cred_get_pa_data, you must run the 
  47431.           sec_cred_get_initiator or sec_cred_get_delegate routine to obtain a 
  47432.           sec_cred_pa_handle_t for the callers_pas parameter. 
  47433.  
  47434.  Related Information 
  47435.  
  47436.           Routines: 
  47437.           sec_cred_get_delegate 
  47438.           sec_cred_get_initiator 
  47439.  
  47440.  
  47441. ΓòÉΓòÉΓòÉ 8.2.12. sec_cred_get_delegate ΓòÉΓòÉΓòÉ
  47442.  
  47443.  Purpose 
  47444.  
  47445.           Returns a handle to the privilege attributes of an intermediary in a 
  47446.           delegation chain. 
  47447.  
  47448.  Format 
  47449.  
  47450.                     #include <dce/sec_cred.h>
  47451.  
  47452.                     sec_cred_pa_handle_t sec_cred_get_delegate(
  47453.                             rpc_authz_cred_handle_t  callers_identity,
  47454.                             sec_cred_cursor_t  *cursor,
  47455.                             error_status_t  *status);
  47456.  
  47457.  Parameters 
  47458.  
  47459.           Input 
  47460.  
  47461.           callers_identity A handle of type rpc_authz_cred_handle_t. This 
  47462.                         handle is supplied as output of the 
  47463.                         rpc_binding_inq_auth_caller routine. 
  47464.  
  47465.           Input/Output 
  47466.  
  47467.           cursor        As input, a pointer to a cursor of type 
  47468.                         sec_cred_cursor_t that has been initialized by the 
  47469.                         sec_cred_initialize_cursor routine. As an output 
  47470.                         parameter, cursor is a pointer to a cursor of type 
  47471.                         sec_attr_srch_cursor_t that is positioned past the 
  47472.                         principal whose privilege attributes have been returned 
  47473.                         in this routine. 
  47474.  
  47475.           Output 
  47476.  
  47477.           status        A pointer to the completion status.  On successful 
  47478.                         completion, status is assigned error_status_ok. 
  47479.                         Otherwise, it returns one of the following errors: 
  47480.  
  47481.                              sec_cred_s_invalid_auth_handle 
  47482.                              sec_cred_s_invalid_cursor 
  47483.                              sec_cred_s_no_more_entries 
  47484.  
  47485.  Usage 
  47486.  
  47487.           The sec_cred_get_delegate routine returns a handle to the privilege 
  47488.           attributes of an intermediary in a delegation chain that performed an 
  47489.           authenticated RPC operation. 
  47490.  
  47491.           This routine is used by servers. Clients use the 
  47492.           sec_login_cred_get_delegate routine to return the privilege attribute 
  47493.           handle of an intermediary in a delegation chain. 
  47494.  
  47495.           The credential handle identified by callers_identity contains 
  47496.           authentication and authorization information for all delegates in the 
  47497.           chain. This routine returns a handle (sec_cred_pa_handle_t) to the 
  47498.           privilege attributes of one of the delegates in the binding handle. 
  47499.           The sec_cred_pa_handle_t returned by this routine is used in other 
  47500.           sec_cred_get_xxx routines to obtain privilege attribute information 
  47501.           for a single delegate. 
  47502.  
  47503.           To obtain the privilege attributes of each delegate in the credential 
  47504.           handle identified by callers_identity, run this routine until the 
  47505.           message sec_cred_s_no_more_entries is returned. 
  47506.  
  47507.           Before you run sec_cred_get_delegate, you must run: 
  47508.  
  47509.             o  The rpc_binding_inq_auth_caller routine to obtain an 
  47510.                rpc_authz_cred_handle_t for the callers_identity parameter 
  47511.  
  47512.             o  The sec_cred_initialize_cursor routine to initialize a cursor of 
  47513.                type sec_cred_cursor_t 
  47514.           Use the sec_cred_free_pa_handle routine to free the resources 
  47515.           associated with the sec_cred_pa_handle_t. 
  47516.  
  47517.  Related Information 
  47518.  
  47519.           Routines: 
  47520.           rpc_binding_inq_auth_caller 
  47521.           sec_cred_free_pa_handle 
  47522.           sec_cred_initialize_cursor 
  47523.           sec_cred_get_deleg_restrictions 
  47524.           sec_cred_get_delegation_type 
  47525.           sec_cred_get_extended_attrs 
  47526.           sec_cred_get_opt_restrictions 
  47527.           sec_cred_get_pa_data 
  47528.           sec_cred_get_req_restrictions 
  47529.           sec_cred_get_tgt_restrictions 
  47530.           sec_cred_get_v1_pac 
  47531.  
  47532.  
  47533. ΓòÉΓòÉΓòÉ 8.2.13. sec_cred_get_delegation_type ΓòÉΓòÉΓòÉ
  47534.  
  47535.  Purpose 
  47536.  
  47537.           Returns the delegation type from a privilege attribute handle. 
  47538.  
  47539.  Format 
  47540.  
  47541.                     #include <dce/sec_cred.h>
  47542.  
  47543.                     sec_id_delegation_type_t  *sec_cred_get_delegation_type(
  47544.                              sec_cred_pa_handle_t  callers_pas,
  47545.                              error_status_t  *status);
  47546.  
  47547.  Parameters 
  47548.  
  47549.           Input 
  47550.  
  47551.           callers_pas   A value of type sec_cred_pa_handle_t that provides a 
  47552.                         handle to a principal's privilege attributes. This 
  47553.                         handle is supplied as output of either the 
  47554.                         sec_cred_get_initiator routine or sec_cred_get_delegate 
  47555.                         routine. 
  47556.  
  47557.           Output 
  47558.  
  47559.           status        A pointer to the completion status.  On successful 
  47560.                         completion, status is assigned error_status_ok. 
  47561.                         Otherwise, it returns sec_cred_s_invalid_pa_handle. 
  47562.  
  47563.  Usage 
  47564.  
  47565.           The sec_cred_get_delegation_type routine extracts the delegation type 
  47566.           from the privilege attribute handle identified by callers_pas and 
  47567.           returns it in a sec_id_delegation_type_t. 
  47568.  
  47569.           Before you run sec_cred_get_delegation_type, you must run the 
  47570.           sec_cred_get_initiator or sec_cred_get_delegate routine to obtain a 
  47571.           sec_cred_pa_handle_t for the callers_pas parameter. 
  47572.  
  47573.  Related Information 
  47574.  
  47575.           Routines: 
  47576.           sec_cred_get_delegate 
  47577.           sec_cred_get_initiator 
  47578.  
  47579.  
  47580. ΓòÉΓòÉΓòÉ 8.2.14. sec_cred_get_extended_attrs ΓòÉΓòÉΓòÉ
  47581.  
  47582.  Purpose 
  47583.  
  47584.           Returns extended attributes from a privilege handle. 
  47585.  
  47586.  Format 
  47587.  
  47588.                     #include <dce/sec_cred.h>
  47589.  
  47590.                     void sec_cred_get_extended_attrs(
  47591.                             sec_cred_pa_handle_t  callers_pas,
  47592.                             sec_cred_attr_cursor_t  *cursor
  47593.                             sec_attr_t  *attr
  47594.                             error_status_t  *status);
  47595.  
  47596.  Parameters 
  47597.  
  47598.           Input 
  47599.  
  47600.           callers_pas   A handle of type sec_cred_pa_handle_t to the caller's 
  47601.                         privilege attributes. This handle is supplied as output 
  47602.                         of either the sec_cred_get_initiator or the 
  47603.                         sec_cred_get_delegate routine. 
  47604.  
  47605.           Input/Output 
  47606.  
  47607.           cursor        A cursor of type sec_cred_attr_cursor_t that has been 
  47608.                         initialized by the sec_cred_initialize_attr_cursor 
  47609.                         routine. As input, cursor must be initialized. As 
  47610.                         output, cursor is positioned at the first attribute 
  47611.                         after the returned attribute. 
  47612.  
  47613.           Output 
  47614.  
  47615.           attr          A pointer to a value of sec_attr_t type that contains 
  47616.                         extended registry attributes. 
  47617.  
  47618.           status        A pointer to the completion status.  On successful 
  47619.                         completion, status is assigned error_status_ok. 
  47620.                         Otherwise, it returns one of the following errors: 
  47621.  
  47622.                              sec_cred_s_invalid_pa_handle 
  47623.                              sec_cred_s_invalid_cursor 
  47624.                              sec_cred_s_no_more_entries 
  47625.  
  47626.  Usage 
  47627.  
  47628.           The sec_cred_get_extended_attrs routine extracts extended registry 
  47629.           initialized from the privilege attribute handle identified by 
  47630.           callers_pas. 
  47631.  
  47632.           Before you run the sec_cred_get_extended_attrs routine, you must run: 
  47633.  
  47634.             o  The sec_cred_get_initiator or sec_cred_get_delegate routine to 
  47635.                obtain a sec_cred_pa_handle_t for the callers_pas parameter 
  47636.  
  47637.             o  The sec_cred_initialize_attr_cursor routine to initialize attr 
  47638.  
  47639.           To obtain all the extended registry attributes in the privilege 
  47640.           attribute handle, repeat the sec_cred_get_extended_attrs routine 
  47641.           until the status message sec_cred_s_no_more_entries is returned. 
  47642.  
  47643.  Related Information 
  47644.  
  47645.           Routines: 
  47646.           sec_cred_get_delegate 
  47647.           sec_cred_get_initiator 
  47648.           sec_cred_initialize_attr_cursor 
  47649.  
  47650.  
  47651. ΓòÉΓòÉΓòÉ 8.2.15. sec_cred_get_initiator ΓòÉΓòÉΓòÉ
  47652.  
  47653.  Purpose 
  47654.  
  47655.           Returns the privilege attributes of the initiator of a delegation 
  47656.           chain. 
  47657.  
  47658.  Format 
  47659.  
  47660.                     #include <dce/sec_cred.h>
  47661.  
  47662.                     sec_cred_pa_handle_t sec_cred_get_initiator(
  47663.                             rpc_authz_cred_handle_t  callers_identity,
  47664.                             error_status_t  *status);
  47665.  
  47666.  Parameters 
  47667.  
  47668.           Input 
  47669.  
  47670.           callers_identity A credential handle of type rpc_authz_cred_handle_t. 
  47671.                         This handle is supplied as output of the 
  47672.                         rpc_binding_inq_auth_caller routine. 
  47673.  
  47674.           Output 
  47675.  
  47676.           status        A pointer to the completion status.  On successful 
  47677.                         completion, status is assigned error_status_ok. 
  47678.                         Otherwise, it returns sec_cred_s_invalid_auth_handle. 
  47679.  
  47680.  Usage 
  47681.  
  47682.           The sec_cred_get_initiator routine returns a handle to the privilege 
  47683.           attributes of the initiator of a delegation chain that performed an 
  47684.           authenticated RPC operation. 
  47685.  
  47686.           The credential handle identified by callers_identity contains 
  47687.           authentication and authorization information for all delegates in the 
  47688.           chain. This routine returns a handle (sec_cred_pa_handle_t) to the 
  47689.           privilege attributes of the client that initiated the delegation 
  47690.           chain. The sec_cred_pa_handle_t returned by this routine is used in 
  47691.           other sec_cred_get_xxx routines to obtain privilege attribute 
  47692.           information for the initiator. 
  47693.  
  47694.           Before you run sec_cred_get_initiator, you must run the 
  47695.           rpc_binding_inq_auth_caller routine to obtain an 
  47696.           rpc_authz_cred_handle_t for the callers_identity parameter. 
  47697.  
  47698.  Related Information 
  47699.  
  47700.           Routines: 
  47701.           rpc_binding_inq_auth_caller 
  47702.           sec_cred_free_pa_handle 
  47703.           sec_cred_initialize_cursor 
  47704.           sec_cred_get_deleg_restrictions 
  47705.           sec_cred_get_delegation_type 
  47706.           sec_cred_get_extended_attrs 
  47707.           sec_cred_get_opt_restrictions 
  47708.           sec_cred_get_pa_data 
  47709.           sec_cred_get_req_restrictions 
  47710.           sec_cred_get_tgt_restrictions 
  47711.           sec_cred_get_v1_pac 
  47712.  
  47713.  
  47714. ΓòÉΓòÉΓòÉ 8.2.16. sec_cred_get_opt_restrictions ΓòÉΓòÉΓòÉ
  47715.  
  47716.  Purpose 
  47717.  
  47718.           Returns optional restrictions from a privilege handle. 
  47719.  
  47720.  Format 
  47721.  
  47722.                     #include <dce/sec_cred.h>
  47723.  
  47724.                     sec_id_opt_req_t *sec_cred_get_opt_restrictions
  47725.                             sec_cred_pa_handle_t  callers_pas,
  47726.                             error_status_t  *status);
  47727.  
  47728.  Parameters 
  47729.  
  47730.           Input 
  47731.  
  47732.           callers_pas   A handle of type sec_cred_pa_handle_t to a principal's 
  47733.                         privilege attributes. This handle is supplied as output 
  47734.                         of either the sec_cred_get_initiator routine or the 
  47735.                         sec_cred_get_delegate routine. 
  47736.  
  47737.           Output 
  47738.  
  47739.           status        A pointer to the completion status.  On successful 
  47740.                         completion, status is assigned error_status_ok. 
  47741.                         Otherwise, it returns the following error: 
  47742.  
  47743.                              sec_cred_s_invalid_pa_handle 
  47744.  
  47745.  Usage 
  47746.  
  47747.           The sec_cred_get_opt_restrictions routine extracts optional 
  47748.           restrictions from the privilege attribute handle identified by 
  47749.           callers_pas and returns them in a sec_id_restriction_set_t. 
  47750.  
  47751.           Before you run sec_cred_get_pa_data, you must run the 
  47752.           sec_cred_get_initiator or sec_cred_get_delegate routine to obtain a 
  47753.           sec_cred_pa_handle_t for the callers_pas parameter. 
  47754.  
  47755.  Related Information 
  47756.  
  47757.           Routines: 
  47758.           sec_cred_get_delegate 
  47759.           sec_cred_get_initiator 
  47760.  
  47761.  
  47762. ΓòÉΓòÉΓòÉ 8.2.17. sec_cred_get_pa_data ΓòÉΓòÉΓòÉ
  47763.  
  47764.  Purpose 
  47765.  
  47766.           Returns identity information from a privilege attribute handle. 
  47767.  
  47768.  Format 
  47769.  
  47770.                     #include <dce/sec_cred.h>
  47771.  
  47772.                     sec_id_pa_t *sec_cred_get_pa_data(
  47773.                             sec_cred_pa_handle_t  callers_pas,
  47774.                             error_status_t  *status);
  47775.  
  47776.  Parameters 
  47777.  
  47778.           Input 
  47779.  
  47780.           callers_pas   A handle of type sec_cred_pa_handle_t to a principal's 
  47781.                         privilege attributes. This handle is supplied as output 
  47782.                         of either the sec_cred_get_initiator routine or the 
  47783.                         sec_cred_get_delegate routine. 
  47784.  
  47785.           Output 
  47786.  
  47787.           status        A pointer to the completion status.  On successful 
  47788.                         completion, status is assigned error_status_ok. 
  47789.                         Otherwise, it returns sec_cred_s_invalid_pa_handle. 
  47790.  
  47791.  Usage 
  47792.  
  47793.           The sec_cred_get_pa_data routine extracts identity information from 
  47794.           the privilege attribute handle specified by callers_pas and returns 
  47795.           it in a sec_id_pa_t.  The identity information includes an identifier 
  47796.           of the principal's local cell and the principal's local and foreign 
  47797.           group sets. 
  47798.  
  47799.           Before you run sec_cred_get_pa_data, you must run a 
  47800.           sec_cred_get_initiator or sec_cred_get_delegate routine to obtain a 
  47801.           sec_cred_pa_handle_t for the callers_pas parameter. 
  47802.  
  47803.  Related Information 
  47804.  
  47805.           Note that, for this release, only the uuid field of the sec_id_t 
  47806.           structures pointed to by the realm, principal, and group attributes 
  47807.           of the sec_id_pa_t structure is set. To get the name of any of these 
  47808.           three items, you must use the sec_rgy_pgo_id_to_name routine. 
  47809.           Routines: 
  47810.           sec_cred_get_delegate 
  47811.           sec_cred_get_initiator 
  47812.  
  47813.  
  47814. ΓòÉΓòÉΓòÉ 8.2.18. sec_cred_get_req_restrictions ΓòÉΓòÉΓòÉ
  47815.  
  47816.  Purpose 
  47817.  
  47818.           Returns required restrictions from a privilege attribute handle. 
  47819.  
  47820.  Format 
  47821.  
  47822.                     #include <dce/sec_cred.h>
  47823.  
  47824.                     sec_id_opt_req_t *sec_cred_get_req_restrictions(
  47825.                             sec_cred_pa_handle_t  callers_pas,
  47826.                             error_status_t  *status);
  47827.  
  47828.  Parameters 
  47829.  
  47830.           Input 
  47831.  
  47832.           callers_pas   A handle of type sec_cred_pa_handle_t to a principal's 
  47833.                         privilege attributes. This handle is supplied as output 
  47834.                         of either the sec_cred_get_initiator routine or 
  47835.                         sec_cred_get_delegate routine. 
  47836.  
  47837.           Output 
  47838.  
  47839.           status        A pointer to the completion status.  On successful 
  47840.                         completion, status is assigned error_status_ok. 
  47841.                         Otherwise, it returns sec_cred_s_invalid_pa_handle. 
  47842.  
  47843.  Usage 
  47844.  
  47845.           The sec_cred_get_req_restrictions routine extracts required 
  47846.           restrictions from the privilege attribute handle identified by 
  47847.           callers_pas and returns them in a sec_id_opt_req_t. 
  47848.  
  47849.           Before you run sec_cred_get_req_restrictions, you must run the 
  47850.           sec_cred_get_initiator or sec_cred_get_delegate routine to obtain a 
  47851.           sec_cred_pa_handle_t for the callers_pas parameter. 
  47852.  
  47853.  Related Information 
  47854.  
  47855.           Routines: 
  47856.           sec_cred_get_delegate 
  47857.           sec_cred_get_initiator 
  47858.  
  47859.  
  47860. ΓòÉΓòÉΓòÉ 8.2.19. sec_cred_get_tgt_restrictions ΓòÉΓòÉΓòÉ
  47861.  
  47862.  Purpose 
  47863.  
  47864.           Returns target restrictions from a privilege attribute handle. 
  47865.  
  47866.  Format 
  47867.  
  47868.                     #include <dce/sec_cred.h>
  47869.  
  47870.                     sec_id_restriction_set_t  *sec_cred_get_tgt_restrictions(
  47871.                             sec_cred_pa_handle_t  callers_pas,
  47872.                             error_status_t  *status);
  47873.  
  47874.  Parameters 
  47875.  
  47876.           Input 
  47877.  
  47878.           callers_pas   A handle of type sec_cred_pa_handle_t to a principal's 
  47879.                         privilege attributes. This handle is supplied as output 
  47880.                         of either the sec_cred_get_initiator routine or the 
  47881.                         sec_cred_get_delegate routine. 
  47882.  
  47883.           Output 
  47884.  
  47885.           status        A pointer to the completion status.  On successful 
  47886.                         completion, status is assigned error_status_ok. 
  47887.                         Otherwise, it returns sec_cred_s_invalid_pa_handle. 
  47888.  
  47889.  Usage 
  47890.  
  47891.           The sec_cred_get_tgt_restrictions routine extracts target 
  47892.           restrictions from the privilege attribute handle identified by 
  47893.           callers_pas and returns them in a sec_id_restriction_set_t. 
  47894.  
  47895.           Before you run sec_cred_get_tgt_restrictions, you must run the 
  47896.           sec_cred_get_initiator or sec_cred_get_delegate routine to obtain a 
  47897.           sec_cred_pa_handle_t for the callers_pas parameter. 
  47898.  
  47899.  Related Information 
  47900.  
  47901.           Routines: 
  47902.           sec_cred_get_delegate 
  47903.           sec_cred_get_initiator 
  47904.  
  47905.  
  47906. ΓòÉΓòÉΓòÉ 8.2.20. sec_cred_get_v1_pac ΓòÉΓòÉΓòÉ
  47907.  
  47908.  Purpose 
  47909.  
  47910.           Returns pre-1.1 PAC privilege attributes from a privilege attribute 
  47911.           handle. 
  47912.  
  47913.  Format 
  47914.  
  47915.                     #include <dce/sec_cred.h>
  47916.  
  47917.                     sec_id_pac_t *sec_cred_get_v1_pac(
  47918.                             sec_cred_pa_handle_t  callers_pas,
  47919.                             error_status_t  *status);
  47920.  
  47921.  Parameters 
  47922.  
  47923.           Input 
  47924.  
  47925.           callers_pas   A handle of type sec_cred_pa_handle_t to the 
  47926.                         principal's privilege attributes. This handle is 
  47927.                         supplied as output of either the sec_cred_get_initiator 
  47928.                         routine or the sec_cred_get_delegate routine. 
  47929.  
  47930.           Output 
  47931.  
  47932.           status        A pointer to the completion status.  On successful 
  47933.                         completion, status is assigned error_status_ok. 
  47934.  
  47935.  Usage 
  47936.  
  47937.           The sec_cred_get_v1_pac routine extracts the privilege attributes 
  47938.           from a pre-1.1 PAC for the privilege attribute handle specified by 
  47939.           callers_pas and returns them in a sec_id_pac_t. 
  47940.  
  47941.           Before you run sec_cred_get_v1_pac, you must run the 
  47942.           sec_cred_get_initiator or sec_cred_get_delegate routine to obtain a 
  47943.           sec_cred_pa_handle_t for the callers_pas parameter. 
  47944.  
  47945.  Related Information 
  47946.  
  47947.           Routines: 
  47948.           sec_cred_get_delegate 
  47949.           sec_cred_get_initiator 
  47950.  
  47951.  
  47952. ΓòÉΓòÉΓòÉ 8.2.21. sec_cred_initialize_attr_cursor ΓòÉΓòÉΓòÉ
  47953.  
  47954.  Purpose 
  47955.  
  47956.           Initialize a sec_cred_attr_cursor_t used by the 
  47957.           sec_cred_get_extended_attrs routine. 
  47958.  
  47959.  Format 
  47960.  
  47961.                     #include <dce/sec_cred.h>
  47962.  
  47963.                     void sec_cred_initialize_attr_cursor (
  47964.                            sec_cred_attr_cursor_t  *cursor,
  47965.                            error_status_t  *status);
  47966.  
  47967.  Parameters 
  47968.  
  47969.           Input/Output 
  47970.  
  47971.           cursor        As input, a pointer to a sec_cred_attr_cursor_t to be 
  47972.                         initialized. As output, a pointer to an initialized 
  47973.                         sec_cred_attr_cursor_t. 
  47974.  
  47975.           Output 
  47976.  
  47977.           status        A pointer to the completion status.  On successful 
  47978.                         completion, the routine returns error_status_ok. 
  47979.                         Otherwise, it returns sec_login_s_no_memory. 
  47980.  
  47981.  Usage 
  47982.  
  47983.           The sec_cred_initialize_attr_cursor routine allocates and initializes 
  47984.           a cursor of type sec_cred_attr_cursor_t for use with the 
  47985.           sec_cred_get_extended_attrs routine. Use the 
  47986.           sec_cred_free_attr_cursor routine to free the resources allocated to 
  47987.           cursor. 
  47988.  
  47989.  Related Information 
  47990.  
  47991.           Routines: 
  47992.           sec_cred_get_extended_attrs 
  47993.           sec_cred_free_attr_cursor 
  47994.  
  47995.  
  47996. ΓòÉΓòÉΓòÉ 8.2.22. sec_cred_initialize_cursor ΓòÉΓòÉΓòÉ
  47997.  
  47998.  Purpose 
  47999.  
  48000.           Initializes a sec_cred_cursor_t for use with the 
  48001.           sec_cred_get_delegate routine. 
  48002.  
  48003.  Format 
  48004.  
  48005.                     #include <dce/sec_cred.h>
  48006.  
  48007.                     void sec_cred_initialize_cursor (
  48008.                            sec_cred_cursor_t  *cursor,
  48009.                            error_status_t  *status);
  48010.  
  48011.  Parameters 
  48012.  
  48013.           Input/Output 
  48014.  
  48015.           cursor        As input, a sec_cred_cursor_t to be initialized. As 
  48016.                         output, an initialized sec_cred_cursor_t. 
  48017.  
  48018.           Output 
  48019.  
  48020.           status        A pointer to the completion status.  On successful 
  48021.                         completion, the routine returns error_status_ok. 
  48022.                         Otherwise, it returns the following error: 
  48023.  
  48024.                              sec_login_s_no_memory 
  48025.  
  48026.  Usage 
  48027.  
  48028.           The sec_cred_initialize_cursor routine initializes a cursor of type 
  48029.           sec_cred_cursor_t for use with the sec_cred_get_delegate routine. Use 
  48030.           the sec_cred_free_cursor routine to free the resources allocated to 
  48031.           cursor. 
  48032.  
  48033.  Related Information 
  48034.  
  48035.           Routines: 
  48036.           sec_cred_get_delegate 
  48037.           sec_cred_free_cursor 
  48038.  
  48039.  
  48040. ΓòÉΓòÉΓòÉ 8.2.23. sec_cred_inq_auth_service_info ΓòÉΓòÉΓòÉ
  48041.  
  48042.  Purpose 
  48043.  
  48044.           Returns information regarding the authentication and authorization 
  48045.           services used in an authenticated RPC. 
  48046.  
  48047.  Format 
  48048.  
  48049.                     #include <sec_cred.h>
  48050.  
  48051.                     void  sec_cred_inq_auth_service_info (
  48052.                              rpc_authz_cred_handle_t  callers_identity,
  48053.                              unsigned_char_p_t  *server_princ_name,
  48054.                              unsigned32  *authn_svc,
  48055.                              unsigned32  *authz_svc,
  48056.                              error_status_t  *error_status);
  48057.  
  48058.  Parameters 
  48059.  
  48060.           Input 
  48061.  
  48062.           callers_identity A credential handle of type rpc_authz_cred_handle_t. 
  48063.                         This parameter specifies the identity of the server's 
  48064.                         RPC client as obtained from the RPC runtime. This 
  48065.                         handle is supplied as output of the 
  48066.                         rpc_binding_inq_auth_caller call. 
  48067.  
  48068.           Output 
  48069.  
  48070.           server_princ_name A pointer of type unsigned_char_p_t to the server 
  48071.                         name to which the caller authenticated. 
  48072.  
  48073.           authn_svc     A pointer to the authentication service. 
  48074.  
  48075.           authz_svc     A pointer to the authorization service. 
  48076.  
  48077.           error_status  A pointer to the completion status. On successful 
  48078.                         completion, error_status_ok is returned. Otherwise, an 
  48079.                         error is returned. 
  48080.  
  48081.  Usage 
  48082.  
  48083.           The sec_cred_inquire_auth_service_info routine returns information 
  48084.           regarding the authentication and authorization services used in an 
  48085.           authenticated RPC. Before you execute this call, you must execute a 
  48086.           call to rpc_binding_inq_auth_caller to obtain an rpc_authz_handle_t 
  48087.           for the callers_identity parameter. 
  48088.  
  48089.  Related Information 
  48090.  
  48091.           Routines: 
  48092.           rpc_binding_inq_auth_caller 
  48093.  
  48094.  
  48095. ΓòÉΓòÉΓòÉ 8.2.24. sec_cred_is_authenticated ΓòÉΓòÉΓòÉ
  48096.  
  48097.  Purpose 
  48098.  
  48099.           Indicates whether credentials are authenticated. 
  48100.  
  48101.  Format 
  48102.  
  48103.                     #include <dce/sec_cred.h>
  48104.  
  48105.                     boolean32 sec_cred_is_authenticated(
  48106.                            rpc_authz_cred_handle_t  callers_identity,
  48107.                            error_status_t  *status);
  48108.  
  48109.  Parameters 
  48110.  
  48111.           Input 
  48112.  
  48113.           callers_identity A handle of type rpc_authz_cred_handle_t to the 
  48114.                         credentials to check for authentication. This handle is 
  48115.                         supplied as output of the rpc_binding_inq_auth_caller 
  48116.                         routine. 
  48117.  
  48118.           Output 
  48119.  
  48120.           status        A pointer to the completion status.  On successful 
  48121.                         completion, status is assigned error_status_ok. 
  48122.                         Otherwise, it returns sec_login_s_no_memory. 
  48123.  
  48124.  Usage 
  48125.  
  48126.           The sec_cred_is_authenticated routine returns TRUE if the credentials 
  48127.           identified by callers_identity are authenticated or FALSE if they are 
  48128.           not. 
  48129.  
  48130.           Before you run this call, you must run an rpc_binding_inq_auth_caller 
  48131.           call to obtain an rpc_authz_cred_handle_t for the callers_identity 
  48132.           parameter. 
  48133.  
  48134.  Return Values 
  48135.  
  48136.           The routine returns TRUE if the credentials are authenticated; FALSE 
  48137.           if they are not. 
  48138.  
  48139.  Related Information 
  48140.  
  48141.           Routines: 
  48142.           rpc_binding_inq_auth_caller 
  48143.  
  48144.  
  48145. ΓòÉΓòÉΓòÉ 8.3. DCE Extended Registry Attribute API ΓòÉΓòÉΓòÉ
  48146.  
  48147. There are two application programming interfaces that manipulate extended 
  48148. attributes: the DCE Attribute interface that creates attributes in a database 
  48149. of your choice and the extended registry attribute (ERA) interface that creates 
  48150. attributes in the registry database. 
  48151.  
  48152. The ERA interface (consisting of sec_rgy_attr routines) provides facilities for 
  48153. extending the Registry database by creating, maintaining, and viewing attribute 
  48154. types and instances, and providing information to and receiving it from outside 
  48155. attribute servers known as attribute triggers. ERA is the preferred API for 
  48156. Security schema and attribute manipulations. Application servers that manage 
  48157. legacy Security attributes or provide third-party processing of attributes 
  48158. stored in the registry database can export and implement the sec_attr_trig 
  48159. interface. Trigger servers are accessed through the sec_attr_trig interface by 
  48160. the Security client agent during certain sec_rgy_attr routines. The extended 
  48161. registry attribute interface uses the same binding mechanism as the Registry 
  48162. API. 
  48163.  
  48164. The DCE Attribute interface (consisting of dce_attr_sch routines) is provided 
  48165. for schema and attribute manipulation of data repositories other than the 
  48166. registry. Although similar to the ERA interface, the function of the DCE 
  48167. Attribute interface is limited to creating schema entries (attribute types). 
  48168. The interface does not provide routines to create and manipulate attribute 
  48169. instances or to access trigger servers. This interface is described in The DCE 
  48170. Routines. 
  48171.  
  48172. The Registry is a repository for principal, group, organization, and account 
  48173. data.  It stores the network privilege attributes used by DCE and the account 
  48174. data used by local operating systems. This local account data, however, is 
  48175. appropriate only for UNIX operating systems. The Extended Registry Attribute 
  48176. Facility provides a mechanism for extending the Registry schema to include data 
  48177. (attributes) required by or useful to operating systems other than UNIX. 
  48178.  
  48179. The ERA API provides the ability to define attribute types and to attach 
  48180. attribute instances to registry objects. Registry objects are nodes in the 
  48181. Registry database; access to them is controlled by an ACL manager type. The 
  48182. Registry objects are: 
  48183.  
  48184.    o  Principal 
  48185.    o  Group 
  48186.    o  Organization 
  48187.    o  Policy 
  48188.    o  Directory 
  48189.    o  Replist 
  48190.    o  Attr_schema 
  48191.  
  48192.  The ERA API also provides a trigger interface that application servers use to 
  48193.  integrate their attribute services with the ERA services. 
  48194.  
  48195.  See the following subtopics for more information: 
  48196.  
  48197.       Format 
  48198.       Data Types 
  48199.       Constants 
  48200.       Extended Registry Attribute Routines 
  48201.       Related Information 
  48202.  
  48203.  
  48204. ΓòÉΓòÉΓòÉ 8.3.1. Format ΓòÉΓòÉΓòÉ
  48205.  
  48206. #include <dce/sec_attr_base.h> 
  48207.  
  48208.  
  48209. ΓòÉΓòÉΓòÉ 8.3.2. Data Types ΓòÉΓòÉΓòÉ
  48210.  
  48211. The following data types are used in sec_rgy_attr routines: 
  48212.  
  48213.  sec_attr_twr_ref_t A pointer to a tower.  This data type is used with the 
  48214.            sec_attr_twr_set_t data type to allow a client to pass an 
  48215.            unallocated array of towers, which the server must allocate. Both 
  48216.            data types are used in conjunction with the sec_attr_bind_type_t 
  48217.            data type. 
  48218.  
  48219.  sec_attr_twr_set_t A structure that defines an array of towers. This data type 
  48220.            is used with the sec_attr_twr_ref_t data type to allow a client to 
  48221.            pass an unallocated array of towers, which the server must allocate. 
  48222.            Both data types are used in conjunction with the 
  48223.            sec_attr_bind_type_t data type. The sec_attr_twr_set_t structure 
  48224.            consists of the following elements: 
  48225.  
  48226.                 count     An unsigned 32-bit integer specifying the number of 
  48227.                           towers in the array. 
  48228.  
  48229.                 towers[]  An array of pointers (of type sec_attr_twr_ref_t) to 
  48230.                           towers. 
  48231.  
  48232.  sec_attr_bind_type_t A 32-bit integer that specifies the type of binding used 
  48233.            by an attribute interface.  The data type, which is used in 
  48234.            conjunction with the sec_attr_binding_t data type, uses the 
  48235.            following constants: 
  48236.  
  48237.                 sec_attr_bind_type_string An RPC string binding. 
  48238.  
  48239.                 sec_attr_bind_type_twrs A DCE protocol tower representation of 
  48240.                           a binding. 
  48241.  
  48242.                 sec_attr_bind_type_svrname A name in rpc_c_ns_syntax format 
  48243.                           that identifies a CDS entry containing the server's 
  48244.                           binding information. This constant has the following 
  48245.                           structure: 
  48246.  
  48247.                                name_syntax Must be rpc_c_ns_syntax_dce to 
  48248.                                          specify that DCE naming rules are used 
  48249.                                          to specify name. 
  48250.  
  48251.                                name      A pointer to a name of a CDS entry in 
  48252.                                          rpc_c_ns_syntax_dce syntax. 
  48253.  
  48254.  sec_attr_binding_t A discriminated union that supplies information to generate 
  48255.            a binding handle for an attribute trigger.  This data type, which is 
  48256.            used in conjunction with the sec_attr_bind_info_t data type, is 
  48257.            composed of the following elements: 
  48258.  
  48259.                 bind_type A value of type sec_attr_bind_type_t that defines the 
  48260.                           type of binding used by an attribute interface. The 
  48261.                           contents of tagged union depend on the value of 
  48262.                           sec_attr_bind_type_t. 
  48263.  
  48264.                 tagged_union A tagged union specifying the binding handle.  The 
  48265.                           contents of the tagged union depend on the value of 
  48266.                           bind_type as follows: 
  48267.  
  48268.                                If bind_type is...            Tagged_union is... 
  48269.  
  48270.                                sec_attr_bind_type_string     A pointer to an 
  48271.                                                              unsigned 32-bit 
  48272.                                                              character string 
  48273.                                                              specifying the 
  48274.                                                              attribute's RPC 
  48275.                                                              string binding. 
  48276.  
  48277.                                sec_attr_bind type_twrs       The attribute's 
  48278.                                                              tower binding 
  48279.                                                              representation of 
  48280.                                                              type 
  48281.                                                              sec_attr_twr_set_t. 
  48282.  
  48283.                                sec_attr_bind_svrname         A pointer to a 
  48284.                                                              name of type 
  48285.                                                              sec_attr_bind_type_t 
  48286.                                                              that specifies a 
  48287.                                                              Cell Directory 
  48288.                                                              Service entry 
  48289.                                                              containing the 
  48290.                                                              attribute 
  48291.                                                              trigger's binding 
  48292.                                                              information. 
  48293.  
  48294.  sec_attr_binding_p_t A pointer to a sec_attr_binding_t union. 
  48295.  
  48296.  sec_attr_bind_auth_info_type_t An enumeration that defines whether the binding 
  48297.            is authenticated.  This data type is used in conjunction with the 
  48298.            sec_attr_bind_auth_info_t data type to set up the authorization 
  48299.            method and parameters for an RPC binding. The 
  48300.            sec_attr_bind_auth_info_type_t type consists of the following 
  48301.            elements: 
  48302.  
  48303.                 sec_attr_bind_auth_none The binding is not authenticated. 
  48304.  
  48305.                 sec_attr_bind_auth_dce The binding uses DCE shared-secret key 
  48306.                           authentication. 
  48307.  
  48308.  sec_attr_bind_auth_info_t A discriminated union that defines authorization and 
  48309.            authentication parameters for a binding.  This data type is used in 
  48310.            conjunction with the sec_attr_bind_auth_info_type_t data type to set 
  48311.            up the authorization method and parameters for an RPC binding.  The 
  48312.            sec_attr_bind_auth_info_t data type consists of the following 
  48313.            elements: 
  48314.  
  48315.                 info_type A sec_attr_bind_auth_info_type_t data type that 
  48316.                           specifies whether the binding is authenticated. The 
  48317.                           contents of tagged_union depend on the value of 
  48318.                           sec_attr_bind_auth_info_type_t. 
  48319.  
  48320.                 tagged_union A tagged union specifying the method of 
  48321.                           authorization and the authorization parameters.  For 
  48322.                           unauthenticated bindings 
  48323.                           (sec_attr_bind_auth_info_type_t = 
  48324.                           sec_attr_bind_auth_none), no parameters are supplied. 
  48325.                           For authenticated bindings 
  48326.                           (sec_attr_bind_auth_info_type_t = 
  48327.                           sec_attr_bind_auth_dce), the following union is 
  48328.                           supplied: 
  48329.  
  48330.                                svr_princ_name A pointer to a character string 
  48331.                                          that specifies the principal name of 
  48332.                                          the server referenced by the binding 
  48333.                                          handle. 
  48334.  
  48335.                                protect_level An unsigned 32-bit integer 
  48336.                                          indicating the protection level for 
  48337.                                          RPC calls made using the server 
  48338.                                          binding handle.  The protection level 
  48339.                                          determines the degree that 
  48340.                                          authenticated communications between 
  48341.                                          the client and the server are 
  48342.                                          protected by the authentication 
  48343.                                          service specified by authn_svc. 
  48344.  
  48345.                                          If the RPC runtime or the RPC protocol 
  48346.                                          in the bound protocol sequence does 
  48347.                                          not support a specified level, the 
  48348.                                          level is automatically upgraded to the 
  48349.                                          next higher supported level. The 
  48350.                                          possible protection levels are as 
  48351.                                          follows: 
  48352.  
  48353.                                               rpc_c_protect_level_default Uses 
  48354.                                                         the default protection 
  48355.                                                         level for the specified 
  48356.                                                         authentication service. 
  48357.                                                         The default protection 
  48358.                                                         level for DCE 
  48359.                                                         shared-secret key 
  48360.                                                         authentication is 
  48361.                                                         rpc_c_protect_level_pkt_value. 
  48362.  
  48363.                                               rpc_c_protect_level_none Performs 
  48364.                                                         no authentication: 
  48365.                                                         tickets are not 
  48366.                                                         exchanged, session keys 
  48367.                                                         are not established, 
  48368.                                                         client PACs or names 
  48369.                                                         are not certified, and 
  48370.                                                         transmissions are in 
  48371.                                                         the clear. Note that 
  48372.                                                         although uncertified 
  48373.                                                         PACs should not be 
  48374.                                                         trusted, they can be 
  48375.                                                         useful for debugging, 
  48376.                                                         tracing, and measuring 
  48377.                                                         purposes. 
  48378.  
  48379.                                               rpc_c_protect_level_connect 
  48380.                                                         Authenticates only when 
  48381.                                                         the client establishes 
  48382.                                                         a relationship with the 
  48383.                                                         server. 
  48384.  
  48385.                                               rpc_c_protect_level_call 
  48386.                                                         Authenticates only at 
  48387.                                                         the beginning of each 
  48388.                                                         remote procedure call 
  48389.                                                         when the server 
  48390.                                                         receives the request. 
  48391.  
  48392.                                                         This level does not 
  48393.                                                         apply to remote 
  48394.                                                         procedure calls made 
  48395.                                                         over a connection-based 
  48396.                                                         protocol sequence (that 
  48397.                                                         is, ncacn_ip_tcp).  If 
  48398.                                                         this level is specified 
  48399.                                                         and the binding handle 
  48400.                                                         uses a connection-based 
  48401.                                                         protocol sequence, the 
  48402.                                                         routine uses the 
  48403.                                                         rpc_c_protect_level_pkt 
  48404.                                                         level instead. 
  48405.  
  48406.                                               rpc_c_protect_level_pkt Ensures 
  48407.                                                         that all data received 
  48408.                                                         is from the expected 
  48409.                                                         client. 
  48410.  
  48411.                                               rpc_c_protect_level_pkt_integ 
  48412.                                                         Ensures and verifies 
  48413.                                                         that none of the data 
  48414.                                                         transferred between 
  48415.                                                         client and server has 
  48416.                                                         been modified.  This is 
  48417.                                                         the highest protection 
  48418.                                                         level that is 
  48419.                                                         guaranteed as present 
  48420.                                                         in the RPC runtime. 
  48421.  
  48422.                                               rpc_c_protect_level_pkt_privacy 
  48423.                                                         Authenticates as 
  48424.                                                         specified by all of the 
  48425.                                                         previous levels and 
  48426.                                                         also encrypts each RPC 
  48427.                                                         argument value.  This 
  48428.                                                         is the highest 
  48429.                                                         protection level, but 
  48430.                                                         is not guaranteed as 
  48431.                                                         present in the RPC 
  48432.                                                         runtime. 
  48433.  
  48434.                                authn_svc Specifies the authentication service 
  48435.                                          to use.  The exact level of protection 
  48436.                                          provided by the authentication service 
  48437.                                          is specified by protect_level. The 
  48438.                                          supported authentication services are 
  48439.                                          as follows: 
  48440.  
  48441.                                               rpc_c_authn_none No 
  48442.                                                         authentication:  no 
  48443.                                                         tickets are exchanged, 
  48444.                                                         no session keys 
  48445.                                                         established, client 
  48446.                                                         PACs or names are not 
  48447.                                                         transmitted, and 
  48448.                                                         transmissions are in 
  48449.                                                         the clear. Specify 
  48450.                                                         rpc_c_authn_none to 
  48451.                                                         turn authentication off 
  48452.                                                         for remote procedure 
  48453.                                                         calls made using this 
  48454.                                                         binding. 
  48455.  
  48456.                                               rpc_c_authn_dce_secret DCE 
  48457.                                                         shared-secret key 
  48458.                                                         authentication. 
  48459.  
  48460.                                               rpc_c_authn_default Default 
  48461.                                                         authentication service. 
  48462.                                                         The current default 
  48463.                                                         authentication service 
  48464.                                                         is DCE shared-secret 
  48465.                                                         key; therefore, 
  48466.                                                         specifying 
  48467.                                                         rpc_c_authn_default is 
  48468.                                                         equivalent to 
  48469.                                                         specifying 
  48470.                                                         rpc_c_authn_dce_secret. 
  48471.  
  48472.                                               rpc_c_authn_dce_public DCE public 
  48473.                                                         key authentication 
  48474.                                                         (reserved for future 
  48475.                                                         use). 
  48476.  
  48477.                                authz_svc Specifies the authorization service 
  48478.                                          implemented by the server for the 
  48479.                                          interface. The validity and 
  48480.                                          trustworthiness of authorization data, 
  48481.                                          as with any application data, is 
  48482.                                          dependent on the authentication 
  48483.                                          service and protection level 
  48484.                                          specified. The supported authorization 
  48485.                                          services are: 
  48486.  
  48487.                                               rpc_c_authz_none Server performs 
  48488.                                                         no authorization.  This 
  48489.                                                         is valid only if 
  48490.                                                         authn_svc is set to 
  48491.                                                         rpc_c_authn_none, 
  48492.                                                         specifying that no 
  48493.                                                         authentication is being 
  48494.                                                         performed. 
  48495.  
  48496.                                               rpc_c_authz_name Server performs 
  48497.                                                         authorization based on 
  48498.                                                         the client principal 
  48499.                                                         name. This value cannot 
  48500.                                                         be used if authn_svc is 
  48501.                                                         rpc_c_authn_none. 
  48502.  
  48503.                                               rpc_c_authz_dce Server performs 
  48504.                                                         authorization using the 
  48505.                                                         client's DCE PAC sent 
  48506.                                                         to the server with each 
  48507.                                                         remote procedure call 
  48508.                                                         made with this binding. 
  48509.                                                         Generally, access is 
  48510.                                                         checked against DCE 
  48511.                                                         ACLs. 
  48512.  
  48513.  sec_attr_bind_info_t A structure that specifies attribute trigger binding 
  48514.            information. This data type, which is used in conjunction with the 
  48515.            sec_attr_schema_entry_t data type, contains the following elements: 
  48516.  
  48517.                 auth_info The binding authorization information of type 
  48518.                           sec_attr_bind_auth_info_t. 
  48519.  
  48520.                 num_bindings An unsigned 32-bit integer specifying the number 
  48521.                           of binding handles in the bindings array. 
  48522.  
  48523.                 bindings[] An array of sec_attr_binding_t data types that 
  48524.                           specify binding handles. 
  48525.  
  48526.  sec_attr_bind_info_p_t A pointer to a sec_attr_bind_info_t union. 
  48527.  
  48528.  sec_attr_encoding_t An enumerator that contains attribute encoding tags used 
  48529.            to define the legal encodings for attribute values. The data type, 
  48530.            which is used in conjunction with the sec_attr_value_t and 
  48531.            sec_attr_schema_entry_t data types, consists of the following 
  48532.            elements: 
  48533.  
  48534.                 sec_attr_enc_any The attribute value can be of any legal 
  48535.                           encoding type. This encoding tag is legal in a schema 
  48536.                           entry only. An attribute entry must contain a 
  48537.                           concrete encoding type. 
  48538.  
  48539.                           Note:  This encoding type is not implemented in this 
  48540.                                  release. 
  48541.  
  48542.                 sec_attr_enc_void The attribute has no value.  It is a marker 
  48543.                           that is either present or absent. 
  48544.  
  48545.                 sec_attr_enc_printstring The attribute value is a printable IDL 
  48546.                           string in the DCE Portable Character Set. 
  48547.  
  48548.                 sec_attr_enc_printstring_array The attribute value is an array 
  48549.                           of print strings. 
  48550.  
  48551.                 sec_attr_enc_integer The attribute value is a signed 32-bit 
  48552.                           integer. 
  48553.  
  48554.                 sec_attr_enc_bytes The attribute value is a string of bytes. 
  48555.                           The string is assumed to be a pickle or some other 
  48556.                           self-describing type.  (See also the 
  48557.                           sec_attr_enc_bytes_t data type.) 
  48558.  
  48559.                 sec_attr_enc_confidential_bytes The attribute value is a string 
  48560.                           of bytes that have been encrypted in the key of the 
  48561.                           principal object to which the attribute is attached. 
  48562.                           The string is assumed to be a pickle or some other 
  48563.                           self-describing type. This encoding type is useful 
  48564.                           only when attached to a principal object, where it is 
  48565.                           decrypted and encrypted each time the principal's 
  48566.                           password changes. (See also the sec_attr_enc_bytes_t 
  48567.                           data type.) 
  48568.  
  48569.                 sec_attr_enc_i18n_data The attribute value is an 
  48570.                           "internationalized" string of bytes with a tag 
  48571.                           identifying the OSF-registered codeset used to encode 
  48572.                           the data. (See also the sec_attr_i18n_data_t data 
  48573.                           type.) 
  48574.  
  48575.                 sec_attr_enc_uuid The attribute is a value of type uuid_t, a 
  48576.                           DCE UUID. 
  48577.  
  48578.                 sec_attr_enc_attr_set The attribute value is an attribute set, 
  48579.                           a vector of attribute UUIDs used to associate 
  48580.                           multiple related attribute instances that are members 
  48581.                           of the set. (See also the sec_attr_enc_attr_set_t 
  48582.                           data type.) 
  48583.  
  48584.                 sec_attr_enc_binding The attribute value is a 
  48585.                           sec_attr_bind_info_t data type that specifies DCE 
  48586.                           server binding information. 
  48587.  
  48588.                 sec_attr_enc_trig_binding This encoding type is returned by the 
  48589.                           rs_attr_lookup routine. It informs the client agent 
  48590.                           of the trigger binding information of an attribute 
  48591.                           with a query trigger. 
  48592.  
  48593.            Unless sec_attr_enc_void or sec_attr_enc_any is specified, the 
  48594.            attribute values must conform to the attribute's encoding type. 
  48595.  
  48596.  sec_attr_enc_bytes_t A structure that defines the length of attribute encoding 
  48597.            values for attributes encoded as sec_attr_enc_bytes and 
  48598.            sec_attr_enc_confidential_bytes. The structure, which is used in 
  48599.            conjunction with the sec_attr_value_t data type, consists of: 
  48600.  
  48601.                 length    An unsigned 32-bit integer that defines the data 
  48602.                           length. 
  48603.  
  48604.                 data[]    An array of bytes specifying the length of attribute 
  48605.                           encoding data. 
  48606.  
  48607.  sec_attr_i18n_data_t A structure that defines the codeset used for attributes 
  48608.            encoded as sec_attr_enc_il8n_data and the length of the attribute 
  48609.            encoding values. The structure, which is used in conjunction with 
  48610.            the sec_attr_value_t data type, consists of: 
  48611.  
  48612.                 codeset   An unsigned 32-bit identifier of a codeset registered 
  48613.                           with the Open Software Foundation. 
  48614.  
  48615.                 length    An unsigned 32-bit integer that defines the data 
  48616.                           length. 
  48617.  
  48618.                 data[]    An array of bytes specifying the length of attribute 
  48619.                           encoding data. 
  48620.  
  48621.  sec_attr_enc_attr_set_t A structure that supplies the UUIDs of each member of 
  48622.            an attribute set. The structure, which is used in conjunction with 
  48623.            the sec_attr_value_t data type, consists of: 
  48624.  
  48625.                 num_members An unsigned 32-bit integer specifying the total 
  48626.                           number of attributes in the set. 
  48627.  
  48628.                 members[] An array containing values of type uuid_t, the UUID 
  48629.                           of each member in the set. 
  48630.  
  48631.  sec_attr_enc_printstring_t A structure that contains a print string. 
  48632.  
  48633.  sec_attr_enc_printstring_p_t A pointer to a sec_attr_enc_printstring_t 
  48634.            structure. 
  48635.  
  48636.  sec_attr_enc_str_array_t A structure that defines a print string array.  It 
  48637.            consists of: 
  48638.  
  48639.                 num_strings An unsigned 32-bit integer specifying the number of 
  48640.                           strings in the array. 
  48641.  
  48642.                 strings[] An array of pointers (of type 
  48643.                           sec_attr_enc_print_string_p_t) to print strings. 
  48644.  
  48645.  sec_attr_value_t A discriminated union that defines attribute values.  The 
  48646.            union, which is used in conjunction with the sec_attr_t data type, 
  48647.            consists of the following elements: 
  48648.  
  48649.                 attr_encoding A sec_attr_encoding_t data type that defines 
  48650.                           attribute encoding.  The contents of tagged union 
  48651.                           depend on the value of sec_attr_encoding_t. 
  48652.  
  48653.                 tagged_union A tagged union whose contents depend on 
  48654.                           attr_encoding as follows: 
  48655.  
  48656.                                If attr_encoding is...        Tagged_union is... 
  48657.  
  48658.                                sec_attr_enc_void             NULL 
  48659.  
  48660.                                sec_attr_enc_printstring      A pointer to 
  48661.                                                              printstring 
  48662.  
  48663.                                sec_attr_enc_printstring_array A pointer to 
  48664.                                                              string_array, an 
  48665.                                                              array of print 
  48666.                                                              strings 
  48667.  
  48668.                                sec_attr_enc_integer          signed_int, a 
  48669.                                                              32-bit signed 
  48670.                                                              integer 
  48671.  
  48672.                                sec_attr_enc_bytes            bytes, a pointer 
  48673.                                                              to a structure of 
  48674.                                                              type 
  48675.                                                              sec_attr_enc_bytes_t 
  48676.  
  48677.                                sec_attr_enc_confidential_bytes bytes, a pointer 
  48678.                                                              to a structure of 
  48679.                                                              type 
  48680.                                                              sec_attr_enc_bytes_t 
  48681.  
  48682.                                sec_attr_enc_i18n_data        idata, a pointer 
  48683.                                                              to a structure of 
  48684.                                                              type 
  48685.                                                              sec_attr_i18n_data_t 
  48686.  
  48687.                                sec_attr_end_uuid             uuid, a value of 
  48688.                                                              type uuid_t 
  48689.  
  48690.                                sec_attr_enc_attr_set         attr_set, a 
  48691.                                                              pointer to a 
  48692.                                                              structure of type 
  48693.                                                              sec_attr_enc_attr_set_t 
  48694.  
  48695.                                sec_attr_enc_binding          binding, a pointer 
  48696.                                                              to a structure of 
  48697.                                                              type 
  48698.                                                              sec_attr_binding_info_t 
  48699.  
  48700.  sec_attr_t A structure that defines an attribute.  The structure consists of: 
  48701.  
  48702.                 attr_id   A value of type uuid_t, the UUID of the attribute. 
  48703.  
  48704.                 attr_value A value of type sec_attr_value_t. 
  48705.  
  48706.  sec_attr_acl_mgr_info_t A structure that contains the access control 
  48707.            information defined in a schema entry for an attribute. The 
  48708.            structure, which is used in conjunction with the 
  48709.            sec_attr_schema_entry_t data type, consists of the following 
  48710.            elements: 
  48711.  
  48712.                 acl_mgr_type The value of type uuid_t that specifies the UUID 
  48713.                           of the ACL manager type that supports the object type 
  48714.                           to which the attribute can be attached.  This field 
  48715.                           provides a well defined context for evaluating the 
  48716.                           permission bits needed to operate on the attribute. 
  48717.                           The following table lists the ACL Manager types for 
  48718.                           registry objects: 
  48719.  
  48720.                                                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  48721.                                                     Γöé REGISTRY OBJECT Γöé ACL MANAGER TYPE          Γöé VALID PERMIS-  Γöé
  48722.                                                     Γöé TYPE       Γöé                  Γöé SIONS      Γöé
  48723.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  48724.                                                     Γöé principal    Γöé 06ab9320-0191-11ca-a9e8-08001e039dΓöédrcDnfmaug    Γöé
  48725.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  48726.                                                     Γöé group      Γöé 06ab9640-0191-11ca-a9e8-08001e039dΓöédrctDnfmM    Γöé
  48727.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  48728.                                                     Γöé organization   Γöé 06ab9960-0191-11ca-a9e8-08001e039dΓöédrctDnfmM    Γöé
  48729.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  48730.                                                     Γöé directory    Γöé 06ab9c80-0191-11ca-a9e8-08001e039dΓöédrcidDn     Γöé
  48731.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  48732.                                                     Γöé policy      Γöé 06ab8f10-0191-11ca-a9e8-08001e039dΓöédrcma      Γöé
  48733.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  48734.                                                     Γöé replist     Γöé 2ac24970-60c3-11cb-b261-08001e039dΓöédcidmAI     Γöé
  48735.                                                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  48736.  
  48737.                 query_permset Data of type sec_acl_permset_t that defines the 
  48738.                           permission bits needed to access the attribute's 
  48739.                           value. 
  48740.  
  48741.                 update_permset Data of type sec_acl_permset_t that defines the 
  48742.                           permission bits needed to update the attribute's 
  48743.                           value. 
  48744.  
  48745.                 test_permset Data of type sec_acl_permset_t that defines the 
  48746.                           permission bits needed to test the attribute's value. 
  48747.  
  48748.                 delete_permset Data of type sec_acl_permset_t that defines the 
  48749.                           permission bits needed to delete an attribute 
  48750.                           instance. 
  48751.  
  48752.  sec_attr_acl_mgr_info_p_t A pointer to a sec_attr_acl_mgr_info_t structure. 
  48753.  
  48754.  sec_attr_acl_mgr_info_set_t A structure that defines the attribute's ACL 
  48755.            manager set.  The structure consists of the following elements: 
  48756.  
  48757.                 num_acl_mgrs An unsigned 32-bit integer that specifies the 
  48758.                           number of ACL managers in the ACL manager set. 
  48759.  
  48760.                 mgr_info[] An array of pointers of type sec_attr_mgr_info_p_t 
  48761.                           that define the ACL manager types in the ACL manager 
  48762.                           set and the permission sets associated with the ACL 
  48763.                           manager type. 
  48764.  
  48765.  sec_attr_intercell_action_t An enumerator that specifies the action that 
  48766.            should be taken by the Privilege Service when it reads acceptable 
  48767.            attributes from a foreign cell.  A foreign attribute is acceptable 
  48768.            only if there is either a schema entry for the foreign cell or if 
  48769.            sec_attr_intercell_act_accept is set to TRUE. 
  48770.  
  48771.            This enumerator, which is used in conjunction with the 
  48772.            sec_attr_schema_entry_t data type, is composed of the following 
  48773.            elements: 
  48774.  
  48775.                 sec_attr_intercell_act_accept If the unique flag in the 
  48776.                           sec_attr_schema_entry_t data type is not set on, 
  48777.                           retain the attribute.  If the unique flag is set on, 
  48778.                           retain the attribute only if its value is unique 
  48779.                           among all attribute instances of the same attribute 
  48780.                           type within the cell. 
  48781.  
  48782.                 sec_attr_intercell_act_reject Discard the input attribute. 
  48783.  
  48784.                 sec_attr_intercell_act_evaluate Use the binding information in 
  48785.                           the trig_binding field of this 
  48786.                           sec_attr_schema_entry_t data type to make a 
  48787.                           sec_attr_trig_query call to a trigger server.  That 
  48788.                           server determines whether to retain the attribute 
  48789.                           value, discard the attribute value, or map the 
  48790.                           attribute to another value or values). 
  48791.  
  48792.  sec_attr_trig_type_t Specifies the trigger type, a flag that determines 
  48793.            whether an attribute trigger should be used for query operations. 
  48794.            The data type, which is used in conjunction with the 
  48795.            sec_attr_schema_entry_t data type, uses the following constants: 
  48796.  
  48797.                 sec_attr_trig_type_query The attribute trigger server is used 
  48798.                           for query operations. 
  48799.  
  48800.                 sec_attr_trig_type_update The attribute trigger server is used 
  48801.                           for update operations. 
  48802.  
  48803.                 sec_attr_trig_type_none The default. There is no attribute 
  48804.                           trigger server associated with this schema entry. 
  48805.  
  48806.  sec_attr_schema_entry_t A structure that defines a complete attribute entry 
  48807.            for the schema catalog. The entry is identified by both a unique 
  48808.            string name and a unique attribute UUID. Although either can be used 
  48809.            as a retrieval key, the string name should be used for interactive 
  48810.            access to the attribute and the UUID for access by applications. The 
  48811.            attribute UUID is used to identify the semantics defined for the 
  48812.            attribute type in the schema. 
  48813.  
  48814.            The sec_attr_schema_entry_t data type consists of the following 
  48815.            elements: 
  48816.  
  48817.                 attr_name A pointer to the attribute name. 
  48818.  
  48819.                 attr_id   A value of type uuid_t that identifies the attribute 
  48820.                           type. 
  48821.  
  48822.                 attr_encoding An enumerator of type sec_attr_encoding_t that 
  48823.                           specifies the attribute's encoding. 
  48824.  
  48825.                 acl_mgr_set A structure of type sec_attr_acl_mgr_info_set_t 
  48826.                           that specifies the ACL manager types that support the 
  48827.                           objects on which attributes of this type can be 
  48828.                           created and the permission bits supported. 
  48829.  
  48830.                 schema_entry_flags An unsigned integer of type 
  48831.                           sec_attr_sch_entry_flags_t that defines bitsets for 
  48832.                           the following flags: 
  48833.  
  48834.                                unique    When set to on, this flag indicates 
  48835.                                          that each instance of this attribute 
  48836.                                          type must have a unique value within 
  48837.                                          the cell for the object type implied 
  48838.                                          by the ACL Manager type. If this flag 
  48839.                                          is not set to on, uniqueness checks 
  48840.                                          are not performed for attribute 
  48841.                                          writes. 
  48842.  
  48843.                                multi_valued When set to on, this flag indicates 
  48844.                                          that this attribute type can be 
  48845.                                          multivalued; in other words, multiple 
  48846.                                          instances of the same attribute type 
  48847.                                          can be attached to a single registry 
  48848.                                          object. If this flag is not set to on, 
  48849.                                          only one instance of this attribute 
  48850.                                          type can be attached to an object. 
  48851.  
  48852.                                reserved  When set to on, this flag prevents the 
  48853.                                          schema entry from being deleted 
  48854.                                          through any interface or by any user. 
  48855.                                          If this flag is not set to on, the 
  48856.                                          entry can be deleted by any authorized 
  48857.                                          principal. 
  48858.  
  48859.                                use_defaults When set to on, the system-defined 
  48860.                                          default attribute value is returned on 
  48861.                                          a client query if an instance of this 
  48862.                                          attribute does not exist on the 
  48863.                                          queried object. If this flag is not 
  48864.                                          set to on, system defaults are not 
  48865.                                          used. 
  48866.  
  48867.                 intercell_action An enumerator of type 
  48868.                           sec_attr_intercell_action_t that specifies how the 
  48869.                           Privilege Service handles attributes from a foreign 
  48870.                           cell. 
  48871.  
  48872.                 trig_types A flag of type sec_attr_trig_type_t that specifies 
  48873.                           whether a trigger can perform update or query 
  48874.                           operations. 
  48875.  
  48876.                 trig_binding A pointer to a structure of type 
  48877.                           sec_attr_bind_info_t that supplies the attribute 
  48878.                           trigger binding handle. 
  48879.  
  48880.                 scope     A pointer to a string that defines the objects to 
  48881.                           which the attribute can be attached. 
  48882.  
  48883.                 comment   A pointer to a string that contains general comments 
  48884.                           about the attribute. 
  48885.  
  48886.  sec_attr_schema_entry_parts_t A 32-bit bitset containing flags that specify 
  48887.            the schema entry fields that can be modified on a schema entry 
  48888.            update operation.  This data type contains the following flags: 
  48889.  
  48890.                 sec_attr_schema_part_name If set, indicates that the attribute 
  48891.                           name (attr_name) can be changed. 
  48892.  
  48893.                 sec_attr_schema_part_reserved If set, indicates that the 
  48894.                           setting of the reserved flag, which determines 
  48895.                           whether the schema entry can be deleted, can be 
  48896.                           changed. 
  48897.  
  48898.                 sec_attr_schema_part_defaults If set, indicates that the 
  48899.                           use_defaults flag, which determines whether a query 
  48900.                           for a nonexistent attribute does not result in a 
  48901.                           search for a system default, can be changed. 
  48902.  
  48903.                 sec_attr_schema_part_trig_bind If set, indicates that the 
  48904.                           trigger's binding information (trig_binding) can be 
  48905.                           changed. 
  48906.  
  48907.                 sec_attr_schema_part_comment If set, indicates whether comments 
  48908.                           associated with the schema entry (comment) can be 
  48909.                           changed. 
  48910.  
  48911.  sec_attr_component_name_t A pointer to a character string used to further 
  48912.            specify the object to which the attribute is attached. (Note that 
  48913.            this data type is analogous to the sec_acl_component_name_t data 
  48914.            type in the ACL interface.) 
  48915.  
  48916.  sec_attr_cursor_t A structure that provides a pointer into a registry database 
  48917.            and is used for multiple database operations. 
  48918.  
  48919.            This cursor must minimally represent the object indicated by 
  48920.            xattrschema in the schema interfaces, or component_name in the 
  48921.            attribute interfaces.  The cursor can additionally represent an 
  48922.            entry within that schema or an attribute instance on that component. 
  48923.  
  48924.  sec_attr_srch_cursor_t A structure that provides a pointer into a registry 
  48925.            database and is used for multiple database operations.  The cursor 
  48926.            must minimally represent the list of all objects managed by this 
  48927.            server that possess the search attributes specified in the 
  48928.            sec_attr_srch_cursor_init routine.  It can additionally represent a 
  48929.            given object within this list, as well as attribute instances 
  48930.            possessed by that object. 
  48931.  
  48932.  sec_attr_trig_cursor_t A structure that provides an attribute trigger cursor 
  48933.            for interactive operations.  The structure consists of the following 
  48934.            elements: 
  48935.  
  48936.                 source    A value of type uuid_t that provides a UUID to 
  48937.                           identify the server that initialized the cursor. 
  48938.  
  48939.                 object_handle A signed 32-bit integer that identifies the 
  48940.                           object (specified by xattrschema in the schema 
  48941.                           interface or component_name in the attribute 
  48942.                           interface) upon which the operation is being 
  48943.                           performed. 
  48944.  
  48945.                 entry_handle A signed 32-bit integer that identifies the 
  48946.                           current entry (schema_entry in the schema interface 
  48947.                           or attribute instance in the attribute interface) for 
  48948.                           the operation. 
  48949.  
  48950.                 valid     A boolean field with the following values: 
  48951.  
  48952.                                TRUE  (1) Indicates an initialized cursor. 
  48953.                                FALSE (0) Indicates an uninitialized cursor. 
  48954.  
  48955.  sec_attr_trig_timeval_sec_t A 32-bit integer containing the seconds portion of 
  48956.            a UNIX timeval_t structure, to be used when expressing absolute 
  48957.            dates. 
  48958.  
  48959.  
  48960. ΓòÉΓòÉΓòÉ 8.3.3. Constants ΓòÉΓòÉΓòÉ
  48961.  
  48962. The following constants are used in sec_attr calls: 
  48963.  
  48964.  sec_attr_bind_auth_dce The binding uses DCE shared-secret key authentication. 
  48965.  
  48966.  sec_attr_bind_auth_none The binding is not authenticated. 
  48967.  
  48968.  sec_attr_bind_type_string The attribute uses an RPC string binding. 
  48969.  
  48970.  sec_attr_bind_type_svrname The attribute uses a name in rpc_c_ns_syntax format 
  48971.            that identifies a CDS entry containing the server's binding 
  48972.            information. This constant has the following structure: 
  48973.  
  48974.                 name_syntax Must be rpc_c_ns_syntax_dce to specify that DCE 
  48975.                           naming rules are used to specify name. 
  48976.  
  48977.                 name      A pointer to a name of a CDS entry in 
  48978.                           rpc_c_ns_syntax_dce syntax. 
  48979.  
  48980.  sec_attr_bind_type_twr The attribute uses a DCE protocol tower binding 
  48981.            representation. 
  48982.  
  48983.  
  48984. ΓòÉΓòÉΓòÉ 8.3.4. Extended Registry Attribute Routines ΓòÉΓòÉΓòÉ
  48985.  
  48986. Following is a list of the ERA API routines: 
  48987.  
  48988.       priv_attr_trig_query 
  48989.       sec_attr_trig_update 
  48990.       sec_attr_util_alloc_copy 
  48991.       sec_attr_util_free 
  48992.       sec_attr_util_inst_free 
  48993.       sec_attr_util_inst_free_ptrs 
  48994.       sec_attr_util_sch_ent_free 
  48995.       sec_attr_util_sch_ent_free_ptrs 
  48996.       sec_attr_util_sch_free_acl_mgrs 
  48997.       sec_attr_util_sch_free_binding 
  48998.       sec_rgy_attr_cursor_alloc 
  48999.       sec_rgy_attr_cursor_init 
  49000.       sec_rgy_attr_cursor_release 
  49001.       sec_rgy_attr_cursor_reset 
  49002.       sec_rgy_attr_delete 
  49003.       sec_rgy_attr_get_effective 
  49004.       sec_rgy_attr_lookup_by_id 
  49005.       sec_rgy_attr_lookup_by_name 
  49006.       sec_rgy_attr_lookup_no_expand 
  49007.       sec_rgy_attr_sch_aclmgr_strings 
  49008.       sec_rgy_attr_sch_create_entry 
  49009.       sec_rgy_attr_sch_cursor_alloc 
  49010.       sec_rgy_attr_sch_cursor_init 
  49011.       sec_rgy_attr_sch_cursor_release 
  49012.       sec_rgy_attr_sch_cursor_reset 
  49013.       sec_rgy_attr_sch_delete_entry 
  49014.       sec_rgy_attr_sch_get_acl_mgrs 
  49015.       sec_rgy_attr_sch_lookup_by_id 
  49016.       sec_rgy_attr_sch_lookup_by_name 
  49017.       sec_rgy_attr_sch_scan 
  49018.       sec_rgy_attr_sch_update_entry 
  49019.       sec_rgy_attr_test_and_update 
  49020.       sec_rgy_attr_update 
  49021.  
  49022.  
  49023. ΓòÉΓòÉΓòÉ 8.3.5. Related Information ΓòÉΓòÉΓòÉ
  49024.  
  49025. Files: 
  49026. \usr\include\dce\sec_attr_base.idl - The idl file from which sec_attr_base.h 
  49027. was derived. 
  49028.  
  49029.  
  49030. ΓòÉΓòÉΓòÉ 8.3.6. priv_attr_trig_query ΓòÉΓòÉΓòÉ
  49031.  
  49032.  Purpose 
  49033.  
  49034.           Retrieves attributes stored by a trigger server for a specified 
  49035.           principal for inclusion in the principal's EPAC. 
  49036.  
  49037.  Format 
  49038.  
  49039.                     #include <dce/priv_attr_trig.h>
  49040.  
  49041.                     void priv_attr_trig_query (
  49042.                              handle_t  h,
  49043.                              sec_id_foreign_t  principal,
  49044.                              unsigned32  num_upstream_delegates,
  49045.                              sec_id_foreign_t  upstream_delegates[],
  49046.                              priv_attr_trig_cursor_t  *cursor,
  49047.                              unsigned32  num_attr_keys,
  49048.                              unsigned32  space_avail,
  49049.                              sec_attr_t  attr_keys[],
  49050.                              unsigned32  *num_returned,
  49051.                              sec_attr_t  attrs[],
  49052.                              priv_attr_trig_timeval_sec_t  time_to_live[],
  49053.                              unsigned32  *num_left,
  49054.                              error_status_t  *status);
  49055.  
  49056.  Parameters 
  49057.  
  49058.           Input 
  49059.  
  49060.           h             An opaque handle bound to a trigger server. Use the 
  49061.                         trigger binding information specified in the attribute 
  49062.                         encoding to acquire a bound handle. 
  49063.  
  49064.           principal     A value of type sec_id_foreign_t that identifies the 
  49065.                         UUID, name, and cell of the principals whose attributes 
  49066.                         are to be retrieved. 
  49067.  
  49068.           num_upstream_delegates If principal is a member of a delegation 
  49069.                         chain, an unsigned 32-bit integer that specifies the 
  49070.                         number of delegates in the chain upstream from (before) 
  49071.                         this principal. The upstream delegate chain ordering 
  49072.                         reflects the sequence in which delegates were added to 
  49073.                         the chain. For example, the delegation initiator is 
  49074.                         always first in the chain. 
  49075.  
  49076.           upstream_delegates[] If the Privilege sever is adding principal to a 
  49077.                         delegation chain, an array of values of type 
  49078.                         sec_id_foreign_t that identify the UUID and cell of 
  49079.                         each delegate in the upstream delegation chain. Note 
  49080.                         that principal names are not provided. 
  49081.  
  49082.           num_attr_keys An unsigned 32-bit integer that specifies the number of 
  49083.                         elements in the attr_keys array. Set this parameter to 
  49084.                         0 to return all the principal's attributes that the 
  49085.                         caller is authorized to see. 
  49086.  
  49087.           space_avail   An unsigned 32-bit integer that specifies the size of 
  49088.                         the attr_keys array. 
  49089.  
  49090.           attr_keys[]   An array of values of type sec_attr_t that identify the 
  49091.                         attribute type ID of the attribute instance(s) to be 
  49092.                         looked up. The size of the attr_keys array is 
  49093.                         determined by the num_attr_keys parameter. 
  49094.  
  49095.           Input/Output 
  49096.  
  49097.           cursor        A pointer to a priv_attr_trig_cursor_t. As an input 
  49098.                         parameter, cursor is a pointer to a 
  49099.                         priv_attr_trig_cursor_t initialized by the 
  49100.                         sec_rgy_attr_cursor_init routine. As an output 
  49101.                         parameter, cursor is a pointer to a 
  49102.                         priv_attr_trig_cursor_t that is positioned past the 
  49103.                         components returned in this routine. 
  49104.  
  49105.           Output 
  49106.  
  49107.           num_returned  A pointer to a 32-bit unsigned integer that specifies 
  49108.                         the number of attribute instances returned in the attrs 
  49109.                         array. 
  49110.  
  49111.           attrs[]       An array of values of type sec_attr_t that contains the 
  49112.                         attributes retrieved by UUID. The size of the array is 
  49113.                         determined by space_avail and the length by 
  49114.                         num_returned. 
  49115.  
  49116.           time_to_live[] An array of values of type 
  49117.                         priv_attr_trig_timeval_sec_t that specifies, for each 
  49118.                         attribute in the attrs array, the lifetime in seconds 
  49119.                         for which the attribute can be safely cached. The size 
  49120.                         of the array is determined by space_avail and the 
  49121.                         length by num_returned. 
  49122.  
  49123.           num_left      A pointer to a 32-bit unsigned integer that supplies 
  49124.                         the number of attributes that were found but that could 
  49125.                         not be returned because of space constraints in the 
  49126.                         attrs buffer. To ensure that all the attributes are be 
  49127.                         returned, increase the size of the attrs array by 
  49128.                         increasing the size of space_avail and num_returned. 
  49129.  
  49130.           status        A pointer to the completion status. On successful 
  49131.                         completion, the routine returns error_status_ok, or, if 
  49132.                         the requested attributes were not available, it returns 
  49133.                         the message not_all_available. Otherwise, it returns 
  49134.                         one of the following errors: 
  49135.  
  49136.                              unauthorized 
  49137.                              registry server unavailable 
  49138.                              trigger server unavailable 
  49139.  
  49140.  Usage 
  49141.  
  49142.           The priv_attr_trig_query routine is used by the Privilege server to 
  49143.           retrieve attributes for a principal specified by UUID and include 
  49144.           them in the principal's EPAC. The Privilege server calls this routine 
  49145.           when it gets a request for ERAs in an EPAC. 
  49146.  
  49147.           Although generally this routine is not called directly, this 
  49148.           reference section is provided for users who are writing the attribute 
  49149.           trigger servers that receive priv_attr_trig_query input and supply 
  49150.           its output. 
  49151.  
  49152.           If the num_attr_keys parameter is set to 0, all of the object's 
  49153.           attributes that the caller is authorized to see are returned. This 
  49154.           routine is useful for access by applications. 
  49155.  
  49156.           For multivalued attributes, the routine returns a sec_attr_t for each 
  49157.           value as an individual attribute instance. For attribute sets, the 
  49158.           routine returns a sec_attr_t for each member of the set; it does not 
  49159.           return the set instance. 
  49160.  
  49161.           The attr_keys array, which specifies the attributes to be returned, 
  49162.           contains values of type sec_attr_t. These values consist of: 
  49163.  
  49164.                attr_id, a UUID that identifies the attribute type 
  49165.                attr_value, values of sec_attr_value_t that specify the 
  49166.                attribute's encoding type and values. 
  49167.  
  49168.           Use the attr_id field of each attr_keys array element to specify the 
  49169.           UUID that identifies the attribute type to be returned. 
  49170.  
  49171.           If the attribute instance to be read is associated with a query 
  49172.           attribute trigger that requires additional information before it can 
  49173.           process the query request, use a sec_attr_value_t to supply the 
  49174.           requested information: 
  49175.  
  49176.             o  Set the sec_attr_encoding_t to an encoding type that is 
  49177.                compatible with the information required by the query attribute 
  49178.                trigger. 
  49179.  
  49180.             o  Set the sec_attr_value_t to hold the required information. 
  49181.  
  49182.           Note that if you set num_attr_keys to zero to return all the object's 
  49183.           attributes and that attribute is associated with a query attribute 
  49184.           trigger, the attribute trigger is called with no input attribute 
  49185.           information (that would normally have been passed in with the 
  49186.           attr_value field). 
  49187.  
  49188.           The cursor parameter specifies a cursor of type 
  49189.           priv_attr_trig_cursor_t initialized to the starting point in the 
  49190.           attribute list for processing the query. Use the 
  49191.           sec_rgy_attr_cursor_init routine to initialize cursor. If cursor is 
  49192.           uninitialized, the server begins processing the query at the first 
  49193.           attribute that satisfies the search criteria. 
  49194.  
  49195.           The num_left parameter contains the number of attributes that were 
  49196.           found but could not be returned because of space constraints of the 
  49197.           attrs array. (Note that this number may be inaccurate if the target 
  49198.           server allows updates between successive queries.) To obtain all of 
  49199.           the remaining attributes, set the size of the attrs array so that it 
  49200.           is large enough to hold the number of attributes listed in num_left. 
  49201.  
  49202.  Permissions Required 
  49203.  
  49204.           The priv_attr_trig_query routine requires the query permission set 
  49205.           for each attribute type identified in the attr_keys array. These 
  49206.           permissions are defined as part of the ACL manager set in the schema 
  49207.           entry of each attribute type. 
  49208.  
  49209.  Related Information 
  49210.  
  49211.           Routines: sec_rgy_attr_cursor_init 
  49212.           sec_attr_trig_update 
  49213.  
  49214.           Files: 
  49215.           \usr\include\dce\priv_attr_trig.idl - The idl file from which 
  49216.           dce\priv_attr_trig.h was derived. 
  49217.  
  49218.  
  49219. ΓòÉΓòÉΓòÉ 8.3.7. sec_attr_trig_query ΓòÉΓòÉΓòÉ
  49220.  
  49221.  Purpose 
  49222.  
  49223.           Reads attributes coded with an attribute trigger type of query. 
  49224.  
  49225.  Format 
  49226.  
  49227.                     #include <dce/sec_attr_trig.h>
  49228.  
  49229.                     void sec_attr_trig_query (
  49230.                             handle_t  h,
  49231.                             sec_attr_component_name_t  cell_name,
  49232.                             sec_attr_component_name_t  component_name,
  49233.                             sec_attr_trig_cursor_t  *cursor,
  49234.                             unsigned32  num_attr_keys,
  49235.                             unsigned32  space_avail,
  49236.                             sec_attr_t  attr_keys[],
  49237.                             unsigned32  *num_returned,
  49238.                             sec_attr_t  attrs[],
  49239.                             sec_attr_trig_timeval_sec_t  time_to_live[],
  49240.                             unsigned32  *num_left,
  49241.                             error_status_t  *status);
  49242.  
  49243.  Parameters 
  49244.  
  49245.           Input 
  49246.  
  49247.           h             A handle referring to the trigger server to be 
  49248.                         accessed. Use the trigger binding information specified 
  49249.                         in the attribute encoding to acquire a bound handle. 
  49250.  
  49251.           cell_name     A value of sec_attr_component_name_t that identifies 
  49252.                         the cell where the object whose attribute is to be 
  49253.                         accessed resides. Supply a NULL cell_name to specify 
  49254.                         the local cell (\.:). 
  49255.  
  49256.           component_name A value of sec_attr_component_name_t that identifies 
  49257.                         the name of the object whose attribute is to be 
  49258.                         accessed. If cell_name specifies a foreign cell, 
  49259.                         component_name is interpreted as a UUID in string 
  49260.                         format because the caller of this interface knows only 
  49261.                         the UUID, not the name, of the foreign principal. 
  49262.  
  49263.           num_attr_keys Specifies the number of elements in the attr_keys 
  49264.                         array. This integer must be greater than 0. 
  49265.  
  49266.           space_avail   Specifies the size of the attr_keys array. 
  49267.  
  49268.           attr_keys[]   An array of values of type sec_attr_t. For each 
  49269.                         attribute instance, the attr_keys array contains an 
  49270.                         attr_id (a UUID of type uuid_t) to identify the 
  49271.                         attribute to be queried and an attr_value. The 
  49272.                         attr_value field can be used to pass in optional 
  49273.                         information required by the attribute trigger query. If 
  49274.                         no additional information is to be passed, set 
  49275.                         attr_value to sec_attr_enc_void. This is actually 
  49276.                         accomplished by setting the sec_attr_encoding_t data 
  49277.                         type to sec_attr_enc_void. 
  49278.  
  49279.           Input/Output 
  49280.  
  49281.           cursor        A pointer to a cursor of type sec_attr_trig_cursor_t. 
  49282.                         As an input parameter, cursor can be initialized (by 
  49283.                         the sec_rgy_attr_cursor_init routine) or uninitialized. 
  49284.                         As an output parameter, cursor is positioned past the 
  49285.                         attributes returned by this routine. 
  49286.  
  49287.           Output 
  49288.  
  49289.           num_returned  A pointer to an unsigned 32-bit integer that specifies 
  49290.                         the number of attribute instances returned in the 
  49291.                         attr_keys array. 
  49292.  
  49293.           attrs[]       An array of values of type sec_attr_t. The size of this 
  49294.                         array is determined by the space_avail parameter and 
  49295.                         the length by the num_returned parameter. 
  49296.  
  49297.           time_to_live[] An array of values of type 
  49298.                         sec_attr_trig_timeval_sec_t. For each attribute in the 
  49299.                         attrs array, the time_to_live array specifies the time 
  49300.                         in seconds that the attribute can be safely cached. 
  49301.  
  49302.           num_left      A pointer to an unsigned 32-bit integer that supplies 
  49303.                         the number of attributes that were found but were not 
  49304.                         returned because of space constraints in the attrs 
  49305.                         buffer. 
  49306.  
  49307.           status        A pointer to the completion status. On successful 
  49308.                         completion, the routine returns error_status_ok. 
  49309.                         Otherwise, it returns one of the following errors: 
  49310.  
  49311.                           o  not_all_available 
  49312.                           o  unauthorized 
  49313.  
  49314.  Usage 
  49315.  
  49316.           The sec_attr_trig_query routine reads attributes coded with an 
  49317.           attribute trigger type of query. 
  49318.  
  49319.           The sec_attr_trig_query routine is called by the DCE attribute lookup 
  49320.           code for all schema entries that specify a query attribute trigger 
  49321.           (sec_attr_trig_type_query specified with the 
  49322.           sec_attr_trig_type_flags_t data type). The attribute query code 
  49323.           passes the sec_attr_trig_query input parameters to a user-written 
  49324.           query attribute trigger server and receives the output parameters 
  49325.           back from the server. Although generally this routine is not called 
  49326.           directly, this reference page is provided for users who are writing 
  49327.           the attribute trigger servers that receive sec_attr_trig_query input 
  49328.           and supply its output. 
  49329.  
  49330.           Multivalued attributes are returned as independent attribute 
  49331.           instances sharing the same attribute UUID. A read of an attribute set 
  49332.           returns all instances of members of the set; the attribute set 
  49333.           instance is not returned. 
  49334.  
  49335.           For objects in the local cell, set the cell_name parameter to NULL, 
  49336.           and the component_name parameter to specify the object's name. 
  49337.  
  49338.           For objects in a foreign cell, set the cell_name parameter to 
  49339.           identify the name of the foreign cell, and the component_name 
  49340.           parameter to the UUID in string format that identifies the object in 
  49341.           the foreign cell. 
  49342.  
  49343.           The cursor parameter specifies a cursor of type 
  49344.           sec_attr_trig_cursor_t that establishes the starting point in the 
  49345.           attribute list for processing the query. Use the 
  49346.           sec_rgy_attr_cursor_init routine to initialize a list cursor. If 
  49347.           cursor is uninitialized, the server begins processing the query at 
  49348.           the first attribute that satisfies the search criteria. Note that, 
  49349.           generally, the sec_rgy_attr_cursor_init routine makes a remote call 
  49350.           to the specified server. To initialize the cursor without making this 
  49351.           remote call, set the valid parameter in the sec_attr_trig_cursor_init 
  49352.           routine to 0. 
  49353.  
  49354.           The num_left parameter contains the number of attributes that were 
  49355.           found but that could not be returned because of space constraints of 
  49356.           the attrs array. (Note that this number might be inaccurate if the 
  49357.           target server allows updates between successive queries.) To obtain 
  49358.           all of the remaining attributes, set the size of the attrs array so 
  49359.           that it is large enough to hold the number of attributes listed in 
  49360.           num_left. 
  49361.  
  49362.  Related Information 
  49363.  
  49364.           Routines: sec_attr_trig_update 
  49365.           sec_rgy_attr_cursor_init 
  49366.  
  49367.           Files: 
  49368.           dcelocal\include\dce\sec_attr_trig.idl - The idl file from which 
  49369.           dce\sec_attr_trig.h was derived. 
  49370.  
  49371.  
  49372. ΓòÉΓòÉΓòÉ 8.3.8. sec_attr_trig_update ΓòÉΓòÉΓòÉ
  49373.  
  49374.  Purpose 
  49375.  
  49376.           Passes attribute updates to an update attribute trigger server for 
  49377.           evaluation. This routine is for attributes coded with an attribute 
  49378.           trigger type of update. 
  49379.  
  49380.  Format 
  49381.  
  49382.                     #include <dce/sec_attr_trig.h>
  49383.  
  49384.                     void sec_attr_trig_update (
  49385.                             handle_t  h,
  49386.                             sec_attr_component_name_t  cell_name,
  49387.                             sec_attr_component_name_t  component_name,
  49388.                             unsigned32  num_to_write,
  49389.                             unsigned32  space_avail,
  49390.                             sec_attr_t  in_attrs[],
  49391.                             unsigned32  *num_returned,
  49392.                             sec_attr_t  out_attrs[],
  49393.                             unsigned32  *num_left,
  49394.                             signed32  *failure_index,
  49395.                             error_status_t  *status);
  49396.  
  49397.  Parameters 
  49398.  
  49399.           Input 
  49400.  
  49401.           h             A handle referring to the trigger server to be 
  49402.                         accessed. Use the trigger binding information specified 
  49403.                         in the attribute encoding to acquire a bound handle. 
  49404.  
  49405.           cell_name     A value of sec_attr_component_name_t that identifies 
  49406.                         the cell where the object whose attribute is to be 
  49407.                         accessed resides.  Supply a NULL cell_name to specify 
  49408.                         the local cell (\.:). 
  49409.  
  49410.           component_name A value of sec_attr_component_name_t that identifies 
  49411.                         the name of the object whose attribute is to be 
  49412.                         accessed. If cell_name specifies a foreign cell, 
  49413.                         component_name is interpreted as a UUID in string 
  49414.                         format because the caller of this interface knows only 
  49415.                         the UUID, not the name, of the foreign principal. 
  49416.  
  49417.           num_to_write  An unsigned 32-bit integer that specifies the number of 
  49418.                         elements in the in_attrs array. This integer must be 
  49419.                         greater than 0. 
  49420.  
  49421.           space_avail   An unsigned 32-bit integer that specifies the size of 
  49422.                         the out_attrs array. 
  49423.  
  49424.           in_attrs[]    An array of values of type sec_attr_t that specifies 
  49425.                         the attribute instances to be written. The size of the 
  49426.                         in_attrs array is determined by num_to_write. 
  49427.  
  49428.           Output 
  49429.  
  49430.           num_returned  A pointer to an unsigned 32-bit integer that specifies 
  49431.                         the number of attribute instances returned in the 
  49432.                         out_attrs array. 
  49433.  
  49434.           out_attrs[]   An array of values of type sec_attr_t.  These values, 
  49435.                         supplied by the update attribute trigger server, are in 
  49436.                         a form suitable for storage in the registry database. 
  49437.  
  49438.           num_left      A pointer to an unsigned 32-bit integer that supplies 
  49439.                         the number of attributes that were found but were not 
  49440.                         returned because of space constraints in the out_attrs 
  49441.                         buffer. 
  49442.  
  49443.           failure_index In the event of an error, failure_index is a pointer to 
  49444.                         the element in the in_attrs array that caused the 
  49445.                         update to fail. If the failure cannot be attributed to 
  49446.                         a specific attribute, the value of failure_index is -1. 
  49447.  
  49448.           status        A pointer to the completion status.  On successful 
  49449.                         completion, the routine returns error_status_ok. 
  49450.                         Otherwise, it returns one of the following errors: 
  49451.  
  49452.                           o  database read only 
  49453.                           o  server unavailable 
  49454.                           o  invalid/unsupported attribute type 
  49455.                           o  invalid encoding type 
  49456.                           o  value not unique 
  49457.                           o  site read only 
  49458.                           o  unauthorized 
  49459.  
  49460.  Usage 
  49461.  
  49462.           The sec_attr_trig_update routine passes attributes coded with an 
  49463.           attribute trigger type of update to a user-written update attribute 
  49464.           trigger server for evaluation before the updates are made to the 
  49465.           registry. 
  49466.  
  49467.           Although generally this routine is not called directly, this 
  49468.           reference page is provided for users who are writing the attribute 
  49469.           trigger servers that receive sec_attr_trig_update input and supply 
  49470.           its output. 
  49471.  
  49472.           The sec_attr_trig_update routine is called by the DCE attribute 
  49473.           update code for all schema entries that specify an update attribute 
  49474.           trigger (sec_attr_trig_type_update specified with the 
  49475.           sec_attr_trig_type_flags_t data type).  The attribute update code 
  49476.           passes the sec_attr_trig_update input parameters to a user-written 
  49477.           update attribute trigger server and receives the output parameters 
  49478.           back from the server.  The attribute trigger server is responsible 
  49479.           for evaluating the semantics of the entry in order to reject or 
  49480.           accept it, and the attribute trigger server can even make changes in 
  49481.           the output it sends back to the update code to ensure that the entry 
  49482.           adheres to the semantics.  The output received from the attribute 
  49483.           trigger server is in a form to be stored in the registry.  (Note that 
  49484.           update attribute trigger servers do not store attribute values, which 
  49485.           are stored in the registry database.) 
  49486.  
  49487.           This is an atomic operation: if the update of any attribute in the 
  49488.           array fails to pass the evaluation, all updates are ended. The 
  49489.           attribute causing the update to fail is identified in failure_index. 
  49490.           If the failure cannot be attributed to a given attribute, the 
  49491.           failure_index parameter contains -1. 
  49492.  
  49493.           For objects in the local cell, set the cell_name parameter to NULL 
  49494.           and the component_name parameter to specify the object's name. 
  49495.  
  49496.           For objects in a foreign cell, set the cell_name parameter to the 
  49497.           name of the foreign cell, and the component_name parameter to specify 
  49498.           the UUID in string format that identifies the object in the foreign 
  49499.           cell. 
  49500.  
  49501.  Related Information 
  49502.  
  49503.           Files: 
  49504.           dcelocal\include\dce\sec_attr_trig.idl - The idl file from which 
  49505.           dce\sec_attr_trig.h was derived. 
  49506.  
  49507.  
  49508. ΓòÉΓòÉΓòÉ 8.3.9. sec_attr_util_alloc_copy ΓòÉΓòÉΓòÉ
  49509.  
  49510.  Purpose 
  49511.  
  49512.           Copies data from one attribute structure instance to another. 
  49513.  
  49514.  Format 
  49515.  
  49516.                     #include <dce/sec_attr_util.h>
  49517.  
  49518.                     void sec_attr_util_alloc_copy(
  49519.                             idl_void_p_t  *(*allocate) (unsigned32 size),
  49520.                             sec_attr_t  *from,
  49521.                             sec_attr_t  *to,
  49522.                             error_status_t  *status);
  49523.  
  49524.  Parameters 
  49525.  
  49526.           Input 
  49527.  
  49528.           allocate      An allocation routine that returns a pointer of type 
  49529.                         idl_void_p_t to a space of size size. 
  49530.  
  49531.           size          A 32-bit unsigned integer, used as the parameter for 
  49532.                         the allocate routine, that specifies the size of the 
  49533.                         space to be allocated. 
  49534.  
  49535.           from          A pointer to a sec_attr_t structure containing an 
  49536.                         attribute instance that is to be copied. 
  49537.  
  49538.           Output 
  49539.  
  49540.           to            A pointer to an allocated sec_attr_t structure that 
  49541.                         contains the copied attribute instance. 
  49542.  
  49543.           status        A pointer to the completion status.  On successful 
  49544.                         completion, the routine returns error_status_ok. 
  49545.                         Otherwise, it returns an error. 
  49546.  
  49547.  Usage 
  49548.  
  49549.           The sec_attr_util_alloc_copy routine allocates the necessary 
  49550.           subfields of the destination sec_attr_t structure and copies the 
  49551.           corresponding data from the source sec_attr_t structure. 
  49552.  
  49553.  Related Information 
  49554.  
  49555.           Routines: 
  49556.           sec_attr_util_free 
  49557.  
  49558.           Files: 
  49559.           /usr/include/dce/sec_attr_util.idl - The idl file from which 
  49560.           dce/sec_attr_util.h was derived. 
  49561.  
  49562.  
  49563. ΓòÉΓòÉΓòÉ 8.3.10. sec_attr_util_free ΓòÉΓòÉΓòÉ
  49564.  
  49565.  Purpose 
  49566.  
  49567.           Frees the underlying storage in a sec_attr_t structure that was 
  49568.           allocated by the sec_attr_util_alloc_copy routine. 
  49569.  
  49570.  Format 
  49571.  
  49572.                     #include <dce/sec_attr_util.h>
  49573.  
  49574.                     void sec_attr_util_free(
  49575.                             void  (*deallocate) (void  *ptr),
  49576.                             sec_attr_t  *attr);
  49577.  
  49578.  Parameters 
  49579.  
  49580.           Input 
  49581.  
  49582.           deallocate    A memory deallocation routine that frees a sec_attr_t 
  49583.                         function ptr to a structure allocated by the 
  49584.                         sec_attr_util_alloc_copy routine. 
  49585.  
  49586.           Input/Output 
  49587.  
  49588.           attr          A pointer to an attribute instance of sec_attr_t type. 
  49589.  
  49590.  Usage 
  49591.  
  49592.           The sec_attr_util_free routine frees a sec_attr_t structure that was 
  49593.           allocated by the sec_attr_util_alloc_copy routine. 
  49594.  
  49595.  Related Information 
  49596.  
  49597.           Routines: 
  49598.           sec_attr_util_alloc_copy 
  49599.  
  49600.           Files: 
  49601.           /usr/include/dce/sec_attr_util.idl - The idl file from which 
  49602.           dce/sec/attr_util.h was derived. 
  49603.  
  49604.  
  49605. ΓòÉΓòÉΓòÉ 8.3.11. sec_attr_util_inst_free ΓòÉΓòÉΓòÉ
  49606.  
  49607.  Purpose 
  49608.  
  49609.           Frees non-null pointers within an attribute instance, including the 
  49610.           pointer to the attribute structure. 
  49611.  
  49612.  Format 
  49613.  
  49614.                     #include <dce/sec_attr_util.h>
  49615.  
  49616.                     void sec_attr_util_inst_free(
  49617.                             sec_attr_t  **attr_ptr);
  49618.  
  49619.  Parameters 
  49620.  
  49621.           Input/Output 
  49622.  
  49623.           attr_ptr      A pointer to an allocated and partially or fully 
  49624.                         initialized sec_attr_t structure. On output, this 
  49625.                         pointer is NULL. 
  49626.  
  49627.  Usage 
  49628.  
  49629.           The sec_attr_util_inst_free routine frees every non-NULL pointer in 
  49630.           the attribute instance pointed to by attr_ptr and sets the attr_p 
  49631.           pointer to NULL. Note that this data structure might have been only 
  49632.           partially initialized. 
  49633.  
  49634.           Use this routine to free the space allocated by the following 
  49635.           routines: 
  49636.  
  49637.                sec_rgy_attr_lookup_by_id 
  49638.                sec_rgy_attr_lookup_by_name 
  49639.                sec_rgy_attr_lookup_no_expand 
  49640.  
  49641.  Related Information 
  49642.  
  49643.           Routines: 
  49644.           sec_attr_util_inst_free_ptrs 
  49645.           sec_attr_util_alloc_copy 
  49646.           sec_rgy_attr_lookup_by_id 
  49647.           sec_rgy_attr_lookup_by_name 
  49648.           sec_rgy_attr_lookup_no_expand 
  49649.  
  49650.           Files: 
  49651.           /urs/include/dce/sec_attr_util.idl - The idl file from which 
  49652.           dce/sec_attr_util.h was derived. 
  49653.  
  49654.  
  49655. ΓòÉΓòÉΓòÉ 8.3.12. sec_attr_util_inst_free_ptrs ΓòÉΓòÉΓòÉ
  49656.  
  49657.  Purpose 
  49658.  
  49659.           Frees pointers in a sec_attr_t structure. 
  49660.  
  49661.  Format 
  49662.  
  49663.                     #include <dce/sec_attr_util.h>
  49664.  
  49665.                     void sec_attr_util_inst_free_ptrs(
  49666.                             sec_attr_t  *attr_ptr);
  49667.  
  49668.  Parameters 
  49669.  
  49670.           Input 
  49671.  
  49672.           attr_ptr      A character string (type sec_attr_t) that points to an 
  49673.                         allocated and potentially initialized sec_attr_t 
  49674.                         structure. 
  49675.  
  49676.  Usage 
  49677.  
  49678.           The sec_attr_util_inst_free_ptrs routine frees every non-NULL pointer 
  49679.           in the attribute instance pointed to by attr_ptr but it does not free 
  49680.           itself. 
  49681.  
  49682.  Notes 
  49683.  
  49684.             1. Use this routine only in client applications. 
  49685.             2. Do not use this routine if you are using the 
  49686.                rpc_ss_enable_allocate routine. 
  49687.             3. This data structure might have been only partially initialized. 
  49688.             4. The attr_ptr pointer itself is NOT freed. 
  49689.  
  49690.  Related Information 
  49691.  
  49692.           Routines: 
  49693.           sec_attr_util_inst_free 
  49694.           sec_rgy_attr_lookup_by_id 
  49695.           sec_rgy_attr_lookup_by_name 
  49696.           sec_rgy_attr_lookup_no_expand 
  49697.  
  49698.           Files: 
  49699.           \usr\include\dce\sec_attr_util.idl - The idl file from which 
  49700.           dce/sec_attr_util.h was derived. 
  49701.  
  49702.  
  49703. ΓòÉΓòÉΓòÉ 8.3.13. sec_attr_util_sch_ent_free ΓòÉΓòÉΓòÉ
  49704.  
  49705.  Purpose 
  49706.  
  49707.           Frees non-null pointers within a schema entry, including the pointer 
  49708.           to the schema entry. 
  49709.  
  49710.  Format 
  49711.  
  49712.                     #include <dce/sec_attr_util.h>
  49713.  
  49714.                     void sec_attr_util_sch_ent_free(
  49715.                             sec_attr_schema_entry_t  **schema_ptr);
  49716.  
  49717.  Parameters 
  49718.  
  49719.           Input/Output 
  49720.  
  49721.           schema_ptr    A pointer to a partially or fully initialized 
  49722.                         sec_attr_schema_entry_t structure. On output, the 
  49723.                         internal pointers and the schema_ptr itself are freed. 
  49724.  
  49725.  Usage 
  49726.  
  49727.           The sec_attr_util_sch_ent_free routine frees every non-null pointer 
  49728.           in the schema entry pointed to by the schema_ptr as well as the 
  49729.           schema_ptr itself. Note that this data structure might have been only 
  49730.           partially initialized. 
  49731.  
  49732.           Use this routine to free the space allocated by the 
  49733.           sec_rgy_attr_sch_lookup_by_id and sec_rgy_attr_sch_lookup_by_name 
  49734.           routines. 
  49735.  
  49736.  Related Information 
  49737.  
  49738.           Routines: 
  49739.           sec_attr_util_inst_free_ptrs 
  49740.           sec_rgy_attr_sch_lookup_by_id 
  49741.           sec_rgy_attr_sch_lookup_by_name 
  49742.  
  49743.  
  49744. ΓòÉΓòÉΓòÉ 8.3.14. sec_attr_util_sch_ent_free_ptrs ΓòÉΓòÉΓòÉ
  49745.  
  49746.  Purpose 
  49747.  
  49748.           Frees non-null pointers in a schema entry. 
  49749.  
  49750.  Format 
  49751.  
  49752.                     #include <dce/sec/attr_util.h>
  49753.  
  49754.                     void sec_attr_util_sch_ent_free_ptrs(
  49755.                             sec_attr_schema_entry_t  *schema_ptr);
  49756.  
  49757.  Parameters 
  49758.  
  49759.           Input/Output 
  49760.  
  49761.           schema_ptr    A pointer to an allocated and potentially initialized 
  49762.                         sec_attr_schema_entry_t structure. On output, internal 
  49763.                         pointers are freed. 
  49764.  
  49765.  Usage 
  49766.  
  49767.           The sec_attr_util_sch_ent_free_ptrs routine frees every non-null 
  49768.           pointer in the schema entry pointed to by schema_ptr. The schema_ptr 
  49769.           pointer itself is not freed. Note that this data structure may have 
  49770.           been only partially initialized. 
  49771.  
  49772.           Use this routine to free the space allocated by the 
  49773.           sec_rgy_attr_sch_lookup_by_id and sec_rgy_attr_sch_lookup_by_name 
  49774.           routines. 
  49775.  
  49776.  Related Information 
  49777.  
  49778.           Routines: 
  49779.           sec_attr_util_inst_free_ptrs 
  49780.           sec_rgy_attr_sch_lookup_by_id 
  49781.           sec_rgy_attr_sch_lookup_by_name 
  49782.           sec_attr_util_sch_ent_free 
  49783.  
  49784.           Files: 
  49785.           /usr/include/dce/sec_attr_util.idl - The idl file from which 
  49786.           dce/sec_attr_util.h was derived. 
  49787.  
  49788.  
  49789. ΓòÉΓòÉΓòÉ 8.3.15. sec_attr_util_sch_free_acl_mgrs ΓòÉΓòÉΓòÉ
  49790.  
  49791.  Purpose 
  49792.  
  49793.           Frees non-null pointers in the acl_mgr_set field of a schema entry. 
  49794.  
  49795.  Format 
  49796.  
  49797.                     #incude <dce/sec_attr_util.h>
  49798.  
  49799.                     void sec_attr_util_sch_free_acl_mgrs(
  49800.                             sec_attr_schema_entry_t  *sec_sch_entry_p);
  49801.  
  49802.  Parameters 
  49803.  
  49804.           Input/Output 
  49805.  
  49806.           sec_sch_entry_p On input, a pointer to an allocated and potentially 
  49807.                         initialized sec_attr_shema_entry_t schema. On output, 
  49808.                         acl_mgr_set pointers are freed and set to NULL. 
  49809.  
  49810.  Usage 
  49811.  
  49812.           The sec_attr_util_sch_free_acl_mgrs routine frees and sets to NULL 
  49813.           every non-null pointer in the acl_mgr_set field of the schema entry 
  49814.           pointed to by sec_sch_entry_p. 
  49815.  
  49816.  Related Information 
  49817.  
  49818.           Files: 
  49819.           \usr\include\dce\sec_attr_util.idl - The idl file from which 
  49820.           dce\sec_attr_util.h was derived. 
  49821.  
  49822.  
  49823. ΓòÉΓòÉΓòÉ 8.3.16. sec_attr_util_sch_free_binding ΓòÉΓòÉΓòÉ
  49824.  
  49825.  Purpose 
  49826.  
  49827.           Frees non-null pointers in the trig_binding field of the 
  49828.           sec_attr_schema_entry_t schema. 
  49829.  
  49830.  Format 
  49831.  
  49832.                     #incude <dce/sec_attr_util.h>
  49833.  
  49834.                     void sec_attr_util_sch_free_binding(
  49835.                             sec_attr_schema_entry_t  *sec_sch_entry_p);
  49836.  
  49837.  Parameters 
  49838.  
  49839.           Input 
  49840.  
  49841.           sec_sch_entry_p On input, points to an allocated and potentially 
  49842.                         initialized sec_attr_schema_entry_t schema. On output, 
  49843.                         trig_binding pointers are freed and set to NULL. 
  49844.  
  49845.  Usage 
  49846.  
  49847.           The sec_attr_util_sch_free_binding routine frees and sets to NULL 
  49848.           every non-null pointer in the trig_binding field of the schema entry 
  49849.           pointed to by sec_sch_entry_p. 
  49850.  
  49851.  Related Information 
  49852.  
  49853.           Files: 
  49854.           \usr\include\dce\sec_attr_util.idl - The idl file from which 
  49855.           dce\sec_attr_util.h was derived. 
  49856.  
  49857.  
  49858. ΓòÉΓòÉΓòÉ 8.3.17. sec_rgy_attr_cursor_alloc ΓòÉΓòÉΓòÉ
  49859.  
  49860.  Purpose 
  49861.  
  49862.           Allocates resources to a cursor used by the sec_rgy_attr_lookup_by_id 
  49863.           routine. 
  49864.  
  49865.  Format 
  49866.  
  49867.                     #include <dce/sec_rgy_attr.h>
  49868.  
  49869.                     void sec_rgy_attr_cursor_alloc(
  49870.                             sec_attr_cursor_t  *cursor,
  49871.                             error_status_t  *status);
  49872.  
  49873.  Parameters 
  49874.  
  49875.           Output 
  49876.  
  49877.           cursor        A pointer to a sec_attr_cursor_t 
  49878.  
  49879.           status        A pointer to the completion status.  On successful 
  49880.                         completion, the routine returns error_status_ok. 
  49881.                         Otherwise, it returns no such object. 
  49882.  
  49883.  Usage 
  49884.  
  49885.           The sec_rgy_attr_cursor_alloc routine allocates resources to a cursor 
  49886.           used with the sec_rgy_attr_lookup_by_id routine. This routine, which 
  49887.           is a local operation, does not initialize cursor. 
  49888.  
  49889.           The sec_rgy_attr_cursor_init routine, which makes a remote call and 
  49890.           allocates and initializes the cursor.  In addition, 
  49891.           sec_rgy_attr_cursor_init returns the total number of attributes 
  49892.           attached to the object as an output parameter; 
  49893.           sec_rgy_attr_cursor_alloc does not. 
  49894.  
  49895.  Related 
  49896.  
  49897.           Information. Routines: 
  49898.           sec_rgy_attr_cursor_init 
  49899.           sec_rgy_attr_cursor_release 
  49900.           sec_rgy_attr_cursor_reset 
  49901.           sec_rgy_attr_lookup_by_id 
  49902.  
  49903.           Files: 
  49904.           dcelocal\include\dce\sec_attr_base.idl - The idl file from which 
  49905.           dce\sec_attr_base.h was derived. 
  49906.  
  49907.  
  49908. ΓòÉΓòÉΓòÉ 8.3.18. sec_rgy_attr_cursor_init ΓòÉΓòÉΓòÉ
  49909.  
  49910.  Purpose 
  49911.  
  49912.           Initializes a cursor used by the sec_rgy_attr_lookup_by_id routine. 
  49913.  
  49914.  Format 
  49915.  
  49916.                     #include <dce/sec_rgy_attr.h>
  49917.  
  49918.                     void sec_rgy_attr_cursor_init (
  49919.                             sec_rgy_handle_t  context,
  49920.                             sec_rgy_domain_t  name_domain,
  49921.                             sec_rgy_name_t  name,
  49922.                             unsigned32  *cur_num_attrs,
  49923.                             sec_attr_cursor_t  *cursor,
  49924.                             error_status_t  *status);
  49925.  
  49926.  Parameters 
  49927.  
  49928.           Input 
  49929.  
  49930.           context       An opaque handle bound to a registry server. Use 
  49931.                         sec_rgy_site_open to acquire a bound handle. 
  49932.  
  49933.           name_domain   A value of type sec_rgy_domain_t that identifies the 
  49934.                         registry domain where the object specified by name 
  49935.                         resides. The valid values are: 
  49936.  
  49937.                              sec_rgy_domain_person    The name identifies a 
  49938.                                                       principal. 
  49939.                              sec_rgy_domain_group     The name identifies a 
  49940.                                                       group. 
  49941.                              sec_rgy_domain_org       The name identifies an 
  49942.                                                       organization. 
  49943.  
  49944.                         This parameter is ignored if name is policy or replist. 
  49945.  
  49946.           name          A pointer to a sec_rgy_name_t character string 
  49947.                         containing the name of the person, group, or 
  49948.                         organization to which the attribute to be scanned is 
  49949.                         attached. 
  49950.  
  49951.           Output 
  49952.  
  49953.           cur_num_attrs A pointer to an unsigned 32-bit integer that specifies 
  49954.                         the number of attributes currently attached to the 
  49955.                         object. 
  49956.  
  49957.           cursor        A pointer to a sec_rgy_cursor_t positioned at the first 
  49958.                         attribute in the list of the object's attributes. 
  49959.  
  49960.           status        A pointer to the completion status.  On successful 
  49961.                         completion, the routine returns error_status_ok. 
  49962.                         Otherwise, it returns no such object. 
  49963.  
  49964.  Usage 
  49965.  
  49966.           The sec_rgy_attr_cursor_init routine initializes a cursor of type 
  49967.           sec_attr_cursor_t (used with the sec_rgy_attr_lookup_by_id routine) 
  49968.           and initializes the cursor to the first attribute in the specified 
  49969.           object's list of attributes. This routine also supplies the total 
  49970.           number of attributes attached to the object as part of its output. 
  49971.           The cursor allocation is a local operation. The cursor initialization 
  49972.           is a remote operation and makes a remote call to the Registry. 
  49973.  
  49974.           Use the sec_rgy_attr_cursor_release routine to release all resources 
  49975.           allocated to a sec_attr_cursor_t cursor. 
  49976.  
  49977.  Permissions Required 
  49978.  
  49979.           The sec_rgy_attr_cursor_init routine requires at least one permission 
  49980.           (of any type) on the person, group, or organization to which the 
  49981.           attribute to be scanned is attached. 
  49982.  
  49983.  Related Information 
  49984.  
  49985.           Routines: 
  49986.           sec_rgy_attr_lookup_by_id 
  49987.           sec_rgy_attr_cursor_release 
  49988.  
  49989.           Files: 
  49990.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  49991.           dce\sec_rgy_attr.h was derived. 
  49992.  
  49993.  
  49994. ΓòÉΓòÉΓòÉ 8.3.19. sec_rgy_attr_cursor_release ΓòÉΓòÉΓòÉ
  49995.  
  49996.  Purpose 
  49997.  
  49998.           Releases a cursor of type sec_attr_cursor_t that was allocated with 
  49999.           the sec_rgy_attr_cursor_init or sec_rgy_attr_cursor_alloc routine. 
  50000.  
  50001.  Format 
  50002.  
  50003.                     #include <dce/sec_rgy_attr.h>
  50004.  
  50005.                     void sec_rgy_attr_cursor_release (
  50006.                             sec_attr_cursor_t  *cursor,
  50007.                             error_status_t  *status);
  50008.  
  50009.  Parameters 
  50010.  
  50011.            Input/Output 
  50012.  
  50013.           cursor        As an input parameter, a pointer to an uninitialized 
  50014.                         cursor of type sec_attr_cursor_t. As an output 
  50015.                         parameter, a pointer to an uninitialized cursor of type 
  50016.                         sec_attr_cursor_t with all resources released. 
  50017.  
  50018.            Output 
  50019.  
  50020.           status        A pointer to the completion status.  On successful 
  50021.                         completion, the routine returns error_status_ok. 
  50022.                         Otherwise, it returns No such object. 
  50023.  
  50024.  Usage 
  50025.  
  50026.           The sec_rgy_attr_cursor_release routine releases all resources 
  50027.           allocated to a sec_attr_cursor_t by the sec_rgy_attr_cursor_init or 
  50028.           sec_rgy_attr_cursor_alloc routine. 
  50029.  
  50030.           This is a local operation and makes no remote calls. 
  50031.  
  50032.  Related Information 
  50033.  
  50034.           Routines: 
  50035.           sec_rgy_attr_cursor_init 
  50036.           sec_rgy_attr_cursor_alloc 
  50037.           sec_rgy_attr_lookup_by_id 
  50038.  
  50039.           Files: 
  50040.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  50041.           dce\sec_rgy_attr.h was derived. 
  50042.  
  50043.  
  50044. ΓòÉΓòÉΓòÉ 8.3.20. sec_rgy_attr_cursor_reset ΓòÉΓòÉΓòÉ
  50045.  
  50046.  Purpose 
  50047.  
  50048.           Reinitializes a cursor that has been allocated with either 
  50049.           sec_rgy_attr_cursor_init or sec_rgy_attr_cursor_alloc. 
  50050.  
  50051.  Format 
  50052.  
  50053.                     #include <dce/sec_rgy_attr.h>
  50054.  
  50055.                     void sec_rgy_attr_cursor_reset (
  50056.                             sec_attr_cursor_t  *cursor,
  50057.                             error_status_t  *status);
  50058.  
  50059.  Parameters 
  50060.  
  50061.            Input/Output 
  50062.  
  50063.           cursor        A pointer to sec_attr_cursor_t. As an input parameter, 
  50064.                         an initialized cursor. As an output parameter, cursor 
  50065.                         is reset to the first attribute in the schema. 
  50066.  
  50067.           status        A pointer to the completion status. On successful 
  50068.                         completion, the routine returns error_status_ok. 
  50069.                         Otherwise, it returns an error. 
  50070.  
  50071.  Usage 
  50072.  
  50073.           The sec_rgy_attr_cursor_reset routine resets a sec_attr_cursor_t that 
  50074.           has been allocated by either a sec_rgy_attr_cursor_init or 
  50075.           sec_rgy_attr_cursor_alloc routine. The reset cursor can then be used 
  50076.           to process a new sec_rgy_attr_lookup_by_id query by reusing the 
  50077.           cursor instead of releasing and re-allocating it. This is a local 
  50078.           operation and makes no remote calls. 
  50079.  
  50080.  Related Information 
  50081.  
  50082.           Routines 
  50083.           sec_rgy_attr_cursor_init 
  50084.           sec_rgy_attr_cursor_alloc 
  50085.           sec_rgy_attr_lookup_by_id 
  50086.  
  50087.           Files: 
  50088.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  50089.           dce\sec_rgy_attr.h was derived. 
  50090.  
  50091.  
  50092. ΓòÉΓòÉΓòÉ 8.3.21. sec_rgy_attr_delete ΓòÉΓòÉΓòÉ
  50093.  
  50094.  Purpose 
  50095.  
  50096.           Deletes specified attributes for a specified object. 
  50097.  
  50098.  Format 
  50099.  
  50100.                     #include <dce/sec_rgy_attr.h>
  50101.  
  50102.                     void sec_rgy_attr_delete (
  50103.                             sec_rgy_handle_t  context,
  50104.                             sec_rgy_domain_t  name_domain,
  50105.                             sec_rgy_name_t  name,
  50106.                             unsigned32  num_to_delete,
  50107.                             sec_attr_t  attrs[],
  50108.                             signed32  *failure_index,
  50109.                             error_status_t  *status)
  50110.  
  50111.  Parameters 
  50112.  
  50113.            Input 
  50114.  
  50115.           context       An opaque handle bound to a registry server. Use 
  50116.                         sec_rgy_site_open to acquire a bound handle. 
  50117.  
  50118.           name_domain   A value of type sec_rgy_domain_t that identifies the 
  50119.                         registry domain where the object identified by name 
  50120.                         resides. The valid values are as follows: 
  50121.  
  50122.                              sec_rgy_domain_person    The name identifies a 
  50123.                                                       principal. 
  50124.                              sec_rgy_domain_group     The name identifies a 
  50125.                                                       group. 
  50126.                              sec_rgy_domain_org       The name identifies an 
  50127.                                                       organization. 
  50128.  
  50129.                         This parameter is ignored if name is policy or replist. 
  50130.  
  50131.           name          A character string of type sec_rgy_name_t specifying 
  50132.                         the name of the person, group, or organization to which 
  50133.                         the attributes are attached. 
  50134.  
  50135.           num_to_delete A 32-bit integer that specifies the number of elements 
  50136.                         in the attrs array. This integer must be greater than 
  50137.                         0. 
  50138.  
  50139.           attrs[].      An array of values of type sec_attr_t that specifies 
  50140.                         the attribute instances to be deleted. The size of the 
  50141.                         array is determined by num_to_delete. 
  50142.  
  50143.           Output 
  50144.  
  50145.           failure_index In the event of an error, failure_index is a pointer to 
  50146.                         the element in the in_attrs array that caused the 
  50147.                         update to fail. If the failure cannot be attributed to 
  50148.                         a specific attribute, the value of failure_index is -1. 
  50149.  
  50150.           status        A pointer to the completion status.  On successful 
  50151.                         completion, the routine returns error_status_ok. 
  50152.                         Otherwise, it returns one of the following errors: 
  50153.  
  50154.                              unauthorized 
  50155.                              database read only 
  50156.                              server unavailable 
  50157.                              invalid/unsupported attribute type 
  50158.                              site read only 
  50159.  
  50160.  Usage 
  50161.  
  50162.           The sec_rgy_attr_delete routine deletes attributes. This is an atomic 
  50163.           operation:  if the deletion of any attribute in the attrs array 
  50164.           fails, all deletions are stopped.  The attribute causing the delete 
  50165.           to fail is identified in failure_index. If the failure cannot be 
  50166.           attributed to a given attribute, failure_index contains -1. 
  50167.  
  50168.           The attrs array, which specifies the attributes to be deleted, 
  50169.           contains values of type sec_attr_t. These values consist of: 
  50170.  
  50171.           attr_id        A UUID that identifies the attribute type. 
  50172.           attr_value     A value of sec_attr_value_t that specifies the 
  50173.                          attribute's encoding type and values. 
  50174.  
  50175.           To delete attributes that are not multivalued and to delete all 
  50176.           instances of a multivalued attribute, an attribute UUID is all that 
  50177.           is required. For these attribute instances, supply the attribute UUID 
  50178.           in the input array and set the attribute encoding (in 
  50179.           sec_attr_encoding_t) to sec_attr_enc_void. 
  50180.  
  50181.           To delete a specific instance of a multivalued attribute, supply the 
  50182.           UUID and value that uniquely identify the multivalued attribute 
  50183.           instance in the input array. 
  50184.  
  50185.           Note that if the deletion of any attribute instance in the array 
  50186.           fails, all fail. However, to help pinpoint the cause of the failure, 
  50187.           the routine identifies the first attribute whose deletion failed in a 
  50188.           failure index by array element number. 
  50189.  
  50190.  Permissions Required 
  50191.  
  50192.           The sec_rgy_attr_delete routine requires the delete permission set 
  50193.           for each attribute type identified in the attrs array. These 
  50194.           permissions are defined as part of the ACL manager set in the schema 
  50195.           entry for the attribute type. 
  50196.  
  50197.  Related Information 
  50198.  
  50199.           Routines.: 
  50200.           sec_rgy_attr_update 
  50201.  
  50202.           Files: 
  50203.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  50204.           dce\sec_rgy_attr.h was derived. 
  50205.  
  50206.  
  50207. ΓòÉΓòÉΓòÉ 8.3.22. sec_rgy_attr_get_effective ΓòÉΓòÉΓòÉ
  50208.  
  50209.  Purpose 
  50210.  
  50211.           Reads effective attributes by ID. 
  50212.  
  50213.  Format 
  50214.  
  50215.                     #include <dce/sec_rgy_attr.h>
  50216.  
  50217.                     void sec_rgy_attr_get_effective (
  50218.                             sec_rgy_handle_t  context,
  50219.                             sec_rgy_domain_t  name_domain,
  50220.                             sec_rgy_name_t  name,
  50221.                             unsigned32  num_attr_keys,
  50222.                             sec_attr_t  attr_keys[],
  50223.                             sec_attr_vec_t  *attr_list,
  50224.                             error_status_t  *status)
  50225.  
  50226.  Parameters 
  50227.  
  50228.            Input 
  50229.  
  50230.           context       An opaque handle bound to a registry server. Use 
  50231.                         sec_rgy_site_open to acquire a bound handle. 
  50232.  
  50233.           name_domain   A value of type sec_rgy_domain_t that identifies the 
  50234.                         domain where the object identified by name resides. The 
  50235.                         valid values are: 
  50236.  
  50237.                              sec_rgy_domain_person    The name identifies a 
  50238.                                                       principal. 
  50239.                              sec_rgy_domain_group     The name identifies a 
  50240.                                                       group. 
  50241.                              sec_rgy_domain_org       The name identifies an 
  50242.                                                       organization. 
  50243.  
  50244.                         This parameter is ignored if name is policy or replist. 
  50245.  
  50246.           name          A pointer to a sec_rgy_name_t character string 
  50247.                         containing the name of the person, group, or 
  50248.                         organization to which the attribute to be scanned is 
  50249.                         attached. 
  50250.  
  50251.           num_attr_keys An unsigned 32-bit integer that specifies the number of 
  50252.                         elements in the attr_keys array. If num_attr_keys is 
  50253.                         set to 0, all of the effective attributes that the 
  50254.                         caller is authorized to see are returned. 
  50255.  
  50256.           attr_keys[]   An array of values of type sec_attr_t that specify the 
  50257.                         UUIDs of the attributes to be returned, if they are 
  50258.                         effective. If the attribute type is associated with a 
  50259.                         query attribute trigger, the sec_attr_t attr_value 
  50260.                         field can be used to pass in optional information 
  50261.                         required by the attribute trigger query. If no 
  50262.                         information is to be passed in the attr_value field 
  50263.                         (whether the type indicates an attribute trigger query 
  50264.                         or not), set the attribute's encoding type to 
  50265.                         sec_rgy_attr_enc_void. The size of the attr_keys array 
  50266.                         is determined by the num_attr_keys parameter. 
  50267.  
  50268.           Output 
  50269.  
  50270.           attr_list     A pointer to an attribute vector allocated by the 
  50271.                         server containing all of the effective attributes 
  50272.                         matching the search criteria (defined in num_attr_keys 
  50273.                         or attr_keys ). The server allocates a buffer large 
  50274.                         enough to return all the requested attributes so that 
  50275.                         subsequent calls are not necessary. 
  50276.  
  50277.           status        A pointer to the completion status.  On successful 
  50278.                         completion, the routine returns error_status_ok. 
  50279.                         Otherwise, it returns an error. 
  50280.  
  50281.  Usage 
  50282.  
  50283.           The sec_rgy_attr_get_effective routine returns the UUIDs of the 
  50284.           effective attributes of a specified object. Effective attributes are 
  50285.           determined by setting the schema entry apply_defaults flag: 
  50286.  
  50287.             o  If the flag is set to off, only the attributes directly attached 
  50288.                to the object are effective. 
  50289.  
  50290.             o  If the flag is set to on, obtain the effective attributes by 
  50291.                completing the following steps for each attribute identified by 
  50292.                UUID in the attr_keys array: 
  50293.  
  50294.                  1. If the object named by name is a principal and if the 
  50295.                     requested attribute exists on the principal, that attribute 
  50296.                     is effective and is returned. If it does not exist, the 
  50297.                     search continues. 
  50298.  
  50299.                  2. The next step in the search depends on the type of object: 
  50300.  
  50301.                       -  For principals with accounts: 
  50302.  
  50303.                            a. The organization named in the principal's account 
  50304.                               is examined to see if an attribute of the 
  50305.                               requested type exists.  If it does, it is 
  50306.                               effective and is returned; then the search for 
  50307.                               that attribute ends. If it does not exist, the 
  50308.                               search for that attribute continues to the policy 
  50309.                               object as described in the next step. 
  50310.  
  50311.                            b. The registry policy object is examined to see if 
  50312.                               an attribute of the requested type exists. If the 
  50313.                               attribute exists, it is returned.  If it does 
  50314.                               not, a message indicating that no attribute of 
  50315.                               the type exists for the object is returned. 
  50316.  
  50317.                       -  For principals without accounts, for groups, and for 
  50318.                          organizations: 
  50319.  
  50320.                            a. The registry policy object is examined to see if 
  50321.                               an attribute of the requested type exists. If it 
  50322.                               does, it is returned. 
  50323.  
  50324.                            b. If it does not, a message indicating that no 
  50325.                               attribute of the type exists for the object is 
  50326.                               returned. 
  50327.  
  50328.           For multivalued attributes, the routine returns a sec_attr_t for each 
  50329.           value as an individual attribute instance. For attribute sets, the 
  50330.           routine returns a sec_attr_t for each member of the set; it does not 
  50331.           return the set instance. 
  50332.  
  50333.           If the attribute instance to be read is associated with a query 
  50334.           attribute trigger that requires additional information before it can 
  50335.           process the query request, use a sec_attr_value_t to supply the 
  50336.           requested information: 
  50337.  
  50338.             1. Set the sec_attr_encoding_t to an encoding type that is 
  50339.                compatible with the information required by the query attribute 
  50340.                trigger. 
  50341.  
  50342.             2. Set the sec_attr_value_t to hold the required information. 
  50343.  
  50344.           If the attribute instance to be read is not associated with a query 
  50345.           trigger or additional information is not required by the query 
  50346.           trigger, only an attribute UUID is required. For these attribute 
  50347.           instances, supply the attribute UUID in the input array and set the 
  50348.           attribute encoding (in sec_attr_encoding_t) to sec_attr_enc_void. 
  50349.  
  50350.           If the requested attribute type is associated with a query trigger, 
  50351.           the value returned for the attribute is the binding (as set in the 
  50352.           schema entry) of the trigger server. The caller must bind to the 
  50353.           trigger server and pass the original input query attribute to the 
  50354.           sec_attr_trig_query routine in order to retrieve the attribute value. 
  50355.  
  50356.           Note:  If the requested attribute type is associated with a query 
  50357.                  trigger, the value returned for the attribute will be the 
  50358.                  binding (as set in the schema entry) of the trigger server. 
  50359.                  The caller must bind to the trigger server and pass the 
  50360.                  orginal input query attribute to the sec_attr_trig_query call 
  50361.                  in order to retrieve the attribute value. 
  50362.  
  50363.  Related Information 
  50364.  
  50365.           Routines: 
  50366.           sec_rgy_site_open 
  50367.  
  50368.           Files: 
  50369.           dcelocal \include\dce\sec_rgy_attr.idl - The idl file from which 
  50370.           dce\sec_rgy_attr.h was derived. 
  50371.  
  50372.  
  50373. ΓòÉΓòÉΓòÉ 8.3.23. sec_rgy_attr_lookup_by_id ΓòÉΓòÉΓòÉ
  50374.  
  50375.  Purpose 
  50376.  
  50377.           Reads a specified object's attributes, expanding attribute sets into 
  50378.           individual member attributes. 
  50379.  
  50380.  Format 
  50381.  
  50382.                     #include <dce/sec_rgy_attr.h>
  50383.  
  50384.                     void sec_rgy_attr_lookup_by_id (
  50385.                             sec_rgy_handle_t  context,
  50386.                             sec_rgy_domain_t  name_domain,
  50387.                             sec_rgy_name_t  name,
  50388.                             sec_attr_cursor_t  *cursor,
  50389.                             unsigned32  num_attr_keys,
  50390.                             unsigned32  space_avail,
  50391.                             sec_attr_t  attr_keys[],
  50392.                             unsigned32  *num_returned,
  50393.                             sec_attr_t  attrs[],
  50394.                             unsigned32  *num_left,
  50395.                             error_status_t  *status);
  50396.  
  50397.  Parameters 
  50398.  
  50399.           Input 
  50400.  
  50401.           context       An opaque handle bound to a registry server. Use 
  50402.                         sec_rgy_site_open to acquire a bound handle. 
  50403.  
  50404.           name_domain   A value of type sec_rgy_domain_t that identifies the 
  50405.                         registry domain where the object specified by name 
  50406.                         resides. The valid values are as follows: 
  50407.  
  50408.                              sec_rgy_domain_person    The name identifies a 
  50409.                                                       principal. 
  50410.                              sec_rgy_domain_group     The name identifies a 
  50411.                                                       group. 
  50412.                              sec_rgy_domain_org       The name identifies an 
  50413.                                                       organization. 
  50414.  
  50415.                         This parameter is ignored if name is policy or replist. 
  50416.  
  50417.           name          A pointer to a sec_rgy_name_t character string 
  50418.                         containing the name of the person, group, or 
  50419.                         organization to which the attribute is attached. 
  50420.  
  50421.           num_attr_keys An unsigned 32-bit integer that specifies the number of 
  50422.                         elements in the attr_keys array. Set this parameter to 
  50423.                         0 to return all of the object's attributes that the 
  50424.                         caller is authorized to see. 
  50425.  
  50426.           space_avail   An unsigned 32-bit integer that specifies the size of 
  50427.                         the attr_keys array. 
  50428.  
  50429.           attr_keys[]   An array of values of type sec_attr_t that identify the 
  50430.                         attribute type ID of the attribute instance to be 
  50431.                         looked up. If the attribute type is associated with a 
  50432.                         query attribute trigger, the attr_value field in 
  50433.                         sec_attr_t can be used to pass in optional information 
  50434.                         required by the attribute trigger query.  If no 
  50435.                         information is to be passed in the attr_value field 
  50436.                         (whether the type indicates an attribute trigger query 
  50437.                         or not), set the attribute's encoding type to 
  50438.                         sec_rgy_attr_enc_void. 
  50439.  
  50440.                         The size of the attr_keys array is determined by the 
  50441.                         num_attr_keys parameter. 
  50442.  
  50443.           Input/Output 
  50444.  
  50445.           cursor        A pointer to a sec_attr_cursor_t. As an input 
  50446.                         parameter, cursor is a pointer to a sec_attr_cursor_t 
  50447.                         initialized by a sec_rgy_attr_srch_cursor_init routine. 
  50448.                         As an output parameter, cursor is a pointer to a 
  50449.                         sec_attr_cursor_t that is positioned past components 
  50450.                         returned in this routine. 
  50451.  
  50452.           Output 
  50453.  
  50454.           num_returned  A pointer to a 32-bit unsigned integer that specifies 
  50455.                         the number of attribute instances returned in the attrs 
  50456.                         array. 
  50457.  
  50458.           attrs[]       An array of values of type sec_attr_t that contains the 
  50459.                         attributes retrieved by UUID. The size of the array is 
  50460.                         determined by space_avail and the length by 
  50461.                         num_returned. 
  50462.  
  50463.           num_left      A pointer to a 32-bit unsigned integer that supplies 
  50464.                         the number of attributes that were found but that could 
  50465.                         not be returned because of space constraints in the 
  50466.                         attrs buffer. To ensure that all the attributes are 
  50467.                         returned, increase the size of the attrs array by 
  50468.                         increasing the size of space_avail and num_returned. 
  50469.  
  50470.           status        A pointer to the completion status. On successful 
  50471.                         completion, the routine returns error_status_ok, or, if 
  50472.                         the requested attributes were not available, it returns 
  50473.                         the message not_all_available. Otherwise, it returns 
  50474.                         one of the following errors: 
  50475.  
  50476.                              unauthorized 
  50477.                              registry server unavailable 
  50478.                              trigger server unavailable 
  50479.  
  50480.  Usage 
  50481.  
  50482.           The sec_rgy_attr_lookup_by_id routine reads those attributes 
  50483.           specified by UUID for an object specified by name. This routine is 
  50484.           similar to the sec_rgy_attr_lookup_no_expand routine with one 
  50485.           exception:  for attribute sets, the sec_rgy_attr_lookup_no_expand 
  50486.           routine returns a sec_attr_t for the set instance only; it does not 
  50487.           expand the set and return a sec_attr_t for each member in the set. 
  50488.           This routine expands attribute sets and returns a sec_attr_t for each 
  50489.           member in the set. 
  50490.  
  50491.           If the num_attr_keys parameter is set to 0, all of the object's 
  50492.           attributes that the caller is authorized to see are returned.  This 
  50493.           routine is useful for access by applications. 
  50494.  
  50495.           For multivalued attributes, the routine returns a sec_attr_t for each 
  50496.           value as an individual attribute instance. For attribute sets, the 
  50497.           routine returns a sec_attr_t for each member of the set; it does not 
  50498.           return the set instance. 
  50499.  
  50500.           The attr_keys array, which specifies the attributes to be returned, 
  50501.           contains values of type sec_attr_t. These values consist of: 
  50502.  
  50503.           attr_id   A UUID that identifies the attribute type 
  50504.           attr_value A value of sec_attr_value_t that specifies the attribute's 
  50505.                     encoding type and values 
  50506.  
  50507.           Use the attr_id field of each attr_keys array element to specify the 
  50508.           UUID that identifies the attribute type to be returned. 
  50509.  
  50510.           If the attribute instance to be read is not associated with a query 
  50511.           trigger or no additional information is required by the query 
  50512.           trigger, only an attribute UUID is required. For these attribute 
  50513.           instances, supply the attribute UUID in the input array and set the 
  50514.           attribute encoding (in sec_attr_encoding_t) to sec_attr_enc_void. 
  50515.  
  50516.           If the attribute instance to be read is associated with a query 
  50517.           attribute trigger that requires additional information before it can 
  50518.           process the query request, use a sec_attr_value_t to supply the 
  50519.           requested information: 
  50520.  
  50521.             1. Set the sec_attr_encoding_t to an encoding type that is 
  50522.                compatible with the information required by the query attribute 
  50523.                trigger. 
  50524.  
  50525.             2. Set the sec_attr_value_t to hold the required information. 
  50526.  
  50527.           Note that if you set num_attr_keys to zero to return all of the 
  50528.           object's attributes and an attribute is associated with a query 
  50529.           attribute trigger, the attribute trigger is called with no input 
  50530.           attribute information (that would normally have been passed in with 
  50531.           the attr_value field). 
  50532.  
  50533.           The cursor parameter specifies a cursor of type sec_attr_cursor_t 
  50534.           initialized to the starting point in the attribute list for 
  50535.           processing the query. Use the sec_attr_cursor_init routine to 
  50536.           initialize cursor. If cursor is uninitialized, the server begins 
  50537.           processing the query at the first attribute that satisfies the search 
  50538.           criteria. 
  50539.  
  50540.           The num_left parameter contains the number of attributes that were 
  50541.           found but could not be returned because of space constraints of the 
  50542.           attrs array. (Note that this number may be inaccurate if the target 
  50543.           server allows updates between successive queries.) To obtain all of 
  50544.           the remaining attributes, set the size of the attrs array so that it 
  50545.           is large enough to hold the number of attributes listed in num_left. 
  50546.  
  50547.           Notes 
  50548.  
  50549.           You must free the space allocated for each sec_attr_t pointer type 
  50550.           used by this routine. Some encoding types, for example printstrings 
  50551.           and bindings, allocate a large chunk of memory for each pointer each 
  50552.           time this routine is called. Failure to release this space can cause 
  50553.           a "memory leak", especially if you call this routine several times. 
  50554.           You can free the space by passing each sec_attr_t pointer to the 
  50555.           sec_attr_util_inst_free_ptrs or the sec_attr_util_inst_free routine. 
  50556.  
  50557.           If a requested attribute type is associated with a query trigger, 
  50558.           that attr_key will be passed as input to the sec_attr_trig_query 
  50559.           operation and the output of that call will be included in the output 
  50560.           attrs array. If num_attr_keys is zero, that is, return all 
  50561.           attributes, and an attribute is associated with a query trigger, the 
  50562.           trigger will be called with no input attribute information (that 
  50563.           would normally have been passed in by way of the attr_key value 
  50564.           field). 
  50565.  
  50566.  Permissions Required 
  50567.  
  50568.           The sec_rgy_attr_lookup_by_id routine requires the query permission 
  50569.           set for each attribute type identified in the attr_keys array. These 
  50570.           permissions are defined as part of the ACL manager set in the schema 
  50571.           entry of each attribute type. 
  50572.  
  50573.  Related Information 
  50574.  
  50575.           Routines: 
  50576.           sec_attr_util_inst_free_ptrs 
  50577.           sec_attr_util_inst_free 
  50578.           sec_rgy_attr_cursor_init 
  50579.           sec_rgy_attr_lookup_by_name 
  50580.           sec_rgy_attr_lookup_no_expand 
  50581.           sec_rgy_attr_sch_cursor_init 
  50582.  
  50583.           Files: 
  50584.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  50585.           dce\sec_rgy_attr.h was derived. 
  50586.  
  50587.  
  50588. ΓòÉΓòÉΓòÉ 8.3.24. sec_rgy_attr_lookup_by_name ΓòÉΓòÉΓòÉ
  50589.  
  50590.  Purpose 
  50591.  
  50592.           Reads a single attribute instance for a specific object. 
  50593.  
  50594.  Format 
  50595.  
  50596.                     #include <dce/sec_rgy_attr.h>
  50597.  
  50598.                     void sec_rgy_attr_lookup_by_name(
  50599.                             sec_rgy_handle_t  context,
  50600.                             sec_rgy_domain_t  name_domain,
  50601.                             sec_rgy_name_t  name,
  50602.                             unsigned_char_t  *attr_name,
  50603.                             sec_attr_t  *attr,
  50604.                             error_status_t  *status);
  50605.  
  50606.  Parameters 
  50607.  
  50608.           Input 
  50609.  
  50610.           context       An opaque handle bound to a registry server. Use 
  50611.                         sec_rgy_site_open to acquire a bound handle. 
  50612.  
  50613.           name_domain   A value of type sec_rgy_domain_t that identifies the 
  50614.                         registry domain where the object specified by name 
  50615.                         resides. The valid values are: 
  50616.  
  50617.                              sec_rgy_domain_person    The name identifies a 
  50618.                                                       principal. 
  50619.                              sec_rgy_domain_group     The name identifies a 
  50620.                                                       group. 
  50621.                              sec_rgy_domain_org       The name identifies an 
  50622.                                                       organization. 
  50623.  
  50624.                         This parameter is ignored if name is policy or replist. 
  50625.  
  50626.           name          A pointer to a sec_rgy_name_t character string 
  50627.                         containing the name of the person, group, or 
  50628.                         organization to which the attribute is attached. 
  50629.  
  50630.           attr_name     A pointer to a character string that specifies the name 
  50631.                         of the attribute to be retrieved. 
  50632.  
  50633.           Output 
  50634.  
  50635.           attr          A pointer to a sec_attr_t that contains the first 
  50636.                         instance of the named attribute. 
  50637.  
  50638.           status        A pointer to the completion status.  The completion 
  50639.                         status can be error_status_ok if all instances of the 
  50640.                         value are returned with no errors. Otherwise, status 
  50641.                         can be one of the following: 
  50642.  
  50643.                           o  unauthorized 
  50644.                           o  registry server unavailable 
  50645.                           o  trigger server unavailable 
  50646.  
  50647.  Usage 
  50648.  
  50649.           The sec_rgy_attr_lookup_by_name routine returns the named attribute 
  50650.           for a named object. This routine is useful for an interactive editor. 
  50651.  
  50652.           For multivalued attributes, this routine returns the first instance 
  50653.           of the attribute. To retrieve every instance of the attribute, use 
  50654.           the sec_rgy_attr_lookup_by_id routine, supplying the attribute UUID 
  50655.           returned in the attr parameter. 
  50656.  
  50657.           For attribute sets, the routine returns the attribute set instance, 
  50658.           not the member instances. To retrieve all members of the set, use the 
  50659.           sec_rgy_attr_lookup_by_id routine, supplying the attribute set UUID 
  50660.           returned in the attr parameter. 
  50661.  
  50662.           Notes 
  50663.  
  50664.             1. You must free the space allocated for each sec_attr_t pointer 
  50665.                type used by this routine. Some encoding types, for example 
  50666.                printstrings and bindings, allocate a large chunk of memory for 
  50667.                each pointer each time this routine is called. Failure to 
  50668.                release this space can cause a memory leak, especially if you 
  50669.                call this routine several times. You can free the space by 
  50670.                passing each sec_attr_t pointer to the 
  50671.                sec_attr_util_inst_free_ptrs or the sec_attr_util_inst_free 
  50672.                routine. 
  50673.  
  50674.             2. This routine does not provide for input data to an attribute 
  50675.                trigger query operation.  If the named attribute is associated 
  50676.                with a query attribute trigger, the attribute trigger is called 
  50677.                with no input attribute value information. 
  50678.  
  50679.  Permissions Required 
  50680.  
  50681.           The sec_rgy_attr_lookup_by_name routine requires the query permission 
  50682.           set for the attribute type of the attribute instance identified by 
  50683.           attr_name. These permissions are defined as part of the ACL manager 
  50684.           set in the schema entry of each attribute type. 
  50685.  
  50686.  Related Information 
  50687.  
  50688.           Routines: sec_rgy_site_open 
  50689.           sec_attr_util_inst_free_ptrs 
  50690.           sec_attr_util_inst_free 
  50691.           sec_rgy_attr_lookup_by_id 
  50692.           sec_rgy_attr_lookup_no_expand 
  50693.  
  50694.           Files: 
  50695.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  50696.           dce\sec_rgy_attr.h was derived. 
  50697.  
  50698.  
  50699. ΓòÉΓòÉΓòÉ 8.3.25. sec_rgy_attr_lookup_no_expand ΓòÉΓòÉΓòÉ
  50700.  
  50701.  Purpose 
  50702.  
  50703.           Reads a specified object's attributes without expanding attribute 
  50704.           sets into individual member attributes. 
  50705.  
  50706.  Format 
  50707.  
  50708.                     #include <dce/sec_rgy_attr.h>
  50709.  
  50710.                     void sec_rgy_attr_lookup_no_expand
  50711.                             sec_rgy_handle_t  context,
  50712.                             sec_rgy_domain_t  name_domain,
  50713.                             sec_rgy_name_t  name,
  50714.                             sec_attr_cursor_t  *cursor,
  50715.                             unsigned32  num_attr_keys,
  50716.                             unsigned32  space_avail,
  50717.                             sec_attr_t  attr_keys[],
  50718.                             unsigned32  *num_returned,
  50719.                             sec_attr_t  attr_sets[],
  50720.                             unsigned32  *num_left,
  50721.                             error_status_t  status;
  50722.  
  50723.  Parameters 
  50724.  
  50725.           Input 
  50726.  
  50727.           context       An opaque handle bound to a registry server. Use 
  50728.                         sec_rgy_site_open to acquire a bound handle. 
  50729.  
  50730.           name_domain   A value of type sec_rgy_domain_t that identifies the 
  50731.                         domain where the named object resides. The valid values 
  50732.                         are: 
  50733.  
  50734.                              sec_rgy_domain_principal The name identifies a 
  50735.                                                       principal. 
  50736.                              sec_rgy_domain_group     The name identifies a 
  50737.                                                       group. 
  50738.                              sec_rgy_domain_org       The name identifies an 
  50739.                                                       organization. 
  50740.  
  50741.                         This parameter is ignored if name is policy or replist. 
  50742.  
  50743.           name          A pointer to a sec_rgy_name_t character string that 
  50744.                         contains the name of the person, group, or organization 
  50745.                         to which the attribute is attached. 
  50746.  
  50747.           num_attr_keys An unsigned 32-bit integer that specifies the number of 
  50748.                         elements in the attr_keys array. If num_attr_keys is 
  50749.                         set to 0, all attribute sets that the caller is 
  50750.                         authorized to see are returned. 
  50751.  
  50752.           space_avail   An unsigned 32-bit integer that specifies the size of 
  50753.                         the attrs_sets array. 
  50754.  
  50755.           attr_keys[]   An array of values of type sec_attr_t that specify the 
  50756.                         UUIDs of the attribute sets to be returned. The size of 
  50757.                         the attr_keys array is determined by the num_attr_keys 
  50758.                         parameter. 
  50759.  
  50760.           Input/Output 
  50761.  
  50762.           cursor        A pointer to a sec_attr_cursor_t. As an input 
  50763.                         parameter, cursor is a pointer to a sec_attr_cursor_t 
  50764.                         that is initialized by the sec_rgy_attr_cursor_init. As 
  50765.                         an output parameter, cursor is a pointer to a 
  50766.                         sec_attr_cursor_t that is positioned past the attribute 
  50767.                         sets returned in this routine. 
  50768.  
  50769.           Output 
  50770.  
  50771.           num_returned  A pointer to a 32-bit integer that specifies the number 
  50772.                         of attribute sets returned in the attrs array. 
  50773.  
  50774.           attr_sets[]   An array of values of type sec_attr_t that contains the 
  50775.                         attribute sets retrieved by UUID. The size of the array 
  50776.                         is determined by space_avail and the length by 
  50777.                         num_returned. 
  50778.  
  50779.           num_left      A pointer to a 32-bit unsigned integer that supplies 
  50780.                         the number of attribute sets that were found but that 
  50781.                         could not be returned because of space constraints in 
  50782.                         the attr_sets buffer. To ensure that all the attributes 
  50783.                         are returned, increase the size of the attr_sets array 
  50784.                         by increasing the size of space_avail and num_returned. 
  50785.  
  50786.           status        A pointer to the completion status.  On successful 
  50787.                         completion, the routine returns error_status_ok. 
  50788.                         Otherwise, it returns one of the following errors: 
  50789.  
  50790.                              unauthorized 
  50791.                              registry server unavailable 
  50792.                              invalid/unsupported attribute type 
  50793.  
  50794.  Usage 
  50795.  
  50796.           The sec_rgy_attr_lookup_no_expand routine reads attribute sets.  This 
  50797.           routine is similar to the sec_rgy_attr_lookup_by_id routine, with one 
  50798.           exception: for attribute sets, the sec_rgy_attr_lookup_by_id routine 
  50799.           expands attribute sets and returns a sec_attr_t for each member in 
  50800.           the set.  This routine does not.  Instead, it returns a sec_attr_t 
  50801.           for the set instance only. The sec_rgy_attr_lookup_no_expand routine 
  50802.           is useful for access by applications. 
  50803.  
  50804.           The cursor parameter is a cursor of type sec_attr_cursor_t that 
  50805.           establishes the point in the attribute set list where the server 
  50806.           should start processing the query. Use the sec_rgy_attr_cursor_init 
  50807.           routine to initialize cursor.  If cursor is uninitialized, the server 
  50808.           begins processing the query with the first attribute that satisfies 
  50809.           the search criteria. 
  50810.  
  50811.           The num_left parameter contains the number of attribute sets that 
  50812.           were found but that could not be returned because of space 
  50813.           constraints of the attr_sets array. (Note that this number may be 
  50814.           inaccurate if the target server allows updates between successive 
  50815.           queries.) To obtain all of the remaining attribute sets, set the size 
  50816.           of the attr_sets array so that it is large enough to hold the number 
  50817.           of attributes listed in num_left. 
  50818.  
  50819.           Notes  You must free the space allocated for each sec_attr_t pointer 
  50820.                  type used by this routine. Some encoding types, for example 
  50821.                  printstrings and bindings, allocate a large chunk of memory 
  50822.                  for each pointer each time this routine is called. Failure to 
  50823.                  release this space can cause a memory leak, especially if you 
  50824.                  call this routine several times. You can free the space by 
  50825.                  passing each sec_attr_t pointer to the 
  50826.                  sec_attr_util_inst_free_ptrs or the sec_attr_util_inst_free 
  50827.                  routine. 
  50828.  
  50829.           If the requested attribute type is associated with a query trigger, 
  50830.           the value returned for the attribute is the binding (as set in the 
  50831.           schema entry) of the trigger server.  The caller must bind to the 
  50832.           trigger server and pass the original input query attribute to the 
  50833.           sec_attr_trig_query call in order to retrieve the attribute value. 
  50834.  
  50835.  Permissions Required 
  50836.  
  50837.           The sec_rgy_attr_lookup_no_expand routine requires the query 
  50838.           permission set for each attribute type identified in the attr_keys[] 
  50839.           array. These permissions are defined as part of the ACL manager set 
  50840.           in the schema entry of each attribute type. 
  50841.  
  50842.  Related Information 
  50843.  
  50844.           Routines: sec_attr_util_inst_free_ptrs 
  50845.           sec_attr_util_inst_free 
  50846.           sec_rgy_attr_cursor_init 
  50847.           sec_rgy_attr_lookup_by_id 
  50848.           sec_rgy_attr_lookup_by_name 
  50849.           sec_rgy_site_open 
  50850.  
  50851.           Files: 
  50852.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  50853.           dce\sec_rgy_attr.h was derived. 
  50854.  
  50855.  
  50856. ΓòÉΓòÉΓòÉ 8.3.26. sec_rgy_attr_sch_aclmgr_strings ΓòÉΓòÉΓòÉ
  50857.  
  50858.  Purpose 
  50859.  
  50860.           Returns printable ACL strings associated with an ACL manager 
  50861.           protecting a bound-to-schema object. 
  50862.  
  50863.  Format 
  50864.  
  50865.                     #include <dce/dce_attr_base.h>
  50866.  
  50867.                     void sec_rgy_attr_sch_aclmgr_strings(
  50868.                             sec_rgy_handle_t  context,
  50869.                             sec_attr_component_name_t  schema_name,
  50870.                             uuid_t  *acl_mgr_type,
  50871.                             unsigned32  size_avail,
  50872.                             uuid_t  *acl_mgr_type_chain,
  50873.                             sec_acl_printstring_t  *acl_mgr_info,
  50874.                             boolean32  *tokenize,
  50875.                             unsigned32  *total_num_printstrings,
  50876.                             unsigned32  *size_used,
  50877.                             sec_acl_printstring_t  permstrings[],
  50878.                             error_status_t  *status);
  50879.  
  50880.  Parameters 
  50881.  
  50882.           Input 
  50883.  
  50884.           context       An opaque handle bound to a registry server. Use 
  50885.                         sec_rgy_site_open to acquire a bound handle. 
  50886.  
  50887.           schema_name   A value of type sec_attr_component_name_t that 
  50888.                         specifies the name of the schema object pointed to by 
  50889.                         context. 
  50890.  
  50891.           acl_manager_type A pointer to the UUID identifying the type of the 
  50892.                         ACL manager in question. There may be more than one 
  50893.                         type of ACL manager protecting the schema object whose 
  50894.                         ACL is bound to the input handle. Use this parameter to 
  50895.                         distinguish them. Use sec_rgy_attr_sch_get_acl_mgrs to 
  50896.                         acquire a list of the manager types protecting a given 
  50897.                         schema object. 
  50898.  
  50899.           size_avail    An unsigned 32-bit integer containing the allocated 
  50900.                         length of the permstrings array. 
  50901.  
  50902.           Output 
  50903.  
  50904.           acl_mgr_type_chain If the target object ACL contains more than 32 
  50905.                         permission bits, chains of manager types are used: each 
  50906.                         manager type holds one 32-bit segment of permissions. 
  50907.                         The UUID returned in acl_mgr_type_chain refers to the 
  50908.                         next ACL manager in the chain. If there are no more ACL 
  50909.                         managers in the chain, uuid_nil is returned. 
  50910.  
  50911.           acl_mgr_info  A pointer to a print string that contains the ACL 
  50912.                         manager type's name, help information, and set of 
  50913.                         supported of permission bits. 
  50914.  
  50915.           tokenize      A pointer to a variable that specifies whether print 
  50916.                         strings are passed separately: 
  50917.  
  50918.                           o  TRUE indicates that the print strings must be 
  50919.                              printed or passed separately. 
  50920.  
  50921.                           o  FALSE indicates that the print strings are 
  50922.                              unambiguous and can be concatenated without 
  50923.                              confusion when printed. 
  50924.  
  50925.           total_num_printstrings A pointer to an unsigned 32-bit integer 
  50926.                         containing the total number of permission entries 
  50927.                         supported by this ACL manager type. 
  50928.  
  50929.           size_used     A pointer to an unsigned 32-bit integer containing the 
  50930.                         number of permission entries returned in the 
  50931.                         permstrings array. 
  50932.  
  50933.           permstrings[] An array of print strings of type 
  50934.                         sec_acl_printstring_t. Each entry of the array is a 
  50935.                         structure containing the following three components: 
  50936.  
  50937.                              printstring     A character string of maximum 
  50938.                                              length sec_acl_printstring_len 
  50939.                                              describing the printable 
  50940.                                              representation of a specified 
  50941.                                              permission. 
  50942.  
  50943.                              helpstring      A character string of maximum 
  50944.                                              length 
  50945.                                              sec_acl_printstring_help_len 
  50946.                                              containing some text that can be 
  50947.                                              used to describe the specified 
  50948.                                              permission. 
  50949.  
  50950.                              permissions     A sec_acl_permset_t permission set 
  50951.                                              describing the permissions that 
  50952.                                              are represented with the companion 
  50953.                                              print string. 
  50954.  
  50955.                         The array consists of one entry for each permission 
  50956.                         supported by the ACL manager identified by 
  50957.                         acl_mgr_type. 
  50958.  
  50959.           status        A pointer to the completion status.  On successful 
  50960.                         completion, the routine returns error_status_ok. 
  50961.                         Otherwise, it returns one of the following errors: 
  50962.  
  50963.                              sec_attr_unauthorized 
  50964.                              sec_attr_svr_unavailable 
  50965.                              sec_attr_no_memory 
  50966.  
  50967.  Usage 
  50968.  
  50969.           The sec_rgy_attr_sch_aclmgr_strings routine returns an array of 
  50970.           printable representations (called print strings) for each permission 
  50971.           bit or combination of permission bits that the specified ACL manager 
  50972.           supports. The ACL manager type specified by acl_mgr_type must be one 
  50973.           of the types protecting the schema object bound to by context. 
  50974.  
  50975.           In addition to returning the print strings, this routine also returns 
  50976.           instructions about how to print the strings in the tokenize variable. 
  50977.           If this variable is set to FALSE, the print strings can be 
  50978.           concatenated. If it is set to TRUE, the print strings cannot be 
  50979.           concatenated. For example, print strings of r and w can be 
  50980.           concatenated as rw without any confusion. However, print strings 
  50981.           containing whole words such as read or write should not be 
  50982.           concatenated. 
  50983.  
  50984.           ACL managers often define aliases for common permission combinations. 
  50985.           By convention, simple entries are at the beginning of the permstrings 
  50986.           array, and combinations are at the end. 
  50987.  
  50988.  Permissions Required 
  50989.  
  50990.           The sec_rgy_attr_sch_aclmgr_strings routine requires the r permission 
  50991.           on the attr_schema object. 
  50992.  
  50993.  Related Information 
  50994.  
  50995.           Routines: 
  50996.           sec_rgy_attr_sch_get_acl_mgrs 
  50997.           sec_rgy_site_open 
  50998.  
  50999.           Files: 
  51000.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51001.           dce\sec_rgy_attr_sch.h was derived. 
  51002.  
  51003.  
  51004. ΓòÉΓòÉΓòÉ 8.3.27. sec_rgy_attr_sch_create_entry ΓòÉΓòÉΓòÉ
  51005.  
  51006.  Purpose 
  51007.  
  51008.           Creates a schema entry. 
  51009.  
  51010.  Format 
  51011.  
  51012.                     #include <dce/sec_rgy_attr_sch.h>
  51013.  
  51014.                     void sec_rgy_attr_sch_create_entry(
  51015.                             sec_rgy_handle_t  context,
  51016.                             sec_attr_component_name_t  schema_name,
  51017.                             sec_attr_schema_entry_t  *schema_entry,
  51018.                             error_status_t  *status);
  51019.  
  51020.  Parameters 
  51021.  
  51022.           Input 
  51023.  
  51024.           context       An opaque handle bound to a registry server. Use 
  51025.                         sec_rgy_site_open to acquire a bound handle. 
  51026.  
  51027.           schema_name   A value of type sec_attr_component_name_t that 
  51028.                         specifies the name of the schema object to be created. 
  51029.  
  51030.           schema_entry  A pointer to a sec_attr_schema_entry_t that contains 
  51031.                         the schema entry values for the schema where the entry 
  51032.                         is to be created. 
  51033.  
  51034.           Output 
  51035.  
  51036.           status        A pointer to the completion status.  On successful 
  51037.                         completion, the routine returns error_status_ok. 
  51038.                         Otherwise, it returns one of the following errors: 
  51039.  
  51040.                              sec_attr_bad_name 
  51041.                              sec_attr_bad_encoding_type 
  51042.                              sec_attr_bad_acl_mgr_set 
  51043.                              sec_attr_bad_acl_mgr_type 
  51044.                              sec_attr_bad_permset 
  51045.                              sec_attr_bad_intercell_action 
  51046.                              sec_attr_trig_bind_info_missing 
  51047.                              sec_attr_bad_bind_info 
  51048.                              sec_attr_bad_bind_svr_name 
  51049.                              sec_attr_bad_bind_prot_level 
  51050.                              sec_attr_bad_bind_authn_svc 
  51051.                              sec_attr_bad_bind_authz_svc 
  51052.                              sec_attr_bad_uniq_query_accept 
  51053.                              sec_attr_bad_scope 
  51054.                              sec_attr_bad_comment 
  51055.                              sec_attr_type_id_exists 
  51056.                              sec_attr_name_exists 
  51057.                              sec_attr_unauthorized 
  51058.                              sec_attr_svr_read_only 
  51059.                              sec_attr_svr_unavailable 
  51060.                              sec_attr_no_memory 
  51061.  
  51062.  Usage 
  51063.  
  51064.           The sec_rgy_attr_sch_create_entry routine creates schema entries that 
  51065.           define attribute types. 
  51066.  
  51067.  Permissions Required 
  51068.  
  51069.           The sec_rgy_attr_sch_create_entry routine requires i permission on 
  51070.           the attr_schema object. 
  51071.  
  51072.  Related Information 
  51073.  
  51074.           Routines: 
  51075.           sec_rgy_attr_sch_delete_entry 
  51076.           sec_rgy_attr_sch_update_entry 
  51077.           sec_rgy_site_open 
  51078.  
  51079.           Files: 
  51080.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51081.           dce\sec_rgy_attr_sch.h was derived. 
  51082.  
  51083.  
  51084. ΓòÉΓòÉΓòÉ 8.3.28. sec_rgy_attr_sch_cursor_alloc ΓòÉΓòÉΓòÉ
  51085.  
  51086.  Purpose 
  51087.  
  51088.           Allocates resources to a cursor used with the 
  51089.           sec_rgy_attr_sch_cursor_alloc routine. 
  51090.  
  51091.  Format 
  51092.  
  51093.                     #include <dce/sec_rgy_attr_sch.h>
  51094.  
  51095.                     void sec_rgy_attr_sch_cursor_alloc(
  51096.                             sec_attr_cursor_t  *cursor,
  51097.                             error_status_t  *status);
  51098.  
  51099.  Parameters 
  51100.  
  51101.           Output 
  51102.  
  51103.           cursor        A pointer to a sec_attr_cursor_t 
  51104.  
  51105.           status        A pointer to the completion status.  On successful 
  51106.                         completion, the routine returns error_status_ok. 
  51107.                         Otherwise, it returns sec_attr_no_memory. 
  51108.  
  51109.  Usage 
  51110.  
  51111.           The sec_rgy_attr_sch_cursor_alloc routine allocates resources to a 
  51112.           cursor used with the sec_rgy_attr_sch_scan routine. This routine, 
  51113.           which is a local operation, does not initialize cursor. 
  51114.  
  51115.           The sec_rgy_attr_sch_cursor_init routine, which makes a remote call, 
  51116.           allocates and initializes the cursor. In addition, 
  51117.           sec_rgy_attr_sch_cursor_init returns the total number of entries 
  51118.           found in the schema as an output parameter; 
  51119.           sec_rgy_attr_sch_cursor_alloc does not. 
  51120.  
  51121.  Related Information 
  51122.  
  51123.           Routines: sec_rgy_attr_sch_cursor_init 
  51124.           sec_rgy_attr_sch_cursor_release 
  51125.           sec_rgy_attr_sch_scan 
  51126.  
  51127.           Files: 
  51128.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51129.           dce\sec_rgy_attr_sch.h was derived. 
  51130.  
  51131.  
  51132. ΓòÉΓòÉΓòÉ 8.3.29. sec_rgy_attr_sch_cursor_init ΓòÉΓòÉΓòÉ
  51133.  
  51134.  Purpose 
  51135.  
  51136.           Initializes and allocates a cursor used by the sec_rgy_attr_sch_scan 
  51137.           routine. 
  51138.  
  51139.  Format 
  51140.  
  51141.                     #include <dce/sec_rgy_attr_sch.h>
  51142.  
  51143.                     void sec_rgy_attr_cursor_init(
  51144.                             sec_rgy_handle_t  context,
  51145.                             sec_attr_component_name_t  schema_name,
  51146.                             unsigned32  *cur_num_entries,
  51147.                             sec_attr_cursor_t  *cursor,
  51148.                             error_status_t  *status);
  51149.  
  51150.  Parameters 
  51151.  
  51152.           Input 
  51153.  
  51154.           context       An opaque handle bound to a registry server. Use 
  51155.                         sec_rgy_site_open to acquire a bound handle. 
  51156.  
  51157.           schema_name   A value of type sec_attr_component_name_t that 
  51158.                         specifies the name of the schema object to which cursor 
  51159.                         is initialized. 
  51160.  
  51161.           Output 
  51162.  
  51163.           cur_num_entries A pointer to an unsigned 32-bit integer that 
  51164.                         specifies the total number of entries contained in the 
  51165.                         schema at the time of this call. 
  51166.  
  51167.           cursor        A pointer to a cursor of type sec_attr_cursor_t that is 
  51168.                         initialized to the first entry in the schema. 
  51169.  
  51170.           status        A pointer to the completion status.  On successful 
  51171.                         completion, the routine returns error_status_ok. 
  51172.                         Otherwise, it returns one of the following errors: 
  51173.  
  51174.                              sec_attr_unauthorized 
  51175.                              sec_attr_svr_unavailable 
  51176.                              sec_attr_no_memory 
  51177.  
  51178.  Usage 
  51179.  
  51180.           The sec_rgy_attr_sch_cursor_init routine initializes and allocates 
  51181.           resources to a cursor used with the sec_rgy_attr_sch_scan routine. 
  51182.           This routine makes remote calls to initialize the cursor. To limit 
  51183.           the number of remote calls, use the sec_rgy_attr_sch_cursor_alloc 
  51184.           routine to allocate cursor, but not initialize it. Be aware, however, 
  51185.           that the sec_rgy_attr_sch_cursor_init routine supplies the total 
  51186.           number of entries found in the schema as an output parameter; the 
  51187.           sec_rgy_attr_sch_cursor_alloc routine does not. 
  51188.  
  51189.           If the cursor input to sec_rgy_attr_sch_scan has not been 
  51190.           initialized, the sec_rgy_attr_sch_scan routine initializes it; if it 
  51191.           has been initialized, sec_rgy_attr_sch_scan advances it. 
  51192.  
  51193.  Related Information 
  51194.  
  51195.           Routines: sec_rgy_attr_sch_cursor_release 
  51196.           sec_rgy_attr_sch_scan 
  51197.           sec_rgy_attr_sch_cursor_alloc 
  51198.  
  51199.           Files: 
  51200.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51201.           dce\sec_rgy_attr_sch.h was derived. 
  51202.  
  51203.  
  51204. ΓòÉΓòÉΓòÉ 8.3.30. sec_rgy_attr_sch_cursor_release ΓòÉΓòÉΓòÉ
  51205.  
  51206.  Purpose 
  51207.  
  51208.           Release states associated with a cursor used by the 
  51209.           sec_rgy_attr_sch_scan routine. 
  51210.  
  51211.  Format 
  51212.  
  51213.                     #include <dce/sec_rgy_attr_sch.h>
  51214.  
  51215.                     void sec_rgy_attr_cursor_rel(
  51216.                             sec_attr_cursor_t  *cursor,
  51217.                             error_status_t  *status);
  51218.  
  51219.  Parameters 
  51220.  
  51221.           Input/Output 
  51222.  
  51223.           cursor        A pointer to a sec_attr_cursor_t. As an input 
  51224.                         parameter, cursor must have been initialized to the 
  51225.                         first entry in a schema. As an output parameter, cursor 
  51226.                         is uninitialized with all resources released. 
  51227.  
  51228.           Output 
  51229.  
  51230.           status        A pointer to the completion status.  On successful 
  51231.                         completion, the routine returns error_status_ok. 
  51232.                         Otherwise, it returns an error. 
  51233.  
  51234.  Usage 
  51235.  
  51236.           The sec_rgy_attr_sch_cursor_init routine releases the resources 
  51237.           allocated to the cursor used by the sec_rgy_attr_sch_scan routine. 
  51238.           This routine is a local operation and makes no remote calls. 
  51239.  
  51240.  Related Information 
  51241.  
  51242.           Routines: sec_rgy_attr_sch_cursor_init 
  51243.           sec_rgy_attr_sch_cursor_alloc 
  51244.           sec_rgy_attr_sch_scan 
  51245.  
  51246.           Files: 
  51247.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51248.           dce\sec_rgy_attr_sch.h was derived. 
  51249.  
  51250.  
  51251. ΓòÉΓòÉΓòÉ 8.3.31. sec_rgy_attr_sch_cursor_reset ΓòÉΓòÉΓòÉ
  51252.  
  51253.  Purpose 
  51254.  
  51255.           Resets a cursor that has been allocated with either 
  51256.           sec_rgy_attr_sch_cursor_init or sec_rgy_attr_sch_cursor_alloc 
  51257.           routine. 
  51258.  
  51259.  Format 
  51260.  
  51261.                     #include <dce/sec_rgy_attr_sch.h>
  51262.  
  51263.                     void dce_attr_cursor_reset(
  51264.                             sec_attr_cursor_t  *cursor,
  51265.                             error_status_t  *status);
  51266.  
  51267.  Parameters 
  51268.  
  51269.           Input/Output 
  51270.  
  51271.           cursor        A pointer to a sec_attr_cursor_t. As an input 
  51272.                         parameter, an initialized cursor. As an output 
  51273.                         parameter, cursor is reset to the first attribute in 
  51274.                         the schema. 
  51275.  
  51276.           Output 
  51277.  
  51278.           status        A pointer to the completion status.  On successful 
  51279.                         completion, the routine returns error_status_ok. 
  51280.                         Otherwise, it returns sec_attr_bad_cursor. 
  51281.  
  51282.  Usage 
  51283.  
  51284.           The sec_rgy_attr_sch_cursor_reset routine resets to NULL a 
  51285.           sec_attr_cursor_t cursor that has been allocated by either 
  51286.           sec_rgy_attr_sch_cursor_init or sec_rgy_attr_sch_cursor_alloc. The 
  51287.           reset cursor can then be used to process a new sec_rgy_attr_sch_scan 
  51288.           query by reusing the cursor instead of releasing and re-allocating 
  51289.           it. This is a local operation and makes no remote calls. 
  51290.  
  51291.  Related Information 
  51292.  
  51293.           Routines: 
  51294.           sec_rgy_attr_sch_cursor_init 
  51295.           sec_rgy_attr_sch_cursor_alloc 
  51296.           sec_rgy_attr_sch_scan 
  51297.  
  51298.           Files: 
  51299.           dcelocal\include\dce\sec_rgy_ attr_sch.idl - The idl file from which 
  51300.           dce\sec_rgy_attr_sch.h was derived. 
  51301.  
  51302.  
  51303. ΓòÉΓòÉΓòÉ 8.3.32. sec_rgy_attr_sch_delete_entry ΓòÉΓòÉΓòÉ
  51304.  
  51305.  Purpose 
  51306.  
  51307.           Deletes a schema entry. 
  51308.  
  51309.  Format 
  51310.  
  51311.                     #include <dce/sec_rgy_attr_sch.h>
  51312.  
  51313.                     void sec_rgy_attr_delete_entry(
  51314.                             sec_rgy_handle_t  context,
  51315.                             sec_attr_component_name_t  schema_name,
  51316.                             uuid_t  *attr_id,
  51317.                             error_status_t  *status);
  51318.  
  51319.  Parameters 
  51320.  
  51321.           Input 
  51322.  
  51323.           context       An opaque handle bound to a registry server. Use 
  51324.                         sec_rgy_site_open to acquire a bound handle. 
  51325.  
  51326.           schema_name   A value of type sec_attr_component_name_t that 
  51327.                         specifies the name of the schema object to be created. 
  51328.  
  51329.           attr_id       A pointer to a uuid_t that identifies the schema entry 
  51330.                         to be deleted. 
  51331.  
  51332.           Output 
  51333.  
  51334.           status        A pointer to the completion status.  On successful 
  51335.                         completion, the routine returns error_status_ok. 
  51336.                         Otherwise, it returns one of the following errors: 
  51337.  
  51338.                              sec_attr_sch_entry_not_found 
  51339.                              sec_attr_unauthorized 
  51340.                              sec_attr_svr_read_only 
  51341.                              sec_attr_svr_unavailable 
  51342.                              sec_attr_no_memory 
  51343.  
  51344.  Usage 
  51345.  
  51346.           The sec_rgy_attr_sch_delete_entry routine deletes a schema entry. 
  51347.           Because this is a radical operation that invalidates any existing 
  51348.           attributes of this type on objects dominated by the schema, access to 
  51349.           this operation should be severely limited. 
  51350.  
  51351.  Permissions Required 
  51352.  
  51353.           The sec_rgy_attr_sch_delete_entry routine requires the d permission 
  51354.           on the attr_schema object. 
  51355.  
  51356.  Related Information 
  51357.  
  51358.           Routines: sec_rgy_site_open 
  51359.           sec_rgy_attr_sch_create_entry 
  51360.           sec_rgy_attr_sch_update_entry 
  51361.  
  51362.           Files: 
  51363.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51364.           dce\sec_rgy_attr_sch.h was derived. 
  51365.  
  51366.  
  51367. ΓòÉΓòÉΓòÉ 8.3.33. sec_rgy_attr_sch_get_acl_mgrs ΓòÉΓòÉΓòÉ
  51368.  
  51369.  Purpose 
  51370.  
  51371.           Retrieves the manager types of the ACLs protecting the objects 
  51372.           dominated by a named schema. 
  51373.  
  51374.  Format 
  51375.  
  51376.                     #include <dce/sec_rgy_attr_sch.h>
  51377.  
  51378.                     void sec_rgy_attr_get_acl_mgrs(
  51379.                             sec_rgy_handle_t  context,
  51380.                             sec_attr_component_name_t  schema_name,
  51381.                             unsigned32  size_avail,
  51382.                             unsigned32  *size_used,
  51383.                             unsigned32  *num_acl_mgr_types,
  51384.                             uuid_t  acl_mgr_types[],
  51385.                             error_status_t  *status);
  51386.  
  51387.  Parameters 
  51388.  
  51389.           Input 
  51390.  
  51391.           context       An opaque handle bound to a registry server. Use 
  51392.                         sec_rgy_site_open to acquire a bound handle. 
  51393.  
  51394.           schema_name   A value of type sec_attr_component_name_t that 
  51395.                         specifies the name of the schema object to be created. 
  51396.  
  51397.           size_avail    An unsigned 32-bit integer containing the allocated 
  51398.                         length of the acl_mgr_types array. 
  51399.  
  51400.           Output 
  51401.  
  51402.           size_used     An unsigned 32-bit integer containing the number of 
  51403.                         output entries returned in the acl_mgr_types array. 
  51404.  
  51405.           num_acl_mgr_types An unsigned 32-bit integer containing the number of 
  51406.                         types returned in the acl_mgr_types array. This may be 
  51407.                         greater than size_used if there was not enough space 
  51408.                         allocated by size_avail for all the manager types in 
  51409.                         the acl_mgr_types array. 
  51410.  
  51411.           acl_mgr_types[] An array of the length specified in size_avail to 
  51412.                         contain UUIDs (of type uuid_t) identifying the types of 
  51413.                         ACL managers protecting the target object. 
  51414.  
  51415.           status        A pointer to the completion status.  On successful 
  51416.                         completion, the routine returns error_status_ok. 
  51417.                         Otherwise, it returns one of the following errors: 
  51418.  
  51419.                              sec_attr_unauthorized 
  51420.                              sec_attr_svr_unavailable 
  51421.                              sec_attr_no_memory 
  51422.  
  51423.  Usage 
  51424.  
  51425.           The sec_rgy_attr_sch_get_acl_mgrs routine returns a list of the 
  51426.           manager types protecting the schema object identified by context. 
  51427.  
  51428.           ACL editors and browsers can use this operation to determine the ACL 
  51429.           manager types protecting a selected schema object. They can then use 
  51430.           the sec_rgy_attr_sch_aclmgr_strings routine to determine how to 
  51431.           format for display the permissions supported by that ACL manager 
  51432.           type. 
  51433.  
  51434.  Permissions Required 
  51435.  
  51436.           The sec_rgy_attr_sch_get_acl_mgrs routine requires the r permission 
  51437.           on the attr_schema object. 
  51438.  
  51439.  Related Information 
  51440.  
  51441.           Routines: sec_rgy_attr_sch_aclmgr_strings 
  51442.           sec_rgy_site_open 
  51443.  
  51444.           Files: 
  51445.           dcelocal\include\dce\sec_rgy_ attr_sch.idl - The idl file from which 
  51446.           dce\sec_rgy_attr_sch.h was derived. 
  51447.  
  51448.  
  51449. ΓòÉΓòÉΓòÉ 8.3.34. sec_rgy_attr_sch_lookup_by_id ΓòÉΓòÉΓòÉ
  51450.  
  51451.  Purpose 
  51452.  
  51453.           Reads a schema entry identified by UUID. 
  51454.  
  51455.  Format 
  51456.  
  51457.                     #include <dce/sec_rgy_attr_sch.h>
  51458.  
  51459.                     void sec_rgy_attr_sch_lookup_by_id(
  51460.                             sec_rgy_handle_t  context,
  51461.                             sec_attr_component_name_t  schema_name,
  51462.                             uuid_t  *attr_id,
  51463.                             sec_attr_schema_entry_t  *schema_entry,
  51464.                             error_status_t  *status);
  51465.  
  51466.  Parameters 
  51467.  
  51468.           Input 
  51469.  
  51470.           context       An opaque handle bound to a registry server. Use 
  51471.                         sec_rgy_site_open to acquire a bound handle. 
  51472.  
  51473.           schema_name   A value of type sec_attr_component_name_t that 
  51474.                         specifies the name of the schema object to be created. 
  51475.  
  51476.           attr_id       A pointer to a uuid_t that identifies a schema entry. 
  51477.  
  51478.           Output 
  51479.  
  51480.           schema_entry  A sec_attr_schema_entry_t that contains an entry 
  51481.                         identified by attr_id. 
  51482.  
  51483.           status        A pointer to the completion status.  On successful 
  51484.                         completion, the routine returns error_status_ok. 
  51485.                         Otherwise, it returns one of the following errors: 
  51486.  
  51487.                              sec_attr_sch_entry_not_found 
  51488.                              sec_attr_unauthorized 
  51489.                              sec_attr_svr_unavailable 
  51490.                              sec_attr_no_memory 
  51491.  
  51492.  Usage 
  51493.  
  51494.           The sec_rgy_attr_sch_lookup_by_id routine reads a schema entry 
  51495.           identified by attr_id. This routine is useful for access by 
  51496.           applications. 
  51497.  
  51498.  Notes 
  51499.  
  51500.           You must free the space allocated for each sec_attr_schema_entry_t 
  51501.           pointer type used by this routine. Some encoding types, for example 
  51502.           printstrings and bindings, allocate a large chunk of memory for each 
  51503.           pointer each time this routine is called. Failure to release this 
  51504.           space can cause a memory leak, especially if you call this routine 
  51505.           several times. You can free the space by passing each 
  51506.           sec_attr_schema_entry_t pointer to the 
  51507.           sec_attr_util_sch_ent_free_ptrs or the sec_attr_util_sch_ent_free 
  51508.           routine. 
  51509.  
  51510.  Permissions Required 
  51511.  
  51512.           The sec_rgy_attr_sch_lookup_by_id routine requires the r permission 
  51513.           on the attr_schema object. 
  51514.  
  51515.  Related Information 
  51516.  
  51517.           Routines: 
  51518.           sec_rgy_attr_sch_lookup_by_name 
  51519.           sec_rgy_attr_sch_scan 
  51520.           sec_rgy_site_open 
  51521.  
  51522.           Files: 
  51523.           dcelocal\include\dce\sec_rgy_attr_sch.idl -The idl file from which 
  51524.           dce\sec_rgy_attr_sch.h was derived. 
  51525.  
  51526.  
  51527. ΓòÉΓòÉΓòÉ 8.3.35. sec_rgy_attr_sch_lookup_by_name ΓòÉΓòÉΓòÉ
  51528.  
  51529.  Purpose 
  51530.  
  51531.           Reads a schema entry identified by name. 
  51532.  
  51533.  Format 
  51534.  
  51535.                     #include <dce/sec_rgy_attr_sch.h>
  51536.  
  51537.                     void sec_rgy_attr_sch_lookup_by_name(
  51538.                             sec_rgy_handle_t  context,
  51539.                             sec_attr_component_name_t  schema_name,
  51540.                             unsigned_char  *attr_name,
  51541.                             sec_attr_schema_entry_t  *schema_entry,
  51542.                             error_status_t  *status);
  51543.  
  51544.  Parameters 
  51545.  
  51546.           Input 
  51547.  
  51548.           context       An opaque handle bound to a registry server. Use 
  51549.                         sec_rgy_site_open to acquire a bound handle. 
  51550.  
  51551.           schema_name   A value of type sec_attr_component_name_t that 
  51552.                         specifies the name of the schema that contains the 
  51553.                         entry to be changed. 
  51554.  
  51555.           attr_name     A pointer to an unsigned character string that 
  51556.                         identifies a schema entry. 
  51557.  
  51558.           Output 
  51559.  
  51560.           schema_entry  A sec_attr_schema_entry_t that contains the schema 
  51561.                         entry identified by attr_name. 
  51562.  
  51563.           status        A pointer to the completion status.  On successful 
  51564.                         completion, the routine returns error_status_ok. 
  51565.                         Otherwise, it returns one of the following errors: 
  51566.  
  51567.                              sec_attr_sch_entry_not_found 
  51568.                              sec_attr_bad_name 
  51569.                              sec_attr_unauthorized 
  51570.                              sec_attr_svr_unavailable 
  51571.                              sec_attr_no_memory 
  51572.  
  51573.  Usage 
  51574.  
  51575.           The sec_rgy_attr_sch_lookup_by_name routine reads a schema entry 
  51576.           identified by name. This routine is useful with an interactive 
  51577.           editor. 
  51578.  
  51579.  Notes 
  51580.  
  51581.           You must free the space allocated for each sec_attr_schema_entry_t 
  51582.           pointer type used by this routine. Some encoding types, for example 
  51583.           printstrings and bindings, allocate a large chunk of memory for each 
  51584.           pointer each time this routine is called. Failure to release this 
  51585.           space can cause a memory leak, especially if you call this routine 
  51586.           several times. You can free the space by passing each 
  51587.           sec_attr_schema_entry_t pointer to the 
  51588.           sec_attr_util_sch_ent_free_ptrs or the sec_attr_util_sch_ent_free 
  51589.           routine. 
  51590.  
  51591.  Permissions Required 
  51592.  
  51593.           The sec_rgy_attr_sch_lookup_by_name routine requires the r permission 
  51594.           on the attr_schema object. 
  51595.  
  51596.  Related Information 
  51597.  
  51598.           Routines: sec_rgy_attr_sch_lookup_by_id 
  51599.           sec_rgy_attr_sch_scan 
  51600.           sec_rgy_site_open 
  51601.  
  51602.           Files: 
  51603.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51604.           dce\sec_rgy_attr_sch.h was derived. 
  51605.  
  51606.  
  51607. ΓòÉΓòÉΓòÉ 8.3.36. sec_rgy_attr_sch_scan ΓòÉΓòÉΓòÉ
  51608.  
  51609.  Purpose 
  51610.  
  51611.           Reads a specified number of schema entries. 
  51612.  
  51613.  Format 
  51614.  
  51615.                     #include <dce/sec_rgy_attr_sch.h>
  51616.  
  51617.                     void sec_rgy_attr_sch_scan(
  51618.                             sec_rgy_handle_t  context,
  51619.                             sec_attr_component_name_t  schema_name,
  51620.                             sec_attr_cursor_t  *cursor,
  51621.                             unsigned32  num_to_read,
  51622.                             unsigned32  *num_read,
  51623.                             sec_attr_schema_entry_t  schema_entries[],
  51624.                             error_status_t  *status);
  51625.  
  51626.  Parameters 
  51627.  
  51628.           Input 
  51629.  
  51630.           context       An opaque handle bound to a registry server. Use 
  51631.                         sec_rgy_site_open to acquire a bound handle. 
  51632.  
  51633.           schema_name   A value of type sec_attr_component_name_t that 
  51634.                         specifies the name of the schema object to be created. 
  51635.  
  51636.           num_to_read   An unsigned 32-bit integer specifying the size of the 
  51637.                         schema_entries array and the maximum number of entries 
  51638.                         to be returned. 
  51639.  
  51640.           Input/Output 
  51641.  
  51642.           cursor        A pointer to a sec_attr_cursor_t.  As input, cursor 
  51643.                         must be allocated and can be initialized. If cursor is 
  51644.                         not initialized, sec_rgy_attr_sch_scan is initialized. 
  51645.                         As output, cursor is positioned at the first schema 
  51646.                         entry after the returned entries. 
  51647.  
  51648.           Output 
  51649.  
  51650.           num_read      A pointer to an unsigned 32-bit integer specifying the 
  51651.                         number of entries returned in schema_entries. 
  51652.  
  51653.           schema_entries[] A sec_attr_schema_entry_t that contains an array of 
  51654.                         the returned schema entries. 
  51655.  
  51656.           status        A pointer to the completion status.  On successful 
  51657.                         completion, the routine returns error_status_ok 
  51658.                         Otherwise, it returns one of the following errors: 
  51659.  
  51660.                              sec_attr_bad_cursor 
  51661.                              sec_attr_unauthorized 
  51662.                              sec_attr_svr_unavailable 
  51663.                              sec_attr_no_memory 
  51664.  
  51665.  Usage 
  51666.  
  51667.           The sec_rgy_attr_sch_scan routine reads schema entries. The read 
  51668.           begins at the entry where the input cursor is positioned and ends 
  51669.           after the number of entries specified in num_to_read. 
  51670.  
  51671.           The input cursor must have been allocated by either the 
  51672.           sec_rgy_attr_cursor_init or the sec_rgy_attr_cursor_alloc routine. If 
  51673.           the input cursor is not initialized, sec_rgy_attr_sch_scan 
  51674.           initializes it; if cursor is initialized, sec_rgy_attr_sch_scan only 
  51675.           advances it. 
  51676.  
  51677.           To read all entries in a schema, make successive 
  51678.           sec_rgy_attr_sch_scan routines. When all entries have been read, the 
  51679.           routine returns the message no_more_entries. 
  51680.  
  51681.           This routine is useful as a browser. 
  51682.  
  51683.  Permissions Required 
  51684.  
  51685.           The sec_rgy_attr_sch_scan routine requires r permission on the 
  51686.           attr_schema object. 
  51687.  
  51688.  Related Information 
  51689.  
  51690.           Routines: 
  51691.           sec_rgy_site_open 
  51692.           sec_rgy_attr_sch_cursor_init 
  51693.           sec_rgy_attr_sch_cursor_alloc 
  51694.           sec_rgy_attr_sch_cursor_release 
  51695.  
  51696.           Files: 
  51697.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51698.           dce\sec_rgy_attr_sch.h was derived. 
  51699.  
  51700.  
  51701. ΓòÉΓòÉΓòÉ 8.3.37. sec_rgy_attr_sch_update_entry ΓòÉΓòÉΓòÉ
  51702.  
  51703.  Purpose 
  51704.  
  51705.           Updates a schema entry. 
  51706.  
  51707.  Format 
  51708.  
  51709.                     #include <dce/sec_rgy_attr_sch.h>
  51710.  
  51711.                     void sec_rgy_attr_sch_update_entry(
  51712.                             sec_rgy_handle_t  context,
  51713.                             sec_attr_component_name_t  schema_name,
  51714.                             sec_attr_schema_entry_parts_t  modify_parts,
  51715.                             sec_attr_schema_entry_t  *schema_entry,
  51716.                             error_status_t  *status);
  51717.  
  51718.  Parameters 
  51719.  
  51720.           Input 
  51721.  
  51722.           context       An opaque handle bound to a registry server. Use 
  51723.                         sec_rgy_site_open to acquire a bound handle. 
  51724.  
  51725.           schema_name   A value of type sec_attr_component_name_t that 
  51726.                         specifies the name of the schema that contains the 
  51727.                         entry to be changed. 
  51728.  
  51729.           modify_parts  A value of type sec_attr_schema_entry_parts_t that 
  51730.                         identifies the fields in schema_entry that can be 
  51731.                         modified. 
  51732.  
  51733.           schema_entry  A pointer to a sec_attr_schema_entry_t that contains 
  51734.                         the schema entry values for the schema entry to be 
  51735.                         updated. 
  51736.  
  51737.           Output 
  51738.  
  51739.           status        A pointer to the completion status.  On successful 
  51740.                         completion, the routine returns error_status_ok. 
  51741.                         Otherwise, it returns one of the following errors: 
  51742.  
  51743.                              sec_attr_field_no_update 
  51744.                              sec_attr_bad_name 
  51745.                              sec_attr_bad_acl_mgr_set 
  51746.                              sec_attr_bad_acl_mgr_type 
  51747.                              sec_attr_bad_permset 
  51748.                              sec_attr_bad_intercell_action 
  51749.                              sec_attr_trig_bind_info_missing 
  51750.                              sec_attr_bad_bind_info 
  51751.                              sec_attr_bad_bind_svr_name 
  51752.                              sec_attr_bad_bind_prot_level 
  51753.                              sec_attr_bad_bind_authn_svc 
  51754.                              sec_attr_bad_bind_authz_svc 
  51755.                              sec_attr_bad_uniq_query_accept 
  51756.                              sec_attr_bad_comment 
  51757.                              sec_attr_name_exists 
  51758.                              sec_attr_sch_entry_not_found 
  51759.                              sec_attr_unauthorized 
  51760.                              sec_attr_svr_read_only 
  51761.                              sec_attr_svr_unavailable 
  51762.                              sec_attr_no_memory 
  51763.  
  51764.  Usage 
  51765.  
  51766.           The sec_rgy_attr_sch_update_entry routine modifies schema entries. 
  51767.           Only those schema entry fields set to be modified in the 
  51768.           sec_attr_schema_entry_parts_t data type can be modified. 
  51769.  
  51770.           Some schema entry components can never be modified.  Instead, to make 
  51771.           any changes to these components, the schema entry must be deleted 
  51772.           (which deletes all attribute instances of that type) and re-created. 
  51773.           The schema entry components that can never be modified are: 
  51774.  
  51775.             o  Attribute name 
  51776.             o  Reserved flag 
  51777.             o  Apply defaults flag 
  51778.             o  Intercell action flag 
  51779.             o  Trigger binding 
  51780.             o  Comment 
  51781.  
  51782.           Fields that are arrays of structures (such as acl_mgr_set and 
  51783.           trig_binding) are completely replaced by the new input array. This 
  51784.           operation cannot be used to add a new element to the existing array. 
  51785.  
  51786.  Permissions Required 
  51787.  
  51788.           The sec_rgy_attr_sch_update_entry routine requires the M permission 
  51789.           on the attr_schema object. 
  51790.  
  51791.  Related Information 
  51792.  
  51793.           Routines: 
  51794.           sec_rgy_attr_sch_delete_entry 
  51795.           sec_rgy_attr_sch_create_entry 
  51796.           sec_rgy_site_open 
  51797.  
  51798.           Files: 
  51799.           dcelocal\include\dce\sec_rgy_attr_sch.idl - The idl file from which 
  51800.           dce\sec_rgy_attr_sch.h was derived. 
  51801.  
  51802.  
  51803. ΓòÉΓòÉΓòÉ 8.3.38. sec_rgy_attr_test_and_update ΓòÉΓòÉΓòÉ
  51804.  
  51805.  Purpose 
  51806.  
  51807.           Updates specified attribute instances for a specified object only if 
  51808.           a set of control attribute instances match the existing attribute 
  51809.           instances of the object. 
  51810.  
  51811.  Format 
  51812.  
  51813.                     #include <dce/sec_rgy_attr.h>
  51814.  
  51815.                     void sec_rgy_attr_test_and_update(
  51816.                             sec_rgy_handle_t  context,
  51817.                             sec_rgy_domain_t  name_domain,
  51818.                             sec_rgy_name_t  name,
  51819.                             unsigned32  num_to_test,
  51820.                             sec_attr_t  test_attrs[],
  51821.                             signed32  num_to_write,
  51822.                             sec_attr_t  update_attrs[],
  51823.                             singed32  *failure_index,
  51824.                             error_status_t  *status);
  51825.  
  51826.  Parameters 
  51827.  
  51828.           Input 
  51829.  
  51830.           context       An opaque handle bound to a registry server. Use 
  51831.                         sec_rgy_site_open to acquire a bound handle. 
  51832.  
  51833.           name_domain   A value of type sec_rgy_domain_t that identifies the 
  51834.                         registry domain in which the object specified by name 
  51835.                         resides. The valid values are: 
  51836.  
  51837.                              sec_rgy_domain_person    The name identifies a 
  51838.                                                       principal. 
  51839.                              sec_rgy_domain_group     The name identifies a 
  51840.                                                       group. 
  51841.                              sec_rgy_domain_org       The name identifies an 
  51842.                                                       organization. 
  51843.  
  51844.                         This parameter is ignored if name is policy or replist. 
  51845.  
  51846.           name          A character string of type sec_rgy_name_t specifying 
  51847.                         the name of the person, group, or organization to which 
  51848.                         the attribute is attached. 
  51849.  
  51850.           num_to_test   An unsigned 32-bit integer that specifies the number of 
  51851.                         elements in the test_attrs array.  This integer must be 
  51852.                         greater than 0. 
  51853.  
  51854.           test_attrs[]  An array of values of type sec_attr_t that specifies 
  51855.                         the control attributes. The update takes place only if 
  51856.                         the types and values of the control attributes exactly 
  51857.                         match those of the attribute instances on the named 
  51858.                         registry object. The size of the array is determined by 
  51859.                         num_to_test. 
  51860.  
  51861.           num_to_write  A 32-bit integer that specifies the number of attribute 
  51862.                         instances returned in the update_attrs array. 
  51863.  
  51864.           update_attrs[] An array of values of type sec_attr_t that specifies 
  51865.                         the attribute instances to be updated. The size of the 
  51866.                         array is determined by num_to_write. 
  51867.  
  51868.           Output 
  51869.  
  51870.           failure_index In the event of an error, failure_index is a pointer to 
  51871.                         the element in the update_attrs array that caused the 
  51872.                         update to fail. If the failure cannot be attributed to 
  51873.                         a specific attribute, the value of failure_index is -1. 
  51874.  
  51875.           status        A pointer to the completion status.  On successful 
  51876.                         completion, the routine returns error_status_ok. 
  51877.                         Otherwise, it returns one of the following errors: 
  51878.  
  51879.                              control attribute has changed 
  51880.                              unauthorized 
  51881.                              database read only 
  51882.                              server unavailable 
  51883.                              invalid/unsupported attribute type 
  51884.                              invalid encoding type 
  51885.                              value not unique 
  51886.                              trigger server unavailable 
  51887.                              site read only 
  51888.  
  51889.  Usage 
  51890.  
  51891.           The sec_rgy_attr_test_and_update routine updates an attribute only if 
  51892.           the set of control attributes specified in the test_attrs match 
  51893.           attributes that already exist for the object. 
  51894.  
  51895.           This update is an atomic operation: if any of the control attributes 
  51896.           do not match existing attributes, none of the updates are performed. 
  51897.           If an update should be performed but the write cannot occur for 
  51898.           whatever reason to any member of the update_attrs array, all updates 
  51899.           are stopped. The attribute causing the update to fail is identified 
  51900.           in failure_index. If the failure cannot be attributed to a given 
  51901.           attribute, failure_index contains -1. 
  51902.  
  51903.           If an attribute instance already exists that is identical in both 
  51904.           attr_id and attr_value to an attribute specified in test_attrs, the 
  51905.           existing attribute information is overwritten by the new information. 
  51906.           For multivalued attributes, every instance with the same attr_id is 
  51907.           overwritten with the supplied values. 
  51908.  
  51909.           If an attribute instance does not exist, it is created. 
  51910.  
  51911.           If you specify an attribute set for updating, the update applies to 
  51912.           the set instance, the set itself, not the members of the set. To 
  51913.           update a member of an attribute set, supply the UUID of the set 
  51914.           member. 
  51915.  
  51916.           If an input attribute is associated with an update attribute trigger 
  51917.           server, the attribute trigger server is used (by the 
  51918.           sec_attr_trig_update routine) and the test_attr array is supplied as 
  51919.           input. The output attributes from the update attribute trigger server 
  51920.           are stored in the registry database and returned in the update_attrs 
  51921.           array. 
  51922.  
  51923.           Notes  The update attribute trigger server may modify the values 
  51924.                  before they are used to update the registry database. This is 
  51925.                  the only circumstance when the values in the update_attrs 
  51926.                  array differ from the values in the test_attrs array. 
  51927.  
  51928.           If an input attribute is associated with an update trigger, the 
  51929.           trigger will be invoked with the input attr array and the output 
  51930.           attributes from the update trigger will be stored in the ERA database 
  51931.           and returned in the out_attrs array. 
  51932.  
  51933.  Permissions Required 
  51934.  
  51935.           The sec_rgy_attr_test_and_update routine requires the test permission 
  51936.           and the update permission set for each attribute type identified in 
  51937.           the test_attrs array. These permissions are defined as part of the 
  51938.           ACL manager set in the schema entry of each attribute type. 
  51939.  
  51940.  Related Information 
  51941.  
  51942.           Routines: 
  51943.           sec_attr_trig_update 
  51944.           sec_rgy_attr_update 
  51945.           sec_rgy_attr_delete 
  51946.           sec_rgy_site_open 
  51947.  
  51948.           Files: 
  51949.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  51950.           dce\sec_rgy_attr.h was derived. 
  51951.  
  51952.  
  51953. ΓòÉΓòÉΓòÉ 8.3.39. sec_rgy_attr_update ΓòÉΓòÉΓòÉ
  51954.  
  51955.  Purpose 
  51956.  
  51957.           Creates and updates attribute instances for a specified object. 
  51958.  
  51959.  Format 
  51960.  
  51961.                     #include <dce/sec_rgy_attr.h>
  51962.  
  51963.                     void sec_rgy_attr_update(
  51964.                             sec_rgy_handle_t  context,
  51965.                             sec_rgy_domain_t  name_domain,
  51966.                             sec_rgy_name_t  name,
  51967.                             unsigned32  num_to_write,
  51968.                             unsigned32  space_avail,
  51969.                             sec_attr_t  in_attrs[]
  51970.                             unsigned32  *num_returned
  51971.                             sec_attr_t  out_attrs[]
  51972.                             unsigned32  *num_left
  51973.                             signed32  *failure_index
  51974.                             error_status_t  *status);
  51975.  
  51976.  Parameters 
  51977.  
  51978.           Input 
  51979.  
  51980.           context       An opaque handle bound to a registry server. Use 
  51981.                         sec_rgy_site_open to acquire a bound handle. 
  51982.  
  51983.           name_domain   A value of type sec_rgy_domain_t that identifies the 
  51984.                         registry domain where the object specified by name 
  51985.                         resides. The valid values are: 
  51986.  
  51987.                              sec_rgy_domain_person    The name identifies a 
  51988.                                                       principal. 
  51989.                              sec_rgy_domain_group     The name identifies a 
  51990.                                                       group. 
  51991.                              sec_rgy_domain_org       The name identifies an 
  51992.                                                       organization. 
  51993.  
  51994.                         This parameter is ignored if name is policy or replist. 
  51995.  
  51996.           name          A character string of type sec_rgy_name_t specifying 
  51997.                         the name of the person, group, or organization to which 
  51998.                         the attribute is attached. 
  51999.  
  52000.           num_to_write  An unsigned 32-bit integer that specifies the number of 
  52001.                         elements in the in_attrs array. This integer must be 
  52002.                         greater than 0. 
  52003.  
  52004.           space_avail   A 32-bit unsigned integer that specifies the size of 
  52005.                         the out_attrs array. This integer must be greater than 
  52006.                         0. 
  52007.  
  52008.           in_attrs[]    An array of values of type sec_attr_t that specifies 
  52009.                         the attribute instances to be updated. The size of the 
  52010.                         array is determined by num_to_write. 
  52011.  
  52012.           Output 
  52013.  
  52014.           num_returned  A pointer to an unsigned 32-bit integer that specifies 
  52015.                         the number of attribute instances returned in the 
  52016.                         out_attrs array. 
  52017.  
  52018.           out_attrs[]   An array of values of type sec_attr_t that specifies 
  52019.                         the updated attribute instances. Note that these 
  52020.                         attributes differ from the attributes in the in_attrs 
  52021.                         array only if they were processed by an update 
  52022.                         attribute trigger server. The size of the array is 
  52023.                         determined by space_avail and the length by 
  52024.                         num_returned. 
  52025.  
  52026.           num_left      A pointer to an unsigned 32-bit integer that supplies 
  52027.                         the number of attributes that could not be returned 
  52028.                         because of space constraints in the out_attrs buffer. 
  52029.                         To ensure that all the attributes are returned, 
  52030.                         increase the size of the out_attrs array by increasing 
  52031.                         the size of space_avail and num_returned. 
  52032.  
  52033.           failure_index In the event of an error, failure_index is a pointer to 
  52034.                         the element in the in_attrs array that caused the 
  52035.                         update to fail. If the failure cannot be attributed to 
  52036.                         a specific attribute, the value of failure_index is -1. 
  52037.  
  52038.           status        A pointer to the completion status. On successful 
  52039.                         completion, the routine returns error_status_ok. 
  52040.                         Otherwise, it returns one of the following errors: 
  52041.  
  52042.                              unauthorized 
  52043.                              database read only 
  52044.                              server unavailable 
  52045.                              invalid/unsupported attribute type 
  52046.                              invalid encoding type 
  52047.                              value not unique 
  52048.                              attribute instance already exists 
  52049.                              trigger server unavailable 
  52050.                              site read only 
  52051.  
  52052.  Usage 
  52053.  
  52054.           The sec_rgy_attr_update routine creates new attribute instances and 
  52055.           updates existing attribute instances attached to an object specified 
  52056.           by name and Registry domain. The instances to be created or updated 
  52057.           are passed as an array of sec_attr_t data types. This is an atomic 
  52058.           operation: if the creation of any attribute in the in_attrs array 
  52059.           fails, all updates are stopped. The attribute causing the update to 
  52060.           fail is identified in failure_index.  If the failure cannot be 
  52061.           attributed to a given attribute, failure_index contains -1. 
  52062.  
  52063.           The in_attrs array, which specifies the attributes to be created, 
  52064.           contains values of type sec_attr_t. These values are: 
  52065.  
  52066.           attr_id   A UUID that identifies the attribute type 
  52067.  
  52068.           attr_value A value of sec_attr_value_t that specifies the attribute's 
  52069.                     encoding type and values. 
  52070.  
  52071.           If an attribute instance already exists that is identical in both 
  52072.           attr_id and attr_value to an attribute specified in in_attrs, the 
  52073.           existing attribute information is overwritten by the new information. 
  52074.           For multivalued attributes, every instance with the same attr_id is 
  52075.           overwritten with the supplied values. 
  52076.  
  52077.           If an attribute instance does not exist, it is created. 
  52078.  
  52079.           For multivalued attributes, because every instance of the multivalued 
  52080.           attribute is identified by the same UUID, every instance is 
  52081.           overwritten with the supplied value. To change only one of the 
  52082.           values, you must supply the values that should be unchanged as well 
  52083.           as the new value. 
  52084.  
  52085.           To create instances of multivalued attributes, create individual 
  52086.           sec_attr_t data types to define each multivalued attribute instance 
  52087.           and then pass all of them in using the input array. 
  52088.  
  52089.           If an input attribute is associated with an update attribute trigger 
  52090.           server, the attribute trigger server is used (by the 
  52091.           sec_attr_trig_update routine) and the in_attrs array is supplied as 
  52092.           input. The output attributes from the update attribute trigger server 
  52093.           are stored in the registry database and returned in the out_attrs 
  52094.           array. 
  52095.  
  52096.           Notes  The update attribute trigger server may modify the values 
  52097.                  before they are used to update the registry database. This is 
  52098.                  the only circumstance where the values in the out_attrs array 
  52099.                  differ from the values in the in_attrs array. 
  52100.  
  52101.           If an input attribute is associated with an update trigger, the 
  52102.           trigger will be invoked with the input attr array and the output 
  52103.           attributes from the update trigger will be stored in the ERA database 
  52104.           and returned in the out_attrs array. 
  52105.  
  52106.  Permissions Required 
  52107.  
  52108.           The sec_rgy_attr_update routine requires the update permission set 
  52109.           for each attribute type identified in the in_attrs array. These 
  52110.           permissions are defined as part of the ACL manager set in the schema 
  52111.           entry of each attribute type. 
  52112.  
  52113.  Related Information 
  52114.  
  52115.           Routines: 
  52116.           sec_rgy_attr_delete 
  52117.           sec_rgy_attr_test_and_update 
  52118.  
  52119.           Files: 
  52120.           dcelocal\include\dce\sec_rgy_attr.idl - The idl file from which 
  52121.           dce\sec_rgy_attr.h was derived. 
  52122.  
  52123.  
  52124. ΓòÉΓòÉΓòÉ 8.4. DCE Generic Security Service API ΓòÉΓòÉΓòÉ
  52125.  
  52126. The Generic Security Service Application Programming Interface (GSSAPI) 
  52127. provides security services to applications using peer-to-peer communications 
  52128. (instead of DCE-secure RPC). Using DCE GSSAPI routines, applications can: 
  52129.  
  52130.    o  Determine the current user of another application. 
  52131.    o  Delegate access rights to another application. 
  52132.    o  Apply security services, such as confidentiality and integrity, on a 
  52133.       per-message basis. 
  52134.  
  52135.  GSSAPI represents a secure connection between two communicating applications 
  52136.  with a data structure called a security context. The application that 
  52137.  establishes the secure connection is called the context initiator or simply 
  52138.  initiator. The context initiator is similar to a DCE RPC client. The 
  52139.  application that accepts the secure connection is the context acceptor, or 
  52140.  acceptor. The context acceptor is similar to a DCE RPC server. 
  52141.  
  52142.  There are four stages involved in using the GSSAPI: 
  52143.  
  52144.    1. The context initiator acquires a credential to use to prove its identity 
  52145.       to other processes. Similarly, the context acceptor acquires a credential 
  52146.       to enable it to accept a security context. Either application can omit 
  52147.       this credential acquisition and use its default credentials in subsequent 
  52148.       stages. 
  52149.  
  52150.       The applications use credentials to establish their global identity. The 
  52151.       global identity can be, but is not necessarily, related to the local user 
  52152.       name under which the application is running. Credentials can contain the 
  52153.       following: 
  52154.  
  52155.         o  The login context - Includes a principal's network credentials, as 
  52156.            well as other account information. 
  52157.  
  52158.         o  The principal name and a key - The key that corresponds to the 
  52159.            principal name and must be registered with the DCE Security Service 
  52160.            in a key table. A set of DCE GSSAPI routines enables applications to 
  52161.            register and use principal names. 
  52162.  
  52163.    2. The communicating applications establish a joint security context by 
  52164.       exchanging authentication tokens. 
  52165.  
  52166.       The security context is a pair of GSSAPI data structures that contain 
  52167.       information that is shared between the communicating applications. The 
  52168.       information describes the state of each application. This security 
  52169.       context is required for per-message security services. 
  52170.  
  52171.       To establish a security context, the context initiator calls the 
  52172.       gss_init_sec_context routine to get a token. The token is 
  52173.       cryptographically protected, opaque data. The context initiator transfers 
  52174.       the token to the context acceptor, which in turn passes the token to the 
  52175.       gss_accept_sec_context routine to decode and extract the shared 
  52176.       information. As part of establishing the security context, the context 
  52177.       initiator is authenticated to the context acceptor. The context initiator 
  52178.       can require the context acceptor to authenticate itself in return. 
  52179.  
  52180.       The context initiator can delegate rights to allow the context acceptor 
  52181.       to act as its agent. Delegation means the context initiator gives the 
  52182.       context acceptor the ability to initiate additional security contexts as 
  52183.       an agent of the context initiator. To delegate, the context initiator 
  52184.       sets a flag on the gss_init_sec_context routine indicating that it wants 
  52185.       to delegate and sends the returned token in the normal way to the context 
  52186.       acceptor. The acceptor passes this token to the gss_accept_sec_context 
  52187.       routine, which generates a delegated credential. The context acceptor can 
  52188.       use the credential to initiate additional security contexts. 
  52189.  
  52190.    3. The applications exchange protected messages and data. 
  52191.  
  52192.       The applications can call GSSAPI routines to protect data exchanged in 
  52193.       messages. The application sends a protected message by calling the 
  52194.       appropriate GSSAPI routine to: 
  52195.  
  52196.         o  Apply protection. 
  52197.         o  Bind the message to the appropriate security context. 
  52198.  
  52199.           The application can then send the resulting information to the peer 
  52200.           application. 
  52201.  
  52202.           The application that receives the message passes the received data to 
  52203.           a GSSAPI routine, which removes the protection and validates the 
  52204.           data. GSSAPI treats application data as arbitrary octet strings.  The 
  52205.           GSSAPI per-message security services can provide either: 
  52206.  
  52207.         o  Integrity and authentication of data origin. 
  52208.         o  Confidentiality, integrity, and authentication of data origin. 
  52209.  
  52210.    4. When the applications finish communicating, either one can instruct 
  52211.       GSSAPI to delete the security context. 
  52212.  
  52213.  This introduction includes general information about the Generic Security 
  52214.  Service Application Programming Interface (GSSAPI) defined in Internet RFC 
  52215.  1508, Generic Security Service Application Programming Interface, and RFC 
  52216.  1509, Generic Security Service API: C-bindings. 
  52217.  
  52218.  See the following subtopics for more information: 
  52219.  
  52220.       Error Handling 
  52221.       GSSAPI Data Types 
  52222.       Optional Parameters 
  52223.       GSSAPI Routines 
  52224.       Related Information 
  52225.  
  52226.  
  52227. ΓòÉΓòÉΓòÉ 8.4.1. Error Handling ΓòÉΓòÉΓòÉ
  52228.  
  52229. Each GSSAPI routine returns two status values: 
  52230.  
  52231.  Major status values Generic API routine errors or calling errors defined in 
  52232.                      RFC 1509. 
  52233.  Minor status values Values that indicate DCE-specific errors. 
  52234.  
  52235.  If a routine has output parameters that contain pointers for storage allocated 
  52236.  by the routine, the output parameters always contain a valid pointer, even if 
  52237.  the routine returns an error. If no storage was allocated, the routine sets 
  52238.  the pointer to NULL and sets any length fields associated with the pointers 
  52239.  (such as in the gss_buffer_desc structure) to 0 (zero). 
  52240.  
  52241.  Minor status values usually contain more detailed information about the error. 
  52242.  They are not, however, portable between GSSAPI implementations. When designing 
  52243.  portable applications, use major status values for handling errors. Use minor 
  52244.  status values to debug applications and to display error and error-recovery 
  52245.  information to users. 
  52246.  
  52247.  
  52248. ΓòÉΓòÉΓòÉ 8.4.1.1. Major Status Values ΓòÉΓòÉΓòÉ
  52249.  
  52250. GSSAPI routines return GSS status codes as their OM_uint32 function value. 
  52251. These codes indicate either generic API routine errors or calling errors. 
  52252.  
  52253. A GSS status code can indicate a single, irrecoverable generic API error from 
  52254. the routine and a single calling error. Additional status information can also 
  52255. be contained in the GSS status code. The errors are encoded into a 32-bit GSS 
  52256. status code, as follows: 
  52257.  
  52258.  
  52259.      MSB                              LSB
  52260.      +---------------------------------------------------+
  52261.      | Calling Error | Routine Error | Supplementary Info|
  52262.      +---------------------------------------------------+
  52263.    Bit 31          24 23           16 15                 0
  52264.  
  52265. If a GSSAPI routine returns a GSS status code whose upper 16 bits contain a 
  52266. nonzero value, the call failed. If the calling error field is nonzero, the 
  52267. context initiator's use of the routine was in error. In addition, the routine 
  52268. can indicate additional information by setting bits in the supplementary 
  52269. information field of the status code. The tables that follow describe the 
  52270. routine errors, calling errors, and supplementary information status bits and 
  52271. their meanings. 
  52272.  
  52273. The following table lists the GSSAPI routine errors and their meanings: 
  52274.  
  52275. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  52276. Γöé Table 13. GSSAPI Routine Errors                    Γöé
  52277. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52278. Γöé NAME              Γöé FIELD Γöé MEANING            Γöé
  52279. Γöé                Γöé VALUE Γöé                Γöé
  52280. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52281. Γöé GSS_S_BAD_MECH         Γöé  1  Γöé The required mechanism is   Γöé
  52282. Γöé                Γöé    Γöé unsupported.         Γöé
  52283. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52284. Γöé GSS_S_BAD_NAME         Γöé  2  Γöé The name passed is not    Γöé
  52285. Γöé                Γöé    Γöé valid.            Γöé
  52286. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52287. Γöé GSS_S_BAD_NAMETYPE       Γöé  3  Γöé The name passed is unsup-   Γöé
  52288. Γöé                Γöé    Γöé ported.            Γöé
  52289. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52290. Γöé GSS_S_BAD_BINDINGS       Γöé  4  Γöé The channel bindings are   Γöé
  52291. Γöé                Γöé    Γöé incorrect.          Γöé
  52292. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52293. Γöé GSS_S_BAD_STATUS        Γöé  5  Γöé A status value was not    Γöé
  52294. Γöé                Γöé    Γöé valid.            Γöé
  52295. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52296. Γöé GSS_S_BAD_SIG         Γöé  6  Γöé A token had a signature that Γöé
  52297. Γöé                Γöé    Γöé is not valid.         Γöé
  52298. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52299. Γöé GSS_S_NO_CRED         Γöé  7  Γöé No credentials were sup-   Γöé
  52300. Γöé                Γöé    Γöé plied.            Γöé
  52301. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52302. Γöé GSS_S_NO_CONTEXT        Γöé  8  Γöé No context has been estab-  Γöé
  52303. Γöé                Γöé    Γöé lished.            Γöé
  52304. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52305. Γöé GSS_S_DEFECTIVE_TOKEN     Γöé  9  Γöé A token was not valid.    Γöé
  52306. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52307. Γöé GSS_S_DEFECTIVE_CREDENTIAL   Γöé  10  Γöé A credential was not valid.  Γöé
  52308. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52309. Γöé GSS_S_CREDENTIALS_EXPIRED   Γöé  11  Γöé The referenced credentials  Γöé
  52310. Γöé                Γöé    Γöé expired.           Γöé
  52311. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52312. Γöé GSS_S_CONTEXT_EXPIRED     Γöé  12  Γöé The context expired.     Γöé
  52313. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52314. Γöé GSS_S_FAILURE         Γöé  13  Γöé The routine failed. Check   Γöé
  52315. Γöé                Γöé    Γöé minor status codes.      Γöé
  52316. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  52317.  
  52318. The following table lists the calling error values and their meanings: 
  52319.  
  52320. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  52321. Γöé Table 14. Calling Errors                       Γöé
  52322. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52323. Γöé NAME              Γöé FIELD Γöé MEANING            Γöé
  52324. Γöé                Γöé VALUE Γöé                Γöé
  52325. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52326. Γöé GSS_S_CALL_INACCESSIBLE_READ  Γöé  1  Γöé Could not read a required   Γöé
  52327. Γöé                Γöé    Γöé input parameter.       Γöé
  52328. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52329. Γöé GSS_S_CALL_INACCESSIBLE_WRITE Γöé  2  Γöé Could not write a required  Γöé
  52330. Γöé                Γöé    Γöé output parameter.       Γöé
  52331. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52332. Γöé GSS_S_BAD_STRUCTURE      Γöé  3  Γöé A parameter was incorrectly  Γöé
  52333. Γöé                Γöé    Γöé structured.          Γöé
  52334. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  52335.  
  52336. The following table lists the supplementary bits and their meanings. 
  52337.  
  52338. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  52339. Γöé Table 15. Supplementary Information Status Bits            Γöé
  52340. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52341. Γöé NAME              Γöé FIELD Γöé MEANING            Γöé
  52342. Γöé                Γöé VALUE Γöé                Γöé
  52343. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52344. Γöé GSS_S_CONTINUE_NEEDED     Γöé  0  Γöé Call the routine again to   Γöé
  52345. Γöé                Γöé (LSB) Γöé complete its function.    Γöé
  52346. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52347. Γöé GSS_S_DUPLICATE_TOKEN     Γöé  1  Γöé The token is a duplicate of  Γöé
  52348. Γöé                Γöé    Γöé an earlier token.       Γöé
  52349. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52350. Γöé GSS_S_OLD_TOKEN        Γöé  2  Γöé The token's validity period  Γöé
  52351. Γöé                Γöé    Γöé expired; the routine cannot  Γöé
  52352. Γöé                Γöé    Γöé verify that the token is not Γöé
  52353. Γöé                Γöé    Γöé a duplicate of an earlier   Γöé
  52354. Γöé                Γöé    Γöé token.            Γöé
  52355. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52356. Γöé GSS_S_UNSEQ_TOKEN       Γöé  3  Γöé A later token has been proc- Γöé
  52357. Γöé                Γöé    Γöé essed.            Γöé
  52358. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  52359.  
  52360. All GSS_S_ symbols equate to complete OM_uint32 status codes, rather than to 
  52361. bitfield values. For example, the actual value of GSS_S_BAD_NAMETYPE (value 3 
  52362. in the routine error field) is 3 << 16. 
  52363.  
  52364. The major status code GSS_S_FAILURE indicates that DCE Security detected an 
  52365. error that does not have a major status code. Check the minor status code for 
  52366. details about the error. 
  52367.  
  52368. The GSSAPI provides three macros to extract values for each type of error from 
  52369. a GSS status code: 
  52370.  
  52371.    o  GSS_CALLING_ERROR 
  52372.    o  GSS_ROUTINE_ERROR 
  52373.    o  GSS_SUPPLEMENTARY_INFO 
  52374.  
  52375.  Each macro takes a GSS status code and masks all but the relevant field. For 
  52376.  example, when you use the GSS_ROUTINE_ERROR macro on a status code, it returns 
  52377.  a value. The value of the macro is arrived at by using the routine errors 
  52378.  field only and zeroing the values of the calling error and the supplementary 
  52379.  information fields. 
  52380.  
  52381.  An additional macro, GSS_ERROR, lets you determine whether the status code 
  52382.  indicated a calling or routine error. If the status code indicated a calling 
  52383.  or routine error, the macro returns a nonzero value. If no calling or routine 
  52384.  error is indicated, the routine returns a 0 (zero). 
  52385.  
  52386.  Note:  At times, a GSSAPI routine that is unable to access data can generate a 
  52387.         platform-specific signal instead of returning a 
  52388.         GSS_S_CALL_INACCESSIBLE_READ or GSS_S_CALL_INACCESSIBLE_WRITE status 
  52389.         value. 
  52390.  
  52391.  
  52392. ΓòÉΓòÉΓòÉ 8.4.1.2. Minor Status Values ΓòÉΓòÉΓòÉ
  52393.  
  52394. The GSSAPI routines return a minor_status parameter to indicate errors from 
  52395. either DCE Security or Kerberos. The parameter can contain a single error, 
  52396. which is indicated by an OM_uint32 value. The OM_uint32 data type is equivalent 
  52397. to the DCE data type error_status_t and can contain any DCE-defined error. 
  52398.  
  52399.  
  52400. ΓòÉΓòÉΓòÉ 8.4.2. GSSAPI Data Types ΓòÉΓòÉΓòÉ
  52401.  
  52402. This section provides an overview of the GSSAPI data types and their 
  52403. definitions. The GSSAPI defines the following data types: 
  52404.  
  52405.  OM_uint32      A 32-bit unsigned integer. A portable data type that the GSSAPI 
  52406.                 routine definitions use for guaranteed minimum bit-counts. 
  52407.  
  52408.  gss_buffer_t   A pointer to the buffer descriptor gss_buffer_desc, used to 
  52409.                 pass the data between the GSSAPI routines and applications. 
  52410.                 Many of the GSSAPI routines take arguments and return values 
  52411.                 that describe contiguous multiple-byte data, such as opaque 
  52412.                 data and character strings. The gss_buffer_t data type has the 
  52413.                 following structure: 
  52414.  
  52415.                                 typedef struct gss_buffer_desc_struct {
  52416.                                         size_t  length;
  52417.                                         void  *value;
  52418.                                 } gss_buffer_desc, *gss_buffer_t;
  52419.  
  52420.                 where the fields are: 
  52421.  
  52422.                      length    Contains the total number of bytes in the data. 
  52423.                      value     Contains a pointer to the actual data. 
  52424.  
  52425.                 When using the gss_buffer_t data type, the GSSAPI routine 
  52426.                 allocates storage for any data it passes to the application. 
  52427.                 The calling application must allocate the gss_buffer_desc 
  52428.                 object. It can initialize unused gss_buffer_desc objects with 
  52429.                 the value GSS_C_EMPTY_BUFFER. To free the storage, the 
  52430.                 application calls the gss_release_buffer routine. 
  52431.  
  52432.  gss_OID        Allows you to choose a security mechanism, either DCE Security 
  52433.                 or Kerberos, and to specify name types. Select a security 
  52434.                 mechanism by using one of the following OIDs: 
  52435.  
  52436.                      GSSDCE_C_OID_DCE_KRBV5_DES        For DCE Security. 
  52437.  
  52438.                      GSS_C_NULL_OID                    Default DCE Security. 
  52439.                                                        Use the default security 
  52440.                                                        mechanisms to ensure the 
  52441.                                                        portability of the 
  52442.                                                        application. 
  52443.  
  52444.                      GSSDCE_C_OID_KRBV5_DES            For Kerberos Version 5. 
  52445.                 The gss_OID data type contains tree-structured values defined 
  52446.                 by ISO as typedef OM_object_identifier. Type 
  52447.                 OM_object_identifier is of type OM_string, which has the 
  52448.                 following structure: 
  52449.  
  52450.                                 typedef struct {
  52451.                                         OM_string_length length;
  52452.                                         void  *elements;
  52453.                                 }  OM_string;
  52454.                 where the fields are: 
  52455.  
  52456.                      elements      A pointer to the first byte of an octet 
  52457.                                    string containing the ASN.1 BER encoding of 
  52458.                                    the value of the gss_OID data type. 
  52459.  
  52460.                      length        The number of bytes in the value. The 
  52461.                                    OM_string_length type is defined as 
  52462.                                    OM_uint32. The gss_OID_desc values returned 
  52463.                 from the GSSAPI are read-only values. The application should 
  52464.                 not try to deallocate them. 
  52465.  
  52466.  gss_OID_set    Represents one or more object identifiers. The values of this 
  52467.                 data type are used to: 
  52468.  
  52469.                   o  Report the available mechanisms supported by GSSAPI. 
  52470.                   o  Request specific mechanisms. 
  52471.                   o  Indicate which mechanisms a credential supports. 
  52472.  
  52473.                 The gss_OID_set data type has the following structure: 
  52474.  
  52475.                                 typedef struct gss_OID_set_desc_struct {
  52476.                                         int count;
  52477.                                         gss_OID elements;
  52478.                                 } gss_OID_set_desc, *gss_OID_set;
  52479.                 where the fields are: 
  52480.  
  52481.                      count         The number of OIDs in the set. 
  52482.                      elements      A pointer to an array of gss_oid_desc 
  52483.                                    objects, where each describes a single OID. 
  52484.                 The application calls the gss_release_oid_set routine to 
  52485.                 deallocate storage associated with the gss_OID_set values that 
  52486.                 the GSSAPI routines return to the application. 
  52487.  
  52488.  gss_cred_id_t  An atomic data type that identifies a GSSAPI credential data 
  52489.                 structure. Credentials establish, or prove, the identity of an 
  52490.                 application or other principal. 
  52491.  
  52492.  gss_ctx_id_t   Contains an atomic value that identifies one end of a GSSAPI 
  52493.                 security context. This data type is opaque to the caller. 
  52494.  
  52495.                 The security context is a pair of GSSAPI data structures that 
  52496.                 contain information shared between the communicating 
  52497.                 applications. The information describes the cryptographic state 
  52498.                 of each application. This security context is required for 
  52499.                 per-message security services and is created by a successful 
  52500.                 authentication exchange. 
  52501.  
  52502.  gss_buffer_t   A token to GSSAPI routines. GSSAPI uses tokens to maintain the 
  52503.                 synchronization between the applications sharing a security 
  52504.                 context. The token is a cryptographically protected bit string 
  52505.                 generated by DCE Security at one end of the GSSAPI security 
  52506.                 context for use by the peer application at the other end of the 
  52507.                 security context. This data type is opaque to the caller. 
  52508.  
  52509.  gss_name_t     Contains a principal name in non-printable format. Names 
  52510.                 identify principals. The GSSAPI authenticates the relationship 
  52511.                 between a name and the principal claiming the name. Names are 
  52512.                 represented in two forms: 
  52513.  
  52514.                   o  A printable form, for presentation to an application. 
  52515.                   o  An internal, canonical form that is used by the API and is 
  52516.                      opaque to applications. 
  52517.  
  52518.                 The gss_import_name and gss_display_name routines convert names 
  52519.                 between their printable form and their gss_name_t data type. 
  52520.                 DCE GSSAPI supports only DCE principal names, which are 
  52521.                 identified by the constant OID, GSSCDE_C_OID_DCENAME. 
  52522.  
  52523.                 The gss_compare_names routine compares internal form names. 
  52524.  
  52525.  gss_channel_bindings_t Contains a channel binding. You can define and use 
  52526.                 channel bindings to associate the security context with the 
  52527.                 communications channel that carries the context. The 
  52528.                 gss_channel_bindings_t data type has the following structure: 
  52529.  
  52530.                                 typedef struct gss_channel_bindings_struct {
  52531.                                         OM_uint32 initiator_addrtype;
  52532.                                         gss_buffer_desc initiator_address;
  52533.                                         OM_uint32 acceptor_addrtype;
  52534.                                         gss_buffer_desc acceptor_address;
  52535.                                         gss_buffer_desc application_data;
  52536.                                 } *gss_channel_bindings_t;
  52537.                 Use initiator_addrtype and acceptor_addrtype to initiate the 
  52538.                 type of addresses contained in the initiator_address and 
  52539.                 acceptor_address buffers. The following table lists the address 
  52540.                 types and their addrtype values: 
  52541.  
  52542.                                 ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  52543.                                 Γöé Table 16. GSSAPI Address Types                    Γöé
  52544.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52545.                                 Γöé ADDRESS TYPE            Γöé ADDRTYPE VALUE          Γöé
  52546.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52547.                                 Γöé Unspecified            Γöé GSS_C_AF_UNSPEC          Γöé
  52548.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52549.                                 Γöé Host-local             Γöé GSS_C_AF_LOCAL          Γöé
  52550.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52551.                                 Γöé DARPA Internet           Γöé GSS_C_AF_INET           Γöé
  52552.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52553.                                 Γöé ARPAnet IMP            Γöé GSS_C_AF_IMPLINK         Γöé
  52554.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52555.                                 Γöé pup protocols (for example, BSP)  Γöé GSS_C_AF_PUP           Γöé
  52556.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52557.                                 Γöé MIT CHAOS protocol         Γöé GSS_C_AF_CHAOS          Γöé
  52558.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52559.                                 Γöé XEROX NS              Γöé GSS_C_AF_NS            Γöé
  52560.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52561.                                 Γöé nbs                Γöé GSS_C_AF_NBS           Γöé
  52562.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52563.                                 Γöé ECMA                Γöé GSS_C_AF_ECMA           Γöé
  52564.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52565.                                 Γöé datakit protocols         Γöé GSS_C_AF_DATAKIT         Γöé
  52566.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52567.                                 Γöé CCITT protocols (for example,   Γöé GSS_C_AF_CCITT          Γöé
  52568.                                 Γöé X.25)               Γöé                  Γöé
  52569.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52570.                                 Γöé IBM SNA              Γöé GSS_C_AF_SNA           Γöé
  52571.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52572.                                 Γöé Digital DECnet           Γöé GSS_C_AF_DECNET          Γöé
  52573.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52574.                                 Γöé Direct data link interface     Γöé GSS_C_AF_DLI           Γöé
  52575.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52576.                                 Γöé LAT                Γöé GSS_C_AF_LAT           Γöé
  52577.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52578.                                 Γöé NSC Hyperchannel          Γöé GSS_C_AF_HYLINK          Γöé
  52579.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52580.                                 Γöé AppleTalk             Γöé GSS_C_AF_APPLETALK        Γöé
  52581.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52582.                                 Γöé BISYNC 2780/3780          Γöé GSS_C_AF_BSC           Γöé
  52583.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52584.                                 Γöé Distributed system services    Γöé GSS_C_AF_DSS           Γöé
  52585.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52586.                                 Γöé OSI TP4              Γöé GSS_C_AF_OSI           Γöé
  52587.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52588.                                 Γöé X25                Γöé GSS_C_AF_X25           Γöé
  52589.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52590.                                 Γöé No address specified        Γöé GSS_C_AF_NULLADDR         Γöé
  52591.                                 ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  52592.  
  52593.                 The tags specify address families rather than addressing 
  52594.                 formats. For address families that contain several alternative 
  52595.                 address forms, initiator_address and the acceptor_address 
  52596.                 should contain sufficient information to determine the address 
  52597.                 form that is used. Format the bytes that contain the addresses 
  52598.                 in the same order the bytes are transmitted across the network. 
  52599.  
  52600.                 The GSSAPI creates an octet string by concatenating all the 
  52601.                 fields (initiator_addrtype, initiator_address, 
  52602.                 acceptor_addrtype, acceptor_address, and application_data). The 
  52603.                 security mechanism signs the octet string and binds the 
  52604.                 signature to the token generated by the gss_init_sec_context 
  52605.                 routine. The context acceptor presents the same bindings to the 
  52606.                 gss_accept_sec_context routine, which evaluates the signature 
  52607.                 and compares it to the signature in the token. If the 
  52608.                 signatures differ, the gss_accept_sec_context routine returns a 
  52609.                 GSS_S_BAD_BINDINGS error, and the context is not established. 
  52610.  
  52611.                 Some security mechanisms check that the initiator_address field 
  52612.                 of the channel bindings presented to the gss_init_sec_context 
  52613.                 routine contains the correct network address of the host 
  52614.                 system. Therefore, portable applications should use either the 
  52615.                 correct address type and value or GSS_C_AF_NULLADDR for 
  52616.                 initiator_addrtype. Some security mechanisms include the 
  52617.                 channel binding data in the token instead of in a signature, so 
  52618.                 portable applications should not use confidential data as 
  52619.                 channel-binding components. The DCE GSSAPI does not verify the 
  52620.                 address or include the plain text bindings information in the 
  52621.                 token. 
  52622.  
  52623.  
  52624. ΓòÉΓòÉΓòÉ 8.4.3. Optional Parameters ΓòÉΓòÉΓòÉ
  52625.  
  52626. In routine descriptions, optional parameters allow the application to request 
  52627. default behaviors by passing a default value for the parameter. The following 
  52628. conventions are used for optional parameters: 
  52629.  
  52630. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  52631. Γöé Table 17. GSSAPI Routine Errors                    Γöé
  52632. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52633. Γöé CONVENTION     Γöé VALUE DEFAULT         Γöé EXPLANATION    Γöé
  52634. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52635. Γöé gss_buffer_t    Γöé GSS_C_NO_BUFFER        Γöé For an input    Γöé
  52636. Γöé types       Γöé                Γöé parameter, indi-  Γöé
  52637. Γöé          Γöé                Γöé cates no data is  Γöé
  52638. Γöé          Γöé                Γöé supplied.  For an Γöé
  52639. Γöé          Γöé                Γöé output parameter, Γöé
  52640. Γöé          Γöé                Γöé indicates that   Γöé
  52641. Γöé          Γöé                Γöé the information  Γöé
  52642. Γöé          Γöé                Γöé returned is not  Γöé
  52643. Γöé          Γöé                Γöé required by the  Γöé
  52644. Γöé          Γöé                Γöé application.    Γöé
  52645. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52646. Γöé Integer types   Γöé                Γöé Refer to the ref- Γöé
  52647. Γöé (input)      Γöé                Γöé erence pages for  Γöé
  52648. Γöé          Γöé                Γöé default values.  Γöé
  52649. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52650. Γöé Integer types   Γöé NULL             Γöé Indicates that   Γöé
  52651. Γöé (output)      Γöé                Γöé the application  Γöé
  52652. Γöé          Γöé                Γöé does not require  Γöé
  52653. Γöé          Γöé                Γöé the information.  Γöé
  52654. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52655. Γöé Pointer types   Γöé NULL             Γöé Indicates that   Γöé
  52656. Γöé (output)      Γöé                Γöé the application  Γöé
  52657. Γöé          Γöé                Γöé does not require  Γöé
  52658. Γöé          Γöé                Γöé the information.  Γöé
  52659. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52660. Γöé OIDs        Γöé GSS_C_NULL_OID        Γöé Indicates the   Γöé
  52661. Γöé          Γöé                Γöé default choice   Γöé
  52662. Γöé          Γöé                Γöé for name type or  Γöé
  52663. Γöé          Γöé                Γöé security mech-   Γöé
  52664. Γöé          Γöé                Γöé anism.       Γöé
  52665. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52666. Γöé OID sets      Γöé GSS_C_NULL_OID_SET      Γöé Indicates the   Γöé
  52667. Γöé          Γöé                Γöé default set of   Γöé
  52668. Γöé          Γöé                Γöé security mech-   Γöé
  52669. Γöé          Γöé                Γöé anisms, DCE Secu- Γöé
  52670. Γöé          Γöé                Γöé rity, and     Γöé
  52671. Γöé          Γöé                Γöé Kerberos.     Γöé
  52672. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52673. Γöé Credentials    Γöé GSS_C_NO_CREDENTIAL      Γöé Indicates that   Γöé
  52674. Γöé          Γöé                Γöé the application  Γöé
  52675. Γöé          Γöé                Γöé should use the   Γöé
  52676. Γöé          Γöé                Γöé default creden-  Γöé
  52677. Γöé          Γöé                Γöé tial handle.    Γöé
  52678. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  52679. Γöé Channel bindings  Γöé GSS_C_NO_CHANNEL_BINDINGS   Γöé Indicates that no Γöé
  52680. Γöé          Γöé                Γöé channel bindings  Γöé
  52681. Γöé          Γöé                Γöé are used.     Γöé
  52682. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  52683.  
  52684.  
  52685. ΓòÉΓòÉΓòÉ 8.4.4. GSSAPI Routines ΓòÉΓòÉΓòÉ
  52686.  
  52687. There are two sets of GSSAPI routines: 
  52688.  
  52689.    o  Standard GSSAPI routines, which are defined in the Internet RFC 1508, 
  52690.       Generic Security Service Application Programming Interface, and RFC 1509, 
  52691.       Generic Security Service API: C-bindings. These routines have the prefix 
  52692.       gss_. 
  52693.  
  52694.    o  OSF DCE extensions to the GSSAPI routines. These are additional routines 
  52695.       that enable an application to use DCE security services. These routines 
  52696.       have the prefix gssdce_. 
  52697.  The standard GSS routines are: 
  52698.  
  52699.       gss_accept_sec_context 
  52700.       gss_acquire_cred 
  52701.       gss_compare_name 
  52702.       gss_context_time 
  52703.       gss_delete_sec_context 
  52704.       gss_display_name 
  52705.       gss_display_status 
  52706.       gss_import_name 
  52707.       gss_indicate_mechs 
  52708.       gss_init_sec_context 
  52709.       gss_inquire_cred 
  52710.       gss_process_context_token 
  52711.       gss_release_buffer 
  52712.       gss_release_cred 
  52713.       gss_release_name 
  52714.       gss_release_oid_set 
  52715.       gss_seal 
  52716.       gss_sign 
  52717.       gss_unseal 
  52718.       gss_verify 
  52719.  
  52720.  The GSSAPI DCE extension routines are the following: 
  52721.  
  52722.  gssdce_add_oid_set_member             Adds a specified Object Identifier to a 
  52723.                                        set of Object Identifiers. Convenience 
  52724.                                        routine. 
  52725.  
  52726.  gssdce_create_empty_oid_set           Creates an Object Identifier set 
  52727.                                        containing no elements. Convenience 
  52728.                                        routine. 
  52729.  
  52730.  gssdce_cred_to_login_context          Constructs a DCE login context from a 
  52731.                                        GSSAPI credential. 
  52732.  
  52733.  gssdce_extract_creds_from_sec_context Extracts a DCE credentials object from a 
  52734.                                        GSSAPI security context. 
  52735.  
  52736.  gssdce_extract_PAC_from_cred          Extracts DCE credentials from a GSSAPI 
  52737.                                        credential. 
  52738.  
  52739.  gssdce_extract_PAC_from_sec_context   Extracts a DCE privilege attribute 
  52740.                                        certificate (PAC) from a GSSAPI security 
  52741.                                        context. 
  52742.  
  52743.  gssdce_login_context_to_cred          Constructs a GSSAPI credential from a 
  52744.                                        DCE login context. 
  52745.  
  52746.  gssdce_register_acceptor_identity     Specifies a DCE keytable to be used for 
  52747.                                        accepting contexts under a specified 
  52748.                                        name. 
  52749.  
  52750.  gssdce_set_cred_context_ownership     Changes the ownership of a DCE 
  52751.                                        credential's login context. 
  52752.  
  52753.  gssdce_test_oid_set_member            Determines whether a specified Object 
  52754.                                        Identifier is contained in a set. 
  52755.                                        Convenience routine. 
  52756.  
  52757.  
  52758. ΓòÉΓòÉΓòÉ 8.4.5. Related Information ΓòÉΓòÉΓòÉ
  52759.  
  52760. Books: 
  52761. DCE for OS/2 Warp: Application Development Guide - Core Components 
  52762.  
  52763.  
  52764. ΓòÉΓòÉΓòÉ 8.4.6. gssdce_add_oid_set_member ΓòÉΓòÉΓòÉ
  52765.  
  52766.  Purpose 
  52767.  
  52768.           Adds an OID value to an object identifier (OID) set. 
  52769.  
  52770.  Format 
  52771.  
  52772.                     #include <dce/gssapi.h>
  52773.  
  52774.                     OM_uint32 gssdce_add_oid_set_member (
  52775.                             OM_uint32  *minor_status,
  52776.                             gss_OID  member_OID,
  52777.                             gss_OID_set  *OID_set );
  52778.  
  52779.  Parameters 
  52780.  
  52781.           Input 
  52782.  
  52783.           member_OID    Specifies the OID you want to add to the OID set. 
  52784.  
  52785.           OID_set       Specifies an OID set. 
  52786.  
  52787.           Output 
  52788.  
  52789.           minor_status  Returns a status code from the security mechanism. 
  52790.  
  52791.  Usage 
  52792.  
  52793.           The gssdce_add_oid_set_member routine adds a new OID to an OID set. 
  52794.           If an OID set does not exist, you can create a new empty OID set with 
  52795.           the gssdce_create_empty_oid_set routine. 
  52796.  
  52797.  Return Codes 
  52798.  
  52799.           This routine returns the following major status code: 
  52800.  
  52801.           GSS_S_COMPLETE The routine was completed successfully. Check the 
  52802.                         minor_status parameter for details. 
  52803.  
  52804.  Related Information 
  52805.  
  52806.           Routines: gssdce_create_empty_oid_set 
  52807.           gss_acquire_cred 
  52808.  
  52809.  
  52810. ΓòÉΓòÉΓòÉ 8.4.7. gssdce_create_empty_oid_set ΓòÉΓòÉΓòÉ
  52811.  
  52812.  Purpose 
  52813.  
  52814.           Creates a new empty OID set that members can be added to by calling 
  52815.           the gssdce_add_oid_set_member routine. 
  52816.  
  52817.  Format 
  52818.  
  52819.                     #include <dce/gssapi.h>
  52820.  
  52821.                     OM_uint32 gssdce_create_empty_oid_set (
  52822.                              OM_uint32  *minor_status,
  52823.                              gss_OID_set  *OID_set );
  52824.  
  52825.  Parameters 
  52826.  
  52827.           Input 
  52828.  
  52829.           OID_set       Specifies the OID set you want to create. 
  52830.  
  52831.           Output 
  52832.  
  52833.           minor_status  Returns a status code from the security mechanism. 
  52834.  
  52835.  Usage 
  52836.  
  52837.           The gssdce_create_empty_oid_set routine creates a new empty OID set 
  52838.           to which the context initiator can add members. Use the 
  52839.           gssdce_add_oid_set_member routine to add members to the OID set. 
  52840.  
  52841.           Use the gssdce_create_empty_oid_set routine to specify a set of 
  52842.           security mechanisms with which you can use an acquired credential. 
  52843.           To create a credential that can accept a security context using DCE 
  52844.           Security, Kerberos, or a combination of the two, use the 
  52845.           gss_acquire_cred routine. 
  52846.  
  52847.  Return Codes 
  52848.  
  52849.           This routine returns the following major status codes: 
  52850.  
  52851.           GSS_S_COMPLETE The routine was completed successfully. Check the 
  52852.                         minor_status parameter for details. 
  52853.  
  52854.  Related Information 
  52855.  
  52856.           Routines: 
  52857.           gssdce_add_oid_set_member 
  52858.           gss_acquire_cred 
  52859.  
  52860.  
  52861. ΓòÉΓòÉΓòÉ 8.4.8. gssdce_cred_to_login_context ΓòÉΓòÉΓòÉ
  52862.  
  52863.  Purpose 
  52864.  
  52865.           Obtains the DCE login context associated with a GSSAPI credential. 
  52866.  
  52867.  Format 
  52868.  
  52869.                     #include <dce/gssapi.h>
  52870.  
  52871.                     OM_uint32 gssdce_cred_to_login_context (
  52872.                             OM_uint32  *minor_status,
  52873.                             gss_cred_id_t  cred_handle,
  52874.                             sec_login_handle_t  *login_context );
  52875.  
  52876.  Parameters 
  52877.  
  52878.           Input 
  52879.  
  52880.           cred_handle   Specifies the credential handle. 
  52881.  
  52882.           Output 
  52883.  
  52884.           login_context Returns the DCE login context associated with the 
  52885.                         credential. 
  52886.  
  52887.           minor_status  Returns a status code from the security mechanism. 
  52888.  
  52889.  Usage 
  52890.  
  52891.           Using the gssdce_cred_to_login_context routine, an application can 
  52892.           obtain the DCE login context associated with a GSSAPI credential. 
  52893.           Only credentials with usage types INIT or BOTH have associated login 
  52894.           contexts. 
  52895.  
  52896.           Use this routine to: 
  52897.  
  52898.             o  Add delegation notes to a login context. 
  52899.             o  Use an INITIATE or BOTH credential to initiate an authenticated 
  52900.                RPC. 
  52901.           The application must delete the login context when it no longer needs 
  52902.           the credentials or the login context. 
  52903.  
  52904.  Return Codes 
  52905.  
  52906.           This routine returns the following major status codes: 
  52907.  
  52908.           GSS_S_COMPLETE The routine was completed successfully. 
  52909.           GSS_S_DEFECTIVE_CREDENTIAL The credential is defective in some way. 
  52910.           GSS_S_FAILURE The routine failed. Check the minor_status parameter 
  52911.                         for details. 
  52912.           GSS_S_NO_CRED The routine requested the default login context, but no 
  52913.                         default login context was available. 
  52914.  
  52915.  Related Information 
  52916.  
  52917.           Routines: 
  52918.           gssdce_login_context_to_cred 
  52919.           sec_login_purge_context 
  52920.           sec_login_release_context 
  52921.  
  52922.  
  52923. ΓòÉΓòÉΓòÉ 8.4.9. gssdce_extract_PAC_from_cred ΓòÉΓòÉΓòÉ
  52924.  
  52925.  Purpose 
  52926.  
  52927.           Extracts a DCE privilege attribute certificate (PAC) from a GSSAPI 
  52928.           credential. 
  52929.  
  52930.  Format 
  52931.  
  52932.                     #include <dce/gssapi.h>
  52933.  
  52934.                     OM_uint32 gssdce_extract_PAC_from_cred
  52935.                             OM_uint32  *minor_status,
  52936.                             gss_cred_id_t  context_handle,
  52937.                             sec_id_pac_t  output_pac );
  52938.  
  52939.  Parameters 
  52940.  
  52941.           Input 
  52942.  
  52943.           context_handle Specifies the handle of the security context 
  52944.                         containing the credential. 
  52945.  
  52946.           Output 
  52947.  
  52948.           output_pac    Returns the PAC. 
  52949.  
  52950.           minor_status  Returns a status code from the security mechanism. 
  52951.  
  52952.  Usage 
  52953.  
  52954.           The gssdce_extract_PAC_from_cred routine extracts a DCE credential 
  52955.           from a GSSAPI credential. The routine extracts privilege attribute 
  52956.           information about the principal associated with the credential. 
  52957.  
  52958.           A context acceptor calls this routine to examine the credential 
  52959.           contained in a delegated credential. 
  52960.  
  52961.  Return Codes 
  52962.  
  52963.           This routine returns the following major status codes: 
  52964.  
  52965.           GSS_S_COMPLETE The routine was completed successfully. 
  52966.           GSS_S_FAILURE The routine failed. Check the minor_status parameter 
  52967.                         for details. 
  52968.           GSS_S_NO_CRED The routine could not access the credentials. 
  52969.           GSS_S_DEFECTIVE_CREDENTIAL The credential is defective in some way. 
  52970.  
  52971.  Related Information 
  52972.  
  52973.           Routines: 
  52974.           gssdce_extract_creds_from_sec_context 
  52975.  
  52976.  
  52977. ΓòÉΓòÉΓòÉ 8.4.10. gssdce_extract_creds_from_sec_context ΓòÉΓòÉΓòÉ
  52978.  
  52979.  Purpose 
  52980.  
  52981.           Extracts a DCE credential from a GSSAPI security context. 
  52982.  
  52983.  Format 
  52984.  
  52985.                     #include <dce/gssapi.h>
  52986.  
  52987.                     OM_uint32 gssdce_extract_creds_from_sec_context (
  52988.                             OM_uint32  *minor_status,
  52989.                             gss_ctx_id_t  context_handle,
  52990.                             rpc_authz_cred_handle_t  *output_cred );
  52991.  
  52992.  Parameters 
  52993.  
  52994.           Input 
  52995.  
  52996.           context_handle Specifies the handle of the security context 
  52997.                         containing the DCE credential. 
  52998.  
  52999.           Output 
  53000.  
  53001.           output_cred   Returns the DCE credential. 
  53002.  
  53003.           minor_status  Returns a status code from the security mechanism. 
  53004.  
  53005.  Usage 
  53006.  
  53007.           The gssdce_extract_creds_from_sec_context routine extracts the 
  53008.           context initiator's DCE credential from a context acceptor's security 
  53009.           context. Use this routine if the underlying mechanism type is DCE 
  53010.           Security (GSSDCE_C_OID_DCE_KRBV5_DES). 
  53011.  
  53012.           The context acceptor calls the gssdce_extract_creds_from_sec_context 
  53013.           routine to get the DCE credential containing the privilege attributes 
  53014.           of the context initiator. DCE credentials are used by DCE ACL 
  53015.           managers to determine whether the initiator has the right to access 
  53016.           the object to which an ACL refers. 
  53017.  
  53018.           The principal contained in the DCE credential may not be the same as 
  53019.           the src_name parameter value from the gss_accept_sec_context routine. 
  53020.           The principal in the DCE credential can be a compound principal. 
  53021.  
  53022.  Return Codes 
  53023.  
  53024.           This routine returns the following major status codes: 
  53025.  
  53026.           GSS_S_COMPLETE         The routine was completed successfully. 
  53027.           GSS_S_FAILURE          The routine failed. Check the minor_status 
  53028.                                  parameter for details. 
  53029.           GSS_S_NO_CONTEXT       The routine could not access the security 
  53030.                                  context. 
  53031.  
  53032.  Related Information 
  53033.  
  53034.           Routines: 
  53035.           gss_accept_sec_context 
  53036.           gss_init_sec_context 
  53037.  
  53038.  
  53039. ΓòÉΓòÉΓòÉ 8.4.11. gssdce_extract_PAC_from_sec_context ΓòÉΓòÉΓòÉ
  53040.  
  53041.  Purpose 
  53042.  
  53043.           Extracts a DCE privilege attribute certifiicate (PAC) from a GSSAPI 
  53044.           security context. 
  53045.  
  53046.  Format 
  53047.  
  53048.                     #include <dce/gssapi.h>
  53049.  
  53050.                     OM_uint32 gssdce_extract_PAC_from_sec_context (
  53051.                             OM_uint32  *minor_status,
  53052.                             gss_ctx_id_t  context_handle,
  53053.                             sec_id_pac_t  *output_PAC);
  53054.  
  53055.  Parameters 
  53056.  
  53057.           Input 
  53058.  
  53059.           context_handle Specifies the handle of the security context 
  53060.                         containing the PAC. 
  53061.  
  53062.           Output 
  53063.  
  53064.           output_PAC    Returns the DCE PAC. 
  53065.  
  53066.           minor_status  Returns a status code from the security mechanism. 
  53067.  
  53068.  Usage 
  53069.  
  53070.           The gssdce_extract_PAC_from_sec_context routine extracts the context 
  53071.           initiator's DCE privilege attribute information (PAC) from a context 
  53072.           acceptor's security context. 
  53073.  
  53074.           The context acceptor calls the gssdce_extract_PAC_from_sec_context 
  53075.           routine to get the DCE PAC of the context initiator. 
  53076.  
  53077.  Return Codes 
  53078.  
  53079.           This routine returns the following status codes: 
  53080.  
  53081.           GSS_S_COMPLETE                   The routine was completed 
  53082.                                            successfully. 
  53083.           GSS_S_FAILURE                    The routine failed. Check the 
  53084.                                            minor_status parameter for details. 
  53085.           GSS_S_NO_CRED                    No credentials were supplied. 
  53086.           GSS_S_DEFECTIVE_CREDENTIAL       A credential was not valid. 
  53087.  
  53088.  Related Information 
  53089.  
  53090.           Routines: 
  53091.           gssdce_extract_PAC_from_cred 
  53092.  
  53093.  
  53094. ΓòÉΓòÉΓòÉ 8.4.12. gssdce_login_context_to_cred ΓòÉΓòÉΓòÉ
  53095.  
  53096.  Purpose 
  53097.  
  53098.           Creates a GSSAPI credential handle for a context initiator or context 
  53099.           acceptor from a DCE login context. 
  53100.  
  53101.  Format 
  53102.  
  53103.                     #include <dce/gssapi.h>
  53104.  
  53105.                     OM_uint32 gssdce_login_context_to_cred (
  53106.                             OM_uint32  *minor_status,
  53107.                             sec_login_handle_t  login_context,
  53108.                             OM_uint32  lifetime_req,
  53109.                             gss_OID_set  desired_mechs,
  53110.                             gss_cred_id_t  *output_cred_handle,
  53111.                             gss_OID_set  *actual_mechs,
  53112.                             OM_uint32  *lifetime_rec );
  53113.  
  53114.  Parameters 
  53115.  
  53116.           Input 
  53117.  
  53118.           login_context Specifies the DCE login context handle. To use the 
  53119.                         default login context handle, specify NULL. 
  53120.  
  53121.           lifetime_req  Specifies the number of seconds the credential should 
  53122.                         remain valid. 
  53123.  
  53124.           desired_mechs Specifies the OID set for the security mechanism to use 
  53125.                         with the credential: 
  53126.  
  53127.                              To use...                          Specify... 
  53128.  
  53129.                              DCE Security 
  53130.                                                                 GSS_C_NULL_OID_SET 
  53131.  
  53132.                              Kerberos 
  53133.                                                                 GSSDCE_C_OID_KRBV5_DES 
  53134.  
  53135.                              Both DCE Security and Kerberos 
  53136.                                                                 GSSDCE_C_OID_DCE_KRBV5_DES 
  53137.                                                                 and 
  53138.                                                                 GSSDCE_C_OID_KRBV5_DES 
  53139.                         To ensure portability of your application, use the 
  53140.                         default security mechanism by specifying 
  53141.                         GSS_C_NULL_OID_SET. 
  53142.  
  53143.           Input/Output 
  53144.  
  53145.           output_cred_handle As an input parameter, the routine tests the 
  53146.                         contents of this parameter. If output_cred_handle 
  53147.                         contains NULL, the routine returns 
  53148.                         GSS_S_CALL_INACCESSIBLE_WRITE. As an output parameter, 
  53149.                         it contains the credential handle. 
  53150.  
  53151.           Output 
  53152.  
  53153.           actual_mechs  Returns the set specifying the security mechanisms with 
  53154.                         which the credential can be used.  The set can contain 
  53155.                         one or both of the following: 
  53156.  
  53157.                           o  GSSDCE_C_OID_DCE_KRBV5_DES for DCE Security. 
  53158.                           o  GSSDCE_C_OID_KRBV5_DES for Kerberos. 
  53159.  
  53160.           lifetime_rec  Returns the number of seconds that the credential 
  53161.                         remains valid. 
  53162.  
  53163.           minor_status  Returns a status code from the security mechanism. 
  53164.  
  53165.  Usage 
  53166.  
  53167.           The gssdce_login_context_to_cred routine creates a GSSAPI credential 
  53168.           handle for the context initiator or context acceptor from a DCE login 
  53169.           context. The routine creates a credential that can be used to 
  53170.           initiate or acquire a security context. Use this routine if you need 
  53171.           to create a GSSAPI credential for delegation. 
  53172.  
  53173.  Return Codes 
  53174.  
  53175.           This routine returns the following major status codes: 
  53176.  
  53177.           GSS_S_COMPLETE The routine was completed successfully. 
  53178.  
  53179.           GSS_S_CALL_INACCESSIBLE_WRITE. Could not write a required output 
  53180.                         parameter. 
  53181.  
  53182.           GSS_S_NO_CRED The routine requested the default login context, but no 
  53183.                         default login context was available. 
  53184.  
  53185.           GSS_S_FAILURE The routine failed. Check the minor_status parameter 
  53186.                         for details. 
  53187.  
  53188.  Related Information 
  53189.  
  53190.           Routines: 
  53191.           gssdce_cred_to_login_context 
  53192.           gss_acquire_cred 
  53193.  
  53194.  
  53195. ΓòÉΓòÉΓòÉ 8.4.13. gssdce_register_acceptor_identity ΓòÉΓòÉΓòÉ
  53196.  
  53197.  Purpose 
  53198.  
  53199.           Registers a context acceptor's identity. 
  53200.  
  53201.  Format 
  53202.  
  53203.                     #include <dce/gssapi.h>
  53204.  
  53205.                     OM_uint32 gssdce_register_acceptor_identity (
  53206.                             OM_uint32  *minor_status,
  53207.                             gss_name_t  acceptor_principal_name,
  53208.                             rpc_auth_key_retrieval_fn_t  get_key_fn,
  53209.                             void  *arg );
  53210.  
  53211.  Parameters 
  53212.  
  53213.           Input 
  53214.  
  53215.           acceptor_principal_name       Specifies the principal name to use for 
  53216.                                         the context acceptor. 
  53217.  
  53218.           get_key_fn                    Specifies either the DCE default 
  53219.                                         key-retrieval routine or the address of 
  53220.                                         a routine that returns encryption keys. 
  53221.  
  53222.           arg                           Specifies an argument to pass to the 
  53223.                                         key acquisition routine specified in 
  53224.                                         get_key_fn. To specify the DCE default, 
  53225.                                         use NULL. 
  53226.  
  53227.           Output 
  53228.  
  53229.           minor_status                  Returns a status code from the security 
  53230.                                         mechanism. 
  53231.  
  53232.  Usage 
  53233.  
  53234.           The gssdce_register_acceptor_identity routine registers the server 
  53235.           principal name as an identity claimed by the context acceptor and 
  53236.           tells DCE security where to find the key table containing the 
  53237.           principal's key information. 
  53238.  
  53239.           The gssdce_register_acceptor_identity routine uses the get_key_fn and 
  53240.           arg parameters of the rpc_server_register_auth_info routine to find 
  53241.           the key for the token for the context acceptor's principal name. The 
  53242.           following table lists the values for the parameters and the key 
  53243.           tables to which they point. 
  53244.  
  53245.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  53246.                     Γöé Retrieval routine   Γöé Key Table arg     Γöé Explanation      Γöé
  53247.                     Γöé get_key_fn       Γöé            Γöé            Γöé
  53248.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  53249.                     Γöé NULL          Γöé NULL          Γöé Uses the default DCE Γöé
  53250.                     Γöé            Γöé            Γöé retrieval routine to Γöé
  53251.                     Γöé            Γöé            Γöé get the key from the Γöé
  53252.                     Γöé            Γöé            Γöé DCE key table using  Γöé
  53253.                     Γöé            Γöé            Γöé the default key    Γöé
  53254.                     Γöé            Γöé            Γöé table,        Γöé
  53255.                     Γöé            Γöé            Γöé dcelocal\krb5\v5srvtaΓöé.
  53256.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  53257.                     Γöé NULL          Γöé string=key_table_name Γöé Uses the default DCE Γöé
  53258.                     Γöé            Γöé            Γöé retrieval routine to Γöé
  53259.                     Γöé            Γöé            Γöé get the key from a  Γöé
  53260.                     Γöé            Γöé            Γöé key table whose name Γöé
  53261.                     Γöé            Γöé            Γöé you specify using   Γöé
  53262.                     Γöé            Γöé            Γöé the argument string. Γöé
  53263.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  53264.                     Γöé routine_address    Γöé user_written_routine  Γöé Uses a user-written  Γöé
  53265.                     Γöé            Γöé            Γöé retrieval routine to Γöé
  53266.                     Γöé            Γöé            Γöé get the key from a  Γöé
  53267.                     Γöé            Γöé            Γöé key table specified  Γöé
  53268.                     Γöé            Γöé            Γöé in the routine.    Γöé
  53269.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  53270.  
  53271.           For more information on registering a server with DCE, refer to the 
  53272.           rpc_server_register_auth_info routine. 
  53273.  
  53274.  Return Codes 
  53275.  
  53276.           This routine returns the following major status codes: 
  53277.  
  53278.           GSS_S_COMPLETE The routine was completed successfully. 
  53279.           GSS_S_FAILURE The routine failed. Check the minor_status parameter 
  53280.                         for details. 
  53281.  
  53282.  Related Information 
  53283.  
  53284.           Routines: 
  53285.           rpc_server_register_auth_info 
  53286.           gss_accept_sec_context 
  53287.  
  53288.  
  53289. ΓòÉΓòÉΓòÉ 8.4.14. gssdce_set_cred_context_ownership ΓòÉΓòÉΓòÉ
  53290.  
  53291.  Purpose 
  53292.  
  53293.           Changes the ownership of a DCE credential's login context. 
  53294.  
  53295.  Format 
  53296.  
  53297.                     #include <dce/gssapi.h>
  53298.  
  53299.                     OM_uint32  gssdce_set_cred_context_ownership (
  53300.                             OM_uint32  *minor_status,
  53301.                             gss_cred_id_t  credential_handle,
  53302.                             int  ownership);
  53303.  
  53304.  Parameters 
  53305.  
  53306.           Input 
  53307.  
  53308.           credential_handle Specifies the handle of the DCE credential to be 
  53309.                         modified. 
  53310.  
  53311.           ownership     Specifies the owner of the DCE credential. Specify one 
  53312.                         of the following: 
  53313.  
  53314.                              GSSDCE_C_OWNERSHIP_GSSAPI Specifies that the 
  53315.                                            credential's login context is owned 
  53316.                                            by GSSAPI. 
  53317.  
  53318.                              GSSDCE_C_OWNERSHIP_APPLICATION Specifies that the 
  53319.                                            credential's login context is owned 
  53320.                                            by the application. 
  53321.  
  53322.           Output 
  53323.  
  53324.           minor_status  Returns a status code from the security mechanism. 
  53325.  
  53326.  Usage 
  53327.  
  53328.           The gssdce_set_cred_context_ownership routine modifies the ownership 
  53329.           of a DCE credential's login context. The INIT and BOTH credentials 
  53330.           have DCE login contexts. Normally, these internal login contexts are 
  53331.           deleted when the credential is released (when the application calls 
  53332.           the gss_release_cred routine). However, for credentials created by 
  53333.           the gssdce_cred_to_login_context and credentials passed to the 
  53334.           gsscdce_cred_to_login_context routine, the application can have an 
  53335.           external reference to the credential's login context and may still be 
  53336.           using the login context. GSSAPI does not delete internal login 
  53337.           contexts of these credentials when they are released. 
  53338.  
  53339.           This routine allows the application to modify the ownership of a 
  53340.           credential's login context. If ownership is changed to 
  53341.           GSSDCE_C_OWNERSHIP_GSSAPI, the login context is deleted when GSSAPI 
  53342.           releases the credential. If ownership is changed to 
  53343.           GSSDCE_C_OWNERSHIP_APPLICATION, the application is responsible for 
  53344.           deleting the login context. DCE credential login contexts that are 
  53345.           owned by an application must not be deleted until the credential is 
  53346.           released, because GSSAPI may still need to access the credential's 
  53347.           login context. 
  53348.  
  53349.  Related Information 
  53350.  
  53351.           Routines: 
  53352.           gss_acquire_cred 
  53353.           gss_release_cred 
  53354.           gssdce_cred_to_login_context 
  53355.  
  53356.  
  53357. ΓòÉΓòÉΓòÉ 8.4.15. gssdce_test_oid_set_member ΓòÉΓòÉΓòÉ
  53358.  
  53359.  Purpose 
  53360.  
  53361.           Checks an OID set to see if a specified OID is in the set. 
  53362.  
  53363.  Format 
  53364.  
  53365.                     #include <dce/gssapi.h>
  53366.  
  53367.                     OM_uint32 gssdce_test_oid_set_member (
  53368.                             OM_uint32  *minor_status,
  53369.                             gss_OID  member_OID,
  53370.                             gss_OID_set  set,
  53371.                             int  *is_present );
  53372.  
  53373.  Parameters 
  53374.  
  53375.           Input 
  53376.  
  53377.           member_OID    Specifies the OID to search for in the OID set. 
  53378.  
  53379.           set           Specifies the OID set to check. 
  53380.  
  53381.           Output 
  53382.  
  53383.           is_present    Returns one of the following values to indicate whether 
  53384.                         the OID is a member of the OID set: 
  53385.  
  53386.                              Returns... If... 
  53387.                              1         The OID is present as a member of the 
  53388.                                        OID set. 
  53389.                              0         The OID is absent, not a member of the 
  53390.                                        OID set. 
  53391.  
  53392.           minor_status  Returns a status code from the security mechanism. 
  53393.  
  53394.  Usage 
  53395.  
  53396.           The gssdce_test_oid_set_member routine checks an OID set to see if 
  53397.           the specified OID is a member of the set.  To add a member to an OID 
  53398.           set, use the gssdce_add_oid_set_member routine. 
  53399.  
  53400.           The gssdce_test_oid_set_member routine uses the value of the 
  53401.           actual_mechs output parameter from the gss_acquire_cred routine to 
  53402.           get the list of OIDs. It checks this list to see if any of the OIDs 
  53403.           are members of the OID set. 
  53404.  
  53405.  Return Codes 
  53406.  
  53407.           This routine returns the following major status codes: 
  53408.  
  53409.           GSS_S_COMPLETE The routine was completed successfully. Check the 
  53410.                         minor_status parameter for details. 
  53411.  
  53412.  Related Information 
  53413.  
  53414.           Routines: 
  53415.           gssdce_add_oid_set_member 
  53416.           gss_acquire_cred 
  53417.           gss_indicate_mechs 
  53418.  
  53419.  
  53420. ΓòÉΓòÉΓòÉ 8.4.16. gss_accept_sec_context ΓòÉΓòÉΓòÉ
  53421.  
  53422.  Purpose 
  53423.  
  53424.           Establishes a security context between the application and a context 
  53425.           acceptor. 
  53426.  
  53427.  Format 
  53428.  
  53429.                     #include <dce/gssapi.h>
  53430.  
  53431.                     OM_uint32  gss_accept_sec_context (
  53432.                             OM_uint32  *minor_status,
  53433.                             gss_ctx_id_t  *context_handle,
  53434.                             gss_cred_id_t  verifier_cred_handle,
  53435.                             gss_buffer_t  input_token_buffer,
  53436.                             gss_channel_bindings_t  input_chan_bindings,
  53437.                             gss_name_t  *src_name,
  53438.                             gss_OID  *actual_mech_type,
  53439.                             gss_buffer_t  output_token,
  53440.                             int  *ret_flags,
  53441.                             OM_uint32  *time_rec
  53442.                             gss_cred_id_t  *delegated_cred_handle);
  53443.  
  53444.  Parameters 
  53445.  
  53446.           Input 
  53447.  
  53448.           verifier_cred_handle Specifies the credential handle (the identity) 
  53449.                         claimed by the context acceptor. This is optional 
  53450.                         information. The credential must be either an ACCEPT 
  53451.                         type credential or a BOTH type credential. If you do 
  53452.                         not specify a credential handle and specify instead 
  53453.                         GSS_C_NO_CREDENTIAL, the application can accept a 
  53454.                         context under any registered identity. Use the 
  53455.                         gssdce_register_acceptor_identity routine to register 
  53456.                         an identity before specifying GSS_C_NO_CREDENTIAL. 
  53457.  
  53458.           input_token_buffer Specifies the token received from the context 
  53459.                         acceptor. 
  53460.  
  53461.           input_chan_bindings Specifies bindings supplied by the context 
  53462.                         initiator. 
  53463.  
  53464.                         Allows the context initiator to bind the channel 
  53465.                         identification information securely to the security 
  53466.                         context. 
  53467.  
  53468.           Input/Output 
  53469.  
  53470.           context_handle Specifies a context handle for a new context. The 
  53471.                         first time the context acceptor uses the routine, 
  53472.                         specify GSS_C_NO_CONTEXT to set up a specific context. 
  53473.                         In subsequent calls, use the value returned by this 
  53474.                         parameter. 
  53475.  
  53476.                         Note:  If the call returns an error, either the context 
  53477.                                is 0 (the context was not created) or the 
  53478.                                context was created and returned but is in a 
  53479.                                closed state. You can determine from the 
  53480.                                minor_status return code whether the context was 
  53481.                                created and its status. If the context was 
  53482.                                created, you may decide to reuse it. 
  53483.  
  53484.  
  53485.           Output 
  53486.  
  53487.           src_name      Returns the authenticated name of the context 
  53488.                         initiator. This information is optional. If the 
  53489.                         authenticated name is not required, specify NULL. 
  53490.  
  53491.                         To deallocate the authenticated name, pass it to the 
  53492.                         gss_release_name routine. 
  53493.  
  53494.           actual_mech_type Returns the security mechanism with which the 
  53495.                         context was established. The security mechanism is one 
  53496.                         of the following: 
  53497.  
  53498.                           o  GSSDCE_C_OID_DCE_KRBV5_DES for DCE Security. 
  53499.                           o  GSSDCE_C_OID_KRBV5_DES for Kerberos Version 5. 
  53500.  
  53501.           output_token  Returns a token to pass to the context acceptor. If no 
  53502.                         token is to be passed to the context acceptor, the 
  53503.                         routine sets the length field of the returned token 
  53504.                         buffer to 0 (zero). 
  53505.  
  53506.           ret_flags     Returns a bit-mask containing six independent flags, 
  53507.                         each of which indicates support of a specified service 
  53508.                         option. The following symbolic names are provided to 
  53509.                         correspond to each flag. The symbolic names should be 
  53510.                         joined by means of a logical AND with the value of 
  53511.                         ret_flags to test whether the context supports the 
  53512.                         service option. 
  53513.  
  53514.                         GSS_C_DELEG_FLAG 
  53515.  
  53516.                              TRUE      The creation of delegated credentials is 
  53517.                                        supported. 
  53518.                              FALSE     The creation of delegated credentials is 
  53519.                                        not supported. 
  53520.  
  53521.                         GSS_C_MUTUAL_FLAG 
  53522.  
  53523.                              TRUE      Mutual authentication is supported. 
  53524.                              FALSE     Mutual authentication is not supported. 
  53525.  
  53526.                         GSS_C_REPLAY_FLAG 
  53527.  
  53528.                              TRUE      The detection of replayed signed or 
  53529.                                        sealed messages is supported. 
  53530.                              FALSE     The detection of replayed signed or 
  53531.                                        sealed messages is not supported. 
  53532.  
  53533.                         GSS_C_SEQUENCE_FLAG 
  53534.  
  53535.                              TRUE      The detection of out-of-sequence signed 
  53536.                                        or sealed messages is supported. 
  53537.  
  53538.                              FALSE     The detection of out-of-sequence signed 
  53539.                                        or sealed messages is not supported. 
  53540.  
  53541.                         GSS_C_CONF_FLAG 
  53542.  
  53543.                              TRUE      Confidentiality services are available 
  53544.                                        by calling the gss_seal routine. 
  53545.                              FALSE     Confidentiality services are not 
  53546.                                        available. However, the application can 
  53547.                                        call the gss_seal routine to provide 
  53548.                                        message encapsulation, data-origin 
  53549.                                        authentication, and integrity services. 
  53550.  
  53551.                         GSS_C_INTEG_FLAG 
  53552.  
  53553.                              TRUE      Integrity services can be invoked by 
  53554.                                        calling either the gss_sign or gss_seal 
  53555.                                        routine. 
  53556.  
  53557.                              FALSE     Integrity services for individual 
  53558.                                        messages are not available. 
  53559.  
  53560.           time_rec      Returns the number of seconds the context remains 
  53561.                         valid. This is optional information. If the time is not 
  53562.                         required, specify NULL. 
  53563.  
  53564.           delegated_cred_handle Returns the credential handle for credentials 
  53565.                         received from the context initiator. The credential 
  53566.                         handle is valid only if delegated credentials are 
  53567.                         available. If the ret_flags parameter is true, the flag 
  53568.                         GSS_C_DELEG_FLAG is set, indicating that delegated 
  53569.                         credentials are available. 
  53570.  
  53571.           minor_status  Returns a status code from the security mechanism. 
  53572.  
  53573.  Usage 
  53574.  
  53575.           The gss_accept_sec_context routine is the second step in establishing 
  53576.           a security context between the context initiator and a context 
  53577.           acceptor. In the first step, the context initiator calls the 
  53578.           gss_init_sec_context routine. The gss_init_sec_context routine 
  53579.           generates a token for the security context and passes it to the 
  53580.           context initiator, and sets the major status to GSS_S_Continue. The 
  53581.           context initiator sends the token to the context acceptor. 
  53582.  
  53583.           In the second step, the context acceptor accepts the token from the 
  53584.           context initiator and calls the gss_accept_sec_context routine, which 
  53585.           uses the token as its input_token parameter. 
  53586.  
  53587.           The gss_accept_sec_context routine returns a value in the 
  53588.           output_token parameter. The context acceptor passes this token back 
  53589.           to the context initiator, which presents the token to the 
  53590.           gss_init_sec_context routine. The presence of this token tells the 
  53591.           gss_init_sec_context routine that this is the second call from the 
  53592.           context initiator. If the acceptor does not need to send a token to 
  53593.           the initiator, gss_accept_sec_context sets the length field of the 
  53594.           output_token parameter to 0 (zero). 
  53595.  
  53596.           To finish establishing the context, the context initiator can require 
  53597.           one or more reply tokens from the context acceptor.  If the 
  53598.           application requires reply tokens, the gss_accept_sec_context routine 
  53599.           returns a status value containing GSS_S_CONTINUE_NEEDED.  The 
  53600.           application calls the routine again when the reply token is received 
  53601.           from the context acceptor. The application passes the token to the 
  53602.           gss_accept_sec_context routine by means of the output_token 
  53603.           parameter. 
  53604.  
  53605.           The gss_accept_sec_context routine must find a key to decrypt the 
  53606.           token. The token contains the unencrypted principal name of the 
  53607.           context acceptor. The acceptor's principal name identifies the key 
  53608.           that the context initiator used to encrypt the rest of the token. The 
  53609.           gss_accept_sec_context routine matches the principal name with the 
  53610.           key in the following ways: 
  53611.  
  53612.             o  If you specify a credential, the credential and the name in the 
  53613.                token must match.  The acceptor's principal name (contained in 
  53614.                the token) has been registered by a call to the 
  53615.                gssdce_register_acceptor_identity routine.  The 
  53616.                gss_accept_sec_context routine looks in the registered key 
  53617.                table. 
  53618.  
  53619.             o  If you specify GSS_C_NO_CRED and the principal name in the token 
  53620.                is registered, the gss_accept_sec_context routine, using either 
  53621.                the rpc_server_register_auth_info routine or the 
  53622.                gssdce_register_acceptor_identity routine, looks in the table 
  53623.                specified when you registered the token name. 
  53624.  
  53625.             o  If you specify GSS_C_NO_CRED and the principal name in the token 
  53626.                is not registered, the gss_accept_sec_context routine fails and 
  53627.                returns the status GSS_S_FAILURE because the GSSAPI does not 
  53628.                know where to find the key. 
  53629.  
  53630.           The following table summarizes how the gss_accept_sec_context routine 
  53631.           determines the key for the credential: 
  53632.  
  53633.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  53634.                     Γöé You specify...  Γöé Is the princi-  Γöé Then the routine...        Γöé
  53635.                     Γöé         Γöé pal's name reg- Γöé                  Γöé
  53636.                     Γöé         Γöé istered?     Γöé                  Γöé
  53637.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  53638.                     Γöé A credential   Γöé Yes       Γöé Looks in the key table specified Γöé
  53639.                     Γöé         Γöé         Γöé in                Γöé
  53640.                     Γöé         Γöé         Γöé gssdce_register_acceptor_identityΓöé
  53641.                     Γöé         Γöé         Γöé or the default key table.     Γöé
  53642.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  53643.                     Γöé GSS_C_NO_CRED  Γöé Yes       Γöé Looks in the key table specified Γöé
  53644.                     Γöé         Γöé         Γöé in                Γöé
  53645.                     Γöé         Γöé         Γöé gssdce_register_acceptor_identityΓöé
  53646.                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  53647.                     Γöé         Γöé No        Γöé Fails because the principal is  Γöé
  53648.                     Γöé         Γöé         Γöé not registered.  It returns the  Γöé
  53649.                     Γöé         Γöé         Γöé status code GSS_S_FAILURE.    Γöé
  53650.                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  53651.  
  53652.           The values returned using the src_name, ret_flags, time_rec, and 
  53653.           delegated_cred_handle parameters are not defined unless the routine 
  53654.           returns the status GSS_S_COMPLETE. 
  53655.  
  53656.  Return Codes 
  53657.  
  53658.           This routine returns the following major status codes: 
  53659.  
  53660.           GSS_S_COMPLETE             The routine completed successfully. 
  53661.  
  53662.           GSS_S_BAD_BINDINGS         The input_token parameter contains 
  53663.                                      different channel bindings from those 
  53664.                                      specified with the input_chan_bindings 
  53665.                                      parameter. 
  53666.  
  53667.           GSS_S_DEFECTIVE_CREDENTIAL Consistency checks performed on the 
  53668.                                      credential failed. 
  53669.  
  53670.           GSS_S_DEFECTIVE_TOKEN      Consistency checks performed on the 
  53671.                                      input_token parameter failed. 
  53672.  
  53673.           GSS_S_DUPLICATE_TOKEN      The input_token parameter was already 
  53674.                                      processed. This is an irrecoverable error 
  53675.                                      that occurs during context establishment. 
  53676.  
  53677.           GSS_S_FAILURE              The routine failed. See the minor_status 
  53678.                                      parameter for more information. 
  53679.  
  53680.           GSS_S_NO_CONTEXT           The supplied context handle did not refer 
  53681.                                      to a valid context. 
  53682.  
  53683.           GSS_S_NO_CRED              Indicates that either the supplied 
  53684.                                      credentials were not valid for context 
  53685.                                      acceptance or the credential handle did 
  53686.                                      not reference any credentials. 
  53687.  
  53688.           GSS_S_OLD_TOKEN            The input_token parameter was too old. 
  53689.                                      This is an irrecoverable error that occurs 
  53690.                                      during context establishment. 
  53691.  
  53692.  Related Information 
  53693.  
  53694.           Routines: 
  53695.           gss_acquire_cred 
  53696.           gss_delete_sec_context 
  53697.           gss_init_sec_context 
  53698.           gssdce_register_acceptor_identity 
  53699.           gss_release_name 
  53700.           gss_seal 
  53701.           gss_sign 
  53702.  
  53703.  
  53704. ΓòÉΓòÉΓòÉ 8.4.17. gss_acquire_cred ΓòÉΓòÉΓòÉ
  53705.  
  53706.  Purpose 
  53707.  
  53708.           Allows an application to acquire a handle for an existing named 
  53709.           credential. 
  53710.  
  53711.  Format 
  53712.  
  53713.                     #include <dce/gssapi.h>
  53714.  
  53715.                     OM_uint32  gss_acquire_cred (
  53716.                             OM_uint32  *minor_status,
  53717.                             gss_name_t  desired_name,
  53718.                             OM_uint32  time_req,
  53719.                             gss_OID_set  desired_mechs,
  53720.                             int  cred_usage,
  53721.                             gss_cred_id_t  *output_cred_handle,
  53722.                             gss_OID_set  *actual_mechs,
  53723.                             OM_int32  *time_rec);
  53724.  
  53725.  Parameters 
  53726.  
  53727.           Input 
  53728.  
  53729.           desired_name  Specifies the principal name to use for the credential. 
  53730.  
  53731.           time_req      Specifies the number of seconds that credentials remain 
  53732.                         valid. 
  53733.  
  53734.           desired_mechs Specifies the OID set for the security mechanism to use 
  53735.                         with the credential, as follows: 
  53736.  
  53737.                              To use...                          Specify... 
  53738.  
  53739.                              DCE Security 
  53740.                                                                 GSS_C_NULL_OID_SET 
  53741.  
  53742.                              Kerberos 
  53743.                                                                 GSSDCE_C_OID_KRBV5_DES 
  53744.  
  53745.                              Both DCE Security and Kerberos 
  53746.                                                                 GSSDCE_C_OID_DCE_KRBV5_DES 
  53747.                                                                 and 
  53748.                                                                 GSSDCE_C_OID_KRBV5_DES 
  53749.  
  53750.                         To ensure portability of your application, request the 
  53751.                         default security mechanism by specifying 
  53752.                         GSS_C_NULL_OID_SET. 
  53753.  
  53754.           cred_usage    Indicates one of the following: 
  53755.  
  53756.                              GSS_C_BOTH    Specifies credentials that the 
  53757.                                            context initiator can use to either 
  53758.                                            initiate or accept security 
  53759.                                            contexts. 
  53760.  
  53761.                              GSS_C_ACCEPT  Specifies credentials that the 
  53762.                                            context initiator can use only to 
  53763.                                            accept security contexts. 
  53764.  
  53765.           Output 
  53766.  
  53767.           output_cred_handle Returns the handle for the return credential. 
  53768.  
  53769.           actual_mechs  Returns a set of mechanisms for which the credential is 
  53770.                         valid. This information is optional.  If you do not 
  53771.                         want a set of mechanisms returned, specify NULL. 
  53772.  
  53773.           time_rec      Returns the actual number of seconds the return 
  53774.                         credential remains valid.  This information is 
  53775.                         optional.  If the actual number of seconds is not 
  53776.                         required, specify NULL. 
  53777.  
  53778.           minor_status  Returns a status code from the security mechanism. 
  53779.  
  53780.  Usage 
  53781.  
  53782.           The gss_acquire_cred routine allows an application to obtain a handle 
  53783.           for either an ACCEPT or a BOTH credential. The application then 
  53784.           passes the credential handle to either the gss_init_sec_context or 
  53785.           gss_accept_sec_context routine. 
  53786.  
  53787.           Credential handles created by the gss_acquire_cred routine contain a 
  53788.           principal name. If the principal name is unregistered, the 
  53789.           gss_acquire_cred routine automatically registers the principal in the 
  53790.           default key table. You can change the principal's key table by 
  53791.           calling the gssdce_register_acceptor_identity routine. 
  53792.  
  53793.           To create an INITIATE credential, you must use the 
  53794.           gssdce_login_context_to_cred routine. 
  53795.  
  53796.  Return Codes 
  53797.  
  53798.           This routine returns the following major status codes: 
  53799.  
  53800.           GSS_S_COMPLETE The routine was completed successfully. 
  53801.           GSS_S_BAD_NAME A name that is not valid was passed by the 
  53802.                         desired_name parameter. 
  53803.           GSS_S_FAILURE The routine failed. See the minor_status parameter for 
  53804.                         more information. 
  53805.           GSS_S_NO_CRED The routine requested the default login context, but no 
  53806.                         default login context was available. 
  53807.  
  53808.  Related Information 
  53809.  
  53810.           Routines: 
  53811.           gss_accept_sec_context gssdce_create_empty_oid_set 
  53812.           gssdce_login_context_to_cred gssdce_register_acceptor_identity 
  53813.           gss_init_sec_context 
  53814.  
  53815.  
  53816. ΓòÉΓòÉΓòÉ 8.4.18. gss_compare_name ΓòÉΓòÉΓòÉ
  53817.  
  53818.  Purpose 
  53819.  
  53820.           Allows an application to compare two internal names to determine 
  53821.           whether they refer to the same object. 
  53822.  
  53823.  Format 
  53824.  
  53825.                     #include <dce/gssapi.h>
  53826.  
  53827.                     OM_uint32  gss_compare_name (
  53828.                             OM_uint32  *minor_status,
  53829.                             gss_name_t  name1,
  53830.                             gss_name_t  name2,
  53831.                             int  *name_equal);
  53832.  
  53833.  Parameters 
  53834.  
  53835.           Input 
  53836.  
  53837.           name1         Specifies the first internal name. 
  53838.  
  53839.           name2         Specifies the second internal name. 
  53840.  
  53841.           Output 
  53842.  
  53843.           name_equal    Returns one of the following values: 
  53844.  
  53845.                              TRUE      The names refer to the same object. 
  53846.                              FALSE     The names are not known to refer to the 
  53847.                                        same object. 
  53848.  
  53849.           minor_status  Returns a status code from the security mechanism. 
  53850.  
  53851.  Usage 
  53852.  
  53853.           The gss_compare_name routine lets an application compare two internal 
  53854.           names to determine whether they refer to the same object. 
  53855.  
  53856.  Return Codes 
  53857.  
  53858.           This routine returns the following major status codes: 
  53859.  
  53860.           GSS_S_COMPLETE The routine was completed successfully. 
  53861.  
  53862.  Related Information 
  53863.  
  53864.           Routines: 
  53865.           gss_display_name 
  53866.           gss_import_name 
  53867.           gss_release_name 
  53868.  
  53869.  
  53870. ΓòÉΓòÉΓòÉ 8.4.19. gss_context_time ΓòÉΓòÉΓòÉ
  53871.  
  53872.  Purpose 
  53873.  
  53874.           Checks the number of seconds the context remains valid. 
  53875.  
  53876.  Format 
  53877.  
  53878.                     #include <dce/gssapi.h>
  53879.  
  53880.                     OM_uint32  gss_context_time (
  53881.                             OM_uint32  *minor_status,
  53882.                             gss_ctx_id_t  context_handle,
  53883.                             OM_int32  *time_rec);
  53884.  
  53885.  Parameters 
  53886.  
  53887.           Input 
  53888.  
  53889.           context_handle Specifies the context to be checked. 
  53890.  
  53891.           Output 
  53892.  
  53893.           time_rec      Returns the number of seconds that the context remains 
  53894.                         valid. Returns a 0 (zero) if the context has already 
  53895.                         expired. 
  53896.  
  53897.           minor_status  Returns a status code from the security mechanism. 
  53898.  
  53899.  Usage 
  53900.  
  53901.           The gss_context_time routine checks the number of seconds for which 
  53902.           the context remains valid. 
  53903.  
  53904.  Return Codes 
  53905.  
  53906.           This routine returns the following major status codes: 
  53907.  
  53908.           GSS_S_COMPLETE The routine was completed successfully. 
  53909.  
  53910.  
  53911. ΓòÉΓòÉΓòÉ 8.4.20. gss_delete_sec_context ΓòÉΓòÉΓòÉ
  53912.  
  53913.  Purpose 
  53914.  
  53915.           Deletes a security context. 
  53916.  
  53917.  Format 
  53918.  
  53919.                     #include <dce/gssapi.h>
  53920.  
  53921.                     OM_uint32  gss_delete_sec_context (
  53922.                             OM_uint32  *minor_status,
  53923.                             gss_ctx_id_t  *context_handle,
  53924.                             gss_buffer_t  output_token_buffer);
  53925.  
  53926.  Parameters 
  53927.  
  53928.           Input 
  53929.  
  53930.           context_handle The context handle for the context to delete. 
  53931.  
  53932.           Output 
  53933.  
  53934.           output_token_buffer Returns a token to tell the application to delete 
  53935.                         the context. 
  53936.  
  53937.           minor_status  Returns a status code from the security mechanism. 
  53938.  
  53939.  Usage 
  53940.  
  53941.           The gss_delete_sec_context routine deletes a security context.  It 
  53942.           also deletes the local data structures associated with the security 
  53943.           context.  When it deletes the context, the routine can generate a 
  53944.           token.  The application passes the token to the context acceptor. 
  53945.           The context acceptor then passes the token to the 
  53946.           gss_process_context_token routine, telling it to delete the context 
  53947.           and all associated local data structures. 
  53948.  
  53949.           When the context is deleted, the applications cannot use the 
  53950.           context_handle parameter for additional security services. 
  53951.  
  53952.  Return Codes 
  53953.  
  53954.           This routine returns the following major status codes: 
  53955.  
  53956.           GSS_S_COMPLETE        The routine was completed successfully. 
  53957.           GSS_S_FAILURE         The routine failed. See the minor_status 
  53958.                                 parameter for more information. 
  53959.           GSS_S_NO_CONTEXT      The supplied context handle did not refer to a 
  53960.                                 valid context. 
  53961.  
  53962.  Related Information 
  53963.  
  53964.           Routines: 
  53965.           gss_accept_sec_context 
  53966.           gss_init_sec_context 
  53967.           gss_process_context_token 
  53968.  
  53969.  
  53970. ΓòÉΓòÉΓòÉ 8.4.21. gss_display_name ΓòÉΓòÉΓòÉ
  53971.  
  53972.  Purpose 
  53973.  
  53974.           Provides the textual representation of an opaque internal name to an 
  53975.           application. 
  53976.  
  53977.  Format 
  53978.  
  53979.                     #include <dce/gssapi.h>
  53980.  
  53981.                     OM_uint32  gss_display_name (
  53982.                             OM_uint32  *minor_status,
  53983.                             gss_name_t  input_name,
  53984.                             gss_buffer_t  output_name_buffer,
  53985.                             gss_OID  *output_name_type);
  53986.  
  53987.  Parameters 
  53988.  
  53989.           Input 
  53990.  
  53991.           input_name    Specifies the name to convert to text. 
  53992.  
  53993.           Output 
  53994.  
  53995.           output_name_buffer Returns the name as a character string. 
  53996.  
  53997.           output_name_type Returns the type of name to display as a pointer to 
  53998.                         static storage. The application should treat this as 
  53999.                         read-only. 
  54000.  
  54001.           minor_status  Returns a status code from the security mechanism. 
  54002.  
  54003.  Usage 
  54004.  
  54005.           The gss_display_name routine provides an application with the text 
  54006.           form of an opaque internal name.  The application can use the text to 
  54007.           display the name but not to print it. 
  54008.  
  54009.  Return Codes 
  54010.  
  54011.           This routine returns the following major status codes: 
  54012.  
  54013.           GSS_S_COMPLETE The routine was completed successfully. 
  54014.           GSS_S_BAD_NAME A name that is not valid was passed by the input_name 
  54015.                         parameter. 
  54016.           GSS_S_FAILURE The routine failed. Check the minor_status parameter 
  54017.                         for details. 
  54018.  
  54019.  Related Information 
  54020.  
  54021.           Routines: 
  54022.           gss_compare_name 
  54023.           gss_import_name 
  54024.           gss_release_name 
  54025.  
  54026.  
  54027. ΓòÉΓòÉΓòÉ 8.4.22. gss_display_status ΓòÉΓòÉΓòÉ
  54028.  
  54029.  Purpose 
  54030.  
  54031.           Provides an application with the textual representation of a GSSAPI 
  54032.           status code that can be displayed to a user or used for logging. 
  54033.  
  54034.  Format 
  54035.  
  54036.                     #include <dce/gssapi.h>
  54037.  
  54038.                     OM_uint32  gss_display_status (
  54039.                             OM_uint32  *minor_status,
  54040.                             OM_uint32  status_value,
  54041.                             int  status_type,
  54042.                             gss_OID  mech_type,
  54043.                             int  *message_context,
  54044.                             gss_buffer_t  status_string);
  54045.  
  54046.  Parameters 
  54047.  
  54048.           Input 
  54049.  
  54050.           status_value  Specifies the status value to convert. 
  54051.  
  54052.           status_type   Specifies one of the following status types: 
  54053.  
  54054.                              GSS_C_GSS_CODE      Major status; a GSS status 
  54055.                                                  code. 
  54056.                              GSS_C_MECH_CODE     Minor status; either DCE 
  54057.                                                  Security or Kerberos status 
  54058.                                                  code. 
  54059.  
  54060.           mech_type     Specifies the security mechanism. To use DCE Security, 
  54061.                         specify either GSSDCE_C_OID_DCE_KRBV5_DES or 
  54062.                         GSS_C_NULL_OID_SET. 
  54063.  
  54064.                         To use Kerberos, specify GSSDCE_C_OID_KRBV5_DES. 
  54065.  
  54066.           Input/Output 
  54067.  
  54068.           message_context Indicates whether the status code has multiple 
  54069.                         messages to read. 
  54070.  
  54071.                         The first time an application calls the routine, 
  54072.                         initialize the parameter to 0 (zero).  The routine 
  54073.                         returns the first message. If there are more messages, 
  54074.                         the routine sets the parameter to a non-zero value. 
  54075.                         The application calls the routine repeatedly to get the 
  54076.                         next message, until the message_context parameter is 
  54077.                         zero again. 
  54078.  
  54079.           Output 
  54080.           status_string Returns the status value as a text message. 
  54081.           minor_status  Returns a status code from the security mechanism. 
  54082.  
  54083.  Usage 
  54084.  
  54085.           The gss_display_status routine provides the context initiator with a 
  54086.           textual representation of a status code so that the application can 
  54087.           display the message to a user or log the message. Because some status 
  54088.           values can indicate more than one error, the routine enables the 
  54089.           calling application to process status codes with multiple messages. 
  54090.  
  54091.           The message_context parameter indicates the error message the 
  54092.           application should extract from the status_value parameter. The first 
  54093.           time an application calls the routine, it should initialize the 
  54094.           message_context parameter to 0 (zero) and return the first message. 
  54095.           If there are additional messages to read, the gss_display_status 
  54096.           routine returns a non-zero value.  The application can call 
  54097.           gss_display_status repeatedly to generate a single text string for 
  54098.           each call. 
  54099.  
  54100.  Return Codes 
  54101.  
  54102.           This routine returns the following major status codes: 
  54103.  
  54104.           GSS_S_COMPLETE         The routine was completed successfully. 
  54105.  
  54106.           GSS_S_BAD_MECH         The translation requires a mechanism that is 
  54107.                                  unsupported or unavailable. 
  54108.  
  54109.           GSS_S_BAD_STATUS       Indicates that either the status value was not 
  54110.                                  recognized or the status type was something 
  54111.                                  other than GSS_C_GSS_CODE or GSS_C_MECH_CODE 
  54112.  
  54113.           GSS_S_FAILURE          The routine failed. Check minor_status for 
  54114.                                  details. 
  54115.  
  54116.  
  54117. ΓòÉΓòÉΓòÉ 8.4.23. gss_import_name ΓòÉΓòÉΓòÉ
  54118.  
  54119.  Purpose 
  54120.  
  54121.           Converts a printable name to an internal form. 
  54122.  
  54123.  Format 
  54124.  
  54125.                     #include <dce/gssapi.h>
  54126.  
  54127.                     OM_uint32  gss_import_name (
  54128.                             OM_uint32  *minor_status,
  54129.                             gss_buffer_t  input_name_buffer,
  54130.                             gss_OID  input_name_type,
  54131.                             gss_name_t  *output_name);
  54132.  
  54133.  Parameters 
  54134.  
  54135.           Input 
  54136.           input_name_buffer Specifies the buffer containing the printable name 
  54137.                         to convert. 
  54138.           input_name_type Specifies the object identifier for the type of 
  54139.                         printable name. Specify GSS_C_NULL_OID to use the DCE 
  54140.                         name. 
  54141.  
  54142.                         You can explicitly request the DCE name by using 
  54143.                         GSS_C_OID_DCE_NAME. To ensure portability of your 
  54144.                         application, use the default, GSS_C_NULL_OID. 
  54145.  
  54146.           Output 
  54147.           output_name   Returns the name in an internal form. 
  54148.           minor_status  Returns a status code from the security mechanism. 
  54149.  
  54150.  Usage 
  54151.  
  54152.           The gss_import_name routine converts a printable name to an internal 
  54153.           form. 
  54154.  
  54155.  Return Codes 
  54156.  
  54157.           This routine returns the following major status codes: 
  54158.  
  54159.           GSS_S_COMPLETE      The routine was completed successfully. 
  54160.  
  54161.           GSS_S_BAD_NAMETYPE  The name passed by the input_name_buffer 
  54162.                               parameter is not recognized. 
  54163.  
  54164.           GSS_S_BAD_NAME      The routine could not interpret the 
  54165.                               input_name_buffer parameter as a name of the type 
  54166.                               specified. 
  54167.  
  54168.  Related Information 
  54169.  
  54170.           Routines: 
  54171.           gss_compare_name 
  54172.           gss_display_name 
  54173.           gss_release_name 
  54174.  
  54175.  
  54176. ΓòÉΓòÉΓòÉ 8.4.24. gss_indicate_mechs ΓòÉΓòÉΓòÉ
  54177.  
  54178.  Purpose 
  54179.  
  54180.           Allows an application to determine the underlying security mechanisms 
  54181.           that are available. 
  54182.  
  54183.  Format 
  54184.  
  54185.                     #include <dce/gssapi.h>
  54186.  
  54187.                     OM_uint32  gss_indicate_mechs (
  54188.                             OM_uint32  *minor_status,
  54189.                             gss_OID_set  *mech_set);
  54190.  
  54191.  Parameters 
  54192.  
  54193.           Output 
  54194.  
  54195.           mech_set      Returns the set of supported security mechanisms. The 
  54196.                         value of gss_OID_set is a pointer to a static storage 
  54197.                         and should be treated as read-only by the context 
  54198.                         initiator. 
  54199.  
  54200.           minor_status  Returns a status code from the security mechanism. 
  54201.  
  54202.  Usage 
  54203.  
  54204.           The gss_indicate_mechs routine enables an application to determine 
  54205.           the underlying security mechanisms that are available. These are DCE 
  54206.           Security and Kerberos Version 5. 
  54207.  
  54208.           You can use the gssdce_test_oid_set_member routine to check whether a 
  54209.           specific security mechanism is available. 
  54210.  
  54211.  Return Codes 
  54212.  
  54213.           This routine returns the following major status codes: 
  54214.  
  54215.           GSS_S_COMPLETE The routine was completed successfully. 
  54216.  
  54217.  Related Information 
  54218.  
  54219.           Routines: 
  54220.           gssdce_test_oid_set_member 
  54221.  
  54222.  
  54223. ΓòÉΓòÉΓòÉ 8.4.25. gss_init_sec_context ΓòÉΓòÉΓòÉ
  54224.  
  54225.  Purpose 
  54226.  
  54227.           Establishes a security context between the context initiator and a 
  54228.           context acceptor. 
  54229.  
  54230.  Format 
  54231.  
  54232.                     #include <dce/gssapi.h>
  54233.  
  54234.                     OM_uint32  gss_init_sec_context (
  54235.                             OM_uint32  *minor_status,
  54236.                             gss_cred_id_t  claimant_cred_handle,
  54237.                             gss_ctx_id_t  *context_handle,
  54238.                             gss_name_t  target_name,
  54239.                             gss_OID  mech_type,
  54240.                             int  req_flags,
  54241.                             OM_uint32  time_req,
  54242.                             gss_channel_bindings_t  input_channel_bindings,
  54243.                             gss_buffer_t  input_token,
  54244.                             gss_OID  *actual_mech_types,
  54245.                             gss_buffer_t  output_token,
  54246.                             int  *ret_flags,
  54247.                             OM_uint32  *time_rec);
  54248.  
  54249.  Parameters 
  54250.  
  54251.           Input 
  54252.  
  54253.           claimant_cred_handle   Specifies an optional handle for the 
  54254.                                  credential. To use the default credential, 
  54255.                                  supply GSS_C_NO_CREDENTIAL. The credential 
  54256.                                  handle created refers to the DCE default login 
  54257.                                  context. The credential must be either an 
  54258.                                  INITIATE or a BOTH type credential. 
  54259.  
  54260.           target_name            Specifies the name of the context acceptor. 
  54261.  
  54262.           mech_type              Specifies the security mechanism. To use DCE 
  54263.                                  Security, specify either 
  54264.                                  GSSDCE_C_OID_DCE_KRBV5_DES and or 
  54265.                                  GSS_C_NULL_OID. To use Kerberos, specify 
  54266.                                  GSSDCE_C_OID_KRBV5_DES. 
  54267.  
  54268.           req_flags              Specifies four independent flags, each of 
  54269.                                  which requests that the context support a 
  54270.                                  service option. The following symbolic names 
  54271.                                  are provided to correspond to each flag. The 
  54272.                                  symbolic names should be joined with a logical 
  54273.                                  OR to form a bit-mask value. 
  54274.  
  54275.                                  GSS_C_DELEG_FLAG 
  54276.  
  54277.                                       TRUE      The support of delegated 
  54278.                                                 credentials is requested. 
  54279.                                       FALSE     The support of delegated 
  54280.                                                 credentials is not requested. 
  54281.  
  54282.                                  GSS_C_MUTUAL_FLAG 
  54283.  
  54284.                                       TRUE      The support of mutual 
  54285.                                                 authentication is requested. 
  54286.                                       FALSE     The support of mutual 
  54287.                                                 authentication is not 
  54288.                                                 requested. 
  54289.  
  54290.                                  GSS_C_REPLAY_FLAG 
  54291.  
  54292.                                       TRUE      The support of detection of 
  54293.                                                 replayed signed or sealed 
  54294.                                                 messages is requested. 
  54295.                                       FALSE     The support of detection of 
  54296.                                                 replayed signed or sealed 
  54297.                                                 messages is  not requested. 
  54298.  
  54299.                                  GSS_C_SEQUENCE_FLAG 
  54300.  
  54301.                                       TRUE      The support of detection of 
  54302.                                                 out-of-sequence signed or 
  54303.                                                 sealed messages is requested. 
  54304.                                       FALSE     The support of detection of 
  54305.                                                 out-of-sequence signed or 
  54306.                                                 sealed messages is requested. 
  54307.  
  54308.           time_req               Specifies the desired number of seconds for 
  54309.                                  which the context should remain valid. To 
  54310.                                  specify the default validity period, use 0 
  54311.                                  (zero). 
  54312.  
  54313.           input_channel_bindings Specifies the bindings set by the context 
  54314.                                  initiator. Allows the context initiator to 
  54315.                                  bind the channel identification information 
  54316.                                  securely to the security context. 
  54317.  
  54318.           input_token            Specifies the token received from the context 
  54319.                                  acceptor. The first time the application calls 
  54320.                                  the routine, specify GSS_C_NO_BUFFER. 
  54321.                                  Subsequent calls require a token from the 
  54322.                                  context acceptor. 
  54323.  
  54324.           Input/Output 
  54325.  
  54326.           context_handle Specifies the context handle for the new context. The 
  54327.                         first time the application calls the routine, specify 
  54328.                         GSS_C_NO_CONTEXT. Subsequent calls use the value 
  54329.                         returned by the first call. 
  54330.  
  54331.           Output 
  54332.  
  54333.           actual_mech_types Returns one of the following values indicating the 
  54334.                         security mechanism: 
  54335.  
  54336.                           o  GSSDCE_C_OID_DCE_KRBV5_DES, for DCE Security. 
  54337.                           o  GSSDCE_C_OID_KRBV5_DES, for Kerberos. 
  54338.  
  54339.           output_token  Returns the token to send to the context acceptor. If 
  54340.                         the length field of the returned buffer is 0 (zero), no 
  54341.                         token is sent. 
  54342.  
  54343.           ret_flags     Returns six independent flags, each of which indicates 
  54344.                         that the context supports a service option.  The 
  54345.                         following symbolic names are provided to correspond to 
  54346.                         each flag: 
  54347.  
  54348.                         GSS_C_DELEG_FLAG 
  54349.  
  54350.                              TRUE      The creation of delegated credentials is 
  54351.                                        supported. 
  54352.                              FALSE     The creation of delegated credentials is 
  54353.                                        not supported. 
  54354.  
  54355.                         GSS_C_MUTUAL_FLAG 
  54356.  
  54357.                              TRUE      Mutual authentication is supported. 
  54358.                              FALSE     Mutual authentication is not supported. 
  54359.  
  54360.                         GSS_C_REPLAY_FLAG 
  54361.  
  54362.                              TRUE      The detection of replayed signed or 
  54363.                                        sealed messages is supported. 
  54364.                              FALSE     The detection of replayed signed or 
  54365.                                        sealed messages is not supported. 
  54366.  
  54367.                         GSS_C_SEQUENCE_FLAG 
  54368.  
  54369.                              TRUE      The detection of out-of-sequence signed 
  54370.                                        or sealed messages is supported. 
  54371.                              FALSE     The detection of out-of-sequence signed 
  54372.                                        or sealed messages is not supported. 
  54373.  
  54374.                         GSS_C_CONF_FLAG 
  54375.  
  54376.                              TRUE      Confidentiality service can be invoked 
  54377.                                        by calling the gss_seal routine. 
  54378.  
  54379.                              FALSE     No confidentiality service is available. 
  54380.                                        (Confidentiality can be provided using 
  54381.                                        the gss_seal routine, which provides 
  54382.                                        only message encapsulation, data-origin 
  54383.                                        authentication, and integrity services.) 
  54384.  
  54385.                         GSS_C_INTEG_FLAG 
  54386.  
  54387.                              TRUE      Integrity service can be invoked by 
  54388.                                        calling either the gss_sign or the 
  54389.                                        gss_seal routine. 
  54390.  
  54391.                              FALSE     Integrity service for individual 
  54392.                                        messages is unavailable. 
  54393.  
  54394.           time_rec      Returns the number of seconds the context is valid. If 
  54395.                         the mechanism does not support credential expiration, 
  54396.                         the routine returns the value GSS_C_INDEFINITE.  If the 
  54397.                         credential expiration time is not required, specify 
  54398.                         NULL. 
  54399.  
  54400.           minor_status  Returns a status code from the security mechanism. 
  54401.  
  54402.  Usage 
  54403.  
  54404.           The gss_init_sec_context routine is the first step in establishing a 
  54405.           security context between the context initiator and the context 
  54406.           acceptor. To ensure the portability of the application, use its 
  54407.           default credential by supplying GSS_C_NO_CREDENTIAL to the 
  54408.           claimant_cred_handle parameter. Specify an explicit credential when 
  54409.           the application needs an additional credential, for example, to use 
  54410.           delegation. 
  54411.  
  54412.           The first time the application calls the gss_init_sec_context 
  54413.           routine, specify the input_token parameter as GSS_NO_BUFFER. Calls to 
  54414.           the routine can return an output_token for transfer to the context 
  54415.           acceptor. The context acceptor presents the token to the 
  54416.           gss_accept_sec_context routine. 
  54417.  
  54418.           If the context initiator does not require a token, 
  54419.           gss_init_sec_context sets the length field of the output_token 
  54420.           argument to 0 (zero). 
  54421.  
  54422.           To finish establishing the context, the calling application can 
  54423.           require one or more reply tokens from the context acceptor. If the 
  54424.           application requires reply tokens, the gss_init_sec_context routine 
  54425.           returns a status value of GSS_S_CONTINUE_NEEDED. The application 
  54426.           calls the routine again when the reply token is received from the 
  54427.           context acceptor and passes the token to the gss_init_sec_context 
  54428.           routine by means of the input_token parameter. 
  54429.  
  54430.           The values returned by the ret_flags and time_rec parameters are not 
  54431.           defined unless the routine returns the status GSS_S_COMPLETE. 
  54432.  
  54433.  Return Codes 
  54434.  
  54435.           This routine returns the following major status codes: 
  54436.  
  54437.           GSS_S_COMPLETE             The routine was completed successfully. 
  54438.                                      input_chan_bindings parameter. 
  54439.  
  54440.           GSS_S_BAD_NAME             The target_name parameter was incorrectly 
  54441.                                      formed. 
  54442.  
  54443.           GSS_S_CONTINUE_NEEDED      To complete the context, the 
  54444.                                      gss_init_sec_context routine must be 
  54445.                                      called again with a token required from 
  54446.                                      the context acceptor. 
  54447.  
  54448.           GSS_S_DEFECTIVE_CREDENTIAL Consistency checks performed on the 
  54449.                                      credential failed. 
  54450.  
  54451.           GSS_S_DEFECTIVE_TOKEN      Consistency checks performed on the 
  54452.                                      input_token parameter failed. 
  54453.  
  54454.           GSS_S_FAILURE              The routine failed. See the minor_status 
  54455.                                      parameter for more information. 
  54456.  
  54457.           GSS_S_NO_CONTEXT           The supplied context handle did not refer 
  54458.                                      to a valid context. 
  54459.  
  54460.           GSS_S_NO_CRED              Indicates that either the supplied 
  54461.                                      credentials were not valid for context 
  54462.                                      acceptance or the credential handle did 
  54463.                                      not reference any credentials. 
  54464.  
  54465.           GSS_S_BAD_MECH             The translation requires a mechanism that 
  54466.                                      is unsupported or unavailable. 
  54467.  
  54468.  Related Information 
  54469.  
  54470.           Routines: 
  54471.           gss_accept_sec_context 
  54472.           gss_delete_sec_context 
  54473.  
  54474.  
  54475. ΓòÉΓòÉΓòÉ 8.4.26. gss_inquire_cred ΓòÉΓòÉΓòÉ
  54476.  
  54477.  Purpose 
  54478.  
  54479.           Provides information about a credential to the calling application. 
  54480.  
  54481.  Format 
  54482.  
  54483.                     #include <dce/gssapi.h>
  54484.  
  54485.                     OM_uint32  gss_inquire_cred (
  54486.                             OM_uint32  *minor_status,
  54487.                             gss_cred_id_t  cred_handle,
  54488.                             gss_name_t *name,
  54489.                             OM_uint32 *lifetime,
  54490.                             int *cred_usage,
  54491.                             gss_OID_set *mechs);
  54492.  
  54493.  Parameters 
  54494.  
  54495.           Input 
  54496.  
  54497.           cred_handle   Specifies a handle for the target credential. To get 
  54498.                         information about the default credential, specify 
  54499.                         GSS_C_NO_CREDENTIAL. 
  54500.  
  54501.           Output 
  54502.  
  54503.           name          Returns the principal name asserted by the credential. 
  54504.                         If the principal name is not required, specify NULL 
  54505.  
  54506.           lifetime      Returns the number of seconds for which the credential 
  54507.                         remains valid. If the credential expired, the parameter 
  54508.                         returns a 0 (zero). If there is no credential 
  54509.                         expiration, the parameter returns the value 
  54510.                         GSS_C_INDEFINITE. If an expiration time is not 
  54511.                         required, specify NULL. 
  54512.  
  54513.           cred_usage    Returns one of the following values, which describes 
  54514.                         how the application can use the credential: 
  54515.  
  54516.                           o  GSS_C_INITIATE 
  54517.                           o  GSS_C_ACCEPT 
  54518.                           o  GSS_C_BOTH 
  54519.  
  54520.                         If no usage information is required, specify NULL. 
  54521.  
  54522.           mechs         Returns a set of security mechanisms supported by the 
  54523.                         credential: 
  54524.  
  54525.                           o  GSSDCE_C_OID_DCE_KRBV5_DES, for DCE Security. 
  54526.                           o  GSSDCE_C_OID_KRBV5_DES for Kerberos. 
  54527.  
  54528.           minor_status  Returns a status code from the security mechanism. 
  54529.  
  54530.  Usage 
  54531.  
  54532.           The gss_inquire_cred routine provides information about a credential 
  54533.           to the calling application.  The calling application must first have 
  54534.           called the gss_acquire_cred routine for a handle for the credential. 
  54535.  
  54536.  Return Codes 
  54537.  
  54538.           This routine returns the following major status codes: 
  54539.  
  54540.           GSS_S_COMPLETE                  The routine was completed 
  54541.                                           successfully. 
  54542.           GSS_S_DEFECTIVE_CREDENTIAL      The credentials were not valid. 
  54543.           GSS_S_FAILURE                   The routine failed. Check the 
  54544.                                           minor_status parameter for details. 
  54545.  
  54546.  Related Information 
  54547.  
  54548.           Routines: 
  54549.           gss_acquire_cred 
  54550.  
  54551.  
  54552. ΓòÉΓòÉΓòÉ 8.4.27. gss_process_context_token ΓòÉΓòÉΓòÉ
  54553.  
  54554.  Purpose 
  54555.  
  54556.           Passes a context to the security service. 
  54557.  
  54558.  Format 
  54559.  
  54560.                     #include <dce/gssapi.h>
  54561.  
  54562.                     OM_uint32  gss_process_context_token (
  54563.                             OM_uint32  *minor_status,
  54564.                             gss_ctx_id_t  context_handle,
  54565.                             gss_buffer_t  input_token_buffer);
  54566.  
  54567.  Parameters 
  54568.  
  54569.           Input 
  54570.  
  54571.           context_handle Specifies the context handle where the security 
  54572.                         service processes the token. 
  54573.  
  54574.           input_token_buffer Specifies an opaque pointer to the first byte of 
  54575.                         the token to be processed. 
  54576.  
  54577.           Output 
  54578.  
  54579.           minor_status  Returns a status code from the security mechanism. 
  54580.  
  54581.  Usage 
  54582.  
  54583.           The gss_process_context_token routine passes tokens generated by the 
  54584.           gss_delete_security_context routine to the security service. 
  54585.  
  54586.           Usually, tokens are associated with either the context establishment 
  54587.           or with per-message security services. If the tokens are associated 
  54588.           with the context establishment, they are passed to the 
  54589.           gss_init_sec_context or gss_accept_sec_context routine. If the tokens 
  54590.           are associated with the per-message security service, they are passed 
  54591.           to the gss_verify or gss_unseal routine. Tokens generated by the 
  54592.           gss_delete_security_context routine are passed by the 
  54593.           gss_process_context_token routine to the security service for 
  54594.           processing. 
  54595.  
  54596.  Return Codes 
  54597.  
  54598.           This routine returns the following major status codes: 
  54599.  
  54600.           GSS_S_DEFECTIVE_TOKEN      Consistency checks performed on the 
  54601.                                      input_token parameter failed. 
  54602.           GSS_S_NO_CONTEXT           The supplied context handle did not refer 
  54603.                                      to a valid context. 
  54604.           GSS_S_BAD_SIG              The signature was incorrect. 
  54605.           GSS_S_FAILURE              The routine failed. See the minor_status 
  54606.                                      parameter return value for more 
  54607.                                      information. 
  54608.           GSS_S_UNSEQ_TOKEN          The token was valid and contained the 
  54609.                                      correct signature but it has been verified 
  54610.                                      out of sequence. An earlier token signed 
  54611.                                      or sealed by the remote application has 
  54612.                                      not been processed locally. 
  54613.  
  54614.  Related Information 
  54615.  
  54616.           Routines: 
  54617.           gss_delete_sec_context 
  54618.           gss_init_sec_context 
  54619.           gss_accept_sec_context 
  54620.           gss_unseal 
  54621.           gss_verify 
  54622.  
  54623.  
  54624. ΓòÉΓòÉΓòÉ 8.4.28. gss_release_buffer ΓòÉΓòÉΓòÉ
  54625.  
  54626.  Purpose 
  54627.  
  54628.           Frees storage associated with a buffer. 
  54629.  
  54630.  Format 
  54631.  
  54632.                     #include <dce/gssapi.h>
  54633.  
  54634.                     OM_uint32  gss_release_buffer (
  54635.                             OM_uint32  *minor_status,
  54636.                             gss_buffer_t  buffer);
  54637.  
  54638.  Parameters 
  54639.  
  54640.           Input 
  54641.  
  54642.           buffer        Specifies the buffer to delete. 
  54643.  
  54644.           Output 
  54645.  
  54646.           minor_status  Returns a status code from the security mechanism. 
  54647.  
  54648.  Usage 
  54649.  
  54650.           The gss_release_buffer routine deletes the buffer by freeing the 
  54651.           storage associated with it. 
  54652.  
  54653.  Return Codes 
  54654.  
  54655.           This routine returns the following major status code: 
  54656.  
  54657.           GSS_S_COMPLETE The routine was completed successfully. See the 
  54658.                         minor_status parameter for details. 
  54659.  
  54660.  
  54661. ΓòÉΓòÉΓòÉ 8.4.29. gss_release_cred ΓòÉΓòÉΓòÉ
  54662.  
  54663.  Purpose 
  54664.  
  54665.           Marks a credential for deletion. 
  54666.  
  54667.  Format 
  54668.  
  54669.                     #include <dce/gssapi.h>
  54670.  
  54671.                     OM_uint32  gss_release_cred (
  54672.                             OM_uint32  *minor_status,
  54673.                             gss_cred_id_t  *cred_handle);
  54674.  
  54675.  Parameters 
  54676.  
  54677.           Input 
  54678.  
  54679.           cred_handle   Specifies the buffer containing the opaque credential 
  54680.                         handle. This information is optional. To release the 
  54681.                         default credential, specify GSS_C_NO_CREDENTIAL. 
  54682.  
  54683.           Output 
  54684.  
  54685.           minor_status  Returns a status code from the security mechanism. 
  54686.  
  54687.  Usage 
  54688.  
  54689.           The gss_release_cred routine informs the GSSAPI that a credential is 
  54690.           no longer required and marks it for deletion. 
  54691.  
  54692.  Return Codes 
  54693.  
  54694.           This routine returns the following major status codes: 
  54695.  
  54696.           GSS_S_COMPLETE                   The routine was completed 
  54697.                                            successfully. 
  54698.           GSS_S_DEFECTIVE_CREDENTIAL       The credentials were not valid. 
  54699.  
  54700.  
  54701. ΓòÉΓòÉΓòÉ 8.4.30. gss_release_name ΓòÉΓòÉΓòÉ
  54702.  
  54703.  Purpose 
  54704.  
  54705.           Frees storage associated with an internal name that was allocated by 
  54706.           a GSSAPI routine. 
  54707.  
  54708.  Format 
  54709.  
  54710.                     #include <dce/gssapi.h>
  54711.  
  54712.                     OM_uint32  gss_release_name (
  54713.                             OM_uint32  *minor_status,
  54714.                             gss_name_t  *name);
  54715.  
  54716.  Parameters 
  54717.  
  54718.           Input 
  54719.  
  54720.           name          The internal name to delete. 
  54721.  
  54722.           Output 
  54723.  
  54724.           minor_status  Returns a status code from the security mechanism. 
  54725.  
  54726.  Usage 
  54727.  
  54728.           The gss_release_name routine deletes the internal name by freeing the 
  54729.           storage associated with that internal name. 
  54730.  
  54731.  Return Codes 
  54732.  
  54733.           This routine returns the following major status codes: 
  54734.  
  54735.           GSS_S_COMPLETE The routine was completed successfully. 
  54736.           GSS_S_BAD_NAME The name parameter did not contain a valid internal 
  54737.                         name. Check the minor_status parameter for details. 
  54738.  
  54739.  Related Information 
  54740.  
  54741.           Routines: 
  54742.           gss_compare_name 
  54743.           gss_display_name 
  54744.           gss_import_name 
  54745.  
  54746.  
  54747. ΓòÉΓòÉΓòÉ 8.4.31. gss_release_oid_set ΓòÉΓòÉΓòÉ
  54748.  
  54749.  Purpose 
  54750.  
  54751.           Frees storage associated with a gss_OID_set object. 
  54752.  
  54753.  Format 
  54754.  
  54755.                     #include <dce/gssapi.h>
  54756.  
  54757.                     OM_uint32  gss_release_oid_set (
  54758.                             OM_uint32  *minor_status,
  54759.                             gss_OID_set  *set);
  54760.  
  54761.  Parameters 
  54762.  
  54763.           Input 
  54764.  
  54765.           set           Specifies the OID set to delete. 
  54766.  
  54767.           Output 
  54768.  
  54769.           minor_status  Returns a status code from the security mechanism. 
  54770.  
  54771.  Usage 
  54772.  
  54773.           The gss_release_oid_set routine frees storage that is associated with 
  54774.           the set parameter and that was allocated by a GSSAPI routine. 
  54775.  
  54776.  Return Codes 
  54777.  
  54778.           This routine returns the following major status code: 
  54779.  
  54780.           GSS_S_COMPLETE The routine was completed successfully. 
  54781.  
  54782.  
  54783. ΓòÉΓòÉΓòÉ 8.4.32. gss_seal ΓòÉΓòÉΓòÉ
  54784.  
  54785.  Purpose 
  54786.  
  54787.           Cryptographically signs and optionally encrypts a message. 
  54788.  
  54789.  Format 
  54790.  
  54791.                     #include <dce/gssapi.h>
  54792.  
  54793.                     OM_uint32  gss_seal (
  54794.                             OM_uint32  *minor_status,
  54795.                             gss_ctx_id_t  context_handle,
  54796.                             int  conf_req_flag,
  54797.                             int  qop_req,
  54798.                             gss_buffer_t  input_message_buffer,
  54799.                             int  *conf_state,
  54800.                             gss_buffer_t  output_message_buffer);
  54801.  
  54802.  Parameters 
  54803.  
  54804.           Input 
  54805.  
  54806.           context_handle           Specifies the context on which the message 
  54807.                                    is sent. 
  54808.  
  54809.           conf_req_flag            Specifies the requested level of 
  54810.                                    confidentiality and integrity services as 
  54811.                                    follows: 
  54812.  
  54813.                                         TRUE      Both confidentiality and 
  54814.                                                   integrity services are 
  54815.                                                   requested. 
  54816.                                         FALSE     Only integrity services are 
  54817.                                                   requested. 
  54818.  
  54819.           qop_req                  Specifies the cryptographic algorithm or 
  54820.                                    quality of protection. This parameter has 
  54821.                                    two parts: the high-order 16 bits represent 
  54822.                                    the confidentiality algorithm selected, and 
  54823.                                    the low-order 16 bits represent the 
  54824.                                    integrity algorithm selected. 
  54825.  
  54826.                                    There are two constants defined for the 
  54827.                                    confidentiality algorithm: 
  54828.  
  54829.                                         GSSDCE_C_QOP_CONF_DES The DES 
  54830.                                              confidentiality algorithm. 
  54831.  
  54832.                                         GSSDCE_C_QOP_CONF_CDMF The CDMF 
  54833.                                              confidentiality algorithm. 
  54834.  
  54835.                                    There are three constants defined for the 
  54836.                                    integrity algorithm. These values are as 
  54837.                                    follows: 
  54838.  
  54839.                                         GSSDCE_C_QOP_INTEG_MD5 Faster supported 
  54840.                                              signature. 
  54841.  
  54842.                                         GSSDCE_C_QOP_INTEG_DES_MD5 DES MAC of 
  54843.                                              an MD5 signature. Faster than 
  54844.                                              GSSDCE_C_QOP_INTEG_DES_MAC. 
  54845.  
  54846.                                         GSSDCE_C_QOP_INTEG_DES_MAC Conventional 
  54847.                                              DES MAC. Slow but well understood. 
  54848.                                    The value of qop_req can be any combination 
  54849.                                    of the confidentiality and integrity 
  54850.                                    algorithms. To construct a qop_req value to 
  54851.                                    pass into gss_seal, simply OR the 
  54852.                                    confidentiality and integrity constants as 
  54853.                                    follows: 
  54854.  
  54855.                                                                       qop_req = GSSDCE_C_QOP_CONF_CDMF | GSSDCE_C_QOP_INTEG_MD5;
  54856.  
  54857.                                    The default qop_req value is 
  54858.                                    GSS_C_QOP_DEFAULT (0x00000000), and 
  54859.                                    represents GSSDCE_C_QOP_CONF_DES 
  54860.                                    confidentiality and GSSDCE_C_QOP_INTEG_MD5 
  54861.                                    integrity. 
  54862.  
  54863.                                    Note:  If an integrity algorithm that is not 
  54864.                                           supported is specified in the qop_req 
  54865.                                           parameter, 
  54866.                                           gssdce_s_unsupported_signature_algorithm 
  54867.                                           is returned in minor_status. 
  54868.  
  54869.                                    If a confidentiality algorithm that is not 
  54870.                                    supported was specified in the qop_req 
  54871.                                    parameter, 
  54872.                                    gssdce_s_unsupported_encryption_algorithm is 
  54873.                                    returned in minor_status. 
  54874.  
  54875.           input_message_buffer     Specifies the message to seal. 
  54876.  
  54877.           Output 
  54878.  
  54879.           conf_state               Returns the requested level of 
  54880.                                    confidentiality and integrity services as 
  54881.                                    follows: 
  54882.  
  54883.                                         TRUE        Both confidentiality and 
  54884.                                                     integrity services are 
  54885.                                                     requested. 
  54886.                                         FALSE       Only integrity services are 
  54887.                                                     requested. 
  54888.  
  54889.           output_message_buffer    Returns the buffer to receive the sealed 
  54890.                                    message. 
  54891.  
  54892.           minor_status             Returns a status code from the security 
  54893.                                    mechanism. 
  54894.  
  54895.  Usage 
  54896.  
  54897.           The gss_seal routine cryptographically signs and optionally encrypts 
  54898.           a message. The output_message_buffer token contains both the 
  54899.           signature and the message in a token structure. 
  54900.  
  54901.  Return Codes 
  54902.  
  54903.           This routine returns the following major status codes:  termhi=0 
  54904.           compact break=fit. 
  54905.  
  54906.           GSS_S_COMPLETE             The routine was completed successfully. 
  54907.  
  54908.           GSS_S_FAILURE              The routine failed. Check the minor_status 
  54909.                                      parameter for details. 
  54910.  
  54911.           GSS_S_NO_CONTEXT           The context identified in the 
  54912.                                      context_handle parameter was not valid. 
  54913.  
  54914.  Related Information 
  54915.  
  54916.           Routines: 
  54917.           gss_unseal 
  54918.  
  54919.  
  54920. ΓòÉΓòÉΓòÉ 8.4.33. gss_sign ΓòÉΓòÉΓòÉ
  54921.  
  54922.  Purpose 
  54923.  
  54924.           Generates a cryptographic signature for a message. 
  54925.  
  54926.  Format 
  54927.  
  54928.                     #include <dce/gssapi.h>
  54929.  
  54930.                     OM_uint32  gss_sign (
  54931.                             OM_uint32  *minor_status,
  54932.                             gss_ctx_id_t  context_handle,
  54933.                             int  qop_req,
  54934.                             gss_buffer_t  message_buffer,
  54935.                             gss_buffer_t  msg_token);
  54936.  
  54937.  Parameters 
  54938.  
  54939.           Input 
  54940.  
  54941.           context_handle Specifies the context on which the message is sent. 
  54942.  
  54943.           qop_req       Specifies the cryptographic algorithm or quality of 
  54944.                         protection. This parameter has two parts: the 
  54945.                         high-order 16 bits represent the confidentiality 
  54946.                         algorithm, which is ignored by this routine, and the 
  54947.                         low-order 16 bits, which represent the integrity 
  54948.                         algorithm selected. 
  54949.  
  54950.                         There are four constants defined for the integrity 
  54951.                         algorithm. These values are as follows: 
  54952.  
  54953.                              GSSDCE_C_QOP_INTEG_MD5 Faster supported signature. 
  54954.  
  54955.                              GSSDCE_C_QOP_INTEG_DES_MD5 DES MAC of an MD5 
  54956.                                   signature. Faster than 
  54957.                                   GSSDCE_C_QOP_INTEG_DES_MAC. 
  54958.  
  54959.                              GSSDCE_C_QOP_INTEG_DES_MAC Conventional DES MAC. 
  54960.                                   Slow but well understood. 
  54961.  
  54962.                              GSS_C_QOP_DEFAULT (0x00000000), represents 
  54963.                                   GSSDCE_C_QOP_INTEG_MD5 integrity. 
  54964.  
  54965.                         Note:  If an integrity algorithm that is not supported 
  54966.                                is specified in the qop_req parameter, 
  54967.                                gssdce_s_unsupported_signature_algorithm is 
  54968.                                returned in minor_status. 
  54969.  
  54970.           message_buffer Specifies the message to send. 
  54971.  
  54972.           Output 
  54973.  
  54974.           msg_token     Returns the buffer to receive the signature token to 
  54975.                         transfer to the context acceptor. 
  54976.  
  54977.           minor_status  Returns a status code from the security mechanism. 
  54978.  
  54979.  Usage 
  54980.  
  54981.           The gss_sign routine generates an encrypted signature for a message. 
  54982.           It places the signature in a token for transfer to the context 
  54983.           acceptor. 
  54984.  
  54985.  Return Codes 
  54986.  
  54987.           This routine returns the following major status codes:  termhi=0 
  54988.           compact. 
  54989.  
  54990.           GSS_S_COMPLETE             The routine was completed successfully. 
  54991.  
  54992.           GSS_S_FAILURE              The routine failed. Check the minor_status 
  54993.                                      parameter for details. 
  54994.  
  54995.           GSS_S_NO_CONTEXT           The context identified in the 
  54996.                                      context_handle parameter was not valid. 
  54997.  
  54998.  Related Information 
  54999.  
  55000.           Routines: 
  55001.  
  55002.           gss_verify 
  55003.  
  55004.  
  55005. ΓòÉΓòÉΓòÉ 8.4.34. gss_unseal ΓòÉΓòÉΓòÉ
  55006.  
  55007.  Purpose 
  55008.  
  55009.           Converts a sealed message into a usable form and verifies the 
  55010.           embedded signature. 
  55011.  
  55012.  Format 
  55013.  
  55014.                     #include <dce/gssapi.h>
  55015.  
  55016.                     OM_uint32  gss_unseal (
  55017.                             OM_uint32  *minor_status,
  55018.                             gss_ctx_id_t  context_handle,
  55019.                             gss_buffer_t  input_message_buffer,
  55020.                             gss_buffer_t  output_message_buffer,
  55021.                             int  *conf_state,
  55022.                             int  *qop_state);
  55023.  
  55024.  Parameters 
  55025.  
  55026.            termhi=0. 
  55027.  
  55028.           Input 
  55029.  
  55030.           context_handle                    Specifies the context on which the 
  55031.                                             message arrived. 
  55032.  
  55033.           input_message_buffer              Specifies the sealed message. 
  55034.  
  55035.           output_message_buffer             Specifies the buffer to receive the 
  55036.                                             unsealed message. 
  55037.            termhi=0. 
  55038.  
  55039.           Output 
  55040.  
  55041.           conf_state                        Returns the requested level of 
  55042.                                             confidentiality and integrity 
  55043.                                             services as follows: 
  55044.  
  55045.                                                  TRUE      Both confidentiality 
  55046.                                                            and integrity 
  55047.                                                            services are 
  55048.                                                            requested. 
  55049.                                                  FALSE     Only integrity 
  55050.                                                            services are 
  55051.                                                            requested. 
  55052.  
  55053.           qop_state                         Returns the cryptographic algorithm 
  55054.                                             or quality of protection. This 
  55055.                                             parameter has two parts: the 
  55056.                                             high-order 16 bits represent the 
  55057.                                             confidentiality algorithm selected, 
  55058.                                             and the low-order 16 bits represent 
  55059.                                             the integrity algorithm selected. 
  55060.  
  55061.                                             One of the following two values is 
  55062.                                             returned for the confidentiality 
  55063.                                             algorithm: 
  55064.  
  55065.                                                  0x00000000 
  55066.                                                  (GSSDCE_C_QOP_CONF_DES) The 
  55067.                                                       DES confidentiality 
  55068.                                                       algorithm. 
  55069.  
  55070.                                                  0x00010000 
  55071.                                                  (GSSDCE_C_QOP_CONF_CDMF) The 
  55072.                                                       CDMF confidentiality 
  55073.                                                       algorithm. 
  55074.  
  55075.                                             One of the following three values 
  55076.                                             is returned for the integrity 
  55077.                                             algorithm: 
  55078.  
  55079.                                                  0x00000001 
  55080.                                                  (GSSDCE_C_QOP_INTEG_MD5) 
  55081.                                                       Faster supported 
  55082.                                                       signature. 
  55083.  
  55084.                                                  0x00000002 
  55085.                                                  (GSSDCE_C_QOP_INTEG_DES_MD5) 
  55086.                                                       DES MAC of an MD5 
  55087.                                                       signature. Faster than 
  55088.                                                       GSSDCE_C_QOP_INTEG_DES_MAC. 
  55089.  
  55090.                                                  0x00000003 
  55091.                                                  (GSSDCE_C_QOP_INTEG_DES_MAC) 
  55092.                                                       Conventional DES MAC. 
  55093.                                                       Slow but well understood. 
  55094.  
  55095.                                             If GSS_C_QOP_DEFAULT was the input 
  55096.                                             value for qop_req in the gss_seal 
  55097.                                             routine, the return value for 
  55098.                                             qop_state will be 
  55099.                                             GSSDCE_C_QOP_CONF_CDMF | 
  55100.                                             GSSDCE_C_QOP_INTEG_MD5. 
  55101.  
  55102.           minor_status                      Returns a status code from the 
  55103.                                             security mechanism. 
  55104.  
  55105.  Usage 
  55106.  
  55107.           The gss_unseal routine converts a sealed message to a usable form and 
  55108.           verifies the embedded signature. The conf_state parameter indicates 
  55109.           whether the message was encrypted. The qop_state parameter is ORed to 
  55110.           return the type of algorithm used for decryption and integrity 
  55111.           verification. 
  55112.  
  55113.  Return Codes 
  55114.  
  55115.           This routine returns the following major status codes:  termhi=0 
  55116.           break=fit. 
  55117.  
  55118.           GSS_S_COMPLETE                    The routine was completed 
  55119.                                             successfully. 
  55120.  
  55121.           GSS_S_DEFECTIVE_TOKEN             The token failed consistency 
  55122.                                             checks. 
  55123.  
  55124.           GSS_S_DUPLICATE_TOKEN             The token was valid and contained 
  55125.                                             the correct signature, but it had 
  55126.                                             already been processed. 
  55127.  
  55128.           GSS_S_FAILURE                     The routine failed. The context 
  55129.                                             specified in the context_handle 
  55130.                                             parameter was not valid. 
  55131.  
  55132.           GSS_S_NO_CONTEXT                  The context identified in the 
  55133.                                             context_handle parameter was not 
  55134.                                             valid. 
  55135.  
  55136.           GSS_S_OLD_TOKEN                   The token was valid and contained 
  55137.                                             the correct signature but it is too 
  55138.                                             old. 
  55139.  
  55140.           GSS_S_UNSEQ_TOKEN                 The token was valid and contained 
  55141.                                             the correct signature but it has 
  55142.                                             been verified out of sequence.  An 
  55143.                                             earlier token signed or sealed by 
  55144.                                             the remote application has not been 
  55145.                                             processed locally. 
  55146.  
  55147.  Related Information 
  55148.  
  55149.           Routines: 
  55150.           gss_seal 
  55151.  
  55152.  
  55153. ΓòÉΓòÉΓòÉ 8.4.35. gss_verify ΓòÉΓòÉΓòÉ
  55154.  
  55155.  Purpose 
  55156.  
  55157.           Checks that the cryptographic signature fits the supplied message. 
  55158.  
  55159.  Format 
  55160.  
  55161.                     #include <dce/gssapi.h>
  55162.  
  55163.                     OM_uint32  gss_verify (
  55164.                             OM_uint32  *minor_status,
  55165.                             gss_ctx_id_t  context_handle,
  55166.                             gss_buffer_t  message_buffer,
  55167.                             gss_buffer_t  token_buffer)
  55168.                             int  *qop_state);
  55169.  
  55170.  Parameters 
  55171.  
  55172.           Input 
  55173.  
  55174.           context_handle Specifies the context on which the message arrived. 
  55175.  
  55176.           message_buffer Specifies the message to be verified. 
  55177.  
  55178.           token_buffer  Specifies the signature token to be associated with the 
  55179.                         message. 
  55180.  
  55181.           Output 
  55182.  
  55183.           qop_state     Returns the cryptographic algorithm or quality of 
  55184.                         protection from the signature. This parameter has two 
  55185.                         parts: the high-order 16 bits represent the 
  55186.                         confidentiality algorithm, which is ignored by this 
  55187.                         routine, and the low-order 16 bits, which represent the 
  55188.                         integrity algorithm selected. 
  55189.  
  55190.                         One of the following three values is returned for the 
  55191.                         integrity algorithm: These values are as follows: 
  55192.  
  55193.                              0x00000001 (GSSDCE_C_QOP_INTEG_MD5) Faster 
  55194.                                   supported signature. 
  55195.  
  55196.                              0x00000002 (GSSDCE_C_QOP_INTEG_DES_MD5) DES MAC of 
  55197.                                   an MD5 signature. Faster than 
  55198.                                   GSSDCE_C_QOP_INTEG_DES_MAC. 
  55199.  
  55200.                              0x00000003 (GSSDCE_C_QOP_INTEG_DES_MAC) 
  55201.                                   Conventional DES MAC. Slow but well 
  55202.                                   understood. If GSS_C_QOP_DEFAULT was the 
  55203.                         input value for qop_req in the gss_sign routine, the 
  55204.                         return value for qop_state will be 
  55205.                         GSSDCE_C_QOP_INTEG_MD5. 
  55206.  
  55207.                         Note:  If an integrity algorithm that is not supported 
  55208.                                is specified in the qop_req parameter, 
  55209.                                gssdce_s_unsupported_signature_algorithm is 
  55210.                                returned in minor_status. 
  55211.  
  55212.           minor_status  Returns a status code from the security mechanism. 
  55213.  
  55214.  Usage 
  55215.  
  55216.           The gss_verify routine checks that an encrypted signature, in the 
  55217.           token_buffer parameter, is the same as the one for the message in the 
  55218.           message_buffer buffer. The application receiving the message can use 
  55219.           the qop_state parameter to check the message's protection. 
  55220.  
  55221.  Return Codes 
  55222.  
  55223.           This routine returns the following major status codes:  termhi=0 
  55224.           compact. 
  55225.  
  55226.           GSS_S_COMPLETE                    The routine was completed 
  55227.                                             successfully. 
  55228.  
  55229.           GSS_S_FAILURE                     The routine failed. Check the 
  55230.                                             minor_status parameter for details. 
  55231.  
  55232.           GSS_S_NO_CONTEXT                  The context identified in the 
  55233.                                             context_handle parameter was not 
  55234.                                             valid. 
  55235.  
  55236.           GSS_S_DEFECTIVE_TOKEN             Consistency checks performed on the 
  55237.                                             input_token parameter failed. 
  55238.  
  55239.           GSS_S_BAD_SIG                     The signature was incorrect. 
  55240.  
  55241.  Related Information 
  55242.  
  55243.           Routines: 
  55244.  
  55245.           gss_sign 
  55246.  
  55247.  
  55248. ΓòÉΓòÉΓòÉ 8.5. DCE ID Mapping API ΓòÉΓòÉΓòÉ
  55249.  
  55250. The ID Mapping facility consists of routines with the prefix sec_id. There are 
  55251. no user interfaces to this facility. The routines map a global principal or 
  55252. group name into a cell name and a cell-relative principal or group name, and 
  55253. generate a global principal or group name from a cell name and a cell-relative 
  55254. principal or group name. These routines also convert the internal name (UUID) 
  55255. to a human-readable string and back again. 
  55256.  
  55257. The ID Mapping routines are the following: 
  55258.  
  55259.  sec_id_gen_group Generates a global name from cell and group UUIDs. 
  55260.  
  55261.  sec_id_gen_name Generates a global name from cell and principal UUIDs. 
  55262.  
  55263.  sec_id_parse_group Translates a global name into group and cell names and 
  55264.                UUIDs. 
  55265.  
  55266.  sec_id_parse_name Translates a global name into principal and cell names and 
  55267.                UUIDs. 
  55268.  
  55269.  
  55270. ΓòÉΓòÉΓòÉ 8.5.1. sec_id_gen_group ΓòÉΓòÉΓòÉ
  55271.  
  55272.  Purpose 
  55273.  
  55274.           Generates a global name from cell and group UUIDs. 
  55275.  
  55276.  Library 
  55277.  
  55278.           \lib\dceos2.lib 
  55279.  
  55280.  Format 
  55281.  
  55282.                     #include <dce/secidmap.h>
  55283.  
  55284.                     void sec_id_gen_group(
  55285.                             sec_rgy_handle_t  context,
  55286.                             uuid_t  *cell_idp,
  55287.                             uuid_t  *group_idp,
  55288.                             sec_rgy_name_t  global_name,
  55289.                             sec_rgy_name_t  cell_namep,
  55290.                             sec_rgy_name_t  group_namep,
  55291.                             error_status_t  *status);
  55292.  
  55293.  Parameters 
  55294.  
  55295.           Input 
  55296.  
  55297.           context       An opaque handle bound to a registry server. Use 
  55298.                         sec_rgy_site_open to acquire a bound handle. 
  55299.  
  55300.           cell_idp      A pointer to the UUID of the home cell of the group 
  55301.                         name that is in question. 
  55302.  
  55303.           group_idp     A pointer to the UUID of the group name that is in 
  55304.                         question. 
  55305.  
  55306.           Output 
  55307.  
  55308.           global_name   The global (full) name of the group in sec_rgy_name_t 
  55309.                         form. 
  55310.  
  55311.           cell_namep    The name of the group's home cell in sec_rgy_name_t 
  55312.                         form. 
  55313.  
  55314.           group_namep   The local (with respect to the home cell) name of the 
  55315.                         group in sec_rgy_name_t form. 
  55316.  
  55317.           status        A pointer to the completion status. On successful 
  55318.                         completion, the routine returns error_status_ok. 
  55319.                         Otherwise, it returns one of the following errors: 
  55320.  
  55321.                              sec_id_e_name_too_long The name is too long for 
  55322.                                                   current implementation. 
  55323.  
  55324.                              sec_id_e_bad_cell_uuid The cell UUID is not valid. 
  55325.  
  55326.                              sec_rgy_object_not_found The registry server could 
  55327.                                                   not find the specified group. 
  55328.  
  55329.                              sec_rgy_server_unavailable The DCE Registry Server 
  55330.                                                   is unavailable. 
  55331.  
  55332.  Usage 
  55333.  
  55334.           The sec_id_gen_group routine generates a global name from input cell 
  55335.           and group UUIDs. For example, given a UUID specifying the cell 
  55336.           \...\world\hp\brazil, and a UUID specifying a group resident in that 
  55337.           cell named writers, the routine returns the global name of that 
  55338.           group; in this case, \...\world\hp\brazil\writers. It also returns 
  55339.           the simple names of the cell and group, translated from the UUIDs. 
  55340.  
  55341.           The routine does not produce translations to any name for which a 
  55342.           NULL pointer has been supplied. 
  55343.  
  55344.  Related Information 
  55345.  
  55346.           Routines: 
  55347.  
  55348.  
  55349.           sec_id_gen_name 
  55350.           sec_id_parse_group 
  55351.           sec_id_parse_name 
  55352.           sec_rgy_site_open 
  55353.  
  55354.           Files: 
  55355.           \include\dce\secidmap.idl - The idl file from which dce\secidmap.h 
  55356.           was derived. 
  55357.  
  55358.  
  55359. ΓòÉΓòÉΓòÉ 8.5.2. sec_id_gen_name ΓòÉΓòÉΓòÉ
  55360.  
  55361.  Purpose 
  55362.  
  55363.           Generates a global name from cell and principal UUIDs. 
  55364.  
  55365.  Library 
  55366.  
  55367.           \lib\dceos2.lib 
  55368.  
  55369.  Format 
  55370.  
  55371.                     #include <dce/secidmap.h>
  55372.  
  55373.                     void sec_id_gen_name(
  55374.                             sec_rgy_handle_t  context,
  55375.                             uuid_t  *cell_idp,
  55376.                             uuid_t  *princ_idp,
  55377.                             sec_rgy_name_t  global_name,
  55378.                             sec_rgy_name_t  cell_namep,
  55379.                             sec_rgy_name_t  princ_namep,
  55380.                             error_status_t  *status);
  55381.  
  55382.  Parameters 
  55383.  
  55384.           Input 
  55385.  
  55386.           context       An opaque handle bound to a registry server. Use 
  55387.                         sec_rgy_site_open to acquire a bound handle. 
  55388.  
  55389.           cell_idp      A pointer to the UUID of the home cell of the principal 
  55390.                         name that is in question. 
  55391.  
  55392.           princ_idp     A pointer to the UUID of the principal name that is in 
  55393.                         question. 
  55394.  
  55395.           Output 
  55396.  
  55397.           global_name   The global (full) name of the principal, in 
  55398.                         sec_rgy_name_t form. 
  55399.  
  55400.           cell_namep    The name of the principal's home cell, in 
  55401.                         sec_rgy_name_t form. 
  55402.  
  55403.           princ_namep   The local (with respect to the home cell) name of the 
  55404.                         principal, in sec_rgy_name_t form. 
  55405.  
  55406.           status        A pointer to the completion status. On successful 
  55407.                         completion, the routine returns error_status_ok. 
  55408.                         Otherwise, it returns one of the following errors: 
  55409.  
  55410.                              sec_id_e_name_too_long The name is too long for 
  55411.                                                   current implementation. 
  55412.  
  55413.                              sec_id_e_bad_cell_uuid The cell UUID is not valid. 
  55414.  
  55415.                              sec_rgy_object_not_found The registry server could 
  55416.                                                   not find the specified 
  55417.                                                   principal. 
  55418.  
  55419.                              sec_rgy_server_unavailable The DCE Registry Server 
  55420.                                                   is unavailable. 
  55421.  
  55422.  Usage 
  55423.  
  55424.           The sec_id_gen_name routine generates a global name from input cell 
  55425.           and principal UUIDs. For example, given a UUID specifying the cell 
  55426.           \...\world\hp\brazil, and a UUID specifying a principal resident in 
  55427.           that cell named writers\tom, the routine would return the global name 
  55428.           of that principal, in this case, \...\world\hp\brazil\writers\tom. It 
  55429.           also returns the simple names of the cell and principal, translated 
  55430.           from the UUIDs. 
  55431.  
  55432.           The routine does not produce translations to any name for which a 
  55433.           NULL pointer has been supplied. 
  55434.  
  55435.  Permissions Required 
  55436.  
  55437.           The sec_id_gen_name routine requires at least one permission of any 
  55438.           kind on the account associated with the input cell and principal 
  55439.           UUIDs. 
  55440.  
  55441.  Related Information 
  55442.  
  55443.           Routines: sec_id_gen_group 
  55444.           sec_id_parse_group 
  55445.           sec_id_parse_name 
  55446.  
  55447.           Files: 
  55448.           \include\dce\secidmap.idl - The idl file from which dce\secidmap.h 
  55449.           was derived. 
  55450.  
  55451.  
  55452. ΓòÉΓòÉΓòÉ 8.5.3. sec_id_parse_group ΓòÉΓòÉΓòÉ
  55453.  
  55454.  Purpose 
  55455.  
  55456.           Translates a global name into group and cell names and UUIDs. 
  55457.  
  55458.  Library 
  55459.  
  55460.           \lib\dceos2.lib 
  55461.  
  55462.  Format 
  55463.  
  55464.                     #include <dce/secidmap.h>
  55465.  
  55466.                     void sec_id_parse_group(
  55467.                             sec_rgy_handle_t  context,
  55468.                             sec_rgy_name_t  global_name,
  55469.                             sec_rgy_name_t  cell_namep,
  55470.                             uuid_t  *cell_idp,
  55471.                             sec_rgy_name_t  group_namep,
  55472.                             uuid_t  *group_idp,
  55473.                             error_status_t  *status);
  55474.  
  55475.  Parameters 
  55476.  
  55477.           Input 
  55478.  
  55479.           context       An opaque handle bound to a registry server. Use 
  55480.                         sec_rgy_site_open to acquire a bound handle. 
  55481.  
  55482.           global_name   The global (full) name of the group, in sec_rgy_name_t 
  55483.                         form. 
  55484.  
  55485.           Output 
  55486.  
  55487.           cell_namep    The output name of the group's home cell in 
  55488.                         sec_rgy_name_t form. 
  55489.  
  55490.           cell_idp      A pointer to the UUID of the home cell of the group 
  55491.                         name that is in question. 
  55492.  
  55493.           group_namep   The local (with respect to the home cell) name of the 
  55494.                         group in sec_rgy_name_t form. 
  55495.  
  55496.           group_idp     A pointer to the UUID of the group name that is in 
  55497.                         question. 
  55498.  
  55499.           status        A pointer to the completion status. On successful 
  55500.                         completion, the routine returns error_status_ok. 
  55501.                         Otherwise, it returns one of the following errors: 
  55502.  
  55503.                              sec_id_e_name_too_long The name is too long for 
  55504.                                                   current implementation. 
  55505.  
  55506.                              sec_id_e_bad_cell_uuid The cell UUID is not valid. 
  55507.  
  55508.                              sec_rgy_object_not_found The registry server could 
  55509.                                                   not find the specified group. 
  55510.  
  55511.                              sec_rgy_server_unavailable The DCE Registry Server 
  55512.                                                   is unavailable. 
  55513.  
  55514.  Usage 
  55515.  
  55516.           The sec_id_parse_group routine translates a global group name into a 
  55517.           cell name and a cell-relative group name. It also returns the UUIDs 
  55518.           associated with the group and its home cell. 
  55519.  
  55520.           The routine does not produce translations to any name for which a 
  55521.           NULL pointer has been supplied. 
  55522.  
  55523.  Related Information 
  55524.  
  55525.           Routines: 
  55526.           sec_id_gen_group 
  55527.           sec_id_gen_name 
  55528.           sec_id_parse_name 
  55529.           sec_rgy_site_open 
  55530.  
  55531.  
  55532. ΓòÉΓòÉΓòÉ 8.5.4. sec_id_parse_name ΓòÉΓòÉΓòÉ
  55533.  
  55534.  Purpose 
  55535.  
  55536.           Translates a global name into principal and cell names and UUIDs. 
  55537.  
  55538.  Library 
  55539.  
  55540.           \lib\dceos2.lib 
  55541.  
  55542.  Format 
  55543.  
  55544.                     #include <dce/secidmap.h>
  55545.  
  55546.                     void sec_id_parse_name(
  55547.                             sec_rgy_handle_t  context,
  55548.                             sec_rgy_name_t  global_name,
  55549.                             sec_rgy_name_t  cell_namep,
  55550.                             uuid_t  *cell_idp,
  55551.                             sec_rgy_name_t  princ_namep,
  55552.                             uuid_t  *princ_idp,
  55553.                             error_status_t  *status);
  55554.  
  55555.  Parameters 
  55556.  
  55557.           Input 
  55558.  
  55559.           context       An opaque handle bound to a registry server. Use 
  55560.                         sec_rgy_site_open to acquire a bound handle. 
  55561.  
  55562.           global_name   The global (full) name of the principal, in 
  55563.                         sec_rgy_name_t form. 
  55564.  
  55565.           Output 
  55566.  
  55567.           cell_namep    The output name of the principal's home cell in 
  55568.                         sec_rgy_name_t form. 
  55569.  
  55570.           cell_idp      A pointer to the UUID of the home cell of the principal 
  55571.                         name that is in question. 
  55572.  
  55573.           princ_namep   The local (with respect to the home cell) name of the 
  55574.                         principal in sec_rgy_name_t form. 
  55575.  
  55576.           princ_idp     A pointer to the UUID of the principal name that is in 
  55577.                         question. 
  55578.  
  55579.           status        A pointer to the completion status.  On successful 
  55580.                         completion, the routine returns error_status_ok. 
  55581.                         Otherwise, it returns one of the following errors: 
  55582.  
  55583.                              sec_id_e_name_too_long The name is too long for 
  55584.                                                   current implementation. 
  55585.  
  55586.                              sec_id_e_bad_cell_uuid The cell UUID is not valid. 
  55587.  
  55588.                              sec_rgy_object_not_found The registry server could 
  55589.                                                   not find the specified 
  55590.                                                   principal. 
  55591.  
  55592.                              sec_rgy_server_unavailable The DCE Registry Server 
  55593.                                                   is unavailable. 
  55594.  
  55595.  Usage 
  55596.  
  55597.           The sec_id_parse_name routine translates a global principal name into 
  55598.           a cell name and a cell-relative principal name.  It also returns the 
  55599.           UUIDs associated with the principal and its home cell. 
  55600.  
  55601.           The routine does not produce translations to any name for which a 
  55602.           NULL pointer has been supplied. 
  55603.  
  55604.  Permissions Required 
  55605.  
  55606.           Only if princ_idp is requested as output does the sec_id_parse_name 
  55607.           routine require a permission.  In this case, the routine requires at 
  55608.           least one permission of any kind on the account whose global 
  55609.           principal name is to be translated. 
  55610.  
  55611.  Related Information 
  55612.  
  55613.           Routines: sec_id_gen_name 
  55614.           sec_rgy_site_open 
  55615.  
  55616.  
  55617. ΓòÉΓòÉΓòÉ 8.6. DCE Key Management API ΓòÉΓòÉΓòÉ
  55618.  
  55619. For a distributed application, it can be important for a server to have a 
  55620. network identity that is distinct from the principal identity it inherits from 
  55621. the user who calls it or from the host on which it runs. The Key Management 
  55622. facility enables noninteractive principals to manage their secret keys. 
  55623.  
  55624. The user interface to the Key Management facility consists of a few rgy_edit 
  55625. subcommands which call the Key Management API. This API consists of several 
  55626. routines with the prefix sec_key.... 
  55627.  
  55628. The sections describing the Key Management data types, constants, and routines 
  55629. are listed as follows: 
  55630.  
  55631.       Key Management Data Types 
  55632.       Key Management Routines 
  55633.  
  55634.  
  55635. ΓòÉΓòÉΓòÉ 8.6.1. Key Management Data Types ΓòÉΓòÉΓòÉ
  55636.  
  55637.  sec_passwd_type_t An enumerated set describing the currently supported key 
  55638.            types.  The possible values are: 
  55639.  
  55640.                 sec_passwd_none          Indicates no key types are supported. 
  55641.                 sec_passwd_plain         Indicates that the key is a printable 
  55642.                                          string of data. 
  55643.                 sec_passwd_des           Indicates that the key is DES 
  55644.                                          encrypted data. 
  55645.  
  55646.  sec_passwd_rec_t A structure containing either a plain text password or a 
  55647.            preencrypted buffer of password data. 
  55648.  
  55649.            Note:  Operations that take a keydata parameter expect a pointer to 
  55650.                   a sec_passwd_rec_t structure. Operations that yield a keydata 
  55651.                   parameter as output set the pointer to an array of 
  55652.                   sec_passwd_rec_t structures. (The array is terminated by an 
  55653.                   element with key type sec_passwd_none.) 
  55654.  
  55655.            The sec_passwd_rec_t structure consists of three components: 
  55656.  
  55657.                 version_number The version number of the password. 
  55658.  
  55659.                 pepper    A character string combined with the password before 
  55660.                           an encryption key is derived from the password. 
  55661.  
  55662.                 key       A structure consisting of the following components: 
  55663.  
  55664.                                key_type  The key type can be either of the 
  55665.                                          following: 
  55666.  
  55667.                                               sec_passwd_plain Indicates that 
  55668.                                                         tagged_union contains a 
  55669.                                                         printable string of 
  55670.                                                         data stored in plain 
  55671.                                                         format. 
  55672.  
  55673.                                               sec_passwd_des Indicates that 
  55674.                                                         tagged_union contains 
  55675.                                                         an array of data stored 
  55676.                                                         in des_key format. 
  55677.  
  55678.                                tagged_union A structure specifying the 
  55679.                                          password.  The value of the structure 
  55680.                                          depends on key_type.  If key_type is 
  55681.                                          sec_passwd_plain, the structure 
  55682.                                          contains plain, a character string. If 
  55683.                                          key_type is sec_passwd_des, the 
  55684.                                          structure contains des_key, a DES key 
  55685.                                          of type sec_passwd_des_key_t. 
  55686.  
  55687.  sec_passwd_version_t An unsigned 32-bit integer that defines the password 
  55688.            version number.  You can supply a version number or a 0 for no 
  55689.            version number. If you supply the constant 
  55690.            sec_passwd_c_version_none, the Security service supplies a 
  55691.            system-generated version number. 
  55692.  
  55693.  sec_key_mgmt_authn_service A 32-bit unsigned integer that indicates that the 
  55694.            authentication service in use, because a server can have different 
  55695.            keys for different levels of security.  The possible values of this 
  55696.            data type and their meanings are as follows: 
  55697.  
  55698.                 rpc_c_authn_none No authentication. 
  55699.  
  55700.                 rpc_c_authn_dce_private DCE private key authentication (an 
  55701.                           implementation of the Kerberos system). 
  55702.  
  55703.                 rpc_c_authn_dce_public DCE public key authentication (reserved 
  55704.                           for future use). 
  55705.  
  55706.  
  55707. ΓòÉΓòÉΓòÉ 8.6.2. Key Management Routines ΓòÉΓòÉΓòÉ
  55708.  
  55709.       sec_key_mgmt_change_key 
  55710.       sec_key_mgmt_delete_key 
  55711.       sec_key_mgmt_delete_key_type 
  55712.       sec_key_mgmt_free_key 
  55713.       sec_key_mgmt_garbage_collect 
  55714.       sec_key_mgmt_gen_rand_key 
  55715.       sec_key_mgmt_get_key 
  55716.       sec_key_mgmt_get_next_key 
  55717.       sec_key_mgmt_get_next_kvno 
  55718.       sec_key_mgmt_get_nth_key 
  55719.       sec_key_mgmt_initialize_cursor 
  55720.       sec_key_mgmt_manage_key 
  55721.       sec_key_mgmt_release_cursor 
  55722.       sec_key_mgmt_set_key 
  55723.  
  55724.  
  55725. ΓòÉΓòÉΓòÉ 8.6.3. sec_key_mgmt_change_key ΓòÉΓòÉΓòÉ
  55726.  
  55727.  Purpose 
  55728.  
  55729.           Changes a principal's key. 
  55730.  
  55731.  Library 
  55732.  
  55733.           \lib\dceos2.lib 
  55734.  
  55735.  Format 
  55736.  
  55737.                     #include <dce/keymgmt.h>
  55738.  
  55739.                     void sec_key_mgmt_change_key(
  55740.                             sec_key_mgmt_authn_service  authn_service,
  55741.                             void  *arg,
  55742.                             unsigned_char  *principal_name,
  55743.                             unsigned32  key_vno,
  55744.                             void  *keydata,
  55745.                             sec_timeval_period_t  *garbage_collect_time,
  55746.                             error_status_t  *status);
  55747.  
  55748.  Parameters 
  55749.  
  55750.           Input 
  55751.  
  55752.           authn_service Identifies the authentication protocol using this key. 
  55753.                         The possible authentication protocols are as follows: 
  55754.  
  55755.                              rpc_c_authn_dce_secret  DCE shared-secret key 
  55756.                                                      authentication 
  55757.  
  55758.                              rpc_c_authn_dce_public  DCE public key 
  55759.                                                      authentication (reserved 
  55760.                                                      for future use). 
  55761.  
  55762.           arg           Specifies either the local key file or a parameter to 
  55763.                         the get_key_fn key acquisition routine of the 
  55764.                         rpc_server_register_auth_info routine. 
  55765.  
  55766.                         A value of NULL specifies that the default key file 
  55767.                         v5srvtab should be used. A key file name specifies that 
  55768.                         file should be used as the key file. You must prepend 
  55769.                         the file's absolute filename with WRFILE: and the file 
  55770.                         must have been created with the rgy_edit ktadd command 
  55771.                         or the sec_key_mgmt_set_key routine. 
  55772.  
  55773.                         Any other value specifies a parameter for the 
  55774.                         get_key_fn key acquisition. See 
  55775.                         rpc_server_register_auth_info for more information. 
  55776.  
  55777.           principal_name A pointer to a character string indicating the name of 
  55778.                         the principal whose key is to be changed. 
  55779.  
  55780.           key_vno       The version number of the new key. If zero is 
  55781.                         specified, the routine selects the next appropriate key 
  55782.                         version number. 
  55783.  
  55784.           keydata       A pointer to a structure of type sec_passwd_rec_t. 
  55785.  
  55786.           Output 
  55787.  
  55788.           garbage_collect_time The number of seconds that must elapse before 
  55789.                         all currently valid tickets (which are encoded with the 
  55790.                         current or previous keys) expire. At that time, all 
  55791.                         obsolete keys can be garbage collected, because no 
  55792.                         valid tickets encrypted with those keys remain 
  55793.                         outstanding on the network. 
  55794.  
  55795.           status        A pointer to the completion status.  On successful 
  55796.                         completion, the routine returns error_status_ok. 
  55797.                         Otherwise, it returns one of the following errors: 
  55798.  
  55799.                              sec_key_mgmt_e_key_unavailable The old key is not 
  55800.                                                       present and cannot be 
  55801.                                                       used to set a client side 
  55802.                                                       authentication context. 
  55803.  
  55804.                              sec_key_mgmt_e_authn_invalid The authentication 
  55805.                                                       protocol is not valid. 
  55806.  
  55807.                              sec_key_mgmt_e_auth_unavailable The authentication 
  55808.                                                       protocol is not available 
  55809.                                                       to update the network 
  55810.                                                       database or obtain the 
  55811.                                                       necessary network 
  55812.                                                       credentials. 
  55813.  
  55814.                              sec_key_mgmt_e_unauthorized The caller is not 
  55815.                                                       authorized to perform the 
  55816.                                                       operation. 
  55817.  
  55818.                              sec_key_mgmt_e_key_unsupported The key type is not 
  55819.                                                       supported. 
  55820.  
  55821.                              sec_key_mgmt_e_key_version_ex A key with this 
  55822.                                                       version number already 
  55823.                                                       exists. 
  55824.  
  55825.                              sec_rgy_server_unavailable The DCE Registry Server 
  55826.                                                       is unavailable. 
  55827.  
  55828.                              sec_rgy_object_not_found No principal was found 
  55829.                                                       with the given name. 
  55830.  
  55831.                              sec_s_no_memory          Unable to allocate 
  55832.                                                       memory. 
  55833.  
  55834.                              sec_s_bad_key_parity     The parity is bad. 
  55835.  
  55836.                         Note:  Any error condition leaves the key state 
  55837.                                unchanged. 
  55838.  
  55839.  
  55840.  Usage 
  55841.  
  55842.           The sec_key_mgmt_change_key routine performs all activities necessary 
  55843.           to update a principal's key to the specified value.  This includes 
  55844.           updating any local storage for the principal's key and also 
  55845.           performing any remote operations needed to keep the authentication 
  55846.           protocol (or network registry) current. Old keys for the principal 
  55847.           are garbage collected if appropriate. 
  55848.  
  55849.  Related Information 
  55850.  
  55851.           Routines: rpc_server_register_auth_info 
  55852.           sec_key_mgmt_gen_rand_key 
  55853.           sec_key_mgmt_set_key 
  55854.  
  55855.  
  55856. ΓòÉΓòÉΓòÉ 8.6.4. sec_key_mgmt_delete_key ΓòÉΓòÉΓòÉ
  55857.  
  55858.  Purpose 
  55859.  
  55860.           Deletes a key from the local storage. 
  55861.  
  55862.  Library 
  55863.  
  55864.           \lib\dceos2.lib 
  55865.  
  55866.  Format 
  55867.  
  55868.                     #include <dce/keymgmt.h>
  55869.  
  55870.                     void sec_key_mgmt_delete_key(
  55871.                             sec_key_mgmt_authn_service  authn_service,
  55872.                             void  *arg,
  55873.                             unsigned_char  *principal_name,
  55874.                             unsigned32  key_vno,
  55875.                             error_status_t  *status);
  55876.  
  55877.  Parameters 
  55878.  
  55879.           Input 
  55880.  
  55881.           authn_service Identifies the authentication protocol using this key. 
  55882.                         The possible authentication protocols are as follows: 
  55883.  
  55884.                              rpc_c_authn_dce_secret DCE shared-secret key 
  55885.                                                    authentication. 
  55886.  
  55887.                              rpc_c_authn_dce_public DCE public key 
  55888.                                                    authentication (reserved for 
  55889.                                                    future use). 
  55890.  
  55891.           arg           Specifies either the local key file or a parameter to 
  55892.                         the get_key_fn key acquisition routine of the 
  55893.                         rpc_server_register_auth_info routine. 
  55894.  
  55895.                         A value of NULL specifies that the default key file 
  55896.                         v5srvtab should be used. A key file name specifies that 
  55897.                         file should be used as the key file. You must prepend 
  55898.                         the file's absolute filename with WRFILE: and the file 
  55899.                         must have been created with the rgy_edit ktadd command 
  55900.                         or the sec_key_mgmt_set_key routine. 
  55901.  
  55902.                         Any other value specifies a parameter for the 
  55903.                         get_key_fn key acquisition. See 
  55904.                         rpc_server_register_auth_info for more information. 
  55905.  
  55906.           principal_name A pointer to a character string indicating the name of 
  55907.                         the principal whose key is to be deleted. 
  55908.  
  55909.           key_vno       The version number of the desired key. 
  55910.  
  55911.           Output 
  55912.  
  55913.           status        A pointer to the completion status.  On successful 
  55914.                         completion, the routine returns error_status_ok. 
  55915.                         Otherwise, it returns one of the following errors: 
  55916.  
  55917.                              sec_key_mgmt_e_key_unavailable The requested key 
  55918.                                                         is not present. 
  55919.  
  55920.                              sec_key_mgmt_e_authn_invalid The authentication 
  55921.                                                         protocol is not valid. 
  55922.  
  55923.                              sec_key_mgmt_e_unauthorized The caller is not 
  55924.                                                         authorized to perform 
  55925.                                                         the operation. 
  55926.  
  55927.                         Note:  Any error condition leaves the key state 
  55928.                                unchanged. 
  55929.  
  55930.  
  55931.  Usage 
  55932.  
  55933.           The sec_key_mgmt_delete_key routine deletes the specified key from 
  55934.           the local key storage.  If an administrator discovers or suspects 
  55935.           that the security of a server's key has been compromised, the 
  55936.           administrator should delete the key immediately with 
  55937.           sec_key_mgmt_delete_key.  This routine removes the key from the local 
  55938.           key storage, which invalidates all existing tickets encoded with the 
  55939.           key.  If the compromised key is the current one, the principal should 
  55940.           change the key with sec_key_mgmt_change_key before deleting it.  It 
  55941.           is not an error for a process to delete the current key (as long as 
  55942.           it is done after the network context has been established), but it 
  55943.           can seriously inconvenience legitimate clients of a service. 
  55944.  
  55945.           This routine deletes all key types that have the specified key 
  55946.           version number.  A key type identifies the data encryption algorithm 
  55947.           being used (for example, DES).  This routine differs from 
  55948.           sec_key_mgmt_delete_key_type in that sec_key_mgmt_delete_key_type 
  55949.           deletes only the specified key version of the specified key type from 
  55950.           the local key storage. 
  55951.  
  55952.  Related Information 
  55953.  
  55954.           Routines: sec_key_mgmt_change_key 
  55955.           sec_key_mgmt_delete_key_type 
  55956.           sec_key_mgmt_garbage_collect 
  55957.           sec_key_mgmt_set_key 
  55958.  
  55959.  
  55960. ΓòÉΓòÉΓòÉ 8.6.5. sec_key_mgmt_delete_key_type ΓòÉΓòÉΓòÉ
  55961.  
  55962.  Purpose 
  55963.  
  55964.           Deletes a key version of a key type from the local key storage. 
  55965.  
  55966.  Library 
  55967.  
  55968.           \lib\dceos2.lib 
  55969.  
  55970.  Format 
  55971.  
  55972.                     #include <dce/keymgmt.h>
  55973.  
  55974.                     void sec_key_mgmt_delete_key_type(
  55975.                             sec_key_mgmt_authn_service  authn_service,
  55976.                             void  *arg,
  55977.                             unsigned_char  *principal_name,
  55978.                             void  *keytype,
  55979.                             unsigned32  key_vno,
  55980.                             error_status_t  *status);
  55981.  
  55982.  Parameters 
  55983.  
  55984.           Input 
  55985.  
  55986.           authn_service Identifies the authentication protocol using this key. 
  55987.                         The possible authentication protocols are as follows: 
  55988.  
  55989.                              rpc_c_authn_dce_secret DCE shared-secret key 
  55990.                                                    authentication 
  55991.  
  55992.                              rpc_c_authn_dce_public DCE public key 
  55993.                                                    authentication (reserved for 
  55994.                                                    future use). 
  55995.  
  55996.           arg           Specifies either the local key file or a parameter to 
  55997.                         the get_key_fn key acquisition routine of the 
  55998.                         rpc_server_register_auth_info routine. 
  55999.  
  56000.                         A value of NULL specifies that the default key file 
  56001.                         v5srvtab should be used. A key file name specifies that 
  56002.                         file should be used as the key file. You must prepend 
  56003.                         the file's absolute filename with WRFILE: and the file 
  56004.                         must have been created with the rgy_edit ktadd command 
  56005.                         or the sec_key_mgmt_set_key routine. 
  56006.  
  56007.                         Any other value specifies a parameter for the 
  56008.                         get_key_fn key acquisition routine. See 
  56009.                         rpc_server_register_auth_info for more information. 
  56010.  
  56011.           principal_name A pointer to a character string indicating the name of 
  56012.                         the principal whose key type is to be deleted. 
  56013.  
  56014.           keytype       A pointer to a value of type sec_passwd_type_t. The 
  56015.                         value identifies the data encryption algorithm that is 
  56016.                         being used (for example, DES). 
  56017.  
  56018.           key_vno       The version number of the desired key. 
  56019.  
  56020.           Output 
  56021.  
  56022.           status        A pointer to the completion status.  On successful 
  56023.                         completion, the routine returns error_status_ok. 
  56024.                         Otherwise, it returns one of the following errors: 
  56025.  
  56026.                              sec_key_mgmt_e_key_unavailable The requested key 
  56027.                                                      is not present. 
  56028.  
  56029.                              sec_key_mgmt_e_authn_invalid The authentication 
  56030.                                                      protocol is not valid. 
  56031.  
  56032.                              sec_key_mgmt_e_unauthorized The caller is not 
  56033.                                                      authorized to perform the 
  56034.                                                      operation. 
  56035.  
  56036.                         Note:  Any error condition leaves the key state 
  56037.                                unchanged. 
  56038.  
  56039.  
  56040.  Usage 
  56041.  
  56042.           The sec_key_mgmt_delete_key_type routine deletes the specified key 
  56043.           version of the specified key type from the local key storage. It 
  56044.           differs from sec_key_mgmt_delete_key in that sec_key_mgmt_delete_key 
  56045.           deletes all key types that have the same key version number. 
  56046.  
  56047.           This routine removes the key from the local key storage, which 
  56048.           invalidates all existing tickets encoded with the key.  If the key in 
  56049.           question is the current one, the principal should change the key with 
  56050.           sec_key_mgmt_change_key before deleting it. It is not an error for a 
  56051.           process to delete the current key (as long as it is done after the 
  56052.           network context has been established), but it can seriously 
  56053.           inconvenience legitimate clients of a service. 
  56054.  
  56055.  Related Information 
  56056.  
  56057.           Routines: sec_key_mgmt_delete_key 
  56058.           sec_key_mgmt_garbage_collect 
  56059.           rpc_server_register_auth_info 
  56060.           sec_key_mgmt_change_key 
  56061.  
  56062.  
  56063. ΓòÉΓòÉΓòÉ 8.6.6. sec_key_mgmt_free_key ΓòÉΓòÉΓòÉ
  56064.  
  56065.  Purpose 
  56066.  
  56067.           Frees the memory used by a key value. 
  56068.  
  56069.  Library 
  56070.  
  56071.           \lib\dceos2.lib 
  56072.  
  56073.  Format 
  56074.  
  56075.                     #include <dce/keymgmt.h>
  56076.  
  56077.                     void sec_key_mgmt_free_key(
  56078.                             void  *keydata,
  56079.                             error_status_t  *status);
  56080.  
  56081.  Parameters 
  56082.  
  56083.           Input 
  56084.  
  56085.           keydata       A pointer to a structure of type sec_passwd_rec_t. 
  56086.  
  56087.           Output 
  56088.  
  56089.           status        A pointer to the completion status.  On successful 
  56090.                         completion, the routine returns error_status_ok. 
  56091.                         Otherwise, it returns an error. 
  56092.  
  56093.  Usage 
  56094.  
  56095.           The sec_key_mgmt_free_key routine releases any storage allocated for 
  56096.           the indicated key data by sec_key_mgmt_get_key. The storage for the 
  56097.           key data returned by sec_key_mgmt_get_key is dynamically allocated. 
  56098.  
  56099.  Related Information 
  56100.  
  56101.           Routines: 
  56102.           sec_key_mgmt_get_key 
  56103.  
  56104.  
  56105. ΓòÉΓòÉΓòÉ 8.6.7. sec_key_mgmt_garbage_collect ΓòÉΓòÉΓòÉ
  56106.  
  56107.  Purpose 
  56108.  
  56109.           Deletes obsolete keys. 
  56110.  
  56111.  Library 
  56112.  
  56113.           \lib\dceos2.lib 
  56114.  
  56115.  Format 
  56116.  
  56117.                     #include <dce/keymgmt.h>
  56118.  
  56119.                     void sec_key_mgmt_garbage_collect(
  56120.                             sec_key_mgmt_authn_service  authn_service,
  56121.                             void  *arg,
  56122.                             unsigned_char  *principal_name,
  56123.                             error_status_t  *status);
  56124.  
  56125.  Parameters 
  56126.  
  56127.           Input 
  56128.  
  56129.           authn_service Identifies the authentication protocol using this key. 
  56130.                         The possible authentication protocols are as follows: 
  56131.  
  56132.                              rpc_c_authn_dce_secret DCE shared-secret key 
  56133.                                                   authentication 
  56134.  
  56135.                              rpc_c_authn_dce_public DCE public key 
  56136.                                                   authentication (reserved for 
  56137.                                                   future use). 
  56138.  
  56139.           arg           This parameter can specify either the local key file or 
  56140.                         an argument to the get_key_fn key acquisition routine 
  56141.                         of the rpc_server_register_auth_info routine. 
  56142.  
  56143.                         A value of NULL specifies that the default key file 
  56144.                         v5srvtab should be used. A key file name specifies that 
  56145.                         file should be used as the key file. You must prepend 
  56146.                         the file's absolute file name with WRFILE: and the file 
  56147.                         must have been created with the rgy_edit ktadd command 
  56148.                         or the  sec_key_mgmt_set_key routine. 
  56149.  
  56150.                         Any other value specifies an argument for the 
  56151.                         get_key_fn key acquisition routine. See 
  56152.                         rpc_server_register_auth_info for more information. 
  56153.  
  56154.           principal_name A pointer to a character string indicating the name of 
  56155.                         the principal whose key information is to be garbage 
  56156.                         collected. 
  56157.  
  56158.           Output 
  56159.  
  56160.           status        A pointer to the completion status.  On successful 
  56161.                         completion, the routine returns error_status_ok. 
  56162.                         Otherwise, it returns one of the following errors: 
  56163.  
  56164.                              sec_key_mgmt_e_authn_invalid The authentication 
  56165.                                                   protocol is not valid. 
  56166.  
  56167.                              sec_key_mgmt_e_key_unavailable The requested key 
  56168.                                                   is not present. 
  56169.  
  56170.                              sec_key_mgmt_e_unauthorized The caller is not 
  56171.                                                   authorized to perform the 
  56172.                                                   operation. 
  56173.  
  56174.                              sec_rgy_server_unavailable The DCE Registry Server 
  56175.                                                   is unavailable. 
  56176.  
  56177.                              sec_rgy_object_not_found No principal was found 
  56178.                                                   with the given name. 
  56179.  
  56180.                              sec_s_no_memory      Unable to allocate memory. 
  56181.  
  56182.  Usage 
  56183.  
  56184.           The sec_key_mgmt_garbage_collect routine discards any obsolete key 
  56185.           information for this principal. An obsolete key is one that can only 
  56186.           decode invalid tickets. As an example, a key that was in use on 
  56187.           Monday and was only used to encode tickets whose maximum lifetime was 
  56188.           one day was changed at 8:00 am on Tuesday morning, it would become 
  56189.           obsolete by 8:00 am Wednesday morning. After that, there could be no 
  56190.           valid tickets outstanding. 
  56191.  
  56192.  Related Information 
  56193.  
  56194.           Routines: 
  56195.           sec_key_mgmt_delete_key 
  56196.  
  56197.  
  56198. ΓòÉΓòÉΓòÉ 8.6.8. sec_key_mgmt_gen_rand_key ΓòÉΓòÉΓòÉ
  56199.  
  56200.  Purpose 
  56201.  
  56202.           Generates a new random key of a specified key type. 
  56203.  
  56204.  Library 
  56205.  
  56206.           \lib\dceos2.lib 
  56207.  
  56208.  Format 
  56209.  
  56210.                     #include <dce/keymgmt.h>
  56211.  
  56212.                     void sec_key_mgmt_gen_rand_key(
  56213.                             sec_key_mgmt_authn_service  authn_service,
  56214.                             void  *arg,
  56215.                             unsigned_char  *principal_name,
  56216.                             void  *keytype,
  56217.                             unsigned32  key_vno,
  56218.                             void  **keydata,
  56219.                             error_status_t  *status);
  56220.  
  56221.  Parameters 
  56222.  
  56223.           Input 
  56224.  
  56225.           authn_service Identifies the authentication protocol using this key. 
  56226.                         The possible authentication protocols are as follows: 
  56227.  
  56228.                              rpc_c_authn_dce_secret DCE shared-secret key 
  56229.                                                   authentication 
  56230.  
  56231.                              rpc_c_authn_dce_public DCE public key 
  56232.                                                   authentication (reserved for 
  56233.                                                   future use). 
  56234.  
  56235.           arg           This parameter can specify either the local key file or 
  56236.                         an argument to the get_key_fn key acquisition routine 
  56237.                         of the rpc_server_register_auth_info routine. 
  56238.  
  56239.                         A value of NULL specifies that the default key file 
  56240.                         v5srvtab should be used. A key file name specifies that 
  56241.                         file should be used as the key file. You must prepend 
  56242.                         the file's absolute file name with WRFILE: and the file 
  56243.                         must have been created with the rgy_edit ktadd command 
  56244.                         or the  sec_key_mgmt_set_key routine. 
  56245.  
  56246.                         Any other value specifies an argument for the 
  56247.                         get_key_fn key acquisition routine. See 
  56248.                         rpc_server_register_auth_info for more information. 
  56249.  
  56250.           principal_name A pointer to a character string indicating the name of 
  56251.                         the principal for whom the key is to be generated. 
  56252.  
  56253.           keytype       A pointer to a value of type sec_passwd_type_t. The 
  56254.                         value identifies the data encryption algorithm to be 
  56255.                         used for the key (for example, DES). 
  56256.  
  56257.                         Note:  In this release, only the sec_passwd_des key 
  56258.                                type is supported. 
  56259.  
  56260.           key_vno       The version number of the new key. 
  56261.  
  56262.           Output 
  56263.  
  56264.           keydata       A pointer to a value of sec_passwd_rec_t. The storage 
  56265.                         for keydata is allocated dynamically, so the returned 
  56266.                         pointer actually indicates a pointer to the key value. 
  56267.                         The storage for this data can be freed with the 
  56268.                         sec_key_mgmt_free_key routine. 
  56269.  
  56270.           status        A pointer to the completion status.  On successful 
  56271.                         completion, the routine returns error_status_ok. 
  56272.                         Otherwise, it returns one of the following errors: 
  56273.  
  56274.                              sec_key_mgmt_e_not_implemented The specified key 
  56275.                                                       type is not supported. 
  56276.  
  56277.                              sec_s_no_key_seed        No random key seed has 
  56278.                                                       been set. 
  56279.  
  56280.                              sec_s_no_memory          Unable to allocate 
  56281.                                                       memory. 
  56282.  
  56283.  Usage 
  56284.  
  56285.           The sec_key_mgmt_gen_rand_key routine generates a new random key for 
  56286.           a specified principal and of a specified key type. The generated key 
  56287.           can be used with the sec_key_mgmt_change_key and sec_key_mgmt_set_key 
  56288.           routines. Note that to initialize the random keyseed, the process 
  56289.           must first make an authenticated call such as sec_rgy_site_open. 
  56290.  
  56291.  Related Information 
  56292.  
  56293.           Routines: rpc_server_register_auth_info 
  56294.           sec_key_mgmt_change_key 
  56295.           sec_key_mgmt_free_key 
  56296.           sec_key_mgmt_set_key This routine deleted per OSF OT #13151 
  56297.  
  56298.  
  56299. ΓòÉΓòÉΓòÉ 8.6.9. sec_key_mgmt_get_key ΓòÉΓòÉΓòÉ
  56300.  
  56301.  Purpose 
  56302.  
  56303.           Retrieves a key from local storage. 
  56304.  
  56305.  Library 
  56306.  
  56307.           \lib\dceos2.lib 
  56308.  
  56309.  Format 
  56310.  
  56311.                     #include <dce/keymgmt.h>
  56312.  
  56313.                     void sec_key_mgmt_get_key(
  56314.                             sec_key_mgmt_authn_service  authn_service,
  56315.                             void  *arg,
  56316.                             unsigned_char  *principal_name,
  56317.                             unsigned32  key_vno,
  56318.                             void  **keydata,
  56319.                             error_status_t  *status);
  56320.  
  56321.  Parameters 
  56322.  
  56323.           Input 
  56324.  
  56325.           authn_service Identifies the authentication protocol using this key. 
  56326.                         The possible authentication protocols are as follows: 
  56327.  
  56328.                              rpc_c_authn_dce_secret DCE shared-secret key 
  56329.                                                   authentication 
  56330.  
  56331.                              rpc_c_authn_dce_public DCE public key 
  56332.                                                   authentication (reserved for 
  56333.                                                   future use). 
  56334.  
  56335.           arg           This parameter can specify either the local key file or 
  56336.                         an argument to the get_key_fn key acquisition routine 
  56337.                         of the rpc_server_register_auth_info routine. 
  56338.  
  56339.                         A value of NULL specifies that the default key file 
  56340.                         v5srvtab should be used. A key file name specifies that 
  56341.                         file should be used as the key file. The file must have 
  56342.                         been created with the rgy_edit ktadd command or the 
  56343.                         sec_key_mgmt_set_key routine. 
  56344.  
  56345.                         Any other value specifies an argument for the 
  56346.                         get_key_fn key acquisition routine.  See 
  56347.                         rpc_server_register_auth_info for more information. 
  56348.  
  56349.           principal_name A pointer to a character string indicating the name of 
  56350.                         the principal to whom the key belongs. 
  56351.  
  56352.           key_vno       The version number of the desired key. To return the 
  56353.                         latest version of the key, set this parameter to 
  56354.                         sec_c_key_version_none. 
  56355.  
  56356.           Output 
  56357.  
  56358.           keydata       A pointer to a value of type sec_passwd_rec_t. The 
  56359.                         storage for keydata is allocated dynamically, so the 
  56360.                         returned pointer actually indicates a pointer to the 
  56361.                         key value. The storage for this data can be freed with 
  56362.                         the sec_key_mgmt_free_key routine. 
  56363.  
  56364.           status        A pointer to the completion status. On successful 
  56365.                         completion, the routine returns error_status_ok. 
  56366.                         Otherwise, it returns one of the following errors: 
  56367.  
  56368.                              sec_key_mgmt_e_key_unavailable The requested key 
  56369.                                                       is not present. 
  56370.  
  56371.                              sec_key_mgmt_e_authn_invalid The authentication 
  56372.                                                       protocol is not valid. 
  56373.  
  56374.                              sec_key_mgmt_e_unauthorized The caller is not 
  56375.                                                       authorized to perform the 
  56376.                                                       operation. 
  56377.  
  56378.                              sec_s_no_memory          Unable to allocate 
  56379.                                                       memory. 
  56380.  
  56381.  Usage 
  56382.  
  56383.           The sec_key_mgmt_get_key routine extracts the specified key from the 
  56384.           local key storage. 
  56385.  
  56386.  
  56387. ΓòÉΓòÉΓòÉ 8.6.10. sec_key_mgmt_get_next_key ΓòÉΓòÉΓòÉ
  56388.  
  56389.  Purpose 
  56390.  
  56391.           Retrieves successive keys from the local key storage. 
  56392.  
  56393.  Library 
  56394.  
  56395.           \lib\dceos2.lib 
  56396.  
  56397.  Format 
  56398.  
  56399.                     #include <dce/keymgmt.h>
  56400.  
  56401.                     void sec_key_mgmt_get_next_key(
  56402.                             void  *cursor,
  56403.                             unsigned_char  **principal_name,
  56404.                             unsigned32  *key_vno,
  56405.                             void  **keydata,
  56406.                             error_status_t  *status);
  56407.  
  56408.  Parameters 
  56409.  
  56410.           Input/Output 
  56411.  
  56412.           cursor        A pointer to the current cursor position in the local 
  56413.                         key storage. The cursor position is set by means of 
  56414.                         sec_key_mgmt_initialize_cursor. 
  56415.  
  56416.           Output 
  56417.  
  56418.           principal_name A pointer to a character string indicating the name of 
  56419.                         the principal associated with the extracted key. Free 
  56420.                         the storage for the principal name with the free 
  56421.                         routine. 
  56422.  
  56423.           key_vno       The version number of the extracted key. 
  56424.  
  56425.           keydata       A pointer to a value of type sec_passwd_rec_t. The 
  56426.                         storage for keydata is allocated dynamically, so the 
  56427.                         returned pointer actually indicates a pointer to the 
  56428.                         key value. The storage for this data can be freed with 
  56429.                         the sec_key_mgmt_free_key routine. 
  56430.  
  56431.           status        A pointer to the completion status.  On successful 
  56432.                         completion, the routine returns error_status_ok. 
  56433.                         Otherwise, it returns one of the following errors: 
  56434.  
  56435.                              sec_key_mgmt_e_key _unavailable The requested key 
  56436.                                                          is not present. 
  56437.  
  56438.                              sec_key_mgmt_e_unauthorized The caller is not 
  56439.                                                          authorized to perform 
  56440.                                                          the operation. 
  56441.  
  56442.                              sec_s_no_memory             Unable to allocate 
  56443.                                                          memory. 
  56444.  
  56445.  Usage 
  56446.  
  56447.           The sec_key_mgmt_get_next_key routine extracts the key pointed to by 
  56448.           the cursor in the local key storage and updates the cursor to point 
  56449.           to the next key. By repeatedly calling this routine, you can scan all 
  56450.           the keys in the local key storage. 
  56451.  
  56452.  Related Information 
  56453.  
  56454.           Routines: 
  56455.           sec_key_mgmt_free_key 
  56456.           sec_key_mgmt_get_key 
  56457.           sec_key_mgmt_initialize_cursor 
  56458.  
  56459.  
  56460. ΓòÉΓòÉΓòÉ 8.6.11. sec_key_mgmt_get_next_kvno ΓòÉΓòÉΓòÉ
  56461.  
  56462.  Purpose 
  56463.  
  56464.           Retrieves the next eligible key version number for a key. 
  56465.  
  56466.  Format 
  56467.  
  56468.                     #include <dce/keymgmt.h>
  56469.  
  56470.                     void sec_key_mgmt_get_next_kvno(
  56471.                             sec_key_mgmt_authn_service  authn_service,
  56472.                             void  *arg,
  56473.                             unsigned_char  *principal_name,
  56474.                             void  *keytype,
  56475.                             unsigned32  *key_vno,
  56476.                             unsigned32  *next_key_vno,
  56477.                             error_status_t  *status);
  56478.  
  56479.  Parameters 
  56480.  
  56481.           Input 
  56482.  
  56483.           authn_service Identifies the authentication protocol using this key. 
  56484.                         The possible authentication protocols are as follows: 
  56485.  
  56486.                              rpc_c_authn_dce_secret DCE shared-secret key 
  56487.                                                    authentication 
  56488.  
  56489.                              rpc_c_authn_dce_public DCE public key 
  56490.                                                    authentication (reserved for 
  56491.                                                    future use). 
  56492.  
  56493.           arg           This parameter can specify either the local key file or 
  56494.                         an argument to the get_key_fn key acquisition routine 
  56495.                         of the rpc_server_register_auth_info routine. 
  56496.  
  56497.                         A value of NULL specifies that the default key file 
  56498.                         v5srvtab should be used. A key file name specifies that 
  56499.                         file should be used as the key file. You must prepend 
  56500.                         the file's absolute file name with WRFILE: and the file 
  56501.                         must have been created with the rgy_edit ktadd command 
  56502.                         or the  sec_key_mgmt_set_key routine. 
  56503.  
  56504.                         Any other value specifies an argument for the 
  56505.                         get_key_fn key acquisition routine.  See 
  56506.                         rpc_server_register_auth_info for more information. 
  56507.  
  56508.           principal_name A pointer to a character string indicating the name of 
  56509.                         the principal associated with the key. 
  56510.  
  56511.           keytype       A pointer to a value of type sec_passwd_type_t.  The 
  56512.                         value identifies the data encryption algorithm (for 
  56513.                         example, DES) being used for the key. 
  56514.  
  56515.           Output 
  56516.  
  56517.           key_vno       The current version number of the key. Specify NULL if 
  56518.                         this value does not need to be returned. 
  56519.  
  56520.           next_key_vno  The next eligible version number for the key. Specify 
  56521.                         NULL if this value does not need to be returned. 
  56522.  
  56523.           status        A pointer to the completion status.  On successful 
  56524.                         completion, the routine returns error_status_ok. 
  56525.                         Otherwise, it returns one of the following errors: 
  56526.  
  56527.                              sec_key_mgmt_e_key_unavailable The requested key 
  56528.                                                      is not present. 
  56529.  
  56530.                              sec_key_mgmt_e_authn_invalid The authentication 
  56531.                                                      protocol is not valid. 
  56532.  
  56533.                              sec_key_mgmt_e_unauthorized The caller is not 
  56534.                                                      authorized to perform the 
  56535.                                                      operation. 
  56536.  
  56537.                              sec_rgy_server_unavailable The DCE Registry Server 
  56538.                                                      is unavailable. 
  56539.  
  56540.                              sec_rgy_object_not_found No principal was found 
  56541.                                                      with the given name. 
  56542.  
  56543.  Usage 
  56544.  
  56545.           The sec_key_mgmt_get_next_kvno routine returns the current and next 
  56546.           eligible version numbers for a key from the registry server (not from 
  56547.           the local key table).  The key is identified by its associated 
  56548.           authentication protocol, principal name, and key type. The keyfile in 
  56549.           which the key is stored is also specified. 
  56550.  
  56551.  Related Information 
  56552.  
  56553.           Routines: 
  56554.           rpc_server_register_auth_info 
  56555.  
  56556.  
  56557. ΓòÉΓòÉΓòÉ 8.6.12. sec_key_mgmt_get_nth_key ΓòÉΓòÉΓòÉ
  56558.  
  56559.  Purpose 
  56560.  
  56561.           Extract the specified key from the local key store. 
  56562.  
  56563.  Format 
  56564.  
  56565.                     #include <dce/keymgmt.h>
  56566.  
  56567.                     void sec_key_mgmt_get_nth_key (
  56568.                             sec_key_mgmt_authn_service  authn_service,
  56569.                             void  *arg,
  56570.                             char  *principal_name,
  56571.                             signed32  index,
  56572.                             unsigned32  *key_vno,
  56573.                             void  **keydata,
  56574.                             error_status_t  *status);
  56575.  
  56576.  Parameters 
  56577.  
  56578.           Input 
  56579.  
  56580.           authn_service Identifies the authentication shema. 
  56581.  
  56582.           arg           This parameter can specify either the local key file or 
  56583.                         an argument to the get_key_fn key acquisition routine 
  56584.                         of the rpc_server_register_auth_info routine. 
  56585.  
  56586.           principal_name The name of the principal whose key is to be read. 
  56587.  
  56588.           index         The nth key to extract. Zero (0) indicates the first 
  56589.                         key available. 
  56590.  
  56591.           Output 
  56592.  
  56593.           key_vno       The key version extracted. 
  56594.  
  56595.           keydata       The key value extracted. This data may be released by 
  56596.                         calling the sec_key_mgmt_free_key routine. 
  56597.  
  56598.           status        A pointer to the completion status. On successful 
  56599.                         completion, the routine returns error_status_ok. 
  56600.                         Otherwise, it returns one of the following errors: 
  56601.  
  56602.                              sec_key_mgmt_e_key_unavailable The requested key 
  56603.                                                      is not present. 
  56604.  
  56605.                              sec_key_mgmt_e_authn_invalid The authentication 
  56606.                                                      protocol is not valid. 
  56607.  
  56608.                              sec_key_mgmt_e_unauthorized The caller is not 
  56609.                                                      authorized to perform the 
  56610.                                                      operation. 
  56611.  
  56612.                         Note:  Any error condition will leave the key state 
  56613.                                unchanged. 
  56614.  
  56615.  
  56616.  Usage 
  56617.  
  56618.           Extracts the specified key from the local key store. This operation 
  56619.           can be used to scan all keys belonging to the specified principal and 
  56620.           stored in the local key store. Use of this routine is not 
  56621.           recommended; use sec_key_mgmt_get_next_key along with the initialize 
  56622.           and release cursor functions above. This routine was deficient in 
  56623.           that it made the caller keep track of an index into the key storage, 
  56624.           and did not return a principal name associated with the key. 
  56625.  
  56626.  Related Information 
  56627.  
  56628.           Routines: rpc_server_register_auth_info 
  56629.  
  56630.           Files: 
  56631.           \usr\include\dce\keymgmt.idl - The idl file from which dce\keymgmt.h 
  56632.           was derived. 
  56633.  
  56634.  
  56635. ΓòÉΓòÉΓòÉ 8.6.13. sec_key_mgmt_initialize_cursor ΓòÉΓòÉΓòÉ
  56636.  
  56637.  Purpose 
  56638.  
  56639.           Repositions the cursor in the local key storage. 
  56640.  
  56641.  Library 
  56642.  
  56643.           \lib\dceos2.lib 
  56644.  
  56645.  Format 
  56646.  
  56647.                     #include <dce/keymgmt.h>
  56648.  
  56649.                     void sec_key_mgmt_initialize_cursor(
  56650.                             sec_key_mgmt_authn_service  authn_service,
  56651.                             void  *arg,
  56652.                             unsigned_char  *principal_name,
  56653.                             void  *keytype,
  56654.                             void  **cursor,
  56655.                             error_status_t  *status);
  56656.  
  56657.  Parameters 
  56658.  
  56659.           Input 
  56660.  
  56661.           authn_service Identifies the authentication protocol using this key. 
  56662.                         The possible authentication protocols are as follows: 
  56663.  
  56664.                              rpc_c_authn_dce_secret DCE shared-secret key 
  56665.                                                   authentication 
  56666.  
  56667.                              rpc_c_authn_dce_public DCE public key 
  56668.                                                   authentication (reserved for 
  56669.                                                   future use). 
  56670.  
  56671.           arg           This parameter can specify either the local key file or 
  56672.                         an argument to the get_key_fn key acquisition routine 
  56673.                         of the rpc_server_register_auth_info routine. 
  56674.  
  56675.                         A value of NULL specifies that the default key file 
  56676.                         v5srvtab should be used. A key file name specifies that 
  56677.                         file should be used as the key file. You must prepend 
  56678.                         the file's absolute file name with WRFILE: and the file 
  56679.                         must have been created with the rgy_edit ktadd command 
  56680.                         or the  sec_key_mgmt_set_key routine. 
  56681.  
  56682.                         Any other value specifies an argument for the 
  56683.                         get_key_fn key acquisition routine. See the 
  56684.                         rpc_server_register_auth_info for more information. 
  56685.  
  56686.           principal_name A pointer to a character string indicating the name of 
  56687.                         the principal whose key is to be accessed. To access 
  56688.                         all keys in the local key storage, supply NULL for this 
  56689.                         parameter. 
  56690.  
  56691.           keytype       A pointer to the data encryption algorithm (for 
  56692.                         example, DES) being used for the key. 
  56693.  
  56694.           Output 
  56695.  
  56696.           cursor        The returned cursor value. The storage for the cursor 
  56697.                         information is allocated dynamically, so the returned 
  56698.                         pointer actually indicates a pointer to the cursor 
  56699.                         value. The storage for this data can be freed with the 
  56700.                         sec_key_mgmt_release_cursor routine. 
  56701.  
  56702.           status        A pointer to the completion status.  On successful 
  56703.                         completion, the routine returns error_status_ok. 
  56704.                         Otherwise, it returns one of the following errors: 
  56705.  
  56706.                              sec_key_mgmt_e_authn_invalid The authentication 
  56707.                                                   protocol is not valid. 
  56708.  
  56709.                              sec_key_mgmt_e_unauthorized The caller is not 
  56710.                                                   authorized to perform the 
  56711.                                                   operation. 
  56712.  
  56713.                              sec_s_no_memory      Unable to allocate memory. 
  56714.  
  56715.  Usage 
  56716.  
  56717.           The sec_key_mgmt_initialize_cursor routine resets the cursor in the 
  56718.           local key storage. 
  56719.  
  56720.           Use this routine to reposition the cursor before performing a scan of 
  56721.           the local storage by means of sec_key_mgmt_get_next_key. The returned 
  56722.           cursor value is supplied as input to sec_key_mgmt_get_next_key. 
  56723.  
  56724.  Related Information 
  56725.  
  56726.           Routines: 
  56727.           rpc_server_register_auth_info 
  56728.           sec_key_mgmt_get_next_key 
  56729.           sec_key_mgmt_release_cursor 
  56730.  
  56731.  
  56732. ΓòÉΓòÉΓòÉ 8.6.14. sec_key_mgmt_manage_key ΓòÉΓòÉΓòÉ
  56733.  
  56734.  Purpose 
  56735.  
  56736.           Automatically changes a principal's key before it expires. 
  56737.  
  56738.  Library 
  56739.  
  56740.           \lib\dceos2.lib 
  56741.  
  56742.  Format 
  56743.  
  56744.                     #include <dce/keymgmt.h>
  56745.  
  56746.                     void sec_key_mgmt_manage_key(
  56747.                             sec_key_mgmt_authn_service  authn_service,
  56748.                             void  *arg,
  56749.                             unsigned_char  *principal_name,
  56750.                             error_status_t  *status);
  56751.  
  56752.  Parameters 
  56753.  
  56754.           Input 
  56755.  
  56756.           authn_service Identifies the authentication protocol using this key. 
  56757.                         The possible authentication protocols are as follows: 
  56758.  
  56759.                              rpc_c_authn_dce_secret DCE shared-secret key 
  56760.                                                    authentication 
  56761.  
  56762.                              rpc_c_authn_dce_public DCE public key 
  56763.                                                    authentication (reserved for 
  56764.                                                    future use). 
  56765.  
  56766.           arg           This parameter can specify either the local key file or 
  56767.                         an argument to the get_key_fn key acquisition routine 
  56768.                         of the rpc_server_register_auth_info routine. 
  56769.  
  56770.                         A value of NULL specifies that the default key file 
  56771.                         v5srvtab should be used. A key file name specifies that 
  56772.                         file should be used as the key file. You must prepend 
  56773.                         the file's absolute file name with WRFILE: and the file 
  56774.                         must have been created with the rgy_edit ktadd command 
  56775.                         or the  sec_key_mgmt_set_key routine. 
  56776.  
  56777.                         Any other value specifies an argument for the 
  56778.                         get_key_fn key acquisition routine.  See 
  56779.                         rpc_server_register_auth_info for more information. 
  56780.  
  56781.           principal_name A pointer to a character string indicating the name of 
  56782.                         the principal whose key is to be managed. 
  56783.  
  56784.           Output 
  56785.  
  56786.           status        A pointer to the completion status. On successful 
  56787.                         completion, the routine returns error_status_ok. 
  56788.                         Otherwise, it returns one of the following errors: 
  56789.  
  56790.                              sec_key_mgmt_e_key_unavailable The old key is not 
  56791.                                                      present and cannot be used 
  56792.                                                      to set a client side 
  56793.                                                      authentication context. 
  56794.  
  56795.                              sec_key_mgmt_e_authn_invalid The authentication 
  56796.                                                      protocol is not valid. 
  56797.  
  56798.                              sec_key_mgmt_e_unauthorized The caller is not 
  56799.                                                      authorized to perform the 
  56800.                                                      operation. 
  56801.  
  56802.                              sec_key_mgmt_e_key_unsupported The key type is not 
  56803.                                                      supported. 
  56804.  
  56805.                              sec_rgy_server_unavailable The DCE Registry Server 
  56806.                                                      is unavailable. 
  56807.  
  56808.                              sec_rgy_object_not_found No principal was found 
  56809.                                                      with the given name. 
  56810.  
  56811.  Usage 
  56812.  
  56813.           The sec_key_mgmt_manage_key routine changes the specified principal's 
  56814.           key on a regular basis, as determined by the local cell's policy.  It 
  56815.           runs indefinitely and never returns during normal operation.  It 
  56816.           should be called only from a thread that has been devoted to managing 
  56817.           keys. 
  56818.  
  56819.           This routine queries the DCE Registry to determine the password 
  56820.           expiration policy that applies to the named principal.  It then idles 
  56821.           until a short time before the current key is due to expire and uses 
  56822.           the sec_key_mgmt_gen_rand_key to produce a new random key. It updates 
  56823.           both the local key storage and the DCE Registry. This routine also 
  56824.           calls sec_key_mgmt_garbage_collect as needed. 
  56825.  
  56826.  Related Information 
  56827.  
  56828.           Routines: sec_key_mgmt_gen_rand_key 
  56829.           sec_key_mgmt_garbage_collect 
  56830.  
  56831.  
  56832. ΓòÉΓòÉΓòÉ 8.6.15. sec_key_mgmt_release_cursor ΓòÉΓòÉΓòÉ
  56833.  
  56834.  Purpose 
  56835.  
  56836.           Releases the memory used by an initialized cursor value. 
  56837.  
  56838.  Library 
  56839.  
  56840.           \lib\dceos2.lib 
  56841.  
  56842.  Format 
  56843.  
  56844.                     #include <dce/keymgmt.h>
  56845.  
  56846.                     void sec_key_mgmt_release_cursor(
  56847.                             void  **cursor,
  56848.                             error_status_t  *status);
  56849.  
  56850.  Parameters 
  56851.  
  56852.           Input 
  56853.  
  56854.           cursor        A pointer to the cursor value for which the storage is 
  56855.                         to be released. 
  56856.  
  56857.           Output 
  56858.  
  56859.           status        A pointer to the completion status.  On successful 
  56860.                         completion, the routine returns error_status_ok. 
  56861.                         Otherwise, it returns the following error: 
  56862.  
  56863.                              sec_key_mgmt_e_unauthorized The caller is not 
  56864.                                                         authorized to perform 
  56865.                                                         the operation. 
  56866.  
  56867.  Usage 
  56868.  
  56869.           The sec_key_mgmt_release_cursor routine releases any storage 
  56870.           allocated for the indicated cursor value by 
  56871.           sec_key_mgmt_initialize_cursor. The storage for the cursor value 
  56872.           returned by sec_key_mgmt_initialize_cursor is dynamically allocated. 
  56873.  
  56874.  Related Information 
  56875.  
  56876.           Routines: 
  56877.           sec_key_mgmt_initialize_cursor 
  56878.  
  56879.  
  56880. ΓòÉΓòÉΓòÉ 8.6.16. sec_key_mgmt_set_key ΓòÉΓòÉΓòÉ
  56881.  
  56882.  Purpose 
  56883.  
  56884.           Inserts a key value into the local storage. 
  56885.  
  56886.  Library 
  56887.  
  56888.           \lib\dceos2.lib 
  56889.  
  56890.  Format 
  56891.  
  56892.                     #include <dce/keymgmt.h>
  56893.  
  56894.                     void sec_key_mgmt_set_key(
  56895.                             sec_key_mgmt_authn_service  authn_service,
  56896.                             void  *arg,
  56897.                             unsigned_char  *principal_name,
  56898.                             unsigned32  key_vno,
  56899.                             void  *keydata,
  56900.                             error_status_t  *status);
  56901.  
  56902.  Parameters 
  56903.  
  56904.           Input 
  56905.  
  56906.           authn_service Identifies the authentication protocol using this key. 
  56907.                         The possible authentication protocols are as follows: 
  56908.  
  56909.                              rpc_c_authn_dce_secret DCE shared-secret key 
  56910.                                                    authentication 
  56911.  
  56912.                              rpc_c_authn_dce_public DCE public key 
  56913.                                                    authentication (reserved for 
  56914.                                                    future use). 
  56915.  
  56916.           arg           Specifies either the local key file or an argument to 
  56917.                         the get_key_fn key acquisition routine of  the 
  56918.                         rpc_server_register_auth_info routine. 
  56919.  
  56920.                         A value of NULL specifies that the default key file 
  56921.                         v5srvtab should be used. A key file name specifies that 
  56922.                         file should be used as the key file. The file name must 
  56923.                         begin with WRFILE:. If the file name does not begin 
  56924.                         with WRFILE:, the code adds it. 
  56925.  
  56926.                         Any other value specifies an argument for the 
  56927.                         get_key_fn key acquisition routine. See 
  56928.                         rpc_server_register_auth_info for more information. 
  56929.  
  56930.           principal_name A pointer to a character string indicating the name of 
  56931.                         the principal associated with the key to be set. 
  56932.  
  56933.           key_vno       The version number of the key to be set. 
  56934.  
  56935.           keydata       A pointer to the key value to be set. 
  56936.  
  56937.           Output 
  56938.  
  56939.           status        A pointer to the completion status.  On successful 
  56940.                         completion, the routine returns error_status_ok. 
  56941.                         Otherwise, it returns one of the following errors: 
  56942.  
  56943.                              sec_key_mgmt_e_key_unavailable The old key is not 
  56944.                                                         present and cannot be 
  56945.                                                         used to set a client 
  56946.                                                         side authentication 
  56947.                                                         context. 
  56948.  
  56949.                              sec_key_mgmt_e_authn_invalid The authentication 
  56950.                                                         protocol is not valid. 
  56951.  
  56952.                              sec_key_mgmt_e_unauthorized The caller is not 
  56953.                                                         authorized to perform 
  56954.                                                         the operation. 
  56955.  
  56956.                              sec_key_mgmt_e_key_unsupported The key type is not 
  56957.                                                         supported. 
  56958.  
  56959.                              sec_key_mgmt_e_key_version_ex A key with this 
  56960.                                                         version number already 
  56961.                                                         exists. 
  56962.  
  56963.  Usage 
  56964.  
  56965.           The sec_key_mgmt_set_key routine performs all local activities 
  56966.           necessary to update a principal's key to the specified value.  This 
  56967.           routine will not update the authentication protocol's value for the 
  56968.           principal's key. 
  56969.  
  56970.  Related Information 
  56971.  
  56972.           Routines: rpc_server_register_auth_info 
  56973.           sec_key_mgmt_change_key 
  56974.           sec_key_mgmt_gen_rand_key 
  56975.  
  56976.  
  56977. ΓòÉΓòÉΓòÉ 8.7. DCE Login API ΓòÉΓòÉΓòÉ
  56978.  
  56979. The Login API communicates with the Security Server to establish, and possibly 
  56980. change, a principal's login context. A login context contains the information 
  56981. necessary for a principal to qualify for (although not necessarily be granted) 
  56982. access to network services. 
  56983.  
  56984. This section contains information on the data types, constants, and sec_login 
  56985. routines that comprise the login part of the Security Service. 
  56986.  
  56987.       Login Data Types 
  56988.       Login Constants 
  56989.       Login Routines 
  56990.  
  56991.  
  56992. ΓòÉΓòÉΓòÉ 8.7.1. Login Data Types ΓòÉΓòÉΓòÉ
  56993.  
  56994. The following data types are used in sec_login routines: 
  56995.  
  56996.  sec_login_handle_t This is an opaque pointer to a data structure representing 
  56997.               a complete login context. The context includes a principal's 
  56998.               network credentials, as well as other account information. The 
  56999.               network credentials are also referred to as the principal's 
  57000.               ticket-granting ticket. 
  57001.  
  57002.  sec_login_flags_t A 32-bit set of flags describing restrictions on the use of 
  57003.               a principal's validated network credentials.  Currently, only one 
  57004.               flag is implemented, and the set can take on the following two 
  57005.               values: 
  57006.  
  57007.                    sec_login_no_flags No special flags are set. 
  57008.  
  57009.                    sec_login_credentials_private Restricts the validated 
  57010.                                 network credentials to the current process. If 
  57011.                                 this flag is not set, it is permissible to 
  57012.                                 share credentials with descendents of the 
  57013.                                 current process. 
  57014.  
  57015.  sec_login_auth_src_t An enumerated set describing how the login context was 
  57016.               authorized. The possible values are: 
  57017.  
  57018.                    sec_login_auth_src_network Authentication is accomplished 
  57019.                                 through the normal network authority. A login 
  57020.                                 context authenticated this way has all the 
  57021.                                 network credentials it should have. 
  57022.  
  57023.                    sec_login_auth_src_local Authentication is accomplished 
  57024.                                 using local data. Authentication occurs locally 
  57025.                                 if a principal's account is tailored for the 
  57026.                                 local machine, or if the network authority is 
  57027.                                 unavailable.  Because login contexts 
  57028.                                 authenticated locally have no network 
  57029.                                 credentials, they cannot be used for network 
  57030.                                 operations. 
  57031.  
  57032.                    sec_login_auth_src_overridden Authentication is accomplished 
  57033.                                 using the override facility. 
  57034.  
  57035.  sec_login_passwd_t The sec_login_get_pwent routine returns a pointer to a 
  57036.               password structure that depends on the underlying registry 
  57037.               structure.  In most cases, the structure is similar to the one 
  57038.               supported by Berkeley 4.4 and OSF/1: 
  57039.  
  57040.                             struct passwd {
  57041.                                 char    *pw_name;           /* user name */
  57042.                                 char    *pw_passwd;         /* encrypted password */
  57043.                                 int     pw_uid;             /* user uid */
  57044.                                 int     pw_gid;             /* user gid */
  57045.                                 time_t  pw_change;          /* password change time */
  57046.                                 char    *pw_class;          /* user access class */
  57047.                                 char    *pw_gecos;          /* Honeywell login info */
  57048.                                 char    *pw_dir;            /* home directory */
  57049.                                 char    *pw_shell;          /* default shell */
  57050.                                 time_t  pw_expire;          /* account expiration */
  57051.                             };
  57052.  
  57053.  sec_passwd_rec_t A structure containing either a plain text password or a 
  57054.               pre-encrypted buffer of password data. The sec_passwd_rec_t 
  57055.               structure consists of three components: 
  57056.  
  57057.                    version_number      The version number of the password. 
  57058.  
  57059.                    pepper              A character string combined with the 
  57060.                                        password before an encryption key is 
  57061.                                        derived from the password. 
  57062.  
  57063.                    key                 A structure consisting of the following 
  57064.                                        components: 
  57065.  
  57066.                                             key_type  The key type can be the 
  57067.                                                       following: 
  57068.  
  57069.                                                            sec_passwd_plain 
  57070.                                                                      Indicates 
  57071.                                                                      that a 
  57072.                                                                      printable 
  57073.                                                                      string of 
  57074.                                                                      data is 
  57075.                                                                      stored in 
  57076.                                                                      plain. 
  57077.  
  57078.                                                            sec_passwd_des 
  57079.                                                                      Indicates 
  57080.                                                                      that an 
  57081.                                                                      array of 
  57082.                                                                      data is 
  57083.                                                                      stored in 
  57084.                                                                      des_key. 
  57085.  
  57086.                                             tagged_union A structure specifying 
  57087.                                                       the password.  The value 
  57088.                                                       of the structure depends 
  57089.                                                       on key_type. If key_type 
  57090.                                                       is sec_passwd_plain, the 
  57091.                                                       structure contains plain, 
  57092.                                                       a character string.  If 
  57093.                                                       key_type is 
  57094.                                                       sec_passwd_des, the 
  57095.                                                       structure contains 
  57096.                                                       des_key, a DES key of 
  57097.                                                       type 
  57098.                                                       sec_passwd_des_key_t. 
  57099.  
  57100.  
  57101. ΓòÉΓòÉΓòÉ 8.7.2. Login Constants ΓòÉΓòÉΓòÉ
  57102.  
  57103. The following constants are used in sec_login routines: 
  57104.  
  57105.  sec_login_default_handle      The value of a login context handle before setup 
  57106.                                or validation. 
  57107.  
  57108.  sec_login_remote_uid          Used in the sec_login_passwd_t structure for 
  57109.                                users from remote cells. 
  57110.  
  57111.  sec_login_remote_gid          Used in the sec_login_passwd_t structure for 
  57112.                                groups from remote cells. 
  57113.  
  57114.  The next two constants are for use with the sec_login_flags_t type: 
  57115.  
  57116.  sec_login_no_flags            No special flags are set. 
  57117.  
  57118.  sec_login_credentials_private Restrict the validated network credentials to 
  57119.                                the current process. If this flag is not set, it 
  57120.                                is permissible to share credentials with 
  57121.                                descendents of current process. 
  57122.  
  57123.  
  57124. ΓòÉΓòÉΓòÉ 8.7.3. Login Routines ΓòÉΓòÉΓòÉ
  57125.  
  57126.       sec_login_become_delegate 
  57127.       sec_login_become_impersonator 
  57128.       sec_login_become_initiator 
  57129.       sec_login_certify_identity 
  57130.       sec_login_cred_get_delegate 
  57131.       sec_login_cred_get_initiator 
  57132.       sec_login_cred_init_cursor 
  57133.       sec_login_disable_delegation 
  57134.       sec_login_export_context 
  57135.       sec_login_free_net_info 
  57136.       sec_login_get_current_context 
  57137.       sec_login_get_expiration 
  57138.       sec_login_get_pwent 
  57139.       sec_login_import_context 
  57140.       sec_login_init_first 
  57141.       sec_login_inq_pag 
  57142.       sec_login_inquire_net_info 
  57143.       sec_login_newgroups 
  57144.       sec_login_purge_context 
  57145.       sec_login_purge_context_exp 
  57146.       sec_login_refresh_identity 
  57147.       sec_login_release_context 
  57148.       sec_login_set_context 
  57149.       sec_login_set_extended_attrs 
  57150.       sec_login_setup_first 
  57151.       sec_login_setup_identity 
  57152.       sec_login_tkt_request_options 
  57153.       sec_login_valid_and_cert_ident 
  57154.       sec_login_valid_from_keytable 
  57155.       sec_login_validate_cert_auth 
  57156.       sec_login_validate_first 
  57157.       sec_login_validate_identity 
  57158.  
  57159.  
  57160. ΓòÉΓòÉΓòÉ 8.7.4. sec_login_become_delegate ΓòÉΓòÉΓòÉ
  57161.  
  57162.  Purpose 
  57163.  
  57164.           Causes an intermediate server to become a delegate in a traced 
  57165.           delegation chain. 
  57166.  
  57167.  Format 
  57168.  
  57169.                     #include <dce/sec_login.h>
  57170.  
  57171.                     sec_login_handle_t  sec_login_become_delegate(
  57172.                              rpc_authz_cred_handle_t  callers_identity,
  57173.                              sec_login_handle_t  my_login_context,
  57174.                              sec_id_delegation_type_t  delegation_type_permitted,
  57175.                              sec_id_restriction_set_t  *delegate_restrictions,
  57176.                              sec_id_restriction_set_t  *target_restrictions,
  57177.                              sec_id_opt_req_t  *optional_restrictions,
  57178.                              sec_id_opt_req_t  *required_restrictions,
  57179.                              sec_id_compatibility_mode_t  compatibility_mode,
  57180.                              error_status_t  *status);
  57181.  
  57182.  Parameters 
  57183.  
  57184.           Input 
  57185.  
  57186.           callers_identity A handle of type rpc_authz_cred_handle_t to the 
  57187.                         authenticated identity of the previous delegate in the 
  57188.                         delegation chain. The handle is supplied by the 
  57189.                         rpc_binding_inq_auth_caller routine. 
  57190.  
  57191.           my_login_context A value of sec_login_handle_t that provides an 
  57192.                         opaque handle to the identity of the client that is 
  57193.                         becoming the intermediate delegate. The 
  57194.                         sec_login_handle_t that specifies the client's identity 
  57195.                         is supplied as output of the following routines: 
  57196.  
  57197.                           o  sec_login_get_current_context if the client 
  57198.                              inherited the identity of the current context 
  57199.  
  57200.                           o  The sec_login_setup_identity and 
  57201.                              sec_login_validate_identity pair that together 
  57202.                              establish an authenticated identity if a new 
  57203.                              identity was established Note that this identity 
  57204.                         specified by sec_login_handle_t must be a simple login 
  57205.                         context; it cannot be a compound identity created by a 
  57206.                         previous call to sec_login_become_delegate. 
  57207.  
  57208.           delegation_type_permitted A value of sec_id_delegation_type_t that 
  57209.                         specifies the type of delegation to be enabled. The 
  57210.                         types available are: 
  57211.  
  57212.                              sec_id_deleg_type_none                       No 
  57213.                                                                           delegation 
  57214.                              sec_id_deleg_type_traced                     Traced 
  57215.                                                                           delegation 
  57216.                              sec_id_deleg_type_impersonation              Simple 
  57217.                                                                           (impersonation) 
  57218.                                                                           delegation 
  57219.  
  57220.                         Note that the initiating client sets the type of 
  57221.                         delegation. If it is set as traced, all delegates must 
  57222.                         also specify traced delegation; they cannot specify 
  57223.                         simple delegation. The same is true if the initiating 
  57224.                         client sets the delegation type as simple; all 
  57225.                         subsequent delegates must also specify simple 
  57226.                         delegation. The intermediate delegates can, however, 
  57227.                         specify no delegation to indicate that the delegation 
  57228.                         chain can proceed no further. 
  57229.  
  57230.           delegate_restrictions A pointer to a sec_id_restriction_set_t that 
  57231.                         supplies a list of servers that can act as delegates 
  57232.                         for the intermediate client identified by 
  57233.                         my_login_context. These servers are added to delegates 
  57234.                         permitted by the delegate_restrictions parameter of the 
  57235.                         sec_login_become_initiator routine. 
  57236.  
  57237.           target_restrictions A pointer to a sec_id_restriction_set_t that 
  57238.                         supplies a list of servers that can act as targets for 
  57239.                         the intermediate client identified by my_login_context. 
  57240.                         These servers are added to targets specified by the 
  57241.                         target_restrictions parameter of the 
  57242.                         sec_login_become_initiator routine. 
  57243.  
  57244.           optional_restrictions A pointer to a sec_id_opt_req_t that supplies a 
  57245.                         list of application-defined optional restrictions that 
  57246.                         apply to the intermediate client identified by 
  57247.                         my_login_context. These restrictions are added to the 
  57248.                         restrictions identified by the optional_restrictions 
  57249.                         parameter of the sec_login_become_initiator routine. 
  57250.  
  57251.           required_restrictions A pointer to a sec_id_opt_req_t that supplies a 
  57252.                         list of application-defined required restrictions that 
  57253.                         apply to the intermediate client identified by 
  57254.                         my_login_context. These restrictions are added to the 
  57255.                         restrictions identified by the required_restrictions 
  57256.                         parameter of the sec_login_become_initiator routine. 
  57257.  
  57258.           compatibility_mode A value of sec_id_compatibility_mode_t that 
  57259.                         specifies the compatibility mode to be used when the 
  57260.                         intermediate client operates on pre-1.1 servers. The 
  57261.                         modes available are: 
  57262.  
  57263.                              sec_id_compat_mode_none Compatibility mode is off. 
  57264.  
  57265.                              sec_id_compat_mode_initiator Compatibility mode is 
  57266.                                            on. The pre-1.1 PAC data is 
  57267.                                            extracted from the EPAC of the 
  57268.                                            initiating client. 
  57269.  
  57270.                              sec_id_compat_mode_caller Compatibility mode is 
  57271.                                            on. The pre-1.1 PAC data extracted 
  57272.                                            from the EPAC of the last client in 
  57273.                                            the delegation chain. 
  57274.  
  57275.           Output 
  57276.  
  57277.           status        A pointer to the completion status. On successful 
  57278.                         completion, status is assigned error_status_ok. 
  57279.                         Otherwise, it returns one of the following errors: 
  57280.  
  57281.                              sec_login_s_context_invalid 
  57282.                              sec_login_s_compound_delegate 
  57283.                              sec_login_s_invalid_deleg_type 
  57284.                              err_sec_login_invalid_delegate_restriction 
  57285.                              err_sec_login_invalid_target_restriction 
  57286.                              err_sec_login_invalid_opt_restriction 
  57287.                              err_sec_login_invalid_req_restriction 
  57288.                              sec_login_s_invalid_compat_mode 
  57289.                              sec_login_s_deleg_not_enabled 
  57290.  
  57291.  Usage 
  57292.  
  57293.           The sec_login_become_delegate routine is used by intermediate servers 
  57294.           to become a delegate for the client identified by callers_identity. 
  57295.           The routine returns a new login context (of type sec_login_handle_t) 
  57296.           that carries delegation information. This information includes the 
  57297.           delegation type, delegate and target restrictions, and any 
  57298.           application-defined optional and required restrictions. 
  57299.  
  57300.           The new login context created by this routine can then be used to set 
  57301.           up an authenticated RPC with an intermediate or target server using 
  57302.           the rpc_binding_set_auth_info routine. 
  57303.  
  57304.           Any delegate, target, required, or optional restrictions specified in 
  57305.           this routine are added to the restrictions specified by the 
  57306.           initiating client and any intermediate clients. 
  57307.  
  57308.           The sec_login_become_delegate routine is run only if the initiating 
  57309.           client enabled traced delegation by setting the 
  57310.           delegation_type_permitted parameter in the sec_login_become_initiator 
  57311.           routine to sec_id_deleg_type_traced. 
  57312.  
  57313.  Notes 
  57314.  
  57315.           The DCE runtime library caches data structures from rpc activity and 
  57316.           authentication activity, in order to improve performance on repeated 
  57317.           RPC calls to the same server.  This information is generally kept for 
  57318.           up to 10 minutes after the last call before it is freed.  Under 
  57319.           certain circumstances, this caching can result in increased memory 
  57320.           usage. 
  57321.  
  57322.           If a client does repeated calls to the sec_login_become_delegate 
  57323.           routine with different delegations each time, new data structures are 
  57324.           created and cached for each new delegation. Clients or intermediate 
  57325.           servers that make many repeated calls like this will show memory 
  57326.           growth proportional to the number of new delegations created in a 10 
  57327.           minute interval.  This memory is eventually reused for new 
  57328.           delegations, but the steady state process size can be large in very 
  57329.           active scenarios. 
  57330.  
  57331.  Related Information 
  57332.  
  57333.           Routines: 
  57334.           sec_login_become_initiator 
  57335.           sec_login_become_impersonator 
  57336.           rpc_binding_inq_auth_caller 
  57337.           rpc_binding_set_auth_info 
  57338.           sec_login_get_current_context 
  57339.           sec_login_setup_identity 
  57340.           sec_login_validate_identity 
  57341.  
  57342.           Files: 
  57343.           /usr/include/dce/sec_login.idl - The idl file from which 
  57344.           dce/sec_login.h was derived. 
  57345.  
  57346.  
  57347. ΓòÉΓòÉΓòÉ 8.7.5. sec_login_become_impersonator ΓòÉΓòÉΓòÉ
  57348.  
  57349.  Purpose 
  57350.  
  57351.           Causes an intermediate server to become a delegate in a simple 
  57352.           delegation chain. 
  57353.  
  57354.  Format 
  57355.  
  57356.                     #include <dce/sec_login.h>
  57357.  
  57358.                     sec_login_handle_t sec_login_become_impersonator(
  57359.                               rpc_authz_cred_handle_t  callers_identity,
  57360.                               sec_login_handle_t my_login_context,
  57361.                               sec_id_delegation_type_t  delegation_type_permitted,
  57362.                               sec_id_restriction_set_t  *delegate_restrictions,
  57363.                               sec_id_restriction_set_t  *target_restrictions,
  57364.                               sec_id_opt_req_t  *optional_restrictions,
  57365.                               sec_id_opt_req_t  *required_restrictions,
  57366.                               error_status_t  *status);
  57367.  
  57368.  Parameters 
  57369.  
  57370.           Input 
  57371.  
  57372.           callers_identity A handle of type rpc_authz_cred_handle_t to the 
  57373.                         authenticated identity of the previous delegate in the 
  57374.                         delegation chain. The handle is supplied by the 
  57375.                         rpc_binding_inq_auth_caller routine. 
  57376.  
  57377.           delegation_type_permitted A value of sec_id_delegation_type_t type 
  57378.                         that specifies the type of delegation to be enabled. 
  57379.                         The types available are: 
  57380.  
  57381.                              sec_id_deleg_type_none             No delegation 
  57382.                              sec_id_deleg_type_traced           Traced 
  57383.                                                                 delegation 
  57384.                              sec_id_deleg_type_impersonation    Simple 
  57385.                                                                 (impersonation) 
  57386.                                                                 delegation The 
  57387.                         initiating client sets the type of delegation. If it is 
  57388.                         set as traced, all delegates must also specify traced 
  57389.                         delegation; they cannot specify simple delegation. The 
  57390.                         same is true if the initiating client sets the 
  57391.                         delegation type as simple; all subsequent delegates 
  57392.                         must also specify simple delegation. The intermediate 
  57393.                         delegates can, however, specify no delegation to 
  57394.                         indicate that the delegation chain can proceed no 
  57395.                         further. 
  57396.  
  57397.           delegate_restrictions A pointer to a sec_id_restriction_set_t that 
  57398.                         supplies a list of servers that can act as delegates 
  57399.                         for the client becoming the delegate. These servers are 
  57400.                         added to the delegates permitted by the 
  57401.                         delegate_restrictions parameter of the 
  57402.                         sec_login_become_initiator routine 
  57403.  
  57404.           target_restrictions A pointer to a sec_id_restriction_set_t that 
  57405.                         supplies a list of servers that can act as targets for 
  57406.                         the client becoming the delegate. These servers are 
  57407.                         added to targets specified by the target_restrictions 
  57408.                         parameter of the sec_login_become_initiator routine. 
  57409.  
  57410.           optional_restrictions A pointer to a sec_id_opt_req_t that supplies a 
  57411.                         list of application-defined optional restrictions that 
  57412.                         apply to the client becoming the delegate. These 
  57413.                         restrictions are added to the restrictions identified 
  57414.                         by the optional_restrictions parameter of the 
  57415.                         sec_login_become_initiator routine. 
  57416.  
  57417.           required_restrictions A pointer to a sec_id_opt_req_t that supplies a 
  57418.                         list of application-defined required restrictions that 
  57419.                         apply to the client becoming the delegate. These 
  57420.                         restrictions are added to the restrictions identified 
  57421.                         by the required_restrictions parameter of the 
  57422.                         sec_login_become_initiator routine. 
  57423.  
  57424.           Output 
  57425.  
  57426.           status        A pointer to the completion status. On successful 
  57427.                         completion, status is assigned error_status_ok. 
  57428.                         Otherwise, it returns one of the following errors: 
  57429.  
  57430.                              sec_login_s_invalid_deleg_type 
  57431.                              err_sec_login_invalid_delegate_restriction 
  57432.                              err_sec_login_invalid_target_restriction 
  57433.                              err_sec_login_invalid_opt_restriction 
  57434.                              err_sec_login_invalid_req_restriction 
  57435.                              sec_login_s_invalid_compat_mode 
  57436.                              sec_login_s_deleg_not_enabled 
  57437.  
  57438.  Usage 
  57439.  
  57440.           The sec_login_become_impersonator routine is used by intermediate 
  57441.           servers to become a delegate for the client identified by 
  57442.           callers_identity. The routine returns a new login context (of type 
  57443.           sec_login_handle_t) that carries delegation information. This 
  57444.           information includes the delegation type, delegate, and target 
  57445.           restrictions, and any application-defined optional and required 
  57446.           restrictions. 
  57447.  
  57448.           The new login context created by this routine can then be used to set 
  57449.           up an authenticated RPC with an intermediate or target server using 
  57450.           the rpc_binding_set_auth_info routine. 
  57451.  
  57452.           The effective optional and required restrictions are the union of the 
  57453.           optional and required restrictions specified in this routine and 
  57454.           specified by the initiating client and any intermediate clients. The 
  57455.           effective target and delegate restrictions are the intersection of 
  57456.           the target and delegate restrictions specified in this routine and 
  57457.           specified by the initiating client and any intermediate clients. 
  57458.  
  57459.           The sec_login_become_impersonator routine is run only if the 
  57460.           initiating client enabled simple delegation by setting the 
  57461.           delegation_type_permitted parameter in the sec_login_become_initiator 
  57462.           routine to sec_id_deleg_type_simple. 
  57463.  
  57464.  Related Information 
  57465.  
  57466.           Routines: 
  57467.           sec_login_become_initiator 
  57468.           rpc_binding_inq_auth_caller 
  57469.  
  57470.           Files: 
  57471.           /usr/include/dce/sec_login.idl - The idl file from which 
  57472.           dce/sec_login.h was derived. 
  57473.  
  57474.  
  57475. ΓòÉΓòÉΓòÉ 8.7.6. sec_login_become_initiator ΓòÉΓòÉΓòÉ
  57476.  
  57477.  Purpose 
  57478.  
  57479.           Constructs a new login context that enables delegation for the 
  57480.           calling client. 
  57481.  
  57482.  Format 
  57483.  
  57484.                     #include <dce/sec_login.h>
  57485.  
  57486.                     sec_login_handle_t sec_login_become_initiator(
  57487.                             sec_login_handle_t  my_login_context,
  57488.                             sec_id_delegation_type_t  delegation_type_permitted,
  57489.                             sec_id_restriction_set_t  *delegate_restrictions,
  57490.                             sec_id_restriction_set_t  *target_restrictions,
  57491.                             sec_id_opt_req_t  *optional_restrictions,
  57492.                             sec_id_opt_req_t  *required_restrictions,
  57493.                             sec_id_compatibility_mode_t  compatibility_mode,
  57494.                             error_status_t  *status);
  57495.  
  57496.  Parameters 
  57497.  
  57498.           Input 
  57499.  
  57500.           my_login_context A value of sec_login_handle_t that provides an 
  57501.                         opaque handle to the identity of the client that is 
  57502.                         enabling delegation. The sec_login_handle_t that 
  57503.                         specifies the client's identity is supplied as output 
  57504.                         of the following routines: 
  57505.  
  57506.                           o  sec_login_get_current_context if the client 
  57507.                              inherited the identity of the current context 
  57508.  
  57509.                           o  The sec_login_setup_identity and the 
  57510.                              sec_login_validate_identity pair that together 
  57511.                              establish an authenticated identity if a new 
  57512.                              identity was established 
  57513.  
  57514.           delegation_type_permitted A value of sec_id_delegation_type_t that 
  57515.                         specifies the type of delegation to be enabled. The 
  57516.                         types available are: 
  57517.  
  57518.                              sec_id_deleg_type_none             No delegation 
  57519.                              sec_id_deleg_type_traced           Traced 
  57520.                                                                 delegation 
  57521.                              sec_id_deleg_type_impersonation    Simple 
  57522.                                                                 (impersonation) 
  57523.                                                                 delegation 
  57524.  
  57525.                         Note each subsequent intermediate delegate of the 
  57526.                         delegation chain started by the initiating client must 
  57527.                         set the delegation type to traced if the initiating 
  57528.                         client set it to traced or to simple if the initiating 
  57529.                         client set it to simple. Intermediate delegates, 
  57530.                         however, can set the delegation type to no delegation 
  57531.                         to indicate that the delegation chain can proceed no 
  57532.                         further. 
  57533.  
  57534.           delegate_restrictions A pointer to a sec_id_restriction_set_t that 
  57535.                         supplies a list of servers that can act as delegates 
  57536.                         for the client initiating delegation. 
  57537.  
  57538.           target_restrictions A pointer to a sec_id_restriction_set_t that 
  57539.                         supplies a list of servers that can act as targets for 
  57540.                         the client initiating delegation. 
  57541.  
  57542.           optional_restrictions A pointer to a sec_id_opt_req_t that supplies a 
  57543.                         list of application-defined optional restrictions that 
  57544.                         apply to the client initiating delegation. 
  57545.  
  57546.           required_restrictions A pointer to a sec_id_opt_req_t that supplies a 
  57547.                         list of application-defined required restrictions that 
  57548.                         apply to the client initiating delegation. 
  57549.  
  57550.           compatibility_mode A value of sec_id_compatibility_mode_t that 
  57551.                         specifies the compatibility mode to be used when the 
  57552.                         initiating client interacts with pre-1.1 servers. The 
  57553.                         modes available are: 
  57554.  
  57555.                              sec_id_compat_mode_none Compatibility mode is off. 
  57556.  
  57557.                              sec_id_compat_mode_initiator Compatibility mode is 
  57558.                                            on. The pre-1.1 PAC data is 
  57559.                                            extracted from the EPAC of the 
  57560.                                            initiating client. 
  57561.  
  57562.                              sec_id_compat_mode_caller Compatibility mode is 
  57563.                                            on. The pre-1.1 PAC data extracted 
  57564.                                            from the EPAC of the last client in 
  57565.                                            the delegation chain. 
  57566.  
  57567.           Output 
  57568.  
  57569.           status        A pointer to the completion status.  On successful 
  57570.                         completion, status is assigned error_status_ok. 
  57571.                         Otherwise, it returns one of the following errors: 
  57572.  
  57573.                              sec_login_s_context_invalid 
  57574.                              sec_login_s_invalid_deleg_type 
  57575.                              err_sec_login_invalid_delegate_restriction 
  57576.                              err_sec_login_invalid_target_restriction 
  57577.                              err_sec_login_invalid_opt_restriction 
  57578.                              err_sec_login_invalid_req_restriction 
  57579.                              sec_login_s_invalid_compat_mode 
  57580.  
  57581.  Usage 
  57582.  
  57583.           The sec_login_become_initiator enables delegation for the calling 
  57584.           client by constructing a new login context (in a sec_login_handle_t) 
  57585.           that carries delegation information.  This information includes the 
  57586.           delegation type, delegate, and target restrictions, and any 
  57587.           application-defined optional and required restrictions. 
  57588.  
  57589.           The new login context is then used to set up an authenticated RPC 
  57590.           with an intermediate server using the rpc_binding_set_auth_info 
  57591.           routine. The intermediary can continue the delegation chain by 
  57592.           calling sec_login_become_delegate (if the delegation type is 
  57593.           sec_id_deleg_type_traced) or sec_login_become_impersonator (if the 
  57594.           delegation type is sec_id_deleg_type_impersonation). 
  57595.  
  57596.  Related Information 
  57597.  
  57598.           Routines: 
  57599.           sec_login_become_delegate 
  57600.           sec_login_become_impersonator 
  57601.           sec_login_get_current_context 
  57602.           sec_login_setup_identity 
  57603.           sec_login_validate_identity Files: 
  57604.           /usr/include/dce/sec_login.idl - The idl file from which 
  57605.           dce/sec_login.h was derived. 
  57606.  
  57607.  
  57608. ΓòÉΓòÉΓòÉ 8.7.7. sec_login_certify_identity ΓòÉΓòÉΓòÉ
  57609.  
  57610.  Purpose 
  57611.  
  57612.           Certifies the network authentication service. 
  57613.  
  57614.  Library 
  57615.  
  57616.           \lib\dceos2.lib 
  57617.  
  57618.  Format 
  57619.  
  57620.                     #include <dce/sec_login.h>
  57621.  
  57622.                     boolean32 sec_login_certify_identity(
  57623.                             sec_login_handle_t  login_context,
  57624.                             error_status_t  *status);
  57625.  
  57626.  Parameters 
  57627.  
  57628.           Input 
  57629.  
  57630.           login_context An opaque handle to login context data.  The login 
  57631.                         context contains, among other data, the account 
  57632.                         principal name and UUID, account restrictions, records 
  57633.                         of group membership, and the process home directory. 
  57634.  
  57635.           Output 
  57636.  
  57637.           status        A pointer to the completion status.  On successful 
  57638.                         completion, the routine returns error_status_ok. 
  57639.                         Otherwise, it returns one of the following errors: 
  57640.  
  57641.                              sec_login_s_config   The DCE configuration 
  57642.                                                   (dce_config) information is 
  57643.                                                   not available. 
  57644.  
  57645.                              sec_login_s_context_invalid The input context is 
  57646.                                                   not valid. 
  57647.  
  57648.                              sec_login_s_default_use It is an error to try to 
  57649.                                                   certify the default context. 
  57650.  
  57651.  Usage 
  57652.  
  57653.           The sec_login_certify_identity routine certifies that the security 
  57654.           server used to set up and validate a login context is legitimate. A 
  57655.           legitimate server is one that knows the host machine's secret key. On 
  57656.           some systems, this can be a privileged operation. 
  57657.  
  57658.           Information can be retrieved by means of sec_login_get_pwent and 
  57659.           sec_login_get_expiration from an uncertified login context, but such 
  57660.           information cannot be trusted. All system login programs that use the 
  57661.           sec_login interface must call sec_login_certify_identity to certify 
  57662.           the security server. If they do not, they open the local file system 
  57663.           to attacks by imposter security servers returning suspect local 
  57664.           process credentials (UID and group IDs). 
  57665.  
  57666.  Return Codes 
  57667.  
  57668.           The routine returns a boolean32 value that is TRUE if the 
  57669.           certification was successful, and FALSE otherwise. 
  57670.  
  57671.  Examples 
  57672.  
  57673.           Applications wanting to perform a straightforward login can use the 
  57674.           sec_login package as follows: 
  57675.  
  57676.                     if (sec_login_setup_identity(user_name, sec_login_no_flags, &login_context, &st))
  57677.                     {
  57678.                          ... get password from user...
  57679.  
  57680.                          if (sec_login_validate_identity(login_context, password, &reset_passwd, &auth_src, &st))
  57681.                          {
  57682.                               if (!sec_login_certify_identity(login_context, &st))
  57683.                                    exit(error_weird_auth_svc);
  57684.  
  57685.                               sec_login_set_context(login_context, &st);
  57686.  
  57687.                               if (auth_src != sec_login_auth_src_network)
  57688.                                    printf("no network credentials");
  57689.  
  57690.                               if (reset_passwd)
  57691.                               {
  57692.                               ... get new password from user, reset registry record ...
  57693.                               };
  57694.  
  57695.                               sec_login_get_pwent(login_context, &pw_entry, &st);
  57696.  
  57697.                               if (pw_entry.pw_expire < todays_date)
  57698.                               {
  57699.                                    sec_login_purge_context(&login_context, &st);
  57700.                                    exit(0)
  57701.                               }
  57702.  
  57703.                               ... any other application specific login valid actions ...
  57704.                          }
  57705.  
  57706.                     } else
  57707.                     {
  57708.                          sec_login_purge_context(&login_context, &st);
  57709.  
  57710.                          ... application specific login failure actions ...
  57711.                     }
  57712.  
  57713.  Related Information 
  57714.  
  57715.           Routines: sec_login_get_pwent 
  57716.           sec_login_get_expiration 
  57717.           sec_login_validate_cert_auth 
  57718.  
  57719.  
  57720. ΓòÉΓòÉΓòÉ 8.7.8. sec_login_cred_get_delegate ΓòÉΓòÉΓòÉ
  57721.  
  57722.  Purpose 
  57723.  
  57724.           Returns a handle to the privilege attributes of an intermediary in a 
  57725.           delegation chain. Used by clients. 
  57726.  
  57727.  Format 
  57728.  
  57729.                     #include <dce/sec_login.h>
  57730.  
  57731.                     sec_cred_pa_handle_t sec_login_cred_get_delegate(
  57732.                             sec_login_handle_t  login_context,
  57733.                             sec_cred_cursor_t  *cursor,
  57734.                             error_status_t  *status);
  57735.  
  57736.  Parameters 
  57737.  
  57738.           Input 
  57739.  
  57740.           login_context A value of sec_login_handle_t that provides an opaque 
  57741.                         handle to a login context for which delegation has been 
  57742.                         enabled. The sec_login_handle_t that specifies the 
  57743.                         identity is supplied as output of the 
  57744.                         sec_login_become_delegate routine. 
  57745.  
  57746.           Input/Output 
  57747.  
  57748.           cursor        As input, a pointer to a cursor of type 
  57749.                         sec_cred_cursor_t that has been initialized by the 
  57750.                         sec_login_cred_init_cursor routine. As an output 
  57751.                         parameter, cursor is a pointer to a cursor of type 
  57752.                         sec_cred_cursor_t that is positioned past the principal 
  57753.                         whose privilege attributes have been returned in this 
  57754.                         routine. 
  57755.  
  57756.           Output 
  57757.  
  57758.           status        A pointer to the completion status.  On successful 
  57759.                         completion, status is assigned error_status_ok. 
  57760.                         Otherwise, it returns one of the following errors: 
  57761.  
  57762.                              sec_cred_s_invalid_cursor 
  57763.                              sec_cred_s_no_more_entries 
  57764.  
  57765.  Usage 
  57766.  
  57767.           The sec_login_cred_get_delegate routine returns a handle of type 
  57768.           sec_login_handle_t to the privilege attributes of an intermediary in 
  57769.           a delegation chain that performed an authenticated RPC operation. 
  57770.  
  57771.           This routine is used by clients. Servers use the 
  57772.           sec_cred_get_delegate routine to return the privilege attribute 
  57773.           handle of an intermediary in a delegation chain. 
  57774.  
  57775.           The login context identified by login_context contains all members in 
  57776.           the delegation chain. This routine returns a handle 
  57777.           (sec_cred_pa_handle_t) to the privilege attributes of one of the 
  57778.           delegates in the login context. The sec_cred_pa_handle_t returned by 
  57779.           this routine is used in other sec_cred_get_xxx routines to obtain 
  57780.           privilege attribute information for a single delegate. 
  57781.  
  57782.           To obtain the privilege attributes of each delegate in the credential 
  57783.           handle identified by callers_identity, run this routine until the 
  57784.           message sec_cred_s_no_more_entries is returned. 
  57785.  
  57786.           Before you run sec_login_cred_get_delegate, you must run a call to 
  57787.           sec_login_cred_init_cursor to initialize a cursor of type 
  57788.           sec_cred_cursor_t. 
  57789.  
  57790.           Use the sec_cred_free_pa_handle and sec_cred_free_cursor routines to 
  57791.           free the resources allocated to the sec_cred_pa_handle_t and cursor. 
  57792.  
  57793.  Related Information 
  57794.  
  57795.           Routines: 
  57796.           sec_login_cred_init_cursor 
  57797.           sec_cred_get_deleg_restrictions 
  57798.           sec_cred_get_delegation_type 
  57799.           sec_cred_get_extended_attrs 
  57800.           sec_cred_get_pa_data 
  57801.           sec_cred_get_opt_restrictions 
  57802.           sec_cred_get_req_restrictions 
  57803.           sec_cred_get_tgt_restrictions 
  57804.           sec_cred_get_v1_pac Files: 
  57805.           /usr/include/dce/sec_login.idl - The idl file from which 
  57806.           dce/sec_login.h was derived. 
  57807.  
  57808.  
  57809. ΓòÉΓòÉΓòÉ 8.7.9. sec_login_cred_get_initiator ΓòÉΓòÉΓòÉ
  57810.  
  57811.  Purpose 
  57812.  
  57813.           Returns information about the delegation initiator in a specified 
  57814.           login context. 
  57815.  
  57816.  Format 
  57817.  
  57818.                     #include <dce/sec_login.h>
  57819.  
  57820.                     sec_cred_pa_handle_t sec_login_cred_get_initiator(
  57821.                             sec_login_handle_t  login_context,
  57822.                             error_status_t  *status);
  57823.  
  57824.  Parameters 
  57825.  
  57826.           Input 
  57827.  
  57828.           login_context A value of sec_login_handle_t that provides an opaque 
  57829.                         handle to a login context for which delegation has been 
  57830.                         enabled. 
  57831.  
  57832.           Output 
  57833.  
  57834.           status        A pointer to the completion status.  On successful 
  57835.                         completion, status is assigned error_status_ok. 
  57836.                         Otherwise, it returns sec_login_s_context_invalid. 
  57837.  
  57838.  Usage 
  57839.  
  57840.           The sec_login_cred_get_initiator routine returns a handle of type 
  57841.           sec_cred_pa_handle_t to the privilege attributes of the delegation 
  57842.           initiator. 
  57843.  
  57844.           The login context identified by login_context contains all members in 
  57845.           the delegation chain. This routine returns a handle 
  57846.           (sec_cred_pa_handle_t) to the privilege attributes of the initiator. 
  57847.           The sec_cred_pa_handle_t returned by this routine is used in other 
  57848.           sec_cred_get_xxx routines to obtain privilege attribute information 
  57849.           for the initiator single delegate. 
  57850.  
  57851.           Use the sec_cred_free_pa_handle routine to free the resources 
  57852.           allocated to the sec_cred_pa_handle_t handle. 
  57853.  
  57854.  Related Information 
  57855.  
  57856.           Routines: 
  57857.           sec_login_cred_init_cursor 
  57858.           sec_cred_get_deleg_restrictions 
  57859.           sec_cred_get_delegation_type 
  57860.           sec_cred_get_extended_attrs 
  57861.           sec_cred_get_pa_data 
  57862.           sec_cred_get_opt_restrictions 
  57863.           sec_cred_get_req_restrictions 
  57864.           sec_cred_get_tgt_restrictions 
  57865.           sec_cred_get_v1_pac 
  57866.  
  57867.           Files: 
  57868.           /usr/include/dce/sec_login.idl - The idl file from which 
  57869.           dce/sec_login.h was derived. 
  57870.  
  57871.  
  57872. ΓòÉΓòÉΓòÉ 8.7.10. sec_login_cred_init_cursor ΓòÉΓòÉΓòÉ
  57873.  
  57874.  Purpose 
  57875.  
  57876.           Initializes a sec_cred_cursor_t cursor. 
  57877.  
  57878.  Format 
  57879.  
  57880.                     #include <dce/sec_cred.h>
  57881.  
  57882.                     void sec_login_cred_init_cursor (
  57883.                             sec_cred_cursor_t  *cursor,
  57884.                             error_status_t  *status);
  57885.  
  57886.  Parameters 
  57887.  
  57888.           Input/Output 
  57889.  
  57890.           cursor        As input, a pointer to a sec_cred_cursor_t to be 
  57891.                         initialized. As output, a pointer to an initialized 
  57892.                         sec_cred_cursor_t. 
  57893.  
  57894.           Output 
  57895.  
  57896.           status        A pointer to the completion status.  On successful 
  57897.                         completion, the routine returns error_status_ok. 
  57898.                         Otherwise, it returns an error. 
  57899.  
  57900.  Usage 
  57901.  
  57902.           The sec_login_cred_init_cursor routine allocates and initializes a 
  57903.           cursor of type sec_cursor_t for use with the 
  57904.           sec_login_cred_get_delegate routine. 
  57905.  
  57906.           Use the sec_cred_free_cursor routine to free the resources allocated 
  57907.           to cursor. 
  57908.  
  57909.  Related Information 
  57910.  
  57911.           Routines: 
  57912.           sec_login_cred_get_delegate 
  57913.  
  57914.  
  57915. ΓòÉΓòÉΓòÉ 8.7.11. sec_login_disable_delegation ΓòÉΓòÉΓòÉ
  57916.  
  57917.  Purpose 
  57918.  
  57919.           Disables delegation for a specified login context. 
  57920.  
  57921.  Format 
  57922.  
  57923.                     #include <dce/sec_login.h>
  57924.  
  57925.                     sec_logon_handle_t *sec_login_disable_delegation(
  57926.                             sec_login_handle_t  login_context,
  57927.                             error_status_t  *status);
  57928.  
  57929.  Parameters 
  57930.  
  57931.           Input 
  57932.  
  57933.           login_context An opaque handle to a login context for which 
  57934.                         delegation has been enabled. 
  57935.  
  57936.           Output 
  57937.  
  57938.           status        A pointer to the completion status.  On successful 
  57939.                         completion, status is assigned error_status_ok. 
  57940.                         Otherwise, it returns sec_login_s_context_invalid. 
  57941.  
  57942.  Usage 
  57943.  
  57944.           The sec_login_disable_delegation routine disables delegation for a 
  57945.           specified login context. It returns a new login context of type 
  57946.           sec_login_handle_t without any delegation information, which prevents 
  57947.           any further delegation. 
  57948.  
  57949.  Related Information 
  57950.  
  57951.           Routines: 
  57952.           sec_login_become_delegate 
  57953.           sec_login_become_impersonator 
  57954.           sec_login_become_initiator 
  57955.  
  57956.           Files: 
  57957.           /usr/include/dce/sec_login.idl - The idl file from which 
  57958.           dce/sec_login.h was derived. 
  57959.  
  57960.  
  57961. ΓòÉΓòÉΓòÉ 8.7.12. sec_login_export_context ΓòÉΓòÉΓòÉ
  57962.  
  57963.  Purpose 
  57964.  
  57965.           Creates an exportable login context. 
  57966.  
  57967.  Library 
  57968.  
  57969.           \lib\dceos2.lib 
  57970.  
  57971.  Format 
  57972.  
  57973.                     #include <dce/sec_login.h>
  57974.  
  57975.                     void sec_login_export_context(
  57976.                             sec_login_handle_t  login_context,
  57977.                             unsigned32  buf_len,
  57978.                             ndr_byte  buf[],
  57979.                             unsigned32  *len_used,
  57980.                             unsigned32  *len_needed,
  57981.                             error_status_t  *status);
  57982.  
  57983.  Parameters 
  57984.  
  57985.           Input 
  57986.  
  57987.           login_context An opaque handle to login context data.  The login 
  57988.                         context contains, among other data, the account 
  57989.                         principal name and UUID, account restrictions, records 
  57990.                         of group membership, and the process home directory. 
  57991.  
  57992.           buf_len       An unsigned 32-bit integer containing the allocated 
  57993.                         length (in bytes) of the buffer to contain the login 
  57994.                         context. 
  57995.  
  57996.           Output 
  57997.  
  57998.           buf           An idl_byte array that contains the exportable login 
  57999.                         context on return. 
  58000.  
  58001.           len_used      A pointer to an unsigned 32-bit integer indicating the 
  58002.                         number of bytes needed for the entire login context, up 
  58003.                         to buf_len. 
  58004.  
  58005.           len_needed    If the allocated length of the buffer is too short, an 
  58006.                         error is issued (sec_login_s_no_memory), and on return 
  58007.                         this pointer indicates the number of bytes necessary to 
  58008.                         contain the login context. 
  58009.  
  58010.           status        A pointer to the completion status.  On successful 
  58011.                         completion, the routine returns error_status_ok. 
  58012.                         Otherwise, it returns one of the following errors: 
  58013.  
  58014.                              sec_login_s_no_memory Not enough space was 
  58015.                                                   allocated for the buf array. 
  58016.                                                   The len_needed parameter 
  58017.                                                   points to the needed length. 
  58018.  
  58019.                              sec_login_s_handle_invalid The login context 
  58020.                                                   handle is not valid. 
  58021.  
  58022.                              sec_login_s_context_invalid The login context 
  58023.                                                   specified by the input handle 
  58024.                                                   is not valid. 
  58025.  
  58026.  Usage 
  58027.  
  58028.           The sec_login_export_context routine obtains an exportable version of 
  58029.           the login context information. This information can be passed to 
  58030.           another process running on the same machine. 
  58031.  
  58032.  Related Information 
  58033.  
  58034.           Routines: 
  58035.           sec_login_import_context 
  58036.  
  58037.  
  58038. ΓòÉΓòÉΓòÉ 8.7.13. sec_login_free_net_info ΓòÉΓòÉΓòÉ
  58039.  
  58040.  Purpose 
  58041.  
  58042.           Frees storage allocated for a principal's network information. 
  58043.  
  58044.  Library 
  58045.  
  58046.           \lib\dceos2.lib 
  58047.  
  58048.  Format 
  58049.  
  58050.                     #include <dce/sec_login.h>
  58051.  
  58052.                     void sec_login_free_net_info(
  58053.                             sec_login_net_info_t  *net_info);
  58054.  
  58055.  Parameters 
  58056.  
  58057.           Input/Output 
  58058.  
  58059.           net_info      A pointer to the sec_login_net_info_t structure to be 
  58060.                         freed. 
  58061.  
  58062.  Usage 
  58063.  
  58064.           The sec_login_free_net_info routine frees any memory allocated for a 
  58065.           principal's network information. Network information is returned by a 
  58066.           previous successful call to sec_login_inquire_net_info. 
  58067.  
  58068.  Cautions 
  58069.  
  58070.           This routine does not return any completion codes. Ensure that you 
  58071.           supply a valid sec_login_net_info_t address. The routine frees a 
  58072.           range of storage beginning at the supplied address, without regard to 
  58073.           the actual contents of the storage. 
  58074.  
  58075.  Related Information 
  58076.  
  58077.           Routines: 
  58078.           sec_login_inquire_net_info 
  58079.  
  58080.  
  58081. ΓòÉΓòÉΓòÉ 8.7.14. sec_login_get_current_context ΓòÉΓòÉΓòÉ
  58082.  
  58083.  Purpose 
  58084.  
  58085.           Returns a handle to the current login context. 
  58086.  
  58087.  Library 
  58088.  
  58089.           \lib\dceos2.lib 
  58090.  
  58091.  Format 
  58092.  
  58093.                     #include <dce/sec_login.h>
  58094.  
  58095.                     void sec_login_get_current_context(
  58096.                             sec_login_handle_t login_context,
  58097.                             error_status_t *status);
  58098.  
  58099.  Parameters 
  58100.  
  58101.           Input 
  58102.  
  58103.           login_context A pointer to an opaque handle to login context data. 
  58104.                         The login context contains, among other data, the 
  58105.                         account principal name and UUID, account restrictions, 
  58106.                         records of group membership, and the process home 
  58107.                         directory. 
  58108.  
  58109.           Output 
  58110.  
  58111.           status        A pointer to the completion status. On successful 
  58112.                         completion, the routine returns error_status_ok. 
  58113.                         Otherwise, it returns sec_login_s_no_current_context, 
  58114.                         which indicates that there was no current context to 
  58115.                         retrieve. See sec_login_setup_identity for information 
  58116.                         about how to set up, validate, and implement a login 
  58117.                         context. 
  58118.  
  58119.  Usage 
  58120.  
  58121.           The sec_login_get_current_context routine retrieves a handle to the 
  58122.           login context for the currently established network identity. The 
  58123.           context returned is created from locally cached data so subsequent 
  58124.           data extraction operations can return some NULL values. 
  58125.  
  58126.  Related Information 
  58127.  
  58128.           Routines: 
  58129.           sec_login_setup_identity 
  58130.  
  58131.  
  58132. ΓòÉΓòÉΓòÉ 8.7.15. sec_login_get_expiration ΓòÉΓòÉΓòÉ
  58133.  
  58134.  Purpose 
  58135.  
  58136.           Returns the ticket-granting ticket (TGT) lifetime for an 
  58137.           authenticated identity. 
  58138.  
  58139.  Library 
  58140.  
  58141.           \lib\dceos2.lib 
  58142.  
  58143.  Format 
  58144.  
  58145.                     #include <dce/sec_login.h>
  58146.  
  58147.                     void sec_login_get_expiration(
  58148.                             sec_login_handle_t  login_context,
  58149.                             signed32  *identity_expiration,
  58150.                             error_status_t  *status);
  58151.  
  58152.  Parameters 
  58153.  
  58154.           Input 
  58155.  
  58156.           login_context An opaque handle to login context data.  The login 
  58157.                         context contains, among other data, the account 
  58158.                         principal name and UUID, account restrictions, records 
  58159.                         of group membership, and the process home directory. 
  58160.  
  58161.           Output 
  58162.  
  58163.           identity_expiration The lifetime of the TGT that belongs to the 
  58164.                         authenticated identity identified by login_context. It 
  58165.                         can be used in the same way UNIX time_t is used. 
  58166.  
  58167.           status        A pointer to the completion status.  On successful 
  58168.                         completion, the routine returns error_status_ok. 
  58169.                         Otherwise, it returns one of the following errors: 
  58170.  
  58171.                              sec_login_s_context_invalid The login context 
  58172.                                                      itself is not valid. 
  58173.  
  58174.                              sec_login_s_default_use Unpermitted use of the 
  58175.                                                      default login handle 
  58176.                                                      occurred. 
  58177.  
  58178.                              sec_login_s_not_certified Indicates that the login 
  58179.                                                      context has been 
  58180.                                                      validated, but not 
  58181.                                                      certified.  Although this 
  58182.                                                      code indicates successful 
  58183.                                                      completion, it warns you 
  58184.                                                      that the context is not 
  58185.                                                      validated. 
  58186.  
  58187.                              sec_login_s_no_current_context The calling process 
  58188.                                                      has no context of its own. 
  58189.  
  58190.  Usage 
  58191.  
  58192.           The sec_login_get_expiration routine extracts the lifetime for the 
  58193.           TGT that belongs to the authenticated identity contained in the login 
  58194.           context.  The lifetime value is filled in if available, otherwise it 
  58195.           is set to 0 (zero).  This routine allows an application to tell an 
  58196.           interactive user how long the user's network login (and authenticated 
  58197.           identity) will last before it must be refreshed. 
  58198.  
  58199.           The routine works only on previously validated contexts. 
  58200.  
  58201.  Examples 
  58202.  
  58203.           Because the authenticated network identity for an application has a 
  58204.           finite lifetime, there is a risk it will expire during some long 
  58205.           network operation, and prevent the operation from completing. To 
  58206.           avoid this situation, an application can, before initiating a long 
  58207.           operation, use the sec_login package to check the expiration time of 
  58208.           its identity. The application can refresh it if there is not enough 
  58209.           time remaining to complete the operation. After refreshing the 
  58210.           identity, the process must validate it again with 
  58211.           sec_login_validate_identity. 
  58212.  
  58213.                     sec_login_get_expiration(login_context, &expire_time, &st);
  58214.  
  58215.                     if (expire_time < (current_time + operation_duration)) {
  58216.  
  58217.                        if (!sec_login_refresh_identity(login_context, &st)) {
  58218.                           if (st == sec_login_s_refresh_ident_bad) {
  58219.                            ... identity has changed ...
  58220.                           } else {
  58221.                            ... login context cannot be renewed ...
  58222.                              exit(error_context_not_renewable);
  58223.                           }
  58224.  
  58225.                          if (sec_login_validate_identity(login_context, password,
  58226.                                                 &reset_passwd, &auth_src, &st)) {
  58227.                            ... identity validated ...
  58228.                           } else {
  58229.                            ... validation failed ...
  58230.                              exit(error_validation_failure);
  58231.                           }
  58232.                        }
  58233.                     }
  58234.  
  58235.                     operation();
  58236.  
  58237.  Related Information 
  58238.  
  58239.           Routines: 
  58240.           sec_login_validate_identity 
  58241.  
  58242.  
  58243. ΓòÉΓòÉΓòÉ 8.7.16. sec_login_get_pwent ΓòÉΓòÉΓòÉ
  58244.  
  58245.  Purpose 
  58246.  
  58247.           Returns a passwd-style entry for a login context. 
  58248.  
  58249.  Format 
  58250.  
  58251.                     #include <dce/sec_login.h>
  58252.  
  58253.                     void sec_login_get_pwent(
  58254.                             sec_login_handle_t  login_context,
  58255.                             sec_login_passwd_t  *pwent,
  58256.                             error_status_t  *status);
  58257.  
  58258.  Parameters 
  58259.  
  58260.           Input 
  58261.  
  58262.           login_context An opaque handle to login context data.  The login 
  58263.                         context contains, among other data, the account 
  58264.                         principal name and UUID, account restrictions, records 
  58265.                         of group membership, and the process home directory. 
  58266.  
  58267.           Output 
  58268.  
  58269.           pwent         A pointer to a pointer to the returned passwd-style 
  58270.                         structure. The particular structure depends on the 
  58271.                         underlying system. For example, on a system with a 
  58272.                         passwd structure similar to the one supported by 4.4BSD 
  58273.                         and OSF/1, the structure (found in usr/include/pwd.h 
  58274.                         is: 
  58275.  
  58276.                                                 struct passwd {
  58277.                                                     char    *pw_name;    /* user name */
  58278.                                                     char    *pw_passwd;  /* encrypted password */
  58279.                                                     int     pw_uid;      /* user uid */
  58280.                                                     int     pw_gid;      /* user gid */
  58281.                                                     time_t  pw_change;   /* password change time */
  58282.                                                     char    *pw_class;   /* user access class */
  58283.                                                     char    *pw_gecos;   /* miscellaneous account info */
  58284.                                                     char    *pw_dir;     /* home directory */
  58285.                                                     char    *pw_shell;   /* default shell */
  58286.                                                     time_t  pw_expire;   /* account expiration */
  58287.                                                 };
  58288.  
  58289.           status        A pointer to the completion status.  On successful 
  58290.                         completion, the routine returns error_status_ok. 
  58291.                         Otherwise, it returns one of the following errors: 
  58292.  
  58293.                              sec_login_s_context_invalid The login context 
  58294.                                                   itself is not valid. 
  58295.  
  58296.                              sec_login_s_default_use Unpermitted use of the 
  58297.                                                   default login handle 
  58298.                                                   occurred. 
  58299.  
  58300.                              sec_login_s_info_not_avail The login context has 
  58301.                                                   no UNIX information. 
  58302.  
  58303.                              sec_login_s_not_certified Indicates that the login 
  58304.                                                   context has been validated, 
  58305.                                                   but not certified.  Although 
  58306.                                                   this code indicates 
  58307.                                                   successful completion, it 
  58308.                                                   warns you that the context is 
  58309.                                                   not validated. 
  58310.  
  58311.                              sec_rgy_object_not_found The registry server could 
  58312.                                                   not find the specified login 
  58313.                                                   context data. 
  58314.  
  58315.                              sec_rgy_server_e_unavailable The DCE Registry 
  58316.                                                   Server is unavailable. 
  58317.  
  58318.  Usage 
  58319.  
  58320.           The sec_login_get_pwent routine creates a passwd-style file structure 
  58321.           for the current network login context. This is generally useful for 
  58322.           establishing the local operating system context. Applications that 
  58323.           require all of the data normally extracted by means of getpwnam 
  58324.           should extract that data from the login context with this routine. 
  58325.  
  58326.           This routine works only on explicitly created (not inherited or 
  58327.           imported) contexts. 
  58328.  
  58329.  Cautions 
  58330.  
  58331.           The returned sec_login_passwd_t structure points to data stored in 
  58332.           the structure indicated by the login_context pointer and must be 
  58333.           treated as read-only data. Writing to these data objects can cause 
  58334.           unexpected failures. 
  58335.  
  58336.  Examples 
  58337.  
  58338.           The following example illustrates use of the sec_login_get_pwent 
  58339.           routine: 
  58340.  
  58341.                     #include <pwd.h>
  58342.                     struct passwd *pwd;
  58343.                     sec_login_get_pwent(login_context, &(sec_login_passwd_t*)pwd, &status);
  58344.                     printf ("%s",pwd->pw_name);
  58345.  
  58346.  Related Information 
  58347.  
  58348.           Files: 
  58349.           /usr/include/dce/sec_login.idl - The idl file from which 
  58350.           dce/sec_login.h was derived. 
  58351.  
  58352.  
  58353. ΓòÉΓòÉΓòÉ 8.7.17. sec_login_import_context ΓòÉΓòÉΓòÉ
  58354.  
  58355.  Purpose 
  58356.  
  58357.           Imports a login context. 
  58358.  
  58359.  Library 
  58360.  
  58361.           \lib\dceos2.lib 
  58362.  
  58363.  Format 
  58364.  
  58365.                     #include <dce/sec_login.h>
  58366.  
  58367.                     void sec_login_import_context(
  58368.                             unsigned32  buf_len,
  58369.                             ndr_byte buf[]
  58370.                             sec_login_handle_t  *login_context,
  58371.                             error_status_t  *status);
  58372.  
  58373.  Parameters 
  58374.  
  58375.           Input 
  58376.  
  58377.           buf_len       The allocated length (in bytes) of the buffer 
  58378.                         containing the login context. 
  58379.  
  58380.           buf           An idl_byte array containing the importable login 
  58381.                         context. 
  58382.  
  58383.           Output 
  58384.  
  58385.           login_context An opaque handle to login context data. The login 
  58386.                         context contains, among other data, the account 
  58387.                         principal name and UUID, account restrictions, records 
  58388.                         of group membership, and the process home directory. 
  58389.  
  58390.           status        A pointer to the completion status.  On successful 
  58391.                         completion, the routine returns error_status_ok. 
  58392.                         Otherwise, it returns one of the following errors: 
  58393.  
  58394.                              sec_login_s_context_invalid The login context 
  58395.                                                   itself is not valid. 
  58396.  
  58397.                              sec_login_s_default_use Unpermitted use of the 
  58398.                                                   default login handle 
  58399.                                                   occurred. 
  58400.  
  58401.  Usage 
  58402.  
  58403.           The sec_login_import_context routine imports a context obtained by 
  58404.           means of a call to sec_login_export_context performed on the same 
  58405.           machine. To import a login context, users must have the appropriate 
  58406.           privileges. Non-privileged users can import only their own login 
  58407.           context; privileged users can import the login contexts created by 
  58408.           any users. 
  58409.  
  58410.  Related Information 
  58411.  
  58412.           Routines: 
  58413.           sec_login_export_context 
  58414.  
  58415.  
  58416. ΓòÉΓòÉΓòÉ 8.7.18. sec_login_init_first ΓòÉΓòÉΓòÉ
  58417.  
  58418.  Purpose 
  58419.  
  58420.           Initializes the default context. 
  58421.  
  58422.  Library 
  58423.  
  58424.           \lib\dceos2.lib 
  58425.  
  58426.  Format 
  58427.  
  58428.                     #include <dce/sec_login.h>
  58429.  
  58430.                     void sec_login_init_first(
  58431.                              error_status_t  *status);
  58432.  
  58433.  Parameters 
  58434.  
  58435.           Output 
  58436.  
  58437.           status        A pointer to the completion status.  On successful 
  58438.                         completion, the routine returns error_status_ok. 
  58439.                         Otherwise, it returns one of the following errors: 
  58440.  
  58441.                              sec_login_s_default_use The default context is 
  58442.                                                   already initialized. 
  58443.  
  58444.                              sec_login_s_privileged An unprivileged process was 
  58445.                                                   called in. 
  58446.  
  58447.  Usage 
  58448.  
  58449.           The sec_login_init_first routine initializes the default context 
  58450.           inheritance mechanism. If the default inheritance mechanism is 
  58451.           already initialized, the operation fails. Typically, this routine is 
  58452.           called by the initial process at machine startup time to initialize 
  58453.           the default context inheritance mechanism for the host machine 
  58454.           process hierarchy. 
  58455.  
  58456.  Related Information 
  58457.  
  58458.           Routines: 
  58459.           sec_login_setup_first 
  58460.           sec_login_validate_first 
  58461.  
  58462.  
  58463. ΓòÉΓòÉΓòÉ 8.7.19. sec_login_inq_pag ΓòÉΓòÉΓòÉ
  58464.  
  58465.  Purpose 
  58466.  
  58467.           Obtains the pag from the login context. 
  58468.  
  58469.  Format 
  58470.  
  58471.                     #include <dce/sec_login.h>
  58472.  
  58473.                     unsigned32 sec_login_inq_pag(
  58474.                             sec_login_handle_t  *login_context,
  58475.                             error_status_t  *status);
  58476.  
  58477.  Parameters 
  58478.  
  58479.           Input 
  58480.  
  58481.           login_context A pointer to the sec_login_handle_t from which the pag 
  58482.                         will be extracted. 
  58483.  
  58484.           Output 
  58485.  
  58486.           status        A pointer to the completion status. On successful 
  58487.                         completion, erro_status_ok is returned. 
  58488.  
  58489.  Usage 
  58490.  
  58491.           The sec_login_inq_pag obtains a pag from the login context. 
  58492.  
  58493.  Related Information 
  58494.  
  58495.           Files: 
  58496.           \usr\include\dce\sec_login.idl - The idl file from which 
  58497.           dce\sec_login.h was derived. 
  58498.  
  58499.  
  58500. ΓòÉΓòÉΓòÉ 8.7.20. sec_login_inquire_net_info ΓòÉΓòÉΓòÉ
  58501.  
  58502.  Purpose 
  58503.  
  58504.           Returns a principal's network information. 
  58505.  
  58506.  Library 
  58507.  
  58508.           \lib\dceos2.lib 
  58509.  
  58510.  Format 
  58511.  
  58512.                     #include <dce/sec_login.h>
  58513.  
  58514.                     void sec_login_inquire_net_info(
  58515.                             sec_login_handle_t  login_context,
  58516.                             sec_login_net_info_t  *net_info,
  58517.                             error_status_t  *status);
  58518.  
  58519.  Parameters 
  58520.  
  58521.           Input 
  58522.  
  58523.           login_context An opaque handle to the login context for the desired 
  58524.                         principal. 
  58525.  
  58526.           Output 
  58527.  
  58528.           net_info      A pointer to the sec_login_net_info_t data structure 
  58529.                         that is received from the caller. The data structure is 
  58530.                         allocated by the caller and the contents (the 
  58531.                         principal's network information) are supplied by this 
  58532.                         routine. The sec_login_net_info_t structure is defined 
  58533.                         as follows: 
  58534.  
  58535.                                                 typedef struct {
  58536.                                                    sec_id_pac_t  pac;
  58537.                                                    unsigned32  acct_expiration_date;
  58538.                                                    unsigned32  passwd_expiration_date;
  58539.                                                    unsigned32  identity_expiration_date;
  58540.                                                 }  sec_login_net_info_t;
  58541.  
  58542.           status        A pointer to the completion status.  On successful 
  58543.                         completion, the routine returns error_status_ok. 
  58544.                         Otherwise, it returns one of the following errors: 
  58545.  
  58546.                              sec_login_s_context_invalid The login context is 
  58547.                                                      not valid. 
  58548.  
  58549.                              sec_login_s_no_current_context The default context 
  58550.                                                      was specified, but does 
  58551.                                                      not exist. 
  58552.  
  58553.                              sec_login_s_auth_local  The operation is not valid 
  58554.                                                      on the local context. The 
  58555.                                                      caller's identity was not 
  58556.                                                      authenticated. 
  58557.  
  58558.                              sec_login_s_not_certified Indicates that the login 
  58559.                                                      context has been 
  58560.                                                      validated, but not 
  58561.                                                      certified.  Although this 
  58562.                                                      code indicates successful 
  58563.                                                      completion, it warns you 
  58564.                                                      that the context is not 
  58565.                                                      validated. 
  58566.  
  58567.  Usage 
  58568.  
  58569.           The sec_login_inquire_net_info routine returns network information 
  58570.           for the principal identified by the specified login context.  The 
  58571.           network information consists of: 
  58572.  
  58573.             o  The privilege attribute certificate (PAC) that describes the 
  58574.                identity and group memberships of the principal. 
  58575.             o  The expiration date for the principal's account in the DCE 
  58576.                Registry. 
  58577.             o  The expiration date for the principal's password in the DCE 
  58578.                Registry. 
  58579.             o  The lifetime for the principal's authenticated network identity. 
  58580.                This is the lifetime of the principal's ticket granting ticket 
  58581.                TGT (see sec_login_get_expiration). 
  58582.  
  58583.           A value of 0 (zero) for an expiration date means there is no 
  58584.           expiration date. In other words, the principal's account, password, 
  58585.           or authenticated identity is good indefinitely. 
  58586.  
  58587.  Notes 
  58588.  
  58589.           To remove the sec_login_net_info_t structure when it is no longer 
  58590.           needed, use sec_login_free_net_info. 
  58591.  
  58592.  Related Information 
  58593.  
  58594.           Routines: 
  58595.           sec_login_get_expiration 
  58596.           sec_login_free_net_info 
  58597.  
  58598.  
  58599. ΓòÉΓòÉΓòÉ 8.7.21. sec_login_newgroups ΓòÉΓòÉΓòÉ
  58600.  
  58601.  Purpose 
  58602.  
  58603.           Changes the group list for a login context. 
  58604.  
  58605.  Library 
  58606.  
  58607.           \lib\dceos2.lib 
  58608.  
  58609.  Format 
  58610.  
  58611.                     #include <dce/sec_login.h>
  58612.  
  58613.                     boolean32 sec_login_newgroups(
  58614.                              sec_login_handle_t  login_context,
  58615.                              sec_login_flags_t  flags,
  58616.                              unsigned32  num_local_groups,
  58617.                              sec_id_t  local_groups[],
  58618.                              sec_login_handle_t  *restricted_context,
  58619.                              error_status_t  *status);
  58620.  
  58621.  Parameters 
  58622.  
  58623.           Input 
  58624.  
  58625.           login_context An opaque handle to login context data.  The login 
  58626.                         context contains, among other data, the account 
  58627.                         principal name and UUID, account restrictions, records 
  58628.                         of group membership, and the process home directory. 
  58629.  
  58630.           flags         A set of flags of type sec_login_flags_t. These contain 
  58631.                         information about how the new network credentials are 
  58632.                         used. Currently, the only flag used is 
  58633.                         sec_login_credentials_private, which, when set, implies 
  58634.                         that the new context is only to be used by the calling 
  58635.                         process. If this flag is not set (flags == 
  58636.                         sec_login_no_flags), descendants of the calling process 
  58637.                         can also use the new network credentials. 
  58638.  
  58639.           num_local_groups An unsigned 32-bit integer containing the number of 
  58640.                         local group identities to include in the new context. 
  58641.  
  58642.           local_groups  An array of sec_id_t elements. Each element contains 
  58643.                         the UUID of a local group identity to include in the 
  58644.                         new context. These identities are local to the cell. 
  58645.                         Optionally, each element can also contain a pointer to 
  58646.                         a character string containing the name of the local 
  58647.                         group. 
  58648.  
  58649.           Output 
  58650.  
  58651.           restricted_context An opaque handle to the login context containing 
  58652.                         the changed group list. 
  58653.  
  58654.           status        A pointer to the completion status.  On successful 
  58655.                         completion, the routine returns error_status_ok. 
  58656.                         Otherwise, it returns one of the following errors: 
  58657.  
  58658.                              sec_login_s_auth_local The operation is not valid 
  58659.                                                   on the local context. 
  58660.  
  58661.                              sec_login_s_default_use It is an error to try to 
  58662.                                                   certify the default context. 
  58663.  
  58664.                              sec_login_s_groupset_invalid The input list of 
  58665.                                                   group names is not valid. 
  58666.                                                   There may be groups to which 
  58667.                                                   the caller does not belong, 
  58668.                                                   or the list may contain 
  58669.                                                   groups that do not exist. 
  58670.  
  58671.  Usage 
  58672.  
  58673.           The sec_login_newgroups routine changes the group list for the 
  58674.           specified login context. Part of a network's identity is a list of 
  58675.           the various groups to which a principal belongs.  The groups are used 
  58676.           to determine user access to various objects and services.  This 
  58677.           routine returns a new login context that contains the changed group 
  58678.           list.  To remove the new login context when it is no longer needed, 
  58679.           use sec_login_purge_context. 
  58680.  
  58681.           This operation does not need to be validated, because the user 
  58682.           identity does not change.  Consequently, knowledge of the password is 
  58683.           not needed. 
  58684.  
  58685.  Notes 
  58686.  
  58687.           Currently you can have only groups from the local cell. 
  58688.  
  58689.  Return Codes 
  58690.  
  58691.           This routine returns TRUE when the new login context is successfully 
  58692.           established, FALSE if the operation fails. 
  58693.  
  58694.  Related Information 
  58695.  
  58696.           Routines: 
  58697.           sec_login_purge_context 
  58698.  
  58699.           Files: 
  58700.           \include\dce\sec_login.idl - The idl file from which dce\sec_login.h 
  58701.           was derived. 
  58702.  
  58703.  
  58704. ΓòÉΓòÉΓòÉ 8.7.22. sec_login_purge_context ΓòÉΓòÉΓòÉ
  58705.  
  58706.  Purpose 
  58707.  
  58708.           Destroys the credentials file relating to a login context and frees 
  58709.           the storage allocated for the login context through a call to 
  58710.           sec_login_release_context. 
  58711.  
  58712.  Library 
  58713.  
  58714.           \lib\dceos2.lib 
  58715.  
  58716.  Format 
  58717.  
  58718.                     #include <dce/sec_login.h>
  58719.  
  58720.                     void sec_login_purge_context(
  58721.                             sec_login_handle_t  *login_context,
  58722.                             error_status_t  *status);
  58723.  
  58724.  Parameters 
  58725.  
  58726.           Input/Output 
  58727.  
  58728.           login_context A pointer to an opaque handle to login context data. 
  58729.                         The login context contains, among other data, the 
  58730.                         account principal name and UUID, account restrictions, 
  58731.                         records of group membership, and the process home 
  58732.                         directory. Note that a pointer to the handle is 
  58733.                         submitted, so that the handle can be reset to NULL upon 
  58734.                         successful completion. 
  58735.  
  58736.           Output 
  58737.  
  58738.           status        A pointer to the completion status.  On successful 
  58739.                         completion, the routine returns error_status_ok. 
  58740.                         Otherwise, it returns one of the following errors: 
  58741.  
  58742.                              sec_login_s_context_invalid The login context 
  58743.                                                   itself is not valid. 
  58744.  
  58745.                              sec_login_s_default_use Unpermitted use of the 
  58746.                                                   default login handle 
  58747.                                                   occurred. 
  58748.  
  58749.  Usage 
  58750.  
  58751.           The sec_login_purge_context routine frees any storage allocated for 
  58752.           the specified login context and destroys the associated network 
  58753.           credentials, if any exist. 
  58754.  
  58755.  Notes 
  58756.  
  58757.           Applications must be cautious when purging the current context, 
  58758.           because this destroys network credentials for all processes that 
  58759.           share the credentials. In order to release the storage allocated for 
  58760.           the login context without destroying the credentials file, use the 
  58761.           sec_login_release_context function. 
  58762.  
  58763.  Examples 
  58764.  
  58765.           The following example illustrates use of the sec_login_purge_context 
  58766.           routine as part of a straightforward login process: 
  58767.  
  58768.                     if (sec_login_setup_identity(user_name, sec_login_no_flags,
  58769.                     &login_context, &st)) {
  58770.                      ... get password from user...
  58771.  
  58772.                        if (sec_login_validate_identity(login_context, password,
  58773.                                                 &reset_passwd, &auth_src, &st)) {
  58774.  
  58775.                           if (!sec_login_certify_identity(login_context, &st))
  58776.                               exit(error_wierd_auth_svc);
  58777.  
  58778.                           sec_login_set_context(login_context, &st);
  58779.  
  58780.                           if (auth_src != sec_login_auth_src_network)
  58781.                              printf("no network credentials");
  58782.  
  58783.                           if (reset_passwd) {
  58784.                            ... get new password from user, reset registry record ...
  58785.                           };
  58786.  
  58787.                           sec_login_get_pwent(login_context, &pw_entry, &st);
  58788.  
  58789.                           if (pw_entry.pw_expire < todays_date) {
  58790.                              sec_login_purge_context(&login_context, &st);
  58791.                              exit(0)
  58792.                           }
  58793.  
  58794.                         ... any other application specific login valid actions ...
  58795.                           }
  58796.  
  58797.                        } else {
  58798.                           sec_login_purge_context(&login_context, &st);
  58799.  
  58800.                         ... application specific login failure actions ...
  58801.                        }
  58802.                     }
  58803.  
  58804.  Related Information 
  58805.  
  58806.           Routines: 
  58807.           sec_login_release_context 
  58808.           sec_login_set_context 
  58809.           sec_login_setup_identity 
  58810.           sec_login_validate_identity 
  58811.           sec_login_purge_context_exp 
  58812.  
  58813.  
  58814. ΓòÉΓòÉΓòÉ 8.7.23. sec_login_purge_context_exp ΓòÉΓòÉΓòÉ
  58815.  
  58816.  Purpose 
  58817.  
  58818.           Purges expired contexts. 
  58819.  
  58820.  Format 
  58821.  
  58822.                     #include  <dce/sec_login.h>
  58823.  
  58824.                     void sec_login_purge_context_exp(
  58825.                             unsigned32  buf_len,
  58826.                             ndr_byte  buf[],
  58827.                             signed32  purge_time,
  58828.                             error_status_t  *status);
  58829.  
  58830.  Parameters 
  58831.  
  58832.           Input 
  58833.  
  58834.           buf_len       The allocated length (in bytes) of the buffer 
  58835.                         containing the login context. 
  58836.  
  58837.           buf[]         An idl_byte array containing the expired login context. 
  58838.  
  58839.           purge_time    Indicates the expiration time. The name ticket is 
  58840.                         purged if it expires before the time indicated in 
  58841.                         purge_time. 
  58842.  
  58843.           Output 
  58844.  
  58845.           status        A pointer to the completion status.  On successful 
  58846.                         completion, the routine returns error_status_ok. 
  58847.                         Otherwise, it returns one of the following errors: 
  58848.  
  58849.                              sec_login_s_context_invalid The login context 
  58850.                                                   itself is not valid. 
  58851.  
  58852.                              sec_login_s_default_use Unpermitted use of the 
  58853.                                                   default login handle 
  58854.                                                   occurred. 
  58855.  
  58856.  Usage 
  58857.  
  58858.           The sec_login_purge_context_exp routine frees any storage allocated 
  58859.           for any expired network credentials. 
  58860.  
  58861.  Related Information 
  58862.  
  58863.           Routines: 
  58864.           sec_login_purge_context 
  58865.  
  58866.           Files: 
  58867.           \usr\include\dce\sec_login.idl - The idl file from which 
  58868.           dce\sec_login.h was derived. 
  58869.  
  58870.  
  58871. ΓòÉΓòÉΓòÉ 8.7.24. sec_login_refresh_identity ΓòÉΓòÉΓòÉ
  58872.  
  58873.  Purpose 
  58874.  
  58875.           Refreshes an authenticated identity for a login context. 
  58876.  
  58877.  Library 
  58878.  
  58879.           \lib\dceos2.lib 
  58880.  
  58881.  Format 
  58882.  
  58883.                     #include <dce/sec_login.h>
  58884.  
  58885.                     boolean32 sec_login_refresh_identity(
  58886.                              sec_login_handle_t  login_context,
  58887.                              error_status_t  *status);
  58888.  
  58889.  Parameters 
  58890.  
  58891.           Input 
  58892.  
  58893.           login_context An opaque handle to login context data. The login 
  58894.                         context contains, among other data, the account 
  58895.                         principal name and UUID, account restrictions, records 
  58896.                         of group membership, and the process home directory. 
  58897.  
  58898.           Output 
  58899.  
  58900.           status        A pointer to the completion status.  On successful 
  58901.                         completion, the routine returns error_status_ok. 
  58902.                         Otherwise, it returns one of the following errors: 
  58903.  
  58904.                              sec_rgy_object_not_found Principal no longer 
  58905.                                                   exists. 
  58906.  
  58907.                              sec_rgy_server_unavailable Network registry not 
  58908.                                                   available. 
  58909.  
  58910.                              sec_login_s_auth_local Operation not valid on 
  58911.                                                   local context. 
  58912.  
  58913.                              sec_login_s_default_use Unpermitted use of the 
  58914.                                                   default login handle 
  58915.                                                   occurred. 
  58916.  
  58917.                              sec_login_s_no_memory Not enough memory is 
  58918.                                                   available to complete the 
  58919.                                                   operation. 
  58920.  
  58921.  Usage 
  58922.  
  58923.           The sec_login_refresh_identity routine refreshes a previously 
  58924.           established identity. It operates on an existing valid context, and 
  58925.           cannot be used to change credentials associated with that identity. 
  58926.           The refreshed identity reflects changes that affect ticket lifetimes, 
  58927.           but not other changes. For example, the identity reflects a change to 
  58928.           maximum ticket lifetime, but does not reflect the addition of the 
  58929.           identity as a member to a group. Only a DCE login reflects all 
  58930.           administrative changes that have been made since the last login. 
  58931.  
  58932.           The refreshed identity must be validated with 
  58933.           sec_login_validate_identity before it can be used. 
  58934.  
  58935.           It is an error to refresh a locally authenticated context. 
  58936.  
  58937.  Notes 
  58938.  
  58939.           The routine returns TRUE even if the context had to be changed. In 
  58940.           this case, the status contains the sec_login_s_refresh_ident_change 
  58941.           warning. This warning indicates that the principal account has 
  58942.           changed since the login context was first established.  This means 
  58943.           the refreshed context is different from the input context, and will 
  58944.           need to be validated again with sec_login_validate_identity. 
  58945.  
  58946.  Examples 
  58947.  
  58948.           Because the authenticated network identity for a process has a finite 
  58949.           lifetime, there is a risk it will expire during some long network 
  58950.           operation, and prevent the operation from completing. 
  58951.  
  58952.           If a server application must run with an authenticated network 
  58953.           identity because it is acting as a client of another server, the 
  58954.           sec_login routines can be used to check the network identity 
  58955.           expiration date and run sec_login_refresh_identity and 
  58956.           sec_login_validate_identity before the expiration date. This prevents 
  58957.           interruptions in the server's operation that are the result of 
  58958.           restrictions in the network access applied to an unauthenticated 
  58959.           identity. 
  58960.  
  58961.                     sec_login_get_expiration(login_context, &expire_time, &st);
  58962.  
  58963.                     if (expire_time < (current_time + operation_duration)) {
  58964.  
  58965.                        if (!sec_login_refresh_identity(login_context, &st)) {
  58966.                             ... login context cannot be renewed ...
  58967.                             ... sleep and try again ...
  58968.                                   {
  58969.                           } else {
  58970.  
  58971.                        if (sec_login_validate_identity(login_context, password,
  58972.                                               &reset_passwd, &auth_src, &st)) {
  58973.                             ... identity validated ...
  58974.                           } else {
  58975.                             ... validation failed ...
  58976.                             exit(error_validation_failure);
  58977.                           }
  58978.                        }
  58979.                     }
  58980.  
  58981.                     operation();
  58982.  
  58983.  Related Information 
  58984.  
  58985.           Routines: 
  58986.           sec_login_validate_identity 
  58987.           sec_login_tkt_request_options 
  58988.  
  58989.  
  58990. ΓòÉΓòÉΓòÉ 8.7.25. sec_login_release_context ΓòÉΓòÉΓòÉ
  58991.  
  58992.  Purpose 
  58993.  
  58994.           Frees storage allocated for a login context. 
  58995.  
  58996.  Library 
  58997.  
  58998.           \lib\dceos2.lib 
  58999.  
  59000.  Format 
  59001.  
  59002.                     #include <dce/sec_login.h>
  59003.  
  59004.                     void sec_login_release_context(
  59005.                             sec_login_handle_t  *login_context,
  59006.                             error_status_t  *status);
  59007.  
  59008.  Parameters 
  59009.  
  59010.           Input/Output 
  59011.  
  59012.           login_context A pointer to an opaque handle to login context data. 
  59013.                         The login context contains, among other data, the 
  59014.                         account principal name and UUID, account restrictions, 
  59015.                         records of group membership, and the process home 
  59016.                         directory. 
  59017.  
  59018.           Output 
  59019.  
  59020.           status        A pointer to the completion status.  On successful 
  59021.                         completion, the routine returns error_status_ok. 
  59022.                         Otherwise, it returns one of the following errors: 
  59023.  
  59024.                              sec_login_s_default_use Unpermitted use of the 
  59025.                                                   default login handle 
  59026.                                                   occurred. 
  59027.  
  59028.                              sec_login_s_context_invalid The login context 
  59029.                                                   itself is not valid. 
  59030.  
  59031.  Usage 
  59032.  
  59033.           The sec_login_release_context routine frees any memory allocated for 
  59034.           a login context.  Unlike sec_login_purge_context, it does not destroy 
  59035.           the associated network credentials that still reside in the 
  59036.           credential cache. 
  59037.  
  59038.  Related Information 
  59039.  
  59040.           Routines: 
  59041.           sec_login_purge_context 
  59042.  
  59043.  
  59044. ΓòÉΓòÉΓòÉ 8.7.26. sec_login_set_context ΓòÉΓòÉΓòÉ
  59045.  
  59046.  Purpose 
  59047.  
  59048.           Creates network credentials for a login context. 
  59049.  
  59050.  Library 
  59051.  
  59052.           \lib\dceos2.lib 
  59053.  
  59054.  Format 
  59055.  
  59056.                     #include <dce/sec_login.h>
  59057.  
  59058.                     void sec_login_set_context(
  59059.                             sec_login_handle_t  login_context,
  59060.                             error_status_t  *status);
  59061.  
  59062.  Parameters 
  59063.  
  59064.           Input 
  59065.  
  59066.           login_context An opaque handle to login context data.  The login 
  59067.                         context contains, among other data, the account 
  59068.                         principal name and UUID, account restrictions, records 
  59069.                         of group membership, and the process home directory. 
  59070.  
  59071.           Output 
  59072.  
  59073.           status        A pointer to the completion status.  On successful 
  59074.                         completion, the routine returns error_status_ok. 
  59075.                         Otherwise, it returns one of the following errors: 
  59076.  
  59077.                              sec_login_s_context_invalid The login context 
  59078.                                                   itself is not valid. 
  59079.  
  59080.                              sec_login_s_default_use Unpermitted use of the 
  59081.                                                   default login handle 
  59082.                                                   occurred. 
  59083.  
  59084.                              sec_login_s_auth_local The operation is not valid 
  59085.                                                   on the local context. 
  59086.  
  59087.  Usage 
  59088.  
  59089.           The sec_login_set_context routine sets the network credentials to 
  59090.           those specified by the login context.  This context must have been 
  59091.           previously validated.  Contexts acquired through 
  59092.           sec_login_get_current_context or sec_login_newgroups do not need to 
  59093.           be validated, because those routines return previously validated 
  59094.           contexts. You cannot perform this function if the context is marked 
  59095.           sec_login_credentials_private. Such a context can only be used as an 
  59096.           explicit context in user space applications. 
  59097.  
  59098.  Examples 
  59099.  
  59100.           The following example illustrates use of the sec_login_set_context 
  59101.           routine as part of a straightforward login process: 
  59102.  
  59103.                     if (sec_login_setup_identity(user_name, sec_login_no_flags, &login_context, &st)) {
  59104.                      ... get password from user...
  59105.  
  59106.                        if (sec_login_validate_identity(login_context, password,
  59107.                                                 &reset_passwd, &auth_src, &st)) {
  59108.  
  59109.                           if (!sec_login_certify_identity(login_context, &st))
  59110.                               exit(error_wierd_auth_svc);
  59111.  
  59112.                           sec_login_set_context(login_context, &st);
  59113.  
  59114.                           if (auth_src != sec_login_auth_src_network)
  59115.                              printf("no network credentials");
  59116.  
  59117.                           if (reset_passwd) {
  59118.                            ... get new password from user, reset registry record ...
  59119.                           };
  59120.  
  59121.                           sec_login_get_pwent(login_context, &pw_entry, &st);
  59122.  
  59123.                           if (pw_entry.pw_expire < todays_date) {
  59124.                              sec_login_purge_context(&login_context, &st);
  59125.                              exit(0)
  59126.                           }
  59127.  
  59128.                           ... any other application specific login valid actions ....
  59129.                        }
  59130.  
  59131.                        } else {
  59132.                           sec_login_purge_context(&login_context, &st);
  59133.  
  59134.                         ... application specific login failure actions ....
  59135.                        }
  59136.                     }
  59137.  
  59138.  Related Information 
  59139.  
  59140.           Routines: 
  59141.           sec_login_get_current_context 
  59142.           sec_login_newgroups 
  59143.           sec_login_setup_identity 
  59144.           sec_login_validate_identity 
  59145.  
  59146.  
  59147. ΓòÉΓòÉΓòÉ 8.7.27. sec_login_set_extended_attrs ΓòÉΓòÉΓòÉ
  59148.  
  59149.  Purpose 
  59150.  
  59151.           Constructs a new login context that contains extended registry 
  59152.           attributes. 
  59153.  
  59154.  Format 
  59155.  
  59156.                     #include <dce\sec_login.h>
  59157.  
  59158.                     sec_login_handle_t  sec_login_set_extended_attrs(
  59159.                             sec_login_handle_t  my_login_context,
  59160.                             unsigned32  num_attributes,
  59161.                             sec_attr_t  attributes[],
  59162.                             error_status_t  *status);
  59163.  
  59164.  Parameters 
  59165.  
  59166.           Input 
  59167.  
  59168.           my_login_context A value of sec_login_handle_t that provides an 
  59169.                         opaque handle to the identity of the calling client. 
  59170.  
  59171.           num_attributes An unsigned 32-bit integer that specifies the number 
  59172.                         of elements in the attributes array.  The number must 
  59173.                         be greater than 0. 
  59174.  
  59175.           attributes    An array of values of type sec_attr_t that specifies 
  59176.                         the list of attributes to be set in the new login 
  59177.                         context. 
  59178.  
  59179.           Output 
  59180.  
  59181.           status        A pointer to the completion status.  On successful 
  59182.                         completion, status is assigned error_status_ok. 
  59183.                         Otherwise, it returns sec_login_s_context_invalid. 
  59184.  
  59185.  Usage 
  59186.  
  59187.           The sec_login_set_extended_attrs routine constructs a login context 
  59188.           that contains extended registry attributes that have been established 
  59189.           for the object identified by my_login_context. The attributes 
  59190.           themselves must have been established and attached to the object 
  59191.           using the Extended Registry Attribute API. 
  59192.  
  59193.           The input attributes array of sec_attr_t values should specify the 
  59194.           attr_id field for each requested attribute. Because the lookup is by 
  59195.           attribute type ID only, set the attribute.attr_value.attr_encoding 
  59196.           field to sec_attr_enc_void for each attribute. Note that sec_attr_t 
  59197.           is an Extended Registry Attribute (ERA) data type. For more 
  59198.           information on ERAs, see DCE Extended Registry Attribute API and the 
  59199.           DCE for OS/2 Warp: Application Development Guide - Core Components. 
  59200.  
  59201.           You cannot use this routine to add extended registry attributes to a 
  59202.           delegation chain. If you pass in a login context that refers to a 
  59203.           delegation chain, an error is returned that indicates the context is 
  59204.           not valid. 
  59205.  
  59206.           The routine returns a new login context of type sec_login_handle_t 
  59207.           that includes the attributes specified in the attributes array. 
  59208.  
  59209.  Related Information 
  59210.  
  59211.           Routines: 
  59212.           sec_login_become_impersonator 
  59213.           sec_login_set_context 
  59214.           sec_login_setup_identity 
  59215.           sec_login_validate_identity 
  59216.  
  59217.           Books: 
  59218.           DCE for OS/2 Warp: Application Development Guide - Core Components 
  59219.  
  59220.           Files: 
  59221.           \usr\include\dce\sec_login.idl - The idl file from which 
  59222.           dce/sec_login.h was derived. 
  59223.  
  59224.  
  59225. ΓòÉΓòÉΓòÉ 8.7.28. sec_login_setup_first ΓòÉΓòÉΓòÉ
  59226.  
  59227.  Purpose 
  59228.  
  59229.           Sets up the default network context. 
  59230.  
  59231.  Library 
  59232.  
  59233.           \lib\dceos2.lib 
  59234.  
  59235.  Format 
  59236.  
  59237.                     #include <dce\sec_login.h>
  59238.  
  59239.                     boolean32 sec_login_setup_first(
  59240.                              sec_login_handle_t  *init_context,
  59241.                              error_status_t  *status);
  59242.  
  59243.  Parameters 
  59244.  
  59245.           Output 
  59246.  
  59247.           init_context  A pointer to an opaque handle to login context data. 
  59248.                         The login context contains, among other data, the 
  59249.                         account principal name and UUID, account restrictions, 
  59250.                         records of group membership, and the process home 
  59251.                         directory.  In this routine, the context is that of the 
  59252.                         host machine initial process. 
  59253.  
  59254.           status        A pointer to the completion status.  On successful 
  59255.                         completion, the routine returns error_status_ok. 
  59256.                         Otherwise, it returns one of the following errors: 
  59257.  
  59258.                              sec_login_s_default_use The default context is 
  59259.                                                    already in use and does not 
  59260.                                                    need to be set up again. 
  59261.  
  59262.                              sec_login_s_no_current_context The calling process 
  59263.                                                    has no context of its own. 
  59264.  
  59265.                              sec_login_s_privileged An unprivileged process was 
  59266.                                                    called in. 
  59267.  
  59268.                              sec_login_s_config    The DCE configuration 
  59269.                                                    (dce_config) information is 
  59270.                                                    not available. 
  59271.  
  59272.                              sec_rgy_object_not_found The principal does not 
  59273.                                                    exist. 
  59274.  
  59275.                              sec_rgy_server_unavailable The network registry is 
  59276.                                                    not available. 
  59277.  
  59278.                              sec_login_s_no_memory Memory allocation has 
  59279.                                                    failed. 
  59280.  
  59281.  Usage 
  59282.  
  59283.           The sec_login_setup_first routine sets up the default context network 
  59284.           identity. If the default context already contains valid credentials, 
  59285.           the routine fails. Typically, this routine is called from the 
  59286.           Security Validation Service of the dced process to enable the default 
  59287.           credentials for the host machine process hierarchy. 
  59288.  
  59289.           This routine uses the DCE host name available from the local 
  59290.           dce_config interface as the principal name for the setup, so it does 
  59291.           not need a principal name as input. 
  59292.  
  59293.  Return Codes 
  59294.  
  59295.           The routine returns a boolean32 value:  TRUE if the setup was 
  59296.           successful, and FALSE otherwise. 
  59297.  
  59298.  Related Information 
  59299.  
  59300.           Routines: 
  59301.           sec_login_init_first 
  59302.           sec_login_validate_first 
  59303.  
  59304.  
  59305. ΓòÉΓòÉΓòÉ 8.7.29. sec_login_setup_identity ΓòÉΓòÉΓòÉ
  59306.  
  59307.  Purpose 
  59308.  
  59309.           Sets up the user's network identity. 
  59310.  
  59311.  Library 
  59312.  
  59313.           \lib\dceos2.lib 
  59314.  
  59315.  Format 
  59316.  
  59317.                     #include <dce\sec_login.h>
  59318.  
  59319.                     boolean32 sec_login_setup_identity(
  59320.                              unsigned_char_p_t  principal,
  59321.                              sec_login_flags_t  flags,
  59322.                              sec_login_handle_t  *login_context,
  59323.                              error_status_t  *status);
  59324.  
  59325.  Parameters 
  59326.  
  59327.           Input 
  59328.  
  59329.           principal     A pointer indicating a character string containing the 
  59330.                         principal name on the registry account corresponding to 
  59331.                         the calling process. 
  59332.  
  59333.                         The principal parameter can accept a principal name for 
  59334.                         the local registry (for example, sandy), or it can 
  59335.                         accept a principal name from another cell (for example, 
  59336.                         /.../bigcell.austin.ibm.com/sandy). In the second 
  59337.                         example, /.../bigcell.austin.ibm.com/ is the name of 
  59338.                         the cell and sandy is the principal name within that 
  59339.                         cell. 
  59340.  
  59341.           flags         A set of flags of type sec_login_flags_t. These contain 
  59342.                         information about how the new network credentials are 
  59343.                         to be used. 
  59344.  
  59345.           Output 
  59346.  
  59347.           login_context A pointer to an opaque handle to login context data. 
  59348.                         The login context contains, among other data, the 
  59349.                         account principal name and UUID, account restrictions, 
  59350.                         records of group membership, and the process home 
  59351.                         directory. 
  59352.  
  59353.           status        A pointer to the completion status.  On successful 
  59354.                         completion, the routine returns error_status_ok. 
  59355.                         Otherwise, it returns one of the following errors: 
  59356.  
  59357.                              sec_rgy_object_not_found The principal does not 
  59358.                                                   exist. 
  59359.  
  59360.                              sec_rgy_server_unavailable The network registry is 
  59361.                                                   not available. 
  59362.  
  59363.                              sec_login_s_no_memory Not enough memory is 
  59364.                                                   available to complete the 
  59365.                                                   operation. 
  59366.  
  59367.  Usage 
  59368.  
  59369.           The sec_login_setup_identity routine creates any local context 
  59370.           necessary to perform authenticated network operations. It does not 
  59371.           establish any local operating system context; that is the 
  59372.           responsibility of the caller. It is the standard network login 
  59373.           routine. The network identity set up by this operation cannot be used 
  59374.           until it is validated by means of sec_login_validate_identity. 
  59375.  
  59376.           The sec_login_setup_identity operation and the 
  59377.           sec_login_validate_identity operation are two halves of a single 
  59378.           logical operation. Together they collect the identity data needed to 
  59379.           establish an authenticated identity. 
  59380.  
  59381.           When a process is finished using a login context, it can issue a call 
  59382.           to sec_login_release_context to free storage occupied by the context 
  59383.           handle. When a process releases a login context, the context data in 
  59384.           the credentials file is still available to other processes that use 
  59385.           it. If an application needs to destroy a login context, it can call 
  59386.           sec_login_purge_context. The sec_login_purge_context routine destroys 
  59387.           the credentials file relating to the login context in addition to 
  59388.           issuing a call to sec_login_release_context to release the context 
  59389.           handle. Because a destroyed context file is unavailable to all 
  59390.           processes that use it, application developers should be careful when 
  59391.           using sec_login_purge_context to destroy the current context. 
  59392.  
  59393.  Return Codes 
  59394.  
  59395.           The routine returns TRUE if the identity has been successfully 
  59396.           established, and FALSE if the operation fails. 
  59397.  
  59398.  Examples 
  59399.  
  59400.           The following example illustrates use of the sec_login_setup_identity 
  59401.           routine as part of a straightforward login process: 
  59402.  
  59403.                     if (sec_login_setup_identity(user_name, sec_login_no_flags, &login_context, &st)) {
  59404.                      ... get password from user...
  59405.  
  59406.                        if (sec_login_validate_identity(login_context, password,
  59407.                                                 &reset_passwd, &auth_src, &st)) {
  59408.  
  59409.                           if (!sec_login_certify_identity(login_context, &st))
  59410.                               exit(error_weird_auth_svc);
  59411.  
  59412.                           sec_login_set_context(login_context, &st);
  59413.  
  59414.                           if (auth_src != sec_login_auth_src_network)
  59415.                              printf("no network credentials");
  59416.  
  59417.                           if (reset_passwd) {
  59418.                            ... get new password from user, reset registry record ...
  59419.                           };
  59420.  
  59421.                           sec_login_get_pwent(login_context, &pw_entry, &st);
  59422.  
  59423.                           if (pw_entry.pw_expire < todays_date) {
  59424.                              sec_login_purge_context(&login_context, &st);
  59425.                              exit(0)
  59426.                           }
  59427.  
  59428.                           ... any other application specific login valid actions ...
  59429.                        }
  59430.  
  59431.                        } else {
  59432.                           sec_login_purge_context(&login_context, &st);
  59433.  
  59434.                         ... application specific login failure actions ...
  59435.                        }
  59436.                     }
  59437.  
  59438.  Related Information 
  59439.  
  59440.           Routines: 
  59441.           sec_login_purge_context 
  59442.           sec_login_release_context 
  59443.           sec_login_set_context 
  59444.           sec_login_tkt_request_options 
  59445.           sec_login_validate_identity 
  59446.  
  59447.  
  59448. ΓòÉΓòÉΓòÉ 8.7.30. sec_login_tkt_request_options ΓòÉΓòÉΓòÉ
  59449.  
  59450.  Purpose 
  59451.  
  59452.           This routine is used by a client to request specific AS ticket 
  59453.           options. 
  59454.  
  59455.  Format 
  59456.  
  59457.                     #include <dce\sec_login.h>
  59458.                     void sec_login_tkt_request_options (
  59459.                             sec_login_handle_t  login_context,
  59460.                             sec_login_tkt_info_t  *tkt_info,
  59461.                             error_status_t  *status);
  59462.  
  59463.  Parameters 
  59464.  
  59465.           Input 
  59466.  
  59467.           login_context A pointer to an opaque handle to login context data. 
  59468.                         The login context contains, among other data, the 
  59469.                         account principal name and UUID, account restrictions, 
  59470.                         records of group membership, and the process home 
  59471.                         directory. 
  59472.  
  59473.           tkt_info      A structure which specifies the types of ticket options 
  59474.                         requested. 
  59475.  
  59476.           Output 
  59477.  
  59478.           status        A pointer to the completion status.  On successful 
  59479.                         completion, error_status_ok is returned. 
  59480.  
  59481.  Usage 
  59482.  
  59483.           This routine is used by a client to request specific AS ticket 
  59484.           options. This optional routine should be called after a call to 
  59485.           sec_login_setup_identity or sec_login_refresh_identity and before a 
  59486.           call to sec_login_validate_identity or 
  59487.           sec_login_valid_and_cert_ident. Input should consist of a login 
  59488.           context handle in the setup or refreshed state, and a structure which 
  59489.           specifies the types of ticket options requested. If the user requests 
  59490.           a renewable or postdated ticket, or a non-default ticket lifetime, 
  59491.           additional data must be provided in the renewable_lifetime, 
  59492.           postdated_dormanttime, and lifetime fields of the 
  59493.           sec_login_tkt_info_t structure, respectively. 
  59494.  
  59495.  Related Information 
  59496.  
  59497.           sec_login_setup_identity 
  59498.           sec_login_refresh_identity 
  59499.           sec_login_validate_identity 
  59500.           sec_login_valid_and_cert_ident 
  59501.  
  59502.           Files: 
  59503.           \usr\include\dce\sec_login.idl - The idl file from which 
  59504.           dce\sec_login.h was derived. 
  59505.  
  59506.  
  59507. ΓòÉΓòÉΓòÉ 8.7.31. sec_login_valid_and_cert_ident ΓòÉΓòÉΓòÉ
  59508.  
  59509.  Purpose 
  59510.  
  59511.           Validates and certifies a login context. 
  59512.  
  59513.  Library 
  59514.  
  59515.           \lib\dceos2.lib 
  59516.  
  59517.  Format 
  59518.  
  59519.                     #include <dce\sec_login.h>
  59520.  
  59521.                     boolean32 sec_login_valid_and_cert_ident(
  59522.                              sec_login_handle_t  login_context,
  59523.                              sec_passwd_rec_t  *passwd,
  59524.                              boolean32  *reset_passwd,
  59525.                              sec_login_auth_src_t  *auth_src,
  59526.                              error_status_t  *status);
  59527.  
  59528.  Parameters 
  59529.  
  59530.           Input 
  59531.  
  59532.           login_context An opaque handle to login context data.  The login 
  59533.                         context contains, among other data, the account 
  59534.                         principal name and UUID, account restrictions, records 
  59535.                         of group membership, and the process home directory. 
  59536.  
  59537.           passwd        A password record to be checked against the password in 
  59538.                         the principal's registry account.  The routine returns 
  59539.                         TRUE if the two match. The contents of the passwd 
  59540.                         parameter are erased after the routine has finished 
  59541.                         processing it. 
  59542.  
  59543.           Output 
  59544.  
  59545.           reset_passwd  A pointer to a 32-bit boolean32 value. The routine 
  59546.                         returns TRUE if the account password has expired and 
  59547.                         must be reset. 
  59548.  
  59549.           auth_src      A 32-bit set of flags identifying the source of the 
  59550.                         authentication. Upon return after successful 
  59551.                         authentication, the flags in auth_src indicate what 
  59552.                         authority was used to validate the login context.  If 
  59553.                         the authentication was accomplished with the network 
  59554.                         authority, the sec_login_auth_src_network flag is set, 
  59555.                         and the process login context has credentials to use 
  59556.                         the network.  If the authentication was accomplished 
  59557.                         with local data only (either the principal's account is 
  59558.                         tailored for the local machine with overrides, or the 
  59559.                         network authority is unavailable), the 
  59560.                         sec_login_auth_src_local flag is set. Login contexts 
  59561.                         that are authenticated locally must not be used to 
  59562.                         establish network credentials because they have none. 
  59563.  
  59564.           status        A pointer to the completion status.  On successful 
  59565.                         completion, the routine returns error_status_ok. 
  59566.                         Otherwise, it returns one of the following errors: 
  59567.  
  59568.                              sec_rgy_passwd_invalid  The input string does not 
  59569.                                                      match the account 
  59570.                                                      password. 
  59571.  
  59572.                              sec_rgy_server_unavailable The DCE Registry Server 
  59573.                                                      is unavailable. 
  59574.  
  59575.                              sec_rgy_s_acct_invalid  The account is not valid 
  59576.                                                      or has expired. 
  59577.  
  59578.                              sec_login_s_privileged  This is a privileged 
  59579.                                                      operation and was called 
  59580.                                                      by an unprivileged 
  59581.                                                      process. 
  59582.  
  59583.                              sec_login_s_default_use The input context was the 
  59584.                                                      default context, which 
  59585.                                                      cannot be validated. 
  59586.  
  59587.                              sec_login_s_already_valid The login context has 
  59588.                                                      already been validated. 
  59589.  
  59590.                              sec_login_s_unsupp_passwd_type The password type 
  59591.                                                      is not supported. 
  59592.  
  59593.                              sec_login_s_null_password The zero-length password 
  59594.                                                      supplied. 
  59595.  
  59596.                              sec_login_s_no_memory   Not enough memory is 
  59597.                                                      available to complete the 
  59598.                                                      operation. 
  59599.  
  59600.                              sec_login_s_preauth_failed Preauthentication has 
  59601.                                                      failed. 
  59602.  
  59603.  Usage 
  59604.  
  59605.           The sec_login_valid_and_cert_ident routine validates and certifies a 
  59606.           login context established with sec_login_setup_identity.  The caller 
  59607.           must supply the user's password as input with the passwd parameter. 
  59608.  
  59609.           This routine combines the operations of the 
  59610.           sec_login_validate_identity and sec_login_certify_identity routines. 
  59611.           It is intended for use by system login programs that need to extract 
  59612.           trustworthy operating system credentials for use in setting the local 
  59613.           identity for a process.  This operation destroys the contents of the 
  59614.           passwd input parameter. 
  59615.  
  59616.           If the network security service is unavailable on the host, a locally 
  59617.           authenticated context is created, and the auth_src parameter is set 
  59618.           to sec_login_auth_src_local. Data extracted from a locally 
  59619.           authenticated context can be used to set the local OS identity, but 
  59620.           it cannot be used to establish network credentials 
  59621.  
  59622.  Return Codes 
  59623.  
  59624.           The routine returns TRUE if the login identity has been successfully 
  59625.           validated, and FALSE if the operation fails. 
  59626.  
  59627.  Examples 
  59628.  
  59629.           The following example illustrates use of the 
  59630.           sec_login_valid_and_cert_ident routine as part of a system login 
  59631.           process: 
  59632.  
  59633.                     if (sec_login_setup_identity(<user>, sec_login_no_flags, &login_context, &st)) {
  59634.                            ... get password ...
  59635.                              if (sec_login_valid_and_cert_ident(login_context,
  59636.                                   password, &st)) {
  59637.                                    if (auth_src == sec_login_auth_src_network) {
  59638.                                       if (GOOD_STATUS(&st)
  59639.                                       sec_login_set_context(login_context);
  59640.                                       }
  59641.                              }
  59642.                              if (reset_passwd) {
  59643.                               ... reset the user's password ...
  59644.                                 if (passwd_reset_fails) {
  59645.                                     sec_login_purge_context(login_context)
  59646.                                   ... application login failure actions ...
  59647.                              }
  59648.                            ... application specific login valid actions ...
  59649.                          }
  59650.                     }
  59651.  
  59652.  Related Information 
  59653.  
  59654.           Routines: 
  59655.           sec_login_certify_identity 
  59656.           sec_login_setup_identity 
  59657.           sec_login_validate_identity 
  59658.           sec_login_tkt_request_options 
  59659.  
  59660.  
  59661. ΓòÉΓòÉΓòÉ 8.7.32. sec_login_valid_from_keytable ΓòÉΓòÉΓòÉ
  59662.  
  59663.  Purpose 
  59664.  
  59665.           Validates a login context's identity using input from a specified 
  59666.           keytable file. 
  59667.  
  59668.  Format 
  59669.  
  59670.                     #include <dce\sec_login.h>
  59671.  
  59672.                     void  sec_login_valid_from_keytable(
  59673.                              sec_login_handle_t  login_context,
  59674.                              sec_key_mgmt_authn_service  authn_service,
  59675.                              void  *arg,
  59676.                              unsigned32  try_kvno,
  59677.                              unsigned32  *used_kvno,
  59678.                              boolean32  *reset_passwd,
  59679.                              sec_login_auth_src_t  *auth_src,
  59680.                              error_status_t  *status);
  59681.  
  59682.  Parameters 
  59683.  
  59684.           Input 
  59685.  
  59686.           login_context An opaque handle to login context data.  The login 
  59687.                         context contains, among other data, the account 
  59688.                         principal's name and UUID, account restrictions, 
  59689.                         records of the account principal's group memberships, 
  59690.                         and the account's home directory. 
  59691.  
  59692.           authn_service Identifies the authentication protocol using the key. 
  59693.                         The possible authentication protocols are as follows: 
  59694.  
  59695.                              rpc_c_authn_dce_secret   DCE shared-secret key 
  59696.                                                       authentication. 
  59697.  
  59698.                              rpc_c_authn_dce_public   DCE public key 
  59699.                                                       authentication (reserved 
  59700.                                                       for future use). 
  59701.  
  59702.           arg           This parameter can specify either the local keytab file 
  59703.                         or an argument to the get_key_fn key acquisition 
  59704.                         routine of the rpc_server_register_auth_info routine. 
  59705.  
  59706.                         A value of NULL specifies that the default keytab file 
  59707.                         should be used.  A keytab file name specifies that the 
  59708.                         named file should be used as the keytab file.  You must 
  59709.                         prepend the file's absolute filename with FILE: and the 
  59710.                         file must have been created with the rgy_edit command 
  59711.                         or the sec_key_mgmt_set_key routine. 
  59712.  
  59713.                         Any other value specifies an argument for the 
  59714.                         get_key_fn key acquisition routine. See 
  59715.                         rpc_server_register_auth_info for more information. 
  59716.  
  59717.           try_kvno      The version number of the key in the keytab file to try 
  59718.                         first. Specify NULL to try the current version of the 
  59719.                         key. 
  59720.  
  59721.           Output 
  59722.  
  59723.           used_kvno     A pointer to a 32-bit boolean32 value that specifies 
  59724.                         the version number of the key from the keytab file that 
  59725.                         was used to successfully validate the login context, if 
  59726.                         any. 
  59727.  
  59728.           reset_passwd  A pointer to a 32-bit boolean32 value.  The routine 
  59729.                         returns TRUE if the account password has expired and 
  59730.                         should be reset. 
  59731.  
  59732.           auth_src      The way the login context was authorized. The 
  59733.                         sec_login_auth_src_t data type distinguishes the 
  59734.                         various ways the login context was authorized. There 
  59735.                         are three possible values: 
  59736.  
  59737.                              sec_login_auth_src_network Authentication is 
  59738.                                            accomplished using the normal 
  59739.                                            network authority. A login context 
  59740.                                            authenticated this way has all the 
  59741.                                            network credentials it should have. 
  59742.  
  59743.                              sec_login_auth_src_local Authentication is 
  59744.                                            accomplished using local data. 
  59745.                                            Authentication occurs locally if a 
  59746.                                            principal's account is tailored for 
  59747.                                            the local machine, or if the network 
  59748.                                            authority is unavailable. Because 
  59749.                                            login contexts authenticated locally 
  59750.                                            have no network credentials, they 
  59751.                                            can not be used for network 
  59752.                                            operations. 
  59753.  
  59754.                              sec_login_auth_src_overridden Authentication is 
  59755.                                            accomplished using the override 
  59756.                                            facility. 
  59757.  
  59758.           status        A pointer to the completion status.  On successful 
  59759.                         completion, status is assigned error_status_ok. 
  59760.                         Otherwise, it returns one of the following errors: 
  59761.  
  59762.                              sec_rgy_passwd_invalid The input string does not 
  59763.                                            match the account password. 
  59764.  
  59765.                              sec_rgy_server_unavailable There is no data with 
  59766.                                            which to compare the input string. 
  59767.  
  59768.                              sec_login_s_acct_invalid The account is not valid 
  59769.                                            or has expired. 
  59770.  
  59771.                              sec_login_s_default_use The input context was the 
  59772.                                            default context, which cannot be 
  59773.                                            validated. 
  59774.  
  59775.                              sec_login_s_already_valid The login context has 
  59776.                                            already been validated. 
  59777.  
  59778.                              sec_login_s_unsupp_passwd_type The password type 
  59779.                                            is not supported. 
  59780.  
  59781.                              sec_key_mgmt_e_key_unavailable The requested key 
  59782.                                            is not present. 
  59783.  
  59784.                              sec_key_mgmt_e_authn_invalid The authentication 
  59785.                                            protocol is not valid. 
  59786.  
  59787.                              sec_key_mgmt_e_unauthorized The caller is not 
  59788.                                            authorized to perform the operation. 
  59789.  
  59790.                              sec_s_no_memory Memory cannot be allocated. 
  59791.  
  59792.  Usage 
  59793.  
  59794.           The sec_login_valid_from_keytable routine validates the login context 
  59795.           established with sec_login_setup_identity. The 
  59796.           sec_login_valid_from_keytable routine obtains the principal's 
  59797.           password from the specified keytable. 
  59798.  
  59799.           If try_kvno specifies a key version number, that version number key 
  59800.           is tried first; otherwise, the current key version number is tried 
  59801.           first.  The routine tries all the keys in the keytable until it finds 
  59802.           one that validates the login context.  This operation must be run 
  59803.           before the network credentials can be used. 
  59804.  
  59805.  Notes 
  59806.  
  59807.           A context is not secure and must not be set or exported until the 
  59808.           authentication service is authenticated with the 
  59809.           sec_login_certify_identity routine. 
  59810.  
  59811.  Examples 
  59812.  
  59813.           The following example illustrates use of the 
  59814.           sec_login_valid_from_keytable routine as part of a straightforward 
  59815.           login process: 
  59816.  
  59817.                     if (sec_login_setup_identity(user_name, sec_login_no_flags, &login_context, &st))
  59818.                     {
  59819.                          ... get password from local keytable...
  59820.  
  59821.                          if (sec_login_valid_from_keytable(login_context, authn_service, arg, try_kvno,
  59822.                                          &used_kvno, &reset_passwd, &auth_src, &st))
  59823.                          {
  59824.                              sec_login_set_context(login_context, &st);
  59825.  
  59826.                              if (auth_src != sec_login_auth_src_network)
  59827.                                        printf("no network credentials");
  59828.                          }
  59829.  
  59830.                           ... any other application specific login valid actions ...
  59831.  
  59832.                     }
  59833.                     else
  59834.                     {
  59835.                           sec_login_purge_context(&login_context, &st);
  59836.                           {
  59837.                           ... application specific login failure actions ...
  59838.                           }
  59839.                     }
  59840.  
  59841.  Related Information 
  59842.  
  59843.           Routines: 
  59844.           sec_login_certify_identity 
  59845.           sec_login_setup_identity 
  59846.           sec_login_validate_identity 
  59847.           sec_login_valid_and_cert_ident 
  59848.  
  59849.           Files: 
  59850.           \usr\include\dce\sec_login.idl - The idl file from which 
  59851.           dce/sec_login.h was derived. 
  59852.  
  59853.  
  59854. ΓòÉΓòÉΓòÉ 8.7.33. sec_login_validate_cert_auth ΓòÉΓòÉΓòÉ
  59855.  
  59856.  Purpose 
  59857.  
  59858.           Validates certification authority. 
  59859.  
  59860.  Format 
  59861.  
  59862.                     #include <dce\sec_login.h>
  59863.  
  59864.                     void sec_login_validate_cert_auth
  59865.                             sec_login_handle_t  login_context,
  59866.                             error_status_t  *status);
  59867.  
  59868.  Parameters 
  59869.  
  59870.           Input 
  59871.  
  59872.           login_context A pointer to an opaque handle to login context data. 
  59873.                         The login context contains, among other data, the 
  59874.                         principal's identity that needs to be validated. 
  59875.  
  59876.           Output 
  59877.  
  59878.           status        A pointer to the completion status.  On successful 
  59879.                         completion, error_status_ok is returned. 
  59880.  
  59881.  Usage 
  59882.  
  59883.           The sec_login_validate_cert_auth routine validates the certification 
  59884.           authority by making sure that the client can make an authenticated 
  59885.           call. 
  59886.  
  59887.  Related Information 
  59888.  
  59889.           Routines: 
  59890.           sec_login_certify_identity 
  59891.  
  59892.           Files: 
  59893.           \usr\include\dce\sec_login.idl - The idl file from which 
  59894.           dce\sec_login.h was derived. 
  59895.  
  59896.  
  59897. ΓòÉΓòÉΓòÉ 8.7.34. sec_login_validate_first ΓòÉΓòÉΓòÉ
  59898.  
  59899.  Purpose 
  59900.  
  59901.           Validates the initial login context. 
  59902.  
  59903.  Library 
  59904.  
  59905.           \lib\dceos2.lib 
  59906.  
  59907.  Format 
  59908.  
  59909.                     #include <dce\sec_login.h>
  59910.  
  59911.                     boolean32 sec_login_validate_first(
  59912.                              sec_login_handle_t  init_context,
  59913.                              boolean32  *reset_passwd,
  59914.                              sec_login_auth_src_t  *auth_src,
  59915.                              error_status_t  *status);
  59916.  
  59917.  Parameters 
  59918.  
  59919.           Input 
  59920.  
  59921.           init_context  An opaque handle to login context data.  The login 
  59922.                         context contains, among other data, the account 
  59923.                         principal name and UUID, account restrictions, records 
  59924.                         of group membership, and the process home directory. In 
  59925.                         this routine, the context is the host machine initial 
  59926.                         process. 
  59927.  
  59928.           Output 
  59929.  
  59930.           reset_passwd  A pointer to a 32-bit boolean value.  The routine 
  59931.                         returns TRUE if the account password has expired and 
  59932.                         must be reset. 
  59933.  
  59934.           auth_src      How the login context was authorized.  The 
  59935.                         sec_login_auth_src_t data type distinguishes the 
  59936.                         various ways the login context was authorized.  There 
  59937.                         are three possible values: 
  59938.  
  59939.                           o  sec_login_auth_src_network 
  59940.                           o  sec_login_auth_src_local 
  59941.                           o  sec_login_auth_src_overridden. 
  59942.  
  59943.           status        A pointer to the completion status.  On successful 
  59944.                         completion, the routine returns error_status_ok. 
  59945.                         Otherwise, it returns one of the following errors: 
  59946.  
  59947.                              sec_login_s_privileged An unprivileged process was 
  59948.                                                   called in. 
  59949.  
  59950.                              sec_rgy_server_unavailable The network 
  59951.                                                   authentication service was 
  59952.                                                   unavailable. 
  59953.  
  59954.  Usage 
  59955.  
  59956.           The sec_login_validate_first routine validates the default login 
  59957.           context established by the sec_login_setup_first routine. Typically, 
  59958.           this operation is called from the Security Validation Service of the 
  59959.           dced process to validate the default credentials for the host machine 
  59960.           process hierarchy. Because this operation uses the password for the 
  59961.           local host, it does not require a password parameter. 
  59962.  
  59963.  Return Codes 
  59964.  
  59965.           The routine returns a boolean32 value that is TRUE if the setup was 
  59966.           successful and FALSE otherwise. 
  59967.  
  59968.  Related Information 
  59969.  
  59970.           Routines: 
  59971.           sec_login_init_first 
  59972.           sec_login_setup_first 
  59973.  
  59974.  
  59975. ΓòÉΓòÉΓòÉ 8.7.35. sec_login_validate_identity ΓòÉΓòÉΓòÉ
  59976.  
  59977.  Purpose 
  59978.  
  59979.           Validates a login context's identity. 
  59980.  
  59981.  Library 
  59982.  
  59983.           \lib\dceos2.lib 
  59984.  
  59985.  Format 
  59986.  
  59987.                     #include <dce\sec_login.h>
  59988.  
  59989.                     boolean32 sec_login_validate_identity(
  59990.                              sec_login_handle_t  login_context,
  59991.                              sec_passwd_rec_t  *passwd,
  59992.                              boolean32  *reset_passwd,
  59993.                              sec_login_auth_src_t  *auth_src,
  59994.                              error_status_t  *status);
  59995.  
  59996.  Parameters 
  59997.  
  59998.           Input 
  59999.  
  60000.           login_context An opaque handle to login context data. The login 
  60001.                         context contains, among other data, the account 
  60002.                         principal name and UUID, account restrictions, records 
  60003.                         of group membership, and the process home directory. 
  60004.  
  60005.           passwd        A password record to be checked against the password in 
  60006.                         the principal's registry account. The routine returns 
  60007.                         TRUE if the two match. The contents of the passwd 
  60008.                         parameter are erased after the routine has finished 
  60009.                         processing it. 
  60010.  
  60011.           Output 
  60012.  
  60013.           reset_passwd  A pointer to a 32-bit boolean32 value. The routine 
  60014.                         returns TRUE if the account password has expired and 
  60015.                         must be reset. 
  60016.  
  60017.           auth_src      The way the login context was authorized. The 
  60018.                         sec_login_auth_src_t data type distinguishes the 
  60019.                         various ways the login context was authorized.  There 
  60020.                         are three possible values: 
  60021.  
  60022.                           o  sec_login_auth_src_network 
  60023.                           o  sec_login_auth_src_local 
  60024.                           o  sec_login_auth_src_overridden. 
  60025.  
  60026.           status        A pointer to the completion status.  On successful 
  60027.                         completion, the routine returns error_status_ok. 
  60028.                         Otherwise, it returns one of the following errors: 
  60029.  
  60030.                              sec_rgy_passwd_invalid  The input string does not 
  60031.                                                      match the account 
  60032.                                                      password. 
  60033.  
  60034.                              sec_rgy_server_unavailable There is no data with 
  60035.                                                      which to compare the input 
  60036.                                                      string. 
  60037.  
  60038.                              sec_login_s_acct_invalid The account is not valid 
  60039.                                                      or has expired. 
  60040.  
  60041.                              sec_login_s_null_password The input string is 
  60042.                                                      NULL. 
  60043.  
  60044.                              sec_login_s_default_use Input context was the 
  60045.                                                      default context, which 
  60046.                                                      cannot be validated. 
  60047.  
  60048.                              sec_login_s_already_valid The login context has 
  60049.                                                      already been validated. 
  60050.  
  60051.                              sec_login_s_unsupp_passwd_type The password type 
  60052.                                                      is not supported. 
  60053.  
  60054.                              sec_login_s_no_memory   There is not enough memory 
  60055.                                                      to complete the operation. 
  60056.  
  60057.                              sec_login_s_preauth_failed Preauthentication had 
  60058.                                                      failed. 
  60059.  
  60060.  Usage 
  60061.  
  60062.           The sec_login_validate_identity routine validates the login context 
  60063.           established with sec_login_setup_identity. This operation must be run 
  60064.           before the network credentials can be used. The caller must supply 
  60065.           the user's password in a sec_passwd_rec_t structure as input with the 
  60066.           passwd parameter. The following example sets up a plain text password 
  60067.           for the passwd parameter: 
  60068.  
  60069.                     sec_passwd_str_t     tmp_passwd;
  60070.  
  60071.                     passwd.version_number = sec_passwd_c_version_none;
  60072.                     passwd.pepper = NULL;
  60073.                     passwd.key.key_type = sec_passwd_plain;
  60074.  
  60075.                     strncpy ((char *)tmp_passwd, (char *)my_passwd, sec_passwd_str_max_len);
  60076.                     tmp_passwd[sec_passwd_str_max_len] = ' ';
  60077.                     passwd_rev.key.tagged_union.plain = &(tmp_passwd[0]);
  60078.  
  60079.           When a network identity is set, only state information for network 
  60080.           operations has been established.  The local operating system identity 
  60081.           has not been modified.  It is the responsibility of the caller to 
  60082.           establish any local operating identity state. 
  60083.  
  60084.           The sec_login_setup_identity operation and the 
  60085.           sec_login_validate_identity operation are two halves of a single 
  60086.           logical operation.  Together, they collect the identity data needed 
  60087.           to establish an authenticated identity.  The operations are 
  60088.           independent, so the user's password need not be sent across the 
  60089.           network.  The identity validation performed by 
  60090.           sec_login_validate_identity is a local operation. 
  60091.  
  60092.  Notes 
  60093.  
  60094.           A context is not secure and must not be set or exported until the 
  60095.           authentication service is authenticated with the 
  60096.           sec_login_certify_identity routine. 
  60097.  
  60098.           System login programs that set local operating system identity using 
  60099.           data extracted from a login context should use 
  60100.           sec_login_valid_and_cert_ident instead of 
  60101.           sec_login_validate_identity. If the Security server and client clocks 
  60102.           are not synchronized to within 2 to 3 minutes of each other, this 
  60103.           routine can return a password validation error. 
  60104.  
  60105.  Return Codes 
  60106.  
  60107.           The routine returns TRUE if the login identity has been successfully 
  60108.           validated. 
  60109.  
  60110.  Examples 
  60111.  
  60112.           The following example illustrates use of the 
  60113.           sec_login_validate_identity routine as part of a straightforward 
  60114.           login process: 
  60115.  
  60116.                     if (sec_login_setup_identity(user_name, sec_login_no_flags, &login_context, &st)) {
  60117.                      ... get password from user...
  60118.  
  60119.                        if (sec_login_validate_identity(login_context, password,
  60120.                                                 &reset_passwd, &auth_src, &st)) {
  60121.  
  60122.                           if (!sec_login_certify_identity(login_context, &st))
  60123.                               exit(error_wierd_auth_svc);
  60124.  
  60125.                           sec_login_set_context(login_context, &st);
  60126.  
  60127.                           if (auth_src != sec_login_auth_src_network)
  60128.                              printf("no network credentials");
  60129.  
  60130.                           if (reset_passwd) {
  60131.                            ... get new password from user, reset registry record ...
  60132.                           };
  60133.  
  60134.                           sec_login_get_pwent(login_context, &pw_entry, &st);
  60135.  
  60136.                           if (pw_entry.pw_expire < todays_date) {
  60137.                              sec_login_purge_context(&login_context, &st);
  60138.                              exit(0)
  60139.                           }
  60140.  
  60141.                           ... any other application specific login valid actions ...
  60142.                        }
  60143.  
  60144.                        } else {
  60145.                           sec_login_purge_context(&login_context, &st);
  60146.  
  60147.                         ... application specific login failure actions ...
  60148.                        }
  60149.                     }
  60150.  
  60151.  Related Information 
  60152.  
  60153.           Routines: 
  60154.           sec_login_certify_identity 
  60155.           sec_login_setup_identity 
  60156.           sec_login_valid_and_cert_ident 
  60157.           sec_login_tkt_request_options 
  60158.  
  60159.  
  60160. ΓòÉΓòÉΓòÉ 8.8. DCE Password Management API ΓòÉΓòÉΓòÉ
  60161.  
  60162. The Password Management facility is intended to reduce the risk of unauthorized 
  60163. users obtaining user-generated passwords by providing the tools necessary to 
  60164. develop customized password management servers, and to call them from client 
  60165. password change programs. This facility enables cell administrators to: 
  60166.  
  60167.    o  Enforce constraints on users' password choices that are stricter than 
  60168.       those in the DCE Standard Policy 
  60169.  
  60170.    o  Offer, or force, automatic generation of user passwords 
  60171.  
  60172.  See the following topics for more information: 
  60173.  
  60174.       Password Management Data Types 
  60175.       Password Management Routines 
  60176.       Files 
  60177.  
  60178.  
  60179. ΓòÉΓòÉΓòÉ 8.8.1. Password Management Data Types ΓòÉΓòÉΓòÉ
  60180.  
  60181. The following data type is used in the Password Management API routines: 
  60182.  
  60183.  sec_passwd_mgmt_handle_t A pointer to an opaque handle consisting of password 
  60184.                management information about a principal. It is returned by 
  60185.                sec_pwd_mgmt_setup. 
  60186.  
  60187.  
  60188. ΓòÉΓòÉΓòÉ 8.8.2. Password Management Routines ΓòÉΓòÉΓòÉ
  60189.  
  60190. The Password Management facility includes the following routines: 
  60191.  
  60192.    o  The DCE Password Management interface, sec_pwd_mgmt..., which enables 
  60193.       clients to retrieve a principal's password management ERA values and to 
  60194.       request strength-checking and generation of passwords. 
  60195.  
  60196.    o  The DCE Password Management network interface, rsec_pwd_mgmt..., which 
  60197.       enables a password management server to accept and process password 
  60198.       strength-checking and generation requests. 
  60199.  
  60200.  The following is a list of the Password Management routines: 
  60201.  
  60202.       rsec_pwd_mgmt_gen_pwd 
  60203.       rsec_pwd_mgmt_str_chk 
  60204.       rsec_pwd_propagate 
  60205.       sec_pwd_mgmt_free_handle 
  60206.       sec_pwd_mgmt_gen_pwd 
  60207.       sec_pwd_mgmt_get_val_type 
  60208.       sec_pwd_mgmt_setup 
  60209.  
  60210.  
  60211. ΓòÉΓòÉΓòÉ 8.8.3. Files ΓòÉΓòÉΓòÉ
  60212.  
  60213. /usr/include/dce/sec_pwd_mgmt.idl - The idl file from which sec_pwd_mgmt.h was 
  60214. derived. 
  60215.  
  60216.  
  60217. ΓòÉΓòÉΓòÉ 8.8.4. rsec_pwd_mgmt_gen_pwd ΓòÉΓòÉΓòÉ
  60218.  
  60219.  Purpose 
  60220.  
  60221.           Generates a set of passwords. 
  60222.  
  60223.  Format 
  60224.  
  60225.                     #include <dce/rsec_pwd_mgmt.h>
  60226.  
  60227.                     void rsec_pwd_mgmt_gen_pwd(
  60228.                             handle_t  pwd_mgmt_svr_h,
  60229.                             sec_rgy_name_t  princ_name,
  60230.                             unsigned32  plcy_args,
  60231.                             sec_attr_t  plcy[],
  60232.                             sec_bytes_t  gen_info_in,
  60233.                             unsigned32  num_pwds,
  60234.                             unsigned32  *num_returned,
  60235.                             sec_passwd_rec_t  gen_pwd_set[],
  60236.                             sec_bytes_t  *gen_info_out,
  60237.                             error_status_t  *status)
  60238.  
  60239.  Parameters 
  60240.  
  60241.           Input 
  60242.  
  60243.           pwd_mgmt_svr_h An RPC binding handle to the password management 
  60244.                         server exporting this operation. 
  60245.  
  60246.           princ_name    The name of the principal requesting the generated 
  60247.                         passwords. 
  60248.  
  60249.           plcy_args     The size of the plcy array. 
  60250.  
  60251.           plcy[]        An array of extended registry attributes, each 
  60252.                         specifying a password management policy. The contents 
  60253.                         of this array are as follows: 
  60254.  
  60255.                              plcy[0]     Effective registry password minimum 
  60256.                                          length for the principal. 
  60257.  
  60258.                              plcy[1]     Effective registry password policy 
  60259.                                          flags for the principal, describing 
  60260.                                          limitations on password characters. 
  60261.  
  60262.           gen_info_in   An NDR pickle containing additional information needed 
  60263.                         to generate the passwords. There are currently no 
  60264.                         encoding types defined. 
  60265.  
  60266.           num_pwds      The number of generated passwords requested. 
  60267.  
  60268.           Output 
  60269.  
  60270.           num_returned  The number of generated passwords returned. 
  60271.  
  60272.           gen_pwd_set   An array of generated passwords, each stored in a 
  60273.                         sec_passwd_rec_t structure. 
  60274.  
  60275.           gen_info_out  An NDR pickle containing additional information 
  60276.                         returned by the password management server. There are 
  60277.                         currently no encoding types defined. 
  60278.  
  60279.           status        A pointer to the completion status.  On successful 
  60280.                         completion, the routine returns error_status_ok. 
  60281.                         Otherwise, it returns one of the following errors: 
  60282.  
  60283.                              sec_pwd_mgmt_not_authorized The user is not 
  60284.                                            authorized to call this API. 
  60285.  
  60286.                              sec_pwd_mgmt_svr_error Password Management Server 
  60287.                                            generic error. Additional 
  60288.                                            information is usually logged by the 
  60289.                                            password management server. 
  60290.  
  60291.  Usage 
  60292.  
  60293.           The rsec_pwd_mgmt_gen_pwd routine returns a set of generated 
  60294.           passwords. 
  60295.  
  60296.  Notes 
  60297.  
  60298.           This routine is not intended to be called by application programmers. 
  60299.           The sec_pwd_mgmt API provides all the functions necessary to retrieve 
  60300.           generated passwords. This section is provided for programmers who 
  60301.           want to write their own password management servers. 
  60302.  
  60303.           This network interface is called on the client side using the 
  60304.           sec_pwd_mgmt_gen_pwd operation. Developers are responsible for 
  60305.           implementing the server side of this interface. A sample password 
  60306.           management server called pwd_strengthd is provided as part of DCE. 
  60307.  
  60308.           (The plcy parameter is intended to be expandable to allow 
  60309.           administrators to attach new password policy ERAs to a principal. 
  60310.           This feature is, however, currently unsupported, and the plcy 
  60311.           parameter consists only of the entries described previously.) 
  60312.  
  60313.  Related Information 
  60314.  
  60315.           Routines: 
  60316.           rsec_pwd_mgmt_str_chk 
  60317.  
  60318.           Files: 
  60319.           /usr/include/dce/rsec_pwd_mgmt.idl - The idl file from which 
  60320.           dce/rsec_pwd_mgmt.h was derived. 
  60321.  
  60322.  
  60323. ΓòÉΓòÉΓòÉ 8.8.5. rsec_pwd_mgmt_str_chk ΓòÉΓòÉΓòÉ
  60324.  
  60325.  Purpose 
  60326.  
  60327.           Checks the strength of a password. 
  60328.  
  60329.  Format 
  60330.  
  60331.                     #include <dce/rsec_pwd_mgmt.h>
  60332.  
  60333.                     boolean32  rsec_pwd_mgmt_str_chk(
  60334.                             handle_t  handle,
  60335.                             sec_rgy_name_t  princ,
  60336.                             sec_passwd_rec_t  *pwd,
  60337.                             signed32  pwd_val_type,
  60338.                             unsigned32  plcy_args,
  60339.                             sec_attr_t  plcy[],
  60340.                             sec_bytes_t  str_info_in,
  60341.                             sec_bytes_t  *str_info_out,
  60342.                             error_status_t  *status);
  60343.  
  60344.  Parameters 
  60345.  
  60346.           Input 
  60347.  
  60348.           handle        An RPC binding handle to the password management server 
  60349.                         exporting this operation. 
  60350.  
  60351.           princ         The name of the principal requesting the generated 
  60352.                         passwords. 
  60353.  
  60354.           pwd           A pointer to the password to be strength-checked. 
  60355.  
  60356.           pwd_val_type  The value of the user's password validation type (as 
  60357.                         stored in the pwd_val_type ERA). 
  60358.  
  60359.           plcy_args     The size of the plcy array. 
  60360.  
  60361.           plcy[]        An array of extended registry attributes, each 
  60362.                         specifying a password management policy. The contents 
  60363.                         of this array are: 
  60364.  
  60365.                              plcy[0]     Effective registry password minimum 
  60366.                                          length for the principal. 
  60367.  
  60368.                              plcy[1]     Effective registry password policy 
  60369.                                          flags for the principal, describing 
  60370.                                          limitations on password characters 
  60371.  
  60372.           str_info_in   An NDR pickle containing additional information needed 
  60373.                         to strength-check the password. There are currently no 
  60374.                         encoding types defined. 
  60375.  
  60376.           Output 
  60377.  
  60378.           str_info_out  An NDR pickle containing additional information 
  60379.                         returned by the password management server. There are 
  60380.                         currently no encoding types defined. 
  60381.  
  60382.           status        A pointer to the completion status.  On successful 
  60383.                         completion, the routine returns error_status_ok. 
  60384.                         Otherwise, it returns one of the following errors: 
  60385.  
  60386.                              sec_pwd_mgmt_str_check_failed The password failed 
  60387.                                            the server's strength checking 
  60388.                                            algorithm. 
  60389.  
  60390.                              sec_pwd_mgmt_not_authorized The user is not 
  60391.                                            authorized to call this API. 
  60392.  
  60393.                              sec_pwd_mgmt_svr_error Password Management Server 
  60394.                                            generic error. Additional 
  60395.                                            information is usually logged by the 
  60396.                                            password management server. 
  60397.  
  60398.  Usage 
  60399.  
  60400.           The rsec_pwd_mgmt_str_chk routine strength-checks a password. 
  60401.  
  60402.  Notes 
  60403.  
  60404.           This routine is not intended to be called by application programmers. 
  60405.           The registry server provides all the functions necessary to 
  60406.           strength-check passwords. This reference page is provided for 
  60407.           programmers who want to write their own password management servers. 
  60408.  
  60409.           This network interface is called on the client side using secd. 
  60410.           Developers are responsible for implementing the server side of this 
  60411.           interface. A sample password management server called pwd_strengthd 
  60412.           is provided as part of DCE. 
  60413.  
  60414.           (The plcy parameter is intended to be expandable to allow 
  60415.           administrators to attach new password policy ERAs to a principal. 
  60416.           This feature is, however, currently unsupported, and the plcy 
  60417.           parameter consists only of the entries previously described.) 
  60418.  
  60419.  Return Codes 
  60420.  
  60421.           The rsec_pwd_mgmt_str_chk routine returns TRUE if the user's password 
  60422.           passes the server's strength-checking algorithm and FALSE if it does 
  60423.           not. 
  60424.  
  60425.  Related Information 
  60426.  
  60427.           Routines: 
  60428.           rsec_pwd_mgmt_gen_pwd 
  60429.  
  60430.           Files: 
  60431.           /usr/include/dce/rsec_pwd_mgmt.idl - The idl file from which 
  60432.           dce/rsec_pwd_mgmt.h was derived. 
  60433.  
  60434.  
  60435. ΓòÉΓòÉΓòÉ 8.8.6. rsec_pwd_propagate ΓòÉΓòÉΓòÉ
  60436.  
  60437.  Purpose 
  60438.  
  60439.           Propagates account password changes to foreign registries. 
  60440.  
  60441.  Format 
  60442.  
  60443.                     #include <dce/rsec_pwd_prop.h>
  60444.  
  60445.                     void rsec_pwd_propagate(
  60446.                             handle_t  h,
  60447.                             sec_rgy_name_t  principal,
  60448.                             char  *password,
  60449.                             sec_timeval_sec_t  pwd_change_time,
  60450.                             error_status_t  *status)
  60451.  
  60452.  Parameters 
  60453.  
  60454.           Input 
  60455.  
  60456.           h             An RPC binding handle to the foreign registry 
  60457.  
  60458.           principal     The name of the principal 
  60459.  
  60460.           password      The password of the principal 
  60461.  
  60462.           pwd_change_time The time the principal name and password information 
  60463.                         is sent. 
  60464.  
  60465.           Output 
  60466.  
  60467.           status        A pointer to the completion status. On successful 
  60468.                         completion, a foreign registry should return 
  60469.                         error_status_ok. If a foreign registry is unsuccessful 
  60470.                         in processing password receipt, it should return 
  60471.                         sec_pwd_mgmt_svr_error. 
  60472.  
  60473.  Usage 
  60474.  
  60475.           The rsec_pwd_propagate routine is used by the IBM DCE for OS/2 Warp 
  60476.           Password Synchronization Server to send account password changes to a 
  60477.           foreign registry. The foreign registry can discard the information, 
  60478.           or it can defer receiving the change event until later. If the 
  60479.           foreign registry incorporates or discards the new information, it 
  60480.           should return a successful status code. If for any reason it cannot 
  60481.           handle the notification at the time, but would like for the password 
  60482.           synchronization server to send the event later, the foreign registry 
  60483.           should return an unsuccessful status. 
  60484.  
  60485.           Foreign registries desiring to be notified when the password for an 
  60486.           account has changed must export this interface. See the section 
  60487.           "Setting Up a Password Synchronization Server" in the DCE for OS/2 
  60488.           Warp:Administration Guide and the Password Management and 
  60489.           Synchronization Application Programming Interfaces for a complete 
  60490.           description of how to configure the Password Synchronization Server, 
  60491.           Foreign Registries, accounts for which password synchronization is 
  60492.           required, and the programming requirements for a foreign registry 
  60493.           exporting this interface. 
  60494.  
  60495.  Related Information 
  60496.  
  60497.           Files: 
  60498.           dce\rsec_pwd_prop.idl - The idl file from which dce\rsec_pwd_prop.h 
  60499.           was derived. 
  60500.  
  60501.  
  60502. ΓòÉΓòÉΓòÉ 8.8.7. sec_pwd_mgmt_free_handle ΓòÉΓòÉΓòÉ
  60503.  
  60504.  Purpose 
  60505.  
  60506.           Frees storage allocated for a password management handle. 
  60507.  
  60508.  Format 
  60509.  
  60510.                     #include <dce/sec_pwd_mgmt.h>
  60511.  
  60512.                     void sec_pwd_mgmt_free_handle(
  60513.                             sec_pwd_mgmt_handle_t  *pwd_mgmt_h,
  60514.                             error_status_t  *status);
  60515.  
  60516.  Parameters 
  60517.  
  60518.           Input/Output 
  60519.  
  60520.           pwd_mgmt_h    A handle to the password management data that is to be 
  60521.                         freed. 
  60522.  
  60523.           Output 
  60524.  
  60525.           status        A pointer to the completion status.  On successful 
  60526.                         completion, the routine returns error_status_ok. 
  60527.                         Otherwise, it returns an error. 
  60528.  
  60529.  Usage 
  60530.  
  60531.           The sec_pwd_mgmt_free_handle routine frees any memory allocated for 
  60532.           the contents of a password management handle. 
  60533.  
  60534.  Related Information 
  60535.  
  60536.           Routines: 
  60537.           sec_pwd_mgmt_setup 
  60538.  
  60539.           Files: 
  60540.           /usr/include/dce/sec_pwd_mgmt.idl - The idl file from which 
  60541.           dce/sec_pwd_mgmt.h was derived. 
  60542.  
  60543.  
  60544. ΓòÉΓòÉΓòÉ 8.8.8. sec_pwd_mgmt_gen_pwd ΓòÉΓòÉΓòÉ
  60545.  
  60546.  Purpose 
  60547.  
  60548.           Generates a set of passwords. 
  60549.  
  60550.  Format 
  60551.  
  60552.                     #include <dce/sec_pwd_mgmt.h>
  60553.  
  60554.                     void sec_pwd_mgmt_gen_pwd(
  60555.                             sec_pwd_mgmt_handle_t  pwd_mgmt_h,
  60556.                             unsigned32  num_pwds,
  60557.                             unsigned32  *num_returned,
  60558.                             sec_passwd_rec_t  gen_pwds[],
  60559.                             error_status_t  *status);
  60560.  
  60561.  Parameters 
  60562.  
  60563.           Input 
  60564.  
  60565.           pwd_mgmt_h    A handle to the user's password management data. 
  60566.  
  60567.           num_pwds      Number of generated passwords requested. 
  60568.  
  60569.           Output 
  60570.  
  60571.           num_returned  Number of generated passwords returned in the gen_pwds 
  60572.                         array. 
  60573.  
  60574.           gen_pwds[]    Array of generated passwords.  Each generated password 
  60575.                         is stored in a sec_passwd_rec_t structure. 
  60576.  
  60577.           status        A pointer to the completion status. On successful 
  60578.                         completion, the routine returns error_status_ok. 
  60579.                         Otherwise, it returns one of the following errors: 
  60580.  
  60581.                              sec_rgy_era_pwd_mgmt_auth_type The 
  60582.                                            pwd_mgmt_binding ERA must contain 
  60583.                                            authentication information. 
  60584.  
  60585.                              sec_pwd_mgmt_svr_unavail The password management 
  60586.                                            server is unavailable. 
  60587.  
  60588.                              sec_pwd_mgmt_svr_error A generic error was 
  60589.                                            returned from the password 
  60590.                                            management server. An administrator 
  60591.                                            should check the password management 
  60592.                                            server's log file for more 
  60593.                                            information. 
  60594.  
  60595.                         Various RPC communication errors can be returned if 
  60596.                         failures occur when binding to the password management 
  60597.                         server. 
  60598.  
  60599.  Usage 
  60600.  
  60601.           The sec_pwd_mgmt_gen_pwd routine retrieves a set of generated 
  60602.           passwords from a password management server which is exporting the 
  60603.           rsec_pwd_mgmt_gen_pwd routine. It obtains the binding information to 
  60604.           this server from the pwd_mgmt_h handle. Files: 
  60605.           /usr/include/dce/sec_pwd_mgmt.idl - The idl file from which 
  60606.           dce/sec_pwd_mgmt.h was derived. 
  60607.  
  60608.  Related Information 
  60609.  
  60610.           Routines: 
  60611.           sec_pwd_mgmt_setup 
  60612.           pwd_strengthd 
  60613.  
  60614.  
  60615. ΓòÉΓòÉΓòÉ 8.8.9. sec_pwd_mgmt_get_val_type ΓòÉΓòÉΓòÉ
  60616.  
  60617.  Purpose 
  60618.  
  60619.           Gets the user's password validation type. 
  60620.  
  60621.  Format 
  60622.  
  60623.                     #include <dce/sec_pwd_mgmt.h>
  60624.  
  60625.                     void sec_pwd_mgmt_get_val_type(
  60626.                       sec_pwd_mgmt_handle_t  pwd_mgmt_h,
  60627.                       signed32  *pwd_val_type,
  60628.                       error_status_t  *status);
  60629.  
  60630.  Parameters 
  60631.  
  60632.           Input 
  60633.  
  60634.           pwd_mgmt_h    A handle to a user's password management data. 
  60635.  
  60636.           Output 
  60637.  
  60638.           pwd_val_type  The user's password validation type.  This is retrieved 
  60639.                         from the pwd_val_type ERA.  The possible values and 
  60640.                         their meaning are: 
  60641.  
  60642.                              0 (none)    The user has no password policy. 
  60643.  
  60644.                              1 (user_select) Users must choose their own 
  60645.                                          passwords. 
  60646.  
  60647.                              2 (user_can_select) Users can choose their own 
  60648.                                          passwords or request a generated 
  60649.                                          password. 
  60650.  
  60651.                              3 (generation_required) The user must use a 
  60652.                                          generated password. 
  60653.  
  60654.           status        A pointer to the completion status. On successful 
  60655.                         completion, the routine returns error_status_ok. 
  60656.                         Otherwise, it returns an error. 
  60657.  
  60658.                         Various RPC communication errors can be returned if 
  60659.                         there are failures when binding to the password 
  60660.                         management server. 
  60661.  
  60662.  Usage 
  60663.  
  60664.           The sec_pwd_mgmt_get_val_type routine returns the value of the user's 
  60665.           password validation type, as specified by the pwd_val_type ERA.  If 
  60666.           the ERA does not exist, 0 (none) is returned in pwd_val_type. 
  60667.  
  60668.  Files 
  60669.  
  60670.           /usr/include/dce/sec_pwd_mgmt.idl The idl file from which 
  60671.                         dce/sec_pwd_mgmt.h was derived. 
  60672.  
  60673.  Related Information 
  60674.  
  60675.           Routines: 
  60676.           sec_pwd_mgmt_setup 
  60677.  
  60678.  
  60679. ΓòÉΓòÉΓòÉ 8.8.10. sec_pwd_mgmt_setup ΓòÉΓòÉΓòÉ
  60680.  
  60681.  Purpose 
  60682.  
  60683.           Sets up the user's password policy information. 
  60684.  
  60685.  Format 
  60686.  
  60687.                     #include <dce/sec_pwd_mgmt.h>
  60688.  
  60689.                     void sec_pwd_mgmt_setup(
  60690.                       sec_pwd_mgmt_handle_t  *pwd_mgmt_h,
  60691.                       sec_rgy_handle_t  context,
  60692.                       sec_rgy_login_name_t  login_name,
  60693.                       sec_login_handle_t  your_lc,
  60694.                       rpc_binding_handle_t  pwd_mgmt_bind_h,
  60695.                       error_status_t  *status);
  60696.  
  60697.  Parameters 
  60698.  
  60699.           Input 
  60700.  
  60701.           context       A registry server handle indicating the desired 
  60702.                         registry site. 
  60703.  
  60704.           login_name    The login name of the user. 
  60705.  
  60706.           your_lc       The login context handle of the user currently logged 
  60707.                         in. If NULL is specified, the default login context is 
  60708.                         used. 
  60709.  
  60710.           pwd_mgmt_bind_h An RPC binding handle to the password management 
  60711.                         server.  Use of this parameter is currently 
  60712.                         unsupported.  The password management server binding 
  60713.                         handle is retrieved from the pwd_mgmt_binding ERA. Set 
  60714.                         this parameter to NULL. 
  60715.  
  60716.           Output 
  60717.  
  60718.           pwd_mgmt_h    A pointer to an opaque handle to password management or 
  60719.                         policy data. The pwd_mgmt_h parameter contains, among 
  60720.                         other data, the account name, values of password 
  60721.                         management ERAs, and a binding handle to the password 
  60722.                         management server. 
  60723.  
  60724.           status        A pointer to the completion status. On successful 
  60725.                         completion, status is assigned error_status_ok. 
  60726.                         Otherwise, it returns one of the following errors: 
  60727.  
  60728.                              sec_s_no_memory Not enough memory is available to 
  60729.                                            complete the operation. 
  60730.  
  60731.                              sec_rgy_server_unavailable The network registry is 
  60732.                                            not available. 
  60733.  
  60734.  Usage 
  60735.  
  60736.           The sec_pwd_mgmt_setup routine collects the data required to perform 
  60737.           remote password management calls to the password management server. 
  60738.  
  60739.  Files 
  60740.  
  60741.           /usr/include/dce/sec_pwd_mgmt.idl The idl file from which 
  60742.                         dce/sec_pwd_mgmt.h was derived. 
  60743.  
  60744.  Related Information 
  60745.  
  60746.           Routines: 
  60747.           sec_pwd_mgmt_free_handle 
  60748.           sec_pwd_mgmt_gen_pwd 
  60749.           sec_pwd_mgmt_get_val_type 
  60750.  
  60751.  
  60752. ΓòÉΓòÉΓòÉ 8.9. Registry API ΓòÉΓòÉΓòÉ
  60753.  
  60754. This section contains information on the data types, constants, status codes, 
  60755. and sec_rgy routines associated with the Registry Application Programming 
  60756. Interface. 
  60757.  
  60758. The following is a list of topics and routines in the Registry API: 
  60759.  
  60760.       Registry Data Types 
  60761.       Registry Constants 
  60762.       sec_rgy_acct_add 
  60763.       sec_rgy_acct_admin_replace 
  60764.       sec_rgy_acct_delete 
  60765.       sec_rgy_acct_get_projlist 
  60766.       sec_rgy_acct_lookup 
  60767.       sec_rgy_acct_passwd 
  60768.       sec_rgy_acct_rename 
  60769.       sec_rgy_acct_replace_all 
  60770.       sec_rgy_acct_user_replace 
  60771.       sec_rgy_auth_plcy_get_effective 
  60772.       sec_rgy_auth_plcy_get_info 
  60773.       sec_rgy_auth_plcy_set_info 
  60774.       sec_rgy_cell_bind 
  60775.       sec_rgy_cursor_reset 
  60776.       sec_rgy_enable_nsi 
  60777.       sec_rgy_login_get_effective 
  60778.       sec_rgy_login_get_info 
  60779.       sec_rgy_pgo_add 
  60780.       sec_rgy_pgo_add_member 
  60781.       sec_rgy_pgo_delete 
  60782.       sec_rgy_pgo_delete_member 
  60783.       sec_rgy_pgo_get_by_eff_unix_num 
  60784.       sec_rgy_pgo_get_by_id 
  60785.       sec_rgy_pgo_get_by_name 
  60786.       sec_rgy_pgo_get_by_unix_num 
  60787.       sec_rgy_pgo_get_members 
  60788.       sec_rgy_pgo_get_next 
  60789.       sec_rgy_pgo_id_to_name 
  60790.       sec_rgy_pgo_id_to_unix_num 
  60791.       sec_rgy_pgo_is_member 
  60792.       sec_rgy_pgo_name_to_id 
  60793.       sec_rgy_pgo_name_to_unix_num 
  60794.       sec_rgy_pgo_rename 
  60795.       sec_rgy_pgo_replace 
  60796.       sec_rgy_pgo_unix_num_to_id 
  60797.       sec_rgy_pgo_unix_num_to_name 
  60798.       sec_rgy_plcy_get_effective 
  60799.       sec_rgy_plcy_get_info 
  60800.       sec_rgy_plcy_get_override_info 
  60801.       sec_rgy_plcy_set_info 
  60802.       sec_rgy_plcy_set_override_info 
  60803.       sec_rgy_properties_get_info 
  60804.       sec_rgy_properties_set_info 
  60805.       sec_rgy_rep_admin_become_master 
  60806.       sec_rgy_rep_admin_become_slave 
  60807.       sec_rgy_rep_admin_change_master 
  60808.       sec_rgy_rep_admin_destroy 
  60809.       sec_rgy_rep_admin_get_sw_vers 
  60810.       sec_rgy_rep_admin_info 
  60811.       sec_rgy_rep_admin_info_vers 
  60812.       sec_rgy_rep_admin_init_replica 
  60813.       sec_rgy_rep_admin_maint 
  60814.       sec_rgy_rep_admin_mkey 
  60815.       sec_rgy_rep_admin_set_sw_vers 
  60816.       sec_rgy_rep_admin_stop 
  60817.       sec_rgy_site_bind 
  60818.       sec_rgy_site_bind_query 
  60819.       sec_rgy_site_bind_update 
  60820.       sec_rgy_site_binding_get_info 
  60821.       sec_rgy_site_close 
  60822.       sec_rgy_site_get 
  60823.       sec_rgy_site_is_readonly 
  60824.       sec_rgy_site_open 
  60825.       sec_rgy_site_open_query 
  60826.       sec_rgy_site_open_update 
  60827.       sec_rgy_unix_getgrent 
  60828.       sec_rgy_unix_getgrgid 
  60829.       sec_rgy_unix_getgrnam 
  60830.       sec_rgy_unix_getpwent 
  60831.       sec_rgy_unix_getpwnam 
  60832.       sec_rgy_unix_getpwuid 
  60833.       sec_rgy_wait_until_consistent 
  60834.  
  60835.  
  60836. ΓòÉΓòÉΓòÉ 8.9.1. Registry Data Types ΓòÉΓòÉΓòÉ
  60837.  
  60838. The following data types are used in sec_rgy calls: 
  60839.  
  60840.  sec_rgy_handle_t A pointer to the registry server handle. The registry server 
  60841.            is bound to a handle with sec_rgy_site_open. 
  60842.  
  60843.  sec_rgy_bind_auth_info_type_t An enumeration that defines whether the binding 
  60844.            is authenticated. This data type is used in conjunction with the 
  60845.            sec_rgy_bind_auth_info_t data type to set up the authorization 
  60846.            method and parameters for a binding. The 
  60847.            sec_rgy_bind_auth_info_type_t type consists of: 
  60848.  
  60849.                 sec_rgy_bind_auth_none The binding is not authenticated. 
  60850.  
  60851.                 sec_rgy_bind_auth_dce The binding uses DCE shared-secret key 
  60852.                           authentication. 
  60853.  
  60854.  sec_rgy_bind_auth_info_t A discriminated union that defines authorization and 
  60855.            authentication parameters for a binding. This data type is used in 
  60856.            conjunction with the sec_rgy_bind_auth_info_type_t data type to set 
  60857.            up the authorization method and parameters for a binding. The 
  60858.            sec_rgy_bind_auth_info_t data type consists of: 
  60859.  
  60860.                 info_type A sec_rgy_bind_auth_info_type_t data type that 
  60861.                           specifies whether the binding is authenticated. The 
  60862.                           contents of the union depend on the value of 
  60863.                           sec_rgy_bind_auth_info_type_t. 
  60864.  
  60865.                           For unauthenticated bindings 
  60866.                           (sec_rgy_bind_auth_info_type_t = 
  60867.                           sec_rgy_bind_auth_none), no parameters are supplied. 
  60868.  
  60869.                           For authenticated bindings 
  60870.                           (sec_rgy_bind_auth_info_type_t = 
  60871.                           sec_rgy_bind_auth_dce), the dce_info structure is 
  60872.                           supplied. 
  60873.  
  60874.                 dce_info  A structure that consists of: 
  60875.  
  60876.                                authn_level An unsigned 32 bit integer 
  60877.                                          indicating the protection level for 
  60878.                                          RPC calls made using the server 
  60879.                                          binding handle. The protection level 
  60880.                                          determines the degree to which 
  60881.                                          authenticated communications between 
  60882.                                          the client and the server are 
  60883.                                          protected by the authentication 
  60884.                                          service specified by authn_svc. 
  60885.  
  60886.                                          If the RPC runtime or the RPC protocol 
  60887.                                          in the bound protocol sequence does 
  60888.                                          not support a specified level, the 
  60889.                                          level is automatically upgraded to the 
  60890.                                          next higher supported level. The 
  60891.                                          possible protection levels are: 
  60892.  
  60893.                                               rpc_c_protect_level_default Uses 
  60894.                                                         the default protection 
  60895.                                                         level for the specified 
  60896.                                                         authentication service. 
  60897.                                                         The default protection 
  60898.                                                         level for DCE 
  60899.                                                         shared-secret key 
  60900.                                                         authentication is 
  60901.                                                         rpc_c_protect_level_pkt_value 
  60902.  
  60903.                                               rpc_c_protect_level_none Performs 
  60904.                                                         no authentication: 
  60905.                                                         tickets are not 
  60906.                                                         exchanged, session keys 
  60907.                                                         are not established, 
  60908.                                                         client PACs or names 
  60909.                                                         are not certified, and 
  60910.                                                         transmissions are in 
  60911.                                                         the clear. Note that 
  60912.                                                         although uncertified 
  60913.                                                         PACs should not be 
  60914.                                                         trusted, they can be 
  60915.                                                         useful for debugging, 
  60916.                                                         tracing, and 
  60917.                                                         measurement purposes. 
  60918.  
  60919.                                               rpc_c_protect_level_connect 
  60920.                                                         Authenticates only when 
  60921.                                                         the client establishes 
  60922.                                                         a relationship with the 
  60923.                                                         server. 
  60924.  
  60925.                                               rpc_c_protect_level_call 
  60926.                                                         Authenticates only at 
  60927.                                                         the beginning of each 
  60928.                                                         remote procedure call 
  60929.                                                         when the server 
  60930.                                                         receives the request. 
  60931.  
  60932.                                                         This level does not 
  60933.                                                         apply to remote 
  60934.                                                         procedure calls made 
  60935.                                                         over a connection-based 
  60936.                                                         protocol sequence (that 
  60937.                                                         is, ncacn_ip_tcp). If 
  60938.                                                         this level is specified 
  60939.                                                         and the binding handle 
  60940.                                                         uses a connection-based 
  60941.                                                         protocol sequence, the 
  60942.                                                         routine uses the 
  60943.                                                         rpc_c_protect_level_pkt 
  60944.                                                         level instead. 
  60945.  
  60946.                                               rpc_c_protect_level_pkt Ensures 
  60947.                                                         that all data received 
  60948.                                                         is from the expected 
  60949.                                                         client. 
  60950.  
  60951.                                               rpc_c_protect_level_pkt_integ 
  60952.                                                         Ensures and verifies 
  60953.                                                         that none of the data 
  60954.                                                         transferred between 
  60955.                                                         client and server has 
  60956.                                                         been modified. This is 
  60957.                                                         the highest protection 
  60958.                                                         level that is 
  60959.                                                         guaranteed to be 
  60960.                                                         present in the RPC 
  60961.                                                         runtime. 
  60962.  
  60963.                                               rpc_c_protect_level_pkt_privacy 
  60964.                                                         Authenticates as 
  60965.                                                         specified by all of the 
  60966.                                                         previous levels and 
  60967.                                                         also encrypts each RPC 
  60968.                                                         argument value. This is 
  60969.                                                         the highest protection 
  60970.                                                         level, but is not 
  60971.                                                         guaranteed to be 
  60972.                                                         present in the RPC 
  60973.                                                         runtime. 
  60974.  
  60975.                                authn_svc Specifies the authentication service 
  60976.                                          to use. The exact level of protection 
  60977.                                          provided by the authentication service 
  60978.                                          is specified by protect_level. The 
  60979.                                          supported authentication services are 
  60980.                                          as follows: 
  60981.  
  60982.                                               rpc_c_authn_none No 
  60983.                                                         authentication: no 
  60984.                                                         tickets are exchanged, 
  60985.                                                         no session keys 
  60986.                                                         established, client 
  60987.                                                         PACs or names are not 
  60988.                                                         transmitted, and 
  60989.                                                         transmissions are in 
  60990.                                                         the clear. Specify 
  60991.                                                         rpc_c_authn_none to 
  60992.                                                         turn authentication off 
  60993.                                                         for remote procedure 
  60994.                                                         calls made using this 
  60995.                                                         binding. 
  60996.  
  60997.                                               rpc_c_authn_dce_secret DCE 
  60998.                                                         shared-secret key 
  60999.                                                         authentication. 
  61000.  
  61001.                                               rpc_c_authn_default Default 
  61002.                                                         authentication service. 
  61003.                                                         The current default 
  61004.                                                         authentication service 
  61005.                                                         is a DCE shared-secret 
  61006.                                                         key; specifying 
  61007.                                                         rpc_c_authn_default is 
  61008.                                                         equivalent to 
  61009.                                                         specifying 
  61010.                                                         rpc_c_authn_dce_secret. 
  61011.  
  61012.                                               rpc_c_authn_dce_public DCE public 
  61013.                                                         key authentication 
  61014.                                                         (reserved for future 
  61015.                                                         use). 
  61016.  
  61017.                                authz_svc Specifies the authorization service 
  61018.                                          implemented by the server for the 
  61019.                                          interface. The validity and 
  61020.                                          trustworthiness of authorization data, 
  61021.                                          similar to any application data, is 
  61022.                                          dependent on the authentication 
  61023.                                          service and protection level 
  61024.                                          specified. The supported authorization 
  61025.                                          services are: 
  61026.  
  61027.                                               rpc_c_authz_none The server 
  61028.                                                         performs no 
  61029.                                                         authorization. This is 
  61030.                                                         valid only if authn_svc 
  61031.                                                         is set to 
  61032.                                                         rpc_c_authn_none, which 
  61033.                                                         specifies that no 
  61034.                                                         authentication is being 
  61035.                                                         performed. 
  61036.  
  61037.                                               rpc_c_authz_name The server 
  61038.                                                         performs authorization 
  61039.                                                         based on the client 
  61040.                                                         principal name. This 
  61041.                                                         value cannot be used if 
  61042.                                                         authn_svc is 
  61043.                                                         rpc_c_authn_none. 
  61044.  
  61045.                                               rpc_c_authz_dce Server performs 
  61046.                                                         authorization using the 
  61047.                                                         client's DCE Privilege 
  61048.                                                         Attribute Certificate 
  61049.                                                         (PAC) sent to the 
  61050.                                                         server with each remote 
  61051.                                                         procedure call made 
  61052.                                                         with this binding. 
  61053.                                                         Generally, access is 
  61054.                                                         checked against DCE 
  61055.                                                         Access Control Lists 
  61056.                                                         (ACLs). 
  61057.  
  61058.                                identity  A value of type sec_login_handle_t 
  61059.                                          that represents a complete login 
  61060.                                          context. 
  61061.  
  61062.  sec_timeval_sec_t A 32-bit integer that contains the seconds portion of a UNIX 
  61063.            sec_timeval_t, to be used when expressing absolute dates. 
  61064.  
  61065.  sec_timeval_t A structure that contains the full UNIX time.  The structure 
  61066.            contains two 32-bit integers indicating seconds (sec) and 
  61067.            microseconds (usec) since 0:00, January 1, 1970. 
  61068.  
  61069.  sec_timeval_period_t A 32-bit integer expressing seconds relative to some well 
  61070.            known time. 
  61071.  
  61072.  sec_rgy_acct_key_t Specifies the number of parts (person, group, organization) 
  61073.            of an account login name that are sufficient to specify a unique 
  61074.            abbreviation for that account. 
  61075.  
  61076.  sec_rgy_cursor_t A structure that provides a pointer into a registry database. 
  61077.            This type is used for iterative operations on the registry 
  61078.            information.  For example, a call to sec_rgy_pgo_get_members may 
  61079.            return the 10 account names following the input sec_rgy_cursor_t 
  61080.            position.  Upon return, the cursor position is updated, so the next 
  61081.            call to that routine returns the next 10 names.  The components of 
  61082.            this structure are not used by application programs. 
  61083.  
  61084.  sec_rgy_pname_t A character string of length sec_rgy_pname_t_size. 
  61085.  
  61086.  sec_rgy_name_t A character string of length sec_rgy_name_t_size. 
  61087.  
  61088.  sec_rgy_login_name_t A structure representing an account login name.  It 
  61089.            contains three strings of type sec_rgy_name_t: 
  61090.  
  61091.                 pname     The person name for the account. 
  61092.                 gname     The group name for the account. 
  61093.                 oname     The organization name for the account. 
  61094.  
  61095.  sec_rgy_member_t A character string of length sec_rgy_name_t_size. 
  61096.  
  61097.  sec_rgy_foreign_id_t The representation of a foreign ID. This structure 
  61098.            contains two components: 
  61099.  
  61100.                 cell      A string of type uuid_t representing the UUID of the 
  61101.                           foreign cell. 
  61102.                 principal A string of type uuid_t representing the UUID of the 
  61103.                           principal. 
  61104.  
  61105.  sec_rgy_sid_t A structure identifying an account. It contains three fields: 
  61106.  
  61107.                 person    The UUID of the person part of the account. 
  61108.                 group     The UUID of the group part of the account. 
  61109.                 org       The UUID of the organization part of the account. 
  61110.  
  61111.  sec_rgy_unix_sid_t A structure identifying an account with UNIX ID numbers. 
  61112.            It contains three fields: 
  61113.  
  61114.                 person    The UNIX ID of the person part of the account. 
  61115.                 group     The UNIX ID of the group part of the account. 
  61116.                 org       The UNIX ID of the organization part of the account. 
  61117.  
  61118.  sec_rgy_domain_t This 32-bit integer specifies the naming domain a character 
  61119.            string refers to: person, group, or organization. 
  61120.  
  61121.  sec_rgy_pgo_flags_t A 32-bit bitset that contains flags pertaining to registry 
  61122.            entries. This type contains the following three flags: 
  61123.  
  61124.                 sec_rgy_pgo_is_an_alias If set, indicates the registry entry is 
  61125.                           an alias of another entry. 
  61126.  
  61127.                 sec_rgy_pgo_is_required If set, the registry item is required 
  61128.                           and cannot be deleted. An example of a required 
  61129.                           account is the one for the registry server itself. 
  61130.  
  61131.                 sec_rgy_pgo_projlist_ok If the accompanying item is a person 
  61132.                           entry, this flag indicates the person can have 
  61133.                           concurrent group sets. If the item is a group entry, 
  61134.                           the flag means this group can be part of a concurrent 
  61135.                           group set. The flag is undefined for organization 
  61136.                           items. 
  61137.  
  61138.  sec_rgy_pgo_item_t The structure identifying a registry item. It contains five 
  61139.            components: 
  61140.  
  61141.                 id        The UUID of the registry item, in uuid_t form. 
  61142.  
  61143.                 unix_num  A 32-bit integer that contains the UNIX ID number of 
  61144.                           the registry item. 
  61145.  
  61146.                 quota     A 32-bit integer representing the maximum number of 
  61147.                           user-defined registry objects the account owner can 
  61148.                           create. 
  61149.  
  61150.                 flags     A sec_rgy_pgo_flags_t bitset that contains 
  61151.                           information about the entry. 
  61152.  
  61153.                 fullname  A sec_rgy_pname_t character string that contains a 
  61154.                           full name for the registry entry. For a person entry, 
  61155.                           this field can contain the real name of the account 
  61156.                           owner. For a group, it can contain a description of 
  61157.                           the group. This is a data-only field, and registry 
  61158.                           queries cannot search on the fullname entry. 
  61159.  
  61160.  sec_rgy_acct_admin_flags_t A 32-bit bitset that contains administration flags 
  61161.            used as part of the administrator's information for any registry 
  61162.            account. The set contains three flags: 
  61163.  
  61164.                 sec_rgy_acct_admin_valid Specifies that the account is valid 
  61165.                           for login. 
  61166.  
  61167.                 sec_rgy_acct_admin_server If set, the account's name can be 
  61168.                           used as a server name in a TGT. 
  61169.  
  61170.                 sec_rgy_acct_admin_client If set, the account's name can be 
  61171.                           used as a client name in a TGT. Note that you can 
  61172.            prevent the principal from being authenticated by turning off both 
  61173.            the sec_rgy_acct_admin_server and the sec_rgy_acct_admin_client 
  61174.            flags. 
  61175.  
  61176.  sec_rgy_acct_auth_flags_t A 32-bit bitset that contains account authorization 
  61177.            flags used to implement authentication policy as defined by the 
  61178.            Kerberos version 5 protocol.  The set contains six flags: 
  61179.  
  61180.                 sec_rgy_acct_auth_post_dated Allows issuance of post-dated 
  61181.                           certificates. 
  61182.  
  61183.                 sec_rgy_acct_auth_forwardable Allows issuance of forwardable 
  61184.                           certificates. 
  61185.  
  61186.                 sec_rgy_acct_auth_tgt Allows issuance of certificates based on 
  61187.                           TGT authentication. If this flag is not set, a client 
  61188.                           requesting a service may have to supply a password 
  61189.                           directly to the server. 
  61190.  
  61191.                 sec_rgy_acct_auth_renewable Allows issuance of renewable 
  61192.                           certificates. 
  61193.  
  61194.                 sec_rgy_acct_auth_proxiable Allows issuance of proxiable 
  61195.                           certificates. 
  61196.  
  61197.                 sec_rgy_acct_auth_dup_session_key Allows issuance of duplicate 
  61198.                           session keys. 
  61199.  
  61200.  sec_rgy_acct_admin_t The portion of a registry account item that contains 
  61201.            components relevant to administrators.  Note that only 
  61202.            expiration_date, good_since_date, flags, and authentication_flags 
  61203.            can be modified by an administrator ; the remaining fields are set 
  61204.            by the Security server. 
  61205.  
  61206.                 creator   This field, in foreign_id_t format, identifies the 
  61207.                           administrator who created the registry account. 
  61208.  
  61209.                 creation_date Specifies the creation date of the account, in 
  61210.                           sec_timeval_sec_t format. 
  61211.  
  61212.                 last_changer Identifies the last person to change any of the 
  61213.                           account information, in foreign_id_t format. 
  61214.  
  61215.                 change_date Specifies the date of the last modification of the 
  61216.                           account information, in sec_timeval_sec_t format. 
  61217.  
  61218.                 expiration_date The date the account expires, in 
  61219.                           sec_timeval_sec_t format. 
  61220.  
  61221.                 good_since_date The Kerberos version 5 TGT revocation date. 
  61222.                           TGTs issued before this date are not honored. In 
  61223.                           sec_timeval_sec_t format. 
  61224.  
  61225.                 flags     Administrative flags in sec_rgy_acct_admin_flags_t 
  61226.                           format. 
  61227.  
  61228.                 authentication_flags Authentication flags in 
  61229.                           sec_rgy_acct_auth_flags_t format. 
  61230.  
  61231.  sec_rgy_acct_user_flags_t A 32-bit bitset that contains flags controlling 
  61232.            user-modifiable information. There is only one flag currently 
  61233.            implemented. If sec_rgy_acct_user_passwd_valid is set, it indicates 
  61234.            the user password is valid. If it is not set, this flag forces the 
  61235.            user to change the password on the next login attempt. 
  61236.  
  61237.  sec_rgy_acct_user_t A structure that contains registry account information. 
  61238.            The structure consists of the fields in the following list. Note 
  61239.            that only the gecos, homedir, shell, and flags can be modified by 
  61240.            the account owner or other authorized users. The remaining fields 
  61241.            are set by the Security server. It contains seven components: 
  61242.  
  61243.                 gecos     This is a character string (in sec_rgy_pname_t 
  61244.                           format) that contains information about the account 
  61245.                           user. It generally consists of everything after the 
  61246.                           full name in the UNIX gecos format. 
  61247.  
  61248.                 homedir   The login directory for the account user, in 
  61249.                           sec_rgy_pname_t format. 
  61250.  
  61251.                 shell     The default shell for the account user, in 
  61252.                           sec_rgy_pname_t format. 
  61253.  
  61254.                 passwd_version_number An unsigned 32-bit integer that indicates 
  61255.                           the password version number. This value is used as 
  61256.                           output only. 
  61257.  
  61258.                 passwd    The UNIX encoded account password, in 
  61259.                           sec_rgy_unix_passwd_buf_t format. This value is used 
  61260.                           as output only. 
  61261.  
  61262.                 passwd_dtm The date the password was established, in 
  61263.                           sec_timeval_sec_t format. 
  61264.  
  61265.                 flags     Account user flags, in sec_rgy_acct_user_flags_t 
  61266.                           format. 
  61267.  
  61268.  sec_rgy_plcy_pwd_flags_t A 32-bit bitset that contains two flags about 
  61269.            password policy: 
  61270.  
  61271.                 sec_rgy_plcy_pwd_no_spaces If set, does not allow spaces in a 
  61272.                           password. 
  61273.  
  61274.                 sec_rgy_plcy_pwd_non_alpha If set, requires at least one 
  61275.                           nonalphanumeric character in the password. 
  61276.  
  61277.  sec_rgy_plcy_t A structure defining aspects of the registry account policy. 
  61278.            It contains five components: 
  61279.  
  61280.                 passwd_min_len A 32-bit integer that describes the minimum 
  61281.                           number of characters in the account password. 
  61282.  
  61283.                 passwd_lifetime The number of seconds from a password's 
  61284.                           creation until it expires, in sec_timeval_period_t 
  61285.                           format. 
  61286.  
  61287.                 passwd_exp_date The expiration date of the account password, in 
  61288.                           sec_timeval_sec_t format. 
  61289.  
  61290.                 acct_lifespan The number of seconds after the creation of an 
  61291.                           account until it expires, in sec_timeval_period_t 
  61292.                           format. 
  61293.  
  61294.                 passwd_flags Account password policy flags, in 
  61295.                           sec_rgy_plcy_pwd_flags_t format. 
  61296.  
  61297.  sec_rgy_policy_auth_t This type describes authentication policy. It is a 
  61298.            structure that contains two time periods (in sec_timeval_period_t 
  61299.            format): 
  61300.  
  61301.                 max_ticket_lifetime Specifies the maximum length of the period 
  61302.                           a TGT is valid. 
  61303.  
  61304.                 max_renewable_lifetime Specifies the maximum length of time a 
  61305.                           TGT can be renewed. This authentication policy 
  61306.            applies both to the registry as a whole and individual accounts. The 
  61307.            effective policy for a given account is defined to be the more 
  61308.            restrictive of the site and account authentication policy. 
  61309.  
  61310.  sec_rgy_properties_t A structure that describes some registry properties. It 
  61311.            contains the following: 
  61312.  
  61313.                 read_version A 32-bit integer that describes the earliest 
  61314.                           version of the secd software that can read this 
  61315.                           registry. 
  61316.  
  61317.                 write_version A 32-bit integer that describes the version of 
  61318.                           the secd software that wrote this registry. 
  61319.  
  61320.                 minimum_ticket_lifetime The minimum lifetime of an 
  61321.                           authentication certificate, in sec_timeval_period_t 
  61322.                           format. 
  61323.  
  61324.                 default_certificate_lifetime The normal lifetime of an 
  61325.                           authentication certificate (ticket-granting ticket in 
  61326.                           Kerberos parlance), in sec_timeval_period_t format. 
  61327.                           Processes can request authentication certificates 
  61328.                           with longer lifetimes up to, but not in excess of, 
  61329.                           the maximum allowable lifetime as determined by the 
  61330.                           effective policy for the account. 
  61331.  
  61332.                 low_unix_id_person The lowest UNIX number permissible for a 
  61333.                           person item in the registry. 
  61334.  
  61335.                 low_unix_id_group The lowest UNIX number permissible for a 
  61336.                           group item in the registry. 
  61337.  
  61338.                 low_unix_id_org The lowest UNIX number permissible for an 
  61339.                           organization item in the registry. 
  61340.  
  61341.                 max_unix_id The largest UNIX number permissible for any 
  61342.                           registry entry. 
  61343.  
  61344.                 flags     Property flags, in sec_rgy_properties_flags_t format. 
  61345.  
  61346.                 realm     The name of the cell, in sec_rgy_name_t form, for 
  61347.                           which this registry is the authentication service. 
  61348.  
  61349.                 realm_uuid The UUID of the same cell. 
  61350.  
  61351.  sec_rgy_properties_flags_t A 32-bit bitset, that contains flags concerning 
  61352.            registry properties. 
  61353.  
  61354.                 sec_rgy_prop_readonly If set (TRUE), indicates that this 
  61355.                           registry is a query site. 
  61356.  
  61357.                 sec_rgy_prop_auth_cert_unbound If set (TRUE), the registry 
  61358.                           server accepts requests from any site. 
  61359.  
  61360.                 sec_rgy_prop_shadow_passwd If the shadow password flag is set 
  61361.                           (TRUE), the registry server does not include the 
  61362.                           account password when responding to a request for the 
  61363.                           user data from a specified account.  This minimizes 
  61364.                           the risk of an account password being intercepted 
  61365.                           while travelling over the network. 
  61366.  
  61367.                 sec_rgy_prop_embedded_unix_id Indicates that all UUIDs in this 
  61368.                           registry contain a UNIX number embedded. This implies 
  61369.                           that the UNIX numbers of objects in the registry 
  61370.                           cannot be changed, because UUIDs are immutable. 
  61371.  
  61372.  sec_rgy_override_t A 32-bit integer used as a flag for registry override mode. 
  61373.            Currently, its possible values are the constants sec_rgy_no_override 
  61374.            and sec_rgy_override. When this mode is enabled, override data 
  61375.            supplied by the node administrator replaces some of the data 
  61376.            received from the registry for a given person or account under 
  61377.            certain conditions. These conditions are: 
  61378.  
  61379.              o  The registry permits the requested overrides to be set for this 
  61380.                 machine. 
  61381.  
  61382.              o  The override data is intended for the person or account at 
  61383.                 hand. When the mode is sec_rgy_no_override, data from the 
  61384.            registry is returned to the end user or application untouched. 
  61385.  
  61386.  sec_rgy_mode_resolve_t A 32-bit integer used as a flag for resolve mode. 
  61387.            Currently, its possible values are the constants 
  61388.            sec_rgy_no_resolve_pname and sec_rgy_resolve_pname. When the mode is 
  61389.            enabled, path names that contains leading slashes (//) are 
  61390.            translated into a form understandable by the local machine's NFS. 
  61391.  
  61392.  sec_rgy_unix_passwd_buf_t A character array of UNIX password strings. 
  61393.  
  61394.  
  61395. ΓòÉΓòÉΓòÉ 8.9.2. Registry Constants ΓòÉΓòÉΓòÉ
  61396.  
  61397. The following constants are used in sec_rgy routines: 
  61398.  
  61399.  sec_rgy_default_handle The value of an unbound registry server handle. 
  61400.  
  61401.  sec_rgy_pname_t_size  The maximum number of characters in a sec_rgy_pname_t. 
  61402.  
  61403.  sec_rgy_name_t_size   The maximum number of characters in a sec_rgy_name_t. 
  61404.  
  61405.                        Note:  The sec_rgy_name_t structure allows a maximum 
  61406.                               length of 1024 characters. However, when 
  61407.                               specifying a pgo name size, 1010 characters is 
  61408.                               the actual safe limit. 
  61409.  
  61410.  sec_rgy_pgo_flags_t   A 32-bit constant equal to a variable of type 
  61411.                        sec_rgy_pgo_flags_t with no flags set. 
  61412.  
  61413.  sec_rgy_quota_unlimited A 32-bit integer. Set the quota field of the 
  61414.                        sec_rgy_pgo_item_t type to this constant to override the 
  61415.                        registry quota limitation. 
  61416.  
  61417.  sec_rgy_acct_admin_flags_t A 32-bit integer. This is the value of the 
  61418.                        sec_rgy_acct_admin_flags_t bitset when none of its flags 
  61419.                        are set. 
  61420.  
  61421.  sec_rgy_acct_auth_flags_none A 32-bit integer. This is the value of the 
  61422.                        sec_rgy_acct_auth_flags_t bitset when none of its flags 
  61423.                        are set. 
  61424.  
  61425.  sec_rgy_acct_user_flags_t A 16-bit integer. This is the value of the 
  61426.                        sec_rgy_acct_user_flags_t bitset when none of its flags 
  61427.                        are set. 
  61428.  
  61429.  sec_rgy_plcy_pwd_flags_t A 16-bit integer. This is the value of the 
  61430.                        sec_rgy_policy_pwd_flags_t bitset when none of its flags 
  61431.                        are set. 
  61432.  
  61433.  sec_rgy_properties_flags_t A 16-bit integer. This is the value of the 
  61434.                        sec_rgy_properties_flags_t bitset when none of its flags 
  61435.                        are set. 
  61436.  
  61437.  sec_rgy_override      A 32-bit integer that turns the registry override mode 
  61438.                        on. When this mode is enabled, override data supplied by 
  61439.                        the node administrator replaces some of the data gotten 
  61440.                        from the registry for a given person/account under 
  61441.                        certain conditions. 
  61442.  
  61443.  sec_rgy_no_override   A 32-bit integer that turns off the registry override 
  61444.                        mode. 
  61445.  
  61446.  sec_rgy_resolve_pname A 32-bit integer that turns on the registry resolve 
  61447.                        mode.  When the mode is enabled, path names that 
  61448.                        contains leading // (slashes) are translated into a form 
  61449.                        understandable by the local machine's NFS. 
  61450.  
  61451.  sec_rgy_no_resolve_pname A 32-bit integer that turns off the registry resolve 
  61452.                        mode. 
  61453.  
  61454.  The following 32-bit integer constants are used with the sec_rgy_acct_key_t 
  61455.  data type: 
  61456.  
  61457.  sec_rgy_acct_key_none The key is not valid. 
  61458.  
  61459.  sec_rgy_acct_key_person The person name alone is adequate. 
  61460.  
  61461.  sec_rgy_acct_key_group The person and group names are both necessary for the 
  61462.                        account abbreviation. 
  61463.  
  61464.  sec_rgy_acct_key_org  The person, group, and organization names are all 
  61465.                        necessary. 
  61466.  
  61467.  sec_rgy_acct_key_last Key values must be less than this constant. 
  61468.  
  61469.  The following 32-bit integer constants are the possible values of the 
  61470.  sec_rgy_domain_t data type. 
  61471.  
  61472.  sec_rgy_domain_person The name refers to a person. 
  61473.  
  61474.  sec_rgy_domain_group  The name refers to a group. 
  61475.  
  61476.  sec_rgy_domain_org    The name refers to an organization. 
  61477.  
  61478.  
  61479. ΓòÉΓòÉΓòÉ 8.9.3. sec_rgy_acct_add ΓòÉΓòÉΓòÉ
  61480.  
  61481.  Purpose 
  61482.  
  61483.           Adds an account for a login name. 
  61484.  
  61485.  Library 
  61486.  
  61487.           \lib\dceos2.lib 
  61488.  
  61489.  Format 
  61490.  
  61491.                     #include <dce/acct.h>
  61492.  
  61493.                     void sec_rgy_acct_add(
  61494.                             sec_rgy_handle_t  context,
  61495.                             sec_rgy_login_name_t  *login_name,
  61496.                             sec_rgy_acct_key_t  *key_parts,
  61497.                             sec_rgy_acct_user_t  *user_part,
  61498.                             sec_rgy_acct_admin_t  *admin_part,
  61499.                             sec_passwd_rec_t  *caller_key,
  61500.                             sec_passwd_rec_t  *new_key,
  61501.                             sec_passwd_type_t  new_keytype,
  61502.                             sec_passwd_version_t  *new_key_version,
  61503.                             error_status_t  *status);
  61504.  
  61505.  Parameters 
  61506.  
  61507.           Input 
  61508.  
  61509.           context       An opaque handle bound to a registry server. Use 
  61510.                         sec_rgy_site_open to acquire a bound handle. 
  61511.  
  61512.           login_name    A pointer to the account login name. A login name is 
  61513.                         composed of three character strings that contains the 
  61514.                         principal, group, and organization (PGO) names 
  61515.                         corresponding to the account. All three names must be 
  61516.                         completely specified. 
  61517.  
  61518.           key_parts     A pointer to the minimum abbreviation allowed when 
  61519.                         logging in to the account. Abbreviations are not 
  61520.                         currently implemented and the only legal value is 
  61521.                         sec_rgy_acct_key_person. 
  61522.  
  61523.           user_part     A pointer to the sec_rgy_acct_user_t structure that 
  61524.                         contains the user part of the account data.  This 
  61525.                         represents such information as the account password, 
  61526.                         home directory, and default shell. 
  61527.  
  61528.           admin_part    A pointer to the sec_rgy_acct_admin_t structure that 
  61529.                         contains the administrative part of an account's data. 
  61530.                         This information includes the account creation and 
  61531.                         expiration dates and flags describing limits to the use 
  61532.                         of privilege attribute certificates, among other 
  61533.                         information. 
  61534.  
  61535.           caller_key    A key to use to encrypt new_key for transmission to the 
  61536.                         registry server. 
  61537.  
  61538.           new_key       The password for the new account.  During transmission 
  61539.                         to the registry server, it is encrypted with 
  61540.                         caller_key. 
  61541.  
  61542.           new_keytype   The type of the new key.  The server uses this 
  61543.                         parameter to decide how to encode new_key if it is sent 
  61544.                         as plain text. 
  61545.  
  61546.           Output 
  61547.  
  61548.           new_key_version The key version number returned by the server.  If 
  61549.                         the client requests a particular key version number 
  61550.                         (using the version_number field of the new_key input 
  61551.                         parameter), the server returns the requested version 
  61552.                         number back to the client. 
  61553.  
  61554.           status        A pointer to the completion status.  On successful 
  61555.                         completion, the routine returns error_status_ok. 
  61556.                         Otherwise, it returns one of the following errors: 
  61557.  
  61558.                              sec_rgy_not_authorized The client program is not 
  61559.                                                    authorized to add an account 
  61560.                                                    to the registry. 
  61561.  
  61562.                              sec_rgy_not_member_group The indicated principal 
  61563.                                                    is not a member of the 
  61564.                                                    indicated group. 
  61565.  
  61566.                              sec_rgy_not_member_org The indicated principal is 
  61567.                                                    not a member of the 
  61568.                                                    indicated organization. 
  61569.  
  61570.                              sec_rgy_not_member_group_org The indicated 
  61571.                                                    principal is not a member of 
  61572.                                                    the indicated group or 
  61573.                                                    organization. 
  61574.  
  61575.                              sec_rgy_object exists The account to be added 
  61576.                                                    already exists. 
  61577.  
  61578.                              sec_rgy_server_unavailable The DCE Registry Server 
  61579.                                                    is unavailable. 
  61580.  
  61581.  Usage 
  61582.  
  61583.           The sec_rgy_acct_add routine adds an account with the specified login 
  61584.           name. The login name is given in three parts, corresponding to the 
  61585.           principal, group, and organization names for the account. 
  61586.  
  61587.           The key_parts parameter specifies the minimum login abbreviation for 
  61588.           the account. If the requested abbreviation duplicates an existing 
  61589.           abbreviation for another account, the routine supplies the next 
  61590.           shortest unique abbreviation and returns this abbreviation in 
  61591.           key_parts. Abbreviations are not currently implemented. 
  61592.  
  61593.  Permissions Required 
  61594.  
  61595.           The sec_rgy_acct_add routine requires the following permissions on 
  61596.           the account (principal) that is to be added: 
  61597.  
  61598.             o  The mgmt_info (m) permission to change management information 
  61599.             o  The auth_info (a) permission to change authentication 
  61600.                information 
  61601.             o  The user_info (u) permission to change user information. 
  61602.  
  61603.  Notes 
  61604.  
  61605.           The constituent principal, group, and organization (PGO) items for an 
  61606.           account must be added before the account can be created. Also, the 
  61607.           principal must have been added as a member of the specified group and 
  61608.           organization. See sec_rgy_pgo_add_member. 
  61609.  
  61610.  Related Information 
  61611.  
  61612.           Routines: sec_rgy_acct_delete 
  61613.           sec_rgy_pgo_add 
  61614.           sec_rgy_pgo_add_member 
  61615.           sec_rgy_site_open 
  61616.  
  61617.  
  61618. ΓòÉΓòÉΓòÉ 8.9.4. sec_rgy_acct_admin_replace ΓòÉΓòÉΓòÉ
  61619.  
  61620.  Purpose 
  61621.  
  61622.           Replaces administrative account data. 
  61623.  
  61624.  Library 
  61625.  
  61626.           \lib\dceos2.lib 
  61627.  
  61628.  Format 
  61629.  
  61630.                     #include <dce/acct.h>
  61631.  
  61632.                     void sec_rgy_acct_admin_replace(
  61633.                             sec_rgy_handle_t  context,
  61634.                             sec_rgy_login_name_t  *login_name,
  61635.                             sec_rgy_acct_key_t  *key_parts,
  61636.                             sec_rgy_acct_admin_t  *admin_part,
  61637.                             error_status_t  *status);
  61638.  
  61639.  Parameters 
  61640.  
  61641.           Input 
  61642.  
  61643.           context       An opaque handle bound to a registry server. Use 
  61644.                         sec_rgy_site_open to acquire a bound handle. 
  61645.  
  61646.           login_name    A pointer to the account login name. A login name is 
  61647.                         composed of three character strings, that contains the 
  61648.                         principal, group, and organization (PGO) names 
  61649.                         corresponding to the account. For the group and 
  61650.                         organization names, blank strings serve as wildcards, 
  61651.                         matching any entry. The principal name must be input. 
  61652.  
  61653.           key_parts     A pointer to the minimum abbreviation allowed when 
  61654.                         logging in to the account. Abbreviations are not 
  61655.                         currently implemented and the only legal value is 
  61656.                         sec_rgy_acct_key_person. 
  61657.  
  61658.           admin_part    A pointer to the sec_rgy_acct_admin_t structure that 
  61659.                         contains the administrative part of an account's data. 
  61660.                         This information includes the account creation and 
  61661.                         expiration dates and flags describing limits to the use 
  61662.                         of privilege attribute certificates, among other 
  61663.                         information, and can be modified only by an 
  61664.                         administrator. The sec_rgy_acct_admin_t structure 
  61665.                         contains the following fields: 
  61666.  
  61667.                              creator          The identity of the principal who 
  61668.                                               created this account, in 
  61669.                                               sec_rgy_foreign_id_t form.  This 
  61670.                                               field is set by the registry 
  61671.                                               server. 
  61672.  
  61673.                              creation_date    The date (sec_timeval_sec_t) the 
  61674.                                               account was created.  This field 
  61675.                                               is set by the registry server. 
  61676.  
  61677.                              last_changer     The identity of the principal who 
  61678.                                               last modified any of the account 
  61679.                                               information (user or 
  61680.                                               administrative).  This field is 
  61681.                                               set by the registry server. 
  61682.  
  61683.                              change_date      The date (sec_timeval_sec_t) the 
  61684.                                               account was last modified (either 
  61685.                                               user or administrative data). 
  61686.                                               This field is set by the registry 
  61687.                                               server. 
  61688.  
  61689.                              expiration_date  The date (sec_timeval_sec_t) the 
  61690.                                               account ceases to be valid. 
  61691.  
  61692.                              good_since_date  This date (sec_timeval_sec_t) is 
  61693.                                               for Kerberos-style TGT 
  61694.                                               revocation.  Ticket-granting 
  61695.                                               tickets (TGTs) issued before this 
  61696.                                               date are not honored by 
  61697.                                               authenticated network services. 
  61698.  
  61699.                              flags            Contains administration flags 
  61700.                                               used as part of the 
  61701.                                               administrator's information for 
  61702.                                               any registry account.  This field 
  61703.                                               is in sec_rgy_acct_admin_flags_t 
  61704.                                               form. (See Registry API for a 
  61705.                                               complete description of these 
  61706.                                               flags.) 
  61707.  
  61708.                              authentication_flags These two fields, in 
  61709.                                               sec_rgy_acct_admin_flags_t and 
  61710.                                               sec_rgy_acct_auth_flags_t form, 
  61711.                                               respectively, contain flags 
  61712.                                               controlling account use of 
  61713.                                               authentication services.  See 
  61714.                                               "Registry API" under Registry 
  61715.                                               Constants for a complete 
  61716.                                               description of these flags. 
  61717.  
  61718.           Output 
  61719.  
  61720.           status        A pointer to the completion status.  On successful 
  61721.                         completion, the routine returns error_status_ok. 
  61722.                         Otherwise, it returns one of the following errors: 
  61723.  
  61724.                              sec_rgy_not_authorized The client program is not 
  61725.                                                   authorized to change the 
  61726.                                                   administrative information 
  61727.                                                   for the specified account. 
  61728.  
  61729.                              sec_rgy_object_not_found The registry server could 
  61730.                                                   not find the specified name. 
  61731.  
  61732.                              sec_rgy_server_unavailable The DCE Registry Server 
  61733.                                                   is unavailable. 
  61734.  
  61735.  Usage 
  61736.  
  61737.           The sec_rgy_acct_admin_replace routine replaces the administrative 
  61738.           information in the account record specified by the input login name. 
  61739.           The administrative information contains limitations on the account's 
  61740.           use and privileges.  It can be modified only by a registry 
  61741.           administrator - that is, a user with the auth_info (abbreviated as a) 
  61742.           privilege for an account. 
  61743.  
  61744.           The key_parts parameter identifies how many of the login_name parts 
  61745.           to use as the unique abbreviation for the account.  If the requested 
  61746.           abbreviation duplicates an existing abbreviation for another account, 
  61747.           the routine supplies the next shortest unique abbreviation and 
  61748.           returns this abbreviation using key_parts. 
  61749.  
  61750.  Permissions Required 
  61751.  
  61752.           The sec_rgy_acct_admin_replace routine requires the following 
  61753.           permissions on the account principal: 
  61754.  
  61755.             o  The mgmt_info (m) permission, if flags or expiration_date is to 
  61756.                be changed 
  61757.             o  The auth_info (a) permission, if authentication_flags or 
  61758.                good_since_date is to be changed. 
  61759.  
  61760.  Notes 
  61761.  
  61762.           All users need the write (w) privilege in the appropriate ACL entry 
  61763.           to modify any account information. 
  61764.  
  61765.  Related Information 
  61766.  
  61767.           Routines: sec_rgy_acct_user_replace 
  61768.           sec_rgy_acct_replace_all 
  61769.           sec_rgy_acct_lookup 
  61770.           sec_rgy_site_open 
  61771.  
  61772.  
  61773. ΓòÉΓòÉΓòÉ 8.9.5. sec_rgy_acct_delete ΓòÉΓòÉΓòÉ
  61774.  
  61775.  Purpose 
  61776.  
  61777.           Deletes an account. 
  61778.  
  61779.  Library 
  61780.  
  61781.           \lib\dceos2.lib 
  61782.  
  61783.  Format 
  61784.  
  61785.                     #include <dce/acct.h>
  61786.  
  61787.                     void sec_rgy_acct_delete(
  61788.                             sec_rgy_handle_t  context,
  61789.                             sec_rgy_login_name_t  *login_name,
  61790.                             error_status_t  *status);
  61791.  
  61792.  Parameters 
  61793.  
  61794.           Input 
  61795.  
  61796.           context       A pointer to an opaque handle bound to a registry 
  61797.                         server.  Use sec_rgy_site_open to acquire a bound 
  61798.                         handle. 
  61799.  
  61800.           login_name    A pointer to the account login name.  A login name is 
  61801.                         composed of three character strings, containing the 
  61802.                         principal, group, and organization (PGO) names 
  61803.                         corresponding to the account.  Only the principal name 
  61804.                         is required to perform the deletion. 
  61805.  
  61806.           Output 
  61807.  
  61808.           status        A pointer to the completion status.  On successful 
  61809.                         completion, the routine returns error_status_ok. 
  61810.                         Otherwise, it returns one of the following errors: 
  61811.  
  61812.                              sec_rgy_not_authorized The client program is not 
  61813.                                                    authorized to delete the 
  61814.                                                    specified account. 
  61815.  
  61816.                              sec_rgy_object_not_found No PGO item was found 
  61817.                                                    with the given name. 
  61818.  
  61819.                              sec_rgy_server_unavailable The DCE Registry Server 
  61820.                                                    is unavailable. 
  61821.  
  61822.  Usage 
  61823.  
  61824.           The sec_rgy_acct_delete routine deletes from the registry the account 
  61825.           corresponding to the specified login name. 
  61826.  
  61827.  Permissions Required 
  61828.  
  61829.           The sec_rgy_acct_delete routine requires the following permissions on 
  61830.           the account principal: 
  61831.  
  61832.             o  The m (mgmt_info) permission to remove management information 
  61833.             o  The a (auth_info) permission to remove authentication 
  61834.                information 
  61835.             o  The u (user_info) permission to remove user information. 
  61836.  
  61837.  Notes 
  61838.  
  61839.           Even though the account is deleted, the PGO items corresponding to 
  61840.           the account remain.  They must be deleted with separate calls to 
  61841.           sec_rgy_pgo_delete. 
  61842.  
  61843.  Related Information 
  61844.  
  61845.           Routines: sec_rgy_acct_add 
  61846.           sec_rgy_pgo_delete 
  61847.           sec_rgy_cursor_reset 
  61848.           sec_rgy_site_open 
  61849.  
  61850.  
  61851. ΓòÉΓòÉΓòÉ 8.9.6. sec_rgy_acct_get_projlist ΓòÉΓòÉΓòÉ
  61852.  
  61853.  Purpose 
  61854.  
  61855.           Returns the projects (groups) in an account's project list. 
  61856.  
  61857.  Library 
  61858.  
  61859.           \lib\dceos2.lib 
  61860.  
  61861.  Format 
  61862.  
  61863.                     #include <dce/acct.h>
  61864.  
  61865.                     void sec_rgy_acct_get_projlist(
  61866.                             sec_rgy_handle_t  context,
  61867.                             sec_rgy_login_name_t  *login_name,
  61868.                             sec_rgy_cursor_t  *projlist_cursor,
  61869.                             unsigned32  max_number,
  61870.                             unsigned32  *supplied_number,
  61871.                             uuid_t  id_projlist[],
  61872.                             unsigned32  unix_projlist[],
  61873.                             unsigned32  *num_projects,
  61874.                             error_status_t  *status);
  61875.  
  61876.  Parameters 
  61877.  
  61878.           Input 
  61879.  
  61880.           context       An opaque handle bound to a registry server.  Use 
  61881.                         sec_rgy_site_open to acquire a bound handle. 
  61882.  
  61883.           login_name    A pointer to the account login name.  A login name is 
  61884.                         composed of three character strings, containing the 
  61885.                         principal, group, and organization (PGO) names 
  61886.                         corresponding to the account. For the group and 
  61887.                         organization names, blank strings can serve as 
  61888.                         wildcards, matching any entry. The principal name must 
  61889.                         be input. 
  61890.  
  61891.           max_number    The maximum number of projects to be returned by the 
  61892.                         routine. This must be no larger than the allocated size 
  61893.                         of the projlist arrays. 
  61894.  
  61895.           Input/Output 
  61896.  
  61897.           projlist_cursor An opaque pointer indicating a specific project in an 
  61898.                         account's project list.  The sec_rgy_acct_get_projlist 
  61899.                         routine returns the project indicated by 
  61900.                         projlist_cursor, and advances the cursor to point to 
  61901.                         the next project on the list.  When the end of the list 
  61902.                         is reached, the routine returns the value 
  61903.                         sec_rgy_no_more_entries in the status parameter. Use 
  61904.                         sec_rgy_cursor_reset to reset the cursor. 
  61905.  
  61906.           Output 
  61907.  
  61908.           supplied_number A pointer to the actual number of projects returned. 
  61909.                         This is always less than or equal to the max_number 
  61910.                         supplied on input.  If there are more projects in the 
  61911.                         account list, sec_rgy_acct_get_projlist sets 
  61912.                         projlist_cursor to point to the next entry after the 
  61913.                         last one in the returned list. 
  61914.  
  61915.           id_projlist   An array to receive the UUID of each project returned. 
  61916.                         The size allocated for the array is given by 
  61917.                         max_number.  If this value is less than the total 
  61918.                         number of projects in the account project list, 
  61919.                         multiple calls must be made to return all of the 
  61920.                         projects. 
  61921.  
  61922.           unix_projlist An array to receive the UNIX number of each project 
  61923.                         returned.  The size allocated for the array is given by 
  61924.                         max_number.  If this value is less than the total 
  61925.                         number of projects in the account project list, 
  61926.                         multiple calls must be made to return all of the 
  61927.                         projects. 
  61928.  
  61929.           num_projects  A pointer indicating the total number of projects in 
  61930.                         the specified account's project list. 
  61931.  
  61932.           status        A pointer to the completion status.  On successful 
  61933.                         completion, the routine returns error_status_ok. 
  61934.                         Otherwise, it returns one of the following errors: 
  61935.  
  61936.                              sec_rgy_no_more_entries The cursor is at the end 
  61937.                                                   of the list of projects. 
  61938.  
  61939.                              sec_rgy_not_authorized The client program is not 
  61940.                                                   authorized to see a project 
  61941.                                                   list for this principal. 
  61942.  
  61943.                              sec_rgy_server_unavailable The DCE Registry Server 
  61944.                                                   is unavailable. 
  61945.  
  61946.  Usage 
  61947.  
  61948.           The sec_rgy_acct_get_projlist routine returns members of the project 
  61949.           list for the specified account.  It returns the project information 
  61950.           in two arrays.  The id_projlist array contains the UUIDs for the 
  61951.           returned projects.  The unix_projlist array contains the UNIX numbers 
  61952.           for the returned projects. 
  61953.  
  61954.           The project list cursor, projlist_cursor, provides an automatic place 
  61955.           holder in the project list.  The sec_rgy_acct_get_projlist routine 
  61956.           automatically updates this parameter to point to the next project in 
  61957.           the project list. To return an entire project list, reset 
  61958.           projlist_cursor with sec_rgy_cursor_reset on the initial call and 
  61959.           then issue successive calls until all the projects are returned. 
  61960.  
  61961.  Permissions Required 
  61962.  
  61963.           The sec_rgy_acct_get_projlist routine requires the r (read) 
  61964.           permission on the account principal for which the project list data 
  61965.           is to be returned. 
  61966.  
  61967.  Cautions 
  61968.  
  61969.           There are several different types of cursors used in the Registry 
  61970.           API.  Some cursors point to PGO items, others point to members in a 
  61971.           membership list, and others point to account data.  Do not use a 
  61972.           cursor for one type of object in a call expecting another type of 
  61973.           object.  For example, you cannot use the same cursor on a call to 
  61974.           sec_rgy_acct_get_projlist and sec_rgy_pgo_get_next. The behavior in 
  61975.           this case is undefined. 
  61976.  
  61977.           Furthermore, cursors are specific to a server. 
  61978.  
  61979.           Use sec_rgy_cursor_reset to renew a cursor for use with another call 
  61980.           or for another server. 
  61981.  
  61982.  Related Information 
  61983.  
  61984.           Routines: sec_rgy_cursor_reset 
  61985.           sec_rgy_pgo_get_next 
  61986.  
  61987.  
  61988. ΓòÉΓòÉΓòÉ 8.9.7. sec_rgy_acct_lookup ΓòÉΓòÉΓòÉ
  61989.  
  61990.  Purpose 
  61991.  
  61992.           Returns data for a specified account. 
  61993.  
  61994.  Library 
  61995.  
  61996.           \lib\dceos2.lib 
  61997.  
  61998.  Format 
  61999.  
  62000.                     #include <dce/acct.h>
  62001.  
  62002.                     void sec_rgy_acct_lookup(
  62003.                             sec_rgy_handle_t  context,
  62004.                             sec_rgy_login_name_t  *name_key,
  62005.                             sec_rgy_cursor_t  *account_cursor,
  62006.                             sec_rgy_login_name_t  *name_result,
  62007.                             sec_rgy_sid_t  *id_sid,
  62008.                             sec_rgy_unix_sid_t  *unix_sid,
  62009.                             sec_rgy_acct_key_t  *key_parts,
  62010.                             sec_rgy_acct_user_t  *user_part,
  62011.                             sec_rgy_acct_admin_t  *admin_part,
  62012.                             error_status_t  *status);
  62013.  
  62014.  Parameters 
  62015.  
  62016.           Input 
  62017.  
  62018.           context       An opaque handle bound to a registry server.  Use 
  62019.                         sec_rgy_site_open to acquire a bound handle. 
  62020.  
  62021.           name_key      A pointer to the account login name.  A login name is 
  62022.                         composed of three character strings, containing the 
  62023.                         principal, group, and organization (PGO) names 
  62024.                         corresponding to the account.  Blank strings serve as 
  62025.                         wildcards, matching any entry. 
  62026.  
  62027.           Input/Output 
  62028.  
  62029.           account_cursor An opaque pointer to a specific account in the 
  62030.                         registry database. If name_key is blank, 
  62031.                         sec_rgy_acct_lookup returns information about the 
  62032.                         account to which the cursor is pointing.  On return, 
  62033.                         the cursor points to the next account in the database 
  62034.                         after the returned account.  If name_key is blank and 
  62035.                         the account_cursor has been reset with 
  62036.                         sec_rgy_cursor_reset, sec_rgy_acct_lookup returns 
  62037.                         information about the first account in the database. 
  62038.                         When the end of the list of accounts in the database is 
  62039.                         reached, the routine returns the value 
  62040.                         sec_rgy_no_more_entries in the status parameter.  Use 
  62041.                         sec_rgy_cursor_reset to refresh the cursor. 
  62042.  
  62043.           Output 
  62044.  
  62045.           name_result   A pointer to the full login name of the account 
  62046.                         (including all three names) for which the information 
  62047.                         is returned.  The remaining parameters contain the 
  62048.                         information belonging to the returned account. 
  62049.  
  62050.           id_sid        A structure containing the three UUIDs of the 
  62051.                         principal, group, and organization for the account. 
  62052.  
  62053.           unix_sid      A structure containing the three UNIX numbers of the 
  62054.                         principal, group, and organization for the account. 
  62055.  
  62056.           key_parts     A pointer to the minimum abbreviation allowed when 
  62057.                         logging in to the account.  Abbreviations are not 
  62058.                         currently implemented and the only legal value is 
  62059.                         sec_rgy_acct_key_person. 
  62060.  
  62061.           user_part     A pointer to the sec_rgy_acct_user_t structure 
  62062.                         containing the user part of the account data.  This 
  62063.                         represents such information as the account password, 
  62064.                         home directory, and default shell, all of which are 
  62065.                         accessible to, and can be modified by, the account 
  62066.                         owner. 
  62067.  
  62068.           admin_part    A pointer to the sec_rgy_acct_admin_t structure 
  62069.                         containing the administrative part of an account's 
  62070.                         data. This information includes the account creation 
  62071.                         and expiration dates and flags describing limits to the 
  62072.                         use of privilege attribute certificates, among other 
  62073.                         information, and can be modified only by an 
  62074.                         administrator. 
  62075.  
  62076.           status        A pointer to the completion status.  On successful 
  62077.                         completion, the routine returns error_status_ok. 
  62078.                         Otherwise, it returns one of the following errors: 
  62079.  
  62080.                              sec_rgy_no_more_entries The cursor is at the end 
  62081.                                                    of the accounts in the 
  62082.                                                    registry. 
  62083.  
  62084.                              sec_rgy_object_not_found The input account could 
  62085.                                                    not be found by the registry 
  62086.                                                    server. 
  62087.  
  62088.                              sec_rgy_server_unavailable The DCE Registry Server 
  62089.                                                    is unavailable. 
  62090.  
  62091.  Usage 
  62092.  
  62093.           The sec_rgy_acct_lookup routine returns all the information about an 
  62094.           account in the registry database.  The account can be specified 
  62095.           either with name_key or account_cursor. If name_key is completely 
  62096.           blank, the routine uses the account_cursor value instead. 
  62097.  
  62098.           For name_key, a zero-length principal, group, or organization key 
  62099.           serves as a wildcard.  For example, a login name key with the 
  62100.           principal and organization fields blank returns the next (possibly 
  62101.           first) account whose group matches the input group field. The full 
  62102.           login name of the returned account is passed back in name_result. 
  62103.  
  62104.           The account_cursor provides an automatic place holder in the registry 
  62105.           database.  The routine automatically updates this parameter to point 
  62106.           to the next account in the database, after the account for which the 
  62107.           information was returned.  If name_key is blank and the 
  62108.           account_cursor has been reset with sec_rgy_cursor_reset, 
  62109.           sec_rgy_acct_lookup returns information about the first account in 
  62110.           the database. 
  62111.  
  62112.  Permissions Required 
  62113.  
  62114.           The sec_rgy_acct_lookup routine requires the r (read) permission on 
  62115.           the account principal to be viewed. 
  62116.  
  62117.  Cautions 
  62118.  
  62119.           There are several different types of cursors used in the Registry 
  62120.           Application Programmer Interface.  Some cursors point to PGO items, 
  62121.           others point to members in a membership list, and others point to 
  62122.           account data.  Do not use a cursor for one type of object in a call 
  62123.           expecting another type of object.  For example, you cannot use the 
  62124.           same cursor on a call to sec_rgy_acct_get_projlist and 
  62125.           sec_rgy_pgo_get_next. The behavior in this case is undefined. 
  62126.  
  62127.           Furthermore, cursors are specific to a server. 
  62128.  
  62129.           Use sec_rgy_cursor_reset to renew a cursor for use with another call 
  62130.           or for another server. 
  62131.  
  62132.  Related Information 
  62133.  
  62134.           Routines: sec_rgy_cursor_reset 
  62135.           sec_rgy_site_open 
  62136.  
  62137.  
  62138. ΓòÉΓòÉΓòÉ 8.9.8. sec_rgy_acct_passwd ΓòÉΓòÉΓòÉ
  62139.  
  62140.  Purpose 
  62141.  
  62142.           Changes the password for an account. 
  62143.  
  62144.  Library 
  62145.  
  62146.           \lib\dceos2.lib 
  62147.  
  62148.  Format 
  62149.  
  62150.                     #include <dce/acct.h>
  62151.  
  62152.                     void sec_rgy_acct_passwd(
  62153.                             sec_rgy_handle_t  context,
  62154.                             sec_rgy_login_name_t  *login_name,
  62155.                             sec_passwd_rec_t  *caller_key,
  62156.                             sec_passwd_rec_t  *new_key,
  62157.                             sec_passwd_type_t  new_keytype,
  62158.                             sec_passwd_version_t  *new_key_version,
  62159.                             error_status_t  *status);
  62160.  
  62161.  Parameters 
  62162.  
  62163.           Input 
  62164.  
  62165.           context       An opaque handle bound to a registry server.  Use 
  62166.                         sec_rgy_site_open to acquire a bound handle. 
  62167.  
  62168.           login_name    A pointer to the account login name.  A login name is 
  62169.                         composed of three character strings, containing the 
  62170.                         principal, group, and organization names corresponding 
  62171.                         to the account. You can specify a login_name using the 
  62172.                         following form: 
  62173.  
  62174.                                                 principal_name
  62175.                                                 group_name
  62176.                                                 org_name
  62177.                         You can use blanks for group_name and org_name. 
  62178.  
  62179.           caller_key    A key to use to encrypt the key for transmission to the 
  62180.                         registry server.  If communications secure to the 
  62181.                         rpc_c_authn_level_pkt_privacy level are available on a 
  62182.                         system, this parameter is not necessary, and the packet 
  62183.                         encryption is sufficient to ensure security. 
  62184.  
  62185.           new_key       The password for the new account. During transmission 
  62186.                         to the registry server, it is encrypted with 
  62187.                         caller_key. 
  62188.  
  62189.           new_keytype   The type of the new key.  The server uses this 
  62190.                         parameter to decide how to encode new_key if it is sent 
  62191.                         as plain text. 
  62192.  
  62193.           Output 
  62194.  
  62195.           new_key_version The key version number, returned by the server.  If 
  62196.                         the client requests a particular key version number 
  62197.                         (using the version_number field of the new_key input 
  62198.                         parameter), the server returns the requested version 
  62199.                         number back to the client. 
  62200.  
  62201.           status        A pointer to the completion status.  On successful 
  62202.                         completion, the routine returns error_status_ok. 
  62203.                         Otherwise, it returns one of the following errors: 
  62204.  
  62205.                              sec_rgy_not_authorized The client program is not 
  62206.                                                    authorized to change the 
  62207.                                                    password of this account. 
  62208.  
  62209.                              sec_rgy_object_not_found The account to be 
  62210.                                                    modified was not found by 
  62211.                                                    the registry server. 
  62212.  
  62213.                              sec_rgy_server_unavailable The DCE Registry Server 
  62214.                                                    is unavailable. 
  62215.  
  62216.  Usage 
  62217.  
  62218.           The sec_rgy_acct_passwd routine changes an account password to the 
  62219.           input password character string. Wildcards (blank fields) are not 
  62220.           permitted in the specified account name. You can specify a login_name 
  62221.           using the following form: 
  62222.  
  62223.                     principal_name
  62224.                     group_name
  62225.                     org_name
  62226.           You can use blanks for group_name and org_name. 
  62227.  
  62228.  Permissions Required 
  62229.  
  62230.           The sec_rgy_acct_passwd routine requires the u (user_info) permission 
  62231.           on the account principal whose password is to be changed. 
  62232.  
  62233.  
  62234. ΓòÉΓòÉΓòÉ 8.9.9. sec_rgy_acct_rename ΓòÉΓòÉΓòÉ
  62235.  
  62236.  Purpose 
  62237.  
  62238.           Changes an account login name. 
  62239.  
  62240.  Library 
  62241.  
  62242.           \lib\dceos2.lib 
  62243.  
  62244.  Format 
  62245.  
  62246.                     #include <dce/acct.h>
  62247.  
  62248.                     void sec_rgy_acct_rename(
  62249.                             sec_rgy_handle_t  context,
  62250.                             sec_rgy_login_name_t  *old_login_name,
  62251.                             sec_rgy_login_name_t  *new_login_name,
  62252.                             sec_rgy_acct_key_t  *new_key_parts,
  62253.                             error_status_t  *status);
  62254.  
  62255.  Parameters 
  62256.  
  62257.           Input 
  62258.  
  62259.           context       An opaque handle bound to a registry server. Use 
  62260.                         sec_rgy_site_open to acquire a bound handle. 
  62261.  
  62262.           old_login_name A pointer to the current account login name. The login 
  62263.                         name is composed of three character strings containing 
  62264.                         the principal, group, and organization names 
  62265.                         corresponding to the account. All three strings must be 
  62266.                         completely specified. 
  62267.  
  62268.           new_login_name A pointer to the new account login name. Again, all 
  62269.                         three component names must be completely specified. 
  62270.  
  62271.           Input/Output 
  62272.  
  62273.           new_key_parts A pointer to the minimum abbreviation allowed when 
  62274.                         logging in to the account.  Abbreviations are not 
  62275.                         currently implemented and the only legal value is 
  62276.                         sec_rgy_acct_key_person. 
  62277.  
  62278.           Output 
  62279.  
  62280.           status        A pointer to the completion status.  On successful 
  62281.                         completion, the routine returns error_status_ok. 
  62282.                         Otherwise, it returns one of the following errors: 
  62283.  
  62284.                              sec_rgy_status_not_authorized The client program 
  62285.                                                    is not authorized to make 
  62286.                                                    the changes. 
  62287.  
  62288.                              sec_rgy_object_not_found The account to be 
  62289.                                                    modified was not found by 
  62290.                                                    the registry server. 
  62291.  
  62292.                              sec_rgy_status_name_exists The new account name is 
  62293.                                                    already in use by another 
  62294.                                                    account. 
  62295.  
  62296.                              sec_rgy_server_unavailable The DCE Registry Server 
  62297.                                                    is unavailable. 
  62298.  
  62299.                              sec_rgy_bad_data      The old_login_name or the 
  62300.                                                    new_login_name is NULL. 
  62301.  
  62302.  Usage 
  62303.  
  62304.           The sec_rgy_acct_rename routine changes an account login name from 
  62305.           old_login_name to new_login_name.  Wildcards (empty fields) are not 
  62306.           permitted in either input name; both the old and new login names must 
  62307.           completely specify their component principal, group, and organization 
  62308.           names.  Note, though, that the principal component in a login name 
  62309.           cannot be changed. 
  62310.  
  62311.           The new_key_parts parameter identifies the number of the 
  62312.           new_login_name parts to use as the unique abbreviation for the 
  62313.           account.  If the requested abbreviation duplicates an existing 
  62314.           abbreviation for another account, the routine identifies the next 
  62315.           shortest unique abbreviation and returns this abbreviation using 
  62316.           new_key_parts. 
  62317.  
  62318.  Permissions Required 
  62319.  
  62320.           The sec_rgy_acct_rename routine requires the m (mgmt_info) permission 
  62321.           on the account principal to be renamed. 
  62322.  
  62323.  Notes 
  62324.  
  62325.           The sec_rgy_acct_rename routine does not affect any of the registry 
  62326.           PGO data.  The constituent principal, group, and organization (PGO) 
  62327.           items for an account must be added before the account can be created. 
  62328.           Also, the principal must have been added as a member of the specified 
  62329.           group and organization. See sec_rgy_pgo_add_member. 
  62330.  
  62331.  Related Information 
  62332.  
  62333.           Routines: sec_rgy_acct_add 
  62334.           sec_rgy_site_open 
  62335.  
  62336.  
  62337. ΓòÉΓòÉΓòÉ 8.9.10. sec_rgy_acct_replace_all ΓòÉΓòÉΓòÉ
  62338.  
  62339.  Purpose 
  62340.  
  62341.           Replaces all account data for an account. 
  62342.  
  62343.  Library 
  62344.  
  62345.           \lib\dceos2.lib 
  62346.  
  62347.  Format 
  62348.  
  62349.                     #include <dce/acct.h>
  62350.  
  62351.                     void sec_rgy_acct_replace_all(
  62352.                             sec_rgy_handle_t  context,
  62353.                             sec_rgy_login_name_t  *login_name,
  62354.                             sec_rgy_acct_key_t  *key_parts,
  62355.                             sec_rgy_acct_user_t  *user_part,
  62356.                             sec_rgy_acct_admin_t  *admin_part,
  62357.                             boolean32  *set_password,
  62358.                             sec_passwd_rec_t  *caller_key,
  62359.                             sec_passwd_rec_t  *new_key,
  62360.                             sec_passwd_type_t  new_keytype,
  62361.                             sec_passwd_version_t  *new_key_version,
  62362.                             error_status_t  *status);
  62363.  
  62364.  Parameters 
  62365.  
  62366.           Input 
  62367.  
  62368.           context       An opaque handle bound to a registry server.  Use 
  62369.                         sec_rgy_site_open to acquire a bound handle. 
  62370.  
  62371.           login_name    A pointer to the account login name.  A login name is 
  62372.                         composed of three character strings, containing the 
  62373.                         principal, group, and organization (PGO) names 
  62374.                         corresponding to the account. Blank strings serve as 
  62375.                         wildcards, matching any entry. 
  62376.  
  62377.           user_part     A pointer to the sec_rgy_acct_user_t structure 
  62378.                         containing the user part of the account data.  This 
  62379.                         represents information such as the account password, 
  62380.                         home directory, and default shell, all of which are 
  62381.                         accessible to, and can be modified by, the account 
  62382.                         owner. 
  62383.  
  62384.           admin_part    A pointer to the sec_rgy_acct_admin_t structure 
  62385.                         containing the administrative part of an account's 
  62386.                         data. This information includes the account creation 
  62387.                         and expiration dates and flags describing limits to the 
  62388.                         use of privilege attribute certificates, among other 
  62389.                         information, and can be modified only by an 
  62390.                         administrator. 
  62391.  
  62392.           set_passwd    The password reset flag. If you set this parameter to 
  62393.                         TRUE, the account's password is changed to the value 
  62394.                         specified in new_key. 
  62395.  
  62396.           caller_key    A key to use to encrypt the key for transmission to the 
  62397.                         registry server.  If communications secure to the 
  62398.                         rpc_c_authn_level_pkt_privacy level are available on a 
  62399.                         system, this parameter is not necessary, and the packet 
  62400.                         encryption is sufficient to ensure security. 
  62401.  
  62402.           new_key       The password for the new account.  During transmission 
  62403.                         to the registry server, it is encrypted with 
  62404.                         caller_key. 
  62405.  
  62406.           new_keytype   The type of the new key.  The server uses this 
  62407.                         parameter to decide how to encode the plaintext key. 
  62408.  
  62409.           Input/Output 
  62410.  
  62411.           key_parts     A pointer to the minimum abbreviation allowed when 
  62412.                         logging in to the account.  Abbreviations are not 
  62413.                         currently implemented and the only legal value is 
  62414.                         sec_rgy_acct_key_person. 
  62415.  
  62416.           Output 
  62417.  
  62418.           new_key_version The key version number returned by the server.  If 
  62419.                         the client requests a particular key version number 
  62420.                         (using the version_number field of the new_key input 
  62421.                         parameter), the server returns the requested version 
  62422.                         number back to the client. 
  62423.  
  62424.           status        A pointer to the completion status.  On successful 
  62425.                         completion, the routine returns error_status_ok. 
  62426.                         Otherwise, it returns one of the following errors: 
  62427.  
  62428.                              sec_rgy_not_authorized The client program is not 
  62429.                                                    authorized to change account 
  62430.                                                    information. 
  62431.  
  62432.                              sec_rgy_object_not_found The specified account 
  62433.                                                    could not be found. 
  62434.  
  62435.                              sec_rgy_server_unavailable The DCE Registry Server 
  62436.                                                    is unavailable. 
  62437.  
  62438.                              sec_rgy_homedir_too_long The home directory is too 
  62439.                                                    long. 
  62440.  
  62441.  Usage 
  62442.  
  62443.           The sec_rgy_acct_replace_all routine replaces both the user and 
  62444.           administrative information in the account record specified by the 
  62445.           input login name. The administrative information contains limitations 
  62446.           on the account's use and privileges. The user information contains 
  62447.           information such as the account home directory and default shell. 
  62448.           Typically, the administrative information can only be modified by a 
  62449.           registry administrator (users with auth_info (a) privileges for an 
  62450.           account), but the user information can be modified by the account 
  62451.           owner (users with user_info (u) privileges for an account). 
  62452.  
  62453.           Use the set_passwd parameter to reset the password. If you set this 
  62454.           parameter to TRUE, the account's password is changed to the value 
  62455.           specified in new_key. 
  62456.  
  62457.           The key_parts parameter identifies how many of the login_name parts 
  62458.           to use as the unique abbreviation for the replaced account.  If the 
  62459.           requested abbreviation duplicates an existing abbreviation for 
  62460.           another account, the routine identifies the next shortest unique 
  62461.           abbreviation and returns this abbreviation using key_parts. 
  62462.  
  62463.  Permissions Required 
  62464.  
  62465.           The sec_rgy_acct_replace_all routine requires the following 
  62466.           permissions on the account principal: 
  62467.  
  62468.             o  The m (mgmt_info) permission, if flags or expiration_date is to 
  62469.                be changed 
  62470.             o  The a (auth_info) permission, if authentication_flags or 
  62471.                good_since_date is to be changed 
  62472.             o  The u (user_info) permission, if user_flags, gecos, 
  62473.                home_directory, shell, or password is to be changed. 
  62474.  
  62475.  Notes 
  62476.  
  62477.           All users need the write (w) privilege to modify any account 
  62478.           information. 
  62479.  
  62480.  Related Information 
  62481.  
  62482.           Routines: 
  62483.  
  62484.  
  62485.           sec_rgy_acct_add 
  62486.           sec_rgy_acct_admin_replace 
  62487.           sec_rgy_acct_user_replace 
  62488.  
  62489.  
  62490. ΓòÉΓòÉΓòÉ 8.9.11. sec_rgy_acct_user_replace ΓòÉΓòÉΓòÉ
  62491.  
  62492.  Purpose 
  62493.  
  62494.           Replaces user account data. 
  62495.  
  62496.  Library 
  62497.  
  62498.           \lib\dceos2.lib 
  62499.  
  62500.  Format 
  62501.  
  62502.                     #include <dce/acct.h>
  62503.  
  62504.                     void sec_rgy_acct_user_replace(
  62505.                             sec_rgy_handle_t  context,
  62506.                             sec_rgy_login_name_t  *login_name,
  62507.                             sec_rgy_acct_user_t  *user_part,
  62508.                             boolean32  set_passwd,
  62509.                             sec_passwd_rec_t  *caller_key,
  62510.                             sec_passwd_rec_t  *new_key,
  62511.                             sec_passwd_type_t  new_keytype,
  62512.                             sec_passwd_version_t  *new_key_version,
  62513.                             error_status_t  *status);
  62514.  
  62515.  Parameters 
  62516.  
  62517.           Input 
  62518.  
  62519.           context       An opaque handle bound to a registry server.  Use 
  62520.                         sec_rgy_site_open to acquire a bound handle. 
  62521.  
  62522.           login_name    A pointer to the account login name. A login name is 
  62523.                         composed of three character strings containing the 
  62524.                         principal, group, and organization (PGO) names 
  62525.                         corresponding to the account. For the group and 
  62526.                         organization names, blank strings can serve as 
  62527.                         wildcards, matching any entry. The principal name must 
  62528.                         be input. 
  62529.  
  62530.           user_part     A pointer to the sec_rgy_acct_user_t structure 
  62531.                         containing the user part of the account data.  This 
  62532.                         represents such information as the account password, 
  62533.                         home directory, and default shell, all of which are 
  62534.                         accessible to, and can be modified by, the account 
  62535.                         owner.  The structure contains the following fields: 
  62536.  
  62537.                              gecos               A character string containing 
  62538.                                                  information about the account 
  62539.                                                  owner. This often includes 
  62540.                                                  such information as their name 
  62541.                                                  and telephone number. 
  62542.  
  62543.                              homedir             The default directory at login 
  62544.                                                  for the account. 
  62545.  
  62546.                              shell               The default shell to use at 
  62547.                                                  login. 
  62548.  
  62549.                              passwd_version_number The password version number, 
  62550.                                                  a 32-bit integer, set by the 
  62551.                                                  registry server. 
  62552.  
  62553.                              passwd_dtm          The date and time of the last 
  62554.                                                  password change (in 
  62555.                                                  sec_timeval_sec_t form), also 
  62556.                                                  set by the registry server. 
  62557.  
  62558.                              flags               A flag set of type 
  62559.                                                  sec_rgy_acct_user_flags_t. 
  62560.  
  62561.                              passwd              The encrypted password of the 
  62562.                                                  account. 
  62563.  
  62564.           set_passwd    The password reset parameter. If you set this parameter 
  62565.                         to TRUE, the user's password is changed to the value 
  62566.                         specified in new_key. 
  62567.  
  62568.           caller_key    A key to use to encrypt the key for transmission to the 
  62569.                         registry server.  If communications secure to the 
  62570.                         rpc_c_authn_level_pkt_privacy level are available on a 
  62571.                         system, then this parameter is not necessary, and the 
  62572.                         packet encryption is sufficient to ensure security. 
  62573.  
  62574.           new_key       The password for the new account.  During transmission 
  62575.                         to the registry server, it is encrypted with 
  62576.                         caller_key. 
  62577.  
  62578.           new_keytype   The type of the new key.  The server uses this 
  62579.                         parameter to decide how to encode the plaintext key. 
  62580.  
  62581.           Output 
  62582.  
  62583.           new_key_version The key version number returned by the server.  If 
  62584.                         the client requests a particular key version number (by 
  62585.                         means of the version_number field of the new_key input 
  62586.                         parameter), the server returns the requested version 
  62587.                         number back to the client. 
  62588.  
  62589.           status        A pointer to the completion status.  On successful 
  62590.                         completion, the routine returns error_status_ok. 
  62591.                         Otherwise, it returns one of the following errors: 
  62592.  
  62593.                              sec_rgy_not_authorized  The client program is not 
  62594.                                                      authorized to modify the 
  62595.                                                      account data. 
  62596.  
  62597.                              sec_rgy_object_not_found The specified account 
  62598.                                                      could not be found. 
  62599.  
  62600.                              sec_rgy_server_unavailable The DCE Registry Server 
  62601.                                                      is unavailable. 
  62602.  
  62603.                              sec_rgy_homedir_too_long The home directory is too 
  62604.                                                      long. 
  62605.  
  62606.  Usage 
  62607.  
  62608.           The sec_rgy_acct_user_replace routine replaces the user information 
  62609.           in the account record specified by the input login name.  The user 
  62610.           information contains such information as the account home directory 
  62611.           and default shell. Typically, the user information can be modified by 
  62612.           the account owner (users with user_info (u) privileges for an 
  62613.           account). 
  62614.  
  62615.           Use the set_passwd parameter to reset the user's password. If you set 
  62616.           this parameter to TRUE, the user's password is changed to the value 
  62617.           specified in new_key. 
  62618.  
  62619.  Permissions Required 
  62620.  
  62621.           The sec_rgy_acct_user_replace routine requires the u (user_info) 
  62622.           permission on the account principal. 
  62623.  
  62624.  Notes 
  62625.  
  62626.           All users need the write (w) privilege to modify any account 
  62627.           information. 
  62628.  
  62629.  Related Information 
  62630.  
  62631.           Routines: sec_rgy_acct_add 
  62632.           sec_rgy_acct_admin_replace 
  62633.           sec_rgy_site_open 
  62634.           sec_rgy_acct_replace_all 
  62635.  
  62636.  
  62637. ΓòÉΓòÉΓòÉ 8.9.12. sec_rgy_auth_plcy_get_effective ΓòÉΓòÉΓòÉ
  62638.  
  62639.  Purpose 
  62640.  
  62641.           Returns the effective authentication policy for an account. 
  62642.  
  62643.  Library 
  62644.  
  62645.           \lib\dceos2.lib 
  62646.  
  62647.  Format 
  62648.  
  62649.                     #include <dce/policy.h>
  62650.  
  62651.                     void sec_rgy_auth_plcy_get_effective(
  62652.                             sec_rgy_handle_t  context,
  62653.                             sec_rgy_login_name_t  *account,
  62654.                             sec_rgy_plcy_auth_t  *auth_policy,
  62655.                             error_status_t  *status);
  62656.  
  62657.  Parameters 
  62658.  
  62659.           Input 
  62660.  
  62661.           context       An opaque handle bound to a registry server.  Use 
  62662.                         sec_rgy_site_open to acquire a bound handle. 
  62663.  
  62664.           account       A pointer to the account login name (type 
  62665.                         sec_rgy_login_name_t). A login name is composed of 
  62666.                         three character strings containing the principal, 
  62667.                         group, and organization (PGO) names corresponding to 
  62668.                         the account. If all three fields contain empty strings, 
  62669.                         the authentication policy returned is that of the 
  62670.                         registry. 
  62671.  
  62672.           Output 
  62673.  
  62674.           auth_policy   A pointer to the sec_rgy_plcy_auth_t structure to 
  62675.                         receive the authentication policy. The authentication 
  62676.                         policy structure contains the maximum lifetime for an 
  62677.                         authentication ticket, and the maximum amount of time 
  62678.                         for which one can be renewed. 
  62679.  
  62680.           status        A pointer to the completion status.  On successful 
  62681.                         completion, the routine returns error_status_ok. 
  62682.                         Otherwise, it returns one of the following errors: 
  62683.  
  62684.                              sec_rgy_object_not_found The specified account 
  62685.                                                      could not be found. 
  62686.  
  62687.                              sec_rgy_server_unavailable The DCE Registry Server 
  62688.                                                      is unavailable. 
  62689.  
  62690.                              sec_rgy_bad_data        The old_login_name or the 
  62691.                                                      new_login_name is NULL. 
  62692.  
  62693.  Usage 
  62694.  
  62695.           The sec_rgy_auth_plcy_get_effective routine returns the effective 
  62696.           authentication policy for the specified account. The authentication 
  62697.           policy in effect is the more restrictive of the registry and the 
  62698.           account policies for each policy category.  If no account is 
  62699.           specified, the registry's authentication policy is returned. 
  62700.  
  62701.  Permissions Required 
  62702.  
  62703.           The sec_rgy_auth_plcy_get_effective routine requires the r (read) 
  62704.           permission on the policy object from which the data is to be 
  62705.           returned.  If an account is specified and an account policy exists, 
  62706.           the routine also requires the read (r) permission on the account 
  62707.           principal. 
  62708.  
  62709.  Related Information 
  62710.  
  62711.           Routines: sec_rgy_auth_plcy_get_info 
  62712.           sec_rgy_auth_plcy_set_info 
  62713.  
  62714.  
  62715. ΓòÉΓòÉΓòÉ 8.9.13. sec_rgy_auth_plcy_get_info ΓòÉΓòÉΓòÉ
  62716.  
  62717.  Purpose 
  62718.  
  62719.           Returns the authentication policy for an account. 
  62720.  
  62721.  Library 
  62722.  
  62723.           \lib\dceos2.lib 
  62724.  
  62725.  Format 
  62726.  
  62727.                     #include <dce/policy.h>
  62728.  
  62729.                     void sec_rgy_auth_plcy_get_info(
  62730.                             sec_rgy_handle_t  context,
  62731.                             sec_rgy_login_name_t  *account,
  62732.                             sec_rgy_plcy_auth_t  *auth_policy,
  62733.                             error_status_t  *status);
  62734.  
  62735.  Parameters 
  62736.  
  62737.           Input 
  62738.  
  62739.           context       An opaque handle bound to a registry server. Use 
  62740.                         sec_rgy_site_open to acquire a bound handle. 
  62741.  
  62742.           account       A pointer to the account login name (type 
  62743.                         sec_rgy_login_name_t). A login name is composed of 
  62744.                         three character strings containing the principal, 
  62745.                         group, and organization (PGO) names corresponding to 
  62746.                         the account. 
  62747.  
  62748.           Output 
  62749.  
  62750.           auth_policy   A pointer to the sec_rgy_plcy_auth_t structure to 
  62751.                         receive the authentication policy.  The authentication 
  62752.                         policy structure contains the maximum lifetime for an 
  62753.                         authentication ticket, and the maximum amount of time 
  62754.                         for which one can be renewed. 
  62755.  
  62756.           status        A pointer to the completion status.  On successful 
  62757.                         completion, the routine returns error_status_ok. 
  62758.                         Otherwise, it returns the following errors: 
  62759.  
  62760.                              sec_rgy_object_not_found No account with this 
  62761.                                                    login name could be found. 
  62762.  
  62763.                              sec_rgy_server_unavailable The DCE Registry Server 
  62764.                                                    is unavailable. 
  62765.  
  62766.                              sec_rgy_bad_data      The old_login_name or the 
  62767.                                                    new_login_name is NULL. 
  62768.  
  62769.  Usage 
  62770.  
  62771.           The sec_rgy_auth_plcy_get_info routine returns the authentication 
  62772.           policy for the specified account.  If no account is specified, the 
  62773.           registry's authentication policy is returned. 
  62774.  
  62775.  Permissions Required 
  62776.  
  62777.           The sec_rgy_auth_plcy_get_info routine requires the r (read) 
  62778.           permission on the policy object or account principal from which the 
  62779.           data is to be returned. 
  62780.  
  62781.  Notes 
  62782.  
  62783.           The actual policy in effect does not correspond precisely to what is 
  62784.           returned by this call if the overriding registry authentication 
  62785.           policy is more restrictive than the policy for the specified account. 
  62786.           Use sec_rgy_auth_plcy_get_effective to return the policy currently in 
  62787.           effect for the given account. 
  62788.  
  62789.  Related Information 
  62790.  
  62791.           Routines: sec_rgy_auth_plcy_get_effective 
  62792.           sec_rgy_auth_plcy_set_info 
  62793.           sec_rgy_site_open 
  62794.  
  62795.  
  62796. ΓòÉΓòÉΓòÉ 8.9.14. sec_rgy_auth_plcy_set_info ΓòÉΓòÉΓòÉ
  62797.  
  62798.  Purpose 
  62799.  
  62800.           Sets the authentication policy for an account. 
  62801.  
  62802.  Library 
  62803.  
  62804.           \lib\dceos2.lib 
  62805.  
  62806.  Format 
  62807.  
  62808.                     #include <dce/policy.h>
  62809.  
  62810.                     void sec_rgy_auth_plcy_set_info(
  62811.                             sec_rgy_handle_t  context,
  62812.                             sec_rgy_login_name_t  *account,
  62813.                             sec_rgy_plcy_auth_t  *auth_policy,
  62814.                             error_status_t  *status);
  62815.  
  62816.  Parameters 
  62817.  
  62818.           Input 
  62819.  
  62820.           context       An opaque handle bound to a registry server.  Use 
  62821.                         sec_rgy_site_open to acquire a bound handle. 
  62822.  
  62823.           account       A pointer to the account login name (type 
  62824.                         sec_rgy_login_name_t). A login name is composed of 
  62825.                         three character strings, containing the principal, 
  62826.                         group, and organization (PGO) names corresponding to 
  62827.                         the account. All three names must be completely 
  62828.                         specified. 
  62829.  
  62830.           auth_policy   A pointer to the sec_rgy_plcy_auth_t structure 
  62831.                         containing the authentication policy.  The 
  62832.                         authentication policy structure contains the maximum 
  62833.                         lifetime for an authentication ticket, and the maximum 
  62834.                         amount of time for which one can be renewed. 
  62835.  
  62836.           Output 
  62837.  
  62838.           status        A pointer to the completion status.  On successful 
  62839.                         completion, the routine returns error_status_ok. 
  62840.                         Otherwise, it returns one of the following errors: 
  62841.  
  62842.                              sec_rgy_object_not_found No account with the given 
  62843.                                                    login name could be found. 
  62844.  
  62845.                              sec_rgy_not_authorized The user is not authorized 
  62846.                                                    to update the specified 
  62847.                                                    record. 
  62848.  
  62849.                              sec_rgy_server_unavailable The DCE Registry Server 
  62850.                                                    is unavailable. 
  62851.  
  62852.                              sec_rgy_bad_data      The old_login_name or the 
  62853.                                                    new_login_name is NULL. 
  62854.  
  62855.  Usage 
  62856.  
  62857.           The sec_rgy_auth_plcy_set_info routine sets the indicated 
  62858.           authentication policy for the specified account.  If no account is 
  62859.           specified, the authentication policy is set for the registry as a 
  62860.           whole. 
  62861.  
  62862.  Permissions Required 
  62863.  
  62864.           The sec_rgy_auth_plcy_set_info routine requires the auth_info (a) 
  62865.           permission on the policy object or account principal for which the 
  62866.           data is to be set. 
  62867.  
  62868.  Notes 
  62869.  
  62870.           The policy set on an account can be less restrictive than the policy 
  62871.           set for the registry as a whole.  In this case, the change in policy 
  62872.           has no effect, because the effective policy is the most restrictive 
  62873.           combination of the principal and registry authentication policies. 
  62874.           See sec_rgy_auth_plcy_get_effective. 
  62875.  
  62876.  Related Information 
  62877.  
  62878.           Routines: sec_rgy_auth_plcy_get_effective 
  62879.           sec_rgy_auth_plcy_get_info 
  62880.  
  62881.  
  62882. ΓòÉΓòÉΓòÉ 8.9.15. sec_rgy_cell_bind ΓòÉΓòÉΓòÉ
  62883.  
  62884.  Purpose 
  62885.  
  62886.           Binds to a registry in a cell. 
  62887.  
  62888.  Library 
  62889.  
  62890.           \lib\dceos2.lib 
  62891.  
  62892.  Format 
  62893.  
  62894.                     #include <dce/binding.h>
  62895.  
  62896.                     void sec_rgy_cell_bind(
  62897.                             unsigned_char_p_t  *cell_name,
  62898.                             sec_rgy_bind_auth_info_t  *auth_info,
  62899.                             sec_rgy_handle_t  *context,
  62900.                             error_status_t  *status);
  62901.  
  62902.  Parameters 
  62903.  
  62904.           Input 
  62905.  
  62906.           cell_name     A character string (type unsigned_char_t) containing 
  62907.                         the name of the cell in question.  Upon return, a 
  62908.                         security server for that cell is associated with 
  62909.                         context, the registry server handle.  The cell must be 
  62910.                         specified completely and precisely.  This routine 
  62911.                         offers none of the path name resolving services of 
  62912.                         sec_rgy_site_bind. 
  62913.  
  62914.           auth_info     A pointer to the sec_rgy_bind_auth_info_t structure 
  62915.                         that identifies the authentication protocol, protection 
  62916.                         level, and authorization protocol to use in 
  62917.                         establishing the binding. See 
  62918.                         rpc_binding_set_auth_info. 
  62919.  
  62920.           Output 
  62921.  
  62922.           context       A pointer to a sec_rgy_handle_t.  Upon return, this 
  62923.                         contains a registry server handle indicating (bound to) 
  62924.                         the desired registry site. 
  62925.  
  62926.           status        A pointer to the completion status.  On successful 
  62927.                         completion, the routine returns error_status_ok. 
  62928.                         Otherwise, it returns sec_rgy_server_unavailable, which 
  62929.                         indicates that the DCE Registry Server is unavailable. 
  62930.  
  62931.  Usage 
  62932.  
  62933.           The sec_rgy_cell_bind routine establishes a relationship with a 
  62934.           registry site at an arbitrary level of security. The cell_name 
  62935.           parameter identifies the target cell. 
  62936.  
  62937.  Related Information 
  62938.  
  62939.           Routines: 
  62940.           sec_rgy_site_bind 
  62941.  
  62942.  
  62943. ΓòÉΓòÉΓòÉ 8.9.16. sec_rgy_cursor_reset ΓòÉΓòÉΓòÉ
  62944.  
  62945.  Purpose 
  62946.  
  62947.           Resets the registry database cursor. 
  62948.  
  62949.  Library 
  62950.  
  62951.           \lib\dceos2.lib 
  62952.  
  62953.  Format 
  62954.  
  62955.                     #include <dce/misc.h>
  62956.  
  62957.                     void sec_rgy_cursor_reset(
  62958.                             sec_rgy_cursor_t  *cursor);
  62959.  
  62960.  Parameters 
  62961.  
  62962.           Input/Output 
  62963.  
  62964.           cursor        A pointer into the registry database. 
  62965.  
  62966.  Usage 
  62967.  
  62968.           The sec_rgy_cursor_reset routine resets the database cursor to return 
  62969.           the first suitable entry.  A cursor is a pointer into the registry. 
  62970.           It serves as a place holder when returning successive items from the 
  62971.           registry. 
  62972.  
  62973.           A cursor that is in use with one call cannot be used with another. 
  62974.           For example, you cannot use the same cursor on a call to 
  62975.           sec_rgy_acct_get_projlist and sec_rgy_pgo_get_next. The behavior in 
  62976.           this case is undefined. 
  62977.  
  62978.  Examples 
  62979.  
  62980.           The following example illustrates use of the cursor within a loop. 
  62981.           The initial sec_rgy_cursor_reset call resets the cursor to point to 
  62982.           the first item in the registry. Successive calls to 
  62983.           sec_rgy_pgo_get_next return the next PGO item and update the cursor 
  62984.           to reflect the last item returned. When the end of the list of PGO 
  62985.           items is reached, the routine returns the value 
  62986.           sec_rgy_no_more_entries in the status parameter. 
  62987.  
  62988.                     sec_rgy_cursor_reset();
  62989.                     do {
  62990.                          sec_rgy_pgo_get_next(context, domain, scope, ,
  62991.                                          &item, name, &status);
  62992.                         if (status == error_status_ok) {
  62993.                              /* Print formatted PGO item info */
  62994.                         }
  62995.                     }while (status==error_status_ok);
  62996.  
  62997.  Related Information 
  62998.  
  62999.           Routines: sec_rgy_acct_get_projlist 
  63000.           sec_rgy_acct_lookup 
  63001.           sec_rgy_pgo_get_by_id 
  63002.           sec_rgy_pgo_get_by_name 
  63003.           sec_rgy_pgo_get_by_unix_num 
  63004.           sec_rgy_pgo_get_members 
  63005.           sec_rgy_pgo_get_next 
  63006.  
  63007.           Files: 
  63008.           \include\dce\misc.idl - The idl file from which dce\misc.h was 
  63009.           derived. 
  63010.  
  63011.  
  63012. ΓòÉΓòÉΓòÉ 8.9.17. sec_rgy_enable_nsi ΓòÉΓòÉΓòÉ
  63013.  
  63014.  Purpose 
  63015.  
  63016.           Enables and disables Name Service Interface (NSI) bindings. 
  63017.  
  63018.  Format 
  63019.  
  63020.                     #include <dce\binding.h>
  63021.  
  63022.                     boolean32 sec_rgy_enable_nsi(
  63023.                            boolean32  flag);
  63024.  
  63025.  Parameters 
  63026.  
  63027.           Input/Output 
  63028.  
  63029.           flag          As input, a boolean32 flag that contains the code to 
  63030.                         enable or disable the use of NSI binding by the 
  63031.                         security code. Upon return, flag contains the previous 
  63032.                         state of this flag. When TRUE, NSI is enabled; when 
  63033.                         FALSE, NSI is disabled. 
  63034.  
  63035.  Usage 
  63036.  
  63037.           Enable or disable the use of NSI for security binding operations to 
  63038.           prevent security from attempting to access the namespace while 
  63039.           connecting to the registry server. 
  63040.  
  63041.  Related Information 
  63042.  
  63043.  
  63044.           Files: 
  63045.           \usr\include\dce\binding.idl - The idl file from which dce\binding.h 
  63046.           was derived. 
  63047.  
  63048.  
  63049. ΓòÉΓòÉΓòÉ 8.9.18. sec_rgy_login_get_effective ΓòÉΓòÉΓòÉ
  63050.  
  63051.  Purpose 
  63052.  
  63053.           Returns the effective login data for an account. 
  63054.  
  63055.           Note:  For the IBM DCE for OS/2 time frame, this API will return the 
  63056.                  same information as sec_rgy_login_get_info, as local overrides 
  63057.                  are not supported. 
  63058.  
  63059.  Library 
  63060.  
  63061.           \lib\dceos2.lib 
  63062.  
  63063.  Format 
  63064.  
  63065.                     #include <dce/misc.h>
  63066.  
  63067.                     void sec_rgy_login_get_effective(
  63068.                             sec_rgy_handle_t  context,
  63069.                             sec_rgy_login_name_t  *login_name,
  63070.                             sec_rgy_acct_key_t  *key_parts,
  63071.                             sec_rgy_sid_t  *sid,
  63072.                             sec_rgy_unix_sid_t  *unix_sid,
  63073.                             sec_rgy_acct_user_t  *user_part,
  63074.                             sec_rgy_acct_admin_t  *admin_part,
  63075.                             sec_rgy_plcy_t  *policy_data,
  63076.                             signed32  max_number,
  63077.                             signed32  *supplied_number,
  63078.                             uuid_t  id_projlist[],
  63079.                             signed32  unix_projlist[],
  63080.                             signed32  *num_projects,
  63081.                             sec_rgy_name_t  cell_name,
  63082.                             uuid_t  *cell_uuid,
  63083.                             sec_override_fields_t  *overridden,
  63084.                             error_status_t  *status);
  63085.  
  63086.  Parameters 
  63087.  
  63088.           Input 
  63089.  
  63090.           context       The registry server handle. 
  63091.  
  63092.           max_number    The maximum number of projects to be returned by the 
  63093.                         routine. This must be no larger than the allocated size 
  63094.                         of the projlist array. 
  63095.  
  63096.           Input/Output 
  63097.  
  63098.           login_name    A pointer to the account login name. A login name is 
  63099.                         composed of the names for the account's principal, 
  63100.                         group, and organization (PGO) items. 
  63101.  
  63102.           Output 
  63103.  
  63104.           key_parts     A pointer to the minimum abbreviation allowed when 
  63105.                         logging in to the account.  Abbreviations are not 
  63106.                         currently implemented and the only permitted value is 
  63107.                         sec_rgy_acct_key_person. 
  63108.  
  63109.           sid           A pointer to a sec_rgy_sid_t structure to receive the 
  63110.                         returned subject identifier (SID) for the account. 
  63111.                         This structure consists of the UUIDs for the account's 
  63112.                         PGO items. 
  63113.  
  63114.           unix_sid      A pointer to a sec_rgy_unix_sid_t structure to receive 
  63115.                         the returned UNIX subject identifier (SID) for the 
  63116.                         account. This structure consists of the UNIX numbers 
  63117.                         for the account's PGO items. 
  63118.  
  63119.           user_part     A pointer to a sec_rgy_acct_user_t structure to receive 
  63120.                         the returned user data for the account. 
  63121.  
  63122.           admin_part    A pointer to a sec_rgy_acct_admin_t structure to 
  63123.                         receive the returned administrative data for the 
  63124.                         account. 
  63125.  
  63126.           policy_data   A pointer to a sec_rgy_policy_t structure to receive 
  63127.                         the policy data for the account.  The policy data is 
  63128.                         associated with the account's organization, as 
  63129.                         identified in the login name. 
  63130.  
  63131.           supplied_number A pointer to the actual number of projects returned. 
  63132.                         This is always less than or equal to the max_number 
  63133.                         supplied on input. 
  63134.  
  63135.           id_projlist[] An array to receive the UUID of each project returned. 
  63136.                         The size allocated for the array is given by 
  63137.                         max_number. If this value is less than the total number 
  63138.                         of projects in the account project list, multiple calls 
  63139.                         must be made to return all of the projects. 
  63140.  
  63141.           unix_projlist[] An array to receive the UNIX number of each project 
  63142.                         returned. The size allocated for the array is given by 
  63143.                         max_number. If this value is less than the total number 
  63144.                         of projects in the account project list, multiple calls 
  63145.                         must be made to return all of the projects. 
  63146.  
  63147.           num_projects  A pointer indicating the total number of projects in 
  63148.                         the specified account's project list. 
  63149.  
  63150.           cell_name     The name of the account's cell. 
  63151.  
  63152.           cell_uuid     The UUID for the account's cell. 
  63153.  
  63154.           overridden    A pointer to a 32-bit set of flags identifying the 
  63155.                         local overrides, if any, for the account login 
  63156.                         information. 
  63157.  
  63158.           status        A pointer to the completion status.  On successful 
  63159.                         completion, the routine returns error_status_ok. 
  63160.                         Otherwise, it returns one of the following errors: 
  63161.  
  63162.                              sec_rgy_object_not_found The specified account 
  63163.                                                    could not be found. 
  63164.                              sec_rgy_server_unavailable The DCE Registry Server 
  63165.                                                    is unavailable. 
  63166.  
  63167.  Usage 
  63168.  
  63169.           The sec_rgy_login_get_effective routine returns effective login 
  63170.           information for the specified account. Login information is extracted 
  63171.           from the account's entry in the registry database. Effective login 
  63172.           information is a combination of the login information from the 
  63173.           registry database and any login overrides defined for the account on 
  63174.           the local machine. 
  63175.  
  63176.           This API returns the same information as sec_rgy_login_get_info, 
  63177.           since local overrides are not supported. 
  63178.  
  63179.  Related Information 
  63180.  
  63181.           Routines: sec_rgy_acct_add 
  63182.           sec_rgy_login_get_info 
  63183.  
  63184.  
  63185. ΓòÉΓòÉΓòÉ 8.9.19. sec_rgy_login_get_info ΓòÉΓòÉΓòÉ
  63186.  
  63187.  Purpose 
  63188.  
  63189.           Returns login information for an account. 
  63190.  
  63191.  Library 
  63192.  
  63193.           \lib\dceos2.lib 
  63194.  
  63195.  Format 
  63196.  
  63197.                     #include <dce/misc.h>
  63198.  
  63199.                     void sec_rgy_login_get_info(
  63200.                             sec_rgy_handle_t  context,
  63201.                             sec_rgy_login_name_t  *login_name,
  63202.                             sec_rgy_acct_key_t  *key_parts,
  63203.                             sec_rgy_sid_t  *sid,
  63204.                             sec_rgy_unix_sid_t  *unix_sid,
  63205.                             sec_rgy_acct_user_t  *user_part,
  63206.                             sec_rgy_acct_admin_t  *admin_part,
  63207.                             sec_rgy_plcy_t  *policy_data,
  63208.                             signed32  max_number,
  63209.                             signed32  *supplied_number,
  63210.                             uuid_t  id_projlist[],
  63211.                             signed32  unix_projlist[],
  63212.                             signed32  *num_projects,
  63213.                             sec_rgy_name_t  cell_name,
  63214.                             uuid_t  *cell_uuid,
  63215.                             error_status_t  *status);
  63216.  
  63217.  Parameters 
  63218.  
  63219.           Input 
  63220.  
  63221.           context       The registry server handle. 
  63222.  
  63223.           max_number    The maximum number of projects to be returned by the 
  63224.                         routine. This must be no larger than the allocated size 
  63225.                         of the projlist array. 
  63226.  
  63227.           Input/Output 
  63228.  
  63229.           login_name    A pointer to the account login name. A login name is 
  63230.                         composed of the names for the account's principal, 
  63231.                         group, and organization (PGO) items. 
  63232.  
  63233.           Output 
  63234.  
  63235.           key_parts     A pointer to the minimum abbreviation allowed when 
  63236.                         logging in to the account.  Abbreviations are not 
  63237.                         currently implemented and the only permitted value is 
  63238.                         sec_rgy_acct_key_person. 
  63239.  
  63240.           sid           A pointer to a sec_rgy_sid_t structure to receive the 
  63241.                         UUIDs representing the account's PGO items. 
  63242.  
  63243.           unix_sid      A pointer to a sec_rgy_unix_sid_t structure to receive 
  63244.                         the UNIX numbers for the account's PGO items. 
  63245.  
  63246.           user_part     A pointer to a sec_rgy_acct_user_t structure to receive 
  63247.                         the returned user data for the account. 
  63248.  
  63249.           admin_part    A pointer to a sec_rgy_acct_admin_t structure to 
  63250.                         receive the returned administrative data for the 
  63251.                         account. 
  63252.  
  63253.           policy_data   A pointer to a sec_rgy_policy_t structure to receive 
  63254.                         the policy data for the account.  The policy data is 
  63255.                         associated with the account's organization, as 
  63256.                         identified in the login name. 
  63257.  
  63258.           supplied_number A pointer to the actual number of projects returned. 
  63259.                         This is always less than or equal to the max_number 
  63260.                         supplied on input. 
  63261.  
  63262.           id_projlist[] An array to receive the UUID of each project returned. 
  63263.                         The size allocated for the array is given by 
  63264.                         max_number. If this value is less than the total number 
  63265.                         of projects in the account project list, multiple calls 
  63266.                         must be made to return all of the projects. 
  63267.  
  63268.           unix_projlist[] An array to receive the UNIX number of each project 
  63269.                         returned. The size allocated for the array is given by 
  63270.                         max_number. If this value is less than the total number 
  63271.                         of projects in the account project list, multiple calls 
  63272.                         must be made to return all of the projects. 
  63273.  
  63274.           num_projects  A pointer indicating the total number of projects in 
  63275.                         the specified account's project list. 
  63276.  
  63277.           cell_name     The name of the account's cell. 
  63278.  
  63279.           cell_uuid     The UUID for the account's cell. 
  63280.  
  63281.           status        A pointer to the completion status.  On successful 
  63282.                         completion, the routine returns error_status_ok. 
  63283.                         Otherwise, it returns one of the following errors: 
  63284.  
  63285.                              sec_rgy_object_not_found The specified account 
  63286.                                                    could not be found. 
  63287.                              sec_rgy_server_unavailable The DCE Registry Server 
  63288.                                                    is unavailable. 
  63289.  
  63290.  Usage 
  63291.  
  63292.           The sec_rgy_login_get_info routine returns login information for the 
  63293.           specified account. This information is extracted from the account's 
  63294.           entry in the registry database. 
  63295.  
  63296.  Permissions Required 
  63297.  
  63298.           The sec_rgy_login_get_info routine requires the read (r) permission 
  63299.           on the account principal from which the data is to be returned. 
  63300.  
  63301.  Related Information 
  63302.  
  63303.           Routines: sec_rgy_acct_add 
  63304.           sec_rgy_login_get_effective 
  63305.  
  63306.  
  63307. ΓòÉΓòÉΓòÉ 8.9.20. sec_rgy_pgo_add ΓòÉΓòÉΓòÉ
  63308.  
  63309.  Purpose 
  63310.  
  63311.           Adds a principal, group, or organization (PGO) item to the registry 
  63312.           database. 
  63313.  
  63314.  Library 
  63315.  
  63316.           \lib\dceos2.lib 
  63317.  
  63318.  Format 
  63319.  
  63320.                     #include <dce/pgo.h>
  63321.  
  63322.                     void sec_rgy_pgo_add(
  63323.                             sec_rgy_handle_t  context,
  63324.                             sec_rgy_domain_t  name_domain,
  63325.                             sec_rgy_name_t  name,
  63326.                             sec_rgy_pgo_item_t  *pgo_item,
  63327.                             error_status_t  *status);
  63328.  
  63329.  Parameters 
  63330.  
  63331.           Input 
  63332.  
  63333.           context       An opaque handle bound to a registry server. Use 
  63334.                         sec_rgy_site_open to acquire a bound handle. 
  63335.  
  63336.           name_domain   This parameter identifies the type of the PGO item 
  63337.                         identified by the given name. The valid values are as 
  63338.                         follows: 
  63339.  
  63340.                              sec_rgy_domain_person    The name identifies a 
  63341.                                                       principal. 
  63342.                              sec_rgy_domain_group     The name identifies a 
  63343.                                                       group. 
  63344.                              sec_rgy_domain_org       The name identifies an 
  63345.                                                       organization. 
  63346.  
  63347.           name          A pointer to a sec_rgy_name_t character string 
  63348.                         containing the name of the new PGO item. 
  63349.  
  63350.           pgo_item      A pointer to a sec_rgy_pgo_item_t structure containing 
  63351.                         the data for the new PGO item. The data in this 
  63352.                         structure includes the PGO item's name, UUID, UNIX 
  63353.                         number (if any), and administrative data, such as 
  63354.                         whether the item belongs (or has belonged) to a 
  63355.                         concurrent group set. 
  63356.  
  63357.           Output 
  63358.  
  63359.           status        A pointer to the completion status. On successful 
  63360.                         completion, the routine returns error_status_ok. 
  63361.                         Otherwise, it returns one of the following errors: 
  63362.  
  63363.                              sec_rgy_not_authorized     The client program is 
  63364.                                                         not authorized to add 
  63365.                                                         the specified PGO item. 
  63366.  
  63367.                              sec_rgy_object_exists      A PGO item already 
  63368.                                                         exists with the name 
  63369.                                                         given in name. 
  63370.  
  63371.                              sec_rgy_server_unavailable The DCE Registry Server 
  63372.                                                         is unavailable. 
  63373.  
  63374.  Usage 
  63375.  
  63376.           The sec_rgy_pgo_add routine adds a PGO item to the registry database. 
  63377.  
  63378.           The PGO data consists of: 
  63379.  
  63380.             o  The universal unique identifier (UUID) of the PGO item. Specify 
  63381.                NULL to have the registry server create a new UUID for an item. 
  63382.  
  63383.             o  The UNIX number for the PGO item. If the registry uses embedded 
  63384.                UNIX IDs (where a subset of the UUID bits represent the UNIX 
  63385.                ID), the specified ID must match the UUID, if both are 
  63386.                specified. Use a value of -1 for the UNIX number to match any 
  63387.                value. 
  63388.  
  63389.             o  The quota for subaccounts allowed for this item entry. 
  63390.  
  63391.             o  The full name of the PGO item. 
  63392.  
  63393.             o  Flags (in the sec_rgy_pgo_flags_t format) indicating whether: 
  63394.  
  63395.                  -  A person item is an alias. 
  63396.                  -  The PGO item can be deleted from the registry. 
  63397.                  -  A person item can have a concurrent group set. 
  63398.                  -  A group item can appear in a concurrent group set. 
  63399.  
  63400.  Permissions Required 
  63401.  
  63402.           The sec_rgy_pgo_add routine requires the insert (i) permission on the 
  63403.           parent directory in which the PGO item is to be created. 
  63404.  
  63405.  Notes 
  63406.  
  63407.           An account can be added to the registry database only when all its 
  63408.           constituent PGO items are already in the database, and the 
  63409.           appropriate membership relationships between them are established. 
  63410.           For example, to establish an account with person name tom, group name 
  63411.           writers, and organization name ibm, all three names must exist as 
  63412.           independent PGO items in the database. Also, tom must be a member of 
  63413.           the group writers, which in return, must be a member of ibm. See 
  63414.           sec_rgy_acct_add to add an account to the registry. 
  63415.  
  63416.  Related Information 
  63417.  
  63418.           Routines: sec_rgy_pgo_delete 
  63419.           sec_rgy_pgo_rename 
  63420.           sec_rgy_pgo_replace 
  63421.           sec_rgy_pgo_add_member 
  63422.           sec_rgy_acct_add 
  63423.  
  63424.  
  63425. ΓòÉΓòÉΓòÉ 8.9.21. sec_rgy_pgo_add_member ΓòÉΓòÉΓòÉ
  63426.  
  63427.  Purpose 
  63428.  
  63429.           Adds a person to a group or organization. 
  63430.  
  63431.  Library 
  63432.  
  63433.           \lib\dceos2.lib 
  63434.  
  63435.  Format 
  63436.  
  63437.                     #include <dce/pgo.h>
  63438.  
  63439.                     void sec_rgy_pgo_add_member(
  63440.                             sec_rgy_handle_t  context,
  63441.                             sec_rgy_domain_t  name_domain,
  63442.                             sec_rgy_name_t  go_name,
  63443.                             sec_rgy_name_t  person_name,
  63444.                             error_status_t  *status);
  63445.  
  63446.  Parameters 
  63447.  
  63448.           Input 
  63449.  
  63450.           context       An opaque handle bound to a registry server. Use 
  63451.                         sec_rgy_site_open to acquire a bound handle. 
  63452.  
  63453.           name_domain   This parameter identifies the type of the PGO item 
  63454.                         identified by the given name. The valid values are: 
  63455.  
  63456.                              sec_rgy_domain_group The go_name identifies a 
  63457.                                               group. 
  63458.  
  63459.                              sec_rgy_domain_org go_name identifies an 
  63460.                                               organization. 
  63461.  
  63462.           go_name       A character string (type sec_rgy_name_t) that contains 
  63463.                         the name of the group or organization to which the 
  63464.                         specified person is added. 
  63465.  
  63466.           person_name   A character string (type sec_rgy_name_t) that contains 
  63467.                         the name of the person to be added to the membership 
  63468.                         list of the group or organization specified by go_name. 
  63469.  
  63470.           Output 
  63471.  
  63472.           status        A pointer to the completion status.  On successful 
  63473.                         completion, the routine returns error_status_ok. 
  63474.                         Otherwise, it returns one of the following errors: 
  63475.  
  63476.                              sec_rgy_not_authorized The client program is not 
  63477.                                                   authorized to add members to 
  63478.                                                   the specified group or 
  63479.                                                   organization. 
  63480.  
  63481.                              sec_rgy_bad_domain   The specified domain is not 
  63482.                                                   valid.  A member can be added 
  63483.                                                   to a group or organization 
  63484.                                                   only, not a person. 
  63485.  
  63486.                              sec_rgy_object_not_found The registry server could 
  63487.                                                   not find the specified name. 
  63488.  
  63489.                              sec_rgy_server_unavailable The DCE Registry Server 
  63490.                                                   is unavailable. 
  63491.  
  63492.  Usage 
  63493.  
  63494.           The sec_rgy_pgo_add_member routine adds a member to the membership 
  63495.           list of a group or organization in the registry database. 
  63496.  
  63497.  Permissions Required 
  63498.  
  63499.           The sec_rgy_pgo_add_member routine requires the Member_list (M) 
  63500.           permission on the group or organization item specified by go_name. If 
  63501.           go_name specifies a group, the routine also requires the groups (g) 
  63502.           permission on the principal person_name. 
  63503.  
  63504.  Notes 
  63505.  
  63506.           An account can be added to the registry database only when all its 
  63507.           constituent PGO items are already in the database, and the 
  63508.           appropriate membership relationships between them are established. 
  63509.           For example, to establish an account with person name tom, group name 
  63510.           writers, and organization name ibm, all three names must exist as 
  63511.           independent PGO items in the database. Also, tom must be a member of 
  63512.           the group writers, which, in turn, must be a member of ibm. See 
  63513.           sec_rgy_acct_add to add an account to the registry. 
  63514.  
  63515.  Related Information 
  63516.  
  63517.           Routines: sec_rgy_pgo_add 
  63518.           sec_rgy_pgo_delete_member 
  63519.           sec_rgy_pgo_get_members 
  63520.           sec_rgy_pgo_is_member 
  63521.           sec_rgy_acct_add 
  63522.  
  63523.  
  63524. ΓòÉΓòÉΓòÉ 8.9.22. sec_rgy_pgo_delete ΓòÉΓòÉΓòÉ
  63525.  
  63526.  Purpose 
  63527.  
  63528.           Deletes a principal, group, or organization (PGO) item from the 
  63529.           registry database. 
  63530.  
  63531.  Library 
  63532.  
  63533.           \lib\dceos2.lib 
  63534.  
  63535.  Format 
  63536.  
  63537.                     #include <dce/pgo.h>
  63538.  
  63539.                     void sec_rgy_pgo_delete(
  63540.                             sec_rgy_handle_t  context,
  63541.                             sec_rgy_domain_t  name_domain,
  63542.                             sec_rgy_name_t  name,
  63543.                             error_status_t  *status);
  63544.  
  63545.  Parameters 
  63546.  
  63547.           Input 
  63548.  
  63549.           context       An opaque handle bound to a registry server.  Use 
  63550.                         sec_rgy_site_open to acquire a bound handle. 
  63551.  
  63552.           name_domain   This parameter identifies the type of the PGO item 
  63553.                         identified by the given name.  The valid values are: 
  63554.  
  63555.                              sec_rgy_domain_person The name identifies a 
  63556.                                               principal. 
  63557.                              sec_rgy_domain_group The name identifies a group. 
  63558.                              sec_rgy_domain_org The name identifies an 
  63559.                                               organization. 
  63560.  
  63561.           name          A pointer to a sec_rgy_name_t character string that 
  63562.                         contains the name of the PGO item to be deleted. 
  63563.  
  63564.           Output 
  63565.  
  63566.           status        A pointer to the completion status.  On successful 
  63567.                         completion, the routine returns error_status_ok. 
  63568.                         Otherwise, it returns one of the following errors: 
  63569.  
  63570.                              sec_rgy_not_authorized The client program is not 
  63571.                                                   authorized to delete the 
  63572.                                                   specified item. 
  63573.  
  63574.                              sec_rgy_object_not_found The registry server could 
  63575.                                                   not find the specified item. 
  63576.  
  63577.                              sec_rgy_server_unavailable The DCE Registry Server 
  63578.                                                   is unavailable. 
  63579.  
  63580.  Usage 
  63581.  
  63582.           The sec_rgy_pgo_delete routine deletes a PGO item from the registry 
  63583.           database. Any account depending on the deleted PGO item is also 
  63584.           deleted. 
  63585.  
  63586.  Permissions Required 
  63587.  
  63588.           The sec_rgy_pgo_delete routine requires the following permissions: 
  63589.  
  63590.             o  The delete (d) permission on the parent directory that contains 
  63591.                the PGO item to be deleted. 
  63592.             o  The Delete_object (D) permission on the PGO item itself. 
  63593.  
  63594.  Related Information 
  63595.  
  63596.           Routines: sec_rgy_site_open 
  63597.           sec_rgy_pgo_add 
  63598.  
  63599.           Files: 
  63600.           \include\dce\pgo.idl - The idl file from which dce\pgo.h was derived. 
  63601.  
  63602.  
  63603. ΓòÉΓòÉΓòÉ 8.9.23. sec_rgy_pgo_delete_member ΓòÉΓòÉΓòÉ
  63604.  
  63605.  Purpose 
  63606.  
  63607.           Deletes a member of a group or organization. 
  63608.  
  63609.  Library 
  63610.  
  63611.           \lib\dceos2.lib 
  63612.  
  63613.  Format 
  63614.  
  63615.                     #include <dce/pgo.h>
  63616.  
  63617.                     void sec_rgy_pgo_delete_member(
  63618.                             sec_rgy_handle_t  context,
  63619.                             sec_rgy_domain_t  name_domain,
  63620.                             sec_rgy_name_t  go_name,
  63621.                             sec_rgy_name_t  person_name,
  63622.                             error_status_t  *status);
  63623.  
  63624.  Parameters 
  63625.  
  63626.           Input 
  63627.  
  63628.           context       An opaque handle bound to a registry server. Use 
  63629.                         sec_rgy_site_open to acquire a bound handle. 
  63630.  
  63631.           name_domain   This parameter identifies the type of the group or 
  63632.                         organization item identified by the given name. The 
  63633.                         valid values are: 
  63634.  
  63635.                              sec_rgy_domain_group The go_name parameter 
  63636.                                               identifies a group. 
  63637.  
  63638.                              sec_rgy_domain_org The go_name parameter 
  63639.                                               identifies an organization. 
  63640.  
  63641.           go_name       A character string (type sec_rgy_name_t) that contains 
  63642.                         the name of the group or organization from which the 
  63643.                         specified person is deleted. 
  63644.  
  63645.           person_name   A character string (type sec_rgy_name_t) that contains 
  63646.                         the name of the person to be deleted from the 
  63647.                         membership list of the group or organization specified 
  63648.                         by go_name. 
  63649.  
  63650.           Output 
  63651.  
  63652.           status        A pointer to the completion status.  On successful 
  63653.                         completion, the routine returns error_status_ok. 
  63654.                         Otherwise, it returns one of the following errors: 
  63655.  
  63656.                              sec_rgy_not_authorized  The client program is not 
  63657.                                                      authorized to delete the 
  63658.                                                      specified member. 
  63659.  
  63660.                              sec_rgy_bad_domain      The specified domain is 
  63661.                                                      not valid. Members can 
  63662.                                                      exist for groups and 
  63663.                                                      organizations only, not 
  63664.                                                      for persons. 
  63665.  
  63666.                              sec_rgy_object_not_found The specified group or 
  63667.                                                      organization was not 
  63668.                                                      found. 
  63669.  
  63670.                              sec_rgy_server_unavailable The DCE registry server 
  63671.                                                      is unavailable. 
  63672.  
  63673.  Usage 
  63674.  
  63675.           The sec_rgy_pgo_delete_member routine deletes a member from the 
  63676.           membership list of a group or organization.  Any accounts where the 
  63677.           person holds the deleted group or organization membership are also 
  63678.           deleted. 
  63679.  
  63680.  Permissions Required 
  63681.  
  63682.           The sec_rgy_pgo_delete_member routine requires the Member_list (M) 
  63683.           permission on the group or organization item specified by go_name. 
  63684.  
  63685.  Related Information 
  63686.  
  63687.           Routines: sec_rgy_pgo_add 
  63688.           sec_rgy_pgo_add_member 
  63689.           sec_rgy_site_open 
  63690.  
  63691.  
  63692. ΓòÉΓòÉΓòÉ 8.9.24. sec_rgy_pgo_get_by_eff_unix_num ΓòÉΓòÉΓòÉ
  63693.  
  63694.  Purpose 
  63695.  
  63696.           Returns the name and data for a principal, group, or organization 
  63697.           (PGO) item identified by its effective UNIX number. 
  63698.  
  63699.  Library 
  63700.  
  63701.           \lib\dceos2.lib 
  63702.  
  63703.  Format 
  63704.  
  63705.                     #include <dce/pgo.h>
  63706.  
  63707.                     void sec_rgy_pgo_get_by_eff_unix_num(
  63708.                             sec_rgy_handle_t  context,
  63709.                             sec_rgy_domain_t  name_domain,
  63710.                             sec_rgy_name_t  scope,
  63711.                             signed32  unix_id,
  63712.                             boolean32  allow_aliases,
  63713.                             sec_rgy_cursor_t  *item_cursor,
  63714.                             sec_rgy_pgo_item_t  *pgo_item,
  63715.                             sec_rgy_name_t  name,
  63716.                             boolean32  *overridden,
  63717.                             error_status_t  *status);
  63718.  
  63719.  Parameters 
  63720.  
  63721.           Input 
  63722.  
  63723.           context       An opaque handle bound to a registry server. Use 
  63724.                         sec_rgy_site_open to acquire a bound handle. 
  63725.  
  63726.           name_domain   This variable identifies the type of the PGO item 
  63727.                         identified by the given name. The valid values are: 
  63728.  
  63729.                              sec_rgy_domain_person    The UNIX number 
  63730.                                                       identifies a principal. 
  63731.                              sec_rgy_domain_group     The UNIX number 
  63732.                                                       identifies a group. 
  63733.  
  63734.                         Note:  This routine does not support the value 
  63735.                                sec_rgy_domain_org. 
  63736.  
  63737.           scope         A character string (type sec_rgy_name_t) that contains 
  63738.                         the scope of the desired search. The registry database 
  63739.                         is designed to accommodate a tree-structured name 
  63740.                         hierarchy. The scope of a search is the name of the 
  63741.                         branch where the search takes place. For example, all 
  63742.                         names in a registry may start with \alpha, and be 
  63743.                         divided further into \beta or \gamma. To search only 
  63744.                         the part of the database under \beta, the scope of the 
  63745.                         search would be \alpha\beta, and any resulting PGO 
  63746.                         items would have names beginning with this string. 
  63747.  
  63748.                         Note:  These naming conventions do not need to have 
  63749.                                anything to do with group or organization PGO 
  63750.                                item membership lists. 
  63751.  
  63752.           unix_id       The UNIX number of the desired registry PGO item. 
  63753.  
  63754.           allow_aliases A boolean32 value that indicates whether to search for 
  63755.                         a primary PGO item, or whether the search can be 
  63756.                         satisfied with an alias. If TRUE, the routine returns 
  63757.                         the next entry found for the PGO item. If FALSE, the 
  63758.                         routine returns only the primary entry. 
  63759.  
  63760.           Input/Output 
  63761.  
  63762.           item_cursor   An opaque pointer that indicates a specific PGO item 
  63763.                         entry in the registry database.  The 
  63764.                         sec_rgy_pgo_get_next routine returns the PGO item 
  63765.                         indicated by item_cursor, and advances the cursor to 
  63766.                         point to the next item in the database.  When the end 
  63767.                         of the list of entries is reached, the routine returns 
  63768.                         the value sec_rgy_no_more_entries in the status 
  63769.                         parameter.  Use sec_rgy_cursor_reset to reset the 
  63770.                         cursor. 
  63771.  
  63772.           Output 
  63773.  
  63774.           pgo_item      A pointer to a sec_rgy_pgo_item_t structure to receive 
  63775.                         the data for the returned PGO item.  The data in this 
  63776.                         structure includes the PGO item's name, UUID, UNIX 
  63777.                         number (if any), and administrative data, such as 
  63778.                         whether the item, if a principal, has a concurrent 
  63779.                         group set.  The data is as it is found in the registry, 
  63780.                         for that UNIX number, even though some of the fields 
  63781.                         may have been overridden locally. 
  63782.  
  63783.           name          A pointer to a sec_rgy_name_t character string that 
  63784.                         contains the returned name for the PGO item. This 
  63785.                         string may contain a local override value if the 
  63786.                         supplied UNIX number is found in the passwd_override or 
  63787.                         group_override file. 
  63788.  
  63789.           overridden    A pointer to a boolean32 value that indicates whether 
  63790.                         the supplied UNIX number has an entry in the local 
  63791.                         override file (passwd_override or group_override). 
  63792.  
  63793.           status        A pointer to the completion status.  On successful 
  63794.                         completion, the routine returns error_status_ok. 
  63795.                         Otherwise, it returns one of the following errors: 
  63796.  
  63797.                              sec_rgy_no_more_entries The cursor is at the end 
  63798.                                            of the list of PGO items. 
  63799.  
  63800.                              sec_rgy_object_not_found The specified PGO item 
  63801.                                            was not found. 
  63802.  
  63803.                              sec_rgy_server_unavailable The DCE Registry Server 
  63804.                                            is unavailable. 
  63805.  
  63806.  Usage 
  63807.  
  63808.           The sec_rgy_pgo_get_by_eff_unix_num routine returns the name and data 
  63809.           for a PGO item.  The desired item is identified by its type (domain) 
  63810.           and its UNIX number. 
  63811.  
  63812.           This routine is similar to the sec_rgy_pgo_get_by_unix_num routine. 
  63813.           The difference between the routines is that 
  63814.           sec_rgy_pgo_get_by_eff_unix_num first searches the local override 
  63815.           files for the respective name_domain for a match with the supplied 
  63816.           UNIX number.  If an override match is found, and an account or group 
  63817.           name is found in that entry, that name is used to obtain PGO data 
  63818.           from the registry and the value of the overridden parameter is set to 
  63819.           TRUE. 
  63820.  
  63821.           The item_cursor parameter specifies the starting point for the search 
  63822.           through the registry database.  It provides an automatic place holder 
  63823.           in the database.  The routine automatically updates this variable to 
  63824.           point to the next PGO item after the returned item.  The returned 
  63825.           cursor location can be supplied in a subsequent database access call 
  63826.           that also uses a PGO item cursor. 
  63827.  
  63828.  Permissions Required 
  63829.  
  63830.           The sec_rgy_pgo_get_by_eff_unix_num routine requires the read (r) 
  63831.           permission on the PGO item to be viewed. 
  63832.  
  63833.  Notes 
  63834.  
  63835.           There are several different types of cursors used in the registry 
  63836.           Application Programmer Interface (API).  Some cursors point to PGO 
  63837.           items, others point to members in a membership list, and others point 
  63838.           to account data.  Do not use a cursor for one type of object in a 
  63839.           routine expecting another type of object. For example, you cannot use 
  63840.           the same cursor on a call to sec_rgy_acct_get_projlist and 
  63841.           sec_rgy_pgo_get_next. The behavior in this case is undefined. 
  63842.  
  63843.           Furthermore, cursors are specific to a server.  A cursor pointing 
  63844.           into one replica of the registry database is useless as a pointer 
  63845.           into another replica. 
  63846.  
  63847.           Use sec_rgy_cursor_reset to renew a cursor for use with another 
  63848.           routine or for another server. 
  63849.  
  63850.  Related Information 
  63851.  
  63852.           Routines: sec_rgy_pgo_add 
  63853.           sec_rgy_pgo_get_by_id 
  63854.           sec_rgy_pgo_get_by_name 
  63855.           sec_rgy_pgo_get_by_unix_num 
  63856.           sec_rgy_pgo_get_next 
  63857.           sec_rgy_pgo_id_to_name 
  63858.           sec_rgy_pgo_id_to_unix_num 
  63859.           sec_rgy_pgo_name_to_id 
  63860.           sec_rgy_pgo_unix_num_to_id 
  63861.           sec_rgy_cursor_reset 
  63862.  
  63863.           Files: 
  63864.           /usr/include/dce/pgo.idl - The idl file from which dce/pgo.h was 
  63865.           derived. 
  63866.           group_override - The local group override file. 
  63867.           passwd_override - The local password override file. 
  63868.  
  63869.  
  63870. ΓòÉΓòÉΓòÉ 8.9.25. sec_rgy_pgo_get_by_id ΓòÉΓòÉΓòÉ
  63871.  
  63872.  Purpose 
  63873.  
  63874.           Returns the name and data for a principal, group, or organization 
  63875.           (PGO) item identified by its UUID. 
  63876.  
  63877.  Library 
  63878.  
  63879.           \lib\dceos2.lib 
  63880.  
  63881.  Format 
  63882.  
  63883.                     #include <dce/pgo.h>
  63884.  
  63885.                     void sec_rgy_pgo_get_by_id(
  63886.                             sec_rgy_handle_t  context,
  63887.                             sec_rgy_domain_t  name_domain,
  63888.                             sec_rgy_name_t  scope,
  63889.                             uuid_t  *item_id,
  63890.                             boolean32  allow_aliases,
  63891.                             sec_rgy_cursor_t  *item_cursor,
  63892.                             sec_rgy_pgo_item_t  *pgo_item,
  63893.                             sec_rgy_name_t  name,
  63894.                             error_status_t  *status);
  63895.  
  63896.  Parameters 
  63897.  
  63898.           Input 
  63899.  
  63900.           context       An opaque handle bound to a registry server.  Use 
  63901.                         sec_rgy_site_open to acquire a bound handle. 
  63902.  
  63903.           name_domain   This parameter identifies the type of the PGO item 
  63904.                         identified by the given name.  The valid values are: 
  63905.  
  63906.                              sec_rgy_domain_person The UUID identifies a 
  63907.                                               principal. 
  63908.  
  63909.                              sec_rgy_domain_group The UUID identifies a group. 
  63910.  
  63911.                              sec_rgy_domain_org The UUID identifies an 
  63912.                                               organization. 
  63913.  
  63914.           scope         A character string (type sec_rgy_name_t) that contains 
  63915.                         the scope of the desired search.  The registry database 
  63916.                         is designed to accommodate a tree-structured name 
  63917.                         hierarchy. The scope of a search is the name of the 
  63918.                         branch where the search takes place. For example, all 
  63919.                         names in a registry may start with \alpha, and be 
  63920.                         divided further into \beta or \gamma. To search only 
  63921.                         the part of the database under \beta, the scope of the 
  63922.                         search would be \alpha\beta, and any resulting PGO 
  63923.                         items would have names beginning with this string. Note 
  63924.                         that these naming conventions do not need to have 
  63925.                         anything to do with group or organization PGO item 
  63926.                         membership lists. 
  63927.  
  63928.           item_id       A pointer to the uuid_t parameter that contains the 
  63929.                         universal unique identifier (UUID) of the desired PGO 
  63930.                         item. 
  63931.  
  63932.           allow_aliases A boolean32 value that indicates whether to search for 
  63933.                         a primary PGO item, or whether the search can be 
  63934.                         satisfied with an alias.  If TRUE, the routine returns 
  63935.                         the next entry found for the PGO item.  If FALSE, the 
  63936.                         routine returns only the primary entry. 
  63937.  
  63938.           Input/Output 
  63939.  
  63940.           item_cursor   An opaque pointer that indicates a specific PGO item 
  63941.                         entry in the registry database.  The 
  63942.                         sec_rgy_pgo_get_by_id routine returns the PGO item 
  63943.                         indicated by item_cursor, and advances the cursor to 
  63944.                         point to the next item in the database. When the end of 
  63945.                         the list of entries is reached, the routine returns 
  63946.                         sec_rgy_no_more_entries in the status parameter. Use 
  63947.                         sec_rgy_cursor_reset to reset the cursor. 
  63948.  
  63949.           Output 
  63950.  
  63951.           pgo_item      A pointer to a sec_rgy_pgo_item_t structure to receive 
  63952.                         the data for the returned PGO item.  The data in this 
  63953.                         structure includes the PGO item's name, UUID, UNIX 
  63954.                         number (if any), and administrative data, such as 
  63955.                         whether the item, if a principal, has a concurrent 
  63956.                         group set. 
  63957.  
  63958.           name          A pointer to a sec_rgy_name_t character string that 
  63959.                         contains the returned name for the PGO item. 
  63960.  
  63961.           status        A pointer to the completion status.  On successful 
  63962.                         completion, the routine returns error_status_ok. 
  63963.                         Otherwise, it returns the following errors: 
  63964.  
  63965.                              sec_rgy_no_more_entries The cursor is at the end 
  63966.                                                    of the list of PGO items. 
  63967.  
  63968.                              sec_rgy_object_not_found The specified PGO item 
  63969.                                                    was not found. 
  63970.  
  63971.                              sec_rgy_server_unavailable The DCE Registry Server 
  63972.                                                    is unavailable. 
  63973.  
  63974.  Usage 
  63975.  
  63976.           The sec_rgy_pgo_get_by_id routine returns the name and data for a PGO 
  63977.           item.  The desired item is identified by its type (domain) and its 
  63978.           UUID. 
  63979.  
  63980.           The item_cursor specifies the starting point for the search through 
  63981.           the registry database.  It provides an automatic place holder in the 
  63982.           database.  The routine automatically updates this parameter to point 
  63983.           to the next PGO item after the returned item.  The returned cursor 
  63984.           location can be supplied on a subsequent database access call that 
  63985.           also uses a PGO item cursor. 
  63986.  
  63987.  Permissions Required 
  63988.  
  63989.           The sec_rgy_pgo_get_by_id routine requires the read (r) permission on 
  63990.           the PGO item to be viewed. 
  63991.  
  63992.  Notes 
  63993.  
  63994.           There are several different types of cursors used in the Registry 
  63995.           Application Programmer Interface. Some cursors point to PGO items, 
  63996.           others point to members in a membership list, and others point to 
  63997.           account data. Do not use a cursor for one type of object in a call 
  63998.           expecting another type of object. For example, you cannot use the 
  63999.           same cursor on a call to sec_rgy_acct_get_projlist and 
  64000.           sec_rgy_pgo_get_next. The behavior in this case is undefined. 
  64001.  
  64002.           Use sec_rgy_cursor_reset to renew a cursor for use with another call 
  64003.           or for another server. 
  64004.  
  64005.  Related Information 
  64006.  
  64007.           Routines: sec_rgy_pgo_add 
  64008.           sec_rgy_pgo_get_by_name 
  64009.           sec_rgy_pgo_get_by_unix_num 
  64010.           sec_rgy_pgo_get_next 
  64011.           sec_rgy_pgo_id_to_name 
  64012.           sec_rgy_pgo_id_to_unix_num 
  64013.           sec_rgy_pgo_name_to_id 
  64014.           sec_rgy_pgo_unix_num_to_id 
  64015.           sec_rgy_site_open 
  64016.           sec_rgy_cursor_reset 
  64017.  
  64018.  
  64019. ΓòÉΓòÉΓòÉ 8.9.26. sec_rgy_pgo_get_by_name ΓòÉΓòÉΓòÉ
  64020.  
  64021.  Purpose 
  64022.  
  64023.           Returns the data for a named principal, group, or organization (PGO) 
  64024.           item. 
  64025.  
  64026.  Library 
  64027.  
  64028.           \lib\dceos2.lib 
  64029.  
  64030.  Format 
  64031.  
  64032.                     #include <dce/pgo.h>
  64033.  
  64034.                     void sec_rgy_pgo_get_by_name(
  64035.                             sec_rgy_handle_t  context,
  64036.                             sec_rgy_domain_t  name_domain,
  64037.                             sec_rgy_name_t  pgo_name,
  64038.                             sec_rgy_cursor_t  *item_cursor,
  64039.                             sec_rgy_pgo_item_t  *pgo_item,
  64040.                             error_status_t  *status);
  64041.  
  64042.  Parameters 
  64043.  
  64044.           Input 
  64045.  
  64046.           context       An opaque handle bound to a registry server.  Use 
  64047.                         sec_rgy_site_open to acquire a bound handle. 
  64048.  
  64049.           name_domain   This parameter identifies the type of the PGO item 
  64050.                         identified by the given name.  The valid values are: 
  64051.  
  64052.                              sec_rgy_domain_person The name identifies a 
  64053.                                               principal. 
  64054.  
  64055.                              sec_rgy_domain_group The name identifies a group. 
  64056.  
  64057.                              sec_rgy_domain_org The name identifies an 
  64058.                                               organization. 
  64059.  
  64060.           pgo_name      A character string (type sec_rgy_name_t) that contains 
  64061.                         the name of the principal, group, or organization for 
  64062.                         which to search. 
  64063.  
  64064.           Output 
  64065.  
  64066.           item_cursor   An opaque pointer that indicates a specific PGO item 
  64067.                         entry in the registry database.  The 
  64068.                         sec_rgy_pgo_get_next routine returns the PGO item entry 
  64069.                         indicated by item_cursor, and advances the cursor to 
  64070.                         the point to the next item in the database.  When the 
  64071.                         end of the list of entries is reached, the routine 
  64072.                         returns sec_rgy_no_more_entries in the status 
  64073.                         parameter.  Use sec_rgy_cursor_reset to reset the 
  64074.                         cursor. 
  64075.  
  64076.           pgo_item      A pointer to a sec_rgy_pgo_item_t structure to receive 
  64077.                         the data for the returned PGO item.  The data in this 
  64078.                         structure includes the PGO item's name, UUID, UNIX 
  64079.                         number (if any), and administrative data, such as 
  64080.                         whether the item, if a principal, has a concurrent 
  64081.                         group set. 
  64082.  
  64083.           status        A pointer to the completion status.  On successful 
  64084.                         completion, the routine returns error_status_ok. 
  64085.                         Otherwise, it returns one of the following errors: 
  64086.  
  64087.                              sec_rgy_no_more_entries The cursor is at the end 
  64088.                                                    of the list of PGO items. 
  64089.  
  64090.                              sec_rgy_object_not_found The specified PGO item 
  64091.                                                    was not found. 
  64092.  
  64093.                              sec_rgy_server_unavailable The DCE Registry Server 
  64094.                                                    is unavailable. 
  64095.  
  64096.  Usage 
  64097.  
  64098.           The sec_rgy_pgo_get_by_name routine returns the data for a named PGO 
  64099.           item from the registry database.  The desired item is identified by 
  64100.           its type (name_domain) and name. 
  64101.  
  64102.           The item_cursor parameter specifies the starting point for the search 
  64103.           through the registry database.  It provides an automatic place holder 
  64104.           in the database.  The routine automatically updates this parameter to 
  64105.           point to the next PGO item after the returned item.  The returned 
  64106.           cursor location can be supplied on a subsequent database access call 
  64107.           that also uses a PGO item cursor. 
  64108.  
  64109.  Permissions Required 
  64110.  
  64111.           The sec_rgy_pgo_get_by_name routine requires the read (r) permission 
  64112.           on the PGO item to be viewed. 
  64113.  
  64114.  Notes 
  64115.  
  64116.           There are several different types of cursors used in the Registry 
  64117.           Application Programmer Interface.  Some cursors point to PGO items, 
  64118.           others point to members in a membership list, and others point to 
  64119.           account data.  Do not use a cursor for one type of object in a call 
  64120.           expecting another type of object.  For example, you cannot use the 
  64121.           same cursor on a call to sec_rgy_acct_get_projlist and 
  64122.           sec_rgy_pgo_get_next. The behavior in this case is undefined. 
  64123.  
  64124.           Use sec_rgy_cursor_reset to renew a cursor for use with another call 
  64125.           or for another server. 
  64126.  
  64127.  Related Information 
  64128.  
  64129.           Routines: sec_rgy_pgo_add 
  64130.           sec_rgy_pgo_get_by_id 
  64131.           sec_rgy_pgo_get_by_unix_num 
  64132.           sec_rgy_pgo_get_next 
  64133.           sec_rgy_pgo_id_to_name 
  64134.           sec_rgy_pgo_id_to_unix_num 
  64135.           sec_rgy_pgo_name_to_id 
  64136.           sec_rgy_pgo_unix_num_to_id 
  64137.           sec_rgy_site_open 
  64138.           sec_rgy_cursor_reset 
  64139.  
  64140.  
  64141. ΓòÉΓòÉΓòÉ 8.9.27. sec_rgy_pgo_get_by_unix_num ΓòÉΓòÉΓòÉ
  64142.  
  64143.  Purpose 
  64144.  
  64145.           Returns the name and data for a PGO item identified by its UNIX ID. 
  64146.  
  64147.  Library 
  64148.  
  64149.           \lib\dceos2.lib 
  64150.  
  64151.  Format 
  64152.  
  64153.                     #include <dce/pgo.h>
  64154.  
  64155.                     void sec_rgy_pgo_get_by_unix_num(
  64156.                             sec_rgy_handle_t  context,
  64157.                             sec_rgy_domain_t  name_domain,
  64158.                             sec_rgy_name_t  scope,
  64159.                             signed32  unix_id,
  64160.                             boolean32  allow_aliases,
  64161.                             sec_rgy_cursor_t  *item_cursor,
  64162.                             sec_rgy_pgo_item_t  *pgo_item,
  64163.                             sec_rgy_name_t  name,
  64164.                             error_status_t  *status);
  64165.  
  64166.  Parameters 
  64167.  
  64168.           Input 
  64169.  
  64170.           context       An opaque handle bound to a registry server.  Use 
  64171.                         sec_rgy_site_open to acquire a bound handle. 
  64172.  
  64173.           name_domain   This parameter identifies the type of the PGO item 
  64174.                         identified by the given name.  The valid values are: 
  64175.  
  64176.                              sec_rgy_domain_person The UNIX number identifies a 
  64177.                                               principal. 
  64178.  
  64179.                              sec_rgy_domain_group The UNIX number identifies a 
  64180.                                               group. 
  64181.  
  64182.                              sec_rgy_domain_org The UNIX number identifies an 
  64183.                                               organization. 
  64184.  
  64185.           scope         A character string (type sec_rgy_name_t) that contains 
  64186.                         the scope of the desired search. The registry database 
  64187.                         is designed to accommodate a tree-structured name 
  64188.                         hierarchy. The scope of a search is the name of the 
  64189.                         branch where the search takes place. For example, all 
  64190.                         names in a registry may start with \alpha, and be 
  64191.                         divided further into \beta or \gamma. To search only 
  64192.                         the part of the database under \beta, the scope of the 
  64193.                         search would be \alpha\beta, and any resulting PGO 
  64194.                         items would have names beginning with this string. 
  64195.  
  64196.                         Note:  These naming conventions do not need to have 
  64197.                                anything to do with group or organization PGO 
  64198.                                item membership lists. 
  64199.  
  64200.           unix_id       The UNIX number of the desired registry PGO item. 
  64201.  
  64202.           allow_aliases A boolean32 value that indicates whether to search for 
  64203.                         a primary PGO item, or whether the search can be 
  64204.                         satisfied with an alias. If TRUE, the routine returns 
  64205.                         the next entry found for the PGO item. If FALSE, the 
  64206.                         routine returns the primary entry only. 
  64207.  
  64208.           Input/Output 
  64209.  
  64210.           item_cursor   An opaque pointer that indicates a specific PGO item 
  64211.                         entry in the registry database. The 
  64212.                         sec_rgy_pgo_get_by_unix_num routine returns the PGO 
  64213.                         item indicated by item_cursor, and advances the cursor 
  64214.                         to point to the next item in the database.  When the 
  64215.                         end of the list of entries is reached, the routine 
  64216.                         returns sec_rgy_no_more_entries in the status 
  64217.                         parameter.  Use sec_rgy_cursor_reset to reset the 
  64218.                         cursor. 
  64219.  
  64220.           Output 
  64221.  
  64222.           pgo_item      A pointer to a sec_rgy_pgo_item_t structure to receive 
  64223.                         the data for the returned PGO item. The data in this 
  64224.                         structure includes the PGO item's name, UUID, UNIX 
  64225.                         number (if any), and administrative data, such as 
  64226.                         whether the item, if a principal, can have a concurrent 
  64227.                         group set. 
  64228.  
  64229.           name          A pointer to a sec_rgy_name_t character string that 
  64230.                         contains the returned name for the PGO item. 
  64231.  
  64232.           status        A pointer to the completion status.  On successful 
  64233.                         completion, the routine returns error_status_ok. 
  64234.                         Otherwise, it returns one of the following errors: 
  64235.  
  64236.                              sec_rgy_no_more_entries The cursor is at the end 
  64237.                                                    of the list of PGO items. 
  64238.  
  64239.                              sec_rgy_object_not_found The specified PGO item 
  64240.                                                    was not found. 
  64241.  
  64242.                              sec_rgy_server_unavailable The DCE Registry Server 
  64243.                                                    is unavailable. 
  64244.  
  64245.  Usage 
  64246.  
  64247.           The sec_rgy_pgo_get_by_unix_num routine returns the name and data for 
  64248.           a PGO item.  The desired item is identified by its type (domain) and 
  64249.           its UNIX number. 
  64250.  
  64251.           The item_cursor parameter specifies the starting point for the search 
  64252.           through the registry database.  It provides an automatic place holder 
  64253.           in the database.  The routine automatically updates this parameter to 
  64254.           point to the next PGO item after the returned item.  The returned 
  64255.           cursor location can be supplied on a subsequent database access call 
  64256.           that also uses a PGO item cursor. 
  64257.  
  64258.  Permissions Required 
  64259.  
  64260.           The sec_rgy_pgo_get_by_unix_num routine requires the read (r) 
  64261.           permission on the PGO item to be viewed. 
  64262.  
  64263.  Notes 
  64264.  
  64265.           There are several different types of cursors used in the Registry 
  64266.           Application Programmer Interface.  Some cursors point to PGO items, 
  64267.           others point to members in a membership list, and others point to 
  64268.           account data.  Do not use a cursor for one type of object in a call 
  64269.           expecting another type of object.  For example, you cannot use the 
  64270.           same cursor on a call to sec_rgy_acct_get_projlist and 
  64271.           sec_rgy_pgo_get_next. The behavior in this case is undefined. 
  64272.  
  64273.           Use sec_rgy_cursor_reset to renew a cursor for use with another call 
  64274.           or for another server. 
  64275.  
  64276.  Related Information 
  64277.  
  64278.           Routines: sec_rgy_pgo_add 
  64279.           sec_rgy_pgo_get_by_id 
  64280.           sec_rgy_pgo_get_by_name 
  64281.           sec_rgy_pgo_get_next 
  64282.           sec_rgy_pgo_id_to_name 
  64283.           sec_rgy_pgo_name_to_id 
  64284.           sec_rgy_cursor_reset 
  64285.  
  64286.  
  64287. ΓòÉΓòÉΓòÉ 8.9.28. sec_rgy_pgo_get_members ΓòÉΓòÉΓòÉ
  64288.  
  64289.  Purpose 
  64290.  
  64291.           Returns the membership list for a specified group or organization or 
  64292.           returns the set of groups in which the specified principal is a 
  64293.           member. 
  64294.  
  64295.  Library 
  64296.  
  64297.           \lib\dceos2.lib 
  64298.  
  64299.  Format 
  64300.  
  64301.                     #include <dce/pgo.h>
  64302.  
  64303.                     void sec_rgy_pgo_get_members(
  64304.                             sec_rgy_handle_t  context,
  64305.                             sec_rgy_domain_t  name_domain,
  64306.                             sec_rgy_name_t  go_name,
  64307.                             sec_rgy_cursor_t  *member_cursor,
  64308.                             signed32  max_members,
  64309.                             sec_rgy_member_t  member_list[],
  64310.                             signed32  *number_supplied,
  64311.                             signed32  *number_members,
  64312.                             error_status_t  *status);
  64313.  
  64314.  Parameters 
  64315.  
  64316.           Input 
  64317.  
  64318.           context       An opaque handle bound to a secd server.  Use 
  64319.                         sec_rgy_site_open to acquire a bound handle. 
  64320.  
  64321.           name_domain   This parameter specifies whether go_name identifies a 
  64322.                         principal, group, or organization.  The valid values 
  64323.                         are: 
  64324.  
  64325.                              sec_rgy_domain_group The go_name parameter 
  64326.                                               identifies a group. 
  64327.  
  64328.                              sec_rgy_domain_org The go_name parameter 
  64329.                                               identifies an organization. 
  64330.  
  64331.                              sec_rgy_domain_person The go_name parameter 
  64332.                                               identifies a principal. 
  64333.  
  64334.           go_name       A character string (type sec_rgy_name_t) that contains 
  64335.                         the name of a principal, group, or organization. If 
  64336.                         go_name is the name of a group or organization, the 
  64337.                         routine returns the group's or organization's member 
  64338.                         list. If go_name is the name of a principal, the 
  64339.                         routine returns a list of all groups in which the 
  64340.                         principal is a member. (Contrast this with the 
  64341.                         sec_rgy_acct_get_projlist routine, which returns only 
  64342.                         those groups in which the principal is a member and 
  64343.                         that also have been marked to be included in the 
  64344.                         principal's project list.) 
  64345.  
  64346.           max_members   A signed32 parameter that contains the allocated 
  64347.                         dimension of the member_list array.  This is the 
  64348.                         maximum number of members or groups that can be 
  64349.                         returned by a single call. 
  64350.  
  64351.           Input/Output 
  64352.  
  64353.           member_cursor An opaque pointer to a specific entry in the membership 
  64354.                         list or list of groups. The returned list begins with 
  64355.                         the entry specified by member_cursor. Upon return, the 
  64356.                         cursor points to the next entry after the last one 
  64357.                         returned. If there are no more entries, the routine 
  64358.                         returns the value sec_rgy_no_more_entries in the status 
  64359.                         parameter. Use sec_rgy_cursor_reset to reset the cursor 
  64360.                         to the beginning of the list. 
  64361.  
  64362.           Output 
  64363.  
  64364.           member_list   An array of character strings to receive the returned 
  64365.                         member or group names. The size allocated for the array 
  64366.                         is given by max_members. If this value is less than the 
  64367.                         total number of members or group names, multiple calls 
  64368.                         must be made to return all of the members or groups. 
  64369.  
  64370.           number_supplied A pointer to a signed32 parameter to receive the 
  64371.                         number of members or groups actually returned in 
  64372.                         member_list. 
  64373.  
  64374.           number_members A pointer to a signed32 parameter to receive the total 
  64375.                         number of members or groups. If this number is greater 
  64376.                         than number_supplied, multiple calls to 
  64377.                         sec_rgy_pgo_get_members are necessary. Use the 
  64378.                         member_cursor parameter to coordinate successive calls. 
  64379.  
  64380.           status        A pointer to the completion status.  On successful 
  64381.                         completion, the routine returns error_status_ok. 
  64382.                         Otherwise, it returns one of the following errors: 
  64383.  
  64384.                              sec_rgy_object_not_found The specified group, 
  64385.                                                    organization, or principal 
  64386.                                                    could not be found. 
  64387.  
  64388.                              sec_rgy_no_more_entries The cursor points to the 
  64389.                                                    end of the membership list 
  64390.                                                    for a group or organization 
  64391.                                                    or to the end of the list of 
  64392.                                                    groups for a principal. 
  64393.  
  64394.                              sec_rgy_server_unavailable The DCE Registry Server 
  64395.                                                    is unavailable. 
  64396.  
  64397.                              sec_rgy_bad_data      The old_login_name or the 
  64398.                                                    new_login_name is NULL. 
  64399.  
  64400.  Usage 
  64401.  
  64402.           The sec_rgy_pgo_get_members routine returns a list of the members in 
  64403.           the specified group or organization, or a list of groups in which a 
  64404.           specified principal is a member. 
  64405.  
  64406.           The member_cursor parameter specifies the starting point for the 
  64407.           search through the registry database. It provides an automatic place 
  64408.           holder in the database. The routine automatically updates 
  64409.           member_cursor to point to the next member or group (if any) after the 
  64410.           returned list. If not all of the members or groups are returned, the 
  64411.           updated cursor can be supplied on successive calls to return the 
  64412.           remainder of the list. 
  64413.  
  64414.  Permissions Required 
  64415.  
  64416.           The sec_rgy_pgo_get_members routine requires the read (r) permission 
  64417.           on the principal, group, or organization object specified by go_name. 
  64418.  
  64419.  Notes 
  64420.  
  64421.           There are several different types of cursors used in the Registry 
  64422.           Application Programmer Interface.  Some cursors point to PGO items, 
  64423.           others point to members in a membership list, and others point to 
  64424.           account data. Do not use a cursor for one type of object in a call 
  64425.           expecting another type of object.  For example, you cannot use the 
  64426.           same cursor on a call to sec_rgy_acct_get_projlist and 
  64427.           sec_rgy_pgo_get_next. The behavior in this case is undefined. 
  64428.  
  64429.           Use sec_rgy_cursor_reset to renew a cursor for use with another call 
  64430.           or for another server. 
  64431.  
  64432.  Related Information 
  64433.  
  64434.           Routines: sec_rgy_pgo_add_member 
  64435.           sec_rgy_cursor_reset 
  64436.           sec_rgy_pgo_is_member 
  64437.           sec_rgy_acct_get_projlist 
  64438.  
  64439.  
  64440. ΓòÉΓòÉΓòÉ 8.9.29. sec_rgy_pgo_get_next ΓòÉΓòÉΓòÉ
  64441.  
  64442.  Purpose 
  64443.  
  64444.           Returns the next principal, group, or organization (PGO) item in the 
  64445.           registry database. 
  64446.  
  64447.  Library 
  64448.  
  64449.           \lib\dceos2.lib 
  64450.  
  64451.  Format 
  64452.  
  64453.                     #include <dce/pgo.h>
  64454.  
  64455.                     void sec_rgy_pgo_get_next(
  64456.                             sec_rgy_handle_t  context,
  64457.                             sec_rgy_domain_t  name_domain,
  64458.                             sec_rgy_name_t  scope,
  64459.                             sec_rgy_cursor_t  *item_cursor,
  64460.                             sec_rgy_pgo_item_t  *pgo_item,
  64461.                             sec_rgy_name_t  name,
  64462.                             error_status_t  *status);
  64463.  
  64464.  Parameters 
  64465.  
  64466.           Input 
  64467.  
  64468.           context       An opaque handle bound to a registry server.  Use 
  64469.                         sec_rgy_site_open to acquire a bound handle. 
  64470.  
  64471.           name_domain   This parameter identifies the type of the PGO item 
  64472.                         identified by the given name.  The valid values are: 
  64473.  
  64474.                              sec_rgy_domain_person Returns the next principal 
  64475.                                               item. 
  64476.  
  64477.                              sec_rgy_domain_group Returns the next group item. 
  64478.  
  64479.                              sec_rgy_domain_org Returns the next organization 
  64480.                                               item. 
  64481.  
  64482.           scope         A character string (type sec_rgy_name_t) containing the 
  64483.                         scope of the desired search.  The registry database is 
  64484.                         designed to accommodate a tree-structured name 
  64485.                         hierarchy.  The scope of a search is the name of the 
  64486.                         branch where the search takes place. For example, all 
  64487.                         names in a registry may start with \alpha, and be 
  64488.                         divided further into \beta or \gamma. To search only 
  64489.                         the part of the database under \beta, the scope of the 
  64490.                         search would be \alpha\beta, and any resulting PGO 
  64491.                         items would have names beginning with this string. 
  64492.  
  64493.                         Note:  These naming conventions do not need to have 
  64494.                                anything to do with group or organization PGO 
  64495.                                item membership lists. 
  64496.  
  64497.  
  64498.           Input/Output 
  64499.  
  64500.           item_cursor   An opaque pointer indicating a specific PGO item entry 
  64501.                         in the registry database.  The sec_rgy_pgo_get_next 
  64502.                         routine returns the PGO item indicated by item_cursor, 
  64503.                         and advances the cursor to point to the next item in 
  64504.                         the database. When the end of the list of entries is 
  64505.                         reached, the routine returns sec_rgy_no_more_entries in 
  64506.                         the status parameter. Use sec_rgy_cursor_reset to reset 
  64507.                         the cursor. 
  64508.  
  64509.           Output 
  64510.  
  64511.           pgo_item      A pointer to a sec_rgy_pgo_item_t structure to receive 
  64512.                         the data for the returned PGO item.  The data in this 
  64513.                         structure includes the PGO item's name, UUID, UNIX 
  64514.                         number (if any), and administrative data, such as 
  64515.                         whether the item, if a principal, may have a concurrent 
  64516.                         group set. 
  64517.  
  64518.           name          A pointer to a sec_rgy_name_t character string 
  64519.                         containing the name of the returned PGO item. 
  64520.  
  64521.           status        A pointer to the completion status.  On successful 
  64522.                         completion, the routine returns error_status_ok. 
  64523.                         Otherwise, it returns one of the following errors: 
  64524.  
  64525.                              sec_rgy_no_more_entries The cursor is at the end 
  64526.                                                    of the list of PGO items. 
  64527.  
  64528.                              sec_rgy_server_unavailable The DCE Registry Server 
  64529.                                                    is unavailable. 
  64530.  
  64531.  Usage 
  64532.  
  64533.           The sec_rgy_pgo_get_next routine returns the data and name for the 
  64534.           person, group, or organization (PGO) item in the registry database 
  64535.           indicated by item_cursor.  It also advances the cursor to point to 
  64536.           the next PGO item in the database. Successive calls to this routine 
  64537.           return all the PGO items in the database of the specified type (given 
  64538.           by name_domain), in storage order. 
  64539.  
  64540.           The PGO data consists of: 
  64541.  
  64542.             o  The universal unique identifier (UUID) of the PGO item 
  64543.             o  The UNIX number for the PGO item 
  64544.             o  The quota for subaccounts 
  64545.             o  The full name of the PGO item 
  64546.             o  Flags indicating whether 
  64547.                  -  A principal item is an alias. 
  64548.                  -  The PGO item can be deleted. 
  64549.                  -  A principal item can have a concurrent group set. 
  64550.                  -  A group item can appear on a concurrent group set. 
  64551.  
  64552.  Permissions Required 
  64553.  
  64554.           The sec_rgy_pgo_get_next routine requires the read (r) permission on 
  64555.           the PGO item to be viewed. 
  64556.  
  64557.  Notes 
  64558.  
  64559.           There are several different types of cursors used in the Registry 
  64560.           Application Programmer Interface.  Some cursors point to PGO items, 
  64561.           others point to members in a membership list, and others point to 
  64562.           account data.  Do not use a cursor for one type of object in a call 
  64563.           expecting another type of object.  For example, you cannot use the 
  64564.           same cursor on a call to sec_rgy_acct_get_projlist and 
  64565.           sec_rgy_pgo_get_next. The behavior in this case is undefined. 
  64566.  
  64567.           Use sec_rgy_cursor_reset to renew a cursor for use with another call 
  64568.           or for another server. 
  64569.  
  64570.  Related Information 
  64571.  
  64572.           Routines: sec_rgy_pgo_add 
  64573.           sec_rgy_cursor_reset 
  64574.           sec_rgy_pgo_get_by_id 
  64575.           sec_rgy_pgo_get_by_name 
  64576.           sec_rgy_pgo_get_by_unix_num 
  64577.           sec_rgy_pgo_id_to_unix_num 
  64578.           sec_rgy_pgo_unix_num_to_id 
  64579.           sec_rgy_site_open 
  64580.  
  64581.  
  64582. ΓòÉΓòÉΓòÉ 8.9.30. sec_rgy_pgo_id_to_name ΓòÉΓòÉΓòÉ
  64583.  
  64584.  Purpose 
  64585.  
  64586.           Returns the name for a principal, group, or organization (PGO) item 
  64587.           identified by its universal unique identifier (UUID). 
  64588.  
  64589.  Library 
  64590.  
  64591.           \lib\dceos2.lib 
  64592.  
  64593.  Format 
  64594.  
  64595.                     #include <dce/pgo.h>
  64596.  
  64597.                     void sec_rgy_pgo_id_to_name(
  64598.                             sec_rgy_handle_t  context,
  64599.                             sec_rgy_domain_t  name_domain,
  64600.                             uuid_t  *item_id,
  64601.                             sec_rgy_name_t  pgo_name,
  64602.                             error_status_t  *status);
  64603.  
  64604.  Parameters 
  64605.  
  64606.           Input 
  64607.  
  64608.           context       An opaque handle bound to a registry server.  Use 
  64609.                         sec_rgy_site_open to acquire a bound handle. 
  64610.  
  64611.           name_domain   This parameter identifies the type of the PGO item 
  64612.                         identified by the given name.  The valid values are: 
  64613.  
  64614.                              sec_rgy_domain_person The item_id parameter 
  64615.                                               identifies a principal. 
  64616.  
  64617.                              sec_rgy_domain_group The item_id parameter 
  64618.                                               identifies a group. 
  64619.  
  64620.                              sec_rgy_domain_org The item_id parameter 
  64621.                                               identifies an organization. 
  64622.  
  64623.           item_id       A pointer to the uuid_t parameter containing the input 
  64624.                         UUID. 
  64625.  
  64626.           Output 
  64627.  
  64628.           pgo_name      A character string (type sec_rgy_name_t) containing the 
  64629.                         name of the principal, group, or organization with the 
  64630.                         input UUID. 
  64631.  
  64632.           status        A pointer to the completion status.  On successful 
  64633.                         completion, the routine returns error_status_ok. 
  64634.                         Otherwise, it returns one of the following errors: 
  64635.  
  64636.                              sec_rgy_object_not_found No item with the 
  64637.                                                    specified UUID could be 
  64638.                                                    found. 
  64639.  
  64640.                              sec_rgy_server_unavailable The DCE Registry Server 
  64641.                                                    is unavailable. 
  64642.  
  64643.  Usage 
  64644.  
  64645.           The sec_rgy_pgo_id_to_name routine returns the name of the principal, 
  64646.           group, or organization (PGO) item having the specified UUID. 
  64647.  
  64648.  Permissions Required 
  64649.  
  64650.           The sec_rgy_pgo_id_to_name routine requires at least one permission 
  64651.           of any kind on the PGO item to be viewed. 
  64652.  
  64653.  Related Information 
  64654.  
  64655.           Routines: sec_rgy_pgo_add 
  64656.           sec_rgy_pgo_get_by_id 
  64657.           sec_rgy_pgo_get_by_name 
  64658.           sec_rgy_pgo_get_by_unix_num 
  64659.           sec_rgy_pgo_id_to_unix_num 
  64660.           sec_rgy_pgo_name_to_id 
  64661.           sec_rgy_pgo_unix_num_to_id 
  64662.           sec_rgy_site_open 
  64663.  
  64664.  
  64665. ΓòÉΓòÉΓòÉ 8.9.31. sec_rgy_pgo_id_to_unix_num ΓòÉΓòÉΓòÉ
  64666.  
  64667.  Purpose 
  64668.  
  64669.           Returns the UNIX number for a principal, group, or organization (PGO) 
  64670.           item identified by its universal unique identifier (UUID). 
  64671.  
  64672.  Library 
  64673.  
  64674.           \lib\dceos2.lib 
  64675.  
  64676.  Format 
  64677.  
  64678.                     #include <dce/pgo.h>
  64679.  
  64680.                     void sec_rgy_pgo_id_to_unix_num(
  64681.                             sec_rgy_handle_t  context,
  64682.                             sec_rgy_domain_t  name_domain,
  64683.                             uuid_t  *item_id,
  64684.                             signed32  *item_unix_id,
  64685.                             error_status_t  *status);
  64686.  
  64687.  Parameters 
  64688.  
  64689.           Input 
  64690.  
  64691.           context       An opaque handle bound to a registry server.  Use 
  64692.                         sec_rgy_site_open to acquire a bound handle. 
  64693.  
  64694.           name_domain   This parameter identifies the type of the PGO item 
  64695.                         identified by the given name.  The valid values are: 
  64696.  
  64697.                              sec_rgy_domain_person The item_id parameter 
  64698.                                               identifies a principal. 
  64699.  
  64700.                              sec_rgy_domain_group The item_id parameter 
  64701.                                               identifies a group. 
  64702.  
  64703.                              sec_rgy_domain_org The item_id parameter 
  64704.                                               identifies an organization. 
  64705.  
  64706.           item_id       A pointer to the uuid_t parameter containing the input 
  64707.                         UUID. 
  64708.  
  64709.           Output 
  64710.  
  64711.           item_unix_id  A pointer to the signed32 parameter to receive the 
  64712.                         returned UNIX number for the PGO item. 
  64713.  
  64714.           status        A pointer to the completion status.  On successful 
  64715.                         completion, the routine returns error_status_ok. 
  64716.                         Otherwise, it returns one of the following errors: 
  64717.  
  64718.                              sec_rgy_object_not_found No item with the 
  64719.                                                    specified UUID could be 
  64720.                                                    found. 
  64721.  
  64722.                              sec_rgy_server_unavailable The DCE Registry Server 
  64723.                                                    is unavailable. 
  64724.  
  64725.  Usage 
  64726.  
  64727.           The sec_rgy_pgo_id_to_unix_num routine returns the UNIX number for 
  64728.           the principal, group, or organization (PGO) item having the specified 
  64729.           UUID. 
  64730.  
  64731.  Related Information 
  64732.  
  64733.           Routines: sec_rgy_pgo_add 
  64734.           sec_rgy_pgo_get_by_id 
  64735.           sec_rgy_pgo_get_by_name 
  64736.           sec_rgy_pgo_get_by_unix_num 
  64737.           sec_rgy_pgo_id_to_name 
  64738.           sec_rgy_pgo_name_to_id 
  64739.           sec_rgy_pgo_unix_num_to_id 
  64740.           sec_rgy_site_open 
  64741.  
  64742.  
  64743. ΓòÉΓòÉΓòÉ 8.9.32. sec_rgy_pgo_is_member ΓòÉΓòÉΓòÉ
  64744.  
  64745.  Purpose 
  64746.  
  64747.           Checks group or organization membership. 
  64748.  
  64749.  Library 
  64750.  
  64751.           \lib\dceos2.lib 
  64752.  
  64753.  Format 
  64754.  
  64755.                     #include <dce/pgo.h>
  64756.  
  64757.                     boolean32 sec_rgy_pgo_is_member(
  64758.                             sec_rgy_handle_t  context,
  64759.                             sec_rgy_domain_t  name_domain,
  64760.                             sec_rgy_name_t  go_name,
  64761.                             sec_rgy_name_t  person_name,
  64762.                             error_status_t  *status);
  64763.  
  64764.  Parameters 
  64765.  
  64766.           Input 
  64767.  
  64768.           context       An opaque handle bound to a registry server.  Use 
  64769.                         sec_rgy_site_open to acquire a bound handle. 
  64770.  
  64771.           name_domain   This parameter identifies the type of the principal, 
  64772.                         group, or organization (PGO) item identified by the 
  64773.                         given name. The valid values are: 
  64774.  
  64775.                              sec_rgy_domain_group The go_name identifies a 
  64776.                                               group. 
  64777.  
  64778.                              sec_rgy_domain_org The go_name identifies an 
  64779.                                               organization. 
  64780.  
  64781.           go_name       A character string (type sec_rgy_name_t) containing the 
  64782.                         name of the group or organization whose membership list 
  64783.                         is in question. 
  64784.  
  64785.           person_name   A character string (type sec_rgy_name_t) containing the 
  64786.                         name of the principal whose membership in the group or 
  64787.                         organization specified by go_name is in question. 
  64788.  
  64789.           Output 
  64790.  
  64791.           status        A pointer to the completion status.  On successful 
  64792.                         completion, the routine returns error_status_ok. 
  64793.                         Otherwise, it returns one of the following errors: 
  64794.  
  64795.                              sec_rgy_object_not_found The named group or 
  64796.                                                      organization was not 
  64797.                                                      found. 
  64798.  
  64799.                              sec_rgy_server_unavailable The DCE Registry Server 
  64800.                                                      is unavailable. 
  64801.  
  64802.  Usage 
  64803.  
  64804.           The sec_rgy_pgo_is_member routine tests whether the specified 
  64805.           principal is a member of the named group or organization. 
  64806.  
  64807.  Permissions Required 
  64808.  
  64809.           The sec_rgy_pgo_is_member routine requires the test (t) permission on 
  64810.           the group or organization item specified by go_name. 
  64811.  
  64812.  Return Codes 
  64813.  
  64814.           The routine returns TRUE if the principal is a member of the named 
  64815.           group or organization.  If the person is not a member, the routine 
  64816.           returns FALSE. 
  64817.  
  64818.  Related Information 
  64819.  
  64820.           Routines: sec_rgy_pgo_add_member 
  64821.           sec_rgy_pgo_get_members 
  64822.           sec_rgy_site_open 
  64823.  
  64824.  
  64825. ΓòÉΓòÉΓòÉ 8.9.33. sec_rgy_pgo_name_to_id ΓòÉΓòÉΓòÉ
  64826.  
  64827.  Purpose 
  64828.  
  64829.           Returns the universal unique identifier (UUID) for a named principal, 
  64830.           group, or organization (PGO) item. 
  64831.  
  64832.  Library 
  64833.  
  64834.           \lib\dceos2.lib 
  64835.  
  64836.  Format 
  64837.  
  64838.                     #include <dce/pgo.h>
  64839.  
  64840.                     void sec_rgy_pgo_name_to_id(
  64841.                             sec_rgy_handle_t  context,
  64842.                             sec_rgy_domain_t  name_domain,
  64843.                             sec_rgy_name_t  pgo_name,
  64844.                             uuid_t  *item_id,
  64845.                             error_status_t  *status);
  64846.  
  64847.  Parameters 
  64848.  
  64849.           Input 
  64850.  
  64851.           context       An opaque handle bound to a registry server.  Use 
  64852.                         sec_rgy_site_open to acquire a bound handle. 
  64853.  
  64854.           name_domain   This parameter identifies the type of the PGO item 
  64855.                         identified by the given name.  The valid values are: 
  64856.  
  64857.                              sec_rgy_domain_person The name identifies a 
  64858.                                               principal. 
  64859.  
  64860.                              sec_rgy_domain_group The name identifies a group. 
  64861.  
  64862.                              sec_rgy_domain_org The name identifies an 
  64863.                                               organization. 
  64864.  
  64865.           pgo_name      A character string (type sec_rgy_name_t) containing the 
  64866.                         name of the principal, group, or organization whose 
  64867.                         UUID is sought. 
  64868.  
  64869.           Output 
  64870.  
  64871.           item_id       A pointer to the uuid_t parameter containing the UUID 
  64872.                         of the PGO item. 
  64873.  
  64874.           status        A pointer to the completion status.  On successful 
  64875.                         completion, the routine returns error_status_ok. 
  64876.                         Otherwise, it returns one of the following errors: 
  64877.  
  64878.                              sec_rgy_object_not_found The specified PGO item 
  64879.                                                    could not be found. 
  64880.  
  64881.                              sec_rgy_server_unavailable The DCE Registry Server 
  64882.                                                    is unavailable. 
  64883.  
  64884.  Usage 
  64885.  
  64886.           The sec_rgy_pgo_name_to_id routine returns the UUID associated with 
  64887.           the named PGO item. 
  64888.  
  64889.  Related Information 
  64890.  
  64891.           Routines: sec_rgy_pgo_add 
  64892.           sec_rgy_pgo_get_by_id 
  64893.           sec_rgy_pgo_get_by_name 
  64894.           sec_rgy_pgo_get_by_unix_num 
  64895.           sec_rgy_pgo_id_to_name 
  64896.           sec_rgy_pgo_id_to_unix_num 
  64897.           sec_rgy_pgo_unix_num_to_id 
  64898.           sec_rgy_site_open 
  64899.  
  64900.  
  64901. ΓòÉΓòÉΓòÉ 8.9.34. sec_rgy_pgo_name_to_unix_num ΓòÉΓòÉΓòÉ
  64902.  
  64903.  Purpose 
  64904.  
  64905.           Returns the UNIX number for a principal, group, or organization (PGO) 
  64906.           item identified by its name. 
  64907.  
  64908.  Library 
  64909.  
  64910.           \lib\dceos2.lib 
  64911.  
  64912.  Format 
  64913.  
  64914.                     #include <dce/pgo.h>
  64915.  
  64916.                     void sec_rgy_pgo_name_to_unix_num(
  64917.                             sec_rgy_handle_t  context,
  64918.                             sec_rgy_domain_t  name_domain,
  64919.                             sec_rgy_name_t  pgo_name,
  64920.                             signed32  *item__id,
  64921.                             error_status_t  *status);
  64922.  
  64923.  Parameters 
  64924.  
  64925.           Input 
  64926.  
  64927.           context       An opaque handle bound to a registry server. Use 
  64928.                         sec_rgy_site_open to acquire a bound handle. 
  64929.  
  64930.           name_domain   This parameter identifies the type of the PGO item 
  64931.                         identified by the given name.  The valid values are: 
  64932.  
  64933.                              sec_rgy_domain_person The pgo_name parameter 
  64934.                                               identifies a principal. 
  64935.  
  64936.                              sec_rgy_domain_group The pgo_name parameter 
  64937.                                               identifies a group. 
  64938.  
  64939.                              sec_rgy_domain_org The pgo_name parameter 
  64940.                                               identifies an organization. 
  64941.  
  64942.           pgo_name      A character string containing the name of the PGO item 
  64943.                         in question. 
  64944.  
  64945.           Output 
  64946.  
  64947.           item_id       A pointer to the signed32 parameter to receive the 
  64948.                         returned UNIX number for the PGO item. 
  64949.  
  64950.           status        A pointer to the completion status.  On successful 
  64951.                         completion, the routine returns error_status_ok. 
  64952.                         Otherwise, it returns one of the following errors: 
  64953.  
  64954.                              sec_rgy_object_not_found No item with the 
  64955.                                                    specified UUID could be 
  64956.                                                    found. 
  64957.  
  64958.                              sec_rgy_server_unavailable The DCE Registry Server 
  64959.                                                    is unavailable. 
  64960.  
  64961.  Usage 
  64962.  
  64963.           The sec_rgy_pgo_name_to_unix_num routine returns the UNIX number for 
  64964.           the person, group, or organization (PGO) item that has the specified 
  64965.           name. 
  64966.  
  64967.  Related Information 
  64968.  
  64969.           Routines: sec_rgy_pgo_add 
  64970.           sec_rgy_pgo_get_by_id 
  64971.           sec_rgy_pgo_get_by_name 
  64972.           sec_rgy_pgo_get_by_unix_num 
  64973.           sec_rgy_pgo_id_to_name 
  64974.           sec_rgy_pgo_name_to_id 
  64975.           sec_rgy_pgo_unix_num_to_id 
  64976.           sec_rgy_site_open 
  64977.  
  64978.  
  64979. ΓòÉΓòÉΓòÉ 8.9.35. sec_rgy_pgo_rename ΓòÉΓòÉΓòÉ
  64980.  
  64981.  Purpose 
  64982.  
  64983.           Changes the name of a principal, group, or organization (PGO) item in 
  64984.           the registry database. 
  64985.  
  64986.  Library 
  64987.  
  64988.           \lib\dceos2.lib 
  64989.  
  64990.  Format 
  64991.  
  64992.                     #include <dce/pgo.h>
  64993.  
  64994.                     void sec_rgy_pgo_rename(
  64995.                             sec_rgy_handle_t  context,
  64996.                             sec_rgy_domain_t  name_domain,
  64997.                             sec_rgy_name_t  old_name,
  64998.                             sec_rgy_name_t  new_name,
  64999.                             error_status_t  *status);
  65000.  
  65001.  Parameters 
  65002.  
  65003.           Input 
  65004.  
  65005.           context       An opaque handle bound to a registry server. Use 
  65006.                         sec_rgy_site_open to acquire a bound handle. 
  65007.  
  65008.           name_domain   This parameter identifies the type of the PGO item 
  65009.                         identified by the given name.  The valid values are: 
  65010.  
  65011.                              sec_rgy_domain_person The name identifies a 
  65012.                                               principal. 
  65013.  
  65014.                              sec_rgy_domain_group The name identifies a group. 
  65015.  
  65016.                              sec_rgy_domain_org The name identifies an 
  65017.                                               organization. 
  65018.  
  65019.           old_name      A pointer to a sec_rgy_name_t character string 
  65020.                         containing the existing name of the PGO item. 
  65021.  
  65022.           new_name      A pointer to a sec_rgy_name_t character string 
  65023.                         containing the new name for the PGO item. 
  65024.  
  65025.           Output 
  65026.  
  65027.           status        A pointer to the completion status.  On successful 
  65028.                         completion, the routine returns error_status_ok. 
  65029.                         Otherwise, it returns one of the following errors: 
  65030.  
  65031.                              sec_rgy_not_authorized The client program is not 
  65032.                                                   authorized to change the name 
  65033.                                                   of the specified PGO item. 
  65034.  
  65035.                              sec_rgy_object_not_found The registry server could 
  65036.                                                   not find the specified PGO 
  65037.                                                   item. 
  65038.  
  65039.                              sec_rgy_server_unavailable The DCE Registry Server 
  65040.                                                   is unavailable. 
  65041.  
  65042.  Usage 
  65043.  
  65044.           The sec_rgy_pgo_rename routine renames a person, group, or 
  65045.           organization (PGO) item in the registry database. 
  65046.  
  65047.  Permissions Required 
  65048.  
  65049.           If the sec_rgy_pgo_rename routine is performing a rename within a 
  65050.           directory, it requires the name (n) permission on the old name of the 
  65051.           PGO item. If the routine is performing a move between directories, it 
  65052.           requires the following permissions: 
  65053.  
  65054.             o  The delete (d) permission on the parent directory that contains 
  65055.                the PGO item 
  65056.             o  The name (n) permission on the old name of the PGO item 
  65057.             o  The insert (i) permission on the parent directory in which the 
  65058.                PGO item is to be added under the new name 
  65059.  
  65060.  Related Information 
  65061.  
  65062.           Routines: sec_rgy_pgo_add 
  65063.           sec_rgy_pgo_replace 
  65064.           sec_rgy_site_open 
  65065.  
  65066.  
  65067. ΓòÉΓòÉΓòÉ 8.9.36. sec_rgy_pgo_replace ΓòÉΓòÉΓòÉ
  65068.  
  65069.  Purpose 
  65070.  
  65071.           Replaces the data in an existing principal, group, or organization 
  65072.           (PGO) item. 
  65073.  
  65074.  Library 
  65075.  
  65076.           \lib\dceos2.lib 
  65077.  
  65078.  Format 
  65079.  
  65080.                     #include <dce/pgo.h>
  65081.  
  65082.                     void sec_rgy_pgo_replace(
  65083.                             sec_rgy_handle_t  context,
  65084.                             sec_rgy_domain_t  name_domain,
  65085.                             sec_rgy_name_t  pgo_name,
  65086.                             sec_rgy_pgo_item_t  *item,
  65087.                             error_status_t  *status);
  65088.  
  65089.  Parameters 
  65090.  
  65091.           Input 
  65092.  
  65093.           context       An opaque handle bound to a registry server.  Use 
  65094.                         sec_rgy_site_open to acquire a bound handle. 
  65095.  
  65096.           name_domain   This parameter identifies the type of the PGO item 
  65097.                         identified by the given name.  The valid values are: 
  65098.  
  65099.                              sec_rgy_domain_person The name identifies a 
  65100.                                               principal. 
  65101.  
  65102.                              sec_rgy_domain_group The name identifies a group. 
  65103.  
  65104.                              sec_rgy_domain_org The name identifies an 
  65105.                                               organization. 
  65106.  
  65107.           pgo_name      A character string (type sec_rgy_name_t) containing the 
  65108.                         name of the principal, group, or organization whose 
  65109.                         data is to be replaced. 
  65110.  
  65111.           item          A pointer to a sec_rgy_pgo_item_t structure containing 
  65112.                         the new data for the PGO item.  The data in this 
  65113.                         structure includes the PGO item's name, UUID, UNIX 
  65114.                         number (if any), and administrative data, such as 
  65115.                         whether the item, if a principal, may have a concurrent 
  65116.                         group set. 
  65117.  
  65118.           Output 
  65119.  
  65120.           status        A pointer to the completion status.  On successful 
  65121.                         completion, the routine returns error_status_ok. 
  65122.                         Otherwise, it returns one of the following errors: 
  65123.  
  65124.                              sec_rgy_not_authorized The client program is not 
  65125.                                                    authorized to replace the 
  65126.                                                    specified PGO item. 
  65127.  
  65128.                              sec_rgy_object_not_found No PGO item was found 
  65129.                                                    with the given name. 
  65130.  
  65131.                              sec_rgy_unix_id_changed The UNIX number of the PGO 
  65132.                                                    item was changed. 
  65133.  
  65134.                              sec_rgy_server_unavailable The DCE Registry Server 
  65135.                                                    is unavailable. 
  65136.  
  65137.  Usage 
  65138.  
  65139.           The sec_rgy_pgo_replace routine replaces the data associated with a 
  65140.           principal, group, or organization (PGO) item in the registry 
  65141.           database. 
  65142.  
  65143.           The UNIX ID and UUID of a PGO item cannot be replaced.  To change the 
  65144.           UNIX ID or UUID, the existing PGO item must be deleted and a new PGO 
  65145.           item added in its place. The one exception to this rule is that the 
  65146.           UNIX ID can be replaced in the PGO item for a cell principal.  The 
  65147.           reason for this exception is that the UUID for a cell principal does 
  65148.           not contain an embedded UNIX ID. 
  65149.  
  65150.  Permissions Required 
  65151.  
  65152.           The sec_rgy_pgo_replace routine requires at least one of the 
  65153.           following permissions: 
  65154.  
  65155.             o  The mgmt_info (m) permission on the PGO item, if quota or flags 
  65156.                is being set. 
  65157.             o  The fullname (f) permission on the PGO item, if fullname is 
  65158.                being set. 
  65159.  
  65160.  Related Information 
  65161.  
  65162.           Routines: sec_rgy_pgo_add 
  65163.           sec_rgy_pgo_delete 
  65164.           sec_rgy_pgo_rename 
  65165.           sec_rgy_site_open 
  65166.  
  65167.  
  65168. ΓòÉΓòÉΓòÉ 8.9.37. sec_rgy_pgo_unix_num_to_id ΓòÉΓòÉΓòÉ
  65169.  
  65170.  Purpose 
  65171.  
  65172.           Returns the universal unique identifier (UUID) for a principal, 
  65173.           group, or organization (PGO) item identified by its UNIX number. 
  65174.  
  65175.  Library 
  65176.  
  65177.           \lib\dceos2.lib 
  65178.  
  65179.  Format 
  65180.  
  65181.                     #include <dce/pgo.h>
  65182.  
  65183.                     void sec_rgy_pgo_unix_num_to_id(
  65184.                             sec_rgy_handle_t  context,
  65185.                             sec_rgy_domain_t  name_domain,
  65186.                             signed32  item_unix_id,
  65187.                             uuid_t  *item_id,
  65188.                             error_status_t  *status);
  65189.  
  65190.  Parameters 
  65191.  
  65192.           Input 
  65193.  
  65194.           context       An opaque handle bound to a registry server.  Use 
  65195.                         sec_rgy_site_open to acquire a bound handle. 
  65196.  
  65197.           name_domain   This parameter identifies the type of the PGO item 
  65198.                         identified by the given name.  The valid values are: 
  65199.  
  65200.                              sec_rgy_domain_person The item_unix_id parameter 
  65201.                                                  identifies a principal. 
  65202.  
  65203.                              sec_rgy_domain_group The item_unix_id parameter 
  65204.                                                  identifies a group. 
  65205.  
  65206.                              sec_rgy_domain_org  The item_unix_id parameter 
  65207.                                                  identifies an organization. 
  65208.  
  65209.           item_unix_id  The signed32 parameter containing the UNIX number for 
  65210.                         the PGO item. 
  65211.  
  65212.           Output 
  65213.  
  65214.           item_id       A pointer to the uuid_t parameter containing the UUID 
  65215.                         of the resulting PGO item. 
  65216.  
  65217.           status        A pointer to the completion status.  On successful 
  65218.                         completion, the routine returns error_status_ok. 
  65219.                         Otherwise, it returns one of the following errors: 
  65220.  
  65221.                              sec_rgy_object_not_found No item with the 
  65222.                                                    specified UNIX number could 
  65223.                                                    be found. 
  65224.  
  65225.                              sec_rgy_server_unavailable The DCE Registry Server 
  65226.                                                    is unavailable. 
  65227.  
  65228.  Usage 
  65229.  
  65230.           The sec_rgy_pgo_unix_num_to_id routine returns the UUID for a PGO 
  65231.           item that has the specified UNIX number. 
  65232.  
  65233.  Related Information 
  65234.  
  65235.           Routines: sec_rgy_pgo_add 
  65236.           sec_rgy_pgo_get_by_id 
  65237.           sec_rgy_pgo_get_by_name 
  65238.           sec_rgy_pgo_get_by_unix_num 
  65239.           sec_rgy_pgo_id_to_name 
  65240.           sec_rgy_pgo_id_to_unix_num 
  65241.           sec_rgy_pgo_name_to_id 
  65242.           sec_rgy_site_open 
  65243.  
  65244.  
  65245. ΓòÉΓòÉΓòÉ 8.9.38. sec_rgy_pgo_unix_num_to_name ΓòÉΓòÉΓòÉ
  65246.  
  65247.  Purpose 
  65248.  
  65249.           Returns the name for a principal, group, or organization (PGO) item 
  65250.           identified by its UNIX number. 
  65251.  
  65252.  Library 
  65253.  
  65254.           \lib\dceos2.lib 
  65255.  
  65256.  Format 
  65257.  
  65258.                     #include <dce/pgo.h>
  65259.  
  65260.                     void sec_rgy_pgo_unix_num_to_name(
  65261.                             sec_rgy_handle_t  context,
  65262.                             sec_rgy_domain_t  name_domain,
  65263.                             signed32  item_id,
  65264.                             sec_rgy_name_t  pgo_name,
  65265.                             error_status_t  *status);
  65266.  
  65267.  Parameters 
  65268.  
  65269.           Input 
  65270.  
  65271.           context       An opaque handle bound to a registry server. Use 
  65272.                         sec_rgy_site_open to acquire a bound handle. 
  65273.  
  65274.           name_domain   The type of the PGO item identified by item_id. Valid 
  65275.                         values are: 
  65276.  
  65277.                              sec_rgy_domain_person The item_id parameter 
  65278.                                               identifies a principal. 
  65279.                              sec_rgy_domain_group The item_id parameter 
  65280.                                               identifies a group. 
  65281.                              sec_rgy_domain_org The item_id parameter 
  65282.                                               identifies an organization. 
  65283.  
  65284.           item_id       The UNIX number for the PGO item. 
  65285.  
  65286.           Output 
  65287.  
  65288.           pgo_name      A character string that contains the name of the PGO 
  65289.                         item in question. 
  65290.  
  65291.           status        A pointer to the completion status.  On successful 
  65292.                         completion, the routine returns error_status_ok. 
  65293.                         Otherwise, it returns one of the following errors: 
  65294.  
  65295.                              sec_rgy_object_not_found No item with the 
  65296.                                                    specified UNIX number could 
  65297.                                                    be found. 
  65298.  
  65299.                              sec_rgy_server_unavailable The DCE Registry Server 
  65300.                                                    is unavailable. 
  65301.  
  65302.  Usage 
  65303.  
  65304.           The sec_rgy_pgo_unix_num_to_name routine returns the name for a PGO 
  65305.           item that has the specified UNIX number. 
  65306.  
  65307.  Permissions Required 
  65308.  
  65309.           The sec_rgy_pgo_unix_num_to_name routine requires at least one 
  65310.           permission of any kind on the PGO item identified by item_id. 
  65311.  
  65312.  Related Information 
  65313.  
  65314.           Routines: sec_rgy_pgo_add 
  65315.           sec_rgy_pgo_get_by_id 
  65316.           sec_rgy_pgo_get_by_name 
  65317.           sec_rgy_pgo_get_by_unix_num 
  65318.           sec_rgy_pgo_id_to_name 
  65319.           sec_rgy_pgo_id_to_unix_num 
  65320.           sec_rgy_pgo_name_to_id 
  65321.           sec_rgy_site_open 
  65322.  
  65323.  
  65324. ΓòÉΓòÉΓòÉ 8.9.39. sec_rgy_plcy_get_effective ΓòÉΓòÉΓòÉ
  65325.  
  65326.  Purpose 
  65327.  
  65328.           Returns the effective policy for an organization. 
  65329.  
  65330.  Library 
  65331.  
  65332.           \lib\dceos2.lib 
  65333.  
  65334.  Format 
  65335.  
  65336.                     #include <dce/policy.h>
  65337.  
  65338.                     void sec_rgy_plcy_get_effective(
  65339.                             sec_rgy_handle_t  context,
  65340.                             sec_rgy_name_t  organization,
  65341.                             sec_rgy_plcy_t  *policy_data,
  65342.                             error_status_t  *status);
  65343.  
  65344.  Parameters 
  65345.  
  65346.           Input 
  65347.  
  65348.           context       An opaque handle bound to a registry server. Use 
  65349.                         sec_rgy_site_open to acquire a bound handle. 
  65350.  
  65351.           organization  A character string (type sec_rgy_name_t) that contains 
  65352.                         the name of the organization for which the policy data 
  65353.                         is to be returned. If this string is empty, the routine 
  65354.                         returns the registry's policy data. 
  65355.  
  65356.           Output 
  65357.  
  65358.           policy_data   A pointer to the sec_rgy_plcy_t structure to receive 
  65359.                         the authentication policy.  This structure contains the 
  65360.                         minimum length of a user's password, the lifetime of a 
  65361.                         password, the expiration date of a password, the 
  65362.                         lifetime of the entire account, and some flags 
  65363.                         describing limitations on the password spelling. 
  65364.  
  65365.           status        A pointer to the completion status.  On successful 
  65366.                         completion, the routine returns error_status_ok. 
  65367.                         Otherwise, it returns one of the following errors: 
  65368.  
  65369.                              sec_rgy_object_not_found The registry server could 
  65370.                                                    not find the specified 
  65371.                                                    organization. 
  65372.  
  65373.                              sec_rgy_server_unavailable The DCE Registry Server 
  65374.                                                    is unavailable. 
  65375.  
  65376.  Usage 
  65377.  
  65378.           The sec_rgy_plcy_get_effective routine returns the effective policy 
  65379.           for the specified organization. 
  65380.  
  65381.           The effective policy data is the most restrictive combination of the 
  65382.           registry and the organization policies. 
  65383.  
  65384.           The policy data consists of: 
  65385.  
  65386.             o  The password expiration date. This is the date when account 
  65387.                passwords expire. 
  65388.             o  The minimum length allowed for account passwords. 
  65389.             o  The period of time (life span) account passwords are valid. 
  65390.             o  The period of time (life span) accounts are valid. 
  65391.             o  Flags indicating whether account passwords can consist entirely 
  65392.                of spaces or entirely of alphanumeric characters. 
  65393.  
  65394.  Permissions Required 
  65395.  
  65396.           The sec_rgy_plcy_get_effective routine requires the r (read) 
  65397.           permission on the policy object from which the data is to be 
  65398.           returned.  If an organization is specified, the routine also requires 
  65399.           the r (read) permission on the organization. 
  65400.  
  65401.  Notes 
  65402.  
  65403.           If no organization is specified, the routine returns the registry's 
  65404.           policy data. To return the effective policy, an organization must be 
  65405.           specified. This is because the routine compares the registry's policy 
  65406.           data with that of the organization to determine which is more 
  65407.           restrictive. 
  65408.  
  65409.  Related Information 
  65410.  
  65411.           Routines: 
  65412.           sec_rgy_plcy_get_info 
  65413.           sec_rgy_plcy_set_info 
  65414.           sec_rgy_site_open 
  65415.  
  65416.  
  65417. ΓòÉΓòÉΓòÉ 8.9.40. sec_rgy_plcy_get_info ΓòÉΓòÉΓòÉ
  65418.  
  65419.  Purpose 
  65420.  
  65421.           Returns the policy for an organization. 
  65422.  
  65423.  Library 
  65424.  
  65425.           \lib\dceos2.lib 
  65426.  
  65427.  Format 
  65428.  
  65429.                     #include <dce/policy.h>
  65430.  
  65431.                     void sec_rgy_plcy_get_info(
  65432.                             sec_rgy_handle_t  context,
  65433.                             sec_rgy_name_t  organization,
  65434.                             sec_rgy_plcy_t  *policy_data,
  65435.                             error_status_t  *status);
  65436.  
  65437.  Parameters 
  65438.  
  65439.           Input 
  65440.  
  65441.           context       An opaque handle bound to a registry server. Use 
  65442.                         sec_rgy_site_open to acquire a bound handle. 
  65443.  
  65444.           organization  A character string (type sec_rgy_name_t) that contains 
  65445.                         the name of the organization for which the policy data 
  65446.                         is to be returned. If this string is empty, the routine 
  65447.                         returns the registry's policy data. 
  65448.  
  65449.           Output 
  65450.  
  65451.           policy_data   A pointer to the sec_rgy_plcy_t structure to receive 
  65452.                         the authentication policy.  This structure contains the 
  65453.                         minimum length of a user's password, the lifetime of a 
  65454.                         password, the expiration date of a password, the 
  65455.                         lifetime of the entire account, and some flags 
  65456.                         describing limitations on the password spelling. 
  65457.  
  65458.           status        A pointer to the completion status. On successful 
  65459.                         completion, the routine returns error_status_ok. 
  65460.                         Otherwise, it returns one of the following errors: 
  65461.  
  65462.                              sec_rgy_object_not_found Either the registry 
  65463.                                                    server could not find the 
  65464.                                                    specified organization, or 
  65465.                                                    the organization exists but 
  65466.                                                    does not have its own 
  65467.                                                    policy. 
  65468.  
  65469.                              sec_rgy_server_unavailable The DCE Registry Server 
  65470.                                                    is unavailable. 
  65471.  
  65472.  Usage 
  65473.  
  65474.           The sec_rgy_plcy_get_info routine returns the policy data for the 
  65475.           specified organization.  If no organization is specified, the 
  65476.           registry's policy data is returned. 
  65477.  
  65478.           The policy data consists of: 
  65479.  
  65480.             o  The password expiration date. This is the date when account 
  65481.                passwords expire. 
  65482.             o  The minimum length allowed for account passwords. 
  65483.             o  The period of time (life span) account passwords are valid. 
  65484.             o  The period of time (life span) accounts are valid. 
  65485.             o  Flags indicating whether account passwords can consist entirely 
  65486.                of spaces or entirely of alphanumeric characters. 
  65487.  
  65488.  Permissions Required 
  65489.  
  65490.           The sec_rgy_plcy_get_info routine requires the read (r) permission on 
  65491.           the policy object or organization from which the data is to be 
  65492.           returned. 
  65493.  
  65494.  Notes 
  65495.  
  65496.           The returned policy may not be in effect if the overriding registry 
  65497.           authorization policy is more restrictive. See 
  65498.           sec_rgy_auth_plcy_get_effective. 
  65499.  
  65500.  Related Information 
  65501.  
  65502.           Routines: 
  65503.           sec_rgy_plcy_get_effective 
  65504.           sec_rgy_plcy_set_info 
  65505.           sec_rgy_site_open 
  65506.  
  65507.  
  65508. ΓòÉΓòÉΓòÉ 8.9.41. sec_rgy_plcy_get_override_info ΓòÉΓòÉΓòÉ
  65509.  
  65510.  Purpose 
  65511.  
  65512.           Collects the information to be overridden from the policy. 
  65513.  
  65514.  Format 
  65515.  
  65516.                     #include <dce\policy.h>
  65517.  
  65518.                     void sec_rgy_plcy_get_override_info(
  65519.                             sec_rgy_handle_t  context,
  65520.                             sec_rgy_name_t  policy_category,
  65521.                             boolean32  *exclude_passwd,
  65522.                             boolean32  *root_passwd,
  65523.                             boolean32  *other_passwd,
  65524.                             boolean32  *custom_data,
  65525.                             error_status_t  *status);
  65526.  
  65527.  Parameters 
  65528.  
  65529.           Input 
  65530.  
  65531.           context       An opaque handle bound to a registry server. Use 
  65532.                         sec_rgy_site_open to acquire a bound handle. 
  65533.  
  65534.           policy_category A charcater string containing the name of the 
  65535.                         category of the policy data. 
  65536.  
  65537.           Input 
  65538.  
  65539.           exclude_passwd A pointer to the exclude password. 
  65540.  
  65541.           root_passwd   A pointer to the root password. 
  65542.  
  65543.           other_passwd  A pointer to other passwords. 
  65544.  
  65545.           custom_data   A pointer to custom data. 
  65546.  
  65547.           status        A pointer to the completion status.  On successful 
  65548.                         completion, the routine returns error_status_ok. 
  65549.                         Otherwise, it returns an error. 
  65550.  
  65551.  Usage 
  65552.  
  65553.           The sec_rgy_plcy_get_override_info routine collects information from 
  65554.           the policy that will be overridden if their respective flags are set 
  65555.           to true. 
  65556.  
  65557.  Related Information 
  65558.  
  65559.           Routines: sec_rgy_plcy_set_override_info 
  65560.           sec_rgy_site_open 
  65561.  
  65562.           Files: 
  65563.           \usr\include\dce\policy.idl - The idl file from which dce\policy.h 
  65564.           was derived. 
  65565.  
  65566.  
  65567. ΓòÉΓòÉΓòÉ 8.9.42. sec_rgy_plcy_set_info ΓòÉΓòÉΓòÉ
  65568.  
  65569.  Purpose 
  65570.  
  65571.           Sets the policy for an organization. 
  65572.  
  65573.  Library 
  65574.  
  65575.           \lib\dceos2.lib 
  65576.  
  65577.  Format 
  65578.  
  65579.                     #include <dce/policy.h>
  65580.  
  65581.                     void sec_rgy_plcy_set_info(
  65582.                             sec_rgy_handle_t  context,
  65583.                             sec_rgy_name_t  organization,
  65584.                             sec_rgy_plcy_t  *policy_data,
  65585.                             error_status_t  *status);
  65586.  
  65587.  Parameters 
  65588.  
  65589.           Input 
  65590.  
  65591.           context       An opaque handle bound to a registry server.  Use 
  65592.                         sec_rgy_site_open to acquire a bound handle. 
  65593.  
  65594.           organization  A character string (type sec_rgy_name_t) that contains 
  65595.                         the name of the organization for which the policy data 
  65596.                         is to be returned. If this string is empty, the routine 
  65597.                         sets the registry's policy data. 
  65598.  
  65599.           policy_data   A pointer to the sec_rgy_plcy_t structure that contains 
  65600.                         the authentication policy.  This structure contains the 
  65601.                         minimum length of a user's password, the lifetime of a 
  65602.                         password, the expiration date of a password, the 
  65603.                         lifetime of the entire account, and some flags 
  65604.                         describing limitations on the password spelling. 
  65605.  
  65606.           Output 
  65607.  
  65608.           status        A pointer to the completion status.  On successful 
  65609.                         completion, the routine returns error_status_ok. 
  65610.                         Otherwise, it returns one of the following errors: 
  65611.  
  65612.                              sec_rgy_not_authorized The user is not authorized 
  65613.                                                    to perform this operation. 
  65614.  
  65615.                              sec_rgy_object_not_found The registry server could 
  65616.                                                    not find the specified 
  65617.                                                    organization. 
  65618.  
  65619.                              sec_rgy_server_unavailable The DCE Registry Server 
  65620.                                                    is unavailable. 
  65621.  
  65622.  Usage 
  65623.  
  65624.           The sec_rgy_plcy_set_info routine sets the authentication policy for 
  65625.           a specified organization.  If no organization is specified, the 
  65626.           registry's policy data is set. 
  65627.  
  65628.           Policy data can be returned or set for individual organizations and 
  65629.           for the registry as a whole. 
  65630.  
  65631.  Permissions Required 
  65632.  
  65633.           The sec_rgy_plcy_set_info routine requires the m (mgmt_info) 
  65634.           permission on the policy object or organization for which the data is 
  65635.           to be set. 
  65636.  
  65637.  Notes 
  65638.  
  65639.           The policy set on an account can be less restrictive than the policy 
  65640.           set for the registry as a whole.  In this case, the changes in policy 
  65641.           have no effect, because the effective policy is the most restrictive 
  65642.           combination of the organization and registry authentication policies. 
  65643.           See sec_rgy_auth_plcy_get_effective. 
  65644.  
  65645.  Related Information 
  65646.  
  65647.           Routines: sec_rgy_plcy_get_effective 
  65648.           sec_rgy_plcy_get_info 
  65649.           sec_rgy_site_open 
  65650.  
  65651.  
  65652. ΓòÉΓòÉΓòÉ 8.9.43. sec_rgy_plcy_set_override_info ΓòÉΓòÉΓòÉ
  65653.  
  65654.  Purpose 
  65655.  
  65656.           Writes the information collected by sec_rgy_plcy_get_override_info. 
  65657.  
  65658.  Format 
  65659.  
  65660.                     #include <dce\policy.h>
  65661.  
  65662.                     void sec_rgy_plcy_set_override_info(
  65663.                             sec_rgy_handle_t  context,
  65664.                             sec_rgy_name_t  policy_category,
  65665.                             boolean32  *exclude_passwd,
  65666.                             boolean32  *root_passwd,
  65667.                             boolean32  *other_passwd,
  65668.                             boolean32  *custom_data,
  65669.                             error_status_t  *status);
  65670.  
  65671.  Parameters 
  65672.  
  65673.           Input 
  65674.  
  65675.           context       An opaque handle bound to a registry server. Use 
  65676.                         sec_rgy_site_open to acquire a bound handle. 
  65677.  
  65678.           policy_category A character string containing the name of the 
  65679.                         category of the policy data. 
  65680.  
  65681.           exclude_passwd A pointer to the exclude password. 
  65682.  
  65683.           root_passwd   A pointer to the root password. 
  65684.  
  65685.           other_passwd  A pointer to other passwords. 
  65686.  
  65687.           custom_data   A pointer to custom data. 
  65688.  
  65689.           Output 
  65690.  
  65691.           status        A pointer to the completion status.  On successful 
  65692.                         completion, the routine returns error_status_ok. 
  65693.                         Otherwise, it returns an error. 
  65694.  
  65695.  Usage 
  65696.  
  65697.           The sec_rgy_plcy_set_override_info routine writes the information 
  65698.           collected by the sec_rgy_plcy_get_override_info routine. 
  65699.  
  65700.  Related Information 
  65701.  
  65702.           Routines: 
  65703.           sec_rgy_plcy_get_override_info 
  65704.           Files: 
  65705.           \usr\include\dce\policy.idl - The idl file from which dce\policy.h 
  65706.           was derived. 
  65707.  
  65708.  
  65709. ΓòÉΓòÉΓòÉ 8.9.44. sec_rgy_properties_get_info ΓòÉΓòÉΓòÉ
  65710.  
  65711.  Purpose 
  65712.  
  65713.           Returns registry properties. 
  65714.  
  65715.  Library 
  65716.  
  65717.           \lib\dceos2.lib 
  65718.  
  65719.  Format 
  65720.  
  65721.                     #include <dce/policy.h>
  65722.  
  65723.                     void sec_rgy_properties_get_info(
  65724.                             sec_rgy_handle_t  context,
  65725.                             sec_rgy_properties_t  *properties,
  65726.                             error_status_t  *status);
  65727.  
  65728.  Parameters 
  65729.  
  65730.           Input 
  65731.  
  65732.           context       An opaque handle bound to a registry server. Use 
  65733.                         sec_rgy_site_open to acquire a bound handle. 
  65734.  
  65735.           Output 
  65736.  
  65737.           properties    A pointer to a sec_rgy_properties_t structure to 
  65738.                         receive the returned property information. Registry 
  65739.                         property information contains information such as the 
  65740.                         default and minimum lifetime and other restrictions on 
  65741.                         privilege attribute certificates. 
  65742.  
  65743.           status        A pointer to the completion status. On successful 
  65744.                         completion, the routine returns error_status_ok. 
  65745.                         Otherwise, it returns sec_rgy_server_unavailable, which 
  65746.                         indicates that the DCE Registry Server is unavailable. 
  65747.  
  65748.  Usage 
  65749.  
  65750.           The sec_rgy_properties_get_info routine returns a list of the 
  65751.           registry properties. 
  65752.  
  65753.           The property information consists of the following: 
  65754.  
  65755.           read_version      A stamp that specifies the earliest version of the 
  65756.                             registry server software that can read from this 
  65757.                             registry. 
  65758.  
  65759.           write_version     A stamp that specifies the earliest version of the 
  65760.                             registry server software that can write to this 
  65761.                             registry. 
  65762.  
  65763.           minimum_ticket_lifetime The minimum period of time for which an 
  65764.                             authentication ticket remains valid. 
  65765.  
  65766.           default_certificate_lifetime The default period of time for which an 
  65767.                             authentication certificate (ticket-granting ticket) 
  65768.                             remains valid.  A process can request an 
  65769.                             authentication certificate with a longer lifetime. 
  65770.                             Note that the maximum lifetime for an 
  65771.                             authentication certificate cannot exceed the 
  65772.                             lifetime established by the effective policy for 
  65773.                             the requesting account. 
  65774.  
  65775.           low_unix_id_person The lowest UNIX ID that can be assigned to a 
  65776.                             principal in the registry. 
  65777.  
  65778.           low_unix_id_group The lowest UNIX ID that can be assigned to a group 
  65779.                             in the registry. 
  65780.  
  65781.           low_unix_id_org   The lowest UNIX ID that can be assigned to an 
  65782.                             organization in the registry. 
  65783.  
  65784.           max_unix_id       The maximum UNIX ID that can be used for any item 
  65785.                             in the registry. 
  65786.  
  65787.           realm             A character string naming the cell controlled by 
  65788.                             this registry. 
  65789.  
  65790.           realm_uuid        The UUID of the cell controlled by this registry. 
  65791.  
  65792.           flags             Flags indicating the following: 
  65793.  
  65794.                                  sec_rgy_prop_readonly If TRUE, the registry 
  65795.                                                database is read-only. 
  65796.  
  65797.                                  sec_rgy_prop_auth_cert_unbound If TRUE, 
  65798.                                                privilege attribute certificates 
  65799.                                                can be generated for use at any 
  65800.                                                site. 
  65801.  
  65802.                                  sec_rgy_prop_shadow_password If FALSE, 
  65803.                                                passwords can be distributed 
  65804.                                                over the network. If this flag 
  65805.                                                is TRUE, passwords are stripped 
  65806.                                                from the data returned to the 
  65807.                                                sec_rgy_acct_lookup routine, and 
  65808.                                                other routines that return an 
  65809.                                                account's encoded password. 
  65810.  
  65811.                                  sec_rgy_prop_embedded_unix_id All registry 
  65812.                                                UUIDs contain embedded UNIX IDs. 
  65813.                                                This implies that the UNIX ID of 
  65814.                                                any registry object cannot be 
  65815.                                                changed, because UUIDs are 
  65816.                                                immutable. 
  65817.  
  65818.  Permissions Required 
  65819.  
  65820.           The sec_rgy_properties_get_info routine requires the read (r) 
  65821.           permission on the policy object from which the property information 
  65822.           is to be returned. 
  65823.  
  65824.  Related Information 
  65825.  
  65826.           Routines: sec_rgy_properties_set_info 
  65827.  
  65828.  
  65829. ΓòÉΓòÉΓòÉ 8.9.45. sec_rgy_properties_set_info ΓòÉΓòÉΓòÉ
  65830.  
  65831.  Purpose 
  65832.  
  65833.           Sets registry properties. 
  65834.  
  65835.  Library 
  65836.  
  65837.           \lib\dceos2.lib 
  65838.  
  65839.  Format 
  65840.  
  65841.                     #include <dce/policy.h>
  65842.  
  65843.                     void sec_rgy_properties_set_info(
  65844.                             sec_rgy_handle_t  context,
  65845.                             sec_rgy_properties_t  *properties,
  65846.                             error_status_t  *status);
  65847.  
  65848.  Parameters 
  65849.  
  65850.           Input 
  65851.  
  65852.           context       An opaque handle bound to a registry server.  Use 
  65853.                         sec_rgy_site_open to acquire a bound handle. 
  65854.  
  65855.           properties    A pointer to a sec_rgy_properties_t structure that 
  65856.                         contains the registry property information to be set. 
  65857.                         Registry property information contains information such 
  65858.                         as the default and minimum lifetime and other 
  65859.                         restrictions on privilege attribute certificates, and 
  65860.                         the realm authentication name. 
  65861.  
  65862.           Output 
  65863.  
  65864.           status        A pointer to the completion status.  On successful 
  65865.                         completion, the routine returns error_status_ok. 
  65866.                         Otherwise, it returns one of the following errors: 
  65867.  
  65868.                              sec_rgy_not_authorized The user is not authorized 
  65869.                                                    to change the registry 
  65870.                                                    properties. 
  65871.  
  65872.                              sec_rgy_server_unavailable The DCE Registry Server 
  65873.                                                    is unavailable. 
  65874.  
  65875.  Usage 
  65876.  
  65877.           The sec_rgy_properties_set_info routine sets the registry properties. 
  65878.           The property information consists of the following: 
  65879.  
  65880.           read_version      A stamp that specifies the earliest version of the 
  65881.                             registry server software that can read from this 
  65882.                             registry. 
  65883.  
  65884.           write_version     A stamp that specifies the earliest version of the 
  65885.                             registry server software that can write to this 
  65886.                             registry. 
  65887.  
  65888.           minimum_ticket_lifetime The minimum period of time an authentication 
  65889.                             ticket remains valid. 
  65890.  
  65891.           default_certificate_lifetime The default period of time an 
  65892.                             authentication certificate (ticket-granting ticket) 
  65893.                             remains valid.  A process can request an 
  65894.                             authentication certificate with a longer lifetime. 
  65895.                             Note that the maximum lifetime for an 
  65896.                             authentication certificate cannot exceed the 
  65897.                             lifetime established by the effective policy for 
  65898.                             the requesting account. 
  65899.  
  65900.           low_unix_id_person The lowest UNIX ID that can be assigned to a 
  65901.                             principal in the registry. 
  65902.  
  65903.           low_unix_id_group The lowest UNIX ID that can be assigned to a group 
  65904.                             in the registry. 
  65905.  
  65906.           low_unix_id_org   The lowest UNIX ID that can be assigned to an 
  65907.                             organization in the registry. 
  65908.  
  65909.           max_unix_id       The maximum UNIX ID that can be used for any item 
  65910.                             in the registry. 
  65911.  
  65912.           realm             A character string naming the cell controlled by 
  65913.                             this registry. 
  65914.  
  65915.           realm_uuid        The UUID of the cell controlled by this registry. 
  65916.  
  65917.           flags             Flags indicating whether: 
  65918.  
  65919.                                  sec_rgy_prop_readonly If TRUE, the registry 
  65920.                                                database is read-only. 
  65921.  
  65922.                                  sec_rgy_prop_auth_cert_unbound If TRUE, 
  65923.                                                privilege attribute certificates 
  65924.                                                can be generated for use at any 
  65925.                                                site. 
  65926.  
  65927.                                  sec_rgy_prop_shadow_password If this flag is 
  65928.                                                TRUE, passwords are stripped 
  65929.                                                from the data returned to the 
  65930.                                                sec_rgy_acct_lookup routine, and 
  65931.                                                other routines that return an 
  65932.                                                account's encoded password. If 
  65933.                                                FALSE, passwords can be 
  65934.                                                distributed over the network. 
  65935.  
  65936.                                  sec_rgy_prop_embedded_unix_id All registry 
  65937.                                                UUIDs contain embedded UNIX IDs. 
  65938.                                                This implies that the UNIX ID of 
  65939.                                                any registry object cannot be 
  65940.                                                changed, since UUIDs are 
  65941.                                                immutable. 
  65942.  
  65943.  Permissions Required 
  65944.  
  65945.           The sec_rgy_properties_set_info routine requires the mgmt_info (m) 
  65946.           permission on the policy object for which the property information is 
  65947.           to be set. 
  65948.  
  65949.  Related Information 
  65950.  
  65951.           Routines: 
  65952.           sec_rgy_properties_get_info 
  65953.  
  65954.  
  65955. ΓòÉΓòÉΓòÉ 8.9.46. sec_rgy_rep_admin_become_master ΓòÉΓòÉΓòÉ
  65956.  
  65957.  Purpose 
  65958.  
  65959.           Converts a slave replica into a master replica. 
  65960.  
  65961.  Format 
  65962.  
  65963.                     #include <dce/repadm.h>
  65964.  
  65965.                     void sec_rgy_rep_admin_become_master(
  65966.                             sec_rgy_handle_t  context,
  65967.                             error_status_t  *status);
  65968.  
  65969.  Parameters 
  65970.  
  65971.           Input 
  65972.  
  65973.           context       An opaque handle bound to the registry server. Use the 
  65974.                         sec_rgy_site_open routine to acquire a bound handle. 
  65975.  
  65976.           Output 
  65977.  
  65978.           status        A pointer to the completion status. On successful 
  65979.                         completion, the routine returns error_status_ok. 
  65980.  
  65981.  Usage 
  65982.  
  65983.           The sec_rgy_rep_admin_become_master routine is a drastic operation 
  65984.           used to make the slave replica become the master replica because the 
  65985.           master replica died. Normally the sec_rgy_rep_admin_change_master 
  65986.           routine is used to designate a new master. 
  65987.  
  65988.  Related Information 
  65989.  
  65990.           Routines: sec_rgy_rep_admin_change_master 
  65991.           sec_rgy_site_open 
  65992.  
  65993.           Files: 
  65994.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  65995.           was derived. 
  65996.  
  65997.  
  65998. ΓòÉΓòÉΓòÉ 8.9.47. sec_rgy_rep_admin_become_slave ΓòÉΓòÉΓòÉ
  65999.  
  66000.  Purpose 
  66001.  
  66002.           Converts a master replica into a slave replica. 
  66003.  
  66004.  Format 
  66005.  
  66006.                     #include <dce/repadm.h>
  66007.  
  66008.                     void sec_rgy_rep_admin_become_slave(
  66009.                             sec_rgy_handle_t  context,
  66010.                             error_status_t  *status);
  66011.  
  66012.  Parameters 
  66013.  
  66014.           Input 
  66015.  
  66016.           context       An opaque handle bound to the registry server. 
  66017.  
  66018.           Output 
  66019.  
  66020.           status        A pointer to the completion status. On successful 
  66021.                         completion, the routine returns error_status_ok. 
  66022.  
  66023.  Usage 
  66024.  
  66025.           The sec_rgy_rep_admin_become_slave routine converts the master 
  66026.           replica into a slave replica. 
  66027.  
  66028.  Related Information 
  66029.  
  66030.           Files: 
  66031.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66032.           was derived. 
  66033.  
  66034.  
  66035. ΓòÉΓòÉΓòÉ 8.9.48. sec_rgy_rep_admin_change_master ΓòÉΓòÉΓòÉ
  66036.  
  66037.  Purpose 
  66038.  
  66039.           Changes the master replica to a different master replica. 
  66040.  
  66041.  Format 
  66042.  
  66043.                     #include <dce/repadm.h>
  66044.  
  66045.                     void sec_rgy_rep_admin_change_master(
  66046.                             sec_rgy_handle_t  context,
  66047.                             uuid_p_t new_master_id,
  66048.                             error_status_t  *status);
  66049.  
  66050.  Parameters 
  66051.  
  66052.           Input 
  66053.  
  66054.           context       An opaque handle bound to the registry server. 
  66055.  
  66056.           new_master_id The UUID of the new master replica. 
  66057.  
  66058.           Output 
  66059.  
  66060.           status        A pointer to the completion status. On successful 
  66061.                         completion, the routine returns error_status_ok. 
  66062.  
  66063.  Usage 
  66064.  
  66065.           The sec_rgy_rep_admin_change_master routine changes the master 
  66066.           replica to new_master_id. The original master replica passes its 
  66067.           replica list state and the propagation queue to the new master. 
  66068.  
  66069.  Related Information 
  66070.  
  66071.           Routines: 
  66072.           sec_rgy_rep_admin_become_master 
  66073.  
  66074.           Files: 
  66075.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66076.           was derived. 
  66077.  
  66078.  
  66079. ΓòÉΓòÉΓòÉ 8.9.49. sec_rgy_rep_admin_destroy ΓòÉΓòÉΓòÉ
  66080.  
  66081.  Purpose 
  66082.  
  66083.           Destroys a replica's database. 
  66084.  
  66085.  Format 
  66086.  
  66087.                     #include <dce/repadm.h>
  66088.  
  66089.                     void sec_rgy_rep_admin_destroy(
  66090.                             sec_rgy_handle_t  context,
  66091.                             error_status_t  *status);
  66092.  
  66093.  Parameters 
  66094.  
  66095.           Input 
  66096.  
  66097.           context       An opaque handle bound to the registry server to be 
  66098.                         destroyed. 
  66099.  
  66100.           Output 
  66101.  
  66102.           status        A pointer to the completion status. On successful 
  66103.                         completion, the routine returns error_status_ok. 
  66104.  
  66105.  Usage 
  66106.  
  66107.           The sec_rgy_rep_admin_destroy routine tells a replica to destroy its 
  66108.           databases and to exit. 
  66109.  
  66110.  Related Information 
  66111.  
  66112.           Files: 
  66113.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66114.           was derived. 
  66115.  
  66116.  
  66117. ΓòÉΓòÉΓòÉ 8.9.50. sec_rgy_rep_admin_get_sw_vers ΓòÉΓòÉΓòÉ
  66118.  
  66119.  Purpose 
  66120.  
  66121.           Retrieves software version information. 
  66122.  
  66123.  Format 
  66124.  
  66125.                     #include <dce/repadm.h>
  66126.  
  66127.                     void sec_rgy_rep_admin_get_sw_vers(
  66128.                             sec_rgy_handle_t  context,
  66129.                             unsigned32  *num_sw_vers,
  66130.                             rs_replica_sw_vers_info_t  **sw_vers_info,
  66131.                             unsigned32 *current_sw_vers_offset,
  66132.                             error_status_t  *status);
  66133.  
  66134.  Parameters 
  66135.  
  66136.           Input 
  66137.  
  66138.           context       An opaque handle bound to the registry server. 
  66139.  
  66140.           Output 
  66141.  
  66142.           num_sw_vers   A count of the number of elements in the array pointed 
  66143.                         to by sw_vers_info. 
  66144.  
  66145.           sw_vers_info  A pointer to an array that contains the software 
  66146.                         versions supported. 
  66147.  
  66148.           current_sw_vers_offset An index into the sw_vers_info array. It 
  66149.                         identifies the element containing the replica's current 
  66150.                         operating software version. 
  66151.  
  66152.           status        A pointer to the completion status. On successful 
  66153.                         completion, the routine returns error_status_ok. 
  66154.  
  66155.  Usage 
  66156.  
  66157.           The sec_rgy_rep_admin_get_sw_vers routine retrieves the software 
  66158.           version of the security registry server specified in the context 
  66159.           parameter. 
  66160.  
  66161.           Memory is allocated for the array pointed to by sw_vers_info. This 
  66162.           memory must be freed by a call to dce_free. 
  66163.  
  66164.  Related Information 
  66165.  
  66166.           Routines: 
  66167.           dce_free 
  66168.  
  66169.           Files: 
  66170.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66171.           was derived. 
  66172.  
  66173.  
  66174. ΓòÉΓòÉΓòÉ 8.9.51. sec_rgy_rep_admin_info ΓòÉΓòÉΓòÉ
  66175.  
  66176.  Purpose 
  66177.  
  66178.           Retrieves replica information. 
  66179.  
  66180.  Format 
  66181.  
  66182.                     #include <dce/repadm.h>
  66183.  
  66184.                     void sec_rgy_rep_admin_info(
  66185.                             sec_rgy_handle_t  context,
  66186.                             rs_replica_sw_info_t  *rep_info,
  66187.                             error_status_t  *status);
  66188.  
  66189.  Parameters 
  66190.  
  66191.           Input 
  66192.  
  66193.           context       An opaque handle bound to the registry server. 
  66194.  
  66195.           Output 
  66196.  
  66197.           rep_info      A pointer to the rs_replica_info_t structure containing 
  66198.                         the replica's information. 
  66199.  
  66200.           status        A pointer to the completion status. On successful 
  66201.                         completion, the routine returns error_status_ok. 
  66202.  
  66203.  Usage 
  66204.  
  66205.           The sec_rgy_rep_admin_info routine retrieves a replica's information. 
  66206.  
  66207.  Related Information 
  66208.  
  66209.           Files: 
  66210.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66211.           was derived. 
  66212.  
  66213.  
  66214. ΓòÉΓòÉΓòÉ 8.9.52. sec_rgy_rep_admin_info_vers ΓòÉΓòÉΓòÉ
  66215.  
  66216.  Purpose 
  66217.  
  66218.           Obtains information about a replica. 
  66219.  
  66220.  Format 
  66221.  
  66222.                     #include <dce\repadm.h>
  66223.  
  66224.                     void sec_rgy_rep_admin_info_vers(
  66225.                             sec_rgy_handle_t  context,
  66226.                             rs_replica_info_t  *rep_info,
  66227.                             rs_replica_twr_vec_p_t  *rep_twrs,
  66228.                             rs_replica_twr_vec_p_t  *master_twrs,
  66229.                             unsigned32  *num_sw_vers,
  66230.                             rs_replica_sw_vers_info_t  **sw_vers_info[],
  66231.                             unsigned32  *current_sw_vers_offset,
  66232.                             error_status_t  *status);
  66233.  
  66234.  Parameters 
  66235.  
  66236.           Input 
  66237.  
  66238.           context       An opaque handle bound to a registry server. 
  66239.  
  66240.           Output 
  66241.  
  66242.           rep_info      A pointer to a rs_replica_info_t structure containing 
  66243.                         the replica's information. 
  66244.  
  66245.           rep_twrs      A pointer to a rs_replica_twr_vec_p_t containing the 
  66246.                         replica's protocol towers. 
  66247.  
  66248.           master_twrs   A pointer to a rs_replica_tw_vec_p_t structure 
  66249.                         containing the master's protocol towers. 
  66250.  
  66251.           num_sw_vers   A count of the number of elements in the array pointed 
  66252.                         to by sw_vers_info. 
  66253.  
  66254.           sw_vers_info[] A pointer to an array of numeric_to_printstring 
  66255.                         software version mapping. 
  66256.  
  66257.           current_sw_vers_offset An index into the sw_vers_info array. This 
  66258.                         index identifies the element that contains the software 
  66259.                         version at which the replica is currently operating. 
  66260.  
  66261.           status        A pointer to the completion status. On successful 
  66262.                         completion, the routine returns error_status_ok. 
  66263.  
  66264.  Usage 
  66265.  
  66266.           The sec_rgy_rep_admin_info_vers routine gets complete information 
  66267.           about a replica such as its state, uuid, protocol towers, latest 
  66268.           update sequence number and timestamp, and whether it is the master. 
  66269.           This routine also gets the replica's information about the master's 
  66270.           uuid, protocol towers, and the sequence number when the master was 
  66271.           designated. 
  66272.  
  66273.  Related Information 
  66274.  
  66275.           Files: 
  66276.           \usr\include\dce\repadm.idl - The idl file from which dce\repadm.h 
  66277.           was derived. 
  66278.  
  66279.  
  66280. ΓòÉΓòÉΓòÉ 8.9.53. sec_rgy_rep_admin_init_replica ΓòÉΓòÉΓòÉ
  66281.  
  66282.  Purpose 
  66283.  
  66284.           Initializes a replica. 
  66285.  
  66286.  Format 
  66287.  
  66288.                     #include <dce/repadm.h>
  66289.  
  66290.                     void sec_rgy_rep_admin_init_replica(
  66291.                             sec_rgy_handle_t  context,
  66292.                             uuid_p_t  rep_id,
  66293.                             error_status_t  *status);
  66294.  
  66295.  Parameters 
  66296.  
  66297.           Input 
  66298.  
  66299.           context       An opaque handle bound to the registry server. 
  66300.  
  66301.           rep_id        A variable of type uuid_p_t containing the UUID of the 
  66302.                         slave replica. 
  66303.  
  66304.           Output 
  66305.  
  66306.           status        A pointer to the completion status. On successful 
  66307.                         completion, the routine returns error_status_ok. 
  66308.  
  66309.  Usage 
  66310.  
  66311.           The sec_rgy_rep_admin_init_replica routine initializes the slave 
  66312.           replica identified by rep_id. 
  66313.  
  66314.  Related Information 
  66315.  
  66316.           Files: 
  66317.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66318.           was derived. 
  66319.  
  66320.  
  66321. ΓòÉΓòÉΓòÉ 8.9.54. sec_rgy_rep_admin_maint ΓòÉΓòÉΓòÉ
  66322.  
  66323.  Purpose 
  66324.  
  66325.           Puts a replica into or out of maintenance mode. 
  66326.  
  66327.  Format 
  66328.  
  66329.                     #include <dce/repadm.h>
  66330.  
  66331.                     void sec_rgy_rep_admin_maint(
  66332.                             sec_rgy_handle_t  context,
  66333.                             boolean32  in_maintenance,
  66334.                             error_status_t  *status);
  66335.  
  66336.  Parameters 
  66337.  
  66338.           Input 
  66339.  
  66340.           context       An opaque handle bound to the registry server. 
  66341.  
  66342.           in_maintenance Set to TRUE when the replica is in maintenance mode; 
  66343.                         set to FALSE when the replica is not in maintenance 
  66344.                         mode. 
  66345.  
  66346.           Output 
  66347.  
  66348.           status        A pointer to the completion status. On successful 
  66349.                         completion, the routine returns error_status_ok. 
  66350.  
  66351.  Usage 
  66352.  
  66353.           The sec_rgy_rep_admin_maint routine puts a replica into or out of 
  66354.           maintenance mode. 
  66355.  
  66356.  Related Information 
  66357.  
  66358.           Files: 
  66359.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66360.           was derived. 
  66361.  
  66362.  
  66363. ΓòÉΓòÉΓòÉ 8.9.55. sec_rgy_rep_admin_mkey ΓòÉΓòÉΓòÉ
  66364.  
  66365.  Purpose 
  66366.  
  66367.           Changes the master key and encrypts the database again. 
  66368.  
  66369.  Format 
  66370.  
  66371.                     #include <dce/repadm.h>
  66372.  
  66373.                     void sec_rgy_rep_admin_mkey(
  66374.                             sec_rgy_handle_t  context,
  66375.                             error_status_t  *status);
  66376.  
  66377.  Parameters 
  66378.  
  66379.           Input 
  66380.  
  66381.           context       An opaque handle to the registry server. This is the 
  66382.                         register that will get a new master key. 
  66383.  
  66384.           Output 
  66385.  
  66386.           status        A pointer to the completion status. On successful 
  66387.                         completion, the routine returns error_status_ok. 
  66388.  
  66389.  Usage 
  66390.  
  66391.           The sec_rgy_rep_admin_mkey routine changes the master key and 
  66392.           encrypts again the database pointed to by context. 
  66393.  
  66394.  Related Information 
  66395.  
  66396.           Files: 
  66397.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66398.           was derived. 
  66399.  
  66400.  
  66401. ΓòÉΓòÉΓòÉ 8.9.56. sec_rgy_rep_admin_set_sw_vers ΓòÉΓòÉΓòÉ
  66402.  
  66403.  Purpose 
  66404.  
  66405.           Sets the software version. 
  66406.  
  66407.  Format 
  66408.  
  66409.                     #include <dce/repadm.h>
  66410.  
  66411.                     void sec_rgy_rep_admin_set_sw_vers(
  66412.                             sec_rgy_handle_t  context,
  66413.                             unsigned32  sw_rev,
  66414.                             error_status_t  *status);
  66415.  
  66416.  Parameters 
  66417.  
  66418.           Input 
  66419.  
  66420.           context       An opaque handle to the registry server. 
  66421.  
  66422.           sw_rev        The current version specification that describes the 
  66423.                         range of software versions supported by the server. 
  66424.  
  66425.           Output 
  66426.  
  66427.           status        A pointer to the completion status. On successful 
  66428.                         completion, the routine returns error_status_ok. 
  66429.  
  66430.  Usage 
  66431.  
  66432.           The sec_rgy_rep_admin_set_sw_vers routine sets the cell-wide software 
  66433.           version. 
  66434.  
  66435.  Related Information 
  66436.  
  66437.           Files: 
  66438.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66439.           was derived. 
  66440.  
  66441.  
  66442. ΓòÉΓòÉΓòÉ 8.9.57. sec_rgy_rep_admin_stop ΓòÉΓòÉΓòÉ
  66443.  
  66444.  Purpose 
  66445.  
  66446.           Stop the replica. 
  66447.  
  66448.  Format 
  66449.  
  66450.                     #include <dce/repadm.h>
  66451.  
  66452.                     void sec_rgy_rep_admin_stop(
  66453.                             sec_rgy_handle_t  context,
  66454.                             error_status_t  *status);
  66455.  
  66456.  Parameters 
  66457.  
  66458.           Input 
  66459.  
  66460.           context       An opaque handle to the registry server to be stopped. 
  66461.  
  66462.           Output 
  66463.  
  66464.           status        A pointer to the completion status. On successful 
  66465.                         completion, the routine returns error_status_ok. 
  66466.  
  66467.  Usage 
  66468.  
  66469.           The sec_rgy_rep_admin_stop routine stops the replica identified by 
  66470.           the context handle. 
  66471.  
  66472.  Related Information 
  66473.  
  66474.           Files: 
  66475.           /user/include/dce/repadm.idl - The idl file from which dce/repadm.h 
  66476.           was derived. 
  66477.  
  66478.  
  66479. ΓòÉΓòÉΓòÉ 8.9.58. sec_rgy_site_bind ΓòÉΓòÉΓòÉ
  66480.  
  66481.  Purpose 
  66482.  
  66483.           Binds to a registry site. 
  66484.  
  66485.  Library 
  66486.  
  66487.           \lib\dceos2.lib 
  66488.  
  66489.  Format 
  66490.  
  66491.                     #include <dce/binding.h>
  66492.  
  66493.                     void sec_rgy_site_bind(
  66494.                             unsigned_char_p_t  *site_name,
  66495.                             sec_rgy_bind_auth_info_t  *auth_info,
  66496.                             sec_rgy_handle_t  *context,
  66497.                             error_status_t  *status);
  66498.  
  66499.  Parameters 
  66500.  
  66501.           Input 
  66502.  
  66503.           site_name     A character string (type unsigned_char_t) that contains 
  66504.                         the name of the registry site to bind to. Supply this 
  66505.                         name in any of the following forms: 
  66506.  
  66507.                           o  To randomly choose a site to bind to in the named 
  66508.                              cell, specify a cell name (for example, 
  66509.                              \...\r_d.com or \.: for the local cell) 
  66510.  
  66511.                           o  To bind to a specific site in a specific cell, 
  66512.                              specify either the site's global name (for 
  66513.                              example, 
  66514.                              \...\r_d.com\subsys\dce\sec\rs_server_250_2) or 
  66515.                              the site's network address (for example, 
  66516.                              ncadg_ip_udp:15.22.144.248). 
  66517.  
  66518.           auth_info     A pointer to the sec_rgy_bind_auth_info_t structure 
  66519.                         that identifies the authentication protocol, protection 
  66520.                         level, and authorization protocol to use in 
  66521.                         establishing the binding. See 
  66522.                         rpc_binding_set_auth_info. If the 
  66523.                         sec_rgy_bind_auth_info_t structure specifies 
  66524.                         authenticated RPC, the caller must have established a 
  66525.                         valid network identity for this routine to succeed. 
  66526.  
  66527.           Output 
  66528.  
  66529.           context       A pointer to a sec_rgy_handle_t type. Upon return, this 
  66530.                         contains a registry server handle indicating (bound to) 
  66531.                         the desired registry site. 
  66532.  
  66533.           status        A pointer to the completion status.  On successful 
  66534.                         completion, the routine returns error_status_ok. 
  66535.                         Otherwise, it returns one of the following errors: 
  66536.  
  66537.                              sec_rgy_server_unavailable The DCE Registry Server 
  66538.                                                    is unavailable. 
  66539.  
  66540.                              sec_login_s_no_current_context The caller does not 
  66541.                                                    have a valid network login 
  66542.                                                    context. 
  66543.  
  66544.  Usage 
  66545.  
  66546.           The sec_rgy_site_bind routine binds to a registry site at the 
  66547.           security level specified by the auth_info parameter. The site_name 
  66548.           parameter identifies the registry to use.  If site_name is NULL, or a 
  66549.           zero-length string, a registry site in the local cell is selected by 
  66550.           the client agent. 
  66551.  
  66552.  Notes 
  66553.  
  66554.           Similar to the sec_rgy_site_bind_query routine, this routine binds 
  66555.           arbitrarily to either an update or query site. Although update sites 
  66556.           can accept queries, query sites cannot accept updates.  To 
  66557.           specifically select an update site, use sec_rgy_site_bind_update. 
  66558.  
  66559.  Related Information 
  66560.  
  66561.           Routines: rpc_binding_set_auth_info 
  66562.           sec_rgy_site_open 
  66563.           sec_rgy_cell_bind 
  66564.           sec_rgy_site_bind_update 
  66565.  
  66566.  
  66567. ΓòÉΓòÉΓòÉ 8.9.59. sec_rgy_site_bind_query ΓòÉΓòÉΓòÉ
  66568.  
  66569.  Purpose 
  66570.  
  66571.           Binds to a registry query site. 
  66572.  
  66573.  Library 
  66574.  
  66575.           \lib\dceos2.lib 
  66576.  
  66577.  Format 
  66578.  
  66579.                     #include <dce/binding.h>
  66580.  
  66581.                     void sec_rgy_site_bind_query(
  66582.                             unsigned_char_t  *site_name,
  66583.                             sec_rgy_bind_auth_info_t  *auth_info,
  66584.                             sec_rgy_handle_t  *context,
  66585.                             error_status_t  *status);
  66586.  
  66587.  Parameters 
  66588.  
  66589.           Input 
  66590.  
  66591.           site_name     A character string (type unsigned_char_t) that contains 
  66592.                         the name of the registry site to bind to. Supply this 
  66593.                         name in any of the following forms: 
  66594.  
  66595.                           o  To randomly choose a site to bind to in the named 
  66596.                              cell, specify a cell name (for example, 
  66597.                              \...\r_d.com or \.: for the local cell) 
  66598.  
  66599.                           o  To bind to a specific site in a specific cell, 
  66600.                              specify either the site's global name (for 
  66601.                              example, 
  66602.                              \...\r_d.com\subsys\dce\sec\rs_server_250_2) or 
  66603.                              the site's network address (for example, 
  66604.                              ncadg_ip_udp:15.22.144.248). 
  66605.  
  66606.           auth_info     A pointer to the sec_rgy_bind_auth_info_t structure 
  66607.                         that identifies the authentication protocol, protection 
  66608.                         level, and authorization protocol to use in 
  66609.                         establishing the binding. See 
  66610.                         rpc_binding_set_auth_info. If the 
  66611.                         sec_rgy_bind_auth_info_t structure specifies 
  66612.                         authenticated RPC, the caller must have established a 
  66613.                         valid network identity for this routine to succeed. 
  66614.  
  66615.           Output 
  66616.  
  66617.           context       A pointer to a sec_rgy_handle_t. Upon return, this 
  66618.                         contains a registry server handle indicating (bound to) 
  66619.                         the desired registry site. 
  66620.  
  66621.           status        A pointer to the completion status.  On successful 
  66622.                         completion, the routine returns error_status_ok. 
  66623.                         Otherwise, it returns one of the following errors: 
  66624.  
  66625.                              sec_login_s_no_current_context The caller does not 
  66626.                                             have a valid network login context. 
  66627.  
  66628.                              sec_rgy_server_unavailable The DCE Registry Server 
  66629.                                             is unavailable. 
  66630.  
  66631.  Usage 
  66632.  
  66633.           The sec_rgy_site_bind_query routine binds to a registry query site at 
  66634.           an arbitrary level of security.  A registry query site is a satellite 
  66635.           server that operates on a periodically updated copy of the main 
  66636.           registry database.  To change the registry database, it is necessary 
  66637.           to change a registry update site, which then automatically updates 
  66638.           its associated query sites.  No changes can be made directly to a 
  66639.           registry query database. 
  66640.  
  66641.  Related Information 
  66642.  
  66643.           Routines: rpc_binding_set_auth_info 
  66644.           sec_rgy_site_open 
  66645.           sec_rgy_site_bind 
  66646.  
  66647.  
  66648. ΓòÉΓòÉΓòÉ 8.9.60. sec_rgy_site_bind_update ΓòÉΓòÉΓòÉ
  66649.  
  66650.  Purpose 
  66651.  
  66652.           Binds to a registry update site. 
  66653.  
  66654.  Library 
  66655.  
  66656.           \lib\dceos2.lib 
  66657.  
  66658.  Format 
  66659.  
  66660.                     #include <dce/binding.h>
  66661.  
  66662.                     void sec_rgy_site_bind_update(
  66663.                             unsigned_char_t  *site_name,
  66664.                             sec_rgy_bind_auth_info_t  *auth_info,
  66665.                             sec_rgy_handle_t  *context,
  66666.                             error_status_t  *status);
  66667.  
  66668.  Parameters 
  66669.  
  66670.           Input 
  66671.  
  66672.           site_name     A character string (type unsigned_char_t) that contains 
  66673.                         the name of the registry site to bind to. Supply this 
  66674.                         name in any of the following forms: 
  66675.  
  66676.                           o  To choose an update site to bind to in the named 
  66677.                              cell, specify a cell name (for example, 
  66678.                              \...\r_d.com or \.: for the local cell) 
  66679.  
  66680.           auth_info     A pointer to the sec_rgy_bind_auth_info_t structure 
  66681.                         that identifies the authentication protocol, protection 
  66682.                         level, and authorization protocol to use in 
  66683.                         establishing the binding. See 
  66684.                         rpc_binding_set_auth_info. If the 
  66685.                         sec_rgy_bind_auth_info_t structure specifies 
  66686.                         authenticated RPC, the caller must have established a 
  66687.                         valid network identity for this routine to succeed. 
  66688.  
  66689.           Output 
  66690.  
  66691.           context       A pointer to a sec_rgy_handle_t. Upon return, this 
  66692.                         contains a registry server handle indicating (bound to) 
  66693.                         the desired registry site. 
  66694.  
  66695.           status        A pointer to the completion status.  On successful 
  66696.                         completion, the routine returns error_status_ok. 
  66697.                         Otherwise, it returns the following error: 
  66698.  
  66699.                              sec_rgy_server_unavailable The DCE Registry Server 
  66700.                                                    is unavailable. 
  66701.  
  66702.                              sec_login_s_no_current_context The caller does not 
  66703.                                                    have a valid network login 
  66704.                                                    context. 
  66705.  
  66706.  Usage 
  66707.  
  66708.           The sec_rgy_site_bind_update routine binds to a registry update site. 
  66709.           A registry update site is a master server that can control several 
  66710.           satellite (query) servers.  To change the registry database, it is 
  66711.           necessary to change a registry update site, which then automatically 
  66712.           updates its associated query sites.  No changes can be made directly 
  66713.           to a registry query database. 
  66714.  
  66715.           The site_name parameter identifies the cell in which to find the 
  66716.           update site. If site_name is NULL or a zero-length string, an update 
  66717.           site in the local cell is selected by the client agent. 
  66718.  
  66719.           The handle for the associated registry server is returned in context. 
  66720.           The handle is to an update site.  Use this registry context handle in 
  66721.           subsequent calls that update or query the registry database (for 
  66722.           example, the sec_rgy_pgo_add or sec_rgy_acct_lookup routine). 
  66723.  
  66724.  Related Information 
  66725.  
  66726.           Routines: rpc_binding_set_auth_info 
  66727.           sec_rgy_site_bind 
  66728.           sec_rgy_site_open 
  66729.  
  66730.  
  66731. ΓòÉΓòÉΓòÉ 8.9.61. sec_rgy_site_binding_get_info ΓòÉΓòÉΓòÉ
  66732.  
  66733.  Purpose 
  66734.  
  66735.           Returns information from the registry binding handle. 
  66736.  
  66737.  Library 
  66738.  
  66739.           \lib\dceos2.lib 
  66740.  
  66741.  Format 
  66742.  
  66743.                     #include <dce/binding.h>
  66744.  
  66745.                     void sec_rgy_site_binding_get_info(
  66746.                             sec_rgy_handle_t  context,
  66747.                             unsigned_char_t  **cell_name,
  66748.                             unsigned_char_t  **server_name,
  66749.                             unsigned_char_t  **string_binding,
  66750.                             sec_rgy_bind_auth_info_t  *auth_info,
  66751.                             error_status_t  *status);
  66752.  
  66753.  Parameters 
  66754.  
  66755.           Input 
  66756.  
  66757.           context       A sec_rgy_handle_t parameter that contains a registry 
  66758.                         server handle indicating (bound to) the desired 
  66759.                         registry site. To obtain information on the default 
  66760.                         binding handle, initialize context to 
  66761.                         sec_rgy_default_handle. A valid login context must be 
  66762.                         set for the process if context is set to 
  66763.                         sec_rgy_default_handle; otherwise, the error 
  66764.                         sec_under_login_s_no_current_context is returned. 
  66765.  
  66766.           Output 
  66767.  
  66768.           cell_name     The name of the home cell for this registry. 
  66769.  
  66770.           server_name   The name of the node the server resides on. This name 
  66771.                         is either a global name or a network address, depending 
  66772.                         on the form used to input the name to the routine that 
  66773.                         bound to the site. 
  66774.  
  66775.           string_binding A string containing binding information from the 
  66776.                         sec_rgy_handle_t. 
  66777.  
  66778.           auth_info     A pointer to the sec_rgy_bind_auth_info_t structure 
  66779.                         that identifies the authentication protocol, protection 
  66780.                         level, and authorization protocol to use in 
  66781.                         establishing the binding. See 
  66782.                         rpc_binding_set_auth_info. 
  66783.  
  66784.           status        A pointer to the completion status.  On successful 
  66785.                         completion, the routine returns error_status_ok. 
  66786.                         Otherwise, it returns one of the following errors: 
  66787.  
  66788.                              sec_login_s_no_current_context The caller does not 
  66789.                                            have a valid network login context. 
  66790.  
  66791.                              sec_rgy_server_unavailable The DCE registry server 
  66792.                                            is unavailable. 
  66793.  
  66794.  Usage 
  66795.  
  66796.           The sec_rgy_site_binding_get_info routine returns the site name and 
  66797.           authentication information associated with the context parameter.  If 
  66798.           the context is the default context, the information for the default 
  66799.           binding is returned.  Passing in a NULL value for any of the output 
  66800.           values (except for status) prevents that value from being returned. 
  66801.           Memory is allocated for the string returned in the cell_name, 
  66802.           server_name, and string_binding parameters. The application calls the 
  66803.           rpc_string_free routine to deallocate that memory. 
  66804.  
  66805.  Related Information 
  66806.  
  66807.           Routines: sec_rgy_site_bind 
  66808.           sec_rgy_site_open 
  66809.           rpc_string_free 
  66810.  
  66811.  
  66812. ΓòÉΓòÉΓòÉ 8.9.62. sec_rgy_site_close ΓòÉΓòÉΓòÉ
  66813.  
  66814.  Purpose 
  66815.  
  66816.           Frees the binding handle for a registry server. 
  66817.  
  66818.  Library 
  66819.  
  66820.           \lib\dceos2.lib 
  66821.  
  66822.  Format 
  66823.  
  66824.                     #include <dce/binding.h>
  66825.  
  66826.                     void sec_rgy_site_close(
  66827.                             sec_rgy_handle_t  ext_context,
  66828.                             error_status_t  *status);
  66829.  
  66830.  Parameters 
  66831.  
  66832.           Input 
  66833.  
  66834.           ext_context   An opaque handle indicating (bound to) a registry 
  66835.                         server. Use sec_rgy_site_open to acquire a bound 
  66836.                         handle. 
  66837.  
  66838.           status        A pointer to the completion status.  On successful 
  66839.                         completion, the routine returns error_status_ok. 
  66840.                         Otherwise, it returns an error. 
  66841.  
  66842.  Usage 
  66843.  
  66844.           The sec_rgy_site_close routine frees the memory occupied by the 
  66845.           specified handle and destroys its binding with the registry server. 
  66846.  
  66847.  Notes 
  66848.  
  66849.           A handle cannot be used after it is freed. 
  66850.  
  66851.  Related Information 
  66852.  
  66853.           Routines: sec_rgy_site_get 
  66854.           sec_rgy_site_open 
  66855.           sec_rgy_site_open_query 
  66856.           sec_rgy_site_open_update 
  66857.  
  66858.  
  66859. ΓòÉΓòÉΓòÉ 8.9.63. sec_rgy_site_get ΓòÉΓòÉΓòÉ
  66860.  
  66861.  Purpose 
  66862.  
  66863.           Returns the string representation for a bound registry site. 
  66864.  
  66865.  Library 
  66866.  
  66867.           \lib\dceos2.lib 
  66868.  
  66869.  Format 
  66870.  
  66871.                     #include <dce/binding.h>
  66872.  
  66873.                     void sec_rgy_site_get(
  66874.                             sec_rgy_handle_t  context,
  66875.                             unsigned_char_t  **site_name,
  66876.                             error_status_t  *status);
  66877.  
  66878.  Parameters 
  66879.  
  66880.           Input 
  66881.  
  66882.           context       An opaque handle bound to a registry server. Use 
  66883.                         sec_rgy_site_open to acquire a bound handle. To obtain 
  66884.                         information on the default binding handle, initialize 
  66885.                         context to sec_rgy_default_handle. A valid login 
  66886.                         context must be set for the process if context is set 
  66887.                         to sec_rgy_default_handle; otherwise, the error 
  66888.                         sec_under_login_s_no_current_context is returned. 
  66889.  
  66890.           Output 
  66891.  
  66892.           site_name     A pointer to a character string (type unsigned_char_t) 
  66893.                         that contains the returned name of the registry site 
  66894.                         associated with context, the given registry server 
  66895.                         handle. The name is either a global name or a network 
  66896.                         address, depending on the form used to input the name 
  66897.                         to the call that bound to the site. 
  66898.  
  66899.           status        A pointer to the completion status.  On successful 
  66900.                         completion, the routine returns error_status_ok. 
  66901.                         Otherwise, it returns the following error: 
  66902.  
  66903.                              sec_rgy_server_unavailable The requested registry 
  66904.                                                   server is not available. 
  66905.  
  66906.                              sec_under_login_s_no_current_context The caller 
  66907.                                                   does not have a valid network 
  66908.                                                   login context. 
  66909.  
  66910.  Usage 
  66911.  
  66912.           The sec_rgy_site_get routine returns the name of the registry site 
  66913.           associated with the specified handle. If the handle is the default 
  66914.           context, the routine returns the name of the default context's site. 
  66915.           Memory is allocated for the string returned in the site_name 
  66916.           parameter. The application calls the rpc_string_free routine to 
  66917.           deallocate that memory. 
  66918.  
  66919.  Related Information 
  66920.  
  66921.           Routines: 
  66922.           sec_rgy_site_open 
  66923.  
  66924.  
  66925. ΓòÉΓòÉΓòÉ 8.9.64. sec_rgy_site_is_readonly ΓòÉΓòÉΓòÉ
  66926.  
  66927.  Purpose 
  66928.  
  66929.           Checks whether a registry site is read-only. 
  66930.  
  66931.  Library 
  66932.  
  66933.           \lib\dceos2.lib 
  66934.  
  66935.  Format 
  66936.  
  66937.                     #include <dce/binding.h>
  66938.  
  66939.                     boolean32 sec_rgy_site_is_readonly(
  66940.                              sec_rgy_handle_t  context);
  66941.  
  66942.  Parameters 
  66943.  
  66944.           Input 
  66945.  
  66946.           context       An opaque handle indicating (bound to) a registry 
  66947.                         server. Use sec_rgy_site_open to acquire a bound 
  66948.                         handle. 
  66949.  
  66950.  Usage 
  66951.  
  66952.           The sec_rgy_site_is_readonly routine checks whether the registry site 
  66953.           associated with the specified handle is a query site or an update 
  66954.           site. A query site is a read-only replica of a master registry 
  66955.           database (the update site). The update site accepts changes to the 
  66956.           registry database and duplicates the changes in its associated query 
  66957.           sites. 
  66958.  
  66959.  Return Codes 
  66960.  
  66961.           The routine returns: 
  66962.  
  66963.             o  TRUE if the registry site is read-only or if there was an error 
  66964.                using the specified handle. 
  66965.             o  FALSE if the registry site is an update site. 
  66966.  
  66967.  Related Information 
  66968.  
  66969.           Routines: sec_rgy_site_open 
  66970.           sec_rgy_site_open_query 
  66971.  
  66972.  
  66973. ΓòÉΓòÉΓòÉ 8.9.65. sec_rgy_site_open ΓòÉΓòÉΓòÉ
  66974.  
  66975.  Purpose 
  66976.  
  66977.           Binds to a registry site. 
  66978.  
  66979.  Library 
  66980.  
  66981.           \lib\dceos2.lib 
  66982.  
  66983.  Format 
  66984.  
  66985.                     #include <dce/binding.h>
  66986.  
  66987.                     void sec_rgy_site_open(
  66988.                             unsigned_char_t  *site_name,
  66989.                             sec_rgy_handle_t  *context,
  66990.                             error_status_t  *status);
  66991.  
  66992.  Parameters 
  66993.  
  66994.           Input/Output 
  66995.  
  66996.           site_name     A pointer to a character string (type unsigned_char_t) 
  66997.                         containing the name of the registry site to bind to. 
  66998.                         Supply this name in any of the following forms: 
  66999.  
  67000.                           o  To randomly choose a site to bind to in the named 
  67001.                              cell, specify a cell name (for example, 
  67002.                              \...\r_d.com or \.: for the local cell) 
  67003.  
  67004.                           o  To bind to a specific site in a specific cell, 
  67005.                              specify either the site's global name (for 
  67006.                              example, 
  67007.                              \...\r_d.com\subsys\dce\sec\rs_server_250_2) or 
  67008.                              the site's network address (for example, 
  67009.                              ncadg_ip_udp:15.22.144.248). Note that if you 
  67010.                              specify the name of a specific secd to bind to and 
  67011.                              the name is not valid, the routine binds to a 
  67012.                              random site in the cell if the specified cell name 
  67013.                              is valid. 
  67014.  
  67015.           Output 
  67016.  
  67017.           context       A pointer to a sec_rgy_handle_t parameter. Upon return, 
  67018.                         this contains a registry server handle indicating 
  67019.                         (bound to) the desired registry site. 
  67020.  
  67021.           status        A pointer to the completion status.  On successful 
  67022.                         completion, the routine returns error_status_ok. 
  67023.                         Otherwise, it returns the following error: 
  67024.  
  67025.                              sec_rgy_server_unavailable The requested registry 
  67026.                                                   server is not available. 
  67027.  
  67028.                              sec_login_s_no_current_context The caller does not 
  67029.                                                   have a valid network login 
  67030.                                                   context. 
  67031.  
  67032.  Usage 
  67033.  
  67034.           The sec_rgy_site_open routine binds to a registry site at the level 
  67035.           of security specified in the rpc_binding_set_auth_info routine. The 
  67036.           site_name parameter identifies the registry to use.  If site_name is 
  67037.           NULL, or a zero-length string, a registry site in the local cell is 
  67038.           selected by the client agent. The caller must have established a 
  67039.           valid network identity for this routine to succeed. 
  67040.  
  67041.  Related Information 
  67042.  
  67043.           Routines: sec_rgy_rep_admin_become_master 
  67044.           sec_rgy_site_close 
  67045.           sec_rgy_site_is_readonly 
  67046.           sec_rgy_site_open_query 
  67047.           sec_rgy_site_open_update 
  67048.           sec_rgy_plcy_get_override_info 
  67049.  
  67050.  
  67051. ΓòÉΓòÉΓòÉ 8.9.66. sec_rgy_site_open_query ΓòÉΓòÉΓòÉ
  67052.  
  67053.  Purpose 
  67054.  
  67055.           Binds to a registry query site. 
  67056.  
  67057.  Library 
  67058.  
  67059.           \lib\dceos2.lib 
  67060.  
  67061.  Format 
  67062.  
  67063.                     #include <dce/binding.h>
  67064.  
  67065.                     void sec_rgy_site_open_query(
  67066.                             unsigned_char_t  *site_name,
  67067.                             sec_rgy_handle_t  *context,
  67068.                             error_status_t  *status);
  67069.  
  67070.  Parameters 
  67071.  
  67072.           Input 
  67073.  
  67074.           site_name     A character string (type unsigned_char_t) containing 
  67075.                         the name of the registry query site to bind to. Supply 
  67076.                         this name in any of the following forms: 
  67077.  
  67078.                           o  To randomly choose a site to bind to in the named 
  67079.                              cell, specify a cell name (for example, 
  67080.                              \...\r_d.com or \.: for the local cell) 
  67081.  
  67082.                           o  To bind to a specific site in a specific cell, 
  67083.                              specify either the site's global name (for 
  67084.                              example, 
  67085.                              \...\r_d.com\subsys\dce\sec\rs_server_250_2) or 
  67086.                              the site's network address (for example, 
  67087.                              ncadg_ip_udp:15.22.144.248). 
  67088.  
  67089.           Output 
  67090.  
  67091.           context       A pointer to a sec_rgy_handle_t. Upon return, this 
  67092.                         contains a registry server handle indicating (bound to) 
  67093.                         the desired registry site. 
  67094.  
  67095.           status        A pointer to the completion status.  On successful 
  67096.                         completion, the routine returns error_status_ok. 
  67097.                         Otherwise, it returns the following error: 
  67098.  
  67099.                              sec_rgy_server_unavailable The DCE registry server 
  67100.                                            is unavailable. 
  67101.  
  67102.                              sec_login_s_no_current_context The caller does not 
  67103.                                            have a valid network login context. 
  67104.  
  67105.  Usage 
  67106.  
  67107.           The sec_rgy_site_open_query routine binds to a registry query site. A 
  67108.           registry query site is a satellite server that operates on a 
  67109.           periodically updated copy of the main registry database.  To change 
  67110.           the registry database, it is necessary to change a registry update 
  67111.           site, which then automatically updates its associated query sites. No 
  67112.           changes can be made directly to a registry query database. 
  67113.  
  67114.           The site_name parameter identifies the query site to use.  If 
  67115.           site_name is NULL, or a zero-length string, a query site in the local 
  67116.           cell is selected by the client agent. 
  67117.  
  67118.           The handle for the associated registry server is returned in context. 
  67119.  
  67120.           The caller must have established a valid network identity for this 
  67121.           routine to succeed. 
  67122.  
  67123.  Notes 
  67124.  
  67125.           The use of the sec_rgy_site_bind_query routine to bind to a registry 
  67126.           query site is recommended in place of this routine. 
  67127.  
  67128.  Related Information 
  67129.  
  67130.           Routines: sec_rgy_site_close 
  67131.           sec_rgy_site_get 
  67132.           sec_rgy_site_is_readonly 
  67133.           sec_rgy_site_open 
  67134.           sec_rgy_site_open_update 
  67135.  
  67136.  
  67137. ΓòÉΓòÉΓòÉ 8.9.67. sec_rgy_site_open_update ΓòÉΓòÉΓòÉ
  67138.  
  67139.  Purpose 
  67140.  
  67141.           Binds to a registry update site. 
  67142.  
  67143.  Library 
  67144.  
  67145.           \lib\dceos2.lib 
  67146.  
  67147.  Format 
  67148.  
  67149.                     #include <dce/binding.h>
  67150.  
  67151.                     void sec_rgy_site_open_update(
  67152.                             unsigned_char_t  *site_name,
  67153.                             sec_rgy_handle_t  *context,
  67154.                             error_status_t  *status);
  67155.  
  67156.  Parameters 
  67157.  
  67158.           Input 
  67159.  
  67160.           site_name     A character string (type unsigned_char_t) containing 
  67161.                         the name of an update registry site to which to bind. 
  67162.                         Supply this name in any of the following forms: 
  67163.  
  67164.                           o  To choose the update site to bind to in the named 
  67165.                              cell, specify a cell name (for example, 
  67166.                              \...\r_d.com or \.: for the local cell) 
  67167.  
  67168.                           o  To start the search for the update site at a 
  67169.                              specific replica in the replica's cell, specify 
  67170.                              either the site's global name (for example, 
  67171.                              \...\r_d.com\subsys\dce\sec\rs_server_250_2 or the 
  67172.                              site's network address (for example, 
  67173.                              ncadg_ip_udp:15.22.144.248 
  67174.  
  67175.           Output 
  67176.  
  67177.           context       A pointer to a sec_rgy_handle_t variable. Upon return, 
  67178.                         this contains a registry server handle indicating 
  67179.                         (bound to) the desired registry site. 
  67180.  
  67181.           status        A pointer to the completion status.  On successful 
  67182.                         completion, the routine returns error_status_ok. 
  67183.                         Otherwise, it returns the following error: 
  67184.  
  67185.                              sec_rgy_server_unavailable The requested registry 
  67186.                                            server is unavailable. 
  67187.  
  67188.                              sec_login_s_no_current_context The caller does not 
  67189.                                            have a valid network login context. 
  67190.  
  67191.  Usage 
  67192.  
  67193.           The sec_rgy_site_open_update routine binds to a registry update site. 
  67194.           A registry update site is a master server that can control several 
  67195.           satellite (query) servers. To change the registry database, it is 
  67196.           necessary to change a registry update site, which then automatically 
  67197.           updates its associated query sites. No changes can be made directly 
  67198.           to a registry query database. 
  67199.  
  67200.           The site_name parameter identifies either the cell that contains the 
  67201.           update site or the replica at which to start the search for the 
  67202.           update site. If site_name is NULL or a zero-length string, an update 
  67203.           site in the local cell is selected by the client agent. 
  67204.  
  67205.           The handle for the associated registry server is returned in context. 
  67206.           The handle is to an update site. Use this registry context handle in 
  67207.           subsequent calls that update or query the registry database (for 
  67208.           example, sec_rgy_pgo_add or sec_rgy_acct_lookup). The caller must 
  67209.           have established a valid network identity for this routine to 
  67210.           succeed. 
  67211.  
  67212.  Notes 
  67213.  
  67214.           The use of the sec_rgy_site_bind_update routine to bind to a registry 
  67215.           update site is recommended in place of this routine. 
  67216.  
  67217.  Related Information 
  67218.  
  67219.           Routines: sec_rgy_site_close 
  67220.           sec_rgy_site_get 
  67221.           sec_rgy_site_is_readonly 
  67222.           sec_rgy_site_open 
  67223.           sec_rgy_site_open_query 
  67224.  
  67225.  
  67226. ΓòÉΓòÉΓòÉ 8.9.68. sec_rgy_unix_getgrent ΓòÉΓòÉΓòÉ
  67227.  
  67228.  Purpose 
  67229.  
  67230.           Returns a UNIX-style group entry. 
  67231.  
  67232.  Library 
  67233.  
  67234.           \lib\dceos2.lib 
  67235.  
  67236.  Format 
  67237.  
  67238.                     #include <dce/rgybase.h>
  67239.                     #include <dce/unix.h>
  67240.  
  67241.                     void sec_rgy_unix_getgrent (
  67242.                             sec_rgy_handle_t  context,
  67243.                             signed32  max_num_members,
  67244.                             sec_rgy_cursor_t  *marker,
  67245.                             sec_rgy_unix_group_t  *group_entry,
  67246.                             signed32  *num_members[],
  67247.                             sec_rgy_member_t  member_list,
  67248.                             error_status_t  *status);
  67249.  
  67250.  Parameters 
  67251.  
  67252.           Input 
  67253.  
  67254.           context       An opaque handle bound to a registry server. Use 
  67255.                         sec_rgy_site_open to acquire a bound handle. 
  67256.  
  67257.           max_num_members The maximum number of members to be returned by the 
  67258.                         routine. This must be no larger than the allocated size 
  67259.                         of the member_list array, and must not be negative.  If 
  67260.                         you specify a negative value for this parameter the 
  67261.                         routine uses 0 (zero). 
  67262.  
  67263.           Input/Output 
  67264.  
  67265.           marker        An opaque pointer indicating a specific PGO item entry 
  67266.                         in the registry database. The sec_rgy_unix_getgrent 
  67267.                         routine returns information about the group item to 
  67268.                         which marker is pointing, and advances the cursor to 
  67269.                         point to the next item in the database. When the end of 
  67270.                         the list of entries is reached, the routine returns 
  67271.                         sec_rgy_no_more_entries. Use sec_rgy_cursor_reset to 
  67272.                         refresh the cursor. 
  67273.  
  67274.           Output 
  67275.  
  67276.           group_entry   A UNIX-style group structure containing information 
  67277.                         obtained from the PGO item pointed to by marker at the 
  67278.                         beginning of the call. 
  67279.  
  67280.           num_members   A signed 32-bit integer containing the total number of 
  67281.                         member names returned in the member_list array. 
  67282.  
  67283.           member_list   An array of character strings to receive the returned 
  67284.                         member names.  The size allocated for the array is 
  67285.                         given by max_num_members.  If this value is less than 
  67286.                         the total number of members in the membership list, 
  67287.                         multiple calls must be made to return all of the 
  67288.                         members. 
  67289.  
  67290.           status        On successful completion, the routine returns 
  67291.                         error_status_ok.  Otherwise, it returns one of the 
  67292.                         following errors: 
  67293.  
  67294.                              sec_rgy_no_more_entries The end of the list of 
  67295.                                                   entries has been reached. 
  67296.  
  67297.                              sec_rgy_server_unavailable The registry server 
  67298.                                                   cannot be reached. 
  67299.  
  67300.  Usage 
  67301.  
  67302.           The sec_rgy_unix_getgrent routine returns a UNIX group structure 
  67303.           containing information obtained from the PGO item pointed to by the 
  67304.           cursor into the registry database.  The group structure is in the 
  67305.           form: 
  67306.  
  67307.                     typedef struct sec_rgy_unix_group_t {
  67308.                           sec_rgy_name_t  name;
  67309.                           signed32  gid;
  67310.                           sec_rgy_member_buf_t  members;
  67311.                     }      sec_rgy_unix_group_t;
  67312.  
  67313.           The structure includes: 
  67314.  
  67315.             o  The name of the group. 
  67316.             o  The UNIX ID of the group. 
  67317.             o  A string containing the names of the group members.  This string 
  67318.                is limited in size by the size of the sec_rgy_member_buf_t type 
  67319.                defined in rgybase.idl. 
  67320.           The routine also returns an array of member names, limited in size by 
  67321.           the max_num_members parameter. 
  67322.  
  67323.           This routine does not recognize implicit members of a group. It does 
  67324.           recognize those members of a group who have been added explicitly 
  67325.           (using the dcecp command). When an account is first defined, the 
  67326.           principal is assigned an organization and a group as part of its 
  67327.           account name. The principal therefore becomes a member of that group 
  67328.           without being explicitly defined as such. This routine does not list 
  67329.           any members that have been implicitly defined. To get all members of 
  67330.           a group, including the implicit members, you can use the 
  67331.           sec_rgy_pgo_get_members routine. 
  67332.  
  67333.  Related Information 
  67334.  
  67335.           Routines: sec_rgy_unix_getgrgid 
  67336.           sec_rgy_unix_getgrnam 
  67337.           sec_rgy_cursor_reset 
  67338.           sec_rgy_site_open 
  67339.  
  67340.  
  67341. ΓòÉΓòÉΓòÉ 8.9.69. sec_rgy_unix_getgrgid ΓòÉΓòÉΓòÉ
  67342.  
  67343.  Purpose 
  67344.  
  67345.           Returns a UNIX-style group entry for the account matching the 
  67346.           specified group ID. 
  67347.  
  67348.  Library 
  67349.  
  67350.           \lib\dceos2.lib 
  67351.  
  67352.  Format 
  67353.  
  67354.                     #include <dce/rgybase.h>
  67355.                     #include <dce/unix.h>
  67356.  
  67357.                     void sec_rgy_unix_getgrgid(
  67358.                             sec_rgy_handle_t  context,
  67359.                             signed32  gid,
  67360.                             signed32  max_num_members,
  67361.                             sec_rgy_cursor_t  *marker,
  67362.                             sec_rgy_unix_group_t  *group_entry,
  67363.                             signed32  *num_members,
  67364.                             sec_rgy_member_t  members[],
  67365.                             error_status_t  *status);
  67366.  
  67367.  Parameters 
  67368.  
  67369.           Input 
  67370.  
  67371.           context       An opaque handle bound to a registry server. Use 
  67372.                         sec_rgy_site_open to acquire a bound handle. 
  67373.  
  67374.           gid           A 32-bit integer specifying the group ID to match. 
  67375.  
  67376.           max_num_members The maximum number of members to be returned by the 
  67377.                         routine. This must be no larger than the allocated size 
  67378.                         of the members array, and must not be negative. If you 
  67379.                         specify a negative value for this parameter the routine 
  67380.                         uses 0 (zero). 
  67381.  
  67382.           Input/Output 
  67383.  
  67384.           marker        An opaque pointer that indicates a specific PGO item 
  67385.                         entry in the registry database. The 
  67386.                         sec_rgy_unix_getgrgid routine returns the PGO item 
  67387.                         indicated by marker, and advances the cursor to point 
  67388.                         to the next item in the database. When the end of the 
  67389.                         list of entries is reached, the routine returns 
  67390.                         sec_rgy_no_more_entries. Use sec_rgy_cursor_reset to 
  67391.                         refresh the cursor. 
  67392.  
  67393.           Output 
  67394.  
  67395.           group_entry   A UNIX-style group entry structure returned with 
  67396.                         information about the group matching gid. 
  67397.  
  67398.           num_members   An signed 32-bit integer containing the total number of 
  67399.                         member names returned in the members array. 
  67400.  
  67401.           members       An array of character strings to receive the returned 
  67402.                         member names. The size allocated for the array is given 
  67403.                         by max_num_members. If this value is less than the 
  67404.                         total number of members in the membership list, 
  67405.                         multiple calls must be made to return all of the 
  67406.                         members. 
  67407.  
  67408.           status        On successful completion, the routine returns 
  67409.                         error_status_ok.  Otherwise, it returns one of the 
  67410.                         following errors: 
  67411.  
  67412.                              sec_rgy_no_more_entries The end of the list of 
  67413.                                                   entries has been reached. 
  67414.  
  67415.                              sec_rgy_server_unavailable The requested registry 
  67416.                                                   server is unavailable. 
  67417.  
  67418.  Usage 
  67419.  
  67420.           The sec_rgy_unix_getgrgid routine returns the next UNIX group 
  67421.           structure that matches the input UNIX group ID.  The structure is in 
  67422.           the following form: 
  67423.  
  67424.                     typedef struct {
  67425.                           sec_rgy_name_t  name;
  67426.                           signed32  gid;
  67427.                           sec_rgy_member_buf_t  members;
  67428.                     }         sec_rgy_unix_group_t;
  67429.  
  67430.           The structure includes: 
  67431.  
  67432.             o  The name of the group. 
  67433.             o  The UNIX ID of the group. 
  67434.             o  A string containing the names of the group members. This string 
  67435.                is limited in size by the size of the sec_rgy_member_buf_t type 
  67436.                defined in rgybase.idl. 
  67437.  
  67438.           The routine also returns an array of member names, limited in size by 
  67439.           the num_members parameter. 
  67440.  
  67441.           This routine does not recognize implicit members of a group. It does 
  67442.           recognize those members of a group who have been added explicitly 
  67443.           (using the dcecp command). When an account is first defined, the 
  67444.           principal is assigned an organization and a group as part of its 
  67445.           account name. The principal therefore becomes a member of that group 
  67446.           without being explicitly defined as such. This routine does not list 
  67447.           any members that have been implicitly defined. To get all members of 
  67448.           a group, including the implicit members, you can use the 
  67449.           sec_rgy_pgo_get_members routine. 
  67450.  
  67451.           This routine is supplied in source code form. 
  67452.  
  67453.  Related Information 
  67454.  
  67455.           Routines: sec_rgy_unix_getgrent 
  67456.           sec_rgy_unix_getgrnam 
  67457.           sec_rgy_cursor_reset 
  67458.           sec_rgy_site_open 
  67459.  
  67460.  
  67461. ΓòÉΓòÉΓòÉ 8.9.70. sec_rgy_unix_getgrnam ΓòÉΓòÉΓòÉ
  67462.  
  67463.  Purpose 
  67464.  
  67465.           Returns a UNIX-style group entry for the account matching the 
  67466.           specified group name. 
  67467.  
  67468.  Library 
  67469.  
  67470.           \lib\dceos2.lib 
  67471.  
  67472.  Format 
  67473.  
  67474.                     #include <dce/rgybase.h>
  67475.                     #include <dce/unix.h>
  67476.  
  67477.                     void sec_rgy_unix_getgrnam(
  67478.                             sec_rgy_handle_t  context,
  67479.                             sec_rgy_name_t  name,
  67480.                             signed32  name_length,
  67481.                             signed32  max_num_members,
  67482.                             sec_rgy_cursor_t  marker,
  67483.                             sec_rgy_unix_group_t  group_entry,
  67484.                             signed32  num_members,
  67485.                             sec_rgy_member_t  members[],
  67486.                             error_status_t  *status);
  67487.  
  67488.  Parameters 
  67489.  
  67490.           Input 
  67491.  
  67492.           context       An opaque handle bound to a registry server.  Use 
  67493.                         sec_rgy_site_open to acquire a bound handle. 
  67494.  
  67495.           name          A character string (of type sec_rgy_name_t) specifying 
  67496.                         the group name to be matched. 
  67497.  
  67498.           name_length   A signed 32-bit integer specifying the length of name 
  67499.                         in characters. 
  67500.  
  67501.           max_num_members The maximum number of members to be returned by the 
  67502.                         routine. This must be no larger than the allocated size 
  67503.                         of the members array, and must not be negative.  If you 
  67504.                         specify a negative value for this parameter the routine 
  67505.                         uses 0 (zero). 
  67506.  
  67507.           Input/Output 
  67508.  
  67509.           marker        An opaque pointer that indicates a specific PGO item 
  67510.                         entry in the registry database. The 
  67511.                         sec_rgy_unix_getgrnam routine returns the PGO item 
  67512.                         indicated by marker, and advances the cursor to point 
  67513.                         to the next item in the database. When the end of the 
  67514.                         list of entries is reached, the routine returns 
  67515.                         sec_rgy_no_more_entries. Use sec_rgy_cursor_reset to 
  67516.                         refresh the cursor. 
  67517.  
  67518.           Output 
  67519.  
  67520.           group_entry   A UNIX-style group entry structure returned with 
  67521.                         information about the group matching name. 
  67522.  
  67523.           num_members   A signed 32-bit integer containing the total number of 
  67524.                         member names returned in the members array. 
  67525.  
  67526.           members       An array of character strings to receive the returned 
  67527.                         member names. The size allocated for the array is given 
  67528.                         by max_number. If this value is less than the total 
  67529.                         number of members in the membership list, multiple 
  67530.                         calls must be made to return all of the members. 
  67531.  
  67532.           status        On successful completion, the routine returns 
  67533.                         error_status_ok. Otherwise, it returns one of the 
  67534.                         following errors: 
  67535.  
  67536.                              sec_rgy_no_more_entries The end of the list of 
  67537.                                                   entries has been reached. 
  67538.  
  67539.                              sec_rgy_bad_data     The name supplied as input 
  67540.                                                   was too long. 
  67541.  
  67542.                              sec_rgy_server_unavailable The requested registry 
  67543.                                                   server is unavailable. 
  67544.  
  67545.  Usage 
  67546.  
  67547.           The sec_rgy_unix_getgrnam routine looks up the next group entry in 
  67548.           the registry that matches the input group name and returns the 
  67549.           corresponding UNIX-style group structure. The structure is in the 
  67550.           following form: 
  67551.  
  67552.                     typedef struct {
  67553.                           sec_rgy_name_t  name;
  67554.                           signed32  gid;
  67555.                           sec_rgy_member_buf_t  members;
  67556.                     }            sec_rgy_unix_group_t;
  67557.  
  67558.           The structure includes: 
  67559.  
  67560.             o  The name of the group. 
  67561.             o  The UNIX ID of the group. 
  67562.             o  A string containing the names of the group members. This string 
  67563.                is limited in size by the size of the sec_rgy_member_buf_t type 
  67564.                defined in rgybase.idl. 
  67565.  
  67566.           The routine also returns an array of member names, limited in size by 
  67567.           the num_members parameter. 
  67568.  
  67569.           This routine does not recognize implicit members of a group. It does 
  67570.           recognize those members of a group who have been added explicitly 
  67571.           (using the dcecp command). When an account is first defined, the 
  67572.           principal is assigned an organization and a group as part of its 
  67573.           account name. The principal therefore becomes a member of that group 
  67574.           without being explicitly defined as such. This routine does not list 
  67575.           any members that have been implicitly defined. To get all members of 
  67576.           a group, including the implicit members, you can use the 
  67577.           sec_rgy_pgo_get_members routine. 
  67578.  
  67579.           This routine is provided in source code form. 
  67580.  
  67581.  Related Information 
  67582.  
  67583.           Routines: sec_rgy_unix_getgrent 
  67584.           sec_rgy_unix_getgrgid 
  67585.           sec_rgy_cursor_reset 
  67586.           sec_rgy_site_open 
  67587.  
  67588.  
  67589. ΓòÉΓòÉΓòÉ 8.9.71. sec_rgy_unix_getpwent ΓòÉΓòÉΓòÉ
  67590.  
  67591.  Purpose 
  67592.  
  67593.           Returns a UNIX-style password entry. 
  67594.  
  67595.  Library 
  67596.  
  67597.           \lib\dceos2.lib 
  67598.  
  67599.  Format 
  67600.  
  67601.                     #include <dce/rgybase.h>
  67602.                     #include <dce/unix.h>
  67603.  
  67604.                     void sec_rgy_unix_getpwent (
  67605.                             sec_rgy_handle_t  context,
  67606.                             sec_rgy_cursor_t  *marker,
  67607.                             sec_rgy_unix_passwd_t  *passwd_entry,
  67608.                             error_status_t  *status);
  67609.  
  67610.  Parameters 
  67611.  
  67612.           Input 
  67613.  
  67614.           context       An opaque handle bound to a registry server.  Use 
  67615.                         sec_rgy_site_open to acquire a bound handle. 
  67616.  
  67617.           Input/Output 
  67618.  
  67619.           marker        An opaque pointer that indicates a specific PGO item 
  67620.                         entry in the registry database. The 
  67621.                         sec_rgy_unix_getpwent routine returns information about 
  67622.                         the item to which marker is pointing, and advances the 
  67623.                         cursor to point to the next item in the database.  When 
  67624.                         the end of the list of entries is reached, the routine 
  67625.                         returns sec_rgy_no_more_entries. Use 
  67626.                         sec_rgy_cursor_reset to refresh the cursor. 
  67627.  
  67628.           Output 
  67629.  
  67630.           passwd_entry  A UNIX-style password structure containing information 
  67631.                         obtained from the PGO item pointed to by marker at the 
  67632.                         beginning of the routine. 
  67633.  
  67634.           status        On successful completion, the routine returns 
  67635.                         error_status_ok.  Otherwise, it returns one of the 
  67636.                         following errors: 
  67637.  
  67638.                              sec_rgy_no_more_entries The end of the list of 
  67639.                                                   entries has been reached. 
  67640.  
  67641.                              sec_rgy_server_unavailable The registry server 
  67642.                                                   cannot be reached. 
  67643.  
  67644.  Usage 
  67645.  
  67646.           The sec_rgy_unix_getpwent routine returns a UNIX password structure 
  67647.           containing information obtained from the PGO item pointed to by the 
  67648.           cursor into the registry database.  The password structure is in the 
  67649.           form: 
  67650.  
  67651.                     typedef struct sec_rgy_unix_passwd_t {
  67652.                           sec_rgy_unix_login_name_t  name;
  67653.                           sec_rgy_unix_passwd_buf_t  passwd;
  67654.                           signed32  uid;
  67655.                           signed32  gid;
  67656.                           signed32  oid;
  67657.                           sec_rgy_unix_gecos_t  gecos;
  67658.                           sec_rgy_pname_t  homedir;
  67659.                           sec_rgy_pname_t  shell;
  67660.                     }   sec_rgy_unix_passwd_t;
  67661.  
  67662.           The structure includes: 
  67663.  
  67664.             o  The account's login name. 
  67665.             o  The account's password. 
  67666.             o  The account's UNIX ID. 
  67667.             o  The UNIX ID of the group and organization associated with the 
  67668.                account. 
  67669.             o  The account's GECOS information. 
  67670.             o  The account's home directory. 
  67671.             o  The account's login shell. 
  67672.  
  67673.  Related Information 
  67674.  
  67675.           Routines: sec_rgy_unix_getpwuid 
  67676.           sec_rgy_unix_getpwnam 
  67677.           sec_rgy_cursor_reset 
  67678.           sec_rgy_site_open 
  67679.  
  67680.           Files: 
  67681.           \include\dce\rgybase.idl - The idl file from which dce\rgybase.h was 
  67682.           derived. 
  67683.           \usr\include\dce\unix.idl - The idl file from which dce\unix.h was 
  67684.           derived. 
  67685.  
  67686.  
  67687. ΓòÉΓòÉΓòÉ 8.9.72. sec_rgy_unix_getpwnam ΓòÉΓòÉΓòÉ
  67688.  
  67689.  Purpose 
  67690.  
  67691.           Returns a UNIX-style passwd entry for the account matching the 
  67692.           specified name. 
  67693.  
  67694.  Library 
  67695.  
  67696.           \lib\dceos2.lib 
  67697.  
  67698.  Format 
  67699.  
  67700.                     #include <dce/rgybase.h>
  67701.                     #include <dce/unix.h>
  67702.  
  67703.                     void sec_rgy_unix_getpwnam(
  67704.                             sec_rgy_handle_t  context,
  67705.                             sec_rgy_name_t  name,
  67706.                             unsigned32  name_len,
  67707.                             sec_rgy_cursor_t  *marker,
  67708.                             sec_rgy_unix_passwd_t  *passwd_entry,
  67709.                             error_status_t  *status);
  67710.  
  67711.  Parameters 
  67712.  
  67713.           Input 
  67714.  
  67715.           context       An opaque handle bound to a registry server. Use the 
  67716.                         sec_rgy_site_open routine to acquire a bound handle. 
  67717.  
  67718.           name          A character string of type sec_rgy_name_t containing 
  67719.                         the name of the person whose name entry is desired. 
  67720.  
  67721.           name_len      A 32-bit integer representing the length of the name in 
  67722.                         characters. 
  67723.  
  67724.           Input/Output 
  67725.  
  67726.           marker        An opaque pointer that indicates a specific PGO item 
  67727.                         entry in the registry database. The 
  67728.                         sec_rgy_unix_getpwnam routine returns the PGO item 
  67729.                         indicated by marker, and advances the cursor to point 
  67730.                         to the next item in the database. When the end of the 
  67731.                         list of entries is reached, the routine returns 
  67732.                         sec_rgy_no_more_entries. Use the sec_rgy_cursor_reset 
  67733.                         routine to refresh the cursor. 
  67734.  
  67735.           Output 
  67736.  
  67737.           passwd_entry  A UNIX-style passwd structure returned with information 
  67738.                         about the account matching name. 
  67739.  
  67740.           status        On successful completion, the routine returns 
  67741.                         error_status_ok. Otherwise, it returns one of the 
  67742.                         following errors: 
  67743.  
  67744.                              sec_rgy_bad_data     The name supplied as input 
  67745.                                                   was too long. 
  67746.                              sec_rgy_no_more_entries The end of the list of 
  67747.                                                   entries has been reached. 
  67748.  
  67749.  Usage 
  67750.  
  67751.           The sec_rgy_unix_getpwnam routine returns the next UNIX passwd 
  67752.           structure that matches the input name. The structure is in the form: 
  67753.  
  67754.                     typedef struct {
  67755.                           sec_rgy_unix_login_name_t  name;
  67756.                           sec_rgy_unix_passwd_buf_t  passwd;
  67757.                           signed32  uid;
  67758.                           signed32  gid;
  67759.                           signed32  oid;
  67760.                           sec_rgy_unix_gecos_t  gecos;
  67761.                           sec_rgy_pname_t  homedir;
  67762.                           sec_rgy_pname_t  shell;
  67763.                     }  sec_rgy_unix_passwd_t;
  67764.  
  67765.           The structure includes: 
  67766.  
  67767.             o  The account's login name. 
  67768.             o  The account's password. 
  67769.             o  The account's UNIX ID. 
  67770.             o  The UNIX ID of the group and organization associated with the 
  67771.                account. 
  67772.             o  The account's GECOS information. 
  67773.             o  The account's home directory. 
  67774.             o  The account's login shell. 
  67775.  
  67776.           This routine is provided in source code form. 
  67777.  
  67778.  Related Information 
  67779.  
  67780.           Routines: 
  67781.           sec_rgy_unix_getpwent 
  67782.           sec_rgy_unix_getpwuid 
  67783.           sec_rgy_cursor_reset 
  67784.           sec_rgy_site_open 
  67785.  
  67786.           Files: 
  67787.           \include\dce\rgybase.idl - The idl file from which dce\rgybase.h was 
  67788.           derived. 
  67789.           \usr\include\dce\unix.idl - The idl file from which dce\unix.h was 
  67790.           derived. 
  67791.  
  67792.  
  67793. ΓòÉΓòÉΓòÉ 8.9.73. sec_rgy_unix_getpwuid ΓòÉΓòÉΓòÉ
  67794.  
  67795.  Purpose 
  67796.  
  67797.           Returns a UNIX-style passwd entry for the account matching the 
  67798.           specified UID. 
  67799.  
  67800.  Library 
  67801.  
  67802.           \lib\dceos2.lib 
  67803.  
  67804.  Format 
  67805.  
  67806.                     #include <dce/rgybase.h>
  67807.                     #include <dce/unix.h>
  67808.  
  67809.                     void sec_rgy_unix_getpwuid(
  67810.                             sec_rgy_handle_t  context,
  67811.                             signed32  uid,
  67812.                             sec_rgy_cursor_t  *marker,
  67813.                             sec_rgy_unix_passwd_t  *passwd_entry,
  67814.                             error_status_t  *status);
  67815.  
  67816.  Parameters 
  67817.  
  67818.           Input 
  67819.  
  67820.           context       An opaque handle bound to a registry server. Use the 
  67821.                         sec_rgy_site_open routine to acquire a bound handle. 
  67822.  
  67823.           uid           A 32-bit integer UNIX ID. 
  67824.  
  67825.           Input/Output 
  67826.  
  67827.           marker        An opaque pointer that indicates a specific PGO item 
  67828.                         entry in the registry database. The 
  67829.                         sec_rgy_unix_getpwuid routine returns the PGO item 
  67830.                         indicated by marker, and advances the cursor to point 
  67831.                         to the next item in the database. When the end of the 
  67832.                         list of entries is reached, the routine returns 
  67833.                         sec_rgy_no_more_entries. Use sec_rgy_cursor_reset to 
  67834.                         refresh the cursor. 
  67835.  
  67836.           Output 
  67837.  
  67838.           passwd_entry  A UNIX-style password structure returned with 
  67839.                         information about the account matching uid. 
  67840.  
  67841.           status        On successful completion, the routine returns 
  67842.                         error_status_ok. Otherwise, it returns one of the 
  67843.                         following errors: 
  67844.  
  67845.                              sec_rgy_no_more_entries The end of the list of 
  67846.                                                   entries has been reached. 
  67847.  
  67848.                              sec_rgy_server_unavailable The requested registry 
  67849.                                                   server is unavailable. 
  67850.  
  67851.  Usage 
  67852.  
  67853.           The sec_rgy_unix_getpwuid routine looks up the next passwd entry in 
  67854.           the registry that matches the input UNIX ID and returns the 
  67855.           corresponding sec_rgy_unix_passwd_t structure. The structure is in 
  67856.           the following form: 
  67857.  
  67858.                     typedef struct {
  67859.                           sec_rgy_unix_login_name_t  name;
  67860.                           sec_rgy_unix_passwd_buf_t  passwd;
  67861.                           signed32  uid;
  67862.                           signed32  gid;
  67863.                           signed32  oid;
  67864.                           sec_rgy_unix_gecos_t  gecos;
  67865.                           sec_rgy_pname_t  homedir;
  67866.                           sec_rgy_pname_t  shell;
  67867.                     }  sec_rgy_unix_passwd_t;
  67868.  
  67869.           The structure includes: 
  67870.  
  67871.             o  The account's login name. 
  67872.             o  The account's password. 
  67873.             o  The account's UNIX ID. 
  67874.             o  The UNIX ID of the group and organization associated with the 
  67875.                account. 
  67876.             o  The account's GECOS information. 
  67877.             o  The account's home directory. 
  67878.             o  The account's login shell. 
  67879.  
  67880.           This routine is provided in source code form. 
  67881.  
  67882.  Related Information 
  67883.  
  67884.           Routines: sec_rgy_unix_getpwent 
  67885.           sec_rgy_unix_getpwnam 
  67886.           sec_rgy_cursor_reset 
  67887.  
  67888.           Files: 
  67889.           \include\dce\rgybase.idl - The idl file from which dce\rgybase.h was 
  67890.           derived. 
  67891.           \usr\include\dce\unix.idl - The idl file from which dce\unix.h was 
  67892.           derived. 
  67893.  
  67894.  
  67895. ΓòÉΓòÉΓòÉ 8.9.74. sec_rgy_wait_until_consistent ΓòÉΓòÉΓòÉ
  67896.  
  67897.  Purpose 
  67898.  
  67899.           Blocks the caller while prior updates are propagated to the registry 
  67900.           replicas. 
  67901.  
  67902.  Format 
  67903.  
  67904.                     #include <dce/misc.h>
  67905.  
  67906.                     boolean32 sec_rgy_wait_until_consistent(
  67907.                              sec_rgy_handle_t  context,
  67908.                              error_status_t  *status);
  67909.  
  67910.  Parameters 
  67911.  
  67912.           Input 
  67913.  
  67914.           context       The registry server handle associated with the master 
  67915.                         registry. 
  67916.  
  67917.           Output 
  67918.  
  67919.           status        A pointer to the completion status.  On successful 
  67920.                         completion, the routine returns error_status_ok. 
  67921.                         Otherwise, it returns one of the following errors: 
  67922.  
  67923.                              sec_rgy_server_unavailable The server for the 
  67924.                                                       master registry is not 
  67925.                                                       available. 
  67926.  
  67927.                              sec_rgy_read_only        Either the master site is 
  67928.                                                       in maintenance mode or 
  67929.                                                       the site associated with 
  67930.                                                       the handle is a read-only 
  67931.                                                       (query) site. 
  67932.  
  67933.  Usage 
  67934.  
  67935.           The sec_rgy_wait_until_consistent routine blocks callers until all 
  67936.           prior updates to the master registry have been propagated to all 
  67937.           active registry replicas. 
  67938.  
  67939.  Return Codes 
  67940.  
  67941.           The routine returns TRUE when all replicas have received the prior 
  67942.           updates. It returns FALSE if at least one replica did not receive the 
  67943.           updates. 
  67944.  
  67945.  
  67946. ΓòÉΓòÉΓòÉ 9. DCE Event Management Service API ΓòÉΓòÉΓòÉ
  67947.  
  67948. The DCE Event Management Service (EMS) manages event services in a DCE cell. 
  67949. EMS consists of three parts:  break=fit. 
  67950.  
  67951.  The event supplier interface    Provides support for suppliers. A supplier can 
  67952.                                  be any DCE core service or DCE-based 
  67953.                                  application that emits event data. 
  67954.  
  67955.  The EMS daemon (emsd)           Responsible for the following tasks: 
  67956.  
  67957.                                    o  Authenticating and authorizing event 
  67958.                                       suppliers and consumers 
  67959.                                    o  Keeping databases of event types, event 
  67960.                                       filters, and consumers 
  67961.                                    o  Associating an event filter group with 
  67962.                                       each event consumer 
  67963.                                    o  Ensuring reliable delivery of events to 
  67964.                                       interested consumers 
  67965.  
  67966.  The event consumer interface    Provides support for the steps required to 
  67967.                                  implement an event consumer. An event consumer 
  67968.                                  performs the following tasks: 
  67969.  
  67970.                                    o  Query EMS for supported event types 
  67971.                                    o  Get a list of existing filter names 
  67972.                                    o  Construct event filters for each event 
  67973.                                       type 
  67974.                                    o  Add event filters to its event filter 
  67975.                                       group 
  67976.  
  67977.                                  Note:  The event consumer must be registered 
  67978.                                         with EMS and must set up event filter 
  67979.                                         groups before it can receive events. 
  67980.  
  67981.  
  67982.  The EMS API provides the following structures and interfaces: 
  67983.  
  67984.       EMS Data Structures 
  67985.       EMS Registration Routines 
  67986.       EMS Event Type Routines 
  67987.       EMS Supplier Routine 
  67988.       EMS Event Filter Routines 
  67989.       EMS Consumer Routines 
  67990.       EMS Management Routines 
  67991.  
  67992.  
  67993. ΓòÉΓòÉΓòÉ 9.1. EMS Data Structures ΓòÉΓòÉΓòÉ
  67994.  
  67995. The data structures for EMS are grouped by function.  The groups include the 
  67996. following: 
  67997.  
  67998.    o  EMS Event Attributes 
  67999.    o  EMS Event Structure 
  68000.    o  Event Types 
  68001.    o  EMS Event Filters 
  68002.    o  EMS Consumer Data Structures 
  68003.    o  EMS Server Data Structure 
  68004.  
  68005.  
  68006. ΓòÉΓòÉΓòÉ 9.1.1. EMS Event Attributes ΓòÉΓòÉΓòÉ
  68007.  
  68008.  ems_attr_type_t An unsigned16 integer that is used to specify the data type of 
  68009.            an event attribute. The attribute type specifies the format of the 
  68010.            data in the event attribute value union (ems_attr_value_t). An event 
  68011.            attribute type can be one of those in the following table: 
  68012.  
  68013.                       ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  68014.                       Γöé Table 18. Event Attribute Type Specifiers             Γöé
  68015.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68016.                       Γöé ATTRIBUTE TYPE     Γöé DATA TYPE    Γöé TAGGED UNION FIELD NAME Γöé
  68017.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  68018.                       Γöé ems_c_attr_small_int       Γöé idl_small_int     Γöé small_int             Γöé
  68019.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68020.                       Γöé ems_c_attr_short_int       Γöé idl_short_int     Γöé short_int             Γöé
  68021.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68022.                       Γöé ems_c_attr_long_int       Γöé idl_long_int     Γöé long_int             Γöé
  68023.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68024.                       Γöé ems_c_attr_hyper_int       Γöé idl_hyper_int     Γöé hyper_int             Γöé
  68025.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68026.                       Γöé ems_c_attr_usmall_int      Γöé idl_usmall_int    Γöé usmall_int            Γöé
  68027.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68028.                       Γöé ems_c_attr_ushort_int      Γöé idl_ushort_int    Γöé ushort_int            Γöé
  68029.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68030.                       Γöé ems_c_attr_ulong_int       Γöé idl_ulong_int     Γöé ulong_int             Γöé
  68031.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68032.                       Γöé ems_c_attr_uhyper_int      Γöé idl_uhyper_int    Γöé uhyper_int            Γöé
  68033.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68034.                       Γöé ems_c_attr_short_float      Γöé idl_short_float    Γöé short_float            Γöé
  68035.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68036.                       Γöé ems_c_attr_long_float      Γöé idl_long_float    Γöé long_float            Γöé
  68037.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68038.                       Γöé ems_c_attr_boolean        Γöé idl_boolean      Γöé bool               Γöé
  68039.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68040.                       Γöé ems_c_attr_uuid         Γöé uuid_t        Γöé uuid               Γöé
  68041.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68042.                       Γöé ems_c_attr_utc          Γöé utc_t *        Γöé utc                Γöé
  68043.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68044.                       Γöé ems_c_attr_severity       Γöé ems_severity_t    Γöé severity             Γöé
  68045.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68046.                       Γöé ems_c_attr_acl          Γöé sec_acl_t*      Γöé acl                Γöé
  68047.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68048.                       Γöé ems_c_attr_byte_string      Γöé idl_byte *      Γöé byte_string            Γöé
  68049.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68050.                       Γöé ems_c_attr_char_string      Γöé idl_char *      Γöé char_string            Γöé
  68051.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68052.                       Γöé ems_c_attr_bytes         Γöé ems_bytes_t      Γöé bytes               Γöé
  68053.                       ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  68054.  
  68055.            Byte strings and character strings are terminated with a 0 (zero) 
  68056.            byte. The pickling service of the IDL compiler can be used to encode 
  68057.            complex data types into byte strings that are to be included in an 
  68058.            EMS event. 
  68059.  
  68060.  ems_bytes_t A data type to define data stored as bytes. This type contains two 
  68061.            fields: 
  68062.  
  68063.                 size      An integer of type unsigned32 that indicates the size 
  68064.                           of the byte data. 
  68065.                 data      The byte data. 
  68066.  
  68067.  ems_attr_value_t A self-defining data structure that has an attribute type 
  68068.            specifier (format) that tells what type of data is in the union, and 
  68069.            then appropriate union members to hold the value of the data 
  68070.            specified. The format field is of type ems_attr_type_t, and can 
  68071.            contain only one of the tagged union fields described in Event 
  68072.            Attribute Type Specifiers 
  68073.  
  68074.  ems_attribute_t A structure that contains an event attribute name/type pair 
  68075.            that defines an event attribute. The ems_event_tdata type contains 
  68076.            an array of ems_attribute_t structures. Event attributes can be used 
  68077.            in defining the event types in event type schemas, and in defining 
  68078.            event filters in event filter expressions. The ems_attribute_t data 
  68079.            type contains two fields: 
  68080.  
  68081.                 attr_name      A name of type ems_string that specifies the 
  68082.                                attribute name 
  68083.                 attr_type      A value of type ems_attr_value_t that specifies 
  68084.                                the format of the attribute value 
  68085.  
  68086.  
  68087. ΓòÉΓòÉΓòÉ 9.1.2. EMS Event Structure ΓòÉΓòÉΓòÉ
  68088.  
  68089. The following data types define an event: 
  68090.  
  68091.  ems_event_type_t A variable that defines the type of event. Events can have 
  68092.            one of two default types: 
  68093.                 ems_c_generic_type  Generic 
  68094.                 ems_c_svc_type      SVC 
  68095.  
  68096.            Events of type generic do not have event type schemas associated 
  68097.            with them, and can only be filtered by expressions with header 
  68098.            attributes in them. This is a uuid_t data type. To examine the value 
  68099.            in this variable, use the uuid_compare routine. 
  68100.  ems_eventid_t A structure that contains the unique identifier for an event. 
  68101.            The event identifier contains the following fields: 
  68102.                 type      An event type of ems_event_type_t 
  68103.                 id        An identifier of type uuid_tthat is unique to a 
  68104.                           specific event. 
  68105.  ems_netname_t A structure containing the network name of a given host machine. 
  68106.  ems_nameservice_t An enumerated data type that specifies the name service that 
  68107.            recognizes the given network name. The possible values are: 
  68108.                 ems_ns_other   The name service is other than listed. 
  68109.                 ems_ns_dns     DNS name service. 
  68110.                 ems_ns_dce     DCE CDS name Service, the only value supported 
  68111.                                in this release. 
  68112.                 ems_ns_x500    X500. 
  68113.                 ems_ns_nis     NIS. 
  68114.                 ems_ns_sna     SNA network. 
  68115.  ems_netaddr_t A structure that contains the network name. The name is 
  68116.            interpreted according to the name service specified in 
  68117.            ems_nameservice_t. The ems_netaddr_t structure contains the 
  68118.            following fields: 
  68119.                 len       An unsigned short integer containing the length of 
  68120.                           the address 
  68121.  
  68122.                 name      The name, in an appropriate format. The name is of 
  68123.                           type ems_octet_t, and is of length len. The 
  68124.                           ems_octet_t data type is char. 
  68125.  
  68126.            For a DCE hostname, the following example sets the ems_netname_t 
  68127.            structure called netname: 
  68128.  
  68129.                       static char * dce_hostname = "/.:/hosts/eagle.austin.ibm.com";
  68130.                       ems_netname_t  netname;
  68131.  
  68132.                           netname.service = ems_ns_dce;
  68133.                           netname.netaddr->len = strlen( dce_hostname )+1;
  68134.                           netname.netaddr->name = (char *)malloc( netname.netaddr->len );
  68135.                           strcpy( netname.netaddr->name, dce_hostname );
  68136.  
  68137.  ems_origin_t A structure that indicates where the event originated; that is, 
  68138.            the name of the host where the supplier is running, the name of the 
  68139.            supplier, and the supplier process identification. These values 
  68140.            might not be valid for all hosts. This structure contains the 
  68141.            following fields: 
  68142.                 netname     The network name of the originator host, of type 
  68143.                             ems_netname_t. 
  68144.  
  68145.                 descname    The descriptive name of the supplier, of type char 
  68146.                             *. 
  68147.  
  68148.                 pid         The process ID of the originator, of type 
  68149.                             unsigned32. This ID is operating system-dependent. 
  68150.  
  68151.                 uid         The user ID of the originator, of type unsigned32. 
  68152.                             This ID is operating system-dependent. 
  68153.  
  68154.                 gid         The group ID of the originator, of type unsigned32. 
  68155.                             This ID is operating system-dependent. 
  68156.  ems_severity_t An enumerated variable that specifies the severity of the 
  68157.            event. The names have a one-to-one correspondence to DCE SVC 
  68158.            severity attribute values. (See the DCE for OS/2 Warp: Application 
  68159.            Development Guide - Core Components.) The event severity can have 
  68160.            one of the following values: 
  68161.                 ems_sev_info              Information event. 
  68162.                 ems_sev_fatal             Fatal event. 
  68163.                 ems_sev_error             Alert event. 
  68164.                 ems_sev_warning           Warning event. 
  68165.                 ems_sev_notice            Notice event. 
  68166.                 ems_sev_notice_verbose    Notice Verbose event. 
  68167.                 ems_sev_debug             Debug event. 
  68168.  ems_hdr_t A structure containing the header of the ems_event_t data structure. 
  68169.            The header contains the following fields: 
  68170.                 eventid   The event identifier, of type ems_eventid_t. 
  68171.  
  68172.                 origin    The event origin, of type ems_origin_t. 
  68173.  
  68174.                 severity  The event severity, of type ems_severity_t. 
  68175.  
  68176.                 received  A timestamp indicating the time the event was 
  68177.                           received. This timestamp is of type utc_t and is set 
  68178.                           by the EMS daemon. 
  68179.  
  68180.                 delivered A timestamp indicating the time the event was 
  68181.                           delivered to the consumer. This timestamp is of type 
  68182.                           utc_t and is set by the consumer. 
  68183.  
  68184.            A set of filter attributes are provided for event header filtering. 
  68185.            The following names can be used for the filter attribute in an event 
  68186.            filter expression. 
  68187.  
  68188.                 Attribute Name                Attribute Type 
  68189.                 eventid.id                    ems_c_attr_uuid 
  68190.                 eventid.type                  ems_c_attr_uuid 
  68191.                 origin.netname.service        ems_c_attr_ulong 
  68192.                 origin.netname.netaddr        ems_c_attr_bytes 
  68193.                 origin.descname               ems_c_attr_char_string 
  68194.                 origin.pid                    ems_c_attr_ulong 
  68195.                 origin.uid                    ems_c_attr_ulong 
  68196.                 origin.gid                    ems_c_attr_ulong 
  68197.                 severity                      ems_c_attr_ulong 
  68198.                 received                      ems_c_attr_utc 
  68199.  ems_event_t A structure containing a fixed header and a variable array. The 
  68200.            fields are as follows: 
  68201.                 header    The event header, a structure of type ems_hdr_t. 
  68202.  
  68203.                 count     An integer of type unsigned32, which contains the 
  68204.                           number of data items in the item array. 
  68205.  
  68206.                 item[]    An array of size count, containing ems_attribute_t 
  68207.                           attributes. Each data item is a self-defining value 
  68208.                           that contains an attribute type and attribute data. 
  68209.  
  68210.  
  68211. ΓòÉΓòÉΓòÉ 9.1.3. Event Types ΓòÉΓòÉΓòÉ
  68212.  
  68213. The EMS event type structures are used to define the EMS event types. 
  68214.  
  68215.  ems_event_type_schema_t A structure that is used to define an event type. The 
  68216.            event type schema specifies only the fixed part of an event. 
  68217.            Although the fixed part of an event must match the event type 
  68218.            schema, the event can have additional attributes that are unnamed in 
  68219.            the schema. The ems_event_type_schema_t structure contains the 
  68220.            following list of attributes: 
  68221.  
  68222.                 type      A structure of type ems_event_type_t containing an 
  68223.                           event type ID. 
  68224.  
  68225.                 name      A pointer to a character string that specifies the 
  68226.                           name of the event type. 
  68227.  
  68228.                 size      A long integer that contains the number of attributes 
  68229.                           in the attribute array. 
  68230.  
  68231.                 attribute[] An array of event type attributes of type 
  68232.                           ems_attribute_t describing the format of this event 
  68233.                           type. This array has size elements. 
  68234.  
  68235.  ems_event_type_list_t A structure that contains a list of event type schemas. 
  68236.            The structure contains the following fields: 
  68237.  
  68238.                 size      A long integer containing the number of event type 
  68239.                           schemas. 
  68240.  
  68241.                 schema[]  An array of size size of type ems_schema_ptr_t, which 
  68242.                           is defined as: 
  68243.  
  68244.                                                     typedef [ptr] ems_event_schema_t  *ems_schema_ptr_t;
  68245.  
  68246.  
  68247. ΓòÉΓòÉΓòÉ 9.1.4. EMS Event Filters ΓòÉΓòÉΓòÉ
  68248.  
  68249. The event filter data structures allow the definition of both event filters, 
  68250. and event filter lists. 
  68251.  
  68252.  ems_attr_op_t The attribute operator part of an event filter expression. 
  68253.            Attribute operators define the boolean operation to perform on the 
  68254.            attribute name and attribute value in an event filter expression. 
  68255.            The possible attribute operators are: 
  68256.  
  68257.                 Attribute Operator       Description 
  68258.                 ems_c_attr_op_eq         The attr_name is equal (==) to 
  68259.                                          attr_value. 
  68260.                 ems_c_attr_op_gt         The attr_name is greater than (>) 
  68261.                                          attr_value. 
  68262.                 ems_c_attr_op_lt         The attr_name is less than (<) 
  68263.                                          attr_value. 
  68264.                 ems_c_attr_op_ge         The attr_name is greater than or equal 
  68265.                                          (>=) to attr_value. 
  68266.                 ems_c_attr_op_le         The attr_name is less than or equal 
  68267.                                          (<=) to attr_value. 
  68268.                 ems_c_attr_op_ne         The attr_name is not equal (<>) to 
  68269.                                          attr_value. 
  68270.                 ems_c_attr_op_substr     The attr_name contains the string 
  68271.                                          value specified by attr_value. 
  68272.                 ems_c_attr_op_bitand     The attr_name that is bitwise ANDed 
  68273.                                          with attr_value is greater than 0. 
  68274.  
  68275.  ems_filter_exp_t A structure containing an event filter expression. This 
  68276.            structure contains the elements that are used to build an event 
  68277.            filter. Event filter expressions contain an attribute name, an 
  68278.            operator, and a value that define a boolean filter expression. The 
  68279.            fields are: 
  68280.  
  68281.                 attr_name      A pointer to a character string that contains 
  68282.                                the attribute name. 
  68283.                 attr_operator  An attribute operator of type ems_attr_op_t. 
  68284.                 attr_value     An attribute value of type ems_attr_value_t. 
  68285.  
  68286.            Filter Expression Operator Table describes what filter operators are 
  68287.            valid with each attribute type. 
  68288.  
  68289.                       ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  68290.                       Γöé Table 19. Filter Expression Operator Table                 Γöé
  68291.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68292.                       Γöé  DATA TYPE  Γöé  EQ  Γöé  GT  Γöé  LT  Γöé  GE  Γöé  LE  Γöé  NE  Γöé BITANDΓöé SUBSTRΓöé
  68293.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68294.                       Γöé small int  Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68295.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68296.                       Γöé short int  Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68297.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68298.                       Γöé long int   Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68299.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68300.                       Γöé hyper int  Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68301.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68302.                       Γöé usmall int  Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68303.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68304.                       Γöé ushort int  Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68305.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68306.                       Γöé ulong int  Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68307.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68308.                       Γöé uhyper int  Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68309.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68310.                       Γöé short float Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68311.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68312.                       Γöé long float  Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68313.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68314.                       Γöé boolean   Γöé  YES Γöé    Γöé    Γöé    Γöé    Γöé  YES Γöé    Γöé    Γöé
  68315.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68316.                       Γöé uuid     Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68317.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68318.                       Γöé utc     Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé    Γöé
  68319.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68320.                       Γöé severity   Γöé  YES Γöé    Γöé    Γöé    Γöé    Γöé  YES Γöé    Γöé    Γöé
  68321.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68322.                       Γöé acl     Γöé  YES Γöé    Γöé    Γöé    Γöé    Γöé  YES Γöé    Γöé    Γöé
  68323.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68324.                       Γöé byte string Γöé  YES Γöé    Γöé    Γöé    Γöé    Γöé  YES Γöé  YES  Γöé    Γöé
  68325.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68326.                       Γöé char string Γöé  YES Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES  Γöé  YES Γöé    Γöé  YES  Γöé
  68327.                       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  68328.                       Γöé bytes    Γöé  YES Γöé    Γöé    Γöé    Γöé    Γöé  YES Γöé  YES  Γöé    Γöé
  68329.                       ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  68330.  
  68331.  ems_filter_exp_list_t A structure containing a list of event filter 
  68332.            expressions. This structure groups filter expressions together in a 
  68333.            list to form an ANDed filter expression used to define an event 
  68334.            filter. The structure contains the following fields: 
  68335.  
  68336.                 size           A long integer indicating the number of filter 
  68337.                                expressions in the filter_exps array. 
  68338.  
  68339.                 filter_exps[]  An array of filter expressions of type 
  68340.                                ems_filter_exp_t. 
  68341.  
  68342.  ems_filter_t An event filter specifies a series of event filter expressions 
  68343.            that will be ANDed together to perform a filter operation. The event 
  68344.            filter structure contains the following fields: 
  68345.  
  68346.                 filter_name    The event filter name, which will be entered in 
  68347.                                the CDS name space. This name is of type 
  68348.                                ems_string_t. 
  68349.  
  68350.                 type           A structure of type ems_event_type_t that 
  68351.                                contains the type of event filter. 
  68352.  
  68353.                 filter_exp_list A list of filter expressions of type 
  68354.                                ems_filter_exp_list_t. 
  68355.  
  68356.            Filters with an event type of generic can only have filter 
  68357.            expressions with header attribute names in them. (See the event 
  68358.            header attributes listed in ems_hdr_t.) 
  68359.  
  68360.            The following example illustrates how to create a filter: 
  68361.  
  68362.                       /*------------------------------------------------*
  68363.                        * Create a filter that specifies all the events  *
  68364.                        * received between 1 and 2 AM GMT.               *
  68365.                        *------------------------------------------------*/
  68366.                        ems_filter_exp_list_t *     el = (ems_filter_exp_list_t *)
  68367.                            malloc(sizeof(ems_filter_exp_list_t)+(1*sizeof(ems_filter_exp_t));
  68368.                        el->size = 0;
  68369.                        el->filllter_exps[el->size].attr_name = (unsigned char *)"received.tod";
  68370.                        el->filter_exps[el->size].attr_operator = ems_c_attr_op_le;
  68371.                        el->filter_exps[el->size].attr_value.format = ems_c_attr_char_string;
  68372.                        el->filter_exps[el->size].attr_value.tagged_union.char_string = "0200";
  68373.                        el->size++;
  68374.                        el->filter_exps[el->size].attr_name = (unsigned char *)"received.tod";
  68375.                        el->filter_exps[el->size].attr_operator = ems_c_attr_op_gt;
  68376.                        el->filter_exps[el->size].attr_value.format = ems_c_attr_char_string;
  68377.                        el->filter_exps[el->size].attr_value.tagged_union.char_string = "0100";
  68378.                        el->size++;
  68379.  
  68380.  ems_string_t A pointer to a character string used to describe filter names. 
  68381.  
  68382.  ems_filtername_list_t A structure containing a list of event filter names. 
  68383.            This event filter list contains the following fields: 
  68384.  
  68385.                 size           A long integer that contains the number of names 
  68386.                                in the filter_names array. 
  68387.                 filter_names[] An array containing event filter names of type 
  68388.                                ems_string_t. 
  68389.  
  68390.  ems_filter_list_t A structure that contains an event filter list. The 
  68391.            structure contains the following fields: 
  68392.  
  68393.                 size      A long integer that contains the number of event 
  68394.                           filters in the filters array. 
  68395.                 filters[] An array of pointers to ems_filter_t structures that 
  68396.                           describe filters. 
  68397.  
  68398.  
  68399. ΓòÉΓòÉΓòÉ 9.1.5. EMS Consumer Data Structures ΓòÉΓòÉΓòÉ
  68400.  
  68401. These data structures make up the Consumer database in EMS. 
  68402.  
  68403.  ems_consumer_t A structure that defines an EMS consumer. Each consumer has the 
  68404.            following fields: 
  68405.  
  68406.                 name      A character string containing the DCE name of the 
  68407.                           consumer, which is entered in CDS. 
  68408.  
  68409.                 hostname  The DCE host name where the consumer is running, of 
  68410.                           type ems_netname_t. 
  68411.  
  68412.                 uuid      A uuid_t identifier unique to that consumer. 
  68413.  
  68414.  ems_consumer_list_t A structure that contains a list of consumer entries. The 
  68415.            structure has the following fields: 
  68416.  
  68417.                 size           A long integer containing the number of entries 
  68418.                                in the consumer array. 
  68419.                 consumer[]     An array of ems_consumer_t structures that 
  68420.                                contain consumer information. 
  68421.  
  68422.  
  68423. ΓòÉΓòÉΓòÉ 9.1.6. EMS Server Data Structure ΓòÉΓòÉΓòÉ
  68424.  
  68425.  ems_attrlist_t The attribute list data structure defines a list of server 
  68426.            attributes. Each attribute is a value maintained by an emsd server. 
  68427.            The attribute list can be used to query those values. The attribute 
  68428.            list contains the following fields: 
  68429.  
  68430.                 size      A long integer describing the number of attributes in 
  68431.                           the attr array. 
  68432.                 attr[]    An array of event type attributes of type 
  68433.                           ems_attribute_t. 
  68434.  
  68435.  
  68436. ΓòÉΓòÉΓòÉ 9.2. EMS Registration Routines ΓòÉΓòÉΓòÉ
  68437.  
  68438. The EMS API allows event suppliers and consumers to register with the EMS 
  68439. daemon. The EMS registration step provides a handle that is used for all future 
  68440. EMS operations. The registration step is required for all event suppliers and 
  68441. management applications. The following routines allow suppliers and management 
  68442. applications to register with the EMS daemon: 
  68443.  
  68444.  ems_register             Obtains an EMS handle for future calls to EMS 
  68445.                           routines. 
  68446.  ems_unregister           Frees the resources obtained by a call to 
  68447.                           ems_register. 
  68448.  
  68449.  
  68450. ΓòÉΓòÉΓòÉ 9.3. EMS Event Type Routines ΓòÉΓòÉΓòÉ
  68451.  
  68452. The EMS API allows event suppliers and consumers to get a list of event types 
  68453. from the EMS daemon. All events processed by the event service have an event 
  68454. type. Event types can be either generic or defined by an event type schema. The 
  68455. formats of EMS event types are defined by event type schemas, and are kept in 
  68456. the EMS Event Type database. 
  68457.  
  68458. A consumer can request a list of supported event types, and select the event 
  68459. types it wants to receive by using the event type schemas to construct event 
  68460. filters, and to map event data according to attribute names. For example, an 
  68461. event consumer can reconstruct an SVC message by using the attribute names to 
  68462. find the correct data items. 
  68463.  
  68464. Suppliers use event type schemas to define new event types that they intend to 
  68465. produce. EMS uses the event type schemas to apply event filters to events. 
  68466.  
  68467. The event service keeps a database of event types that consists of event type 
  68468. schemas.  The following routines allow you to manipulate the event types in the 
  68469. event type database: 
  68470.  
  68471.  ems_event_type_free_list       Frees the list of event type schemas. 
  68472.  ems_event_type_get_list        Gets a list of event type schemas from the 
  68473.                                 Event Type Database. 
  68474.  
  68475.  
  68476. ΓòÉΓòÉΓòÉ 9.4. EMS Supplier Routine ΓòÉΓòÉΓòÉ
  68477.  
  68478. The following routine allows event suppliers to send events to the EMS daemon: 
  68479.  
  68480.  ems_supplier_send              Sends an event to EMS. 
  68481.  
  68482.  
  68483. ΓòÉΓòÉΓòÉ 9.5. EMS Event Filter Routines ΓòÉΓòÉΓòÉ
  68484.  
  68485. Filters are the mechanism used by suppliers and consumers to control which 
  68486. events are sent through the event channel. Filtering is applied by the EMS 
  68487. daemon before forwarding events to consumers. The EMS API supports filtering by 
  68488. allowing event suppliers, consumers, and system administrators to manipulate 
  68489. the EMS Event Filter database. The event filter routines are as follows: 
  68490.  
  68491.  ems_filter_add                 Adds a filter to the Event Filter Database. 
  68492.  ems_filter_append              Appends filter expressions to the Event Filter 
  68493.                                 Database. 
  68494.  ems_filter_get                 Gets the contents of an event filter. 
  68495.  ems_filter_delete              Deletes a filter from the Event Filter 
  68496.                                 Database. 
  68497.  ems_filter_get_namelist        Gets a list of the names of all filters in the 
  68498.                                 Event Filter Database. 
  68499.  ems_filter_free                Frees an event filter. 
  68500.  ems_filter_free_namelist       Frees a list of event filter names. 
  68501.  ems_filter_get_list            Gets a list of all the filters in the Event 
  68502.                                 Filter Database. 
  68503.  ems_filter_free_list           Frees the list of filters. 
  68504.  
  68505.  
  68506. ΓòÉΓòÉΓòÉ 9.6. EMS Consumer Routines ΓòÉΓòÉΓòÉ
  68507.  
  68508. All event consumers must call the EMS event consumer setup routines before 
  68509. receiving EMS events. In DCE terms, EMS event consumers are both clients and 
  68510. servers. The following steps are required to implement an event consumer: 
  68511.  
  68512.    1. Set up as a DCE server. 
  68513.    2. Register an event handler with the EMS daemon to receive events. 
  68514.    3. Register with the EMS daemon. 
  68515.    4. Create filters to control the events forwarded from the daemon. 
  68516.    5. Start listening for events. 
  68517.  
  68518.  The EMS daemon maintains a consumer database to keep track of all registered 
  68519.  consumers. Registering and unregistering with the EMS daemon adds and deletes 
  68520.  consumers to and from the database. 
  68521.  
  68522.  The following routines set up the consumers using DCE RPC, and set up the 
  68523.  event handler routines. 
  68524.  
  68525.  ems_add_filter_to_group        Adds a filter name to a consumers event filter 
  68526.                                 group. 
  68527.  ems_consumer_handler_register  Registers a consumers event handler. 
  68528.  ems_consumer_register          Registers a consumer with EMS. 
  68529.  ems_consumer_start             Starts an event consumer. 
  68530.  ems_consumer_stop              Stops an event consumer. 
  68531.  ems_consumer_unregister        Unregisters a consumer with EMS. 
  68532.  ems_delete_filter_from_group   Deletes a filter name from a consumers event 
  68533.                                 filter group. 
  68534.  ems_get_filter_group           Gets the list of filter names that comprise a 
  68535.                                 consumers event filter group. 
  68536.  
  68537.  
  68538. ΓòÉΓòÉΓòÉ 9.7. EMS Management Routines ΓòÉΓòÉΓòÉ
  68539.  
  68540. The EMS Management interface provides a means to manage various aspects of EMS. 
  68541. Using this interface, applications can manage event consumers, event filters, 
  68542. and the EMS event log. System administrators can also use dcecp to manage the 
  68543. same set of resources. 
  68544.  
  68545. EMS also offers an interface to the EMS event log. This interface allows 
  68546. management applications to manipulate event logs. The log interface is a local 
  68547. interface only, and can only be run on the machine that runs the emsd server. 
  68548.  
  68549. The EMS event log is used to store events in case of EMS failures. EMS writes 
  68550. all events to the event log, and deletes the event record once the event has 
  68551. been transmitted to all consumers that are supposed to get the event. The event 
  68552. log is kept in a file on the machine where emsd is running.  Routines are 
  68553. provided to examine local event logs. 
  68554.  
  68555.  ems_mgmt_free_attributes            Frees a list of emsd server attributes. 
  68556.  
  68557.  ems_mgmt_free_consumers             Frees a list of consumers obtained from 
  68558.                                      ems_mgmt_list_consumers. 
  68559.  
  68560.  ems_mgmt_free_ems                   Frees a list of EMS host names obtained 
  68561.                                      from ems_mgmt_list_ems. 
  68562.  
  68563.  ems_mgmt_list_ems                   Lists all hosts running emsds. 
  68564.  
  68565.  ems_mgmt_list_attributes            Lists attributes for a specific emsd. 
  68566.  
  68567.  ems_mgmt_list_consumers             Lists consumers registered with EMS. 
  68568.  
  68569.  ems_mgmt_delete_consumer            Deletes a consumer from the Consumer 
  68570.                                      Database. 
  68571.  
  68572.  ems_mgmt_delete_filter_from_group   Deletes a filter name from a consumers 
  68573.                                      filter group. 
  68574.  
  68575.  ems_mgmt_add_filter_to_group        Adds a filter name to a consumers filter 
  68576.                                      group. 
  68577.  
  68578.  ems_mgmt_get_filter_group           Gets the list of names in a consumers 
  68579.                                      filter group. 
  68580.  
  68581.  ems_log_open                        Opens an EMS event log. 
  68582.  
  68583.  ems_log_read                        Reads events from an EMS event log. 
  68584.  
  68585.  ems_log_close                       Closes an EMS event log. 
  68586.  
  68587.  ems_log_rewind                      Rewinds an EMS event log. 
  68588.  
  68589.  
  68590. ΓòÉΓòÉΓòÉ 9.7.1. ems_add_filter_to_group ΓòÉΓòÉΓòÉ
  68591.  
  68592.  Purpose 
  68593.  
  68594.           Adds an event filter to a group. 
  68595.  
  68596.  Format 
  68597.  
  68598.                     #include <dce/ems.h>
  68599.  
  68600.                     void ems_add_filter_to_group(
  68601.                             ems_handle_t  handle,
  68602.                             ems_filtername_list_t  *event_filters,
  68603.                             error_status_t  *status);
  68604.  
  68605.  Parameters 
  68606.  
  68607.           Input 
  68608.  
  68609.           handle        Must contain a valid consumer handle obtained from 
  68610.                         ems_consumer_register. 
  68611.  
  68612.           event_filters A pointer to a list of one or more event filter names 
  68613.                         to add to this consumer's event filter group. Consumers 
  68614.                         can use the names of new event filters after building 
  68615.                         them with the ems_filter_add routine, or existing 
  68616.                         filters that can be obtained by using the 
  68617.                         ems_filter_get_namelist routine. 
  68618.  
  68619.           Output 
  68620.  
  68621.           status        A pointer to the completion status. On successful 
  68622.                         completion, the routine returns error_status_ok. 
  68623.                         Otherwise, the routine returns one of the following 
  68624.                         error codes: 
  68625.  
  68626.                              ems_s_insufficient_permission The routine does not 
  68627.                                                            have permission to 
  68628.                                                            perform the 
  68629.                                                            operation. 
  68630.  
  68631.                              ems_s_filter_list_empty       event_filters 
  68632.                                                            contains no event 
  68633.                                                            filter names. 
  68634.  
  68635.                              ems_s_filtername_exists       An event filter in 
  68636.                                                            event_filters 
  68637.                                                            already exists in 
  68638.                                                            the consumer's event 
  68639.                                                            filter group. 
  68640.  
  68641.                              ems_s_no_memory               Error allocating 
  68642.                                                            memory 
  68643.  
  68644.                              ems_s_invalid_handle          The handle is not 
  68645.                                                            valid. 
  68646.  
  68647.                              ems_s_invalid_name            A filter, consumer, 
  68648.                                                            or filter attribute 
  68649.                                                            name that contains 
  68650.                                                            characters that are 
  68651.                                                            not valid was 
  68652.                                                            specified. 
  68653.  
  68654.  Usage 
  68655.  
  68656.           The ems_add_filter_to_group routine is used by EMS event consumers to 
  68657.           add event filter names to a consumer's event filter group. This 
  68658.           routine can be called multiple times for each consumer. 
  68659.  
  68660.  Permissions Required 
  68661.  
  68662.           (w) on /.:/hosts/dce_hostname/ems-server/consumers 
  68663.  
  68664.  
  68665. ΓòÉΓòÉΓòÉ 9.7.2. ems_consumer_handler_register ΓòÉΓòÉΓòÉ
  68666.  
  68667.  Purpose 
  68668.  
  68669.           Registers a consumer event handler. 
  68670.  
  68671.  Format 
  68672.  
  68673.                     #include <dce/ems.h>
  68674.  
  68675.                     void ems_consumer_handler_register(
  68676.                             ems_handler_t  hfunc,
  68677.                             error_status_t  *status);
  68678.  
  68679.  Parameters 
  68680.  
  68681.           Input 
  68682.  
  68683.           hfunc         Specifies the name of the event handler function. The 
  68684.                         handler's signature should be: 
  68685.  
  68686.                                                 typedef void (*ems_handler_t) (
  68687.                                                         ems_event_t  *event,
  68688.                                                         error_status_t  *status);
  68689.  
  68690.           Output 
  68691.  
  68692.           status        A pointer to the completion status. On successful 
  68693.                         completion, the routine returns error_status_ok. 
  68694.                         Otherwise, the routine returns one of the following 
  68695.                         error codes: 
  68696.  
  68697.                              ems_s_no_memory               Error allocating 
  68698.                                                            memory. 
  68699.  
  68700.                              ems_s_mutex_init              Error initializing 
  68701.                                                            event queue. 
  68702.  
  68703.                              ems_s_cond_variable_init      Error initializing 
  68704.                                                            event queue. 
  68705.  
  68706.                              ems_s_pthread_create          Error initializing 
  68707.                                                            event queue. 
  68708.  
  68709.                              ems_s_consumer_not_started    Event consumer has 
  68710.                                                            not been started. 
  68711.  
  68712.  Usage 
  68713.  
  68714.           The ems_consumer_handler_register routine declares the event 
  68715.           consumer's event handler. The event consumer developer is responsible 
  68716.           for providing the handler to process events. 
  68717.  
  68718.           This routine does not make any RPC calls to EMS. 
  68719.  
  68720.  
  68721. ΓòÉΓòÉΓòÉ 9.7.3. ems_consumer_register ΓòÉΓòÉΓòÉ
  68722.  
  68723.  Purpose 
  68724.  
  68725.           Registers a consumer. 
  68726.  
  68727.  Format 
  68728.  
  68729.                     #include <dce/ems.h>
  68730.  
  68731.                     void ems_consumer_register(
  68732.                             ems_netname_t  *dce_hostname,
  68733.                             ems_filtername_list_t  *filter_group,
  68734.                             ems_handle_t  *handle,
  68735.                             error_status_t  *status);        /* register status    */
  68736.  
  68737.  Parameters 
  68738.  
  68739.           Input 
  68740.  
  68741.           dce_hostname  A pointer to the name of the DCE host machine where 
  68742.                         emsd is running. If the DCE host name is NULL, then the 
  68743.                         local host is assumed. 
  68744.  
  68745.                         Note:  dce_hostname is case sensitive. 
  68746.  
  68747.           filter_group  A pointer to a list of event filter names that define 
  68748.                         this consumer's initial event filter group. If 
  68749.                         filter_group is empty, no filter group is specified, 
  68750.                         and EMS will not forward any events to this consumer 
  68751.                         until the consumer makes a call to 
  68752.                         ems_add_event_to_group. 
  68753.  
  68754.           Output 
  68755.  
  68756.           handle        Returns an EMS handle that can be used on subsequent 
  68757.                         calls to EMS routines. 
  68758.  
  68759.           status        A pointer to the completion status. On successful 
  68760.                         completion, the routine returns error_status_ok. 
  68761.                         Otherwise, it returns one of the following status 
  68762.                         codes: 
  68763.  
  68764.                              ems_s_no_memory                Error allocating 
  68765.                                                             memory. 
  68766.  
  68767.                              ems_s_already_registered       Consumer with this 
  68768.                                                             name already 
  68769.                                                             registered. 
  68770.  
  68771.                              ems_s_mutex_init               Error initializing 
  68772.                                                             event queue. 
  68773.  
  68774.                              ems_s_cond_variable_init       Error initializing 
  68775.                                                             event queue. 
  68776.  
  68777.                              ems_s_pthread_create           Error initializing 
  68778.                                                             event queue. 
  68779.  
  68780.                              ems_s_insufficient_permission  No permission to 
  68781.                                                             perform the 
  68782.                                                             requested 
  68783.                                                             operation. 
  68784.  
  68785.                              ems_s_consumer_not_started     Event consumer has 
  68786.                                                             not been started. 
  68787.  
  68788.                              ems_s_unsupported_nameservice  Nameservice is not 
  68789.                                                             supported. 
  68790.  
  68791.  Usage 
  68792.  
  68793.           The ems_consumer_register routine is used by EMS event consumers to 
  68794.           register with EMS. This routine should be called once for each DCE 
  68795.           host from which this consumer wants to receive events. This routine 
  68796.           must be called after a call to ems_consumer_start. 
  68797.  
  68798.  Permissions Required 
  68799.  
  68800.           (i) on /.:/hosts/dce_hostname/ems-server/consumers 
  68801.  
  68802.  
  68803. ΓòÉΓòÉΓòÉ 9.7.4. ems_consumer_start ΓòÉΓòÉΓòÉ
  68804.  
  68805.  Purpose 
  68806.  
  68807.           Starts a consumer. 
  68808.  
  68809.  Format 
  68810.  
  68811.                     #include <dce/ems.h>
  68812.  
  68813.                     void ems_consumer_start(
  68814.                             char  *consumer,
  68815.                             unsigned32  flags,
  68816.                             error_status_t  *status);
  68817.  
  68818.  Parameters 
  68819.  
  68820.           Input 
  68821.  
  68822.           consumer      A pointer to the consumer name. This name must be 
  68823.                         unique, and is registered in the CDS namespace under 
  68824.                         /.:/hosts/dce_hostname/ems/consumers. The name is used 
  68825.                         by the administrative interface to refer to this 
  68826.                         consumer. 
  68827.  
  68828.           flags         Reserved for future use. 
  68829.  
  68830.           Output 
  68831.  
  68832.           status        A pointer to the completion status. Upon successful 
  68833.                         completion, the routine returns error_status_ok. 
  68834.                         Otherwise, it returns one of the following error codes: 
  68835.  
  68836.                              ems_s_no_memory                 Error allocating 
  68837.                                                              memory. 
  68838.  
  68839.                              ems_s_consumer_already_started  consumer already 
  68840.                                                              started. 
  68841.  
  68842.                              ems_s_invalid_name              A filter, 
  68843.                                                              consumer, or 
  68844.                                                              filter attribute 
  68845.                                                              name that contains 
  68846.                                                              characters that 
  68847.                                                              are not valid was 
  68848.                                                              specified. 
  68849.  
  68850.  Usage 
  68851.  
  68852.           The ems_consumer_start routine should be called at the beginning of 
  68853.           each event consumer before making any register calls. It creates an 
  68854.           object UUID to uniquely identify this event consumer and register its 
  68855.           endpoint so that EMS can send this consumer event data. 
  68856.  
  68857.           This routine does not make any RPCs to EMS. 
  68858.  
  68859.  
  68860. ΓòÉΓòÉΓòÉ 9.7.5. ems_consumer_stop ΓòÉΓòÉΓòÉ
  68861.  
  68862.  Purpose 
  68863.  
  68864.           Stops a consumer. 
  68865.  
  68866.  Format 
  68867.  
  68868.                     #include <dce/ems.h>
  68869.  
  68870.                     void ems_consumer_stop(
  68871.                             error_status_t  *status);
  68872.  
  68873.  Parameters 
  68874.  
  68875.           Output 
  68876.  
  68877.           status        A pointer to the completion status. On successful 
  68878.                         completion the routine returns error_status_ok. 
  68879.                         Otherwise, it returns ems_s_consumer_not_started, which 
  68880.                         indicates that the specified event consumer has not 
  68881.                         been started. 
  68882.  
  68883.  Usage 
  68884.  
  68885.           The ems_consumer_stop routine should be called at the end of each 
  68886.           event consumer after a call to ems_s_consumer_start. It unregisters 
  68887.           the endpoint of this event consumer and kills the thread that was 
  68888.           created by the consumer's event handler interface to receive all 
  68889.           events from EMS. 
  68890.  
  68891.           This routine does not make any RPCs to EMS. 
  68892.  
  68893.  
  68894. ΓòÉΓòÉΓòÉ 9.7.6. ems_consumer_unregister ΓòÉΓòÉΓòÉ
  68895.  
  68896.  Purpose 
  68897.  
  68898.           Unregisters a consumer. 
  68899.  
  68900.  Format 
  68901.  
  68902.                     #include <dce/ems.h>
  68903.  
  68904.                     void ems_consumer_unregister(
  68905.                             ems_handle_t  *handle,
  68906.                             error_status_t  *status);
  68907.  
  68908.  Parameters 
  68909.  
  68910.           Input 
  68911.  
  68912.           handle        A handle returned from a call to ems_consumer_register. 
  68913.                         This routine frees memory used by handle, and sets 
  68914.                         handle to NULL. 
  68915.  
  68916.           Output 
  68917.  
  68918.           status        A pointer to the completion status. Upon successful 
  68919.                         completion, this routine returns error_status_ok. 
  68920.                         Otherwise, it returns one of the following error codes: 
  68921.  
  68922.                              ems_s_unknown_consumer        Tried to unregister 
  68923.                                                            a consumer that was 
  68924.                                                            not registered. 
  68925.  
  68926.                              ems_s_consumer_not_started    Consumer has not 
  68927.                                                            been started. 
  68928.  
  68929.                              ems_s_insufficient_permission No permission to 
  68930.                                                            perform the 
  68931.                                                            requested operation. 
  68932.  
  68933.                              ems_s_invalid_handle          The handle is not 
  68934.                                                            valid. 
  68935.  
  68936.  Usage 
  68937.  
  68938.           The ems_consumer_unregister routine is used by EMS event consumers to 
  68939.           unregister with EMS. This routine should be called once for each call 
  68940.           to ems_consumer_register. The event consumer should call this routine 
  68941.           before calling the ems_consumer_stop routine. 
  68942.  
  68943.  Permissions Required 
  68944.  
  68945.           (d) on /.:/hosts/dce_hostname/ems-server/consumers 
  68946.  
  68947.  
  68948. ΓòÉΓòÉΓòÉ 9.7.7. ems_delete_filter_from_group ΓòÉΓòÉΓòÉ
  68949.  
  68950.  Purpose 
  68951.  
  68952.           Deletes an event filter from a group. 
  68953.  
  68954.  Format 
  68955.  
  68956.                     #include <dce/ems.h>
  68957.  
  68958.                     void ems_delete_filter_from_group(
  68959.                             ems_handle_t handle,
  68960.                             ems_filtername_list_t *filter_name,
  68961.                             error_status_t *status);
  68962.  
  68963.  Parameters 
  68964.  
  68965.           Input 
  68966.  
  68967.           handle        Must contain a valid consumer handle obtained from 
  68968.                         ems_consumer_register. 
  68969.  
  68970.           filter_name   A pointer to the event filter names to delete from the 
  68971.                         consumer's event filter group. 
  68972.  
  68973.           Output 
  68974.  
  68975.           status        A pointer to the completion status. Upon successful 
  68976.                         completion, this routine returns error_status_ok. 
  68977.                         Otherwise, it returns one of the following error codes: 
  68978.  
  68979.                              ems_s_filter_list_empty       No filter names were 
  68980.                                                            specified for 
  68981.                                                            deletion. 
  68982.  
  68983.                              ems_s_filtername_not_there    Specified filter 
  68984.                                                            name to delete not 
  68985.                                                            in group. 
  68986.  
  68987.                              ems_s_no_memory               Error allocating 
  68988.                                                            memory. 
  68989.  
  68990.                              ems_s_insufficient_permission No permission to 
  68991.                                                            perform the 
  68992.                                                            requested operation. 
  68993.  
  68994.                              ems_s_invalid_handle          The handle is not 
  68995.                                                            valid. 
  68996.  
  68997.                              ems_s_invalid_name            A filter, consumer, 
  68998.                                                            or filter attribute 
  68999.                                                            name that contains 
  69000.                                                            characters that are 
  69001.                                                            not valid was 
  69002.                                                            specified. 
  69003.  
  69004.  Usage 
  69005.  
  69006.           The ems_delete_filter_from_group routine is used by EMS event 
  69007.           consumers to delete event filter names from consumer event filter 
  69008.           groups. 
  69009.  
  69010.  Permissions Required 
  69011.  
  69012.           (w) on /.:/hosts/dce_hostname/ems-server/consumers 
  69013.  
  69014.  
  69015. ΓòÉΓòÉΓòÉ 9.7.8. ems_event_type_free_list ΓòÉΓòÉΓòÉ
  69016.  
  69017.  Purpose 
  69018.  
  69019.           Frees an event type list. 
  69020.  
  69021.  Format 
  69022.  
  69023.                     #include <dce/ems.h>
  69024.  
  69025.                     void ems_event_type_free_list(
  69026.                             ems_event_type_list_t  **type_list,
  69027.                             error_status_t  *status);
  69028.  
  69029.  Parameters 
  69030.  
  69031.           Input 
  69032.  
  69033.           type_list     A pointer to an event type list as returned by 
  69034.                         ems_event_type_get_list. This routine sets type_list to 
  69035.                         NULL. 
  69036.  
  69037.           Output 
  69038.  
  69039.           status        A pointer to the completion status. Upon successful 
  69040.                         completion, this routine returns error_status_ok. 
  69041.  
  69042.  Usage 
  69043.  
  69044.           The ems_event_type_free_list routine is used by callers of 
  69045.           ems_get_event_types to free the storage used by an event type list. 
  69046.  
  69047.  
  69048. ΓòÉΓòÉΓòÉ 9.7.9. ems_event_type_get_list ΓòÉΓòÉΓòÉ
  69049.  
  69050.  Purpose 
  69051.  
  69052.           Gets an event types list. 
  69053.  
  69054.  Format 
  69055.  
  69056.                     #include <dce/ems.h>
  69057.  
  69058.                     void ems_event_type_get_list(
  69059.                             ems_handle_t  handle,
  69060.                             ems_event_type_list_t  **type_list,
  69061.                             error_status_t  *status);
  69062.  
  69063.  Parameters 
  69064.  
  69065.           Input 
  69066.  
  69067.           handle        The handle returned from a call to 
  69068.                         ems_consumer_register. 
  69069.  
  69070.           Output 
  69071.  
  69072.           type_list     Returns the list of available event types. 
  69073.  
  69074.           status        A pointer to the completion status. Upon successful 
  69075.                         completion, this routine returns error_status_ok. 
  69076.                         Otherwise, it returns one of the following error codes: 
  69077.  
  69078.                              ems_s_no_type_list            There is no event 
  69079.                                                            type list available. 
  69080.  
  69081.                              ems_s_no_memory               Error allocating 
  69082.                                                            memory. 
  69083.  
  69084.                              ems_s_insufficient_permission No permission to 
  69085.                                                            perform the 
  69086.                                                            requested operation. 
  69087.  
  69088.                              ems_s_invalid_handle          The handle is not 
  69089.                                                            valid. 
  69090.  
  69091.  Usage 
  69092.  
  69093.           The ems_event_type_get_list routine is used by EMS event consumers to 
  69094.           find out what event types are available to register for. The consumer 
  69095.           can then set up filters for attributes in one of the available event 
  69096.           types. 
  69097.  
  69098.  Permissions Required 
  69099.  
  69100.           (r) on /.:/hosts/dce_hostname/ems-server/event-types 
  69101.  
  69102.  
  69103. ΓòÉΓòÉΓòÉ 9.7.10. ems_filter_add ΓòÉΓòÉΓòÉ
  69104.  
  69105.  Purpose 
  69106.  
  69107.           Adds an event filter. 
  69108.  
  69109.  Format 
  69110.  
  69111.                     #include <dce/ems.h>
  69112.  
  69113.                     void ems_filter_add(
  69114.                             ems_handle_t  handle,
  69115.                             ems_string_t  filter_name,
  69116.                             ems_event_type_t  type,
  69117.                             ems_filter_exp_list_t  *exp_list
  69118.                             error_status_t  *status);
  69119.  
  69120.  Parameters 
  69121.  
  69122.           Input 
  69123.  
  69124.           handle        A handle returned from a call to ems_consumer_register. 
  69125.  
  69126.           filter_name   Specifies the event filter name for this event filter. 
  69127.                         This name can be used to add the event filter to a 
  69128.                         consumer's event filter group. 
  69129.  
  69130.           type          Specifies the event type that this filter is applied 
  69131.                         against. 
  69132.  
  69133.           exp_list      Pointer to a list of filter expressions that are part 
  69134.                         of the event filter filter_name. 
  69135.  
  69136.           Output 
  69137.  
  69138.           status        A pointer to the completion status. Upon successful 
  69139.                         completion, this routine returns error_status_ok. 
  69140.                         Otherwise it returns one of the following error codes: 
  69141.  
  69142.                              ems_s_filter_exists           The given filter 
  69143.                                                            name already exists. 
  69144.  
  69145.                              ems_s_invalid_filter          The input parameter 
  69146.                                                            specifies an invalid 
  69147.                                                            filter. 
  69148.  
  69149.                              ems_s_insufficient_permission No permission to 
  69150.                                                            perform the 
  69151.                                                            requested operation. 
  69152.  
  69153.                              ems_s_invalid_handle          The handle is not 
  69154.                                                            valid. 
  69155.  
  69156.                              ems_s_invalid_name            A filter, consumer, 
  69157.                                                            or filter attribute 
  69158.                                                            name that contains 
  69159.                                                            characters that are 
  69160.                                                            not valid was 
  69161.                                                            specified. 
  69162.  
  69163.  Usage 
  69164.  
  69165.           The ems_filter_add routine is used to add a new event filter to the 
  69166.           EMS Event Filter Database. 
  69167.  
  69168.  Permissions Required 
  69169.  
  69170.           (i) on /.:/hosts/dce_hostname/ems-server/filters 
  69171.  
  69172.  
  69173. ΓòÉΓòÉΓòÉ 9.7.11. ems_filter_append ΓòÉΓòÉΓòÉ
  69174.  
  69175.  Purpose 
  69176.  
  69177.           Appends to an event filter. 
  69178.  
  69179.  Format 
  69180.  
  69181.                     #include <dce/ems.h>
  69182.  
  69183.                     void ems_filter_append(
  69184.                             ems_handle_t  handle,
  69185.                             ems_string_t  filter_name,
  69186.                             ems_filter_exp_list_t  *exp_list,
  69187.                             error_status_t  *status);
  69188.  
  69189.  Parameters 
  69190.  
  69191.           Input 
  69192.  
  69193.           handle        The handle returned from a call to 
  69194.                         ems_consumer_register. 
  69195.  
  69196.           filter_name   Specifies the name of the event filter to add the 
  69197.                         filter expressions to. 
  69198.  
  69199.           exp_list      A list of filter expressions that will be added to the 
  69200.                         end of event filter filter_name. 
  69201.  
  69202.           Output 
  69203.  
  69204.           status        A pointer to the completion status. Upon successful 
  69205.                         completion, this routine returns error_status_ok. 
  69206.                         Otherwise, it returns one of the following error codes: 
  69207.  
  69208.                              ems_s_invalid_filter          The input parameter 
  69209.                                                            specifies an invalid 
  69210.                                                            filter. 
  69211.  
  69212.                              ems_s_filter_not_found        The specified filter 
  69213.                                                            was not found. 
  69214.  
  69215.                              ems_s_insufficient_permission No permission for 
  69216.                                                            the requested 
  69217.                                                            operation. 
  69218.  
  69219.                              ems_s_invalid_handle          The handle is not 
  69220.                                                            valid. 
  69221.  
  69222.                              ems_s_invalid_name            A filter, consumer, 
  69223.                                                            or filter attribute 
  69224.                                                            name that contains 
  69225.                                                            characters that are 
  69226.                                                            not valid was 
  69227.                                                            specified. 
  69228.  
  69229.  Usage 
  69230.  
  69231.           The ems_filter_append routine is used to add filter expressions to an 
  69232.           event filter. The filter expressions are added to the end of the 
  69233.           current list of filter expressions in the event filter. 
  69234.  
  69235.  Permissions Required 
  69236.  
  69237.           (w) on /.:/hosts/dce_hostname/ems-server/filters/filter_name 
  69238.  
  69239.  
  69240. ΓòÉΓòÉΓòÉ 9.7.12. ems_filter_delete ΓòÉΓòÉΓòÉ
  69241.  
  69242.  Purpose 
  69243.  
  69244.           Deletes an event filter. 
  69245.  
  69246.  Format 
  69247.  
  69248.                     #include <dce/ems.h>
  69249.  
  69250.                     void ems_filter_delete(
  69251.                             ems_handle_t  handle,
  69252.                             ems_string_t  filter_name,
  69253.                             error_status_t  *status);
  69254.  
  69255.  Parameters 
  69256.  
  69257.           Input 
  69258.  
  69259.           handle        The handle returned from a call to 
  69260.                         ems_consumer_register. 
  69261.  
  69262.           filter_name   Specifies the name of the event filter to delete. 
  69263.  
  69264.           Output 
  69265.  
  69266.           status        A pointer to the completion status. Upon successful 
  69267.                         completion, this routine returns error_status_ok. 
  69268.                         Otherwise, it returns one of the following error codes: 
  69269.  
  69270.                              ems_s_filter_not_found       The specified filter 
  69271.                                                           name was not found in 
  69272.                                                           the filter database. 
  69273.  
  69274.                              ems_s_filter_in_use          The specified filter 
  69275.                                                           name appears in a 
  69276.                                                           consumer's event 
  69277.                                                           filter group. 
  69278.  
  69279.                              ems_s_insufficient_permission No permission for 
  69280.                                                           the requested 
  69281.                                                           operation. 
  69282.  
  69283.                              ems_s_invalid_handle         The handle is not 
  69284.                                                           valid. 
  69285.  
  69286.                              ems_s_invalid_name           A filter, consumer, 
  69287.                                                           or filter attribute 
  69288.                                                           name that contains 
  69289.                                                           characters that are 
  69290.                                                           not valid was 
  69291.                                                           specified. 
  69292.  
  69293.  Usage 
  69294.  
  69295.           The ems_filter_delete routine is used to delete an event filter from 
  69296.           the Event Filter Database. The name filter_name cannot appear in any 
  69297.           consumer's event filter group when this routine is called. 
  69298.  
  69299.  Permissions Required 
  69300.  
  69301.           (d) on /.:/hosts/dce_hostname/ems-server/filters/filter_name, or 
  69302.           (d) on /.:/hosts/dce_hostname/ems-server/filters 
  69303.  
  69304.  
  69305. ΓòÉΓòÉΓòÉ 9.7.13. ems_filter_free ΓòÉΓòÉΓòÉ
  69306.  
  69307.  Purpose 
  69308.  
  69309.           Frees an event filter. 
  69310.  
  69311.  Format 
  69312.  
  69313.                     #include <dce/ems.h>
  69314.  
  69315.                     void ems_filter_free(
  69316.                             ems_filter_exp_list_t  **exp_list,
  69317.                             error_status_t  *status);
  69318.  
  69319.  Parameters 
  69320.  
  69321.           Input 
  69322.  
  69323.           exp_list      A pointer to a list of filter expressions to free. 
  69324.  
  69325.           Output 
  69326.  
  69327.           status        A pointer to the completion status. Upon successful 
  69328.                         completion, this routine returns error_status_ok. 
  69329.                         Otherwise, it returns an error. 
  69330.  
  69331.  Usage 
  69332.  
  69333.           The ems_filter_free routine is used to free a list of event filter 
  69334.           expressions obtained by a call to the ems_filter_get routine. 
  69335.  
  69336.  
  69337. ΓòÉΓòÉΓòÉ 9.7.14. ems_filter_free_list ΓòÉΓòÉΓòÉ
  69338.  
  69339.  Purpose 
  69340.  
  69341.           Frees an event filter list. 
  69342.  
  69343.  Format 
  69344.  
  69345.                     #include <dce/ems.h>
  69346.  
  69347.                     void ems_filter_free_list(
  69348.                             ems_filter_list_t  **filter_list,
  69349.                             error_status_t  *status);
  69350.  
  69351.  Parameters 
  69352.  
  69353.           Input/Output 
  69354.  
  69355.           filter_list   A pointer to a list of event filters that make up the 
  69356.                         Event Filter Database as returned by the routine 
  69357.                         ems_filter_get_list. On output, filter_list is set to 
  69358.                         NULL. 
  69359.  
  69360.           Output 
  69361.  
  69362.           status        A pointer to the completion status. Upon successful 
  69363.                         completion, this routine returns error_status_ok. 
  69364.  
  69365.  Usage 
  69366.  
  69367.           The ems_filter_free_list routine is used by callers of 
  69368.           ems_get_event_filter_database to free the storage used by an Event 
  69369.           Filter Database (ems_filter_db_t) structure. 
  69370.  
  69371.  
  69372. ΓòÉΓòÉΓòÉ 9.7.15. ems_filter_free_namelist ΓòÉΓòÉΓòÉ
  69373.  
  69374.  Purpose 
  69375.  
  69376.           Frees a list of event filter names. 
  69377.  
  69378.  Format 
  69379.  
  69380.                     #include <dce/ems.h>
  69381.  
  69382.                     void ems_filter_free_namelist(
  69383.                             ems_filtername_list_t  **name_list,
  69384.                             error_status_t  *status);
  69385.  
  69386.  Parameters 
  69387.  
  69388.           Input 
  69389.  
  69390.           name_list     A pointer to a list of filter names to free. 
  69391.  
  69392.           Output 
  69393.  
  69394.           status        A pointer to the completion status. Upon successful 
  69395.                         completion, this routine returns error_status_ok. 
  69396.                         Otherwise, it returns an error. 
  69397.  
  69398.  Usage 
  69399.  
  69400.           The ems_filter_free_namelist routine is used to free a list of filter 
  69401.           names returned by various routines. The routines that return a list 
  69402.           of filter names are: 
  69403.  
  69404.                ems_filter_get_namelist 
  69405.                ems_get_filter_group 
  69406.                ems_mgmt_get_filter_group 
  69407.  
  69408.  
  69409. ΓòÉΓòÉΓòÉ 9.7.16. ems_filter_get ΓòÉΓòÉΓòÉ
  69410.  
  69411.  Purpose 
  69412.  
  69413.           Gets an event filter. 
  69414.  
  69415.  Format 
  69416.  
  69417.                     #include <dce/ems.h>
  69418.  
  69419.                     void ems_filter_get(
  69420.                             ems_handle_t  handle,
  69421.                             ems_string_t  filter_name,
  69422.                             ems_event_type_t  *filter_type,
  69423.                             ems_filter_exp_list_t  **exp_list,
  69424.                             error_status_t  *status);
  69425.  
  69426.  Parameters 
  69427.  
  69428.           Input 
  69429.  
  69430.           handle        The handle returned from a call to 
  69431.                         ems_consumer_register. 
  69432.  
  69433.           filter_name   Specifies the name of the event filter to get. 
  69434.  
  69435.           Output 
  69436.  
  69437.           filter_type   Specifies the event type of the filter. 
  69438.  
  69439.           exp_list      A pointer to the list of filter expressions that are 
  69440.                         part of event filter filter_name. 
  69441.  
  69442.           status        A pointer to the completion status. Upon successful 
  69443.                         completion, this routine returns error_status_ok. 
  69444.                         Otherwise, it returns one of the following error codes: 
  69445.  
  69446.                              ems_s_filter_not_found        The specified filter 
  69447.                                                            name was not found 
  69448.                                                            in the filter 
  69449.                                                            database. 
  69450.  
  69451.                              ems_s_insufficient_permission No permission for 
  69452.                                                            the requested 
  69453.                                                            operation. 
  69454.  
  69455.                              ems_s_invalid_handle          The handle is not 
  69456.                                                            valid. 
  69457.  
  69458.                              ems_s_invalid_name            A filter, consumer, 
  69459.                                                            or filter attribute 
  69460.                                                            name that contains 
  69461.                                                            characters that are 
  69462.                                                            not valid was 
  69463.                                                            specified. 
  69464.  
  69465.  Usage 
  69466.  
  69467.           The ems_filter_get routine is used to get the filter expressions in 
  69468.           an event filter. 
  69469.  
  69470.  Permissions Required 
  69471.  
  69472.           (r) on /.:/hosts/dce_hostname/ems-server/filters 
  69473.  
  69474.  
  69475. ΓòÉΓòÉΓòÉ 9.7.17. ems_filter_get_list ΓòÉΓòÉΓòÉ
  69476.  
  69477.  Purpose 
  69478.  
  69479.           Gets event filter list. 
  69480.  
  69481.  Format 
  69482.  
  69483.                     #include <dce/ems.h>
  69484.  
  69485.                     void ems_filter_get_list(
  69486.                             ems_handle_t  handle,
  69487.                             ems_filter_list_t  **filter_list,
  69488.                             error_status_t  *status);
  69489.  
  69490.  Parameters 
  69491.  
  69492.           Input 
  69493.  
  69494.           handle        A handle returned from a call to ems_consumer_register. 
  69495.  
  69496.           Output 
  69497.  
  69498.           filter_list   A pointer to a list of all the event filters in the 
  69499.                         Event Filter Database. 
  69500.  
  69501.           status        A pointer to the completion code. Upon successful 
  69502.                         completion, this routine returns error_status_ok. 
  69503.                         Otherwise, it returns one of the following error codes: 
  69504.  
  69505.                              ems_s_empty_filter_db         No filters in 
  69506.                                                            database. 
  69507.  
  69508.                              ems_s_insufficient_permission No permission for 
  69509.                                                            the requested 
  69510.                                                            operation. 
  69511.  
  69512.                              ems_s_invalid_handle          The handle is not 
  69513.                                                            valid. 
  69514.  
  69515.                              ems_s_invalid_name            A filter, consumer, 
  69516.                                                            or filter attribute 
  69517.                                                            name that contains 
  69518.                                                            characters that are 
  69519.                                                            not valid was 
  69520.                                                            specified. 
  69521.  
  69522.  Usage 
  69523.  
  69524.           The ems_filter_get_list routine is used to get a list of the event 
  69525.           filters in the Event Filter Database. This list should be freed using 
  69526.           ems_filter_free_list. 
  69527.  
  69528.  Permissions Required 
  69529.  
  69530.           (r) on /.:/hosts/dce_hostname/ems-server/filters/filter_name 
  69531.  
  69532.  
  69533. ΓòÉΓòÉΓòÉ 9.7.18. ems_filter_get_namelist ΓòÉΓòÉΓòÉ
  69534.  
  69535.  Purpose 
  69536.  
  69537.           Lists event filter names. 
  69538.  
  69539.  Format 
  69540.  
  69541.                     #include <dce/ems.h>
  69542.  
  69543.                     void ems_filter_get_namelist(
  69544.                             ems_handle_t  handle,
  69545.                             ems_filtername_list_t  **name_list,
  69546.                             error_status_t  *status);
  69547.  
  69548.  Parameters 
  69549.  
  69550.           Input 
  69551.  
  69552.           handle        The handle returned from a call to 
  69553.                         ems_consumer_register. 
  69554.  
  69555.           Output 
  69556.  
  69557.           name_list     A pointer to a list of all the event filter names in 
  69558.                         the Event Filter Database. The routine 
  69559.                         ems_event_filter_get can be used to find out the 
  69560.                         contents of each event filter. 
  69561.  
  69562.           status        A pointer to the completion status. Upon successful 
  69563.                         completion, this routine returns error_status_ok. 
  69564.                         Otherwise, it returns one of the following error codes: 
  69565.  
  69566.                              ems_s_empty_filter_db         No filters in 
  69567.                                                            database. 
  69568.  
  69569.                              ems_s_insufficient_permission No permission for 
  69570.                                                            the requested 
  69571.                                                            operation. 
  69572.  
  69573.                              ems_s_invalid_handle          The handle is not 
  69574.                                                            valid. 
  69575.  
  69576.  Usage 
  69577.  
  69578.           The ems_filter_get_namelist routine is used to get a list of the 
  69579.           names of the event filters in the Event Filter Database. 
  69580.  
  69581.  Permissions Required 
  69582.  
  69583.           (r) on /.:/hosts/dce_hostname/ems-server/filters 
  69584.  
  69585.  
  69586. ΓòÉΓòÉΓòÉ 9.7.19. ems_get_filter_group ΓòÉΓòÉΓòÉ
  69587.  
  69588.  Purpose 
  69589.  
  69590.           Gets a filter group. 
  69591.  
  69592.  Format 
  69593.  
  69594.                     #include <dce/ems.h>
  69595.  
  69596.                     void ems_get_filter_group(
  69597.                             ems_handle_t  handle,
  69598.                             ems_filtername_list_t  **filter_group,
  69599.                             error_status_t  *status);
  69600.  
  69601.  Parameters 
  69602.  
  69603.           Input 
  69604.  
  69605.           handle        Must contain a valid consumer handle obtained from 
  69606.                         ems_consumer_register. 
  69607.  
  69608.           Output 
  69609.  
  69610.           filter_group  A pointer to the list of event filter names that are in 
  69611.                         the consumer's event filter group. 
  69612.  
  69613.           status        A pointer to the completion status. Upon successful 
  69614.                         completion, this routine returns error_status_ok. 
  69615.                         Otherwise, it returns one of the following error codes: 
  69616.  
  69617.                              ems_s_invalid_handle          Invalid handle. 
  69618.  
  69619.                              ems_s_insufficient_permission No permission to 
  69620.                                                            perform the 
  69621.                                                            requested operation. 
  69622.  
  69623.                              ems_s_consumer_not_found      The specified 
  69624.                                                            consumer is not 
  69625.                                                            registered. 
  69626.  
  69627.  Usage 
  69628.  
  69629.           The ems_get_filter_group routine returns a list of event filter names 
  69630.           that comprise the consumer's event filter group. It is up to the 
  69631.           requesting consumer to free the storage allocated for filter_group. 
  69632.  
  69633.  Permissions Required 
  69634.  
  69635.           (r) on /.:/hosts/dce_hostname/ems-server/consumers 
  69636.  
  69637.  
  69638. ΓòÉΓòÉΓòÉ 9.7.20. ems_log_close ΓòÉΓòÉΓòÉ
  69639.  
  69640.  Purpose 
  69641.  
  69642.           Closes event log. 
  69643.  
  69644.  Format 
  69645.  
  69646.                     #include <dce/ems.h>
  69647.  
  69648.                     void ems_log_close(
  69649.                             ems_log_file_t  *handle,
  69650.                             error_status_t  *status);
  69651.  
  69652.  Parameters 
  69653.  
  69654.           Input/Output 
  69655.  
  69656.           handle        Specifies the event log file to close. On output handle 
  69657.                         is set to NULL. 
  69658.  
  69659.           Output 
  69660.  
  69661.           status        A pointer to the completion status. Upon successful 
  69662.                         completion, this routine returns error_status_ok. 
  69663.                         Otherwise, it returns ems_s_invalid_log_handle, which 
  69664.                         indicates that an invalid log file handle was passed 
  69665.                         in. 
  69666.  
  69667.  Usage 
  69668.  
  69669.           The ems_log_close routine closes an event log file. 
  69670.  
  69671.  
  69672. ΓòÉΓòÉΓòÉ 9.7.21. ems_log_open ΓòÉΓòÉΓòÉ
  69673.  
  69674.  Purpose 
  69675.  
  69676.           Opens event log. 
  69677.  
  69678.  Format 
  69679.  
  69680.                     #include <dce/ems.h>
  69681.  
  69682.                     void ems_log_open(
  69683.                             ems_log_file_t  *log_file,
  69684.                             char  *log_dir,
  69685.                             error_status_t  *status);
  69686.  
  69687.  Parameters 
  69688.  
  69689.           Input 
  69690.  
  69691.           log_dir       Directory where log directory is located. If NULL, the 
  69692.                         environment variable EMS_EVENTLOG_DIR is checked. If 
  69693.                         EMS_EVENTLOG_DIR is not set, the default directory is 
  69694.                         used. 
  69695.  
  69696.           Output 
  69697.  
  69698.           log_file      Log handle to use in other ems_log_* routines. 
  69699.  
  69700.           status        A pointer to the completion code. If the routine 
  69701.                         completes successfully it returns error_status_ok. 
  69702.                         Otherwise it returns one the following error codes: 
  69703.  
  69704.                              ems_s_no_event_log    Event log not found. 
  69705.  
  69706.                              ems_s_no_log_entries  No event log entries. 
  69707.  
  69708.                              ems_s_no_memory       Error allocating memory. 
  69709.  
  69710.  Usage 
  69711.  
  69712.           The ems_log_open routine opens an EMS event log and locks the event 
  69713.           log database until the ems_log_close routine is called. 
  69714.  
  69715.  
  69716. ΓòÉΓòÉΓòÉ 9.7.22. ems_log_read ΓòÉΓòÉΓòÉ
  69717.  
  69718.  Purpose 
  69719.  
  69720.           Read event log. 
  69721.  
  69722.  Format 
  69723.  
  69724.                     #include <dce/ems.h>
  69725.  
  69726.                     void ems_log_read(
  69727.                             ems_log_file_t  handle,
  69728.                             ems_event_t  **event,
  69729.                             error_status_t  *status);
  69730.  
  69731.  Parameters 
  69732.  
  69733.           Input 
  69734.  
  69735.           handle        Specifies the open event log to read from. 
  69736.  
  69737.           Output 
  69738.  
  69739.           event         A pointer to the next event in the event log. 
  69740.  
  69741.           status        A pointer to the completion status. Upon successful 
  69742.                         completion, this routine returns error_status_ok. 
  69743.                         Otherwise, it returns one of the following error codes: 
  69744.  
  69745.                              ems_s_invalid_log_handle    Invalid log file 
  69746.                                                          handle passed in. 
  69747.  
  69748.                              ems_s_no_more_events        No more events to read 
  69749.                                                          in log file. 
  69750.  
  69751.  Usage 
  69752.  
  69753.           The ems_log_read routine reads an event from the EMS event log. 
  69754.  
  69755.  
  69756. ΓòÉΓòÉΓòÉ 9.7.23. ems_log_rewind ΓòÉΓòÉΓòÉ
  69757.  
  69758.  Purpose 
  69759.  
  69760.           Rewinds event log. 
  69761.  
  69762.  Format 
  69763.  
  69764.                     #include <dce/ems.h>
  69765.  
  69766.                     void ems_log_rewind(
  69767.                             ems_log_file_t  handle,
  69768.                             error_status_t  *status);
  69769.  
  69770.  Parameters 
  69771.  
  69772.           Input 
  69773.  
  69774.           handle        Specifies the event log file to rewind. 
  69775.  
  69776.           Output 
  69777.  
  69778.           status        A pointer to the completion status. Upon successful 
  69779.                         completion, this routine returns error_status_ok. 
  69780.                         Otherwise, it returns one of the following error codes: 
  69781.  
  69782.                              ems_s_invalid_log_handle  An invalid log file 
  69783.                                                        handle was passed in. 
  69784.  
  69785.                              ems_s_no_log_entries      No event log entries. 
  69786.  
  69787.  Usage 
  69788.  
  69789.           The ems_log_rewind routine rewinds an event log. This allows the 
  69790.           event log to be rewound to the beginning. This function is equivalent 
  69791.           to calling ems_log_close, then ems_log_open again. 
  69792.  
  69793.  
  69794. ΓòÉΓòÉΓòÉ 9.7.24. ems_mgmt_add_filter_to_group ΓòÉΓòÉΓòÉ
  69795.  
  69796.  Purpose 
  69797.  
  69798.           Adds a list of event filter names to an event filter group. 
  69799.  
  69800.  Format 
  69801.  
  69802.                     #include <dce/ems.h>
  69803.  
  69804.                     void ems_mgmt_add_filter_to_group(
  69805.                             ems_handle_t  handle,
  69806.                             char  *consumer,
  69807.                             uuid_t  *uuid,
  69808.                             ems_filtername_list_t  *filter_name,
  69809.                             error_status_t  *status);
  69810.  
  69811.  Parameters 
  69812.  
  69813.           Input 
  69814.  
  69815.           handle        Must contain a valid consumer handle obtained from the 
  69816.                         ems_register routine. 
  69817.  
  69818.           consumer      Specifies the consumer whose event filter group is 
  69819.                         being updated. 
  69820.  
  69821.           uuid          Specifies the consumer UUID that uniquely identifies 
  69822.                         the consumer to clear. If this parameter is NULL, then 
  69823.                         only one consumer can exist with the name consumer. 
  69824.  
  69825.           filter_name   Specifies the list of event filter names to add. 
  69826.  
  69827.           Output 
  69828.  
  69829.           status        A pointer to the completion status. Upon successful 
  69830.                         completion, this routine returns error_status_ok. 
  69831.                         Otherwise, it returns one of the following error codes: 
  69832.  
  69833.                              ems_s_insufficient_permission No permission to 
  69834.                                                            perform the 
  69835.                                                            requested operation. 
  69836.  
  69837.                              ems_s_invalid_handle          An invalid handle 
  69838.                                                            was passed. 
  69839.  
  69840.                              ems_s_consumer_not_found      The specified 
  69841.                                                            consumer is not 
  69842.                                                            registered. 
  69843.  
  69844.                              ems_s_invalid_name            A filter, consumer, 
  69845.                                                            or filter attribute 
  69846.                                                            name that contains 
  69847.                                                            characters that are 
  69848.                                                            not valid was 
  69849.                                                            specified. 
  69850.  
  69851.  Usage 
  69852.  
  69853.           The ems_mgmt_add_filter_to_group routine adds event filter names to a 
  69854.           consumer's event filter group. 
  69855.  
  69856.  Permissions Required 
  69857.  
  69858.           (i) on /.:/hosts/dce_hostname/ems-server/consumers 
  69859.  
  69860.  
  69861. ΓòÉΓòÉΓòÉ 9.7.25. ems_mgmt_delete_consumer ΓòÉΓòÉΓòÉ
  69862.  
  69863.  Purpose 
  69864.  
  69865.           Deletes consumers. 
  69866.  
  69867.  Format 
  69868.  
  69869.                     #include <dce/ems.h>
  69870.  
  69871.                     void ems_mgmt_delete_consumer(
  69872.                             ems_handle_t  handle,
  69873.                             char  *consumer,
  69874.                             uuid_t  *uuid,
  69875.                             error_status_t  *status);
  69876.  
  69877.  Parameters 
  69878.  
  69879.           Input 
  69880.  
  69881.           handle        Must contain a valid consumer handle obtained from the 
  69882.                         ems_register routine. 
  69883.  
  69884.           consumer      A pointer to the consumer name to clear. This name is 
  69885.                         the name returned in the ems_consumer_list_t data 
  69886.                         structure after calling ems_mgmt_list_consumers or the 
  69887.                         name used on the ems_consumer_start routine. 
  69888.  
  69889.           uuid          Specifies the consumer UUID that uniquely identifies 
  69890.                         the consumer to clear. If this parameter is NULL, only 
  69891.                         one consumer can exist with the name consumer. 
  69892.  
  69893.           Output 
  69894.  
  69895.           status        A pointer to the completion status. Upon successful 
  69896.                         completion, this routine returns error_status_ok. 
  69897.                         Otherwise, it returns one of the following error codes: 
  69898.  
  69899.                              ems_s_invalid_handle          An invalid handle 
  69900.                                                            was passed. 
  69901.  
  69902.                              ems_s_consumer_not_found      The specified 
  69903.                                                            consumer is not 
  69904.                                                            registered. 
  69905.  
  69906.                              ems_s_insufficient_permission No permission for 
  69907.                                                            the requested 
  69908.                                                            operation. 
  69909.  
  69910.                              ems_s_invalid_name            A filter, consumer, 
  69911.                                                            or filter attribute 
  69912.                                                            name that contains 
  69913.                                                            characters that are 
  69914.                                                            not valid was 
  69915.                                                            specified. 
  69916.  
  69917.  Usage 
  69918.  
  69919.           The ems_mgmt_delete_consumer routine clears all information stored in 
  69920.           EMS about the specified consumer. This means clearing the consumer's 
  69921.           filters, then unregistering the consumer. The consumer receives 
  69922.           notification that it is being deleted. 
  69923.  
  69924.  Permissions Required 
  69925.  
  69926.           (d) on /.:/hosts/dce_hostname/ems-server/consumers 
  69927.  
  69928.  
  69929. ΓòÉΓòÉΓòÉ 9.7.26. ems_mgmt_delete_filter_from_group ΓòÉΓòÉΓòÉ
  69930.  
  69931.  Purpose 
  69932.  
  69933.           Deletes event filter name from event filter group. 
  69934.  
  69935.  Format 
  69936.  
  69937.                     #include <dce/ems.h>
  69938.  
  69939.                     void ems_mgmt_delete_filter_from_group(
  69940.                             ems_handle_t  handle,
  69941.                             char  *consumer,
  69942.                             uuid_t  *uuid,
  69943.                             ems_filtername_list_t  *filter_name,
  69944.                             error_status_t  *status);
  69945.  
  69946.  Parameters 
  69947.  
  69948.           Output 
  69949.  
  69950.           handle        Must contain a valid consumer handle obtained from the 
  69951.                         ems_register routine. 
  69952.  
  69953.           consumer      A pointer to the consumer whose event filter group is 
  69954.                         being updated. 
  69955.  
  69956.           uuid          A pointer to the consumer UUID that uniquely identifies 
  69957.                         the consumer to clear. If this parameter is NULL, then 
  69958.                         only one consumer can exist with the name consumer. 
  69959.  
  69960.           filter_name   A pointer to the names of the filters to delete from 
  69961.                         the consumer's filter group. 
  69962.  
  69963.           Output 
  69964.  
  69965.           status        A pointer to the completion status. Upon successful 
  69966.                         completion, this routine returns error_status_ok. 
  69967.                         Otherwise, it returns one of the following error codes: 
  69968.  
  69969.                              ems_s_invalid_handle          An invalid handle 
  69970.                                                            was passed. 
  69971.  
  69972.                              ems_s_consumer_not_found      The specified 
  69973.                                                            consumer is not 
  69974.                                                            registered. 
  69975.  
  69976.                              ems_s_insufficient_permission No permission for 
  69977.                                                            the requested 
  69978.                                                            operation. 
  69979.  
  69980.                              ems_s_invalid_name            A filter, consumer, 
  69981.                                                            or filter attribute 
  69982.                                                            name that contains 
  69983.                                                            characters that are 
  69984.                                                            not valid was 
  69985.                                                            specified. 
  69986.  
  69987.  Usage 
  69988.  
  69989.           The ems_mgmt_delete_filter_from_group routine deletes the specified 
  69990.           event filter names from a consumer's event filter group. 
  69991.  
  69992.  Permissions Required 
  69993.  
  69994.           (w) on /.:/hosts/dce_hostname/ems-server/consumers 
  69995.  
  69996.  
  69997. ΓòÉΓòÉΓòÉ 9.7.27. ems_mgmt_free_attributes ΓòÉΓòÉΓòÉ
  69998.  
  69999.  Purpose 
  70000.  
  70001.           Frees a list of emsd server attributes. 
  70002.  
  70003.  Format 
  70004.  
  70005.                     #include <dce/ems.h>
  70006.  
  70007.                     void ems_mgmt_free_attributes(
  70008.                             ems_attrlist_t  **list,
  70009.                             error_status_t  *status);
  70010.  
  70011.  Parameters 
  70012.  
  70013.           Input 
  70014.  
  70015.           list          A pointer to the list of attributes to free. 
  70016.  
  70017.           Output 
  70018.  
  70019.           status        A pointer to the completion status. Upon successful 
  70020.                         completion, this routine returns error_status_ok. 
  70021.                         Otherwise, it returns an error. 
  70022.  
  70023.  Usage 
  70024.  
  70025.           The ems_mgmt_free_attributes routine frees a list of emsd server 
  70026.           attributes obtained by the ems_mgmt_list_attributes routine. 
  70027.  
  70028.  
  70029. ΓòÉΓòÉΓòÉ 9.7.28. ems_mgmt_free_consumers ΓòÉΓòÉΓòÉ
  70030.  
  70031.  Purpose 
  70032.  
  70033.           Frees a list of consumers obtained from ems_mgmt_list_consumers. 
  70034.  
  70035.  Format 
  70036.  
  70037.                     #include <dce/ems.h>
  70038.  
  70039.                     void ems_mgmt_free_consumers(
  70040.                             ems_consumer_list_t  **list,
  70041.                             error_status_t  *status);
  70042.  
  70043.  Parameters 
  70044.  
  70045.           Input 
  70046.  
  70047.           list          A pointer to a list of consumers to free. 
  70048.  
  70049.           Output 
  70050.  
  70051.           status        A pointer to the completion status. Upon successful 
  70052.                         completion, this routine returns error_status_ok. 
  70053.                         Otherwise, it returns an error. 
  70054.  
  70055.  Usage 
  70056.  
  70057.           The ems_mgmt_free_consumers routine frees a list of consumers 
  70058.           obtained from ems_mgmt_list_consumers. 
  70059.  
  70060.  
  70061. ΓòÉΓòÉΓòÉ 9.7.29. ems_mgmt_free_ems ΓòÉΓòÉΓòÉ
  70062.  
  70063.  Purpose 
  70064.  
  70065.           Frees a list of hosts obtained from ems_mgmt_list_ems. 
  70066.  
  70067.  Format 
  70068.  
  70069.                     #include <dce/ems.h>
  70070.  
  70071.                     void ems_mgmt_free_ems(
  70072.                             char  ***host_list,
  70073.                             error_status_t  *status);
  70074.  
  70075.  Parameters 
  70076.  
  70077.           Input 
  70078.  
  70079.           host_list     A pointer to a list of hosts to free. 
  70080.  
  70081.           Output 
  70082.  
  70083.           status        A pointer to the completion status. Upon successful 
  70084.                         completion, this routine returns error_status_ok. 
  70085.                         Otherwise, it returns an error. 
  70086.  
  70087.  Usage 
  70088.  
  70089.           The ems_mgmt_free_ems routine frees a list of consumers obtained from 
  70090.           ems_mgmt_list_ems. 
  70091.  
  70092.  
  70093. ΓòÉΓòÉΓòÉ 9.7.30. ems_mgmt_get_filter_group ΓòÉΓòÉΓòÉ
  70094.  
  70095.  Purpose 
  70096.  
  70097.           Gets a list of event filter names in an event filter group. 
  70098.  
  70099.  Format 
  70100.  
  70101.                     #include <dce/ems.h>
  70102.  
  70103.                     void ems_mgmt_get_filter_group(
  70104.                             ems_handle_t  handle,
  70105.                             char  *consumer,
  70106.                             uuid_t  *uuid,
  70107.                             ems_filtername_list_t  **filter_group,
  70108.                             error_status_t  *status);
  70109.  
  70110.  Parameters 
  70111.  
  70112.           Input 
  70113.  
  70114.           handle        Must contain a valid consumer handle obtained from the 
  70115.                         ems_register routine. 
  70116.  
  70117.           consumer      A pointer to the consumer's event filter group to 
  70118.                         return. The consumer name is the name given to the 
  70119.                         ems_start_consumer routine, or the name returned in the 
  70120.                         ems_consumer_list_t data structure from the routine 
  70121.                         ems_mgmt_list_consumers. 
  70122.  
  70123.           uuid          A pointer to the consumer UUID that uniquely identifies 
  70124.                         the consumer to clear. If this parameter is NULL, only 
  70125.                         one consumer can exist with the name consumer. 
  70126.  
  70127.           Output 
  70128.  
  70129.           filter_group  A pointer to the list of event filter names in the 
  70130.                         specified consumer's event filter group. 
  70131.  
  70132.           status        A pointer to the completion code. Upon successful 
  70133.                         completion this routine returns error_status_ok. 
  70134.                         Otherwise, it returns one of the following error codes: 
  70135.  
  70136.                              ems_s_invalid_handle          An invalid handle 
  70137.                                                            was passed. 
  70138.  
  70139.                              ems_s_consumer_not_found      The specified 
  70140.                                                            consumer is not 
  70141.                                                            registered. 
  70142.  
  70143.                              ems_s_insufficient_permission No permission for 
  70144.                                                            the requested 
  70145.                                                            operation. 
  70146.  
  70147.                              ems_s_invalid_name            A filter, consumer, 
  70148.                                                            or filter attribute 
  70149.                                                            name that contains 
  70150.                                                            characters that are 
  70151.                                                            not valid was 
  70152.                                                            specified. 
  70153.  
  70154.  Usage 
  70155.  
  70156.           The ems_mgmt_get_filter_group routine returns a list of event filter 
  70157.           names in a consumer's event filter group. 
  70158.  
  70159.  Permissions Required 
  70160.  
  70161.           (i) on /.:/hosts/dce_hostname/ems-server/consumers 
  70162.  
  70163.  
  70164. ΓòÉΓòÉΓòÉ 9.7.31. ems_mgmt_list_attributes ΓòÉΓòÉΓòÉ
  70165.  
  70166.  Purpose 
  70167.  
  70168.           Lists emsd attributes. 
  70169.  
  70170.  Format 
  70171.  
  70172.                     #include <dce/ems.h>
  70173.  
  70174.                     void ems_mgmt_list_attributes(
  70175.                             ems_handle_t  handle,
  70176.                             ems_attrlist_t  **list,
  70177.                             error_status_t  *status);
  70178.  
  70179.  Parameters 
  70180.  
  70181.           Input 
  70182.  
  70183.           handle        Must contain a valid consumer handle obtained from the 
  70184.                         ems_register routine. 
  70185.  
  70186.           Output 
  70187.  
  70188.           list          A pointer to the list of emsd attributes. 
  70189.  
  70190.           status        A pointer to the completion status. Upon successful 
  70191.                         completion, this routine returns error_status_ok. 
  70192.                         Otherwise, it returns one of the following error codes: 
  70193.  
  70194.                              ems_s_insufficient_permission No permission to 
  70195.                                                            perform the 
  70196.                                                            requested operation. 
  70197.  
  70198.                              ems_s_invalid_handle          An invalid handle 
  70199.                                                            was passed. 
  70200.  
  70201.                              ems_s_no_memory               Error allocating 
  70202.                                                            memory. 
  70203.  
  70204.  Usage 
  70205.  
  70206.           The ems_mgmt_list_attributes routine lists emsd server attributes. 
  70207.           Free this list using the ems_mgmt_free_attributes routine. 
  70208.  
  70209.  Permissions Required 
  70210.  
  70211.           (r) on /.:/hosts/dce&ushostname/ems-server 
  70212.  
  70213.  
  70214. ΓòÉΓòÉΓòÉ 9.7.32. ems_mgmt_list_consumers ΓòÉΓòÉΓòÉ
  70215.  
  70216.  Purpose 
  70217.  
  70218.           Lists consumers. 
  70219.  
  70220.  Format 
  70221.  
  70222.                     #include <dce/ems.h>
  70223.  
  70224.                     void ems_mgmt_list_consumers(
  70225.                             ems_handle_t  handle,
  70226.                             ems_consumer_list_t  **list,
  70227.                             error_status_t  *status);
  70228.  
  70229.  Parameters 
  70230.  
  70231.           Input 
  70232.  
  70233.           handle        Must contain a valid consumer handle obtained from the 
  70234.                         ems_register routine. 
  70235.  
  70236.           Output 
  70237.  
  70238.           list          A pointer to the list of consumers. 
  70239.  
  70240.           status        A pointer to the completion status. Upon successful 
  70241.                         completion, this routine returns error_status_ok. 
  70242.                         Otherwise it returns one of the following error codes: 
  70243.  
  70244.                              ems_s_no_memory               Error allocating 
  70245.                                                            memory. 
  70246.  
  70247.                              ems_s_no_consumers            No consumers 
  70248.                                                            registered. 
  70249.  
  70250.                              ems_s_insufficient_permission No permission to 
  70251.                                                            perform the 
  70252.                                                            requested operation. 
  70253.  
  70254.                              ems_s_invalid_handle          An invalid handle 
  70255.                                                            was passed. 
  70256.  
  70257.  Usage 
  70258.  
  70259.           The ems_mgmt_list_consumers routine lists consumers registered with 
  70260.           EMS. 
  70261.  
  70262.  Permissions Required 
  70263.  
  70264.           (r) on /.:/hosts/dce_hostname/ems-server/consumers 
  70265.  
  70266.  
  70267. ΓòÉΓòÉΓòÉ 9.7.33. ems_mgmt_list_ems ΓòÉΓòÉΓòÉ
  70268.  
  70269.  Purpose 
  70270.  
  70271.           Lists EMS hosts. 
  70272.  
  70273.  Format 
  70274.  
  70275.                     #include <dce/ems.h>
  70276.  
  70277.                     void ems_mgmt_list_ems(
  70278.                             char  ***host_list,
  70279.                             error_status_t  *status);
  70280.  
  70281.  Parameters 
  70282.  
  70283.           Output 
  70284.  
  70285.           host_list     A pointer to the list of hosts running emsd. 
  70286.  
  70287.           status        A pointer to the completion status. Upon successful 
  70288.                         completion, this routine returns error_status_ok. 
  70289.                         Otherwise, it returns ems_no_memory, which indicates 
  70290.                         that there was an error allocating memory. 
  70291.  
  70292.  Usage 
  70293.  
  70294.           The ems_mgmt_list_ems routine lists hosts running emsd. Use free to 
  70295.           free memory used by host_list. 
  70296.  
  70297.  
  70298. ΓòÉΓòÉΓòÉ 9.7.34. ems_register ΓòÉΓòÉΓòÉ
  70299.  
  70300.  Purpose 
  70301.  
  70302.           Registers with EMS. 
  70303.  
  70304.  Format 
  70305.  
  70306.                     #include <dce/ems.h>
  70307.  
  70308.                     void ems_register(
  70309.                             ems_netname_t  *dce_hostname,
  70310.                             ems_handle_t  *handle,
  70311.                             error_status_t  *status);
  70312.  
  70313.  Parameters 
  70314.  
  70315.           Input 
  70316.  
  70317.           dce_hostname  A pointer to the name of the DCE host machine where 
  70318.                         emsd is running. If the DCE host name is NULL, then the 
  70319.                         local host is assumed. 
  70320.  
  70321.                         Note:  dce_hostname is case sensitive. 
  70322.  
  70323.  
  70324.           Output 
  70325.  
  70326.           handle        Returns an EMS handle to use for future calls to EMS 
  70327.                         routines. 
  70328.  
  70329.           status        A pointer to the completion status. Upon successful 
  70330.                         completion, this routine returns error_status_ok. 
  70331.                         Otherwise, it returns one of the following error codes: 
  70332.  
  70333.                              ems_s_no_memory                 An EMS handle 
  70334.                                                              cannot be 
  70335.                                                              allocated. 
  70336.  
  70337.                              ems_s_unsupported_nameservice   The dce_hostname 
  70338.                                                              contains an 
  70339.                                                              unsupported name 
  70340.                                                              service. 
  70341.  
  70342.  Usage 
  70343.  
  70344.           The ems_register routine registers with EMS, and obtains an EMS 
  70345.           binding handle. This routine can be used by a management application 
  70346.           that will be using the EMS Management API or by event suppliers that 
  70347.           want to add new event types. 
  70348.  
  70349.  
  70350. ΓòÉΓòÉΓòÉ 9.7.35. ems_supplier_send ΓòÉΓòÉΓòÉ
  70351.  
  70352.  Purpose 
  70353.  
  70354.           Sends supplier events to EMS. 
  70355.  
  70356.  Format 
  70357.  
  70358.                     #include <dce/ems.h>
  70359.  
  70360.                     void ems_supplier_send(
  70361.                             ems_handle_t  handle,
  70362.                             ems_event_t  *event,
  70363.                             error_status_t  *status);
  70364.  
  70365.  Parameters 
  70366.  
  70367.           Input 
  70368.  
  70369.           handle        Should be the handle returned from a call to 
  70370.                         ems_register. 
  70371.  
  70372.           event         A pointer to the event data. For the content of the 
  70373.                         event messages, see EMS Data Structures. 
  70374.  
  70375.           Output 
  70376.  
  70377.           status        Pointer to the completion status. Upon successful 
  70378.                         completion, this routine returns error_status_ok. 
  70379.                         Otherwise, it returns one of the following error codes: 
  70380.  
  70381.                              ems_s_invalid_handle          A handle that has 
  70382.                                                            not been initialized 
  70383.                                                            or that is invalid 
  70384.                                                            was used. 
  70385.  
  70386.                              ems_s_no_memory               The EMS server 
  70387.                                                            received an error 
  70388.                                                            allocating memory. 
  70389.  
  70390.                              ems_s_insufficient_permission This supplier does 
  70391.                                                            not have permission 
  70392.                                                            to supply events. 
  70393.  
  70394.  Usage 
  70395.  
  70396.           The ems_supplier_send routine is called by event suppliers to send 
  70397.           events to EMS. 
  70398.  
  70399.  Permissions Required 
  70400.  
  70401.           (w) on /.:/hosts/dce_hostname/ems-server/event-types/type_name 
  70402.  
  70403.  
  70404. ΓòÉΓòÉΓòÉ 9.7.36. ems_unregister ΓòÉΓòÉΓòÉ
  70405.  
  70406.  Purpose 
  70407.  
  70408.           Unregisters with EMS. 
  70409.  
  70410.  Format 
  70411.  
  70412.                     #include <dce/ems.h>
  70413.  
  70414.                     void ems_unregister(
  70415.                             ems_handle_t *handle,
  70416.                             error_status_t *status);
  70417.  
  70418.  Parameters 
  70419.  
  70420.           Input/Output 
  70421.  
  70422.           handle        An EMS handle obtained from the ems_register routine. 
  70423.                         On output the value of handle is set to NULL. 
  70424.  
  70425.           Output 
  70426.  
  70427.           status        A pointer to the completion status. Upon successful 
  70428.                         completion, this routine returns error_status_ok. 
  70429.                         Otherwise, it returns ems_s_invalid_handle, which 
  70430.                         indicates that an invalid handle was passed. 
  70431.  
  70432.  Usage 
  70433.  
  70434.           The ems_unregister routine unregisters and frees up the resources 
  70435.           used by an EMS handle. This routine should be called with a handle 
  70436.           obtained by the ems_register routine. 
  70437.  
  70438.  
  70439. ΓòÉΓòÉΓòÉ 10. DCE SNMP Management Information Base ΓòÉΓòÉΓòÉ
  70440.  
  70441. Simple Network Management Protocol (SNMP) is a TCP/IP network management 
  70442. protocol and is based on a manager-agent interaction. The SNMP manager (such as 
  70443. NetView for OS/2) communicates with its agents. Agents gather management data 
  70444. (such as physical and logical characteristics of network objects) and store it, 
  70445. while managers solicit this data and process it. This collection of management 
  70446. information is called a Management Information Base (MIB). The DCE SNMP 
  70447. subagent implements the DCE MIB for the agent and accesses the DCE data upon 
  70448. request. The individual pieces of information that comprise a MIB are called 
  70449. MIB objects and they reside on the agent system. The subagent can generate 
  70450. traps from DCE Serviceability (SVC) messages and communicates the traps to the 
  70451. agent asynchronously. With the exception of traps, MIB objects can be accessed 
  70452. by the agent at the manager's request. 
  70453.  
  70454. Note:  Even though DCE provides location transparency, which means the views 
  70455.        can be cell-wide as opposed to node-wide, the DCE SNMP MIB is defined on 
  70456.        a per-node basis due to the nature of the SNMP model. 
  70457.  
  70458.  The DCE SNMP MIB consists of the following groups: 
  70459.  
  70460.  Component ID Group Provides the very basic information about the IBM DCE OS/2 
  70461.       product that is installed. 
  70462.  
  70463.  Software Component Information Group Extends the Component ID group with 
  70464.       attributes that further define the software component. 
  70465.  
  70466.  DCE Subagent Group Contains information about the DCE subagent. 
  70467.  
  70468.  DCE Host Information Group Contains the DCE host name and cell name. 
  70469.  
  70470.  DCE Server Table Group A table of DCE server entries. Each entry contains 
  70471.       information about a different server configured on the host. 
  70472.  
  70473.  DCE Host Server Group Contains information about the Host server on the host. 
  70474.  
  70475.  DCE Event Management Service Server Group Contains information about the Event 
  70476.       Management Service (EMS) server on the host. 
  70477.  
  70478.  DCE Security Server Group Contains information about the Security server on 
  70479.       the host. 
  70480.  
  70481.  DCE Cell Directory Service Server Group Contains information about the DCE 
  70482.       Cell Directory Service (CDS) server on the host. 
  70483.  
  70484.  DCE Cell Directory Service Advertiser Group Contains information about the DCE 
  70485.       CDS advertiser on the host. 
  70486.  
  70487.  DCE Cell Directory Service Clerks Group Contains information about the DCE CDS 
  70488.       clerks on the host. 
  70489.  
  70490.  DCE Cell Directory Service Clerk Table Group Contains a table of entries about 
  70491.       the DCE CDS clerks on the host. 
  70492.  
  70493.  DCE Cell Directory Service Clearinghouse Table Group Contains a table of 
  70494.       entries about the DCE CDS clearinghouses on the host. 
  70495.  
  70496.  DCE Cell Directory Service Cached Clearinghouse Table Group Contains a table 
  70497.       of entries about the cached clearinghouses on the host. 
  70498.  
  70499.  DCE Global Directory Agent Server Group Contains information about the Global 
  70500.       Directory Agent (GDA) server on the host. 
  70501.  
  70502.  DCE Distributed Time Service Entity Group Contains information about the 
  70503.       Distributed Time Service (DTS) entity. 
  70504.  
  70505.  DCE Distributed Time Service Server Group Contains information about the local 
  70506.       or global DCE DTS server on this host. 
  70507.  
  70508.  DCE Distributed Time Service Known Server Table Group A table of DCE DTS 
  70509.       servers (local and global) that are known by the DTS entity on the host. 
  70510.  
  70511.  DCE Traps Group Network events sent from the DCE SNMP subagent to an SNMP 
  70512.       agent asynchronously. The information generated and sent out from the DCE 
  70513.       Traps group cannot be queried. The information generated by all of the 
  70514.       other groups can be queried. 
  70515.  
  70516.  
  70517. ΓòÉΓòÉΓòÉ 10.1. DCE MIB Definitions ΓòÉΓòÉΓòÉ
  70518.  
  70519. IMPORTS
  70520.      Counter, enterprises
  70521.              FROM RFC1155-SMI
  70522.      OBJECT-TYPE
  70523.              FROM RFC-1212
  70524.      DisplayString
  70525.              FROM RFC1213-MIB
  70526.      TRAP-TYPE
  70527.              FROM RFC-1215;
  70528. Date                ::= OCTET STRING (SIZE (50))
  70529.  
  70530. -- identified-org          OBJECT IDENTIFIER ::= { iso 3 }
  70531. -- osf                     OBJECT IDENTIFIER ::= { identified-org 22 }
  70532.    osf                     OBJECT IDENTIFIER ::= { org 22 }
  70533.    dce                     OBJECT IDENTIFIER ::= { osf 1 }
  70534.    SNMP                    OBJECT IDENTIFIER ::= { dce 7 }
  70535.    MIB                     OBJECT IDENTIFIER ::= { SNMP 1 }
  70536.    subagent                OBJECT IDENTIFIER ::= { SNMP 2 }
  70537.  
  70538.  
  70539. ΓòÉΓòÉΓòÉ 10.1.1. Component ID Group ΓòÉΓòÉΓòÉ
  70540.  
  70541. componentIDGroup OBJECT IDENTIFIER ::= {MIB 1} 
  70542.  
  70543.  aManufacturer OBJECT-TYPE 
  70544.  
  70545.           SYNTAX       DisplayString (SIZE (0..32))
  70546.           ACCESS       read-only
  70547.           STATUS       mandatory
  70548.           DESCRIPTION   "The company that produced this component."
  70549.         --              The string is: IBM Corporation.
  70550.           ::= {componentIDGroup 1}
  70551.  
  70552.  aProduct OBJECT-TYPE 
  70553.  
  70554.           SYNTAX       DisplayString (SIZE (0..32))
  70555.           ACCESS       read-only
  70556.           STATUS       mandatory
  70557.           DESCRIPTION   "The name of this component or product."
  70558.         --              The string is: IBM DCE for OS/2.
  70559.           ::= {componentIDGroup 2}
  70560.  
  70561.  aVersion OBJECT-TYPE 
  70562.  
  70563.           SYNTAX       DisplayString (SIZE (0..16))
  70564.           ACCESS       read-only
  70565.           STATUS       mandatory
  70566.           DESCRIPTION   "The version string for this component."
  70567.         --              The string is obtained from the syslevel.dce file.
  70568.           ::= {componentIDGroup 3}
  70569.  
  70570.  aSerialNumber OBJECT-TYPE 
  70571.  
  70572.           SYNTAX       DisplayString (SIZE (0..16))
  70573.           ACCESS       read-only
  70574.           STATUS       mandatory
  70575.           DESCRIPTION   "The serial number for this component."
  70576.         --              The string is obtained from the syslevel.dce file.
  70577.           ::= {componentIDGroup 4}
  70578.  
  70579.  aInstallation OBJECT-TYPE 
  70580.  
  70581.           SYNTAX       DisplayString (SIZE (0..28))
  70582.           ACCESS       read-only
  70583.           STATUS       mandatory
  70584.           DESCRIPTION   "The date and time of the last IBM DCE for OS/2 install on this system."
  70585.         --              The string is obtained from the syslevel.dce file.
  70586.           ::= {componentIDGroup 5}
  70587.  
  70588.  aVerify OBJECT-TYPE  break=fit compact. 
  70589.  
  70590.          SYNTAX                                                 INTEGER 
  70591.  
  70592.           -- { 
  70593.  
  70594.           --  vAnErrorOccurred;CheckStatusCode                  (0), 
  70595.  
  70596.           --  vThisComponentDoesNotExist                        (1), 
  70597.  
  70598.           --  vTheVerifyIsNotSupported                          (2), 
  70599.  
  70600.           --  vReserved                                         (3), 
  70601.  
  70602.           --  vComponent'sFunctionalityUntested                 (4), 
  70603.  
  70604.           --  vComponent'sFunctionalityUnknown                  (5), 
  70605.  
  70606.           --  vComponentIsNotFunctioningCorrectly               (6), 
  70607.  
  70608.           --  vComponentFunctionsCorrectly                      (7) 
  70609.  
  70610.           -- } 
  70611.  
  70612.           ACCESS       read-only
  70613.           STATUS       mandatory
  70614.           DESCRIPTION   "A code that provides a level of verification that the component
  70615.                       is still installed and working.  This value is 2 for this release."
  70616.           ::= {componentIDGroup 6}
  70617.  
  70618.  aVerifyString OBJECT-TYPE 
  70619.  
  70620.           SYNTAX       DisplayString (SIZE (0..32))
  70621.           ACCESS       read-only
  70622.           STATUS       mandatory
  70623.           DESCRIPTION   "A string that corresponds to the aVerify value.  The string for this
  70624.                       release is: Verify is not supported.
  70625.           ::= {componentIDGroup 7}
  70626.  
  70627.  
  70628. ΓòÉΓòÉΓòÉ 10.1.2. Software Component Information Group ΓòÉΓòÉΓòÉ
  70629.  
  70630. softwareCompInfoGroup OBJECT IDENTIFIER ::= {MIB 2} 
  70631.  
  70632.  aMajorVersion OBJECT-TYPE 
  70633.  
  70634.           SYNTAX       DisplayString (SIZE (0..12))
  70635.           ACCESS       read-only
  70636.           STATUS       mandatory
  70637.           DESCRIPTION   "Major version of this software component."
  70638.         --              The string is obtained from the syslevel.dce file.
  70639.           ::= {softwareCompInfoGroup 1}
  70640.  
  70641.  aMinorVersion OBJECT-TYPE 
  70642.  
  70643.           SYNTAX       DisplayString (SIZE (0..12))
  70644.           ACCESS       read-only
  70645.           STATUS       mandatory
  70646.           DESCRIPTION   "Minor version of this software component."
  70647.         --              The string is obtained from the syslevel.dce file.
  70648.           ::= {softwareCompInfoGroup 2}
  70649.  
  70650.  aRevision OBJECT-TYPE 
  70651.  
  70652.           SYNTAX       DisplayString (SIZE (0..12))
  70653.           ACCESS       read-only
  70654.           STATUS       mandatory
  70655.           DESCRIPTION   "Revision of this software component."
  70656.         --              The string is obtained from the syslevel.dce file.
  70657.           ::= {softwareCompInfoGroup 3}
  70658.  
  70659.  aBuild OBJECT-TYPE 
  70660.  
  70661.           SYNTAX       DisplayString (SIZE (0..12))
  70662.           ACCESS       read-only
  70663.           STATUS       mandatory
  70664.           DESCRIPTION   "Manufacturer's internal identifier for this compilation."
  70665.         --              The string is obtained from the syslevel.dce file.
  70666.           ::= {softwareCompInfoGroup 4}
  70667.  
  70668.  aTargetOperatingSystem OBJECT-TYPE 
  70669.  
  70670.           SYNTAX       INTEGER
  70671.           ACCESS       read-only
  70672.           STATUS       mandatory
  70673.           DESCRIPTION   "The operating system for which this software component is intended.
  70674.                       This value is 3 (IBM OS/2) for this release."
  70675.           ::= {softwareCompInfoGroup 5}
  70676.  
  70677.  aLanguageEdition OBJECT-TYPE 
  70678.  
  70679.           SYNTAX       DisplayString (SIZE (0..16))
  70680.           ACCESS       read-only
  70681.           STATUS       mandatory
  70682.           DESCRIPTION   "The language edition of this software component.
  70683.                       This string is: English."
  70684.           ::= {softwareCompInfoGroup 6}
  70685.  
  70686.  aIdentificationCode OBJECT-TYPE 
  70687.  
  70688.           SYNTAX       DisplayString (SIZE (0..16))
  70689.           ACCESS       read-only
  70690.           STATUS       mandatory
  70691.           DESCRIPTION   "Stock Keeping Unit (SKU) for this software component."
  70692.         --              The string is obtained from the syslevel.dce file.
  70693.           ::= {softwareCompInfoGroup 7}
  70694.  
  70695.  aTargetOSString OBJECT-TYPE 
  70696.  
  70697.           SYNTAX       DisplayString (SIZE (0..32))
  70698.           ACCESS       read-only
  70699.           STATUS       mandatory
  70700.           DESCRIPTION   "The operating system for which this software component is intended.
  70701.                       This is IBM OS/2 for this release."
  70702.           ::= {softwareCompInfoGroup 8}
  70703.  
  70704.  
  70705. ΓòÉΓòÉΓòÉ 10.1.3. DCE Subagent Group ΓòÉΓòÉΓòÉ
  70706.  
  70707. dceSubagentGroup OBJECT IDENTIFIER ::= {MIB 3} 
  70708.  
  70709.  aSubagtName OBJECT-TYPE 
  70710.  
  70711.           SYNTAX       DisplayString (SIZE (0..32))
  70712.           ACCESS       read-only
  70713.           STATUS       mandatory
  70714.           DESCRIPTION   "The name of this subagent is IBM DCE Subagent.
  70715.                       The string is: IBM DCE Subagent.
  70716.           ::= {dceSubagentGroup 1}
  70717.  
  70718.  aSubagtUpTime OBJECT-TYPE 
  70719.  
  70720.           SYNTAX       Date
  70721.           ACCESS       read-only
  70722.           STATUS       mandatory
  70723.           DESCRIPTION   "The date and time the DCE subagent was last started."
  70724.           ::= {dceSubagentGroup 2}
  70725.  
  70726.  
  70727. ΓòÉΓòÉΓòÉ 10.1.4. DCE Host Information Group ΓòÉΓòÉΓòÉ
  70728.  
  70729. dceHostInfoGroup OBJECT IDENTIFIER ::= {MIB 4} 
  70730.  
  70731.  aDCEHostName OBJECT-TYPE 
  70732.  
  70733.           SYNTAX       DisplayString (SIZE (0..64))
  70734.           ACCESS       read-only
  70735.           STATUS       mandatory
  70736.           DESCRIPTION   "The name of the DCE host."
  70737.           ::= {dceHostInfoGroup 1}
  70738.  
  70739.  aDCEHostCellName OBJECT-TYPE 
  70740.  
  70741.           SYNTAX       DisplayString (SIZE (0..64))
  70742.           ACCESS       read-only
  70743.           STATUS       mandatory
  70744.           DESCRIPTION   "The name for the cell to which this DCE host belongs."
  70745.           ::= {dceHostInfoGroup 2}
  70746.  
  70747.  
  70748. ΓòÉΓòÉΓòÉ 10.1.5. DCE Server Table Group ΓòÉΓòÉΓòÉ
  70749.  
  70750.  dceSvrTable OBJECT-TYPE 
  70751.  
  70752.           SYNTAX       SEQUENCE OF DCEHostSvrEntry
  70753.           ACCESS       not-accessible
  70754.           STATUS       mandatory
  70755.           DESCRIPTION   "A list of server entries configured on this DCE host."
  70756.           ::= {MIB 5}
  70757.  
  70758.  dceHostSvrEntry OBJECT-TYPE 
  70759.  
  70760.           SYNTAX       DCEHostSvrEntry
  70761.           ACCESS       not-accessible
  70762.           STATUS       mandatory
  70763.           DESCRIPTION   ""
  70764.           INDEX        {aDCESvrName}
  70765.           ::= {dceSvrTable 1}
  70766.  
  70767.  DCEHostSvrEntry ::= SEQUENCE 
  70768.      break=fit compact. 
  70769.  
  70770.           { 
  70771.  
  70772.            aDCESvrName                DisplayString, 
  70773.  
  70774.            aDCESvrState               DisplayString, 
  70775.  
  70776.            aDCESvrStateValue          INTEGER 
  70777.  
  70778.           } 
  70779.  
  70780.  aDCESvrName OBJECT-TYPE 
  70781.  
  70782.           SYNTAX       DisplayString (SIZE (0..48))
  70783.           ACCESS       read-only
  70784.           STATUS       mandatory
  70785.           DESCRIPTION   "The name of the DCE server."
  70786.         --              The string can be on of the following:
  70787.         --                Unknown
  70788.         --                DCE Host Server
  70789.         --                Master Security Server
  70790.         --                Replica Security Server
  70791.         --                CDS Server
  70792.         --                CDS Advertiser
  70793.         --                DTS Global Server
  70794.         --                DTS Local Server
  70795.         --                DTS Clerk
  70796.         --                Time Provider
  70797.         --                GDA Server
  70798.         --                EMS Server
  70799.         --                Audit Server
  70800.         --                DFS Server
  70801.         --                Password Strength Server
  70802.         --                Password Synchronization Server
  70803.         --                Generic Server
  70804.           ::= {dceHostSvrEntry 1}
  70805.  
  70806.  aDCESvrState OBJECT-TYPE 
  70807.  
  70808.           SYNTAX       DisplayString (SIZE (0..16))
  70809.           ACCESS       read-only
  70810.           STATUS       mandatory
  70811.           DESCRIPTION   "The state of this DCE server."
  70812.         --              One of the following strings will be set based on the state value:
  70813.         --               String       Description
  70814.         --
  70815.         --               Unknown
  70816.         --               Not running    The server does not appear to be running.
  70817.         --               Available      The server is running and responding to requests.
  70818.         --               Not available   The server is running but is not responding to requests.
  70819.           ::= {dceHostSvrEntry 2}
  70820.  
  70821.  aDCESvrStateValue OBJECT-TYPE 
  70822.      break=fit compact. 
  70823.  
  70824.          SYNTAX                  INTEGER 
  70825.  
  70826.           { 
  70827.  
  70828.            vUnknown              (0), 
  70829.  
  70830.            vNotRunning           (1), 
  70831.  
  70832.            vAvailable            (2), 
  70833.  
  70834.            vNotAvailable         (3) 
  70835.  
  70836.           } 
  70837.  
  70838.           ACCESS       read-only
  70839.           STATUS       mandatory
  70840.           DESCRIPTION   "The state value of this DCE server."
  70841.           ::= {dceHostSvrEntry 3}
  70842.  
  70843.  
  70844. ΓòÉΓòÉΓòÉ 10.1.6. DCE Host Server Group ΓòÉΓòÉΓòÉ
  70845.  
  70846. dceHostSvrGroup OBJECT IDENTIFIER ::= {MIB 6} 
  70847.  
  70848.  aHostSvrPid OBJECT-TYPE 
  70849.  
  70850.           SYNTAX       INTEGER
  70851.           ACCESS       read-only
  70852.           STATUS       mandatory
  70853.           DESCRIPTION   "The process ID of the DCE host server."
  70854.           ::= {dceHostSvrGroup 1}
  70855.  
  70856.  aHostSvrUid OBJECT-TYPE 
  70857.  
  70858.           SYNTAX       INTEGER
  70859.           ACCESS       read-only
  70860.           STATUS       mandatory
  70861.           DESCRIPTION   "The user ID of the DCE host server."
  70862.           ::= {dceHostSvrGroup 2}
  70863.  
  70864.  aHostSvrGid OBJECT-TYPE 
  70865.  
  70866.           SYNTAX       INTEGER
  70867.           ACCESS       read-only
  70868.           STATUS       mandatory
  70869.           DESCRIPTION   "The group ID of the DCE host server."
  70870.           ::= {dceHostSvrGroup 3}
  70871.  
  70872.  aHostSvrInRpcCalls OBJECT-TYPE 
  70873.  
  70874.           SYNTAX       Counter
  70875.           ACCESS       read-only
  70876.           STATUS       mandatory
  70877.           DESCRIPTION   "The number of RPC calls received by the DCE host server."
  70878.           ::= {dceHostSvrGroup 4}
  70879.  
  70880.  aHostSvrOutRpcCalls OBJECT-TYPE 
  70881.  
  70882.           SYNTAX       Counter
  70883.           ACCESS       read-only
  70884.           STATUS       mandatory
  70885.           DESCRIPTION   "The number of RPC calls initiated by the DCE host server."
  70886.           ::= {dceHostSvrGroup 5}
  70887.  
  70888.  aHostSvrInRpcPkts OBJECT-TYPE 
  70889.  
  70890.           SYNTAX       Counter
  70891.           ACCESS       read-only
  70892.           STATUS       mandatory
  70893.           DESCRIPTION   "The number of RPC packets received by the DCE host server."
  70894.           ::= {dceHostSvrGroup 6}
  70895.  
  70896.  aHostSvrOutRpcPkts OBJECT-TYPE 
  70897.  
  70898.           SYNTAX       Counter
  70899.           ACCESS       read-only
  70900.           STATUS       mandatory
  70901.           DESCRIPTION   "The number of RPC packets initiated by the DCE host server."
  70902.           ::= {dceHostSvrGroup 7}
  70903.  
  70904.  aHostSvrState OBJECT-TYPE 
  70905.  
  70906.           SYNTAX       DisplayString (SIZE (0..16))
  70907.           ACCESS       read-only
  70908.           STATUS       mandatory
  70909.           DESCRIPTION   "The state of this DCE host server."
  70910.         --              One of the following strings will be set based on the state value:
  70911.         --               String       Description
  70912.         --
  70913.         --               Unknown
  70914.         --               Not running   The server does not appear to be running.
  70915.         --               Available     The server is running and responding to requests.
  70916.         --               Not available   The server is running but is not responding to requests.
  70917.           ::= {dceHostSvrGroup 8}
  70918.  
  70919.  aHostSvrStateValue OBJECT-TYPE 
  70920.      break=fit compact. 
  70921.  
  70922.          SYNTAX                INTEGER 
  70923.  
  70924.           { 
  70925.  
  70926.            vUnknown            (0), 
  70927.  
  70928.            vNotRunning         (1), 
  70929.  
  70930.            vAvailable          (2), 
  70931.  
  70932.            vNotAvailable       (3) 
  70933.  
  70934.           } 
  70935.  
  70936.           ACCESS       read-only
  70937.           STATUS       mandatory
  70938.           DESCRIPTION   "The state value of this DCE host server."
  70939.           ::= {dceHostSvrGroup 9}
  70940.  
  70941.  
  70942. ΓòÉΓòÉΓòÉ 10.1.7. DCE Event Management Service Server Group ΓòÉΓòÉΓòÉ
  70943.  
  70944. dceEmsSvrGroup OBJECT IDENTIFIER ::= {MIB 7} 
  70945.  
  70946.  aEmsSvrPid OBJECT-TYPE 
  70947.  
  70948.           SYNTAX       INTEGER
  70949.           ACCESS       read-only
  70950.           STATUS       mandatory
  70951.           DESCRIPTION   "The process ID of the DCE EMS server."
  70952.           ::= {dceEmsSvrGroup 1}
  70953.  
  70954.  aEmsSvrUid OBJECT-TYPE 
  70955.  
  70956.           SYNTAX       INTEGER
  70957.           ACCESS       read-only
  70958.           STATUS       mandatory
  70959.           DESCRIPTION   "The user ID of the DCE EMS server."
  70960.           ::= {dceEmsSvrGroup 2}
  70961.  
  70962.  aEmsSvrGid OBJECT-TYPE 
  70963.  
  70964.           SYNTAX       INTEGER
  70965.           ACCESS       read-only
  70966.           STATUS       mandatory
  70967.           DESCRIPTION   "The group ID of the DCE EMS server."
  70968.           ::= {dceEmsSvrGroup 3}
  70969.  
  70970.  aEmsSvrInRpcCalls OBJECT-TYPE 
  70971.  
  70972.           SYNTAX       Counter
  70973.           ACCESS       read-only
  70974.           STATUS       mandatory
  70975.           DESCRIPTION   "The number of RPC calls received by the DCE EMS server."
  70976.           ::= {dceEmsSvrGroup 4}
  70977.  
  70978.  aEmsSvrOutRpcCalls OBJECT-TYPE 
  70979.  
  70980.           SYNTAX       Counter
  70981.           ACCESS       read-only
  70982.           STATUS       mandatory
  70983.           DESCRIPTION   "The number of RPC calls initiated by the DCE EMS server."
  70984.           ::= {dceEmsSvrGroup 5}
  70985.  
  70986.  aEmsSvrInRpcPkts OBJECT-TYPE 
  70987.  
  70988.           SYNTAX       Counter
  70989.           ACCESS       read-only
  70990.           STATUS       mandatory
  70991.           DESCRIPTION   "The number of RPC packets received by the DCE EMS server."
  70992.           ::= {dceEmsSvrGroup 6}
  70993.  
  70994.  aEmsSvrOutRpcPkts OBJECT-TYPE 
  70995.  
  70996.           SYNTAX       Counter
  70997.           ACCESS       read-only
  70998.           STATUS       mandatory
  70999.           DESCRIPTION   "The number of RPC packets initiated by the DCE EMS server."
  71000.           ::= {dceEmsSvrGroup 7}
  71001.  
  71002.  aEmsSvrState OBJECT-TYPE 
  71003.  
  71004.           SYNTAX       DisplayString (SIZE (0..16))
  71005.           ACCESS       read-only
  71006.           STATUS       mandatory
  71007.           DESCRIPTION   "The state of this DCE EMS server."
  71008.         --              One of the following strings will be set based on the state value:
  71009.         --               String       Description
  71010.         --
  71011.         --               Unknown
  71012.         --               Not running   The server does not appear to be running.
  71013.         --               Available     The server is running and responding to requests.
  71014.         --               Not available   The server is running but is not responding to requests.
  71015.           ::= {dceEmsSvrGroup 8}
  71016.  
  71017.  aEmsSvrStateValue OBJECT-TYPE 
  71018.      break=fit compact. 
  71019.  
  71020.          SYNTAX                INTEGER 
  71021.  
  71022.           { 
  71023.  
  71024.            vUnknown            (0), 
  71025.  
  71026.            vNotRunning         (1), 
  71027.  
  71028.            vAvailable          (2), 
  71029.  
  71030.            vNotAvailable       (3) 
  71031.  
  71032.           } 
  71033.  
  71034.           ACCESS       read-only
  71035.           STATUS       mandatory
  71036.           DESCRIPTION   "The state value of this DCE EMS server."
  71037.           ::= {dceEmsSvrGroup 9}
  71038.  
  71039.  
  71040. ΓòÉΓòÉΓòÉ 10.1.8. DCE Security Server Group ΓòÉΓòÉΓòÉ
  71041.  
  71042. dceSecSvrGroup OBJECT IDENTIFIER ::= {MIB 8} 
  71043.  
  71044.  aSecSvrRole OBJECT-TYPE 
  71045.      break=fit compact. 
  71046.  
  71047.          SYNTAX                  INTEGER 
  71048.  
  71049.           { 
  71050.  
  71051.            vUnknown              (0), 
  71052.  
  71053.            vMaster               (1), 
  71054.  
  71055.            vReplica              (2) 
  71056.  
  71057.           } 
  71058.  
  71059.           ACCESS       read-only
  71060.           STATUS       mandatory
  71061.           DESCRIPTION   "The role of the Security server.
  71062.           ::= {dceSecSvrGroup 1}
  71063.  
  71064.  aSecSvrMode OBJECT-TYPE 
  71065.      break=fit compact. 
  71066.  
  71067.          SYNTAX               INTEGER 
  71068.  
  71069.           { 
  71070.  
  71071.            vUnknown           (0), 
  71072.  
  71073.            vService           (1), 
  71074.  
  71075.            vMaintenance       (2) 
  71076.  
  71077.           } 
  71078.  
  71079.           ACCESS       read-only
  71080.           STATUS       mandatory
  71081.           DESCRIPTION   "The mode of the Master Security server.
  71082.           ::= {dceSecSvrGroup 2}
  71083.  
  71084.  aSecRgyUpdTime OBJECT-TYPE 
  71085.  
  71086.           SYNTAX       Date
  71087.           ACCESS       read-only
  71088.           STATUS       mandatory
  71089.           DESCRIPTION   "The localized date and time that the replica was last updated."
  71090.         --              The string will be Unavailable when an error is encountered
  71091.         --              trying to retrieve the string.  The string will be Not applicable
  71092.         --              when the object does not apply.
  71093.           ::= {dceSecSvrGroup 3}
  71094.  
  71095.  aSecRgyUpdSeq OBJECT-TYPE 
  71096.  
  71097.           SYNTAX       INTEGER
  71098.           ACCESS       read-only
  71099.           STATUS       mandatory
  71100.           DESCRIPTION   "The sequence number of the last update that the replica received."
  71101.           ::= {dceSecSvrGroup 4}
  71102.  
  71103.  aSecSvrPid OBJECT-TYPE 
  71104.  
  71105.           SYNTAX       INTEGER
  71106.           ACCESS       read-only
  71107.           STATUS       mandatory
  71108.           DESCRIPTION   "The process ID of the DCE Security server."
  71109.           ::= {dceSecSvrGroup 5}
  71110.  
  71111.  aSecSvrUid OBJECT-TYPE 
  71112.  
  71113.           SYNTAX       INTEGER
  71114.           ACCESS       read-only
  71115.           STATUS       mandatory
  71116.           DESCRIPTION   "The user ID of the DCE Security server."
  71117.           ::= {dceSecSvrGroup 6}
  71118.  
  71119.  aSecSvrGid OBJECT-TYPE 
  71120.  
  71121.           SYNTAX       INTEGER
  71122.           ACCESS       read-only
  71123.           STATUS       mandatory
  71124.           DESCRIPTION   "The group ID of the DCE Security server."
  71125.           ::= {dceSecSvrGroup 7}
  71126.  
  71127.  aSecSvrInRpcCalls OBJECT-TYPE 
  71128.  
  71129.           SYNTAX       Counter
  71130.           ACCESS       read-only
  71131.           STATUS       mandatory
  71132.           DESCRIPTION   "The number of RPC calls received by the DCE Security server."
  71133.           ::= {dceSecSvrGroup 8}
  71134.  
  71135.  aSecSvrOutRpcCalls OBJECT-TYPE 
  71136.  
  71137.           SYNTAX       Counter
  71138.           ACCESS       read-only
  71139.           STATUS       mandatory
  71140.           DESCRIPTION   "The number of RPC calls initiated by the DCE Security server."
  71141.           ::= {dceSecSvrGroup 9}
  71142.  
  71143.  aSecSvrInRpcPkts OBJECT-TYPE 
  71144.  
  71145.           SYNTAX       Counter
  71146.           ACCESS       read-only
  71147.           STATUS       mandatory
  71148.           DESCRIPTION   "The number of RPC packets received by the DCE Security server."
  71149.           ::= {dceSecSvrGroup 10}
  71150.  
  71151.  aSecSvrOutRpcPkts OBJECT-TYPE 
  71152.  
  71153.           SYNTAX       Counter
  71154.           ACCESS       read-only
  71155.           STATUS       mandatory
  71156.           DESCRIPTION   "The number of RPC packets initiated by the DCE Security server."
  71157.           ::= {dceSecSvrGroup 11}
  71158.  
  71159.  aSecSvrState OBJECT-TYPE 
  71160.  
  71161.           SYNTAX       DisplayString (SIZE (0..16))
  71162.           ACCESS       read-only
  71163.           STATUS       mandatory
  71164.           DESCRIPTION   "The state of this DCE Security server."
  71165.         --              One of the following strings will be set based on the state value:
  71166.         --               String       Description
  71167.         --
  71168.         --               Unknown
  71169.         --               Not running   The server does not appear to be running.
  71170.         --               Available     The server is running and responding to requests.
  71171.         --               Not available   The server is running but is not responding to requests.
  71172.           ::= {dceSecSvrGroup 12}
  71173.  
  71174.  aSecSvrStateValue OBJECT-TYPE 
  71175.      break=fit compact. 
  71176.  
  71177.          SYNTAX                  INTEGER 
  71178.  
  71179.           { 
  71180.  
  71181.            vUnknown              (0), 
  71182.  
  71183.            vNotRunning           (1), 
  71184.  
  71185.            vAvailable            (2), 
  71186.  
  71187.            vNotAvailable         (3) 
  71188.  
  71189.           } 
  71190.  
  71191.           ACCESS       read-only
  71192.           STATUS       mandatory
  71193.           DESCRIPTION   "The state value of this DCE Security server."
  71194.           ::= {dceSecSvrGroup 13}
  71195.  
  71196.  aSecSvrRoleString OBJECT-TYPE 
  71197.  
  71198.           SYNTAX       DisplayString (SIZE (0..16))
  71199.           ACCESS       read-only
  71200.           STATUS       mandatory
  71201.           DESCRIPTION   "The role of this DCE Security server."
  71202.         --              One of the following strings will be set based on the state value:
  71203.         --               String        Description
  71204.         --
  71205.         --               Unknown
  71206.         --               Master
  71207.         --               Replica
  71208.         --               Unavailable    An error was encountered trying to retrieve the string.
  71209.         --               Not applicable  The object does not apply.
  71210.           ::= {dceSecSvrGroup 14}
  71211.  
  71212.  aSecSvrModeString OBJECT-TYPE 
  71213.  
  71214.           SYNTAX       DisplayString (SIZE (0..16))
  71215.           ACCESS       read-only
  71216.           STATUS       mandatory
  71217.           DESCRIPTION   "The mode of this DCE Security server."
  71218.         --              One of the following strings will be set based on the state value:
  71219.         --               String        Description
  71220.         --
  71221.         --               Unknown
  71222.         --               Service
  71223.         --               Maintenance
  71224.         --               Unavailable    An error was encountered trying to retrieve the string.
  71225.         --               Not applicable  The object does not apply.
  71226.           ::= {dceSecSvrGroup 15}
  71227.  
  71228.  
  71229. ΓòÉΓòÉΓòÉ 10.1.9. DCE Cell Directory Service Server Group ΓòÉΓòÉΓòÉ
  71230.  
  71231. dceCdsSvrGroup OBJECT IDENTIFIER ::= {MIB 9} 
  71232.  
  71233.  aCdsSvrUpTime OBJECT-TYPE 
  71234.  
  71235.           SYNTAX       Date
  71236.           ACCESS       read-only
  71237.           STATUS       mandatory
  71238.           DESCRIPTION   "The time this server was created."
  71239.         --              The string will be Unavailable when an error is encountered trying to
  71240.         --              retrieve the string.  The string will be Not applicable when the object does not apply.
  71241.           ::= {dceCdsSvrGroup 1}
  71242.  
  71243.  aCdsSvrChildUpdFails OBJECT-TYPE 
  71244.  
  71245.           SYNTAX       Counter
  71246.           ACCESS       read-only
  71247.           STATUS       mandatory
  71248.           DESCRIPTION   "The number of times the server was unable to contact all the clearinghouses
  71249.                        that store a replica of a particular child directory's parent directory and
  71250.                        apply the child updates that have occurred since the last skulk."
  71251.           ::= {dceCdsSvrGroup 2}
  71252.  
  71253.  aCdsSvrCrucialReps OBJECT-TYPE 
  71254.  
  71255.           SYNTAX       Counter
  71256.           ACCESS       read-only
  71257.           STATUS       mandatory
  71258.           DESCRIPTION   "The number of times a user attempted to remove a crucial replica
  71259.                        from this server."
  71260.           ::= {dceCdsSvrGroup 3}
  71261.  
  71262.  aCdsSvrMaxSkewTime OBJECT-TYPE 
  71263.  
  71264.           SYNTAX       INTEGER
  71265.           ACCESS       read-only
  71266.           STATUS       mandatory
  71267.           DESCRIPTION   "The maximum amount of time that a timestamp on a new or modified
  71268.                        entry can vary from local system time."
  71269.           ::= {dceCdsSvrGroup 4}
  71270.  
  71271.  aCdsSvrLookupPathBrokens OBJECT-TYPE 
  71272.  
  71273.           SYNTAX       Counter
  71274.           ACCESS       read-only
  71275.           STATUS       mandatory
  71276.           DESCRIPTION   "The number of broken connections between clearinghouses on
  71277.                        this server and clearinghouses closer to the root."
  71278.           ::= {dceCdsSvrGroup 5}
  71279.  
  71280.  aCdsSvrSecFails OBJECT-TYPE 
  71281.  
  71282.           SYNTAX       Counter
  71283.           ACCESS       read-only
  71284.           STATUS       mandatory
  71285.           DESCRIPTION   "The number of times a server principal for this server was found to have
  71286.                        inadequate permissions to perform a request operation."
  71287.           ::= {dceCdsSvrGroup 6}
  71288.  
  71289.  aCdsSvrSkulkInitd OBJECT-TYPE 
  71290.  
  71291.           SYNTAX       Counter
  71292.           ACCESS       read-only
  71293.           STATUS       mandatory
  71294.           DESCRIPTION   "The number of skulks initiated by this DCE CDS server."
  71295.           ::= {dceCdsSvrGroup 7}
  71296.  
  71297.  aCdsSvrSkulkCmpltd OBJECT-TYPE 
  71298.  
  71299.           SYNTAX       Counter
  71300.           ACCESS       read-only
  71301.           STATUS       mandatory
  71302.           DESCRIPTION   "The number of skulks successfully completed by this DCE CDS server."
  71303.           ::= {dceCdsSvrGroup 8}
  71304.  
  71305.  aCdsSvrReadOps OBJECT-TYPE 
  71306.  
  71307.           SYNTAX       Counter
  71308.           ACCESS       read-only
  71309.           STATUS       mandatory
  71310.           DESCRIPTION   "The number of read operations directed to this DCE CDS server."
  71311.           ::= {dceCdsSvrGroup 9}
  71312.  
  71313.  aCdsSvrWriteOps OBJECT-TYPE 
  71314.  
  71315.           SYNTAX       Counter
  71316.           ACCESS       read-only
  71317.           STATUS       mandatory
  71318.           DESCRIPTION   "The number of write operations to this DCE CDS server."
  71319.           ::= {dceCdsSvrGroup 10}
  71320.  
  71321.  aCdsSvrPid OBJECT-TYPE 
  71322.  
  71323.           SYNTAX       INTEGER
  71324.           ACCESS       read-only
  71325.           STATUS       mandatory
  71326.           DESCRIPTION   "The process ID of this DCE CDS server."
  71327.           ::= {dceCdsSvrGroup 11}
  71328.  
  71329.  aCdsSvrUid OBJECT-TYPE 
  71330.  
  71331.           SYNTAX       INTEGER
  71332.           ACCESS       read-only
  71333.           STATUS       mandatory
  71334.           DESCRIPTION   "The user ID this DCE CDS server."
  71335.           ::= {dceCdsSvrGroup 12}
  71336.  
  71337.  aCdsSvrGid OBJECT-TYPE 
  71338.  
  71339.           SYNTAX       INTEGER
  71340.           ACCESS       read-only
  71341.           STATUS       mandatory
  71342.           DESCRIPTION   "The group ID of this DCE CDS server."
  71343.           ::= {dceCdsSvrGroup 13}
  71344.  
  71345.  aCdsSvrInRpcCalls OBJECT-TYPE 
  71346.  
  71347.           SYNTAX       Counter
  71348.           ACCESS       read-only
  71349.           STATUS       mandatory
  71350.           DESCRIPTION   "The number of RPC calls received by the DCE CDS server."
  71351.           ::= {dceCdsSvrGroup 14}
  71352.  
  71353.  aCdsSvrOutRpcCalls OBJECT-TYPE 
  71354.  
  71355.           SYNTAX       Counter
  71356.           ACCESS       read-only
  71357.           STATUS       mandatory
  71358.           DESCRIPTION   "The number of RPC calls initiated by the DCE CDS server."
  71359.           ::= {dceCdsSvrGroup 15}
  71360.  
  71361.  aCdsSvrInRpcPkts OBJECT-TYPE 
  71362.  
  71363.           SYNTAX       Counter
  71364.           ACCESS       read-only
  71365.           STATUS       mandatory
  71366.           DESCRIPTION   "The number of RPC packets received by the DCE CDS server."
  71367.           ::= {dceCdsSvrGroup 16}
  71368.  
  71369.  aCdsSvrOutRpcPkts OBJECT-TYPE 
  71370.  
  71371.           SYNTAX       Counter
  71372.           ACCESS       read-only
  71373.           STATUS       mandatory
  71374.           DESCRIPTION   "The number of RPC packets initiated by the DCE CDS server."
  71375.           ::= {dceCdsSvrGroup 17}
  71376.  
  71377.  aCdsSvrState OBJECT-TYPE 
  71378.  
  71379.           SYNTAX       DisplayString (SIZE (0..16))
  71380.           ACCESS       read-only
  71381.           STATUS       mandatory
  71382.           DESCRIPTION   "The state of this DCE CDS Server."
  71383.         --              One of the following strings will be set based on the state value:
  71384.         --               String       Description
  71385.         --
  71386.         --               Unknown
  71387.         --               Not running   The server does not appear to be running.
  71388.         --               Available     The server is running and responding to requests.
  71389.         --               Not available   The server is running but is not responding to requests.
  71390.           ::= {dceCdsSvrGroup 18}
  71391.  
  71392.  aCdsSvrStateValue OBJECT-TYPE 
  71393.      break=fit compact. 
  71394.  
  71395.          SYNTAX                  INTEGER 
  71396.  
  71397.           { 
  71398.  
  71399.            vUnknown              (0), 
  71400.  
  71401.            vNotRunning           (1), 
  71402.  
  71403.            vAvailable            (2), 
  71404.  
  71405.            vNotAvailable         (3) 
  71406.  
  71407.           } 
  71408.  
  71409.           ACCESS       read-only
  71410.           STATUS       mandatory
  71411.           DESCRIPTION   "The state value of this DCE CDS server."
  71412.           ::= {dceCdsSvrGroup 19}
  71413.  
  71414.  
  71415. ΓòÉΓòÉΓòÉ 10.1.10. DCE Cell Directory Service Advertiser Group ΓòÉΓòÉΓòÉ
  71416.  
  71417. dceCdsAdvGroup OBJECT IDENTIFIER ::= {MIB 10} 
  71418.  
  71419.  aCdsAdvUpTime OBJECT-TYPE 
  71420.  
  71421.           SYNTAX       Date
  71422.           ACCESS       read-only
  71423.           STATUS       mandatory
  71424.           DESCRIPTION   "The start time of the DCE CDS advertiser."
  71425.         --              The string will be Unavailable when an error is encountered
  71426.         --              trying to retrieve the string.  The string will be Not applicable when
  71427.         --              the object does not apply.
  71428.           ::= {dceCdsAdvGroup 1}
  71429.  
  71430.  aCdsAdvPid OBJECT-TYPE 
  71431.  
  71432.           SYNTAX       INTEGER
  71433.           ACCESS       read-only
  71434.           STATUS       mandatory
  71435.           DESCRIPTION   "The process ID of the DCE CDS advertiser."
  71436.           ::= {dceCdsAdvGroup 2}
  71437.  
  71438.  aCdsAdvUid OBJECT-TYPE 
  71439.  
  71440.           SYNTAX       INTEGER
  71441.           ACCESS       read-only
  71442.           STATUS       mandatory
  71443.           DESCRIPTION   "The user ID of this DCE CDS advertiser."
  71444.           ::= {dceCdsAdvGroup 3}
  71445.  
  71446.  aCdsAdvGid OBJECT-TYPE 
  71447.  
  71448.           SYNTAX       INTEGER
  71449.           ACCESS       read-only
  71450.           STATUS       mandatory
  71451.           DESCRIPTION   "The group ID of this DCE CDS advertiser."
  71452.           ::= {dceCdsAdvGroup 4}
  71453.  
  71454.  aCdsAdvInRpcCalls OBJECT-TYPE 
  71455.  
  71456.           SYNTAX       Counter
  71457.           ACCESS       read-only
  71458.           STATUS       mandatory
  71459.           DESCRIPTION   "The number of RPC calls received by the DCE CDS advertiser."
  71460.           ::= {dceCdsAdvGroup 5}
  71461.  
  71462.  aCdsAdvOutRpcCalls OBJECT-TYPE 
  71463.  
  71464.           SYNTAX       Counter
  71465.           ACCESS       read-only
  71466.           STATUS       mandatory
  71467.           DESCRIPTION   "The number of RPC calls initiated by the DCE CDS advertiser."
  71468.           ::= {dceCdsAdvGroup 6}
  71469.  
  71470.  aCdsAdvInRpcPkts OBJECT-TYPE 
  71471.  
  71472.           SYNTAX       Counter
  71473.           ACCESS       read-only
  71474.           STATUS       mandatory
  71475.           DESCRIPTION   "The number of RPC packets received by the DCE CDS advertiser."
  71476.           ::= {dceCdsAdvGroup 7}
  71477.  
  71478.  aCdsAdvOutRpcPkts OBJECT-TYPE 
  71479.  
  71480.           SYNTAX       Counter
  71481.           ACCESS       read-only
  71482.           STATUS       mandatory
  71483.           DESCRIPTION   "The number of RPC packets initiated by the DCE CDS advertiser."
  71484.           ::= {dceCdsAdvGroup 8}
  71485.  
  71486.  aCdsAdvState OBJECT-TYPE 
  71487.  
  71488.           SYNTAX       DisplayString (SIZE (0..16))
  71489.           ACCESS       read-only
  71490.           STATUS       mandatory
  71491.           DESCRIPTION   "The state of this DCE CDS advertiser."
  71492.         --              One of the following strings will be set based on the state value:
  71493.         --               String       Description
  71494.         --
  71495.         --               Unknown
  71496.         --               Not running   The server does not appear to be running.
  71497.         --               Available     The server is running and responding to requests.
  71498.         --               Not available   The server is running but is not responding to requests.
  71499.           ::= {dceCdsAdvGroup 9}
  71500.  
  71501.  aCdsAdvStateValue OBJECT-TYPE 
  71502.      break=fit compact. 
  71503.  
  71504.          SYNTAX                  INTEGER 
  71505.  
  71506.           { 
  71507.  
  71508.            vUnknown              (0), 
  71509.  
  71510.            vNotRunning           (1), 
  71511.  
  71512.            vAvailable            (2), 
  71513.  
  71514.            vNotAvailable         (3) 
  71515.  
  71516.           } 
  71517.  
  71518.           ACCESS       read-only
  71519.           STATUS       mandatory
  71520.           DESCRIPTION   "The state value of this DCE CDS advertiser."
  71521.           ::= {dceCdsAdvGroup 10}
  71522.  
  71523.  
  71524. ΓòÉΓòÉΓòÉ 10.1.11. DCE Cell Directory Service Clerks Group ΓòÉΓòÉΓòÉ
  71525.  
  71526. dceCdsClerksGroup OBJECT IDENTIFIER ::= {MIB 11} 
  71527.  
  71528.  aCdsClerksAuthFails OBJECT-TYPE 
  71529.  
  71530.           SYNTAX       Counter
  71531.           ACCESS       read-only
  71532.           STATUS       mandatory
  71533.           DESCRIPTION   "The number of times requesting principals failed authentication procedures."
  71534.           ::= {dceCdsClerksGroup 1}
  71535.  
  71536.  aCdsClerksCacheBypasses OBJECT-TYPE 
  71537.  
  71538.           SYNTAX       Counter
  71539.           ACCESS       read-only
  71540.           STATUS       mandatory
  71541.           DESCRIPTION   "The number of requests to read attributes for which the clerks were specifically
  71542.                        directed by the requesting application to bypass its own cache."
  71543.           ::= {dceCdsClerksGroup 2}
  71544.  
  71545.  aCdsClerksCacheHits OBJECT-TYPE 
  71546.  
  71547.           SYNTAX       Counter
  71548.           ACCESS       read-only
  71549.           STATUS       mandatory
  71550.           DESCRIPTION   "The total number of read requests directed to the clerks that were satisfied
  71551.                        entirely by its cache."
  71552.           ::= {dceCdsClerksGroup 3}
  71553.  
  71554.  aCdsClerksMiscOps OBJECT-TYPE 
  71555.  
  71556.           SYNTAX       Counter
  71557.           ACCESS       read-only
  71558.           STATUS       mandatory
  71559.           DESCRIPTION   "The number of operations other than read and write performed by the clerks."
  71560.           ::= {dceCdsClerksGroup 4}
  71561.  
  71562.  aCdsClerksReadOps OBJECT-TYPE 
  71563.  
  71564.           SYNTAX       Counter
  71565.           ACCESS       read-only
  71566.           STATUS       mandatory
  71567.           DESCRIPTION   "The number of lookup operations performed by the clerks."
  71568.           ::= {dceCdsClerksGroup 5}
  71569.  
  71570.  aCdsClerksWriteOps OBJECT-TYPE 
  71571.  
  71572.           SYNTAX       Counter
  71573.           ACCESS       read-only
  71574.           STATUS       mandatory
  71575.           DESCRIPTION   "The number of requests to modify data processed by the clerks."
  71576.           ::= {dceCdsClerksGroup 6}
  71577.  
  71578.  
  71579. ΓòÉΓòÉΓòÉ 10.1.12. DCE Cell Directory Service Clerk Table Group ΓòÉΓòÉΓòÉ
  71580.  
  71581.  cdsClerkTable OBJECT-TYPE 
  71582.  
  71583.           SYNTAX       SEQUENCE OF CdsClerkEntry
  71584.           ACCESS       not-accessible
  71585.           STATUS       mandatory
  71586.           DESCRIPTION   "A list of DCE CDS clerks on the host."
  71587.           ::= {MIB 12}
  71588.  
  71589.  cdsClerkEntry OBJECT-TYPE 
  71590.  
  71591.           SYNTAX       CdsClerkEntry
  71592.           ACCESS       not-accessible
  71593.           STATUS       mandatory
  71594.           DESCRIPTION   ""
  71595.           INDEX        {aClerkPid}
  71596.           ::= {cdsClerkTable 1}
  71597.  
  71598.  CdsClerkEntry ::= SEQUENCE 
  71599.      break=fit compact. 
  71600.  
  71601.           { 
  71602.  
  71603.            aClerkUser         DisplayString, 
  71604.  
  71605.            aClerkUid          INTEGER, 
  71606.  
  71607.            aClerkPid          INTEGER, 
  71608.  
  71609.            aClerkUpTime       Date 
  71610.  
  71611.           } 
  71612.  
  71613.  aClerkUser OBJECT-TYPE 
  71614.  
  71615.           SYNTAX       DisplayString (SIZE (0..64))
  71616.           ACCESS       read-only
  71617.           STATUS       mandatory
  71618.           DESCRIPTION   "The user name of a clerk on the host.  This contains the string Not
  71619.                        applicable because there is no user concept prevalent on OS/2."
  71620.           ::= {cdsClerkEntry 1}
  71621.  
  71622.  aClerkUid OBJECT-TYPE 
  71623.  
  71624.           SYNTAX       INTEGER
  71625.           ACCESS       read-only
  71626.           STATUS       mandatory
  71627.           DESCRIPTION   "The user ID of a clerk on the host.  This field is returned as
  71628.                        0 (zero) because there is no user concept prevalent on OS/2."
  71629.           ::= {cdsClerkEntry 2}
  71630.  
  71631.  aClerkPid OBJECT-TYPE 
  71632.  
  71633.           SYNTAX       INTEGER
  71634.           ACCESS       read-only
  71635.           STATUS       mandatory
  71636.           DESCRIPTION   "The process ID of a clerk on the host."
  71637.           ::= {cdsClerkEntry 3}
  71638.  
  71639.  aClerkUpTime OBJECT-TYPE 
  71640.  
  71641.           SYNTAX       Date
  71642.           ACCESS       read-only
  71643.           STATUS       mandatory
  71644.           DESCRIPTION   "The start time of a clerk on the host."
  71645.         --              The string will be Unavailable when an error is encountered
  71646.         --              trying to retrieve the string.  The string will be Not applicable when
  71647.         --              the object does not apply.
  71648.           ::= {cdsClerkEntry 4}
  71649.  
  71650.  
  71651. ΓòÉΓòÉΓòÉ 10.1.13. DCE Cell Directory Service Clearinghouse Table Group ΓòÉΓòÉΓòÉ
  71652.  
  71653.  cdsCHTable OBJECT-TYPE 
  71654.  
  71655.           SYNTAX       SEQUENCE OF CdsCHEntry
  71656.           ACCESS       not-accessible
  71657.           STATUS       mandatory
  71658.           DESCRIPTION   "A list of clearinghouses on the host."
  71659.           ::= {MIB 13}
  71660.  
  71661.  cdsCHEntry OBJECT-TYPE 
  71662.  
  71663.           SYNTAX       CdsCHEntry
  71664.           ACCESS       not-accessible
  71665.           STATUS       mandatory
  71666.           DESCRIPTION   ""
  71667.           INDEX        {aChName}
  71668.           ::= {cdsCHTable 1}
  71669.  
  71670.  CdsCHEntry ::= SEQUENCE 
  71671.      break=fit compact. 
  71672.  
  71673.           { 
  71674.  
  71675.            aChName                DisplayString, 
  71676.  
  71677.            aChDataCorrupts        Counter, 
  71678.  
  71679.            aChEnableCounts        Counter, 
  71680.  
  71681.            aChDisableCounts       Counter, 
  71682.  
  71683.            aChRefReturns          Counter, 
  71684.  
  71685.            aChSkulkFails          Counter, 
  71686.  
  71687.            aChEntryMisses         Counter, 
  71688.  
  71689.            aChRootLosts           Counter, 
  71690.  
  71691.            aChUpgFails            Counter, 
  71692.  
  71693.            aChReadOps             Counter, 
  71694.  
  71695.            aChWriteOps            Counter 
  71696.  
  71697.           } 
  71698.  
  71699.  aChName OBJECT-TYPE 
  71700.  
  71701.           SYNTAX       DisplayString (SIZE (0..64))
  71702.           ACCESS       read-only
  71703.           STATUS       mandatory
  71704.           DESCRIPTION   "The full name of the clearinghouse."
  71705.         --              The string will be Unavailable when an error is encountered
  71706.         --              trying to retrieve the string.  The string will be Not applicable when
  71707.         --              the object does not apply.
  71708.           ::= {cdsCHEntry 1}
  71709.  
  71710.  aChDataCorrupts OBJECT-TYPE 
  71711.  
  71712.           SYNTAX       Counter
  71713.           ACCESS       read-only
  71714.           STATUS       mandatory
  71715.           DESCRIPTION   "The number of times that the data corruption event was generated "
  71716.           ::= {cdsCHEntry 2}
  71717.  
  71718.  aChEnableCounts OBJECT-TYPE 
  71719.  
  71720.           SYNTAX       Counter
  71721.           ACCESS       read-only
  71722.           STATUS       mandatory
  71723.           DESCRIPTION   "The number of times that the clearinghouse was enabled
  71724.                        since it was last started."
  71725.           ::= {cdsCHEntry 3}
  71726.  
  71727.  aChDisableCounts OBJECT-TYPE 
  71728.  
  71729.           SYNTAX       Counter
  71730.           ACCESS       read-only
  71731.           STATUS       mandatory
  71732.           DESCRIPTION   "The number of times that the clearinghouse was disabled
  71733.                        since it was last started."
  71734.           ::= {cdsCHEntry 4}
  71735.  
  71736.  aChRefReturns OBJECT-TYPE 
  71737.  
  71738.           SYNTAX       Counter
  71739.           ACCESS       read-only
  71740.           STATUS       mandatory
  71741.           DESCRIPTION   "The number of requests directed to this clearinghouse that resulted in the
  71742.                        return of a partial answer instead of satisfying the client's request."
  71743.           ::= {cdsCHEntry 5}
  71744.  
  71745.  aChSkulkFails OBJECT-TYPE 
  71746.  
  71747.           SYNTAX       Counter
  71748.           ACCESS       read-only
  71749.           STATUS       mandatory
  71750.           DESCRIPTION   "The number of times that a skulk of a directory,
  71751.                        initiated from this clearinghouse, failed to complete."
  71752.           ::= {cdsCHEntry 6}
  71753.  
  71754.  aChEntryMisses OBJECT-TYPE 
  71755.  
  71756.           SYNTAX       Counter
  71757.           ACCESS       read-only
  71758.           STATUS       mandatory
  71759.           DESCRIPTION   "The number of times the clearinghouse entry missing
  71760.                        event was generated."
  71761.           ::= {cdsCHEntry 7}
  71762.  
  71763.  aChRootLosts OBJECT-TYPE 
  71764.  
  71765.           SYNTAX       Counter
  71766.           ACCESS       read-only
  71767.           STATUS       mandatory
  71768.           DESCRIPTION   "The number of times the root lost event was generated."
  71769.           ::= {cdsCHEntry 8}
  71770.  
  71771.  aChUpgFails OBJECT-TYPE 
  71772.  
  71773.           SYNTAX       Counter
  71774.           ACCESS       read-only
  71775.           STATUS       mandatory
  71776.           DESCRIPTION   "The number of times that upgrades failed."
  71777.           ::= {cdsCHEntry 9}
  71778.  
  71779.  aChReadOps OBJECT-TYPE 
  71780.  
  71781.           SYNTAX       Counter
  71782.           ACCESS       read-only
  71783.           STATUS       mandatory
  71784.           DESCRIPTION   "The number of read operations directed to this clearinghouse."
  71785.           ::= {cdsCHEntry 10}
  71786.  
  71787.  aChWriteOps OBJECT-TYPE 
  71788.  
  71789.           SYNTAX       Counter
  71790.           ACCESS       read-only
  71791.           STATUS       mandatory
  71792.           DESCRIPTION   "The number of write operations directed to this clearinghouse."
  71793.           ::= {cdsCHEntry 11}
  71794.  
  71795.  
  71796. ΓòÉΓòÉΓòÉ 10.1.14. DCE Cell Directory Service Cached Clearinghouse Table Group ΓòÉΓòÉΓòÉ
  71797.  
  71798.  cdsCachedCHTable OBJECT-TYPE 
  71799.  
  71800.           SYNTAX       SEQUENCE OF CdsCachedCHEntry
  71801.           ACCESS       not-accessible
  71802.           STATUS       mandatory
  71803.           DESCRIPTION   "A list of cached clearinghouses on the host."
  71804.           ::= {MIB 14}
  71805.  
  71806.  cdsCachedCHEntry OBJECT-TYPE 
  71807.  
  71808.           SYNTAX       CdsCachedCHEntry
  71809.           ACCESS       not-accessible
  71810.           STATUS       mandatory
  71811.           DESCRIPTION   ""
  71812.           INDEX        {aCachedCHName}
  71813.           ::= {cdsCachedCHTable 1}
  71814.  
  71815.  CdsCachedCHEntry ::= SEQUENCE 
  71816.      break=fit compact. 
  71817.  
  71818.           { 
  71819.  
  71820.            aCachedCHName             DisplayString, 
  71821.  
  71822.            aCachedCHUpTime           Date, 
  71823.  
  71824.            aCachedCHMiscOps          Counter, 
  71825.  
  71826.            aCachedCHReadOps          Counter, 
  71827.  
  71828.            aCachedCHWriteOps         Counter 
  71829.  
  71830.           } 
  71831.  
  71832.  aCachedCHName OBJECT-TYPE 
  71833.  
  71834.           SYNTAX       DisplayString (SIZE (0..64))
  71835.           ACCESS       read-only
  71836.           STATUS       mandatory
  71837.           DESCRIPTION   "The name of the cached clearinghouse."
  71838.         --              The string will be Unavailable when an error is encountered
  71839.         --              trying to retrieve the string.  The string will be Not applicable when
  71840.         --              the object does not apply.
  71841.           ::= {cdsCachedCHEntry 1}
  71842.  
  71843.  aCachedCHUpTime OBJECT-TYPE 
  71844.  
  71845.           SYNTAX       Date
  71846.           ACCESS       read-only
  71847.           STATUS       mandatory
  71848.           DESCRIPTION   "The date and time at which the clearinghouse was added to the cache."
  71849.         --              The string will be Unavailable when an error is encountered
  71850.         --              trying to retrieve the string.  The string will be Not applicable when
  71851.         --              the object does not apply.
  71852.           ::= {cdsCachedCHEntry 2}
  71853.  
  71854.  aCachedCHMiscOps OBJECT-TYPE 
  71855.  
  71856.           SYNTAX       Counter
  71857.           ACCESS       read-only
  71858.           STATUS       mandatory
  71859.           DESCRIPTION   "The number of operations other than read and write the clerk has
  71860.                        performed on the clearinghouse represented by the cache entry."
  71861.           ::= {cdsCachedCHEntry 3}
  71862.  
  71863.  aCachedCHReadOps OBJECT-TYPE 
  71864.  
  71865.           SYNTAX       Counter
  71866.           ACCESS       read-only
  71867.           STATUS       mandatory
  71868.           DESCRIPTION   "The number of lookup operations the clerk has performed
  71869.                        on the clearinghouse represented by the cache entry."
  71870.           ::= {cdsCachedCHEntry 4}
  71871.  
  71872.  aCachedCHWriteOps OBJECT-TYPE 
  71873.  
  71874.           SYNTAX       Counter
  71875.           ACCESS       read-only
  71876.           STATUS       mandatory
  71877.           DESCRIPTION   "The number of write operations the clerk has sent to
  71878.                        the clearinghouse represented by the cache entry."
  71879.           ::= {cdsCachedCHEntry 5}
  71880.  
  71881.  
  71882. ΓòÉΓòÉΓòÉ 10.1.15. DCE Global Directory Agent Server Group ΓòÉΓòÉΓòÉ
  71883.  
  71884. dceGdaSvrGroup OBJECT IDENTIFIER ::= {MIB 15} 
  71885.  
  71886.  aGdaSvrPid OBJECT-TYPE 
  71887.  
  71888.           SYNTAX       INTEGER
  71889.           ACCESS       read-only
  71890.           STATUS       mandatory
  71891.           DESCRIPTION   "The process ID of this DCE GDA server."
  71892.           ::= {dceGdaSvrGroup 1}
  71893.  
  71894.  aGdaSvrUid OBJECT-TYPE 
  71895.  
  71896.           SYNTAX       INTEGER
  71897.           ACCESS       read-only
  71898.           STATUS       mandatory
  71899.           DESCRIPTION   "The user ID of this DCE GDA server."
  71900.           ::= {dceGdaSvrGroup 2}
  71901.  
  71902.  aGdaSvrGid OBJECT-TYPE 
  71903.  
  71904.           SYNTAX       INTEGER
  71905.           ACCESS       read-only
  71906.           STATUS       mandatory
  71907.           DESCRIPTION   "The group ID of this DCE GDA server."
  71908.           ::= {dceGdaSvrGroup 3}
  71909.  
  71910.  aGdaSvrInRpcCalls OBJECT-TYPE 
  71911.  
  71912.           SYNTAX       Counter
  71913.           ACCESS       read-only
  71914.           STATUS       mandatory
  71915.           DESCRIPTION   "The number of RPC calls received by the GDA server."
  71916.           ::= {dceGdaSvrGroup 4}
  71917.  
  71918.  aGdaSvrOutRpcCalls OBJECT-TYPE 
  71919.  
  71920.           SYNTAX       Counter
  71921.           ACCESS       read-only
  71922.           STATUS       mandatory
  71923.           DESCRIPTION   "The number of RPC calls initiated by the GDA server."
  71924.           ::= {dceGdaSvrGroup 5}
  71925.  
  71926.  aGdaSvrInRpcPkts OBJECT-TYPE 
  71927.  
  71928.           SYNTAX       Counter
  71929.           ACCESS       read-only
  71930.           STATUS       mandatory
  71931.           DESCRIPTION   "The number of RPC packets received by the GDA server."
  71932.           ::= {dceGdaSvrGroup 6}
  71933.  
  71934.  aGdaSvrOutRpcPkts OBJECT-TYPE 
  71935.  
  71936.           SYNTAX       Counter
  71937.           ACCESS       read-only
  71938.           STATUS       mandatory
  71939.           DESCRIPTION   "The number of RPC packets initiated the GDA server."
  71940.           ::= {dceGdaSvrGroup 7}
  71941.  
  71942.  aGdaSvrState OBJECT-TYPE 
  71943.  
  71944.           SYNTAX       DisplayString (SIZE (0..16))
  71945.           ACCESS       read-only
  71946.           STATUS       mandatory
  71947.           DESCRIPTION   "The state of this DCE GDA server."
  71948.         --              One of the following strings will be set based on the state value:
  71949.         --               String       Description
  71950.         --
  71951.         --               Unknown
  71952.         --               Not running   The server does not appear to be running.
  71953.         --               Available     The server is running and responding to requests.
  71954.         --               Not available   The server is running but is not responding to requests.
  71955.           ::= {dceGdaSvrGroup 8}
  71956.  
  71957.  aGdaSvrStateValue OBJECT-TYPE 
  71958.      break=fit compact. 
  71959.  
  71960.          SYNTAX                  INTEGER 
  71961.  
  71962.           { 
  71963.  
  71964.            vUnknown              (0), 
  71965.  
  71966.            vNotRunning           (1), 
  71967.  
  71968.            vAvailable            (2), 
  71969.  
  71970.            vNotAvailable         (3) 
  71971.  
  71972.           } 
  71973.  
  71974.           ACCESS       read-only
  71975.           STATUS       mandatory
  71976.           DESCRIPTION   "The state value of this DCE GDA server."
  71977.           ::= {dceGdaSvrGroup 9}
  71978.  
  71979.  
  71980. ΓòÉΓòÉΓòÉ 10.1.16. DCE Distributed Time Service Entity Group ΓòÉΓòÉΓòÉ
  71981.  
  71982. dceDtsEntityGroup OBJECT IDENTIFIER ::= {MIB 16} 
  71983.  
  71984.  aDtsdCurrTime OBJECT-TYPE 
  71985.  
  71986.           SYNTAX       Date
  71987.           ACCESS       read-only
  71988.           STATUS       mandatory
  71989.           DESCRIPTION   "Current time on the node."
  71990.         --              The string will be Unavailable when an error is encountered
  71991.         --              trying to retrieve the string.  The string will be Not applicable when
  71992.         --              the object does not apply.
  71993.           ::= {dceDtsEntityGroup 1}
  71994.  
  71995.  aDtsdBadProtocols OBJECT-TYPE 
  71996.  
  71997.           SYNTAX       Counter
  71998.           ACCESS       read-only
  71999.           STATUS       mandatory
  72000.           DESCRIPTION   "The number of times the local node failed to process a received message
  72001.                        containing an incompatible protocol version."
  72002.           ::= {dceDtsEntityGroup 2}
  72003.  
  72004.  aDtsdBadTimeReps OBJECT-TYPE 
  72005.  
  72006.           SYNTAX       Counter
  72007.           ACCESS       read-only
  72008.           STATUS       mandatory
  72009.           DESCRIPTION   "The number of times the local node failed to process a received message
  72010.                        containing an incompatible timestamp format."
  72011.           ::= {dceDtsEntityGroup 3}
  72012.  
  72013.  aDtsdInsufRes OBJECT-TYPE 
  72014.  
  72015.           SYNTAX       Counter
  72016.           ACCESS       read-only
  72017.           STATUS       mandatory
  72018.           DESCRIPTION   "The number of times the node has been unable to
  72019.                        allocate virtual memory."
  72020.           ::= {dceDtsEntityGroup 4}
  72021.  
  72022.  aDtsdLocalNotIntersects OBJECT-TYPE 
  72023.  
  72024.           SYNTAX       Counter
  72025.           ACCESS       read-only
  72026.           STATUS       mandatory
  72027.           DESCRIPTION   "The number of times the node's time interval failed to
  72028.                        intersect with the computed interval of the servers."
  72029.           ::= {dceDtsEntityGroup 5}
  72030.  
  72031.  aDtsdSyncCmpltd OBJECT-TYPE 
  72032.  
  72033.           SYNTAX       Counter
  72034.           ACCESS       read-only
  72035.           STATUS       mandatory
  72036.           DESCRIPTION   "The number of times the node successfully synchronized time."
  72037.           ::= {dceDtsEntityGroup 6}
  72038.  
  72039.  aDtsdSysErrors OBJECT-TYPE 
  72040.  
  72041.           SYNTAX       Counter
  72042.           ACCESS       read-only
  72043.           STATUS       mandatory
  72044.           DESCRIPTION   "The number of times the DTS entity detected a system error."
  72045.           ::= {dceDtsEntityGroup 7}
  72046.  
  72047.  aDtsdTooFewSvrs OBJECT-TYPE 
  72048.  
  72049.           SYNTAX       Counter
  72050.           ACCESS       read-only
  72051.           STATUS       mandatory
  72052.           DESCRIPTION   "The number of times a node failed to synchronize because it could not
  72053.                        contact the required minimum number of servers."
  72054.           ::= {dceDtsEntityGroup 8}
  72055.  
  72056.  aDtsdGlobalTo OBJECT-TYPE 
  72057.  
  72058.           SYNTAX       DisplayString (SIZE (0..32))
  72059.           ACCESS       read-only
  72060.           STATUS       mandatory
  72061.           DESCRIPTION   "The amount of time the node waits for a response to a WAN
  72062.                        synchronization request before sending another
  72063.                        request or declaring a global server to be unavailable."
  72064.         --              The string will be Unavailable when an error is encountered
  72065.         --              trying to retrieve the string.  The string will be Not applicable when
  72066.         --              the object does not apply.
  72067.           ::= {dceDtsEntityGroup 9}
  72068.  
  72069.  aDtsdLocalTo OBJECT-TYPE 
  72070.  
  72071.           SYNTAX       DisplayString (SIZE (0..32))
  72072.           ACCESS       read-only
  72073.           STATUS       mandatory
  72074.           DESCRIPTION   "The amount of time the node waits for a response to a synchronization
  72075.                        request before sending another request or declaring a
  72076.                        server to be unavailable."
  72077.         --              The string will be Unavailable when an error is encountered
  72078.         --              trying to retrieve the string.  The string will be Not applicable when
  72079.         --              the object does not apply.
  72080.           ::= {dceDtsEntityGroup 10}
  72081.  
  72082.  aDtsdPid OBJECT-TYPE 
  72083.  
  72084.           SYNTAX       INTEGER
  72085.           ACCESS       read-only
  72086.           STATUS       mandatory
  72087.           DESCRIPTION   "The process ID of this DCE DTS entity."
  72088.           ::= {dceDtsEntityGroup 11}
  72089.  
  72090.  aDtsdUid OBJECT-TYPE 
  72091.  
  72092.           SYNTAX       INTEGER
  72093.           ACCESS       read-only
  72094.           STATUS       mandatory
  72095.           DESCRIPTION   "The user ID of the DCE DTS entity."
  72096.           ::= {dceDtsEntityGroup 12}
  72097.  
  72098.  aDtsdGid OBJECT-TYPE 
  72099.  
  72100.           SYNTAX       INTEGER
  72101.           ACCESS       read-only
  72102.           STATUS       mandatory
  72103.           DESCRIPTION   "The group ID of the DCE DTS entity."
  72104.           ::= {dceDtsEntityGroup 13}
  72105.  
  72106.  aDtsdInRpcCalls OBJECT-TYPE 
  72107.  
  72108.           SYNTAX       Counter
  72109.           ACCESS       read-only
  72110.           STATUS       mandatory
  72111.           DESCRIPTION   "The number of RPC calls received by the DCE DTS entity."
  72112.           ::= {dceDtsEntityGroup 14}
  72113.  
  72114.  aDtsdOutRpcCalls OBJECT-TYPE 
  72115.  
  72116.           SYNTAX       Counter
  72117.           ACCESS       read-only
  72118.           STATUS       mandatory
  72119.           DESCRIPTION   "The number of RPC calls initiated by the DCE DTS entity."
  72120.           ::= {dceDtsEntityGroup 15}
  72121.  
  72122.  aDtsdInRpcPkts OBJECT-TYPE 
  72123.  
  72124.           SYNTAX       Counter
  72125.           ACCESS       read-only
  72126.           STATUS       mandatory
  72127.           DESCRIPTION   "The number of RPC packets received by the DCE DTS entity."
  72128.           ::= {dceDtsEntityGroup 16}
  72129.  
  72130.  aDtsdOutRpcPkts OBJECT-TYPE 
  72131.  
  72132.           SYNTAX       Counter
  72133.           ACCESS       read-only
  72134.           STATUS       mandatory
  72135.           DESCRIPTION   "The number of RPC packets initiated by the DCE DTS entity."
  72136.           ::= {dceDtsEntityGroup 17}
  72137.  
  72138.  aDtsdState OBJECT-TYPE 
  72139.  
  72140.           SYNTAX       DisplayString (SIZE (0..16))
  72141.           ACCESS       read-only
  72142.           STATUS       mandatory
  72143.           DESCRIPTION   "The state of this DCE DTS entity."
  72144.         --              One of the following strings will be set based on the state value:
  72145.         --               String       Description
  72146.         --
  72147.         --               Unknown
  72148.         --               Not running   The server does not appear to be running.
  72149.         --               Available     The server is running and responding to requests.
  72150.         --               Not available   The server is running but is not responding to requests.
  72151.           ::= {dceDtsEntityGroup 18}
  72152.  
  72153.  aDtsdStateValue OBJECT-TYPE 
  72154.      break=fit compact. 
  72155.  
  72156.          SYNTAX                  INTEGER 
  72157.  
  72158.           { 
  72159.  
  72160.            vUnknown              (0), 
  72161.  
  72162.            vNotRunning           (1), 
  72163.  
  72164.            vAvailable            (2), 
  72165.  
  72166.            vNotAvailable         (3) 
  72167.  
  72168.           } 
  72169.  
  72170.           ACCESS       read-only
  72171.           STATUS       mandatory
  72172.           DESCRIPTION   "The state value of this DCE DTS entity.
  72173.           ::= {dceDtsEntityGroup 19}
  72174.  
  72175.  
  72176. ΓòÉΓòÉΓòÉ 10.1.17. DCE Distributed Time Service Server Group ΓòÉΓòÉΓòÉ
  72177.  
  72178. dceDtsSvrGroup OBJECT IDENTIFIER ::= {MIB 17} 
  72179.  
  72180.  aDtsSvrRole OBJECT-TYPE 
  72181.      break=fit compact. 
  72182.  
  72183.          SYNTAX                  Counter 
  72184.  
  72185.           { 
  72186.  
  72187.            vUnknown              (0), 
  72188.  
  72189.            vLocal                (1), 
  72190.  
  72191.            vGlobal               (2) 
  72192.  
  72193.           } 
  72194.  
  72195.           ACCESS       read-only
  72196.           STATUS       mandatory
  72197.           DESCRIPTION   "The role of the DTS server."
  72198.           ::= {dceDtsSvrGroup 1}
  72199.  
  72200.  aDtsSvrCourierRole OBJECT-TYPE 
  72201.      break=fit compact. 
  72202.  
  72203.          SYNTAX                   INTEGER 
  72204.  
  72205.           { 
  72206.  
  72207.            vUnknown               (0), 
  72208.  
  72209.            vCourier               (1), 
  72210.  
  72211.            vBackup                (2), 
  72212.  
  72213.            vNoncourier            (3) 
  72214.  
  72215.           } 
  72216.  
  72217.           ACCESS       read-only
  72218.           STATUS       mandatory
  72219.           DESCRIPTION   "A server's interaction with the set of global servers.
  72220.           ::= {dceDtsSvrGroup 2}
  72221.  
  72222.  aDtsSvrDiffEpochs OBJECT-TYPE 
  72223.  
  72224.           SYNTAX       Counter
  72225.           ACCESS       read-only
  72226.           STATUS       mandatory
  72227.           DESCRIPTION   "The number of times the node received time response messages that
  72228.                        had a different epoch number.
  72229.           ::= {dceDtsSvrGroup 3}
  72230.  
  72231.  aDtsSvrNoGlobals OBJECT-TYPE 
  72232.  
  72233.           SYNTAX       Counter
  72234.           ACCESS       read-only
  72235.           STATUS       mandatory
  72236.           DESCRIPTION   "The number of times the clock could not contact any global clocks."
  72237.           ::= {dceDtsSvrGroup 4}
  72238.  
  72239.  aDtsSvrNotResponds OBJECT-TYPE 
  72240.  
  72241.           SYNTAX       Counter
  72242.           ACCESS       read-only
  72243.           STATUS       mandatory
  72244.           DESCRIPTION   "The number of times the clock could not contact a
  72245.                        specific global clock."
  72246.           ::= {dceDtsSvrGroup 5}
  72247.  
  72248.  aDtsSvrProviderErrors OBJECT-TYPE 
  72249.  
  72250.           SYNTAX       Counter
  72251.           ACCESS       read-only
  72252.           STATUS       mandatory
  72253.           DESCRIPTION   "The number of times the external time provider signaled a failure or the
  72254.                        node was unable to access the time provider."
  72255.           ::= {dceDtsSvrGroup 6}
  72256.  
  72257.  aDtsSvrRoleString OBJECT-TYPE 
  72258.  
  72259.           SYNTAX       DisplayString (SIZE (0..16))
  72260.           ACCESS       read-only
  72261.           STATUS       mandatory
  72262.           DESCRIPTION   "The role of the DCE DTS server."
  72263.         --              One of the following strings will be set based on the aDtsSvrRole value:
  72264.         --               String        Description
  72265.         --
  72266.         --               Unknown
  72267.         --               Local
  72268.         --               Global
  72269.         --               Unavailable    An error was encountered trying to retrieve the string.
  72270.         --               Not applicable  The object does not apply.
  72271.         --               Clerk         If there are no errors and the role is not Local or Global,
  72272.         --                             Clerk is used instead of Unknown.
  72273.           ::= {dceDtsSvrGroup 7}
  72274.  
  72275.  aDtsSvrCourierRoleString OBJECT-TYPE 
  72276.  
  72277.           SYNTAX       DisplayString (SIZE (0..16))
  72278.           ACCESS       read-only
  72279.           STATUS       mandatory
  72280.           DESCRIPTION   "A server's interaction with the set of global servers."
  72281.         --              One of the following strings will be set based on the aDtsSvrCourierRole value:
  72282.         --               String       Description
  72283.         --
  72284.         --               Unknown
  72285.         --               Courier
  72286.         --               Backup
  72287.         --               Noncourier
  72288.         --               Unavailable    An error was encountered trying to retrieve the string.
  72289.         --               Not applicable  The object does not apply.
  72290.           ::= {dceDtsSvrGroup 8}
  72291.  
  72292.  
  72293. ΓòÉΓòÉΓòÉ 10.1.18. DCE Distributed Time Service Known Server Table Group ΓòÉΓòÉΓòÉ
  72294.  
  72295.  dtsKnownSvrTable OBJECT-TYPE 
  72296.  
  72297.           SYNTAX       SEQUENCE OF DtsKnownSvrEntry
  72298.           ACCESS       not-accessible
  72299.           STATUS       mandatory
  72300.           DESCRIPTION   "A list of DCE DTS local or global servers known by this DCE DTS entity."
  72301.           ::= {MIB 18}
  72302.  
  72303.  dtsKnownSvrEntry OBJECT-TYPE 
  72304.  
  72305.           SYNTAX       DtsKnownSvrEntry
  72306.           ACCESS       not-accessible
  72307.           STATUS       mandatory
  72308.           DESCRIPTION   ""
  72309.           INDEX        {aDtsKnownSvrName}
  72310.           ::= {dtsKnownSvrTable 1}
  72311.  
  72312.  DtsKnownSvrEntry ::= SEQUENCE 
  72313.      break=fit compact. 
  72314.  
  72315.           { 
  72316.  
  72317.            aDtsKnownSvrName          DisplayString, 
  72318.  
  72319.            aLastPolled               Date, 
  72320.  
  72321.            aLastObsSkew              DisplayString, 
  72322.  
  72323.            aUsedInLastSync           DisplayString, 
  72324.  
  72325.            aLastObsTime              Date, 
  72326.  
  72327.            aDtsSvrProto              INTEGER, 
  72328.  
  72329.            aDtsSvrProtoString        DisplayString 
  72330.  
  72331.           } 
  72332.  
  72333.  aDtsKnownSvrName OBJECT-TYPE 
  72334.  
  72335.           SYNTAX       DisplayString (SIZE (0..64))
  72336.           ACCESS       read-only
  72337.           STATUS       mandatory
  72338.           DESCRIPTION   "The name of the known DCE DTS server known by this host."
  72339.         --              The string will be Unavailable when an error is encountered
  72340.         --              trying to retrieve the string.  The string will be Not applicable when
  72341.         --              the object does not apply.
  72342.           ::= {dtsKnownSvrEntry 1}
  72343.  
  72344.  aLastPolled OBJECT-TYPE 
  72345.  
  72346.           SYNTAX       Date
  72347.           ACCESS       read-only
  72348.           STATUS       mandatory
  72349.           DESCRIPTION   "The time that the known DCE DTS server was last polled."
  72350.         --              The string will be Unavailable when an error is encountered
  72351.         --              trying to retrieve the string.  The string will be Not applicable when
  72352.         --              the object does not apply.
  72353.           ::= {dtsKnownSvrEntry 2}
  72354.  
  72355.  aLastObsSkew OBJECT-TYPE 
  72356.  
  72357.           SYNTAX       DisplayString (SIZE (0..32))
  72358.           ACCESS       read-only
  72359.           STATUS       mandatory
  72360.           DESCRIPTION   "The last observed time difference of the known DCE DTS server."
  72361.         --              The string will be Unavailable when an error is encountered
  72362.         --              trying to retrieve the string.  The string will be Not applicable when
  72363.         --              the object does not apply.
  72364.           ::= {dtsKnownSvrEntry 3}
  72365.  
  72366.  aUsedInLastSync OBJECT-TYPE 
  72367.  
  72368.           SYNTAX       DisplayString (SIZE (0..32))
  72369.           ACCESS       read-only
  72370.           STATUS       mandatory
  72371.           DESCRIPTION   "The time that the known DTS server was last synchronized."
  72372.         --              The string will be Unavailable when an error is encountered
  72373.         --              trying to retrieve the string.  The string will be Not applicable when
  72374.         --              the object does not apply.
  72375.           ::= {dtsKnownSvrEntry 4}
  72376.  
  72377.  aLastObsTime OBJECT-TYPE 
  72378.  
  72379.           SYNTAX       Date
  72380.           ACCESS       read-only
  72381.           STATUS       mandatory
  72382.           DESCRIPTION   "The time that the known DTS server was last observed."
  72383.         --              The string will be Unavailable when an error is encountered
  72384.         --              trying to retrieve the string.  The string will be Not applicable when
  72385.         --              the object does not apply.
  72386.           ::= {dtsKnownSvrEntry 5}
  72387.  
  72388.  aDtsSvrProto OBJECT-TYPE 
  72389.      break=fit compact. 
  72390.  
  72391.          SYNTAX                  INTEGER 
  72392.  
  72393.           { 
  72394.  
  72395.            vUnknown              (0), 
  72396.  
  72397.            vIEEE802_3            (1), 
  72398.  
  72399.            vDCEnet               (2), 
  72400.  
  72401.            vUDPIP                (3), 
  72402.  
  72403.            vTCPIP                (4), 
  72404.  
  72405.            vRPC                  (5) 
  72406.  
  72407.           } 
  72408.  
  72409.           ACCESS       read-only
  72410.           STATUS       mandatory
  72411.           DESCRIPTION   "The transport protocol of the known DTS server."
  72412.           ::= {dtsKnownSvrEntry 6}
  72413.  
  72414.  aDtsSvrProtoString OBJECT-TYPE 
  72415.  
  72416.           SYNTAX       DisplayString (SIZE (0..16))
  72417.           ACCESS       read-only
  72418.           STATUS       mandatory
  72419.           DESCRIPTION   "The transport protocol of the known DTS server."
  72420.         --              One of the following strings will be set based on the aDtsSvrProto value:
  72421.         --               String       Description
  72422.         --
  72423.         --               Unknown
  72424.         --               IEEE 802.3
  72425.         --               DECnet
  72426.         --               UDP/IP
  72427.         --               TCP/IP
  72428.         --               RPC
  72429.         --               Unavailable    An error was encountered trying to retrieve the string.
  72430.         --               Not applicable  The object does not apply.
  72431.           ::= {dtsKnownSvrEntry 7}
  72432.  
  72433.  
  72434. ΓòÉΓòÉΓòÉ 10.1.19. DCE Traps Group ΓòÉΓòÉΓòÉ
  72435.  
  72436. trapsGroup OBJECT IDENTIFIER ::= {MIB 19} 
  72437.  
  72438.  aEventType OBJECT-TYPE 
  72439.  
  72440.           SYNTAX       DisplayString (SIZE (0..12))
  72441.           ACCESS       not-accessible
  72442.           STATUS       mandatory
  72443.           DESCRIPTION   "The type of the event."
  72444.         --              The event type will be one of the following strings:
  72445.         --                DCE Generic
  72446.         --                DCE Service
  72447.           ::= {trapsGroup 1}
  72448.  
  72449.  aEventText OBJECT-TYPE 
  72450.  
  72451.           SYNTAX       DisplayString (SIZE (0..256))
  72452.           ACCESS       not-accessible
  72453.           STATUS       mandatory
  72454.           DESCRIPTION   "The description of the event."
  72455.           ::= {trapsGroup 2}
  72456.  
  72457.  aEventSeverity OBJECT-TYPE 
  72458.  
  72459.           SYNTAX       DisplayString (SIZE (0..16))
  72460.           ACCESS       not-accessible
  72461.           STATUS       mandatory
  72462.           DESCRIPTION   "The severity level of the event."
  72463.         --              The event severity will be one of the following strings:
  72464.         --                UNKNOWN
  72465.         --                FATAL
  72466.         --                ERROR
  72467.         --                WARNING
  72468.         --                NOTICE
  72469.         --                NOTICE_VERBOSE
  72470.           ::= {trapsGroup 3}
  72471.  
  72472.  aCellName OBJECT-TYPE 
  72473.  
  72474.           SYNTAX       DisplayString (SIZE (0..64))
  72475.           ACCESS       not-accessible
  72476.           STATUS       mandatory
  72477.           DESCRIPTION   "The name of the cell where the event occurred."
  72478.           ::= {trapsGroup 4}
  72479.  
  72480.  aHostName OBJECT-TYPE 
  72481.  
  72482.           SYNTAX       DisplayString (SIZE (0..128))
  72483.           ACCESS       not-accessible
  72484.           STATUS       mandatory
  72485.           DESCRIPTION   "The name of the host where the event occurred."
  72486.           ::= {trapsGroup 5}
  72487.  
  72488.  aTime OBJECT-TYPE 
  72489.  
  72490.           SYNTAX       Date
  72491.           ACCESS       not-accessible
  72492.           STATUS       mandatory
  72493.           DESCRIPTION   "The time when the event occurred."
  72494.           ::= {trapsGroup 6}
  72495.  
  72496.  aProgram OBJECT-TYPE 
  72497.  
  72498.           SYNTAX       DisplayString (SIZE (0..32))
  72499.           ACCESS       not-accessible
  72500.           STATUS       mandatory
  72501.           DESCRIPTION   "The name of the program that generated the event."
  72502.           ::= {trapsGroup 7}
  72503.  
  72504.  aComponent OBJECT-TYPE 
  72505.  
  72506.           SYNTAX       DisplayString (SIZE (0..32))
  72507.           ACCESS       not-accessible
  72508.           STATUS       mandatory
  72509.           DESCRIPTION   "The name of the component that generated the event."
  72510.           ::= {trapsGroup 8}
  72511.  
  72512.  aSubComponent OBJECT-TYPE 
  72513.  
  72514.           SYNTAX       DisplayString (SIZE (0..32))
  72515.           ACCESS       not-accessible
  72516.           STATUS       mandatory
  72517.           DESCRIPTION   "The name of the subcomponent that generated the event."
  72518.           ::= {trapsGroup 9}
  72519.  
  72520.  aThreadId OBJECT-TYPE 
  72521.  
  72522.           SYNTAX       INTEGER
  72523.           ACCESS       not-accessible
  72524.           STATUS       mandatory
  72525.           DESCRIPTION   "The ID of the thread where the event occurred."
  72526.           ::= {trapsGroup 10}
  72527.  
  72528.  aFile OBJECT-TYPE 
  72529.  
  72530.           SYNTAX       DisplayString (SIZE (0..32))
  72531.           ACCESS       not-accessible
  72532.           STATUS       mandatory
  72533.           DESCRIPTION   "The name of the source file that generated the event."
  72534.           ::= {trapsGroup 11}
  72535.  
  72536.  aLine OBJECT-TYPE 
  72537.  
  72538.           SYNTAX       INTEGER
  72539.           ACCESS       not-accessible
  72540.           STATUS       mandatory
  72541.           DESCRIPTION   "The number of the source line that generated the event."
  72542.           ::= {trapsGroup 12}
  72543.  
  72544.