diff --git a/ChangeLog b/ChangeLog
index 57fdf48..8e33624 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-04-04 Paul Jakma <paul@dishone.st>
+
+	* Sync to Zebra CVS
+	* Fix lib/thread.h leak
+	* Fix small Opaque LSA leak
+	* Do not configure OSPF interfaces for secondary addresses
+	* vtysh fixes from Hasso
+	* Dave Watson's missing ntohs fix
+
 2003-03-25 Paul Jakma <paul@dishone.st>
 
 	* Sync to Zebra CVS
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index 822036c..8104aef 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -45,6 +45,10 @@
 /* BGP4-MIB described in RFC1657. */
 #define BGP4MIB 1,3,6,1,2,1,15
 
+/* BGP TRAP. */
+#define BGPESTABLISHED			1
+#define BGPBACKWARDTRANSITION		2	
+
 /* Zebra enterprise BGP MIB.  This variable is used for register
    OSPF MIB to SNMP agent under SMUX protocol.  */
 #define BGPDMIB 1,3,6,1,4,1,3317,1,2,2
@@ -846,7 +850,7 @@
   smux_trap (bgp_oid, sizeof bgp_oid / sizeof (oid),
 	     index, IN_ADDR_SIZE,
 	     bgpTrapList, sizeof bgpTrapList / sizeof (struct trap_object),
-	     bm->start_time - time (NULL));
+	     bm->start_time - time (NULL), BGPESTABLISHED);
 }
 
 void
@@ -865,7 +869,7 @@
   smux_trap (bgp_oid, sizeof bgp_oid / sizeof (oid),
 	     index, IN_ADDR_SIZE,
 	     bgpTrapList, sizeof bgpTrapList / sizeof (struct trap_object),
-	     bm->start_time - time (NULL));
+	     bm->start_time - time (NULL), BGPBACKWARDTRANSITION);
 }
 
 void
diff --git a/lib/smux.c b/lib/smux.c
index 0479292..952c5a8 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -999,7 +999,7 @@
 smux_trap (oid *name, size_t namelen,
 	   oid *iname, size_t inamelen,
 	   struct trap_object *trapobj, size_t trapobjlen,
-	   unsigned int tick)
+	   unsigned int tick, u_char sptrap)
 {
   int i;
   u_char buf[BUFSIZ];
@@ -1040,7 +1040,7 @@
 		       &val, sizeof (int));
 
   /* Specific trap integer. */
-  val = 2;
+  val = sptrap;
   ptr = asn_build_int (ptr, &len, 
 		       (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
 		       &val, sizeof (int));
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 551adcf..270b16b 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -1064,6 +1064,7 @@
 {
   /* Initialize Zebra interface data structure. */
   if_init ();
+  om->iflist = iflist;
   if_add_hook (IF_NEW_HOOK, ospf_if_new_hook);
   if_add_hook (IF_DELETE_HOOK, ospf_if_delete_hook);
 }
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 45b554f..9c81327 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -1638,7 +1638,7 @@
       new2->data->type = OSPF_AS_NSSA_LSA;
 
       /* set P-bit if not ABR */
-      if (! OSPF_IS_ABR)
+      if (! IS_OSPF_ABR (ospf))
         {
 	  SET_FLAG(new2->data->options, OSPF_OPTION_NP);
        
@@ -1799,12 +1799,11 @@
 }
 
 struct external_info *
-ospf_default_external_info ()
+ospf_default_external_info (struct ospf *ospf)
 {
   int type;
   struct route_node *rn;
   struct prefix_ipv4 p;
-  struct ospf *ospf = ospf_top;
   
   p.family = AF_INET;
   p.prefix.s_addr = 0;
@@ -1834,8 +1833,10 @@
   struct prefix_ipv4 p;
   struct in_addr nexthop;
   struct external_info *ei;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   
+  ospf = ospf_lookup ();
+
   /* Get originate flags. */
   origin = THREAD_ARG (thread);
 
@@ -1851,7 +1852,7 @@
       ospf_external_info_add (DEFAULT_ROUTE, p, 0, nexthop);
     }
 
-  if ((ei = ospf_default_external_info ()))
+  if ((ei = ospf_default_external_info (ospf)))
     ospf_external_lsa_originate (ospf, ei);
   
   return 0;
@@ -1911,7 +1912,7 @@
   p.prefixlen = 0;
   p.prefix.s_addr = 0;
 
-  ei = ospf_default_external_info ();
+  ei = ospf_default_external_info (ospf);
   lsa = ospf_external_info_find_lsa (ospf, &p);
 
   if (ei)
@@ -2694,7 +2695,7 @@
 #ifdef HAVE_OPAQUE_LSA
     case OSPF_OPAQUE_AS_LSA:
 #endif /* HAVE_OPAQUE_LSA */
-      return ospf_lsdb_lookup_by_id (ospf_top->lsdb, type, id, adv_router);
+      return ospf_lsdb_lookup_by_id (area->ospf->lsdb, type, id, adv_router);
       break;
     default:
       break;
@@ -3117,7 +3118,9 @@
 ospf_lsa_action (struct thread *t)
 {
   struct lsa_action *data;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
+
+  ospf = ospf_lookup ();
 
   data = THREAD_ARG (t);
 
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 6f6262a..dfbf3f6 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -193,6 +193,9 @@
   zlog_default = openzlog (progname, ZLOG_NOLOG, ZLOG_OSPF,
 			   LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON);
 
+  /* OSPF master init. */
+  ospf_master_init ();
+
   while (1) 
     {
       int opt;
@@ -243,7 +246,7 @@
     }
 
   /* Initializations. */
-  master = thread_master_create ();
+  master = om->master;
 
   /* Library inits. */
   signal_init ();
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index b8ba518..f1fe783 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -544,7 +544,7 @@
       listnode_add (new->area->opaque_lsa_self, oipt);
       break;
     case OSPF_OPAQUE_AS_LSA:
-      top = ospf_top;
+      top = ospf_lookup ();
       if (new->area != NULL && (top = new->area->ospf) == NULL)
         {
           free_opaque_info_per_type ((void *) oipt);
@@ -652,7 +652,7 @@
         zlog_warn ("Type-10 Opaque-LSA: Reference to AREA is missing?");
       break;
     case OSPF_OPAQUE_AS_LSA:
-      top = ospf_top;
+      top = ospf_lookup ();
       if ((area = lsa->area) != NULL && (top = area->ospf) == NULL)
         {
           zlog_warn ("Type-11 Opaque-LSA: Reference to OSPF is missing?");
@@ -1179,7 +1179,8 @@
   /* Switch output functionality by vty address. */
   if (vty != NULL)
     {
-      vty_out (vty, "  Opaque-Type %u (%s)%s", opaque_type, ospf_opaque_type_name (opaque_type), VTY_NEWLINE);
+      vty_out (vty, "  Opaque-Type %u (%s)%s", opaque_type,
+	       ospf_opaque_type_name (opaque_type), VTY_NEWLINE);
       vty_out (vty, "  Opaque-ID   0x%x%s", opaque_id, VTY_NEWLINE);
 
       vty_out (vty, "  Opaque-Info: %u octets of data%s%s",
@@ -1189,7 +1190,8 @@
     }
   else
     {
-      zlog_info ("    Opaque-Type %u (%s)", opaque_type, ospf_opaque_type_name (opaque_type));
+      zlog_info ("    Opaque-Type %u (%s)", opaque_type,
+		 ospf_opaque_type_name (opaque_type));
       zlog_info ("    Opaque-ID   0x%x", opaque_id);
 
       zlog_info ("    Opaque-Info: %u octets of data%s",
@@ -1580,7 +1582,7 @@
         }
       break;
     case OSPF_OPAQUE_AS_LSA:
-      top = ospf_top;
+      top = ospf_lookup ();
       if (lsa->area != NULL && (top = lsa->area->ospf) == NULL)
         {
           /* Above conditions must have passed. */
@@ -1603,9 +1605,11 @@
 void
 ospf_opaque_lsa_refresh (struct ospf_lsa *lsa)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct ospf_opaque_functab *functab;
 
+  ospf = ospf_lookup ();
+
   if ((functab = ospf_opaque_functab_lookup (lsa)) == NULL
   ||   functab->lsa_refresher == NULL)
     {
@@ -1948,12 +1952,14 @@
 void
 ospf_opaque_lsa_refresh_schedule (struct ospf_lsa *lsa0)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf = ospf;
   struct opaque_info_per_type *oipt;
   struct opaque_info_per_id *oipi;
   struct ospf_lsa *lsa;
   int delay;
 
+  ospf = ospf_lookup ();
+
   if ((oipt = lookup_opaque_info_by_type (lsa0)) == NULL
   ||  (oipi = lookup_opaque_info_by_id (oipt, lsa0)) == NULL)
     {
@@ -2025,11 +2031,13 @@
 void
 ospf_opaque_lsa_flush_schedule (struct ospf_lsa *lsa0)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf = ospf;
   struct opaque_info_per_type *oipt;
   struct opaque_info_per_id *oipi;
   struct ospf_lsa *lsa;
 
+  ospf = ospf_lookup ();
+
   if ((oipt = lookup_opaque_info_by_type (lsa0)) == NULL
   ||  (oipi = lookup_opaque_info_by_id (oipt, lsa0)) == NULL)
     {
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index ac1f018..c4cc07b 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -1967,7 +1967,8 @@
 }
 
 struct ospf_interface *
-ospf_associate_packet_vl (struct interface *ifp, struct ospf_interface *oi,
+ospf_associate_packet_vl (struct ospf *ospf,
+			  struct interface *ifp, struct ospf_interface *oi,
 			  struct ip *iph, struct ospf_header *ospfh)
 {
   struct ospf_interface *rcv_oi;
@@ -1981,17 +1982,17 @@
 
   if ((rcv_oi = oi) == NULL)
     {
-     if ((rcv_oi = ospf_if_lookup_by_local_addr (oi->ospf, ifp,
+     if ((rcv_oi = ospf_if_lookup_by_local_addr (ospf, ifp,
 						 iph->ip_dst)) == NULL)
        return NULL;
     }
 
-  for (node = listhead (oi->ospf->vlinks); node; nextnode (node))
+  for (node = listhead (ospf->vlinks); node; nextnode (node))
     {
       if ((vl_data = getdata (node)) == NULL)
 	continue;
       
-      vl_area = ospf_area_lookup_by_area_id (oi->ospf, vl_data->vl_area_id);
+      vl_area = ospf_area_lookup_by_area_id (ospf, vl_data->vl_area_id);
       if (!vl_area)
 	continue;
       
@@ -2242,7 +2243,7 @@
       return 0;
     }
   
-  if ((oi = ospf_associate_packet_vl (ifp, oi, iph, ospfh)) == NULL)
+  if ((oi = ospf_associate_packet_vl (ospf, ifp, oi, iph, ospfh)) == NULL)
     {
       stream_free (ibuf);
       return 0;
@@ -2778,7 +2779,7 @@
   ospf_packet_add (oi, op);
 
   /* Hook thread to write packet. */
-  OSPF_ISM_WRITE_ON ();
+  OSPF_ISM_WRITE_ON (oi->ospf);
 }
 
 void
@@ -2913,7 +2914,7 @@
 		  /* Add packet to the interface output queue. */
 		  ospf_packet_add (oi, op_dup);
 
-		  OSPF_ISM_WRITE_ON ();
+		  OSPF_ISM_WRITE_ON (oi->ospf);
 		}
 
 	      }
@@ -2931,7 +2932,7 @@
       ospf_packet_add (oi, op);
 
       /* Hook thread to write packet. */
-      OSPF_ISM_WRITE_ON ();
+      OSPF_ISM_WRITE_ON (oi->ospf);
     }
 }
 
@@ -2965,7 +2966,7 @@
   ospf_packet_add (oi, op);
 
   /* Hook thread to write packet. */
-  OSPF_ISM_WRITE_ON ();
+  OSPF_ISM_WRITE_ON (oi->ospf);
 
   /* Remove old DD packet, then copy new one and keep in neighbor structure. */
   if (nbr->last_send)
@@ -2986,7 +2987,7 @@
   ospf_packet_add (oi, ospf_packet_dup (nbr->last_send));
 
   /* Hook thread to write packet. */
-  OSPF_ISM_WRITE_ON ();
+  OSPF_ISM_WRITE_ON (oi->ospf);
 }
 
 /* Send Link State Request. */
@@ -3024,7 +3025,7 @@
   ospf_packet_add (oi, op);
 
   /* Hook thread to write packet. */
-  OSPF_ISM_WRITE_ON ();
+  OSPF_ISM_WRITE_ON (oi->ospf);
 
   /* Add Link State Request Retransmission Timer. */
   OSPF_NSM_TIMER_ON (nbr->t_ls_req, ospf_ls_req_timer, nbr->v_ls_req);
@@ -3077,7 +3078,7 @@
   ospf_packet_add (oi, op);
 
   /* Hook thread to write packet. */
-  OSPF_ISM_WRITE_ON ();
+  OSPF_ISM_WRITE_ON (oi->ospf);
 }
 
 static int
@@ -3186,7 +3187,7 @@
   ospf_packet_add (oi, op);
 
   /* Hook thread to write packet. */
-  OSPF_ISM_WRITE_ON ();
+  OSPF_ISM_WRITE_ON (oi->ospf);
 }
 
 static int
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index c3e3468..2e1a9b3 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -518,7 +518,9 @@
 ospfGeneralGroup (struct variable *v, oid *name, size_t *length,
 		  int exact, size_t *var_len, WriteMethod **write_method)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
+
+  ospf = ospf_lookup ();
 
   /* Check whether the instance identifier is valid */
   if (smux_header_generic (v, name, length, exact, var_len, write_method)
@@ -619,7 +621,7 @@
   struct ospf_area *area;
   listnode node;
 
-  if (! ospf_top)
+  if (ospf == NULL)
     return NULL;
 
   if (first)
@@ -650,10 +652,11 @@
 ospfAreaLookup (struct variable *v, oid name[], size_t *length,
 		struct in_addr *addr, int exact)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct ospf_area *area;
   int len;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return NULL;
 
@@ -753,11 +756,13 @@
 {
   struct ospf_area *area;
   listnode node;
+  struct ospf *ospf;
 
-  if (! ospf_top)
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
     return NULL;
 
-  for (node = listhead (ospf_top->areas); node; nextnode (node))
+  for (node = listhead (ospf->areas); node; nextnode (node))
     {
       area = getdata (node);
 
@@ -782,11 +787,12 @@
 ospfStubAreaLookup (struct variable *v, oid name[], size_t *length,
 		    struct in_addr *addr, int exact)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct ospf_area *area;
   int len;
 
-  if (! ospf_top)
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
     return NULL;
 
   /* Exact lookup. */
@@ -910,7 +916,7 @@
 		struct in_addr *area_id, u_char *type,
 		struct in_addr *ls_id, struct in_addr *router_id, int exact)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct ospf_area *area;
   struct ospf_lsa *lsa;
   int len;
@@ -920,6 +926,8 @@
   oid *offset;
   int offsetlen;
 
+  ospf = ospf_lookup ();
+
 #define OSPF_LSDB_ENTRY_OFFSET \
           (IN_ADDR_SIZE + 1 + IN_ADDR_SIZE + IN_ADDR_SIZE)
 
@@ -1058,6 +1066,7 @@
   u_char type;
   struct in_addr ls_id;
   struct in_addr router_id;
+  struct ospf *ospf;
 
   /* INDEX { ospfLsdbAreaId, ospfLsdbType,
      ospfLsdbLsid, ospfLsdbRouterId } */
@@ -1068,7 +1077,8 @@
   memset (&router_id, 0, sizeof (struct in_addr));
 
   /* Check OSPF instance. */
-  if (! ospf_top)
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
     return NULL;
 
   lsa = ospfLsdbLookup (v, name, length, &area_id, &type, &ls_id, &router_id,
@@ -1121,13 +1131,15 @@
   oid *offset;
   int offsetlen;
   int len;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct ospf_area *area;
   struct ospf_area_range *range;
   struct prefix_ipv4 p;
   p.family = AF_INET;
   p.prefixlen = IPV4_MAX_BITLEN;
 
+  ospf = ospf_lookup ();
+
   if (exact) 
     {
       /* Area ID + Range Network. */
@@ -1216,9 +1228,10 @@
   struct in_addr area_id;
   struct in_addr range_net;
   struct in_addr mask;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   
   /* Check OSPF instance. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return NULL;
 
@@ -1265,8 +1278,9 @@
 {
   int len;
   struct ospf_nbr_nbma *nbr_nbma;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return NULL;
 
@@ -1318,9 +1332,10 @@
   struct ospf_nbr_nbma *nbr_nbma;
   struct ospf_interface *oi;
   struct in_addr addr;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   /* Check OSPF instance. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return NULL;
 
@@ -1609,12 +1624,13 @@
   unsigned int ifindex;
   struct in_addr ifaddr;
   struct ospf_interface *oi;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   ifindex = 0;
   memset (&ifaddr, 0, sizeof (struct in_addr));
 
   /* Check OSPF instance. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return NULL;
 
@@ -1781,12 +1797,13 @@
   unsigned int ifindex;
   struct in_addr ifaddr;
   struct ospf_interface *oi;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   ifindex = 0;
   memset (&ifaddr, 0, sizeof (struct in_addr));
 
   /* Check OSPF instance. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return NULL;
 
@@ -2071,8 +2088,9 @@
   struct ospf_neighbor *nbr;
   struct route_node *rn;
   struct ospf_neighbor *min = NULL;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf = ospf;
 
+  ospf = ospf_lookup ();
   LIST_LOOP (ospf->oiflist, oi, nn)
     {
       for (rn = route_top (oi->nbrs); rn; rn = route_next (rn))
@@ -2113,7 +2131,9 @@
   int len;
   int first;
   struct ospf_neighbor *nbr;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
+
+  ospf = ospf_lookup ();
 
   if (exact)
     {
@@ -2224,12 +2244,13 @@
   struct ospf_vl_data *vl_data;
   struct in_addr area_id;
   struct in_addr neighbor;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   memset (&area_id, 0, sizeof (struct in_addr));
   memset (&neighbor, 0, sizeof (struct in_addr));
 
   /* Check OSPF instance. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return NULL;
 
@@ -2281,8 +2302,9 @@
   u_char lsa_type;
   int len;
   struct ospf_lsa *lsa;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
+  ospf = ospf_lookup ();
   if (exact)
     {
       if (*length != v->namelen + 1 + IN_ADDR_SIZE + IN_ADDR_SIZE)
@@ -2370,13 +2392,14 @@
   u_char type;
   struct in_addr ls_id;
   struct in_addr router_id;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   type = OSPF_AS_EXTERNAL_LSA;
   memset (&ls_id, 0, sizeof (struct in_addr));
   memset (&router_id, 0, sizeof (struct in_addr));
 
   /* Check OSPF instance. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return NULL;
 
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 1586a3a..33616d8 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1056,7 +1056,7 @@
   ospf->old_rtrs = ospf->new_rtrs;
   ospf->new_rtrs = new_rtrs;
 
-  if (OSPF_IS_ABR) 
+  if (IS_OSPF_ABR (ospf)) 
     ospf_abr_task (ospf);
 
   if (IS_DEBUG_OSPF_EVENT)
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index fff6f65..4100860 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -181,13 +181,16 @@
        "Enable a routing process\n"
        "Start OSPF configuration\n")
 {
-  if (ospf_top == NULL)
+  struct ospf *ospf;
+
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
     {
-      vty_out (vty, "There isn't active ospf instance.%s", VTY_NEWLINE);
+      vty_out (vty, "There isn't active ospf instance%s", VTY_NEWLINE);
       return CMD_WARNING;
     }
 
-  ospf_finish (ospf_top);
+  ospf_finish (ospf);
 
   return CMD_SUCCESS;
 }
@@ -213,9 +216,8 @@
   ospf->router_id_static = router_id;
 
   if (ospf->t_router_id_update == NULL)
-    ospf->t_router_id_update =
-      thread_add_timer (master, ospf_router_id_update_timer, NULL,
-			OSPF_ROUTER_ID_UPDATE_DELAY);
+    OSPF_TIMER_ON (ospf->t_router_id_update, ospf_router_id_update_timer,
+		   OSPF_ROUTER_ID_UPDATE_DELAY);
 
   return CMD_SUCCESS;
 }
@@ -2298,8 +2300,8 @@
   vty_out (vty, "%% OSPF: Reference bandwidth is changed.%s", VTY_NEWLINE);
   vty_out (vty, "        Please ensure reference bandwidth is consistent across all routers%s", VTY_NEWLINE);
       
-  for (node = listhead (ospf->iflist); node; nextnode (node))
-      ospf_if_recalculate_output_cost (getdata (node));
+  for (node = listhead (om->iflist); node; nextnode (node))
+    ospf_if_recalculate_output_cost (getdata (node));
   
   return CMD_SUCCESS;
 }
@@ -2321,8 +2323,8 @@
   vty_out (vty, "%% OSPF: Reference bandwidth is changed.%s", VTY_NEWLINE);
   vty_out (vty, "        Please ensure reference bandwidth is consistent across all routers%s", VTY_NEWLINE);
 
-    for (node = listhead (ospf->iflist); node; nextnode (node))
-      ospf_if_recalculate_output_cost (getdata (node));
+  for (node = listhead (om->iflist); node; nextnode (node))
+    ospf_if_recalculate_output_cost (getdata (node));
       
   return CMD_SUCCESS;
 }
@@ -2386,7 +2388,7 @@
   if (area->external_routing == OSPF_AREA_NSSA)
     {
       vty_out (vty, "   It is an NSSA configuration. %s   Elected NSSA/ABR performs type-7/type-5 LSA translation. %s", VTY_NEWLINE, VTY_NEWLINE);
-      if (! OSPF_IS_ABR)
+      if (! IS_OSPF_ABR (area->ospf))
 	vty_out (vty, "   It is not ABR, therefore not Translator. %s",
 		 VTY_NEWLINE);
       else
@@ -2435,9 +2437,10 @@
 {
   listnode node;
   struct ospf_area * area;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   /* Check OSPF is enable. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     {
       vty_out (vty, " OSPF Routing Process not enabled%s", VTY_NEWLINE);
@@ -2618,9 +2621,11 @@
        "Interface name\n")
 {
   struct interface *ifp;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   listnode node;
 
+  ospf = ospf_lookup ();
+
   /* Show All Interfaces. */
   if (argc == 0)
     for (node = listhead (iflist); node; nextnode (node))
@@ -2678,9 +2683,10 @@
        "OSPF information\n"
        "Neighbor list\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   listnode node;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     {
       vty_out (vty, " OSPF Routing Process not enabled%s", VTY_NEWLINE);
@@ -2693,7 +2699,7 @@
            "RqstL DBsmL%s", VTY_NEWLINE, VTY_NEWLINE);
 
   for (node = listhead (ospf->oiflist); node; nextnode (node))
-      show_ip_ospf_neighbor_sub (vty, getdata (node));
+    show_ip_ospf_neighbor_sub (vty, getdata (node));
 
   return CMD_SUCCESS;
 }
@@ -2759,17 +2765,11 @@
        "Neighbor list\n"
        "Interface name\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct ospf_interface *oi;
   struct in_addr addr;
   int ret;
   
-  if (ospf == NULL)
-    {
-      vty_out (vty, " OSPF Routing Process not enabled%s", VTY_NEWLINE);
-      return CMD_SUCCESS;
-    }
-
   ret = inet_aton (argv[0], &addr);
   if (!ret)
     {
@@ -2778,6 +2778,13 @@
       return CMD_WARNING;
     }
 
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
+    {
+      vty_out (vty, " OSPF Routing Process not enabled%s", VTY_NEWLINE);
+      return CMD_SUCCESS;
+    }
+
   if ((oi = ospf_if_is_configured (ospf, &addr)) == NULL)
     vty_out (vty, "No such interface address%s", VTY_NEWLINE);
   else
@@ -2890,7 +2897,7 @@
        "Neighbor list\n"
        "Neighbor ID\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   listnode node;
   struct ospf_neighbor *nbr;
   struct in_addr router_id;
@@ -2903,6 +2910,13 @@
       return CMD_WARNING;
     }
 
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
+    {
+      vty_out (vty, " OSPF Routing Process not enabled%s", VTY_NEWLINE);
+      return CMD_SUCCESS;
+    }
+
   for (node = listhead (ospf->oiflist); node; nextnode (node))
     {
       struct ospf_interface *oi = getdata (node);
@@ -2927,11 +2941,15 @@
        "Neighbor list\n"
        "detail of all neighbors\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   listnode node;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
-    return CMD_SUCCESS;
+    {
+      vty_out (vty, " OSPF Routing Process not enabled%s", VTY_NEWLINE);
+      return CMD_SUCCESS;
+    }
 
   for (node = listhead (ospf->oiflist); node; nextnode (node))
     {
@@ -2959,11 +2977,15 @@
        "detail of all neighbors\n"
        "include down status neighbor\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   listnode node;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
-    return CMD_SUCCESS;
+    {
+      vty_out (vty, " OSPF Routing Process not enabled%s", VTY_NEWLINE);
+      return CMD_SUCCESS;
+    }
 
   for (node = listhead (ospf->oiflist); node; nextnode (node))
     {
@@ -3004,6 +3026,7 @@
        "Interface address\n"
        "detail of all neighbors")
 {
+  struct ospf *ospf;
   struct ospf_interface *oi;
   struct in_addr addr;
   int ret;
@@ -3016,10 +3039,14 @@
       return CMD_WARNING;
     }
 
-  if (ospf_top == NULL)
-    return CMD_WARNING;
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
+    {
+      vty_out (vty, " OSPF Routing Process not enabled%s", VTY_NEWLINE);
+      return CMD_SUCCESS;
+    }
 
-  if ((oi = ospf_if_is_configured (ospf_top, &addr)) == NULL)
+  if ((oi = ospf_if_is_configured (ospf, &addr)) == NULL)
     vty_out (vty, "No such interface address%s", VTY_NEWLINE);
   else
     {
@@ -3039,9 +3066,8 @@
 
 /* Show functions */
 int
-show_lsa_summary (struct ospf_lsa *lsa, void *v, int self)
+show_lsa_summary (struct vty *vty, struct ospf_lsa *lsa, int self)
 {
-  struct vty *vty = (struct vty *) v;
   struct router_lsa *rl;
   struct summary_lsa *sl;
   struct as_external_lsa *asel;
@@ -3500,10 +3526,9 @@
 /* Show detail LSA information
    -- if id is NULL then show all LSAs. */
 void
-show_lsa_detail (struct vty *vty, int type,
+show_lsa_detail (struct vty *vty, struct ospf *ospf, int type,
 		 struct in_addr *id, struct in_addr *adv_router)
 {
-  struct ospf *ospf = ospf_top;
   listnode node;
 
   switch (type)
@@ -3552,10 +3577,9 @@
 
 /* Show detail LSA information. */
 void
-show_lsa_detail_adv_router (struct vty *vty, int type,
+show_lsa_detail_adv_router (struct vty *vty, struct ospf *ospf, int type,
 			    struct in_addr *adv_router)
 {
-  struct ospf *ospf = ospf_top;
   listnode node;
 
   switch (type)
@@ -3585,9 +3609,10 @@
 }
 
 void
-show_ip_ospf_database_summary (struct vty *vty, int self)
+show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf_lsa *lsa;
+  struct route_node *rn;
   listnode node;
   int type;
 
@@ -3615,7 +3640,8 @@
                        VTY_NEWLINE, VTY_NEWLINE);
               vty_out (vty, "%s%s", show_database_header[type], VTY_NEWLINE);
 
-              foreach_lsa (AREA_LSDB (area, type), vty, self, show_lsa_summary);
+	      LSDB_LOOP (AREA_LSDB (area, type), rn, lsa)
+		show_lsa_summary (vty, lsa, self);
 
               vty_out (vty, "%s", VTY_NEWLINE);
 	  }
@@ -3642,7 +3668,10 @@
 	       VTY_NEWLINE, VTY_NEWLINE);
           vty_out (vty, "%s%s", show_database_header[type],
 	       VTY_NEWLINE);
-          foreach_lsa (AS_LSDB (ospf, type), vty, self, show_lsa_summary);
+
+	  LSDB_LOOP (AS_LSDB (ospf, type), rn, lsa)
+	    show_lsa_summary (vty, lsa, self);
+
           vty_out (vty, "%s", VTY_NEWLINE);
         }
     }
@@ -3651,9 +3680,8 @@
 }
 
 void
-show_ip_ospf_database_maxage (struct vty *vty)
+show_ip_ospf_database_maxage (struct vty *vty, struct ospf *ospf)
 {
-  struct ospf *ospf = ospf_top;
   listnode node;
   struct ospf_lsa *lsa;
 
@@ -3717,10 +3745,11 @@
        "OSPF information\n"
        "Database summary\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   int type, ret;
   struct in_addr id, adv_router;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return CMD_SUCCESS;
 
@@ -3730,7 +3759,7 @@
   /* Show all LSA. */
   if (argc == 0)
     {
-      show_ip_ospf_database_summary (vty, 0);
+      show_ip_ospf_database_summary (vty, ospf, 0);
       return CMD_SUCCESS;
     }
 
@@ -3751,12 +3780,12 @@
     type = OSPF_AS_EXTERNAL_LSA;
   else if (strncmp (argv[0], "se", 2) == 0)
     {
-      show_ip_ospf_database_summary (vty, 1);
+      show_ip_ospf_database_summary (vty, ospf, 1);
       return CMD_SUCCESS;
     }
   else if (strncmp (argv[0], "m", 1) == 0)
     {
-      show_ip_ospf_database_maxage (vty);
+      show_ip_ospf_database_maxage (vty, ospf);
       return CMD_SUCCESS;
     }
 #ifdef HAVE_OPAQUE_LSA
@@ -3772,7 +3801,7 @@
 
   /* `show ip ospf database LSA'. */
   if (argc == 1)
-    show_lsa_detail (vty, type, NULL, NULL);
+    show_lsa_detail (vty, ospf, type, NULL, NULL);
   else if (argc >= 2)
     {
       ret = inet_aton (argv[1], &id);
@@ -3781,7 +3810,7 @@
       
       /* `show ip ospf database LSA ID'. */
       if (argc == 2)
-	show_lsa_detail (vty, type, &id, NULL);
+	show_lsa_detail (vty, ospf, type, &id, NULL);
       /* `show ip ospf database LSA ID adv-router ADV_ROUTER'. */
       else if (argc == 3)
 	{
@@ -3793,7 +3822,7 @@
 	      if (!ret)
 		return CMD_WARNING;
 	    }
-	  show_lsa_detail (vty, type, &id, &adv_router);
+	  show_lsa_detail (vty, ospf, type, &id, &adv_router);
 	}
     }
 
@@ -3856,10 +3885,11 @@
        "Advertising Router link states\n"
        "Advertising Router (as an IP address)\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   int type, ret;
   struct in_addr adv_router;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return CMD_SUCCESS;
 
@@ -3905,7 +3935,7 @@
 	return CMD_WARNING;
     }
 
-  show_lsa_detail_adv_router (vty, type, &adv_router);
+  show_lsa_detail_adv_router (vty, ospf, type, &adv_router);
 
   return CMD_SUCCESS;
 }
@@ -4488,8 +4518,10 @@
   struct ospf_if_params *params;
   struct ospf_interface *oi;
   struct route_node *rn;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
       
+  ospf = ospf_lookup ();
+
   params = IF_DEF_PARAMS (ifp);
 
   seconds = strtol (argv[0], NULL, 10);
@@ -4568,8 +4600,10 @@
   struct ospf_if_params *params;
   struct ospf_interface *oi;
   struct route_node *rn;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   
+  ospf = ospf_lookup ();
+
   ifp = vty->index;
   params = IF_DEF_PARAMS (ifp);
 
@@ -5262,6 +5296,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int source;
   int type = -1;
   int metric = -1;
@@ -5281,11 +5316,11 @@
       return CMD_WARNING;
 
   if (argc == 4)
-    ospf_routemap_set (source, argv[3]);
+    ospf_routemap_set (ospf, source, argv[3]);
   else
-    ospf_routemap_unset (source);
+    ospf_routemap_unset (ospf, source);
   
-  return ospf_redistribute_set (source, type, metric);
+  return ospf_redistribute_set (ospf, source, type, metric);
 }
 
 ALIAS (ospf_redistribute_source_metric_type,
@@ -5332,6 +5367,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int source;
   int type = -1;
   int metric = -1;
@@ -5351,11 +5387,11 @@
       return CMD_WARNING;
 
   if (argc == 4)
-    ospf_routemap_set (source, argv[3]);
+    ospf_routemap_set (ospf, source, argv[3]);
   else
-    ospf_routemap_unset (source);
+    ospf_routemap_unset (ospf, source);
 
-  return ospf_redistribute_set (source, type, metric);
+  return ospf_redistribute_set (ospf, source, type, metric);
 }
 
 ALIAS (ospf_redistribute_source_type_metric,
@@ -5410,6 +5446,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int source;
   int metric = -1;
 
@@ -5423,11 +5460,11 @@
       return CMD_WARNING;
 
   if (argc == 3)
-    ospf_routemap_set (source, argv[2]);
+    ospf_routemap_set (ospf, source, argv[2]);
   else
-    ospf_routemap_unset (source);
+    ospf_routemap_unset (ospf, source);
   
-  return ospf_redistribute_set (source, -1, metric);
+  return ospf_redistribute_set (ospf, source, -1, metric);
 }
 
 DEFUN (ospf_redistribute_source_type_routemap,
@@ -5445,6 +5482,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int source;
   int type = -1;
 
@@ -5458,11 +5496,11 @@
       return CMD_WARNING;
 
   if (argc == 3)
-    ospf_routemap_set (source, argv[2]);
+    ospf_routemap_set (ospf, source, argv[2]);
   else
-    ospf_routemap_unset (source);
+    ospf_routemap_unset (ospf, source);
 
-  return ospf_redistribute_set (source, type, -1);
+  return ospf_redistribute_set (ospf, source, type, -1);
 }
 
 DEFUN (ospf_redistribute_source_routemap,
@@ -5477,6 +5515,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int source;
 
   /* Get distribute source. */
@@ -5484,11 +5523,11 @@
     return CMD_WARNING;
 
   if (argc == 2)
-    ospf_routemap_set (source, argv[1]);
+    ospf_routemap_set (ospf, source, argv[1]);
   else
-    ospf_routemap_unset (source);
+    ospf_routemap_unset (ospf, source);
 
-  return ospf_redistribute_set (source, -1, -1);
+  return ospf_redistribute_set (ospf, source, -1, -1);
 }
 
 DEFUN (no_ospf_redistribute_source,
@@ -5502,13 +5541,14 @@
        "Routing Information Protocol (RIP)\n"
        "Border Gateway Protocol (BGP)\n")
 {
+  struct ospf *ospf = vty->index;
   int source;
 
   if (!str2distribute_source (argv[0], &source))
     return CMD_WARNING;
 
-  ospf_routemap_unset (source);
-  return ospf_redistribute_unset (source);
+  ospf_routemap_unset (ospf, source);
+  return ospf_redistribute_unset (ospf, source);
 }
 
 DEFUN (ospf_distribute_list_out,
@@ -5569,6 +5609,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int type = -1;
   int metric = -1;
 
@@ -5583,11 +5624,12 @@
       return CMD_WARNING;
 
   if (argc == 3)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[2]);
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[2]);
   else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ZEBRA, type, metric);
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ZEBRA,
+					type, metric);
 }
 
 ALIAS (ospf_default_information_originate_metric_type_routemap,
@@ -5626,6 +5668,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int metric = -1;
 
   /* Get metric value. */
@@ -5634,11 +5677,12 @@
       return CMD_WARNING;
 
   if (argc == 2)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[1]);
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[1]);
   else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ZEBRA, -1, metric);
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ZEBRA,
+					-1, metric);
 }
 
 /* Default information originate. */
