123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- %description:
- Test TCPMsgBasedSendQueue, TCPMsgBasedRcvQueue classes
- Similar to TCPMsgBasedRcvQueue_1.test, but sequence number is turn out zero.
- %includes:
- #include "TCPQueueTesterFunctions.h"
- %global:
- using namespace ::inet::tcp;
- %activity:
- TCPMsgBasedSendQueue sendQueue;
- TCPMsgBasedSendQueue *sq = &sendQueue;
- sq->init(4294967000);
- EV << sq->info() <<"\n";
- TCPMsgBasedRcvQueue rcvQueue;
- TCPMsgBasedRcvQueue *rq = &rcvQueue;
- rq->init(4294967000);
- EV << rq->info() <<"\n";
- enqueue(sq, "msg1", 100); // 4294967000..4294967100
- enqueue(sq, "msg2", 100); // 4294967100..4294967200
- enqueue(sq, "msg3", 296); // 4294967200..200
- enqueue(sq, "msg4", 600); // 200..800
- enqueue(sq, "msg5", 200); // 800..1000
- insertSegment(rq, createSegmentWithBytes(sq, 4294967000, 4294967099));
- insertSegment(rq, createSegmentWithBytes(sq, 4294967090, 4294967100));
- insertSegment(rq, createSegmentWithBytes(sq, 4294967090, 799));
- insertSegment(rq, createSegmentWithBytes(sq, 4294967090, 800));
- insertSegment(rq, createSegmentWithBytes(sq, 700, 799));
- insertSegment(rq, createSegmentWithBytes(sq, 700, 800));
- extractBytesUpTo(rq, 4294967099);
- discardUpTo(sq, 4294967099);
- extractBytesUpTo(rq, 799);
- extractBytesUpTo(rq, 799);
- discardUpTo(sq, 799);
- extractBytesUpTo(rq, 800);
- extractBytesUpTo(rq, 800);
- discardUpTo(sq, 800);
- insertSegment(rq, createSegmentWithBytes(sq, 800, 900));
- extractBytesUpTo(rq, 900);
- insertSegment(rq, createSegmentWithBytes(sq, 900, 1000));
- extractBytesUpTo(rq, 1000);
- discardUpTo(sq, 1000);
- EV << ".\n";
- %subst: /[\{\}]/ /
- %contains: stdout
- [4294967000..4294967000), 0 packets
- rcv_nxt=4294967000 0 msgs
- SQ:enqueue("msg1", 100): --> [4294967000..4294967100), 1 packets
- SQ:enqueue("msg2", 100): --> [4294967000..4294967200), 2 packets
- SQ:enqueue("msg3", 296): --> [4294967000..200), 3 packets
- SQ:enqueue("msg4", 600): --> [4294967000..800), 4 packets
- SQ:enqueue("msg5", 200): --> [4294967000..1000), 5 packets
- SQ:createSegmentWithBytes(4294967000, 4294967099):
- RQ:insertSeg [4294967000..4294967099) --> rcv_nxt=4294967099 [4294967000..4294967099) 0 msgs
- SQ:createSegmentWithBytes(4294967090, 4294967100): msg1[4294967000..4294967100)
- RQ:insertSeg [4294967090..4294967100) --> rcv_nxt=4294967100 [4294967000..4294967100) 1 msgs
- SQ:createSegmentWithBytes(4294967090, 799): msg1[4294967000..4294967100), msg2[4294967100..4294967200), msg3[4294967200..200)
- RQ:insertSeg [4294967090..799) --> rcv_nxt=799 [4294967000..799) 3 msgs
- SQ:createSegmentWithBytes(4294967090, 800): msg1[4294967000..4294967100), msg2[4294967100..4294967200), msg3[4294967200..200), msg4[200..800)
- RQ:insertSeg [4294967090..800) --> rcv_nxt=800 [4294967000..800) 4 msgs
- SQ:createSegmentWithBytes(700, 799):
- RQ:insertSeg [700..799) --> rcv_nxt=800 [4294967000..800) 4 msgs
- SQ:createSegmentWithBytes(700, 800): msg4[200..800)
- RQ:insertSeg [700..800) --> rcv_nxt=800 [4294967000..800) 4 msgs
- RQ:extractUpTo(4294967099): < > --> rcv_nxt=800 [4294967099..800) 4 msgs
- SQ:discardUpTo(4294967099): [4294967099..1000), 5 packets
- RQ:extractUpTo(799): < < msg1: 100 bytes > < msg2: 100 bytes > < msg3: 296 bytes > > --> rcv_nxt=800 [799..800) 1 msgs
- RQ:extractUpTo(799): < > --> rcv_nxt=800 [799..800) 1 msgs
- SQ:discardUpTo(799): [799..1000), 2 packets
- RQ:extractUpTo(800): < < msg4: 600 bytes > > --> rcv_nxt=800 0 msgs
- RQ:extractUpTo(800): < > --> rcv_nxt=800 0 msgs
- SQ:discardUpTo(800): [800..1000), 1 packets
- SQ:createSegmentWithBytes(800, 900):
- RQ:insertSeg [800..900) --> rcv_nxt=900 [800..900) 0 msgs
- RQ:extractUpTo(900): < > --> rcv_nxt=900 0 msgs
- SQ:createSegmentWithBytes(900, 1000): msg5[800..1000)
- RQ:insertSeg [900..1000) --> rcv_nxt=1000 [900..1000) 1 msgs
- RQ:extractUpTo(1000): < < msg5: 200 bytes > > --> rcv_nxt=1000 0 msgs
- SQ:discardUpTo(1000): [1000..1000), 0 packets
- .
|