Results 1 to 1 of 1
Hello,
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 ...
- 08-16-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 1
DNS lookup from kernelspace?
Hello,
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.


Reply With Quote
