diff --git a/src/arp.c b/src/arp.c index 4896472..78df82b 100644 --- a/src/arp.c +++ b/src/arp.c @@ -196,6 +196,11 @@ static int arp_input(const struct ether_hdr *hdr __unused, LOG(LOG_WARN, "Invalid ARP op: %d", arp.arp_oper); break; } + } else if (arp.arp_ptype == ETHER_PROTO_IPV6) { + /* TODO: IPv6 support */ + LOG(LOG_INFO, "TODO: IPv6 support - WIP"); + + return -EPROTOTYPE; } else { LOG(LOG_DEBUG, "Unknown ptype"); diff --git a/src/nstack_ip.h b/src/nstack_ip.h index 0eee609..e70e822 100644 --- a/src/nstack_ip.h +++ b/src/nstack_ip.h @@ -42,6 +42,20 @@ struct ip_hdr { } __attribute__((packed, aligned(4))); +/** + * IPv6 Packet Header. + */ +struct ipv6_hdr { + uint8_t ip_vhl; /* version */ + uint16_t ip_tc; /* traffic class */ + uint32_t ip_flb; /* flowlabel (20 bits) */ + uint32_t ip_len; /* payload length */ + uint16_t ip_nhdr; /* next header */ + uint16_t ip_hopl; /* hoplimit */ + uint8_t ip_src[16]; /* source address */ + uint8_t ip_dst[16]; /* destination address */ +} __attribute__((packed, aligned(4))); + /** * IP Packet Header Defaults * @{