mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 16:33:13 +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
Notes:
sideshowbarker
2024-07-19 12:27:16 +09:00
Author: https://github.com/deoxxa
Commit: 6d1418aa7a
Pull-request: https://github.com/SerenityOS/serenity/pull/499
Reviewed-by: https://github.com/awesomekling
6 changed files with 146 additions and 47 deletions
|
@ -16,6 +16,7 @@
|
|||
//#define NETWORK_TASK_DEBUG
|
||||
//#define ETHERNET_DEBUG
|
||||
//#define ETHERNET_VERY_DEBUG
|
||||
//#define ARP_DEBUG
|
||||
//#define IPV4_DEBUG
|
||||
//#define ICMP_DEBUG
|
||||
//#define UDP_DEBUG
|
||||
|
@ -27,14 +28,6 @@ static void handle_icmp(const EthernetFrameHeader&, const IPv4Packet&);
|
|||
static void handle_udp(const IPv4Packet&);
|
||||
static void handle_tcp(const IPv4Packet&);
|
||||
|
||||
Lockable<HashMap<IPv4Address, MACAddress>>& arp_table()
|
||||
{
|
||||
static Lockable<HashMap<IPv4Address, MACAddress>>* the;
|
||||
if (!the)
|
||||
the = new Lockable<HashMap<IPv4Address, MACAddress>>;
|
||||
return *the;
|
||||
}
|
||||
|
||||
void NetworkTask_main()
|
||||
{
|
||||
u8 octet = 15;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue