rename to v4networks

This commit is contained in:
Nico Schottelius 2019-03-04 16:38:06 +01:00
parent d558537367
commit 542b4ddd50
3 changed files with 8 additions and 5 deletions

View file

@ -233,7 +233,9 @@ class L2Controller(object):
elif packet.type == 0x86dd:
pass
elif packet.type == 0x4242:
print("Special handling needed")
cpu_header = CpuHeader(packet.payload)
original_pkg = pkg[0:111]
pass
elif packet.type == 0x2323:
# Set back (incorrectly maybe) to IPv6

View file

@ -75,12 +75,12 @@ parser MyParser(packet_in packet,
control MyDeparser(packet_out packet, in headers hdr) {
apply {
/* only if information is sent to the controller */
packet.emit(hdr.cpu);
/* always */
packet.emit(hdr.ethernet);
/* only if information is sent to the controller */
packet.emit(hdr.cpu);
/* either */
packet.emit(hdr.ipv4);
packet.emit(hdr.ipv6);

View file

@ -164,7 +164,7 @@ control MyIngress(inout headers hdr,
}
table v4_routing {
table v4_networks {
key = {
hdr.ipv4.dst_addr: lpm;
}
@ -203,6 +203,7 @@ control MyEgress(inout headers hdr,
apply {
// ingress clone
if (standard_metadata.instance_type == 1){
hdr.ethernet.ethertype = TYPE_CPU;
hdr.cpu.setValid();
hdr.cpu.task = meta.task;
}