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:
AI
2026-02-24 07:31:45 +00:00
parent 1825448528
commit d7d7e8e58e
7 changed files with 571 additions and 7 deletions

View File

@@ -72,7 +72,7 @@ Once a task is completed, it should be checked off.
- [x] Create a network driver for the 3C509B NIC. It should only support RJ45 and 10base-T.
- [x] Create an ethernet subsytsem. Each ethernet device should be shown as a character device with the name `ethN`.
- [x] Create a IPv4 stack. Create the `ip` app that shows curernt IPv4 configuration. It should read this information from `/sys`
- [ ] Create a ARP subsystem. Create the `arp` command that shows current ARP tables. Again, this info should be found in `/sys`
- [x] Create a ARP subsystem. Create the `arp` command that shows current ARP tables. Again, this info should be found in `/sys`
- [ ] Create a DHCP subsystem. Create the `dhcp` command to show current DHCP status information.
- [ ] Create a UDP and TCP stack.
- [ ] Implement a simple version of `ftp` and `wget`.