Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route.h
Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Lines | if ((ro)->ro_lle != NULL) { \ | ||||
(ro)->ro_lle = NULL; \ | (ro)->ro_lle = NULL; \ | ||||
} \ | } \ | ||||
if ((ro)->ro_nh != NULL) { \ | if ((ro)->ro_nh != NULL) { \ | ||||
NH_FREE((ro)->ro_nh); \ | NH_FREE((ro)->ro_nh); \ | ||||
(ro)->ro_nh = NULL; \ | (ro)->ro_nh = NULL; \ | ||||
} \ | } \ | ||||
} while (0) | } while (0) | ||||
#define RO_GET_FAMILY(ro, dst) ((ro) != NULL && \ | |||||
(ro)->ro_flags & RT_HAS_GW \ | |||||
? (ro)->ro_dst.sa_family : (dst)->sa_family) | |||||
/* | /* | ||||
* Validate a cached route based on a supplied cookie. If there is an | * Validate a cached route based on a supplied cookie. If there is an | ||||
* out-of-date cache, simply free it. Update the generation number | * out-of-date cache, simply free it. Update the generation number | ||||
* for the new allocation | * for the new allocation | ||||
*/ | */ | ||||
#define NH_VALIDATE(ro, cookiep, fibnum) do { \ | #define NH_VALIDATE(ro, cookiep, fibnum) do { \ | ||||
rt_gen_t cookie = RT_GEN(fibnum, (ro)->ro_dst.sa_family); \ | rt_gen_t cookie = RT_GEN(fibnum, (ro)->ro_dst.sa_family); \ | ||||
if (*(cookiep) != cookie) { \ | if (*(cookiep) != cookie) { \ | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |