ospf6d: complete SNMP implementation of ospfv3AreaTable
diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h
index c7c5ee3..e8a4fbd 100644
--- a/ospf6d/ospf6_area.h
+++ b/ospf6d/ospf6_area.h
@@ -57,6 +57,7 @@
 
   struct thread  *thread_spf_calculation;
   struct thread  *thread_route_calculation;
+  u_int32_t spf_calculation;	/* SPF calculation count */
 
   struct thread *thread_router_lsa;
   struct thread *thread_intra_prefix_lsa;
diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c
index 9f333a8..293d66a 100644
--- a/ospf6d/ospf6_snmp.c
+++ b/ospf6d/ospf6_snmp.c
@@ -449,10 +449,14 @@
                  int exact, size_t *var_len, WriteMethod **write_method)
 {
   struct ospf6_area *oa, *area = NULL;
+  struct ospf6_lsa *lsa = NULL;
   u_int32_t area_id = 0;
+  u_int32_t count;
+  u_int16_t sum;
   struct listnode *node;
   unsigned int len;
   char a[16];
+  struct ospf6_route *ro;
 
   if (ospf6 == NULL)
     return NULL;
@@ -498,15 +502,37 @@
   switch (v->magic)
     {
     case OSPFv3IMPORTASEXTERN:
-      return SNMP_INTEGER (ospf6->external_table->count);
-      break;
+      /* No NSSA support */
+      return SNMP_INTEGER (IS_AREA_STUB(area)?2:1);
     case OSPFv3AREASPFRUNS:
+      return SNMP_INTEGER (area->spf_calculation);
     case OSPFv3AREABDRRTRCOUNT:
     case OSPFv3AREAASBDRRTRCOUNT:
+      count = 0;
+      for (ro = ospf6_route_head (ospf6->brouter_table); ro;
+	   ro = ospf6_route_next (ro))
+        {
+          if (ntohl (ro->path.area_id) != ntohl (area->area_id)) continue;
+          if (v->magic == OSPFv3AREABDRRTRCOUNT &&
+              CHECK_FLAG (ro->path.router_bits, OSPF6_ROUTER_BIT_B))
+            count++;
+          if (v->magic == OSPFv3AREAASBDRRTRCOUNT &&
+              CHECK_FLAG (ro->path.router_bits, OSPF6_ROUTER_BIT_E))
+            count++;
+        }
+      return SNMP_INTEGER (count);
     case OSPFv3AREASCOPELSACOUNT:
+      return SNMP_INTEGER (area->lsdb->count);
     case OSPFv3AREASCOPELSACKSUMSUM:
+      for (sum = 0, lsa = ospf6_lsdb_head (area->lsdb);
+	   lsa;
+	   lsa = ospf6_lsdb_next (lsa))
+	sum += ntohs (lsa->header->checksum);
+      return SNMP_INTEGER (sum);
     case OSPFv3AREASUMMARY:
+      return SNMP_INTEGER (2); /* sendAreaSummary */
     case OSPFv3AREAROWSTATUS:
+      return SNMP_INTEGER (1); /* Active */
     case OSPFv3AREASTUBMETRIC:
     case OSPFv3AREANSSATRANSLATORROLE:
     case OSPFv3AREANSSATRANSLATORSTATE:
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index a4a5b72..da0ee13 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -473,6 +473,8 @@
     }
 
   pqueue_delete (candidate_list);
+
+  oa->spf_calculation++;
 }
 
 static void