~ubuntu-branches/ubuntu/trusty/libnl3/trusty

« back to all changes in this revision

Viewing changes to include/netlink-tc.h

  • Committer: Bazaar Package Importer
  • Author(s): Heiko Stuebner
  • Date: 2011-05-21 19:25:13 UTC
  • Revision ID: james.westby@ubuntu.com-20110521192513-1ieyu9w9kym4bt16
Tags: upstream-3.0
ImportĀ upstreamĀ versionĀ 3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * netlink-tc.h         Local Traffic Control Interface
 
3
 *
 
4
 *      This library is free software; you can redistribute it and/or
 
5
 *      modify it under the terms of the GNU Lesser General Public
 
6
 *      License as published by the Free Software Foundation version 2.1
 
7
 *      of the License.
 
8
 *
 
9
 * Copyright (c) 2003-2010 Thomas Graf <tgraf@suug.ch>
 
10
 */
 
11
 
 
12
#ifndef NETLINK_TC_PRIV_H_
 
13
#define NETLINK_TC_PRIV_H_
 
14
 
 
15
#include <netlink-local.h>
 
16
 
 
17
#ifdef __cplusplus
 
18
extern "C" {
 
19
#endif
 
20
 
 
21
#define TCA_ATTR_HANDLE         0x0001
 
22
#define TCA_ATTR_PARENT         0x0002
 
23
#define TCA_ATTR_IFINDEX        0x0004
 
24
#define TCA_ATTR_KIND           0x0008
 
25
#define TCA_ATTR_FAMILY         0x0010
 
26
#define TCA_ATTR_INFO           0x0020
 
27
#define TCA_ATTR_OPTS           0x0040
 
28
#define TCA_ATTR_STATS          0x0080
 
29
#define TCA_ATTR_XSTATS         0x0100
 
30
#define TCA_ATTR_LINK           0x0200
 
31
#define TCA_ATTR_MTU            0x0400
 
32
#define TCA_ATTR_MPU            0x0800
 
33
#define TCA_ATTR_OVERHEAD       0x1000
 
34
#define TCA_ATTR_LINKTYPE       0x2000
 
35
#define TCA_ATTR_MAX            TCA_ATTR_LINKTYPE
 
36
 
 
37
extern int tca_parse(struct nlattr **, int, struct rtnl_tc *,
 
38
                     struct nla_policy *);
 
39
 
 
40
#define RTNL_TC_RTABLE_SIZE     256
 
41
 
 
42
extern int rtnl_tc_build_rate_table(struct rtnl_tc *tc, struct rtnl_ratespec *,
 
43
                                    uint32_t *);
 
44
 
 
45
 
 
46
static inline void *tca_xstats(struct rtnl_tc *tca)
 
47
{
 
48
        return tca->tc_xstats->d_data;
 
49
}
 
50
 
 
51
#ifdef __cplusplus
 
52
}
 
53
#endif
 
54
 
 
55
#endif