initial commit

This commit is contained in:
2026-04-21 11:01:03 +02:00
commit e9a527b5de
19 changed files with 12675 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef TUNNEL_HPP_QWERTY
#define TUNNEL_HPP_QWERTY
class Interface {
private:
int tunfd;
std::string ifname;
int mtu;
public:
std::expected<void, std::string> Create(const std::string name);
std::string Name();
int MTU();
std::expected<void, std::string> SetMTU(int mtu);
std::expected<int, std::string> GetMTU(void);
std::expected<void, std::string> SetIP4Address(std::string ipaddr);
std::expected<void, std::string> SetIP4Netmask(int netmask);
std::expected<std::string, std::string> GetIP4Address(void);
std::expected<void, std::string> Up(void);
std::expected<void, std::string> Down(void);
std::expected<void, std::string> UpN(void);
std::expected<void, std::string> SetIP4AddrMask(const std::string address, const int prefix);
~Interface();
};
#endif