@@ -5650,12 +5694,14 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
-  if (argc == 1)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[0]);
-  else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+  struct ospf *ospf = vty->index;
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ZEBRA, -1, -1);
+  if (argc == 1)
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[0]);
+  else
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
+
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ZEBRA, -1, -1);
 }
 
 DEFUN (ospf_default_information_originate_type_metric_routemap,
@@ -5671,6 +5717,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int type = -1;
   int metric = -1;
 
@@ -5685,11 +5732,12 @@
       return CMD_WARNING;
 
   if (argc == 3)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[2]);
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[2]);
   else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ZEBRA, type, metric);
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ZEBRA,
+					type, metric);
 }
 
 ALIAS (ospf_default_information_originate_type_metric_routemap,
@@ -5723,6 +5771,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int type = -1;
 
   /* Get metric type. */
@@ -5731,11 +5780,12 @@
       return CMD_WARNING;
 
   if (argc == 2)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[1]);
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[1]);
   else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ZEBRA, type, -1);
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ZEBRA,
+					type, -1);
 }
 
 DEFUN (ospf_default_information_originate_always_metric_type_routemap,
@@ -5752,6 +5802,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int type = -1;
   int metric = -1;
 
@@ -5766,11 +5817,11 @@
       return CMD_WARNING;
 
   if (argc == 3)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[2]);
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[2]);
   else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ALWAYS,
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ALWAYS,
 					type, metric);
 }
 
