Module defining an abstract data type describing the connectivity among a collection of OpenFlow switches.
- type Port = (SwitchID, PortID)
- type Link = Set Port
- type Topology = Set Link
- unTopology :: Topology -> Set Link
- merge :: Topology -> Topology -> Topology
- empty :: Topology
- link :: (Port, Port) -> Link
- addLink :: Port -> Port -> Topology -> Topology
- removeSwitch :: SwitchID -> Topology -> Topology
- combine :: Topology -> Topology -> Topology
- removeLink :: Link -> Topology -> Topology
- removePort :: Port -> Topology -> Topology
- subset :: SwitchID -> Topology -> Topology
- containsDataPathID :: SwitchID -> Link -> Bool
- containsPort :: Port -> Link -> Bool
Port definition that references a specific port on a specific switch
A set of two Ports (as defined above) that represents a connection from the PortID of a switch with a certain DataPathID to the PortID of another switch with a different DataPathID
Definition of Topology, that is, a set of two-member sets of ports It's constructors are not made available in other modules; Topologies can only be manipulated by the functions defined in this module. This is done so that certain properties can be assumed of any Topology, namely that all Links contain two members
Add a link into an existing topology. Use with empty to make a new Topology.
Removes all links that include a certain switch's DataPathID from the Topology.
Find the subset of Links in a Topology that all include a certain switch's DataPathID