Lines Matching refs:ai
70 struct addrinfo *ai;
104 ai = av_mallocz(sizeof(struct addrinfo));
105 if (!ai) {
110 *res = ai;
111 ai->ai_family = AF_INET;
112 ai->ai_socktype = hints ? hints->ai_socktype : 0;
113 switch (ai->ai_socktype) {
115 ai->ai_protocol = IPPROTO_TCP;
118 ai->ai_protocol = IPPROTO_UDP;
121 ai->ai_protocol = 0;
125 ai->ai_addr = (struct sockaddr *)sin;
126 ai->ai_addrlen = sizeof(struct sockaddr_in);
128 ai->ai_canonname = h ? av_strdup(h->h_name) : NULL;
130 ai->ai_next = NULL;