ns-allinone-2.35/ns-2.35/dccp/dccp.cc
void DCCPAgent::confirmFeature(u_int8_t num, dccp_feature_location location){
	int walker = 0;
	while (walker < feat_conf_used_){ //walk through the list
		if (feat_conf_num_[walker] == num && feat_conf_loc_[walker] == location){
			//we have found the feature
			break;
		}
		walker++;
	}

	if (walker == feat_conf_used_ && feat_conf_used_ < feat_size_){
		//add to the end of list
		feat_conf_num_[walker] = num;
		feat_conf_loc_[walker] = location;
		feat_conf_used_++;
	}
}
/* Add a feature to the list of features to confirm
 * Will only add one entry for each (feat,loc) pair
 * arg: num      - feature number
 *      location - feature location
 */
Add a feature to the list of features to confirm
Will only add one entry for each (feat,loc) pair
arg: num      - feature number
location - feature location
Add a feature to the list of features to confirm Will only add one entry for each ( feat loc ) pair arg : num - feature number location - feature location
void DCCPAgent::confirmFeature(u_int8_t num, dccp_feature_location location){
	int walker = 0;
	while (walker < feat_conf_used_){ 
		if (feat_conf_num_[walker] == num && feat_conf_loc_[walker] == location){
			break;
		}
		walker++;
	}
	if (walker == feat_conf_used_ && feat_conf_used_ < feat_size_){
		feat_conf_num_[walker] = num;
		feat_conf_loc_[walker] = location;
		feat_conf_used_++;
	}
}
void DCCPAgent :: confirmFeature ( u_int8_t num , dccp_feature_location location ) { int walker = 0 ; while ( walker < feat_conf_used_ ) { if ( feat_conf_num_ [ walker ] == num && feat_conf_loc_ [ walker ] == location ) { break ; } walker ++ ; } if ( walker == feat_conf_used_ && feat_conf_used_ < feat_size_ ) { feat_conf_num_ [ walker ] = num ; feat_conf_loc_ [ walker ] = location ; feat_conf_used_ ++ ; } }
Add a feature to the list of features to confirm
 Will only add one entry for each (feat,loc) pair
 arg: num      - feature number
      location - feature location
Add a feature to the list of features to confirm Will only add one entry for each ( feat loc ) pair arg : num - feature number location - feature location
//walk through the list //we have found the feature //add to the end of list