#include <revolution/net.h>
s32 NETGetStartupErrorCode( s32 soErr );
| soErr | The return value from the SOStartup function. |
Returns a value equal to -1 multiplied by the five-digit error code displayed for the user, corresponding to the error value returned by the SOStartup function.
This function converts the error value returned by the SOStartup function to a five-digit error code that can be displayed to the user. The NETGetStartupErrorCode function determines the type of network interface currently in use internally and stores the appropriate interface type as the last two digits of the error code. Since the return value is negative, be sure to reverse positive and negative in order to obtain the actual error code displayed for the user.
| Interface Types | SOStartup Error Values | Converted Error Codes | |
|---|---|---|---|
| all types | a non-error value >= 0 | NET_ECODE_OK | 00000 |
| all types | SO_EFATAL | NET_ECODE_STARTUP_FAILED | 50100 |
| all types | SO_ENOENT | NET_ECODE_NO_ENABLED_CONFIG | 50200 |
| all types | SO_EINVAL | NET_ECODE_INVALID_CONFIG | 50300 |
| Wii LAN adapter (Ethernet) | SO_ENXIO | NET_ECODE_DEVICE_NOT_EXISTS | 504xx |
| wireless | SO_ERR_LINK_UP_TIMEOUT | NET_ECODE_AP_NOT_FOUND | 510xx |
| Wii LAN adapter (Ethernet) | SO_ERR_LINK_UP_TIMEOUT | NET_ECODE_WIRED_LINK_UP_FAILED | 514xx |
| wireless | SO_ERR_LINK_DOWN | NET_ECODE_WIRELESS_LINK_UP_FAILED | 513xx |
| Wii LAN adapter (Ethernet) | SO_ERR_LINK_DOWN | NET_ECODE_WIRED_LINK_UP_FAILED | 514xx |
| wireless | SO_ENOLINK | NET_ECODE_WIRELESS_LINK_UP_FAILED | 513xx |
| Wii LAN adapter (Ethernet) | SO_ENOLINK | NET_ECODE_WIRED_LINK_UP_FAILED | 514xx |
| wireless | SO_ETIMEDOUT | NET_ECODE_WIRELESS_LINK_UP_FAILED | 513xx |
| Wii LAN adapter (Ethernet) | SO_ETIMEDOUT | NET_ECODE_WIRED_LINK_UP_FAILED | 514xx |
| wireless | SO_ENETRESET | NET_ECODE_WIRELESS_LINK_UP_FAILED | 513xx |
| Wii LAN adapter (Ethernet) | SO_ENETRESET | NET_ECODE_WIRED_LINK_UP_FAILED | 514xx |
| all types | SO_ERR_DHCP_TIMEOUT | NET_ECODE_DHCP_FAILED | 520xx |
| all types | SO_ERR_DHCP_EXPIRED | NET_ECODE_DHCP_FAILED | 520xx |
| all types | SO_ERR_DHCP_NAK | NET_ECODE_DHCP_FAILED | 520xx |
| all types | SO_ERR_ADDR_COLLISION | NET_ECODE_ADDR_COLLISION | 527xx |
| all types | all others | NET_ECODE_STARTUP_FAILED | 50100 |
| Interface Types | Interface Type Values | Comments |
|---|---|---|
| Wii LAN adapter (Ethernet) | 20~22 | The last digit corresponds to the the number of the connection target setting |
| wireless connection other than via the Nintendo Wi-Fi USB Connector | 30~32 | The last digit corresponds to the the number of the connection target setting |
| Nintendo Wi-Fi USB Connector | 40~42 | The last digit corresponds to the the number of the connection target setting |
| unknown | 99 |
None.
2008/8/4 Clarified that the return value is negative
2007/1/30 Initial version
CONFIDENTIAL