route.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef TINC_ROUTE_H
  2. #define TINC_ROUTE_H
  3. /*
  4. route.h -- header file for route.c
  5. Copyright (C) 2000-2005 Ivo Timmermans
  6. 2000-2012 Guus Sliepen <guus@tinc-vpn.org>
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License along
  16. with this program; if not, write to the Free Software Foundation, Inc.,
  17. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. */
  19. #include "net.h"
  20. #include "node.h"
  21. typedef enum rmode_t {
  22. RMODE_HUB = 0,
  23. RMODE_SWITCH,
  24. RMODE_ROUTER,
  25. } rmode_t;
  26. typedef enum fmode_t {
  27. FMODE_OFF = 0,
  28. FMODE_INTERNAL,
  29. FMODE_KERNEL,
  30. } fmode_t;
  31. typedef enum bmode_t {
  32. BMODE_NONE = 0,
  33. BMODE_MST,
  34. BMODE_DIRECT,
  35. } bmode_t;
  36. extern rmode_t routing_mode;
  37. extern fmode_t forwarding_mode;
  38. extern bmode_t broadcast_mode;
  39. extern bool decrement_ttl;
  40. extern bool directonly;
  41. extern bool overwrite_mac;
  42. extern bool priorityinheritance;
  43. extern int macexpire;
  44. extern mac_t mymac;
  45. extern void age_subnets(void);
  46. extern void route(struct node_t *source, struct vpn_packet_t *packet);
  47. #endif