Results 1 to 4 of 4
recently,I am working at finding a function in the kernel land equivalent to the gethostbyname function. But I failed. I once browse many sites concerning the linux kernel looking for ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-24-2005 #1Just Joined!
- Join Date
- Sep 2005
- Posts
- 5
who can tell me where i can get the source code of the gethostbyname function?
recently,I am working at finding a function in the kernel land equivalent to the gethostbyname function. But I failed. I once browse many sites concerning the linux kernel looking for the function. At last i realized that in the linux kernel land there doesnt exist the DNS function that i am looking for.
if anyone knows where can i get the source code of the function or how can realize the function in the kernel land,pls tell me and i will be appreciated greatly!!
- 09-26-2005 #2
Well, the function is prototyped in netdb.h, which is included in glibc. You can dig around the glibc source tree and find the implementation. Or you can take the prototype and write the function yourself...it would be more fun that way.
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 09-26-2005 #3Just Joined!
- Join Date
- Sep 2005
- Posts
- 5
Thank you for your help. I think I will implement the function by myself. It will be really more funny!!
- 11-17-2006 #4Just Joined!
- Join Date
- Nov 2006
- Posts
- 1
still not in ?
Is the function still not available in the kernel land ? and did you write it for your use ?


Reply With Quote
