1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:08:11 +00:00

Kernel: Add update option to remove an entry from the ARP table

Allows for specifying whether to set/delete an entry from the table.
This commit is contained in:
brapru 2021-07-24 19:37:54 -04:00 committed by Andreas Kling
parent 99b32073be
commit f8c104aaaf
3 changed files with 13 additions and 5 deletions

View file

@ -18,7 +18,12 @@ struct RoutingDecision {
bool is_zero() const;
};
void update_arp_table(const IPv4Address&, const MACAddress&);
enum class UpdateArp {
Set,
Delete,
};
void update_arp_table(const IPv4Address&, const MACAddress&, UpdateArp update);
RoutingDecision route_to(const IPv4Address& target, const IPv4Address& source, const RefPtr<NetworkAdapter> through = nullptr);
Lockable<HashMap<IPv4Address, MACAddress>>& arp_table();