]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/zebra_tc.h
2 * Zebra Traffic Control (TC) Data structures and definitions
3 * These are public definitions referenced by multiple files.
5 * Copyright (C) 2022 Shichu Yang
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 * You should have received a copy of the GNU General Public License along
18 * with this program; see the file COPYING; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33 struct zebra_tc_qdisc
{
36 struct tc_qdisc qdisc
;
39 struct zebra_tc_class
{
42 struct tc_class
class;
45 struct zebra_tc_filter
{
48 struct tc_filter filter
;
51 const char *tc_qdisc_kind2str(uint32_t type
);
52 enum tc_qdisc_kind
tc_qdisc_str2kind(const char *type
);
54 uint32_t zebra_tc_qdisc_hash_key(const void *arg
);
55 bool zebra_tc_qdisc_hash_equal(const void *arg1
, const void *arg2
);
56 void zebra_tc_qdisc_install(struct zebra_tc_qdisc
*qdisc
);
57 void zebra_tc_qdisc_uninstall(struct zebra_tc_qdisc
*qdisc
);
59 uint32_t zebra_tc_class_hash_key(const void *arg
);
60 bool zebra_tc_class_hash_equal(const void *arg1
, const void *arg2
);
61 void zebra_tc_class_add(struct zebra_tc_class
*class);
62 void zebra_tc_class_delete(struct zebra_tc_class
*class);
64 const char *tc_filter_kind2str(uint32_t type
);
65 enum tc_qdisc_kind
tc_filter_str2kind(const char *type
);
66 void zebra_tc_filter_add(struct zebra_tc_filter
*filter
);
67 void zebra_tc_filter_delete(struct zebra_tc_filter
*filter
);
69 void zebra_tc_filters_free(void *arg
);
70 uint32_t zebra_tc_filter_hash_key(const void *arg
);
71 bool zebra_tc_filter_hash_equal(const void *arg1
, const void *arg2
);
73 void kernel_read_tc_qdisc(struct zebra_ns
*zns
);
79 #endif /* _ZEBRA_TC_H */