diff options
author | Antonio Quartulli <ordex@autistici.org> | 2011-06-17 10:11:27 -0400 |
---|---|---|
committer | Marek Lindner <lindner_marek@yahoo.de> | 2011-07-05 08:28:54 -0400 |
commit | 5fbc1598c28555d2aa44bff0ac56ec3739401aff (patch) | |
tree | 2664c2483f59a5bd4e36a59e37a8274f375ffba2 /net/batman-adv/packet.h | |
parent | 43676ab590c3f8686fd047d34c3e33803eef71f0 (diff) |
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/packet.h')
-rw-r--r-- | net/batman-adv/packet.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h index c5f081dfc6d1..590e4a66089f 100644 --- a/net/batman-adv/packet.h +++ b/net/batman-adv/packet.h | |||
@@ -78,10 +78,13 @@ enum tt_query_flags { | |||
78 | TT_FULL_TABLE = 1 << 2 | 78 | TT_FULL_TABLE = 1 << 2 |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /* TT_CHANGE flags */ | 81 | /* TT_CLIENT flags. |
82 | enum tt_change_flags { | 82 | * Flags from 1 to 1 << 7 are sent on the wire, while flags from 1 << 8 to |
83 | TT_CHANGE_DEL = 0x01, | 83 | * 1 << 15 are used for local computation only */ |
84 | TT_CLIENT_ROAM = 0x02 | 84 | enum tt_client_flags { |
85 | TT_CLIENT_DEL = 1 << 0, | ||
86 | TT_CLIENT_ROAM = 1 << 1, | ||
87 | TT_CLIENT_NOPURGE = 1 << 8 | ||
85 | }; | 88 | }; |
86 | 89 | ||
87 | struct batman_packet { | 90 | struct batman_packet { |