4#include <sys/resource.h>
11#include <cosmos/proc/limits.hxx>
14#include <clues/items/items.hxx>
16namespace clues::item {
19class CLUES_API ResourceType :
20 public ValueInParameter {
22 explicit ResourceType() :
23 ValueInParameter{
"resource",
"resource type"} {
26 std::string
str()
const override;
28 cosmos::LimitType type()
const {
38 cosmos::LimitType m_limit = cosmos::LimitType{std::numeric_limits<int>::max()};
41class CLUES_API ResourceLimit :
44 explicit ResourceLimit(
const ItemType type,
const std::string_view name = {}) :
45 PointerValue{type, name.empty() ?
"limit" : name,
""} {
48 std::string
str()
const override;
50 std::optional<cosmos::LimitSpec> limit()
const {
73 bool isCompatSyscall()
const;
77 std::optional<cosmos::LimitSpec> m_limit;
Base class for traced processes.
std::string str() const override
Returns a human readable string representation of the item.
void updateData(const Tracee &proc) override
Called upon exit of the system call to update possible out parameters.
void processValue(const Tracee &proc) override
Processes the value stored in m_val acc. to the actual item type.
void processValue(const Tracee &proc) override
Processes the value stored in m_val acc. to the actual item type.
std::string str() const override
Returns a human readable string representation of the item.
ItemType
Basic type of a SystemCallItem.