Implement Ethernet subsystem with unified NIC abstraction (AI)
- Created src/ethernet.h: eth_iface_t interface struct, Ethernet header type, htons/ntohs/htonl/ntohl byte-order helpers, EtherType constants, send/recv with automatic header construction/stripping - Created src/ethernet.c: interface table, char device ops routed through ethernet layer, sysfs /sys/net namespace exposing per-iface mac/ip/netmask/gateway/link files, IPv4 address parse/format - NE2000 and 3C509B drivers now register through ethernet_register() instead of directly via devicefs_register_char(); removed redundant char device ops from both drivers - Kernel calls ethernet_init() before init_drivers() so the subsystem is ready when NIC drivers probe - Tested: NE2000 detected with NIC, 'eth1' registered via ethernet subsystem; clean boot without NIC
This commit is contained in:
@@ -70,7 +70,7 @@ Once a task is completed, it should be checked off.
|
||||
- [x] Create an app called `mkfs.fat32`. This app can be used to format a block into a FAT32 filesystem.
|
||||
- [x] Create a network driver for the NE2000 NIC.
|
||||
- [x] Create a network driver for the 3C509B NIC. It should only support RJ45 and 10base-T.
|
||||
- [ ] Create an ethernet subsytsem. Each ethernet device should be shown as a character device with the name `ethN`.
|
||||
- [x] Create an ethernet subsytsem. Each ethernet device should be shown as a character device with the name `ethN`.
|
||||
- [ ] 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`
|
||||
- [ ] Create a DHCP subsystem. Create the `dhcp` command to show current DHCP status information.
|
||||
|
||||
Reference in New Issue
Block a user