add IP stack simulator

This commit is contained in:
Martin Michelsen
2022-03-07 19:45:18 -08:00
parent b2437b085c
commit 951b6085ab
19 changed files with 1745 additions and 96 deletions
+5
View File
@@ -21,6 +21,11 @@ public:
void listen(int port);
void add_socket(int fd);
static std::string response_for_query(
const void* vdata, size_t size, uint32_t resolved_address);
static std::string response_for_query(
const std::string& query, uint32_t resolved_address);
private:
std::shared_ptr<struct event_base> base;
std::unordered_map<int, std::unique_ptr<struct event, void(*)(struct event*)>> fd_to_receive_event;