OpenVPN
route.h
Go to the documentation of this file.
1 /*
2  * OpenVPN -- An application to securely tunnel IP networks
3  * over a single TCP/UDP port, with support for SSL/TLS-based
4  * session authentication and key exchange,
5  * packet encryption, packet authentication, and
6  * packet compression.
7  *
8  * Copyright (C) 2002-2024 OpenVPN Inc <sales@openvpn.net>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2
12  * as published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23 
24 /*
25  * Support routines for adding/deleting network routes.
26  */
27 
28 #ifndef ROUTE_H
29 #define ROUTE_H
30 
31 #include "basic.h"
32 #include "tun.h"
33 #include "misc.h"
34 #include "networking.h"
35 
36 #ifdef _WIN32
37 /*
38  * Windows route methods
39  */
40 #define ROUTE_METHOD_ADAPTIVE 0 /* try IP helper first then route.exe */
41 #define ROUTE_METHOD_IPAPI 1 /* use IP helper API */
42 #define ROUTE_METHOD_EXE 2 /* use route.exe */
43 #define ROUTE_METHOD_SERVICE 3 /* use the privileged Windows service */
44 #define ROUTE_METHOD_MASK 3
45 #endif
46 
47 /*
48  * Route add/delete flags (must stay clear of ROUTE_METHOD bits)
49  */
50 #define ROUTE_DELETE_FIRST (1<<2)
51 #define ROUTE_REF_GW (1<<3)
52 
54 {
55 #define N_ROUTE_BYPASS 8
56  int n_bypass;
57  in_addr_t bypass[N_ROUTE_BYPASS];
58 };
59 
61 {
62  /* bits indicating which members below are defined */
63 #define RTSA_REMOTE_ENDPOINT (1<<0)
64 #define RTSA_REMOTE_HOST (1<<1)
65 #define RTSA_DEFAULT_METRIC (1<<2)
66  unsigned int flags;
67 
68  in_addr_t remote_endpoint;
69  in_addr_t remote_host;
70  int remote_host_local; /* TLA_x value */
73 };
74 
75 struct route_option {
76  struct route_option *next;
77  const char *network;
78  const char *netmask;
79  const char *gateway;
80  const char *metric;
81 };
82 
83 /* redirect-gateway flags */
84 #define RG_ENABLE (1<<0)
85 #define RG_LOCAL (1<<1)
86 #define RG_DEF1 (1<<2)
87 #define RG_BYPASS_DHCP (1<<3)
88 #define RG_BYPASS_DNS (1<<4)
89 #define RG_REROUTE_GW (1<<5)
90 #define RG_AUTO_LOCAL (1<<6)
91 #define RG_BLOCK_LOCAL (1<<7)
92 
94  unsigned int flags; /* RG_x flags */
96  struct gc_arena *gc;
97 };
98 
101  const char *prefix; /* e.g. "2001:db8:1::/64" */
102  const char *gateway; /* e.g. "2001:db8:0::2" */
103  const char *metric; /* e.g. "5" */
104 };
105 
107  unsigned int flags; /* RG_x flags, see route_option-list */
109  struct gc_arena *gc;
110 };
111 
112 struct route_ipv4 {
113 #define RT_DEFINED (1<<0)
114 #define RT_ADDED (1<<1)
115 #define RT_METRIC_DEFINED (1<<2)
116  struct route_ipv4 *next;
117  unsigned int flags;
118  const struct route_option *option;
119  in_addr_t network;
120  in_addr_t netmask;
121  in_addr_t gateway;
122  int metric;
123 };
124 
125 struct route_ipv6 {
126  struct route_ipv6 *next;
127  unsigned int flags; /* RT_ flags, see route_ipv4 */
128  struct in6_addr network;
129  unsigned int netbits;
130  struct in6_addr gateway;
131  int metric;
132  /* gateway interface */
133 #ifdef _WIN32
134  DWORD adapter_index; /* interface or ~0 if undefined */
135 #else
136  char *iface; /* interface name (null terminated) */
137 #endif
138 };
139 
140 
142  in_addr_t addr;
143  in_addr_t netmask;
144 };
145 
147 #define RGI_ADDR_DEFINED (1<<0) /* set if gateway.addr defined */
148 #define RGI_NETMASK_DEFINED (1<<1) /* set if gateway.netmask defined */
149 #define RGI_HWADDR_DEFINED (1<<2) /* set if hwaddr is defined */
150 #define RGI_IFACE_DEFINED (1<<3) /* set if iface is defined */
151 #define RGI_OVERFLOW (1<<4) /* set if more interface addresses than will fit in addrs */
152 #define RGI_ON_LINK (1<<5)
153  unsigned int flags;
154 
155  /* gateway interface */
156 #ifdef _WIN32
157  DWORD adapter_index; /* interface or ~0 if undefined */
158 #else
159  char iface[16]; /* interface name (null terminated), may be empty */
160 #endif
161 
162  /* gateway interface hardware address */
163  uint8_t hwaddr[6];
164 
165  /* gateway/router address */
167 
168  /* address/netmask pairs bound to interface */
169 #define RGI_N_ADDRESSES 8
170  int n_addrs; /* len of addrs, may be 0 */
171  struct route_gateway_address addrs[RGI_N_ADDRESSES]; /* local addresses attached to iface */
172 };
173 
175  struct in6_addr addr_ipv6;
177 };
178 
180 /* RGI_ flags used as in route_gateway_info */
181  unsigned int flags;
182 
183  /* gateway interface */
184 #ifdef _WIN32
185  DWORD adapter_index; /* interface or ~0 if undefined */
186 #else
187  /* non linux platform don't have this constant defined */
188 #ifndef IFNAMSIZ
189 #define IFNAMSIZ 16
190 #endif
191  char iface[IFNAMSIZ]; /* interface name (null terminated), may be empty */
192 #endif
193 
194  /* gateway interface hardware address */
195  uint8_t hwaddr[6];
196 
197  /* gateway/router address */
199 
200  /* address/netmask pairs bound to interface */
201 #define RGI_N_ADDRESSES 8
202  int n_addrs; /* len of addrs, may be 0 */
203  struct route_ipv6_gateway_address addrs[RGI_N_ADDRESSES]; /* local addresses attached to iface */
204 };
205 
206 struct route_list {
207 #define RL_DID_REDIRECT_DEFAULT_GATEWAY (1<<0)
208 #define RL_DID_LOCAL (1<<1)
209 #define RL_ROUTES_ADDED (1<<2)
210  unsigned int iflags;
211 
214  unsigned int flags; /* RG_x flags */
216  struct gc_arena gc;
217 };
218 
220  unsigned int iflags; /* RL_ flags, see route_list */
221 
222  unsigned int spec_flags; /* RTSA_ flags, route_special_addr */
223  struct in6_addr remote_endpoint_ipv6; /* inside tun */
224  struct in6_addr remote_host_ipv6; /* --remote address */
226 
228  unsigned int flags; /* RG_x flags, see route_option_list */
230  struct gc_arena gc;
231 };
232 
233 /* internal OpenVPN route */
234 struct iroute {
235  in_addr_t network;
236  int netbits;
237  struct iroute *next;
238 };
239 
240 struct iroute_ipv6 {
241  struct in6_addr network;
242  unsigned int netbits;
243  struct iroute_ipv6 *next;
244 };
245 
256 bool block_local_needed(const struct route_list *rl);
257 
259 
261 
262 struct route_option_list *clone_route_option_list(const struct route_option_list *src, struct gc_arena *a);
263 
265 
266 void copy_route_option_list(struct route_option_list *dest, const struct route_option_list *src, struct gc_arena *a);
267 
269  const struct route_ipv6_option_list *src,
270  struct gc_arena *a);
271 
272 void route_ipv6_clear_host_bits( struct route_ipv6 *r6 );
273 
274 bool add_route_ipv6(struct route_ipv6 *r, const struct tuntap *tt, unsigned int flags, const struct env_set *es, openvpn_net_ctx_t *ctx);
275 
276 void delete_route_ipv6(const struct route_ipv6 *r, const struct tuntap *tt, unsigned int flags, const struct env_set *es, openvpn_net_ctx_t *ctx);
277 
278 bool add_route(struct route_ipv4 *r, const struct tuntap *tt, unsigned int flags,
279  const struct route_gateway_info *rgi, const struct env_set *es,
280  openvpn_net_ctx_t *ctx);
281 
283  const char *network,
284  const char *netmask,
285  const char *gateway,
286  const char *metric);
287 
289  const char *prefix,
290  const char *gateway,
291  const char *metric);
292 
293 bool init_route_list(struct route_list *rl,
294  const struct route_option_list *opt,
295  const char *remote_endpoint,
296  int default_metric,
297  in_addr_t remote_host,
298  struct env_set *es,
299  openvpn_net_ctx_t *ctx);
300 
301 bool init_route_ipv6_list(struct route_ipv6_list *rl6,
302  const struct route_ipv6_option_list *opt6,
303  const char *remote_endpoint,
304  int default_metric,
305  const struct in6_addr *remote_host,
306  struct env_set *es,
307  openvpn_net_ctx_t *ctx);
308 
309 void route_list_add_vpn_gateway(struct route_list *rl,
310  struct env_set *es,
311  const in_addr_t addr);
312 
313 bool add_routes(struct route_list *rl, struct route_ipv6_list *rl6,
314  const struct tuntap *tt, unsigned int flags,
315  const struct env_set *es, openvpn_net_ctx_t *ctx);
316 
317 void delete_routes(struct route_list *rl,
318  struct route_ipv6_list *rl6,
319  const struct tuntap *tt,
320  unsigned int flags,
321  const struct env_set *es,
322  openvpn_net_ctx_t *ctx);
323 
324 void setenv_routes(struct env_set *es, const struct route_list *rl);
325 
326 void setenv_routes_ipv6(struct env_set *es, const struct route_ipv6_list *rl6);
327 
328 bool is_special_addr(const char *addr_str);
329 
330 void get_default_gateway(struct route_gateway_info *rgi,
331  openvpn_net_ctx_t *ctx);
332 
334  const struct in6_addr *dest,
335  openvpn_net_ctx_t *ctx);
336 
337 void print_default_gateway(const int msglevel,
338  const struct route_gateway_info *rgi,
339  const struct route_ipv6_gateway_info *rgi6);
340 
341 /*
342  * Test if addr is reachable via a local interface (return ILA_LOCAL),
343  * or if it needs to be routed via the default gateway (return
344  * ILA_NONLOCAL). If the current platform doesn't implement this
345  * function, return ILA_NOT_IMPLEMENTED.
346  */
347 #define TLA_NOT_IMPLEMENTED 0
348 #define TLA_NONLOCAL 1
349 #define TLA_LOCAL 2
350 int test_local_addr(const in_addr_t addr, const struct route_gateway_info *rgi);
351 
352 #ifndef ENABLE_SMALL
353 void print_route_options(const struct route_option_list *rol,
354  int level);
355 
356 #endif
357 
358 void print_routes(const struct route_list *rl, int level);
359 
360 #ifdef _WIN32
361 
362 void show_routes(int msglev);
363 
364 bool test_routes(const struct route_list *rl, const struct tuntap *tt);
365 
366 #else /* ifdef _WIN32 */
367 static inline bool
368 test_routes(const struct route_list *rl, const struct tuntap *tt)
369 {
370  return true;
371 }
372 #endif
373 
374 bool netmask_to_netbits(const in_addr_t network, const in_addr_t netmask, int *netbits);
375 
376 int netmask_to_netbits2(in_addr_t netmask);
377 
378 static inline in_addr_t
379 netbits_to_netmask(const int netbits)
380 {
381  const int addrlen = sizeof(in_addr_t) * 8;
382  in_addr_t mask = 0;
383  if (netbits > 0 && netbits <= addrlen)
384  {
385  mask = IPV4_NETMASK_HOST << (addrlen-netbits);
386  }
387  return mask;
388 }
389 
390 static inline bool
392 {
393  if (!rl)
394  {
395  return false;
396  }
397  else
398  {
399  return !(rl->spec.flags & RTSA_REMOTE_ENDPOINT);
400  }
401 }
402 
403 static inline int
405 {
407 }
408 
409 #endif /* ifndef ROUTE_H */
route_ipv6_gateway_address::addr_ipv6
struct in6_addr addr_ipv6
Definition: route.h:175
route_ipv6_option_list::routes_ipv6
struct route_ipv6_option * routes_ipv6
Definition: route.h:108
print_route_options
void print_route_options(const struct route_option_list *rol, int level)
Definition: route.c:1317
iroute
Definition: route.h:234
RTSA_REMOTE_ENDPOINT
#define RTSA_REMOTE_ENDPOINT
Definition: route.h:63
setenv_routes_ipv6
void setenv_routes_ipv6(struct env_set *es, const struct route_ipv6_list *rl6)
Definition: route.c:1487
route_ipv6_option_list::flags
unsigned int flags
Definition: route.h:107
route_bypass::n_bypass
int n_bypass
Definition: route.h:56
route_gateway_address
Definition: route.h:141
route_list_vpn_gateway_needed
static bool route_list_vpn_gateway_needed(const struct route_list *rl)
Definition: route.h:391
route_option::metric
const char * metric
Definition: route.h:80
add_route_to_option_list
void add_route_to_option_list(struct route_option_list *l, const char *network, const char *netmask, const char *gateway, const char *metric)
Definition: route.c:510
route_special_addr::bypass
struct route_bypass bypass
Definition: route.h:71
networking.h
route_list
Definition: route.h:206
copy_route_ipv6_option_list
void copy_route_ipv6_option_list(struct route_ipv6_option_list *dest, const struct route_ipv6_option_list *src, struct gc_arena *a)
Definition: route.c:180
route_ipv6::adapter_index
DWORD adapter_index
Definition: route.h:134
route_ipv6_gateway_info::n_addrs
int n_addrs
Definition: route.h:202
route_gateway_info::n_addrs
int n_addrs
Definition: route.h:170
test_routes
bool test_routes(const struct route_list *rl, const struct tuntap *tt)
Definition: route.c:2592
route_gateway_info
Definition: route.h:146
route_ipv6_gateway_info::gateway
struct route_ipv6_gateway_address gateway
Definition: route.h:198
route_ipv6::metric
int metric
Definition: route.h:131
es
struct env_set * es
Definition: test_pkcs11.c:133
route_did_redirect_default_gateway
static int route_did_redirect_default_gateway(const struct route_list *rl)
Definition: route.h:404
route_ipv6_gateway_info::adapter_index
DWORD adapter_index
Definition: route.h:185
route_ipv6_gateway_address::netbits_ipv6
int netbits_ipv6
Definition: route.h:176
route_special_addr::remote_host_local
int remote_host_local
Definition: route.h:70
route_ipv6_gateway_info::flags
unsigned int flags
Definition: route.h:181
add_routes
bool add_routes(struct route_list *rl, struct route_ipv6_list *rl6, const struct tuntap *tt, unsigned int flags, const struct env_set *es, openvpn_net_ctx_t *ctx)
Definition: route.c:1186
route_option::gateway
const char * gateway
Definition: route.h:79
route_ipv6_gateway_info
Definition: route.h:179
route_ipv6::gateway
struct in6_addr gateway
Definition: route.h:130
route_ipv6_list
Definition: route.h:219
route_ipv6
Definition: route.h:125
print_default_gateway
void print_default_gateway(const int msglevel, const struct route_gateway_info *rgi, const struct route_ipv6_gateway_info *rgi6)
Definition: route.c:1333
route_ipv6_gateway_address
Definition: route.h:174
route_ipv4::netmask
in_addr_t netmask
Definition: route.h:120
iroute::netbits
int netbits
Definition: route.h:236
openvpn_net_ctx_t
void * openvpn_net_ctx_t
Definition: networking.h:28
route_ipv6_gateway_info::addrs
struct route_ipv6_gateway_address addrs[RGI_N_ADDRESSES]
Definition: route.h:203
copy_route_option_list
void copy_route_option_list(struct route_option_list *dest, const struct route_option_list *src, struct gc_arena *a)
Definition: route.c:173
is_special_addr
bool is_special_addr(const char *addr_str)
Definition: route.c:306
iroute_ipv6::network
struct in6_addr network
Definition: route.h:241
route_gateway_info::addrs
struct route_gateway_address addrs[RGI_N_ADDRESSES]
Definition: route.h:171
iroute::next
struct iroute * next
Definition: route.h:237
route_bypass
Definition: route.h:53
get_default_gateway_ipv6
void get_default_gateway_ipv6(struct route_ipv6_gateway_info *rgi, const struct in6_addr *dest, openvpn_net_ctx_t *ctx)
Definition: route.c:2766
iroute::network
in_addr_t network
Definition: route.h:235
route_list::routes
struct route_ipv4 * routes
Definition: route.h:215
route_list::iflags
unsigned int iflags
Definition: route.h:210
init_route_list
bool init_route_list(struct route_list *rl, const struct route_option_list *opt, const char *remote_endpoint, int default_metric, in_addr_t remote_host, struct env_set *es, openvpn_net_ctx_t *ctx)
Definition: route.c:631
iroute_ipv6::netbits
unsigned int netbits
Definition: route.h:242
test_local_addr
int test_local_addr(const in_addr_t addr, const struct route_gateway_info *rgi)
Definition: route.c:4065
new_route_ipv6_option_list
struct route_ipv6_option_list * new_route_ipv6_option_list(struct gc_arena *a)
Definition: route.c:139
route_ipv6::flags
unsigned int flags
Definition: route.h:127
add_route
bool add_route(struct route_ipv4 *r, const struct tuntap *tt, unsigned int flags, const struct route_gateway_info *rgi, const struct env_set *es, openvpn_net_ctx_t *ctx)
Definition: route.c:1565
tun.h
route_option_list
Definition: route.h:93
print_routes
void print_routes(const struct route_list *rl, int level)
Definition: route.c:1419
N_ROUTE_BYPASS
#define N_ROUTE_BYPASS
Definition: route.h:55
route_ipv6_option::next
struct route_ipv6_option * next
Definition: route.h:100
show_routes
void show_routes(int msglev)
Definition: route.c:3209
route_option::netmask
const char * netmask
Definition: route.h:78
route_special_addr::remote_host
in_addr_t remote_host
Definition: route.h:69
route_ipv6_list::routes_ipv6
struct route_ipv6 * routes_ipv6
Definition: route.h:229
route_special_addr
Definition: route.h:60
netmask_to_netbits
bool netmask_to_netbits(const in_addr_t network, const in_addr_t netmask, int *netbits)
Definition: route.c:3928
misc.h
get_default_gateway
void get_default_gateway(struct route_gateway_info *rgi, openvpn_net_ctx_t *ctx)
Definition: route.c:2680
route_ipv6_option::metric
const char * metric
Definition: route.h:103
add_route_ipv6_to_option_list
void add_route_ipv6_to_option_list(struct route_ipv6_option_list *l, const char *prefix, const char *gateway, const char *metric)
Definition: route.c:528
route_ipv4::next
struct route_ipv4 * next
Definition: route.h:116
netmask_to_netbits2
int netmask_to_netbits2(in_addr_t netmask)
Definition: route.c:3959
route_gateway_address::addr
in_addr_t addr
Definition: route.h:142
RGI_N_ADDRESSES
#define RGI_N_ADDRESSES
Definition: route.h:201
route_ipv6_list::default_metric
int default_metric
Definition: route.h:225
route_gateway_info::flags
unsigned int flags
Definition: route.h:153
route_gateway_info::hwaddr
uint8_t hwaddr[6]
Definition: route.h:163
route_ipv6_list::remote_host_ipv6
struct in6_addr remote_host_ipv6
Definition: route.h:224
route_ipv6_list::remote_endpoint_ipv6
struct in6_addr remote_endpoint_ipv6
Definition: route.h:223
route_gateway_info::gateway
struct route_gateway_address gateway
Definition: route.h:166
route_ipv6_option::prefix
const char * prefix
Definition: route.h:101
route_option_list::gc
struct gc_arena * gc
Definition: route.h:96
route_ipv6_list::iflags
unsigned int iflags
Definition: route.h:220
IPV4_NETMASK_HOST
#define IPV4_NETMASK_HOST
Definition: basic.h:35
route_special_addr::flags
unsigned int flags
Definition: route.h:66
route_ipv6::next
struct route_ipv6 * next
Definition: route.h:126
iface
static char * iface
Definition: test_networking.c:7
add_route_ipv6
bool add_route_ipv6(struct route_ipv6 *r, const struct tuntap *tt, unsigned int flags, const struct env_set *es, openvpn_net_ctx_t *ctx)
Definition: route.c:1899
delete_routes
void delete_routes(struct route_list *rl, struct route_ipv6_list *rl6, const struct tuntap *tt, unsigned int flags, const struct env_set *es, openvpn_net_ctx_t *ctx)
Definition: route.c:1254
new_route_option_list
struct route_option_list * new_route_option_list(struct gc_arena *a)
Definition: route.c:130
route_ipv6_clear_host_bits
void route_ipv6_clear_host_bits(struct route_ipv6 *r6)
Definition: route.c:1876
gc_arena
Garbage collection arena used to keep track of dynamically allocated memory.
Definition: buffer.h:116
iroute_ipv6::next
struct iroute_ipv6 * next
Definition: route.h:243
clone_route_ipv6_option_list
struct route_ipv6_option_list * clone_route_ipv6_option_list(const struct route_ipv6_option_list *src, struct gc_arena *a)
Definition: route.c:164
route_option
Definition: route.h:75
env_set
Definition: env_set.h:42
route_ipv6::network
struct in6_addr network
Definition: route.h:128
block_local_needed
bool block_local_needed(const struct route_list *rl)
Get the decision whether to block traffic to local networks while the VPN is connected.
Definition: route.c:621
route_ipv6_gateway_info::hwaddr
uint8_t hwaddr[6]
Definition: route.h:195
setenv_routes
void setenv_routes(struct env_set *es, const struct route_list *rl)
Definition: route.c:1449
delete_route_ipv6
void delete_route_ipv6(const struct route_ipv6 *r, const struct tuntap *tt, unsigned int flags, const struct env_set *es, openvpn_net_ctx_t *ctx)
Definition: route.c:2342
route_list::rgi
struct route_gateway_info rgi
Definition: route.h:213
basic.h
route_ipv6_list::gc
struct gc_arena gc
Definition: route.h:230
route_ipv6_option
Definition: route.h:99
route_special_addr::default_metric
int default_metric
Definition: route.h:72
netbits_to_netmask
static in_addr_t netbits_to_netmask(const int netbits)
Definition: route.h:379
route_list::flags
unsigned int flags
Definition: route.h:214
route_gateway_address::netmask
in_addr_t netmask
Definition: route.h:143
iroute_ipv6
Definition: route.h:240
route_option_list::routes
struct route_option * routes
Definition: route.h:95
route_ipv4
Definition: route.h:112
route_list::spec
struct route_special_addr spec
Definition: route.h:212
route_ipv4::metric
int metric
Definition: route.h:122
route_option::network
const char * network
Definition: route.h:77
tuntap
Definition: tun.h:171
RL_DID_REDIRECT_DEFAULT_GATEWAY
#define RL_DID_REDIRECT_DEFAULT_GATEWAY
Definition: route.h:207
route_ipv6_list::rgi6
struct route_ipv6_gateway_info rgi6
Definition: route.h:227
route_ipv6_option::gateway
const char * gateway
Definition: route.h:102
init_route_ipv6_list
bool init_route_ipv6_list(struct route_ipv6_list *rl6, const struct route_ipv6_option_list *opt6, const char *remote_endpoint, int default_metric, const struct in6_addr *remote_host, struct env_set *es, openvpn_net_ctx_t *ctx)
Definition: route.c:790
route_ipv6_list::flags
unsigned int flags
Definition: route.h:228
route_ipv6_option_list
Definition: route.h:106
route_option_list::flags
unsigned int flags
Definition: route.h:94
route_ipv4::gateway
in_addr_t gateway
Definition: route.h:121
route_gateway_info::adapter_index
DWORD adapter_index
Definition: route.h:157
route_ipv4::option
const struct route_option * option
Definition: route.h:118
route_ipv6::netbits
unsigned int netbits
Definition: route.h:129
route_list_add_vpn_gateway
void route_list_add_vpn_gateway(struct route_list *rl, struct env_set *es, const in_addr_t addr)
Definition: route.c:557
clone_route_option_list
struct route_option_list * clone_route_option_list(const struct route_option_list *src, struct gc_arena *a)
Definition: route.c:155
route_ipv4::network
in_addr_t network
Definition: route.h:119
route_bypass::bypass
in_addr_t bypass[N_ROUTE_BYPASS]
Definition: route.h:57
route_special_addr::remote_endpoint
in_addr_t remote_endpoint
Definition: route.h:68
route_option::next
struct route_option * next
Definition: route.h:76
route_list::gc
struct gc_arena gc
Definition: route.h:216
route_ipv6_list::spec_flags
unsigned int spec_flags
Definition: route.h:222
BOOL_CAST
#define BOOL_CAST(x)
Definition: basic.h:27
route_ipv6_option_list::gc
struct gc_arena * gc
Definition: route.h:109
route_ipv4::flags
unsigned int flags
Definition: route.h:117