473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

gethostbyaddr/nslookup failed

Hi,

I have a SunOS TCP/IP client program worked fine for a long time
until yesterday.

Now, my TCP/IP server program is located on different
DNS server.

The gethostbyaddr ( ) is now returned NULL instead.

struct hostent *hp=gethostbyaddr (addr, len, type);

The nslookup of the server IP failed even thought I
added a correct entry to /etc/hosts file. I believed
this is the behavior of the SunOS nslookup not looking
into the /etc/hosts file.

But, "getent hosts serverName" worked fine.

Anyway, try to make my long story short.

I would like to fix the problem but I am not
how to make get the gethostbyaddr( ) work again
(if possible).

My second option is to change gethostbyaddr ( )
to something similar to "getent" but no ideas
about how to do so.

Any comments/suggestions are appreciated.
Thanks,

Kevin

Nov 15 '05 #1
1 4979
kc*****@hotmail.com wrote:
Hi,

I have a SunOS TCP/IP client program worked fine for a long time
until yesterday.

Now, my TCP/IP server program is located on different
DNS server.

The gethostbyaddr ( ) is now returned NULL instead.

struct hostent *hp=gethostbyaddr (addr, len, type);

The nslookup of the server IP failed even thought I
added a correct entry to /etc/hosts file. I believed
this is the behavior of the SunOS nslookup not looking
into the /etc/hosts file.

But, "getent hosts serverName" worked fine.

Anyway, try to make my long story short.

I would like to fix the problem but I am not
how to make get the gethostbyaddr( ) work again
(if possible).

My second option is to change gethostbyaddr ( )
to something similar to "getent" but no ideas
about how to do so.

Any comments/suggestions are appreciated.


Since this has nothing to do with standard C, either
news:comp.unix.programmer or a Solaris newsgroup would be the *right*
place to ask.

HTH
--ag

--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays
"If you have nothing to hide, you're not trying!"
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: TomT | last post by:
Hi, I've been searching but have not been able to find a script that will allow nslookup's using ASP. I'm looking to use a form, that will allow users to enter IP addresses or domian names,...
6
by: axxegfx | last post by:
I need to resolve one domain , i have proved this: System.Net.Dns.GetHostByName("digitalprologic.com") but it returns an error. I have typed DOS nslookup -querytype=any digitalprologic.com...
0
by: ginn via DotNetMonster.com | last post by:
Hi, To block spam-mails I want to write my own blackhole list server for my Postfix mailserver in .NET In postfix i would have to add the line reject_rbl_client <myBlackList> to the...
2
by: Harlin Seritt | last post by:
I have a list of IP addresses I am testing with socket.gethostbyaddr(). For the most part, I am able to get a hostname returned to me when I run gethostbyaddr(). I am also hoping this will allow me...
2
by: Stuart Duncan | last post by:
Hi I am trying to put a web page together that will allow the user to find the MX record for a domain. I have found PHP code that uses nslookup but when I use it, I receive a "Page cannot be...
2
by: christian9997 | last post by:
Hi Since yesterday about 11.00 CET the gethostbyaddr function doesn't seem to be working. All I get is the IP address back. Is this something general to all PHP users or is this specific to my...
1
by: shailesh | last post by:
Hi, I am facing a peculiar problem. socket.gethostbyaddr is not working fine on my MAC for ip addresses on the LAN. The LAN happens to consist of linux and windows machines and this is the only...
1
by: lakshmiraja | last post by:
hi, I came to know that gethostbyaddr is deprecated in Visual Studio 2005 by the introduction of getnameinfo function. Can i know the reason for the deprecation of gethostbyaddr function. Is...
24
by: RJ_32 | last post by:
When there is no rDNS record on an IP address, then it might take a while for the reverse lookup to timeout. I'm thinking of how on a tracert you can observe the delay. If so, then calling...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.