2022-04-23 10:59:50 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-01-18 20:35:03 +01:00
|
|
|
|
2018-03-25 11:41:00 +02:00
|
|
|
#include "core/hle/service/sockets/bsd.h"
|
2018-07-26 07:00:51 +02:00
|
|
|
#include "core/hle/service/sockets/ethc.h"
|
2018-03-25 11:41:00 +02:00
|
|
|
#include "core/hle/service/sockets/nsd.h"
|
2018-01-18 20:35:03 +01:00
|
|
|
#include "core/hle/service/sockets/sfdnsres.h"
|
|
|
|
#include "core/hle/service/sockets/sockets.h"
|
|
|
|
|
2018-04-20 03:41:44 +02:00
|
|
|
namespace Service::Sockets {
|
2018-01-18 20:35:03 +01: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 03:37:47 +02: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 21:19:08 +01:00
|
|
|
std::make_shared<BSDCFG>(system)->InstallAsService(service_manager);
|
2018-07-26 06:55:33 +02:00
|
|
|
|
2020-11-26 21:19:08 +01:00
|
|
|
std::make_shared<ETHC_C>(system)->InstallAsService(service_manager);
|
|
|
|
std::make_shared<ETHC_I>(system)->InstallAsService(service_manager);
|
2018-07-26 07:00:51 +02:00
|
|
|
|
2020-11-26 21:19:08 +01:00
|
|
|
std::make_shared<NSD>(system, "nsd:a")->InstallAsService(service_manager);
|
|
|
|
std::make_shared<NSD>(system, "nsd:u")->InstallAsService(service_manager);
|
2018-07-26 07:00:51 +02:00
|
|
|
|
2020-11-26 21:19:08 +01:00
|
|
|
std::make_shared<SFDNSRES>(system)->InstallAsService(service_manager);
|
2018-01-18 20:35:03 +01:00
|
|
|
}
|
|
|
|
|
2018-04-20 03:41:44 +02:00
|
|
|
} // namespace Service::Sockets
|