]> git.proxmox.com Git - mirror_frr.git/blame - zebra/zebra_tc.h
tools: config clang-format to allow aligned macros
[mirror_frr.git] / zebra / zebra_tc.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
c317d3f2
SY
2/*
3 * Zebra Traffic Control (TC) Data structures and definitions
4 * These are public definitions referenced by multiple files.
5 *
6 * Copyright (C) 2022 Shichu Yang
c317d3f2
SY
7 */
8
9#ifndef _ZEBRA_TC_H
10#define _ZEBRA_TC_H
11
12#include <zebra.h>
13#include "rt.h"
14#include "tc.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20struct zebra_tc_qdisc {
21 int sock;
22
23 struct tc_qdisc qdisc;
24};
25
26struct zebra_tc_class {
27 int sock;
28
29 struct tc_class class;
30};
31
32struct zebra_tc_filter {
33 int sock;
34
35 struct tc_filter filter;
36};
37
38const char *tc_qdisc_kind2str(uint32_t type);
39enum tc_qdisc_kind tc_qdisc_str2kind(const char *type);
40
41uint32_t zebra_tc_qdisc_hash_key(const void *arg);
42bool zebra_tc_qdisc_hash_equal(const void *arg1, const void *arg2);
43void zebra_tc_qdisc_install(struct zebra_tc_qdisc *qdisc);
44void zebra_tc_qdisc_uninstall(struct zebra_tc_qdisc *qdisc);
45
46uint32_t zebra_tc_class_hash_key(const void *arg);
47bool zebra_tc_class_hash_equal(const void *arg1, const void *arg2);
48void zebra_tc_class_add(struct zebra_tc_class *class);
49void zebra_tc_class_delete(struct zebra_tc_class *class);
50
51const char *tc_filter_kind2str(uint32_t type);
52enum tc_qdisc_kind tc_filter_str2kind(const char *type);
53void zebra_tc_filter_add(struct zebra_tc_filter *filter);
54void zebra_tc_filter_delete(struct zebra_tc_filter *filter);
55
56void zebra_tc_filters_free(void *arg);
57uint32_t zebra_tc_filter_hash_key(const void *arg);
58bool zebra_tc_filter_hash_equal(const void *arg1, const void *arg2);
59
60void kernel_read_tc_qdisc(struct zebra_ns *zns);
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif /* _ZEBRA_TC_H */