A node in the DNS tree. More...
#include <dns-storage.hh>
Classes | |
| struct | DNSNodeCmp |
Public Member Functions | |
| DNSNode () | |
| DNSNode (const DNSLabel &lab, DNSNode *parent) | |
| ~DNSNode () | |
| const DNSNode * | find (DNSName &name, DNSName &last, bool wildcards=false, const DNSNode **passedZonecut=0, const DNSNode **passedWcard=0) const |
| This is the key function that finds names, returns where it found them and if any zonecuts were passsed. More... | |
| DNSNode * | add (DNSName name) |
| This is an idempotent way to add a node to a DNS tree. More... | |
| const DNSNode * | next () const |
| const DNSNode * | prev () const |
| DNSName | getName () const |
| void | addRRs (std::unique_ptr< RRGen > &&a) |
| add one RRGen to this node More... | |
| template<typename... Types> | |
| void | addRRs (std::unique_ptr< RRGen > &&a, Types &&...args) |
| add multiple RRGen to this node More... | |
Public Attributes | |
| DNSLabel | d_name |
| DNSNode * | d_parent {0} |
| std::set< DNSNode, DNSNodeCmp > | children |
| children, found by DNSLabel More... | |
| std::map< DNSType, RRSet > | rrsets |
| std::unique_ptr< DNSNode > | zone |
| if this is set, this node is a zone More... | |
| uint16_t | namepos {0} |
| for label compression, we also use DNSNodes More... | |
A node in the DNS tree.
|
inline |
|
default |
This is an idempotent way to add a node to a DNS tree.
Idempotent way of creating/accessing the DNSName in a tree.
|
inline |
| const DNSNode * DNSNode::find | ( | DNSName & | name, |
| DNSName & | last, | ||
| bool | wildcards = false, |
||
| const DNSNode ** | passedZonecut = 0, |
||
| const DNSNode ** | passedWcard = 0 |
||
| ) | const |
This is the key function that finds names, returns where it found them and if any zonecuts were passsed.
The big RFC 1034-compatible find function. Will perform wildcard synth if requested & let you know about it.
|
inline |
| const DNSNode * DNSNode::next | ( | ) | const |
| const DNSNode * DNSNode::prev | ( | ) | const |
| std::set<DNSNode, DNSNodeCmp> DNSNode::children |
children, found by DNSLabel
| DNSLabel DNSNode::d_name |
| DNSNode* DNSNode::d_parent {0} |
| uint16_t DNSNode::namepos {0} |
for label compression, we also use DNSNodes
| std::unique_ptr<DNSNode> DNSNode::zone |
if this is set, this node is a zone
1.8.6