14#ifndef OPENVPN_TUN_LAYER_H
15#define OPENVPN_TUN_LAYER_H
61 const char *
str()
const
72 throw Exception(
"Layer: unrecognized layer type");
87 throw Exception(
"Layer: unrecognized layer type");
93 if (
str ==
"OSI_LAYER_3")
95 else if (
str ==
"OSI_LAYER_2")
97 else if (
str ==
"UNDEF_LAYER")
100 throw Exception(
"Layer: unrecognized layer string");
112 throw Exception(
"Layer: unrecognized layer value");
static Layer from_value(const int value)
bool operator==(const Layer &other) const
const char * dev_type() const
static Layer from_str(const std::string &str)
bool operator!=(const Layer &other) const