From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Tue, 18 Sep 2012 10:59:03 +0800 References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201209181059.03866.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] echo counting in batmand Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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