@@ -5814,6 +5865,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int metric = -1;
 
   /* Get metric value. */
@@ -5822,11 +5874,12 @@
       return CMD_WARNING;
 
   if (argc == 2)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[1]);
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[1]);
   else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ALWAYS, -1, metric);
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ALWAYS,
+					-1, metric);
 }
 
 DEFUN (ospf_default_information_originate_always_routemap,
@@ -5838,12 +5891,14 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
-  if (argc == 1)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[0]);
-  else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+  struct ospf *ospf = vty->index;
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ALWAYS, -1, -1);
+  if (argc == 1)
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[0]);
+  else
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
+
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ALWAYS, -1, -1);
 }
 
 DEFUN (ospf_default_information_originate_always_type_metric_routemap,
@@ -5860,6 +5915,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int type = -1;
   int metric = -1;
 
@@ -5874,11 +5930,11 @@
       return CMD_WARNING;
 
   if (argc == 3)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[2]);
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[2]);
   else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ALWAYS,
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ALWAYS,
 					type, metric);
 }
 
@@ -5916,6 +5972,7 @@
        "Route map reference\n"
        "Pointer to route-map entries\n")
 {
+  struct ospf *ospf = vty->index;
   int type = -1;
 
   /* Get metric type. */
@@ -5924,11 +5981,11 @@
       return CMD_WARNING;
 
   if (argc == 2)
-    ospf_routemap_set (DEFAULT_ROUTE, argv[1]);
+    ospf_routemap_set (ospf, DEFAULT_ROUTE, argv[1]);
   else
-    ospf_routemap_unset (DEFAULT_ROUTE);
+    ospf_routemap_unset (ospf, DEFAULT_ROUTE);
 
-  return ospf_redistribute_default_set (DEFAULT_ORIGINATE_ALWAYS,
+  return ospf_redistribute_default_set (ospf, DEFAULT_ORIGINATE_ALWAYS,
 					type, -1);
 }
 
@@ -5955,8 +6012,8 @@
     EXTERNAL_INFO (DEFAULT_ROUTE) = NULL;
   }
 
