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 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023
00024
00025
00026
00027 enum rtnl_tc_stats_id {
00028 RTNL_TC_PACKETS,
00029 RTNL_TC_BYTES,
00030 RTNL_TC_RATE_BPS,
00031 RTNL_TC_RATE_PPS,
00032 RTNL_TC_QLEN,
00033 RTNL_TC_BACKLOG,
00034 RTNL_TC_DROPS,
00035 RTNL_TC_REQUEUES,
00036 RTNL_TC_OVERLIMITS,
00037 __RTNL_TC_STATS_MAX,
00038 };
00039
00040 #define RTNL_TC_STATS_MAX (__RTNL_TC_STATS_MAX - 1)
00041
00042 extern int rtnl_tc_calc_txtime(int, int);
00043 extern int rtnl_tc_calc_bufsize(int, int);
00044 extern int rtnl_tc_calc_cell_log(int);
00045
00046
00047
00048
00049
00050 #define RTNL_TC_RTABLE_SIZE 256
00051
00052 extern int rtnl_tc_build_rate_table(uint32_t *, uint8_t, uint8_t, int, int);
00053
00054
00055
00056 extern char * rtnl_tc_handle2str(uint32_t, char *, size_t);
00057 extern int rtnl_tc_str2handle(const char *, uint32_t *);
00058
00059 #ifdef __cplusplus
00060 }
00061 #endif
00062
00063 #endif