[netfpga] phase in ipv4 side of the code
This commit is contained in:
		
					parent
					
						
							
								6003d240c6
							
						
					
				
			
			
				commit
				
					
						7bbee9ffa2
					
				
			
		
					 1 changed files with 26 additions and 1 deletions
				
			
		| 
						 | 
					@ -131,8 +131,33 @@ control RealMain(
 | 
				
			||||||
                v4_networks.apply();       /* apply egress for IPv4 */
 | 
					                v4_networks.apply();       /* apply egress for IPv4 */
 | 
				
			||||||
                exit;                      /* no further v6 processing */
 | 
					                exit;                      /* no further v6 processing */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            } else if(hdr.ipv4.isValid()) {
 | 
				
			||||||
 | 
					                if(icmp.apply().hit) {
 | 
				
			||||||
 | 
					                    v4_networks.apply();
 | 
				
			||||||
 | 
					                    exit;
 | 
				
			||||||
 | 
					                } else if(nat46.apply().hit) {
 | 
				
			||||||
 | 
					                    if(hdr.icmp.isValid()) {
 | 
				
			||||||
 | 
					                        nat46_icmp_generic();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        if(hdr.icmp.type == ICMP_ECHO_REPLY) {
 | 
				
			||||||
 | 
					                            hdr.icmp6.type = ICMP6_ECHO_REPLY;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                        if(hdr.icmp.type == ICMP_ECHO_REQUEST) {
 | 
				
			||||||
 | 
					                            hdr.icmp6.type = ICMP6_ECHO_REQUEST;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    if(hdr.udp.isValid()) {
 | 
				
			||||||
 | 
					                        delta_udp_from_v4_to_v6
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    if(hdr.tcp.isValid()) {
 | 
				
			||||||
 | 
					                        delta_tcp_from_v4_to_v6
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    v6_networks.apply();
 | 
				
			||||||
 | 
					                    exit;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                v4_networks.apply();             /* regular routing, egress */
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        lookup_table.apply();
 | 
					        lookup_table.apply();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue