Re: Peer IP Address

[email protected] (Jonas Borgström) 17 Sep 2002 08:52:14 +0200
Newsgroups gmane.network.beep.roadrunner.general
Message-ID <[email protected]>
"Jae Kim" <[email protected]> writes:

> 1.  (*) text/plain          ( ) text/html           
> 
> How do you get the peer's ip address?
>  

fd = rr_tcp_connection_get_fd (RR_TCP_CONNECTION (connection));

will return the fd associated with the connection. 
With this information you should be able to extract the peer's ip address 
using the getpeername and getnameinfo functions.

You can also look at the init_sasl_conn() function in the rrsasl profile
for an example.

/ Jonas
-- 
Jonas Borgström                  [email protected]
CodeFactory AB                   http://www.codefactory.se/
Office: +46 (0)90 71 86 10       Cell: +46 (0)70 248 89 58