summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar liamwhite2023-07-16 16:56:47 -0400
committerGravatar GitHub2023-07-16 16:56:47 -0400
commit2461c78e3f9368e4a03b4c27fae207cbb1d9cfff (patch)
tree50812311958a38d27d9ebcd1cfa443b77ff1c40c /src/common
parentfile_sys/content_archive: Detect compressed NCAs (#11047) (diff)
parentRename variables to avoid -Wshadow warnings under GCC (diff)
downloadyuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.tar.gz
yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.tar.xz
yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.zip
Merge pull request #10912 from comex/ssl
Implement SSL service
Diffstat (limited to 'src/common')
-rw-r--r--src/common/socket_types.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/common/socket_types.h b/src/common/socket_types.h
index 0a801a443..b2191c2e8 100644
--- a/src/common/socket_types.h
+++ b/src/common/socket_types.h
@@ -5,15 +5,19 @@
5 5
6#include "common/common_types.h" 6#include "common/common_types.h"
7 7
8#include <optional>
9
8namespace Network { 10namespace Network {
9 11
10/// Address families 12/// Address families
11enum class Domain : u8 { 13enum class Domain : u8 {
12 INET, ///< Address family for IPv4 14 Unspecified, ///< Represents 0, used in getaddrinfo hints
15 INET, ///< Address family for IPv4
13}; 16};
14 17
15/// Socket types 18/// Socket types
16enum class Type { 19enum class Type {
20 Unspecified, ///< Represents 0, used in getaddrinfo hints
17 STREAM, 21 STREAM,
18 DGRAM, 22 DGRAM,
19 RAW, 23 RAW,
@@ -22,6 +26,7 @@ enum class Type {
22 26
23/// Protocol values for sockets 27/// Protocol values for sockets
24enum class Protocol : u8 { 28enum class Protocol : u8 {
29 Unspecified, ///< Represents 0, usable in various places
25 ICMP, 30 ICMP,
26 TCP, 31 TCP,
27 UDP, 32 UDP,
@@ -48,4 +53,13 @@ constexpr u32 FLAG_MSG_PEEK = 0x2;
48constexpr u32 FLAG_MSG_DONTWAIT = 0x80; 53constexpr u32 FLAG_MSG_DONTWAIT = 0x80;
49constexpr u32 FLAG_O_NONBLOCK = 0x800; 54constexpr u32 FLAG_O_NONBLOCK = 0x800;
50 55
56/// Cross-platform addrinfo structure
57struct AddrInfo {
58 Domain family;
59 Type socket_type;
60 Protocol protocol;
61 SockAddrIn addr;
62 std::optional<std::string> canon_name;
63};
64
51} // namespace Network 65} // namespace Network