--- nono/host/netdriver_bpf.h 2026/04/29 17:04:34 1.1.1.3 +++ nono/host/netdriver_bpf.h 2026/04/29 17:04:54 1.1.1.5 @@ -13,20 +13,26 @@ class NetDriverBPF : public NetDriver using inherited = NetDriver; public: // コンストラクタ - NetDriverBPF(EthernetDevice *parent_, std::mutex *mtx_, - std::condition_variable *cv_); + NetDriverBPF(EthernetDevice *parent_, int loglevel_, + const std::string& ifname_); // デストラクタ ~NetDriverBPF() 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: void Close(); - std::string FindInterface(); + std::string FindInterface() const; + + // デバイスファイルパス + std::string devpath {}; - std::unique_ptr bpfbuf {}; - int bpfbuflen = 0; + std::unique_ptr bpfbuf {}; + int bpfbuflen {}; };