Safe Haskell | Safe-Infered |
---|
- type Switch = Word64
- type Port = Word16
- type Vlan = Word16
- data Loc = Loc Switch Port
- data PseudoPort
- type Word48 = EthernetAddress
- data Action = Action {}
- data Query
- = NumPktQuery {
- idOfQuery :: QueryID
- numPktQueryChan :: Chan (Switch, Integer)
- queryInterval :: Int
- countField :: Counter
- totalVal :: IORef Integer
- lastVal :: IORef Integer
- | PktQuery {
- pktQueryChan :: Chan (Switch, Packet)
- idOfQuery :: QueryID
- = NumPktQuery {
- data Counter
- data Modification = Modification {}
- unmodified :: Modification
- isPktQuery :: Query -> Bool
- countPkts :: Int -> IO (Chan (Switch, Integer), Action)
- countBytes :: Int -> IO (Chan (Switch, Integer), Action)
- getPkts :: IO (Chan (Switch, Packet), Action)
- actionForwardsTo :: Action -> MultiSet PseudoPort
- data Pattern = Pattern {
- ptrnDlSrc :: Wildcard Word48
- ptrnDlDst :: Wildcard Word48
- ptrnDlTyp :: Wildcard Word16
- ptrnDlVlan :: Wildcard (Maybe Vlan)
- ptrnDlVlanPcp :: Wildcard Word8
- ptrnNwSrc :: Prefix Word32
- ptrnNwDst :: Prefix Word32
- ptrnNwProto :: Wildcard Word8
- ptrnNwTos :: Wildcard Word8
- ptrnTpSrc :: Wildcard Word16
- ptrnTpDst :: Wildcard Word16
- ptrnInPort :: Wildcard Port
- data Predicate
- exactMatch :: Packet -> Predicate
- data Packet = Packet {}
- data Policy
- interesting :: String -> Pattern -> [String]
- modifiedFields :: Modification -> Set Field
- prUnIntersect :: Predicate -> [Predicate]
- prUnUnion :: Predicate -> [Predicate]
- poUnUnion :: Policy -> [Policy]
- poDom :: Policy -> Predicate
- module Frenetic.EthernetAddress
- size :: Policy -> Int
Basic types
data PseudoPort Source
Logical ports.
type Word48 = EthernetAddressSource
Ethernet addresses are 48-bits wide.
Actions
Actions to perform on packets.
NumPktQuery | |
| |
PktQuery | |
|
data Modification Source
For each fields with a value Just v, modify that field to be v. If the field is Nothing then there is no modification of that field.
Modification | |
|
isPktQuery :: Query -> BoolSource
Basic actions
Inspecting actions
Patterns
Patterns to match packets. Patterns translate directly to a single OpenFlow match rule.
Pattern | |
|
Predicates
Predicates to match packets.
exactMatch :: Packet -> PredicateSource
A predicate that exactly matches a packet's headers.
Packets
Packets' headers.
Packet | |
|
Policies
Policies denote functions from (switch, packet) to packets.
Tools
interesting :: String -> Pattern -> [String]Source
Build a list of the non-wildcarded patterns with sep between field and value
modifiedFields :: Modification -> Set FieldSource
prUnIntersect :: Predicate -> [Predicate]Source
Get back all predicates in the intersection. Does not return any naked intersections.
prUnUnion :: Predicate -> [Predicate]Source
Get back all predicates in the union. Does not return any naked unions.
poUnUnion :: Policy -> [Policy]Source
Get back all basic policies in the union. Does not return any unions.
module Frenetic.EthernetAddress