i want to Know Destination IP address of the connected remote system.
i tried with getpeername() API function. but i am not getting IP. after accept API function i tried following method
client_sock = accept(conn_sock, NULL, NULL);
printf("Remote IP=%u\n\r", ((sockaddr_in*) &addr)->sin_addr.s_addr);
any one give solution for this?
thanks and regards,