Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- data PacketParser a
- data InPacket
- doParse :: Parse a => InPacket -> Maybe a
- parseInPacket :: PacketParser a -> InPacket -> Maybe a
- (#!) :: (Functor m, Monad m) => m b -> m a -> m b
- (#) :: Functor f => (a -> b) -> f a -> f b
- (<#) :: Monad m => m (a -> b) -> m a -> m b
- class Parse a where
- parse :: PacketParser a
- bytes :: (Num a, Eq a) => a -> PacketParser [Word8]
- bits :: (Bits a, Integral a) => Int -> PacketParser a
- word8 :: PacketParser Word8
- word16 :: PacketParser Word16
- word32 :: PacketParser Word32
- check8 :: Word8 -> PacketParser ()
- check16 :: Word16 -> PacketParser ()
- check :: Monad m => Bool -> m ()
- lift :: Monad m => Maybe a -> m a
- therest :: PacketParser InPacket
- trunc :: Int -> PacketParser ()
- class Unparse a where
- unparse :: a -> UnparseS
- data OutPacket
- doUnparse :: Unparse a => a -> OutPacket
Documentation
data PacketParser a Source
The buffers used to represent packet, when they are received over the network.
parseInPacket :: PacketParser a -> InPacket -> Maybe a Source
(#!) :: (Functor m, Monad m) => m b -> m a -> m b infixl 1 Source
Perform two monadic computation and return the result from the second one
(#) :: Functor f => (a -> b) -> f a -> f b infixl 1 Source
Apply a pure function to the result of a monadic computation
(<#) :: Monad m => m (a -> b) -> m a -> m b infixl 1 Source
Apply a function returned by a monadic computation to an argument returned by a monadic computation
parse :: PacketParser a Source
Parse Bool | |
Parse Char | |
Parse Word8 | |
Parse Word16 | |
Parse Word32 | |
Parse InPacket | |
Parse PacketType | |
Parse Addr | |
Parse Protocol | |
Parse Flags | |
Parse TypeOfService | |
Parse Precedence | |
Parse Addr | |
Parse Port | |
Parse MessageType | |
Parse Option | |
Parse Options | |
Parse Flags | |
Parse Operation | |
Parse Packet | |
Parse MessageType | |
Parse EchoMsg | |
Parse Packet | |
Parse ControlBits | |
Parse ECN | |
Parse Word20 | |
Parse Word4 | |
Parse Addr | |
Parse ErrorCode | |
Parse Packet | |
Parse Operation | |
Parse Packet | |
Parse a => Parse [a] | |
Parse content => Parse (Packet content) | |
Parse contents => Parse (Packet contents) | |
Parse a => Parse (Packet a) | |
Parse content => Parse (Packet content) | |
Parse content => Parse (Packet content) | |
(Parse a, Parse b) => Parse (a, b) | |
Parse (UArray Int Word8) | |
(Parse a, Parse b, Parse c) => Parse (a, b, c) | |
(Parse a, Parse b, Parse c, Parse d) => Parse (a, b, c, d) |
check8 :: Word8 -> PacketParser () Source
check16 :: Word16 -> PacketParser () Source
trunc :: Int -> PacketParser () Source
Unparse Char | |
Unparse Word8 | |
Unparse Word16 | |
Unparse Word32 | |
Unparse () | |
Unparse Chunk | |
Unparse OutPacket | |
Unparse InPacket | |
Unparse Addr | |
Unparse Protocol | |
Unparse Addr | |
Unparse Port | |
Unparse MessageType | |
Unparse Option | |
Unparse Options | |
Unparse Flags | |
Unparse Operation | |
Unparse Packet | |
Unparse Packet | |
Unparse Addr | |
Unparse ErrorCode | |
Unparse Packet | |
Unparse Operation | |
Unparse Packet | |
Unparse a => Unparse [a] | |
Unparse a => Unparse (Packet a) | |
Unparse a => Unparse (Packet a) | |
Unparse content => Unparse (Packet content) | |
Unparse content => Unparse (Packet content) | |
(Unparse a, Unparse b) => Unparse (a, b) | |
(Unparse a, Unparse b, Unparse c) => Unparse (a, b, c) | |
(Unparse a, Unparse b, Unparse c, Unparse d) => Unparse (a, b, c, d) | |
(Unparse a, Unparse b, Unparse c, Unparse d, Unparse e) => Unparse (a, b, c, d, e) |
The buffers for packets, that are to be sent over the network. Each array contains a header of a layer in the network protocol stack.