diff options
author | Antonio Quartulli <ordex@autistici.org> | 2013-04-18 15:13:01 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-05-29 02:44:55 +0200 |
commit | d4ff40f683221d46c351cd9ab61f37a6ea5d2444 (patch) | |
tree | 948643240098a2df06425b2d4b49b45c740e2f5a /net/batman-adv/translation-table.c | |
parent | batman-adv: don't deal with NET_IP_ALIGN manually (diff) | |
download | linux-d4ff40f683221d46c351cd9ab61f37a6ea5d2444.tar.xz linux-d4ff40f683221d46c351cd9ab61f37a6ea5d2444.zip |
batman-adv: pass a 16bit long flag argument to tt_global_add()
it may be the case that we want to store some local TT client flags in a global
entry, therefore the tt_global_add needs to get a proper argument for this
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r-- | net/batman-adv/translation-table.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 52808c4ae081..e272f68e1b08 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -798,10 +798,25 @@ out: batadv_tt_orig_list_entry_free_ref(orig_entry); } -/* caller must hold orig_node refcount */ +/** + * batadv_tt_global_add - add a new TT global entry or update an existing one + * @bat_priv: the bat priv with all the soft interface information + * @orig_node: the originator announcing the client + * @tt_addr: the mac address of the non-mesh client + * @flags: TT flags that have to be set for this non-mesh client + * @ttvn: the tt version number ever announcing this non-mesh client + * + * Add a new TT global entry for the given originator. If the entry already + * exists add a new reference to the given originator (a global entry can have + * references to multiple originators) and adjust the flags attribute to reflect + * the function argument. + * If a TT local entry exists for this non-mesh client remove it. + * + * The caller must hold orig_node refcount. + */ int batadv_tt_global_add(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node, - const unsigned char *tt_addr, uint8_t flags, + const unsigned char *tt_addr, uint16_t flags, uint8_t ttvn) { struct batadv_tt_global_entry *tt_global_entry; |