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:
parent
90f60d2f65
commit
d5dbb602b8
4 changed files with 21 additions and 15 deletions
|
@ -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); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue