• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PowerDNS / pdns / 14230500445

02 Apr 2025 01:53PM UTC coverage: 52.058% (-11.4%) from 63.455%
14230500445

push

github

web-flow
Merge pull request #15385 from rgacogne/ddist-enable-quiche-sni-tests

dnsdist: Enable the DoQ and DoH3 parts of the SNI tests in our CI

21502 of 68138 branches covered (31.56%)

Branch coverage included in aggregate %.

77059 of 121190 relevant lines covered (63.59%)

4345179.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.77
/pdns/bindparserclasses.hh
1
/*
2
 * This file is part of PowerDNS or dnsdist.
3
 * Copyright -- PowerDNS.COM B.V. and its contributors
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of version 2 of the GNU General Public License as
7
 * published by the Free Software Foundation.
8
 *
9
 * In addition, for the avoidance of any doubt, permission is granted to
10
 * link this program with OpenSSL and to (re)distribute the binaries
11
 * produced as the result of such linking.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
 */
22
#pragma once
23
#include <string>
24
#include <map>
25
#include <vector>
26
#include <set>
27
#include <stdio.h>
28
#include <sys/stat.h>
29

30
#include "namespaces.hh"
31

32
class BindDomainInfo 
33
{
34
public:
35
  void clear() 
36
  {
11✔
37
    name=DNSName();
11✔
38
    filename=type="";
11✔
39
    primaries.clear();
11✔
40
    alsoNotify.clear();
11✔
41
    d_dev=0;
11✔
42
    d_ino=0;
11✔
43
  }
11✔
44
  DNSName name;
45
  string viewName;
46
  string filename;
47
  vector<ComboAddress> primaries;
48
  set<string> alsoNotify;
49
  string type;
50
  bool hadFileDirective{false};
51

52
  dev_t d_dev{0};
53
  ino_t d_ino{0};
54

55
  bool operator<(const BindDomainInfo& b) const
56
  {
×
57
    return pair(d_dev, d_ino) < pair(b.d_dev, b.d_ino);
×
58
  }
×
59
};
60

61
extern const char *bind_directory;
62
extern FILE *yyin;
63
class BindParser
64
{
65
 public:
66
   BindParser()
67
   {
1✔
68
     yyin = 0;
1✔
69
     extern int include_stack_ptr;
1✔
70
     include_stack_ptr = 0;
1✔
71

72
     bind_directory = d_dir.c_str();
1✔
73
   }
1✔
74
  ~BindParser()
75
  {
1✔
76
    if(yyin) {
1!
77
      fclose(yyin);
1✔
78
      yyin=0;
1✔
79
    }
1✔
80
  }
1✔
81
  void parse(const string &fname);
82
  void commit(BindDomainInfo DI);
83
  void setDirectory(const string &dir);
84
  const string &getDirectory();
85
  const vector<BindDomainInfo>& getDomains();
86
  void setVerbose(bool verbose);
87
  void addAlsoNotify(const string &host);
88
  set<string> & getAlsoNotify() { return this->alsoNotify; } 
×
89
private:
90
  string d_dir{"."};
91
  typedef map<DNSName,string> zonedomain_t;
92
  set<string> alsoNotify;
93
  vector<BindDomainInfo> d_zonedomains;
94
  bool d_verbose{false};
95
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc