summaryrefslogtreecommitdiff
path: root/src/Erebos/Network/ifaddrs.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-01-05 15:28:49 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2025-01-09 21:42:22 +0100
commite057476beb4eb7e5194665536c6f7073aa6f790f (patch)
treea1f95a011fb0ab4b68f68b60bfcce1951753758f /src/Erebos/Network/ifaddrs.h
parent0f83948e7f5cad486cb8c8e18b39ebbbfbfa8d98 (diff)
Automatic discovery init using interface addresses
Diffstat (limited to 'src/Erebos/Network/ifaddrs.h')
-rw-r--r--src/Erebos/Network/ifaddrs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Erebos/Network/ifaddrs.h b/src/Erebos/Network/ifaddrs.h
index 8852ec6..2ee45a7 100644
--- a/src/Erebos/Network/ifaddrs.h
+++ b/src/Erebos/Network/ifaddrs.h
@@ -1,5 +1,18 @@
#include <stddef.h>
#include <stdint.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#else
+#include <winsock2.h>
+#endif
+
+struct InetAddress
+{
+ int family;
+ uint8_t addr[16];
+} __attribute__((packed));
+
uint32_t * join_multicast(int fd, size_t * count);
+struct InetAddress * local_addresses( size_t * count );
uint32_t * broadcast_addresses(void);