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:
parent
405413c354
commit
4641ee49b5
4 changed files with 32 additions and 8 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue