source: trunk/src/wnetap32/lanman.h@ 10366

Last change on this file since 10366 was 6672, checked in by phaller, 24 years ago

.

File size: 16.8 KB
Line 
1/* $Id: lanman.h,v 1.2 2001-09-06 22:23:39 phaller Exp $ */
2/*
3 * Wrappers for NT/LAN Manager specific data structures
4 *
5 * Copyright 2000 Patrick Haller (patrick.haller@innotek.de)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11#ifndef __LANMAN_H__
12#define __LANMAN_H__
13
14
15/****************************************************************************
16 * OS/2 LAN Server structures *
17 ****************************************************************************/
18#pragma pack(1)
19
20
21#define CNLEN 15 /* Computer name length */
22#define UNCLEN (CNLEN+2) /* UNC computer name length */
23#define NNLEN 12 /* 8.3 Net name length */
24#define RMLEN (UNCLEN+1+NNLEN) /* Maximum remote name length */
25
26
27struct wksta_info_0 {
28 unsigned short wki0_reserved_1;
29 unsigned long wki0_reserved_2;
30 unsigned char *wki0_root;
31 unsigned char *wki0_computername;
32 unsigned char *wki0_username;
33 unsigned char *wki0_langroup;
34 unsigned char wki0_ver_major;
35 unsigned char wki0_ver_minor;
36 unsigned long wki0_reserved_3;
37 unsigned short wki0_charwait;
38 unsigned long wki0_chartime;
39 unsigned short wki0_charcount;
40 unsigned short wki0_reserved_4;
41 unsigned short wki0_reserved_5;
42 unsigned short wki0_keepconn;
43 unsigned short wki0_keepsearch;
44 unsigned short wki0_maxthreads;
45 unsigned short wki0_maxcmds;
46 unsigned short wki0_reserved_6;
47 unsigned short wki0_numworkbuf;
48 unsigned short wki0_sizworkbuf;
49 unsigned short wki0_maxwrkcache;
50 unsigned short wki0_sesstimeout;
51 unsigned short wki0_sizerror;
52 unsigned short wki0_numalerts;
53 unsigned short wki0_numservices;
54 unsigned short wki0_errlogsz;
55 unsigned short wki0_printbuftime;
56 unsigned short wki0_numcharbuf;
57 unsigned short wki0_sizcharbuf;
58 unsigned char *wki0_logon_server;
59 unsigned char *wki0_wrkheuristics;
60 unsigned short wki0_mailslots;
61}; /* wksta_info_0 */
62
63struct wksta_info_1 {
64 unsigned short wki1_reserved_1;
65 unsigned long wki1_reserved_2;
66 unsigned char *wki1_root;
67 unsigned char *wki1_computername;
68 unsigned char *wki1_username;
69 unsigned char *wki1_langroup;
70 unsigned char wki1_ver_major;
71 unsigned char wki1_ver_minor;
72 unsigned long wki1_reserved_3;
73 unsigned short wki1_charwait;
74 unsigned long wki1_chartime;
75 unsigned short wki1_charcount;
76 unsigned short wki1_reserved_4;
77 unsigned short wki1_reserved_5;
78 unsigned short wki1_keepconn;
79 unsigned short wki1_keepsearch;
80 unsigned short wki1_maxthreads;
81 unsigned short wki1_maxcmds;
82 unsigned short wki1_reserved_6;
83 unsigned short wki1_numworkbuf;
84 unsigned short wki1_sizworkbuf;
85 unsigned short wki1_maxwrkcache;
86 unsigned short wki1_sesstimeout;
87 unsigned short wki1_sizerror;
88 unsigned short wki1_numalerts;
89 unsigned short wki1_numservices;
90 unsigned short wki1_errlogsz;
91 unsigned short wki1_printbuftime;
92 unsigned short wki1_numcharbuf;
93 unsigned short wki1_sizcharbuf;
94 unsigned char *wki1_logon_server;
95 unsigned char *wki1_wrkheuristics;
96 unsigned short wki1_mailslots;
97 unsigned char *wki1_logon_domain;
98 unsigned char *wki1_oth_domains;
99 unsigned short wki1_numdgrambuf;
100}; /* wksta_info_1 */
101
102struct wksta_info_10 {
103 unsigned char *wki10_computername;
104 unsigned char *wki10_username;
105 unsigned char *wki10_langroup;
106 unsigned char wki10_ver_major;
107 unsigned char wki10_ver_minor;
108 unsigned char *wki10_logon_domain;
109 unsigned char *wki10_oth_domains;
110}; /* wksta_info_10 */
111
112
113struct statistics_info_0 {
114 unsigned long st0_start; /* time statistics collection started */
115 unsigned long st0_wknumNCBs; /* # workstation NCBs issued */
116 unsigned long st0_wkfiNCBs; /* # workstation NCBs failed issue */
117 unsigned long st0_wkfcNCBs; /* # workstation NCBs failed completion */
118 unsigned long st0_wksesstart; /* # workstation sessions started */
119 unsigned long st0_wksessfail; /* # workstation session failures */
120 unsigned long st0_wkuses; /* # workstation uses */
121 unsigned long st0_wkusefail; /* # workstation use failures */
122 unsigned long st0_wkautorec; /* # workstation auto-reconnects */
123 unsigned long st0_rdrnumNCBs; /* # redir NCBs issued */
124 unsigned long st0_srvnumNCBs; /* # NCBs issued for the server */
125 unsigned long st0_usrnumNCBs; /* # user NCBs issued */
126 unsigned long st0_reserved4; /* reserved for future use */
127 unsigned long st0_reserved5; /* reserved for future use */
128 unsigned long st0_reserved6; /* reserved for future use */
129 unsigned long st0_reserved7; /* reserved for future use */
130 unsigned long st0_reserved8; /* reserved for future use */
131 unsigned long st0_svfopens; /* # of server file opens */
132 unsigned long st0_svdevopens; /* # of server device opens */
133 unsigned long st0_svjobsqueued; /* # of server print jobs spooled */
134 unsigned long st0_svsopens; /* # of server session starts */
135 unsigned long st0_svstimedout; /* # of server session auto-disconnects */
136 unsigned long st0_svserrorout; /* # of server sessions errored out */
137 unsigned long st0_svpwerrors; /* # of server password violations */
138 unsigned long st0_svpermerrors; /* # of server access permission errors */
139 unsigned long st0_svsyserrors; /* # of server system errors */
140 unsigned long st0_svbytessent; /* # of server bytes sent to net */
141 unsigned long st0_svbytesrcvd; /* # of server bytes received from net */
142 unsigned long st0_svavresponse; /* average server response time in msec */
143}; /* statistics_info_0 */
144
145
146
147struct stat_workstation_0 {
148 unsigned long stw0_start;
149 unsigned long stw0_numNCB_r;
150 unsigned long stw0_numNCB_s;
151 unsigned long stw0_numNCB_a;
152 unsigned long stw0_fiNCB_r;
153 unsigned long stw0_fiNCB_s;
154 unsigned long stw0_fiNCB_a;
155 unsigned long stw0_fcNCB_r;
156 unsigned long stw0_fcNCB_s;
157 unsigned long stw0_fcNCB_a;
158 unsigned long stw0_sesstart;
159 unsigned long stw0_sessfailcon;
160 unsigned long stw0_sessbroke;
161 unsigned long stw0_uses;
162 unsigned long stw0_usefail;
163 unsigned long stw0_autorec;
164 unsigned long stw0_bytessent_r_lo;
165 unsigned long stw0_bytessent_r_hi;
166 unsigned long stw0_bytesrcvd_r_lo;
167 unsigned long stw0_bytesrcvd_r_hi;
168 unsigned long stw0_bytessent_s_lo;
169 unsigned long stw0_bytessent_s_hi;
170 unsigned long stw0_bytesrcvd_s_lo;
171 unsigned long stw0_bytesrcvd_s_hi;
172 unsigned long stw0_bytessent_a_lo;
173 unsigned long stw0_bytessent_a_hi;
174 unsigned long stw0_bytesrcvd_a_lo;
175 unsigned long stw0_bytesrcvd_a_hi;
176 unsigned long stw0_reqbufneed;
177 unsigned long stw0_bigbufneed;
178}; /* stat_workstation_0 */
179
180
181struct stat_server_0 {
182 unsigned long sts0_start;
183 unsigned long sts0_fopens;
184 unsigned long sts0_devopens;
185 unsigned long sts0_jobsqueued;
186 unsigned long sts0_sopens;
187 unsigned long sts0_stimedout;
188 unsigned long sts0_serrorout;
189 unsigned long sts0_pwerrors;
190 unsigned long sts0_permerrors;
191 unsigned long sts0_syserrors;
192 unsigned long sts0_bytessent_low;
193 unsigned long sts0_bytessent_high;
194 unsigned long sts0_bytesrcvd_low;
195 unsigned long sts0_bytesrcvd_high;
196 unsigned long sts0_avresponse;
197 unsigned long sts0_reqbufneed;
198 unsigned long sts0_bigbufneed;
199}; /* stat_server_0 */
200
201
202struct server_info_1 {
203 unsigned char sv1_name[CNLEN + 1];
204 unsigned char sv1_version_major;
205 unsigned char sv1_version_minor;
206 unsigned long sv1_type;
207 unsigned char * sv1_comment;
208}; /* server_info_1 */
209
210
211#pragma pack()
212
213
214/****************************************************************************
215 * NT/LAN MANAGER structures *
216 ****************************************************************************/
217// NetWkstaGetInfo System Information / guest access
218typedef struct _WKSTA_INFO_100
219{
220 DWORD wki100_platform_id;
221 LPWSTR wki100_computername;
222 LPWSTR wki100_langroup;
223 DWORD wki100_ver_major;
224 DWORD wki100_ver_minor;
225} WKSTA_INFO_100, *PWKSTA_INFO_100, *LPWKSTA_INFO_100;
226
227
228// NetWkstaGetInfo System Information / user access
229typedef struct _WKSTA_INFO_101
230{
231 DWORD wki101_platform_id;
232 LPWSTR wki101_computername;
233 LPWSTR wki101_langroup;
234 DWORD wki101_ver_major;
235 DWORD wki101_ver_minor;
236 LPWSTR wki101_lanroot;
237} WKSTA_INFO_101, *PWKSTA_INFO_101, *LPWKSTA_INFO_101;
238
239
240// NetWkstaGetInfo System Information / admin access
241typedef struct _WKSTA_INFO_102
242{
243 DWORD wki102_platform_id;
244 LPWSTR wki102_computername;
245 LPWSTR wki102_langroup;
246 DWORD wki102_ver_major;
247 DWORD wki102_ver_minor;
248 LPWSTR wki102_lanroot;
249 DWORD wki102_logged_on_users;
250} WKSTA_INFO_102, *PWKSTA_INFO_102, *LPWKSTA_INFO_102;
251
252//
253// Down-level NetWkstaGetInfo and NetWkstaSetInfo.
254//
255// DOS specific workstation information -
256// admin or domain operator access
257//
258typedef struct _WKSTA_INFO_302{
259 DWORD wki302_char_wait;
260 DWORD wki302_collection_time;
261 DWORD wki302_maximum_collection_count;
262 DWORD wki302_keep_conn;
263 DWORD wki302_keep_search;
264 DWORD wki302_max_cmds;
265 DWORD wki302_num_work_buf;
266 DWORD wki302_siz_work_buf;
267 DWORD wki302_max_wrk_cache;
268 DWORD wki302_sess_timeout;
269 DWORD wki302_siz_error;
270 DWORD wki302_num_alerts;
271 DWORD wki302_num_services;
272 DWORD wki302_errlog_sz;
273 DWORD wki302_print_buf_time;
274 DWORD wki302_num_char_buf;
275 DWORD wki302_siz_char_buf;
276 LPTSTR wki302_wrk_heuristics;
277 DWORD wki302_mailslots;
278 DWORD wki302_num_dgram_buf;
279}WKSTA_INFO_302, *PWKSTA_INFO_302, *LPWKSTA_INFO_302;
280
281//
282// Down-level NetWkstaGetInfo and NetWkstaSetInfo
283//
284// OS/2 specific workstation information -
285// admin or domain operator access
286//
287typedef struct _WKSTA_INFO_402{
288 DWORD wki402_char_wait;
289 DWORD wki402_collection_time;
290 DWORD wki402_maximum_collection_count;
291 DWORD wki402_keep_conn;
292 DWORD wki402_keep_search;
293 DWORD wki402_max_cmds;
294 DWORD wki402_num_work_buf;
295 DWORD wki402_siz_work_buf;
296 DWORD wki402_max_wrk_cache;
297 DWORD wki402_sess_timeout;
298 DWORD wki402_siz_error;
299 DWORD wki402_num_alerts;
300 DWORD wki402_num_services;
301 DWORD wki402_errlog_sz;
302 DWORD wki402_print_buf_time;
303 DWORD wki402_num_char_buf;
304 DWORD wki402_siz_char_buf;
305 LPTSTR wki402_wrk_heuristics;
306 DWORD wki402_mailslots;
307 DWORD wki402_num_dgram_buf;
308 DWORD wki402_max_threads;
309}WKSTA_INFO_402, *PWKSTA_INFO_402, *LPWKSTA_INFO_402;
310
311//
312// Same-level NetWkstaGetInfo and NetWkstaSetInfo.
313//
314// NT specific workstation information -
315// admin or domain operator access
316//
317typedef struct _WKSTA_INFO_502{
318 DWORD wki502_char_wait;
319 DWORD wki502_collection_time;
320 DWORD wki502_maximum_collection_count;
321 DWORD wki502_keep_conn;
322 DWORD wki502_max_cmds;
323 DWORD wki502_sess_timeout;
324 DWORD wki502_siz_char_buf;
325 DWORD wki502_max_threads;
326
327 DWORD wki502_lock_quota;
328 DWORD wki502_lock_increment;
329 DWORD wki502_lock_maximum;
330 DWORD wki502_pipe_increment;
331 DWORD wki502_pipe_maximum;
332 DWORD wki502_cache_file_timeout;
333 DWORD wki502_dormant_file_limit;
334 DWORD wki502_read_ahead_throughput;
335
336 DWORD wki502_num_mailslot_buffers;
337 DWORD wki502_num_srv_announce_buffers;
338 DWORD wki502_max_illegal_datagram_events;
339 DWORD wki502_illegal_datagram_event_reset_frequency;
340 BOOL wki502_log_election_packets;
341
342 BOOL wki502_use_opportunistic_locking;
343 BOOL wki502_use_unlock_behind;
344 BOOL wki502_use_close_behind;
345 BOOL wki502_buf_named_pipes;
346 BOOL wki502_use_lock_read_unlock;
347 BOOL wki502_utilize_nt_caching;
348 BOOL wki502_use_raw_read;
349 BOOL wki502_use_raw_write;
350 BOOL wki502_use_write_raw_data;
351 BOOL wki502_use_encryption;
352 BOOL wki502_buf_files_deny_write;
353 BOOL wki502_buf_read_only_files;
354 BOOL wki502_force_core_create_mode;
355 BOOL wki502_use_512_byte_max_transfer;
356}WKSTA_INFO_502, *PWKSTA_INFO_502, *LPWKSTA_INFO_502;
357
358
359typedef struct _STAT_WORKSTATION_LM_0 {
360 DWORD stw0_start;
361 DWORD stw0_numNCB_r;
362 DWORD stw0_numNCB_s;
363 DWORD stw0_numNCB_a;
364 DWORD stw0_fiNCB_r;
365 DWORD stw0_fiNCB_s;
366 DWORD stw0_fiNCB_a;
367 DWORD stw0_fcNCB_r;
368 DWORD stw0_fcNCB_s;
369 DWORD stw0_fcNCB_a;
370 DWORD stw0_sesstart;
371 DWORD stw0_sessfailcon;
372 DWORD stw0_sessbroke;
373 DWORD stw0_uses;
374 DWORD stw0_usefail;
375 DWORD stw0_autorec;
376 DWORD stw0_bytessent_r_lo;
377 DWORD stw0_bytessent_r_hi;
378 DWORD stw0_bytesrcvd_r_lo;
379 DWORD stw0_bytesrcvd_r_hi;
380 DWORD stw0_bytessent_s_lo;
381 DWORD stw0_bytessent_s_hi;
382 DWORD stw0_bytesrcvd_s_lo;
383 DWORD stw0_bytesrcvd_s_hi;
384 DWORD stw0_bytessent_a_lo;
385 DWORD stw0_bytessent_a_hi;
386 DWORD stw0_bytesrcvd_a_lo;
387 DWORD stw0_bytesrcvd_a_hi;
388 DWORD stw0_reqbufneed;
389 DWORD stw0_bigbufneed;
390} STAT_WORKSTATION_LM_0, *PSTAT_WORKSTATION_LM_0, *LPSTAT_WORKSTATION_LM_0;
391
392
393typedef struct _STAT_WORKSTATION_NT_0 {
394 LARGE_INTEGER StatisticsStartTime;
395
396 LARGE_INTEGER BytesReceived;
397 LARGE_INTEGER SmbsReceived;
398 LARGE_INTEGER PagingReadBytesRequested;
399 LARGE_INTEGER NonPagingReadBytesRequested;
400 LARGE_INTEGER CacheReadBytesRequested;
401 LARGE_INTEGER NetworkReadBytesRequested;
402
403 LARGE_INTEGER BytesTransmitted;
404 LARGE_INTEGER SmbsTransmitted;
405 LARGE_INTEGER PagingWriteBytesRequested;
406 LARGE_INTEGER NonPagingWriteBytesRequested;
407 LARGE_INTEGER CacheWriteBytesRequested;
408 LARGE_INTEGER NetworkWriteBytesRequested;
409
410 DWORD InitiallyFailedOperations;
411 DWORD FailedCompletionOperations;
412
413 DWORD ReadOperations;
414 DWORD RandomReadOperations;
415 DWORD ReadSmbs;
416 DWORD LargeReadSmbs;
417 DWORD SmallReadSmbs;
418
419 DWORD WriteOperations;
420 DWORD RandomWriteOperations;
421 DWORD WriteSmbs;
422 DWORD LargeWriteSmbs;
423 DWORD SmallWriteSmbs;
424
425 DWORD RawReadsDenied;
426 DWORD RawWritesDenied;
427
428 DWORD NetworkErrors;
429
430 // Connection/Session counts
431 DWORD Sessions;
432 DWORD FailedSessions;
433 DWORD Reconnects;
434 DWORD CoreConnects;
435 DWORD Lanman20Connects;
436 DWORD Lanman21Connects;
437 DWORD LanmanNtConnects;
438 DWORD ServerDisconnects;
439 DWORD HungSessions;
440 DWORD UseCount;
441 DWORD FailedUseCount;
442
443 //
444 // Queue Lengths (updates protected by RdrMpxTableSpinLock NOT
445 // RdrStatisticsSpinlock)
446 //
447
448 DWORD CurrentCommands;
449
450} STAT_WORKSTATION_NT_0, *PSTAT_WORKSTATION_NT_0, *LPSTAT_WORKSTATION_NT_0;
451
452
453typedef struct _STAT_SERVER_0 {
454 DWORD sts0_start;
455 DWORD sts0_fopens;
456 DWORD sts0_devopens;
457 DWORD sts0_jobsqueued;
458 DWORD sts0_sopens;
459 DWORD sts0_stimedout;
460 DWORD sts0_serrorout;
461 DWORD sts0_pwerrors;
462 DWORD sts0_permerrors;
463 DWORD sts0_syserrors;
464 DWORD sts0_bytessent_low;
465 DWORD sts0_bytessent_high;
466 DWORD sts0_bytesrcvd_low;
467 DWORD sts0_bytesrcvd_high;
468 DWORD sts0_avresponse;
469 DWORD sts0_reqbufneed;
470 DWORD sts0_bigbufneed;
471} STAT_SERVER_0, *PSTAT_SERVER_0, *LPSTAT_SERVER_0;
472
473
474typedef struct _SERVER_INFO_100 {
475 DWORD sv100_platform_id;
476 LPWSTR sv100_name;
477} SERVER_INFO_100, *PSERVER_INFO_100, *LPSERVER_INFO_100;
478
479
480typedef struct _SERVER_INFO_101 {
481 DWORD sv101_platform_id;
482 LPWSTR sv101_name;
483 DWORD sv101_version_major;
484 DWORD sv101_version_minor;
485 DWORD sv101_type;
486 LPWSTR sv101_comment;
487} SERVER_INFO_101, *PSERVER_INFO_101, *LPSERVER_INFO_101;
488
489
490#endif
Note: See TracBrowser for help on using the repository browser.