You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

krnl_route.h 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* This file is part of Netsukuku
  2. * (c) Copyright 2004 Andrea Lo Pumo aka AlpT <alpt@freaknet.org>
  3. *
  4. * This source code is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as published
  6. * by the Free Software Foundation; either version 2 of the License,
  7. * or (at your option) any later version.
  8. *
  9. * This source code is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. * Please refer to the GNU Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Public License along with
  15. * this source code; if not, write to:
  16. * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. #ifndef KRNL_ROUTE_H
  19. #define KRNL_ROUTE_H
  20. #include "if.h"
  21. #define RTPROT_NETSUKUKU 15
  22. struct nexthop {
  23. inet_prefix gw;
  24. char *dev;
  25. u_char hops;
  26. };
  27. struct rt_request {
  28. struct nlmsghdr nh;
  29. struct rtmsg rt;
  30. char buf[1024];
  31. };
  32. #define ROUTE_CMD_VARS int type, int scope, inet_prefix *src, inet_prefix *to, \
  33. struct nexthop *nhops, char *dev, u_char table
  34. int route_add(ROUTE_CMD_VARS);
  35. int route_del(ROUTE_CMD_VARS);
  36. int route_replace(ROUTE_CMD_VARS);
  37. int route_change(ROUTE_CMD_VARS);
  38. int route_append(ROUTE_CMD_VARS);
  39. int route_get_exact_prefix_dst(inet_prefix, inet_prefix *, char *);
  40. int route_flush_cache(int family);
  41. int route_ip_forward(int family, int enable);
  42. int route_rp_filter(int family, char *dev, int enable);
  43. int route_rp_filter_all_dev(int family, interface * ifs, int ifs_n,
  44. int enable);
  45. #endif /*KRNL_ROUTE_H */