Seminar & Projects
Home
Members
Team
Help
Search
Register
Login
Home
Members
Help
Search
Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract
Engineering Seminar Topics
Seminar Requests
ns2 code trust value calculation
New Reply
0 Vote(s) - 0 Average
ns2 code trust value calculation
Guest
Guest
#1
05-09-2017, 03:53 PM
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
dhanabhagya
Offline
Super Moderator
Posts:
2,307
Threads:
0
Joined:
Dec 2015
Reputation:
0
#2
08-01-2018, 12:17 PM
//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]) {
common_neighbor[common_count]=neighbor_id[index][p];
//printf("neighborid=%d\n",common_neighbor[common_count]);
if(malicious_status[neighbor_id[index][p]]==1) {
printf("Attacker %d is common neighbor \n",neighbor_id[index][p]);
}
common_count=common_count+1;
}
}
}
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.
«
Next Oldest
|
Next Newest
»
Quick Reply
Message
Type your reply to this message here.
Disable Smilies
You have selected one or more posts to quote.
Quote these posts now
or
deselect them
.
Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
vhdl code for energy detection method in cognitive radio spectrum sensing
Guest
2
973
05-04-2023, 02:36 PM
Last Post
:
code for go back n arq in opengl
Guest
0
2,298
07-05-2019, 02:24 PM
Last Post
: Guest
source code for aquarium in computer graphics using opengl
Guest
3
5,989
07-04-2019, 04:23 PM
Last Post
: Guest
msf desalination matlab code
Guest
0
1,188
08-10-2018, 05:01 PM
Last Post
: Guest
verilog code to implement nikhilam sutra
Guest
2
1,140
25-09-2018, 08:00 PM
Last Post
: Guest
automatic timetable generator for collage source code in php
Guest
0
1,085
10-09-2018, 09:57 AM
Last Post
: Guest
matlab code for iris recognition using wavelets
Guest
0
1,089
11-05-2018, 07:49 AM
Last Post
: Guest
leaky bucket source code in opengl
Guest
0
949
02-05-2018, 05:58 PM
Last Post
: Guest
opengl code for leaky bucket
Guest
0
996
02-05-2018, 06:43 AM
Last Post
: Guest
leaky bucket source code in opengl
Guest
0
912
24-04-2018, 08:13 PM
Last Post
: Guest
View a Printable Version
Subscribe to this thread
Linear Mode
Threaded Mode