12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>The</strong> following member functio<strong>ns</strong> are also defined by the class Agent, but are intended to be over-ridden by classes derivingfrom Agent:void timeout(timeout number)void recv(Packet*, H<strong>and</strong>ler*)subclass-specific time out methodreceiving agent main receive p<strong>at</strong>h<strong>The</strong> allocpkt() method is used by derived classes to cre<strong>at</strong>e packets to send. <strong>The</strong> function fills in the following fields inthe common packet header (Section 12): uid, ptype, size, <strong>and</strong> the following fields in the IP header: src, dst,flowid, prio, ttl. It also zero-fills in the following fields of the Flags header: ecn, pri, usr1, usr2. Anypacket header inform<strong>at</strong>ion not included in these lists must be must be h<strong>and</strong>led in the classes derived from Agent.<strong>The</strong> recv() method is the main entry point for an Agent which receives packets, <strong>and</strong> is invoked by upstream nodes whe<strong>ns</strong>ending a packet. In most cases, Agents make no use of the second argument (the h<strong>and</strong>ler defined by upstream nodes).10.3 Protocol Agents<strong>The</strong>re are several agents supported in the simul<strong>at</strong>or. <strong>The</strong>se are their names in OTcl:TCPTCP/RenoTCP/NewrenoTCP/Sack1TCP/FackTCP/FullTcpTCP/VegasTCP/Vegas/RBPTCP/Vegas/RBPTCP/AsymTCP/Reno/AsymTCP/Newreno/AsymTCPSinkTCPSink/DelAckTCPSink/AsymTCPSink/Sack1TCPSink/Sack1/DelAcka “Tahoe” TCP sender (cwnd = 1 on any loss)a “Reno” TCP sender (with fast recovery)a modified Reno TCP sender (changes fast recovery)a SACK TCP sendera “forward” SACK sender TCPa more full-functioned TCP with 2-way traffica “Vegas” TCP sendera Vegas TCP with “r<strong>at</strong>e based pacing”a Reno TCP with “r<strong>at</strong>e based pacing”an experimental Tahoe TCP for asymmetric linksan experimental Reno TCP for asymmetric linksan experimental Newreno TCP for asymmetric linksa Reno or Tahoe TCP receiver (not used for FullTcp)a TCP delayed-ACK receiveran experimental TCP sink for asymmetric linksa SACK TCP receivera delayed-ACK SACK TCP receiverUDPa basic UDP agentRTPRTCPan RTP sender <strong>and</strong> receiveran RTCP sender <strong>and</strong> receiverLossMonitora packet sink which checks for lossesIVS/SourceIVS/Receiveran IVS sourcean IVS receiver97

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!