Safe Haskell | None |
---|---|
Language | Haskell98 |
- data RemoteWindow = RemoteWindow {
- rwSegments :: OutSegments
- rwAvailable :: !Word32
- rwSize :: !Word32
- rwSndWind :: !Word16
- rwSndWindScale :: !Int
- emptyRemoteWindow :: Word16 -> Int -> RemoteWindow
- refreshRemoteWindow :: RemoteWindow -> RemoteWindow
- setSndWindScale :: Int -> RemoteWindow -> RemoteWindow
- setSndWind :: Word16 -> RemoteWindow -> RemoteWindow
- releaseSpace :: Word32 -> RemoteWindow -> RemoteWindow
- addSegment :: OutSegment -> RemoteWindow -> RemoteWindow
- receiveAck :: TcpHeader -> RemoteWindow -> Maybe (OutSegment, RemoteWindow)
- genRetransmitSegments :: RemoteWindow -> (OutSegments, RemoteWindow)
- clearRetransmit :: RemoteWindow -> RemoteWindow
- retransmitEmpty :: RemoteWindow -> Bool
- type OutSegments = Seq OutSegment
- data OutSegment = OutSegment {}
- mkOutSegment :: POSIXTime -> Int -> TcpHeader -> ByteString -> OutSegment
- ctlLength :: Num len => Bool -> len
- outSize :: Num a => OutSegment -> a
- outSize' :: Num a => TcpHeader -> ByteString -> a
- decrementRTO :: OutSegment -> OutSegment
- data LocalWindow = LocalWindow {}
- emptyLocalWindow :: TcpSeqNum -> Word16 -> Int -> LocalWindow
- localWindowSackBlocks :: LocalWindow -> Seq SackBlock
- refreshLocalWindow :: LocalWindow -> LocalWindow
- setRcvNxt :: TcpSeqNum -> LocalWindow -> LocalWindow
- addRcvNxt :: TcpSeqNum -> LocalWindow -> LocalWindow
- setRcvWind :: Word16 -> LocalWindow -> LocalWindow
- setRcvWindScale :: Int -> LocalWindow -> LocalWindow
- incomingPacket :: TcpHeader -> ByteString -> LocalWindow -> (Seq InSegment, LocalWindow)
- addInSegment :: TcpHeader -> ByteString -> LocalWindow -> LocalWindow
- stepWindow :: LocalWindow -> (Seq InSegment, LocalWindow)
- data InSegment = InSegment {
- inRelSeqNum :: !TcpSeqNum
- inHeader :: !TcpHeader
- inBody :: !ByteString
- inSeqNum :: InSegment -> TcpSeqNum
- inLength :: Num a => InSegment -> a
- mkInSegment :: TcpSeqNum -> TcpHeader -> ByteString -> InSegment
- mkSackBlock :: InSegment -> SackBlock
- module Hans.Layer.Tcp.WaitBuffer
Documentation
data RemoteWindow Source
Remote window management.
RemoteWindow | |
|
emptyRemoteWindow :: Word16 -> Int -> RemoteWindow Source
The empty window, seeded with an initial size.
refreshRemoteWindow :: RemoteWindow -> RemoteWindow Source
Recalculate internal constants of the remote window.
setSndWindScale :: Int -> RemoteWindow -> RemoteWindow Source
Set the Snd.Wind.Scale variable for the remote window.
setSndWind :: Word16 -> RemoteWindow -> RemoteWindow Source
Set the Snd.Wind variable for the remote window.
releaseSpace :: Word32 -> RemoteWindow -> RemoteWindow Source
Adjust the internal available counter.
addSegment :: OutSegment -> RemoteWindow -> RemoteWindow Source
Add a segment to the window.
receiveAck :: TcpHeader -> RemoteWindow -> Maybe (OutSegment, RemoteWindow) Source
Process an incoming ack, returning a finalizer, and a new window if there was a matching set of packets waiting for an ack.
genRetransmitSegments :: RemoteWindow -> (OutSegments, RemoteWindow) Source
Update the RTO timer on all segments waiting for an ack. When the timer runs out, output the segment for retransmission.
type OutSegments = Seq OutSegment Source
mkOutSegment :: POSIXTime -> Int -> TcpHeader -> ByteString -> OutSegment Source
outSize :: Num a => OutSegment -> a Source
outSize' :: Num a => TcpHeader -> ByteString -> a Source
The size of a segment body.
decrementRTO :: OutSegment -> OutSegment Source
Decrement the RTO value on a segment by the timer granularity (500ms). Once the RTO value dips below 1, mark the segment as no longer fresh.
data LocalWindow Source
Local window, containing a buffer of incoming packets, indexed by their sequence number, relative to RCV.NXT.
XXX make this respect the values of size and available
emptyLocalWindow :: TcpSeqNum -> Word16 -> Int -> LocalWindow Source
Empty local buffer, with an initial sequence number as the next expected sequence number.
localWindowSackBlocks :: LocalWindow -> Seq SackBlock Source
Produce a sequence of blocks for the sack option.
refreshLocalWindow :: LocalWindow -> LocalWindow Source
Recalculate internal constants.
setRcvNxt :: TcpSeqNum -> LocalWindow -> LocalWindow Source
Update the size of the remote window.
addRcvNxt :: TcpSeqNum -> LocalWindow -> LocalWindow Source
Add a sequence number to the value of Rcv.Nxt.
setRcvWind :: Word16 -> LocalWindow -> LocalWindow Source
Set the Rcv.Wind variable for the local window.
setRcvWindScale :: Int -> LocalWindow -> LocalWindow Source
Set the Rcv.Wind.Scale variable in the local window.
incomingPacket :: TcpHeader -> ByteString -> LocalWindow -> (Seq InSegment, LocalWindow) Source
Process an incoming packet that needs to pass through the incoming queue.
addInSegment :: TcpHeader -> ByteString -> LocalWindow -> LocalWindow Source
Queue an incoming packet in the incoming window.
stepWindow :: LocalWindow -> (Seq InSegment, LocalWindow) Source
Advance the window, if there are packets available to be returned.
InSegment | |
|
mkInSegment :: TcpSeqNum -> TcpHeader -> ByteString -> InSegment Source
Generate an incoming segment, relative to the value of RCV.NXT
mkSackBlock :: InSegment -> SackBlock Source
module Hans.Layer.Tcp.WaitBuffer