DWC_SVLGetTokenAsync

Syntax

#include <dwc.h> 
BOOL DWC_SVLGetTokenAsync(char *svl,
                          DWCSvlResult *result);

Arguments

svl A 4-character ASCII string (null-terminated) used to specify the service locator information to get.
Usually, you should get default service allocator information by specifying an empty string.
result A pointer to the DWCSvlResult type variable to store the service locator information that is obtained.

Return Values

TRUE The process of getting service locator information was started.
FALSE The process of getting service locator information could not be started.

Description

Starts the process of getting service locator information from the Nintendo Authentication Server. After this function is called, periodically call the DWC_SVLProcess function to advance the process of getting service locator information.

The service locator information to get can be specified using the svl argument.

In some cases, a DWC error has been set when this function returns FALSE. Get the error status using the DWC_GetLastErrorEx function, and display the error message along with the error code as necessary.

The service locator is used when using an original or independent server. Before connecting to the independent server, get an authentication token (contained in the service locator information) from the Nintendo authentication server. When connecting to the independent server, send the obtained authentication token to the independent server and have this independent server confirm that the sender of the token was authenticated by the Nintendo Authentication Server.

For details on the operation of original servers, see the Independent Game Server Usage Manual. This manual only describes how to use the service locator feature.

The flow of operations for using the Service Locator is described below.

  1. Use the DWC_LoginAsync or DWC_NASLoginAsync function to perform authentication on the Nintendo authentication server and connect to Wi-Fi Connection.
  2. Call the DWC_SVLGetTokenAsync function and start the process of getting service locator information from the Nintendo Authentication Server. At this time, the memory allocation function that was configured with the DWC_InitForDevelopment or DWC_InitForProduction function is used to allocate the required work area.
  3. Regularly call the DWC_SVLProcess function to advance retrieval of service locator information, and confirm when this process has completed based on the function's return values. The work area is automatically released when the service locator process ends.
  4. Just as with the authentication process, the Nintendo authentication server checks that the source of the service locator information request is valid and, if so, returns the service locator information.
  5. After the retrieval of service locator information completes, the service locator information obtained from the Nintendo Authentication Server is stored in a DWCSvlResult variable. The service locator information that was obtained includes an authentication token to send to the independent server.
  6. Before connecting to the independent server, send the authentication token that was obtained to the independent server, and on the server side, check that the sender of the authentication token was authenticated by the Nintendo Authentication Server.

To get the correct authentication token, you must embed the template file for the master ROM corresponding to each game application ahead of time.

See Also

DWCSvlResult DWC_SVLProcess

Revision History

5.3
Revised the Description because the specification was changed to set the allocator using either the DWC_InitForDevelopment or DWC_InitForProduction functions, and not with the DWC_SetMemFunc function.

For the change log prior to 5.1 PR2, click here.   


CONFIDENTIAL