Really, really ugly hack to get the thing compile again
REALLY ugly, but works.
This commit is contained in:
		
					parent
					
						
							
								28f985d9ce
							
						
					
				
			
			
				commit
				
					
						36e374737c
					
				
			
		
					 2 changed files with 4 additions and 17 deletions
				
			
		| 
						 | 
				
			
			@ -68,23 +68,8 @@ action delta_udp_from_v4_to_v6()
 | 
			
		|||
    hdr.udp.checksum = (bit<16>) tmp;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
action delta_udp_from_v6_to_v4()
 | 
			
		||||
{
 | 
			
		||||
    delta_prepare();
 | 
			
		||||
#define delta_udp_from_v6_to_v4 delta_prepare (); tmp17 = (bit<17>) hdr.udp.checksum + (bit<17>) meta.v4sum; if (tmp17[16:16] == 1) { tmp17 = tmp17 + 1; tmp17[16:16] = 0; } tmp17 = tmp17 + (bit<17>) (0xffff - meta.v6sum); if (tmp17[16:16] == 1) { tmp17 = tmp17 + 1; tmp17[16:16] = 0; }  hdr.udp.checksum = (bit<16>) tmp17;
 | 
			
		||||
 | 
			
		||||
    bit<17> tmp = (bit<17>) hdr.udp.checksum + (bit<17>) meta.v4sum;
 | 
			
		||||
    if (tmp[16:16] == 1) {
 | 
			
		||||
        tmp = tmp + 1;
 | 
			
		||||
        tmp[16:16] = 0;
 | 
			
		||||
    }
 | 
			
		||||
    // tmp = tmp + (bit<17>) (0xffff - meta.v6sum);
 | 
			
		||||
    // if (tmp[16:16] == 1) {
 | 
			
		||||
    //     tmp = tmp + 1;
 | 
			
		||||
    //     tmp[16:16] = 0;
 | 
			
		||||
    // }
 | 
			
		||||
 | 
			
		||||
    hdr.udp.checksum = (bit<16>) tmp;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
action delta_tcp_from_v4_to_v6()
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -143,9 +143,11 @@ control RealMain(
 | 
			
		|||
                }
 | 
			
		||||
 | 
			
		||||
                if(hdr.udp.isValid()) {
 | 
			
		||||
                    bit<17> tmp17 = 0;
 | 
			
		||||
                    //delta_prepare();
 | 
			
		||||
                    delta_udp_from_v6_to_v4();
 | 
			
		||||
                    //delta_udp_from_v6_to_v4();
 | 
			
		||||
                    //stupid();
 | 
			
		||||
                    delta_udp_from_v6_to_v4
 | 
			
		||||
                }
 | 
			
		||||
                // if(hdr.tcp.isValid()) {
 | 
			
		||||
                //     #ifdef USE_NICO_DELTA_CHECKSUM
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue