network-house-0.1.0.3: data and parsers for Ethernet, TCP, UDP, IPv4, IPv6, ICMP, DHCP, TFTP
Safe HaskellSafe-Inferred
LanguageHaskell2010

Net.Utils

Description

Various utilities used in the network protocol stack modules

Synopsis

Documentation

class Functor f => Container f where Source #

Methods

contents :: f a -> a Source #

Instances

Instances details
Container Packet Source # 
Instance details

Defined in Net.Ethernet

Methods

contents :: Packet a -> a Source #

Container Packet Source # 
Instance details

Defined in Net.IPv4

Methods

contents :: Packet a -> a Source #

Container Packet Source # 
Instance details

Defined in Net.TCP

Methods

contents :: Packet a -> a Source #

Container Packet Source # 
Instance details

Defined in Net.UDP

Methods

contents :: Packet a -> a Source #

replace :: Functor f => f a -> b -> f b Source #

emap :: (Functor f, Container f) => (t -> f a) -> f t -> f (f a) Source #

emap2 :: (Container f, Container f, Functor f) => (t -> f a) -> f (f t) -> f (f (f a)) Source #

lift :: (Functor f, Container f) => f (f a) -> f (f a) Source #

lift2 :: (Container f, Container f, Functor f) => f (f (f a)) -> f (f (f a)) Source #

doReq :: forall {c} {m} {v :: Type -> Type} {io} {a} {b}. (ChannelIO c m, MVarIO v m, MVarIO v io) => c a -> ((b -> io ()) -> a) -> m b Source #

foldlArray :: (IArray arr elem, Ix ix, Enum ix) => arr ix elem -> (elem -> a -> a) -> a -> a Source #

arraySize :: (Num a, IArray a e, Ix a) => a a e -> a Source #

The number of elements in an array

checksum :: [Word16] -> Word16 Source #

TCP/IP 16-bit checksums

pairs :: a -> [a] -> [[a]] Source #

Split a list into subcomponents of length 2. The first argument is what to append in case the list is of odd length.