Sockets services: Difference between revisions
No edit summary |
|||
| (14 intermediate revisions by 2 users not shown) | |||
| Line 22: | Line 22: | ||
| 0 || [[#RegisterClient]] | | 0 || [[#RegisterClient]] | ||
|- | |- | ||
| 1 || StartMonitoring | | 1 || [[#StartMonitoring]] | ||
|- | |- | ||
| 2 || [[#Socket]] | | 2 || [[#Socket]] | ||
| Line 91: | Line 91: | ||
|- | |- | ||
| 35 || [17.0.0+] NifIoctl | | 35 || [17.0.0+] NifIoctl | ||
|- | |||
| 36 || [18.0.0+] | |||
|- | |||
| 37 || [18.0.0+] | |||
|- | |||
| 38 || [18.0.0+] | |||
|- | |||
| 39 || [20.0.0+] | |||
|- | |||
| 40 || [20.0.0+] | |||
|- | |||
| 41 || [21.0.0+] | |||
|- | |||
| 42 || [21.0.0+] | |||
|- | |||
| 43 || [21.0.0+] | |||
|- | |- | ||
| 200 || [15.0.0+] SetThreadCoreMask | | 200 || [15.0.0+] SetThreadCoreMask | ||
| Line 98: | Line 114: | ||
== RegisterClient == | == RegisterClient == | ||
Takes a [[#LibraryConfigData]], the PID, the size of the transfer memory and a copy-handle of the latter. | Takes a [[#LibraryConfigData]], the PID, the size of the transfer memory and a copy-handle of the latter. Returns 4-bytes of output. | ||
The transfer memory must be larger than a the computed size below. Should the transfer memory be smaller than that, the BSD sockets service would only send ZeroWindow packets (for TCP), resulting in a transfer rate not exceeding 1 byte/s. | The transfer memory must be larger than a the computed size below. Should the transfer memory be smaller than that, the BSD sockets service would only send ZeroWindow packets (for TCP), resulting in a transfer rate not exceeding 1 byte/s. | ||
| Line 111: | Line 127: | ||
return (size_t)(config->sb_efficiency * sum); | return (size_t)(config->sb_efficiency * sum); | ||
} | } | ||
== StartMonitoring == | |||
Takes a PID and an u64 pid_reserved, no output. | |||
This is used after the RegisterClient* cmd by the user-process. | |||
== Socket == | == Socket == | ||
| Line 160: | Line 181: | ||
== RegisterResourceStatisticsName == | == RegisterResourceStatisticsName == | ||
[10.0.0+] Now takes an additional 8-bytes of input. | |||
== RegisterClientShared == | == RegisterClientShared == | ||
| Line 168: | Line 189: | ||
sdknso will only use this cmd when two flags in the input config are set: the first one being set indicates that the bsd:s service is used, while the second flag enables using this cmd. An error is thrown if the work-buffer size is <0x1000. Otherwise when these flags aren't set, [[#RegisterClient]] is used as usual. | sdknso will only use this cmd when two flags in the input config are set: the first one being set indicates that the bsd:s service is used, while the second flag enables using this cmd. An error is thrown if the work-buffer size is <0x1000. Otherwise when these flags aren't set, [[#RegisterClient]] is used as usual. | ||
== Cmd36 == | |||
Takes a PID, an input u32 [[#LibraryConfigData|version]], an u64 pid_reserved, returns 4-bytes of output. | |||
On NX this is stubbed, just returns 0. | |||
On Ounce this is used as a new version of RegisterClient*, when initializing bsd:s/bsd:a/bsd:u. | |||
== Cmd38 == | |||
Takes 4-bytes of input and a type-0x21 input buffer. Returns a total of 8-bytes of output. | |||
On NX this just returns Result 0 and writes an error to output. | |||
== Cmd39 == | |||
[21.0.0+] Now no longer returns two output handles. | |||
On NX this writes errors to output. | |||
== Cmd41 == | |||
On NX this writes errors to output. | |||
= bsdcfg, ifcfg = | = bsdcfg, ifcfg = | ||
| Line 229: | Line 270: | ||
|- | |- | ||
| 23 || [17.0.0+] | | 23 || [17.0.0+] | ||
|- | |||
| 24 || [19.0.0+] | |||
|- | |- | ||
| 50 || [17.0.0+] | | 50 || [17.0.0+] | ||
| Line 331: | Line 374: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || SetDnsAddressesPrivateRequest | | 0 || SetDnsAddressesPrivateRequest | ||
|- | |- | ||
| 1 || GetDnsAddressPrivateRequest | | 1 || GetDnsAddressPrivateRequest | ||
|- | |- | ||
| 2 || GetHostByNameRequest | | 2 || GetHostByNameRequest | ||
| Line 521: | Line 564: | ||
This is only usable with nsd:a. | This is only usable with nsd:a. | ||
This also verifies a RSA signature, etc. | |||
== SetChangeEnvironmentIdentifierDisabled == | == SetChangeEnvironmentIdentifierDisabled == | ||
| Line 716: | Line 761: | ||
| [13.0.0-15.0.1] || 0x8 | | [13.0.0-15.0.1] || 0x8 | ||
|- | |- | ||
| [16.0.0+] || | | [16.0.0-18.1.0] || 0x9 | ||
|- | |||
| [19.0.0+] || 0xA | |||
|- | |||
| [21.0.0+] || 0xB | |||
|- | |||
| [22.0.0+] || 0xC | |||
|} | |} | ||
On NX the upper u16 of the version is 0x0, while on Ounce it's 0x1. | |||
= DeleteMode = | = DeleteMode = | ||