1 /* SPDX-License-Identifier: LGPL-2.1-only */ 2 /* 3 * Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch> 4 */ 5 6 #ifndef NETLINK_TC_PRIV_H_ 7 #define NETLINK_TC_PRIV_H_ 8 9 #include <netlink-private/netlink.h> 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 #define TCA_ATTR_HANDLE 0x0001 16 #define TCA_ATTR_PARENT 0x0002 17 #define TCA_ATTR_IFINDEX 0x0004 18 #define TCA_ATTR_KIND 0x0008 19 #define TCA_ATTR_FAMILY 0x0010 20 #define TCA_ATTR_INFO 0x0020 21 #define TCA_ATTR_OPTS 0x0040 22 #define TCA_ATTR_STATS 0x0080 23 #define TCA_ATTR_XSTATS 0x0100 24 #define TCA_ATTR_LINK 0x0200 25 #define TCA_ATTR_MTU 0x0400 26 #define TCA_ATTR_MPU 0x0800 27 #define TCA_ATTR_OVERHEAD 0x1000 28 #define TCA_ATTR_LINKTYPE 0x2000 29 #define TCA_ATTR_CHAIN 0x4000 30 #define TCA_ATTR_MAX TCA_ATTR_CHAIN 31 32 extern int tca_parse(struct nlattr **, int, struct rtnl_tc *, 33 const struct nla_policy *); 34 35 #define RTNL_TC_RTABLE_SIZE 256 36 37 extern int rtnl_tc_build_rate_table(struct rtnl_tc *tc, struct rtnl_ratespec *, 38 uint32_t *); 39 40 tca_xstats(struct rtnl_tc * tca)41static inline void *tca_xstats(struct rtnl_tc *tca) 42 { 43 return tca->tc_xstats->d_data; 44 } 45 46 extern struct nl_af_group tc_groups[]; 47 48 #ifdef __cplusplus 49 } 50 #endif 51 52 #endif 53