libsmbns.h revision 77191e8775ec29406dec7210fc064d8fd759dd24
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
77191e8775ec29406dec7210fc064d8fd759dd24Shawn Emery * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwextern "C" {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* ADS typedef/data structures and functions */
3db3f65c6274eb042354801a308c8e9bc4994553amwtypedef struct smb_ads_handle {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw char *domain_dn; /* domain in Distinquish Name format */
29bd28862cfb8abbd3a0f0a4b17e08bbc3652836Alan Wrighttypedef struct smb_ads_host_info {
29bd28862cfb8abbd3a0f0a4b17e08bbc3652836Alan Wright char name[MAXHOSTNAMELEN]; /* fully qualified hostname */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The possible return status of the adjoin routine.
3db3f65c6274eb042354801a308c8e9bc4994553amwtypedef enum smb_adjoin_status {
b89a8333f5e1f75ec0c269b22524bd2eccb972banatalie li - Sun Microsystems - Irvine United States SMB_ADJOIN_ERR_DUP_TRUST_ACCT,
b89a8333f5e1f75ec0c269b22524bd2eccb972banatalie li - Sun Microsystems - Irvine United States SMB_ADJOIN_ERR_TRUST_ACCT,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* ADS functions */
3db3f65c6274eb042354801a308c8e9bc4994553amwextern void smb_ads_init(void);
29bd28862cfb8abbd3a0f0a4b17e08bbc3652836Alan Wrightextern void smb_ads_fini(void);
3db3f65c6274eb042354801a308c8e9bc4994553amwextern void smb_ads_refresh(void);
3db3f65c6274eb042354801a308c8e9bc4994553amwextern int smb_ads_publish_share(smb_ads_handle_t *, const char *, const char *,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw const char *, const char *);
3db3f65c6274eb042354801a308c8e9bc4994553amwextern int smb_ads_remove_share(smb_ads_handle_t *, const char *, const char *,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw const char *, const char *);
3db3f65c6274eb042354801a308c8e9bc4994553amwextern int smb_ads_build_unc_name(char *, int, const char *, const char *);
3db3f65c6274eb042354801a308c8e9bc4994553amwextern int smb_ads_lookup_share(smb_ads_handle_t *, const char *, const char *,
3db3f65c6274eb042354801a308c8e9bc4994553amwextern int smb_ads_add_share(smb_ads_handle_t *, const char *, const char *,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw const char *);
77191e8775ec29406dec7210fc064d8fd759dd24Shawn Emeryextern smb_adjoin_status_t smb_ads_join(char *, char *, char *, char *, size_t);
fc724630b14603e4c1147df68b7bf45f7de7431fAlan Wrightextern void smb_ads_join_errmsg(smb_adjoin_status_t);
8d7e41661dc4633488e93b13363137523ce59977jose borregoextern boolean_t smb_ads_lookup_msdcs(char *, char *, char *, uint32_t);
29bd28862cfb8abbd3a0f0a4b17e08bbc3652836Alan Wrightextern smb_ads_host_info_t *smb_ads_find_host(char *, char *);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* DYNDNS functions */
8d7e41661dc4633488e93b13363137523ce59977jose borregoextern int dyndns_start(void);
8d7e41661dc4633488e93b13363137523ce59977jose borregoextern void dyndns_stop(void);
8c10a8659ac31335ed870a1711c0182623f72fd6asextern int dyndns_update(char *);
8d7e41661dc4633488e93b13363137523ce59977jose borregoextern void dyndns_update_zones(void);
8d7e41661dc4633488e93b13363137523ce59977jose borregoextern void dyndns_clear_zones(void);
a0aa776e20803c84edd153d9cb584fd67163aef3Alan Wright/* Kerberos cache management function */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbextern int smb_ccache_init(char *, char *);
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbextern void smb_ccache_remove(char *);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NETBIOS Functions */
dc20a3024900c47dd2ee44b9707e6df38f7d62a5asextern int smb_netbios_start(void);
a0aa776e20803c84edd153d9cb584fd67163aef3Alan Wrightextern void smb_netbios_stop(void);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwextern void smb_netbios_name_reconfig(void);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb/* Browser Functions */
7b59d02d2a384be9a08087b14defadd214b3c1ddjbextern void smb_browser_reconfig(void);
8d7e41661dc4633488e93b13363137523ce59977jose borregoextern boolean_t smb_browser_netlogon(char *, char *, uint32_t);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif /* _LIBSMBNS_H */