aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/sockets
AgeCommit message (Collapse)Author
2022-09-23chore: fix some typosAndrea Pappacoda
Fix some typos reported by Lintian
2022-08-27core/bsd: Correctly unbind methods in destructorFearlessTobi
Prevents yuzu from crashing when the BSD service is created a second time.
2022-08-15core, network: Add ability to proxy socket packetsFearlessTobi
2022-07-25yuzu: Add ui files for multiplayer roomsFearlessTobi
2022-07-16Enable the use of MSG_DONTWAIT flag on RecvImplLink4565
2022-04-23general: Convert source file copyright comments over to SPDXMorph
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-11service: sfdnsres: add missing includes for some BSDs after 82d46a974ad4Jan Beich
src/core/hle/service/sockets/sfdnsres.cpp: In function 'Service::Sockets::NetDbError Service::Sockets::AddrInfoErrorToNetDbError(s32)': src/core/hle/service/sockets/sfdnsres.cpp:66:10: error: 'EAI_NODATA' was not declared in this scope; did you mean 'EAI_NONAME'? 66 | case EAI_NODATA: | ^~~~~~~~~~ | EAI_NONAME src/core/hle/service/sockets/sfdnsres.cpp: In function 'std::vector<unsigned char> Service::Sockets::SerializeAddrInfo(const addrinfo*, s32, std::string_view)': src/core/hle/service/sockets/sfdnsres.cpp:127:53: error: 'sockaddr_in' does not name a type; did you mean 'SockAddrIn'? 127 | const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr); | ^~~~~~~~~~~ | SockAddrIn src/core/hle/service/sockets/sfdnsres.cpp:127:64: error: expected '>' before '*' token 127 | const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr); | ^ src/core/hle/service/sockets/sfdnsres.cpp:127:64: error: expected '(' before '*' token 127 | const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr); | ^ | ( src/core/hle/service/sockets/sfdnsres.cpp:127:65: error: expected primary-expression before '>' token 127 | const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr); | ^ src/core/hle/service/sockets/sfdnsres.cpp:127:84: error: expected ')' before ';' token 127 | const auto addr = *reinterpret_cast<sockaddr_in*>(current->ai_addr); | ^ | ) src/core/hle/service/sockets/sfdnsres.cpp:148:53: error: 'sockaddr_in6' does not name a type; did you mean 'SockAddrIn6'? 148 | const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr); | ^~~~~~~~~~~~ | SockAddrIn6 src/core/hle/service/sockets/sfdnsres.cpp:148:65: error: expected '>' before '*' token 148 | const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr); | ^ src/core/hle/service/sockets/sfdnsres.cpp:148:65: error: expected '(' before '*' token 148 | const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr); | ^ | ( src/core/hle/service/sockets/sfdnsres.cpp:148:66: error: expected primary-expression before '>' token 148 | const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr); | ^ src/core/hle/service/sockets/sfdnsres.cpp:148:85: error: expected ')' before ';' token 148 | const auto addr = *reinterpret_cast<sockaddr_in6*>(current->ai_addr); | ^ | )
2022-04-10Merge pull request #8171 from tech-ticks/skyline-improvementsFernando S
Improvements for game modding with Skyline, DNS resolution
2022-04-08service: sfdnsres: Implement DNS address resolutiontech-ticks
2022-04-07service: bsd: Add keepalive socket optiontech-ticks
2022-04-02hle: service: bsd: Create a service thread where appropriate.bunnei
2022-03-19core: Reduce unused includesameerj
2022-03-15bsd: Allow inexact match for address length in AcceptImplValeri
Minecraft passes in zero for length, but this should account for all possible cases
2021-11-03core: Remove unused includesameerj
2021-10-07service: Reduce header include overheadMorph
2021-09-25service: bsd: Stub ReadMorph
- Used by Diablo II: Resurrected
2021-09-24service: bsd: Implement ReadMorph
- Used by Diablo II: Resurrected
2021-06-02general: Replace RESULT_SUCCESS with ResultSuccessMorph
Transition to PascalCase for result names.
2021-04-08sfdnsres: Use proper namesgerman77
2021-04-08nsd: Update to 12.xgerman77
2021-04-08ethc: Update to 12.xgerman77
2021-03-16bsd: Avoid writing empty buffersMorph
Silences log spam on empty buffer writes
2021-02-09bsd: Remove usage of optional emplace() with no argumentsLioncash
Clang 12 currently falls over in the face of this.
2021-01-31bsd: Fix EventFd stubMorph
2021-01-31bsd: Fix GetSockOpt stubMorph
2021-01-30bsd: Stub EventFdameerj
Used by Family Feud
2021-01-28core: hle: kernel: Rename Thread to KThread.bunnei
2021-01-27Stub GetSockOptgerman
2021-01-05core: Silence warnings when compiling without assertsReinUsesLisp
2020-12-28hle: service: bsd: Update to work with service threads, removing ↵bunnei
SleepClientThread.
2020-12-09Merge pull request #5142 from comex/xx-poll-eventsRodrigo Locatti
network, sockets: Replace `POLL_IN`, `POLL_OUT`, etc. constants with an `enum class PollEvents`
2020-12-07core: Remove unnecessary enum casts in log callsLioncash
Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
2020-12-06network, sockets: Replace `POLL_IN`, `POLL_OUT`, etc. constants with an ↵comex
`enum class PollEvents` Actually, two enum classes, since for some reason there are two separate yet identical `PollFD` types used in the codebase. I get that one is ABI-compatible with the Switch while the other is an abstract type used for the host, but why not use `WSAPOLLFD` directly for the latter? Anyway, why make this change? Because on Apple platforms, `POLL_IN`, `POLL_OUT`, etc. (with an underscore) are defined as macros in <sys/signal.h>. (This is inherited from FreeBSD.) So defining a variable with the same name causes a compile error. I could just rename the variables, but while I was at it I thought I might as well switch to an enum for stronger typing. Also, change the type used for values copied directly to/from the `events` and `revents` fields of the host *native* `pollfd`/`WSASPOLLFD`, from `u32` to `short`, as `short` is the correct canonical type on both Unix and Windows.
2020-11-26service: Eliminate usages of the global system instanceLioncash
Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
2020-10-20Revert "core: Fix clang build"bunnei
2020-10-17core: Fix clang buildLioncash
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-10-13core/CMakeLists: Make some warnings errorsLioncash
Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
2020-09-22General: Make use of std::nullopt where applicableLioncash
Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals.
2020-09-07bsd: Resolve unused value within SendToImplLioncash
Previously the address provided to SendToImpl would never be propagated to SendTo(). This fixes that.
2020-09-07bsd: Resolve sign comparison warningsLioncash
2020-09-07sockets_translate: Make use of designated initializersLioncash
Same behavior, less typing.
2020-09-07blocking_worker: Make use of templated lambdaLioncash
We can simplify this a little by explicitly specifying the typename for the lambda function.
2020-09-07blocking_worker: Resolve -Wdocumentation warningLioncash
2020-07-28service/bsd: Handle Poll with no entries accuratelyReinUsesLisp
Testing shows that Poll called with zero entries returns -1 and signals an errno of zero.
2020-07-28services/bsd: Implement most of bsd:sReinUsesLisp
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-28service/sockets: Add worker pool abstractionReinUsesLisp
Manage worker threads with an easy to use abstraction. We can expand this to support thread deletion in the future.
2020-07-28service/sockets: Add worker abstraction to execute blocking calls asynchronouslyReinUsesLisp
This abstraction allows executing blocking functions (like recvfrom on a socket configured for blocking) without blocking the service thread. It is intended to be used with SleepClientThread.
2020-07-28service/sockets: Add translate functionsReinUsesLisp
These functions translate from Network enumerations/structures to guest enumerations/structures and viceversa.
2020-07-28service/sockets: Add enumerations and structuresReinUsesLisp
Add guest enumerations and structures used in socket services
2020-06-29service: Update function tablesVolcaEM