diff options
Diffstat (limited to 'shaping/include/shaper_maat.h')
| -rw-r--r-- | shaping/include/shaper_maat.h | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/shaping/include/shaper_maat.h b/shaping/include/shaper_maat.h index 3ec3259..78363fd 100644 --- a/shaping/include/shaper_maat.h +++ b/shaping/include/shaper_maat.h @@ -1,24 +1,20 @@ +#pragma once #include "shaper.h" -struct shaping_maat_info { - int rule_table_id; - int profile_table_id; -}; - struct shaping_rule { + uuid_t uuid; + uuid_t primary_pf_uuid; + uuid_t borrow_pf_uuid_array[SHAPING_REF_PROFILE_NUM_MAX]; + int borrow_pf_num; int vsys_id; - int id; int priority; - int primary_pf_id; - int borrow_pf_id_array[SHAPING_REF_PROFILE_NUM_MAX]; - int borrow_pf_num; int fair_factor; unsigned char dscp_enable; unsigned char dscp_value; }; struct shaping_profile { - int id; + uuid_t uuid; enum shaping_profile_type type; enum shaper_aqm_type aqm_type; enum shaping_profile_limit_direction limit_direction; @@ -28,17 +24,17 @@ struct shaping_profile { int valid; }; -void shaper_rule_ex_new(const char *table_name, int table_id, const char *key, const char *table_line, void **ad, long argl, void *argp); -void shaper_rule_ex_dup(int table_id, void **to, void **from, long argl, void *argp); -void shaper_rule_ex_free(int table_id, void **ad, long argl, void *argp); -void shaper_profile_ex_new(const char *table_name, int table_id, const char *key, const char *table_line, void **ad, long argl, void *argp); -void shaper_profile_ex_dup(int table_id, void **to, void **from, long argl, void *argp); -void shaper_profile_ex_free(int table_id, void **ad, long argl, void *argp); +void shaper_rule_ex_new(const char *table_name, const char *key, const char *table_line, void **ad, long argl, void *argp); +void shaper_rule_ex_dup(const char *table_name, void **to, void **from, long argl, void *argp); +void shaper_rule_ex_free(const char *table_name, void **ad, long argl, void *argp); +void shaper_profile_ex_new(const char *table_name, const char *key, const char *table_line, void **ad, long argl, void *argp); +void shaper_profile_ex_dup(const char *table_name, void **to, void **from, long argl, void *argp); +void shaper_profile_ex_free(const char *table_name, void **ad, long argl, void *argp); -int shaper_rule_is_enabled(struct shaping_thread_ctx *ctx, long long rule_id); +int shaper_rule_is_enabled(struct shaping_thread_ctx *ctx, uuid_t rule_uuid); -struct shaping_profile *shaper_maat_profile_get(struct shaping_thread_ctx *ctx, int profile_id); +struct shaping_profile *shaper_maat_profile_get(struct shaping_thread_ctx *ctx, uuid_t profile_uuid); -void shaper_rules_update(struct shaping_thread_ctx *ctx, struct shaping_flow *sf, long long *rule_compile_ids, int rule_num); -struct shaping_maat_info* shaper_maat_init(const char *instance_name); -void shaper_maat_destroy(struct shaping_maat_info *maat_info);
\ No newline at end of file +void shaper_rules_update(struct shaping_thread_ctx *ctx, struct shaping_flow *sf, uuid_t *rule_uuids, int rule_num); +int shaper_maat_init(const char *instance_name); +void shaper_maat_destroy();
\ No newline at end of file |
