LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   error in use a trust table that i added in aodv in ns2 (https://www.linuxquestions.org/questions/linux-software-2/error-in-use-a-trust-table-that-i-added-in-aodv-in-ns2-4175531224/)

mary1001 01-16-2015 11:24 AM

error in use a trust table that i added in aodv in ns2
 
hi
i have added a trust table like the routeing table in aodv routing protocol. by running this code i get a "segmentation error"
the code is :
Code:

trust_entry* trust_store::trust_lookup(nsaddr_t node_id)
{
  trust_entry *rp=trusthead.lh_first;
  for(;rp;rp=rp->trust_link.le_next){
    if(rp->node_id==node_id)
      break;
  }
  return rp;
}

this code is the same code in route table that lookup an entry in trust table. i have checked every thing and i am sure that in this case trust table is not empty , it show the 4 first entry but after that it get "segmentation error", (in this running ,before this error ,it show 4 or 5 times all entry in the table but in this time no...!!!!)

can any one help me?!!


All times are GMT -5. The time now is 12:12 PM.