Home
last modified time | relevance | path

Searched refs:ai (Results 1 – 12 of 12) sorted by relevance

/openssh-portable/openbsd-compat/
H A Dfake-rfc2553.c114 for(; ai != NULL;) { in freeaddrinfo()
115 next = ai->ai_next; in freeaddrinfo()
116 free(ai); in freeaddrinfo()
117 ai = next; in freeaddrinfo()
126 struct addrinfo *ai; in malloc_ai() local
128 ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in)); in malloc_ai()
129 if (ai == NULL) in malloc_ai()
132 memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in)); in malloc_ai()
134 ai->ai_addr = (struct sockaddr *)(ai + 1); in malloc_ai()
137 ai->ai_addr->sa_family = ai->ai_family = AF_INET; in malloc_ai()
[all …]
/openssh-portable/
H A Daddrmatch.c208 struct addrinfo hints, *ai = NULL; in addr_pton() local
214 if (p == NULL || getaddrinfo(p, NULL, &hints, &ai) != 0) in addr_pton()
216 if (ai == NULL || ai->ai_addr == NULL) in addr_pton()
218 if (n != NULL && addr_sa_to_xaddr(ai->ai_addr, ai->ai_addrlen, n) == -1) in addr_pton()
223 if (ai != NULL) in addr_pton()
224 freeaddrinfo(ai); in addr_pton()
H A Dsshconnect.c365 ssh_create_socket(struct addrinfo *ai) in ssh_create_socket() argument
376 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); in ssh_create_socket()
389 hints.ai_family = ai->ai_family; in ssh_create_socket()
466 struct addrinfo *ai; in ssh_connect_direct() local
482 for (ai = aitop; ai; ai = ai->ai_next) { in ssh_connect_direct()
483 if (ai->ai_family != AF_INET && in ssh_connect_direct()
484 ai->ai_family != AF_INET6) { in ssh_connect_direct()
488 if (getnameinfo(ai->ai_addr, ai->ai_addrlen, in ssh_connect_direct()
500 sock = ssh_create_socket(ai); in ssh_connect_direct()
508 if (timeout_connect(sock, ai->ai_addr, ai->ai_addrlen, in ssh_connect_direct()
[all …]
H A Daudit-bsm.c137 struct addrinfo *ai; in aug_get_machine() local
142 if ((r = getaddrinfo(host, NULL, NULL, &ai)) != 0) { in aug_get_machine()
148 switch (ai->ai_family) { in aug_get_machine()
150 in4 = (struct sockaddr_in *)ai->ai_addr; in aug_get_machine()
156 in6 = (struct sockaddr_in6 *)ai->ai_addr; in aug_get_machine()
163 host, ai->ai_family); in aug_get_machine()
166 freeaddrinfo(ai); in aug_get_machine()
H A Dchannels.c3435 for (ai = aitop; ai; ai = ai->ai_next) {
3464 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
4192 for (; cctx->ai; cctx->ai = cctx->ai->ai_next) {
4236 cctx->ai = cctx->ai->ai_next;
4283 ai = xmalloc(sizeof(*ai) + sizeof(*sunaddr));
4284 memset(ai, 0, sizeof(*ai) + sizeof(*sunaddr));
4285 ai->ai_addr = (struct sockaddr *)(ai + 1);
4613 for (ai = aitop; ai; ai = ai->ai_next) {
4617 sock = socket(ai->ai_family, ai->ai_socktype,
4832 for (ai = aitop; ai; ai = ai->ai_next) {
[all …]
H A Dssh-keyscan.c351 struct addrinfo hints, *ai, *aitop; in tcpconnect() local
363 for (ai = aitop; ai; ai = ai->ai_next) { in tcpconnect()
364 s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); in tcpconnect()
371 if (connect(s, ai->ai_addr, ai->ai_addrlen) == -1 && in tcpconnect()
H A Ddns.c180 struct addrinfo hints, *ai; in is_numeric_hostname() local
195 if (getaddrinfo(hostname, NULL, &hints, &ai) == 0) { in is_numeric_hostname()
196 freeaddrinfo(ai); in is_numeric_hostname()
H A Dauth.c742 struct addrinfo hints, *ai, *aitop; in remote_hostname() local
775 if (getaddrinfo(name, NULL, &hints, &ai) == 0) { in remote_hostname()
778 freeaddrinfo(ai); in remote_hostname()
803 for (ai = aitop; ai; ai = ai->ai_next) { in remote_hostname()
804 if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2, in remote_hostname()
811 if (ai == NULL) { in remote_hostname()
H A Dsshd.c1001 struct addrinfo *ai; local
1004 for (ai = la->addrs; ai; ai = ai->ai_next) {
1005 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
1010 if ((ret = getnameinfo(ai->ai_addr, ai->ai_addrlen,
1018 listen_sock = socket(ai->ai_family, ai->ai_socktype,
1019 ai->ai_protocol);
1043 if (ai->ai_family == AF_INET6)
1049 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) == -1) {
H A Dservconf.c784 struct addrinfo hints, *ai, *aitop; in add_one_listen_addr() local
820 for (ai = aitop; ai->ai_next; ai = ai->ai_next) in add_one_listen_addr()
822 ai->ai_next = options->listen_addrs[i].addrs; in add_one_listen_addr()
2697 struct addrinfo *ai; in format_listen_addrs() local
2706 for (ai = la->addrs; ai; ai = ai->ai_next) { in format_listen_addrs()
2707 if ((r = getnameinfo(ai->ai_addr, ai->ai_addrlen, addr, in format_listen_addrs()
2714 if (ai->ai_family == AF_INET6) { in format_listen_addrs()
H A Dchannels.h102 struct addrinfo *ai, *aitop; member
H A Dconfigure.ac2332 struct addrinfo *gai_ai, *ai, hints;
2346 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
2347 if (ai->ai_family != AF_INET6)
2350 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
2363 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
2366 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
2400 struct addrinfo *gai_ai, *ai, hints;
2414 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
2415 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
2418 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
[all …]

Completed in 76 milliseconds