Parse down to icmp6_na_ns
This commit is contained in:
parent
7db850a731
commit
f79033c0c9
4 changed files with 273 additions and 221 deletions
|
|
@ -37,7 +37,7 @@ const task_t TASK_ICMP6_GENERAL = 2;
|
|||
const task_t TASK_DEBUG = 3;
|
||||
const task_t TASK_ICMP6_REPLY = 4;
|
||||
|
||||
|
||||
/* 48+48+16 = 112 */
|
||||
header ethernet_t {
|
||||
mac_addr_t dst_addr;
|
||||
mac_addr_t src_addr;
|
||||
|
|
@ -60,7 +60,10 @@ header ipv4_t {
|
|||
ipv4_addr_t dst_addr;
|
||||
}
|
||||
|
||||
/* https://en.wikipedia.org/wiki/IPv6_packet */
|
||||
/*
|
||||
https://en.wikipedia.org/wiki/IPv6_packet
|
||||
64 + 256 = 320
|
||||
*/
|
||||
header ipv6_t {
|
||||
bit<4> version;
|
||||
bit<8> traffic_class;
|
||||
|
|
@ -105,12 +108,25 @@ header icmp6_t {
|
|||
bit<16> checksum;
|
||||
}
|
||||
|
||||
/*
|
||||
https://tools.ietf.org/html/rfc4861#section-4.4
|
||||
*/
|
||||
header icmp6_na_ns_t {
|
||||
bit<1> router;
|
||||
bit<1> solicitated;
|
||||
bit<1> override;
|
||||
bit<29> reserved;
|
||||
ipv6_addr_t target_addr;
|
||||
}
|
||||
|
||||
header icmp_t {
|
||||
bit<8> type;
|
||||
bit<8> code;
|
||||
bit<16> checksum;
|
||||
bit<32> rest;
|
||||
}
|
||||
|
||||
|
||||
header cpu_t {
|
||||
task_t task;
|
||||
bit<16> ingress_port;
|
||||
|
|
@ -123,9 +139,10 @@ struct headers {
|
|||
ipv6_t ipv6;
|
||||
tcp_t tcp;
|
||||
udp_t udp;
|
||||
icmp6_t icmp6;
|
||||
icmp_t icmp;
|
||||
cpu_t cpu;
|
||||
icmp6_t icmp6;
|
||||
icmp6_na_ns_t icmp6_na_ns;
|
||||
}
|
||||
|
||||
struct metadata {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue