mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
Kernel: Remove specific devices from network code
By setting up the devices in init() and looping over the registered network adapters in NetworkTask_main, we can remove the remaining hard-coded adapter references from the network code. This also assigns IPs according to the default range supplied by QEMU in its slirp networking mode.
This commit is contained in:
parent
41e9ad5ea0
commit
93c16590f1
3 changed files with 44 additions and 40 deletions
|
@ -33,6 +33,7 @@
|
|||
#include <Kernel/KParams.h>
|
||||
#include <Kernel/Multiboot.h>
|
||||
#include <Kernel/Net/E1000NetworkAdapter.h>
|
||||
#include <Kernel/Net/LoopbackAdapter.h>
|
||||
#include <Kernel/Net/NetworkTask.h>
|
||||
#include <Kernel/Net/RTL8139NetworkAdapter.h>
|
||||
#include <Kernel/PCI.h>
|
||||
|
@ -244,6 +245,7 @@ extern "C" [[noreturn]] void init()
|
|||
new BXVGADevice;
|
||||
}
|
||||
|
||||
LoopbackAdapter::the();
|
||||
auto e1000 = E1000NetworkAdapter::autodetect();
|
||||
auto rtl8139 = RTL8139NetworkAdapter::autodetect();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue