2007-09-15 01:28:01 +02:00
|
|
|
/*
|
|
|
|
* netlink/route/sch/netem.h Network Emulator Qdisc
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation version 2.1
|
|
|
|
* of the License.
|
|
|
|
*
|
|
|
|
* Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NETLINK_NETEM_H_
|
|
|
|
#define NETLINK_NETEM_H_
|
|
|
|
|
|
|
|
#include <netlink/netlink.h>
|
2012-05-16 13:42:05 +02:00
|
|
|
#include <netlink/route/qdisc.h>
|
2007-09-15 01:28:01 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_limit(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_limit(struct rtnl_qdisc *);
|
|
|
|
|
|
|
|
/* Packet Re-ordering */
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_gap(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_gap(struct rtnl_qdisc *);
|
|
|
|
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_reorder_probability(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *);
|
|
|
|
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_reorder_correlation(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_reorder_correlation(struct rtnl_qdisc *);
|
|
|
|
|
2008-04-30 11:40:44 -04:00
|
|
|
/* Corruption */
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int);
|
2008-04-30 11:40:44 -04:00
|
|
|
extern int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *);
|
|
|
|
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_corruption_correlation(struct rtnl_qdisc *, int);
|
2008-04-30 11:40:44 -04:00
|
|
|
extern int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *);
|
|
|
|
|
2007-09-15 01:28:01 +02:00
|
|
|
/* Packet Loss */
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_loss(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_loss(struct rtnl_qdisc *);
|
|
|
|
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_loss_correlation(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_loss_correlation(struct rtnl_qdisc *);
|
|
|
|
|
|
|
|
/* Packet Duplication */
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_duplicate(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_duplicate(struct rtnl_qdisc *);
|
|
|
|
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_duplicate_correlation(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_duplicate_correlation(struct rtnl_qdisc *);
|
|
|
|
|
|
|
|
/* Packet Delay */
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_delay(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_delay(struct rtnl_qdisc *);
|
|
|
|
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_jitter(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_jitter(struct rtnl_qdisc *);
|
|
|
|
|
2011-03-21 15:51:52 +01:00
|
|
|
extern void rtnl_netem_set_delay_correlation(struct rtnl_qdisc *, int);
|
2007-09-15 01:28:01 +02:00
|
|
|
extern int rtnl_netem_get_delay_correlation(struct rtnl_qdisc *);
|
|
|
|
|
2008-04-30 11:40:44 -04:00
|
|
|
/* 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 **);
|
|
|
|
|
2007-09-15 01:28:01 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|