Logo Search packages:      
Sourcecode: libnl version File versions

tc.h

/*
 * netlink/route/tc.h         Traffic Control
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation version 2.1
 *    of the License.
 *
 * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
 */

#ifndef NETLINK_TC_H_
#define NETLINK_TC_H_

#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/data.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * TC statistics identifiers
 * @ingroup tc
 */
00027 enum rtnl_tc_stats_id {
00028       RTNL_TC_PACKETS,  /**< Packets seen */
00029       RTNL_TC_BYTES,          /**< Bytes seen */
00030       RTNL_TC_RATE_BPS, /**< Current bits/s (rate estimator) */
00031       RTNL_TC_RATE_PPS, /**< Current packet/s (rate estimator) */
00032       RTNL_TC_QLEN,           /**< Queue length */
00033       RTNL_TC_BACKLOG,  /**< Backlog length */
00034       RTNL_TC_DROPS,          /**< Packets dropped */
00035       RTNL_TC_REQUEUES, /**< Number of requeues */
00036       RTNL_TC_OVERLIMITS,     /**< Number of overlimits */
      __RTNL_TC_STATS_MAX,
};

#define RTNL_TC_STATS_MAX (__RTNL_TC_STATS_MAX - 1)

extern int rtnl_tc_calc_txtime(int, int);
extern int rtnl_tc_calc_bufsize(int, int);
extern int rtnl_tc_calc_cell_log(int);

/**
 * Number of entries in a transmission time lookup table
 * @ingroup tc
 */
00050 #define RTNL_TC_RTABLE_SIZE   256

extern int rtnl_tc_build_rate_table(uint32_t *, uint8_t, uint8_t, int, int);


/* TC Handle Translations */
extern char *           rtnl_tc_handle2str(uint32_t, char *, size_t);
extern int        rtnl_tc_str2handle(const char *, uint32_t *);

#ifdef __cplusplus
}
#endif

#endif

Generated by  Doxygen 1.6.0   Back to index