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 (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _DFS_H
2N/A#define _DFS_H
2N/A
2N/A#include <priv.h>
2N/A#include <smbsrv/smb_dfs.h>
2N/A#include <smbsrv/libsmb.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * Status returned by dfs_link_stat()
2N/A */
2N/A#define DFS_STAT_UNKNOWN 0
2N/A#define DFS_STAT_NOTFOUND 1
2N/A#define DFS_STAT_NOTLINK 2
2N/A#define DFS_STAT_ISREPARSE 3
2N/A#define DFS_STAT_ISDFS 4
2N/A#define DFS_STAT_ISFEDFS 5
2N/A
2N/A#define DFS_STAT_ISSMB(st) \
2N/A (((st) == DFS_STAT_ISDFS) || ((st) == DFS_STAT_ISFEDFS))
2N/A
2N/Atypedef struct dfs_path {
2N/A char p_fspath[DFS_PATH_MAX];
2N/A smb_unc_t p_unc;
2N/A uint32_t p_type;
2N/A} dfs_path_t;
2N/A
2N/Atypedef struct dfs_node {
2N/A avl_node_t dn_hook;
2N/A char dn_uncpath[DFS_PATH_MAX];
2N/A char dn_fspath[DFS_PATH_MAX];
2N/A uint32_t dn_type;
2N/A} dfs_node_t;
2N/A
2N/Auint32_t dfs_ns_count(void);
2N/Aboolean_t dfs_ns_exists(uint32_t);
2N/Auint32_t dfs_ns_getflavor(const char *, uint32_t);
2N/Avoid dfs_ns_hold(const char *);
2N/Avoid dfs_ns_rele(const char *);
2N/Auint32_t dfs_ns_addlink(const char *, dfs_path_t *,
2N/A const char *, const char *, const char *, uint32_t, uint32_t);
2N/Auint32_t dfs_ns_removelink(const char *, dfs_path_t *,
2N/A const char *, const char *, uint32_t);
2N/Auint32_t dfs_ns_numlink(const char *);
2N/Adfs_node_t *dfs_ns_firstlink(const char *);
2N/Adfs_node_t *dfs_ns_nextlink(const char *, dfs_node_t *);
2N/A
2N/Auint32_t dfs_root_getinfo(const char *, dfs_info_t *, uint32_t, uint32_t);
2N/Auint32_t dfs_root_setinfo(const char *, dfs_info_t *, uint32_t, uint32_t);
2N/A
2N/Auint32_t dfs_link_add(const char *, const char *, const char *,
2N/A const char *, uint32_t, boolean_t *, uint32_t);
2N/Auint32_t dfs_link_remove(const char *, const char *, const char *, uint32_t);
2N/Auint32_t dfs_link_stat(const char *, uint32_t *);
2N/Auint32_t dfs_link_getinfo(const char *, dfs_info_t *, uint32_t, uint32_t);
2N/Auint32_t dfs_link_setinfo(const char *, dfs_info_t *, uint32_t, uint32_t);
2N/A
2N/Auint32_t dfs_info_copy(dfs_info_t *, dfs_info_t *);
2N/A
2N/Auint32_t dfs_path_parse(dfs_path_t *, const char *, uint32_t, uint32_t);
2N/Avoid dfs_path_free(dfs_path_t *);
2N/A
2N/Auint32_t dfs_getinfo(dfs_node_t *, dfs_info_t *, uint32_t, uint32_t);
2N/A
2N/Avoid dfs_init(void);
2N/Avoid dfs_fini(void);
2N/Avoid dfs_setpriv(priv_op_t);
2N/A
2N/Avoid dfs_info_trace(const char *, dfs_info_t *);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _DFS_H */