* [B.A.T.M.A.N.] echo counting in batmand
@ 2012-09-16 15:17 Dominic Follett-Smith
2012-09-18 2:59 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Dominic Follett-Smith @ 2012-09-16 15:17 UTC (permalink / raw)
To: b.a.t.m.a.n
HI there,
I am trying to trace where the protocol updates its count of echos via
a neighbour. So far this is what I am interpreting: If I know that the
OGM came from this station, then we can record that we got the packet
in bit_mark, and update our neighbour's bcast_own_sum in their
originator entry.
if ((has_directlink_flag) && (if_incoming->addr.sin_addr.s_addr ==
bat_packet->orig) && (bat_packet->seqno - if_incoming->out.seqno + 2
== 0)) {
debug_output(4, "count own bcast (is_my_orig): old = %i, ",
orig_neigh_node->bcast_own_sum[if_incoming->if_num]);
bit_mark((TYPE_OF_WORD
*)&(orig_neigh_node->bcast_own[if_incoming->if_num * num_words]), 0);
orig_neigh_node->bcast_own_sum[if_incoming->if_num] =
bit_packet_count((TYPE_OF_WORD
*)&(orig_neigh_node->bcast_own[if_incoming->if_num * num_words]));
debug_output(4, "new = %i \n",
orig_neigh_node->bcast_own_sum[if_incoming->if_num]);
}
What I am trying to see is where the sliding window (of size
local_window_size) for echos is defined. This I cannot locate, and in
my report I am saying that bcast_own_sum is the sliding window for
echos, which I am not sure is correct or incorrect.
Thanks in advance for the help.
Regards
Dominic
UCT, SA
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] echo counting in batmand
2012-09-16 15:17 [B.A.T.M.A.N.] echo counting in batmand Dominic Follett-Smith
@ 2012-09-18 2:59 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2012-09-18 2:59 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hi,
> if ((has_directlink_flag) && (if_incoming->addr.sin_addr.s_addr ==
> bat_packet->orig) && (bat_packet->seqno - if_incoming->out.seqno + 2
> == 0)) {
>
> debug_output(4, "count own bcast (is_my_orig): old = %i,
",
> orig_neigh_node->bcast_own_sum[if_incoming->if_num]);
>
> bit_mark((TYPE_OF_WORD
> *)&(orig_neigh_node->bcast_own[if_incoming->if_num * num_words]), 0);
> orig_neigh_node->bcast_own_sum[if_incoming->if_num] =
> bit_packet_count((TYPE_OF_WORD
> *)&(orig_neigh_node->bcast_own[if_incoming->if_num * num_words]));
>
> debug_output(4, "new = %i \n",
> orig_neigh_node->bcast_own_sum[if_incoming->if_num]);
>
> }
you may want to look at the corresponding kernel code because it is way
cleaner and easier to understand.
Cheers,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-18 2:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-16 15:17 [B.A.T.M.A.N.] echo counting in batmand Dominic Follett-Smith
2012-09-18 2:59 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox