diff options
author | roopa <roopa@cumulusnetworks.com> | 2012-11-12 12:38:31 -0800 |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2012-11-12 21:51:02 +0100 |
commit | dd8a87da9653848bb8811cc61ed97574254536c9 (patch) | |
tree | e216b0bb612423ee991768532ff46d62d48b2002 /include | |
parent | c83ecb38c16dd8da7e3b1e84d7e73c259fc917a4 (diff) | |
download | libnl-dd8a87da9653848bb8811cc61ed97574254536c9.tar.gz |
Add support for per cache flags
This patch adds support for per cache flags
and adds a flag NL_CACHE_AF_ITER to iter over all
supported families when filling the cache.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink-types.h | 1 | ||||
-rw-r--r-- | include/netlink/cache-api.h | 8 | ||||
-rw-r--r-- | include/netlink/cache.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/netlink-types.h b/include/netlink-types.h index 0be58d1..01b4505 100644 --- a/include/netlink-types.h +++ b/include/netlink-types.h @@ -79,6 +79,7 @@ struct nl_cache int c_nitems; int c_iarg1; int c_iarg2; + unsigned int c_flags; struct nl_hash_table * hashtable; struct nl_cache_ops * c_ops; }; diff --git a/include/netlink/cache-api.h b/include/netlink/cache-api.h index aa5eeb6..ccb4098 100644 --- a/include/netlink/cache-api.h +++ b/include/netlink/cache-api.h @@ -169,6 +169,11 @@ struct nl_parser_param }; /** + * Cache flags + */ +#define NL_CACHE_AF_ITER 0x0001 + +/** * Cache Operations * * This structure defines the characterstics of a cache type. It contains @@ -189,6 +194,9 @@ struct nl_cache_ops /** cache object hash size **/ int co_hash_size; + /** cache flags */ + unsigned int co_flags; + /** Group definition */ struct nl_af_group * co_groups; diff --git a/include/netlink/cache.h b/include/netlink/cache.h index c919e6b..ee3b5d8 100644 --- a/include/netlink/cache.h +++ b/include/netlink/cache.h @@ -66,6 +66,7 @@ extern int nl_cache_include(struct nl_cache *, void *); extern void nl_cache_set_arg1(struct nl_cache *, int); extern void nl_cache_set_arg2(struct nl_cache *, int); +extern void nl_cache_set_flags(struct nl_cache *, unsigned int); /* General */ extern int nl_cache_is_empty(struct nl_cache *); |