Skip to content

Commit

Permalink
cool use of alias meta field #511
Browse files Browse the repository at this point in the history
  • Loading branch information
smolkaj committed Jul 15, 2016
1 parent d0d23bd commit b0816a1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/meta-fields/default-port.kat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let inport := port in

(* by default, forward packets to controller *)
port := pipe("controller");

(* overwrite default behavior ... *)
begin
if inport=1 then port:=2 else
if ip4Dst=10.0.0.1 then port:=1 else
id
end

0 comments on commit b0816a1

Please sign in to comment.