diff options
author | Ac_K <Acoustik666@gmail.com> | 2022-08-03 00:10:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 00:10:28 +0200 |
commit | 842cb26ba55382874f4cabe641efa0ad124d0fac (patch) | |
tree | 00e8aceb96f2035895e2661aff5114af8919a1c1 | |
parent | e235d5e7bbb4c20b8270c939a2c03e76eedecc0c (diff) |
Sfdnsres; Stub ResolverSetOptionRequest (#3493)1.1.205
This PR stub ResolverSetOptionRequest (checked by RE), but the options parsing is still missing since we don't support it in our current code.
(Close #3479)
-rw-r--r-- | Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs index 971c5d65..14a6d699 100644 --- a/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs @@ -235,6 +235,32 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres return GetAddrInfoRequestImpl(context, outputBufferPosition, outputBufferSize, true, optionsBufferPosition, optionsBufferSize); } + [CommandHipc(14)] // 5.0.0+ + // ResolverSetOptionRequest(buffer<unknown, 5, 0>, u64 unknown, u64 pid_placeholder, pid) -> (i32 ret, u32 bsd_errno) + public ResultCode ResolverSetOptionRequest(ServiceCtx context) + { + ulong bufferPosition = context.Request.SendBuff[0].Position; + ulong bufferSize = context.Request.SendBuff[0].Size; + + ulong unknown = context.RequestData.ReadUInt64(); + + byte[] buffer = new byte[bufferSize]; + + context.Memory.Read(bufferPosition, buffer); + + // TODO: Parse and use options. + + Logger.Stub?.PrintStub(LogClass.ServiceSfdnsres, new { unknown }); + + NetDbError netDbErrorCode = NetDbError.Success; + GaiError errno = GaiError.Success; + + context.ResponseData.Write((int)errno); + context.ResponseData.Write((int)netDbErrorCode); + + return ResultCode.Success; + } + private static ResultCode GetHostByNameRequestImpl( ServiceCtx context, ulong inputBufferPosition, @@ -615,7 +641,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres { context.ResponseData.Write((int)netDbErrorCode); context.ResponseData.Write((int)errno); - context.ResponseData.Write((int)serializedSize); + context.ResponseData.Write(serializedSize); } } |