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

libnl 3.10.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
13extern "C" {
14#endif
15
16extern void rtnl_netem_set_limit(struct rtnl_qdisc *, int);
17extern int rtnl_netem_get_limit(struct rtnl_qdisc *);
18
19/* Packet Re-ordering */
20extern void rtnl_netem_set_gap(struct rtnl_qdisc *, int);
21extern int rtnl_netem_get_gap(struct rtnl_qdisc *);
22
23extern void rtnl_netem_set_reorder_probability(struct rtnl_qdisc *, int);
24extern int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *);
25
26extern void rtnl_netem_set_reorder_correlation(struct rtnl_qdisc *, int);
27extern int rtnl_netem_get_reorder_correlation(struct rtnl_qdisc *);
28
29/* Corruption */
30extern void rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int);
31extern int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *);
32
33extern void rtnl_netem_set_corruption_correlation(struct rtnl_qdisc *, int);
34extern int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *);
35
36/* Packet Loss */
37extern void rtnl_netem_set_loss(struct rtnl_qdisc *, int);
38extern int rtnl_netem_get_loss(struct rtnl_qdisc *);
39
40extern void rtnl_netem_set_loss_correlation(struct rtnl_qdisc *, int);
41extern int rtnl_netem_get_loss_correlation(struct rtnl_qdisc *);
42
43/* Packet Duplication */
44extern void rtnl_netem_set_duplicate(struct rtnl_qdisc *, int);
45extern int rtnl_netem_get_duplicate(struct rtnl_qdisc *);
46
47extern void rtnl_netem_set_duplicate_correlation(struct rtnl_qdisc *, int);
48extern int rtnl_netem_get_duplicate_correlation(struct rtnl_qdisc *);
49
50/* Packet Delay */
51extern void rtnl_netem_set_delay(struct rtnl_qdisc *, int);
52extern int rtnl_netem_get_delay(struct rtnl_qdisc *);
53
54extern void rtnl_netem_set_jitter(struct rtnl_qdisc *, int);
55extern int rtnl_netem_get_jitter(struct rtnl_qdisc *);
56
57extern void rtnl_netem_set_delay_correlation(struct rtnl_qdisc *, int);
58extern int rtnl_netem_get_delay_correlation(struct rtnl_qdisc *);
59
60/* Delay Distribution */
61#define MAXDIST 65536
62extern int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *, const char *);
63extern int rtnl_netem_set_delay_distribution_data(struct rtnl_qdisc *, const int16_t *, size_t len);
64extern int rtnl_netem_get_delay_distribution_size(struct rtnl_qdisc *);
65extern 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:726
rtnl_netem_get_duplicate
int rtnl_netem_get_duplicate(struct rtnl_qdisc *)
Get packet duplication probability of netem qdisc.
Definition netem.c:707
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:890
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:511
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:837
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:853
rtnl_netem_get_loss
int rtnl_netem_get_loss(struct rtnl_qdisc *)
Get packet loss probability of netem qdisc.
Definition netem.c:630
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:871
rtnl_netem_get_gap
int rtnl_netem_get_gap(struct rtnl_qdisc *)
Get re-ordering gap of netem qdisc.
Definition netem.c:441
rtnl_netem_get_reorder_probability
int rtnl_netem_get_reorder_probability(struct rtnl_qdisc *)
Get re-ordering probability of netem qdisc.
Definition netem.c:476
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:742
rtnl_netem_set_jitter
void rtnl_netem_set_jitter(struct rtnl_qdisc *, int)
Set packet delay jitter of netem qdisc.
Definition netem.c:803
rtnl_netem_get_corruption_correlation
int rtnl_netem_get_corruption_correlation(struct rtnl_qdisc *)
Get corruption correlation probability of netem qdisc.
Definition netem.c:588
rtnl_netem_set_loss
void rtnl_netem_set_loss(struct rtnl_qdisc *, int)
Set packet loss probability of netem qdisc.
Definition netem.c:614
rtnl_netem_set_limit
void rtnl_netem_set_limit(struct rtnl_qdisc *, int)
Set limit of netem qdisc.
Definition netem.c:383
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:495
rtnl_netem_get_corruption_probability
int rtnl_netem_get_corruption_probability(struct rtnl_qdisc *)
Get corruption probability of netem qdisc.
Definition netem.c:553
rtnl_netem_get_jitter
int rtnl_netem_get_jitter(struct rtnl_qdisc *)
Get packet delay jitter of netem qdisc.
Definition netem.c:819
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:572
rtnl_netem_get_delay
int rtnl_netem_get_delay(struct rtnl_qdisc *)
Get packet delay of netem qdisc.
Definition netem.c:784
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:460
rtnl_netem_set_gap
void rtnl_netem_set_gap(struct rtnl_qdisc *, int)
Set re-ordering gap of netem qdisc.
Definition netem.c:425
rtnl_netem_set_corruption_probability
void rtnl_netem_set_corruption_probability(struct rtnl_qdisc *, int)
Set corruption probability of netem qdisc.
Definition netem.c:537
rtnl_netem_set_duplicate
void rtnl_netem_set_duplicate(struct rtnl_qdisc *, int)
Set packet duplication probability of netem qdisc.
Definition netem.c:691
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:649
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:940
rtnl_netem_set_delay
void rtnl_netem_set_delay(struct rtnl_qdisc *, int)
Set packet delay of netem qdisc.
Definition netem.c:768
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:665
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:909
rtnl_netem_get_limit
int rtnl_netem_get_limit(struct rtnl_qdisc *)
Get limit of netem qdisc.
Definition netem.c:399
rtnl_qdisc
Definition nl-route.h:118