Tizen 2.1 base
[platform/upstream/libnl2.git] / include / netlink / route / sch / netem.h
1 /*
2  * netlink/route/sch/netem.h            Network Emulator Qdisc
3  *
4  *      This library is free software; you can redistribute it and/or
5  *      modify it under the terms of the GNU Lesser General Public
6  *      License as published by the Free Software Foundation version 2.1
7  *      of the License.
8  *
9  * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
10  */
11
12 #ifndef NETLINK_NETEM_H_
13 #define NETLINK_NETEM_H_
14
15 #include <netlink/netlink.h>
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 extern int rtnl_netem_set_limit(struct rtnl_qdisc *, int);
22 extern int rtnl_netem_get_limit(struct rtnl_qdisc *);
23
24 /* Packet Re-ordering */
25 extern int rtnl_netem_set_gap(struct rtnl_qdisc *, int);
26 extern int rtnl_netem_get_gap(struct rtnl_qdisc *);
27
28 extern int rtnl_netem_set_reorder_probability(struct rtnl_qdisc *, int);
29 extern int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *);
30
31 extern int rtnl_netem_set_reorder_correlation(struct rtnl_qdisc *, int);
32 extern int rtnl_netem_get_reorder_correlation(struct rtnl_qdisc *);
33
34 /* Corruption */
35 extern int rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int);
36 extern int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *);
37
38 extern int rtnl_netem_set_corruption_correlation(struct rtnl_qdisc *, int);
39 extern int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *);
40
41 /* Packet Loss */
42 extern int rtnl_netem_set_loss(struct rtnl_qdisc *, int);
43 extern int rtnl_netem_get_loss(struct rtnl_qdisc *);
44
45 extern int rtnl_netem_set_loss_correlation(struct rtnl_qdisc *, int);
46 extern int rtnl_netem_get_loss_correlation(struct rtnl_qdisc *);
47
48 /* Packet Duplication */
49 extern int rtnl_netem_set_duplicate(struct rtnl_qdisc *, int);
50 extern int rtnl_netem_get_duplicate(struct rtnl_qdisc *);
51
52 extern int rtnl_netem_set_duplicate_correlation(struct rtnl_qdisc *, int);
53 extern int rtnl_netem_get_duplicate_correlation(struct rtnl_qdisc *);
54
55 /* Packet Delay */
56 extern int rtnl_netem_set_delay(struct rtnl_qdisc *, int);
57 extern int rtnl_netem_get_delay(struct rtnl_qdisc *);
58
59 extern int rtnl_netem_set_jitter(struct rtnl_qdisc *, int);
60 extern int rtnl_netem_get_jitter(struct rtnl_qdisc *);
61
62 extern int rtnl_netem_set_delay_correlation(struct rtnl_qdisc *, int);
63 extern int rtnl_netem_get_delay_correlation(struct rtnl_qdisc *);
64
65 /* Delay Distribution */
66 #define MAXDIST 65536
67 extern int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *, const char *);
68 extern int rtnl_netem_get_delay_distribution_size(struct rtnl_qdisc *);
69 extern int rtnl_netem_get_delay_distribution(struct rtnl_qdisc *, int16_t **);
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif