X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/46098de47811c686844e5cb8b1d8f1b59586e6b8..c048ca1252065d6705763043eb2ff750d95e52e9:/practicas/pipi/src/nameserver.h diff --git a/practicas/pipi/src/nameserver.h b/practicas/pipi/src/nameserver.h index d0fa98d..24b8e86 100644 --- a/practicas/pipi/src/nameserver.h +++ b/practicas/pipi/src/nameserver.h @@ -2,7 +2,7 @@ #define _NAMESERVER_H_ #include "ipaddr.h" -//XXX#include "resolvproto.h" +#include "resolvproto.h" #include #include #include @@ -65,12 +65,12 @@ struct NameServer /// 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 @@ -81,7 +81,7 @@ struct NameServer 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)