NS2 Notebook: Multi-channel Multi-interface Simulation in NS2 (2.29)

Back to Index


13. Modifications in tcp/tcp.cc

// Manual Routing
// raniwala : messy global declarations

extern int global_flowid;
extern int flow_to_tag[];

......

TcpAgent::TcpAgent() ......
{

  //Manual Routing
  // raniwala: adding flow-id

  global_flowid++;
  flow_id = global_flowid;
  flow_to_tag[flow_id] = -1;

}

 

void TcpAgent::output(int seqno, int reason)
{

  ......

  /* call helper function to fill in additional fields */
  output_helper(p);

   ++ndatapack_;
  ndatabytes_ += databytes;

  // added by geajy
  // raniwala -put flow-id ,put invalid tag

  hdr_cmn::access(p)->_flowid_ = flow_id;
  hdr_cmn::access(p)->_tag_ = -1;

  send(p, 0);

  ......

}

 

 

 
© Copyright 2008. All rights reserved. Powered by Free Site Templates