[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Discovering my IP address
Jeremy Andrus wrote:
> I've written a kernel module, but in it I need to discover the IP
> address of the computer on which the module is loaded. What's the
> easiest way to do this?
look inside the net/core/dev.c & devinet.c . U can search dev list using
dev->next via a loop and get the ipaddr's using devinet_ioctl function & I/O Get
ADDR flag.
Thanx.
--
Evrim ULU
evrim@envy.com.tr / evrim@core.gen.tr
sysadm
http://www.core.gen.tr
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/