Important: Use custom search function to get better results from our thousands of pages

Use " " for compulsory search eg:"electronics seminar" , use -" " for filter something eg: "electronics seminar" -"/tag/" (used for exclude results from tag pages)

Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ns2 code trust value calculation
Post: #1

Hi am mohini i would like to get details on ns2 code trust value calculation ..My friend mohana said ns2 code trust value calculation will be available here
Post: #2
//Finding common neighbor for current path

int common_count=0;

int common_neighbor[100];

for (int p=0;p<neighbor_count[index];p++) {

for (int q=0;q<neighbor_count[path->nexthop];q++) {

//printf("n1=%d n2=%d\n",neighbor_id[index][p],neighbor_id[rt->rt_nexthop][q]);

if(neighbor_id[index][p]==neighbor_id[path->nexthop][q]) {



if(malicious_status[neighbor_id[index][p]]==1) {

printf("Attacker %d is common neighbor \n",neighbor_id[index][p]);






printf("Current_Path path->nexthop=%d \t common_count %d\n",path->nexthop,common_count);

float a[common_count];

float g_trust=0.0;

float avg_trust;

float add_trust;

for (int r=0;r<common_count;r++) { a[r]=DT[common_neighbor[r]][path->nexthop];

printf("DT=%.2f for nexthop %d at node %d\n",a[r],path->nexthop,common_neighbor[r]);

g_trust = g_trust + a[r];


avg_trust = g_trust / common_count;

avg_trust is the average trust value of indirect neighbors.

Quick Reply
Type your reply to this message here.

Image Verification
Image Verification
(case insensitive)
Please enter the text within the image on the left in to the text box below. This process is used to prevent automated posts.

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  digital image watermarking project source code free download riya40 0 0 Today 05:52 PM
Last Post: riya40
  school management software vb6 source code free download Guest 1 0 18-01-2018 01:03 PM
Last Post: dhanabhagya
  parachute code in opengl Guest 2 185 17-01-2018 08:01 PM
Last Post: Guest
  Servlet Database Java source code smart paper boy 2 2,059 12-01-2018 10:31 AM
Last Post: dhanabhagya
  detection of tumor in mri using vector quantization segmentation with matlab code Guest 1 243 08-01-2018 12:33 PM
Last Post: dhanabhagya
  online jewellery shop management software in asp net free download source code Guest 2 227 08-01-2018 01:09 AM
Last Post: Raymondnof
  madeenasuper net operator code Guest 1 246 06-01-2018 01:28 PM
Last Post: dhanabhagya
  is 2825 design calculation spreadsheet Guest 1 0 02-01-2018 12:06 PM
Last Post: dhanabhagya
  distance relay matlabe code Guest 1 0 20-11-2017 12:24 PM
Last Post: jaseela123
Question is 456 2008 code free download in pdf Guest 1 252 18-11-2017 10:51 AM
Last Post: jaseela123
This Page May Contain What is ns2 code trust value calculation And Latest Information/News About ns2 code trust value calculation,If Not ...Use Search to get more info about ns2 code trust value calculation Or Ask Here