libnl 3.5.0

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 #include <netlink/route/qdisc.h>
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 extern void rtnl_netem_set_limit(struct rtnl_qdisc *, int);
23 extern int rtnl_netem_get_limit(struct rtnl_qdisc *);
24
25 /* Packet Re-ordering */
26 extern void rtnl_netem_set_gap(struct rtnl_qdisc *, int);
27 extern int rtnl_netem_get_gap(struct rtnl_qdisc *);
28
29 extern void rtnl_netem_set_reorder_probability(struct rtnl_qdisc *, int);
30 extern int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *);
31
32 extern void rtnl_netem_set_reorder_correlation(struct rtnl_qdisc *, int);
33 extern int rtnl_netem_get_reorder_correlation(struct rtnl_qdisc *);
34
35 /* Corruption */
36 extern void rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int);
37 extern int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *);
38
39 extern void rtnl_netem_set_corruption_correlation(struct rtnl_qdisc *, int);
40 extern int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *);
41
42 /* Packet Loss */
43 extern void rtnl_netem_set_loss(struct rtnl_qdisc *, int);
44 extern int rtnl_netem_get_loss(struct rtnl_qdisc *);
45
46 extern void rtnl_netem_set_loss_correlation(struct rtnl_qdisc *, int);
47 extern int rtnl_netem_get_loss_correlation(struct rtnl_qdisc *);
48
49 /* Packet Duplication */
50 extern void rtnl_netem_set_duplicate(struct rtnl_qdisc *, int);
51 extern int rtnl_netem_get_duplicate(struct rtnl_qdisc *);
52
53 extern void rtnl_netem_set_duplicate_correlation(struct rtnl_qdisc *, int);
54 extern int rtnl_netem_get_duplicate_correlation(struct rtnl_qdisc *);
55
56 /* Packet Delay */
57 extern void rtnl_netem_set_delay(struct rtnl_qdisc *, int);
58 extern int rtnl_netem_get_delay(struct rtnl_qdisc *);
59
60 extern void rtnl_netem_set_jitter(struct rtnl_qdisc *, int);
61 extern int rtnl_netem_get_jitter(struct rtnl_qdisc *);
62
63 extern void rtnl_netem_set_delay_correlation(struct rtnl_qdisc *, int);
64 extern int rtnl_netem_get_delay_correlation(struct rtnl_qdisc *);
65
66 /* Delay Distribution */
67 #define MAXDIST 65536
68 extern int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *, const char *);
69 extern int rtnl_netem_set_delay_distribution_data(struct rtnl_qdisc *, const int16_t *, size_t len);
70 extern int rtnl_netem_get_delay_distribution_size(struct rtnl_qdisc *);
71 extern int rtnl_netem_get_delay_distribution(struct rtnl_qdisc *, int16_t **);
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif
rtnl_netem_get_gap
int rtnl_netem_get_gap(struct rtnl_qdisc *)
Get re-ordering gap of netem qdisc.
Definition: netem.c:410
rtnl_netem_set_delay
void rtnl_netem_set_delay(struct rtnl_qdisc *, int)
Set packet delay of netem qdisc.
Definition: netem.c:737
rtnl_netem_set_limit
void rtnl_netem_set_limit(struct rtnl_qdisc *, int)
Set limit of netem qdisc.
Definition: netem.c:352
rtnl_netem_get_loss
int rtnl_netem_get_loss(struct rtnl_qdisc *)
Get packet loss probability of netem qdisc.
Definition: netem.c:599
rtnl_netem_get_corruption_probability
int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *)
Get corruption probability of netem qdisc.
Definition: netem.c:522
rtnl_netem_get_delay
int rtnl_netem_get_delay(struct rtnl_qdisc *)
Get packet delay of netem qdisc.
Definition: netem.c:753
rtnl_netem_get_reorder_correlation
int rtnl_netem_get_reorder_correlation(struct rtnl_qdisc *)
Get re-ordering correlation probability of netem qdisc.
Definition: netem.c:480
rtnl_netem_set_reorder_probability
void rtnl_netem_set_reorder_probability(struct rtnl_qdisc *, int)
Set re-ordering probability of netem qdisc.
Definition: netem.c:429
rtnl_netem_set_delay_distribution_data
int rtnl_netem_set_delay_distribution_data(struct rtnl_qdisc *, const int16_t *, size_t len)
Set the delay distribution data.
Definition: netem.c:878
rtnl_netem_get_duplicate_correlation
int rtnl_netem_get_duplicate_correlation(struct rtnl_qdisc *)
Get packet duplication correlation probability of netem qdisc.
Definition: netem.c:711
rtnl_netem_set_corruption_correlation
void rtnl_netem_set_corruption_correlation(struct rtnl_qdisc *, int)
Set corruption correlation probability of netem qdisc.
Definition: netem.c:541
rtnl_netem_get_reorder_probability
int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *)
Get re-ordering probability of netem qdisc.
Definition: netem.c:445
rtnl_netem_get_jitter
int rtnl_netem_get_jitter(struct rtnl_qdisc *)
Get packet delay jitter of netem qdisc.
Definition: netem.c:788
rtnl_netem_get_duplicate
int rtnl_netem_get_duplicate(struct rtnl_qdisc *)
Get packet duplication probability of netem qdisc.
Definition: netem.c:676
rtnl_netem_set_duplicate_correlation
void rtnl_netem_set_duplicate_correlation(struct rtnl_qdisc *, int)
Set packet duplication correlation probability of netem qdisc.
Definition: netem.c:695
rtnl_netem_set_reorder_correlation
void rtnl_netem_set_reorder_correlation(struct rtnl_qdisc *, int)
Set re-order correlation probability of netem qdisc.
Definition: netem.c:464
rtnl_netem_set_duplicate
void rtnl_netem_set_duplicate(struct rtnl_qdisc *, int)
Set packet duplication probability of netem qdisc.
Definition: netem.c:660
rtnl_netem_set_loss_correlation
void rtnl_netem_set_loss_correlation(struct rtnl_qdisc *, int)
Set packet loss correlation probability of netem qdisc.
Definition: netem.c:618
rtnl_netem_get_delay_distribution_size
int rtnl_netem_get_delay_distribution_size(struct rtnl_qdisc *)
Get the size of the distribution table.
Definition: netem.c:840
rtnl_netem_get_loss_correlation
int rtnl_netem_get_loss_correlation(struct rtnl_qdisc *)
Get packet loss correlation probability of netem qdisc.
Definition: netem.c:634
rtnl_netem_get_limit
int rtnl_netem_get_limit(struct rtnl_qdisc *)
Get limit of netem qdisc.
Definition: netem.c:368
rtnl_netem_set_gap
void rtnl_netem_set_gap(struct rtnl_qdisc *, int)
Set re-ordering gap of netem qdisc.
Definition: netem.c:394
rtnl_netem_set_delay_correlation
void rtnl_netem_set_delay_correlation(struct rtnl_qdisc *, int)
Set packet delay correlation probability of netem qdisc.
Definition: netem.c:806
rtnl_netem_get_delay_correlation
int rtnl_netem_get_delay_correlation(struct rtnl_qdisc *)
Get packet delay correlation probability of netem qdisc.
Definition: netem.c:822
rtnl_netem_get_corruption_correlation
int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *)
Get corruption correlation probability of netem qdisc.
Definition: netem.c:557
rtnl_netem_set_corruption_probability
void rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int)
Set corruption probability of netem qdisc.
Definition: netem.c:506
rtnl_netem_set_delay_distribution
int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *, const char *)
Load the delay distribution from a file.
Definition: netem.c:909
rtnl_netem_get_delay_distribution
int rtnl_netem_get_delay_distribution(struct rtnl_qdisc *, int16_t **)
Get a pointer to the distribution table.
Definition: netem.c:859
rtnl_netem_set_jitter
void rtnl_netem_set_jitter(struct rtnl_qdisc *, int)
Set packet delay jitter of netem qdisc.
Definition: netem.c:772
rtnl_netem_set_loss
void rtnl_netem_set_loss(struct rtnl_qdisc *, int)
Set packet loss probability of netem qdisc.
Definition: netem.c:583