1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00

Kernel: Add a simple MACAddress class.

This commit is contained in:
Andreas Kling 2019-03-10 19:15:22 +01:00
parent 405413c354
commit 4641ee49b5
4 changed files with 32 additions and 8 deletions

View file

@ -1,18 +1,19 @@
#pragma once
#include <AK/Types.h>
#include <Kernel/MACAddress.h>
class NetworkAdapter {
public:
virtual ~NetworkAdapter();
virtual const char* class_name() const = 0;
const byte* mac_address() { return m_mac_address; }
MACAddress mac_address() { return m_mac_address; }
protected:
NetworkAdapter();
void set_mac_address(const byte*);
void set_mac_address(const MACAddress& mac_address) { m_mac_address = mac_address; }
private:
byte m_mac_address[6];
MACAddress m_mac_address;
};