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

Kernel: More work on Ethernet support.

This commit is contained in:
Andreas Kling 2019-03-10 23:40:09 +01:00
parent 97664fad60
commit 1678ac69ef
8 changed files with 62 additions and 9 deletions

View file

@ -2,6 +2,7 @@
#include <AK/Types.h>
#include <Kernel/MACAddress.h>
#include <Kernel/ARPPacket.h>
class NetworkAdapter {
public:
@ -10,11 +11,12 @@ public:
virtual const char* class_name() const = 0;
MACAddress mac_address() { return m_mac_address; }
virtual void send(const byte*, int) = 0;
void send(const MACAddress&, const ARPPacket&);
protected:
NetworkAdapter();
void set_mac_address(const MACAddress& mac_address) { m_mac_address = mac_address; }
virtual void send_raw(const byte*, int) = 0;
private:
MACAddress m_mac_address;