libsmbns.h revision 6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2e
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _LIBSMBNS_H
2N/A#define _LIBSMBNS_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#include <ldap.h>
2N/A#include <smbsrv/libsmb.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/* ADS typedef/data structures and functions */
2N/A#define ADS_MAXBUFLEN 100
2N/A
2N/Atypedef struct ads_handle_s {
2N/A char *user; /* admin user to create share in ADS */
2N/A char *pwd; /* user password */
2N/A char *domain; /* ADS domain */
2N/A char *domain_dn; /* domain in Distinquish Name format */
2N/A char *ip_addr; /* ip addr in string format */
2N/A char *hostname; /* fully qualified hostname */
2N/A char *site; /* local ADS site */
2N/A LDAP *ld; /* LDAP handle */
2N/A} ADS_HANDLE;
2N/A
2N/A/*
2N/A * The possible return status of the adjoin routine.
2N/A */
2N/Atypedef enum adjoin_status {
2N/A ADJOIN_SUCCESS = 0,
2N/A ADJOIN_ERR_GET_HANDLE,
2N/A ADJOIN_ERR_GEN_PASSWD,
2N/A ADJOIN_ERR_ADD_TRUST_ACCT,
2N/A ADJOIN_ERR_MOD_TRUST_ACCT,
2N/A ADJOIN_ERR_GET_ENCTYPES,
2N/A ADJOIN_ERR_INIT_KRB_CTX,
2N/A ADJOIN_ERR_GET_SPNS,
2N/A ADJOIN_ERR_KSETPWD,
2N/A ADJOIN_ERR_UPDATE_CNTRL_ATTR,
2N/A ADJOIN_ERR_WRITE_KEYTAB,
2N/A ADJOIN_ERR_IDMAP_SET_DOMAIN,
2N/A ADJOIN_ERR_IDMAP_REFRESH,
2N/A ADJOIN_NUM_STATUS
2N/A} adjoin_status_t;
2N/A
2N/A/* ADS functions */
2N/Aextern void ads_init(void);
2N/Aextern void ads_refresh(void);
2N/Aextern ADS_HANDLE *ads_open(void);
2N/Aextern void ads_close(ADS_HANDLE *);
2N/Aextern int ads_publish_share(ADS_HANDLE *, const char *, const char *,
2N/A const char *, const char *);
2N/Aextern int ads_remove_share(ADS_HANDLE *, const char *, const char *,
2N/A const char *, const char *);
2N/Aextern int ads_build_unc_name(char *, int, const char *, const char *);
2N/Aextern int ads_lookup_share(ADS_HANDLE *, const char *, const char *, char *);
2N/Aextern int ads_add_share(ADS_HANDLE *, const char *, const char *,
2N/A const char *);
2N/Aextern adjoin_status_t ads_join(char *, char *, char *, char *, int);
2N/Aextern char *adjoin_report_err(adjoin_status_t);
2N/Aextern int ads_domain_change_cleanup(char *);
2N/Aextern int ads_update_attrs(void);
2N/A
2N/A/* DYNDNS functions */
2N/Aextern int dns_msgid_init(void);
2N/Aextern int dyndns_update(char *, boolean_t);
2N/Aextern int dyndns_clear_rev_zone(char *);
2N/A
2N/A/* Kerberos initialization function */
2N/Aextern int smb_kinit(char *, char *);
2N/Aextern int smb_ccache_init(char *, char *);
2N/Aextern void smb_ccache_remove(char *);
2N/A
2N/A/* NETBIOS Functions */
2N/Aextern int msdcs_lookup_ads(char *, char *);
2N/Aextern int smb_netbios_start(void);
2N/Aextern void smb_netbios_shutdown(void);
2N/Aextern void smb_netbios_name_reconfig(void);
2N/A
2N/A/* Browser Functions */
2N/Aextern void smb_browser_reconfig(void);
2N/Aextern void smb_browser_netlogon(char *);
2N/A
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LIBSMBNS_H */
2N/A