#include <scoreboard-rq.h>
Inheritance diagram for ScoreBoardRQ:


Public Member Functions | |
| ScoreBoardRQ () | |
| virtual | ~ScoreBoardRQ () |
| virtual int | IsEmpty () |
| virtual void | ClearScoreBoard () |
| virtual int | GetNextRetran () |
| virtual void | MarkRetran (int retran_seqno) |
| virtual void | MarkRetran (int retran_seqno, int snd_nxt) |
| virtual int | UpdateScoreBoard (int last_ack_, hdr_tcp *) |
| virtual int | CheckUpdate () |
| virtual int | CheckSndNxt (hdr_tcp *) |
| virtual int | GetNextUnacked (int seqno) |
Protected Member Functions | |
| void | resizeSB (int sz) |
Protected Attributes | |
| int | h_seqno_ |
| int | sack_min |
| ReassemblyQueue | rq_ |
| int | first_ |
| int | length_ |
| int | sbsize_ |
| int | changed_ |
| ScoreBoardNode * | SBN |
|
|
Definition at line 46 of file scoreboard-rq.h. References h_seqno_, rq_, and sack_min.
00046 : ScoreBoard(NULL, 0), h_seqno_(-1),sack_min(-1), rq_(sack_min){}; |
|
|
Definition at line 47 of file scoreboard-rq.h. References ScoreBoard::SBN.
00047 {delete[] SBN;}
|
|
|
Reimplemented from ScoreBoard. Definition at line 110 of file scoreboard-rq.cc.
00110 {
00111 printf("ScoreBoardRQ::CheckSndNxt not implemented\n");
00112 exit(1);
00113 }
|
|
|
Reimplemented from ScoreBoard. Definition at line 60 of file scoreboard-rq.h. References ScoreBoard::changed_.
00060 {return (changed_);}
|
|
|
Reimplemented from ScoreBoard. Definition at line 49 of file scoreboard-rq.h. References ReassemblyQueue::clear(), h_seqno_, and rq_.
|
Here is the call graph for this function:

|
|
Reimplemented from ScoreBoard. Definition at line 46 of file scoreboard-rq.cc. References h_seqno_, ReassemblyQueue::nexthole(), rq_, and sack_min.
00046 {
00047 int seq;
00048 int fcnt;
00049 int fbytes;
00050
00051 if(h_seqno_ < sack_min) h_seqno_ = sack_min;
00052 seq = h_seqno_;
00053
00054 if((seq = rq_.nexthole(seq, fcnt, fbytes)) > 0) {
00055 // adjust h_seqno, as we may have
00056 // been "jumped ahead" by learning
00057 // about a filled hole
00058
00059 if(fcnt <= 0) return (-1); // no holes above
00060
00061 //printf("%.4f ", Scheduler::instance().clock());
00062 //printf("GetNextRetran sack_min: %i h_seqno: %i seq: %i\n", sack_min, h_seqno_, seq);
00063 if(seq > h_seqno_)
00064 h_seqno_ = seq;
00065
00066 return (seq);
00067 }
00068 return (-1);
00069 }
|
Here is the call graph for this function:

|
|
Reimplemented from ScoreBoard. Definition at line 102 of file scoreboard-rq.cc. References ReassemblyQueue::nexthole(), and rq_.
|
Here is the call graph for this function:

|
|
Reimplemented from ScoreBoard. Definition at line 41 of file scoreboard-rq.cc.
00041 {
00042 printf("ScoreBoardRQ::IsEmpty not implemented\n");
00043 exit(1);
00044 }
|
|
||||||||||||
|
Reimplemented from ScoreBoard. Definition at line 55 of file scoreboard-rq.h. References h_seqno_.
|
|
|
Reimplemented from ScoreBoard. Definition at line 51 of file scoreboard-rq.h. References h_seqno_.
|
|
|
Definition at line 228 of file scoreboard.cc. References ScoreBoard::first_, ScoreBoard::length_, ScoreBoard::SBN, and ScoreBoard::sbsize_. Referenced by ScoreBoard::UpdateScoreBoard().
00229 {
00230 ScoreBoardNode *newSBN = new ScoreBoardNode[sz+1];
00231
00232 if(!newSBN){
00233 fprintf(stderr, "Unable to allocate new ScoreBoardNode[%i]\n", sz);
00234 exit(1);
00235 }
00236
00237 for(int i = SBN[first_%sbsize_].seq_no_;
00238 i<=SBN[(first_)%sbsize_].seq_no_+length_; i++) {
00239 newSBN[i%sz] = SBN[i%sbsize_];
00240 }
00241
00242 delete[] SBN;
00243 SBN = newSBN;
00244 sbsize_ = sz;
00245 }
|
|
||||||||||||
|
Reimplemented from ScoreBoard. Definition at line 71 of file scoreboard-rq.cc. References ReassemblyQueue::add(), ScoreBoard::changed_, ReassemblyQueue::cleartonxt(), ReassemblyQueue::empty(), rq_, hdr_tcp::sa_left(), hdr_tcp::sa_length(), hdr_tcp::sa_right(), sack_min, and ReassemblyQueue::total().
00071 {
00072 int old_total = rq_.total();
00073 changed_ = 0;
00074
00075 if(sack_min <= last_ack_){
00076 // beginning of retransmission queue is one beyond last_ack
00077 sack_min = last_ack_+1;
00078 if(!rq_.empty()){
00079 rq_.cleartonxt();
00080 changed_ = 1;
00081 }
00082 }
00083
00084 for(int i = 0 ; i < tcph->sa_length() ; i++){
00085 //printf("l: %i r: %i\n", tcph->sa_left(i), tcph->sa_right(i));
00086 rq_.add(tcph->sa_left(i), tcph->sa_right(i), 0);
00087 }
00088 changed_ = changed_ || (old_total != rq_.total());
00089
00090 //printf("UpdateScoreBoard dump changed_: %i\n", changed_);
00091 //printf("%.4f ", Scheduler::instance().clock());
00092 //rq_.dumplist();
00093
00094 }
|
Here is the call graph for this function:

|
|
Definition at line 73 of file scoreboard.h. Referenced by ScoreBoard::CheckUpdate(), CheckUpdate(), ScoreBoard::ScoreBoard(), ScoreBoard::UpdateScoreBoard(), and UpdateScoreBoard(). |
|
|
Definition at line 73 of file scoreboard.h. Referenced by ScoreBoard::CheckSndNxt(), ScoreBoard::GetNextRetran(), ScoreBoard::GetNextUnacked(), ScoreBoard::resizeSB(), ScoreBoard::ScoreBoard(), and ScoreBoard::UpdateScoreBoard(). |
|
|
Definition at line 64 of file scoreboard-rq.h. Referenced by ClearScoreBoard(), GetNextRetran(), MarkRetran(), and ScoreBoardRQ(). |
|
|
Definition at line 73 of file scoreboard.h. Referenced by ScoreBoard::ClearScoreBoard(), ScoreBoard::GetNextRetran(), ScoreBoard::GetNextUnacked(), ScoreBoard::IsEmpty(), ScoreBoard::resizeSB(), ScoreBoard::ScoreBoard(), and ScoreBoard::UpdateScoreBoard(). |
|
|
Definition at line 67 of file scoreboard-rq.h. Referenced by ClearScoreBoard(), GetNextRetran(), GetNextUnacked(), ScoreBoardRQ(), and UpdateScoreBoard(). |
|
|
Definition at line 65 of file scoreboard-rq.h. Referenced by GetNextRetran(), ScoreBoardRQ(), and UpdateScoreBoard(). |
|
|
Definition at line 75 of file scoreboard.h. Referenced by ScoreBoard::CheckSndNxt(), ScoreBoard::GetNextRetran(), ScoreBoard::GetNextUnacked(), ScoreBoard::MarkRetran(), ScoreBoard::resizeSB(), ScoreBoard::ScoreBoard(), ScoreBoard::UpdateScoreBoard(), ScoreBoard::~ScoreBoard(), and ~ScoreBoardRQ(). |
|
|
Definition at line 73 of file scoreboard.h. Referenced by ScoreBoard::CheckSndNxt(), ScoreBoard::GetNextRetran(), ScoreBoard::GetNextUnacked(), ScoreBoard::MarkRetran(), ScoreBoard::resizeSB(), ScoreBoard::ScoreBoard(), and ScoreBoard::UpdateScoreBoard(). |
1.3.3