11 #ifndef BITCOIN_NET_PERMISSIONS_H
12 #define BITCOIN_NET_PERMISSIONS_H
45 using t =
typename std::underlying_type<NetPermissionFlags>::type;
56 using t =
typename std::underlying_type<NetPermissionFlags>::type;
57 return (
static_cast<t>(
flags) &
static_cast<t>(f)) ==
static_cast<t>(f);
71 using t =
typename std::underlying_type<NetPermissionFlags>::type;
A combination of a network address (CNetAddr) and a (TCP) port.
NetPermissionFlags m_flags
static void AddFlag(NetPermissionFlags &flags, NetPermissionFlags f)
static void ClearFlag(NetPermissionFlags &flags, NetPermissionFlags f)
ClearFlag is only called with f == NetPermissionFlags::Implicit.
static std::vector< std::string > ToStrings(NetPermissionFlags flags)
static bool HasFlag(NetPermissionFlags flags, NetPermissionFlags f)
static bool TryParse(const std::string &str, NetWhitebindPermissions &output, bilingual_str &error)
static bool TryParse(const std::string &str, NetWhitelistPermissions &output, bilingual_str &error)
bool error(const char *fmt, const Args &... args)
static constexpr NetPermissionFlags operator|(NetPermissionFlags a, NetPermissionFlags b)
const std::vector< std::string > NET_PERMISSIONS_DOC