From patchwork Tue Jul 5 15:23:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1238 Return-Path: Received: from latitanza.investici.org (latitanza.investici.org [82.94.249.234]) by open-mesh.org (Postfix) with ESMTPS id 6D3A21544A3 for ; Tue, 5 Jul 2011 17:24:06 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [82.94.249.234] (latitanza [82.94.249.234]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 5AE9598393; Tue, 5 Jul 2011 15:24:05 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 latitanza.investici.org 5AE9598393 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1309879445; bh=uAGTAY7SJp3Cq/3/mwQzf8Z5tdp81WKAWA+mjJ5Zsbs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=n+xRIK3TPzhGnR+bJje/rJXEg4qV0J2xX+HoRLzjjdJFwemoT4BFbufub5izXBxZT quKP9qLhH5piB2hkv0VRquiKRsYGThSg+gdAc45SAYONlCU4Kq7mJpE1JCPf5FlidV fKHIg9D55ab6PqA5QDHoxqTKbcMLGUC/iJnsua0U= From: Antonio Quartulli To: "B.A.T.M.A.N" Date: Tue, 5 Jul 2011 17:23:00 +0200 Message-Id: <1309879385-21224-2-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1309879385-21224-1-git-send-email-ordex@autistici.org> References: <1309879385-21224-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCH 1/6] batman-adv: unify the three starting fields of the tt_local/global_entry structures X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list 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: , X-List-Received-Date: Tue, 05 Jul 2011 15:24:06 -0000 Now the three starting fields of the tt_local/global_entry structures are unified. This allows to write generalised functions that operate on the flags and refcount field. Signed-off-by: Antonio Quartulli --- types.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types.h b/types.h index 25bd1db..b32ae5a 100644 --- a/types.h +++ b/types.h @@ -223,20 +223,20 @@ struct socket_packet { struct tt_local_entry { uint8_t addr[ETH_ALEN]; - unsigned long last_seen; uint16_t flags; atomic_t refcount; + unsigned long last_seen; struct rcu_head rcu; struct hlist_node hash_entry; }; struct tt_global_entry { uint8_t addr[ETH_ALEN]; + uint16_t flags; /* only TT_GLOBAL_ROAM is used */ + atomic_t refcount; struct orig_node *orig_node; uint8_t ttvn; - uint16_t flags; /* only TT_GLOBAL_ROAM is used */ unsigned long roam_at; /* time at which TT_GLOBAL_ROAM was set */ - atomic_t refcount; struct rcu_head rcu; struct hlist_node hash_entry; /* entry in the global table */ };