ospf6d/ospfd: refactor some common defines

Rearranging common defs and structures for use betweeen OSPFv2 and
OSPFv3.  Created a new file called libospf.h under lib directory to
hold defines that are common between OSPFv2 and OSPFv3 code bases.

[DL: split of defines refactor from timer refactor]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index c3a63fe..3277e7d 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -253,7 +253,7 @@
     }
 
   /* do not generate if the route cost is greater or equal to LSInfinity */
-  if (route->path.cost >= LS_INFINITY)
+  if (route->path.cost >= OSPF_LS_INFINITY)
     {
       if (is_debug)
         zlog_debug ("The cost exceeds LSInfinity, withdraw");
@@ -296,7 +296,7 @@
       /* ranges are ignored when originate backbone routes to transit area.
          Otherwise, if ranges are configured, the route is suppressed. */
       if (range && ! CHECK_FLAG (range->flag, OSPF6_ROUTE_REMOVE) &&
-          (route->path.area_id != BACKBONE_AREA_ID ||
+          (route->path.area_id != OSPF_AREA_BACKBONE ||
            ! IS_AREA_TRANSIT (area)))
         {
           if (is_debug)
@@ -604,7 +604,7 @@
     }
 
   /* (1) if cost == LSInfinity or if the LSA is MaxAge */
-  if (cost == LS_INFINITY)
+  if (cost == OSPF_LS_INFINITY)
     {
       if (is_debug)
         zlog_debug ("cost is LS_INFINITY, ignore");