]> git.proxmox.com Git - mirror_iproute2.git/blob - tc/tc_core.h
9f835e8d053a0b4fecf571215b56276ee0e6bec6
[mirror_iproute2.git] / tc / tc_core.h
1 #ifndef _TC_CORE_H_
2 #define _TC_CORE_H_ 1
3
4 #include <asm/types.h>
5 #include <linux/pkt_sched.h>
6
7 #define TIME_UNITS_PER_SEC 1000000
8
9 enum link_layer {
10 LINKLAYER_ETHERNET=1,
11 LINKLAYER_ATM =2,
12 };
13
14
15 int tc_core_time2big(unsigned time);
16 unsigned tc_core_time2tick(unsigned time);
17 unsigned tc_core_tick2time(unsigned tick);
18 unsigned tc_core_time2ktime(unsigned time);
19 unsigned tc_core_ktime2time(unsigned ktime);
20 unsigned tc_calc_xmittime(unsigned rate, unsigned size);
21 unsigned tc_calc_xmitsize(unsigned rate, unsigned ticks);
22 int tc_calc_rtable(struct tc_ratespec *r, __u32 *rtab,
23 int cell_log, unsigned mtu, enum link_layer link_layer);
24
25 int tc_setup_estimator(unsigned A, unsigned time_const, struct tc_estimator *est);
26
27 int tc_core_init(void);
28
29 extern struct rtnl_handle g_rth;
30 extern int is_batch_mode;
31
32 #endif