diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-10-20 17:15:58 +0200 |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-10-20 17:15:58 +0200 |
commit | 8699ba85ccfa6545806433de3daeee2f98b9d350 (patch) | |
tree | 911125ed2fc7e4a723ddae36f4e9fda07e394df6 /src/lib | |
parent | cefe7db730cae80133c7811cf34b83985857ab25 (diff) |
nl-class-delete tool
Tool based on nl-qdisc-delete to delete traffic classes.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/class.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/class.c b/src/lib/class.c index 93346d5..4f6ba30 100644 --- a/src/lib/class.c +++ b/src/lib/class.c @@ -29,6 +29,20 @@ struct rtnl_class *nl_cli_class_alloc(void) return class; } +struct nl_cache *nl_cli_class_alloc_cache(struct nl_sock *sock, int ifindex) +{ + struct nl_cache *cache; + int err; + + if ((err = rtnl_class_alloc_cache(sock, ifindex, &cache)) < 0) + nl_cli_fatal(err, "Unable to allocate class cache: %s", + nl_geterror(err)); + + nl_cache_mngt_provide(cache); + + return cache; +} + void nl_cli_class_parse_dev(struct rtnl_class *class, struct nl_cache *link_cache, char *arg) { int ival; |