1 /* SPDX-License-Identifier: LGPL-2.1-or-later
2  * Copyright © 2019 VMware, Inc. */
3 #pragma once
4 
5 #include "conf-parser.h"
6 #include "qdisc.h"
7 #include "time-util.h"
8 
9 typedef struct NetworkEmulator {
10         QDisc meta;
11 
12         usec_t delay;
13         usec_t jitter;
14 
15         uint32_t limit;
16         uint32_t loss;
17         uint32_t duplicate;
18 } NetworkEmulator;
19 
20 DEFINE_QDISC_CAST(NETEM, NetworkEmulator);
21 extern const QDiscVTable netem_vtable;
22 
23 CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_delay);
24 CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_rate);
25 CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_packet_limit);
26