summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service')
-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
4 files changed, 51 insertions, 2 deletions
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