diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-07-16 22:56:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-16 22:56:47 +0200 |
commit | 2461c78e3f9368e4a03b4c27fae207cbb1d9cfff (patch) | |
tree | 50812311958a38d27d9ebcd1cfa443b77ff1c40c /src/common | |
parent | file_sys/content_archive: Detect compressed NCAs (#11047) (diff) | |
parent | Rename variables to avoid -Wshadow warnings under GCC (diff) | |
download | yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.tar yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.tar.gz yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.tar.bz2 yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.tar.lz yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.tar.xz yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.tar.zst yuzu-2461c78e3f9368e4a03b4c27fae207cbb1d9cfff.zip |
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/socket_types.h | 16 |
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 @@ #include "common/common_types.h" +#include <optional> + namespace Network { /// Address families enum class Domain : u8 { - INET, ///< Address family for IPv4 + Unspecified, ///< Represents 0, used in getaddrinfo hints + INET, ///< Address family for IPv4 }; /// Socket types enum class Type { + Unspecified, ///< Represents 0, used in getaddrinfo hints STREAM, DGRAM, RAW, @@ -22,6 +26,7 @@ enum class Type { /// Protocol values for sockets enum class Protocol : u8 { + Unspecified, ///< Represents 0, usable in various places ICMP, TCP, UDP, @@ -48,4 +53,13 @@ constexpr u32 FLAG_MSG_PEEK = 0x2; constexpr u32 FLAG_MSG_DONTWAIT = 0x80; constexpr u32 FLAG_O_NONBLOCK = 0x800; +/// Cross-platform addrinfo structure +struct AddrInfo { + Domain family; + Type socket_type; + Protocol protocol; + SockAddrIn addr; + std::optional<std::string> canon_name; +}; + } // namespace Network |