what's the matter with the function gethostbyaddr()
I am a new comer with linux.when i begin my network programming on
linux,i find the function gethostbyaddr() can't work well.It always return NULL in the ethernet.the error is ether HOST_NOT_FOUND OR TRY_AGAIN however when i programs on windows the function works well.who can help me out .THANKS |
I'm moving this thread to programming, since it seams to best apply there. Please don't post duplicate posts in multiple sections of the forum.
|
http://www.linuxquestions.org/questi...hreadid=310621
For starters, please don't double post, it's against the rules: -from http://www.linuxquestions.org/questions/register.php (ok that URL doesnt show the terms if you are already signed in, but you did have to accept them when you made an account to post) Quote:
Programming (This forum is for all programming questions. The question does not have to be directly related to Linux and any language is fair game.) If your question does not get moved there by a moderator, wait 24 hours and then post it in that forum. The software and network forums are for user questions and not as many programmers look in them. |
Now.. on to your problem, how are you calling the function? The gethostbyaddr function in Linux returns a struct hostent.. which looks like this:
Code:
struct hostent { |
All times are GMT -5. The time now is 07:28 PM. |