[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a couple of questions regarding tcp-sink.cc
Hi,
I have a couple of questions regarding tcp-sink.cc.
1.
class Acker::inline int Seqno() const { return (next_ - 1); }
(defined in tcp-sink.h)
TcpSink::ack() uses Acker::Seqno() to put seq no (ack no. in this case) in
ack as "ntcp->seqno() = acker_->Seqno();"
My question is why (next_ - 1) is put as ack no. and not next_ as in
normal TCP.
2.
in Acker::update(int seq) (defi9ned in tcp-sink.cc), we have following:
if (seq > maxseen_) {
int i;
for (i = maxseen_ + 1; i < seq; ++i)
seen_[i & MWM] = 0;
maxseen_ = seq;
seen_[maxseen_ & MWM] = 1;
seen_[(maxseen_ + 1) & MWM] = 0;
}
Does seen[] talk in terms of packet no.? or bytes? If later then why
"seen_[maxseen_ & MWM] = 1;" and "seen_[(maxseen_ + 1) & MWM] = 0;" and
not "seen_[(maxseen_ + no_of_bytes_in_pkt) & MWM] = 0;" ??
even seqno_ seems to behave like packet no. and not as the first byteno.
of the packet. Am I right?
Any pointers or suggestions? Documentation talks about only sending
agents, it does not have much detail of sink agents.
Thanking you in advance.
Miten.
----------------------------------------------------------------------
Miten N. Mehta Graduate Research Assistant
3902, Collegemain, #908 Computer Science
Bryan, Texas A & M University
Texas-77801. College Station, TX-77843
Tel.#(409) 846 1451 (409) 845 5007
E-mail# [email protected]
Home Page : http://www.cs.tamu.edu/people/mmehta
----------------------------------------------------------------------
"UNTIL YOUR DREAMS COME TRUE, KEEP ON WORKING FOR THAT"
----------------------------------------------------------------------