Home
last modified time | relevance | path

Searched refs:cidr (Results 1 – 5 of 5) sorted by relevance

/dragonfly/sys/net/wg/selftest/
H A Dallowedips.c120 memset(&mask->in6, 0xff, cidr / 8); in horrible_cidr_to_mask()
121 if ((n = cidr % 32) != 0) in horrible_cidr_to_mask()
122 mask->ip6[cidr / 32] = in horrible_cidr_to_mask()
218 horrible_cidr_to_mask(cidr, &node->mask); in horrible_allowedips_insert_v4()
239 horrible_cidr_to_mask(cidr, &node->mask); in horrible_allowedips_insert_v6()
329 cidr = karc4random_uniform(32) + 1; in wg_allowedips_randomized_test()
354 cidr = karc4random_uniform(32) + 1; in wg_allowedips_randomized_test()
397 cidr = karc4random_uniform(128) + 1; in wg_allowedips_randomized_test()
422 cidr = karc4random_uniform(128) + 1; in wg_allowedips_randomized_test()
732 uint8_t cidr; in wg_allowedips_lookup_test() local
[all …]
/dragonfly/sbin/ifconfig/
H A Daf_inet.c93 int cidr = 32; in in_status() local
98 cidr--; in in_status()
99 if (cidr == 0) in in_status()
102 printf("/%d", cidr); in in_status()
/dragonfly/contrib/dhcpcd/src/
H A Dipv4.c72 uint8_t cidr = 0; in inet_ntocidr() local
76 cidr++; in inet_ntocidr()
79 return cidr; in inet_ntocidr()
83 inet_cidrtoaddr(int cidr, struct in_addr *addr) in inet_cidrtoaddr() argument
87 if (cidr < 1 || cidr > 32) { in inet_cidrtoaddr()
91 ocets = (cidr + 7) / NBBY; in inet_cidrtoaddr()
97 (256 - (1 << (32 - cidr) % NBBY)), 1); in inet_cidrtoaddr()
H A Ddhcp.c350 uint8_t cidr; in print_rfc3442() local
365 cidr = *p++; in print_rfc3442()
366 if (cidr > 32) { in print_rfc3442()
370 ocets = (size_t)(cidr + 7) / NBBY; in print_rfc3442()
381 if (fprintf(fp, "%s/%d", inet_ntoa(addr), cidr) == -1) in print_rfc3442()
402 uint8_t cidr; in decode_rfc3442_rt() local
417 cidr = *p++; in decode_rfc3442_rt()
418 if (cidr > 32) { in decode_rfc3442_rt()
423 ocets = (size_t)(cidr + 7) / NBBY; in decode_rfc3442_rt()
437 netmask.s_addr = htonl(~0U << (32 - cidr)); in decode_rfc3442_rt()
/dragonfly/sys/net/wg/
H A Dif_wg.c766 const void *addr, uint8_t cidr) in wg_aip_add() argument
779 if (cidr > 32) in wg_aip_add()
780 cidr = 32; in wg_aip_add()
784 htonl(~((1LL << (32 - cidr)) - 1) & 0xffffffff); in wg_aip_add()
791 if (cidr > 128) in wg_aip_add()
792 cidr = 128; in wg_aip_add()
795 in6_prefixlen2mask(&aip->a_mask.in6, cidr); in wg_aip_add()