1c6c8fea2SSven Eckelmann /* 2567db7b0SSven Eckelmann * Copyright (C) 2007-2012 B.A.T.M.A.N. contributors: 3c6c8fea2SSven Eckelmann * 4*35c133a0SAntonio Quartulli * Marek Lindner, Simon Wunderlich, Antonio Quartulli 5c6c8fea2SSven Eckelmann * 6c6c8fea2SSven Eckelmann * This program is free software; you can redistribute it and/or 7c6c8fea2SSven Eckelmann * modify it under the terms of version 2 of the GNU General Public 8c6c8fea2SSven Eckelmann * License as published by the Free Software Foundation. 9c6c8fea2SSven Eckelmann * 10c6c8fea2SSven Eckelmann * This program is distributed in the hope that it will be useful, but 11c6c8fea2SSven Eckelmann * WITHOUT ANY WARRANTY; without even the implied warranty of 12c6c8fea2SSven Eckelmann * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13c6c8fea2SSven Eckelmann * General Public License for more details. 14c6c8fea2SSven Eckelmann * 15c6c8fea2SSven Eckelmann * You should have received a copy of the GNU General Public License 16c6c8fea2SSven Eckelmann * along with this program; if not, write to the Free Software 17c6c8fea2SSven Eckelmann * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18c6c8fea2SSven Eckelmann * 02110-1301, USA 19c6c8fea2SSven Eckelmann * 20c6c8fea2SSven Eckelmann */ 21c6c8fea2SSven Eckelmann 22c6c8fea2SSven Eckelmann #ifndef _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ 23c6c8fea2SSven Eckelmann #define _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ 24c6c8fea2SSven Eckelmann 25a73105b8SAntonio Quartulli int tt_len(int changes_num); 26a73105b8SAntonio Quartulli int tt_changes_fill_buffer(struct bat_priv *bat_priv, 27a73105b8SAntonio Quartulli unsigned char *buff, int buff_len); 28a73105b8SAntonio Quartulli int tt_init(struct bat_priv *bat_priv); 29bc279080SAntonio Quartulli void tt_local_add(struct net_device *soft_iface, const uint8_t *addr, 30bc279080SAntonio Quartulli int ifindex); 312dafb49dSAntonio Quartulli void tt_local_remove(struct bat_priv *bat_priv, 32cc47f66eSAntonio Quartulli const uint8_t *addr, const char *message, bool roaming); 332dafb49dSAntonio Quartulli int tt_local_seq_print_text(struct seq_file *seq, void *offset); 345fbc1598SAntonio Quartulli void tt_global_add_orig(struct bat_priv *bat_priv, struct orig_node *orig_node, 35747e4221SSven Eckelmann const unsigned char *tt_buff, int tt_buff_len); 36bc279080SAntonio Quartulli int tt_global_add(struct bat_priv *bat_priv, struct orig_node *orig_node, 37bc279080SAntonio Quartulli const unsigned char *addr, uint8_t ttvn, bool roaming, 38bc279080SAntonio Quartulli bool wifi); 392dafb49dSAntonio Quartulli int tt_global_seq_print_text(struct seq_file *seq, void *offset); 402dafb49dSAntonio Quartulli void tt_global_del_orig(struct bat_priv *bat_priv, 41747e4221SSven Eckelmann struct orig_node *orig_node, const char *message); 42747e4221SSven Eckelmann struct orig_node *transtable_search(struct bat_priv *bat_priv, 433d393e47SAntonio Quartulli const uint8_t *src, const uint8_t *addr); 44a73105b8SAntonio Quartulli uint16_t tt_local_crc(struct bat_priv *bat_priv); 45a73105b8SAntonio Quartulli void tt_free(struct bat_priv *bat_priv); 46a73105b8SAntonio Quartulli bool send_tt_response(struct bat_priv *bat_priv, 47a73105b8SAntonio Quartulli struct tt_query_packet *tt_request); 48a73105b8SAntonio Quartulli bool is_my_client(struct bat_priv *bat_priv, const uint8_t *addr); 49a73105b8SAntonio Quartulli void handle_tt_response(struct bat_priv *bat_priv, 50a73105b8SAntonio Quartulli struct tt_query_packet *tt_response); 51058d0e26SAntonio Quartulli void tt_commit_changes(struct bat_priv *bat_priv); 5259b699cdSAntonio Quartulli bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst); 53a943cac1SMarek Lindner void tt_update_orig(struct bat_priv *bat_priv, struct orig_node *orig_node, 54a943cac1SMarek Lindner const unsigned char *tt_buff, uint8_t tt_num_changes, 55a943cac1SMarek Lindner uint8_t ttvn, uint16_t tt_crc); 56c6c8fea2SSven Eckelmann 57c6c8fea2SSven Eckelmann #endif /* _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ */ 58