libnl 3.0
|
00001 /* 00002 * netlink/route/qdisc.h Queueing Disciplines 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation version 2.1 00007 * of the License. 00008 * 00009 * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch> 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 nl_object_ops qdisc_obj_ops; 00026 00027 extern struct rtnl_qdisc *rtnl_qdisc_alloc(void); 00028 extern void rtnl_qdisc_put(struct rtnl_qdisc *); 00029 00030 extern int rtnl_qdisc_alloc_cache(struct nl_sock *, struct nl_cache **); 00031 extern struct rtnl_qdisc *rtnl_qdisc_get(struct nl_cache *, int, uint32_t); 00032 extern struct rtnl_qdisc *rtnl_qdisc_get_by_parent(struct nl_cache *, 00033 int, uint32_t); 00034 00035 extern int rtnl_qdisc_build_add_request(struct rtnl_qdisc *, int, 00036 struct nl_msg **); 00037 extern int rtnl_qdisc_add(struct nl_sock *, struct rtnl_qdisc *, int); 00038 00039 extern int rtnl_qdisc_build_change_request(struct rtnl_qdisc *, 00040 struct rtnl_qdisc *, 00041 struct nl_msg **); 00042 extern int rtnl_qdisc_change(struct nl_sock *, struct rtnl_qdisc *, 00043 struct rtnl_qdisc *); 00044 00045 extern int rtnl_qdisc_build_delete_request(struct rtnl_qdisc *, 00046 struct nl_msg **); 00047 extern int rtnl_qdisc_delete(struct nl_sock *, struct rtnl_qdisc *); 00048 00049 extern void rtnl_qdisc_set_kind(struct rtnl_qdisc *, const char *); 00050 00051 extern void rtnl_qdisc_foreach_child(struct rtnl_qdisc *, struct nl_cache *, 00052 void (*cb)(struct nl_object *, void *), 00053 void *); 00054 00055 extern void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *, struct nl_cache *, 00056 void (*cb)(struct nl_object *, void *), 00057 void *); 00058 00059 extern struct nl_msg * rtnl_qdisc_get_opts(struct rtnl_qdisc *); 00060 00061 #ifdef __cplusplus 00062 } 00063 #endif 00064 00065 #endif