routing.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (C) 2007-2018 B.A.T.M.A.N. contributors:
  3. *
  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, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef _NET_BATMAN_ADV_ROUTING_H_
  19. #define _NET_BATMAN_ADV_ROUTING_H_
  20. #include "main.h"
  21. #include <linux/types.h>
  22. struct sk_buff;
  23. bool batadv_check_management_packet(struct sk_buff *skb,
  24. struct batadv_hard_iface *hard_iface,
  25. int header_len);
  26. void batadv_update_route(struct batadv_priv *bat_priv,
  27. struct batadv_orig_node *orig_node,
  28. struct batadv_hard_iface *recv_if,
  29. struct batadv_neigh_node *neigh_node);
  30. int batadv_recv_icmp_packet(struct sk_buff *skb,
  31. struct batadv_hard_iface *recv_if);
  32. int batadv_recv_unicast_packet(struct sk_buff *skb,
  33. struct batadv_hard_iface *recv_if);
  34. int batadv_recv_frag_packet(struct sk_buff *skb,
  35. struct batadv_hard_iface *iface);
  36. int batadv_recv_bcast_packet(struct sk_buff *skb,
  37. struct batadv_hard_iface *recv_if);
  38. int batadv_recv_tt_query(struct sk_buff *skb,
  39. struct batadv_hard_iface *recv_if);
  40. int batadv_recv_roam_adv(struct sk_buff *skb,
  41. struct batadv_hard_iface *recv_if);
  42. int batadv_recv_unicast_tvlv(struct sk_buff *skb,
  43. struct batadv_hard_iface *recv_if);
  44. int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb,
  45. struct batadv_hard_iface *recv_if);
  46. struct batadv_neigh_node *
  47. batadv_find_router(struct batadv_priv *bat_priv,
  48. struct batadv_orig_node *orig_node,
  49. struct batadv_hard_iface *recv_if);
  50. bool batadv_window_protected(struct batadv_priv *bat_priv, s32 seq_num_diff,
  51. s32 seq_old_max_diff, unsigned long *last_reset,
  52. bool *protection_started);
  53. #endif /* _NET_BATMAN_ADV_ROUTING_H_ */