--- nono/vm/ethernet.h 2026/04/29 17:04:28 1.1.1.1 +++ nono/vm/ethernet.h 2026/04/29 17:04:50 1.1.1.6 @@ -1,17 +1,17 @@ // // nono -// Copyright (C) 2019 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // #pragma once +#include "device.h" +#include "qvector.h" #include #include #include #include -#include "device.h" -#include "mystring.h" -#include "qvector.h" // IODevice // | @@ -24,14 +24,14 @@ // (LUNA, AM7990) (X68000, RTL8019) // // これ自体は IODevice である必要はないが、LanceDevice などの親になるため -// IODevice にしてある。(多重継承はしない) +// IODevice にしてある。(多重継承はしない) class NetDriver; // MAC アドレス格納用のクラス class macaddr_t : public std::array { - typedef std::array inherited; + using inherited = std::array; public: // この MAC アドレスが 00:00:00:00:00:00 なら true bool empty() const { @@ -43,11 +43,22 @@ class macaddr_t : public std::array& buf); + + // MAC アドレス + macaddr_t macaddr {}; }; -extern EthernetDevice *gEthernet; +extern std::unique_ptr gEthernet;