2018-01-18 14:35:03 -05:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2018-03-25 05:41:00 -04:00
|
|
|
#include "core/hle/service/sockets/bsd.h"
|
2018-07-26 01:00:51 -04:00
|
|
|
#include "core/hle/service/sockets/ethc.h"
|
2018-03-25 05:41:00 -04:00
|
|
|
#include "core/hle/service/sockets/nsd.h"
|
2018-01-18 14:35:03 -05:00
|
|
|
#include "core/hle/service/sockets/sfdnsres.h"
|
|
|
|
#include "core/hle/service/sockets/sockets.h"
|
|
|
|
|
2018-04-19 21:41:44 -04:00
|
|
|
namespace Service::Sockets {
|
2018-01-18 14:35:03 -05: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-11 21:37:47 -04: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 15:19:08 -05:00
|
|
|
std::make_shared<BSDCFG>(system)->InstallAsService(service_manager);
|
2018-07-26 00:55:33 -04:00
|
|
|
|
2020-11-26 15:19:08 -05:00
|
|
|
std::make_shared<ETHC_C>(system)->InstallAsService(service_manager);
|
|
|
|
std::make_shared<ETHC_I>(system)->InstallAsService(service_manager);
|
2018-07-26 01:00:51 -04:00
|
|
|
|
2020-11-26 15:19:08 -05:00
|
|
|
std::make_shared<NSD>(system, "nsd:a")->InstallAsService(service_manager);
|
|
|
|
std::make_shared<NSD>(system, "nsd:u")->InstallAsService(service_manager);
|
2018-07-26 01:00:51 -04:00
|
|
|
|
2020-11-26 15:19:08 -05:00
|
|
|
std::make_shared<SFDNSRES>(system)->InstallAsService(service_manager);
|
2018-01-18 14:35:03 -05:00
|
|
|
}
|
|
|
|
|
2018-04-19 21:41:44 -04:00
|
|
|
} // namespace Service::Sockets
|