factor out netdev_ip_local_get() from tun_ip_local_get()

netdev_ip_local_get() is a generalized version of tun_ip_local_get()
which supports the net device as argument, rather than a tun_t.

Change-Id: I072aa1a55e7bf110706e9207021b776d9b977fb6
diff --git a/lib/tun.h b/lib/tun.h
index 0b960e5..411deea 100644
--- a/lib/tun.h
+++ b/lib/tun.h
@@ -95,6 +95,9 @@
 
 extern int tun_runscript(struct tun_t *tun, char *script);
 
+int netdev_ip_local_get(const char *devname, struct in46_prefix *prefix_list,
+			size_t prefix_size, int flags);
+
 int tun_ip_local_get(const struct tun_t *tun, struct in46_prefix *prefix_list,
 		     size_t prefix_size, int flags);