mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-15 20:30:08 +00:00
parent
449e32bb81
commit
eaa9f968a6
@ -145,6 +145,7 @@ add_library(core STATIC
|
|||||||
hle/service/sm/sm.h
|
hle/service/sm/sm.h
|
||||||
hle/service/sockets/bsd_u.cpp
|
hle/service/sockets/bsd_u.cpp
|
||||||
hle/service/sockets/bsd_u.h
|
hle/service/sockets/bsd_u.h
|
||||||
|
hle/service/sockets/sfdnsres.cpp
|
||||||
hle/service/sockets/sfdnsres.h
|
hle/service/sockets/sfdnsres.h
|
||||||
hle/service/sockets/sockets.cpp
|
hle/service/sockets/sockets.cpp
|
||||||
hle/service/sockets/sockets.h
|
hle/service/sockets/sockets.h
|
||||||
|
@ -55,11 +55,22 @@ void BSD_U::SendTo(Kernel::HLERequestContext& ctx) {
|
|||||||
rb.Push<u32>(0); // bsd errno
|
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") {
|
BSD_U::BSD_U() : ServiceFramework("bsd:u") {
|
||||||
static const FunctionInfo functions[] = {{0, &BSD_U::RegisterClient, "RegisterClient"},
|
static const FunctionInfo functions[] = {{0, &BSD_U::RegisterClient, "RegisterClient"},
|
||||||
{2, &BSD_U::Socket, "Socket"},
|
{2, &BSD_U::Socket, "Socket"},
|
||||||
{11, &BSD_U::SendTo, "SendTo"},
|
{11, &BSD_U::SendTo, "SendTo"},
|
||||||
{14, &BSD_U::Connect, "Connect"}};
|
{14, &BSD_U::Connect, "Connect"},
|
||||||
|
{26, &BSD_U::Close, "Close"}};
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ private:
|
|||||||
void Socket(Kernel::HLERequestContext& ctx);
|
void Socket(Kernel::HLERequestContext& ctx);
|
||||||
void Connect(Kernel::HLERequestContext& ctx);
|
void Connect(Kernel::HLERequestContext& ctx);
|
||||||
void SendTo(Kernel::HLERequestContext& ctx);
|
void SendTo(Kernel::HLERequestContext& ctx);
|
||||||
|
void Close(Kernel::HLERequestContext& ctx);
|
||||||
|
|
||||||
/// Id to use for the next open file descriptor.
|
/// Id to use for the next open file descriptor.
|
||||||
u32 next_fd = 1;
|
u32 next_fd = 1;
|
||||||
|
36
src/core/hle/service/sockets/sfdnsres.cpp
Normal file
36
src/core/hle/service/sockets/sfdnsres.cpp
Normal file
@ -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
|
@ -12,10 +12,11 @@ namespace Sockets {
|
|||||||
|
|
||||||
class SFDNSRES final : public ServiceFramework<SFDNSRES> {
|
class SFDNSRES final : public ServiceFramework<SFDNSRES> {
|
||||||
public:
|
public:
|
||||||
SFDNSRES() : ServiceFramework("sfdnsres") {}
|
SFDNSRES();
|
||||||
~SFDNSRES() = default;
|
~SFDNSRES() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void GetAddrInfo(Kernel::HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Sockets
|
} // namespace Sockets
|
||||||
|
Loading…
Reference in New Issue
Block a user