Blame view

net/batman-adv/translation-table.h 2.94 KB
c6c8fea29   Sven Eckelmann   net: Add batman-a...
1
  /*
64afe3539   Sven Eckelmann   batman-adv: Updat...
2
   * Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
c6c8fea29   Sven Eckelmann   net: Add batman-a...
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
   *
   * Marek Lindner, Simon Wunderlich
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of version 2 of the GNU General Public
   * License as published by the Free Software Foundation.
   *
   * This program is distributed in the hope that it will be useful, but
   * WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   * General Public License for more details.
   *
   * You should have received a copy of the GNU General Public License
   * along with this program; if not, write to the Free Software
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
   * 02110-1301, USA
   *
   */
  
  #ifndef _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
  #define _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
a73105b8d   Antonio Quartulli   batman-adv: impro...
24
25
26
27
  int tt_len(int changes_num);
  int tt_changes_fill_buffer(struct bat_priv *bat_priv,
  			   unsigned char *buff, int buff_len);
  int tt_init(struct bat_priv *bat_priv);
bc2790808   Antonio Quartulli   batman-adv: detec...
28
29
  void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
  		  int ifindex);
2dafb49d8   Antonio Quartulli   batman-adv: renam...
30
  void tt_local_remove(struct bat_priv *bat_priv,
cc47f66e6   Antonio Quartulli   batman-adv: impro...
31
  		     const uint8_t *addr, const char *message, bool roaming);
2dafb49d8   Antonio Quartulli   batman-adv: renam...
32
  int tt_local_seq_print_text(struct seq_file *seq, void *offset);
5fbc1598c   Antonio Quartulli   batman-adv: unify...
33
  void tt_global_add_orig(struct bat_priv *bat_priv, struct orig_node *orig_node,
747e4221a   Sven Eckelmann   batman-adv: Add c...
34
  			const unsigned char *tt_buff, int tt_buff_len);
bc2790808   Antonio Quartulli   batman-adv: detec...
35
36
37
  int tt_global_add(struct bat_priv *bat_priv, struct orig_node *orig_node,
  		  const unsigned char *addr, uint8_t ttvn, bool roaming,
  		  bool wifi);
2dafb49d8   Antonio Quartulli   batman-adv: renam...
38
39
  int tt_global_seq_print_text(struct seq_file *seq, void *offset);
  void tt_global_del_orig(struct bat_priv *bat_priv,
a73105b8d   Antonio Quartulli   batman-adv: impro...
40
41
42
  			struct orig_node *orig_node, const char *message);
  void tt_global_del(struct bat_priv *bat_priv,
  		   struct orig_node *orig_node, const unsigned char *addr,
cc47f66e6   Antonio Quartulli   batman-adv: impro...
43
  		   const char *message, bool roaming);
747e4221a   Sven Eckelmann   batman-adv: Add c...
44
  struct orig_node *transtable_search(struct bat_priv *bat_priv,
3d393e473   Antonio Quartulli   batman-adv: imple...
45
  				    const uint8_t *src, const uint8_t *addr);
a73105b8d   Antonio Quartulli   batman-adv: impro...
46
47
48
49
50
  void tt_save_orig_buffer(struct bat_priv *bat_priv, struct orig_node *orig_node,
  			 const unsigned char *tt_buff, uint8_t tt_num_changes);
  uint16_t tt_local_crc(struct bat_priv *bat_priv);
  uint16_t tt_global_crc(struct bat_priv *bat_priv, struct orig_node *orig_node);
  void tt_free(struct bat_priv *bat_priv);
a73105b8d   Antonio Quartulli   batman-adv: impro...
51
52
  bool send_tt_response(struct bat_priv *bat_priv,
  		      struct tt_query_packet *tt_request);
a73105b8d   Antonio Quartulli   batman-adv: impro...
53
54
55
  bool is_my_client(struct bat_priv *bat_priv, const uint8_t *addr);
  void handle_tt_response(struct bat_priv *bat_priv,
  			struct tt_query_packet *tt_response);
cc47f66e6   Antonio Quartulli   batman-adv: impro...
56
57
  void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,
  		   struct orig_node *orig_node);
058d0e269   Antonio Quartulli   batman-adv: keep ...
58
  void tt_commit_changes(struct bat_priv *bat_priv);
59b699cde   Antonio Quartulli   batman-adv: imple...
59
  bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst);
a943cac14   Marek Lindner   batman-adv: merge...
60
61
62
  void tt_update_orig(struct bat_priv *bat_priv, struct orig_node *orig_node,
  		    const unsigned char *tt_buff, uint8_t tt_num_changes,
  		    uint8_t ttvn, uint16_t tt_crc);
c6c8fea29   Sven Eckelmann   net: Add batman-a...
63
64
  
  #endif /* _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ */