6#ifndef NETLINK_TC_API_H_
7#define NETLINK_TC_API_H_
9#include <netlink/netlink.h>
10#include <netlink/msg.h>
11#include <netlink/route/tc.h>
14#include "nl-priv-dynamic-route/nl-priv-dynamic-route.h"
15#include "nl-priv-dynamic-core/nl-core.h"
16#include "nl-priv-dynamic-core/cache-api.h"
20#define TCA_ATTR_HANDLE 0x0001
21#define TCA_ATTR_PARENT 0x0002
22#define TCA_ATTR_IFINDEX 0x0004
23#define TCA_ATTR_KIND 0x0008
24#define TCA_ATTR_FAMILY 0x0010
25#define TCA_ATTR_INFO 0x0020
26#define TCA_ATTR_OPTS 0x0040
27#define TCA_ATTR_STATS 0x0080
28#define TCA_ATTR_XSTATS 0x0100
29#define TCA_ATTR_LINK 0x0200
30#define TCA_ATTR_MTU 0x0400
31#define TCA_ATTR_MPU 0x0800
32#define TCA_ATTR_OVERHEAD 0x1000
33#define TCA_ATTR_LINKTYPE 0x2000
34#define TCA_ATTR_CHAIN 0x4000
35#define TCA_ATTR_MAX TCA_ATTR_CHAIN
37extern int tca_parse(
struct nlattr **,
int,
struct rtnl_tc *,
40#define RTNL_TC_RTABLE_SIZE 256
42static inline void *tca_xstats(
struct rtnl_tc *tca)
44 return tca->tc_xstats->d_data;
47extern struct nl_af_group tc_groups[];
53 enum rtnl_tc_type tt_type;
70extern int rtnl_tc_msg_parse(
struct nlmsghdr *,
72extern int rtnl_tc_msg_build(
struct rtnl_tc *,
int,
73 int,
struct nl_msg **);
75extern void rtnl_tc_free_data(
struct nl_object *);
76extern int rtnl_tc_clone(
struct nl_object *,
78extern void rtnl_tc_dump_line(
struct nl_object *,
80extern void rtnl_tc_dump_details(
struct nl_object *,
82extern void rtnl_tc_dump_stats(
struct nl_object *,
84extern uint64_t rtnl_tc_compare(
struct nl_object *,
90 struct rtnl_tc_ops *,
int *);
void * rtnl_tc_data_check(struct rtnl_tc *, struct rtnl_tc_ops *, int *)
Check traffic control object type and return private data section.
void * rtnl_tc_data_peek(struct rtnl_tc *tc)
Returns the private data of the traffic control object.
int rtnl_tc_build_rate_table(struct rtnl_tc *tc, struct rtnl_ratespec *, uint32_t *)
Compute a transmission time lookup table.
void * rtnl_tc_data(struct rtnl_tc *)
Return pointer to private data of traffic control object.
int rtnl_tc_register(struct rtnl_tc_ops *)
Register a traffic control module.
void rtnl_tc_unregister(struct rtnl_tc_ops *)
Unregister a traffic control module.
Attribute validation policy.
void(* tt_dump[NL_DUMP_MAX+1])(struct rtnl_tc *, struct nl_dump_params *)
Dump callbacks.