]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/tc/qdisc.h
network: introduce TrafficControl
[thirdparty/systemd.git] / src / network / tc / qdisc.h
1 /* SPDX-License-Identifier: LGPL-2.1+
2 * Copyright © 2019 VMware, Inc. */
3 #pragma once
4
5 #include "conf-parser.h"
6 #include "macro.h"
7 #include "netem.h"
8 #include "../networkd-util.h"
9
10 typedef struct QDiscs QDiscs;
11
12 struct QDiscs {
13 NetworkConfigSection *section;
14 Network *network;
15
16 Link *link;
17
18 int family;
19
20 uint32_t handle;
21 uint32_t parent;
22
23 bool has_network_emulator:1;
24
25 NetworkEmulator ne;
26 };
27
28 void qdisc_free(QDiscs *qdisc);
29 int qdisc_new_static(Network *network, const char *filename, unsigned section_line, QDiscs **ret);
30
31 int qdisc_configure(Link *link, QDiscs *qdisc);
32
33 DEFINE_NETWORK_SECTION_FUNCTIONS(QDiscs, qdisc_free);
34
35 CONFIG_PARSER_PROTOTYPE(config_parse_tc_qdiscs_parent);