blob: af7a59cd77343dba6771b4b6255d9f6e411ba4b9 [file] [log] [blame]
Andrew Lunn5beef3c2009-11-09 21:20:10 +01001/*
Simon Wunderlich9b6d10b2010-05-07 21:47:10 +02002 * Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
Andrew Lunn5beef3c2009-11-09 21:20:10 +01003 *
4 * Marek Lindner, Simon Wunderlich
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public
8 * License as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301, USA
19 *
20 */
21
Sven Eckelmann62c20722010-06-26 00:28:24 +020022#ifndef _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
23#define _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
24
Andrew Lunn5beef3c2009-11-09 21:20:10 +010025#include "types.h"
26
27int hna_local_init(void);
Marek Lindner6a0e9fa2010-09-05 01:58:34 +020028void hna_local_add(struct net_device *soft_iface, uint8_t *addr);
29void hna_local_remove(struct bat_priv *bat_priv,
30 uint8_t *addr, char *message);
Andrew Lunn5beef3c2009-11-09 21:20:10 +010031int hna_local_fill_buffer(unsigned char *buff, int buff_len);
Sven Eckelmann4caecbc2010-06-22 01:25:43 +020032int hna_local_seq_print_text(struct seq_file *seq, void *offset);
Andrew Lunn5beef3c2009-11-09 21:20:10 +010033void hna_local_free(void);
34int hna_global_init(void);
Marek Lindner6a0e9fa2010-09-05 01:58:34 +020035void hna_global_add_orig(struct bat_priv *bat_priv,
36 struct orig_node *orig_node,
37 unsigned char *hna_buff, int hna_buff_len);
Sven Eckelmann4caecbc2010-06-22 01:25:43 +020038int hna_global_seq_print_text(struct seq_file *seq, void *offset);
Marek Lindner6a0e9fa2010-09-05 01:58:34 +020039void hna_global_del_orig(struct bat_priv *bat_priv,
40 struct orig_node *orig_node, char *message);
Andrew Lunn5beef3c2009-11-09 21:20:10 +010041void hna_global_free(void);
42struct orig_node *transtable_search(uint8_t *addr);
43
44extern spinlock_t hna_local_hash_lock;
45extern struct hashtable_t *hna_local_hash;
46extern atomic_t hna_local_changed;
Sven Eckelmann62c20722010-06-26 00:28:24 +020047
48#endif /* _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ */