Originally Posted by
brewbuck
How exactly are you calling BIO_get_conn_ip()?
I've tried it a couple of different ways. the first way was to call SSL_get_rbio() to get the BIO structure, and then the following:
in the function that handles communication with the client:
Code:
char* ip_bin = NULL;
ip_bin = BIO_get_conn_ip(rbio);
if (ip_bin) ...print ip address here...
else ...print failure message....
the other way I tried was the following:
after accepting and forking, and before handing the BIO off to the SSL object...
Code:
char* ip_bin = NULL;
sbio = BIO_new_socket(sock, BIO_NOCLOSE);
ip_bin = BIO_get_conn_ip(sbio);
if (ip_bin) ...print ip address here...
else ...print failure message....
not sure what else to try....