Lines Matching refs:ai
511 struct addrinfo *ai, *ai0; in iperf_sctp_bindx() local
551 if (getaddrinfo(xbe0->name, servname, &hints, &xbe0->ai) != 0) { in iperf_sctp_bindx()
557 ai = xbe0->ai; in iperf_sctp_bindx()
558 if (domain != AF_UNSPEC && domain != ai->ai_family) { in iperf_sctp_bindx()
563 if (bind(s, (struct sockaddr *)ai->ai_addr, ai->ai_addrlen) < 0) { in iperf_sctp_bindx()
573 sa = (struct sockaddr *)ai->ai_addr; in iperf_sctp_bindx()
575 sin = (struct sockaddr_in *)ai->ai_addr; in iperf_sctp_bindx()
578 sin6 = (struct sockaddr_in6 *)ai->ai_addr; in iperf_sctp_bindx()
593 if (xbe->ai != NULL) in iperf_sctp_bindx()
594 freeaddrinfo(xbe->ai); in iperf_sctp_bindx()
595 if (getaddrinfo(xbe->name, servname, &hints, &xbe->ai) != 0) { in iperf_sctp_bindx()
600 ai0 = xbe->ai; in iperf_sctp_bindx()
601 for (ai = ai0; ai; ai = ai->ai_next) { in iperf_sctp_bindx()
602 if (domain != AF_UNSPEC && domain != ai->ai_family) in iperf_sctp_bindx()
604 xaddrlen += ai->ai_addrlen; in iperf_sctp_bindx()
618 ai0 = xbe->ai; in iperf_sctp_bindx()
619 for (ai = ai0; ai; ai = ai->ai_next) { in iperf_sctp_bindx()
620 if (domain != AF_UNSPEC && domain != ai->ai_family) in iperf_sctp_bindx()
622 memcpy(bp, ai->ai_addr, ai->ai_addrlen); in iperf_sctp_bindx()
623 bp += ai->ai_addrlen; in iperf_sctp_bindx()
646 if (xbe->ai) { in iperf_sctp_bindx()
647 freeaddrinfo(xbe->ai); in iperf_sctp_bindx()
648 xbe->ai = NULL; in iperf_sctp_bindx()