libnl 3.5.0

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
rtnl_qdisc_get_by_parent
struct rtnl_qdisc * rtnl_qdisc_get_by_parent(struct nl_cache *, int, uint32_t)
Search qdisc by interface index and parent.
Definition: qdisc.c:388
rtnl_qdisc_foreach_cls
void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *, struct nl_cache *, void(*cb)(struct nl_object *, void *), void *) __attribute__((deprecated))
Call a callback for each filter attached to the qdisc (deprecated)
Definition: qdisc.c:475
rtnl_qdisc_change
int rtnl_qdisc_change(struct nl_sock *, struct rtnl_qdisc *, struct rtnl_qdisc *) __attribute__((deprecated))
Change attributes of a qdisc.
Definition: qdisc.c:512
rtnl_qdisc_add
int rtnl_qdisc_add(struct nl_sock *, struct rtnl_qdisc *, int)
Add qdisc.
Definition: qdisc.c:163
rtnl_qdisc_alloc_cache
int rtnl_qdisc_alloc_cache(struct nl_sock *, struct nl_cache **)
Allocate a cache and fill it with all configured qdiscs.
Definition: qdisc.c:369
rtnl_qdisc_build_add_request
int rtnl_qdisc_build_add_request(struct rtnl_qdisc *, int, struct nl_msg **)
Build a netlink message requesting the addition of a qdisc.
Definition: qdisc.c:115
rtnl_qdisc_update
int rtnl_qdisc_update(struct nl_sock *, struct rtnl_qdisc *, struct rtnl_qdisc *, int)
Update qdisc.
Definition: qdisc.c:248
rtnl_qdisc_build_change_request
int rtnl_qdisc_build_change_request(struct rtnl_qdisc *, struct rtnl_qdisc *, struct nl_msg **) __attribute__((deprecated))
Build a netlink message requesting the update of a qdisc.
Definition: qdisc.c:497
rtnl_qdisc_build_update_request
int rtnl_qdisc_build_update_request(struct rtnl_qdisc *, struct rtnl_qdisc *, int, struct nl_msg **)
Build netlink message requesting the update of a qdisc.
Definition: qdisc.c:189
rtnl_qdisc_get
struct rtnl_qdisc * rtnl_qdisc_get(struct nl_cache *, int, uint32_t)
Search qdisc by interface index and handle.
Definition: qdisc.c:420
rtnl_qdisc_build_delete_request
int rtnl_qdisc_build_delete_request(struct rtnl_qdisc *, struct nl_msg **)
Build netlink message requesting the deletion of a qdisc.
Definition: qdisc.c:274
rtnl_qdisc_delete
int rtnl_qdisc_delete(struct nl_sock *, struct rtnl_qdisc *)
Delete qdisc.
Definition: qdisc.c:341
rtnl_qdisc_foreach_child
void rtnl_qdisc_foreach_child(struct rtnl_qdisc *, struct nl_cache *, void(*cb)(struct nl_object *, void *), void *) __attribute__((deprecated))
Call a callback for each child class of a qdisc (deprecated)
Definition: qdisc.c:451