Lines Matching full:aio
642 struct hp_order *aio; in _hpreorder() local
672 if ((aio = malloc(sizeof(*aio) * n)) == NULL) in _hpreorder()
674 memset(aio, 0, sizeof(*aio) * n); in _hpreorder()
680 free(aio); in _hpreorder()
686 aio[i].aio_h_addr = ap; in _hpreorder()
687 sa = &aio[i].aio_sa; in _hpreorder()
711 aio[i].aio_dstscope = gai_addr2scopetype(sa); in _hpreorder()
712 aio[i].aio_dstpolicy = match_addrselectpolicy(sa, &policyhead); in _hpreorder()
713 set_source(&aio[i], &policyhead); in _hpreorder()
714 aio[i].aio_initial_sequence = i; in _hpreorder()
718 qsort(aio, n, sizeof(*aio), comp_dst); in _hpreorder()
722 hp->h_addr_list[i] = aio[i].aio_h_addr; in _hpreorder()
725 free(aio); in _hpreorder()
846 set_source(struct hp_order *aio, struct policyhead *ph) in set_source() argument
848 struct sockaddr_storage ss = aio->aio_un.aiou_ss; in set_source()
853 aio->aio_srcsa.sa_family = AF_UNSPEC; in set_source()
854 aio->aio_srcscope = -1; in set_source()
876 if (_getsockname(s, &aio->aio_srcsa, &srclen) < 0) { in set_source()
877 aio->aio_srcsa.sa_family = AF_UNSPEC; in set_source()
880 aio->aio_srcscope = gai_addr2scopetype(&aio->aio_srcsa); in set_source()
881 aio->aio_srcpolicy = match_addrselectpolicy(&aio->aio_srcsa, ph); in set_source()
882 aio->aio_matchlen = matchlen(&aio->aio_srcsa, (struct sockaddr *)&ss); in set_source()
893 aio->aio_srcflag |= AIO_SRCFLAG_DEPRECATED; in set_source()