Debian Codegraph @

include/netlink/route/class.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2003-2011 Thomas Graf <[email protected]>
4 */
5
6 #ifndef NETLINK_CLASS_H_
7 #define NETLINK_CLASS_H_
8
9 #include <netlink/netlink.h>
10 #include <netlink/route/tc.h>
11 #include <netlink/route/qdisc.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 struct rtnl_class;
18
19 extern struct rtnl_class *
20 rtnl_class_alloc(void);
21 extern void rtnl_class_put(struct rtnl_class *);
22
23 extern int rtnl_class_alloc_cache(struct nl_sock *, int,
24 struct nl_cache **);
25 extern struct rtnl_class *
26 rtnl_class_get(struct nl_cache *, int, uint32_t);
27
28 extern struct rtnl_class *
29 rtnl_class_get_by_parent(struct nl_cache *, int, uint32_t);
30
31 extern struct rtnl_qdisc *
32 rtnl_class_leaf_qdisc(struct rtnl_class *,
33 struct nl_cache *);
34
35 extern int rtnl_class_build_add_request(struct rtnl_class *, int,
36 struct nl_msg **);
37 extern int rtnl_class_add(struct nl_sock *, struct rtnl_class *,
38 int);
39
40 extern int rtnl_class_build_delete_request(struct rtnl_class *,
41 struct nl_msg **);
42 extern int rtnl_class_delete(struct nl_sock *,
43 struct rtnl_class *);
44
45 /* deprecated functions */
46 extern void rtnl_class_foreach_child(struct rtnl_class *,
47 struct nl_cache *,
48 void (*cb)(struct nl_object *,
49 void *),
50 void *)
51 __attribute__((deprecated));
52 extern void rtnl_class_foreach_cls(struct rtnl_class *,
53 struct nl_cache *,
54 void (*cb)(struct nl_object *,
55 void *),
56 void *)
57 __attribute__((deprecated));
58
59 #ifdef __cplusplus
60 }
61 #endif
62
63 #endif