Add checksum marker

This commit is contained in:
Nico Schottelius 2019-03-25 12:56:54 +01:00
commit 905f51fba3
2 changed files with 39 additions and 16 deletions

View file

@ -16,7 +16,7 @@ control MyIngress(inout headers hdr,
inout metadata meta,
inout standard_metadata_t standard_metadata) {
/********************** ACTIONS ***********************************/
/********************** GENERAL ACTIONS ***********************************/
action drop() {
mark_to_drop();
@ -172,7 +172,7 @@ control MyIngress(inout headers hdr,
/* 2. ICMP6 changes */
hdr.icmp6.type = ICMP6_NA;
hdr.icmp6.code = 0;
// checksum is calculated in deparser
hdr.icmp6.checksum = 42; // checksum is calculated in deparser - marking with 42 to see whether it is calculated
/* 3. icmp6/neighbor advertisement: values taken from real world answers */
hdr.icmp6_na_ns.router = 0;