*/ -public class NetrShareEnumRequest extends RequestCallThe NetrShareEnum method retrieves information about each shared resource on a server. * - *- * NET_API_STATUS NetrShareEnum( - * [in, string, unique] SRVSVC_HANDLE ServerName, - * [in, out] LPSHARE_ENUM_STRUCT InfoStruct, - * [in] DWORD PreferedMaximumLength, - * [out] DWORD* TotalEntries, - * [in, out, unique] DWORD* ResumeHandle - * ); - *+ * NET_API_STATUS NetrShareEnum( + * [in, string, unique] SRVSVC_HANDLE ServerName, + * [in, out] LPSHARE_ENUM_STRUCT InfoStruct, + * [in] DWORD PreferedMaximumLength, + * [out] DWORD* TotalEntries, + * [in, out, unique] DWORD* ResumeHandle + * ); * - * ServerName: An SRVSVC_HANDLE (section 2.2.1.1) pointer that identifies the server. The client MUST map this structure - * to an RPC binding handle (see [C706] sections 4.3.5 and 5.1.5.2). If this parameter is NULL, the local computer is - * used.
- *
- * InfoStruct: A pointer to a structure, in the format of a SHARE_ENUM_STRUCT (section 2.2.4.38), as specified in - * section 2.2.4.38. The SHARE_ENUM_STRUCT structure has a Level member that specifies the type of structure to return - * in the ShareInfo member. The Level member MUST be one of the values specified in section 2.2.4.38.
- *
- * PreferedMaximumLength: Specifies the preferred maximum length, in bytes, of the returned data. If the specified value - * is MAX_PREFERRED_LENGTH, the method MUST attempt to return all entries.
- *
- * TotalEntries: The total number of entries that could have been enumerated if the buffer had been big enough to hold - * all the entries.
- *
- * ResumeHandle: A pointer to a value that contains a handle, which is used to continue an existing share search in - * ShareList. The handle MUST be zero on the first call and remain unchanged for subsequent calls. If the ResumeHandle - * parameter is NULL, no resume handle MUST be stored. If this parameter is not NULL and the method returns - * ERROR_MORE_DATA, this parameter receives a nonzero value that can be passed in subsequent calls to this method to - * continue with the enumeration in ShareList.
- *
- *- *
- *- If this parameter is NULL or points to 0x00000000, the enumeration starts from the beginning of the - * ShareList.
- *
- * Return Values: The method returns 0x00000000 (NERR_Success) to indicate success; otherwise, it returns a nonzero - * error code. The method can take any specific error code value, as specified in [MS-ERREF] section 2.2. The most - * common error codes are listed in the following table.
- *
- *- *
- * If ServerName does not match any Transport.ServerName in TransportList with the SVTI2_SCOPED_NAME bit set in - * Transport.Flags, the server MUST reset ServerName as "*".- * - *Return value/code - *Description - *- * - *NERR_Success (0x00000000) - *The client request succeeded. - *- * - *ERROR_MORE_DATA (0x000000EA) - *The client request succeeded. More entries are available. Not all entries could be returned in the buffer size - * that is specified by PreferedMaximumLength. - *- * - *ERROR_INVALID_LEVEL (0x0000007C) - *The system call level is not correct. - *
- *
- * The server MUST remove any preceding "\\" from the ServerName parameter and normalize the ServerName parameter as - * specified in section 3.1.6.8, passing in the updated ServerName parameter as the ServerName, and an empty string as - * the ShareName.
- *
- * In response to a NetrShareEnum request, the server MUST enumerate the Share entries in ShareList based on the value - * of the ResumeHandle parameter and query share properties by invoking the underlying server events as specified in - * [MS-CIFS] section 3.3.4.12 or [MS-SMB] section 3.3.4.7, and [MS-SMB2] section 3.3.4.16, providing the tuple - * <normalized server name, Share.ShareName> as the input parameter. When the server receives STATUS_SUCCESS for a - * share, it MUST consider the received SHARE_INFO_503_I and SHARE_INFO_1005 structures as valid. The server MUST return - * information about each shared resource on a server.
- *
- * The InfoStruct parameter has a Level member. The valid values of Level are 0, 1, 2, 501, 502, and 503. If the Level - * member is not equal to one of the valid values, the server MUST fail the call with an ERROR_INVALID_LEVEL error - * code.
- *
- * The server MUST use the shares in valid SHARE_INFO_503_I and SHARE_INFO_1005 structures returned from either CIFS or - * SMB2 server and fill the return structures as follows. For each share, the server MUST discard the structures - * received from other file server except the value of share.shi503_current_uses.
- *
- * If the Level member is 503, the server MUST return all shares in SHARE_INFO_503_I structures. Otherwise, the server - * MUST return the shares in which share.shi503_servername matches ServerName.
- *
- * If the Level member is 0, the server MUST return the information about share resources by filling the - * SHARE_INFO_0_CONTAINER structure in the ShareInfo member of the InfoStruct parameter. The SHARE_INFO_0_CONTAINER - * structure contains an array of SHARE_INFO_0 structures.
- *
- *- *
- *- shi0_netname MUST be set to share.shi503_netname.
- *
- * If the Level member is 1, the server MUST return the information about share resources by filling the - * SHARE_INFO_1_CONTAINER structure in the ShareInfo member of the InfoStruct parameter. The SHARE_INFO_1_CONTAINER - * structure contains an array of SHARE_INFO_1 structures.
- *
- *- *
- *- shi1_netname MUST be set to share.shi503_netname.
- *- shi1_type MUST be set to share.shi503_type.
- *- shi1_remark MUST be set to share.shi503_remark.
- *
- * If the Level member is 2, the server MUST return the information about share resources by filling the - * SHARE_INFO_2_CONTAINER structure in the ShareInfo member of the InfoStruct parameter. The SHARE_INFO_2_CONTAINER - * structure contains an array of SHARE_INFO_2 structures.
- *
- *- *
- *- shi2_netname MUST be set to share.shi503_netname.
- *- shi2_type MUST be set to share.shi503_type.
- *- shi2_remark MUST be set to share.shi503_remark.
- *- shi2_permissions MUST be set to share.shi503_permissions.
- *- shi2_max_uses MUST be set to share.shi503_max_uses.
- *- shi2_current_uses MUST be set to the sum of share.shi503_current_uses values retrieved from both CIFS and SMB2 - * servers.
- *- shi2_path MUST be set to share.shi503_path.
- *- shi2_passwd MUST be set to share.shi503_passwd.
- *
- * If the Level member is 501, the server MUST return the information about share resources by filling the - * SHARE_INFO_501_CONTAINER structure in the ShareInfo member of the InfoStruct parameter. The SHARE_INFO_501_CONTAINER - * structure contains an array of SHARE_INFO_501 structures.
- *
- *- *
- *- shi501_netname MUST be set to share.shi503_netname.
- *- shi501_type MUST be set to share.shi503_type.
- *- shi501_remark MUST be set to share.shi503_remark.
- *- shi501_flags MUST be set to share.ShareFlags.
- *
- * If the Level member is 502, the server MUST return the information about Share resources by filling the - * SHARE_INFO_502_CONTAINER structure in the ShareInfo member of the InfoStruct parameter. The SHARE_INFO_502_CONTAINER - * structure contains an array of SHARE_INFO_502_I structures.
- *
- *- *
- *- shi502_netname MUST be set to share.shi503_netname.
- *- shi502_type MUST be set to share.shi503_type.
- *- shi502_remark MUST be set to share.shi503_remark.
- *- shi502_permissions MUST be set to share.shi503_permissions.
- *- shi502_max_uses MUST be set to share.shi503_max_uses.
- *- shi502_current_uses MUST be set to the sum of share.shi503_current_uses values retrieved from both CIFS and SMB2 - * servers.
- *- shi502_path MUST be set to share.shi503_path.
- *- shi502_passwd MUST be set to share.shi503_passwd.
- *- shi502_security_descriptor MUST be set to share.shi503_security_descriptor
- *
- * If the Level member is 503, the server MUST return the information about share resources in the SHARE_INFO_503_I - * structure by filling the SHARE_INFO_503_CONTAINER structure in the ShareInfo member of the InfoStruct parameter, - * except that shi503_current_uses MUST be set to the sum of share.shi503_current_uses values retrieved from both CIFS - * and SMB2 server. The SHARE_INFO_503_CONTAINER structure contains an array of SHARE_INFO_503_I structures.
- *
- * The server MUST set the STYPE_CLUSTER_FS, STYPE_CLUSTER_SOFS, and STYPE_CLUSTER_DFS bits in the shi*_type field to - * zero; the client MUST ignore them on receipt.
- *
- * The PreferedMaximumLength parameter specifies the maximum number of bytes that the server can return for the - * ShareInfo buffer. If PreferedMaximumLength is insufficient to hold all the entries, the server MUST return the - * maximum number of entries that will fit in the ShareInfo buffer and return ERROR_MORE_DATA. If this parameter is - * equal to MAX_PREFERRED_LENGTH (section 2.2.2.2), the server MUST return all the requested data.
- *
- * If the server returns NERR_Success or ERROR_MORE_DATA, it MUST set the TotalEntries parameter to equal the total - * number of entries that could have been enumerated from the current resume position.
- *
- * If PreferedMaximumLength is insufficient to hold all the entries and if the client has specified a ResumeHandle, the - * server MUST set ResumeHandle to some implementation-specific value that allows the server to continue with this - * enumeration on a subsequent call to this method with the same value for ResumeHandle.
- *
- * The server MUST maintain the share list in the order in which shares are inserted into ShareList.
- *
- * The following rules specify processing of the ResumeHandle parameter:
- *
- *- *
- *- If the ResumeHandle parameter is either NULL or points to 0x00000000, the enumeration MUST start from the - * beginning of the ShareList.
- *- If the ResumeHandle parameter points to a nonzero value, the server MUST validate the ResumeHandle. - *
- *- *
- *- If the value of the ResumeHandle is less than the size of the ShareList, the server MUST continue enumeration - * based on the value of ResumeHandle. The value of ResumeHandle specifies the index into the ShareList after which - * enumeration is to begin.
- *- If the value of the ResumeHandle is greater than or equal to the size of the ShareList, the server MUST return - * NERR_Success and zero entries.
- *- If the client specified a ResumeHandle and if the server returns ERROR_MORE_DATA (0x000000EA), the server MUST - * set ResumeHandle to the index of the last enumerated share in the ShareList.
- *
- * Because the ResumeHandle specifies the index into the ShareList, and the ShareList can be modified between multiple - * requests, the results of a query spanning multiple requests using the ResumeHandle can be unreliable, offering either - * duplicate or unavailable shares.
- *
- * The server SHOULD enforce security measures to verify that the caller has the required permissions to execute this - * routine. If the caller does not have the required credentials, the server SHOULD fail the call. - * - * @see 3.1.4.8 NetrShareEnum (Opnum 15) + * ServerName: An SRVSVC_HANDLE (section 2.2.1.1) pointer that identifies the server. The client MUST map this structure to an RPC binding handle (see [C706] sections 4.3.5 and 5.1.5.2). If this parameter is NULL, the local computer is used. + * InfoStruct: A pointer to a structure, in the format of a SHARE_ENUM_STRUCT (section 2.2.4.38), as specified in section 2.2.4.38. The SHARE_ENUM_STRUCT structure has a Level member that specifies the type of structure to return in the ShareInfo member. The Level member MUST be one of the values specified in section 2.2.4.38. + * PreferedMaximumLength: Specifies the preferred maximum length, in bytes, of the returned data. If the specified value is MAX_PREFERRED_LENGTH, the method MUST attempt to return all entries. + * TotalEntries: The total number of entries that could have been enumerated if the buffer had been big enough to hold all the entries. + * ResumeHandle: A pointer to a value that contains a handle, which is used to continue an existing share search in ShareList. The handle MUST be zero on the first call and remain unchanged for subsequent calls. If the ResumeHandle parameter is NULL, no resume handle MUST be stored. If this parameter is not NULL and the method returns ERROR_MORE_DATA, this parameter receives a nonzero value that can be passed in subsequent calls to this method to continue with the enumeration in ShareList. + * If this parameter is NULL or points to 0x00000000, the enumeration starts from the beginning of the ShareList.
- * Server Service, NetShareEnumAll - * Operation: NetShareEnumAll (15) - * [Request in frame: 17] - * Pointer to Level (uint32) - * Level: 1 - * Pointer to Ctr (srvsvc_NetShareCtr) - * srvsvc_NetShareCtr - * Ctr - * Pointer to Ctr1 (srvsvc_NetShareCtr1) - * Referent ID: 0x00020000 - * Ctr1 - * Count: 3 - * Pointer to Array (srvsvc_NetShareInfo1) - * Referent ID: 0x00020004 - * Max Count: 3 - * Array - * Pointer to Name (uint16) - * Referent ID: 0x00020008 - * Max Count: 7 - * Offset: 0 - * Actual Count: 7 - * Name: ADMIN$ - * Type: STYPE_DISKTREE_HIDDEN (2147483648) - * Pointer to Comment (uint16) - * Referent ID: 0x0002000c - * Max Count: 13 - * Offset: 0 - * Actual Count: 13 - * Comment: Remote Admin - * Array - * Pointer to Name (uint16) - * Referent ID: 0x00020010 - * Max Count: 3 - * Offset: 0 - * Actual Count: 3 - * Name: C$ - * Type: STYPE_DISKTREE_HIDDEN (2147483648) - * Pointer to Comment (uint16) - * Referent ID: 0x00020014 - * Max Count: 14 - * Offset: 0 - * Actual Count: 14 - * Comment: Default share - * Array - * Pointer to Name (uint16) - * Referent ID: 0x00020018 - * Max Count: 5 - * Offset: 0 - * Actual Count: 5 - * Name: IPC$ - * Type: STYPE_IPC_HIDDEN (2147483651) - * Pointer to Comment (uint16) - * Referent ID: 0x0002001c - * Max Count: 11 - * Offset: 0 - * Actual Count: 11 - * Comment: Remote IPC - * Pointer to Totalentries (uint32) - * Totalentries: 3 - * NULL Pointer: Pointer to Resume Handle (uint32) - * Windows Error: WERR_OK (0x00000000) - *- */ -public class NetrShareEnumResponse extends RequestResponse { - private int level; - private List
+ */ +public abstract class NetrShareGetInfoRequestThe NetrShareGetInfo method retrieves information about a particular shared resource on the server from the ShareList. + * + * NET_API_STATUS NetrShareGetInfo( + * [in, string, unique] SRVSVC_HANDLE ServerName, + * [in, string] WCHAR* NetName, + * [in] DWORD Level, + * [out, switch_is(Level)] LPSHARE_INFO InfoStruct + * ); + * + * ServerName: An SRVSVC_HANDLE (section 2.2.1.1) pointer that identifies the server. The client MUST map this structure to an RPC binding handle ([C706] sections 4.3.5 and 5.1.5.2). If this parameter is NULL, the local computer is used. + * NetName: A pointer to a null-terminated UTF-16 string that specifies the name of the share to return information for. + * Level: Specifies the information level of the data. This parameter MUST be one of the following values. + * 0 LPSHARE_INFO_0 + * 1 LPSHARE_INFO_1 + * 2 LPSHARE_INFO_2 + * 501 LPSHARE_INFO_501 + * 502 LPSHARE_INFO_502_I + * 503 LPSHARE_INFO_503_I + * 1005 LPSHARE_INFO_1005 + * InfoStruct: This parameter is of type LPSHARE_INFO union, as specified in section 2.2.3.6. Its contents are determined by the value of the Level parameter, as shown in the preceding table.
+ */ +public abstract class ShareEnumStructThe SHARE_ENUM_STRUCT structure specifies the information level that the client requests in the NetrShareEnum method and encapsulates the SHARE_ENUM_UNION union that receives the entries enumerated by the server. + * + * typedef struct _SHARE_ENUM_STRUCT { + * DWORD Level; + * [switch_is(Level)] SHARE_ENUM_UNION ShareInfo; + * } SHARE_ENUM_STRUCT, + * *PSHARE_ENUM_STRUCT, + * *LPSHARE_ENUM_STRUCT; + * + * Level: Specifies the information level of the data. This parameter MUST have one of the following values. + * 0 SHARE_INFO_0_CONTAINER + * 1 SHARE_INFO_1_CONTAINER + * 2 SHARE_INFO_2_CONTAINER + * 501 SHARE_INFO_501_CONTAINER + * 502 SHARE_INFO_502_CONTAINER + * 503 SHARE_INFO_503_CONTAINER
+ */ +public class ShareInfo0 extends ShareInfo { + @Override + public String toString() { + return String.format("SHARE_INFO_0{shi0_netname: %s}", getNetName()); + } +} diff --git a/src/main/java/com/rapid7/client/dcerpc/mssrvs/objects/ShareInfo1.java b/src/main/java/com/rapid7/client/dcerpc/mssrvs/objects/ShareInfo1.java new file mode 100644 index 00000000..993e85f0 --- /dev/null +++ b/src/main/java/com/rapid7/client/dcerpc/mssrvs/objects/ShareInfo1.java @@ -0,0 +1,110 @@ +/* + * Copyright 2017, Rapid7, Inc. + * + * License: BSD-3-clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + */ + +package com.rapid7.client.dcerpc.mssrvs.objects; + +import java.io.IOException; +import java.util.Objects; +import com.rapid7.client.dcerpc.io.PacketInput; +import com.rapid7.client.dcerpc.io.ndr.Alignment; +import com.rapid7.client.dcerpc.io.ndr.Unmarshallable; +import com.rapid7.client.dcerpc.objects.WChar; + +/** + * Alignment: 4 + * SHARE_INFO_1 + *The SHARE_INFO_0 structure contains the name of the shared resource. For a description of the fields in this structure, see the description for the SHARE_INFO_502_I (section 2.2.4.26) structure (shi0_xxx denotes the same information as shi502_xxx). + * + * typedef struct _SHARE_INFO_0 { + * [string] wchar_t* shi0_netname; + * } SHARE_INFO_0, + * *PSHARE_INFO_0, + * LPSHARE_INFO_0;
+ */ +public class ShareInfo1 extends ShareInfo0 { + //The SHARE_INFO_1 structure contains information about the shared resource, including the name and type of the resource and a comment associated with the resource. For a description of the fields in this structure, see the description for the SHARE_INFO_502_I (section 2.2.4.26) structure (shi1_xxx denotes the same information as shi502_xxx). + * + * typedef struct _SHARE_INFO_1 { + * [string] wchar_t* shi1_netname; + * DWORD shi1_type; + * [string] wchar_t* shi1_remark; + * } SHARE_INFO_1, + * *PSHARE_INFO_1, + * *LPSHARE_INFO_1;
+ */ +public class ShareInfo2 extends ShareInfo1 { + //The SHARE_INFO_2 structure contains information about the shared resource, including the name, type, and permissions of the resource, comments associated with the resource, the maximum number of concurrent connections, the number of current connections, the local path for the resource, and a password for the current connection. For a description of the fields in this structure, see the description for the SHARE_INFO_502_I (section 2.2.4.26) structure (shi2_xxx denotes the same information as shi502_xxx). + * + * typedef struct _SHARE_INFO_2 { + * [string] wchar_t* shi2_netname; + * DWORD shi2_type; + * [string] wchar_t* shi2_remark; + * DWORD shi2_permissions; + * DWORD shi2_max_uses; + * DWORD shi2_current_uses; + * [string] wchar_t* shi2_path; + * [string] wchar_t* shi2_passwd; + * } SHARE_INFO_2, + * *PSHARE_INFO_2, + * *LPSHARE_INFO_2;
+ */ +public class ShareInfo501 extends ShareInfo1 { + //The SHARE_INFO_501 structure contains information about the shared resource, including the name and type of the resource and a comment that is associated with the resource. For a description of the fields in this structure, see the description for the SHARE_INFO_502_I (section 2.2.4.26) structure (shi501_netname, shi501_type, and shi501_remark denote the same information as shi502_xxx in section 2.2.4.26, and shi501_flags denotes the same information as shi1005_flags in section 2.2.4.29). + * + * typedef struct _SHARE_INFO_501 { + * [string] wchar_t* shi501_netname; + * DWORD shi501_type; + * [string] wchar_t* shi501_remark; + * DWORD shi501_flags; + * } SHARE_INFO_501, + * *PSHARE_INFO_501, + * *LPSHARE_INFO_501;
+ */ +public class ShareInfo502 extends ShareInfo2 { + //The SHARE_INFO_502_I structure contains information about the shared resource, including the name of the resource, type, and permissions, the number of connections, and other pertinent information. + * + * typedef struct _SHARE_INFO_502_I { + * [string] WCHAR* shi502_netname; + * DWORD shi502_type; + * [string] WCHAR* shi502_remark; + * DWORD shi502_permissions; + * DWORD shi502_max_uses; + * DWORD shi502_current_uses; + * [string] WCHAR* shi502_path; + * [string] WCHAR* shi502_passwd; + * DWORD shi502_reserved; + * [size_is(shi502_reserved)] unsigned char* shi502_security_descriptor; + * } SHARE_INFO_502_I, + * *PSHARE_INFO_502_I, + * *LPSHARE_INFO_502_I; + * + * shi502_netname: A pointer to a null-terminated Unicode UTF-16 string that specifies the name of a shared resource. The server MUST ignore this member when processing the NetrShareSetInfo (section 3.1.4.11) method. + * shi502_type: Specifies a DWORD value that indicates the type of share. The server MUST ignore this member when processing the NetrShareSetInfo method; otherwise, it MUST be one of the values that are listed in section 2.2.2.4. + * shi502_remark: A pointer to a null-terminated Unicode UTF-16 string that specifies an optional comment about the shared resource. + * shi502_permissions: This field is not used. The server MUST ignore the value of this parameter on receipt. + * shi502_max_uses: Specifies a DWORD value that indicates the maximum number of concurrent connections that the shared resource can accommodate. If the value that is specified by shi502_max_uses is 0xFFFFFFFF, the maximum number of connections MUST be unlimited. + * shi502_current_uses: Specifies a DWORD value that indicates the number of current connections to the resource. The server MUST ignore this member on receipt. + * shi502_path: A pointer to a null-terminated Unicode UTF-16 string that contains the local path for the shared resource. For disks, shi502_path is the path that is being shared. For print queues, shi502_path is the name of the print queue that is being shared. For communication devices, shi502_path is the name of the communication device that is being shared. For interprocess communications (IPC), shi502_path is the name of the interprocess communication that is being shared. The server MUST ignore this member when processing the NetrShareSetInfo method. + * shi502_passwd: This field is not used. The client MUST send a NULL (zero-length) string and the server MUST ignore the value of this parameter on receipt. + * shi502_reserved: The length of the security descriptor that is being passed in the shi502_security_descriptor member. + * shi502_security_descriptor: Specifies the SECURITY_DESCRIPTOR, as described in [MS-DTYP] section 2.4.6, that is associated with this share.
+ */ +public class ShareInfo503 extends ShareInfo2 { + //The SHARE_INFO_503_I structure contains information about the shared resource, including the name of the resource, type, and permissions, the number of connections, and other pertinent information. + * + * typedef struct _SHARE_INFO_503_I { + * [string] WCHAR* shi503_netname; + * DWORD shi503_type; + * [string] WCHAR* shi503_remark; + * DWORD shi503_permissions; + * DWORD shi503_max_uses; + * DWORD shi503_current_uses; + * [string] WCHAR* shi503_path; + * [string] WCHAR* shi503_passwd; + * [string] WCHAR* shi503_servername; + * DWORD shi503_reserved; + * [size_is(shi503_reserved)] PUCHAR shi503_security_descriptor; + * } SHARE_INFO_503_I, + * *PSHARE_INFO_503_I, + * *LPSHARE_INFO_503_I; + * + * shi503_netname: A pointer to a null-terminated Unicode UTF-16 string that specifies the name of a shared resource. The server MUST ignore this member when processing the NetrShareSetInfo (section 3.1.4.11) method. + * shi503_type: Specifies a DWORD value that indicates the type of share. The server MUST ignore this member when processing the NetrShareSetInfo method. Otherwise, it MUST be one of the values listed in section 2.2.2.4. + * shi503_remark: A pointer to a null-terminated Unicode UTF-16 string that specifies an optional comment about the shared resource. + * shi503_permissions: This field is not used. The server MUST ignore the value of this parameter on receipt. + * shi503_max_uses: Specifies a DWORD value that indicates the maximum number of concurrent connections that the shared resource can accommodate. If the value is 0xFFFFFFFF, the maximum number of connections MUST be unlimited. + * shi503_current_uses: Specifies a DWORD value that indicates the number of current connections to the resource. The server MUST ignore this member on receipt. + * shi503_path: A pointer to a null-terminated Unicode UTF-16 string that contains the local path for the shared resource. For disks, it is the path being shared. For print queues, it is the name of the print queue being shared. The server MUST ignore this member when processing the NetrShareSetInfo method. + * shi503_passwd: This field is not used. The client MUST send a NULL (zero-length) string, and the server MUST ignore the value of this parameter on receipt. + * shi503_servername: A pointer to a string that specifies the DNS or NetBIOS name of the server on which the shared resource resides. It SHOULD be either "*" or the string matching one of the server names. Otherwise, the default server name will be used in [shi503_netname, default server name] to locate a scoped share as specified in section 2.2.4.102. A value of "*" indicates that there is no configured server name. + * shi503_reserved: The length of the security descriptor passed in the shi503_security_descriptor member. + * shi503_security_descriptor: Specifies the SECURITY_DESCRIPTOR, as described in [MS-DTYP] section 2.4.6, that is associated with this share.
+ */ + public static class ShareInfo0Container extends ShareInfoContainerThe SHARE_INFO_0_CONTAINER structure contains a value that indicates the number of entries that the NetrShareEnum method returns and a pointer to the buffer that contains the entries. + * + * typedef struct _SHARE_INFO_0_CONTAINER { + * DWORD EntriesRead; + * [size_is(EntriesRead)] LPSHARE_INFO_0 Buffer; + * } SHARE_INFO_0_CONTAINER; + * + * EntriesRead: The number of entries returned by the method. + * Buffer: A pointer to the SHARE_INFO_0 entries returned by the method.
+ */ + public static class ShareInfo1Container extends ShareInfoContainerThe SHARE_INFO_1_CONTAINER structure contains a value that indicates the number of entries that the NetrShareEnum method returns and a pointer to the buffer that contains the entries. + * + * typedef struct _SHARE_INFO_1_CONTAINER { + * DWORD EntriesRead; + * [size_is(EntriesRead)] LPSHARE_INFO_1 Buffer; + * } SHARE_INFO_1_CONTAINER; + * + * EntriesRead: The number of entries returned by the method. + * Buffer: A pointer to the SHARE_INFO_1 entries returned by the method.
+ */ + public static class ShareInfo2Container extends ShareInfoContainerThe SHARE_INFO_2_CONTAINER structure contains a value that indicates the number of entries that the NetrShareEnum method returns and a pointer to the buffer that contains the entries. + * + * typedef struct _SHARE_INFO_2_CONTAINER { + * DWORD EntriesRead; + * [size_is(EntriesRead)] LPSHARE_INFO_2 Buffer; + * } SHARE_INFO_2_CONTAINER, + * *PSHARE_INFO_2_CONTAINER, + * *LPSHARE_INFO_2_CONTAINER; + * + * EntriesRead: The number of entries returned by the method. + * Buffer: A pointer to the SHARE_INFO_2 entries returned by the method.
+ */ + public static class ShareInfo501Container extends ShareInfoContainerThe SHARE_INFO_501_CONTAINER structure contains a value that indicates the number of entries that the NetrShareEnum method returns and a pointer to the buffer that contains the entries. + * + * typedef struct _SHARE_INFO_501_CONTAINER { + * DWORD EntriesRead; + * [size_is(EntriesRead)] LPSHARE_INFO_501 Buffer; + * } SHARE_INFO_501_CONTAINER, + * *PSHARE_INFO_501_CONTAINER, + * *LPSHARE_INFO_501_CONTAINER; + * + * EntriesRead: The number of entries returned by the method. + * Buffer: A pointer to the SHARE_INFO_501 entries returned by the method.
+ */ + public static class ShareInfo502Container extends ShareInfoContainerThe SHARE_INFO_502_CONTAINER structure contains a value that indicates the number of entries that the NetrShareEnum method returns and a pointer to the buffer that contains the entries. + * + * typedef struct _SHARE_INFO_502_CONTAINER { + * DWORD EntriesRead; + * [size_is(EntriesRead)] LPSHARE_INFO_502_I Buffer; + * } SHARE_INFO_502_CONTAINER, + * *PSHARE_INFO_502_CONTAINER, + * *LPSHARE_INFO_502_CONTAINER; + * + * EntriesRead: The number of entries returned by the method. + * Buffer: A pointer to the SHARE_INFO_502_I entries returned by the method.
+ */ + public static class ShareInfo503Container extends ShareInfoContainerThe SHARE_INFO_503_CONTAINER structure contains a value that indicates the number of entries the NetrShareEnum method returns and a pointer to the buffer that contains the entries. + * + * typedef struct _SHARE_INFO_503_CONTAINER { + * DWORD EntriesRead; + * [size_is(EntriesRead)] LPSHARE_INFO_503_I Buffer; + * } SHARE_INFO_503_CONTAINER, + * *PSHARE_INFO_503_CONTAINER, + * *LPSHARE_INFO_503_CONTAINER; + * + * EntriesRead: The number of entries returned by the method. + * Buffer: A pointer to the SHARE_INFO_503_I entries returned by the method.