473,563 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why gethostbyaddr() is not safe?

1 New Member
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 there any security issues related with this function?
Also came to know that calling this function is not thread safe.
I am not able to get the exact reason for not using gethostbyaddr function.
Feb 15 '08 #1
1 3105
Arulmurugan
90 New Member
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 there any security issues related with this function?
Also came to know that calling this function is not thread safe.
I am not able to get the exact reason for not using gethostbyaddr function.
gethostbyaddr is not a thread safe fun.., i heard something gethostbyaddr leaks memory in Windows..
i don't know abt VC++, but gethostbyaddr,g etservbyport these
2 functions functionality, you can do by using only getnameinfo( Ref RFC 2553).

Regards,
Arul
Feb 15 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3255
by: O.B. | last post by:
What reasons are there for the following returning the IP address instead of the hostname? gethostbyaddr($_SERVER)
0
1622
by: Sibylle Koczian | last post by:
Hello all, the documentation for the socket module says that gethostbyaddr should return the primary host name and alternative host names if there are any. But the alias list is empty even in cases where I know aliases exist. I can get them using gethostbyname_ex, but that only works with names, not with IP addresses, and I want to resolve...
2
2682
by: Neil Aggarwal | last post by:
Hello: I am using gcc on RedHat Linux 9. When I try to do a reverse dns query using gethostbyaddr, it works fine for hosts that have a PTR record, but it returns null for hosts that have a CNAME record. Any ideas how to work around this? Here is an example: dig -x 66.54.79.4
1
4984
by: kcw3388 | last post by:
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.
2
3186
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 to tell if a computer is up or down. However, in my environment, I am finding that I am able to get a hostname even though I am unable to actually...
0
1414
by: Jørn Dahl-Stamnes | last post by:
I have a PHP script which contain the following code: $hostname = gethostbyaddr ($ip); Until yesterday, the gethostbyaddr returned the hostname of the given IP-addresse. But yesterday it began to return the name of the host the web-server is running on regardless of the given IP. If I do a 'host <IP>' from a shell on the same machine, I...
2
3088
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 server? Thanks BTW what's the difference between comp.lang.php, alt.php and alt.comp.lang.php, shouldn't these groups be merged?
1
3632
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 one MAC on the LAN. Please see the example below. I am getting error: socket.herror: (1, 'Unknown host')
24
2473
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 gethostbyaddr() can delay the serving of the web page, right? Because gethostbyaddr() is not forked into a separate process. So I suppose I'd need to...
0
7580
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.