]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/tc_core.h
lib: introduce print_nl
[mirror_iproute2.git] / tc / tc_core.h
index 9f835e8d053a0b4fecf571215b56276ee0e6bec6..1dfa9a4f773bd5b4039e35fb4b15e8fd1e964ab3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TC_CORE_H_
 #define _TC_CORE_H_ 1
 
@@ -7,8 +8,9 @@
 #define TIME_UNITS_PER_SEC     1000000
 
 enum link_layer {
-       LINKLAYER_ETHERNET=1,
-       LINKLAYER_ATM     =2,
+       LINKLAYER_UNSPEC,
+       LINKLAYER_ETHERNET,
+       LINKLAYER_ATM,
 };
 
 
@@ -17,10 +19,11 @@ 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(unsigned rate, unsigned size);
-unsigned tc_calc_xmitsize(unsigned rate, unsigned ticks);
+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_size_table(struct tc_sizespec *s, __u16 **stab);
 
 int tc_setup_estimator(unsigned A, unsigned time_const, struct tc_estimator *est);