libnl
3.2.3
|
00001 /* 00002 * netlink/route/class.h Traffic Classes 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-2011 Thomas Graf <tgraf@suug.ch> 00010 */ 00011 00012 #ifndef NETLINK_CLASS_H_ 00013 #define NETLINK_CLASS_H_ 00014 00015 #include <netlink/netlink.h> 00016 #include <netlink/route/tc.h> 00017 #include <netlink/route/qdisc.h> 00018 00019 #ifdef __cplusplus 00020 extern "C" { 00021 #endif 00022 00023 struct rtnl_class; 00024 00025 extern struct rtnl_class * 00026 rtnl_class_alloc(void); 00027 extern void rtnl_class_put(struct rtnl_class *); 00028 00029 extern int rtnl_class_alloc_cache(struct nl_sock *, int, 00030 struct nl_cache **); 00031 extern struct rtnl_class * 00032 rtnl_class_get(struct nl_cache *, int, uint32_t); 00033 00034 extern struct rtnl_qdisc * 00035 rtnl_class_leaf_qdisc(struct rtnl_class *, 00036 struct nl_cache *); 00037 00038 extern int rtnl_class_build_add_request(struct rtnl_class *, int, 00039 struct nl_msg **); 00040 extern int rtnl_class_add(struct nl_sock *, struct rtnl_class *, 00041 int); 00042 00043 extern int rtnl_class_build_delete_request(struct rtnl_class *, 00044 struct nl_msg **); 00045 extern int rtnl_class_delete(struct nl_sock *, 00046 struct rtnl_class *); 00047 00048 /* deprecated functions */ 00049 extern void rtnl_class_foreach_child(struct rtnl_class *, 00050 struct nl_cache *, 00051 void (*cb)(struct nl_object *, 00052 void *), 00053 void *) 00054 __attribute__((deprecated)); 00055 extern void rtnl_class_foreach_cls(struct rtnl_class *, 00056 struct nl_cache *, 00057 void (*cb)(struct nl_object *, 00058 void *), 00059 void *) 00060 __attribute__((deprecated)); 00061 00062 #ifdef __cplusplus 00063 } 00064 #endif 00065 00066 #endif