diff options
author | Thomas Graf <tgraf@suug.ch> | 2011-03-25 18:13:19 +0100 |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2011-03-25 18:13:19 +0100 |
commit | 747b892c91de7a852664f015405d6d37ea2b66b6 (patch) | |
tree | 588d4d9b32b8dff40b20f0159884afd1b3692acc /include/netlink/route/qdisc.h | |
parent | 23845e942cc8fdad05f722b384266cb0a166edc3 (diff) | |
download | libnl-747b892c91de7a852664f015405d6d37ea2b66b6.tar.gz |
Qdisc API improvements and documentation
Deprecated the functions rtnl_qdisc_change() and
rtnl_qdisc_build_change_request() for their lack of being able to
specify flags. The new functions rtnl_qdisc_update() and
rtnl_qdisc_build_update_request() may be used instead. The old
functions are still available though. However, rtnl_qdisc_update()
no longer implies NLM_F_REPLACE, it has to specified implicitely
to allow updating a qdisc without risking to replace another qdisc.
Included detailed documentation of qdisc addition/update/deletion.
Introduced APPBUG() macro to let application developer know of
API abuse.
Diffstat (limited to 'include/netlink/route/qdisc.h')
-rw-r--r-- | include/netlink/route/qdisc.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/include/netlink/route/qdisc.h b/include/netlink/route/qdisc.h index fbff666..10b85c5 100644 --- a/include/netlink/route/qdisc.h +++ b/include/netlink/route/qdisc.h @@ -38,24 +38,33 @@ extern int rtnl_qdisc_build_add_request(struct rtnl_qdisc *, int, struct nl_msg **); extern int rtnl_qdisc_add(struct nl_sock *, struct rtnl_qdisc *, int); -extern int rtnl_qdisc_build_change_request(struct rtnl_qdisc *, +extern int rtnl_qdisc_build_update_request(struct rtnl_qdisc *, struct rtnl_qdisc *, - struct nl_msg **); -extern int rtnl_qdisc_change(struct nl_sock *, struct rtnl_qdisc *, - struct rtnl_qdisc *); + int, struct nl_msg **); + +extern int rtnl_qdisc_update(struct nl_sock *, struct rtnl_qdisc *, + struct rtnl_qdisc *, int); extern int rtnl_qdisc_build_delete_request(struct rtnl_qdisc *, struct nl_msg **); extern int rtnl_qdisc_delete(struct nl_sock *, struct rtnl_qdisc *); /* Deprecated functions */ -extern void rtnl_qdisc_foreach_child(struct rtnl_qdisc *, struct nl_cache *, - void (*cb)(struct nl_object *, void *), - void *) __attribute__ ((deprecated)); +extern void rtnl_qdisc_foreach_child(struct rtnl_qdisc *, struct nl_cache *, + void (*cb)(struct nl_object *, void *), + void *) __attribute__ ((deprecated)); + +extern void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *, struct nl_cache *, + void (*cb)(struct nl_object *, void *), + void *) __attribute__ ((deprecated)); + +extern int rtnl_qdisc_build_change_request(struct rtnl_qdisc *, + struct rtnl_qdisc *, + struct nl_msg **) + __attribute__ ((deprecated)); -extern void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *, struct nl_cache *, - void (*cb)(struct nl_object *, void *), - void *) __attribute__ ((deprecated)); +extern int rtnl_qdisc_change(struct nl_sock *, struct rtnl_qdisc *, + struct rtnl_qdisc *) __attribute__ ((deprecated)); #ifdef __cplusplus } |