次の方法で共有


2.5.5.2.1 RAP NetServerEnum2Request

The fields in the NetServerEnum2Request message MUST be set as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

RAPOpcode

ParamDesc (variable)

...

DataDesc (variable)

...

RAPParams (variable)

...

RAPOpcode (2 bytes): MUST be set to 0x0068. For more information, see section 2.5.1.

ParamDesc (variable): MUST be set to "WrLehDO" if the Domain parameter is not specified, or set to "WrLehDz". For more information, see section 2.5.1.

DataDesc (variable): If InfoLevel shown in the following packet diagram is set to 0x0000, this MUST be set to "B16"; if InfoLevel is set to 0x0001, this MUST be set to "B16BBDz". For more information, see section 2.5.1.

RAPParams (variable): The RAPParams structure MUST be as follows:


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

InfoLevel

ReceiveBufferSize

ServerType

Domain (variable)

...

InfoLevel (2 bytes): A 16-bit unsigned integer that specifies the information level for the NetServerEnum2Request.

ReceiveBufferSize (2 bytes): A 16-bit unsigned integer that represents the maximum number of bytes of data that can be returned in the Data field of the SMB_COM_TRANSACTION response to the command.

ServerType (4 bytes): A 32-bit set of flags used to filter servers in the response to the NetServerEnum2 command. The ServerType field MUST be a bitmask composed of the possible values in the following table.

All unused bits SHOULD be set to zero when sent and MUST be ignored on receipt. If SV_TYPE_ALL (0xffffffff) is requested, the server MUST return all types of servers and MUST ignore unused bits.

Value

Meaning

SV_TYPE_WORKSTATION

0x00000001

A server running the WorkStation Service

SV_TYPE_SERVER

0x00000002

A server running the Server Service

SV_TYPE_SQLSERVER

0x00000004

Any server running with SQL Server

SV_TYPE_DOMAIN_CTRL

0x00000008

Primary domain controller

SV_TYPE_DOMAIN_BAKCTRL

0x00000010

Backup domain controller

SV_TYPE_TIME_SOURCE

0x00000020

Server is available as a time source for network time synchronization

SV_TYPE_AFP

0x00000040

Apple File Protocol server

SV_TYPE_NOVELL

0x00000080

Novell server

SV_TYPE_DOMAIN_MEMBER

0x00000100

LAN Manager 2.x domain member

SV_TYPE_PRINTQ_SERVER

0x00000200

Server sharing print queue

SV_TYPE_DIALIN_SERVER

0x00000400

Server running dial-in service

SV_TYPE_SERVER_UNIX, SV_TYPE_XENIX_SERVER

0x00000800

Unix or Xenix server

SV_TYPE_NT

0x00001000

Windows NT operating system, Windows 2000 operating system, Windows XP operating system, Windows Server 2003 operating system, Windows Vista operating system, Windows 7 operating system,  Windows 8 operating system, Windows Server 2008 operating system, Windows Server 2008 R2 operating system, or Windows Server 2012 operating system

SV_TYPE_WFW

0x00002000

Server running Windows for Workgroups

SV_TYPE_SERVER_MFPN

0x00004000

Microsoft File and Print for NetWare

SV_TYPE_SERVER_NT

0x00008000

Windows 2000 Server operating system, Windows Server 2003, or a server that is not a domain controller

SV_TYPE_POTENTIAL_BROWSER

0x00010000

Server that can run the browser service

SV_TYPE_BACKUP_BROWSER

0x00020000

Server running a browser service as backup

SV_TYPE_MASTER_BROWSER

0x00040000

Server running the master browser service

SV_TYPE_DOMAIN_MASTER

0x00080000

Server running the domain master browser

SV_TYPE_WINDOWS

0x00400000

Windows 95 operating system, Windows 98 operating system, or Windows Millennium Edition operating system

SV_TYPE_DFS

0x00800000

Root of a DFS tree

SV_TYPE_CLUSTER_NT

0x01000000

Server clusters available in the domain

SV_TYPE_TERMINALSERVER

0x02000000

Terminal server

SV_TYPE_CLUSTER_VS_NT

0x04000000

Cluster virtual servers available in the domain

SV_TYPE_DCE

0x10000000

IBM DSS (Directory and Security Services) or equivalent

SV_TYPE_ALTERNATE_XPORT

0x20000000

Return list for alternate transport<10>

SV_TYPE_LOCAL_LIST_ONLY

0x40000000

Servers maintained by the browser

SV_TYPE_DOMAIN_ENUM

0x80000000

Primary domain

SV_TYPE_ALL

0xFFFFFFFF

Return all of the servers mentioned previously

Domain (variable): If the ParamDesc is "WrLehDz", this field MUST contain a null-terminated ASCII string that represents the name of the workgroup or domain for which to enumerate computers. If the ParamDesc is "WrLehD0", then this field MUST NOT be present. If this string is not present or is empty (a single null byte), the server MUST return the list of servers for the server's current domain or workgroup.