aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Sockets
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2021-04-13 03:04:18 +0200
committerGitHub <noreply@github.com>2021-04-13 03:04:18 +0200
commitb662a26c7e2b66d916986b1ed9ffae3b918619d1 (patch)
tree130908b7c94802ee747560929f43c8403b52d203 /Ryujinx.HLE/HOS/Services/Sockets
parent73881fad1995e079eae3e728cb2f4c657886e476 (diff)
nifm/ssl: Implement GetCurrentNetworkProfile and stub Ssl Service (#2186)
* nifm/ssl: Implement GetCurrentNetworkProfile and stub Ssl Service * remove InterfaceVersion
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Sockets')
-rw-r--r--Ryujinx.HLE/HOS/Services/Sockets/Nsd/IManager.cs6
-rw-r--r--Ryujinx.HLE/HOS/Services/Sockets/Nsd/Manager/FqdnResolver.cs34
2 files changed, 16 insertions, 24 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Nsd/IManager.cs b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/IManager.cs
index 90f22dfb..3dc6b245 100644
--- a/Ryujinx.HLE/HOS/Services/Sockets/Nsd/IManager.cs
+++ b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/IManager.cs
@@ -132,7 +132,8 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd
// Resolve(buffer<unknown<0x100>, 0x15>) -> buffer<unknown<0x100>, 0x16>
public ResultCode Resolve(ServiceCtx context)
{
- (long outputPosition, long outputSize) = context.Request.GetBufferType0x22();
+ long outputPosition = context.Request.ReceiveBuff[0].Position;
+ long outputSize = context.Request.ReceiveBuff[0].Size;
ResultCode result = _fqdnResolver.ResolveEx(context, out ResultCode errorCode, out string resolvedAddress);
@@ -147,7 +148,8 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd
// ResolveEx(buffer<unknown<0x100>, 0x15>) -> (u32, buffer<unknown<0x100>, 0x16>)
public ResultCode ResolveEx(ServiceCtx context)
{
- (long outputPosition, long outputSize) = context.Request.GetBufferType0x22();
+ long outputPosition = context.Request.ReceiveBuff[0].Position;
+ long outputSize = context.Request.ReceiveBuff[0].Size;
ResultCode result = _fqdnResolver.ResolveEx(context, out ResultCode errorCode, out string resolvedAddress);
diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Nsd/Manager/FqdnResolver.cs b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/Manager/FqdnResolver.cs
index 3bdf15a1..0c5dac17 100644
--- a/Ryujinx.HLE/HOS/Services/Sockets/Nsd/Manager/FqdnResolver.cs
+++ b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/Manager/FqdnResolver.cs
@@ -73,30 +73,19 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd.Manager
return ResultCode.SettingsNotLoaded;
}
- switch (address)
+ resolvedAddress = address switch
{
- case "e97b8a9d672e4ce4845ec6947cd66ef6-sb-api.accounts.nintendo.com": // dp1 environment
- resolvedAddress = "e97b8a9d672e4ce4845ec6947cd66ef6-sb.baas.nintendo.com";
- break;
- case "api.accounts.nintendo.com": // dp1 environment
- resolvedAddress = "e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com";
- break;
- case "e97b8a9d672e4ce4845ec6947cd66ef6-sb.accounts.nintendo.com": // lp1 environment
- resolvedAddress = "e97b8a9d672e4ce4845ec6947cd66ef6-sb.baas.nintendo.com";
- break;
- case "accounts.nintendo.com": // lp1 environment
- resolvedAddress = "e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com";
- break;
+ "e97b8a9d672e4ce4845ec6947cd66ef6-sb-api.accounts.nintendo.com" => "e97b8a9d672e4ce4845ec6947cd66ef6-sb.baas.nintendo.com", // dp1 environment
+ "api.accounts.nintendo.com" => "e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com", // dp1 environment
+ "e97b8a9d672e4ce4845ec6947cd66ef6-sb.accounts.nintendo.com" => "e97b8a9d672e4ce4845ec6947cd66ef6-sb.baas.nintendo.com", // lp1 environment
+ "accounts.nintendo.com" => "e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com", // lp1 environment
/*
- // TODO: Determine fields of the struct.
- case "": // + 0xEB8 || + 0x2BE8
- resolvedAddress = ""; // + 0xEB8 + 0x300 || + 0x2BE8 + 0x300
- break;
+ // TODO: Determine fields of the struct.
+ this + 0xEB8 => this + 0xEB8 + 0x300
+ this + 0x2BE8 => this + 0x2BE8 + 0x300
*/
- default:
- resolvedAddress = address;
- break;
- }
+ _ => address,
+ };
}
else
{
@@ -108,7 +97,8 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd.Manager
public ResultCode ResolveEx(ServiceCtx context, out ResultCode resultCode, out string resolvedAddress)
{
- (long inputPosition, long inputSize) = context.Request.GetBufferType0x21();
+ long inputPosition = context.Request.SendBuff[0].Position;
+ long inputSize = context.Request.SendBuff[0].Size;
byte[] addressBuffer = new byte[inputSize];