switch to CMake

This commit is contained in:
Martin Michelsen
2021-12-29 11:51:17 -08:00
parent 6b5766449e
commit e8f23e4b2e
62 changed files with 253 additions and 326 deletions
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include <netinet/in.h>
#include <stdint.h>
#include <map>
#include <string>
// PSO is IPv4-only, so we just treat addresses as uint32_t everywhere because
// it's easier
uint32_t resolve_address(const char* address);
std::map<std::string, uint32_t> get_local_addresses();
uint32_t get_connected_address(int fd);
bool is_local_address(uint32_t daddr);
bool is_local_address(const sockaddr_storage& daddr);
std::string string_for_address(uint32_t address);
uint32_t address_for_string(const char* address);