mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-29 11:05:43 +00:00
20 lines
386 B
C++
20 lines
386 B
C++
#include <llarp/service/tun.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
namespace service
|
|
{
|
|
TunEndpoint::TunEndpoint(const std::string &ifname, llarp_router *r)
|
|
: Endpoint("tunif-" + ifname, r)
|
|
, m_tunif(tuntap_init())
|
|
, m_IfName(ifname)
|
|
{
|
|
}
|
|
|
|
TunEndpoint::~TunEndpoint()
|
|
{
|
|
tuntap_destroy(m_tunif);
|
|
}
|
|
|
|
} // namespace service
|
|
} // namespace llarp
|