1
Fork 0
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:
Andreas Kling 2019-03-12 01:30:49 +01:00
parent 90f60d2f65
commit d5dbb602b8
4 changed files with 21 additions and 15 deletions

View file

@ -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);