-  ospf_routemap_unset (DEFAULT_ROUTE);
-  return ospf_redistribute_default_unset ();
+  ospf_routemap_unset (ospf, DEFAULT_ROUTE);
+  return ospf_redistribute_default_unset (ospf);
 }
 
 DEFUN (ospf_default_metric,
@@ -6326,7 +6383,9 @@
        "Distance value\n"
        "IP source prefix\n")
 {
-  ospf_distance_set (vty, argv[0], argv[1], NULL);
+  struct ospf *ospf = vty->index;
+
+  ospf_distance_set (vty, ospf, argv[0], argv[1], NULL);
 
   return CMD_SUCCESS;
 }
@@ -6339,7 +6398,10 @@
        "Distance value\n"
        "IP source prefix\n")
 {
-  ospf_distance_unset (vty, argv[0], argv[1], NULL);
+  struct ospf *ospf = vty->index;
+
+  ospf_distance_unset (vty, ospf, argv[0], argv[1], NULL);
+
   return CMD_SUCCESS;
 }
 
@@ -6351,7 +6413,10 @@
        "IP source prefix\n"
        "Access list name\n")
 {
-  ospf_distance_set (vty, argv[0], argv[1], argv[2]);
+  struct ospf *ospf = vty->index;
+
+  ospf_distance_set (vty, ospf, argv[0], argv[1], argv[2]);
+
   return CMD_SUCCESS;
 }
 
@@ -6364,7 +6429,10 @@
        "IP source prefix\n"
        "Access list name\n")
 {
-  ospf_distance_unset (vty, argv[0], argv[1], argv[2]);
+  struct ospf *ospf = vty->index;
+
+  ospf_distance_unset (vty, ospf, argv[0], argv[1], argv[2]);
+
   return CMD_SUCCESS;
 }
 
@@ -6527,8 +6595,9 @@
        "show all the ABR's and ASBR's\n"
        "for this area\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     {
       vty_out (vty, "OSPF is not enabled%s", VTY_NEWLINE);
@@ -6542,7 +6611,7 @@
     }
 
   /* Show Network routes.
-  show_ip_ospf_route_network (vty, ospf_top->new_table);   */
+  show_ip_ospf_route_network (vty, ospf->new_table);   */
 
   /* Show Router routes. */
   show_ip_ospf_route_router (vty, ospf->new_rtrs);
