Line 30: |
Line 30: |
| | 1 || [[#GetClientId]] || | | | 1 || [[#GetClientId]] || |
| |- | | |- |
− | | 2 || CreateScanRequest || Returns an [[#IScanRequest]]. | + | | 2 || [[#CreateScanRequest]] || |
| |- | | |- |
− | | 4 || CreateRequest || Returns an [[#IRequest]]. | + | | 4 || [[#CreateRequest]] || |
| |- | | |- |
| | 5 || [[#GetCurrentNetworkProfile]] || | | | 5 || [[#GetCurrentNetworkProfile]] || |
Line 48: |
Line 48: |
| | 11 || GetScanDataOld ([1.0.0-3.0.2] GetScanData) || | | | 11 || GetScanDataOld ([1.0.0-3.0.2] GetScanData) || |
| |- | | |- |
− | | 12 || GetCurrentIpAddress || | + | | 12 || [[#GetCurrentIpAddress]] || |
| |- | | |- |
| | 13 || GetCurrentAccessPointOld ([1.0.0-3.0.2] GetCurrentAccessPoint) || | | | 13 || GetCurrentAccessPointOld ([1.0.0-3.0.2] GetCurrentAccessPoint) || |
Line 54: |
Line 54: |
| | 14 || CreateTemporaryNetworkProfile || Returns an [[#INetworkProfile]]. | | | 14 || CreateTemporaryNetworkProfile || Returns an [[#INetworkProfile]]. |
| |- | | |- |
− | | 15 || GetCurrentIpConfigInfo || | + | | 15 || [[#GetCurrentIpConfigInfo]] || |
| |- | | |- |
| | 16 || SetWirelessCommunicationEnabled || | | | 16 || SetWirelessCommunicationEnabled || |
Line 117: |
Line 117: |
| | | |
| The wrapper for this with official sw will return 0 when any errors occur (wrapper returns [[#ClientId]] not Result). | | The wrapper for this with official sw will return 0 when any errors occur (wrapper returns [[#ClientId]] not Result). |
| + | |
| + | === CreateScanRequest === |
| + | No input, returns an output [[#IScanRequest]]. |
| + | |
| + | === CreateRequest === |
| + | Takes an input s32 "nn::nifm::RequirementPreset", returns an output [[#IRequest]]. |
| + | |
| + | sdknso loads the s32 from "nn::nifm::RequestParameters", which has hard-coded value 0x2. |
| | | |
| === GetCurrentNetworkProfile === | | === GetCurrentNetworkProfile === |
Line 134: |
Line 142: |
| | | |
| This is only available with nifm:a. | | This is only available with nifm:a. |
| + | |
| + | === GetCurrentIpAddress === |
| + | No input, returns an output [[#IpV4Address]]. |
| + | |
| + | === GetCurrentIpConfigInfo === |
| + | No input, returns an output [[#IpAddressSetting]] and a [[#DnsSetting]]. |
| | | |
| === IsAnyInternetRequestAccepted === | | === IsAnyInternetRequestAccepted === |
Line 205: |
Line 219: |
| | 20 || GetRevision | | | 20 || GetRevision |
| |- | | |- |
− | | 21 || GetAppletInfo | + | | 21 || [[#GetAppletInfo]] |
| |- | | |- |
| | 22 || GetAdditionalInfo | | | 22 || GetAdditionalInfo |
Line 220: |
Line 234: |
| |- | | |- |
| ! Number || Description | | ! Number || Description |
| + | |- |
| + | | 0 || Set by sdknso when the cmd returns an error. |
| |- | | |- |
| | 1 || Not yet submitted or error | | | 1 || Not yet submitted or error |
| |- | | |- |
− | | 2 || Pending (sdk calls this OnHold) | + | | 2 || Pending (sdknso calls this OnHold) |
| + | |- |
| + | | 3 || Connected (sdknso calls this Available) |
| |- | | |- |
− | | 3 || Connected | + | | 5 || |
| |} | | |} |
| | | |
| ==== GetResult ==== | | ==== GetResult ==== |
| + | No input/output. |
| + | |
| If the request enters state 1, this command can be used to determine why. It responds with the nice networking error codes that there are support pages for. | | If the request enters state 1, this command can be used to determine why. It responds with the nice networking error codes that there are support pages for. |
| | | |
| ==== GetSystemEventReadableHandles ==== | | ==== GetSystemEventReadableHandles ==== |
− | Returns two event handles. The first one signals when the RequestState changes.
| + | No input, returns two Event handles. The first one signals when the RequestState changes. |
| + | |
| + | This is used immediately after [[#CreateRequest]]. |
| + | |
| + | sdknso uses EventClearMode=1 for the first Event, for the second Event this can be user-specified or a default value of 1. |
| | | |
| ==== Cancel ==== | | ==== Cancel ==== |
| + | No input/output. |
| + | |
| Cancels the request to bring the network up. | | Cancels the request to bring the network up. |
| | | |
| ==== Submit ==== | | ==== Submit ==== |
| + | No input/output. |
| + | |
| Submits the request to bring the network up. Call this after configuring the request. | | Submits the request to bring the network up. Call this after configuring the request. |
| | | |
Line 273: |
Line 301: |
| | | |
| [3.0.0+] Returns an additional 4-bytes of output. | | [3.0.0+] Returns an additional 4-bytes of output. |
| + | |
| + | ==== GetAppletInfo ==== |
| + | Takes an input u32, a type-0x6 output buffer, and 3 output u32s. |
| + | |
| + | sdknso uses the output from this to launch a LibraryApplet. |
| + | |
| + | The input u32 is set to the output from <code>nn::applet::GetExpectedThemeColorForSystem()</code>. |
| + | |
| + | The output u32s are: [[Applet_Manager_services#AppletId|AppletId]], [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]], out_size. |
| + | |
| + | sdknso uses size 0x1000 for the buffer. |
| + | |
| + | The out_size is the total data size written to the output buffer. The buffer contains an array of: {s32 size} {data with the specified size}, with size==-1 indicating that the end of the array was reached. The data from here is pushed as applet input storage. |
| + | |
| + | The returned AppletId is one of the following: error, wifiWebAuth, or netConnect. |
| | | |
| === INetworkProfile === | | === INetworkProfile === |
Line 404: |
Line 447: |
| ! Description | | ! Description |
| |- | | |- |
− | | 0x0 || 0xE || | + | | 0x0 || 0xD || [[#IpAddressSetting]] |
| |- | | |- |
− | | 0xE || 0x4 || Primary DNS server IPv4 address | + | | 0xD || 0x9 || [[#DnsSetting]] |
− | |-
| |
− | | 0x12 || 0x4 || Secondary DNS server IPv4 address
| |
| |- | | |- |
| | 0x16 || 0xAA || [[#ProxySetting]] | | | 0x16 || 0xAA || [[#ProxySetting]] |
Line 439: |
Line 480: |
| |- | | |- |
| | 0xA9 || 0x1 || Padding | | | 0xA9 || 0x1 || Padding |
| + | |} |
| + | |
| + | = IpV4Address = |
| + | This is "nn::nifm::IpV4Address". This is a 0x4-byte struct. |
| + | |
| + | sdknso copies this into <code>struct in_addr</code>. |
| + | |
| + | = IpAddressSetting = |
| + | This is "nn::nifm::IpAddressSetting". This is a 0xD-byte struct. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 || 0x1 || Whether this setting is automatic. Ignored by [[#GetCurrentIpConfigInfo]]. |
| + | |- |
| + | | 0x1 || 0x4 || Copied to an output <code>struct in_addr</code> by sdknso. Same as the output from [[#GetCurrentIpAddress]]. |
| + | |- |
| + | | 0x5 || 0x4 || Copied to an output <code>struct in_addr</code> by sdknso. Subnet Mask. |
| + | |- |
| + | | 0x9 || 0x4 || Copied to an output <code>struct in_addr</code> by sdknso. Gateway. |
| + | |} |
| + | |
| + | = DnsSetting = |
| + | This is "nn::nifm::DnsSetting". This is a 0x9-byte struct. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 || 0x1 || Whether this setting is automatic. Ignored by [[#GetCurrentIpConfigInfo]]. |
| + | |- |
| + | | 0x1 || 0x4 || Copied to an output <code>struct in_addr</code> by sdknso. Primary DNS server. |
| + | |- |
| + | | 0x5 || 0x4 || Copied to an output <code>struct in_addr</code> by sdknso. Secondary DNS server. |
| |} | | |} |
| | | |
| [[Category:Services]] | | [[Category:Services]] |