summaryrefslogtreecommitdiff
path: root/source3/aparser/srvsvc.struct
blob: f8dd94a2e696e8ed87216a2241a2e9d9abab14f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
module srvsvc
test SRV_R_NET_SHARE_ENUM
test SRV_R_NET_SERVER_INFO
test SRV_Q_NET_SERVER_INFO

#define SRV_NETCONNENUM        0x08
#define SRV_NETFILEENUM        0x09
#define SRV_NETSESSENUM        0x0c
#define SRV_NETSHAREENUM       0x0f
#define SRV_NET_SHARE_GET_INFO 0x10
#define SRV_NET_SRV_GET_INFO   0x15
#define SRV_NET_SRV_SET_INFO   0x16
#define SRV_NET_REMOTE_TOD     0x1c

struct UNISTR2 {
       uint32 max_len;
       uint32 undoc;
       uint32 str_len;
       uint16 buffer[str_len];
};

struct LPWSTR {
       UNISTR2 *str;
};

struct ENUM_HND {
	uint32 *handle;           /* enumeration handle */
};

/* function 8 */
struct CONN_INFO_0 {
	uint32 id; /* connection id. */
};

struct CONN_INFO_1 {
	uint32 id; 
	uint32 type;
	uint32 num_opens;
	uint32 num_users;
	uint32 open_time;
	LPWSTR usr_name;
	LPWSTR net_name; 
};

struct SRV_R_NET_CONN_ENUM {
	uint32 level;
	uint32 level2;
	uint32 num_entries;
	union *info[level] {
		case 0 CONN_INFO_0 info0[num_entries]; 
		case 1 CONN_INFO_1 info1[num_entries]; 
	}
        .trailer;
        uint32 count;
        ENUM_HND handle;
        uint32 status1;
        uint32 status2;
};

/* function 15 */
struct SRV_SHARE_INFO_1 {
	LPWSTR uni_netname;
	uint32 type;
	LPWSTR uni_remark;
};

struct SRV_SHARE_INFO_2 {
	LPWSTR uni_netname;
	uint32 type;
	LPWSTR uni_remark;
	uint32 perms;
	uint32 max_uses;
	uint32 num_uses;
	LPWSTR path;
	LPWSTR passwd;
};

struct SRV_R_NET_SHARE_ENUM {
       uint32 level;
       uint32 level2;
       uint32 *ret_count;
       uint32 num_entries;
       union *info[level] {
              case 1 SRV_SHARE_INFO_1 info1[num_entries];
              case 2 SRV_SHARE_INFO_2 info2[num_entries];
       }
       .trailer;
       uint32 count;
       uint32 status1;
       uint32 status2;
};



/* function 21 */
struct SERVER_INFO_100 {
	uint32  dwPlatformID;
	LPWSTR pszName;
};

struct SERVER_INFO_101 {
	    uint32  dwPlatformID;
	    LPWSTR pszName;
	    uint32  dwVerMajor;
	    uint32  dwVerMinor;
	    uint32  dwType;
	    LPWSTR pszComment;
};

struct SERVER_INFO_102 {
    uint32 dwPlatformID;
    LPWSTR pszName;
    uint32 dwVerMajor;
    uint32 dwVerMinor;
    uint32 dwType;
    LPWSTR pszComment;
    uint32 dwUsers;
    uint32 lDisc;
    uint32 bHidden;
    uint32 dwAnnounce;
    uint32 dwAnnDelta;
    uint32 dwLicenses;
    LPWSTR pszUserPath;
};

struct SRV_R_NET_SERVER_INFO {
       .trailer;
       uint32 level;
       union *info[level] {
		case 100 SERVER_INFO_100 sv100;
		case 101 SERVER_INFO_101 sv101;
		case 102 SERVER_INFO_102 sv102;
       }
       uint32 status;
};

struct SRV_Q_NET_SERVER_INFO {
       .trailer;
       LPWSTR server;
       uint32 level;
};