#define _NAMESERVER_H_
#include "ipaddr.h"
-//XXX#include "resolvproto.h"
+#include "resolvproto.h"
#include <string>
#include <vector>
#include <map>
/// Time to live
size_t ttl;
/// Dirección IP del registro
- typedef std::vector< Record > records_t;
- records_t records;
+ typedef ResolvProtoResponse::ipvec_t ipvec_t;
+ ipvec_t ips;
/// Constructor
CacheRecord(): ttl(0) {}
- CacheRecord(size_t ttl, const records_t& records):
- ttl(ttl), records(records) {}
+ CacheRecord(size_t ttl, const ipvec_t& ips):
+ ttl(ttl), ips(ips) {}
};
/// Cache de records
NameServer(std::istream& is) throw (std::runtime_error);
/// Resuelve un nombre de forma no recursiva
- void resolv_next(const Name& n);
+ ResolvProtoResponse resolv_next(const Name& n);
};
/// Impresión (para debug)