ns-allinone-2.35/ns-2.35/diffserv/dsPolicy.cc
policerTableEntry* PolicyClassifier::getPolicerTableEntry(int policy_index, int oldCodePt) {
  for (int i = 0; i < policerTableSize; i++)
    if ((policerTable[i].policy_index == policy_index) &&
	(policerTable[i].initialCodePt == oldCodePt))
      return(&policerTable[i]);

  printf("ERROR: No Policer Table entry found for initial code point %d.\n", oldCodePt);
  //printPolicerTable();
  return(NULL);
}
// Return the entry of Policer table with policerType and initCodePoint matched
Return the entry of Policer table with policerType and initCodePoint matched
Return the entry of Policer table with policerType and initCodePoint matched
policerTableEntry* PolicyClassifier::getPolicerTableEntry(int policy_index, int oldCodePt) {
  for (int i = 0; i < policerTableSize; i++)
    if ((policerTable[i].policy_index == policy_index) &&
	(policerTable[i].initialCodePt == oldCodePt))
      return(&policerTable[i]);
  printf("ERROR: No Policer Table entry found for initial code point %d.\n", oldCodePt);
  return(NULL);
}
policerTableEntry * PolicyClassifier :: getPolicerTableEntry ( int policy_index , int oldCodePt ) { for ( int i = 0 ; i < policerTableSize ; i ++ ) if ( ( policerTable [ i ] . policy_index == policy_index ) && ( policerTable [ i ] . initialCodePt == oldCodePt ) ) return ( & policerTable [ i ] ) ; printf ( " \n " , oldCodePt ) ; return ( NULL ) ; }
Return the entry of Policer table with policerType and initCodePoint matched
Return the entry of Policer table with policerType and initCodePoint matched
//printPolicerTable();