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-local.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-local.h')
-rw-r--r-- | include/netlink-local.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/netlink-local.h b/include/netlink-local.h index 9acc0e4..63dd661 100644 --- a/include/netlink-local.h +++ b/include/netlink-local.h @@ -6,7 +6,7 @@ * License as published by the Free Software Foundation version 2.1 * of the License. * - * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch> + * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch> */ #ifndef NETLINK_LOCAL_H_ @@ -88,6 +88,13 @@ struct trans_list { assert(0); \ } while (0) +#define APPBUG(msg) \ + do { \ + fprintf(stderr, "APPLICATION BUG: %s:%d:%s: %s\n", \ + __FILE__, __LINE__, __PRETTY_FUNCTION__, msg); \ + assert(0); \ + } while(0) + extern int __nl_read_num_str_file(const char *path, int (*cb)(long, const char *)); |