/*---------------------------------------------------------------------------* Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ #ifndef NN_AC_AC_CONFIG_H_ #define NN_AC_AC_CONFIG_H_ #include #include #include #include // Macros representing errors in get-type functions: #define AC_CONFIG_NIC_ERROR_VALUE 0xff #define AC_CONFIG_MTU_ERROR_VALUE 0 #define AC_CONFIG_ADDRESS_ERROR_VALUE 0 #define AC_CONFIG_METHOD_ERROR_VALUE 0xff #define AC_CONFIG_PRIVACY_MODE_ERROR_VALUE 0xff #define AC_CONFIG_ETHER_SPEED_ERROR_VALUE 0xff #define AC_CONFIG_ETHER_COMMUNICATION_METHOD_ERROR_VALUE 0xff #define AC_CONFIG_ETHER_AUTO_NEGOTIATION_ERROR_VALUE 0xff #define AC_CONFIG_KEYID_ERROR_VALUE 0xff #define AC_CONFIG_PROXY_USE_ERROR_VALUE 0xff #define AC_CONFIG_PROXY_AUTH_TYPE_ERROR_VALUE 0xff #define AC_CONFIG_PROXY_PORT_ERROR_VALUE 0 #ifdef __cplusplus namespace nn { namespace ac { //! @addtogroup nn_ac_devapi_cpp //! @{ //! @name Wi-Fi and USB Ethernet Common Settings //! @{ /*! @brief Initializes the Config structure. (For development.) When this function is called, the Config structure indicated by pConfig is initialized. The initialized data is not for configuring Wi-Fi or USB ETH. Use the functions for setting Config parameters on the initialized Config structure to create data with the desired settings. This creates data with the desired settings. Use this function only during development. Do not use it in the production version of your software. @param[out] pConfig Config structure. */ void ClearConfig( Config* pConfig ); // For compatibility. It will be deleted. inline void SetDefaultConfig( Config* pConfig ) { ClearConfig( pConfig ); } /*! @brief Sets the network interface. (For development.)
ValueMeaning
AC_NIC_TYPE_WIFIWi-Fi
AC_NIC_TYPE_ETHWired (USB LAN adapter)
Note: The values AC_NIC_WIFI and AC_NIC_ETH are used during development. Do not mistakenly use these values. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] nic Specifies the network interface. */ void SetNetworkInterface( Config* pConfig, u16 nic ); /*! @brief Gets the network interface. (For development.) The values that can be obtained are AC_NIC_TYPE_WIFI or AC_NIC_TYPE_ETH. For the meanings of these values, see nn::ac::SetNetworkInterface. Also, AC_CONFIG_NIC_ERROR_VALUE is returned if neither has been finalized yet (such as immediately after calling the nn::ac::ClearConfig function). The same value is returned when Config is invalid (when NULL is specified). Note: The values AC_NIC_WIFI and AC_NIC_ETH are used during development. Do not mistakenly use these values. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the network interface. */ u16 GetNetworkInterface( const Config* pConfig ); /*! @brief Sets the MTU value. (For development.) The mtu parameter can be set to values between AC_MIN_MTU (576) and AC_MAX_MTU (1500). This parameter is set to AC_DEFAULT_INTERFACE_MTU (1400) when the nn::ac::ClearConfig function is called. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] mtu Specifies the MTU value. */ void SetMtu( Config* pConfig, u32 mtu ); /*! @brief Gets the MTU value. (For development.) Gets a value between AC_MIN_MTU (576) and AC_MAX_MTU (1500). If the function fails to get a value, AC_CONFIG_MTU_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the MTU value. */ u32 GetMtu( const Config* pConfig ); /*! @brief Sets the address assignment mode. (For development.)
ValueMeaning
AC_ADDR_DHCPAssignment by DHCP
AC_ADDR_STICKYAutomatic assignment
AC_ADDR_MANUALManual assignment
Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] mode Specifies the address assignment mode. */ void SetAddressObtainMode( Config* pConfig, u32 mode ); /*! @brief Gets the address assignment mode. (For development.) You can get the following values: AC_ADDR_DHCP, AC_ADDR_STICKY, or AC_ADDR_MANUAL. For the meanings of these values, see nn::ac::SetAddressObtainMode. If assignment fails, AC_CONFIG_ADDRES_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the address assignment mode. */ u32 GetAddressObtainMode( const Config* pConfig ); /*! @brief Sets the IP address. (For development.) Sets the IP address specified in pAddressStr. Specify a string in dot-decimal notation as xxx.xxx.xxx.xxx. (Each xxx is a value in the range from 0 through 255). Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pAddressStr The IP address. */ void SetDeviceIpAddress( Config* pConfig, const char* pAddressStr ); /*! @brief Gets the IP address. (For development.) The return value is a u32 long IP address. If assignment fails, AC_CONFIG_ADDRES_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the IP address. */ u32 GetDeviceIpAddress( const Config* pConfig ); /*! @brief Sets the subnet mask. (For development.) In pAddressStr, specify a string in dot-decimal notation as xxx.xxx.xxx.xxx. (Each xxx is a value in the range from 0 through 255). Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pAddressStr The IP address. */ void SetSubnetMask( Config* pConfig, const char* pAddressStr ); /*! @brief Gets the subnet mask. (For development.) The return value is a u32 long IP address. If assignment fails, AC_CONFIG_ADDRES_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the subnet mask. */ u32 GetSubnetMask( const Config* pConfig ); /*! @brief Sets the default gateway. (For development.) In pAddressStr, specify a string in dot-decimal notation as xxx.xxx.xxx.xxx. (Each xxx is a value in the range from 0 through 255). Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pAddressStr The IP address. */ void SetDefaultGateway( Config* pConfig, const char* pAddressStr ); /*! @brief Gets the default gateway. (For development.) The return value is a u32 long IP address. If assignment fails, AC_CONFIG_ADDRES_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the default gateway. */ u32 GetDefaultGateway( const Config* pConfig ); /*! @brief Sets the primary DNS server. (For development.) In pAddressStr, specify a string in dot-decimal notation as xxx.xxx.xxx.xxx. (Each xxx is a value in the range from 0 through 255). Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pAddressStr The IP address. */ void SetPrimaryDnsServer( Config* pConfig, const char* pAddressStr ); /*! @brief Gets the primary DNS server. (For development.) The return value is a u32 long IP address. If assignment fails, AC_CONFIG_ADDRES_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the primary DNS server. */ u32 GetPrimaryDnsServer( const Config* pConfig ); /*! @brief Sets the alternate DNS server. (For development.) In pAddressStr, specify a string in dot-decimal notation as xxx.xxx.xxx.xxx. (Each xxx is a value in the range from 0 through 255). Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pAddressStr The IP address. */ void SetAlternativeDnsServer( Config* pConfig, const char* pAddressStr ); /*! @brief Gets the alternate DNS server. (For development.) The return value is a u32 long IP address. If assignment fails, AC_CONFIG_ADDRES_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the alternate DNS server. */ u32 GetAlternativeDnsServer( const Config* pConfig ); //! @} //! @name Wi-Fi Settings //! @{ /*! @brief Sets the Wi-Fi configuration method. (For development.) The following values can be set in method.
ValueMeaning
AC_METHOD_MANUALSet manually.
AC_METHOD_WPSSet with WPS.
AC_METHOD_USBAPSet with USBAP.
AC_METHOD_AOSSSet with AOSS.
AC_METHOD_RAKURAKUSet using easy wireless start.
Normally, AC_METHOD_MANUAL is used. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] method Specifies the Wi-Fi configuration method */ void SetWifiConfigureMethod( Config* pConfig, u16 method ); /*! @brief Gets the Wi-Fi configuration method. (For development.) The value that can be obtained is AC_METHOD_xxx, where xxx is one of: MANUAL, WPS, USBAP, AOSS, or RAKURAKU. For the meanings of these values, see nn::ac::SetWifiConfigureMethod. If acquisition fails, AC_CONFIG_METHOD_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the Wi-Fi configuration method. */ u16 GetWifiConfigureMethod( const Config* pConfig ); /*! @brief Sets the privacy mode. (For development.) The following values can be set in mode.
ValueMeaning
AC_PRIVACY_MODE_NONENone
AC_PRIVACY_MODE_WEP40WEP (RC4 40-bit)
AC_PRIVACY_MODE_WEP104WEP (RC 104-bit)
AC_PRIVACY_MODE_WPA_PSK_TKIPWPA-PSK (TKIP)
AC_PRIVACY_MODE_WPA_PSK_AESWPA-PSK (AES)
AC_PRIVACY_MODE_WPA2_PSK_TKIPWPA2-PSK (TKIP)
AC_PRIVACY_MODE_WPA2_PSK_AESWPA2-PSK (AES)
AC_PRIVACY_MODE_WEPWEP (use prohibited)
AC_PRIVACY_MODE_WEP is provided for compatibility, and its use is normally prohibited. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] mode Specifies the privacy mode. */ void SetPrivacyMode( Config* pConfig, u16 mode ); /*! @brief Gets the privacy mode. (For development.) The values that can be obtained are in the form AC_PRIVACY_MODE_xxx. Replace xxx with one of the following: NONE, WEP40, WEP104, WPA_PSK_TKIP, WPA_PSK_AES, WPA2_PSK_TKIP, WPA2_PSK_AES, or WEP. For the meanings of these values, see nn::ac::SetPrivacyMode. If acquisition fails, AC_CONFIG_PRIVACY_MODE_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the privacy mode. */ u16 GetPrivacyMode( const Config* pConfig ); /*! @brief Sets the SSID. (For development.) The SSID string is specified in pSsidStr. The string must be valid up to the terminal character, and the string length must be AC_SSID_SIZE (32) or less. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[out] pSsidStr Specifies the SSID name string. */ void SetSsid( Config* pConfig, const char* pSsidStr ); /*! @brief Gets the SSID. (For development.) The length of the SSID string returned in pLength is the number of characters excluding the terminating character in the SSID string. The nn::ac::SetSsid function sets the SSID string. The pointer returned points to the beginning of the SSID string. It is important to note, however, that the string has no terminating null character if the SSID is set to greater than AC_SSID_SIZE. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[out] pLength Specifies the length of the SSID string. @return Returns the SSID. */ const char* GetSsid( const Config* pConfig, int* pLength ); //! @} //! @name USB Ethernet Settings //! @{ /*! @brief Sets the Ethernet speed. (For development.) The following values can be specified in speed. Use this function only during development. Do not use it in the production version of your software.
ValueMeaning
AC_ETH_LINK_SPEED_10M10 Mbps
AC_ETH_LINK_SPEED_100M100 Mbps
@param[in] pConfig Specifies the Config structure. @param[in] speed Speed */ void SetEthernetSpeed( Config* pConfig, u16 speed ); /*! @brief Gets the Ethernet speed. (For development.) The values that can be obtained are AC_ETH_LINK_SPEED_10M or AC_ETH_LINK_SPEED_100M. For the meanings of these values, see nn::ac::SetEthernetSpeed. If acquisition fails, AC_CONFIG_ETHER_SPEED_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. Note: Due to constraints of the Wii U console, wired connections are always configured with auto-negotiation ON, the speed parameter as 0, and the communication method parameter as 0, regardless of the configuration written with nn::ac::WriteConfig. These constraints may change in the future. @param[in] pConfig Specifies the Config structure. @return Returns the SSID. */ u16 GetEthernetSpeed( const Config* pConfig ); /*! @brief Sets the Ethernet communication method. (For development.) The following values can be specified in duplex.
ValueMeaning
AC_ETH_LINK_HALF_DUPLEXHalf-duplex
AC_ETH_LINK_FULL_DUPLEXFull-duplex
Use this function only during development. Do not use it in the production version of your software. Note: Due to constraints of the Wii U console, wired connections are always configured with auto-negotiation ON, the speed parameter as 0, and the communication method parameter as 0, regardless of the configuration written with nn::ac::WriteConfig. These constraints may change in the future. @param[in] pConfig Specifies the Config structure. @param[in] duplex Communication method. */ void SetEthernetCommunicationMethod( Config* pConfig, u16 duplex ); /*! @brief Gets the Ethernet communication method. (For development.) The values that can be obtained are AC_ETH_LINK_HALF_DUPLEX or AC_ETH_LINK_FULL_DUPLEX. For the meanings of these values, see nn::ac::GetEthernetCommunicationMethod. If acquisition fails, AC_CONFIG_ETHER_COMMUNICATION_METHOD_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Communication method. */ u16 GetEthernetCommunicationMethod( const Config* pConfig ); /*! @brief Sets whether there is auto-negotiation. (For development.) The following values can be specified in negotiation.
ValueMeaning
AC_ETH_AUTO_NEGOTIATION_OFFAuto-negotiation OFF
AC_ETH_AUTO_NEGOTIATION_ONAuto-negotiation ON
Use this function only during development. Do not use it in the production version of your software. Note: Due to constraints of the Wii U console, wired connections are always configured with auto-negotiation ON, the speed parameter as 0, and the communication method parameter as 0, regardless of the configuration written with nn::ac::WriteConfig. These constraints may change in the future. @param[in] pConfig Specifies the Config structure. @param[in] negotiation Whether there is auto-negotiation. */ void SetEthernetAutoNegotiation( Config* pConfig, u16 negotiation ); /*! @brief Gets whether there is auto-negotiation. (For development.) The values that can be obtained are AC_ETH_AUTO_NEGOTIATION_OFF or AC_ETH_AUTO_NEGOTIATION_OFF. For the meanings of these values, see nn::ac::GetEthernetAutoNegotiation. If acquisition fails, AC_CONFIG_ETHER_AUTO_NEGOTIATION_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Whether there is auto-negotiation. */ u16 GetEthernetAutoNegotiation( const Config* pConfig ); //! @} //! @name Privacy Settings //! @{ // WEP40 Settings /*! @brief Sets the WEP-40 key. (For development.) Specifies the WEP-40 key with index in the range from 0 through 3. When not specified, NULL can be specified. The five bytes from the address pointed to by pKeyStr are copied as the WEP key. pKeyStr does not require a terminating character. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] index Specifies the index. @param[in] pKeyStr Specifies the key string. */ void SetWep40Key( Config* pConfig, int index, const char* pKeyStr ); /*! @brief Gets the WEP-40 key. (For development.) This function returns a pointer to a five-character string comprising the WEP-40 key for the specified index. The storage region for the string is continuous, so it does not contain a terminating character. For this reason, the returned pointer itself cannot be used as a pointer to the string. It simply indicates the start of a 5-byte data array. When handled as a string, copy the 5 bytes to a 6-byte or greater region, and then add the NULL terminator to the end of it. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] index Specifies the index. @return Returns the WEP-40 key. */ const char* GetWep40Key( const Config* pConfig, int index ); /*! @brief Sets the WEP-40 key ID. (For development.) Specifies the index of the WEP-40 key to use. Use a value in the range from 0 through 3. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] index Specifies the index. */ void SetWep40KeyId( Config* pConfig, int index ); /*! @brief Gets the WEP-40 key ID. (For development.) You can get values in the range from 0 through 3. If acquisition fails, AC_CONFIG_KEYID_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the WEP-40 key ID. */ int GetWep40KeyId( const Config* pConfig ); // WEP104 Settings /*! @brief Sets the WEP-104 key. (For development.) Specifies a WEP-104 key with an index of 0 to 3. When not specified, NULL can be specified. For the WEP key, the 13 bytes from the pointer indicated with pKeyStr are copied. pKeyStr does not require a terminating character. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] index Specifies the index. @param[in] pKeyStr Specifies the key string. */ void SetWep104Key( Config* pConfig, int index, const char* pKeyStr ); /*! @brief Gets the WEP-104 key. (For development.) This function returns a pointer to a 13-character string comprising the WEP-104 key for the specified index. The storage region for the string is continuous, so it does not contain a terminating character. For this reason, the returned pointer itself cannot be used as a pointer to the string. It simply indicates the start of a 13-byte data array. When handled as a string, copy the 13 bytes to a 14-byte or greater region, and then add the NULL terminator to the end of it. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] index Specifies the index. @return Returns the WEP-104 key. */ const char* GetWep104Key( const Config* pConfig, int index ); /*! @brief Sets the WEP-104 key ID. (For development.) Specifies the index of the WEP-40 key to use. Use a value in the range from 0 through 3. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] index Specifies the index. */ void SetWep104KeyId( Config* pConfig, int index ); /*! @brief Gets the WEP-104 key ID. (For development.) You can get values in the range from 0 through 3. If acquisition fails, AC_CONFIG_KEYID_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the WEP-40 key ID. */ int GetWep104KeyId( const Config* pConfig ); /*! @brief Sets the TKIP key. (For development.) The encryption method must be either WPA_PSK_TKIP or WPA2_PSK_TKIP. Copies the number of bytes indicated by keyLength, starting from the address that pKey points to. The length is specified by keyLength, so a terminating character is unnecessary. Specify a value in the range from 1 through 63 for keyLength. (With the TKIP specifications, the key must contain only displayable ASCII characters, and be between 8 and 63 characters long Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pKey Specifies the key string. @param[in] keyLength Specifies the key length. */ void SetTkipKey( Config* pConfig, const u8* pKey, int keyLength ); /*! @brief Gets the TKIP key. (For development.) The pointer returned by this function is to the beginning of the TKIP key region in pConfig. Do not handle it as a string as is. The key length returned in pKeyLength is the length of the key set with nn::ac::SetTkipKey. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[out] pKeyLength Specifies the key length. @return Returns the TKIP key. */ const u8* GetTkipKey( const Config* pConfig, int* pKeyLength ); /*! @brief Sets the AES key. (For development.) The encryption method must be either WPA_PSK_AES or WPA2_PSK_AES. Copies the number of bytes indicated by keyLength, starting from the address that pKey points to. The length is specified by keyLength, so a terminating character is unnecessary. Specify a value in the range from 1 through 63 for keyLength. (With the AES specifications, the key must contain only displayable ASCII characters, and be between 8 and 63 characters long.) Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pKey Specifies the key string. @param[in] keyLength Specifies the key length. */ void SetAesKey( Config* pConfig, const u8* pKey, int keyLength ); /*! @brief Gets the AES key. (For development.) The pointer returned by this function is to the beginning of the AES key region in pConfig. Do not handle it as a string as is. The key length returned in pKeyLength is the length of the key set with nn::ac::SetAesKey. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[out] pKeyLength Specifies the key length. @return Returns the AES key. */ const u8* GetAesKey( const Config* pConfig, int* pKeyLength ); //! @} //! @name Proxy Settings //! @{ /*! @brief Sets whether a proxy is used. (For development.) The following values can be specified in use.
ValueMeaning
AC_PROXY_STATE_DISABLEDo not use a proxy.
AC_PROXY_STATE_ENABLEUse a proxy.
Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] use Specifies whether to use. */ void SetProxyUse( Config* pConfig, u16 use ); /*! @brief Gets whether a proxy is used. (For development.) The values that can be obtained are AC_PROXY_STATE_DISABLE or AC_ROXY_STATE_ENABLE. For the meanings of these values, see nn::ac::SetProxyUse. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns whether a proxy is used. */ u16 GetProxyUse( const Config* pConfig ); /*! @brief Sets the proxy port. (For development.) The values that can specified with port are AC_MIN_PROXY_PORT_NUMBER (1) or greater, and AC_MAX_PROXY_PORT_NUMBER (65535) or smaller. Immediately after the nn::ac::ClearConfig function is called, AC_DEFAULT_PROXY_PORT (80) is stored. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] port Specifies the port number. */ void SetProxyPort( Config* pConfig, u16 port ); /*! @brief Gets the proxy port. (For development.) The values that can be obtained are AC_MIN_PROXY_PORT_NUMBER (1) or greater, and AC_MAX_PROXY_PORT_NUMBER (65535) or smaller. When pConfig is NULL, AC_CONFIG_PROXY_PORT_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the proxy port. */ u16 GetProxyPort( const Config* pConfig ); /*! @brief Sets the proxy authentication type. (For development.)
ValueMeaning
AC_PROXY_AUTH_TYPE_NONENo authentication
AC_PROXY_AUTH_TYPE_BASICBasic authentication
AC_PROXY_AUTH_TYPE_DIGESTDigest authentication
AC_PROXY_AUTH_TYPE_NTLMNTLM authentication
AC_PROXY_AUTH_TYPE_ANYAutomatic selection of the authentication type suitable for libcurl.
Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] authType Specifies the authentication type. */ void SetProxyAuthType( Config* pConfig, u32 authType ); /*! @brief Gets the proxy authentication type. (For development.) AC_PROXY_AUTH_TYPE_xxx can be obtained, where xxx is one of NONE, BASIC, DIGEST, NTLM, or ANY. For the meanings of these values, see nn::ac::SetPTypes. When pConfig is NULL, AC_CONFIG_PROXY_AUTH_TYPE_ERROR_VALUE is returned. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the proxy authentication type. */ u32 GetProxyAuthType( const Config* pConfig ); /*! @brief Sets the proxy hostname. (For development.) Strings that can be specified in pHostName can be up to AC_MAX_PROXY_HOST_LEN - 1 characters long, because a terminal character is required. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pHostName Specifies the hostname. */ void SetProxyHostName( Config* pConfig, const char* pHostName ); /*! @brief Gets the proxy hostname. (For development.) Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the proxy hostname. */ const char* GetProxyHostName( const Config* pConfig ); /*! @brief Sets the proxy user name. (For development.) Strings that can be specified in pName can be up to AC_MAX_PROXY_USERNAME_LEN - 1 characters long, because a terminal character is required. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pName User name. */ void SetProxyUserName( Config* pConfig, const char* pName ); /*! @brief Gets the proxy user name. (For development.) Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the proxy user name. */ const char* GetProxyUserName( const Config* pConfig ); /*! @brief Sets the proxy password. (For development.) Strings that can be specified in pPassword can be up to AC_MAX_PROXY_PASSWORD_LEN - 1 characters long, because a terminating character is required. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pPassword Password. */ void SetProxyPassword( Config* pConfig, const char* pPassword ); /*! @brief Gets the proxy password. (For development.) Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns the proxy password. */ const char* GetProxyPassword( const Config* pConfig ); /*! @brief Sets a host that does not use a proxy. (For development.) Strings that can be specified in pNoProxyHosts can be up to AC_MAX_NO_PROXY_HOSTS_LEN - 1 characters long, because a terminating character is required. Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @param[in] pNoProxyHosts Host that does not use a proxy */ void SetProxyNoproxyHosts( Config* pConfig, const char* pNoProxyHosts ); /*! @brief Gets a host that does not use a proxy. (For development.) Use this function only during development. Do not use it in the production version of your software. @param[in] pConfig Specifies the Config structure. @return Returns a host that does not use a proxy. */ const char* GetProxyNoproxyHosts( const Config* pConfig ); //! @} //! @} } // namespace ac } // namespace nn #endif //! @addtogroup nn_ac_devapi_c //! @{ //! @name Wi-Fi and USB Ethernet Common Settings //! @{ /*! @brief See the corresponding C++ function @ref nn::ac::ClearConfig. */ NN_EXTERN_C void ACClearConfig( ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetNetworkInterface. */ NN_EXTERN_C void ACSetNetworkInterface( ACConfig* pConfig, u16 nic ); /*! @brief See the corresponding C++ function @ref nn::ac::GetNetworkInterface. */ NN_EXTERN_C u16 ACGetNetworkInterface( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetMtu. */ NN_EXTERN_C void ACSetMtu( ACConfig* pConfig, u32 mtu ); /*! @brief See the corresponding C++ function @ref nn::ac::GetMtu. */ NN_EXTERN_C u32 ACGetMtu( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetAddressObtainMode. */ NN_EXTERN_C void ACSetAddressObtainMode( ACConfig* pConfig, u32 mode ); /*! @brief See the corresponding C++ function @ref nn::ac::GetAddressObtainMode. */ NN_EXTERN_C u32 ACGetAddressObtainMode( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetDeviceIpAddress. */ NN_EXTERN_C void ACSetDeviceIpAddress( ACConfig* pConfig, const char* pAddressStr ); /*! @brief See the corresponding C++ function @ref nn::ac::GetDeviceIpAddress. */ NN_EXTERN_C u32 ACGetDeviceIpAddress( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetSubnetMask. */ NN_EXTERN_C void ACSetSubnetMask( ACConfig* pConfig, const char* pAddressStr ); /*! @brief See the corresponding C++ function @ref nn::ac::GetSubnetMask. */ NN_EXTERN_C u32 ACGetSubnetMask( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetDefaultGateway. */ NN_EXTERN_C void ACSetDefaultGateway( ACConfig* pConfig, const char* pAddressStr ); /*! @brief See the corresponding C++ function @ref nn::ac::GetDefaultGateway. */ NN_EXTERN_C u32 ACGetDefaultGateway( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetPrimaryDnsServer. */ NN_EXTERN_C void ACSetPrimaryDnsServer( ACConfig* pConfig, const char* pAddressStr ); /*! @brief See the corresponding C++ function @ref nn::ac::GetPrimaryDnsServer. */ NN_EXTERN_C u32 ACGetPrimaryDnsServer( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetAlternativeDnsServer. */ NN_EXTERN_C void ACSetAlternativeDnsServer( ACConfig* pConfig, const char* pAddressStr ); /*! @brief See the corresponding C++ function @ref nn::ac::GetAlternativeDnsServer. */ NN_EXTERN_C u32 ACGetAlternativeDnsServer( const ACConfig* pConfig ); //! @} //! @name Wi-Fi Settings //! @{ /*! @brief See the corresponding C++ function @ref nn::ac::SetWifiConfigureMethod. */ NN_EXTERN_C void ACSetWifiConfigureMethod( ACConfig* pConfig, u16 method ); /*! @brief See the corresponding C++ function @ref nn::ac::GetWifiConfigureMethod. */ NN_EXTERN_C u16 ACGetWifiConfigureMethod( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetPrivacyMode. */ NN_EXTERN_C void ACSetPrivacyMode( ACConfig* pConfig, u16 mode ); /*! @brief See the corresponding C++ function @ref nn::ac::GetPrivacyMode. */ NN_EXTERN_C u16 ACGetPrivacyMode( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetSsid. */ NN_EXTERN_C void ACSetSsid( ACConfig* pConfig, const char* pSsidStr ); /*! @brief See the corresponding C++ function @ref nn::ac::GetSsid. */ NN_EXTERN_C const char* ACGetSsid( const ACConfig* pConfig, int* pLength ); //! @} //! @name USB Ethernet Settings //! @{ /*! @brief See the corresponding C++ function @ref nn::ac::SetEthernetSpeed. */ NN_EXTERN_C void ACSetEthernetSpeed( ACConfig* pConfig, u16 speed ); /*! @brief See the corresponding C++ function @ref nn::ac::GetEthernetSpeed. */ NN_EXTERN_C u16 ACGetEthernetSpeed( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetEthernetCommunicationMethod. */ NN_EXTERN_C void ACSetEthernetCommunicationMethod( ACConfig* pConfig, u16 duplex ); /*! @brief See the corresponding C++ function @ref nn::ac::GetEthernetCommunicationMethod. */ NN_EXTERN_C u16 ACGetEthernetCommunicationMethod( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetEthernetAutoNegotiation. */ NN_EXTERN_C void ACSetEthernetAutoNegotiation( ACConfig* pConfig, u16 negotiation ); /*! @brief See the corresponding C++ function @ref nn::ac::GetEthernetAutoNegotiation. */ NN_EXTERN_C u16 ACGetEthernetAutoNegotiation( const ACConfig* pConfig ); //! @} //! @name Privacy Settings //! @{ /*! @brief See the corresponding C++ function @ref nn::ac::SetWep40Key. */ NN_EXTERN_C void ACSetWep40Key( ACConfig* pConfig, int index, const char* pKeyStr ); /*! @brief See the corresponding C++ function @ref nn::ac::GetWep40Key. */ NN_EXTERN_C const char* ACGetWep40Key( const ACConfig* pConfig, int index ); /*! @brief See the corresponding C++ function @ref nn::ac::SetWep40KeyId. */ NN_EXTERN_C void ACSetWep40KeyId( ACConfig* pConfig, int index ); /*! @brief See the corresponding C++ function @ref nn::ac::GetWep40KeyId. */ NN_EXTERN_C int ACGetWep40KeyId( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetWep104Key. */ NN_EXTERN_C void ACSetWep104Key( ACConfig* pConfig, int index, const char* pKeyStr ); /*! @brief See the corresponding C++ function @ref nn::ac::GetWep104Key. */ NN_EXTERN_C const char* ACGetWep104Key( const ACConfig* pConfig, int index ); /*! @brief See the corresponding C++ function @ref nn::ac::SetWep104KeyId. */ NN_EXTERN_C void ACSetWep104KeyId( ACConfig* pConfig, int index ); /*! @brief See the corresponding C++ function @ref nn::ac::GetWep104KeyId. */ NN_EXTERN_C int ACGetWep104KeyId( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetTkipKey. */ NN_EXTERN_C void ACSetTkipKey( ACConfig* pConfig, const u8* pKey, int keyLength ); /*! @brief See the corresponding C++ function @ref nn::ac::GetTkipKey. */ NN_EXTERN_C const u8* ACGetTkipKey( const ACConfig* pConfig, int* pKeyLength ); /*! @brief See the corresponding C++ function @ref nn::ac::SetAesKey. */ NN_EXTERN_C void ACSetAesKey( ACConfig* pConfig, const u8* pKey, int keyLength ); /*! @brief See the corresponding C++ function @ref nn::ac::GetAesKey. */ NN_EXTERN_C const u8* ACGetAesKey( const ACConfig* pConfig, int* pKeyLength ); //! @} //! @name Proxy Settings //! @{ /*! @brief See the corresponding C++ function @ref nn::ac::SetProxyUse. */ NN_EXTERN_C void ACSetProxyUse( ACConfig* pConfig, u16 use ); /*! @brief See the corresponding C++ function @ref nn::ac::GetProxyUse. */ NN_EXTERN_C u16 ACGetProxyUse( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetProxyPort. */ NN_EXTERN_C void ACSetProxyPort( ACConfig* pConfig, u16 port ); /*! @brief See the corresponding C++ function @ref nn::ac::GetProxyPort. */ NN_EXTERN_C u16 ACGetProxyPort( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetProxyAuthType. */ NN_EXTERN_C void ACSetProxyAuthType( ACConfig* pConfig, u32 authType ); /*! @brief See the corresponding C++ function @ref nn::ac::GetProxyAuthType. */ NN_EXTERN_C u32 ACGetProxyAuthType( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetProxyHostName. */ NN_EXTERN_C void ACSetProxyHostName( ACConfig* pConfig, const char* pHostName ); /*! @brief See the corresponding C++ function @ref nn::ac::GetProxyHostName. */ NN_EXTERN_C const char* ACGetProxyHostName( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetProxyUserName. */ NN_EXTERN_C void ACSetProxyUserName( ACConfig* pConfig, const char* pName ); /*! @brief See the corresponding C++ function @ref nn::ac::GetProxyUserName. */ NN_EXTERN_C const char* ACGetProxyUserName( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetProxyPassword. */ NN_EXTERN_C void ACSetProxyPassword( ACConfig* pConfig, const char* pPassword ); /*! @brief See the corresponding C++ function @ref nn::ac::GetProxyPassword. */ NN_EXTERN_C const char* ACGetProxyPassword( const ACConfig* pConfig ); /*! @brief See the corresponding C++ function @ref nn::ac::SetProxyNoproxyHosts. */ NN_EXTERN_C void ACSetProxyNoproxyHosts( ACConfig* pConfig, const char* pNoProxyHosts ); /*! @brief See the corresponding C++ function @ref nn::ac::GetProxyNoproxyHosts. */ NN_EXTERN_C const char* ACGetProxyNoproxyHosts( const ACConfig* pConfig ); //! @} //! @} #endif // NN_AC_AC_CONFIG_H_