diff options
| author | Miguel <m.i@gmx.at> | 2018-09-27 11:03:00 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-27 11:03:00 +0200 |
| commit | 05d86ed530c05ba3f8648ffd7e67f4a593ae58d8 (patch) | |
| tree | df959f63050abda6d3ca4f46dfab56ba07443ca4 /net/ipv4.c | |
| parent | 50ad5b31f261eceb715720fbe279a69241770554 (diff) | |
ntp
Diffstat (limited to 'net/ipv4.c')
| -rw-r--r-- | net/ipv4.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3,11 +3,12 @@ #include "inet.h" #include "eth.h" #include "icmp.h" +#include "udp.h" bool ipv4_incoming(struct netdev *dev,struct eth_hdr *hdr) { struct ipv4_hdr *ipv4=hdr->payload; -// klog("ipv4 incoming with checksum: 0x%04X",ntohs(ipv4->csum)); + //klog("ipv4 incoming with checksum: 0x%04X",ntohs(ipv4->csum)); ipv4->csum=0; // klog("expected checksum: 0x%04X",checksum(ipv4,ntohs(ipv4->len))); // klog("ipv4 header len=%d",ipv4->ihl); @@ -16,6 +17,11 @@ bool ipv4_incoming(struct netdev *dev,struct eth_hdr *hdr) { icmp_incoming(dev,hdr); } + + if(ipv4->proto==IPV4_P_UDP) + { + udp_incoming(hdr,ipv4+1); + } return true; } |
