isisd: add support to import routes from other protocols

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
diff --git a/lib/prefix.c b/lib/prefix.c
index 63742f3..936e9fc 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -187,6 +187,17 @@
   return prefix_bit((const u_char *) &prefix->s6_addr, prefixlen);
 }
 
+int
+str2family(const char *string)
+{
+  if (!strcmp("ipv4", string))
+    return AF_INET;
+  else if (!strcmp("ipv6", string))
+    return AF_INET6;
+  else
+    return -1;
+}
+
 /* Address Famiy Identifier to Address Family converter. */
 int
 afi2family (afi_t afi)