--- nono/vm/virtio_net.h 2026/04/29 17:05:33 1.1.1.3 +++ nono/vm/virtio_net.h 2026/04/29 17:05:46 1.1.1.5 @@ -15,7 +15,7 @@ #include "hostnet.h" #include "message.h" -class VirtIONetDevice : public VirtIODevice +class VirtIONetDevice : public VirtIODevice, public IHWAddrFilter { using inherited = VirtIODevice; public: @@ -25,6 +25,8 @@ class VirtIONetDevice : public VirtIODev bool Create() override; bool Init() override; + int HWAddrFilter(const MacAddr& dstaddr) const override; + private: DECLARE_MONITOR_CALLBACK(MonitorUpdate); @@ -34,12 +36,12 @@ class VirtIONetDevice : public VirtIODev const char *GetFeatureName(uint feature) const override; // 受信 - void HostRxCallback(); + void HostRxCallback(uint32); void RxMessage(MessageID, uint32); void RxEvent(Event&); void Rx(VirtQueue *); - // MAC アドレス自体は動作中は不要なので表示用の文字列だけ持っておく。 + MacAddr macaddr {}; std::string macaddr_str {}; NetPacket rx_packet {};