Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data TcpHeader = TcpHeader {
- tcpSourcePort :: !TcpPort
- tcpDestPort :: !TcpPort
- tcpSeqNum :: !TcpSeqNum
- tcpAckNum :: !TcpAckNum
- tcpFlags_ :: !Word16
- tcpWindow :: !Word16
- tcpChecksum :: !Word16
- tcpUrgentPointer :: !Word16
- tcpOptions_ :: [TcpOption]
- type TcpPort = Word16
- putTcpPort :: Putter TcpPort
- emptyTcpHeader :: TcpHeader
- tcpHeaderSize :: TcpHeader -> Int
- data TcpSeqNum
- type TcpAckNum = TcpSeqNum
- withinWindow :: TcpSeqNum -> TcpSeqNum -> TcpSeqNum -> Bool
- fromTcpSeqNum :: Num a => TcpSeqNum -> a
- tcpNs :: Lens' TcpHeader Bool
- tcpCwr :: Lens' TcpHeader Bool
- tcpEce :: Lens' TcpHeader Bool
- tcpUrg :: Lens' TcpHeader Bool
- tcpAck :: Lens' TcpHeader Bool
- tcpPsh :: Lens' TcpHeader Bool
- tcpRst :: Lens' TcpHeader Bool
- tcpSyn :: Lens' TcpHeader Bool
- tcpFin :: Lens' TcpHeader Bool
- getTcpHeader :: Get TcpHeader
- putTcpHeader :: Putter TcpHeader
- class HasTcpOptions a where
- findTcpOption :: HasTcpOptions opts => TcpOptionTag -> opts -> Maybe TcpOption
- setTcpOption :: HasTcpOptions opts => TcpOption -> opts -> opts
- setTcpOptions :: HasTcpOptions opts => [TcpOption] -> opts -> opts
- data TcpOption
- data TcpOptionTag
- tcpOptionTag :: TcpOption -> TcpOptionTag
- data SackBlock = SackBlock {}
- tcpOptionsSize :: [TcpOption] -> (Int, Int)
- tcpOptionSize :: TcpOption -> Int
- tcpSegLen :: TcpHeader -> Int -> Int
- tcpSegLastSeqNum :: TcpHeader -> Int -> TcpSeqNum
- tcpSegNextAckNum :: TcpHeader -> Int -> TcpAckNum
Header
TcpHeader | |
|
tcpHeaderSize :: TcpHeader -> Int Source #
The encoded size of a header.
Sequence Numbers
fromTcpSeqNum :: Num a => TcpSeqNum -> a Source #
Header Flags
Serialization
getTcpHeader :: Get TcpHeader Source #
Parse a TcpHeader.
putTcpHeader :: Putter TcpHeader Source #
Render a TcpHeader. The checksum value is never rendered, as it is expected to be calculated and poked in afterwords.
Options
class HasTcpOptions a where Source #
tcpOptions :: Lens' a [TcpOption] Source #
findTcpOption :: HasTcpOptions opts => TcpOptionTag -> opts -> Maybe TcpOption Source #
setTcpOption :: HasTcpOptions opts => TcpOption -> opts -> opts Source #
setTcpOptions :: HasTcpOptions opts => [TcpOption] -> opts -> opts Source #
data TcpOptionTag Source #
tcpOptionTag :: TcpOption -> TcpOptionTag Source #
tcpOptionsSize :: [TcpOption] -> (Int, Int) Source #
Get the rendered length of a list of TcpOptions, in 4-byte words, and the number of padding bytes required. This rounds up to the nearest 4-byte word.
tcpOptionSize :: TcpOption -> Int Source #