00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_QDISC_H_
00013 #define NETLINK_QDISC_H_
00014
00015 #include <netlink/netlink.h>
00016 #include <netlink/cache.h>
00017 #include <netlink/route/tc.h>
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023 struct rtnl_qdisc;
00024
00025 extern struct rtnl_qdisc *
00026 rtnl_qdisc_alloc(void);
00027 extern void rtnl_qdisc_put(struct rtnl_qdisc *);
00028
00029 extern int rtnl_qdisc_alloc_cache(struct nl_sock *, struct nl_cache **);
00030
00031 extern struct rtnl_qdisc *
00032 rtnl_qdisc_get(struct nl_cache *, int, uint32_t);
00033
00034 extern struct rtnl_qdisc *
00035 rtnl_qdisc_get_by_parent(struct nl_cache *, int, uint32_t);
00036
00037 extern int rtnl_qdisc_build_add_request(struct rtnl_qdisc *, int,
00038 struct nl_msg **);
00039 extern int rtnl_qdisc_add(struct nl_sock *, struct rtnl_qdisc *, int);
00040
00041 extern int rtnl_qdisc_build_update_request(struct rtnl_qdisc *,
00042 struct rtnl_qdisc *,
00043 int, struct nl_msg **);
00044
00045 extern int rtnl_qdisc_update(struct nl_sock *, struct rtnl_qdisc *,
00046 struct rtnl_qdisc *, int);
00047
00048 extern int rtnl_qdisc_build_delete_request(struct rtnl_qdisc *,
00049 struct nl_msg **);
00050 extern int rtnl_qdisc_delete(struct nl_sock *, struct rtnl_qdisc *);
00051
00052
00053 extern void rtnl_qdisc_foreach_child(struct rtnl_qdisc *, struct nl_cache *,
00054 void (*cb)(struct nl_object *, void *),
00055 void *) __attribute__ ((deprecated));
00056
00057 extern void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *, struct nl_cache *,
00058 void (*cb)(struct nl_object *, void *),
00059 void *) __attribute__ ((deprecated));
00060
00061 extern int rtnl_qdisc_build_change_request(struct rtnl_qdisc *,
00062 struct rtnl_qdisc *,
00063 struct nl_msg **)
00064 __attribute__ ((deprecated));
00065
00066 extern int rtnl_qdisc_change(struct nl_sock *, struct rtnl_qdisc *,
00067 struct rtnl_qdisc *) __attribute__ ((deprecated));
00068
00069 #ifdef __cplusplus
00070 }
00071 #endif
00072
00073 #endif