[Olsr-dev] [PATCH v1 8/8] linux: export the olsr_new_netlink_route function

Ferry Huberts (spam-protected)
Tue Aug 19 12:07:52 CEST 2014


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/kernel_routes.h          | 7 ++++++-
 src/linux/kernel_routes_nl.c | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/kernel_routes.h b/src/kernel_routes.h
index 10e7eca..38f163a 100644
--- a/src/kernel_routes.h
+++ b/src/kernel_routes.h
@@ -54,7 +54,12 @@ int olsr_ioctl_del_route(const struct rt_entry *rt);
 int olsr_ioctl_del_route6(const struct rt_entry *rt);
 
 #ifdef __linux__
-int rtnetlink_register_socket(int);
+  int olsr_new_netlink_route(unsigned char family, uint32_t rttable,
+    unsigned int flags, unsigned char scope, int if_index, int metric,
+    int protocol, const union olsr_ip_addr *src, const union olsr_ip_addr *gw,
+    const struct olsr_ip_prefix *dst, bool set, bool del_similar, bool blackhole);
+
+  int rtnetlink_register_socket(int);
 #endif /* __linux__ */
 
 void olsr_os_niit_4to6_route(const struct olsr_ip_prefix *dst_v4, bool set);
diff --git a/src/linux/kernel_routes_nl.c b/src/linux/kernel_routes_nl.c
index c225d71..3a8cde6 100644
--- a/src/linux/kernel_routes_nl.c
+++ b/src/linux/kernel_routes_nl.c
@@ -338,7 +338,7 @@ int olsr_os_ifip(int ifindex, union olsr_ip_addr *ip, bool create) {
   return olsr_add_ip(ifindex, ip, NULL, create);
 }
 
-static int olsr_new_netlink_route(unsigned char family, uint32_t rttable, unsigned int flags, unsigned char scope, int if_index, int metric, int protocol,
+int olsr_new_netlink_route(unsigned char family, uint32_t rttable, unsigned int flags, unsigned char scope, int if_index, int metric, int protocol,
     const union olsr_ip_addr *src, const union olsr_ip_addr *gw, const struct olsr_ip_prefix *dst,
     bool set, bool del_similar, bool blackhole) {
 
-- 
1.9.3





More information about the Olsr-dev mailing list