mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
Kernel: Tidy up networking code with some named constants.
This commit is contained in:
parent
90f60d2f65
commit
d5dbb602b8
4 changed files with 21 additions and 15 deletions
|
@ -14,7 +14,7 @@ NetworkAdapter::~NetworkAdapter()
|
|||
|
||||
void NetworkAdapter::send(const MACAddress& destination, const ARPPacket& packet)
|
||||
{
|
||||
int size_in_bytes = sizeof(EthernetFrameHeader) + sizeof(ARPPacket) + 4;
|
||||
int size_in_bytes = sizeof(EthernetFrameHeader) + sizeof(ARPPacket) + sizeof(EthernetFrameCheckSequence);
|
||||
auto* eth = (EthernetFrameHeader*)kmalloc(size_in_bytes);
|
||||
eth->set_source(mac_address());
|
||||
eth->set_destination(destination);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue