nregi
07-09-2002, 01:06 AM
Hello,
I am using the function dev_get_by_name() to get IP information relating to an interface in a kernel module.
For example:
The eth0 interface is bound to IP by querying a DHCP server for IP. Sometimes, if the DHCP server is not up, the eth0 interface is not bound to IP, at this point if my module uses the function dev_get_by_name("eth0") , the module crashes and I have to reboot the machine.
Is there a way I can test to see if eth0 does exist on the system before calling dev_get_by_name()?
Thanks in advance.
I am using the function dev_get_by_name() to get IP information relating to an interface in a kernel module.
For example:
The eth0 interface is bound to IP by querying a DHCP server for IP. Sometimes, if the DHCP server is not up, the eth0 interface is not bound to IP, at this point if my module uses the function dev_get_by_name("eth0") , the module crashes and I have to reboot the machine.
Is there a way I can test to see if eth0 does exist on the system before calling dev_get_by_name()?
Thanks in advance.