2019-10-07 16:19:00 +02:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+
|
|
|
|
* Copyright © 2019 VMware, Inc. */
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "conf-parser.h"
|
|
|
|
#include "netem.h"
|
2019-10-30 09:02:15 +01:00
|
|
|
#include "networkd-link.h"
|
|
|
|
#include "networkd-network.h"
|
|
|
|
#include "networkd-util.h"
|
2019-10-07 16:19:00 +02:00
|
|
|
|
2019-10-30 09:02:15 +01:00
|
|
|
typedef struct QDiscs {
|
2019-10-07 16:19:00 +02:00
|
|
|
NetworkConfigSection *section;
|
|
|
|
Network *network;
|
|
|
|
|
|
|
|
Link *link;
|
|
|
|
|
|
|
|
int family;
|
|
|
|
|
|
|
|
uint32_t handle;
|
|
|
|
uint32_t parent;
|
|
|
|
|
|
|
|
bool has_network_emulator:1;
|
|
|
|
|
|
|
|
NetworkEmulator ne;
|
2019-10-30 09:02:15 +01:00
|
|
|
} QDiscs;
|
2019-10-07 16:19:00 +02:00
|
|
|
|
|
|
|
void qdisc_free(QDiscs *qdisc);
|
|
|
|
int qdisc_new_static(Network *network, const char *filename, unsigned section_line, QDiscs **ret);
|
|
|
|
|
|
|
|
int qdisc_configure(Link *link, QDiscs *qdisc);
|
|
|
|
|
|
|
|
DEFINE_NETWORK_SECTION_FUNCTIONS(QDiscs, qdisc_free);
|
|
|
|
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_tc_qdiscs_parent);
|