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

PowerDNS / pdns / 15920880335

26 Jun 2025 03:30PM UTC coverage: 61.923% (-3.7%) from 65.652%
15920880335

push

github

web-flow
Merge pull request #15669 from miodvallat/serial_keyer

Increase zone serial number after zone key operations

38311 of 91850 branches covered (41.71%)

Branch coverage included in aggregate %.

27 of 29 new or added lines in 1 file covered. (93.1%)

6308 existing lines in 78 files now uncovered.

120482 of 164587 relevant lines covered (73.2%)

5965233.22 hits per line

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

0.0
/pdns/recursordist/rec-rust-lib/rust/src/bridge.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

24
#include <memory>
25

26
#include "rust/cxx.h"
27
#include "credentials.hh"
28

29
class NetmaskGroup;
30
union ComboAddress;
31
namespace Logr
32
{
33
class Logger;
34
}
35

36
namespace pdns::rust::misc
37
{
38
enum class Priority : uint8_t;
39
enum class LogLevel : uint8_t;
40
using Logger = ::Logr::Logger;
41
struct KeyValue;
42

43
template <typename A>
44
class Wrapper
45
{
46
public:
47
  Wrapper(const A& arg);
UNCOV
48
  ~Wrapper(); // out-of-line definition, to keep A opaque
×
49

50
  Wrapper() = delete;
51
  Wrapper(const Wrapper&) = delete;
52
  Wrapper(Wrapper&&) = delete;
53
  Wrapper& operator=(const Wrapper&) = delete;
54
  Wrapper& operator=(Wrapper&&) = delete;
55

56
  [[nodiscard]] const A& get() const;
57

58
private:
59
  std::unique_ptr<A> d_ptr;
60
};
61

62
using NetmaskGroup = Wrapper<::NetmaskGroup>;
63
using ComboAddress = Wrapper<::ComboAddress>;
64

65
uint16_t qTypeStringToCode(::rust::Str str);
66
bool isValidHostname(::rust::Str str);
67
std::unique_ptr<pdns::rust::misc::ComboAddress> comboaddress(::rust::Str str);
68
bool matches(const std::unique_ptr<NetmaskGroup>& nmg, const std::unique_ptr<ComboAddress>& address);
69
std::shared_ptr<Logger> withValue(const std::shared_ptr<Logger>& logger, ::rust::Str key, ::rust::Str val);
70
void log(const std::shared_ptr<Logger>& logger, Priority log_level, ::rust::Str msg, const ::rust::Vec<KeyValue>& values);
71
void error(const std::shared_ptr<Logger>& logger, Priority log_level, ::rust::Str err, ::rust::Str msg, const ::rust::Vec<KeyValue>& values);
72
}
73

74
namespace pdns::rust::web::rec
75
{
76
using CredentialsHolder = ::CredentialsHolder;
77
struct KeyValue;
78
struct Request;
79
struct Response;
80
struct IncomingWSConfig;
81

82
void apiServer(const Request& rustRequest, Response& rustResponse);
83
void apiDiscovery(const Request& rustRequest, Response& rustResponse);
84
void apiDiscoveryV1(const Request& rustRequest, Response& rustResponse);
85
void apiServerCacheFlush(const Request& rustRequest, Response& rustResponse);
86
void apiServerDetail(const Request& rustRequest, Response& rustResponse);
87
void apiServerStatistics(const Request& rustRequest, Response& rustResponse);
88
void apiServerZonesGET(const Request& rustRequest, Response& rustResponse);
89
void apiServerZonesPOST(const Request& rustRequest, Response& rustResponse);
90
void prometheusMetrics(const Request& rustRequest, Response& rustResponse);
91
void serveStuff(const Request& rustRequest, Response& rustResponse);
92
void jsonstat(const Request& rustRequest, Response& rustResponse);
93
void apiServerConfigAllowFromPUT(const Request& rustRequest, Response& rustResponse);
94
void apiServerConfigAllowFromGET(const Request& rustRequest, Response& rustResponse);
95
void apiServerConfigAllowNotifyFromGET(const Request& rustRequest, Response& rustResponse);
96
void apiServerConfigAllowNotifyFromPUT(const Request& rustRequest, Response& rustResponse);
97
void apiServerConfig(const Request& rustRequest, Response& rustResponse);
98
void apiServerRPZStats(const Request& rustRequest, Response& rustResponse);
99
void apiServerSearchData(const Request& rustRequest, Response& rustResponse);
100
void apiServerZoneDetailGET(const Request& rustRequest, Response& rustResponse);
101
void apiServerZoneDetailPUT(const Request& rustRequest, Response& rustResponse);
102
void apiServerZoneDetailDELETE(const Request& rustRequest, Response& rustResponse);
103
}
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