The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
who - PC Computer name gefa UNIX for Advanced & Expert Users 4 04-26-2007 06:11 AM
Change Computer Name CBarraford OS X (Apple) 2 03-03-2007 09:57 PM
Another customisation for my computer davidY Shell Programming and Scripting 1 01-01-2007 08:33 PM
xwindow on old computer pgas UNIX for Dummies Questions & Answers 1 03-15-2004 07:24 AM
can't acces ftp from my computer TuMux UNIX for Dummies Questions & Answers 7 11-18-2003 10:41 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-12-2004
Registered User
 

Join Date: Dec 2003
Posts: 10
Stumble this Post!
Question getting computer name

Hi all!

Is there any function to get the name from a computer by the IP adresse?

Thank you in advance!
Greetings Mario
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-12-2004
Registered User
 

Join Date: Dec 2003
Posts: 10
Stumble this Post!
Got it: gethostbyaddr

Greetings!
Reply With Quote
  #3 (permalink)  
Old 02-17-2004
Registered User
 

Join Date: Jan 2002
Location: India
Posts: 111
Stumble this Post!
The gethostbyaddr subroutine returns a pointer to a structure of type hostent. Its members specify data obtained from either the local /etc/hosts file or one of the files distributed by DNS. To determine which file or files to search, and in which order, the system uses the switches as defined.

As the routine reads /etc/hosts file we should use endhostent() routine to close the /etc/hosts file.
__________________
Regards,
Satya Prakash Prasad
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0