]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/tc_core.h
action police: make 'mtu' could be set independently in police action
[mirror_iproute2.git] / tc / tc_core.h
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6dab2727d1995a3717dd248679252d7ffb58d397 100644 (file)
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _TC_CORE_H_
+#define _TC_CORE_H_ 1
+
+#include <asm/types.h>
+#include <linux/pkt_sched.h>
+
+enum link_layer {
+       LINKLAYER_UNSPEC,
+       LINKLAYER_ETHERNET,
+       LINKLAYER_ATM,
+};
+
+
+int  tc_core_time2big(unsigned time);
+unsigned tc_core_time2tick(unsigned time);
+unsigned tc_core_tick2time(unsigned tick);
+unsigned tc_core_time2ktime(unsigned time);
+unsigned tc_core_ktime2time(unsigned ktime);
+unsigned tc_calc_xmittime(__u64 rate, unsigned size);
+unsigned tc_calc_xmitsize(__u64 rate, unsigned ticks);
+int tc_calc_rtable(struct tc_ratespec *r, __u32 *rtab,
+                  int cell_log, unsigned mtu, enum link_layer link_layer);
+int tc_calc_rtable_64(struct tc_ratespec *r, __u32 *rtab,
+                       int cell_log, unsigned mtu, enum link_layer link_layer,
+                       __u64 rate);
+int tc_calc_size_table(struct tc_sizespec *s, __u16 **stab);
+
+int tc_setup_estimator(unsigned A, unsigned time_const, struct tc_estimator *est);
+
+int tc_core_init(void);
+
+extern struct rtnl_handle g_rth;
+extern int is_batch_mode;
+
+#endif