xref: /illumos-gate/usr/src/uts/common/smbsrv/ndl/srvsvc.ndl (revision 89a7715a55deca73d03076f5c24463717f0aaa91)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23 * Use is subject to license terms.
24 */
25
26#ifndef _MLSVC_LANMAN_NDL_
27#define _MLSVC_LANMAN_NDL_
28
29#pragma ident	"%Z%%M%	%I%	%E% SMI"
30
31/*
32 * LanMan RPC (WKSSVC and SRVSVC) interface definitions.
33 */
34
35#include "ndrtypes.ndl"
36
37/*
38 * WARNING: The cpp(1) macros in this file are not understood by
39 *          /usr/bin/cpp. Use /usr/libexec/cpp instead.
40 */
41
42/*
43 * TYPE CONSTRUCTOR MACROS FOR INFORMATION RESULTS
44 ****************************************************************
45 *
46 * This is an explanation of the macros that follow this comment.
47 *
48 * The LANMAN API's look something like this:
49 *
50 *	NetXXXGetInfo (
51 *		IN  char *  servername,
52 *		IN  char *  XXX_name,
53 *		IN  int     level,
54 *		OUT char ** bufptr);
55 *
56 * The bufptr is a pointer-to-pointer (**). The NetXXXGetInfo() function
57 * malloc()s memory, and sets *bufptr to the memory. The API's
58 * are undiscriminated about what bufptr really points to.
59 *
60 * However, for RPI (Remote Procedure Interface), this just won't fly.
61 * We have to know what the result data looks like in order to
62 * properly (un)marshall it.
63 *
64 * As best we can determine, the MSC developers use an RPI that looks
65 * like this (approximately in IDL):
66 *
67 *	RemoteNetXXXGetInfo (
68 *		IN  char *  servername,
69 *		IN  char *  XXX_name,
70 *		IN  int     level,
71 *		OUT union switch(level) {
72 * 			case(1): XXX_INFO_1 * info1;
73 *			case(2): XXX_INFO_2 * info2;
74 *		    }       bufptr);
75 *
76 * The level guides the (un)marshalling as it follows the pointer.
77 * DCE(MS) IDL will automatically form a structure for the union
78 * which looks about like this (much as Sun/RPC does):
79 *
80 *	struct {
81 *		int   _keyvalue_;
82 *		union {
83 *			XXX_INFO_1 *info1;
84 *			XXX_INFO_2 *info2;
85 *		}      _u_;
86 *	} bufptr;
87 *
88 * This struct is not made visible to the application. It is purely
89 * an internal (automagic) thing.  However, ndrgen does not do this.
90 * The ndrgen input MUST remain a valid C header file, and all
91 * struct and union declarations must be exact, and we (would) have
92 * to tediously code sequences like this (approximately NDL)):
93 *
94 *	union XXXGetInfo_result_u {
95 *	    [case(1)]
96 *		XXX_INFO_1 *	info1;
97 *	    [case(2)]
98 *		XXX_INFO_2 *	info2;
99 *	};
100 *
101 *	struct XXXGetInfo_result {
102 *		int	level;
103 *
104 *		union XXXGetInfo_result_u bufptr;
105 *	};
106 *
107 *	struct XXXGetInfo_param {	// still have to code this one
108 *	    [in]  char *	servername;
109 *	    [in]  ushort	level;
110 *	    [out] struct XXXGetInfo_result result;
111 *	};
112 *
113 * This is error prone and difficult to write, and more difficult
114 * and distracting to read. It is hard to pick through the
115 * necessary evils and see what's really going on. To mitigate
116 * the situation, we have a series of macros which generate
117 * the tedious code, and are easily recognized as supporting
118 * fluff rather than important structures:
119 *
120 *	INFO1RES_DEFINITION(XXXGetInfo,
121 *		INFO1RES_UNION_ENTRY(XXXGetInfo, 1)
122 *		INFO1RES_UNION_ENTRY(XXXGetInfo, 2))
123 *
124 *	structt XXXGetInfo_param {	// still have to code this one
125 *	    [in]  char *	servername;
126 *	    [in]  ushort	level;
127 *	    [out] struct XXXGetInfo_result result;
128 *	};
129 *
130 * The INFO1RES_DEFINITION macro defines two types:
131 *
132 *	union ...__ru {...}
133 *	struct ..._result { DWORD level; union ..._ru bufptr; }
134 *
135 * There is a similar macro, INFO1RESBUF_DEFINITION, which defines
136 * actual space rather than just pointers. It defines:
137 *
138 *	union ...._rb {...}
139 *	typedef union ..._rb ..._rb;
140 *
141 * Which is handy in functions because the initial coding sequence
142 * looks something like:
143 *
144 *	XXXGetInfoParam (struct XXXGetInfo_param *param) {
145 *		XXXGetInfo_rb	rb;
146 *
147 *		param->result.level = param->level;	// for marshalling
148 *		param->result.bufptr.nullptr = &rb;	// anything fits
149 *
150 * There are two flavors of Info results. The first is the
151 * single XXX_INFO_x result, which the foregoing example
152 * uses. The second flavor is when there are multiple entries
153 * possible. Again, for the sake of guiding the marshalling,
154 * the RPIs use something accommodating:
155 *
156 *	struct XXX_INFO_1_result {
157 *		unsigned	entriesread;
158 *	   [size_is(entriesread)]
159 *		XXX_INFO_1 *	table;
160 *	};
161 *
162 *	union { XXX_INFO_1_result *info1; ...}
163 *
164 * Notice this is using XXX_INFO_1_result rather than just XXX_INFO_1.
165 * The requirements from this point are much like before. Because of
166 * the variable-length value, there is no realistic way to do something
167 * like INFO1RESBUF_DEFINITION.
168 *
169 * There are two sets of macros here. INFO1RES_xxx are for the
170 * single result case, and INFONRES_xxx for the multiple entry case.
171 */
172
173/*
174 * INFO1RES_...
175 *	Type constructors for single-result case
176 */
177
178#define INFO1RES_DEFINITION(INFOPREF, ENTRIES) \
179	INFO1RES_UNION(INFOPREF, ENTRIES) \
180	INFO1RES_STRUCT(INFOPREF)
181
182#define INFO1RES_UNION(INFOPREF, ENTRIES) \
183	union INFOPREF##__ru { \
184		INFO1RES_UNION_NULLPTR \
185		ENTRIES \
186	};
187
188#define INFO1RES_UNION_NULLPTR \
189	DEFAULT char *			nullptr;
190
191#define INFO1RES_UNION_ENTRY(INFOPREF,NUM) \
192	CASE(NUM) struct INFOPREF##_##NUM * bufptr##NUM;
193
194#define INFO1RES_STRUCT(INFOPREF) \
195	struct INFOPREF##_result { \
196		DWORD	level; \
197	   SWITCH(level) \
198		union INFOPREF##__ru bufptr; \
199	};
200
201/*
202 * INFO1RESBUF_...
203 *	Type constructors for single-result buffering.
204 */
205
206
207#ifndef NDRGEN
208#define INFO1RESBUF_DEFINITION(INFOPREF, ENTRIES) \
209	typedef union INFOPREF##_rb { \
210		ENTRIES \
211	} INFOPREF##_rb;
212#define INFO1RESBUF_UNION_ENTRY(INFOPREF,NUM) \
213	CASE(NUM) struct INFOPREF##_##NUM   buf##NUM;
214#else
215#define INFO1RESBUF_DEFINITION(INFOPREF, ENTRIES)
216#define INFO1RESBUF_UNION_ENTRY(INFOPREF,NUM)
217#endif
218
219
220
221
222/*
223 * INFONRES_...
224 *	Type constructors for multiple-result case
225 */
226
227#define INFONRES_RESULT(INFOPREF,NUM) \
228	struct INFOPREF##_##NUM##_result { \
229		DWORD	entriesread; \
230	    SIZE_IS(entriesread) \
231		struct INFOPREF##_##NUM *entries; \
232	};
233
234#define INFONRES_DEFINITION(INFOPREF, ENTRIES) \
235	INFONRES_UNION(INFOPREF, ENTRIES) \
236	INFONRES_STRUCT(INFOPREF)
237
238#define INFONRES_UNION(INFOPREF, ENTRIES) \
239	union INFOPREF##__ru { \
240		INFONRES_UNION_NULLPTR \
241		INFONRES_UNION_INFONRES \
242		ENTRIES \
243	};
244
245#define INFONRES_UNION_NULLPTR \
246	DEFAULT char *			nullptr;
247
248#ifndef NDRGEN
249#define INFONRES_UNION_INFONRES \
250	struct mslm_infonres *		p;
251#else
252#define INFONRES_UNION_INFONRES
253#endif
254
255#define INFONRES_UNION_ENTRY(INFOPREF,NUM) \
256	CASE(NUM) struct INFOPREF##_##NUM##_result * bufptr##NUM;
257
258#define INFONRES_STRUCT(INFOPREF) \
259	struct INFOPREF##_result { \
260		DWORD	level; \
261	   SWITCH(level) \
262		union INFOPREF##__ru bufptr; \
263	};
264
265#ifndef NDRGEN
266/*
267 * This just makes things a little easier on the stub modules:
268 *
269 *	XXXGetInfoParam (struct XXXGetInfo_param *param) {
270 *		struct mslm_infonres	infonres;
271 *
272 *		infonres.entriesread = 0;
273 *		infonres.entries = 0;
274 *		param->result.level = param->level;	// for marshalling
275 *		param->result.bufptr.p = &infonres;
276 */
277struct mslm_infonres {
278	DWORD		entriesread;
279	void *		entries;
280};
281#endif
282
283
284/*
285 * SERVER SERVICE (SRVSVC)
286 ****************************************************************
287 */
288
289
290#define SRVSVC_OPNUM_NetConnectEnum          0x08
291#define SRVSVC_OPNUM_NetFileEnum             0x09
292#define SRVSVC_OPNUM_NetFileClose            0x0b
293#define SRVSVC_OPNUM_NetSessionEnum          0x0c
294#define SRVSVC_OPNUM_NetSessionDel           0x0d
295#define SRVSVC_OPNUM_NetShareAdd             0x0e
296#define SRVSVC_OPNUM_NetShareEnum            0x0f
297#define SRVSVC_OPNUM_NetShareGetInfo         0x10
298#define SRVSVC_OPNUM_NetShareSetInfo         0x11
299#define SRVSVC_OPNUM_NetShareDel             0x12
300#define SRVSVC_OPNUM_NetServerGetInfo        0x15
301#define SRVSVC_OPNUM_NetServerSetInfo        0x16
302#define SRVSVC_OPNUM_NetRemoteTOD            0x1c
303#define SRVSVC_OPNUM_NetNameValidate         0x21
304#define SRVSVC_OPNUM_NetShareEnumSticky      0x24
305#define SRVSVC_OPNUM_NetGetFileSecurity      0x27
306#define SRVSVC_OPNUM_NetSetFileSecurity      0x28
307
308/*
309 ***********************************************************************
310 * NetConnectEnum:
311 *
312 * Description:
313 *
314 * Request for mslm_NetConnectEnum  returns
315 * info of resources in MLRPC server connected
316 * to network. Correctly level 0 and level 1 information
317 * are supported.
318 *
319 ***********************************************************************
320 */
321
322/*
323 * Level 0 connect information.
324 */
325struct mslm_NetConnectInfoBuf0 {
326        DWORD coni0_id;
327};
328
329struct mslm_NetConnectInfo0 {
330	DWORD entries_read;
331 SIZE_IS(entries_read)
332        struct mslm_NetConnectInfoBuf0 *ci0;
333};
334
335/*
336 * Level 1 connect information.
337 */
338struct mslm_NetConnectInfoBuf1 {
339	DWORD coni1_id;
340	DWORD coni1_type;
341	DWORD coni1_num_opens;
342	DWORD coni1_num_users;
343	DWORD coni1_time;
344	LPTSTR coni1_username;
345	LPTSTR coni1_netname; /* share name */
346};
347
348struct mslm_NetConnectInfo1 {
349	DWORD entries_read;
350  SIZE_IS(entries_read)
351	struct mslm_NetConnectInfoBuf1 *ci1;
352};
353
354union mslm_NetConnectInfoResUnion {
355	CASE(0) struct mslm_NetConnectInfo0 *info0;
356	CASE(1) struct mslm_NetConnectInfo1 *info1;
357	DEFAULT	char *nullptr;
358};
359
360struct mslm_NetConnectInfo {
361	DWORD level;
362	DWORD switch_value;
363  SWITCH(switch_value)
364	union mslm_NetConnectInfoResUnion ru;
365};
366
367OPERATION(SRVSVC_OPNUM_NetConnectEnum)
368struct mslm_NetConnectEnum {
369	IN	LPTSTR servername;
370	IN	LPTSTR qualifier; /* share name */
371	INOUT	struct mslm_NetConnectInfo info;
372	IN	DWORD pref_max_len;
373	OUT 	DWORD total_entries;
374	INOUT	DWORD *resume_handle;
375	OUT	DWORD status;
376};
377
378
379/*
380 ***********************************************************************
381 * NetFileEnum: under construction.
382 ***********************************************************************
383 */
384struct mslm_NetFileInfoBuf3 {
385	DWORD fi3_id;
386	DWORD fi3_permissions;
387	DWORD fi3_num_locks;
388	LPTSTR fi3_pathname;
389	LPTSTR fi3_username;
390};
391
392
393struct mslm_NetFileInfo3 {
394	DWORD entries_read;
395  SIZE_IS(entries_read)
396	struct mslm_NetFileInfoBuf3 *fi3;
397};
398
399
400union mslm_NetFileInfoResUnion {
401	CASE(3)	struct mslm_NetFileInfo3 *info3;
402	DEFAULT	char *nullptr;
403};
404
405
406struct mslm_NetFileInfo {
407	DWORD level;
408	DWORD switch_value;
409  SWITCH(switch_value)
410	union mslm_NetFileInfoResUnion ru;
411};
412
413
414OPERATION(SRVSVC_OPNUM_NetFileEnum)
415struct mslm_NetFileEnum {
416	IN	LPTSTR servername;
417	IN	DWORD unknown1;
418	IN	DWORD unknown2;
419	INOUT	struct mslm_NetFileInfo info;
420	IN	DWORD pref_max_len;
421	OUT	DWORD total_entries;
422	INOUT	DWORD *resume_handle;
423	OUT	DWORD status;
424};
425
426
427/*
428 ***********************************************************************
429 * NetFileClose
430 *
431 * I think this definition is complete but as it doesn't do anything
432 * it probably isn't a big issue. It is used to close files reported
433 * via NetFileEnum (i.e. the file id).
434 ***********************************************************************
435 */
436OPERATION(SRVSVC_OPNUM_NetFileClose)
437struct mslm_NetFileClose {
438	IN	LPTSTR servername;
439	IN	DWORD file_id;
440	OUT	DWORD status;
441};
442
443
444/*
445 ***********************************************************************
446 * NetShareGetInfo: netname is the name of a share.
447 ***********************************************************************
448 */
449struct mslm_NetShareGetInfo0 {
450	LPTSTR shi0_netname;
451};
452
453
454struct mslm_NetShareGetInfo1 {
455	LPTSTR shi1_netname;
456	DWORD shi1_type; /* type of resource such as IPC$ */
457	LPTSTR shi1_comment;
458};
459
460
461struct mslm_NetShareGetInfo2 {
462	LPTSTR shi2_netname;
463	DWORD shi2_type;
464	LPTSTR shi2_comment;
465	DWORD shi2_permissions;
466	DWORD shi2_max_uses;
467	DWORD shi2_current_uses;
468	LPTSTR shi2_path;
469	LPTSTR shi2_passwd;
470};
471
472struct mslm_NetShareGetInfo502 {
473	LPTSTR shi502_netname;
474	DWORD shi502_type;
475	LPTSTR shi502_comment;
476	DWORD shi502_permissions;
477	DWORD shi502_max_uses;
478	DWORD shi502_current_uses;
479	LPTSTR shi502_path;
480	LPTSTR shi502_passwd;
481	DWORD shi502_reserved;
482	DWORD shi502_security_descriptor;
483};
484
485struct mslm_NetShareGetInfo1005 {
486	DWORD shi1005_flags;
487};
488
489union mlsm_NetShareGetInfoResUnion {
490	CASE(0)		struct mslm_NetShareGetInfo0 *info0;
491	CASE(1)		struct mslm_NetShareGetInfo1 *info1;
492	CASE(2)		struct mslm_NetShareGetInfo2 *info2;
493	CASE(502)	struct mslm_NetShareGetInfo502 *info502;
494	CASE(1005)	struct mslm_NetShareGetInfo1005 *info1005;
495	DEFAULT	char *nullptr;
496};
497
498
499struct mlsm_NetShareGetInfoRes {
500	DWORD switch_value;
501  SWITCH(switch_value)
502	union mlsm_NetShareGetInfoResUnion ru;
503};
504
505
506OPERATION(SRVSVC_OPNUM_NetShareGetInfo)
507struct mlsm_NetShareGetInfo {
508	IN	LPTSTR servername;
509	IN REFERENCE	LPTSTR netname;
510	IN	DWORD level;
511	OUT	struct mlsm_NetShareGetInfoRes result;
512	OUT	DWORD status;
513};
514
515
516/*
517 ***********************************************************************
518 * NetShareSetInfo: netname is the name of a share.
519 ***********************************************************************
520 */
521OPERATION(SRVSVC_OPNUM_NetShareSetInfo)
522struct mlsm_NetShareSetInfo {
523	IN	LPTSTR servername;
524	IN REFERENCE	LPTSTR netname;
525	IN	DWORD level;
526/*
527 * This should accept all the same levels as NetShareGetInfo
528 * but we always return ACCESS_DENIED for now. So there's no
529 * point in unmarshalling the share information.
530 *
531 *	IN	struct mlsm_NetShareGetInfoRes result;
532 */
533	OUT	DWORD parm_err_ptr;
534	OUT	DWORD parm_err;
535	OUT	DWORD status;
536};
537
538
539/*
540 ***********************************************************************
541 * NetSessionEnum
542 *
543 * The NetSessionEnum function provides information about sessions
544 * established on a server.
545 *
546 * Only members of the Administrators or Account Operators local groups
547 * can successfully execute the NetSessionEnum function at level 1 or
548 * level 2. No special group membership is required for level 0 or level
549 * 10 calls.
550 *
551 * Windows NT/2000/XP: The parameter order is as follows.
552 *
553 * NET_API_STATUS NetSessionEnum(LPWSTR servername,
554 *                               LPWSTR UncClientName,
555 *                               LPWSTR username,
556 *                               DWORD level,
557 *                               LPBYTE *bufptr,
558 *                               DWORD prefmaxlen,
559 *                               LPDWORD entriesread,
560 *                               LPDWORD totalentries,
561 *                               LPDWORD resume_handle);
562 *
563 * Windows 95/98/Me: The calling application must use the cbBuffer parameter
564 * to specify the size, in bytes, of the information buffer pointed to by the
565 * pbBuffer parameter. (The cbBuffer parameter replaces the prefmaxlen
566 * parameter.) Neither a user name parameter nor a resume handle parameter is
567 * available on this platform. Therefore, the parameter list is as follows.
568 *
569 * API_FUNCTION NetSessionEnum(const char FAR *pszServer,
570 *                             short sLevel,
571 *                             char FAR *pbBuffer,
572 *                             unsigned short cbBuffer,
573 *                             unsigned short FAR *pcEntriesRead,
574 *                             unsigned short FAR *pcTotalAvail);
575 *
576 * Parameters
577 *
578 * servername
579 * [in] Pointer to a string that specifies the DNS or NetBIOS name of the
580 * remote server on which the function is to execute. If this parameter is
581 * NULL, the local computer is used.
582 * Windows NT 4.0 and earlier: This string must begin with \\.
583 *
584 * UncClientName
585 * [in] Pointer to a string that specifies the name of the computer session
586 * for which information is to be returned. If this parameter is NULL,
587 * NetSessionEnum returns information for all computer sessions on the server.
588 *
589 * username
590 * [in] Pointer to a string that specifies the name of the user for which
591 * information is to be returned. If this parameter is NULL, NetSessionEnum
592 * returns information for all users.
593 *
594 * level
595 * [in] Specifies the information level of the data. This parameter can be
596 * one of the following values.
597 * Windows NT/2000/XP: The following levels are valid.
598 * Value    Meaning
599 * 0        Return the name of the computer that established the session.
600 *          The bufptr parameter points to an array of SESSION_INFO_0
601 *          structures.
602 * 1        Return the name of the computer, name of the user, and open files,
603 *          pipes, and devices on the computer. The bufptr parameter points to
604 *          an array of SESSION_INFO_1 structures.
605 * 2        In addition to the information indicated for level 1, return the
606 *          type of client and how the user established the session. The bufptr
607 *          parameter points to an array of SESSION_INFO_2 structures.
608 * 10       Return the name of the computer, name of the user, and active and
609 *          idle times for the session. The bufptr parameter points to an array
610 *          of SESSION_INFO_10 structures.
611 * 502      Return the name of the computer; name of the user; open files,
612 *          pipes, and devices on the computer; and the name of the transport
613 *          the  client is using. The bufptr parameter points to an array of
614 *          SESSION_INFO_502 structures.
615 *
616 * Windows 95/98/Me: The following level is valid.
617 * Value    Meaning
618 * 50       Return the name of the computer, name of the user, open files on
619 *          the computer, and the name of the transport protocol the client is
620 *          using. The pbBuffer parameter points to an array of session_info_50
621 *          structures.
622 *
623 * bufptr
624 * [out] Pointer to the buffer that receives the data. The format of this
625 * data depends on the value of the level parameter.
626 * Windows NT/2000/XP: This buffer is allocated by the system and must be
627 * freed using the NetApiBufferFree function. Note that you must free the
628 * buffer even if the function fails with ERROR_MORE_DATA.
629 * Windows 95/98/Me: The caller must allocate and deallocate this buffer.
630 *
631 * prefmaxlen
632 * [in] Specifies the preferred maximum length of returned data, in bytes.
633 * If you specify MAX_PREFERRED_LENGTH, the function allocates the amount
634 * of memory required for the data. If you specify another value in this
635 * parameter, it can restrict the number of bytes that the function returns.
636 * If the buffer size is insufficient to hold all entries, the function
637 * returns ERROR_MORE_DATA. For more information, see Network Management
638 * Function Buffers and Network Management Function Buffer Lengths.
639 *
640 * entriesread
641 * [out] Pointer to a value that receives the count of elements actually
642 * enumerated.
643 *
644 * totalentries
645 * [out] Pointer to a value that receives the total number of entries that
646 * could have been enumerated from the current resume position.
647 *
648 * resume_handle
649 * [in/out] Pointer to a value that contains a resume handle which is used
650 * to continue an existing session search. The handle should be zero on the
651 * first call and left unchanged for subsequent calls. If resume_handle is
652 * NULL, no resume handle is stored.
653 *
654 *
655 * SESSION_INFO_1
656 * ==============
657 * The SESSION_INFO_1 structure contains information about the session,
658 * including name of the computer; name of the user; and open files, pipes,
659 * and devices on the computer.
660 *
661 * Members
662 *
663 * sesi1_cname
664 * Pointer to a Unicode string specifying the name of the computer that
665 * established the session.
666 *
667 * sesi1_username
668 * Pointer to a Unicode string specifying the name of the user who established
669 * the session.
670 *
671 * sesi1_num_opens
672 * Specifies a DWORD value that contains the number of files, devices,
673 * and pipes opened during the session.
674 *
675 * sesi1_time
676 * Specifies a DWORD value that contains the number of seconds the session
677 * has been active.
678 *
679 * sesi1_idle_time
680 * Specifies a DWORD value that contains the number of seconds the session
681 * has been idle.
682 *
683 * sesi1_user_flags
684 * Specifies a DWORD value that describes how the user established the
685 * session. This member can be one of the following values:
686 * SESS_GUEST           The user specified by the sesi1_username member
687 *                      established the session using a guest account.
688 * SESS_NOENCRYPTION    The user specified by the sesi1_username member
689 *                      established the session without using password
690 *                      encryption.
691 ***********************************************************************
692 */
693
694#define SESS_GUEST          0x00000001
695#define SESS_NOENCRYPTION   0x00000002
696
697struct mslm_SESSION_INFO_0 {
698	LPTSTR sesi0_cname;
699};
700INFONRES_RESULT(mslm_SESSION_INFO, 0)
701
702struct mslm_SESSION_INFO_1 {
703	LPTSTR sesi1_cname;
704	LPTSTR sesi1_uname;
705	DWORD  sesi1_nopens;
706	DWORD  sesi1_time;
707	DWORD  sesi1_itime;
708	DWORD  sesi1_uflags;
709};
710INFONRES_RESULT(mslm_SESSION_INFO, 1)
711
712INFONRES_DEFINITION(mslm_NetSessionEnum,
713	INFONRES_UNION_ENTRY(mslm_SESSION_INFO, 0)
714	INFONRES_UNION_ENTRY(mslm_SESSION_INFO, 1))
715
716OPERATION(SRVSVC_OPNUM_NetSessionEnum)
717struct mslm_NetSessionEnum {
718	IN		LPTSTR servername;
719	IN		DWORD unc_clientname;
720	IN		DWORD username;
721	INOUT	DWORD level;
722	INOUT	struct mslm_NetSessionEnum_result result;
723	IN		DWORD pref_max_len;
724	OUT		DWORD total_entries;
725	INOUT	DWORD *resume_handle;
726	OUT		DWORD status;
727};
728
729
730/*
731 ***********************************************************************
732 * NetSessionDel (Platform SDK: Network Management)
733 *
734 * The NetSessionDel function ends a network session between a server
735 * and a workstation.
736 *
737 * Security Requirements
738 * Only members of the Administrators or Account Operators local group
739 * can successfully execute the NetSessionDel function.
740 *
741 * Windows NT/2000/XP: The parameter order is as follows.
742 *
743 * NET_API_STATUS NetSessionDel(LPWSTR servername,
744 *                              LPWSTR UncClientName,
745 *                              LPWSTR username);
746 *
747 * Windows 95/98/Me: The sReserved parameter replaces the username
748 * parameter. For more information, see the following Remarks section.
749 * The parameter list is as follows.
750 *
751 * API_FUNCTION NetSessionDel(const char FAR *pszServer,
752 *                            const char FAR *pszClientName,
753 *                            short  sReserved);
754 *
755 * Parameters
756 *
757 * servername
758 * [in] Pointer to a string that specifies the DNS or NetBIOS name
759 * of the remote server on which the function is to execute. If this
760 * parameter is NULL, the local computer is used.
761 * Windows NT 4.0 and earlier: This string must begin with \\.
762 *
763 * UncClientName
764 * [in] Pointer to a string that specifies the computer name of the
765 * client to disconnect. If UncClientName is NULL, then all the sessions
766 * of the user identified by the username parameter will be deleted on
767 * the server specified by servername. For more information, see
768 * NetSessionEnum.
769 *
770 * username
771 * [in] Pointer to a string that specifies the name of the user whose
772 * session is to be terminated. If this parameter is NULL, all users'
773 * sessions from the client specified by the UncClientName parameter
774 * are to be terminated.
775 *
776 * Remarks
777 * Windows 95/98/Me: You must specify the session key in the sReserved
778 * parameter when you call NetSessionDel. The session key is returned by
779 * the NetSessionEnum function or the NetSessionGetInfo function in the
780 * sesi50_key member of the session_info_50 structure.
781 ***********************************************************************
782 */
783
784OPERATION(SRVSVC_OPNUM_NetSessionDel)
785struct mslm_NetSessionDel {
786	IN	LPTSTR servername;
787	IN	LPTSTR unc_clientname;
788	IN	LPTSTR username;
789	OUT	DWORD status;
790};
791
792
793/*
794 * SRVSVC NetServerGetInfo (
795 *	IN LPTSTR	servername,
796 *	IN DWORD	level,
797 *	OUT union switch(level) {
798 *		case 100: _SERVER_INFO_100 *	p100;
799 *		case 101: _SERVER_INFO_101 *	p101;
800 *		case 102: _SERVER_INFO_102 *	p102;
801 *	    }		bufptr,
802 *	OUT DWORD	status
803 *      )
804 */
805
806/* for svX_platform */
807#define SV_PLATFORM_ID_OS2 400
808#define SV_PLATFORM_ID_NT  500
809
810/* Bit-mapped values for svX_type fields */
811#define SV_TYPE_WORKSTATION         0x00000001
812#define SV_TYPE_SERVER              0x00000002
813#define SV_TYPE_SQLSERVER           0x00000004
814#define SV_TYPE_DOMAIN_CTRL         0x00000008
815#define SV_TYPE_DOMAIN_BAKCTRL      0x00000010
816#define SV_TYPE_TIME_SOURCE         0x00000020
817#define SV_TYPE_AFP                 0x00000040
818#define SV_TYPE_NOVELL              0x00000080
819#define SV_TYPE_DOMAIN_MEMBER       0x00000100
820#define SV_TYPE_PRINTQ_SERVER       0x00000200
821#define SV_TYPE_DIALIN_SERVER       0x00000400
822#define SV_TYPE_XENIX_SERVER        0x00000800
823#define SV_TYPE_SERVER_UNIX         SV_TYPE_XENIX_SERVER
824#define SV_TYPE_NT                  0x00001000
825#define SV_TYPE_WFW                 0x00002000
826
827#define SV_TYPE_SERVER_MFPN         0x00004000
828#define SV_TYPE_SERVER_NT           0x00008000
829#define SV_TYPE_POTENTIAL_BROWSER   0x00010000
830#define SV_TYPE_BACKUP_BROWSER      0x00020000
831#define SV_TYPE_MASTER_BROWSER      0x00040000
832#define SV_TYPE_DOMAIN_MASTER       0x00080000
833#define SV_TYPE_SERVER_OSF          0x00100000
834#define SV_TYPE_SERVER_VMS          0x00200000
835#define SV_TYPE_WINDOWS             0x00400000  /* Windows95 and above */
836#define SV_TYPE_ALTERNATE_XPORT     0x20000000  /* return list for
837						 * alternate transport */
838#define SV_TYPE_LOCAL_LIST_ONLY     0x40000000  /* Return local list only */
839#define SV_TYPE_DOMAIN_ENUM         0x80000000
840#define SV_TYPE_ALL                 0xFFFFFFFF  /* handy for NetServerEnum2 */
841
842/* NT-Server 4.0 sends 0x0006_120B */
843#define SV_TYPE_SENT_BY_NT_4_0_SERVER \
844	(  SV_TYPE_WORKSTATION \
845	 | SV_TYPE_SERVER \
846	 | SV_TYPE_DOMAIN_CTRL \
847	 | SV_TYPE_NT \
848	 | SV_TYPE_BACKUP_BROWSER \
849	 | SV_TYPE_MASTER_BROWSER)
850/* NT-workstation 4.0 send 0x0004_1013 */
851#define SV_TYPE_SENT_BY_NT_4_0_WORKSTATION \
852	(  SV_TYPE_WORKSTATION \
853	 | SV_TYPE_SERVER \
854	 | SV_TYPE_DOMAIN_BAKCTRL \
855	 | SV_TYPE_NT \
856	 | SV_TYPE_MASTER_BROWSER)
857
858/* Special value for sv102_disc that specifies infinite disconnect time */
859#define SV_NODISC           (-1L)  /* No autodisconnect timeout enforced */
860
861/* Values of svX_security field */
862#define SV_USERSECURITY     1
863#define SV_SHARESECURITY    0
864
865/* Values of svX_hidden field */
866#define SV_HIDDEN       1
867#define SV_VISIBLE      0
868
869
870/* Let's get some info already */
871struct mslm_SERVER_INFO_100 {
872	DWORD		sv100_platform_id;
873	LPTSTR		sv100_name;
874};
875
876struct mslm_SERVER_INFO_101 {
877	DWORD		sv101_platform_id;
878	LPTSTR		sv101_name;
879	DWORD		sv101_version_major;
880	DWORD		sv101_version_minor;
881	DWORD		sv101_type;
882	LPTSTR		sv101_comment;
883};
884
885struct mslm_SERVER_INFO_102 {
886	DWORD		sv102_platform_id;
887	LPTSTR		sv102_name;
888	DWORD		sv102_version_major;
889	DWORD		sv102_version_minor;
890	DWORD		sv102_type;
891	LPTSTR		sv102_comment;
892	DWORD		sv102_users;
893	DWORD		sv102_disc;
894	DWORD		sv102_hidden;		/* BOOL */
895	DWORD		sv102_announce;
896	DWORD		sv102_anndelta;
897	DWORD		sv102_licenses;
898	LPTSTR		sv102_userpath;
899};
900
901union mslm_NetServerGetInfo_ru {
902	CASE(100)	struct mslm_SERVER_INFO_100 *bufptr100;
903	CASE(101)	struct mslm_SERVER_INFO_101 *bufptr101;
904	CASE(102)	struct mslm_SERVER_INFO_102 *bufptr102;
905	DEFAULT		char *nullptr;
906};
907
908struct mslm_NetServerGetInfo_result {
909	DWORD level;
910  SWITCH(level)
911	union mslm_NetServerGetInfo_ru bufptr;
912};
913
914
915OPERATION(SRVSVC_OPNUM_NetServerGetInfo)
916struct mslm_NetServerGetInfo {
917	IN  LPTSTR	servername;
918	IN  DWORD	level;
919	OUT struct mslm_NetServerGetInfo_result result;
920	OUT DWORD	status;
921};
922
923/*
924 * SRVSVC NetRemoteTOD (
925 *	IN LPTSTR	servername,
926 *	OUT _TIME_OF_DAY_INFO *bufptr,
927 *	OUT long	status
928 *      )
929 */
930
931struct mslm_TIME_OF_DAY_INFO {
932	DWORD		tod_elapsedt;
933	DWORD		tod_msecs;
934	DWORD		tod_hours;
935	DWORD		tod_mins;
936	DWORD		tod_secs;
937	DWORD		tod_hunds;
938	DWORD		tod_timezone;
939	DWORD		tod_tinterval;
940	DWORD		tod_day;
941	DWORD		tod_month;
942	DWORD		tod_year;
943	DWORD		tod_weekday;
944};
945
946OPERATION(SRVSVC_OPNUM_NetRemoteTOD)
947struct mslm_NetRemoteTOD {
948	IN  LPTSTR	servername;
949	OUT struct mslm_TIME_OF_DAY_INFO *bufptr;
950	OUT DWORD	status;
951};
952
953/*
954 * SRVSVC_NetNameValidate (
955 *	IN  LPTSTR		servername;
956 *	IN  REFERENCE LPTSTR 	pathname;
957 * 	IN  DWORD		type;
958 * 	IN  DWORD		flags;
959 *	OUT DWORD		status;
960 *	)
961 */
962OPERATION(SRVSVC_OPNUM_NetNameValidate)
963struct mslm_NetNameValidate {
964 	IN  LPTSTR		servername;
965 	IN  REFERENCE LPTSTR 	pathname;
966	IN  DWORD		type;
967	IN  DWORD		flags;
968	OUT DWORD		status;
969};
970
971/*
972 * SRVSVC NetShareEnum (
973 *	IN  LPTSTR	servername,
974 *	IN  DWORD	level;
975 *	OUT union switch(level) {
976 *		case 0: struct {
977 *				DWORD entriesread;
978 *			     [size_is(entriesread)]
979 *				_SHARE_INFO_0 *entries;
980 *			} *bufptr0;
981 *		case 1: struct {
982 *				DWORD entriesread;
983 *			     [size_is(entriesread)]
984 *				_SHARE_INFO_1 *entries;
985 *			} *bufptr1;
986 *		...
987 *	    }		bufptr,
988 *	IN  DWORD	prefmaxlen,
989 *	OUT DWORD	totalentries,
990 *	IN OUT DWORD ?*	resume_handle,
991 *	OUT DWORD	status
992 *      )
993 */
994
995/*
996 * Share types for shiX_type fields - duplicated from cifs.h
997 */
998#ifndef _SHARE_TYPES_DEFINED_
999#define _SHARE_TYPES_DEFINED_
1000#define STYPE_DISKTREE          0x00000000
1001#define STYPE_PRINTQ            0x00000001
1002#define STYPE_DEVICE            0x00000002
1003#define STYPE_IPC               0x00000003
1004#define STYPE_MASK              0x0000000F
1005#define STYPE_DFS               0x00000064
1006#define STYPE_HIDDEN            0x80000000
1007#define STYPE_SPECIAL           0x80000000
1008#endif /* _SHARE_TYPES_DEFINED_ */
1009
1010/* Maximum uses for shiX_max_uses fields */
1011#define SHI_USES_UNLIMITED      (DWORD)-1
1012
1013
1014
1015struct mslm_SHARE_INFO_0 {
1016	LPTSTR		shi0_netname;
1017};
1018INFONRES_RESULT(mslm_SHARE_INFO,0)
1019
1020struct mslm_SHARE_INFO_1 {
1021	LPTSTR		shi1_netname;
1022	DWORD		shi1_type;
1023	LPTSTR		shi1_remark;
1024};
1025INFONRES_RESULT(mslm_SHARE_INFO,1)
1026
1027struct mslm_SHARE_INFO_2 {
1028	LPTSTR		shi2_netname;
1029	DWORD		shi2_type;
1030	LPTSTR		shi2_remark;
1031	DWORD		shi2_permissions;
1032	DWORD		shi2_max_uses;
1033	DWORD		shi2_current_uses;
1034	LPTSTR		shi2_path;
1035	LPTSTR		shi2_passwd;
1036};
1037INFONRES_RESULT(mslm_SHARE_INFO,2)
1038
1039/*
1040 * Note: shi502_security_descriptor should be a pointer to a
1041 * security descriptor (W32SEC_SECURITY_DESCRIPTOR):
1042 *	PSECURITY_DESCRIPTOR shi502_security_descriptor;
1043 *
1044 * For now we can just use a DWORD and set it to zero.
1045 */
1046struct mslm_SHARE_INFO_502 {
1047	LPTSTR		shi502_netname;
1048	DWORD		shi502_type;
1049	LPTSTR		shi502_remark;
1050	DWORD		shi502_permissions;
1051	DWORD		shi502_max_uses;
1052	DWORD		shi502_current_uses;
1053	LPTSTR		shi502_path;
1054	LPTSTR		shi502_passwd;
1055	DWORD		shi502_reserved;
1056	DWORD		shi502_security_descriptor;
1057};
1058INFONRES_RESULT(mslm_SHARE_INFO,502)
1059
1060union mslm_NetShareAddInfo_u {
1061	CASE(2)     struct mslm_SHARE_INFO_2 *info2;
1062	CASE(502)   struct mslm_SHARE_INFO_502 *info502;
1063};
1064
1065struct mslm_NetShareAddInfo {
1066	DWORD switch_value;
1067  SWITCH(switch_value)
1068	union mslm_NetShareAddInfo_u un;
1069};
1070
1071
1072OPERATION(SRVSVC_OPNUM_NetShareAdd)
1073struct mslm_NetShareAdd {
1074	IN	LPTSTR servername;
1075	IN	DWORD level;
1076	IN	struct mslm_NetShareAddInfo info;
1077	INOUT	DWORD *parm_err;
1078	OUT	DWORD status;
1079};
1080
1081
1082INFONRES_DEFINITION(mslm_NetShareEnum,
1083	INFONRES_UNION_ENTRY(mslm_SHARE_INFO,0)
1084	INFONRES_UNION_ENTRY(mslm_SHARE_INFO,1)
1085	INFONRES_UNION_ENTRY(mslm_SHARE_INFO,2)
1086	INFONRES_UNION_ENTRY(mslm_SHARE_INFO,502))
1087
1088
1089OPERATION(SRVSVC_OPNUM_NetShareEnum)
1090struct mslm_NetShareEnum {
1091	IN  		LPTSTR	servername;
1092	INOUT  		DWORD	level;
1093	OUT 		struct mslm_NetShareEnum_result result;
1094	IN  		DWORD	prefmaxlen;
1095	OUT 		DWORD	totalentries;
1096	INOUT 		DWORD *	resume_handle;		/* not sure about ptr */
1097	OUT 		DWORD	status;
1098};
1099
1100
1101/*
1102 * Delete a share. The reserved field appears in netmon
1103 * but I've left it out in case it's not always present.
1104 * This won't affect RPC processing.
1105 */
1106OPERATION(SRVSVC_OPNUM_NetShareDel)
1107struct mslm_NetShareDel {
1108	IN	LPTSTR servername;
1109	IN REFERENCE	LPTSTR netname;
1110	/* IN	DWORD reserved; */
1111	OUT	DWORD status;
1112};
1113
1114
1115/*
1116 * NetShareEnumSticky is the same as NetShareEnum except that hidden
1117 * shares are not returned. This call was apparently added due to a
1118 * bug in the NT implementation of NetShareEnum - it didn't process
1119 * the resume handle correctly so that attempts to enumerate large
1120 * share lists resulted in an infinite loop.
1121 */
1122OPERATION(SRVSVC_OPNUM_NetShareEnumSticky)
1123struct mslm_NetShareEnumSticky {
1124	IN  		LPTSTR	servername;
1125	INOUT  		DWORD	level;
1126	OUT 		struct mslm_NetShareEnum_result result;
1127	IN  		DWORD	prefmaxlen;
1128	OUT 		DWORD	totalentries;
1129	INOUT 		DWORD *	resume_handle;		/* not sure about ptr */
1130	OUT 		DWORD	status;
1131};
1132
1133/*
1134 * When you install Windows NT Server Tools on a Win95 client,
1135 * a security tab will be added to properties dialog box of files/folders.
1136 * Within this security tab, when you try to get/set permissions on a
1137 * file/folder the next two RPC calls are used.
1138 */
1139OPERATION(SRVSVC_OPNUM_NetGetFileSecurity)
1140struct mslm_NetGetFileSecurity {
1141	IN  		LPTSTR	servername;
1142	IN			LPTSTR	sharename;
1143	IN REFERENCE LPTSTR	filename;
1144	IN			DWORD	securityinfo;
1145
1146	/*
1147	 * Right now, we can't send back SD of the requested object
1148	 * in MLRPC code, so we just reply with access denied error
1149	 * code. Thus, this output declaration is only valid in this
1150	 * case i.e., it's not complete.
1151	 * It looks like:
1152	 *
1153	 *   A Pointer
1154	 *   A Length
1155	 *
1156	 *   A Pointer
1157	 *   A Length (equal to the prev length)
1158	 *   A buffer
1159	 *
1160	 *   return value
1161	 */
1162	OUT			DWORD	length;
1163	OUT 		DWORD	status;
1164};
1165
1166/*
1167 * This is the request:
1168 *
1169 * R_SRVSVC: RPC Client call srvsvc:NetrpSetFileSecurity(..)
1170 *	 R_SRVSVC: SRVSVC_HANDLE ServerName = \\WK76-177
1171 *	 R_SRVSVC: LPWSTR ShareName = AFSHIN
1172 *	 R_SRVSVC: LPWSTR lpFileName = \salek.txt
1173 *	 R_SRVSVC: SECURITY_INFORMATION SecurityInformation = 4 (0x4)
1174 *  -R_SRVSVC: PADT_SECURITY_DESCRIPTOR SecurityDescriptor {..}
1175 *  R_SRVSVC: DWORD Length = 64 (0x40)
1176 *  R_SRVSVC: LPBYTE Buffer = 4496048 (0x449AB0)
1177 *  R_SRVSVC: LPBYTE Buffer [..] = 01 00 04 80 00 00 00 00 00 00 00 00 00 00 00
1178 *  ...
1179 *
1180 *  000000A0        00 83 46 00 0B 00 00 00 00 00 00 00 0B 00   ..F...........
1181 *  000000B0  00 00 5C 00 5C 00 57 00 4B 00 37 00 36 00 2D 00 ..\.\.W.K.7.6.-.
1182 *  000000C0  31 00 37 00 37 00 00 00 08 00 16 83 46 00 07 00 1.7.7.......F...
1183 *  000000D0  00 00 00 00 00 00 07 00 00 00 41 00 46 00 53 00 ..........A.F.S.
1184 *  000000E0  48 00 49 00 4E 00 00 00 00 00 0B 00 00 00 00 00 H.I.N...........
1185 *  000000F0  00 00 0B 00 00 00 5C 00 73 00 61 00 6C 00 65 00 ......\.s.a.l.e.
1186 *  00000100  6B 00 2E 00 74 00 78 00 74 00 00 00 00 00 04 00 k...t.x.t.......
1187 *  00000110  00 00 40 00 00 00 B0 9A 44 00 40 00 00 00 01 00 ..@.....D.@.....
1188 *  00000120  04 80 00 00 00 00 00 00 00 00 00 00 00 00 14 00 ................
1189 *  00000130  00 00 02 00 2C 00 01 00 00 00 00 00 24 00 00 00 ....,.......$...
1190 *  00000140  00 A0 01 05 00 00 00 00 00 05 15 00 00 00 1A 24 ...............$
1191 *  00000150  44 38 90 00 0F 02 65 3A BE 4C FF 03 00 00 00 00 D8....e:.L......
1192 *  00000160  00 00 00 00 00 00 00 00 00 00                   ..........
1193 */
1194OPERATION(SRVSVC_OPNUM_NetSetFileSecurity)
1195struct mslm_NetSetFileSecurity {
1196	IN  		LPTSTR	servername;
1197	IN			LPTSTR	sharename;
1198	IN REFERENCE LPTSTR	filename;
1199	IN			DWORD	securityinfo;
1200	/*
1201	 * IN Security Descriptor (looks like):
1202	 * Length1
1203	 * Pointer
1204	 * Length2 (== Length1)
1205	 * buffer itself
1206	 */
1207
1208	OUT 		DWORD	status;
1209};
1210
1211/*
1212 * The SRVSVC already
1213 */
1214INTERFACE(0)
1215union srvsvc_interface {
1216    CASE(SRVSVC_OPNUM_NetConnectEnum)
1217	struct mslm_NetConnectEnum	NetConnectEnum;
1218    CASE(SRVSVC_OPNUM_NetFileEnum)
1219	struct mslm_NetFileEnum		NetFileEnum;
1220    CASE(SRVSVC_OPNUM_NetFileClose)
1221	struct mslm_NetFileClose	NetFileClose;
1222    CASE(SRVSVC_OPNUM_NetShareGetInfo)
1223	struct mlsm_NetShareGetInfo	NetShareGetInfo;
1224    CASE(SRVSVC_OPNUM_NetShareSetInfo)
1225	struct mlsm_NetShareGetInfo	NetShareSetInfo;
1226    CASE(SRVSVC_OPNUM_NetSessionDel)
1227	struct mslm_NetSessionDel	NetSessionDel;
1228    CASE(SRVSVC_OPNUM_NetSessionEnum)
1229	struct mslm_NetSessionEnum	NetSessionEnum;
1230    CASE(SRVSVC_OPNUM_NetServerGetInfo)
1231	struct mslm_NetServerGetInfo	NetServerGetInfo;
1232    CASE(SRVSVC_OPNUM_NetRemoteTOD)
1233	struct mslm_NetRemoteTOD	NetRemoteTOD;
1234    CASE(SRVSVC_OPNUM_NetNameValidate)
1235	struct mslm_NetNameValidate	NetNameValidate;
1236    CASE(SRVSVC_OPNUM_NetShareAdd)
1237	struct mslm_NetShareAdd		NetShareAdd;
1238    CASE(SRVSVC_OPNUM_NetShareDel)
1239	struct mslm_NetShareDel		NetShareDel;
1240    CASE(SRVSVC_OPNUM_NetShareEnum)
1241	struct mslm_NetShareEnum	NetShareEnum;
1242    CASE(SRVSVC_OPNUM_NetShareEnumSticky)
1243	struct mslm_NetShareEnumSticky	NetShareEnumSticky;
1244    CASE(SRVSVC_OPNUM_NetGetFileSecurity)
1245	struct mslm_NetGetFileSecurity	NetGetFileSecurity;
1246    CASE(SRVSVC_OPNUM_NetSetFileSecurity)
1247	struct mslm_NetSetFileSecurity	NetSetFileSecurity;
1248};
1249typedef union srvsvc_interface	srvsvc_interface_t;
1250EXTERNTYPEINFO(srvsvc_interface)
1251
1252
1253
1254/*
1255 * WKSSVC -- Workstation Service
1256 ****************************************************************
1257 */
1258
1259#define WKSSVC_OPNUM_NetWkstaGetInfo	0x00
1260
1261
1262/*
1263 * NET_API_STATUS NET_API_FUNCTION
1264 * NetWkstaGetInfo (
1265 *     IN  LPTSTR  servername OPTIONAL,
1266 *     IN  DWORD   level,
1267 *     OUT LPBYTE  *bufptr
1268 *     );
1269 */
1270
1271struct mslm_WKSTA_INFO_100 {
1272    DWORD   wki100_platform_id;
1273    LPTSTR  wki100_computername;
1274    LPTSTR  wki100_langroup;
1275    DWORD   wki100_ver_major;
1276    DWORD   wki100_ver_minor;
1277};
1278
1279/* NetWkstaGetInfo only.  System information - user access */
1280struct mslm_WKSTA_INFO_101 {
1281    DWORD   wki101_platform_id;
1282    LPTSTR  wki101_computername;
1283    LPTSTR  wki101_langroup;
1284    DWORD   wki101_ver_major;
1285    DWORD   wki101_ver_minor;
1286    LPTSTR  wki101_lanroot;
1287};
1288
1289/* NetWkstaGetInfo only.  System information - admin or operator access */
1290struct mslm_WKSTA_INFO_102 {
1291    DWORD   wki102_platform_id;
1292    LPTSTR  wki102_computername;
1293    LPTSTR  wki102_langroup;
1294    DWORD   wki102_ver_major;
1295    DWORD   wki102_ver_minor;
1296    LPTSTR  wki102_lanroot;
1297    DWORD   wki102_logged_on_users;
1298};
1299
1300INFO1RES_DEFINITION(mslm_NetWkstaGetInfo,
1301	INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,100)
1302	INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,101)
1303	INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,102))
1304
1305INFO1RESBUF_DEFINITION(mslm_NetWkstaGetInfo,
1306	INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,100)
1307	INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,101)
1308	INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,102))
1309
1310
1311OPERATION(WKSSVC_OPNUM_NetWkstaGetInfo)
1312struct mslm_NetWkstaGetInfo {
1313	IN  LPTSTR	servername;
1314	IN  DWORD	level;
1315	OUT struct mslm_NetWkstaGetInfo_result result;
1316	OUT DWORD	status;
1317};
1318
1319/*
1320 * The WKSSVC already
1321 */
1322INTERFACE(0)
1323union wkssvc_interface {
1324    CASE(WKSSVC_OPNUM_NetWkstaGetInfo)
1325	struct mslm_NetWkstaGetInfo	NetWkstaGetInfo;
1326};
1327typedef union wkssvc_interface	wkssvc_interface_t;
1328EXTERNTYPEINFO(wkssvc_interface)
1329
1330
1331#endif /* _MLSVC_LANMAN_NDL_ */
1332