Annotation of nono/vm/ethernet.h, revision 1.1.1.13

1.1       root        1: //
                      2: // nono
1.1.1.3   root        3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
1.1       root        5: //
                      6: 
1.1.1.8   root        7: //
                      8: // Ethernet 基本クラス
                      9: //
1.1       root       10: 
                     11: //          IODevice
                     12: //              |
                     13: //              v
                     14: //        EthernetDevice (イーサネットとしての共通部分)
                     15: //              |
                     16: //     +--------+-------+
                     17: //     v                v
1.1.1.10  root       18: // LanceDevice     RTL8019ASDevice
                     19: // (LUNA, AM7990)  (X68000, RTL8019AS)
1.1       root       20: 
1.1.1.8   root       21: #pragma once
1.1.1.3   root       22: 
1.1.1.8   root       23: #include "device.h"
                     24: #include "macaddr.h"
1.1       root       25: 
1.1.1.8   root       26: class HostNetDevice;
1.1.1.7   root       27: 
1.1       root       28: class EthernetDevice : public IODevice
                     29: {
1.1.1.3   root       30:        using inherited = IODevice;
1.1       root       31:  protected:
1.1.1.12  root       32:        explicit EthernetDevice(uint objid_);
1.1       root       33:  public:
1.1.1.11  root       34:        ~EthernetDevice() override;
1.1       root       35: 
1.1.1.3   root       36:        bool Create() override;
1.1.1.5   root       37: 
1.1.1.9   root       38:        // 設定から MAC アドレスを取得するヘルパー関数。
                     39:        // (MAC アドレスを保持するデバイスが呼ぶ)
1.1.1.13! root       40:        static bool GetConfigMacAddr(uint n, MacAddr *dst, bool accept_rom);
        !            41: 
        !            42:        // CRC32 を計算する。
        !            43:        static uint32 CRC32(const uint8 *buf, size_t buflen);
        !            44:        static uint32 CRC32(const MacAddr& mac);
1.1.1.7   root       45: 
                     46:  protected:
1.1.1.8   root       47:        // ホストスレッドからの受信通知
                     48:        void HostRxCallback();
1.1.1.7   root       49: 
1.1.1.8   root       50:        std::unique_ptr<HostNetDevice> hostnet /*{}*/;
1.1       root       51: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.