added a function for checking network interface.