Sockets services: Difference between revisions

Yannik (talk | contribs)
No edit summary
 
(7 intermediate revisions by one other user not shown)
Line 22: Line 22:
| 0  || [[#RegisterClient]]
| 0  || [[#RegisterClient]]
|-
|-
| 1  || StartMonitoring
| 1  || [[#StartMonitoring]]
|-
|-
| 2  || [[#Socket]]
| 2  || [[#Socket]]
Line 94: Line 94:
| 36 || [18.0.0+]
| 36 || [18.0.0+]
|-
|-
| 37 || [18.0.0+]
| 37 || [18.0.0+] SetSocketBufferAttribute
|-
|-
| 38 || [18.0.0+]
| 38 || [18.0.0+]
|-
|-
| 39 || [20.0.0+]
| 39 || [20.0.0+] [[#NoSfEventFd|NoSfEventFd]]
|-
|-
| 40 || [20.0.0+]
| 40 || [20.0.0+] ShutdownAllSockets
|-
|-
| 41 || [21.0.0+]
| 41 || [21.0.0+]
|-
|-
| 42 || [21.0.0+]
| 42 || [21.0.0+] SendMMsgNoMem
|-
|-
| 43 || [21.0.0+]
| 43 || [21.0.0+] RecvMMsgNoMem
|-
|-
| 200 || [15.0.0+] SetThreadCoreMask
| 200 || [15.0.0+] SetThreadCoreMask
Line 127: 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 177: Line 182:
== RegisterResourceStatisticsName ==
== RegisterResourceStatisticsName ==
[10.0.0+] Now takes an additional 8-bytes of input.
[10.0.0+] Now takes an additional 8-bytes of input.
== RegisterClientShared ==
Same input/output as [[#RegisterClient]] except this doesn't take an input handle.
The work-buffer (size is still specified with this cmd) is backed by memory in the sysmodule, instead of TransferMemory. The size (after alignment) must be >=0x1000 and <=0x13F000.
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 ==
== Cmd36 ==
Takes a PID, an input u32, an u64 pid_reserved, returns 4-bytes of output.
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 NX this is stubbed, just returns 0.


On Ounce this is used as a new version of RegisterClient*, when initializing bsd:s/bsd:a.
On Ounce this is used as a new version of RegisterClient*, when initializing bsd:s/bsd:a/bsd:u.


== Cmd39 ==
== 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.
 
== NoSfEventFd ==
[21.0.0+] Now no longer returns two output handles.
[21.0.0+] Now no longer returns two output handles.


== RegisterClientShared ==
On NX this writes errors to output.
Same input/output as [[#RegisterClient]] except this doesn't take an input handle.


The work-buffer (size is still specified with this cmd) is backed by memory in the sysmodule, instead of TransferMemory. The size (after alignment) must be >=0x1000 and <=0x13F000.
== Cmd41 ==
 
On NX this writes errors to output.
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.


= bsdcfg, ifcfg =
= bsdcfg, ifcfg =
Line 749: Line 764:
|-
|-
| [19.0.0+] || 0xA
| [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 =