mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 06:58:22 +00:00
ipv4: checksumming and processing
This commit is contained in:
@@ -15,12 +15,11 @@ void eth_process(netdev_t *netdev, void *buffer) {
|
||||
if (!(MAC_EQUAL(&dst, &netdev->mac) || MAC_EQUAL(&dst, &broadcast)))
|
||||
return;
|
||||
|
||||
printf("our machine!\n");
|
||||
|
||||
void *nextbuff = (void *)((uintptr_t)buffer + sizeof(ethframe_t));
|
||||
|
||||
switch (be_to_cpu_w(frame->type)) {
|
||||
case ETH_PROTO_IP:
|
||||
ipv4_process(netdev, nextbuff);
|
||||
break;
|
||||
case ETH_PROTO_ARP:
|
||||
arp_process(netdev, nextbuff);
|
||||
|
||||
Reference in New Issue
Block a user