@@ -6559,8 +6628,9 @@
        "OSPF information\n"
        "OSPF routing table\n")
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     {
       vty_out (vty, "OSPF is not enabled%s", VTY_NEWLINE);
@@ -7032,13 +7102,13 @@
       {
         vty_out (vty, " redistribute %s", distribute_str[type]);
 	if (ospf->dmetric[type].value >= 0)
-	  vty_out (vty, " metric %d", ospf_top->dmetric[type].value);
+	  vty_out (vty, " metric %d", ospf->dmetric[type].value);
 	
         if (ospf->dmetric[type].type == EXTERNAL_METRIC_TYPE_1)
 	  vty_out (vty, " metric-type 1");
 
-	if (ROUTEMAP_NAME (type))
-	  vty_out (vty, " route-map %s", ROUTEMAP_NAME (type));
+	if (ROUTEMAP_NAME (ospf, type))
+	  vty_out (vty, " route-map %s", ROUTEMAP_NAME (ospf, type));
 	
         vty_out (vty, "%s", VTY_NEWLINE);
       }
@@ -7083,8 +7153,9 @@
 	  if (ospf->dmetric[DEFAULT_ROUTE].type == EXTERNAL_METRIC_TYPE_1)
 	    vty_out (vty, " metric-type 1");
 
-	  if (ROUTEMAP_NAME (DEFAULT_ROUTE))
-	    vty_out (vty, " route-map %s", ROUTEMAP_NAME (DEFAULT_ROUTE));
+	  if (ROUTEMAP_NAME (ospf, DEFAULT_ROUTE))
+	    vty_out (vty, " route-map %s",
+		     ROUTEMAP_NAME (ospf, DEFAULT_ROUTE));
 	  
 	  vty_out (vty, "%s", VTY_NEWLINE);
 	}
@@ -7134,10 +7205,11 @@
 int
 ospf_config_write (struct vty *vty)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   listnode node;
   int write = 0;
 
+  ospf = ospf_lookup ();
   if (ospf != NULL)
     {
       /* `router ospf' print. */
@@ -7182,7 +7254,7 @@
       config_write_ospf_redistribute (vty, ospf);
 
       /* passive-interface print. */
-      for (node = listhead (ospf->iflist); node; nextnode (node))
+      for (node = listhead (om->iflist); node; nextnode (node))
         {
           struct interface *ifp = getdata (node);
 
@@ -7642,5 +7714,3 @@
   /* Init zebra related vty commands. */
   ospf_vty_zebra_init ();
 }
-
-
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index baba11d..bdb0c0f 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -59,7 +59,7 @@
 ospf_interface_add (int command, struct zclient *zclient, zebra_size_t length)
 {
   struct interface *ifp;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   ifp = zebra_interface_add_read (zclient->ibuf);
 
@@ -82,7 +82,9 @@
 	IF_DEF_PARAMS (ifp)->type = OSPF_IFTYPE_LOOPBACK;
     }
 
-  ospf_if_update (ospf);
+  ospf = ospf_lookup ();
+  if (ospf != NULL)
+    ospf_if_update (ospf);
 
 #ifdef HAVE_SNMP
   ospf_snmp_if_update (ifp);
@@ -246,7 +248,7 @@
 ospf_interface_address_add (int command, struct zclient *zclient,
 			    zebra_size_t length)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct connected *c;
 
   c = zebra_interface_address_add_read (zclient->ibuf);
@@ -254,7 +256,9 @@
   if (c == NULL)
     return 0;
 
-  ospf_if_update (ospf);
+  ospf = ospf_lookup ();
+  if (ospf != NULL)
+    ospf_if_update (ospf);
 
 #ifdef HAVE_SNMP
   ospf_snmp_if_update (c->ifp);
@@ -267,7 +271,7 @@
 ospf_interface_address_delete (int command, struct zclient *zclient,
 			       zebra_size_t length)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct connected *c;
   struct interface *ifp;
   struct ospf_interface *oi;
@@ -299,7 +303,9 @@
 
   connected_free (c);
 
-  ospf_if_update (ospf);
+  ospf = ospf_lookup ();
+  if (ospf != NULL)
+    ospf_if_update (ospf);
 
   return 0;
 }
@@ -471,9 +477,8 @@
 }
 
 int
-ospf_redistribute_set (int type, int mtype, int mvalue)
+ospf_redistribute_set (struct ospf *ospf, int type, int mtype, int mvalue)
 {
-  struct ospf *ospf = ospf_top;
   int force = 0;
   
   if (ospf_is_type_redistributed (type))
@@ -515,10 +520,8 @@
 }
 
 int
-ospf_redistribute_unset (int type)
+ospf_redistribute_unset (struct ospf *ospf, int type)
 {
-  struct ospf *ospf = ospf_top;
-
   if (type == zclient->redist_default)
     return CMD_SUCCESS;
 
@@ -543,11 +546,11 @@
 }
 
 int
