|
|
|
@ -21,13 +21,13 @@ control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
|
|
|
|
|
|
|
|
|
|
control MyComputeChecksum(inout headers hdr, inout metadata meta) { |
|
|
|
|
apply { |
|
|
|
|
meta.cast_length = (bit<32>) hdr.ipv6.payload_length; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update_checksum_with_payload(meta.do_cksum == 1, |
|
|
|
|
{ |
|
|
|
|
hdr.ipv6.src_addr, /* 128 */ |
|
|
|
|
hdr.ipv6.dst_addr, /* 128 */ |
|
|
|
|
meta.cast_length, /* 32 */ |
|
|
|
|
meta.cast_length = (bit<32>) hdr.ipv6.payload_length; |
|
|
|
|
24w0, /* 24 0's */ |
|
|
|
|
PROTO_ICMP6 /* 8 */ |
|
|
|
|
}, |
|
|
|
|