cached.setRemote(&P->remote); // inlined
cached.setSocket(P->getSocket()); // inlined
cached.spoofID(P->d.id); // inlined
+ cached.setMaxReplyLen(P->getMaxReplyLen());
cached.d.rd=P->d.rd; // copy in recursion desired bit
cached.commitD(); // commit d to the packet inlined
return d_maxreplylen;
}
+void DNSPacket::setMaxReplyLen(int bytes)
+{
+ d_maxreplylen=bytes;
+}
+
//! Use this to set where this packet was received from or should be sent to
void DNSPacket::setRemote(const ComboAddress *s)
{
void commitD(); //!< copies 'd' into the stringbuffer
int getMaxReplyLen(); //!< retrieve the maximum length of the packet we should send in response
+ void setMaxReplyLen(int bytes); //!< set the max reply len (used when retrieving from the packet cache, and this changed)
bool couldBeCached(); //!< returns 0 if this query should bypass the packet cache