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
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
b.a.t.m.a.n@lists.open-mesh.org