--- nono/host/netdriver_tap.h 2026/04/29 17:04:34 1.1.1.2 +++ nono/host/netdriver_tap.h 2026/04/29 17:04:54 1.1.1.4 @@ -13,15 +13,29 @@ class NetDriverTap : public NetDriver using inherited = NetDriver; public: // コンストラクタ - NetDriverTap(EthernetDevice *parent_, - std::mutex *mtx_, std::condition_variable *cv_); + NetDriverTap(EthernetDevice *parent_, int loglevel_, + const std::string& devpath_); // デストラクタ ~NetDriverTap() override; - bool Init() override; + bool InitDriver() override; bool SendPacket(const std::vector& data) override; - void ThreadRun() override; + + protected: + ssize_t RecvPacket() override; + void MonitorUpdateMD(TextScreen&) override; private: +#if defined(__linux__) + bool OpenLinux(); +#endif + bool OpenDirect(); + bool OpenNumbered(); + bool OpenCloning(); + + void CloseFd(); void Close(); + + // デバイスファイルパス + std::string devpath {}; };