summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-01-31 12:47:49 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-01-31 13:36:37 +0100
commit8c7d89e6c75ff0c680233b01504bf6b19b960659 (patch)
tree93425dd2da6a2fc949987c3535223ed08f59ef5f
parentnifm: Stub GetCurrentNetworkProfile (diff)
downloadyuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.tar
yuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.tar.gz
yuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.tar.bz2
yuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.tar.lz
yuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.tar.xz
yuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.tar.zst
yuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.zip
-rw-r--r--src/core/hle/service/nifm/nifm.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 0c91897cd..4db183096 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -337,6 +337,34 @@ private:
rb.PushIpcInterface<INetworkProfile>(system);
rb.PushRaw<u128>(uuid);
}
+ void GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_NIFM, "(STUBBED) called");
+
+ struct IpConfigInfo {
+ IpAddressSetting ip_address_setting;
+ DnsSetting dns_setting;
+ };
+ static_assert(sizeof(IpConfigInfo) == sizeof(IpAddressSetting) + sizeof(DnsSetting),
+ "IpConfigInfo has incorrect size.");
+
+ const IpConfigInfo ip_config_info{
+ .ip_address_setting{
+ .is_automatic{true},
+ .current_address{192, 168, 1, 100},
+ .subnet_mask{255, 255, 255, 0},
+ .gateway{192, 168, 1, 1},
+ },
+ .dns_setting{
+ .is_automatic{true},
+ .primary_dns{1, 1, 1, 1},
+ .secondary_dns{1, 0, 0, 1},
+ },
+ };
+
+ IPC::ResponseBuilder rb{ctx, 2 + sizeof(IpConfigInfo) / sizeof(u32)};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushRaw<IpConfigInfo>(ip_config_info);
+ }
void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_NIFM, "(STUBBED) called");
@@ -385,7 +413,7 @@ IGeneralService::IGeneralService(Core::System& system_)
{12, &IGeneralService::GetCurrentIpAddress, "GetCurrentIpAddress"},
{13, nullptr, "GetCurrentAccessPointOld"},
{14, &IGeneralService::CreateTemporaryNetworkProfile, "CreateTemporaryNetworkProfile"},
- {15, nullptr, "GetCurrentIpConfigInfo"},
+ {15, &IGeneralService::GetCurrentIpConfigInfo, "GetCurrentIpConfigInfo"},
{16, nullptr, "SetWirelessCommunicationEnabled"},
{17, &IGeneralService::IsWirelessCommunicationEnabled, "IsWirelessCommunicationEnabled"},
{18, nullptr, "GetInternetConnectionStatus"},