netdfs.ndl revision 9fb67ea305c66b6a297583b9b0db6796b0dfe497
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NETDFS_NDL_
#define _NETDFS_NDL_
/*
* NT Distributed File Service (NETDFS) RPC interface definition.
*/
#include "ndrtypes.ndl"
#define NETDFS_ABSTRACT_UUID "4fc742e0-4a10-11cf-8273-00aa004ae673"
#define NETDFS_ABSTRACT_VERS 3
#define NETDFS_TRANSFER_UUID "8a885d04-1ceb-11c9-9fe8-08002b104860"
#define NETDFS_TRANSFER_VERS 2
#define NETDFS_OPNUM_GETVER 0x00
#define NETDFS_OPNUM_ADD 0x01
#define NETDFS_OPNUM_REMOVE 0x02
#define NETDFS_OPNUM_SETINFO 0x03
#define NETDFS_OPNUM_GETINFO 0x04
#define NETDFS_OPNUM_ENUM 0x05
#define NETDFS_OPNUM_MOVE 0x06
#define NETDFS_OPNUM_RENAME 0x07
#define NETDFS_OPNUM_ADDSTDROOT 0x0c
#define NETDFS_OPNUM_REMSTDROOT 0x0d
#define NETDFS_OPNUM_ENUMEX 0x15
#define DFS_MANAGER_VERSION_NT4 0x01
#define DFS_MANAGER_VERSION_W2K 0x02
#define DFS_MANAGER_VERSION_W2K3 0x04
struct netdfs_uuid {
DWORD data1;
WORD data2;
WORD data3;
BYTE data4[8];
};
typedef struct netdfs_uuid netdfs_uuid_t;
struct netdfs_storage_info {
DWORD state;
LPTSTR server;
LPTSTR share;
};
typedef struct netdfs_storage_info netdfs_storage_info_t;
struct netdfs_storage_info1 {
DWORD state;
LPTSTR server;
LPTSTR share;
DWORD p_class;
WORD p_rank;
WORD p_reserved;
};
typedef struct netdfs_storage_info1 netdfs_storage_info1_t;
struct netdfs_info1 {
LPTSTR entry_path;
};
typedef struct netdfs_info1 netdfs_info1_t;
struct netdfs_info2 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD n_store;
};
typedef struct netdfs_info2 netdfs_info2_t;
struct netdfs_info3 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD n_store;
SIZE_IS(n_store)
struct netdfs_storage_info *si;
};
typedef struct netdfs_info3 netdfs_info3_t;
struct netdfs_info4 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD timeout;
netdfs_uuid_t guid;
DWORD n_store;
SIZE_IS(n_store)
struct netdfs_storage_info *si;
};
typedef struct netdfs_info4 netdfs_info4_t;
struct netdfs_info5 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD timeout;
netdfs_uuid_t guid;
DWORD flags;
DWORD metadata_sz;
DWORD n_store;
};
typedef struct netdfs_info5 netdfs_info5_t;
struct netdfs_info6 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD timeout;
netdfs_uuid_t guid;
DWORD flags;
DWORD metadata_sz;
DWORD n_store;
SIZE_IS(n_store)
struct netdfs_storage_info1 *si;
};
typedef struct netdfs_info6 netdfs_info6_t;
struct netdfs_info100 {
LPTSTR comment;
};
typedef struct netdfs_info100 netdfs_info100_t;
struct netdfs_info101 {
DWORD state;
};
typedef struct netdfs_info101 netdfs_info101_t;
struct netdfs_info102 {
DWORD timeout;
};
typedef struct netdfs_info102 netdfs_info102_t;
struct netdfs_info103 {
DWORD property_flag_mask;
DWORD property_flags;
};
typedef struct netdfs_info103 netdfs_info103_t;
struct netdfs_info104 {
DWORD priority_class;
WORD priority_rank;
WORD reserved;
};
typedef struct netdfs_info104 netdfs_info104_t;
struct netdfs_info105 {
LPTSTR comment;
DWORD state;
DWORD timeout;
DWORD property_flag_mask;
DWORD property_flags;
};
typedef struct netdfs_info105 netdfs_info105_t;
struct netdfs_info106 {
DWORD storage_state;
DWORD priority_class;
DWORD priority_rank;
};
struct netdfs_info200 {
LPTSTR entry_path;
};
struct netdfs_info300 {
DWORD flavor;
LPTSTR dfsname;
};
typedef struct netdfs_info300 netdfs_info300_t;
union netdfs_info_u {
CASE(1) struct netdfs_info1 *info1;
CASE(2) struct netdfs_info2 *info2;
CASE(3) struct netdfs_info3 *info3;
CASE(4) struct netdfs_info4 *info4;
CASE(5) struct netdfs_info5 *info5;
CASE(6) struct netdfs_info6 *info6;
CASE(100) struct netdfs_info100 *info100;
CASE(101) struct netdfs_info101 *info101;
CASE(102) struct netdfs_info102 *info102;
CASE(103) struct netdfs_info103 *info103;
CASE(104) struct netdfs_info104 *info104;
CASE(105) struct netdfs_info105 *info105;
CASE(106) struct netdfs_info106 *info106;
DEFAULT char *nullptr;
};
struct netdfs_info {
DWORD level;
SWITCH(level)
union netdfs_info_u iu;
};
typedef struct netdfs_info netdfs_info_t;
struct netdfs_array1 {
DWORD count;
SIZE_IS(count)
struct netdfs_info1 *info1;
};
struct netdfs_array2 {
DWORD count;
SIZE_IS(count)
struct netdfs_info2 *info2;
};
struct netdfs_array3 {
DWORD count;
SIZE_IS(count)
struct netdfs_info3 *info3;
};
struct netdfs_array4 {
DWORD count;
SIZE_IS(count)
struct netdfs_info4 *info4;
};
struct netdfs_array5 {
DWORD count;
SIZE_IS(count)
struct netdfs_info5 *info5;
};
struct netdfs_array6 {
DWORD count;
SIZE_IS(count)
struct netdfs_info6 *info6;
};
struct netdfs_array200 {
DWORD count;
SIZE_IS(count)
struct netdfs_info200 *info200;
};
struct netdfs_array300 {
DWORD count;
SIZE_IS(count)
struct netdfs_info300 *info300;
};
union netdfs_enum_info_u {
CASE(1) struct netdfs_array1 *info1;
CASE(2) struct netdfs_array2 *info2;
CASE(3) struct netdfs_array3 *info3;
CASE(4) struct netdfs_array4 *info4;
CASE(5) struct netdfs_array5 *info5;
CASE(6) struct netdfs_array6 *info6;
CASE(200) struct netdfs_array200 *info200;
CASE(300) struct netdfs_array300 *info300;
DEFAULT char *nullptr;
};
struct netdfs_enum_info {
DWORD level;
DWORD switch_value;
SWITCH(switch_value)
union netdfs_enum_info_u iu;
};
/*
***********************************************************************
* Return server version id
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_GETVER)
struct netdfs_getver {
OUT DWORD version;
};
/*
***********************************************************************
* Add a new volume or additional storage for an existing volume at
* dfs_path.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_ADD)
struct netdfs_add {
IN REFERENCE LPTSTR dfs_path;
IN REFERENCE LPTSTR server;
IN LPTSTR share;
IN LPTSTR comment;
IN DWORD flags;
OUT DWORD status;
};
typedef struct netdfs_add netdfs_add_t;
/*
***********************************************************************
* Remove a volume or additional storage for volume from the DFS at
* dfs_path. When applied to the last storage in a volume, removes
* the volume from the DFS.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_REMOVE)
struct netdfs_remove {
IN REFERENCE LPTSTR dfs_path;
IN LPTSTR server;
IN LPTSTR share;
OUT DWORD status;
};
/*
***********************************************************************
* Set information about the volume or storage. If the server and share
* are specified, the information set is specific to that server and
* share. Otherwise the information is specific to the volume as a whole.
*
* Valid levels are 100-102.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_SETINFO)
struct netdfs_setinfo {
IN REFERENCE LPTSTR dfs_path;
IN LPTSTR server;
IN LPTSTR share;
IN DWORD level;
IN struct netdfs_info info;
OUT DWORD status;
};
typedef struct netdfs_setinfo netdfs_setinfo_t;
/*
***********************************************************************
* Get information about the volume or storage. If the server and share
* are specified, the information returned is specific to that server
* and share. Otherwise the information is specific to the volume as a
* whole.
*
* Valid levels are 1-4, 100-102.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_GETINFO)
struct netdfs_getinfo {
IN REFERENCE LPTSTR dfs_path;
IN LPTSTR server;
IN LPTSTR share;
IN DWORD level;
OUT struct netdfs_info info;
OUT DWORD status;
};
typedef struct netdfs_getinfo netdfs_getinfo_t;
/*
***********************************************************************
* Get information about all of the volumes in the DFS. dfs_path is
* the "server" part of the UNC name used to refer to this particular
* DFS.
*
* Valid levels are 1-3.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_ENUM)
struct netdfs_enum {
IN DWORD level;
IN DWORD pref_max_len;
INOUT struct netdfs_enum_info *info;
INOUT DWORD *resume_handle;
OUT DWORD status;
};
typedef struct netdfs_enum netdfs_enum_t;
/*
***********************************************************************
* Rename the current Win32 path in a DFS to a new Win32 path in the
* same DFS.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_RENAME)
struct netdfs_rename {
IN REFERENCE LPTSTR dfs_path;
IN REFERENCE LPTSTR new_path;
OUT DWORD status;
};
/*
***********************************************************************
* Move a DFS volume and all subordinate volumes from one place in the
* DFS to another place in the DFS.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_MOVE)
struct netdfs_move {
IN REFERENCE LPTSTR dfs_path;
IN REFERENCE LPTSTR new_path;
IN DWORD flags;
OUT DWORD status;
};
/*
***********************************************************************
* Add a DFS root share.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_ADDSTDROOT)
struct netdfs_addstdroot {
IN REFERENCE LPTSTR server;
IN REFERENCE LPTSTR share;
IN REFERENCE LPTSTR comment;
IN DWORD flags;
OUT DWORD status;
};
/*
***********************************************************************
* Remove a DFS root share.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_REMSTDROOT)
struct netdfs_remstdroot {
IN REFERENCE LPTSTR server;
IN REFERENCE LPTSTR share;
IN DWORD flags;
OUT DWORD status;
};
/*
***********************************************************************
* Get information about all of the volumes in the DFS. dfs_path is
* the "server" part of the UNC name used to refer to this particular
* DFS.
*
* Valid levels are 1-3.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_ENUMEX)
struct netdfs_enumex {
IN REFERENCE LPTSTR dfs_path;
IN DWORD level;
IN DWORD pref_max_len;
INOUT struct netdfs_enum_info *info;
INOUT DWORD *resume_handle;
OUT DWORD status;
};
/*
***********************************************************************
* The NETDFS interface definiton.
***********************************************************************
*/
INTERFACE(0)
union netdfs_interface {
CASE(NETDFS_OPNUM_GETVER)
struct netdfs_getver netdfs_getver;
CASE(NETDFS_OPNUM_ADD)
struct netdfs_add netdfs_add;
CASE(NETDFS_OPNUM_REMOVE)
struct netdfs_remove netdfs_remove;
CASE(NETDFS_OPNUM_SETINFO)
struct netdfs_setinfo netdfs_setinfo;
CASE(NETDFS_OPNUM_GETINFO)
struct netdfs_getinfo netdfs_getinfo;
CASE(NETDFS_OPNUM_ENUM)
struct netdfs_enum netdfs_enum;
CASE(NETDFS_OPNUM_MOVE)
struct netdfs_move netdfs_move;
CASE(NETDFS_OPNUM_RENAME)
struct netdfs_rename netdfs_rename;
CASE(NETDFS_OPNUM_ADDSTDROOT)
struct netdfs_addstdroot netdfs_addstdroot;
CASE(NETDFS_OPNUM_REMSTDROOT)
struct netdfs_remstdroot netdfs_remstdroot;
CASE(NETDFS_OPNUM_ENUMEX)
struct netdfs_enumex netdfs_enumex;
};
typedef union netdfs_interface netdfs_interface_t;
EXTERNTYPEINFO(netdfs_interface)
#endif /* _NETDFS_NDL_ */