Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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!!

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    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 would be more fun that way.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Thank you for your help. I think I will implement the function by myself. It will be really more funny!!

  4. $spacer_open
  5. #4

    still not in ?

    Is the function still not available in the kernel land ? and did you write it for your use ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts