Hi Dhoti.   Neither of those questions relate specifically to OpenSSL, since 
these are part of the fundamental networking behaviors.   

1)  Look at the system function setsockopt() for how to set the reuse-address 
behavior.  You must call this function after creating the socket, but before 
calling bind(). 

2)  After a socket is connected, you can obtain the information about the peer 
by calling the system function getpeername(), specifying the socket as input. 
The sockaddr structure returned will contain the IP address of the connected 
peer.   

+-+-+-+-+-+-+ 
Dave McLellan, Symmetrix Software I18n/Security Programs
EMC Corporation, 176 South St, Hopkinton MA
Mail Stop 176-B1 1/P-36
office 508-249-1257, fax 508-497-8027
cell 978-500-2546
+-+-+-+-+-+-+ 




-----Original Message-----
From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] 
On Behalf Of Dhoti Walla
Sent: Saturday, August 13, 2011 7:01 PM
To: openssl-users@openssl.org
Subject: noob question on OpenSSL

Hi,

I've gotten OpenSSL to work for me using examples from the Network 
Security with OpenSSL book.

I've got two questions that I know are very basic - Mr Google was not 
very helpful here

1) how do I set SO_REUSEADDR option on my OpenSSL server?

2) when a client connects to the my server, how can I get the IP address 
of the client?

thanks for all help
Dhoti
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to