LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 02-17-2011, 08:02 PM   #1
jshih
Member
 
Registered: Mar 2007
Posts: 47

Rep: Reputation: 15
why does getnameinfo get timeout


Hi,
When an application invokes getnameinfo, it seems that it takes a while.

Internally, os sends a request to dns server and waits for a response, but the response is timeout after 5 seconds.

1. why does the response take so long?

2. is the timeout value configurable?
if yes, what will it impact if the value is changed and
where to change this value?

3. is there other way to find out domain name by ip address?


Hopefully, some one may reply.

Thank you.
 
Old 02-19-2011, 05:24 AM   #2
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
Quote:
Originally Posted by jshih View Post
3. is there other way to find out domain name by ip address?
nslookup will give you that information. You could probably add some greps to the end of it to cut out only the information you want.
 
Old 02-19-2011, 08:21 AM   #3
jshih
Member
 
Registered: Mar 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dudeman41465 View Post
nslookup will give you that information. You could probably add some greps to the end of it to cut out only the information you want.
Thank you for your response.

Yes, nslookup, a shell command, can also do the same job,

but getnameinfo invoked by a c program is a system call.
 
Old 02-20-2011, 02:37 PM   #4
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
getaddrinfo is the recommended method. Perhaps the authoritative DNS server is unreachable.
 
Old 02-21-2011, 04:57 PM   #5
jshih
Member
 
Registered: Mar 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Thank you for your response.

Yes, nslookup, a shell command, can also do the same job,

but getnameinfo invoked by a c program is a system call.
 
Old 02-21-2011, 05:01 PM   #6
jshih
Member
 
Registered: Mar 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TimothyEBaldwin View Post
getaddrinfo is the recommended method. Perhaps the authoritative DNS server is unreachable.
thank you for your response.

getaddrinfo will return a list of addrinfo structures.

You still need to call getnameinfo to get a domain name based on the return list.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPNC seems to timeout quickly- how do I lengthen the timeout? spiffytech Linux - Software 28 01-03-2014 05:45 AM
timeout help amjad General 0 06-11-2005 02:39 AM
SSH timeout goldenmag Linux - Security 2 12-10-2003 04:06 PM
LQ timeout... again gui10 LQ Suggestions & Feedback 4 05-02-2002 12:33 PM
telnet problem (getnameinfo.) minor Linux - Networking 6 01-23-2002 10:29 AM


All times are GMT -5. The time now is 11:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration