Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Rule mask addr
- type Mtu = Int
- type RoutingTable addr = PrefixTree (Dest addr)
- emptyRoutingTable :: Address addr => RoutingTable addr
- addRule :: Mask mask addr => Rule mask addr -> RoutingTable addr -> RoutingTable addr
- route :: Address addr => addr -> RoutingTable addr -> Maybe (addr, addr, Mtu)
- localAddrs :: Address addr => RoutingTable addr -> [addr]
- sourceMask :: Mask mask addr => addr -> RoutingTable addr -> Maybe mask
Routing Rules
Routing Table
type RoutingTable addr = PrefixTree (Dest addr) Source
emptyRoutingTable :: Address addr => RoutingTable addr Source
addRule :: Mask mask addr => Rule mask addr -> RoutingTable addr -> RoutingTable addr Source
Add a rule to the routing table.
route :: Address addr => addr -> RoutingTable addr -> Maybe (addr, addr, Mtu) Source
Discover the source and destination when trying to route an address.
localAddrs :: Address addr => RoutingTable addr -> [addr] Source
Dump all local addresses.
sourceMask :: Mask mask addr => addr -> RoutingTable addr -> Maybe mask Source
Find the mask that would be used to route an address.