--- 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:48 1.1.1.3 @@ -14,7 +14,8 @@ class NetDriverTap : public NetDriver public: // コンストラクタ NetDriverTap(EthernetDevice *parent_, - std::mutex *mtx_, std::condition_variable *cv_); + std::mutex *mtx_, std::condition_variable *cv_, + const std::string& devpath_); // デストラクタ ~NetDriverTap() override; @@ -23,5 +24,18 @@ class NetDriverTap : public NetDriver void ThreadRun() override; private: +#if defined(__linux__) + bool OpenLinux(); +#endif + bool OpenDirect(); + bool OpenNumbered(); + bool OpenCloning(); + + void CloseFd(); void Close(); + + // Open*() のエラーメッセージ。 + // Open*() は複数呼ぶ場合もあったりするのでエラーは基本的にログレベル1 + // で表示しておき、最後に一つだけそれっぽいのを warn() で出力する。 + std::string errmsg {}; };