mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:47:35 +00:00
Kernel: Add simple ARP routing layer
This replaces the previous placeholder routing layer with a real one! It's still very primitive, doesn't deal with things like timeouts very well, and will probably need several more iterations to support more normal networking things. I haven't confirmed that this works with anything other than the QEMU user networking layer, but I suspect that's what nearly everybody is using at this point, so that's the important target to keep working.
This commit is contained in:
parent
626e176cab
commit
6d1418aa7a
6 changed files with 146 additions and 47 deletions
|
@ -2,4 +2,12 @@
|
|||
|
||||
#include <Kernel/Net/NetworkAdapter.h>
|
||||
|
||||
WeakPtr<NetworkAdapter> adapter_for_route_to(const IPv4Address&);
|
||||
struct RoutingDecision
|
||||
{
|
||||
WeakPtr<NetworkAdapter> adapter;
|
||||
const MACAddress& next_hop;
|
||||
};
|
||||
|
||||
RoutingDecision route_to(const IPv4Address& target, const IPv4Address& source);
|
||||
|
||||
Lockable<HashMap<IPv4Address, MACAddress>>& arp_table();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue