Lines Matching refs:rc

286   int rc;  in socksconnect()  local
297 rc = connect(sock, &me.sa, sizeof(me.sa4)); in socksconnect()
299 if(rc) { in socksconnect()
311 ssize_t rc) in socks4() argument
322 if(rc < 9) { in socks4()
323 logmsg("SOCKS4 connect message too short: %zd", rc); in socks4()
345 rc = (send)(fd, (char *)response, 8, 0); in socks4()
346 if(rc != 8) { in socks4()
350 logmsg("Sent %zd bytes", rc); in socks4()
351 loghex(response, rc); in socks4()
367 ssize_t rc; in sockit() local
378 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
379 if(rc <= 0) { in sockit()
380 logmsg("SOCKS identifier message missing, recv returned %zd", rc); in sockit()
384 logmsg("READ %zd bytes", rc); in sockit()
385 loghex(buffer, rc); in sockit()
388 return socks4(fd, buffer, rc); in sockit()
390 if(rc < 3) { in sockit()
391 logmsg("SOCKS5 identifier message too short: %zd", rc); in sockit()
407 if(rc != (buffer[SOCKS5_NMETHODS] + 2)) { in sockit()
408 logmsg("Expected %d bytes, got %zd", buffer[SOCKS5_NMETHODS] + 2, rc); in sockit()
416 rc = (send)(fd, (char *)response, 2, 0); in sockit()
417 if(rc != 2) { in sockit()
421 logmsg("Sent %zd bytes", rc); in sockit()
422 loghex(response, rc); in sockit()
425 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
426 if(rc <= 0) { in sockit()
427 logmsg("SOCKS5 request or auth message missing, recv returned %zd", rc); in sockit()
431 logmsg("READ %zd bytes", rc); in sockit()
432 loghex(buffer, rc); in sockit()
445 if(rc < 5) { in sockit()
446 logmsg("Too short auth input: %zd", rc); in sockit()
454 if(rc < 4 + ulen) { in sockit()
455 logmsg("Too short packet for username: %zd", rc); in sockit()
459 if(rc < 3 + ulen + plen) { in sockit()
460 logmsg("Too short packet for ulen %d plen %d: %zd", ulen, plen, rc); in sockit()
473 rc = (send)(fd, (char *)response, 2, 0); in sockit()
474 if(rc != 2) { in sockit()
478 logmsg("Sent %zd bytes", rc); in sockit()
479 loghex(response, rc); in sockit()
484 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
485 if(rc <= 0) { in sockit()
486 logmsg("SOCKS5 request message missing, recv returned %zd", rc); in sockit()
490 logmsg("READ %zd bytes", rc); in sockit()
491 loghex(buffer, rc); in sockit()
493 if(rc < 6) { in sockit()
494 logmsg("Too short for request: %zd", rc); in sockit()
538 if(rc < (4 + len + 2)) { in sockit()
539 logmsg("Request too short: %zd, expected %d", rc, 4 + len + 2); in sockit()
620 rc = (send)(fd, (char *)response, (SEND_TYPE_ARG3)(len + 6), 0); in sockit()
621 if(rc != (len + 6)) { in sockit()
625 logmsg("Sent %zd bytes", rc); in sockit()
626 loghex(response, rc); in sockit()
710 ssize_t rc; in incoming() local
737 rc = select(maxfd + 1, &fds_read, &fds_write, &fds_err, NULL); in incoming()
742 } while((rc == -1) && ((error = errno) == EINTR)); in incoming()
744 if(rc < 0) { in incoming()
811 int rc; in sockdaemon() local
821 rc = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, in sockdaemon()
823 if(rc) { in sockdaemon()
828 rc = wait_ms(delay); in sockdaemon()
829 if(rc) { in sockdaemon()
846 } while(rc && maxretr--); in sockdaemon()
848 if(rc) { in sockdaemon()
863 rc = bind(sock, &listener.sa, sizeof(listener.sa4)); in sockdaemon()
871 rc = bind(sock, &listener.sa, sizeof(listener.sa6)); in sockdaemon()
876 rc = bind_unix_socket(sock, unix_socket, &listener.sau); in sockdaemon()
880 if(rc) { in sockdaemon()
941 rc = listen(sock, 5); in sockdaemon()
942 if(0 != rc) { in sockdaemon()