axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senaka Fernando" <sen...@wso2.com>
Subject Re: [Axis2C] Get peer ip addresswith Apache server
Date Sat, 19 Jan 2008 15:09:44 GMT
Hi Mougey, Samisa, and Dumindu,

> On Jan 19, 2008 12:53 AM, Senaka Fernando <senaka@wso2.com> wrote:
>> > Sébastien Mougey wrote:
>> >> How can I get this address with Apache server ? Is it possible ?
>> >>
>> >
>> > I think it should be possible, however, I need to look into the code
>> to
>> > give you a definite answer. I will have a look and let you know.
>>
>> Yes, indeed it is possible. We need to use ap_get_remote_host().
>> However,
>> I'm not quite sure what other methods, data are required to call this
>> method, and how we could access them. Looking into that.
>>
>
> ap_get_remote_host() tries to lookup the remote server's DNS name.
> Only if that fails will it return the ip address. You can however get
> the ip address of the remote host at the axis2_handler as follows:
>
> char* remote_ip = req->connection->remote_ip;

Okay, I think we can go ahead with this. The method
axis2_apache2_worker_process_request() has access to the above data as
well as the msg_ctx, and therefore, it can be made available, as in the
simple axis server.

Regards,
Senaka

>
>
> Regards,
> Dumindu.
>
> --
> Dumindu Pallewela
> http://blog.dumindu.com
> GPG ID: 0x9E131672
>
> WSO2 | "Oxygenating the Web Service Platform" | http://wso2.com
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message