1
0
mirror of https://code.semirocket.science/wrapsix synced 2025-12-08 09:55:13 +02:00

Processing of ARP packets

This commit is contained in:
Michal Zima
2012-03-31 18:47:27 +02:00
parent 845f5c541b
commit 378f34ec64
4 changed files with 141 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
#include <time.h> /* time */
#include <unistd.h> /* close */
#include "arp.h"
#include "ethernet.h"
#include "ipv4.h"
#include "ipv6.h"
@@ -166,7 +167,7 @@ int process(char *packet)
return ipv6(eth, payload);
case ETHERTYPE_ARP:
printf("[Debug] HW Protocol: ARP\n");
return -1;
return arp(eth, payload);
default:
printf("[Debug] HW Protocol: unknown [%d/0x%04x]\n",
htons(eth->type), htons(eth->type));