fix ipv6 var naming
This commit is contained in:
parent
476b04c97c
commit
8d2b73edee
1 changed files with 20 additions and 20 deletions
|
@ -635,10 +635,10 @@ Echo or Echo Reply Message
|
|||
action v4sum() {
|
||||
bit<16> localsum = 0;
|
||||
|
||||
localsum = localsum + hdr.ipv4.src[15:0]; // 16 bit
|
||||
localsum = localsum + hdr.ipv4.src[31:16]; // 16 bit
|
||||
localsum = localsum + hdr.ipv4.dst[15:0]; // 16 bit
|
||||
localsum = localsum + hdr.ipv4.dst[31:16]; // 16 bit
|
||||
localsum = localsum + hdr.ipv4.src_addr[15:0]; // 16 bit
|
||||
localsum = localsum + hdr.ipv4.src_addr[31:16]; // 16 bit
|
||||
localsum = localsum + hdr.ipv4.dst_addr[15:0]; // 16 bit
|
||||
localsum = localsum + hdr.ipv4.dst_addr[31:16]; // 16 bit
|
||||
|
||||
localsum = localsum + hdr.ipv4.totalLen -20; // 16 bit
|
||||
localsum = localsum + (bit<16>) hdr.ipv4.protocol; // 8 bit
|
||||
|
@ -647,23 +647,23 @@ Echo or Echo Reply Message
|
|||
action v6sum() {
|
||||
bit<16> localsum = 0;
|
||||
|
||||
localsum = localsum + hdr.ipv6.src[15:0]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src[31:16]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src[47:32]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src[63:48]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src[79:64]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src[95:80]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src[111:96]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src[127:112]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src_addr[15:0]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src_addr[31:16]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src_addr[47:32]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src_addr[63:48]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src_addr[79:64]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src_addr[95:80]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src_addr[111:96]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.src_addr[127:112]; // 16 bit
|
||||
|
||||
localsum = localsum + hdr.ipv6.dst[15:0]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst[31:16]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst[47:32]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst[63:48]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst[79:64]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst[95:80]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst[111:96]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst[127:112]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst_addr[15:0]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst_addr[31:16]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst_addr[47:32]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst_addr[63:48]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst_addr[79:64]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst_addr[95:80]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst_addr[111:96]; // 16 bit
|
||||
localsum = localsum + hdr.ipv6.dst_addr[127:112]; // 16 bit
|
||||
|
||||
localsum = localsum + hdr.ipv6.payload_length; // 16 bit
|
||||
localsum = localsum + (bit<16>) hdr.ipv6.next_header; // 8 bit
|
||||
|
|
Loading…
Reference in a new issue