12 #ifndef BITCOIN_NET_PERMISSIONS_H 13 #define BITCOIN_NET_PERMISSIONS_H 51 using t =
typename std::underlying_type<NetPermissionFlags>::type;
62 using t =
typename std::underlying_type<NetPermissionFlags>::type;
63 return (static_cast<t>(
flags) & static_cast<t>(f)) ==
static_cast<t>(f);
77 using t =
typename std::underlying_type<NetPermissionFlags>::type;
96 #endif // BITCOIN_NET_PERMISSIONS_H
static void AddFlag(NetPermissionFlags &flags, NetPermissionFlags f)
constexpr bool DEFAULT_WHITELISTRELAY
Default for -whitelistrelay.
static void ClearFlag(NetPermissionFlags &flags, NetPermissionFlags f)
ClearFlag is only called with f == NetPermissionFlags::Implicit.
const std::vector< std::string > NET_PERMISSIONS_DOC
static bool HasFlag(NetPermissionFlags flags, NetPermissionFlags f)
constexpr bool DEFAULT_WHITELISTFORCERELAY
Default for -whitelistforcerelay.
A combination of a network address (CNetAddr) and a (TCP) port.
static constexpr NetPermissionFlags operator|(NetPermissionFlags a, NetPermissionFlags b)
NetPermissionFlags m_flags
static bool TryParse(const std::string &str, NetWhitelistPermissions &output, ConnectionDirection &output_connection_direction, bilingual_str &error)
static bool TryParse(const std::string &str, NetWhitebindPermissions &output, bilingual_str &error)
static std::vector< std::string > ToStrings(NetPermissionFlags flags)