diff options
author | Antonio Quartulli <ordex@autistici.org> | 2011-06-17 16:11:27 +0200 |
---|---|---|
committer | Marek Lindner <lindner_marek@yahoo.de> | 2011-07-05 14:28:54 +0200 |
commit | 5fbc1598c28555d2aa44bff0ac56ec3739401aff (patch) | |
tree | 2664c2483f59a5bd4e36a59e37a8274f375ffba2 /net/batman-adv/types.h | |
parent | 43676ab590c3f8686fd047d34c3e33803eef71f0 (diff) | |
download | talos-op-linux-5fbc1598c28555d2aa44bff0ac56ec3739401aff.tar.gz talos-op-linux-5fbc1598c28555d2aa44bff0ac56ec3739401aff.zip |
batman-adv: unify flags for tt_change/tt_local_entry/tt_global_entry
The tt_local_entry structure now has a 'flags' field. This helps to
unify the flags format to all the client related structures (tt_global_entry
and tt_change). The 'never_purge' field is now encoded in the 'flags' one.
To optimise the usage of this field, its length has been increased to 16bit
in order to use the eight leading bits (from 0 to 7) to store flags that
have to be sent on the wire, while the eight ending ones are used for local
computation only.
Moreover 'enum tt_change_flags' is now called 'enum tt_client_flags' and the
defined values apply to the tt_local_entry, tt_global_entry and the tt_change
'flags' field.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r-- | net/batman-adv/types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 85cf1224881e..25bd1db35370 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -224,7 +224,7 @@ struct socket_packet { struct tt_local_entry { uint8_t addr[ETH_ALEN]; unsigned long last_seen; - char never_purge; + uint16_t flags; atomic_t refcount; struct rcu_head rcu; struct hlist_node hash_entry; @@ -234,7 +234,7 @@ struct tt_global_entry { uint8_t addr[ETH_ALEN]; struct orig_node *orig_node; uint8_t ttvn; - uint8_t flags; /* only TT_GLOBAL_ROAM is used */ + 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; |