Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class NetworkAddr addr => Network addr where
- sendDatagram :: (HasNetworkStack ns, Network addr) => ns -> RouteInfo addr -> addr -> Bool -> NetworkProtocol -> ByteString -> IO ()
- routeDatagram :: (HasNetworkStack ns, Network addr) => ns -> addr -> Bool -> NetworkProtocol -> ByteString -> IO Bool
- findNextHop :: (HasNetworkStack ns, Network addr) => ns -> Maybe Device -> Maybe addr -> addr -> IO (Maybe (RouteInfo addr))
- module Hans.Network.Types
Documentation
class NetworkAddr addr => Network addr where Source #
Interaction with routing and message delivery for a network layer.
pseudoHeader :: addr -> addr -> NetworkProtocol -> Int -> PartialChecksum Source #
Calculate the pseudo-header for checksumming a packet at this layer of the network.
lookupRoute :: HasNetworkStack ns => ns -> addr -> IO (Maybe (RouteInfo addr)) Source #
Lookup a route to reach this destination address.
sendDatagram' :: HasNetworkStack ns => ns -> Device -> addr -> addr -> addr -> Bool -> NetworkProtocol -> ByteString -> IO () Source #
Send a single datagram to a destination.
sendDatagram :: (HasNetworkStack ns, Network addr) => ns -> RouteInfo addr -> addr -> Bool -> NetworkProtocol -> ByteString -> IO () Source #
routeDatagram :: (HasNetworkStack ns, Network addr) => ns -> addr -> Bool -> NetworkProtocol -> ByteString -> IO Bool Source #
Send a datagram and lookup routing information at the same time. Returns
False
if no route to the destination was known.
module Hans.Network.Types