libnl: /data/src/libnl3/include/netlink/route/qdisc/netem.h Source File

libnl 3.7.0

netem.h
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
4 */
5
6 #ifndef NETLINK_NETEM_H_
7 #define NETLINK_NETEM_H_
8
9 #include <netlink/netlink.h>
10 #include <netlink/route/qdisc.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 extern void rtnl_netem_set_limit(struct rtnl_qdisc *, int);
17 extern int rtnl_netem_get_limit(struct rtnl_qdisc *);
18
19 /* Packet Re-ordering */
20 extern void rtnl_netem_set_gap(struct rtnl_qdisc *, int);
21 extern int rtnl_netem_get_gap(struct rtnl_qdisc *);
22
23 extern void rtnl_netem_set_reorder_probability(struct rtnl_qdisc *, int);
24 extern int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *);
25
26 extern void rtnl_netem_set_reorder_correlation(struct rtnl_qdisc *, int);
27 extern int rtnl_netem_get_reorder_correlation(struct rtnl_qdisc *);
28
29 /* Corruption */
30 extern void rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int);
31 extern int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *);
32
33 extern void rtnl_netem_set_corruption_correlation(struct rtnl_qdisc *, int);
34 extern int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *);
35
36 /* Packet Loss */
37 extern void rtnl_netem_set_loss(struct rtnl_qdisc *, int);
38 extern int rtnl_netem_get_loss(struct rtnl_qdisc *);
39
40 extern void rtnl_netem_set_loss_correlation(struct rtnl_qdisc *, int);
41 extern int rtnl_netem_get_loss_correlation(struct rtnl_qdisc *);
42
43 /* Packet Duplication */
44 extern void rtnl_netem_set_duplicate(struct rtnl_qdisc *, int);
45 extern int rtnl_netem_get_duplicate(struct rtnl_qdisc *);
46
47 extern void rtnl_netem_set_duplicate_correlation(struct rtnl_qdisc *, int);
48 extern int rtnl_netem_get_duplicate_correlation(struct rtnl_qdisc *);
49
50 /* Packet Delay */
51 extern void rtnl_netem_set_delay(struct rtnl_qdisc *, int);
52 extern int rtnl_netem_get_delay(struct rtnl_qdisc *);
53
54 extern void rtnl_netem_set_jitter(struct rtnl_qdisc *, int);
55 extern int rtnl_netem_get_jitter(struct rtnl_qdisc *);
56
57 extern void rtnl_netem_set_delay_correlation(struct rtnl_qdisc *, int);
58 extern int rtnl_netem_get_delay_correlation(struct rtnl_qdisc *);
59
60 /* Delay Distribution */
61 #define MAXDIST 65536
62 extern int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *, const char *);
63 extern int rtnl_netem_set_delay_distribution_data(struct rtnl_qdisc *, const int16_t *, size_t len);
64 extern int rtnl_netem_get_delay_distribution_size(struct rtnl_qdisc *);
65 extern int rtnl_netem_get_delay_distribution(struct rtnl_qdisc *, int16_t **);
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif
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:691
rtnl_netem_get_duplicate
int rtnl_netem_get_duplicate(struct rtnl_qdisc *)
Get packet duplication probability of netem qdisc.
Definition: netem.c:672
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:855
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:476
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:802
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:818
rtnl_netem_get_loss
int rtnl_netem_get_loss(struct rtnl_qdisc *)
Get packet loss probability of netem qdisc.
Definition: netem.c:595
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:836
rtnl_netem_get_gap
int rtnl_netem_get_gap(struct rtnl_qdisc *)
Get re-ordering gap of netem qdisc.
Definition: netem.c:406
rtnl_netem_get_reorder_probability
int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *)
Get re-ordering probability of netem qdisc.
Definition: netem.c:441
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:707
rtnl_netem_set_jitter
void rtnl_netem_set_jitter(struct rtnl_qdisc *, int)
Set packet delay jitter of netem qdisc.
Definition: netem.c:768
rtnl_netem_get_corruption_correlation
int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *)
Get corruption correlation probability of netem qdisc.
Definition: netem.c:553
rtnl_netem_set_loss
void rtnl_netem_set_loss(struct rtnl_qdisc *, int)
Set packet loss probability of netem qdisc.
Definition: netem.c:579
rtnl_netem_set_limit
void rtnl_netem_set_limit(struct rtnl_qdisc *, int)
Set limit of netem qdisc.
Definition: netem.c:348
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:460
rtnl_netem_get_corruption_probability
int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *)
Get corruption probability of netem qdisc.
Definition: netem.c:518
rtnl_netem_get_jitter
int rtnl_netem_get_jitter(struct rtnl_qdisc *)
Get packet delay jitter of netem qdisc.
Definition: netem.c:784
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:537
rtnl_netem_get_delay
int rtnl_netem_get_delay(struct rtnl_qdisc *)
Get packet delay of netem qdisc.
Definition: netem.c:749
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:425
rtnl_netem_set_gap
void rtnl_netem_set_gap(struct rtnl_qdisc *, int)
Set re-ordering gap of netem qdisc.
Definition: netem.c:390
rtnl_netem_set_corruption_probability
void rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int)
Set corruption probability of netem qdisc.
Definition: netem.c:502
rtnl_netem_set_duplicate
void rtnl_netem_set_duplicate(struct rtnl_qdisc *, int)
Set packet duplication probability of netem qdisc.
Definition: netem.c:656
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:614
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:905
rtnl_netem_set_delay
void rtnl_netem_set_delay(struct rtnl_qdisc *, int)
Set packet delay of netem qdisc.
Definition: netem.c:733
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:630
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:874
rtnl_netem_get_limit
int rtnl_netem_get_limit(struct rtnl_qdisc *)
Get limit of netem qdisc.
Definition: netem.c:364