USBGuard
Software framework that protects your computer against rogue USB devices by implementing basic whitelisting and blacklisting capabilities.
Public Member Functions | List of all members
usbguard::MemoryRuleSet Class Reference
Inheritance diagram for usbguard::MemoryRuleSet:
usbguard::RuleSet

Public Member Functions

 MemoryRuleSet (Interface *const interface_ptr)
 
 MemoryRuleSet (const MemoryRuleSet &rhs)
 
const MemoryRuleSetoperator= (const MemoryRuleSet &rhs)
 
void load () override
 
void save () override
 
- Public Member Functions inherited from usbguard::RuleSet
 RuleSet (Interface *const interface_ptr)
 
 RuleSet (const RuleSet &rhs)
 
const RuleSetoperator= (const RuleSet &rhs)
 
void serialize (std::ostream &stream) const
 
void setDefaultTarget (Rule::Target target)
 
Rule::Target getDefaultTarget () const
 
uint32_t appendRule (const Rule &rule, uint32_t parent_id=Rule::LastID, bool lock=true)
 
uint32_t upsertRule (const Rule &match_rule, const Rule &new_rule, bool parent_insensitive=false)
 
std::shared_ptr< RulegetRule (uint32_t id)
 
bool removeRule (uint32_t id)
 
virtual std::shared_ptr< RulegetFirstMatchingRule (std::shared_ptr< const Rule > device_rule, uint32_t from_id=1) const
 
std::vector< std::shared_ptr< const Rule > > getRules ()
 
uint32_t assignID (std::shared_ptr< Rule > rule)
 
uint32_t assignID ()
 
void setWritable ()
 
void clearWritable ()
 
bool isWritable ()
 

Additional Inherited Members

- Protected Attributes inherited from usbguard::RuleSet
std::mutex _op_mutex
 
bool _writable {false}
 
Interface_interface_ptr {nullptr}
 
Rule::Target _default_target
 
Atomic< uint32_t > _id_next
 
std::vector< std::shared_ptr< Rule > > _rules
 

The documentation for this class was generated from the following files: