rename to v4networks
This commit is contained in:
parent
d558537367
commit
542b4ddd50
3 changed files with 8 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue