hans-2.4.0.0: IPv4 Network Stack

Safe HaskellNone
LanguageHaskell98

Hans.Message.Udp

Synopsis

Documentation

parseUdpHeader :: Get (UdpHeader, Int) Source

Parse out a UdpHeader, and the size of the payload.

renderUdpHeader :: UdpHeader -> Int -> Put Source

Render a UdpHeader.

renderUdpPacket :: UdpHeader -> ByteString -> MkPseudoHeader -> IO ByteString Source

Given a way to make the pseudo header, render the UDP packet.

validateUdpChecksum :: IP4 -> IP4 -> ByteString -> Bool Source

Recreate the UDP checksum, given a rendered packet, and the source and destination.