summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2023-06-20 03:17:43 +0200
committercomex <comexk@gmail.com>2023-06-25 21:53:31 +0200
commit8e703e08dfcf735a08df2ceff6a05221b7cc981f (patch)
tree771ebe71883ff9e179156f2b38b21b05070d7667 /src/common
parentMerge pull request #10825 from 8bitDream/vcpkg-zlib (diff)
downloadyuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.gz
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.bz2
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.lz
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.xz
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.zst
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.zip
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..18ad6ac95 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, ///< Can be 0 in getaddrinfo hints
+ INET, ///< Address family for IPv4
};
/// Socket types
enum class Type {
+ Unspecified, ///< Can be 0 in getaddrinfo hints
STREAM,
DGRAM,
RAW,
@@ -22,6 +26,7 @@ enum class Type {
/// Protocol values for sockets
enum class Protocol : u8 {
+ Unspecified,
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