1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:57:34 +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

@ -4,6 +4,19 @@
#include <Kernel/IPv4Address.h>
#include <Kernel/EtherType.h>
struct ARPOperation {
enum : word {
Request = 1,
Response = 2,
};
};
struct ARPHardwareType {
enum : word {
Ethernet = 1,
};
};
class [[gnu::packed]] ARPPacket {
public:
word hardware_type() const { return ntohs(m_hardware_type); }