Home | History | Annotate | Download | only in qemu

Lines Matching refs:sock

239     int sock,rc;
281 sock = qemu_socket(e->ai_family, e->ai_socktype, e->ai_protocol);
282 if (sock < 0) {
287 setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(void*)&on,sizeof(on));
290 if (connect(sock,e->ai_addr,e->ai_addrlen) < 0) {
295 closesocket(sock);
303 return sock;
316 int sock = -1, rc;
374 sock = qemu_socket(peer->ai_family, peer->ai_socktype, peer->ai_protocol);
375 if (sock < 0) {
380 setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(void*)&on,sizeof(on));
389 if (bind(sock, local->ai_addr, local->ai_addrlen) < 0) {
402 if (connect(sock,peer->ai_addr,peer->ai_addrlen) < 0) {
411 return sock;
414 if (-1 != sock)
415 closesocket(sock);
503 int sock = -1;
507 sock = inet_listen_opts(opts, port_offset);
508 if (sock != -1 && ostr) {
524 return sock;
530 int sock = -1;
534 sock = inet_connect_opts(opts);
536 return sock;
545 int sock, fd;
547 sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
548 if (sock < 0) {
573 if (bind(sock, (struct sockaddr*) &un, sizeof(un)) < 0) {
577 if (listen(sock, 1) < 0) {
584 return sock;
587 closesocket(sock);
595 int sock;
602 sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
603 if (sock < 0) {
611 if (connect(sock, (struct sockaddr*) &un, sizeof(un)) < 0) {
618 return sock;
626 int sock, len;
643 sock = unix_listen_opts(opts);
645 if (sock != -1 && ostr)
648 return sock;
654 int sock;
658 sock = unix_connect_opts(opts);
660 return sock;