"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pdns/dnspacket.hh" between
pdns-auth-4.1.13.tar.gz and pdns-auth-4.2.0.tar.gz

About: PowerDNS Authoritative Nameserver is a versatile nameserver which supports a large number of backends (that can either be plain zone files or be more dynamic in nature).

dnspacket.hh  (pdns-auth-4.1.13):dnspacket.hh  (pdns-auth-4.2.0)
skipping to change at line 32 skipping to change at line 32
#ifndef DNSPACKET_HH #ifndef DNSPACKET_HH
#define DNSPACKET_HH #define DNSPACKET_HH
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
#include <cstdlib> #include <cstdlib>
#include <sys/types.h> #include <sys/types.h>
#include "iputils.hh" #include "iputils.hh"
#include "ednssubnet.hh" #include "ednssubnet.hh"
#include <unordered_set>
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <vector> #include <vector>
#include "qtype.hh" #include "qtype.hh"
skipping to change at line 121 skipping to change at line 121
vector<DNSZoneRecord*> getAnswerRecords(); //!< get a vector with DNSZoneRecor ds that are answers vector<DNSZoneRecord*> getAnswerRecords(); //!< get a vector with DNSZoneRecor ds that are answers
void setCompress(bool compress); void setCompress(bool compress);
DNSPacket *replyPacket() const; //!< convenience function that creates a virgi n answer packet to this question DNSPacket *replyPacket() const; //!< convenience function that creates a virgi n answer packet to this question
void commitD(); //!< copies 'd' into the stringbuffer void commitD(); //!< copies 'd' into the stringbuffer
unsigned int getMaxReplyLen(); //!< retrieve the maximum length of the packet we should send in response unsigned 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 retrievi ng from the packet cache, and this changed) void setMaxReplyLen(int bytes); //!< set the max reply len (used when retrievi ng from the packet cache, and this changed)
bool couldBeCached(); //!< returns 0 if this query should bypass the packet ca che bool couldBeCached(); //!< returns 0 if this query should bypass the packet ca che
bool hasEDNSSubnet(); bool hasEDNSSubnet() const;
bool hasEDNS(); bool hasEDNS();
uint8_t getEDNSVersion() const { return d_ednsversion; }; uint8_t getEDNSVersion() const { return d_ednsversion; };
void setEDNSRcode(uint16_t extRCode) void setEDNSRcode(uint16_t extRCode)
{ {
// WARNING: this is really 12 bits // WARNING: this is really 12 bits
d_ednsrcode=extRCode; d_ednsrcode=extRCode;
}; };
uint8_t getEDNSRCode() const { return d_ednsrcode; }; uint8_t getEDNSRCode() const { return d_ednsrcode; };
uint32_t getHash() const { return d_hash; }; uint32_t getHash() const { return d_hash; };
void setHash(uint32_t hash) { d_hash = hash; }; void setHash(uint32_t hash) { d_hash = hash; };
//////// DATA ! //////// DATA !
DNSName qdomain; //!< qname of the question 4 - unsure how this is used DNSName qdomain; //!< qname of the question 4 - unsure how this is used
DNSName qdomainwild; //!< wildcard matched by qname, used by LuaPolicyEngine DNSName qdomainwild; //!< wildcard matched by qname, used by LuaPolicyEngine
DNSName qdomainzone; //!< zone name for the answer (as reflected in SOA for n egative responses), used by LuaPolicyEngine DNSName qdomainzone; //!< zone name for the answer (as reflected in SOA for n egative responses), used by LuaPolicyEngine
string d_peer_principal; string d_peer_principal;
const DNSName& getTSIGKeyname() const; const DNSName& getTSIGKeyname() const;
uint16_t qclass; //!< class of the question - should always be INternet 2
struct dnsheader d; //!< dnsheader at the start of the databuffer 12 struct dnsheader d; //!< dnsheader at the start of the databuffer 12
QType qtype; //!< type of the question 2
TSIGRecordContent d_trc; //72 TSIGRecordContent d_trc; //72
ComboAddress d_remote; //28 ComboAddress d_remote; //28
TSIGHashEnum d_tsig_algo; //4 TSIGHashEnum d_tsig_algo{TSIG_MD5}; //4
int d_ednsRawPacketSizeLimit{-1}; // only used for Lua record
uint16_t qclass{QClass::IN}; //!< class of the question - should always be IN
ternet 2
QType qtype; //!< type of the question 2
bool d_tcp; bool d_tcp{false};
bool d_dnssecOk; bool d_dnssecOk{false};
bool d_havetsig; bool d_havetsig{false};
bool getTSIGDetails(TSIGRecordContent* tr, DNSName* keyname, uint16_t* tsigPos =nullptr) const; bool getTSIGDetails(TSIGRecordContent* tr, DNSName* keyname, uint16_t* tsigPos =nullptr) const;
void setTSIGDetails(const TSIGRecordContent& tr, const DNSName& keyname, const string& secret, const string& previous, bool timersonly=false); void setTSIGDetails(const TSIGRecordContent& tr, const DNSName& keyname, const string& secret, const string& previous, bool timersonly=false);
bool getTKEYRecord(TKEYRecordContent* tr, DNSName* keyname) const; bool getTKEYRecord(TKEYRecordContent* tr, DNSName* keyname) const;
vector<DNSZoneRecord>& getRRS() { return d_rrs; } vector<DNSZoneRecord>& getRRS() { return d_rrs; }
bool checkForCorrectTSIG(UeberBackend* B, DNSName* keyname, string* secret, TS IGRecordContent* trc) const; bool checkForCorrectTSIG(UeberBackend* B, DNSName* keyname, string* secret, TS IGRecordContent* trc) const;
static uint16_t s_udpTruncationThreshold;
static bool s_doEDNSSubnetProcessing; static bool s_doEDNSSubnetProcessing;
static uint16_t s_udpTruncationThreshold; //2
private: private:
void pasteQ(const char *question, int length); //!< set the question of this p acket, useful for crafting replies void pasteQ(const char *question, int length); //!< set the question of this p acket, useful for crafting replies
bool d_wrapped; // 1
int d_socket; // 4
string d_tsigsecret; string d_tsigsecret;
DNSName d_tsigkeyname; DNSName d_tsigkeyname;
string d_tsigprevious; string d_tsigprevious;
vector<DNSZoneRecord> d_rrs; // 8 vector<DNSZoneRecord> d_rrs; // 8
std::unordered_set<size_t> d_dedup;
string d_rawpacket; // this is where everything lives 8 string d_rawpacket; // this is where everything lives 8
string d_ednsping;
EDNSSubnetOpts d_eso; EDNSSubnetOpts d_eso;
int d_maxreplylen; int d_maxreplylen{0};
uint8_t d_ednsversion; int d_socket{-1}; // 4
// WARNING! This is really 12 bits
uint16_t d_ednsrcode;
uint32_t d_hash{0}; uint32_t d_hash{0};
// WARNING! This is really 12 bits
uint16_t d_ednsrcode{0};
uint8_t d_ednsversion{0};
bool d_compress; // 1 bool d_wrapped{false}; // 1
bool d_tsigtimersonly; bool d_compress{true}; // 1
bool d_wantsnsid; bool d_tsigtimersonly{false};
bool d_haveednssubnet; bool d_wantsnsid{false};
bool d_haveednssection; bool d_haveednssubnet{false};
bool d_haveednssection{false};
bool d_isQuery; bool d_isQuery;
}; };
#endif #endif
 End of changes. 14 change blocks. 
24 lines changed or deleted 25 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)