2019-10-07 16:19:00 +02:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+
|
|
|
|
* Copyright © 2019 VMware, Inc. */
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "conf-parser.h"
|
2019-12-11 12:10:29 +01:00
|
|
|
#include "qdisc.h"
|
2019-10-07 16:19:00 +02:00
|
|
|
#include "time-util.h"
|
|
|
|
|
2019-10-30 09:02:15 +01:00
|
|
|
typedef struct NetworkEmulator {
|
2019-12-11 12:10:29 +01:00
|
|
|
QDisc meta;
|
|
|
|
|
2019-10-07 16:19:00 +02:00
|
|
|
usec_t delay;
|
|
|
|
usec_t jitter;
|
|
|
|
|
|
|
|
uint32_t limit;
|
|
|
|
uint32_t loss;
|
2019-10-30 18:58:02 +01:00
|
|
|
uint32_t duplicate;
|
2019-10-30 09:02:15 +01:00
|
|
|
} NetworkEmulator;
|
2019-10-07 16:19:00 +02:00
|
|
|
|
2019-12-11 12:10:29 +01:00
|
|
|
DEFINE_QDISC_CAST(NETEM, NetworkEmulator);
|
|
|
|
extern const QDiscVTable netem_vtable;
|
2019-10-07 16:19:00 +02:00
|
|
|
|
2020-02-04 13:45:29 +01:00
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_delay);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_rate);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_packet_limit);
|