Starting over
This commit is contained in:
21
lib/tun_tap_device.h
Normal file
21
lib/tun_tap_device.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <string>
|
||||
|
||||
#include <linux/if_tun.h>
|
||||
|
||||
class TapTunDevice {
|
||||
public:
|
||||
static const auto kTunFormat = IFF_TUN;
|
||||
static const auto kTapFormat = IFF_TAP;
|
||||
static const auto kNoPacketInfo = IFF_NO_PI;
|
||||
|
||||
TapTunDevice(const std::string& name, uint64_t flags);
|
||||
TapTunDevice(uint64_t flags);
|
||||
|
||||
const std::string& Name() {
|
||||
return name_;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string name_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user