diff options
author | Tad Kollar <Thaddeus.J.Kollar@nasa.gov> | 2008-04-30 11:40:44 -0400 |
---|---|---|
committer | Thomas Graf <tgr@lsx.localdomain> | 2008-04-30 19:59:06 +0200 |
commit | 241b2b83ba5672f5c86154d29eeb8ef4c7c6e9b4 (patch) | |
tree | 0c168d810d663ce5e53234586dab732b34e7cd2a /include/netlink | |
parent | 5c92c656cc6d1197c66d8876a17189926dfbc343 (diff) | |
download | android_external_libnl-241b2b83ba5672f5c86154d29eeb8ef4c7c6e9b4.tar.gz android_external_libnl-241b2b83ba5672f5c86154d29eeb8ef4c7c6e9b4.tar.bz2 android_external_libnl-241b2b83ba5672f5c86154d29eeb8ef4c7c6e9b4.zip |
New netem funtionality and TBF fix
New netem-related functionality:
Added ability to save new settings to the kernel. In netem.c, the
netem_get_opts() stub has been replaced with netem_build_msg() which
manipulates the nl_msg data directly and returns an error code instead
of a new nl_msg. Modifications to qdisc_build() in qdisc.c and struct
rtnl_qdisc_ops were necessary for this.
Added support for getting/setting corruption probability/correlation.
Added support for setting a delay distribution.
Fixed tbf_msg_parser() to call tbf_alloc() instead of tbf_qdisc() to
prevent a seg fault.
Diffstat (limited to 'include/netlink')
-rw-r--r-- | include/netlink/route/qdisc-modules.h | 2 | ||||
-rw-r--r-- | include/netlink/route/sch/netem.h | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/netlink/route/qdisc-modules.h b/include/netlink/route/qdisc-modules.h index 802eac4..6ade681 100644 --- a/include/netlink/route/qdisc-modules.h +++ b/include/netlink/route/qdisc-modules.h @@ -40,6 +40,8 @@ struct rtnl_qdisc_ops */ struct nl_msg *(*qo_get_opts)(struct rtnl_qdisc *); + int (*qo_build_msg)(struct rtnl_qdisc *, struct nl_msg *); + /** * TCA_OPTIONS message parser */ diff --git a/include/netlink/route/sch/netem.h b/include/netlink/route/sch/netem.h index b100741..c293777 100644 --- a/include/netlink/route/sch/netem.h +++ b/include/netlink/route/sch/netem.h @@ -31,6 +31,13 @@ extern int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *); extern int rtnl_netem_set_reorder_correlation(struct rtnl_qdisc *, int); extern int rtnl_netem_get_reorder_correlation(struct rtnl_qdisc *); +/* Corruption */ +extern int rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int); +extern int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *); + +extern int rtnl_netem_set_corruption_correlation(struct rtnl_qdisc *, int); +extern int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *); + /* Packet Loss */ extern int rtnl_netem_set_loss(struct rtnl_qdisc *, int); extern int rtnl_netem_get_loss(struct rtnl_qdisc *); @@ -55,6 +62,12 @@ extern int rtnl_netem_get_jitter(struct rtnl_qdisc *); extern int rtnl_netem_set_delay_correlation(struct rtnl_qdisc *, int); extern int rtnl_netem_get_delay_correlation(struct rtnl_qdisc *); +/* Delay Distribution */ +#define MAXDIST 65536 +extern int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *, const char *); +extern int rtnl_netem_get_delay_distribution_size(struct rtnl_qdisc *); +extern int rtnl_netem_get_delay_distribution(struct rtnl_qdisc *, int16_t **); + #ifdef __cplusplus } #endif |