|
Click
|
Class used to manage a flow. Stores the modifications in the flow (bytes removed or inserted) as well as information such as the MSS, ports, ips, last ack received, last ack sent, ... More...
#include <bytestreammaintainer.hh>
Public Member Functions | |
| ByteStreamMaintainer () | |
| Construct a ByteStreamMaintainer ByteStreamMaintainer must be initialized before being used. | |
| ~ByteStreamMaintainer () | |
| Destruct a ByteStreamMaintainer. | |
| void | reinit () |
| uint32_t | mapAck (uint32_t position) |
| Map an ack number. | |
| uint32_t | mapSeq (uint32_t position) |
| Map a sequence number. | |
| int | lastOffsetInAckTree () |
| Return the offset corresponding to the last modification in the ack tree. | |
| void | printTrees () |
| Print the ACK and SEQ trees in the console. | |
| void | initialize (RBTManager *rbtManager, uint32_t flowStart) |
| Initialize the ByteStreamMaintainer (required before beging use) | |
| void | prune (uint32_t position) |
| Prune the trees. | |
| void | setLastAckSent (uint32_t ackNumber) |
| Sets the value of the last ack sent by this side of the connection. | |
| uint32_t | getLastAckSent () |
| Return the value of the last ack sent by this side of the connection. | |
| bool | isLastAckSentSet () |
| Indicate whether the "last ack sent" value has been set. | |
| void | setLastSeqSent (uint32_t seqNumber) |
| Set the value of the "last seq sent" by this side of the connection. | |
| void | setLastPayloadLength (uint16_t payload) |
| Set the size of the last packet payload, allows to compute next seq. | |
| uint32_t | getLastSeqSent () |
| Return the value of the "last seq sent" by this side of the connection. | |
| uint16_t | getLastPayloadLength () |
| bool | isLastSeqSentSet () |
| Indicate whether the "last seq sent" value has been set. | |
| uint8_t | getDupAcks () |
| Return the number of consecutive duplicate ACKs currently observed. | |
| void | setDupAcks (uint8_t dupAcks) |
| Set the number of consecutive duplicate ACKs currently observed. | |
| void | setWindowSize (uint16_t windowSize) |
| Set the window size of the source (will be used as the receiver's windows size by the other side of the connection when sending packets) | |
| uint16_t | getWindowSize () |
| Return the window size of the source (will be used as the receiver's windows size by the other side of the connection when sending packets) | |
| void | setWindowScale (uint16_t windowScale) |
| Set the window scale factor of the source. | |
| uint16_t | getWindowScale () |
| Return the window scale factor of the source. | |
| void | setUseWindowScale (bool useWindowScale) |
| Indicate whether the connection uses the window scale option. | |
| bool | getUseWindowScale () |
| Return a boolean indicating whether the connection uses the window scale option. | |
| uint16_t | getMSS () |
| Return the MSS of the source. | |
| void | setMSS (uint16_t mss) |
| Set the MSS of the source. | |
| uint64_t | getCongestionWindowSize () |
| Return the size of the congestion window for this side of the connection. | |
| void | setCongestionWindowSize (uint64_t congestionWindow) |
| Set the size of the congestion window for this side of the connection. | |
| void | setSsthresh (uint64_t ssthresh) |
| Set the ssthreshold (slow start threshold) for this side of the connection. | |
| uint64_t | getSsthresh () |
| Return the ssthreshold (slow start threshold) for this side of the connection. | |
| void | setIpSrc (uint32_t ipSrc) |
| Set the IP address of the source. | |
| uint32_t | getIpSrc () |
| Return the IP address of the source. | |
| void | setIpDst (uint32_t ipDst) |
| Set the IP address of the destination. | |
| uint32_t | getIpDst () |
| Return the IP address of the destination. | |
| void | setPortSrc (uint16_t portSrc) |
| Set the port number of the source. | |
| uint16_t | getPortSrc () |
| Return the port number of the source. | |
| void | setPortDst (uint16_t portDst) |
| Set the port number of the destination. | |
| uint16_t | getPortDst () |
| Return the port number of the destination. | |
Class used to manage a flow. Stores the modifications in the flow (bytes removed or inserted) as well as information such as the MSS, ports, ips, last ack received, last ack sent, ...
Each side of a connection must have its own ByteStreamMaintainer.
| ByteStreamMaintainer::ByteStreamMaintainer | ( | ) |
Construct a ByteStreamMaintainer ByteStreamMaintainer must be initialized before being used.
| ByteStreamMaintainer::~ByteStreamMaintainer | ( | ) |
Destruct a ByteStreamMaintainer.
| uint32_t ByteStreamMaintainer::mapAck | ( | uint32_t | position | ) |
Map an ack number.
| position | Initial ack value |
| uint32_t ByteStreamMaintainer::mapSeq | ( | uint32_t | position | ) |
Map a sequence number.
| position | Initial seq value |
| int ByteStreamMaintainer::lastOffsetInAckTree | ( | ) |
Return the offset corresponding to the last modification in the ack tree.
| void ByteStreamMaintainer::printTrees | ( | ) |
Print the ACK and SEQ trees in the console.
| void ByteStreamMaintainer::initialize | ( | RBTManager * | rbtManager, |
| uint32_t | flowStart | ||
| ) |
Initialize the ByteStreamMaintainer (required before beging use)
| rbtManager | The RBTManager used to manage the trees |
| flowStart | The first sequence number in the flow |
| void ByteStreamMaintainer::prune | ( | uint32_t | position | ) |
Prune the trees.
| position | Value of the last ACK sent by the destination |
|
inline |
Sets the value of the last ack sent by this side of the connection.
| ackNumber | Value of the last ack sent by this side of the connection |
|
inline |
Return the value of the last ack sent by this side of the connection.
|
inline |
Indicate whether the "last ack sent" value has been set.
|
inline |
Set the value of the "last seq sent" by this side of the connection.
| seqNumber | Value of the "last seq sent" by this side of the connection |
|
inline |
Set the size of the last packet payload, allows to compute next seq.
|
inline |
Return the value of the "last seq sent" by this side of the connection.
|
inline |
Indicate whether the "last seq sent" value has been set.
|
inline |
Return the number of consecutive duplicate ACKs currently observed.
|
inline |
Set the number of consecutive duplicate ACKs currently observed.
| dupAcks | The number of consecutive duplicate ACKs currently observed |
|
inline |
Set the window size of the source (will be used as the receiver's windows size by the other side of the connection when sending packets)
| windowSize | The window size of the source |
|
inline |
Return the window size of the source (will be used as the receiver's windows size by the other side of the connection when sending packets)
|
inline |
Set the window scale factor of the source.
| windowScale | Window scale factor of the source |
|
inline |
Return the window scale factor of the source.
|
inline |
Indicate whether the connection uses the window scale option.
| useWindowScale | A boolean indicating whether the connection uses the window scale option |
|
inline |
Return a boolean indicating whether the connection uses the window scale option.
|
inline |
Return the MSS of the source.
|
inline |
Set the MSS of the source.
| mss | The mss of the source |
|
inline |
Return the size of the congestion window for this side of the connection.
|
inline |
Set the size of the congestion window for this side of the connection.
| congestionWindow | Size of the congestion window for this side of the connection |
|
inline |
Set the ssthreshold (slow start threshold) for this side of the connection.
| ssthresh | Ssthreshold for this side of the connection |
|
inline |
Return the ssthreshold (slow start threshold) for this side of the connection.
|
inline |
Set the IP address of the source.
| ipSrc | IP address of the source |
|
inline |
Return the IP address of the source.
|
inline |
Set the IP address of the destination.
| ipDst | IP address of the destination |
|
inline |
Return the IP address of the destination.
|
inline |
Set the port number of the source.
| portSrc | port number of the source |
|
inline |
Return the port number of the source.
|
inline |
Set the port number of the destination.
| portDst | port number of the destination |
|
inline |
Return the port number of the destination.