ns-allinone-2.35/ns-2.35/diffserv/ew.cc
int EWdetectorB::getRateAList(int index) {
  struct AListEntry *p;

  //printf("%d\n", index);
  p = alist.head;
  for (int i = 0; i < index; i++) {
    if (p)
      p = p->next;
  }
  
  if (p)
    return ((int)p->avg_rate);

  printf("Error in AList!\n");
  return(0);
}
// Get the rate given the index in the list
Get the rate given the index in the list
Get the rate given the index in the list
int EWdetectorB::getRateAList(int index) {
  struct AListEntry *p;
  p = alist.head;
  for (int i = 0; i < index; i++) {
    if (p)
      p = p->next;
  }
  if (p)
    return ((int)p->avg_rate);
  printf("Error in AList!\n");
  return(0);
}
int EWdetectorB :: getRateAList ( int index ) { struct AListEntry * p ; p = alist . head ; for ( int i = 0 ; i < index ; i ++ ) { if ( p ) p = p -> next ; } if ( p ) return ( ( int ) p -> avg_rate ) ; printf ( " \n " ) ; return ( 0 ) ; }
Get the rate given the index in the list
Get the rate given the index in the list
//printf("%d\n", index);