-ospf_redistribute_default_set (int originate, int mtype, int mvalue)
+ospf_redistribute_default_set (struct ospf *ospf, int originate,
+			       int mtype, int mvalue)
 {
-  struct ospf *ospf = ospf_top;
-
   int force = 0;
+
   if (ospf_is_type_redistributed (DEFAULT_ROUTE))
     {
       if (mtype != ospf->dmetric[DEFAULT_ROUTE].type)
@@ -594,10 +597,8 @@
 }
 
 int
-ospf_redistribute_default_unset ()
+ospf_redistribute_default_unset (struct ospf *ospf)
 {
-  struct ospf *ospf = ospf_top;
-
   if (!ospf_is_type_redistributed (DEFAULT_ROUTE))
     return CMD_SUCCESS;
 
@@ -616,10 +617,9 @@
 }
 
 int
-ospf_external_lsa_originate_check (struct external_info *ei)
+ospf_external_lsa_originate_check (struct ospf *ospf,
+				   struct external_info *ei)
 {
-  struct ospf *ospf = ospf_top;
-
   /* If prefix is multicast, then do not originate LSA. */
   if (IN_MULTICAST (htonl (ei->p.prefix.s_addr)))
     {
@@ -670,7 +670,7 @@
   if (changed)
     *changed = 0;
 
-  if (!ospf_external_lsa_originate_check (ei))
+  if (!ospf_external_lsa_originate_check (ospf, ei))
     return 0;
 
   /* Take care connected route. */
@@ -678,10 +678,10 @@
       !ospf_distribute_check_connected (ospf, ei))
     return 0;
 
-  if (!DEFAULT_ROUTE_TYPE (type) && DISTRIBUTE_NAME (type))
+  if (!DEFAULT_ROUTE_TYPE (type) && DISTRIBUTE_NAME (ospf, type))
     /* distirbute-list exists, but access-list may not? */
-    if (DISTRIBUTE_LIST (type))
-      if (access_list_apply (DISTRIBUTE_LIST (type), p) == FILTER_DENY)
+    if (DISTRIBUTE_LIST (ospf, type))
+      if (access_list_apply (DISTRIBUTE_LIST (ospf, type), p) == FILTER_DENY)
 	{
 	  if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))
 	    zlog_info ("Redistribute[%s]: %s/%d filtered by ditribute-list.",
@@ -694,11 +694,11 @@
   ospf_reset_route_map_set_values (&ei->route_map_set);
   
   /* apply route-map if needed */
-  if (ROUTEMAP_NAME (type))
+  if (ROUTEMAP_NAME (ospf, type))
     {
       int ret;
 
-      ret = route_map_apply (ROUTEMAP (type), (struct prefix *)p,
+      ret = route_map_apply (ROUTEMAP (ospf, type), (struct prefix *)p,
 			     RMAP_OSPF, ei);
 
       if (ret == RMAP_DENYMATCH)
@@ -722,23 +722,23 @@
 
 /* OSPF route-map set for redistribution */
 void
-ospf_routemap_set (int type, char *name)
+ospf_routemap_set (struct ospf *ospf, int type, char *name)
 {
-  if (ROUTEMAP_NAME (type))
-    free (ROUTEMAP_NAME (type));
+  if (ROUTEMAP_NAME (ospf, type))
+    free (ROUTEMAP_NAME (ospf, type));
 
-  ROUTEMAP_NAME (type) = strdup (name);
-  ROUTEMAP (type) = route_map_lookup_by_name (name);
+  ROUTEMAP_NAME (ospf, type) = strdup (name);
+  ROUTEMAP (ospf, type) = route_map_lookup_by_name (name);
 }
 
 void
-ospf_routemap_unset (int type)
+ospf_routemap_unset (struct ospf *ospf, int type)
 {
-  if (ROUTEMAP_NAME (type))
-    free (ROUTEMAP_NAME (type));
+  if (ROUTEMAP_NAME (ospf, type))
+    free (ROUTEMAP_NAME (ospf, type));
 
-  ROUTEMAP_NAME (type) = NULL;
-  ROUTEMAP (type) = NULL;
+  ROUTEMAP_NAME (ospf, type) = NULL;
+  ROUTEMAP (ospf, type) = NULL;
 }
 
 /* Zebra route add and delete treatment. */
@@ -752,7 +752,7 @@
   struct in_addr nexthop;
   struct prefix_ipv4 p;
   struct external_info *ei;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   s = zclient->ibuf;
   ifindex = 0;
@@ -785,6 +785,10 @@
   if (CHECK_FLAG (api.message, ZAPI_MESSAGE_METRIC))
     api.metric = stream_getl (s);
 
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
+    return 0;
+
   if (command == ZEBRA_IPV4_ROUTE_ADD)
     {
       ei = ospf_external_info_add (api.type, p, ifindex, nexthop);
@@ -833,17 +837,17 @@
 ospf_distribute_list_out_set (struct ospf *ospf, int type, char *name)
 {
   /* Lookup access-list for distribute-list. */
-  DISTRIBUTE_LIST (type) = access_list_lookup (AFI_IP, name);
+  DISTRIBUTE_LIST (ospf, type) = access_list_lookup (AFI_IP, name);
 
   /* Clear previous distribute-name. */
-  if (DISTRIBUTE_NAME (type))
-    free (DISTRIBUTE_NAME (type));
+  if (DISTRIBUTE_NAME (ospf, type))
+    free (DISTRIBUTE_NAME (ospf, type));
 
   /* Set distribute-name. */
-  DISTRIBUTE_NAME (type) = strdup (name);
+  DISTRIBUTE_NAME (ospf, type) = strdup (name);
 
   /* If access-list have been set, schedule update timer. */
-  if (DISTRIBUTE_LIST (type))
+  if (DISTRIBUTE_LIST (ospf, type))
     ospf_distribute_list_update (ospf, type);
 
   return CMD_SUCCESS;
@@ -853,17 +857,17 @@
 ospf_distribute_list_out_unset (struct ospf *ospf, int type, char *name)
 {
   /* Schedule update timer. */
-  if (DISTRIBUTE_LIST (type))
+  if (DISTRIBUTE_LIST (ospf, type))
     ospf_distribute_list_update (ospf, type);
 
   /* Unset distribute-list. */
-  DISTRIBUTE_LIST (type) = NULL;
+  DISTRIBUTE_LIST (ospf, type) = NULL;
 
   /* Clear distribute-name. */
-  if (DISTRIBUTE_NAME (type))
-    free (DISTRIBUTE_NAME (type));
+  if (DISTRIBUTE_NAME (ospf, type))
+    free (DISTRIBUTE_NAME (ospf, type));
   
-  DISTRIBUTE_NAME (type) = NULL;
+  DISTRIBUTE_NAME (ospf, type) = NULL;
 
   return CMD_SUCCESS;
 }
@@ -877,11 +881,15 @@
   struct route_table *rt;
   struct ospf_lsa *lsa;
   u_char type;
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
   type = (int) THREAD_ARG (thread);
   rt = EXTERNAL_INFO (type);
 
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
+    return 0;
+
   ospf->t_distribute_update = NULL;
 
   zlog_info ("Zebra[Redistribute]: distribute-list update timer fired!");
@@ -927,20 +935,21 @@
 void
 ospf_filter_update (struct access_list *access)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   int type;
   int abr_inv = 0;
   struct ospf_area *area;
   listnode node;
 
   /* If OSPF instatnce does not exist, return right now. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return;
 
   /* Update distribute-list, and apply filter. */
   for (type = 0; type < ZEBRA_ROUTE_MAX; type++)
     {
-      if (ROUTEMAP (type) != NULL)
+      if (ROUTEMAP (ospf, type) != NULL)
 	{
 	  /* if route-map is not NULL it may be using this access list */
 	  ospf_distribute_list_update (ospf, type);
@@ -948,22 +957,22 @@
 	}
       
 
-      if (DISTRIBUTE_NAME (type))
+      if (DISTRIBUTE_NAME (ospf, type))
 	{
 	  /* Keep old access-list for distribute-list. */
-	  struct access_list *old = DISTRIBUTE_LIST (type);
+	  struct access_list *old = DISTRIBUTE_LIST (ospf, type);
 	  
 	  /* Update access-list for distribute-list. */
-	  DISTRIBUTE_LIST (type) =
-	    access_list_lookup (AFI_IP, DISTRIBUTE_NAME (type));
+	  DISTRIBUTE_LIST (ospf, type) =
+	    access_list_lookup (AFI_IP, DISTRIBUTE_NAME (ospf, type));
 	  
 	  /* No update for this distribute type. */
-	  if (old == NULL && DISTRIBUTE_LIST (type) == NULL)
+	  if (old == NULL && DISTRIBUTE_LIST (ospf, type) == NULL)
 	    continue;
 	  
 	  /* Schedule distribute-list update timer. */
-	  if (DISTRIBUTE_LIST (type) == NULL ||
-	      strcmp (DISTRIBUTE_NAME (type), access->name) == 0)
+	  if (DISTRIBUTE_LIST (ospf, type) == NULL ||
+	      strcmp (DISTRIBUTE_NAME (ospf, type), access->name) == 0)
 	    ospf_distribute_list_update (ospf, type);
 	}
     }
@@ -986,7 +995,7 @@
       }
 
   /* Schedule ABR tasks -- this will be changed -- takada. */
-  if (OSPF_IS_ABR && abr_inv)
+  if (IS_OSPF_ABR (ospf) && abr_inv)
     ospf_schedule_abr_task (ospf);
 }
 
@@ -1007,15 +1016,14 @@
 }
 
 int
-ospf_distance_set (struct vty *vty, char *distance_str, char *ip_str,
-		   char *access_list_str)
+ospf_distance_set (struct vty *vty, struct ospf *ospf, char *distance_str,
+		   char *ip_str, char *access_list_str)
 {
   int ret;
   struct prefix_ipv4 p;
   u_char distance;
   struct route_node *rn;
   struct ospf_distance *odistance;
-  struct ospf *ospf = ospf_top;
 
   ret = str2prefix_ipv4 (ip_str, &p);
   if (ret == 0)
@@ -1055,15 +1063,14 @@
 }
 
 int
-ospf_distance_unset (struct vty *vty, char *distance_str, char *ip_str,
-		     char *access_list_str)
+ospf_distance_unset (struct vty *vty, struct ospf *ospf, char *distance_str,
+		     char *ip_str, char *access_list_str)
 {
   int ret;
   struct prefix_ipv4 p;
   u_char distance;
   struct route_node *rn;
   struct ospf_distance *odistance;
-  struct ospf *ospf = ospf_top;
 
   ret = str2prefix_ipv4 (ip_str, &p);
   if (ret == 0)
@@ -1114,8 +1121,9 @@
 u_char
 ospf_distance_apply (struct prefix_ipv4 *p, struct ospf_route *or)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return 0;
 
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index a98d5be..099af55 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -52,8 +52,12 @@
 #include "ospfd/ospf_route.h"
 #include "ospfd/ospf_ase.h"
 
-/* OSPF instance top. */
-struct ospf *ospf_top;
+
+/* OSPF process wide configuration. */
+static struct ospf_master ospf_master;
+
+/* OSPF process wide configuration pointer to export. */
+struct ospf_master *om;
 
 extern struct zclient *zclient;
 
@@ -148,7 +152,7 @@
 int
 ospf_router_id_update_timer (struct thread *thread)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf = THREAD_ARG (thread);
 
   if (IS_DEBUG_OSPF_EVENT)
     zlog_info ("Router-ID: Update timer fired!");
@@ -182,7 +186,6 @@
   new->router_id_static.s_addr = htonl (0);
 
   new->abr_type = OSPF_ABR_STAND;
-  new->iflist = iflist;
   new->oiflist = list_new ();
   new->vlinks = list_new ();
   new->areas = list_new ();
@@ -235,23 +238,44 @@
 }
 
 struct ospf *
+ospf_lookup ()
+{
+  if (listcount (om->ospf) == 0)
+    return NULL;
+
+  return getdata (listhead (om->ospf));
+}
+
+void
+ospf_add (struct ospf *ospf)
+{
+  listnode_add (om->ospf, ospf);
+}
+
+void
+ospf_delete (struct ospf *ospf)
+{
+  listnode_delete (om->ospf, ospf);
+}
+
+struct ospf *
 ospf_get ()
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
 
-  if (ospf != NULL)
-    return ospf;
+  ospf = ospf_lookup ();
+  if (ospf == NULL)
+    {
+      ospf = ospf_new ();
+      ospf_add (ospf);
 
-  ospf = ospf_new ();
-
-  if (ospf->router_id_static.s_addr == 0)
-    ospf_router_id_update (ospf);
+      if (ospf->router_id_static.s_addr == 0)
+	ospf_router_id_update (ospf);
 
 #ifdef HAVE_OPAQUE_LSA
-  ospf_opaque_type11_lsa_init (ospf);
+      ospf_opaque_type11_lsa_init (ospf);
 #endif /* HAVE_OPAQUE_LSA */
-
-  ospf_top = ospf;
+    }
 
   return ospf;
 }
@@ -271,7 +295,7 @@
 
   /* Unredister redistribution */
   for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
-    ospf_redistribute_unset (i);
+    ospf_redistribute_unset (ospf, i);
 
   for (node = listhead (ospf->areas); node;)
     {
@@ -420,9 +444,9 @@
   ospf_distance_reset (ospf);
   route_table_finish (ospf->distance_table);
 
-  XFREE (MTYPE_OSPF_TOP, ospf);
+  ospf_delete (ospf);
 
-  ospf_top = NULL;
+  XFREE (MTYPE_OSPF_TOP, ospf);
 }
 
 
@@ -706,13 +730,12 @@
   if (ospf->router_id_static.s_addr == 0)
     if (ospf->t_router_id_update == NULL)
       {
-	ospf->t_router_id_update = 
-	  thread_add_timer (master, ospf_router_id_update_timer, ospf,
-			    OSPF_ROUTER_ID_UPDATE_DELAY);
+	OSPF_TIMER_ON (ospf->t_router_id_update, ospf_router_id_update_timer,
+		       OSPF_ROUTER_ID_UPDATE_DELAY);
       }
 
   /* Get target interface. */
-  for (node = listhead (ospf->iflist); node; nextnode (node))
+  for (node = listhead (om->iflist); node; nextnode (node))
     {
       listnode cn;
       
@@ -845,9 +868,9 @@
       if (ospf->router_id_static.s_addr == 0)
         if (ospf->t_router_id_update == NULL)
           {
-            ospf->t_router_id_update =
-              thread_add_timer (master, ospf_router_id_update_timer, NULL,
-                                OSPF_ROUTER_ID_UPDATE_DELAY);
+	    OSPF_TIMER_ON (ospf->t_router_id_update,
+			   ospf_router_id_update_timer,
+			   OSPF_ROUTER_ID_UPDATE_DELAY);
           }
 
       /* Find interfaces that not configured already.  */
@@ -1586,12 +1609,13 @@
 void
 ospf_prefix_list_update (struct prefix_list *plist)
 {
-  struct ospf *ospf = ospf_top;
+  struct ospf *ospf;
   struct ospf_area *area;
   listnode node;
   int abr_inv = 0;
 
   /* If OSPF instatnce does not exist, return right now. */
+  ospf = ospf_lookup ();
   if (ospf == NULL)
     return;
 
@@ -1620,16 +1644,24 @@
     }
 
   /* Schedule ABR tasks. */
-  if (OSPF_IS_ABR && abr_inv)
+  if (IS_OSPF_ABR (ospf) && abr_inv)
     ospf_schedule_abr_task (ospf);
 }
 
 void
+ospf_master_init ()
+{
+  memset (&ospf_master, 0, sizeof (struct ospf_master));
+
+  om = &ospf_master;
+  om->ospf = list_new ();
+  om->master = thread_master_create ();
+  om->start_time = time (NULL);
+}
+
+void
 ospf_init ()
 {
-  /* Make empty list of ospf list. */
-  ospf_top = NULL;
-
   prefix_list_add_hook (ospf_prefix_list_update);
   prefix_list_delete_hook (ospf_prefix_list_update);
 }
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index be80621..f842486 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -125,6 +125,29 @@
 #define OSPF_LS_REFRESH_SHIFT       (60 * 15)
 #define OSPF_LS_REFRESH_JITTER      60
 
+/* OSPF master for system wide configuration and variables. */
+struct ospf_master
+{
+  /* OSPF instance. */
+  struct list *ospf;
+
+  /* OSPF thread master. */
+  struct thread_master *master;
+
+  /* Zebra interface list. */
+  struct list *iflist;
+
+  /* Redistributed external information. */
+  struct route_table *external_info[ZEBRA_ROUTE_MAX + 1];
+#define EXTERNAL_INFO(T)      om->external_info[T]
+
+  /* OSPF start time. */
+  time_t start_time;
+
+  /* Various OSPF global configuration. */
+  u_char options;
+};
+
 /* OSPF instance structure. */
 struct ospf
 {
@@ -175,16 +198,11 @@
   struct route_table *nbr_nbma;
   struct ospf_area *backbone;           /* Pointer to the Backbone Area. */
 
-  list iflist;                          /* Zebra derived interfaces. */
   list oiflist;                         /* ospf interfaces */
 
   /* LSDB of AS-external-LSAs. */
   struct ospf_lsdb *lsdb;
   
-  /* Redistributed external information. */
-  struct route_table *external_info[ZEBRA_ROUTE_MAX + 1];
-#define EXTERNAL_INFO(T)      ospf_top->external_info[T]
-
   /* Flags. */
   int external_origin;			/* AS-external-LSA origin flag. */
   int ase_calc;				/* ASE calculation flag. */
@@ -238,8 +256,8 @@
     char *name;
     struct access_list *list;
   } dlist[ZEBRA_ROUTE_MAX];
-#define DISTRIBUTE_NAME(T)    ospf_top->dlist[T].name
-#define DISTRIBUTE_LIST(T)    ospf_top->dlist[T].list
+#define DISTRIBUTE_NAME(O,T)    (O)->dlist[T].name
+#define DISTRIBUTE_LIST(O,T)    (O)->dlist[T].list
 
   /* Redistribute metric info. */
   struct 
@@ -255,8 +273,8 @@
     char *name;
     struct route_map *map;
   } route_map [ZEBRA_ROUTE_MAX + 1]; /* +1 is for default-information */
-#define ROUTEMAP_NAME(T)   ospf_top->route_map[T].name
-#define ROUTEMAP(T)        ospf_top->route_map[T].map
+#define ROUTEMAP_NAME(O,T)   (O)->route_map[T].name
+#define ROUTEMAP(O,T)        (O)->route_map[T].map
   
   int default_metric;		/* Default metric for redistribute. */
 
@@ -438,8 +456,8 @@
 #define OSPF_AREA_SAME(X,Y) \
         (memcmp ((X->area_id), (Y->area_id), IPV4_MAX_BYTELEN) == 0)
 
-#define OSPF_IS_ABR		(ospf_top->flags & OSPF_FLAG_ABR)
-#define OSPF_IS_ASBR		(ospf_top->flags & OSPF_FLAG_ASBR)
+#define IS_OSPF_ABR(O)		((O)->flags & OSPF_FLAG_ABR)
+#define IS_OSPF_ASBR(O)		((O)->flags & OSPF_FLAG_ASBR)
 
 #define OSPF_IS_AREA_ID_BACKBONE(I) ((I).s_addr == OSPF_AREA_BACKBONE)
 #define OSPF_IS_AREA_BACKBONE(A) OSPF_IS_AREA_ID_BACKBONE ((A)->area_id)
@@ -487,7 +505,8 @@
         }                                                                     \
     } while (0)
 
-/* Messages */
+/* Extern variables. */
+extern struct ospf_master *om;
 extern struct message ospf_ism_state_msg[];
 extern struct message ospf_nsm_state_msg[];
 extern struct message ospf_lsa_type_msg[];
@@ -502,10 +521,10 @@
 extern int ospf_network_type_msg_max;
 extern struct zclient *zclient;
 extern struct thread_master *master;
-extern struct ospf *ospf_top;
 extern int ospf_zlog;
 
 /* Prototypes. */
+struct ospf *ospf_lookup ();
 struct ospf *ospf_get ();
 void ospf_finish (struct ospf *);
 int ospf_router_id_update_timer (struct thread *);
@@ -556,4 +575,6 @@
 void ospf_route_map_init ();
 void ospf_snmp_init ();
 
+void ospf_master_init ();
+
 #endif /* _ZEBRA_OSPFD_H */
