How to get IP-Adress of clients?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get IP-Adress of clients?

OSon
Hello,

my server-application is waiting for connections via

BIO_do_accept(acc)

If a client connects to my server-application I would like to know which
IP-Adress the client has. How can I get this infomation?

Thanks for your help!


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: How to get IP-Adress of clients?

Mark-62
> my server-application is waiting for connections via
>
> BIO_do_accept(acc)
>
> If a client connects to my server-application I would like to
> know which
> IP-Adress the client has. How can I get this infomation?

How about BIO_get_conn_ip()?

Mark
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: How to get IP-Adress of clients?

OSon
I don't understand it. I get only NULL. Nothing else.

>>my server-application is waiting for connections via
>>
>>BIO_do_accept(acc)
>>
>>If a client connects to my server-application I would like to
>>know which
>>IP-Adress the client has. How can I get this infomation?
>>    
>>
>
>How about BIO_get_conn_ip()?
>
>Mark
>______________________________________________________________________
>OpenSSL Project                                 http://www.openssl.org
>User Support Mailing List                    [hidden email]
>Automated List Manager                           [hidden email]
>
>
>  
>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: How to get IP-Adress of clients?

Dr. Stephen Henson
In reply to this post by OSon
On Thu, Feb 02, 2006, Bastian Bhrig wrote:

> Hello,
>
> my server-application is waiting for connections via
>
> BIO_do_accept(acc)
>
> If a client connects to my server-application I would like to know which
> IP-Adress the client has. How can I get this infomation?
>

You can get the underlying socket using BIO_get_fd() on the BIO. From that you
can get the address using for example getpeername().

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: How to get IP-Adress of clients?

OSon
Do you have a small example for me, please. I get nothing really useful. :(


>On Thu, Feb 02, 2006, Bastian Bhrig wrote:
>
>  
>
>>Hello,
>>
>>my server-application is waiting for connections via
>>
>>BIO_do_accept(acc)
>>
>>If a client connects to my server-application I would like to know which
>>IP-Adress the client has. How can I get this infomation?
>>
>>    
>>
>
>You can get the underlying socket using BIO_get_fd() on the BIO. From that you
>can get the address using for example getpeername().
>
>Steve.
>--
>Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
>OpenSSL project core developer and freelance consultant.
>Funding needed! Details on homepage.
>Homepage: http://www.drh-consultancy.demon.co.uk
>______________________________________________________________________
>OpenSSL Project                                 http://www.openssl.org
>User Support Mailing List                    [hidden email]
>Automated List Manager                           [hidden email]
>
>
>  
>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]