PcapPlusPlus  Next
pcpp::GratuitousArpRequest Struct Reference

A struct representing the build data for a gratuitous ARP request. More...

#include <ArpLayer.h>

Public Member Functions

 GratuitousArpRequest (MacAddress const &senderMacAddress, IPv4Address const &senderIPAddress)
 Construct a new Gratuitous Arp Request object. More...
 

Detailed Description

A struct representing the build data for a gratuitous ARP request.

A gratuitous ARP request is an ARP request that is sent by a machine to announce its presence on the network. It is an ARP request that has both the sender and target IP addresses set to the IP address of the machine and the target MAC address set to the broadcast address. Normally such a request will not receive a reply.

These requests can be used to update ARP caches on other machines on the network, or to help in detecting IP address conflicts.

Constructor & Destructor Documentation

◆ GratuitousArpRequest()

pcpp::GratuitousArpRequest::GratuitousArpRequest ( MacAddress const &  senderMacAddress,
IPv4Address const &  senderIPAddress 
)
inline

Construct a new Gratuitous Arp Request object.

Parameters
senderMacAddressThe MAC address of the machine sending the gratuitous ARP request.
senderIPAddressThe IP address of the machine sending the gratuitous ARP request.
Remarks
The target MAC address is set to the broadcast address and the target IP address is set to the sender's.