srvsvc.ndl revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * or http://www.opensolaris.org/os/licensing.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef _MLSVC_LANMAN_NDL_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define _MLSVC_LANMAN_NDL_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#pragma ident "%Z%%M% %I% %E% SMI"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LanMan RPC (WKSSVC and SRVSVC) interface definitions.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#include "ndrtypes.ndl"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * WARNING: The cpp(1) macros in this file are not understood by
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * /usr/bin/cpp. Use /usr/libexec/cpp instead.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * TYPE CONSTRUCTOR MACROS FOR INFORMATION RESULTS
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ****************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is an explanation of the macros that follow this comment.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The LANMAN API's look something like this:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetXXXGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * XXX_name,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN int level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT char ** bufptr);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The bufptr is a pointer-to-pointer (**). The NetXXXGetInfo() function
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * malloc()s memory, and sets *bufptr to the memory. The API's
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * are undiscriminated about what bufptr really points to.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * However, for RPI (Remote Procedure Interface), this just won't fly.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * We have to know what the result data looks like in order to
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * properly (un)marshall it.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * As best we can determine, the MSC developers use an RPI that looks
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * like this (approximately in IDL):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * RemoteNetXXXGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * XXX_name,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN int level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT union switch(level) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case(1): XXX_INFO_1 * info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case(2): XXX_INFO_2 * info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The level guides the (un)marshalling as it follows the pointer.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DCE(MS) IDL will automatically form a structure for the union
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * which looks about like this (much as Sun/RPC does):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * int _keyvalue_;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 *info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_2 *info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } _u_;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This struct is not made visible to the application. It is purely
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * an internal (automagic) thing. However, ndrgen does not do this.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The ndrgen input MUST remain a valid C header file, and all
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct and union declarations must be exact, and we (would) have
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to tediously code sequences like this (approximately NDL)):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union XXXGetInfo_result_u {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [case(1)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 * info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [case(2)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_2 * info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct XXXGetInfo_result {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * int level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union XXXGetInfo_result_u bufptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct XXXGetInfo_param { // still have to code this one
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] char * servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] ushort level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] struct XXXGetInfo_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is error prone and difficult to write, and more difficult
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and distracting to read. It is hard to pick through the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * necessary evils and see what's really going on. To mitigate
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the situation, we have a series of macros which generate
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the tedious code, and are easily recognized as supporting
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fluff rather than important structures:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_DEFINITION(XXXGetInfo,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_UNION_ENTRY(XXXGetInfo, 1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_UNION_ENTRY(XXXGetInfo, 2))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * structt XXXGetInfo_param { // still have to code this one
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] char * servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] ushort level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] struct XXXGetInfo_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The INFO1RES_DEFINITION macro defines two types:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union ...__ru {...}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct ..._result { DWORD level; union ..._ru bufptr; }
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There is a similar macro, INFO1RESBUF_DEFINITION, which defines
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * actual space rather than just pointers. It defines:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union ...._rb {...}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * typedef union ..._rb ..._rb;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Which is handy in functions because the initial coding sequence
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * looks something like:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfoParam (struct XXXGetInfo_param *param) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfo_rb rb;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.level = param->level; // for marshalling
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.bufptr.nullptr = &rb; // anything fits
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There are two flavors of Info results. The first is the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * single XXX_INFO_x result, which the foregoing example
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * uses. The second flavor is when there are multiple entries
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * possible. Again, for the sake of guiding the marshalling,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the RPIs use something accommodating:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct XXX_INFO_1_result {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [size_is(entriesread)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 * table;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union { XXX_INFO_1_result *info1; ...}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Notice this is using XXX_INFO_1_result rather than just XXX_INFO_1.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The requirements from this point are much like before. Because of
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the variable-length value, there is no realistic way to do something
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * like INFO1RESBUF_DEFINITION.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There are two sets of macros here. INFO1RES_xxx are for the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * single result case, and INFONRES_xxx for the multiple entry case.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for single-result case
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_DEFINITION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_STRUCT(INFOPREF)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_UNION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union INFOPREF##__ru { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION_NULLPTR \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ENTRIES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_UNION_NULLPTR \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char * nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_UNION_ENTRY(INFOPREF,NUM) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(NUM) struct INFOPREF##_##NUM * bufptr##NUM;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_STRUCT(INFOPREF) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct INFOPREF##_result { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(level) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union INFOPREF##__ru bufptr; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RESBUF_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for single-result buffering.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef NDRGEN
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RESBUF_DEFINITION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw typedef union INFOPREF##_rb { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ENTRIES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw } INFOPREF##_rb;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RESBUF_UNION_ENTRY(INFOPREF,NUM) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(NUM) struct INFOPREF##_##NUM buf##NUM;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#else
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RESBUF_DEFINITION(INFOPREF, ENTRIES)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RESBUF_UNION_ENTRY(INFOPREF,NUM)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFONRES_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for multiple-result case
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_RESULT(INFOPREF,NUM) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct INFOPREF##_##NUM##_result { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entriesread; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SIZE_IS(entriesread) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct INFOPREF##_##NUM *entries; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_DEFINITION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_STRUCT(INFOPREF)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union INFOPREF##__ru { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_NULLPTR \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_INFONRES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ENTRIES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION_NULLPTR \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char * nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef NDRGEN
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION_INFONRES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_infonres * p;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#else
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION_INFONRES
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION_ENTRY(INFOPREF,NUM) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(NUM) struct INFOPREF##_##NUM##_result * bufptr##NUM;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_STRUCT(INFOPREF) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct INFOPREF##_result { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(level) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union INFOPREF##__ru bufptr; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef NDRGEN
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This just makes things a little easier on the stub modules:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfoParam (struct XXXGetInfo_param *param) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct mslm_infonres infonres;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * infonres.entriesread = 0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * infonres.entries = 0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.level = param->level; // for marshalling
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.bufptr.p = &infonres;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_infonres {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw void * entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SERVER SERVICE (SRVSVC)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ****************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetConnectEnum 0x08
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetFileEnum 0x09
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetFileClose 0x0b
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetSessionEnum 0x0c
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetSessionDel 0x0d
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetShareAdd 0x0e
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetShareEnum 0x0f
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetShareGetInfo 0x10
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetShareSetInfo 0x11
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetShareDel 0x12
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetServerGetInfo 0x15
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetServerSetInfo 0x16
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetRemoteTOD 0x1c
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetNameValidate 0x21
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetShareEnumSticky 0x24
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetGetFileSecurity 0x27
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SRVSVC_OPNUM_NetSetFileSecurity 0x28
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetConnectEnum:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Description:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Request for mslm_NetConnectEnum returns
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * info of resources in MLRPC server connected
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to network. Correctly level 0 and level 1 information
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * are supported.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Level 0 connect information.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfoBuf0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni0_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfo0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entries_read;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SIZE_IS(entries_read)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetConnectInfoBuf0 *ci0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Level 1 connect information.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfoBuf1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_num_opens;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_num_users;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_time;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR coni1_username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR coni1_netname; /* share name */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfo1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entries_read;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SIZE_IS(entries_read)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetConnectInfoBuf1 *ci1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mslm_NetConnectInfoResUnion {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(0) struct mslm_NetConnectInfo0 *info0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(1) struct mslm_NetConnectInfo1 *info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char *nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD switch_value;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(switch_value)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mslm_NetConnectInfoResUnion ru;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetConnectEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectEnum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR qualifier; /* share name */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT struct mslm_NetConnectInfo info;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD pref_max_len;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD total_entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD *resume_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetFileEnum: under construction.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileInfoBuf3 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD fi3_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD fi3_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD fi3_num_locks;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR fi3_pathname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR fi3_username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileInfo3 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entries_read;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SIZE_IS(entries_read)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetFileInfoBuf3 *fi3;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mslm_NetFileInfoResUnion {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(3) struct mslm_NetFileInfo3 *info3;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char *nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD switch_value;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(switch_value)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mslm_NetFileInfoResUnion ru;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetFileEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileEnum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD unknown1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD unknown2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT struct mslm_NetFileInfo info;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD pref_max_len;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD total_entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD *resume_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetFileClose
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * I think this definition is complete but as it doesn't do anything
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * it probably isn't a big issue. It is used to close files reported
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * via NetFileEnum (i.e. the file id).
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetFileClose)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileClose {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD file_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetShareGetInfo: netname is the name of a share.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi0_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi1_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi1_type; /* type of resource such as IPC$ */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi1_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo2 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_max_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_current_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_path;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_passwd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo502 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_max_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_current_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_path;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_passwd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_reserved;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_security_descriptor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo1005 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi1005_flags;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mlsm_NetShareGetInfoResUnion {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(0) struct mslm_NetShareGetInfo0 *info0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(1) struct mslm_NetShareGetInfo1 *info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(2) struct mslm_NetShareGetInfo2 *info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(502) struct mslm_NetShareGetInfo502 *info502;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(1005) struct mslm_NetShareGetInfo1005 *info1005;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char *nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mlsm_NetShareGetInfoRes {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD switch_value;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(switch_value)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mlsm_NetShareGetInfoResUnion ru;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mlsm_NetShareGetInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mlsm_NetShareGetInfoRes result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetShareSetInfo: netname is the name of a share.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareSetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mlsm_NetShareSetInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This should accept all the same levels as NetShareGetInfo
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * but we always return ACCESS_DENIED for now. So there's no
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * point in unmarshalling the share information.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN struct mlsm_NetShareGetInfoRes result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD parm_err_ptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD parm_err;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionEnum
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The NetSessionEnum function provides information about sessions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established on a server.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Only members of the Administrators or Account Operators local groups
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * can successfully execute the NetSessionEnum function at level 1 or
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * level 2. No special group membership is required for level 0 or level
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 10 calls.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: The parameter order is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NET_API_STATUS NetSessionEnum(LPWSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR UncClientName,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR username,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DWORD level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPBYTE *bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DWORD prefmaxlen,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPDWORD entriesread,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPDWORD totalentries,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPDWORD resume_handle);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: The calling application must use the cbBuffer parameter
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to specify the size, in bytes, of the information buffer pointed to by the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * pbBuffer parameter. (The cbBuffer parameter replaces the prefmaxlen
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter.) Neither a user name parameter nor a resume handle parameter is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * available on this platform. Therefore, the parameter list is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * API_FUNCTION NetSessionEnum(const char FAR *pszServer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * short sLevel,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * char FAR *pbBuffer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned short cbBuffer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned short FAR *pcEntriesRead,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned short FAR *pcTotalAvail);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Parameters
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * servername
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the DNS or NetBIOS name of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * remote server on which the function is to execute. If this parameter is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NULL, the local computer is used.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT 4.0 and earlier: This string must begin with \\.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * UncClientName
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the name of the computer session
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * for which information is to be returned. If this parameter is NULL,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionEnum returns information for all computer sessions on the server.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the name of the user for which
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information is to be returned. If this parameter is NULL, NetSessionEnum
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * returns information for all users.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * level
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Specifies the information level of the data. This parameter can be
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * one of the following values.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: The following levels are valid.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Value Meaning
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 0 Return the name of the computer that established the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The bufptr parameter points to an array of SESSION_INFO_0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 1 Return the name of the computer, name of the user, and open files,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * pipes, and devices on the computer. The bufptr parameter points to
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * an array of SESSION_INFO_1 structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 2 In addition to the information indicated for level 1, return the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * type of client and how the user established the session. The bufptr
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter points to an array of SESSION_INFO_2 structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 10 Return the name of the computer, name of the user, and active and
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * idle times for the session. The bufptr parameter points to an array
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * of SESSION_INFO_10 structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 502 Return the name of the computer; name of the user; open files,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * pipes, and devices on the computer; and the name of the transport
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the client is using. The bufptr parameter points to an array of
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SESSION_INFO_502 structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: The following level is valid.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Value Meaning
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 50 Return the name of the computer, name of the user, open files on
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the computer, and the name of the transport protocol the client is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * using. The pbBuffer parameter points to an array of session_info_50
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * bufptr
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] Pointer to the buffer that receives the data. The format of this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * data depends on the value of the level parameter.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: This buffer is allocated by the system and must be
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * freed using the NetApiBufferFree function. Note that you must free the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * buffer even if the function fails with ERROR_MORE_DATA.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: The caller must allocate and deallocate this buffer.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * prefmaxlen
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Specifies the preferred maximum length of returned data, in bytes.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If you specify MAX_PREFERRED_LENGTH, the function allocates the amount
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * of memory required for the data. If you specify another value in this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter, it can restrict the number of bytes that the function returns.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If the buffer size is insufficient to hold all entries, the function
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * returns ERROR_MORE_DATA. For more information, see Network Management
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Function Buffers and Network Management Function Buffer Lengths.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * entriesread
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] Pointer to a value that receives the count of elements actually
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * enumerated.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * totalentries
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] Pointer to a value that receives the total number of entries that
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * could have been enumerated from the current resume position.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * resume_handle
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in/out] Pointer to a value that contains a resume handle which is used
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to continue an existing session search. The handle should be zero on the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * first call and left unchanged for subsequent calls. If resume_handle is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NULL, no resume handle is stored.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SESSION_INFO_1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * ==============
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The SESSION_INFO_1 structure contains information about the session,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * including name of the computer; name of the user; and open files, pipes,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and devices on the computer.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Members
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_cname
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Pointer to a Unicode string specifying the name of the computer that
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Pointer to a Unicode string specifying the name of the user who established
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_num_opens
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of files, devices,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and pipes opened during the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_time
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of seconds the session
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * has been active.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_idle_time
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of seconds the session
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * has been idle.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_user_flags
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that describes how the user established the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * session. This member can be one of the following values:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SESS_GUEST The user specified by the sesi1_username member
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established the session using a guest account.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SESS_NOENCRYPTION The user specified by the sesi1_username member
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established the session without using password
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * encryption.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SESS_GUEST 0x00000001
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SESS_NOENCRYPTION 0x00000002
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SESSION_INFO_0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sesi0_cname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SESSION_INFO, 0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SESSION_INFO_1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sesi1_cname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sesi1_uname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sesi1_nopens;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sesi1_time;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sesi1_itime;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sesi1_uflags;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SESSION_INFO, 1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_DEFINITION(mslm_NetSessionEnum,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SESSION_INFO, 0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SESSION_INFO, 1))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetSessionEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetSessionEnum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD unc_clientname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT struct mslm_NetSessionEnum_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD pref_max_len;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD total_entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD *resume_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionDel (Platform SDK: Network Management)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The NetSessionDel function ends a network session between a server
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and a workstation.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Security Requirements
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Only members of the Administrators or Account Operators local group
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * can successfully execute the NetSessionDel function.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: The parameter order is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NET_API_STATUS NetSessionDel(LPWSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR UncClientName,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR username);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: The sReserved parameter replaces the username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter. For more information, see the following Remarks section.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The parameter list is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * API_FUNCTION NetSessionDel(const char FAR *pszServer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * const char FAR *pszClientName,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * short sReserved);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Parameters
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * servername
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the DNS or NetBIOS name
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * of the remote server on which the function is to execute. If this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter is NULL, the local computer is used.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT 4.0 and earlier: This string must begin with \\.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * UncClientName
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the computer name of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * client to disconnect. If UncClientName is NULL, then all the sessions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * of the user identified by the username parameter will be deleted on
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the server specified by servername. For more information, see
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionEnum.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the name of the user whose
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * session is to be terminated. If this parameter is NULL, all users'
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sessions from the client specified by the UncClientName parameter
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * are to be terminated.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Remarks
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: You must specify the session key in the sReserved
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter when you call NetSessionDel. The session key is returned by
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the NetSessionEnum function or the NetSessionGetInfo function in the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi50_key member of the session_info_50 structure.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetSessionDel)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetSessionDel {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR unc_clientname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC NetServerGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT union switch(level) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 100: _SERVER_INFO_100 * p100;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 101: _SERVER_INFO_101 * p101;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 102: _SERVER_INFO_102 * p102;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD status
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * )
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* for svX_platform */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_PLATFORM_ID_OS2 400
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_PLATFORM_ID_NT 500
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Bit-mapped values for svX_type fields */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_WORKSTATION 0x00000001
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER 0x00000002
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SQLSERVER 0x00000004
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_CTRL 0x00000008
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_BAKCTRL 0x00000010
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_TIME_SOURCE 0x00000020
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_AFP 0x00000040
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_NOVELL 0x00000080
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_MEMBER 0x00000100
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_PRINTQ_SERVER 0x00000200
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DIALIN_SERVER 0x00000400
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_XENIX_SERVER 0x00000800
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_UNIX SV_TYPE_XENIX_SERVER
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_NT 0x00001000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_WFW 0x00002000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_MFPN 0x00004000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_NT 0x00008000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_POTENTIAL_BROWSER 0x00010000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_BACKUP_BROWSER 0x00020000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_MASTER_BROWSER 0x00040000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_MASTER 0x00080000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_OSF 0x00100000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_VMS 0x00200000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_WINDOWS 0x00400000 /* Windows95 and above */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_ALTERNATE_XPORT 0x20000000 /* return list for
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * alternate transport */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_LOCAL_LIST_ONLY 0x40000000 /* Return local list only */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_ENUM 0x80000000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_ALL 0xFFFFFFFF /* handy for NetServerEnum2 */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NT-Server 4.0 sends 0x0006_120B */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SENT_BY_NT_4_0_SERVER \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ( SV_TYPE_WORKSTATION \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_SERVER \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_DOMAIN_CTRL \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_NT \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_BACKUP_BROWSER \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_MASTER_BROWSER)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NT-workstation 4.0 send 0x0004_1013 */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SENT_BY_NT_4_0_WORKSTATION \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ( SV_TYPE_WORKSTATION \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_SERVER \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_DOMAIN_BAKCTRL \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_NT \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_MASTER_BROWSER)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Special value for sv102_disc that specifies infinite disconnect time */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_NODISC (-1L) /* No autodisconnect timeout enforced */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Values of svX_security field */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_USERSECURITY 1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_SHARESECURITY 0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Values of svX_hidden field */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_HIDDEN 1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_VISIBLE 0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Let's get some info already */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SERVER_INFO_100 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv100_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv100_name;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SERVER_INFO_101 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv101_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv101_name;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv101_version_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv101_version_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv101_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv101_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SERVER_INFO_102 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv102_name;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_version_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_version_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv102_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_users;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_disc;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_hidden; /* BOOL */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_announce;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_anndelta;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_licenses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv102_userpath;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mslm_NetServerGetInfo_ru {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(100) struct mslm_SERVER_INFO_100 *bufptr100;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(101) struct mslm_SERVER_INFO_101 *bufptr101;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(102) struct mslm_SERVER_INFO_102 *bufptr102;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char *nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetServerGetInfo_result {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(level)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mslm_NetServerGetInfo_ru bufptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetServerGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetServerGetInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mslm_NetServerGetInfo_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC NetRemoteTOD (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT _TIME_OF_DAY_INFO *bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT long status
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * )
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_TIME_OF_DAY_INFO {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_elapsedt;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_msecs;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_hours;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_mins;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_secs;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_hunds;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_timezone;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_tinterval;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_day;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_month;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_year;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_weekday;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetRemoteTOD)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetRemoteTOD {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mslm_TIME_OF_DAY_INFO *bufptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC_NetNameValidate (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN REFERENCE LPTSTR pathname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD flags;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * )
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetNameValidate)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetNameValidate {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR pathname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD flags;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC NetShareEnum (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT union switch(level) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 0: struct {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DWORD entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [size_is(entriesread)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * _SHARE_INFO_0 *entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } *bufptr0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 1: struct {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DWORD entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [size_is(entriesread)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * _SHARE_INFO_1 *entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } *bufptr1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * ...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD prefmaxlen,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD totalentries,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN OUT DWORD ?* resume_handle,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD status
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * )
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Share types for shiX_type fields - duplicated from cifs.h
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef _SHARE_TYPES_DEFINED_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define _SHARE_TYPES_DEFINED_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_DISKTREE 0x00000000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_PRINTQ 0x00000001
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_DEVICE 0x00000002
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_IPC 0x00000003
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_MASK 0x0000000F
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_DFS 0x00000064
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_HIDDEN 0x80000000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_SPECIAL 0x80000000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif /* _SHARE_TYPES_DEFINED_ */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Maximum uses for shiX_max_uses fields */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SHI_USES_UNLIMITED (DWORD)-1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SHARE_INFO_0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi0_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SHARE_INFO,0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SHARE_INFO_1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi1_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi1_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi1_remark;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SHARE_INFO,1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SHARE_INFO_2 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_remark;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_max_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_current_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_path;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_passwd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SHARE_INFO,2)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Note: shi502_security_descriptor should be a pointer to a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * security descriptor (W32SEC_SECURITY_DESCRIPTOR):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * PSECURITY_DESCRIPTOR shi502_security_descriptor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * For now we can just use a DWORD and set it to zero.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SHARE_INFO_502 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_remark;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_max_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_current_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_path;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_passwd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_reserved;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_security_descriptor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SHARE_INFO,502)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mslm_NetShareAddInfo_u {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(2) struct mslm_SHARE_INFO_2 *info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(502) struct mslm_SHARE_INFO_502 *info502;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareAddInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD switch_value;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(switch_value)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mslm_NetShareAddInfo_u un;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareAdd)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareAdd {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN struct mslm_NetShareAddInfo info;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD *parm_err;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_DEFINITION(mslm_NetShareEnum,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,2)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,502))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareEnum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mslm_NetShareEnum_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD prefmaxlen;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD totalentries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD * resume_handle; /* not sure about ptr */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Delete a share. The reserved field appears in netmon
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * but I've left it out in case it's not always present.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This won't affect RPC processing.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareDel)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareDel {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /* IN DWORD reserved; */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetShareEnumSticky is the same as NetShareEnum except that hidden
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * shares are not returned. This call was apparently added due to a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * bug in the NT implementation of NetShareEnum - it didn't process
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the resume handle correctly so that attempts to enumerate large
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * share lists resulted in an infinite loop.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareEnumSticky)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareEnumSticky {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mslm_NetShareEnum_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD prefmaxlen;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD totalentries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD * resume_handle; /* not sure about ptr */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When you install Windows NT Server Tools on a Win95 client,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * a security tab will be added to properties dialog box of files/folders.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Within this security tab, when you try to get/set permissions on a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file/folder the next two RPC calls are used.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetGetFileSecurity)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetGetFileSecurity {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR sharename;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR filename;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD securityinfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Right now, we can't send back SD of the requested object
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * in MLRPC code, so we just reply with access denied error
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * code. Thus, this output declaration is only valid in this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case i.e., it's not complete.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * It looks like:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Pointer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Length
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Pointer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Length (equal to the prev length)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A buffer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * return value
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD length;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is the request:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: RPC Client call srvsvc:NetrpSetFileSecurity(..)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: SRVSVC_HANDLE ServerName = \\WK76-177
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: LPWSTR ShareName = AFSHIN
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: LPWSTR lpFileName = \salek.txt
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: SECURITY_INFORMATION SecurityInformation = 4 (0x4)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * -R_SRVSVC: PADT_SECURITY_DESCRIPTOR SecurityDescriptor {..}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: DWORD Length = 64 (0x40)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: LPBYTE Buffer = 4496048 (0x449AB0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: LPBYTE Buffer [..] = 01 00 04 80 00 00 00 00 00 00 00 00 00 00 00
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * ...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000A0 00 83 46 00 0B 00 00 00 00 00 00 00 0B 00 ..F...........
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000B0 00 00 5C 00 5C 00 57 00 4B 00 37 00 36 00 2D 00 ..\.\.W.K.7.6.-.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000C0 31 00 37 00 37 00 00 00 08 00 16 83 46 00 07 00 1.7.7.......F...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000D0 00 00 00 00 00 00 07 00 00 00 41 00 46 00 53 00 ..........A.F.S.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000E0 48 00 49 00 4E 00 00 00 00 00 0B 00 00 00 00 00 H.I.N...........
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000F0 00 00 0B 00 00 00 5C 00 73 00 61 00 6C 00 65 00 ......\.s.a.l.e.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000100 6B 00 2E 00 74 00 78 00 74 00 00 00 00 00 04 00 k...t.x.t.......
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000110 00 00 40 00 00 00 B0 9A 44 00 40 00 00 00 01 00 ..@.....D.@.....
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000120 04 80 00 00 00 00 00 00 00 00 00 00 00 00 14 00 ................
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000130 00 00 02 00 2C 00 01 00 00 00 00 00 24 00 00 00 ....,.......$...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000140 00 A0 01 05 00 00 00 00 00 05 15 00 00 00 1A 24 ...............$
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000150 44 38 90 00 0F 02 65 3A BE 4C FF 03 00 00 00 00 D8....e:.L......
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000160 00 00 00 00 00 00 00 00 00 00 ..........
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetSetFileSecurity)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetSetFileSecurity {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR sharename;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR filename;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD securityinfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN Security Descriptor (looks like):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Length1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Pointer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Length2 (== Length1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * buffer itself
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The SRVSVC already
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINTERFACE(0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion srvsvc_interface {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetConnectEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetConnectEnum NetConnectEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetFileEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetFileEnum NetFileEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetFileClose)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetFileClose NetFileClose;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mlsm_NetShareGetInfo NetShareGetInfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareSetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mlsm_NetShareGetInfo NetShareSetInfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetSessionDel)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetSessionDel NetSessionDel;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetSessionEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetSessionEnum NetSessionEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetServerGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetServerGetInfo NetServerGetInfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetRemoteTOD)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetRemoteTOD NetRemoteTOD;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetNameValidate)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetNameValidate NetNameValidate;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareAdd)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetShareAdd NetShareAdd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareDel)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetShareDel NetShareDel;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetShareEnum NetShareEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareEnumSticky)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetShareEnumSticky NetShareEnumSticky;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetGetFileSecurity)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetGetFileSecurity NetGetFileSecurity;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetSetFileSecurity)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetSetFileSecurity NetSetFileSecurity;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef union srvsvc_interface srvsvc_interface_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwEXTERNTYPEINFO(srvsvc_interface)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * WKSSVC -- Workstation Service
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ****************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define WKSSVC_OPNUM_NetWkstaGetInfo 0x00
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NET_API_STATUS NET_API_FUNCTION
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetWkstaGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername OPTIONAL,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT LPBYTE *bufptr
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * );
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_WKSTA_INFO_100 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki100_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki100_computername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki100_langroup;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki100_ver_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki100_ver_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NetWkstaGetInfo only. System information - user access */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_WKSTA_INFO_101 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki101_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki101_computername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki101_langroup;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki101_ver_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki101_ver_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki101_lanroot;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NetWkstaGetInfo only. System information - admin or operator access */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_WKSTA_INFO_102 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki102_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki102_computername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki102_langroup;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki102_ver_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki102_ver_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki102_lanroot;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki102_logged_on_users;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFO1RES_DEFINITION(mslm_NetWkstaGetInfo,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,100)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,101)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,102))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFO1RESBUF_DEFINITION(mslm_NetWkstaGetInfo,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,100)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,101)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,102))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(WKSSVC_OPNUM_NetWkstaGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetWkstaGetInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mslm_NetWkstaGetInfo_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The WKSSVC already
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINTERFACE(0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion wkssvc_interface {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(WKSSVC_OPNUM_NetWkstaGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetWkstaGetInfo NetWkstaGetInfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef union wkssvc_interface wkssvc_interface_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwEXTERNTYPEINFO(wkssvc_interface)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif /* _MLSVC_LANMAN_NDL_ */