Legend:
Library
Module
Module type
Parameter
Class
Class type
A uniform interface to OpenFlow 1.0 and 1.3.
A high-level language, such as Frenetic, should support OpenFlow 1.0 and also exploit OpenFlow 1.3 features when possible. For example, when two Frenetic actions are composed in parallel, they logically work on two copies of a packet. Certain kinds of parallel composition cannot be realized in OpenFlow 1.0, but they are trivial to implement with group tables in OpenFlow 1.3.
Similarly, OpenFlow 1.3 can implement failover efficiently using fast- failover groups. But, in OpenFlow 1.0, we have to incur a round-trip to the controller.
Instead of creating two different versions of the Frenetic compiler, we here define a high-level action data type. When targeting OpenFlow 1.0, actions translates to 1.0 action sequences and controller round-trips if needed. When targeting OpenFlow 1.3, action also builds group tables to realize actions efficiently. This requires a global analysis of all the actions in a flow table. Therefore, Frenetic needs to supply the entire flow table at once and cannot add and remove flow table entries individually
OpenFlow Identifier Types
OpenFlow requires identifiers for switches, ports, transaction numbers, etc. The representation of these identifiers varies across different versions of OpenFlow, which is why they are abstract.
type switchId = int64
val equal_switchId : switchId->switchId->Ppx_deriving_runtime.bool
val sexp_of_switchId : switchId->Ppx_sexp_conv_lib.Sexp.t
val switchId_of_sexp : Ppx_sexp_conv_lib.Sexp.t ->switchId