|
OpenVPN 3 Core Library
|
Functions | |
| auto | genHost (const bool valid=true) -> Gen< std::string > |
| Generates a host string. | |
| auto | genDnsServerSecurity () -> Gen< openvpn::DnsServer::Security > |
| Generates random DNS server security settings. | |
| auto | genDnsServerTransport () -> Gen< openvpn::DnsServer::Transport > |
| Generates random DNS server transport. | |
| constexpr auto | otherVersion (const openvpn::IP::Addr::Version version) -> openvpn::IP::Addr::Version |
The address version that is not version; UNSPEC maps to V4. | |
| auto | singleBit (const openvpn::IP::Addr::Version version, const unsigned int bit) -> openvpn::IP::Addr |
The address of version with only bit set; bit 0 is the least significant. | |
| auto | nonContiguousNetmask (const openvpn::IP::Addr::Version version, const unsigned int cleared_bit) -> openvpn::IP::Addr |
A mask of version with every bit set except cleared_bit. | |
| template<typename Parse > | |
| std::optional< std::string > | rejectionMessageOf (Parse &&parse) |
The diagnostic AddrMaskPair::from_string throws when parse calls it, or nullopt when it accepts. | |
| std::optional< std::string > | rejectionMessage (const std::string &input, const char *title=nullptr) |
| std::optional< std::string > | rejectionMessageForTerms (const std::string &address, const std::string &mask) |
| Named apart from rejectionMessage: a literal "" second argument would otherwise bind to the title parameter. | |
| std::optional< std::string > | rejectionMessage (const openvpn::IP::AddrMaskPair::StringPair &pair) |
|
inline |
Generates random DNS server security settings.
Creates a generator that produces random values from the openvpn::DnsServer::Security enumeration. The generated values can be one of: Unset, No, Yes, or Optional.
openvpn::DnsServer::Security enum values. Definition at line 721 of file test_generators.hpp.
|
inline |
Generates random DNS server transport.
Creates a generator that produces random values from the openvpn::DnsServer::Transport enumeration. The generator yields one of: Unset, Plain, HTTPS, or TLS.
openvpn::DnsServer::Transport enum values. Definition at line 736 of file test_generators.hpp.
|
inline |
Generates a host string.
Creates a string based on the input parameter. Valid hosts conform to length constraints (between HOST_MIN_LENGTH and HOST_MAX_LENGTH characters) and contain only allowed characters. Invalid hosts may exceed the maximum length or contain invalid characters.
| valid | If true (default), the function will generally produce valid host strings If false, the function will deliberately generate invalid host strings. |
Definition at line 701 of file test_generators.hpp.
|
inline |
A mask of version with every bit set except cleared_bit.
Bit 0 is the least significant address bit, so cleared_bit must be at least 1 for the result to be non-contiguous — the shape openvpn::IP::Addr::prefix_len() rejects.
Definition at line 765 of file test_generators.hpp.
|
constexpr |
The address version that is not version; UNSPEC maps to V4.
Definition at line 746 of file test_generators.hpp.
|
inline |
Definition at line 798 of file test_generators.hpp.
|
inline |
Definition at line 785 of file test_generators.hpp.
|
inline |
Named apart from rejectionMessage: a literal "" second argument would otherwise bind to the title parameter.
Definition at line 792 of file test_generators.hpp.
| std::optional< std::string > rc::helpers::rejectionMessageOf | ( | Parse && | parse | ) |
The diagnostic AddrMaskPair::from_string throws when parse calls it, or nullopt when it accepts.
Definition at line 772 of file test_generators.hpp.
|
inline |
The address of version with only bit set; bit 0 is the least significant.
Definition at line 752 of file test_generators.hpp.