vncserver.c
static enum rfbNewClientAction
vncserver_newclient(rfbClientPtr cl) {
    struct sockaddr_in addr;
    socklen_t len=sizeof(addr);
    unsigned int ipv4;

    getpeername(cl->sock, (struct sockaddr *)&addr, &len);
    ipv4 = ntohl(addr.sin_addr.s_addr);
    DPRINTF(("Client connected from ip %d.%d.%d.%d\n",
            (ipv4>>24)&0xff, (ipv4>>16)&0xff, (ipv4>>8)&0xff, ipv4&0xff));

    if (wait_cond)
        pthread_cond_signal(&wait_cond);

    return (RFB_CLIENT_ACCEPT);
}
/*
 * Just output the IP of the client connected in this server and return accept.
 */
Just output the IP of the client connected in this server and return accept.
Just output the IP of the client connected in this server and return accept .
static enum rfbNewClientAction
vncserver_newclient(rfbClientPtr cl) {
    struct sockaddr_in addr;
    socklen_t len=sizeof(addr);
    unsigned int ipv4;
    getpeername(cl->sock, (struct sockaddr *)&addr, &len);
    ipv4 = ntohl(addr.sin_addr.s_addr);
    DPRINTF(("Client connected from ip %d.%d.%d.%d\n",
            (ipv4>>24)&0xff, (ipv4>>16)&0xff, (ipv4>>8)&0xff, ipv4&0xff));
    if (wait_cond)
        pthread_cond_signal(&wait_cond);
    return (RFB_CLIENT_ACCEPT);
}
static enum rfbNewClientAction vncserver_newclient ( rfbClientPtr cl ) { struct sockaddr_in addr ; socklen_t len = sizeof ( addr ) ; unsigned int ipv4 ; getpeername ( cl -> sock , ( struct sockaddr * ) & addr , & len ) ; ipv4 = ntohl ( addr . sin_addr . s_addr ) ; DPRINTF ( ( " \n " , ( ipv4 >> 24 ) & 0xff , ( ipv4 >> 16 ) & 0xff , ( ipv4 >> 8 ) & 0xff , ipv4 & 0xff ) ) ; if ( wait_cond ) pthread_cond_signal ( & wait_cond ) ; return ( RFB_CLIENT_ACCEPT ) ; }
Just output the IP of the client connected in this server and return accept.
Just output the IP of the client connected in this server and return accept .