Commit 9bbcc9f8 authored by Matthieu Boutier's avatar Matthieu Boutier Committed by Juliusz Chroboczek

Make rule functions global.

parent 0b324400
...@@ -97,3 +97,8 @@ int gettime(struct timeval *tv); ...@@ -97,3 +97,8 @@ int gettime(struct timeval *tv);
int read_random_bytes(void *buf, int len); int read_random_bytes(void *buf, int len);
int kernel_older_than(const char *sysname, int version, int sub_version); int kernel_older_than(const char *sysname, int version, int sub_version);
int kernel_has_ipv6_subtrees(void); int kernel_has_ipv6_subtrees(void);
int add_rule(int prio, const unsigned char *src_prefix, int src_plen,
int table);
int flush_rule(int prio, int family);
int change_rule(int new_prio, int old_prio, const unsigned char *src, int plen,
int table);
...@@ -1464,7 +1464,7 @@ kernel_callback(struct kernel_filter *filter) ...@@ -1464,7 +1464,7 @@ kernel_callback(struct kernel_filter *filter)
/* Routing table's rules */ /* Routing table's rules */
static int int
add_rule(int prio, const unsigned char *src_prefix, int src_plen, int table) add_rule(int prio, const unsigned char *src_prefix, int src_plen, int table)
{ {
char buffer[64] = {0}; /* 56 needed */ char buffer[64] = {0}; /* 56 needed */
...@@ -1536,7 +1536,7 @@ add_rule(int prio, const unsigned char *src_prefix, int src_plen, int table) ...@@ -1536,7 +1536,7 @@ add_rule(int prio, const unsigned char *src_prefix, int src_plen, int table)
return netlink_talk(message_header); return netlink_talk(message_header);
} }
static int int
flush_rule(int prio, int family) flush_rule(int prio, int family)
{ {
char buffer[64] = {0}; /* 36 needed */ char buffer[64] = {0}; /* 36 needed */
...@@ -1589,7 +1589,7 @@ flush_rule(int prio, int family) ...@@ -1589,7 +1589,7 @@ flush_rule(int prio, int family)
return netlink_talk(message_header); return netlink_talk(message_header);
} }
static int int
change_rule(int new_prio, int old_prio, change_rule(int new_prio, int old_prio,
const unsigned char *src, int plen, int table) const unsigned char *src, int plen, int table)
{ {
......
...@@ -851,6 +851,29 @@ kernel_callback(struct kernel_filter *filter) ...@@ -851,6 +851,29 @@ kernel_callback(struct kernel_filter *filter)
} }
int
add_rule(int prio, const unsigned char *src_prefix, int src_plen, int table)
{
errno = ENOSYS;
return -1;
}
int
flush_rule(int prio, int family)
{
errno = ENOSYS;
return -1;
}
int
change_rule(int new_prio, int old_prio,
const unsigned char *src, int plen, int table)
{
errno = ENOSYS;
return -1;
}
/* Local Variables: */ /* Local Variables: */
/* c-basic-offset: 4 */ /* c-basic-offset: 4 */
/* indent-tabs-mode: nil */ /* indent-tabs-mode: nil */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment