+#ifdef DEBUG_TRACE
+ std::cout << "NameServer::send_loop()\n";
+#endif
+ while (true)
+ {
+ Dev::mac_type mac = 0;
+ std::string buf = snd_que.receive(mac);
+#ifdef DEBUG_RESOLV
+ uint8_t type;
+ memcpy(&type, buf.data(), sizeof(uint8_t));
+ std::cout << "NameServer::send_loop() -> envío ";
+ if (type == RP_REQ_DIRECT || type == RP_REQ_RECURSIVE)
+ std::cout << "request " << ResolvProtoRequest(buf) << "\n";
+ else
+ std::cout << "response " << ResolvProtoResponse(buf) << "\n";
+#endif
+ ipout.send(buf, RESOLV_PROTO, IPAddr(mac));
+ }
+}
+
+void NameServer::req_loop()
+{
+#ifdef DEBUG_TRACE
+ std::cout << "NameServer::req_loop()\n";
+#endif