Lines Matching refs:lifetime_usec
41 .lifetime_usec = RADV_DEFAULT_ROUTER_LIFETIME_USEC, in sd_radv_new()
132 static bool router_lifetime_is_valid(usec_t lifetime_usec) { in router_lifetime_is_valid() argument
133 return lifetime_usec == 0 || in router_lifetime_is_valid()
134 (lifetime_usec >= RADV_MIN_ROUTER_LIFETIME_USEC && in router_lifetime_is_valid()
135 lifetime_usec <= RADV_MAX_ROUTER_LIFETIME_USEC); in router_lifetime_is_valid()
150 static int radv_send(sd_radv *ra, const struct in6_addr *dst, usec_t lifetime_usec) { in radv_send() argument
182 assert(router_lifetime_is_valid(lifetime_usec)); in radv_send()
195 adv.nd_ra_router_lifetime = htobe16(DIV_ROUND_UP(lifetime_usec, USEC_PER_SEC)); in radv_send()
228 rt->lifetime_usec)); in radv_send()
305 r = radv_send(ra, &src, ra->lifetime_usec); in radv_recv()
322 assert(router_lifetime_is_valid(ra->lifetime_usec)); in radv_timeout()
328 r = radv_send(ra, NULL, ra->lifetime_usec); in radv_timeout()
340 if (ra->lifetime_usec > 0) in radv_timeout()
341 max_timeout = MIN(max_timeout, ra->lifetime_usec); in radv_timeout()
518 int sd_radv_set_router_lifetime(sd_radv *ra, uint64_t lifetime_usec) { in sd_radv_set_router_lifetime() argument
524 if (!router_lifetime_is_valid(lifetime_usec)) in sd_radv_set_router_lifetime()
529 if (lifetime_usec == 0 && in sd_radv_set_router_lifetime()
533 ra->lifetime_usec = lifetime_usec; in sd_radv_set_router_lifetime()
569 if (ra->lifetime_usec == 0 && preference != SD_NDISC_PREFERENCE_MEDIUM) in sd_radv_set_preference()
647 r = radv_send(ra, NULL, ra->lifetime_usec); in sd_radv_add_prefix()
729 FORMAT_TIMESPAN(p->lifetime_usec, USEC_PER_SEC)); in sd_radv_add_route_prefix()
747 r = radv_send(ra, NULL, ra->lifetime_usec); in sd_radv_add_route_prefix()
929 int sd_radv_prefix_set_valid_lifetime(sd_radv_prefix *p, uint64_t lifetime_usec, uint64_t valid_unt… in sd_radv_prefix_set_valid_lifetime() argument
932 p->lifetime_valid_usec = lifetime_usec; in sd_radv_prefix_set_valid_lifetime()
938 int sd_radv_prefix_set_preferred_lifetime(sd_radv_prefix *p, uint64_t lifetime_usec, uint64_t valid… in sd_radv_prefix_set_preferred_lifetime() argument
941 p->lifetime_preferred_usec = lifetime_usec; in sd_radv_prefix_set_preferred_lifetime()
963 .lifetime_usec = RADV_DEFAULT_VALID_LIFETIME_USEC, in sd_radv_route_prefix_new()
994 int sd_radv_route_prefix_set_lifetime(sd_radv_route_prefix *p, uint64_t lifetime_usec, uint64_t val… in sd_radv_route_prefix_set_lifetime() argument
997 p->lifetime_usec = lifetime_usec; in sd_radv_route_prefix_set_lifetime()