Lines Matching refs:peer
289 /* connect to peer */
311 struct addrinfo ai, *peer = NULL, *local = NULL;
318 /* lookup peer addr */
339 if (0 != (rc = getaddrinfo(addr, port, &ai, &peer))) {
345 fprintf(stderr, "%s: peer (%s:%s)\n", __FUNCTION__, addr, port);
346 inet_print_addrinfo(__FUNCTION__, peer);
352 ai.ai_family = peer->ai_family;
374 sock = qemu_socket(peer->ai_family, peer->ai_socktype, peer->ai_protocol);
377 inet_strfamily(peer->ai_family), strerror(errno));
395 /* connect to peer */
396 if (getnameinfo((struct sockaddr*)peer->ai_addr, peer->ai_addrlen,
402 if (connect(sock,peer->ai_addr,peer->ai_addrlen) < 0) {
404 inet_strfamily(peer->ai_family),
405 peer->ai_canonname, uaddr, uport, strerror(errno));
410 freeaddrinfo(peer);
418 if (peer)
419 freeaddrinfo(peer);