Implement ARP subsystem and arp app (AI)
- Created src/arp.h: ARP packet struct, cache entry struct, operation codes, lookup/request/resolve/receive API, sysfs registration - Created src/arp.c: ARP cache with 32 entries, request/reply handling, ARP response to incoming requests for our IP, sysfs /sys/arp/table with formatted IP/MAC/interface/state columns - Created apps/arp/arp.c: reads and displays /sys/arp/table - Kernel calls arp_init() at boot, registered sysfs 'arp' namespace - Tested: clean boot, ARP initialized, arp app in CPIO
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "keyboard.h"
|
||||
#include "ethernet.h"
|
||||
#include "ipv4.h"
|
||||
#include "arp.h"
|
||||
#include "framebuffer.h"
|
||||
|
||||
/* Global framebuffer info, parsed from multiboot2 tags. */
|
||||
@@ -423,6 +424,9 @@ void kernel_main(uint32_t magic, uint32_t addr) {
|
||||
ipv4_init();
|
||||
offset_print("IPv4 stack initialized\n");
|
||||
|
||||
arp_init();
|
||||
offset_print("ARP subsystem initialized\n");
|
||||
|
||||
init_drivers();
|
||||
EARLY_PRINT("DRV ");
|
||||
offset_print("Drivers initialized\n");
|
||||
|
||||
Reference in New Issue
Block a user