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