--- nono/vm/ethernet.h 2026/04/29 17:05:10 1.1.1.8 +++ nono/vm/ethernet.h 2026/04/29 17:05:18 1.1.1.9 @@ -29,29 +29,19 @@ class EthernetDevice : public IODevice { using inherited = IODevice; protected: - EthernetDevice(const std::string& objname_); + EthernetDevice(); public: virtual ~EthernetDevice() override; bool Create() override; - // MAC アドレスを取得 - macaddr_t GetMacAddr() const { - return macaddr; - } - - // ホストデバイスを取得する。Create() 完了後から使用可能。 - // (ステータスパネルが呼び出す) - HostNetDevice *GetHostNet() const { return hostnet.get(); } + // 設定から MAC アドレスを取得するヘルパー関数。 + // (MAC アドレスを保持するデバイスが呼ぶ) + static bool GetConfigMacAddr(macaddr_t *dst, bool accept_rom); protected: // ホストスレッドからの受信通知 void HostRxCallback(); - // MAC アドレス - macaddr_t macaddr {}; - std::unique_ptr hostnet /*{}*/; }; - -extern EthernetDevice *gEthernet;