--- nono/host/netdriver_tap.h 2026/04/29 17:04:54 1.1.1.4 +++ nono/host/netdriver_tap.h 2026/04/29 17:06:02 1.1.1.8 @@ -4,6 +4,10 @@ // Licensed under nono-license.txt // +// +// ホストネットワークの tap ドライバ +// + #pragma once #include "netdriver.h" @@ -12,18 +16,14 @@ class NetDriverTap : public NetDriver { using inherited = NetDriver; public: - // コンストラクタ - NetDriverTap(EthernetDevice *parent_, int loglevel_, - const std::string& devpath_); - // デストラクタ + NetDriverTap(HostDevice *hostdev_, const std::string& devpath_); ~NetDriverTap() override; - bool InitDriver() override; - bool SendPacket(const std::vector& data) override; + bool InitDriver(bool startup) override; + int Read(NetPacket *p) override; + void Write(const void *buf, int buflen) override; - protected: - ssize_t RecvPacket() override; - void MonitorUpdateMD(TextScreen&) override; + void MonitorScreenMD(TextScreen&, int y) override; private: #if defined(__linux__) @@ -33,7 +33,6 @@ class NetDriverTap : public NetDriver bool OpenNumbered(); bool OpenCloning(); - void CloseFd(); void Close(); // デバイスファイルパス