From: Leandro Lucarella Date: Sun, 2 Jul 2006 06:05:54 +0000 (+0000) Subject: Se mueve el número de protocolo del nameserver a resolvproto. X-Git-Tag: svn_import~17 X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/commitdiff_plain/ee2c9342f9c89340987e8f4cfec54a7c05c532a8?ds=inline Se mueve el número de protocolo del nameserver a resolvproto. --- diff --git a/practicas/pipi/src/nameserver.cpp b/practicas/pipi/src/nameserver.cpp index 86f18e8..b007975 100644 --- a/practicas/pipi/src/nameserver.cpp +++ b/practicas/pipi/src/nameserver.cpp @@ -364,7 +364,7 @@ void NameServer::recv_loop() << " de " << src << " para " << dst << " (proto = " << unsigned(proto) << ")\n"; #endif - if (proto == NAMESERVER_PROTO) // Si es para nosotros + if (proto == RESOLV_PROTO) // Si es para nosotros { rp_pkt_type_t type; memcpy(&type, s.c_str(), sizeof(uint8_t)); @@ -407,7 +407,7 @@ void NameServer::send_loop() #ifdef DEBUG_RESOLV std::cout << "NameServer::send_loop() -> respondo " << res << "\n"; #endif - ipout.send(res, NAMESERVER_PROTO, IPAddr(mac)); + ipout.send(res, RESOLV_PROTO, IPAddr(mac)); } else if (!snd_que.empty()) // Hay un request para enviar { @@ -417,7 +417,7 @@ void NameServer::send_loop() std::cout << "NameServer::send_loop() -> envío request " << ResolvProtoRequest(buf) << "\n"; #endif - ipout.send(buf, NAMESERVER_PROTO, IPAddr(mac)); + ipout.send(buf, RESOLV_PROTO, IPAddr(mac)); } else // No hay nada, esperamos un rato { diff --git a/practicas/pipi/src/nameserver.h b/practicas/pipi/src/nameserver.h index d9b8a4f..4165b58 100644 --- a/practicas/pipi/src/nameserver.h +++ b/practicas/pipi/src/nameserver.h @@ -11,8 +11,6 @@ #include #include -#define NAMESERVER_PROTO 59 - /// Petición del resolver a un nameserver struct NameServer { diff --git a/practicas/pipi/src/resolvproto.h b/practicas/pipi/src/resolvproto.h index 2100771..5874fbe 100644 --- a/practicas/pipi/src/resolvproto.h +++ b/practicas/pipi/src/resolvproto.h @@ -9,6 +9,9 @@ #include #include +/// Número de protocolo del resolver +#define RESOLV_PROTO 59 + /// Tipo de petición enum rp_pkt_type_t {