mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:37:35 +00:00
Kernel: Bring up enough networking code that we can respond to ARP requests.
This is all pretty rickety but we can now respond to "arping" from the host while running inside QEMU. Very cool. :^)
This commit is contained in:
parent
10dcd3a47f
commit
318b01e055
12 changed files with 229 additions and 40 deletions
|
@ -13,8 +13,8 @@ public:
|
|||
MACAddress source() const { return m_source; }
|
||||
void set_source(const MACAddress& address) { m_source = address; }
|
||||
|
||||
word ether_type() const { return (m_ether_type & 0xff) << 16 | ((m_ether_type >> 16) & 0xff); }
|
||||
void set_ether_type(word ether_type) { m_ether_type = (ether_type & 0xff) << 16 | ((ether_type >> 16) & 0xff); }
|
||||
word ether_type() const { return ntohs(m_ether_type); }
|
||||
void set_ether_type(word ether_type) { m_ether_type = htons(ether_type); }
|
||||
|
||||
const void* payload() const { return &m_payload[0]; }
|
||||
void* payload() { return &m_payload[0]; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue