#pragma once #include #include #include "UdpVpn.hpp" class UdpVpnServer: public UdpVpn { public: UdpVpnServer(in_port_t port); UdpVpnServer(const struct in6_addr& bind_addr6, in_port_t port); protected: void bind(const struct in6_addr& bind_addr6, in_port_t port); /** Get the peer associated to this (internal) IP. */ std::shared_ptr get_peer_for_ip(const in6_addr& peer_addr); virtual void receive_from_tun(); virtual void receive_from_udp(); struct sockaddr_in6 _bind_addr; std::unordered_map> _peers; };