Parcourir la source

Uncomment the lookup function

And update the interface.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac408@3470 e5f2f494-b856-4b98-b285-d166d9295462
Michal Vaner il y a 14 ans
Parent
commit
105f74cdbe

+ 14 - 1
src/lib/nsas/nameserver_address_store.cc

@@ -24,6 +24,10 @@
 #include "nameserver_address_store.h"
 #include "zone_entry.h"
 
+using namespace isc::dns;
+using namespace std;
+using namespace boost;
+
 namespace isc {
 namespace nsas {
 
@@ -37,8 +41,17 @@ NameserverAddressStore::NameserverAddressStore(uint32_t zonehashsize,
     zone_hash_(new NsasEntryCompare<ZoneEntry>, zonehashsize),
     nameserver_hash_(new NsasEntryCompare<NameserverEntry>, nshashsize),
     zone_lru_((3 * zonehashsize), new HashDeleter<ZoneEntry>(zone_hash_)),
-    nameserver_lru_((3 * nshashsize), new HashDeleter<NameserverEntry>(nameserver_hash_))
+    nameserver_lru_((3 * nshashsize), new HashDeleter<NameserverEntry>(
+        nameserver_hash_))
+{
+}
+
+void
+NameserverAddressStore::lookup(const std::string& , uint16_t ,
+    const AbstractRRset& , const vector<AbstractRRset>& ,
+    shared_ptr<AddressRequestCallback> )
 {
+    // TODO Implement
 }
 
 } // namespace nsas

+ 5 - 3
src/lib/nsas/nameserver_address_store.h

@@ -67,15 +67,17 @@ public:
     /// Looks up the address of a nameserver in the zone.
     ///
     /// \param zone Name of zone for which an address is required.
+    /// \param class_code Class of the zone.
     /// \param authority Authority RRset from the referral containing the
     /// nameservers that serve the zone.
     /// \param additional Additional RRset(s) for authority information.  These
     /// are taken from the referral.
     /// \param callback Callback object used to pass the result back to the
     /// caller.
-    /* void lookup(const std::string& zone, isc::dns::AbstractRRset& authority,
-        const std::vector<isc::dns::AbstractRRset>& additional
-        boost::shared_ptr<isc::dns::AddressRequestCallback> callback ); */
+    void lookup(const std::string& zone, uint16_t class_code,
+        const isc::dns::AbstractRRset& authority,
+        const std::vector<isc::dns::AbstractRRset>& additional,
+        boost::shared_ptr<AddressRequestCallback> callback);
 
     /// \brief Protected Members
     ///