Export (0) Print
Expand All
Expand Minimize

SERVER_TRANSPORT_INFO_2 structure

The SERVER_TRANSPORT_INFO_2 structure contains information about the specified transport protocol, including the transport name and address. This information level is valid only for the NetServerTransportAddEx function.

Syntax


typedef struct _SERVER_TRANSPORT_INFO_2 {
  DWORD  svti2_numberofvcs;
  LMSTR  svti2_transportname;
  LPBYTE svti2_transportaddress;
  DWORD  svti2_transportaddresslength;
  LMSTR  svti2_networkaddress;
  LMSTR  svti2_domain;
  ULONG  svti2_flags;
} SERVER_TRANSPORT_INFO_2, *PSERVER_TRANSPORT_INFO_2, *LPSERVER_TRANSPORT_INFO_2;

Members

svti2_numberofvcs

Type: DWORD

The number of clients connected to the server that are using the transport protocol specified by the svti2_transportname member.

svti2_transportname

Type: LMSTR

A pointer to a NULL-terminated character string that contains the name of a transport device; for example,

\Device\NetBT_Tcpip_{2C9725F4-151A-11D3-AEEC-C3B211BD350B}

This string is Unicode if _WIN32_WINNT or FORCE_UNICODE are defined.

svti2_transportaddress

Type: LPBYTE

A pointer to a variable that contains the address the server is using on the transport device specified by the svti2_transportname member.

This member is usually the NetBIOS name that the server is using. In these instances, the name must be 16 characters long, and the last character must be a blank character (0x20).

svti2_transportaddresslength

Type: DWORD

The length, in bytes, of the svti2_transportaddress member. For NetBIOS names, the value of this member is 16 (decimal).

svti2_networkaddress

Type: LMSTR

A pointer to a NULL-terminated character string that contains the address the network adapter is using. The string is transport-specific.

You can retrieve this value only with a call to the NetServerTransportEnum function. You cannot set this value with a call to the NetServerTransportAdd function or the NetServerTransportAddEx function.)

This string is Unicode if _WIN32_WINNT or FORCE_UNICODE are defined.

svti2_domain

Type: LMSTR

A pointer to a NULL-terminated character string that contains the name of the domain to which the server should announce its presence. (When you call NetServerTransportEnum, this member is the name of the domain to which the server is announcing its presence.)

This string is Unicode if _WIN32_WINNT or FORCE_UNICODE are defined.

svti2_flags

Type: ULONG

This member can be a combination of the following bit values defined in the Lmserver.h header file.

ValueMeaning
SVTI2_REMAP_PIPE_NAMES

If this value is set for an endpoint, client requests arriving over the transport to open a named pipe are rerouted (remapped) to the following local pipe name:

$$\ServerName\PipeName

For more information on the use of this value, see the Remarks section.

SVTI2_SCOPED_NAME

If this value is set for an endpoint and there is an attempt to create a second transport with the same network address but a different transport name and conflicting settings for the SCOPED flag, this transport creation will fail. Thus, every registered transport for a given network address must have the same scoped setting.

For more information on the use of this value, see the Remarks section.

This value is defined on Windows Server 2008 and Windows Vista with SP1.

 

Remarks

The SERVER_TRANSPORT_INFO_2 structure is used by the NetServerTransportAddEx function to bind the specified server to the transport protocol.

An example of the use of the SVTI2_REMAP_PIPE_NAMES value follows. Call the NetServerTransportAddEx function to add a transport to the server, specifying the address of "MyServer" in the svti2_transportaddress member, and SVTI2_REMAP_PIPE_NAMES in the svti2_flags member. When a client attempts to open "Pipe" on "\\MyServer" the client will actually open $$MyServer\Pipe instead.

On Windows Server 2008 and Windows Vista with SP1, every name registered with the Windows remote file server (SRV) is designated as either a scoped name or a non-scoped name. Every share that is added to the system will then either be attached to all of the non-scoped names, or to a single scoped name. Applications that wish to use the scoping features are responsible for both registering the new name as a scoped endpoint and then creating the shares with an appropriate scope. In this way, legacy uses of the Network Management and Network Share Management functions are not affected in any way since they continue to register shares and names as non-scoped names.

A scoped endpoint is created by calling the NetServerTransportAddEx function with the level parameter set to 2 and the bufptr parameter pointed to a SERVER_TRANSPORT_INFO_2 structure with the SVTI2_SCOPED_NAME bit value set in svti2_flags member. A scoped endpoint is also created by calling the NetServerTransportAddEx function with the level parameter set to 3 and the bufptr parameter pointed to a SERVER_TRANSPORT_INFO_3 structure with the SVTI2_SCOPED_NAME bit value set in svti3_flags member.

When the SVTI2_SCOPED_NAME bit value is set for a transport, then shares can be added with a corresponding server name (the shi503_servername member of the SHARE_INFO_503 structure) in a scoped fashion using the NetShareAdd function. If there is no transport registered with the SVTI2_SCOPED_NAME bit value and the name provided in shi503_servername member, then the share add in a scoped fashion will not succeed.

The NetShareAdd function is used to add a scoped share on a remote server specified in the servername parameter. The remote server specified in the shi503_servername member of the SHARE_INFO_503 passed in the bufptr parameter must have been bound to a transport protocol using the NetServerTransportAddEx function as a scoped endpoint. The SVTI2_SCOPED_NAME flag must have been specified in the shi503_servername member of the SERVER_TRANSPORT_INFO_2 or SERVER_TRANSPORT_INFO_3 structure for the transport protocol. The NetShareDelEx function is used to delete a scoped share. The NetShareGetInfo and NetShareSetInfo functions are to used to get and set information on a scoped share.

Scoped endpoints are generally used by the cluster namespace.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Lmserver.h (include Lm.h)

See also

Network Management Overview
Network Management Structures
Server and Workstation Transport Functions
NetServerComputerNameAdd
NetServerComputerNameDel
NetServerTransportAdd
NetServerTransportAddEx
NetServerTransportDel
NetServerTransportEnum
NetShareAdd
NetShareDelEx
NetShareGetInfo
NetShareSetInfo
SERVER_TRANSPORT_INFO_0
SERVER_TRANSPORT_INFO_1
SERVER_TRANSPORT_INFO_3
SHARE_INFO_503

 

 

Community Additions

ADD
Show:
© 2014 Microsoft