1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 %/* 13 % * Copyright 2014 Nexenta Systems, Inc. All rights reserved. 14 % */ 15 16 %/* 17 % * from ads_priv.x 18 % * Active Directory Services (ADS) Private interface between 19 % * libads and the ADS deamon. (RPC over doors) 20 % */ 21 22 #ifdef RPC_HDR 23 %/* 24 % * Declarations for the ADS API 25 % */ 26 27 #elif RPC_SVC 28 % 29 %/* 30 % * Server side stubs for the ADS API 31 % */ 32 % 33 #elif RPC_CLNT 34 % 35 %/* 36 % * Client side stubs for the ADS API 37 % */ 38 % 39 #elif RPC_XDR 40 %/* 41 % * XDR routines for the ADS API 42 % */ 43 #endif 44 45 const ADSPRIV_MAX_XFER = 16384; 46 const ADSPRIV_GUID_LEN = 16; 47 const ADSPRIV_SOCKADDR_LEN = 256; 48 const ADSPRIV_STR_MAX = 256; 49 50 typedef opaque adspriv_guid[ADSPRIV_GUID_LEN]; 51 typedef opaque adspriv_sockaddr[ADSPRIV_SOCKADDR_LEN]; 52 53 /* 54 * Structure returned from DsGetDcName 55 * NB: Keep same as DOMAIN_CONTROLLER_INFO 56 */ 57 struct adspriv_dcinfo { 58 string dci_DcName<ADSPRIV_STR_MAX>; 59 string dci_DcAddr<ADSPRIV_STR_MAX>; 60 unsigned int dci_AddrType; 61 adspriv_guid dci_guid; 62 string dci_DomainName<ADSPRIV_STR_MAX>; 63 string dci_DnsForestName<ADSPRIV_STR_MAX>; 64 unsigned int dci_Flags; 65 string dci_DcSiteName<ADSPRIV_STR_MAX>; 66 string dci_ClientSiteName<ADSPRIV_STR_MAX>; 67 adspriv_sockaddr dci_sockaddr; 68 }; 69 70 /* 71 * DsForceRediscovery args 72 */ 73 struct DsForceRediscoveryArgs { 74 unsigned int Flags; 75 string DomainName<ADSPRIV_STR_MAX>; 76 }; 77 78 /* 79 * DsGetDcName args, result 80 */ 81 struct DsGetDcNameArgs { 82 string ComputerName<ADSPRIV_STR_MAX>; 83 string DomainName<ADSPRIV_STR_MAX>; 84 string DomainGuid<ADSPRIV_STR_MAX>; 85 string SiteName<ADSPRIV_STR_MAX>; 86 unsigned int Flags; 87 }; 88 89 union DsGetDcNameRes switch (int status) { 90 case 0: 91 adspriv_dcinfo res0; 92 default: 93 void; 94 }; 95 96 program ADSPRIV_PROGRAM { 97 version ADSPRIV_V1 { 98 void 99 ADSPRIV_NULL(void) = 0; 100 101 int 102 ADSPRIV_ForceRediscovery(DsForceRediscoveryArgs) = 1; 103 104 DsGetDcNameRes 105 ADSPRIV_GetDcName(DsGetDcNameArgs) = 2; 106 } = 1; 107 } = 100001; 108