Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data IP4State = IP4State {
- ip4Routes :: !(IORef RoutingTable)
- ip4ArpTable :: !ArpTable
- ip4Fragments :: !FragTable
- ip4ArpRetry :: !Int
- ip4ArpRetryDelay :: !Int
- ip4ResponderQueue :: !(BoundedChan ResponderRequest)
- ip4RandomSeed :: !(IORef StdGen)
- data SendSource
- data ResponderRequest
- = Finish !Device !Mac [ByteString]
- | Send !SendSource !IP4 !Bool !NetworkProtocol ByteString
- newIP4State :: Config -> IO IP4State
- class HasIP4State state where
- addRoute :: HasIP4State state => state -> Bool -> Route -> IO ()
- lookupRoute4 :: HasIP4State state => state -> IP4 -> IO (Maybe (IP4, IP4, Device))
- isLocalAddr :: HasIP4State state => state -> IP4 -> IO (Maybe Route)
- nextIdent :: HasIP4State state => state -> IO IP4Ident
- routesForDev :: HasIP4State state => state -> Device -> IO [Route]
Documentation
IP4State | |
|
data SendSource Source #
data ResponderRequest Source #
Finish !Device !Mac [ByteString] | Finish sending these IP4 packets |
Send !SendSource !IP4 !Bool !NetworkProtocol ByteString | Send this IP4 payload to this address |
class HasIP4State state where Source #
lookupRoute4 :: HasIP4State state => state -> IP4 -> IO (Maybe (IP4, IP4, Device)) Source #
Lookup the source address, as well as the next hop and device.
isLocalAddr :: HasIP4State state => state -> IP4 -> IO (Maybe Route) Source #
Is this an address that's assigned to a device in the network stack?
nextIdent :: HasIP4State state => state -> IO IP4Ident Source #
Give back the result of using the random
function on the internal state.
routesForDev :: HasIP4State state => state -> Device -> IO [Route] Source #
Give back the list of routing rules associated with this device.