summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormailwl <mailwl@gmail.com>2018-01-30 07:29:47 +0100
committerbunnei <bunneidev@gmail.com>2018-01-30 07:29:47 +0100
commiteaa9f968a629b8743f22a2277a5332942a3cd9d9 (patch)
tree5d1747258e0f3419dffa4950031bf116d9971de0 /src
parentMerge pull request #151 from lioncash/catch (diff)
downloadyuzu-eaa9f968a629b8743f22a2277a5332942a3cd9d9.tar
yuzu-eaa9f968a629b8743f22a2277a5332942a3cd9d9.tar.gz
yuzu-eaa9f968a629b8743f22a2277a5332942a3cd9d9.tar.bz2
yuzu-eaa9f968a629b8743f22a2277a5332942a3cd9d9.tar.lz
yuzu-eaa9f968a629b8743f22a2277a5332942a3cd9d9.tar.xz
yuzu-eaa9f968a629b8743f22a2277a5332942a3cd9d9.tar.zst
yuzu-eaa9f968a629b8743f22a2277a5332942a3cd9d9.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt1
-rw-r--r--src/core/hle/service/sockets/bsd_u.cpp13
-rw-r--r--src/core/hle/service/sockets/bsd_u.h1
-rw-r--r--src/core/hle/service/sockets/sfdnsres.cpp36
-rw-r--r--src/core/hle/service/sockets/sfdnsres.h3
5 files changed, 52 insertions, 2 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index d2fcc2c7e..70a38ff6c 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -145,6 +145,7 @@ add_library(core STATIC
hle/service/sm/sm.h
hle/service/sockets/bsd_u.cpp
hle/service/sockets/bsd_u.h
+ hle/service/sockets/sfdnsres.cpp
hle/service/sockets/sfdnsres.h
hle/service/sockets/sockets.cpp
hle/service/sockets/sockets.h
diff --git a/src/core/hle/service/sockets/bsd_u.cpp b/src/core/hle/service/sockets/bsd_u.cpp
index 4fd960bd8..629ffb040 100644
--- a/src/core/hle/service/sockets/bsd_u.cpp
+++ b/src/core/hle/service/sockets/bsd_u.cpp
@@ -55,11 +55,22 @@ void BSD_U::SendTo(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(0); // bsd errno
}
+void BSD_U::Close(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service, "(STUBBED) called");
+
+ IPC::ResponseBuilder rb{ctx, 4};
+
+ rb.Push(RESULT_SUCCESS);
+ rb.Push<u32>(0); // ret
+ rb.Push<u32>(0); // bsd errno
+}
+
BSD_U::BSD_U() : ServiceFramework("bsd:u") {
static const FunctionInfo functions[] = {{0, &BSD_U::RegisterClient, "RegisterClient"},
{2, &BSD_U::Socket, "Socket"},
{11, &BSD_U::SendTo, "SendTo"},
- {14, &BSD_U::Connect, "Connect"}};
+ {14, &BSD_U::Connect, "Connect"},
+ {26, &BSD_U::Close, "Close"}};
RegisterHandlers(functions);
}
diff --git a/src/core/hle/service/sockets/bsd_u.h b/src/core/hle/service/sockets/bsd_u.h
index 1fe96d850..fde08a22b 100644
--- a/src/core/hle/service/sockets/bsd_u.h
+++ b/src/core/hle/service/sockets/bsd_u.h
@@ -20,6 +20,7 @@ private:
void Socket(Kernel::HLERequestContext& ctx);
void Connect(Kernel::HLERequestContext& ctx);
void SendTo(Kernel::HLERequestContext& ctx);
+ void Close(Kernel::HLERequestContext& ctx);
/// Id to use for the next open file descriptor.
u32 next_fd = 1;
diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp
new file mode 100644
index 000000000..4d7bc7c3e
--- /dev/null
+++ b/src/core/hle/service/sockets/sfdnsres.cpp
@@ -0,0 +1,36 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/ipc_helpers.h"
+#include "core/hle/service/sockets/sfdnsres.h"
+
+namespace Service {
+namespace Sockets {
+
+void SFDNSRES::GetAddrInfo(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+
+ LOG_WARNING(Service, "(STUBBED) called");
+
+ IPC::ResponseBuilder rb{ctx, 2};
+
+ rb.Push(RESULT_SUCCESS);
+}
+
+SFDNSRES::SFDNSRES() : ServiceFramework("sfdnsres") {
+ static const FunctionInfo functions[] = {{0, nullptr, "SetDnsAddressesPrivate"},
+ {1, nullptr, "GetDnsAddressPrivate"},
+ {2, nullptr, "GetHostByName"},
+ {3, nullptr, "GetHostByAddr"},
+ {4, nullptr, "GetHostStringError"},
+ {5, nullptr, "GetGaiStringError"},
+ {6, &SFDNSRES::GetAddrInfo, "GetAddrInfo"},
+ {7, nullptr, "GetNameInfo"},
+ {8, nullptr, "RequestCancelHandle"},
+ {9, nullptr, "CancelSocketCall"}};
+ RegisterHandlers(functions);
+}
+
+} // namespace Sockets
+} // namespace Service
diff --git a/src/core/hle/service/sockets/sfdnsres.h b/src/core/hle/service/sockets/sfdnsres.h
index 32a3ac8c5..b726a30fd 100644
--- a/src/core/hle/service/sockets/sfdnsres.h
+++ b/src/core/hle/service/sockets/sfdnsres.h
@@ -12,10 +12,11 @@ namespace Sockets {
class SFDNSRES final : public ServiceFramework<SFDNSRES> {
public:
- SFDNSRES() : ServiceFramework("sfdnsres") {}
+ SFDNSRES();
~SFDNSRES() = default;
private:
+ void GetAddrInfo(Kernel::HLERequestContext& ctx);
};
} // namespace Sockets