1/* 2 * Copyright (c) 2010 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 3. Neither the name of Apple Inc. ("Apple") nor the names of its 16 * contributors may be used to endorse or promote products derived from 17 * this software without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 20 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * 30 * Portions of this software have been released under the following terms: 31 * 32 * (c) Copyright 1989-1993 OPEN SOFTWARE FOUNDATION, INC. 33 * (c) Copyright 1989-1993 HEWLETT-PACKARD COMPANY 34 * (c) Copyright 1989-1993 DIGITAL EQUIPMENT CORPORATION 35 * 36 * To anyone who acknowledges that this file is provided "AS IS" 37 * without any express or implied warranty: 38 * permission to use, copy, modify, and distribute this file for any 39 * purpose is hereby granted without fee, provided that the above 40 * copyright notices and this notice appears in all source code copies, 41 * and that none of the names of Open Software Foundation, Inc., Hewlett- 42 * Packard Company or Digital Equipment Corporation be used 43 * in advertising or publicity pertaining to distribution of the software 44 * without specific, written prior permission. Neither Open Software 45 * Foundation, Inc., Hewlett-Packard Company nor Digital 46 * Equipment Corporation makes any representations about the suitability 47 * of this software for any purpose. 48 * 49 * Copyright (c) 2007, Novell, Inc. All rights reserved. 50 * Redistribution and use in source and binary forms, with or without 51 * modification, are permitted provided that the following conditions 52 * are met: 53 * 54 * 1. Redistributions of source code must retain the above copyright 55 * notice, this list of conditions and the following disclaimer. 56 * 2. Redistributions in binary form must reproduce the above copyright 57 * notice, this list of conditions and the following disclaimer in the 58 * documentation and/or other materials provided with the distribution. 59 * 3. Neither the name of Novell Inc. nor the names of its contributors 60 * may be used to endorse or promote products derived from this 61 * this software without specific prior written permission. 62 * 63 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 64 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 65 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 66 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY 67 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 68 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 69 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 70 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 71 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 72 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 73 * 74 * @APPLE_LICENSE_HEADER_END@ 75 */ 76 77/* 78** 79** NAME: 80** 81** rpc.idl 82** 83** FACILITY: 84** 85** Remote Procedure Call 86** 87** ABSTRACT: 88** 89** This module contains the public interface to the Common Communications 90** Service of the RPC facility. 91** 92** 93*/ 94 95[local] interface rpc 96{ 97import "dce/lbase.idl"; 98import "dce/rpcsts.idl"; 99import "dce/rpcbase.idl"; 100import "dce/rpcpvt.idl"; 101import "dce/ncastat.idl"; 102import "dce/iovector.idl"; 103import "dce/uuid.idl"; 104import "dce/ndrold.idl"; 105import "dce/rpctypes.idl"; 106import "dce/twr.idl"; 107 108/*************************************************************************/ 109/******************* Comm Services Binding object **********************/ 110/*************************************************************************/ 111 112/* 113 * R P C _ B I N D I N G _ C O P Y 114 * 115 * Copy a binding. A new binding object is created and all attributes of the 116 * source binding are given to the destination binding. This includes 117 * the object UUID, address and timeout value. 118 */ 119void rpc_binding_copy 120( 121 [in] rpc_binding_handle_t src_binding_handle, 122 [out] rpc_binding_handle_t *dst_binding_handle, 123 [out] unsigned32 *status 124); 125 126/* 127 * R P C _ B I N D I N G _ F R E E 128 * 129 * Free a binding. A NULL will be returned. When no more duplicate handles 130 * to a binding object exist, the binding object is freed. 131 */ 132void rpc_binding_free 133( 134 [in, out] rpc_binding_handle_t *binding_handle, 135 [out] unsigned32 *status 136); 137 138/* 139 * R P C _ B I N D I N G _ F R O M _ S T R I N G _ B I N D I N G 140 * 141 * Convert a string binding into a binary binding. 142 */ 143void rpc_binding_from_string_binding 144( 145 [in] unsigned_char_p_t string_binding, 146 [out] rpc_binding_handle_t *binding_handle, 147 [out] unsigned32 *status 148); 149 150/* 151 * R P C _ B I N D I N G _ I N Q _ O B J E C T 152 * 153 * Inquire what the object UUID in a binding is. 154 */ 155void rpc_binding_inq_object 156( 157 [in] rpc_binding_handle_t binding_handle, 158 [out] idl_uuid_t *object_uuid, 159 [out] unsigned32 *status 160); 161 162/* 163 * R P C _ B I N D I N G _ R E S E T 164 * 165 * Reset a binding such that the host is specified but the server on 166 * that host is unspecified. 167 */ 168void rpc_binding_reset 169( 170 [in] rpc_binding_handle_t binding_handle, 171 [out] unsigned32 *status 172); 173 174/* 175 * R P C _ B I N D I N G _ S E T _ O B J E C T 176 * 177 * Set the object UUID in a binding to the given object UUID. 178 */ 179void rpc_binding_set_object 180( 181 [in] rpc_binding_handle_t binding_handle, 182 [in] uuid_p_t object_uuid, 183 [out] unsigned32 *status 184); 185 186/* 187 * R P C _ B I N D I N G _ T O _ S T R I N G _ B I N D I N G 188 * 189 * Convert a binary binding into a string binding. 190 */ 191void rpc_binding_to_string_binding 192( 193 [in] rpc_binding_handle_t binding_handle, 194 [out] unsigned_char_p_t *string_binding, 195 [out] unsigned32 *status 196); 197 198/* 199 * R P C _ B I N D I N G _ V E C T O R _ F R E E 200 * 201 * This routine will free the bindings contained in the vector (using 202 * rpc_binding_free) and the vector itself. A NULL pointer will be 203 * returned. 204 */ 205void rpc_binding_vector_free 206( 207 [in, out] rpc_binding_vector_p_t *binding_vector, 208 [out] unsigned32 *status 209); 210 211/* 212 * R P C _ S T R I N G _ B I N D I N G _ C O M P O S E 213 * 214 * Compose a string binding from its various component parts. 215 */ 216void rpc_string_binding_compose 217( 218 [in] unsigned_char_p_t string_object_uuid, 219 [in] unsigned_char_p_t string_protseq, 220 [in] unsigned_char_p_t string_netaddr, 221 [in] unsigned_char_p_t string_endpoint, 222 [in] unsigned_char_p_t string_options, 223 [out] unsigned_char_p_t *string_binding, 224 [out] unsigned32 *status 225); 226 227/* 228 * R P C _ S T R I N G _ B I N D I N G _ P A R S E 229 * 230 * Split the string binding into its various component parts. 231 * 232 * "object_uuid"@"string_address" ==> "object_uuid" and "string_address" 233 * "string_address" is of the form 234 * "protocol_sequence":"network_address"["endpoint"] 235 */ 236void rpc_string_binding_parse 237( 238 [in] unsigned_char_p_t string_binding, 239 [out] unsigned_char_p_t *string_object_uuid, 240 [out] unsigned_char_p_t *string_protseq, 241 [out] unsigned_char_p_t *string_netaddr, 242 [out] unsigned_char_p_t *string_endpoint, 243 [out] unsigned_char_p_t *string_options, 244 [out] unsigned32 *status 245); 246 247/* 248 * R P C _ B I N D I N G _ S E T _ A U T H _ I N F O 249 * 250 * Set authentication and authorization information into a binding 251 * handle. 252 */ 253void rpc_binding_set_auth_info 254( 255 [in] rpc_binding_handle_t binding_handle, 256 [in] unsigned_char_p_t server_princ_name, 257 [in] unsigned32 protect_level, 258 [in] unsigned32 authn_svc, 259 [in] rpc_auth_identity_handle_t 260 auth_identity, 261 [in] unsigned32 authz_svc, 262 [out] unsigned32 *st 263); 264 265/* 266 * R P C _ B I N D I N G _ I N Q _ A U T H _ I N F O 267 * 268 * Return authentication and authorization information from a binding 269 * handle. Client-only. 270 */ 271void rpc_binding_inq_auth_info 272( 273 [in] rpc_binding_handle_t binding_handle, 274 [out] unsigned_char_p_t *server_princ_name, 275 [out] unsigned32 *protect_level, 276 [out] unsigned32 *authn_svc, 277 [out] rpc_auth_identity_handle_t 278 *auth_identity, 279 [out] unsigned32 *authz_svc, 280 [out] unsigned32 *st 281); 282 283/* 284 * R P C _ B I N D I N G _ I N Q _ A U T H _ C A L L E R 285 * 286 * Return an opaque handle on version 1.1+ authentication and 287 * authorization information from a binding handle to an 288 * authenticated client. The clients credentials are 289 * obtained by calling the sec_cred_ interface. 290 * Server-only. 291 * 292 * This call replaces rpc_binding_inq_auth_client(), which is 293 * supported for backward compatibility purposes. 294 */ 295void rpc_binding_inq_auth_caller 296( 297 [in] rpc_binding_handle_t binding_handle, 298 [out] rpc_authz_cred_handle_t *privs, 299 [out] unsigned_char_p_t *server_princ_name, 300 [out] unsigned32 *protect_level, 301 [out] unsigned32 *authn_svc, 302 [out] unsigned32 *authz_svc, 303 [out] unsigned32 *st 304); 305 306/* 307 * R P C _ B I N D I N G _ I N Q _ A U T H _ C L I E N T 308 * 309 * Return version 1.0.x authentication and authorization information 310 * from a binding handle to an authenticated client. Server-only. 311 * This call is superceded by rpc_binding_inq_auth_caller(), but is 312 * retained for backward compatibility purposes. Server-only. 313 */ 314void rpc_binding_inq_auth_client 315( 316 [in] rpc_binding_handle_t binding_handle, 317 [out] rpc_authz_handle_t *privs, 318 [out] unsigned_char_p_t *server_princ_name, 319 [out] unsigned32 *protect_level, 320 [out] unsigned32 *authn_svc, 321 [out] unsigned32 *authz_svc, 322 [out] unsigned32 *st 323); 324 325void rpc_binding_set_transport_info 326( 327 [in] rpc_binding_handle_t binding_handle, 328 [in] rpc_transport_info_handle_t info, 329 [out] unsigned32 *st 330); 331 332void rpc_binding_inq_transport_info 333( 334 [in] rpc_binding_handle_t binding_handle, 335 [out] rpc_transport_info_handle_t *info, 336 [out] unsigned32 *st 337); 338 339void rpc_binding_inq_prot_seq 340( 341 [in] rpc_binding_handle_t binding_handle, 342 [out] unsigned32 *prot_seq, 343 [out] unsigned32 *st 344); 345 346void rpc_binding_inq_access_token_caller 347( 348 [in] rpc_binding_handle_t binding_handle, 349 [out] rpc_access_token_p_t* token, 350 [out] unsigned32 *st 351); 352 353/* 354 * R P C _ B I N D I N G _ S E R V E R _ F R O M _ C L I E N T 355 * 356 * Convert a client binding handle to a server handle. The new handle's 357 * endpoint is reset and it has no associated authentication information. 358 * 359 * Client binding handles are those created by the runtime and provided 360 * to the server manager as a result of a [handle_t] RPC parameter. 361 */ 362void rpc_binding_server_from_client 363( 364 [in] rpc_binding_handle_t cbinding_handle, 365 [out] rpc_binding_handle_t *sbinding_handle, 366 [out] unsigned32 *status 367); 368 369/* 370 * R P C _ S E R V E R _ I N Q _ C A L L _ A T T R I B U T E S 371 * 372 * Return client security context attributes. 373 */ 374typedef struct rpc_call_attributes_v1_s_t { 375 unsigned32 version; 376 unsigned32 flags; 377 unsigned32 server_princ_name_buff_len; 378 [size_is(server_princ_name_buff_len)] char *server_princ_name; 379 unsigned32 client_princ_name_buff_len; 380 [size_is(client_princ_name_buff_len)] char *client_princ_name; 381 unsigned32 authn_level; 382 unsigned32 authn_protocol; 383 boolean null_session; 384} rpc_call_attributes_v1_t, *rpc_call_attributes_v1_p_t; 385 386typedef rpc_call_attributes_v1_t rpc_call_attributes_t, *rpc_call_attributes_p_t; 387 388const unsigned32 rpc_call_attributes_version = 1; 389const unsigned32 rpc_query_server_principal_name = 2; 390const unsigned32 rpc_query_client_principal_name = 4; 391 392void rpc_server_inq_call_attributes 393( 394 [in] rpc_binding_handle_t cbinding_handle, 395 [out] rpc_call_attributes_t *attributes, 396 [out] unsigned32 *status 397); 398 399/* 400 * R P C _ B I N D I N G _ I N Q _ S E C U R I T Y _ C O N T E X T 401 * 402 * Return mechanism-specific security context. 403 */ 404void rpc_binding_inq_security_context 405( 406 [in] rpc_binding_handle_t binding_handle, 407 [out] unsigned32 *authn_svc, 408 [out] void **mech_context, 409 [out] unsigned32 *st 410); 411 412typedef struct rpc_binding_handle_template_v1_s_t { 413 unsigned32 version; 414 unsigned32 flags; 415 unsigned_char_p_t protseq; 416 unsigned_char_p_t network_address; 417 unsigned_char_p_t string_endpoint; 418 unsigned_char_p_t reserved; 419 idl_uuid_t object_uuid; 420} rpc_binding_handle_template_v1_t, rpc_binding_handle_template_t; 421 422typedef struct rpc_binding_handle_security_v1_s_t { 423 unsigned32 version; 424 unsigned_char_p_t server_princ_name; 425 unsigned32 authn_level; 426 unsigned32 authn_protocol; 427 rpc_auth_identity_handle_t auth_identity; 428 unsigned32 authz_svc; 429} rpc_binding_handle_security_v1_t, rpc_binding_handle_security_t; 430 431typedef struct rpc_binding_handle_options_v1_s_t { 432 unsigned32 version; 433 unsigned32 flags; 434 unsigned32 com_timeout; 435 unsigned32 cancel_timeout; 436} rpc_binding_handle_options_v1_t, rpc_binding_handle_options_t; 437 438const unsigned32 rpc_bht_noncausal = 1; 439const unsigned32 rpc_bht_dont_linger = 2; 440const unsigned32 rpc_bht_exclusive_and_guaranteed = 4; 441 442/* 443 * R P C _ B I N D I N G _ C R E A T E 444 */ 445void rpc_binding_create 446( 447 [in] rpc_binding_handle_template_t *_template, 448 [in] rpc_binding_handle_security_t *security, 449 [in] rpc_binding_handle_options_t *options, 450 [out] rpc_binding_handle_t *handle, 451 [out] unsigned32 *st 452); 453 454/*************************************************************************/ 455/******************* Comm Services Interface object ********************/ 456/*************************************************************************/ 457 458/* 459 * R P C _ I F _ I D _ V E C T O R _ F R E E 460 * 461 * Free the memory allocated by the RPC runtime for an interface id 462 * vector. A NULL pointer will be returned. 463 */ 464void rpc_if_id_vector_free 465( 466 [in, out] rpc_if_id_vector_p_t *if_id_vector, 467 [out] unsigned32 *status 468); 469 470/* 471 * R P C _ I F _ I N Q _ I D 472 * 473 * Inquire what interface UUID and version(s) are contained in the 474 * interface spec handle. 475 */ 476void rpc_if_inq_id 477( 478 [in] rpc_if_handle_t if_spec, 479 [out] rpc_if_id_t *if_id, 480 [out] unsigned32 *status 481); 482 483/*************************************************************************/ 484/****************** Comm Services Network object ***********************/ 485/*************************************************************************/ 486 487/* 488 * R P C _ N E T W O R K _ I N Q _ P R O T S E Q S 489 * 490 * Return all protocol sequences supported by both the RPC runtime and 491 * the operating system. 492 */ 493void rpc_network_inq_protseqs 494( 495 [out] rpc_protseq_vector_p_t *protseq_vector, 496 [out] unsigned32 *status 497); 498 499/* 500 * R P C _ N E T W O R K _ I S _ P R O T S E Q _ V A L I D 501 * 502 * This routine will return false if the protocol sequence given is not 503 * supported by either the RPC runtime or the operating system. It will return 504 * true if it is supported by both the RPC runtime and the operating system. 505 */ 506boolean32 rpc_network_is_protseq_valid 507( 508 [in] unsigned_char_p_t protseq, 509 [out] unsigned32 *status 510); 511 512/*************************************************************************/ 513/******************* Comm Services Object object ***********************/ 514/*************************************************************************/ 515 516/* 517 * R P C _ O B J E C T _ S E T _ T Y P E 518 * 519 * Set the type UUID associated with an object UUID in the RPC runtime. 520 * This routine, used in conjunction with rpc_if_register, allows a server 521 * to support multiple implementations of the same interface. The RPC 522 * runtime will dispatch to a specific implementation, contained in a 523 * manager Entry Point Vector, based on the object UUID contained in the 524 * binding of the RPC. The RPC runtime, using the results of a call to 525 * this routine, will determine the type UUID of the object UUID. A 526 * specific manager Entry Point Vector of this type UUID can then be 527 * found using the results of a call to the rpc_if_register 528 * routine. 529 */ 530void rpc_object_set_type 531( 532 [in] uuid_p_t object_uuid, 533 [in] uuid_p_t type_uuid, 534 [out] unsigned32 *status 535); 536 537/* 538 * R P C _ O B J E C T _ I N Q _ T Y P E 539 * 540 * Given an object ID, return its type ID. 541 */ 542void rpc_object_inq_type 543( 544 [in] uuid_p_t object_uuid, 545 [out] idl_uuid_t *type_uuid, 546 [out] unsigned32 *status 547); 548 549/* 550 * R P C _ O B J E C T _ S E T _ I N Q _ F N 551 * 552 * Supply a function that is called by the runtime to determine the type 553 * of objects that have not been set by "rpc_object_set_type". 554 */ 555void rpc_object_set_inq_fn 556( 557 [in] rpc_object_inq_fn_t inq_fn, 558 [out] unsigned32 *status 559); 560 561/*************************************************************************/ 562/******************** Comm Services Protseq object *********************/ 563/*************************************************************************/ 564 565/* 566 * R P C _ P R O T S E Q _ V E C T O R _ F R E E 567 * 568 * Free the memory allocated by the RPC runtime for the protocol sequences 569 * contained in the vector and the vector itself. A NULL pointer will be 570 * returned. 571 */ 572void rpc_protseq_vector_free 573( 574 [in, out] rpc_protseq_vector_p_t *protseq_vector, 575 [out] unsigned32 *status 576); 577 578/*************************************************************************/ 579/******************** Comm Services Server object **********************/ 580/*************************************************************************/ 581 582/* 583 * R P C _ S E R V E R _ I N Q _ B I N D I N G S 584 * 585 * Return the bindings in the local process to which RPCs may be made. 586 * Note that object UUIDs are not part of these bindings. 587 */ 588void rpc_server_inq_bindings 589( 590 [out] rpc_binding_vector_p_t *binding_vector, 591 [out] unsigned32 *status 592); 593 594/* 595 * R P C _ S E R V E R _ L I S T E N 596 * 597 * This routine tells the RPC runtime to being listening for RPCs (in 598 * any of the registered interfaces) on all protocol sequences 599 * previously registered with calls to rpc_protseq_register or 600 * rpc_protseq_register_wk. The maximum number of concurrent calls the 601 * RPC runtime can handle is given. Note that this routine will not 602 * return until either a fault occurs or a shutdown is requested. 603 */ 604void rpc_server_listen 605( 606 [in] unsigned32 max_calls_exec, 607 [out] unsigned32 *status 608); 609 610/* 611 * R P C _ S E R V E R _ U S E _ A L L _ P R O T S E Q S 612 * 613 * This routine tells the RPC runtime to listen for RPCs on all 614 * supported (by both the RPC runtime and the operating system) protocol 615 * sequences. 616 */ 617void rpc_server_use_all_protseqs 618( 619 [in] unsigned32 max_call_requests, 620 [out] unsigned32 *status 621); 622 623/* 624 * R P C _ S E R V E R _ U S E _ P R O T S E Q 625 * 626 * This routine tells the RPC runtime to listen for RPCs on the protocol 627 * sequence given. Note that this protocol sequence must be supported by 628 * both the RPC runtime and the operating system. 629 */ 630void rpc_server_use_protseq 631( 632 [in] unsigned_char_p_t protseq, 633 [in] unsigned32 max_call_requests, 634 [out] unsigned32 *status 635); 636 637/* 638 * R P C _ S E R V E R _ U S E _ P R O T S E Q _ E P 639 * 640 * This routine tells the RPC runtime to listen for RPCs on the protocol 641 * sequence given. Part of the address (endpoint) to be listened on is 642 * provided by the caller. Note that this protocol sequence must be 643 * supported by both the RPC runtime and the operating system. 644 */ 645void rpc_server_use_protseq_ep 646( 647 [in] unsigned_char_p_t protseq, 648 [in] unsigned32 max_call_requests, 649 [in] unsigned_char_p_t endpoint, 650 [out] unsigned32 *status 651); 652 653/* 654 * R P C _ S E R V E R _ U S E _ P R O T S E Q _ S O C K E T 655 * 656 * This routine tells the RPC runtime to listen for RPCs on the given 657 * native socket handle. The type of the socket must match the given 658 * protocol sequence. Note that the protocol sequence and the socket 659 * representation must be supported by both the RPC runtime and the 660 * operating system. 661 */ 662void rpc_server_use_protseq_socket 663( 664 [in] unsigned_char_p_t protseq, 665 [in] unsigned32 max_call_requests, 666 [in] void *sockrep, 667 [out] unsigned32 *status 668); 669 670/* 671 * R P C _ S E R V E R _ U S E _ P R O T S E Q _ I F 672 * 673 * This routine tells the RPC runtime to listen for RPCs on the protocol 674 * sequence given. Part of the address (endpoint) to be listened on will 675 * be extracted from the interface spec handle. Note that this protocol 676 * sequence must be supported by both the RPC runtime and the operating 677 * system. 678 */ 679void rpc_server_use_protseq_if 680( 681 [in] unsigned_char_p_t protseq, 682 [in] unsigned32 max_call_requests, 683 [in] rpc_if_handle_t if_spec, 684 [out] unsigned32 *status 685); 686 687/* 688 * R P C _ S E R V E R _ U S E _ A L L _ P R O T S E Q S _ I F 689 * 690 * This routine tells the RPC runtime to listen for RPCs on all the 691 * protocol sequences for which the specified interface has well-known 692 * endpoints. 693 */ 694void rpc_server_use_all_protseqs_if 695( 696 [in] unsigned32 max_call_requests, 697 [in] rpc_if_handle_t if_spec, 698 [out] unsigned32 *status 699); 700 701/* 702 * R P C _ S E R V E R _ R E G I S T E R _ I F 703 * 704 * Register an interface with the RPC runtime. This includes the 705 * interface specification handle which contains the interface UUID and 706 * version, the server stub Entry Point Vector for this interface, a 707 * manager Entry Point Vector for this interface and the type UUID 708 * associated with this manager EPV. This routine may be called multiple 709 * times with the same interface spec handle but different manager 710 * EPVs and type UUIDs. The RPC runtime will group these manager EPVs and 711 * type UUIDs with the single interface spec handle and server stub EPV. 712 * See rpc_object_register for an explanation of the purpose of providing 713 * a type UUID. 714 */ 715void rpc_server_register_if 716( 717 [in] rpc_if_handle_t if_spec, 718 [in] uuid_p_t mgr_type_uuid, 719 [in] rpc_mgr_epv_t mgr_epv, 720 [out] unsigned32 *status 721); 722 723/* 724 * R P C _ I F _ C A L L B A C K _ F N _ T 725 * 726 * Security callback function 727 */ 728typedef void (*rpc_if_callback_fn_t) 729( 730 [in] rpc_if_handle_t if_spec, 731 [in] void *context, 732 [out] unsigned32 *status 733); 734 735const unsigned32 rpc_if_autolisten = 0x0001; 736const unsigned32 rpc_if_ole = 0x0002; 737const unsigned32 rpc_if_allow_unknown_authority = 0x0004; 738const unsigned32 rpc_if_allow_secure_only = 0x0008; 739const unsigned32 rpc_if_allow_callbacks_with_no_auth = 0x0010; 740const unsigned32 rpc_if_allow_local_only = 0x0020; 741const unsigned32 rpc_if_sec_no_cache = 0x0040; 742 743/* 744 * R P C _ S E R V E R _ R E G I S T E R _ I F _ E X 745 * 746 * Extended version of rpc_server_register_if() 747 */ 748void rpc_server_register_if_ex 749( 750 [in] rpc_if_handle_t if_spec, 751 [in] uuid_p_t mgr_type_uuid, 752 [in] rpc_mgr_epv_t mgr_epv, 753 [in] unsigned32 flags, 754 [in] unsigned32 max_calls, 755 [in] rpc_if_callback_fn_t if_callback, 756 [out] unsigned32 *status 757); 758 759/* 760 * R P C _ S E R V E R _ R E G I S T E R _ I F 2 761 * 762 * Same as rpc_server_register_if_ex(), but takes a maximum RPC 763 * size parameter to avoid Denial of Service (DoS) attacks. 764 */ 765void rpc_server_register_if_2 766( 767 [in] rpc_if_handle_t if_spec, 768 [in] uuid_p_t mgr_type_uuid, 769 [in] rpc_mgr_epv_t mgr_epv, 770 [in] unsigned32 flags, 771 [in] unsigned32 max_calls, 772 [in] unsigned32 max_rpc_size, 773 [in] rpc_if_callback_fn_t if_callback, 774 [out] unsigned32 *status 775); 776 777/* 778 * R P C _ S E R V E R _ U N R E G I S T E R _ I F 779 * 780 * Unregister from the RPC runtime an interface spec handle, its server 781 * stub Entry Point Vector and all manager Entry Point Vectors for this 782 * interface. 783 */ 784void rpc_server_unregister_if 785( 786 [in] rpc_if_handle_t if_spec, 787 [in] uuid_p_t mgr_type_uuid, 788 [out] unsigned32 *status 789); 790 791/* 792 * R P C _ S E R V E R _ I N Q _ I F 793 * 794 * Given an interface spec and type ID, return the manager EPV that has 795 * been registered for them (if any). 796 */ 797void rpc_server_inq_if 798( 799 [in] rpc_if_handle_t if_spec, 800 [in] uuid_p_t mgr_type_uuid, 801 [out] rpc_mgr_epv_t *mgr_epv, 802 [out] unsigned32 *status 803); 804 805/* 806 * R P C _ S E R V E R _ R E G I S T E R _ A U T H _ I N F O 807 * 808 * Register authentication information with the RPC runtime. 809 */ 810void rpc_server_register_auth_info 811( 812 [in] unsigned_char_p_t server_princ_name, 813 [in] unsigned32 auth_svc, 814 [in] rpc_auth_key_retrieval_fn_t 815 get_key_func, 816 [in] void *arg, 817 [out] unsigned32 *st 818); 819 820/*************************************************************************/ 821/***************** Comm Services Endpoint Map object *******************/ 822/*************************************************************************/ 823 824/* 825 * R P C _ E P _ R E G I S T E R 826 * 827 * Register entries with the local Endpoint Map. Endpoint map entries 828 * logically consist of <if_spec, address, object, annotation> tuples. 829 * The object_uuid_vec and annotation are optional; NULL may be 830 * specified. 831 * 832 * Registrations tuples that differ only in the endpoint portion of the 833 * address are defined to be duplicate registrations and the new 834 * registration replaces the old registration. The old registration 835 * is assumed to be stale (i.e. from a previous instance of the server 836 * that exited without unregistering). 837 */ 838 839void rpc_ep_register 840( 841 [in] rpc_if_handle_t if_spec, 842 [in] rpc_binding_vector_p_t binding_vec, 843 [in] uuid_vector_p_t object_uuid_vec, 844 [in] unsigned_char_p_t annotation, 845 [out] unsigned32 *status 846); 847 848/* 849 * R P C _ E P _ R E G I S T E R _ N O _ R E P L A C E 850 * 851 * Just like "rpc_ep_register" except this version does NOT replace old 852 * registrations that differ only in the endpoint. 853 */ 854 855void rpc_ep_register_no_replace 856( 857 [in] rpc_if_handle_t if_spec, 858 [in] rpc_binding_vector_p_t binding_vec, 859 [in] uuid_vector_p_t object_uuid_vec, 860 [in] unsigned_char_p_t annotation, 861 [out] unsigned32 *status 862); 863 864/* 865 * R P C _ E P _ R E S O L V E _ B I N D I N G 866 * 867 * Resolve a partially bound server handle into a fully bound 868 * handle. 869 * 870 */ 871void rpc_ep_resolve_binding 872( 873 [in] rpc_binding_handle_t binding_h, 874 [in] rpc_if_handle_t if_spec, 875 [out] unsigned32 *status 876); 877 878/* 879 * R P C _ E P _ U N R E G I S T E R 880 * 881 * Unregister all Endpoint Map entries matching the specified 882 * <if_spec, address, object> tuples. 883 */ 884void rpc_ep_unregister 885( 886 [in] rpc_if_handle_t if_spec, 887 [in] rpc_binding_vector_p_t binding_vec, 888 [in] uuid_vector_p_t object_uuid_vec, 889 [out] unsigned32 *status 890); 891 892/*************************************************************************/ 893/************************** Management Services ************************/ 894/*************************************************************************/ 895 896/* 897 * R P C _ M G M T _ I N Q _ C O M _ T I M E O U T 898 * 899 * Inquire what the RPC timeout is for a binding. See 900 * rpc_mgmt_set_com_timeout for an explanation. 901 */ 902void rpc_mgmt_inq_com_timeout 903( 904 [in] rpc_binding_handle_t binding_handle, 905 [out] unsigned32 *timeout, 906 [out] unsigned32 *status 907); 908 909/* 910 * R P C _ M G M T _ I N Q _ I F _ I D S 911 * 912 * Obtain a vector of interface identifications listing the interfaces 913 * registered with the RPC runtime. If a server has not registered any 914 * interfaces this routine will return an rpc_s_no_interfaces status 915 * code and a NULL if_id_vector. The application is responsible for 916 * calling rpc_if_id_vector_free to release the memory used by the vector. 917 */ 918void rpc_mgmt_inq_if_ids 919( 920 [in] rpc_binding_handle_t binding_handle, 921 [out] rpc_if_id_vector_p_t *if_id_vector, 922 [out] unsigned32 *status 923); 924 925/* 926 * R P C _ M G M T _ I N Q _ S T A T S 927 * 928 * Obtain statistics about the specified server from the RPC runtime. 929 * Each element in the returned argument contains an integer value which 930 * can be indexed using the defined statistics constants. 931 */ 932void rpc_mgmt_inq_stats 933( 934 [in] rpc_binding_handle_t binding_handle, 935 [out] rpc_stats_vector_p_t *statistics, 936 [out] unsigned32 *status 937); 938 939/* 940 * R P C _ M G M T _ S T A T S _ V E C T O R _ F R E E 941 * 942 * This routine will free the statistics vector. A NULL pointer will be 943 * returned. 944 */ 945void rpc_mgmt_stats_vector_free 946( 947 [in, out] rpc_stats_vector_p_t *statistics, 948 [out] unsigned32 *status 949); 950 951/* 952 * R P C _ M G M T _ I S _ S E R V E R _ L I S T E N I N G 953 * 954 * Determine if the specified server is listening for remote procedure calls. 955 */ 956boolean32 rpc_mgmt_is_server_listening 957( 958 [in] rpc_binding_handle_t binding_handle, 959 [out] unsigned32 *status 960); 961 962/* 963 * R P C _ M G M T _ S E T _ S E R V E R _ I D L E _ T I M E O U T 964 */ 965void rpc_mgmt_set_server_idle_timeout 966( 967 [in] rpc_binding_handle_t binding_handle, 968 [in] unsigned32 idle_secs, 969 [out] error_status_t *status 970); 971 972/* 973 * R P C _ M G M T _ I N Q _ S E R V E R _ I D L E _ T I M E O U T 974 */ 975unsigned32 rpc_mgmt_inq_server_idle_timeout 976( 977 [in] rpc_binding_handle_t binding_handle, 978 [out] error_status_t *status 979); 980 981/* 982 * R P C _ M G M T _ S E T _ C A N C E L _ T I M E O U T 983 * 984 * Set the amount of time for the RPC runtime to wait for a server to 985 * acknowledge a cancel before orphaning the call. The application should 986 * specify to either wait forever or to wait the length of the time 987 * specified in seconds. If the value of seconds is 0 the remote procedure 988 * call is orphaned as soon as a cancel is received by the server and 989 * control returns immediately to the client application. The default 990 * is to wait forever for the call to complete. 991 * 992 * The value for the cancel timeout applies to all remote procedure calls 993 * made in the current thread. A multi-threaded client that wishes to change 994 * the default timeout value must call this routine in each thread of 995 * execution. 996 */ 997void rpc_mgmt_set_cancel_timeout 998( 999 [in] signed32 seconds, 1000 [out] unsigned32 *status 1001); 1002 1003/* 1004 * R P C _ M G M T _ S E T _ C O M _ T I M E O U T 1005 * 1006 * Set the RPC timeout for a binding. The timeout value is a metric 1007 * indicating the relative amount of time retries to contact the server 1008 * should be made. A value of rpc_c_binding_infinite_time (10) indicates 1009 * an an infinite wait. A value of rpc_c_binding_min_timeout indicates 1010 * a minimum wait. Values 1-5 favor fast reponse time over correctness 1011 * in determining whether the server is alive. Values 6-10 favor 1012 * correctness over response time. 1013 */ 1014void rpc_mgmt_set_com_timeout 1015( 1016 [in] rpc_binding_handle_t binding_handle, 1017 [in] unsigned32 timeout, 1018 [out] unsigned32 *status 1019); 1020 1021/* 1022 * R P C _ M G M T _ S E T _ S E R V E R _ S T A C K _ S I Z E 1023 * 1024 * Set the value that the RPC runtime is to use in specifying the 1025 * the thread stack size when creating call threads. This value will 1026 * be applied to all threads created for the server. 1027 */ 1028void rpc_mgmt_set_server_stack_size 1029( 1030 [in] unsigned32 thread_stack_size, 1031 [out] unsigned32 *status 1032); 1033 1034/* 1035 * R P C _ M G M T _ S T O P _ S E R V E R _ L I S T E N I N G 1036 * 1037 * Direct a server to stop listening for remote procedure calls. On receipt 1038 * of a stop listening request the RPC runtime stops accepting new remote 1039 * procedure calls for all registered interfaces. Executing calls are 1040 * allowed to complete, including callbacks. After alls executing calls 1041 * complete the rpc_server_listen() routine returns to the caller. 1042 */ 1043void rpc_mgmt_stop_server_listening 1044( 1045 [in] rpc_binding_handle_t binding_handle, 1046 [out] unsigned32 *status 1047); 1048 1049/* 1050 * R P C _ M G M T _ I N Q _ D F L T _ P R O T _ L E V E L 1051 * 1052 * Returns the default protection level for an authentication service. 1053 */ 1054void rpc_mgmt_inq_dflt_protect_level 1055( 1056 [in] unsigned32 authn_svc, 1057 [out] unsigned32 *protect_level, 1058 [out] unsigned32 *st 1059); 1060 1061/* 1062 * R P C _ M G M T _ S E T _ A U T H O R I Z A T I O N _ F N 1063 * 1064 * Specify the application function that the RPC runtime should call 1065 * when it receives remote request to do a management operation. The 1066 * application function can decide whether the operation should be allowed 1067 * to proceed. 1068 */ 1069void rpc_mgmt_set_authorization_fn 1070( 1071 [in] rpc_mgmt_authorization_fn_t 1072 authorization_fn_arg, 1073 [out] unsigned32 *status 1074); 1075 1076/* 1077 * R P C _ M G M T _ E P _ E L T _ I N Q _ B E G I N 1078 * 1079 * Creates an inquiry context for viewing the elements in a local or 1080 * remote endpoint map database. 1081 */ 1082void rpc_mgmt_ep_elt_inq_begin 1083( 1084 [in] rpc_binding_handle_t ep_binding, 1085 [in] unsigned32 inquiry_type, 1086 [in] rpc_if_id_p_t if_id, 1087 [in] unsigned32 vers_option, 1088 [in] uuid_p_t object_uuid, 1089 [out] rpc_ep_inq_handle_t *inquiry_context, 1090 [out] unsigned32 *status 1091); 1092 1093/* 1094 * R P C _ M G M T _ E P _ E L T _ I N Q _ N E X T 1095 * 1096 * Returns one element at a time from in a local or remote endpoint map 1097 * database. 1098 */ 1099void rpc_mgmt_ep_elt_inq_next 1100( 1101 [in] rpc_ep_inq_handle_t inquiry_context, 1102 [out] rpc_if_id_t *if_id, 1103 [out] rpc_binding_handle_t *binding, 1104 [out] idl_uuid_t *object_uuid, 1105 [out] unsigned_char_p_t *annotation, 1106 [out] unsigned32 *status 1107); 1108 1109/* 1110 * R P C _ M G M T _ E P _ E L T _ I N Q _ D O N E 1111 * 1112 * Deletes the inquiry context for viewing the elements in a local or 1113 * remote endpoint map database. 1114 */ 1115void rpc_mgmt_ep_elt_inq_done 1116( 1117 [in, out] rpc_ep_inq_handle_t *inquiry_context, 1118 [out] unsigned32 *status 1119); 1120 1121/* 1122 * R P C _ M G M T _ E P _ U N R E G I S T E R 1123 * 1124 * Removes server address information from the local endpoint map database. 1125 */ 1126void rpc_mgmt_ep_unregister 1127( 1128 [in] rpc_binding_handle_t ep_binding, 1129 [in] rpc_if_id_p_t if_id, 1130 [in] rpc_binding_handle_t binding, 1131 [in] uuid_p_t object_uuid, 1132 [out] unsigned32 *status 1133); 1134 1135/* 1136 * R P C _ M G M T _ I N Q _ S E R V E R _ P R I N C _ N A M E 1137 * 1138 * Obtain server principal name information for the specified server 1139 * from the RPC runtime. 1140 */ 1141void rpc_mgmt_inq_server_princ_name 1142( 1143 [in] rpc_binding_handle_t binding_h, 1144 [in] unsigned32 authn_svc, 1145 [out] unsigned_char_p_t *server_princ_name, 1146 [out] unsigned32 *status 1147); 1148 1149/*************************************************************************/ 1150/********************* Name Services Binding object ********************/ 1151/*************************************************************************/ 1152 1153/* 1154 * R P C _ N S _ B I N D I N G _ E X P O R T 1155 * 1156 * Export a set of bindings and/or object uuids for a particular interface. 1157 */ 1158void rpc_ns_binding_export 1159( 1160 [in] unsigned32 entry_name_syntax, 1161 [in] unsigned_char_p_t entry_name, 1162 [in] rpc_if_handle_t if_spec, 1163 [in] rpc_binding_vector_p_t binding_vector, 1164 [in] uuid_vector_p_t object_uuid_vector, 1165 [out] unsigned32 *status 1166); 1167 1168/* 1169 * R P C _ N S _ B I N D I N G _ I M P O R T _ B E G I N 1170 * 1171 * Create an import context for an interface and optionally an object. 1172 */ 1173void rpc_ns_binding_import_begin 1174( 1175 [in] unsigned32 entry_name_syntax, 1176 [in] unsigned_char_p_t entry_name, 1177 [in] rpc_if_handle_t if_spec, 1178 [in] uuid_p_t object_uuid, 1179 [out] rpc_ns_handle_t *import_context, 1180 [out] unsigned32 *status 1181); 1182 1183/* 1184 * R P C _ N S _ B I N D I N G _ I M P O R T _ D O N E 1185 * 1186 * Delete an import context. 1187 */ 1188void rpc_ns_binding_import_done 1189( 1190 [in, out] rpc_ns_handle_t *import_context, 1191 [out] unsigned32 *status 1192); 1193 1194/* 1195 * R P C _ N S _ B I N D I N G _ I M P O R T _ N E X T 1196 * 1197 * Look up an interface and optionally an object from a name-service 1198 * database and return a binding of a compatible server (if found). 1199 */ 1200void rpc_ns_binding_import_next 1201( 1202 [in] rpc_ns_handle_t import_context, 1203 [out] rpc_binding_handle_t *binding, 1204 [out] unsigned32 *status 1205); 1206 1207/* 1208 * R P C _ N S _ B I N D I N G _ I N Q _ E N T R Y _ N A M E 1209 * 1210 * Inquire the name of the name service entry from which a binding 1211 * was obtained. 1212 */ 1213void rpc_ns_binding_inq_entry_name 1214( 1215 [in] rpc_binding_handle_t binding, 1216 [in] unsigned32 entry_name_syntax, 1217 [out] unsigned_char_p_t *entry_name, 1218 [out] unsigned32 *status 1219); 1220 1221/* 1222 * R P C _ N S _ B I N D I N G _ L O O K U P _ B E G I N 1223 * 1224 * Start a search in the name service for a compatible binding. 1225 */ 1226void rpc_ns_binding_lookup_begin 1227( 1228 [in] unsigned32 entry_name_syntax, 1229 [in] unsigned_char_p_t entry_name, 1230 [in] rpc_if_handle_t if_spec, 1231 [in] uuid_p_t object_uuid, 1232 [in] unsigned32 binding_max_count, 1233 [out] rpc_ns_handle_t *lookup_context, 1234 [out] unsigned32 *status 1235); 1236 1237/* 1238 * R P C _ N S _ B I N D I N G _ L O O K U P _ D O N E 1239 * 1240 * Terminate a search in the name service for a compatible binding. 1241 */ 1242void rpc_ns_binding_lookup_done 1243( 1244 [in, out] rpc_ns_handle_t *lookup_context, 1245 [out] unsigned32 *status 1246); 1247 1248/* 1249 * R P C _ N S _ B I N D I N G _ L O O K U P _ N E X T 1250 * 1251 * Continue a search in the name service for a compatible binding. 1252 */ 1253void rpc_ns_binding_lookup_next 1254( 1255 [in] rpc_ns_handle_t lookup_context, 1256 [out] rpc_binding_vector_p_t *binding_vector, 1257 [out] unsigned32 *status 1258); 1259 1260/* 1261 * R P C _ N S _ B I N D I N G _ S E L E C T 1262 * 1263 * Select a binding from among those returned in a lookup operation. 1264 */ 1265void rpc_ns_binding_select 1266( 1267 [in,out] rpc_binding_vector_t *binding_vector, 1268 [out] rpc_binding_handle_t *binding, 1269 [out] unsigned32 *status 1270); 1271 1272/* 1273 * R P C _ N S _ B I N D I N G _ U N E X P O R T 1274 * 1275 * Unexport an interface and/or a set of object uuids. 1276 */ 1277void rpc_ns_binding_unexport 1278( 1279 [in] unsigned32 entry_name_syntax, 1280 [in] unsigned_char_p_t entry_name, 1281 [in] rpc_if_handle_t if_spec, 1282 [in] uuid_vector_p_t object_uuid_vector, 1283 [out] unsigned32 *status 1284); 1285 1286/*************************************************************************/ 1287/********************** Name Services Entry object *********************/ 1288/*************************************************************************/ 1289 1290/* 1291 * R P C _ N S _ E N T R Y _ E X P A N D _ N A M E 1292 * 1293 * Expand a name service entry name. 1294 */ 1295void rpc_ns_entry_expand_name 1296( 1297 [in] unsigned32 entry_name_syntax, 1298 [in] unsigned_char_p_t entry_name, 1299 [out] unsigned_char_p_t *expanded_name, 1300 [out] unsigned32 *status 1301); 1302 1303/* 1304 * R P C _ N S _ E N T R Y _ O B J E C T _ I N Q _ B E G I N 1305 * 1306 * Start a search for an object UUID in a given name service entry. 1307 */ 1308void rpc_ns_entry_object_inq_begin 1309( 1310 [in] unsigned32 entry_name_syntax, 1311 [in] unsigned_char_p_t entry_name, 1312 [out] rpc_ns_handle_t *inquiry_context, 1313 [out] unsigned32 *status 1314); 1315 1316/* 1317 * R P C _ N S _ E N T R Y _ O B J E C T _ I N Q _ D O N E 1318 * 1319 * Terminate a search for an object UUID in a given name service entry. 1320 */ 1321void rpc_ns_entry_object_inq_done 1322( 1323 [in, out] rpc_ns_handle_t *inquiry_context, 1324 [out] unsigned32 *status 1325); 1326 1327/* 1328 * R P C _ N S _ E N T R Y _ O B J E C T _ I N Q _ N E X T 1329 * 1330 * Continue a search for an object UUID in a given name service entry. 1331 */ 1332void rpc_ns_entry_object_inq_next 1333( 1334 [in] rpc_ns_handle_t inquiry_context, 1335 [out] idl_uuid_t *object_uuid, 1336 [out] unsigned32 *status 1337); 1338 1339/*************************************************************************/ 1340/********************** Name Services Group object *********************/ 1341/*************************************************************************/ 1342 1343/* 1344 * R P C _ N S _ G R O U P _ D E L E T E 1345 * 1346 * Delete a service group from the name service database. 1347 */ 1348void rpc_ns_group_delete 1349( 1350 [in] unsigned32 group_name_syntax, 1351 [in] unsigned_char_p_t group_name, 1352 [out] unsigned32 *status 1353); 1354 1355/* 1356 * R P C _ N S _ G R O U P _ M B R _ A D D 1357 * 1358 * Add a member name to a service group in the name service. 1359 */ 1360void rpc_ns_group_mbr_add 1361( 1362 [in] unsigned32 group_name_syntax, 1363 [in] unsigned_char_p_t group_name, 1364 [in] unsigned32 member_name_syntax, 1365 [in] unsigned_char_p_t member_name, 1366 [out] unsigned32 *status 1367); 1368 1369/* 1370 * R P C _ N S _ G R O U P _ M B R _ I N Q _ B E G I N 1371 * 1372 * Start a search for a member with a given name service name in a 1373 * service group. 1374 */ 1375void rpc_ns_group_mbr_inq_begin 1376( 1377 [in] unsigned32 group_name_syntax, 1378 [in] unsigned_char_p_t group_name, 1379 [in] unsigned32 member_name_syntax, 1380 [out] rpc_ns_handle_t *inquiry_context, 1381 [out] unsigned32 *status 1382); 1383 1384/* 1385 * R P C _ N S _ G R O U P _ M B R _ I N Q _ D O N E 1386 * 1387 * Terminate a search for a member with a given name service name in a 1388 * service group. 1389 */ 1390void rpc_ns_group_mbr_inq_done 1391( 1392 [in, out] rpc_ns_handle_t *inquiry_context, 1393 [out] unsigned32 *status 1394); 1395 1396/* 1397 * R P C _ N S _ G R O U P _ M B R _ I N Q _ N E X T 1398 * 1399 * Continue a search for a member with a given name service name in a 1400 * service group. 1401 */ 1402void rpc_ns_group_mbr_inq_next 1403( 1404 [in] rpc_ns_handle_t inquiry_context, 1405 [out] unsigned_char_p_t *member_name, 1406 [out] unsigned32 *status 1407); 1408 1409/* 1410 * R P C _ N S _ G R O U P _ M B R _ R E M O V E 1411 * 1412 * Remove a member name from a service group in the name service. 1413 */ 1414void rpc_ns_group_mbr_remove 1415( 1416 [in] unsigned32 group_name_syntax, 1417 [in] unsigned_char_p_t group_name, 1418 [in] unsigned32 member_name_syntax, 1419 [in] unsigned_char_p_t member_name, 1420 [out] unsigned32 *status 1421); 1422 1423/*************************************************************************/ 1424/****************** Name Services Management object ********************/ 1425/*************************************************************************/ 1426 1427/* 1428 * R P C _ N S _ M G M T _ B I N D I N G _ U N E X P O R T 1429 * 1430 * Unexport an interface and/or a set of object uuids. This routine differs 1431 * from rpc_ns_binding_unexport only in that access to the ifspec is not 1432 * required, and it can therefore be performed by management applications 1433 * on behalf of other servers whose interface id's are known. 1434 */ 1435void rpc_ns_mgmt_binding_unexport 1436( 1437 [in] unsigned32 entry_name_syntax, 1438 [in] unsigned_char_p_t entry_name, 1439 [in] rpc_if_id_p_t if_id, 1440 [in] unsigned32 vers_option, 1441 [in] uuid_vector_p_t object_uuid_vector, 1442 [out] unsigned32 *status 1443); 1444 1445/* 1446 * R P C _ N S _ M G M T _ E N T R Y _ C R E A T E 1447 * 1448 * Create a name service entry. 1449 */ 1450void rpc_ns_mgmt_entry_create 1451( 1452 [in] unsigned32 entry_name_syntax, 1453 [in] unsigned_char_p_t entry_name, 1454 [out] unsigned32 *status 1455); 1456 1457/* 1458 * R P C _ N S _ M G M T _ E N T R Y _ D E L E T E 1459 * 1460 * Delete an entry from the name service database. 1461 */ 1462void rpc_ns_mgmt_entry_delete 1463( 1464 [in] unsigned32 entry_name_syntax, 1465 [in] unsigned_char_p_t entry_name, 1466 [out] unsigned32 *status 1467); 1468 1469/* 1470 * R P C _ N S _ M G M T _ E N T R Y _ I N Q _ I F _ I D S 1471 * 1472 * Inquire the interface id's exported into a name service entry. 1473 */ 1474void rpc_ns_mgmt_entry_inq_if_ids 1475( 1476 [in] unsigned32 entry_name_syntax, 1477 [in] unsigned_char_p_t entry_name, 1478 [out] rpc_if_id_vector_p_t *if_id_vector, 1479 [out] unsigned32 *status 1480); 1481 1482/* 1483 * R P C _ N S _ M G M T _ I N Q _ E X P _ A G E 1484 * 1485 * Inquire the default name service local data expiration age. 1486 */ 1487void rpc_ns_mgmt_inq_exp_age 1488( 1489 [out] unsigned32 *expiration_age, 1490 [out] unsigned32 *status 1491); 1492 1493/* 1494 * R P C _ N S _ M G M T _ S E T _ E X P _ A G E 1495 * 1496 * Set the default name service local data expiration age. 1497 */ 1498void rpc_ns_mgmt_set_exp_age 1499( 1500 [in] unsigned32 expiration_age, 1501 [out] unsigned32 *status 1502); 1503 1504/* 1505 * R P C _ N S _ M G M T _ H A N D L E _ E X P _ A G E 1506 * 1507 * Inquire the default name service local data expiration age. 1508 */ 1509void rpc_ns_mgmt_handle_set_exp_age 1510( 1511 [in] rpc_ns_handle_t ns_handle, 1512 [in] unsigned32 expiration_age, 1513 [out] unsigned32 *status 1514); 1515 1516/*************************************************************************/ 1517/********************* Name Services Profile object ********************/ 1518/*************************************************************************/ 1519 1520/* 1521 * R P C _ N S _ P R O F I L E _ D E L E T E 1522 * 1523 * Delete a configuration profile from the name service database. 1524 */ 1525void rpc_ns_profile_delete 1526( 1527 [in] unsigned32 profile_name_syntax, 1528 [in] unsigned_char_p_t profile_name, 1529 [out] unsigned32 *status 1530); 1531 1532/* 1533 * R P C _ N S _ P R O F I L E _ E L T _ A D D 1534 * 1535 * Add an element to a profile. If necessary, creates the entry. 1536 */ 1537void rpc_ns_profile_elt_add 1538( 1539 [in] unsigned32 profile_name_syntax, 1540 [in] unsigned_char_p_t profile_name, 1541 [in] rpc_if_id_p_t if_id, 1542 [in] unsigned32 member_name_syntax, 1543 [in] unsigned_char_p_t member_name, 1544 [in] unsigned32 priority, 1545 [in] unsigned_char_p_t annotation, 1546 [out] unsigned32 *status 1547); 1548 1549/* 1550 * R P C _ N S _ P R O F I L E _ E L T _ I N Q _ B E G I N 1551 * 1552 * Create an inquiry context for viewing the elements in a profile. 1553 */ 1554void rpc_ns_profile_elt_inq_begin 1555( 1556 [in] unsigned32 profile_name_syntax, 1557 [in] unsigned_char_p_t profile_name, 1558 [in] unsigned32 inquiry_type, 1559 [in] rpc_if_id_p_t if_id, 1560 [in] unsigned32 if_vers_option, 1561 [in] unsigned32 member_name_syntax, 1562 [in] unsigned_char_p_t member_name, 1563 [out] rpc_ns_handle_t *inquiry_context, 1564 [out] unsigned32 *status 1565); 1566 1567/* 1568 * R P C _ N S _ P R O F I L E _ E L T _ I N Q _ D O N E 1569 * 1570 * Deletes the inquiry context for viewing the elements in a profile. 1571 */ 1572void rpc_ns_profile_elt_inq_done 1573( 1574 [in, out] rpc_ns_handle_t *inquiry_context, 1575 [out] unsigned32 *status 1576); 1577 1578/* 1579 * R P C _ N S _ P R O F I L E _ E L T _ I N Q _ N E X T 1580 * 1581 * Return one element at a time from a profile. 1582 */ 1583void rpc_ns_profile_elt_inq_next 1584( 1585 [in] rpc_ns_handle_t inquiry_context, 1586 [out] rpc_if_id_t *if_id, 1587 [out] unsigned_char_p_t *member_name, 1588 [out] unsigned32 *priority, 1589 [out] unsigned_char_p_t *annotation, 1590 [out] unsigned32 *status 1591); 1592 1593/* 1594 * R P C _ N S _ P R O F I L E _ E L T _ R E M O V E 1595 * 1596 * Remove an element from a profile. 1597 */ 1598void rpc_ns_profile_elt_remove 1599( 1600 [in] unsigned32 profile_name_syntax, 1601 [in] unsigned_char_p_t profile_name, 1602 [in] rpc_if_id_p_t if_id, 1603 [in] unsigned32 member_name_syntax, 1604 [in] unsigned_char_p_t member_name, 1605 [out] unsigned32 *status 1606); 1607 1608/*************************************************************************/ 1609/*************************** String Services ***************************/ 1610/*************************************************************************/ 1611 1612/* 1613 * R P C _ S T R I N G _ F R E E 1614 * 1615 * Free the memory allocated by the RPC runtime for a string argument. 1616 * A NULL pointer will be returned. 1617 */ 1618void rpc_string_free 1619( 1620 [in, out] unsigned_char_p_t *string, 1621 [out] unsigned32 *status 1622); 1623 1624/*************************************************************************/ 1625/******************* Codesets Interoperability Extension ***************/ 1626/*************************************************************************/ 1627 1628/* 1629 * Supported Code sets information for either a server or a client. 1630 * 1631 * - The first element in codesets[] is a local code set of the process. 1632 * - The second (and maybe more) is the intermediate code set(s) which 1633 * is used on the wire, in case there is no direct converter available. 1634 * - Other array elements are code sets which are supported by the process. 1635 * - Conformant array is used, since a number of code sets supported in a 1636 * host will vary. 1637 * - This data structure is moved from codesets.idl to rpc.idl, because if 1638 * this data structure is defined in codesets.idl, the IDL generated stub 1639 * cannot be compiled with undefined symbol error. This data structure 1640 * needs to be defined here. 1641 */ 1642 1643/* 1644 * R P C _ C O D E S E T _ M G M T _ T 1645 * 1646 * Data structure to hold (server's or client's) supported code sets 1647 * Each code set has an attribute (max bytes) to indicate the maximum 1648 * number of bytes needed to encode that code set. This is used to 1649 * calculate the size of a necessary buffer for code set conversion. 1650 */ 1651typedef struct rpc_cs_c_set_s_t { 1652 unsigned32 c_set; 1653 unsigned16 c_max_bytes; 1654} rpc_cs_c_set_t; 1655 1656typedef struct rpc_codeset_mgmt_s_t { 1657 unsigned32 version; /* version of this structure */ 1658 unsigned32 count; /* number of code sets defined */ 1659 [size_is(count)] rpc_cs_c_set_t codesets[]; 1660} rpc_codeset_mgmt_t, *rpc_codeset_mgmt_p_t; 1661 1662/* 1663 * R P C _ N S _ M G M T _ S E T _ A T T R I B U T E 1664 * 1665 * Register code sets value (and possibly other attribute values in the future) 1666 * to CDS server entry. 1667 */ 1668void rpc_ns_mgmt_set_attribute 1669( 1670 [in] unsigned32 entry_name_syntax, 1671 [in] unsigned_char_p_t entry_name, 1672 [in] uuid_p_t attr_type, 1673 [in] void *attr_val, 1674 [out] error_status_t *status 1675); 1676 1677/* 1678 * R P C _ N S _ M G M T _ R E A D _ A T T R _ B E G I N 1679 * 1680 * Setup inquiry context for code sets attribute (and others in the future). 1681 */ 1682void rpc_ns_mgmt_read_attr_begin 1683( 1684 [in] unsigned32 entry_name_syntax, 1685 [in] unsigned_char_p_t entry_name, 1686 [in] uuid_p_t attr_type, 1687 [out] rpc_ns_handle_t *inquiry_context, 1688 [out] error_status_t *status 1689); 1690 1691/* 1692 * R P C _ N S _ M G M T _ R E A D _ A T T R _ N E X T 1693 * 1694 * Read code set attribute (or others in the future) based on the inquiry 1695 * context. 1696 */ 1697void rpc_ns_mgmt_read_attr_next 1698( 1699 [in] rpc_ns_handle_t inquiry_context, 1700 [in] uuid_p_t attr_type, 1701 [out] byte **value, 1702 [out] unsigned32 *length, 1703 [out] error_status_t *status 1704); 1705 1706/* 1707 * R P C _ N S _ M G M T _ R E A D _ A T T R _ D O N E 1708 * 1709 * Release inquiry context for code set attribute (or others in the future) 1710 */ 1711void rpc_ns_mgmt_read_attr_done 1712( 1713 [in] rpc_ns_handle_p_t inquiry_context, 1714 [out] error_status_t *status 1715); 1716 1717/* 1718 * R P C _ N S _ M G M T _ R E M O V E _ A T T R I B U T E 1719 * 1720 * Remove code set attribute value (or others in the future) from 1721 * CDS server entry. 1722 */ 1723void rpc_ns_mgmt_remove_attribute 1724( 1725 [in] unsigned32 entry_name_syntax, 1726 [in] unsigned_char_p_t entry_name, 1727 [in] uuid_p_t attr_type, 1728 [out] error_status_t *status 1729); 1730 1731/* 1732 * R P C _ N S _ M G M T _ R E A D _ C O D E S E T S 1733 * 1734 * Convenience routine for reading the code set attribute value from CDS 1735 * server entry. 1736 */ 1737void rpc_ns_mgmt_read_codesets 1738( 1739 [in] unsigned32 entry_name_syntax, 1740 [in] unsigned_char_p_t entry_name, 1741 [out] rpc_codeset_mgmt_p_t *codesets_val, 1742 [out] error_status_t *status 1743); 1744 1745/* 1746 * R P C _ N S _ I M P O R T _ C T X _ A D D _ E V A L 1747 * 1748 * Client uses this function to set an appropriate evaluation routine 1749 * to an import context. 1750 */ 1751void rpc_ns_import_ctx_add_eval 1752( 1753 [in, out] rpc_ns_handle_t *import_ctx, 1754 [in] unsigned32 func_type, 1755 [in] void *args, 1756 [in] void (*eval_func)(handle_t binding_h, void *args, void **cntx), 1757 [in] void (*cs_free_func)(void *cntx), 1758 [out] error_status_t *status 1759); 1760 1761/* 1762 * R P C _ C S _ E V A L _ W I T H _ U N I V E R S A L 1763 * 1764 * Code set interoperability evaluation routine. If none of the client and 1765 * server code sets match, Universal code set will be used for communication. 1766 * 'args' is not used, and 'cntx' points to 'rpc_cs_codeset_i14y_data'. 1767 */ 1768void rpc_cs_eval_with_universal 1769( 1770 [in] handle_t binding_h, 1771 [in] void *args, 1772 [in, out] void **cntx 1773); 1774 1775/* 1776 * R P C _ C S _ E V A L _ W I T H O U T _ U N I V E R S A L 1777 * 1778 * Code set interoperability evaluation routine. If none of the client and 1779 * server code sets match, evaluation will fail. 1780 * 'args' is not used, and 'cntx' points to 'rpc_cs_codeset_i14y_data'. 1781 */ 1782void rpc_cs_eval_without_universal 1783( 1784 [in] handle_t binding_h, 1785 [in] void *args, 1786 [in, out] void **cntx 1787); 1788 1789/* 1790 * R P C _ C S _ C H A R _ S E T _ C O M P A T _ C H E C K 1791 * 1792 * Client character set and server character set compatibility is 1793 * to be evaluated. 1794 */ 1795void rpc_cs_char_set_compat_check ( 1796 [in] unsigned32 client_codeset, 1797 [in] unsigned32 server_codeset, 1798 [out] error_status_t *status 1799); 1800 1801/* 1802 * Code set interoperability checking data types and routines 1803 */ 1804 1805/* 1806 * R P C _ C S _ T A G S _ E V A L _ T 1807 * 1808 * Data structure which is attached to a binding handle at client side, when 1809 * automatic code set conversion is enabled. When 'fixed' flag is not on, 1810 * code set compatibility evaluation can be done within a client stub. 1811 * Performing code set evaluation in a stub is not a good idea for performance 1812 * wise, however, some application might need that functionality. 1813 * Usually, each item is set by an evaluation routine within a client. 1814 * 1815 * stag, drtag : sending tag and desired receiving tag 1816 * stag_max_bytes : maximum number of bytes required to encode 'stag' code set 1817 * client_tag : client current code set tag. 1818 * client_max_bytes : maximum number of bytes required to encode client code set 1819 * fixed : boolean flag indicating if in-stub evaluation is necessary. 1820 * type_handle : points to 'idl_cs_convert_t' data structure. This is used 1821 * within a client stub to calculate conversion buffer size. 1822 */ 1823typedef struct { 1824 unsigned32 stag; 1825 unsigned32 drtag; 1826 unsigned16 stag_max_bytes; 1827 unsigned32 client_tag; 1828 unsigned16 client_max_bytes; 1829 rpc_ns_handle_t type_handle; 1830} rpc_cs_tags_eval_t, *rpc_cs_tags_eval_p_t; 1831 1832/* 1833 * R P C _ C S _ M E T H O D _ E V A L _ T 1834 * 1835 * Data structure which is attached to a binding handle at client side, when 1836 * automatic code set conversion is enabled. This data includes 'rpc_cs_tags_ 1837 * eval_t' data structure. The main difference is it includes server's and 1838 * client's supported code sets, which makes in-stub evaluation faster. 1839 * 1840 * method : connection method between client and server, e.g, CMIR 1841 * tags : rpc_cs_tags_eval_t. See above. 1842 * server : server's supported code sets. 1843 * client : client's supported code sets. 1844 * cs_stub_eval_func : When 'fixed' is not true, 1845 * it points to code set I14Y evaluation routine. 1846 */ 1847typedef struct { 1848 unsigned32 method; 1849 rpc_cs_tags_eval_t tags; 1850 rpc_codeset_mgmt_t *server; 1851 rpc_codeset_mgmt_t *client; 1852 boolean32 fixed; 1853 void (*cs_stub_eval_func)(unsigned32 *p_stag, unsigned32 *p_drtag, error_status_t *status); 1854} rpc_cs_method_eval_t, *rpc_cs_method_eval_p_t; 1855 1856/* 1857 * R P C _ C S _ E V A L U A T I O N _ T 1858 * 1859 * Data structure which is attached to a binding handle at client side, when 1860 * automatic code set conversion is enabled. The content will be either 1861 * 'rpc_cs_tags_eval_t' data or 'rpc_cs_method_eval_t' data. See above. 1862 */ 1863typedef union switch(short key) 1864{ 1865case 0: rpc_cs_tags_eval_t tags_key; 1866case 1: 1867default: rpc_cs_method_eval_t method_key; 1868} rpc_cs_evaluation_t; 1869 1870/* 1871 * Evaluation Function List Structures 1872 */ 1873typedef struct rpc_eval_lists *rpc_cs_eval_list_p; 1874 1875typedef struct rpc_eval_lists { 1876 unsigned32 type; 1877 void (*eval_func)(handle_t binding_h, void *args, void **cntx); 1878 void (*cs_free_func)(void *cntx); 1879 void *args; 1880 void *cntx; 1881 rpc_cs_eval_list_p next; 1882} rpc_cs_eval_list_t, *rpc_cs_eval_list_p_t; 1883 1884/* 1885 * R P C _ C S _ B I N D I N G _ S E T _ T A G S 1886 * 1887 * Set the tags value into rpc binding handle. 1888 */ 1889 1890void rpc_cs_binding_set_tags ( 1891 [in, out] rpc_binding_handle_t *h, 1892 [in] unsigned32 stag, 1893 [in] unsigned32 drtag, 1894 [in] unsigned16 stag_max_bytes, 1895 [out] error_status_t *status 1896); 1897 1898/* 1899 * R P C _ C S _ B I N D I N G _ S E T _ E V A L 1900 * 1901 * Set in-stub evaluation routine into rpc binding handle. 1902 * When in-stub evaluation is used, RPC performance can be 1903 * suffered. 1904 */ 1905 1906void rpc_cs_binding_set_eval ( 1907 [in, out] rpc_binding_handle_t *h, 1908 [in] void (*cs_stub_eval_func)(unsigned32 *p_stag, unsigned32 *p_drtag, error_status_t *status), 1909 [out] error_status_t *status 1910); 1911 1912/* 1913 * R P C _ R G Y _ G E T _ C O D E S E T S 1914 * 1915 * Get server's or client's supported code sets. 1916 * file_name is the absolute path name which contains the list of supported 1917 * code sets. 1918 */ 1919 1920void rpc_rgy_get_codesets ( 1921 [out] rpc_codeset_mgmt_p_t *codesets_p, 1922 [out] error_status_t *status 1923); 1924 1925/* 1926 * R P C _ R G Y _ G E T _ M A X _ B Y T E S 1927 * 1928 * Get the code set's maximum number of bytes per a character. 1929 */ 1930 1931void rpc_rgy_get_max_bytes ( 1932 [in] unsigned32 tag, 1933 [out] unsigned16 *max_bytes, 1934 [out] error_status_t *status 1935); 1936 1937/* 1938 * D C E _ C S _ L O C _ T O _ R G Y 1939 * 1940 * Convert code set name to code set registry value (code set) 1941 */ 1942 1943void dce_cs_loc_to_rgy ( 1944 [in] char *local_code_set_name, 1945 [out] unsigned32 *rgy_code_set_value, 1946 [out] unsigned16 *rgy_char_sets_number, 1947 [out] unsigned16 **rgy_char_sets_value, 1948 [out] error_status_t *status 1949); 1950 1951/* 1952 * D C E _ C S _ R G Y _ T O _ L O C 1953 * 1954 * Convert code set registry value (code set) to code set name 1955 */ 1956 1957void dce_cs_rgy_to_loc ( 1958 [in] unsigned32 rgy_code_set_value, 1959 [out] char **local_code_set_name, 1960 [out] unsigned16 *rgy_char_sets_number, 1961 [out] unsigned16 **rgy_char_sets_value, 1962 [out] error_status_t *status 1963); 1964 1965/* 1966 * R P C _ N S _ M G M T _ F R E E _ A T T R _ D A T A 1967 * 1968 * Free an attribute allocated by the runtime 1969 */ 1970void rpc_ns_mgmt_free_attr_data ( 1971 [in, out] byte **value, 1972 [out] error_status_t *status 1973); 1974 1975/* 1976 * R P C _ N S _ M G M T _ F R E E _ C O D E S E T S 1977 * 1978 * Free a codesets array allocated by the runtime 1979 */ 1980void rpc_ns_mgmt_free_codesets ( 1981 [in, out] rpc_codeset_mgmt_p_t *codesets, 1982 [out] error_status_t *status 1983); 1984 1985/* 1986 * R P C _ I M P E R S O N A T E _ N A M E D _ P I P E _ C L I E N T 1987 * 1988 * Allows a server thread to run with the security credentials 1989 * of the active client. 1990 */ 1991void rpc_impersonate_named_pipe_client 1992( 1993 [in] rpc_binding_handle_t binding_handle, 1994 [out] unsigned32 *status 1995); 1996 1997/* 1998 * R P C _ R E V E R T _ T O _ S E L F 1999 * 2000 * Allows a server thread to end impersonation and revert to the 2001 * per process credentials. 2002 */ 2003void rpc_revert_to_self 2004( 2005 [in] rpc_binding_handle_t binding_handle, 2006 [out] unsigned32 *status 2007); 2008 2009} 2010