Network Interface services: Difference between revisions
No edit summary |
Masagrator (talk | contribs) |
||
| (13 intermediate revisions by 2 users not shown) | |||
| Line 38: | Line 38: | ||
| 6 || EnumerateNetworkInterfaces | | 6 || EnumerateNetworkInterfaces | ||
|- | |- | ||
| 7 || EnumerateNetworkProfiles | | 7 || [[#EnumerateNetworkProfiles]] | ||
|- | |- | ||
| 8 || [[#GetNetworkProfile]] | | 8 || [[#GetNetworkProfile]] | ||
| Line 56: | Line 56: | ||
| 15 || [[#GetCurrentIpConfigInfo]] | | 15 || [[#GetCurrentIpConfigInfo]] | ||
|- | |- | ||
| 16 || SetWirelessCommunicationEnabled | | 16 || [[#SetWirelessCommunicationEnabled]] | ||
|- | |- | ||
| 17 || IsWirelessCommunicationEnabled | | 17 || [[#IsWirelessCommunicationEnabled]] | ||
|- | |- | ||
| 18 || GetInternetConnectionStatus | | 18 || [[#GetInternetConnectionStatus]] | ||
|- | |- | ||
| 19 || SetEthernetCommunicationEnabled | | 19 || SetEthernetCommunicationEnabled | ||
| Line 118: | Line 118: | ||
| 46 || [18.0.0+] SelectActiveNetworkEmulationProfileIdForDebug | | 46 || [18.0.0+] SelectActiveNetworkEmulationProfileIdForDebug | ||
|- | |- | ||
| 47 || [19.0.0+] | | 47 || [19.0.0+] GetScanData | ||
|- | |||
| 48 || [20.0.0+] ResetActiveNetworkEmulationProfileId | |||
|- | |- | ||
| 49 || [18.0.0+] GetActiveNetworkEmulationProfileId | | 49 || [18.0.0+] GetActiveNetworkEmulationProfileId | ||
| Line 127: | Line 129: | ||
|- | |- | ||
| 52 || [18.0.0+] DestroyRewriteRule | | 52 || [18.0.0+] DestroyRewriteRule | ||
|- | |||
| 53 || [20.0.0+] IsActiveNetworkEmulationProfileIdSelected | |||
|- | |||
| 54 || [20.0.0+] SelectDefaultNetworkEmulationProfileId | |||
|- | |||
| 55 || [20.0.0+] GetDefaultNetworkEmulationProfileId | |||
|- | |||
| 56 || [20.0.0+] GetNetworkEmulationProfile | |||
|- | |||
| 57 || [20.0.0+] SetWowlTcpKeepAliveTimeout | |||
|} | |} | ||
| Line 146: | Line 158: | ||
sdknso converts the output to [[#NetworkProfileData]]. | sdknso converts the output to [[#NetworkProfileData]]. | ||
=== EnumerateNetworkProfiles === | |||
Takes an input u8 [[#NetworkProfileType]] and type-0x6 output buffer containing a [[#SfNetworkProfileBasicInfo]] array. Outputs s32 total available count of entries for given input. | |||
sdknso uses hardcoded [[#NetworkProfileType]] "User" as input and converts the output to [[#NetworkProfileBasicInfo]]. | |||
Using any other [[#NetworkProfileType]] than "User" requires nifm:a session. | |||
=== GetNetworkProfile === | === GetNetworkProfile === | ||
| Line 167: | Line 186: | ||
=== GetCurrentIpConfigInfo === | === GetCurrentIpConfigInfo === | ||
No input, returns an output [[#IpAddressSetting]] and a [[#DnsSetting]]. | No input, returns an output [[#IpAddressSetting]] and a [[#DnsSetting]]. | ||
=== SetWirelessCommunicationEnabled === | |||
Takes an input u8 bool, no output. | |||
This is only available with nifm:s and nifm:a. | |||
=== IsWirelessCommunicationEnabled === | |||
No input, returns an output u8 bool. | |||
=== GetInternetConnectionStatus === | |||
No input. Takes an output u8 [[#NetworkInterfaceType]], u8 '''wifiStrength''', u8 '''connectionStatus'''. | |||
'''wifiStrength''' returns value from 0 to 3, matching WiFi icon set. | |||
=== IsAnyInternetRequestAccepted === | === IsAnyInternetRequestAccepted === | ||
| Line 223: | Line 255: | ||
| 8 || SetPriority | | 8 || SetPriority | ||
|- | |- | ||
| 9 || SetNetworkProfileId | | 9 || [[#SetNetworkProfileId]] | ||
|- | |- | ||
| 10 || SetRejectable | | 10 || SetRejectable | ||
| Line 255: | Line 287: | ||
| 24 || [3.0.0+] [[#RegisterSocketDescriptor]] | | 24 || [3.0.0+] [[#RegisterSocketDescriptor]] | ||
|- | |- | ||
| 25 || [3.0.0+] [[#UnregisterSocketDescriptor]] | | 25 || [3.0.0+] [[#UnregisterSocketDescriptor] | ||
|- | |||
| 26 || [21.0.0+] GetNetworkAccessStatus | |||
|} | |} | ||
| Line 287: | Line 321: | ||
[3.0.0+] Takes an additional 4-bytes of input. | [3.0.0+] Takes an additional 4-bytes of input. | ||
==== SetNetworkProfileId ==== | |||
Takes an input "nn::util::Uuid" (same Uuid from [[#SfNetworkProfileBasicInfo]]), no output. | |||
==== SetConnectionConfirmationOption ==== | ==== SetConnectionConfirmationOption ==== | ||
| Line 402: | Line 439: | ||
|- | |- | ||
| 0xCC || 0xC2 || [[#IpSettingData|IpSetting]] | | 0xCC || 0xC2 || [[#IpSettingData|IpSetting]] | ||
|} | |||
= SfNetworkProfileBasicInfo = | |||
This is "nn::nifm::detail::sf::NetworkProfileBasicInfo". This is converted from/to [[#NetworkProfileBasicInfo]] by sdknso. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 || 0x10 || Id | |||
|- | |||
| 0x10 || 0x40 || Name (NUL-terminated Network Name string) | |||
|- | |||
| 0x50 || 0x1 || [[#NetworkProfileType|NetworkProfileType]] | |||
|- | |||
| 0x51 || 0x1 || [[#NetworkInterfaceType|NetworkInterfaceType]] | |||
|- | |||
| 0x52 || 0x21 || [[#Ssid]] | |||
|- | |||
| 0x73 || 0x1 || [[#Authentication]] | |||
|- | |||
| 0x74 || 0x1 || [[#Encryption]] | |||
|} | |||
= NetworkProfileBasicInfo = | |||
This is "nn::nifm::NetworkProfileBasicInfo". This is converted from/to [[#SfNetworkProfileBasicInfo]] by sdknso. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 || 0x10 || Id | |||
|- | |||
| 0x10 || 0x40 || Name (NUL-terminated Network Name string) | |||
|- | |||
| 0x50 || 0x4 || [[#NetworkProfileType|NetworkProfileType]] | |||
|- | |||
| 0x54 || 0x4 || [[#NetworkInterfaceType|NetworkInterfaceType]] | |||
|- | |||
| 0x58 || 0x21 || [[#Ssid]] | |||
|- | |||
| 0x79 || 0x3 || Padding | |||
|- | |||
| 0x7C || 0x4 || [[#Authentication]] | |||
|- | |||
| 0x80 || 0x4 || [[#Encryption]] | |||
|} | |} | ||