Searched refs:nth (Results 1 – 3 of 3) sorted by relevance
/systemd-251/src/basic/ |
D | in-addr-util.c | 251 int in_addr_prefix_nth(int family, union in_addr_union *u, unsigned prefixlen, uint64_t nth) { in in_addr_prefix_nth() argument 265 t = nth << (32 - prefixlen); in in_addr_prefix_nth() 294 t = u->in6.s6_addr[j] + ((nth & 0xff) << (8 - (prefixlen - p))); in in_addr_prefix_nth() 295 nth >>= prefixlen - p; in in_addr_prefix_nth() 297 t = u->in6.s6_addr[j] + (nth & 0xff) + overflow; in in_addr_prefix_nth() 298 nth >>= 8; in in_addr_prefix_nth() 305 if (overflow || nth != 0) in in_addr_prefix_nth()
|
D | in-addr-util.h | 63 int in_addr_prefix_nth(int family, union in_addr_union *u, unsigned prefixlen, uint64_t nth);
|
/systemd-251/src/test/ |
D | test-in-addr-util.c | 266 static void test_in_addr_prefix_nth_one(unsigned f, const char *before, unsigned pl, uint64_t nth, … in test_in_addr_prefix_nth_one() argument 269 log_debug("/* %s(%s, prefixlen=%u, nth=%"PRIu64") */", __func__, before, pl, nth); in test_in_addr_prefix_nth_one() 274 assert_se((in_addr_prefix_nth(f, &t, pl, nth) >= 0) == !!after); in test_in_addr_prefix_nth_one()
|