Lines Matching refs:addr
103 static int addr_expand(unsigned char *addr, in addr_expand() argument
110 memcpy(addr, bs->data, bs->length); in addr_expand()
115 addr[bs->length - 1] &= ~mask; in addr_expand()
117 addr[bs->length - 1] |= mask; in addr_expand()
120 memset(addr + bs->length, fill, length - bs->length); in addr_expand()
136 unsigned char addr[ADDR_RAW_BUF_LEN]; in i2r_address() local
143 if (!addr_expand(addr, bs, 4, fill)) in i2r_address()
145 BIO_printf(out, "%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]); in i2r_address()
148 if (!addr_expand(addr, bs, 16, fill)) in i2r_address()
150 for (n = 16; n > 1 && addr[n - 1] == 0x00 && addr[n - 2] == 0x00; in i2r_address()
153 BIO_printf(out, "%x%s", (addr[i] << 8) | addr[i + 1], in i2r_address()
208 const IPAddrBlocks *addr = ext; in i2r_IPAddrBlocks() local
211 for (i = 0; i < sk_IPAddressFamily_num(addr); i++) { in i2r_IPAddrBlocks()
212 IPAddressFamily *f = sk_IPAddressFamily_value(addr, i); in i2r_IPAddrBlocks()
406 static int make_addressPrefix(IPAddressOrRange **result, unsigned char *addr, in make_addressPrefix() argument
420 if (!ASN1_BIT_STRING_set(aor->u.addressPrefix, addr, bytelen)) in make_addressPrefix()
501 static IPAddressFamily *make_IPAddressFamily(IPAddrBlocks *addr, in make_IPAddressFamily() argument
519 for (i = 0; i < sk_IPAddressFamily_num(addr); i++) { in make_IPAddressFamily()
520 f = sk_IPAddressFamily_value(addr, i); in make_IPAddressFamily()
536 if (!sk_IPAddressFamily_push(addr, f)) in make_IPAddressFamily()
549 int X509v3_addr_add_inherit(IPAddrBlocks *addr, in X509v3_addr_add_inherit() argument
552 IPAddressFamily *f = make_IPAddressFamily(addr, afi, safi); in X509v3_addr_add_inherit()
572 static IPAddressOrRanges *make_prefix_or_range(IPAddrBlocks *addr, in make_prefix_or_range() argument
576 IPAddressFamily *f = make_IPAddressFamily(addr, afi, safi); in make_prefix_or_range()
606 int X509v3_addr_add_prefix(IPAddrBlocks *addr, in X509v3_addr_add_prefix() argument
611 IPAddressOrRanges *aors = make_prefix_or_range(addr, afi, safi); in X509v3_addr_add_prefix()
626 int X509v3_addr_add_range(IPAddrBlocks *addr, in X509v3_addr_add_range() argument
631 IPAddressOrRanges *aors = make_prefix_or_range(addr, afi, safi); in X509v3_addr_add_range()
716 int X509v3_addr_is_canonical(IPAddrBlocks *addr) in X509v3_addr_is_canonical() argument
726 if (addr == NULL) in X509v3_addr_is_canonical()
732 for (i = 0; i < sk_IPAddressFamily_num(addr) - 1; i++) { in X509v3_addr_is_canonical()
733 const IPAddressFamily *a = sk_IPAddressFamily_value(addr, i); in X509v3_addr_is_canonical()
734 const IPAddressFamily *b = sk_IPAddressFamily_value(addr, i + 1); in X509v3_addr_is_canonical()
746 for (i = 0; i < sk_IPAddressFamily_num(addr); i++) { in X509v3_addr_is_canonical()
747 IPAddressFamily *f = sk_IPAddressFamily_value(addr, i); in X509v3_addr_is_canonical()
911 int X509v3_addr_canonize(IPAddrBlocks *addr) in X509v3_addr_canonize() argument
915 for (i = 0; i < sk_IPAddressFamily_num(addr); i++) { in X509v3_addr_canonize()
916 IPAddressFamily *f = sk_IPAddressFamily_value(addr, i); in X509v3_addr_canonize()
927 (void)sk_IPAddressFamily_set_cmp_func(addr, IPAddressFamily_cmp); in X509v3_addr_canonize()
928 sk_IPAddressFamily_sort(addr); in X509v3_addr_canonize()
929 if (!ossl_assert(X509v3_addr_is_canonical(addr))) in X509v3_addr_canonize()
943 IPAddrBlocks *addr = NULL; in v2i_IPAddrBlocks() local
947 if ((addr = sk_IPAddressFamily_new(IPAddressFamily_cmp)) == NULL) { in v2i_IPAddrBlocks()
1015 if (!X509v3_addr_add_inherit(addr, afi, safi)) { in v2i_IPAddrBlocks()
1047 if (!X509v3_addr_add_prefix(addr, afi, safi, min, prefixlen)) { in v2i_IPAddrBlocks()
1070 if (!X509v3_addr_add_range(addr, afi, safi, min, max)) { in v2i_IPAddrBlocks()
1076 if (!X509v3_addr_add_prefix(addr, afi, safi, min, length * 8)) { in v2i_IPAddrBlocks()
1094 if (!X509v3_addr_canonize(addr)) in v2i_IPAddrBlocks()
1096 return addr; in v2i_IPAddrBlocks()
1100 sk_IPAddressFamily_pop_free(addr, IPAddressFamily_free); in v2i_IPAddrBlocks()
1124 int X509v3_addr_inherits(IPAddrBlocks *addr) in X509v3_addr_inherits() argument
1128 if (addr == NULL) in X509v3_addr_inherits()
1130 for (i = 0; i < sk_IPAddressFamily_num(addr); i++) { in X509v3_addr_inherits()
1131 IPAddressFamily *f = sk_IPAddressFamily_value(addr, i); in X509v3_addr_inherits()