|
Sponge
CS144's user-space TCP library
|
Go to the documentation of this file. 1 #ifndef SPONGE_LIBSPONGE_ARP_MESSAGE_HH
2 #define SPONGE_LIBSPONGE_ARP_MESSAGE_HH
47 #endif // SPONGE_LIBSPONGE_ETHERNET_HEADER_HH
static constexpr size_t LENGTH
ARP message length in bytes.
uint16_t opcode
Request or reply.
uint16_t protocol_type
Type of the Internet-layer protocol (generally IPv4)
static constexpr uint16_t TYPE_ETHERNET
ARP type for Ethernet/Wi-Fi as link-layer protocol.
static constexpr uint16_t OPCODE_REPLY
static constexpr uint16_t OPCODE_REQUEST
uint32_t target_ip_address
A reference-counted read-only string that can discard bytes from the front.
ParseResult
The result of parsing or unparsing an IP datagram, TCP segment, Ethernet frame, or ARP message.
std::string serialize() const
Serialize the ARP message to a string.
bool supported() const
Is this type of ARP message supported by the parser?
uint16_t hardware_type
Type of the link-layer protocol (generally Ethernet/Wi-Fi)
EthernetAddress target_ethernet_address
uint32_t sender_ip_address
ParseResult parse(const Buffer buffer)
Parse the ARP message from a string.
uint8_t hardware_address_size
uint8_t protocol_address_size
EthernetAddress sender_ethernet_address
std::string to_string() const
Return a string containing the ARP message in human-readable format.