ads_priv.x revision b3700b074e637f8c6991b70754c88a2cfffb246b
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * This file and its contents are supplied under the terms of the
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * Common Development and Distribution License ("CDDL"), version 1.0.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * You may only use this file in accordance with the terms of version
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * 1.0 of the CDDL.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross *
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * A full copy of the text of the CDDL should have accompanied this
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * source. A copy of the CDDL is also available via the Internet at
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * http://www.illumos.org/license/CDDL.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% * from ads_priv.x
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% * Active Directory Services (ADS) Private interface between
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% * libads and the ADS deamon. (RPC over doors)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross#ifdef RPC_HDR
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% * Declarations for the ADS API
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross#elif RPC_SVC
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% * Server side stubs for the ADS API
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross#elif RPC_CLNT
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% * Client side stubs for the ADS API
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross#elif RPC_XDR
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross%/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% * XDR routines for the ADS API
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross% */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross#endif
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossconst ADSPRIV_MAX_XFER = 16384;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossconst ADSPRIV_GUID_LEN = 16;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossconst ADSPRIV_SOCKADDR_LEN = 256;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossconst ADSPRIV_STR_MAX = 256;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rosstypedef opaque adspriv_guid[ADSPRIV_GUID_LEN];
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rosstypedef opaque adspriv_sockaddr[ADSPRIV_SOCKADDR_LEN];
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * Structure returned from DsGetDcName
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NB: Keep same as DOMAIN_CONTROLLER_INFO
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossstruct adspriv_dcinfo {
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string dci_DcName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string dci_DcAddr<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross unsigned int dci_AddrType;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross adspriv_guid dci_guid;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string dci_DomainName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string dci_DnsForestName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross unsigned int dci_Flags;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string dci_DcSiteName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string dci_ClientSiteName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross adspriv_sockaddr dci_sockaddr;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross};
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * DsForceRediscovery args
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossstruct DsForceRediscoveryArgs {
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross unsigned int Flags;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string DomainName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross};
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross/*
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * DsGetDcName args, result
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossstruct DsGetDcNameArgs {
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string ComputerName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string DomainName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string DomainGuid<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross string SiteName<ADSPRIV_STR_MAX>;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross unsigned int Flags;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross};
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossunion DsGetDcNameRes switch (int status) {
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rosscase 0:
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross adspriv_dcinfo res0;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossdefault:
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross void;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross};
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Rossprogram ADSPRIV_PROGRAM {
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross version ADSPRIV_V1 {
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross void
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross ADSPRIV_NULL(void) = 0;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross int
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross ADSPRIV_ForceRediscovery(DsForceRediscoveryArgs) = 1;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross DsGetDcNameRes
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross ADSPRIV_GetDcName(DsGetDcNameArgs) = 2;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross } = 1;
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross} = 100001;