#include <kern/ledger.h>
kern/ledger.h
ledger_t, ledger_entry_id_t
macroLEDGER_INFO
#define LEDGER_INFO 0
macroLEDGER_ENTRY_INFO
#define LEDGER_ENTRY_INFO 1
macroLEDGER_TEMPLATE_INFO
#define LEDGER_TEMPLATE_INFO 2
macroLEDGER_LIMIT
#define LEDGER_LIMIT 3
macroLEDGER_ENTRY_INFO_V2
#define LEDGER_ENTRY_INFO_V2 4
macroLEDGER_MAX_CMD
LEDGER_MAX_CMD always tracks the index of the last ledger command.
#define LEDGER_MAX_CMD LEDGER_ENTRY_INFO_V2
macroLEDGER_NAME_MAX
#define LEDGER_NAME_MAX 32
structledger_info
| char[32] | li_name | |
| int64_t | li_id | |
| int64_t | li_entries |
structledger_template_info
| char[32] | lti_name | |
| char[32] | lti_group | |
| char[32] | lti_units |
structledger_entry_info
| int64_t | lei_balance | |
| int64_t | lei_credit | |
| int64_t | lei_debit | |
| uint64_t | lei_limit | |
| uint64_t | lei_refill_period | In nanoseconds |
| uint64_t | lei_last_refill | Time since last refill |
structledger_entry_info_v2
| int64_t | lei_balance | |
| int64_t | lei_credit | |
| int64_t | lei_debit | |
| uint64_t | lei_limit | |
| uint64_t | lei_refill_period | In nanoseconds |
| uint64_t | lei_last_refill | Time since last refill |
| int64_t | lei_lifetime_max | for phys_footprint/neural_nofootprint_lifetime_max |
| uint64_t[4] | lei_reserved |
structledger_limit_args
| char[32] | lla_name | |
| uint64_t | lla_limit | |
| uint64_t | lla_refill_period |