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:
|
elif packet.type == 0x86dd:
|
||||||
pass
|
pass
|
||||||
elif packet.type == 0x4242:
|
elif packet.type == 0x4242:
|
||||||
print("Special handling needed")
|
cpu_header = CpuHeader(packet.payload)
|
||||||
|
original_pkg = pkg[0:111]
|
||||||
|
|
||||||
pass
|
pass
|
||||||
elif packet.type == 0x2323:
|
elif packet.type == 0x2323:
|
||||||
# Set back (incorrectly maybe) to IPv6
|
# Set back (incorrectly maybe) to IPv6
|
||||||
|
|
|
@ -75,12 +75,12 @@ parser MyParser(packet_in packet,
|
||||||
|
|
||||||
control MyDeparser(packet_out packet, in headers hdr) {
|
control MyDeparser(packet_out packet, in headers hdr) {
|
||||||
apply {
|
apply {
|
||||||
/* only if information is sent to the controller */
|
|
||||||
packet.emit(hdr.cpu);
|
|
||||||
|
|
||||||
/* always */
|
/* always */
|
||||||
packet.emit(hdr.ethernet);
|
packet.emit(hdr.ethernet);
|
||||||
|
|
||||||
|
/* only if information is sent to the controller */
|
||||||
|
packet.emit(hdr.cpu);
|
||||||
|
|
||||||
/* either */
|
/* either */
|
||||||
packet.emit(hdr.ipv4);
|
packet.emit(hdr.ipv4);
|
||||||
packet.emit(hdr.ipv6);
|
packet.emit(hdr.ipv6);
|
||||||
|
|
|
@ -164,7 +164,7 @@ control MyIngress(inout headers hdr,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
table v4_routing {
|
table v4_networks {
|
||||||
key = {
|
key = {
|
||||||
hdr.ipv4.dst_addr: lpm;
|
hdr.ipv4.dst_addr: lpm;
|
||||||
}
|
}
|
||||||
|
@ -203,6 +203,7 @@ control MyEgress(inout headers hdr,
|
||||||
apply {
|
apply {
|
||||||
// ingress clone
|
// ingress clone
|
||||||
if (standard_metadata.instance_type == 1){
|
if (standard_metadata.instance_type == 1){
|
||||||
|
hdr.ethernet.ethertype = TYPE_CPU;
|
||||||
hdr.cpu.setValid();
|
hdr.cpu.setValid();
|
||||||
hdr.cpu.task = meta.task;
|
hdr.cpu.task = meta.task;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue