/build/buildd/libnl-1.0~pre6/include/netlink/route/tc.h

00001 /*
00002  * netlink/route/tc.h           Traffic Control
00003  *
00004  *      This library is free software; you can redistribute it and/or
00005  *      modify it under the terms of the GNU Lesser General Public
00006  *      License as published by the Free Software Foundation version 2.1
00007  *      of the License.
00008  *
00009  * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
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  * TC statistics identifiers
00021  * @ingroup tc
00022  */
00023 enum rtnl_tc_stats_id {
00024         RTNL_TC_PACKETS,        /**< Packets seen */
00025         RTNL_TC_BYTES,          /**< Bytes seen */
00026         RTNL_TC_RATE_BPS,       /**< Current bits/s (rate estimator) */
00027         RTNL_TC_RATE_PPS,       /**< Current packet/s (rate estimator) */
00028         RTNL_TC_QLEN,           /**< Queue length */
00029         RTNL_TC_BACKLOG,        /**< Backlog length */
00030         RTNL_TC_DROPS,          /**< Packets dropped */
00031         RTNL_TC_REQUEUES,       /**< Number of requeues */
00032         RTNL_TC_OVERLIMITS,     /**< Number of 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  * Number of entries in a transmission time lookup table
00044  * @ingroup tc
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 /* TC Handle Translations */
00052 extern char *           rtnl_tc_handle2str(uint32_t, char *, size_t);
00053 extern int              rtnl_tc_str2handle(const char *, uint32_t *);
00054 
00055 #endif

Generated on Fri Apr 27 14:14:07 2007 for libnl by  doxygen 1.5.1