Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Route = Route {
- routeNetwork :: !IP4Mask
- routeType :: !RouteType
- routeDevice :: !Device
- data RouteType
- routeSource :: Route -> IP4
- routeNextHop :: IP4 -> Route -> IP4
- data RoutingTable
- empty :: RoutingTable
- addRule :: Bool -> Route -> RoutingTable -> RoutingTable
- deleteRule :: IP4Mask -> RoutingTable -> RoutingTable
- lookupRoute :: IP4 -> RoutingTable -> Maybe Route
- isLocal :: IP4 -> RoutingTable -> Maybe Route
- getRoutes :: RoutingTable -> [Route]
- routesForDev :: Device -> RoutingTable -> [Route]
Documentation
Route | |
|
routeSource :: Route -> IP4 Source #
data RoutingTable Source #
Simple routing.
empty :: RoutingTable Source #
addRule :: Bool -> Route -> RoutingTable -> RoutingTable Source #
deleteRule :: IP4Mask -> RoutingTable -> RoutingTable Source #
lookupRoute :: IP4 -> RoutingTable -> Maybe Route Source #
isLocal :: IP4 -> RoutingTable -> Maybe Route Source #
If the address given is the source address for a rule in the table, return
the associated Device
.
getRoutes :: RoutingTable -> [Route] Source #
routesForDev :: Device -> RoutingTable -> [Route] Source #
Give back routes that involve this device.