Safe Haskell | None |
---|---|
Language | Haskell98 |
- mkSegment :: TcpSocket -> TcpHeader
- mkAck :: TcpSocket -> TcpHeader
- addSackOption :: TcpSocket -> TcpHeader -> TcpHeader
- addSackPermitted :: TcpSocket -> TcpHeader -> TcpHeader
- addWindowScale :: TcpSocket -> TcpHeader -> TcpHeader
- mkRstAck :: TcpHeader -> Int -> TcpHeader
- mkRst :: TcpHeader -> TcpHeader
- mkSyn :: TcpSocket -> TcpHeader
- mkSynAck :: TcpSocket -> TcpHeader
- mkFinAck :: TcpSocket -> TcpHeader
- mkData :: TcpSocket -> TcpHeader
- syn :: Sock ()
- synAck :: Sock ()
- ack :: Sock ()
- delayedAck :: Sock ()
- clearDelayedAck :: Sock ()
- finAck :: Sock ()
- rstAck :: TcpHeader -> Int -> Sock ()
- rst :: TcpHeader -> Sock ()
- outputSegment :: OutSegment -> Sock ()
- type SetFlag = TcpHeader -> Bool
- type UnsetFlag = TcpHeader -> Bool
- testFlags :: [SetFlag] -> [UnsetFlag] -> TcpHeader -> Bool
- isSyn :: TcpHeader -> Bool
- isSynAck :: TcpHeader -> Bool
- isRstAck :: TcpHeader -> Bool
- isAck :: TcpHeader -> Bool
- isFin :: TcpHeader -> Bool
- isFinAck :: TcpHeader -> Bool
- genSegments :: POSIXTime -> TcpSocket -> (([Wakeup], OutSegments), TcpSocket)
Documentation
addSackOption :: TcpSocket -> TcpHeader -> TcpHeader Source
Add the Sack option to a tcp packet.
addSackPermitted :: TcpSocket -> TcpHeader -> TcpHeader Source
Add the sack permitted tcp option.
addWindowScale :: TcpSocket -> TcpHeader -> TcpHeader Source
Add the window scale option on the outgoing header.
mkRstAck :: TcpHeader -> Int -> TcpHeader Source
Given a tcp header, generate the next header in the sequence that corresponds to the RST ACK response. As this should only be used in situations in which an ACK was not received, this adds one plus the body length to the ack number.
mkFinAck :: TcpSocket -> TcpHeader Source
Construct a FIN packet.
XXX should this include a sack option?
delayedAck :: Sock () Source
Schedule a delayed ACK packet.
clearDelayedAck :: Sock () Source
Unschedule a delayed ACK packet.
Queue an outgoing fin packet in the outgoing window, and send it.
NOTE: This uses genSegments, which will pull data out of the waiti
outputSegment :: OutSegment -> Sock () Source
Send a segment.
genSegments :: POSIXTime -> TcpSocket -> (([Wakeup], OutSegments), TcpSocket) Source
Take data from the output buffer, and turn it into segments. When data was freed from the output buffer, the wakeup actions for any threads currently blocked on writing to the output buffer will be returned.