This repository was archived by the owner on Jun 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Language Basics
Joshua Reich edited this page Jul 29, 2013
·
21 revisions
builtin fields are:
Policy | Syntax | Semantics | E.G. |
match | match(f=v) | returns set containing packet if packet's field f matches value, empty set otherwise v | match(dstmac=MAC('00:00:00:00:00:01')) |
modify | modify(f=v) | returns set containing copy of packet where field f is set to v | modify(srcmac=MAC('00:00:00:00:00:01')) |
forward | fwd(a) | returns set containing copy of packet where outport field is set to a | fwd(1) |
drop | drop | returns empty set | drop |
identity | identity | returns set containing copy of packet | identity |
flood | flood() | returns set containing one copy of packet for each port on the spanning tree | flood() |
parallel composition | A + B | returns the union of A's output and B's output | fwd(1) + fwd(2) |
sequential composition | A >> B | returns B's output where A's output is B's input | modify(dstip=IP(10.0.0.2)) >> fwd(2) match(switch=1) >> flood() |