#ifndef CIRCE_CORE_PEER_TABLE_H #define CIRCE_CORE_PEER_TABLE_H #include #include struct circe_location { enum { CIRCE_ADDRESS_IPV4, CIRCE_ADDRESS_IPV6, } ip_type; uint16_t port; union { uint8_t ipv4[4]; uint8_t ipv6[16]; } ip_addr; }; #define CIRCE_PEER_TABLE_LEN 64 #define CIRCE_IDENTITY_LEN 64 // SHA-512 hash of hostname || island name struct circe_peer { bool double_lan; // lan1 is not valid if false struct circe_location lan0_loc; struct circe_location lan1_loc; struct circe_location wan_loc; uint8_t relay_server_identity[CIRCE_IDENTITY_LEN]; // SERVERS DON'T USE THIS, // ONLY CLIENTS DO uint8_t lan0_hash[32]; // SHA-256 uint8_t lan1_hash[32]; enum { CIRCE_ROUTE_LAN0, CIRCE_ROUTE_LAN1, CIRCE_ROUTE_WAN, CIRCE_ROUTE_RELAY, } current_route; uint8_t identity[CIRCE_IDENTITY_LEN]; uint8_t mldsa_pubkey[1312]; // ML-DSA-44 uint8_t rx_key[32]; uint8_t tx_key[32]; }; #endif