diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/cache.h | 5 | ||||
-rw-r--r-- | include/rule.h | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/cache.h b/include/cache.h index 4d91a736..9605ef96 100644 --- a/include/cache.h +++ b/include/cache.h @@ -87,4 +87,9 @@ void cache_free(struct cache *cache); void cache_add(struct cache_item *item, struct cache *cache, uint32_t hash); void cache_del(struct cache_item *item); +void obj_cache_add(struct obj *obj, struct table *table); +void obj_cache_del(struct obj *obj); +struct obj *obj_cache_find(const struct table *table, const char *name, + uint32_t obj_type); + #endif /* _NFT_CACHE_H_ */ diff --git a/include/rule.h b/include/rule.h index b238c85b..f264bc8a 100644 --- a/include/rule.h +++ b/include/rule.h @@ -157,6 +157,7 @@ struct table { struct scope scope; struct cache chain_cache; struct cache set_cache; + struct cache obj_cache; struct list_head chains; struct list_head sets; struct list_head objs; @@ -484,6 +485,7 @@ struct secmark { */ struct obj { struct list_head list; + struct cache_item cache; struct location location; struct handle handle; uint32_t type; @@ -504,9 +506,6 @@ struct obj { struct obj *obj_alloc(const struct location *loc); extern struct obj *obj_get(struct obj *obj); void obj_free(struct obj *obj); -void obj_add_hash(struct obj *obj, struct table *table); -struct obj *obj_lookup(const struct table *table, const char *name, - uint32_t type); struct obj *obj_lookup_fuzzy(const char *obj_name, const struct nft_cache *cache, const struct table **t); |