Parse down to icmp6_na_ns

This commit is contained in:
Nico Schottelius 2019-03-23 13:33:25 +01:00
commit f79033c0c9
4 changed files with 273 additions and 221 deletions

View file

@ -46,17 +46,20 @@ parser MyParser(packet_in packet,
}
}
/*
state icmp6 {
packet.extract(hdr.icmp6);
transition select(hdr.ipv6.next_header){
ICMP6_NS:
ICMP6_NS: icmp6_neighbor_solicitation;
default: accept;
}
}
state icmp6_neighbor_solicitation {
} */
state icmp6_neighbor_solicitation {
packet.extract(hdr.icmp6_na_ns);
transition accept;
}
/* Leaf */
state tcp {
@ -69,10 +72,10 @@ parser MyParser(packet_in packet,
transition accept;
}
state icmp6 {
packet.extract(hdr.icmp6);
transition accept;
}
// state icmp6 {
// packet.extract(hdr.icmp6);
// transition accept;
// }
state icmp {
packet.extract(hdr.icmp);
@ -101,7 +104,10 @@ control MyDeparser(packet_out packet, in headers hdr) {
packet.emit(hdr.tcp);
packet.emit(hdr.udp);
packet.emit(hdr.icmp);
/* might be more than one subtype */
packet.emit(hdr.icmp6);
packet.emit(hdr.icmp6_na);
}
}