TCPQueueTesterFunctions.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __TEST__TCPQUEUETESTER_FUNCTIONS
  2. #include "inet/transportlayer/tcp/queues/TCPMsgBasedRcvQueue.h"
  3. #include "inet/transportlayer/tcp/queues/TCPMsgBasedSendQueue.h"
  4. #include "inet/transportlayer/tcp/queues/TCPVirtualDataRcvQueue.h"
  5. using namespace inet;
  6. using namespace tcp;
  7. // TCPMsgBasedSendQueue:
  8. void enqueue(TCPMsgBasedSendQueue *sq, const char *msgname, ulong numBytes);
  9. void tryenqueue(TCPMsgBasedSendQueue *sq, const char *msgname, ulong numBytes);
  10. TCPSegment *createSegmentWithBytes(TCPMsgBasedSendQueue *sq, uint32 fromSeq, uint32 toSeq);
  11. void discardUpTo(TCPMsgBasedSendQueue *sq, uint32 seqNum);
  12. //////////////////////////////////////////////////////////////
  13. // TCPMsgBasedRcvQueue:
  14. void insertSegment(TCPMsgBasedRcvQueue *rq, TCPSegment *tcpseg);
  15. void tryinsertSegment(TCPMsgBasedRcvQueue *rq, TCPSegment *tcpseg);
  16. void extractBytesUpTo(TCPMsgBasedRcvQueue *rq, uint32 seq);
  17. /////////////////////////////////////////////////////////////////////////
  18. // TCPVirtualDataRcvQueue:
  19. void insertSegment(TCPVirtualDataRcvQueue *q, uint32 beg, uint32 end);
  20. void tryinsertSegment(TCPVirtualDataRcvQueue *q, uint32 beg, uint32 end);
  21. void extractBytesUpTo(TCPVirtualDataRcvQueue *q, uint32 seq);
  22. /////////////////////////////////////////////////////////////////////////
  23. #endif // __TEST__TCPQUEUETESTER_FUNCTIONS