mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
Kernel: Add a LoopbackAdapter for talking to yourself via 127.0.0.1.
Choosing adapter for transmit is done by adapter_for_route_to(IPv4Address). This is just hard-coded logic right now but can be expanded to support a proper routing table. Also start moving kernel networking code into Kernel/Net/.
This commit is contained in:
@@ -28,14 +28,12 @@ NetworkAdapter::NetworkAdapter()
|
||||
: m_packet_queue_alarm(*this)
|
||||
{
|
||||
// FIXME: I wanna lock :(
|
||||
ASSERT_INTERRUPTS_DISABLED();
|
||||
all_adapters().resource().set(this);
|
||||
}
|
||||
|
||||
NetworkAdapter::~NetworkAdapter()
|
||||
{
|
||||
// FIXME: I wanna lock :(
|
||||
ASSERT_INTERRUPTS_DISABLED();
|
||||
all_adapters().resource().remove(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user