Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Portless NetKAT
Portless NetKAT is a modified version of the NetKAT language for defining policies without ports. The language, takes the regular NetKAT and replaces the
Switch
andPort
header withAbstractLocation
andFrom
headers. Here, bothAbstractLocation
andFrom
can take values that either represent a host or a switch.Simple example policy
Topology:
Portful Policy:
Equivalent Portless Policy:
Compilation
As the tables that are finally generated need to talk about ports, the
Frenetic_NetKAT_Portless_Compiler
provides acompile
function with the following signature:val compile: portless_policy -> topo -> portful_policy
where,
portless_policy
=Frenetic_NetKAT_Portless.policy
topo
=Frenetic_NetKAT_Portless.topo
portful_policy
=Frenetic_NetKAT.policy
Files Added
lib/Frenetic_NetKAT_Portless.ml
This modile has the Portless NetKAT language defined. This modile also defines
topo
which is a simple representation of a topology.lib/Frenetic_Portless_Fdd.ml
Similar to
lib/Frenetic_Fdd.ml
, this module is used in the compilation process of converting a portless policy into a portful one. We use an FDD to reorder the policies such that all tests come first and all the modifications at the end. This process helps getting rid of corner edge cases that might produce incorrect policies if done naively.lib/Frenetic_NetKAT_Portless_Optimize.ml
Module similar to
lib/Frenetic_NetKAT_Optimize.ml
and us used by the compiler as a module with some helper functions.lib/Frenetic_NetKAT_Portless_Compiler.ml
This is the module that has functions to compile the local portless NetKAT to a portful one.
lib/Frenetic_NetKAT_Portless_Generated_Parser.cppo.mly
Generated parser file similar to
lib/Frenetic_NetKAT_Generated_Parser.cppo.mly
.lib/Frenetic_NetKAT_Portless_Lexer.ml
The Portless NetKAT Lexer.
lib/Frenetic_NetKAT_Portless_Parser.ml
The Portless NetKAT Parser.
lib/Portless_Parser.cppo.mly
The grammar file for parsing the Portless NetKAT policies.
frenetic/Topologies.ml
Module with simple topologies generation that are the same as mininet default topologies. It can generate
minimal
,simple
,linear
, andtree
topologies.Files Modified
lib/Parser.cppo.mly
As the tokens are generated only from the
lib/Parser.cppo.mly
, have addedABSTRACTLOC
,FROM
,SWITCHPREFIX
, andHOSTPREFIX
tokens. The grammar to parse them is all inlib/Portless_Parser.cppo.mly
.frenetic/frenetic.ml
Added a
start-controller
command tofrenetic.native
that takes in a topology name and a portless policy and installs the tables to the switches on the network. Here the topology name is exactly as put in--topo=
argument ofmininet
._oasis
OASIS stuff becuase new files were added.
lib/frenetic.mldylib
OASIS stuff becuase new files were added.
lib/frenetic.mllib
OASIS stuff becuase new files were added.
lib/frenetic.odocl
OASIS stuff becuase new files were added.
setup.ml
OASIS stuff becuase new files were added.
Start Controller Command
The frenetic
start-controller
command starts a simple controller that installs the local portless policy to the switches on the netowrk. It has the following flags:--topo topology_name
The name of the topology. Same as mn --topo value.[--openflow-port int]
Port to listen on for OpenFlow switches. Defaults to6633
.[--policy-file file]
containing NetKAT policy to apply to the network. Defaults topolicy.kat
.Sample Policies for Fully Connected Networks
topo-name =
minimal
Portless Policy:
topo-name =
single,4
Portless Policy:
topo-name =
linear,3
Portless Policy:
topo-name =
tree,2,2
Portless Policy: