ns-allinone-2.35/src_rtg/classifier-sr.cc
NsObject *SRClassifier::find(Packet *const p) {
   hdr_cmn *cmh =  hdr_cmn::access(p);
   
  if (cmh->src_rt_valid)
    // source routing packet forwarded to the agent
    {
      //cout << "forwarded to my agent" << endl;
      return slot_[0];
    }
  else
    {
      //cout << "forwarded to normal place : " << endl;
      return slot_[1];
    }
}
/* The new classifier has just two slots and handles appropriate forwarding of source routed packets and the normal ones */
The new classifier has just two slots and handles appropriate forwarding of source routed packets and the normal ones
The new classifier has just two slots and handles appropriate forwarding of source routed packets and the normal ones
NsObject *SRClassifier::find(Packet *const p) {
   hdr_cmn *cmh =  hdr_cmn::access(p);
  if (cmh->src_rt_valid)
    {
      return slot_[0];
    }
  else
    {
      return slot_[1];
    }
}
NsObject * SRClassifier :: find ( Packet * const p ) { hdr_cmn * cmh = hdr_cmn :: access ( p ) ; if ( cmh -> src_rt_valid ) { return slot_ [ 0 ] ; } else { return slot_ [ 1 ] ; } }
The new classifier has just two slots and handles appropriate forwarding of source routed packets and the normal ones
The new classifier has just two slots and handles appropriate forwarding of source routed packets and the normal ones
// source routing packet forwarded to the agent //cout << "forwarded to my agent" << endl; //cout << "forwarded to normal place : " << endl;