Results 1 to 1 of 1
Thread: DNS lookup from kernelspace?
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Aug 2007
DNS lookup from kernelspace?
I am building a kernel module that uses sockets to communicate,
my problem is that I can't get the host's ip address from DNS.
(the DNS only works in userspace...)
What I'm after is the functionality of "gethostbyname("string_presentation_of_target_addr ess")" to kernelspace. (netdb.h provides a function gethostbyname() that returns a struct hostent)
Apparently I need to run the gethostbyname() in userspace and pass the result to the kernelspace where my module resides.
I think "call_usermodehelper()" function might help, but I got no idea how to work it.
If anyone has some experience with kernel socket programming, could you help me out.