2018-01-18 19:35:03 +00:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2018-03-25 09:41:00 +00:00
|
|
|
#include "core/hle/service/sockets/bsd.h"
|
2018-07-26 05:00:51 +00:00
|
|
|
#include "core/hle/service/sockets/ethc.h"
|
2018-03-25 09:41:00 +00:00
|
|
|
#include "core/hle/service/sockets/nsd.h"
|
2018-01-18 19:35:03 +00:00
|
|
|
#include "core/hle/service/sockets/sfdnsres.h"
|
|
|
|
#include "core/hle/service/sockets/sockets.h"
|
|
|
|
|
2018-04-20 01:41:44 +00:00
|
|
|
namespace Service::Sockets {
|
2018-01-18 19:35:03 +00:00
|
|
|
|
services/bsd: Implement most of bsd:s
This implements: Socket, Poll, Accept, Bind, Connect, GetPeerName,
GetSockName, Listen, Fcntl, SetSockOpt, Shutdown, Recv, RecvFrom,
Send, SendTo, Write, and Close
The implementation was done referencing: SwIPC, switchbrew, testing
with libnx and inspecting its code, general information about bsd
sockets online, and analysing official software.
Not everything from these service calls is implemented, but everything
that is not implemented will be logged in some way.
2020-07-12 01:37:47 +00:00
|
|
|
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) {
|
|
|
|
std::make_shared<BSD>(system, "bsd:s")->InstallAsService(service_manager);
|
|
|
|
std::make_shared<BSD>(system, "bsd:u")->InstallAsService(service_manager);
|
2020-11-26 20:19:08 +00:00
|
|
|
std::make_shared<BSDCFG>(system)->InstallAsService(service_manager);
|
2018-07-26 04:55:33 +00:00
|
|
|
|
2020-11-26 20:19:08 +00:00
|
|
|
std::make_shared<ETHC_C>(system)->InstallAsService(service_manager);
|
|
|
|
std::make_shared<ETHC_I>(system)->InstallAsService(service_manager);
|
2018-07-26 05:00:51 +00:00
|
|
|
|
2020-11-26 20:19:08 +00:00
|
|
|
std::make_shared<NSD>(system, "nsd:a")->InstallAsService(service_manager);
|
|
|
|
std::make_shared<NSD>(system, "nsd:u")->InstallAsService(service_manager);
|
2018-07-26 05:00:51 +00:00
|
|
|
|
2020-11-26 20:19:08 +00:00
|
|
|
std::make_shared<SFDNSRES>(system)->InstallAsService(service_manager);
|
2018-01-18 19:35:03 +00:00
|
|
|
}
|
|
|
|
|
2018-04-20 01:41:44 +00:00
|
|
|
} // namespace Service::Sockets
|