Holds the permission flags granted to a peer and helpers to query and modify them.

Synopsis

Declared in <net_permissions.h>

class NetPermissions;

Static Member Functions

Name

Description

AddFlag

Add a flag to a set of flags.

ClearFlag

Remove a flag from a set of flags. ClearFlag is only called with f == NetPermissionFlags::Implicit. If that should change in the future, be aware that ClearFlag should not be called with a subflag of a multiflag, e.g. NetPermissionFlags::Relay or NetPermissionFlags::Download, as that would leave flags in an invalid state corresponding to none of the existing flags.

HasFlag

Test whether a set of flags contains a given flag (or flag combination).

ToStrings

Convert a set of permission flags into their human‐readable names.

Data Members

Name

Description

m_flags

The permission flags currently granted.

Derived Classes

Name

Description

NetWhitebindPermissions

Permissions bound to a specific listening address, parsed from a ‐whitebind entry.

NetWhitelistPermissions

Permissions applied to peers matching a subnet, parsed from a ‐whitelist entry.

Created with MrDocs