hans-3.0.2: Network Stack

Safe HaskellNone
LanguageHaskell2010

Hans.IP4.Output

Contents

Synopsis

Documentation

sendIP4 :: NetworkStack -> SendSource -> IP4 -> Bool -> NetworkProtocol -> ByteString -> IO Bool Source #

Send an IP4 packet to the given destination. If it's not possible to find a route to the destination, return False.

queueIP4 :: NetworkStack -> DeviceStats -> SendSource -> IP4 -> Bool -> NetworkProtocol -> ByteString -> IO () Source #

Queue a message on the responder queue instead of attempting to send it directly.

prepareIP4 :: NetworkStack -> Device -> IP4 -> IP4 -> Bool -> NetworkProtocol -> ByteString -> IO [ByteString] Source #

Prepare IP4 fragments to be sent.

primSendIP4 :: NetworkStack -> Device -> IP4 -> IP4 -> IP4 -> Bool -> NetworkProtocol -> ByteString -> IO () Source #

Send an IP4 packet to the given destination. This assumes that routing has already taken place, and that the source and destination addresses are correct.

ICMP4 Messages

portUnreachable :: NetworkStack -> Device -> SendSource -> IP4 -> ByteString -> IO () Source #

Emit a destination unreachable ICMP message. This will always be queued via the responder queue, as it is most likely coming from the fast path. The bytestring argument is assumed to be the original IP4 datagram, trimmed to IP4 header + 8 bytes of data.