You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Chris Reynolds <sh...@gmail.com> on 2011/08/08 11:26:40 UTC
Obtaining the client's host name
Hi,
Is it possible using the API to obtain the client's host name - i.e. a
reverse DNS lookup? If not I guess it is safe to use gethostbyaddr_r to look
it up from the client's IP address.
Thank-you,
Chris Reynolds.
Re: Obtaining the client's host name
Posted by Chris Reynolds <sh...@gmail.com>.
Thank-you for the suggestion - I will just use gethostbyaddr_r for the
moment.
On 8 August 2011 16:02, Leif Hedstrom <zw...@apache.org> wrote:
> On 08/08/2011 08:09 AM, Theo Schlossnagle wrote:
>
>> I would think we'd need to provide a convenience function that uses
>> the DNS subsystem to do PTR record lookups.
>>
>
> Agreed. I think we should provide the equivalent of TSHostLookup(), but for
> PTR lookups.
>
> -- Leif
>
>
Re: Obtaining the client's host name
Posted by Leif Hedstrom <zw...@apache.org>.
On 08/08/2011 08:09 AM, Theo Schlossnagle wrote:
> I would think we'd need to provide a convenience function that uses
> the DNS subsystem to do PTR record lookups.
Agreed. I think we should provide the equivalent of TSHostLookup(), but
for PTR lookups.
-- Leif
Re: Obtaining the client's host name
Posted by Theo Schlossnagle <je...@omniti.com>.
I would think we'd need to provide a convenience function that uses
the DNS subsystem to do PTR record lookups.
On Mon, Aug 8, 2011 at 10:06 AM, Alan M. Carroll
<am...@network-geographics.com> wrote:
> There is no API to get the client hostname. I recommend doing the gethostbyaddr_r directly as any API would simply be a wrapper around that.
>
> Monday, August 8, 2011, 4:26:40 AM, you wrote:
>
>> Hi,
>
>> Is it possible using the API to obtain the client's host name - i.e. a
>> reverse DNS lookup? If not I guess it is safe to use gethostbyaddr_r to look
>> it up from the client's IP address.
>
>> Thank-you,
>
>> Chris Reynolds.
>
>
--
Theo Schlossnagle
http://omniti.com/is/theo-schlossnagle
Re: Obtaining the client's host name
Posted by "Alan M. Carroll" <am...@network-geographics.com>.
There is no API to get the client hostname. I recommend doing the gethostbyaddr_r directly as any API would simply be a wrapper around that.
Monday, August 8, 2011, 4:26:40 AM, you wrote:
> Hi,
> Is it possible using the API to obtain the client's host name - i.e. a
> reverse DNS lookup? If not I guess it is safe to use gethostbyaddr_r to look
> it up from the client's IP address.
> Thank-you,
> Chris Reynolds.