diff options
author | Thomas Graf <tgraf@suug.ch> | 2011-03-21 14:51:52 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2011-03-21 14:51:52 (GMT) |
commit | 8eb5b5532eae985a5f0911dccf2db8cb4e0a5de4 (patch) | |
tree | 0fec48d114edbb535bd234f2684acccf81447d13 /src/nl-qdisc-add.c | |
parent | 5dc897d5de9f54078221b241e0122713207f5e0c (diff) | |
download | libnl-8eb5b5532eae985a5f0911dccf2db8cb4e0a5de4.zip libnl-8eb5b5532eae985a5f0911dccf2db8cb4e0a5de4.tar.gz libnl-8eb5b5532eae985a5f0911dccf2db8cb4e0a5de4.tar.bz2 |
Unified TC API
Finally got rid of all the qdisc/class/cls code duplication in
the tc module API. The API takes care of allocation/freeing the
tc object specific data.
I hope I got it right this time.
Diffstat (limited to 'src/nl-qdisc-add.c')
-rw-r--r-- | src/nl-qdisc-add.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nl-qdisc-add.c b/src/nl-qdisc-add.c index 9da0f18..dd2ed2b 100644 --- a/src/nl-qdisc-add.c +++ b/src/nl-qdisc-add.c @@ -53,8 +53,8 @@ int main(int argc, char *argv[]) .dp_type = NL_DUMP_DETAILS, .dp_fd = stdout, }; - struct nl_cli_qdisc_module *qm; - struct rtnl_qdisc_ops *ops; + struct nl_cli_tc_module *tm; + struct rtnl_tc_ops *ops; int err, flags = NLM_F_CREATE | NLM_F_EXCL; char *kind, *id = NULL; @@ -122,15 +122,15 @@ int main(int argc, char *argv[]) } kind = argv[optind++]; - rtnl_qdisc_set_kind(qdisc, kind); + rtnl_tc_set_kind(tc, kind); - if (!(ops = rtnl_qdisc_lookup_ops(qdisc))) + if (!(ops = rtnl_tc_get_ops(tc))) nl_cli_fatal(ENOENT, "Unknown qdisc \"%s\"", kind); - if (!(qm = nl_cli_qdisc_lookup(ops))) + if (!(tm = nl_cli_tc_lookup(ops))) nl_cli_fatal(ENOTSUP, "Qdisc type \"%s\" not supported.", kind); - qm->qm_parse_qdisc_argv(qdisc, argc, argv); + tm->tm_parse_argv(tc, argc, argv); if (!quiet) { printf("Adding "); |