You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
421 B
17 lines
421 B
#include <cstring> |
|
|
|
#include "UdpVpnClient.hpp" |
|
#include "ip_header.hpp" |
|
|
|
UdpVpnClient::UdpVpnClient(const struct sockaddr_in6& server) : UdpVpn() { |
|
_peer = std::make_unique<VpnPeer>(this, server, in6addr_any); |
|
} |
|
|
|
void UdpVpnClient::acquire_peer( |
|
VpnDataPacket& packet, |
|
const sockaddr_in6&) |
|
{ |
|
if(!packet.parse_as_ipv6()) |
|
return; |
|
_peer->set_int_addr(packet.get_ipv6_header().source); |
|
}
|
|
|