4.3 Adding a Scoped Share With an Alias to a Server
The following figure shows the protocol message sequence for an administrator remotely configuring a server to support an additional server name, and configuring an alias for that new name.
Figure 3: Message sequence for adding a scoped share with an alias to a server
The client calls NetrServerTransportAddEx (Opnum 41) to bind the server to the transport protocol with svti3_transport_address set to "server", and SVTI2_SCOPED_NAME set to TRUE.
The server processes the transport add and returns the status NERR_Success.
The client calls NetrShareAdd (Opnum 14) to add a share on the server. Along with other share parameters, the shi303_servername field is set to "server".
The server processes the share add and returns the status NERR_Success.
The client calls NetrServerAliasAdd (Opnum 54) to add an alias, with srvai0_alias set to "server.example.com", srvai0_target set to "server", and srvai0_default set to FALSE.
The server processes the alias add, and returns the status NERR_Success.
On completion of these steps, a client connecting to the server and attempting to enumerate shares on this server and passing in "server" or "server.example.com" for the ServerName parameter for NetrShareEnum, would find only those shares that were added as specified in step 3 above. Clients connecting and attempting to enumerate shares on this server and passing in any other name for the ServerName parameter for NetrShareEnum would not see the shares added as specified in step 3 above. (Note that the administrator is responsible for configuring the network such that the names "server" and "server.example.com" correctly resolve to the server above. This is not handled by NetrServerTransportAddEx (Opnum 41).)