00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_TC_H_
00013 #define NETLINK_TC_H_
00014
00015 #include <netlink/netlink.h>
00016 #include <netlink/cache.h>
00017 #include <netlink/data.h>
00018
00019
00020
00021
00022
00023 enum rtnl_tc_stats_id {
00024 RTNL_TC_PACKETS,
00025 RTNL_TC_BYTES,
00026 RTNL_TC_RATE_BPS,
00027 RTNL_TC_RATE_PPS,
00028 RTNL_TC_QLEN,
00029 RTNL_TC_BACKLOG,
00030 RTNL_TC_DROPS,
00031 RTNL_TC_REQUEUES,
00032 RTNL_TC_OVERLIMITS,
00033 __RTNL_TC_STATS_MAX,
00034 };
00035
00036 #define RTNL_TC_STATS_MAX (__RTNL_TC_STATS_MAX - 1)
00037
00038 extern int rtnl_tc_calc_txtime(int, int);
00039 extern int rtnl_tc_calc_bufsize(int, int);
00040 extern int rtnl_tc_calc_cell_log(int);
00041
00042
00043
00044
00045
00046 #define RTNL_TC_RTABLE_SIZE 256
00047
00048 extern int rtnl_tc_build_rate_table(uint32_t *, uint8_t, uint8_t, int, int);
00049
00050
00051
00052 extern char * rtnl_tc_handle2str(uint32_t, char *, size_t);
00053 extern int rtnl_tc_str2handle(const char *, uint32_t *);
00054
00055 #endif