xref: /titanic_41/usr/src/lib/smbsrv/libmlsvc/common/dfs.h (revision 6a634c9dca3093f3922e4b7ab826d7bdf17bf78e)
19fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States /*
29fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * CDDL HEADER START
39fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  *
49fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * The contents of this file are subject to the terms of the
59fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * Common Development and Distribution License (the "License").
69fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * You may not use this file except in compliance with the License.
79fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  *
89fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * or http://www.opensolaris.org/os/licensing.
109fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * See the License for the specific language governing permissions
119fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * and limitations under the License.
129fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  *
139fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * When distributing Covered Code, include this CDDL HEADER in each
149fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
159fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * If applicable, add the following below this CDDL HEADER, with the
169fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * fields enclosed by brackets "[]" replaced with your own identifying
179fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * information: Portions Copyright [yyyy] [name of copyright owner]
189fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  *
199fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * CDDL HEADER END
209fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  */
219fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States /*
22*cb174861Sjoyce mcintosh  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
239fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  */
249fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
259fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #ifndef	_DFS_H
269fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #define	_DFS_H
279fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
289fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #include <priv.h>
299fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #include <smbsrv/smb_dfs.h>
309fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #include <smbsrv/libsmb.h>
319fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
329fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #ifdef	__cplusplus
339fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States extern "C" {
349fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #endif
359fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
369fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States /*
379fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  * Status returned by dfs_link_stat()
389fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States  */
399fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #define	DFS_STAT_UNKNOWN	0
409fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #define	DFS_STAT_NOTFOUND	1
419fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #define	DFS_STAT_NOTLINK	2
429fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #define	DFS_STAT_ISREPARSE	3
439fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #define	DFS_STAT_ISDFS		4
449fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
459fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States typedef struct dfs_path {
469fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 	char		p_fspath[DFS_PATH_MAX];
479fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 	smb_unc_t	p_unc;
489fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 	uint32_t	p_type;
499fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States } dfs_path_t;
509fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
519fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States typedef struct dfs_nscnode {
529fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 	char		nsc_uncpath[DFS_PATH_MAX];
539fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 	char		nsc_fspath[DFS_PATH_MAX];
549fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 	uint32_t	nsc_type;
559fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States } dfs_nscnode_t;
569fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
579fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_namespace_count(void);
589fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_namespace_path(const char *, char *, size_t);
599fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_namespace_add(const char *, const char *);
609fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_namespace_remove(const char *);
619fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_namespace_load(const char *);
629fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_namespace_unload(const char *);
63*cb174861Sjoyce mcintosh uint32_t dfs_namespace_getflavor(const char *);
649fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
659fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_root_getinfo(const char *, dfs_info_t *, uint32_t);
669fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_root_setinfo(const char *, dfs_info_t *, uint32_t);
679fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
689fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_link_add(const char *, const char *, const char *,
699fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States     const char *, uint32_t, boolean_t *);
709fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_link_remove(const char *, const char *, const char *);
719fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_link_stat(const char *, uint32_t *);
729fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_link_getinfo(const char *, dfs_info_t *, uint32_t);
739fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_link_setinfo(const char *, dfs_info_t *, uint32_t);
749fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
759fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_path_parse(dfs_path_t *, const char *, uint32_t);
769fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_path_free(dfs_path_t *);
779fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
789fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_cache_iterinit(smb_cache_cursor_t *);
799fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States boolean_t dfs_cache_iterate(smb_cache_cursor_t *, dfs_nscnode_t *);
809fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_cache_add_byname(const char *, const char *, uint32_t);
819fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_cache_remove(const char *, const char  *);
829fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_cache_getinfo(dfs_nscnode_t *, dfs_info_t *, uint32_t);
839fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States uint32_t dfs_cache_num(void);
849fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
859fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_init(void);
869fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_fini(void);
879fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_setpriv(priv_op_t);
889fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
899fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void dfs_info_trace(const char *, dfs_info_t *);
909fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
919fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #ifdef	__cplusplus
929fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States }
939fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #endif
949fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
959fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States #endif	/* _DFS_H */
96