diff --git a/p4src/minip4_solution.p4 b/p4src/minip4_solution.p4 index 6d322bc..76ebb6a 100644 --- a/p4src/minip4_solution.p4 +++ b/p4src/minip4_solution.p4 @@ -131,117 +131,4 @@ SimpleSumeSwitch( TopParser(), TopPipe(), TopDeparser() -) main; - -// in headers hdr, - //in metadata meta, -// out headers hdr, -// out metadata meta, - //meta.task = 0; // all others missing -// #include "parsers.p4" -// inout headers hdr, - //inout metadata meta, - - - // actions to be enabled - // #include "actions_nat64_generic.p4" // includes controller & delta checksum - // #include "actions_egress.p4" // includes v6_networks, v4_networks - // #include "actions_icmp6_ndp_icmp.p4" // includes icmp6 table, triggers payload checksum! - // #include "actions_arp.p4" // includes v4_arp, v4_egress - // #include "actions_delta_checksum.p4" // non payload based checksumming - - - // apply { - // if(hdr.ipv6.isValid()) { - // if(nat64.apply().hit) { /* generic / static nat64 done */ - // if(hdr.icmp6.isValid()) { - // nat64_icmp6_generic(); - - // if(hdr.icmp6.type == ICMP6_ECHO_REPLY) { - // hdr.icmp.type = ICMP_ECHO_REPLY; - // hdr.icmp.code = 0; - // } - // if(hdr.icmp6.type == ICMP6_ECHO_REQUEST) { - // hdr.icmp.type = ICMP_ECHO_REQUEST; - // hdr.icmp.code = 0; - // } - // } - // if(hdr.udp.isValid()) { - // #ifdef USE_NICO_DELTA_CHECKSUM - // delta_udp_from_v6_to_v4(); - // #else - // meta.chk_udp_v4 = 1; - // #endif - // } - // if(hdr.tcp.isValid()) { - // #ifdef USE_NICO_DELTA_CHECKSUM - // delta_tcp_from_v6_to_v4(); - // #else - - // meta.chk_tcp_v4 = 1; - // #endif - // } - - // v4_networks.apply(); /* apply egress for IPv4 */ - // exit; /* no further v6 processing */ - // } - - // icmp6.apply(); /* icmp6 echo, icmp6 ndp */ - - // v6_networks.apply(); /* regular egress / routing */ - // } 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()) { - // #ifdef USE_NICO_DELTA_CHECKSUM - // delta_udp_from_v4_to_v6(); - // #else - // meta.chk_udp_v6 = 1; - // #endif - // } - // if(hdr.tcp.isValid()) { - // #ifdef USE_NICO_DELTA_CHECKSUM - // delta_tcp_from_v4_to_v6(); - // #else - - // meta.chk_tcp_v6 = 1; - // #endif - // } - - // v6_networks.apply(); - // exit; - // } - // v4_networks.apply(); /* regular routing, egress */ - // } else if(hdr.arp.isValid()) { - // if(v4_arp.apply().hit) { - // v4_arp_egress.apply(); - // } - // } - // } - - - // action send_testdata_to_port1() { - // // python: MAC2 = "08:22:22:22:22:08" - // if(hdr.ethernet.dst_addr == 0x082222222208) { - // sume_metadata.dst_port = 1; - // } - // } -//#ifdef ENABLE_CONTROLLER -// #include "actions_controller.p4" -//#endif -// #ifdef ENABLE_CONTROLLER -// controller_debug; -// #endif - // #include "deparser.p4" +) main; \ No newline at end of file