libnl  3.2.24-rc1
qdisc.h
1 /*
2  * netlink/route/qdisc.h Queueing Disciplines
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation version 2.1
7  * of the License.
8  *
9  * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
10  */
11 
12 #ifndef NETLINK_QDISC_H_
13 #define NETLINK_QDISC_H_
14 
15 #include <netlink/netlink.h>
16 #include <netlink/cache.h>
17 #include <netlink/route/tc.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 struct rtnl_qdisc;
24 
25 extern struct rtnl_qdisc *
26  rtnl_qdisc_alloc(void);
27 extern void rtnl_qdisc_put(struct rtnl_qdisc *);
28 
29 extern int rtnl_qdisc_alloc_cache(struct nl_sock *, struct nl_cache **);
30 
31 extern struct rtnl_qdisc *
32  rtnl_qdisc_get(struct nl_cache *, int, uint32_t);
33 
34 extern struct rtnl_qdisc *
35  rtnl_qdisc_get_by_parent(struct nl_cache *, int, uint32_t);
36 
37 extern int rtnl_qdisc_build_add_request(struct rtnl_qdisc *, int,
38  struct nl_msg **);
39 extern int rtnl_qdisc_add(struct nl_sock *, struct rtnl_qdisc *, int);
40 
41 extern int rtnl_qdisc_build_update_request(struct rtnl_qdisc *,
42  struct rtnl_qdisc *,
43  int, struct nl_msg **);
44 
45 extern int rtnl_qdisc_update(struct nl_sock *, struct rtnl_qdisc *,
46  struct rtnl_qdisc *, int);
47 
48 extern int rtnl_qdisc_build_delete_request(struct rtnl_qdisc *,
49  struct nl_msg **);
50 extern int rtnl_qdisc_delete(struct nl_sock *, struct rtnl_qdisc *);
51 
52 /* Deprecated functions */
53 extern void rtnl_qdisc_foreach_child(struct rtnl_qdisc *, struct nl_cache *,
54  void (*cb)(struct nl_object *, void *),
55  void *) __attribute__ ((deprecated));
56 
57 extern void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *, struct nl_cache *,
58  void (*cb)(struct nl_object *, void *),
59  void *) __attribute__ ((deprecated));
60 
61 extern int rtnl_qdisc_build_change_request(struct rtnl_qdisc *,
62  struct rtnl_qdisc *,
63  struct nl_msg **)
64  __attribute__ ((deprecated));
65 
66 extern int rtnl_qdisc_change(struct nl_sock *, struct rtnl_qdisc *,
67  struct rtnl_qdisc *) __attribute__ ((deprecated));
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif