added P4v1.1 sample program with demo

This commit is contained in:
Antonin Bas
2016-02-24 13:42:15 -08:00
parent 4ad76b5411
commit 82aa156039
8 changed files with 361 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
table_set_default drop_expired do_drop_expired
table_set_default send_frame _drop
table_set_default forward _drop
table_set_default ipv4_lpm _drop
table_add send_frame rewrite_mac 1 => 00:aa:bb:00:00:00
table_add send_frame rewrite_mac 2 => 00:aa:bb:00:00:01
table_add forward set_dmac 10.0.0.10 => 00:04:00:00:00:00
table_add forward set_dmac 10.0.1.10 => 00:04:00:00:00:01
table_add ipv4_lpm set_nhop 10.0.0.10/32 => 10.0.0.10 1
table_add ipv4_lpm set_nhop 10.0.1.10/32 => 10.0.1.10 2