aboutsummaryrefslogtreecommitdiff
path: root/route.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--route.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/route.h b/route.h
index 674d200..1a929bd 100644
--- a/route.h
+++ b/route.h
@@ -138,6 +138,10 @@ bool init_route_list (struct route_list *rl,
in_addr_t remote_host,
struct env_set *es);
+void route_list_add_default_gateway (struct route_list *rl,
+ struct env_set *es,
+ const in_addr_t addr);
+
void add_routes (struct route_list *rl,
const struct tuntap *tt,
unsigned int flags,
@@ -186,4 +190,13 @@ netbits_to_netmask (const int netbits)
return mask;
}
+static inline bool
+route_list_default_gateway_needed (const struct route_list *rl)
+{
+ if (!rl)
+ return false;
+ else
+ return !rl->spec.remote_endpoint_defined;
+}
+
#endif