#ifndef _RPC_SRVSVC_H
#define _RPC_SRVSVC_H
#define SRV_NET_CONN_ENUM 0x08
#define SRV_NET_FILE_ENUM 0x09
#define SRV_NET_FILE_CLOSE 0x0b
#define SRV_NET_SESS_ENUM 0x0c
#define SRV_NET_SHARE_ADD 0x0e
#define SRV_NET_SHARE_ENUM_ALL 0x0f
#define SRV_NET_SHARE_GET_INFO 0x10
#define SRV_NET_SHARE_SET_INFO 0x11
#define SRV_NET_SHARE_DEL 0x12
#define SRV_NET_SHARE_DEL_STICKY 0x13
#define SRV_NET_SRV_GET_INFO 0x15
#define SRV_NET_SRV_SET_INFO 0x16
#define SRV_NET_DISK_ENUM 0x17
#define SRV_NET_REMOTE_TOD 0x1c
#define SRV_NET_NAME_VALIDATE 0x21
#define SRV_NET_SHARE_ENUM 0x24
#define SRV_NET_FILE_QUERY_SECDESC 0x27
#define SRV_NET_FILE_SET_SECDESC 0x28
#define MAX_SERVER_DISK_ENTRIES 15
typedef struct disk_info {
uint32 unknown;
UNISTR3 disk_name;
} DISK_INFO;
typedef struct disk_enum_container {
uint32 level;
uint32 entries_read;
uint32 unknown;
uint32 disk_info_ptr;
DISK_INFO *disk_info;
} DISK_ENUM_CONTAINER;
typedef struct net_srv_disk_enum {
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
DISK_ENUM_CONTAINER disk_enum_ctr;
uint32 preferred_len;
uint32 total_entries;
ENUM_HND enum_hnd;
WERROR status;
} SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM;
typedef struct net_name_validate {
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
UNISTR2 uni_name;
uint32 type;
uint32 flags;
WERROR status;
} SRV_Q_NET_NAME_VALIDATE, SRV_R_NET_NAME_VALIDATE;
typedef struct ptr_sess_info0
{
uint32 ptr_name;
} SESS_INFO_0;
typedef struct str_sess_info0
{
UNISTR2 uni_name;
} SESS_INFO_0_STR;
#define MAX_SESS_ENTRIES 32
typedef struct srv_sess_info_0_info
{
uint32 num_entries_read;
uint32 ptr_sess_info;
uint32 num_entries_read2;
SESS_INFO_0 info_0 [MAX_SESS_ENTRIES];
SESS_INFO_0_STR info_0_str[MAX_SESS_ENTRIES];
} SRV_SESS_INFO_0;
typedef struct ptr_sess_info1
{
uint32 ptr_name;
uint32 ptr_user;
uint32 num_opens;
uint32 open_time;
uint32 idle_time;
uint32 user_flags;
} SESS_INFO_1;
typedef struct str_sess_info1
{
UNISTR2 uni_name;
UNISTR2 uni_user;
} SESS_INFO_1_STR;
typedef struct srv_sess_info_1_info
{
uint32 num_entries_read;
uint32 ptr_sess_info;
uint32 num_entries_read2;
SESS_INFO_1 info_1 [MAX_SESS_ENTRIES];
SESS_INFO_1_STR info_1_str[MAX_SESS_ENTRIES];
} SRV_SESS_INFO_1;
typedef struct srv_sess_info_ctr_info
{
uint32 switch_value;
uint32 ptr_sess_ctr;
union
{
SRV_SESS_INFO_0 info0;
SRV_SESS_INFO_1 info1;
} sess;
} SRV_SESS_INFO_CTR;
typedef struct q_net_sess_enum_info
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 ptr_qual_name;
UNISTR2 uni_qual_name;
uint32 ptr_user_name;
UNISTR2 uni_user_name;
uint32 sess_level;
SRV_SESS_INFO_CTR *ctr;
uint32 preferred_len;
ENUM_HND enum_hnd;
} SRV_Q_NET_SESS_ENUM;
typedef struct r_net_sess_enum_info
{
uint32 sess_level;
SRV_SESS_INFO_CTR *ctr;
uint32 total_entries;
ENUM_HND enum_hnd;
WERROR status;
} SRV_R_NET_SESS_ENUM;
typedef struct ptr_conn_info0
{
uint32 id;
} CONN_INFO_0;
#define MAX_CONN_ENTRIES 32
typedef struct srv_conn_info_0_info
{
uint32 num_entries_read;
uint32 ptr_conn_info;
uint32 num_entries_read2;
CONN_INFO_0 info_0 [MAX_CONN_ENTRIES];
} SRV_CONN_INFO_0;
typedef struct ptr_conn_info1
{
uint32 id;
uint32 type;
uint32 num_opens;
uint32 num_users;
uint32 open_time;
uint32 ptr_usr_name;
uint32 ptr_net_name;
} CONN_INFO_1;
typedef struct str_conn_info1
{
UNISTR2 uni_usr_name;
UNISTR2 uni_net_name;
} CONN_INFO_1_STR;
typedef struct srv_conn_info_1_info
{
uint32 num_entries_read;
uint32 ptr_conn_info;
uint32 num_entries_read2;
CONN_INFO_1 info_1 [MAX_CONN_ENTRIES];
CONN_INFO_1_STR info_1_str[MAX_CONN_ENTRIES];
} SRV_CONN_INFO_1;
typedef struct srv_conn_info_ctr_info
{
uint32 switch_value;
uint32 ptr_conn_ctr;
union
{
SRV_CONN_INFO_0 info0;
SRV_CONN_INFO_1 info1;
} conn;
} SRV_CONN_INFO_CTR;
typedef struct q_net_conn_enum_info
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 ptr_qual_name;
UNISTR2 uni_qual_name;
uint32 conn_level;
SRV_CONN_INFO_CTR *ctr;
uint32 preferred_len;
ENUM_HND enum_hnd;
} SRV_Q_NET_CONN_ENUM;
typedef struct r_net_conn_enum_info
{
uint32 conn_level;
SRV_CONN_INFO_CTR *ctr;
uint32 total_entries;
ENUM_HND enum_hnd;
WERROR status;
} SRV_R_NET_CONN_ENUM;
typedef struct ptr_share_info0
{
uint32 ptr_netname;
} SH_INFO_0;
typedef struct str_share_info0
{
SH_INFO_0 *ptrs;
UNISTR2 uni_netname;
} SH_INFO_0_STR;
typedef struct share_info_0_info
{
SH_INFO_0 info_0;
SH_INFO_0_STR info_0_str;
} SRV_SHARE_INFO_0;
typedef struct ptr_share_info1
{
uint32 ptr_netname;
uint32 type;
uint32 ptr_remark;
} SH_INFO_1;
typedef struct str_share_info1
{
SH_INFO_1 *ptrs;
UNISTR2 uni_netname;
UNISTR2 uni_remark;
} SH_INFO_1_STR;
typedef struct share_info_1_info
{
SH_INFO_1 info_1;
SH_INFO_1_STR info_1_str;
} SRV_SHARE_INFO_1;
typedef struct ptr_share_info2
{
uint32 ptr_netname;
uint32 type;
uint32 ptr_remark;
uint32 perms;
uint32 max_uses;
uint32 num_uses;
uint32 ptr_path;
uint32 ptr_passwd;
} SH_INFO_2;
typedef struct str_share_info2
{
SH_INFO_2 *ptrs;
UNISTR2 uni_netname;
UNISTR2 uni_remark;
UNISTR2 uni_path;
UNISTR2 uni_passwd;
} SH_INFO_2_STR;
typedef struct share_info_2_info
{
SH_INFO_2 info_2;
SH_INFO_2_STR info_2_str;
} SRV_SHARE_INFO_2;
typedef struct ptr_share_info501
{
uint32 ptr_netname;
uint32 type;
uint32 ptr_remark;
uint32 csc_policy;
} SH_INFO_501;
typedef struct str_share_info501
{
UNISTR2 uni_netname;
UNISTR2 uni_remark;
} SH_INFO_501_STR;
typedef struct share_info_501_info
{
SH_INFO_501 info_501;
SH_INFO_501_STR info_501_str;
} SRV_SHARE_INFO_501;
typedef struct ptr_share_info502
{
uint32 ptr_netname;
uint32 type;
uint32 ptr_remark;
uint32 perms;
uint32 max_uses;
uint32 num_uses;
uint32 ptr_path;
uint32 ptr_passwd;
uint32 reserved;
uint32 reserved_offset;
uint32 sd_size;
uint32 ptr_sd;
} SH_INFO_502;
typedef struct str_share_info502
{
SH_INFO_502 *ptrs;
UNISTR2 uni_netname;
UNISTR2 uni_remark;
UNISTR2 uni_path;
UNISTR2 uni_passwd;
uint32 reserved;
uint32 sd_size;
SEC_DESC *sd;
} SH_INFO_502_STR;
typedef struct share_info_502_info
{
SH_INFO_502 info_502;
SH_INFO_502_STR info_502_str;
} SRV_SHARE_INFO_502;
typedef struct ptr_share_info1004
{
uint32 ptr_remark;
} SH_INFO_1004;
typedef struct str_share_info1004
{
SH_INFO_1004 *ptrs;
UNISTR2 uni_remark;
} SH_INFO_1004_STR;
typedef struct ptr_info_1004_info
{
SH_INFO_1004 info_1004;
SH_INFO_1004_STR info_1004_str;
} SRV_SHARE_INFO_1004;
#define SHARE_1005_IN_DFS 0x00000001
#define SHARE_1005_DFS_ROOT 0x00000002
#define SHARE_1005_CSC_POLICY_MASK 0x00000030
#define SHARE_1005_CSC_POLICY_SHIFT 4
typedef struct share_info_1005_info
{
uint32 share_info_flags;
} SRV_SHARE_INFO_1005;
typedef struct share_info_1006_info
{
uint32 max_uses;
} SRV_SHARE_INFO_1006;
typedef struct ptr_share_info1007
{
uint32 flags;
uint32 ptr_AlternateDirectoryName;
} SH_INFO_1007;
typedef struct str_share_info1007
{
SH_INFO_1007 *ptrs;
UNISTR2 uni_AlternateDirectoryName;
} SH_INFO_1007_STR;
typedef struct ptr_info_1007_info
{
SH_INFO_1007 info_1007;
SH_INFO_1007_STR info_1007_str;
} SRV_SHARE_INFO_1007;
typedef struct share_info_1501_info
{
SEC_DESC_BUF *sdb;
} SRV_SHARE_INFO_1501;
typedef struct srv_share_info_ctr_info
{
uint32 info_level;
uint32 switch_value;
uint32 ptr_share_info;
uint32 num_entries;
uint32 ptr_entries;
uint32 num_entries2;
union {
SRV_SHARE_INFO_0 *info0;
SRV_SHARE_INFO_1 *info1;
SRV_SHARE_INFO_2 *info2;
SRV_SHARE_INFO_501 *info501;
SRV_SHARE_INFO_502 *info502;
SRV_SHARE_INFO_1004 *info1004;
SRV_SHARE_INFO_1005 *info1005;
SRV_SHARE_INFO_1006 *info1006;
SRV_SHARE_INFO_1007 *info1007;
SRV_SHARE_INFO_1501 *info1501;
void *info;
} share;
} SRV_SHARE_INFO_CTR;
typedef struct q_net_share_enum_info
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
SRV_SHARE_INFO_CTR ctr;
uint32 preferred_len;
ENUM_HND enum_hnd;
} SRV_Q_NET_SHARE_ENUM;
typedef struct r_net_share_enum_info
{
SRV_SHARE_INFO_CTR ctr;
uint32 total_entries;
ENUM_HND enum_hnd;
WERROR status;
} SRV_R_NET_SHARE_ENUM;
typedef struct q_net_share_get_info_info
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
UNISTR2 uni_share_name;
uint32 info_level;
} SRV_Q_NET_SHARE_GET_INFO;
typedef struct srv_share_info {
uint32 switch_value;
uint32 ptr_share_ctr;
union {
SRV_SHARE_INFO_0 info0;
SRV_SHARE_INFO_1 info1;
SRV_SHARE_INFO_2 info2;
SRV_SHARE_INFO_501 info501;
SRV_SHARE_INFO_502 info502;
SRV_SHARE_INFO_1004 info1004;
SRV_SHARE_INFO_1005 info1005;
SRV_SHARE_INFO_1006 info1006;
SRV_SHARE_INFO_1007 info1007;
SRV_SHARE_INFO_1501 info1501;
} share;
} SRV_SHARE_INFO;
typedef struct r_net_share_get_info_info
{
SRV_SHARE_INFO info;
WERROR status;
} SRV_R_NET_SHARE_GET_INFO;
typedef struct q_net_share_set_info_info
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
UNISTR2 uni_share_name;
uint32 info_level;
SRV_SHARE_INFO info;
uint32 ptr_parm_error;
uint32 parm_error;
} SRV_Q_NET_SHARE_SET_INFO;
typedef struct r_net_share_set_info
{
uint32 ptr_parm_error;
uint32 parm_error;
WERROR status;
} SRV_R_NET_SHARE_SET_INFO;
typedef struct q_net_share_add
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 info_level;
SRV_SHARE_INFO info;
uint32 ptr_err_index;
uint32 err_index;
} SRV_Q_NET_SHARE_ADD;
typedef struct r_net_share_add
{
uint32 ptr_parm_error;
uint32 parm_error;
WERROR status;
} SRV_R_NET_SHARE_ADD;
typedef struct q_net_share_del
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
UNISTR2 uni_share_name;
uint32 reserved;
} SRV_Q_NET_SHARE_DEL;
typedef struct r_net_share_del
{
WERROR status;
} SRV_R_NET_SHARE_DEL;
typedef struct file_info3_info
{
uint32 id;
uint32 perms;
uint32 num_locks;
uint32 ptr_path_name;
uint32 ptr_user_name;
} FILE_INFO_3;
typedef struct str_file_info3_info
{
UNISTR2 uni_path_name;
UNISTR2 uni_user_name;
} FILE_INFO_3_STR;
typedef struct srv_file_info_3
{
uint32 num_entries_read;
uint32 ptr_file_info;
uint32 num_entries_read2;
FILE_INFO_3 info_3;
FILE_INFO_3_STR info_3_str;
} SRV_FILE_INFO_3;
typedef struct srv_file_info_3_info
{
uint32 switch_value;
uint32 ptr_file_info;
uint32 num_entries;
uint32 ptr_entries;
uint32 num_entries2;
union
{
SRV_FILE_INFO_3 *info3;
} file;
} SRV_FILE_INFO_CTR;
typedef struct q_net_file_enum_info
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 ptr_qual_name;
UNISTR2 uni_qual_name;
uint32 ptr_user_name;
UNISTR2 uni_user_name;
uint32 file_level;
SRV_FILE_INFO_CTR ctr;
uint32 preferred_len;
ENUM_HND enum_hnd;
} SRV_Q_NET_FILE_ENUM;
typedef struct r_net_file_enum_info
{
uint32 file_level;
SRV_FILE_INFO_CTR ctr;
uint32 total_entries;
ENUM_HND enum_hnd;
WERROR status;
} SRV_R_NET_FILE_ENUM;
typedef struct q_net_file_close
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 file_id;
} SRV_Q_NET_FILE_CLOSE;
typedef struct r_net_file_close
{
WERROR status;
} SRV_R_NET_FILE_CLOSE;
typedef struct srv_info_100_info
{
uint32 platform_id;
uint32 ptr_name;
UNISTR2 uni_name;
} SRV_INFO_100;
typedef struct srv_info_101_info
{
uint32 platform_id;
uint32 ptr_name;
uint32 ver_major;
uint32 ver_minor;
uint32 srv_type;
uint32 ptr_comment;
UNISTR2 uni_name;
UNISTR2 uni_comment;
} SRV_INFO_101;
typedef struct srv_info_102_info
{
uint32 platform_id;
uint32 ptr_name;
uint32 ver_major;
uint32 ver_minor;
uint32 srv_type;
uint32 ptr_comment;
uint32 users;
uint32 disc;
uint32 hidden;
uint32 announce;
uint32 ann_delta;
uint32 licenses;
uint32 ptr_usr_path;
UNISTR2 uni_name;
UNISTR2 uni_comment;
UNISTR2 uni_usr_path;
} SRV_INFO_102;
typedef struct srv_info_ctr_info
{
uint32 switch_value;
uint32 ptr_srv_ctr;
union
{
SRV_INFO_102 sv102;
SRV_INFO_101 sv101;
SRV_INFO_100 sv100;
} srv;
} SRV_INFO_CTR;
typedef struct q_net_srv_get_info
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 switch_value;
} SRV_Q_NET_SRV_GET_INFO;
typedef struct r_net_srv_get_info
{
SRV_INFO_CTR *ctr;
WERROR status;
} SRV_R_NET_SRV_GET_INFO;
typedef struct q_net_srv_set_info
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 switch_value;
SRV_INFO_CTR *ctr;
} SRV_Q_NET_SRV_SET_INFO;
typedef struct r_net_srv_set_info
{
uint32 switch_value;
WERROR status;
} SRV_R_NET_SRV_SET_INFO;
typedef struct q_net_remote_tod
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
} SRV_Q_NET_REMOTE_TOD;
typedef struct time_of_day_info
{
uint32 elapsedt;
uint32 msecs;
uint32 hours;
uint32 mins;
uint32 secs;
uint32 hunds;
uint32 zone;
uint32 tintervals;
uint32 day;
uint32 month;
uint32 year;
uint32 weekday;
} TIME_OF_DAY_INFO;
typedef struct r_net_remote_tod
{
uint32 ptr_srv_tod;
TIME_OF_DAY_INFO *tod;
WERROR status;
} SRV_R_NET_REMOTE_TOD;
typedef struct q_net_file_query_secdesc
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 ptr_qual_name;
UNISTR2 uni_qual_name;
UNISTR2 uni_file_name;
uint32 unknown1;
uint32 unknown2;
uint32 unknown3;
} SRV_Q_NET_FILE_QUERY_SECDESC;
typedef struct r_net_file_query_secdesc
{
uint32 ptr_response;
uint32 size_response;
uint32 ptr_secdesc;
uint32 size_secdesc;
SEC_DESC *sec_desc;
WERROR status;
} SRV_R_NET_FILE_QUERY_SECDESC;
typedef struct q_net_file_set_secdesc
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name;
uint32 ptr_qual_name;
UNISTR2 uni_qual_name;
UNISTR2 uni_file_name;
uint32 sec_info;
uint32 size_set;
uint32 ptr_secdesc;
uint32 size_secdesc;
SEC_DESC *sec_desc;
} SRV_Q_NET_FILE_SET_SECDESC;
typedef struct r_net_file_set_secdesc
{
WERROR status;
} SRV_R_NET_FILE_SET_SECDESC;
#endif