Set mac address based on destination network [HACK]
This commit is contained in:
parent
2292f9e995
commit
0f2df2723b
3 changed files with 47 additions and 8 deletions
|
|
@ -26,6 +26,11 @@ control MyIngress(inout headers hdr,
|
|||
standard_metadata.egress_spec = out_port;
|
||||
}
|
||||
|
||||
action set_egress_port_and_mac (port_t out_port, mac_addr_t mac_addr) {
|
||||
hdr.ethernet.dst_addr = mac_addr;
|
||||
standard_metadata.egress_spec = out_port;
|
||||
}
|
||||
|
||||
action controller_reply(task_t task) {
|
||||
meta.task = task;
|
||||
meta.ingress_port = standard_metadata.ingress_port;
|
||||
|
|
@ -425,6 +430,7 @@ Echo or Echo Reply Message
|
|||
}
|
||||
actions = {
|
||||
set_egress_port;
|
||||
set_egress_port_and_mac;
|
||||
controller_debug;
|
||||
controller_reply;
|
||||
controller_debug_table_id;
|
||||
|
|
@ -440,6 +446,7 @@ Echo or Echo Reply Message
|
|||
}
|
||||
actions = {
|
||||
set_egress_port;
|
||||
set_egress_port_and_mac;
|
||||
controller_debug;
|
||||
controller_debug_table_id;
|
||||
NoAction;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue