libnl: /data/src/libnl3/include/netlink/route/qdisc.h Source File

libnl 3.10.0

qdisc.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
4 */
5
6#ifndef NETLINK_QDISC_H_
7#define NETLINK_QDISC_H_
8
9#include <netlink/netlink.h>
10#include <netlink/cache.h>
11#include <netlink/route/tc.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17struct rtnl_qdisc;
18
19extern struct rtnl_qdisc *
20 rtnl_qdisc_alloc(void);
21extern void rtnl_qdisc_put(struct rtnl_qdisc *);
22
23extern int rtnl_qdisc_alloc_cache(struct nl_sock *, struct nl_cache **);
24
25extern struct rtnl_qdisc *
26 rtnl_qdisc_get(struct nl_cache *, int, uint32_t);
27
28extern struct rtnl_qdisc *
29 rtnl_qdisc_get_by_parent(struct nl_cache *, int, uint32_t);
30extern struct rtnl_qdisc *rtnl_qdisc_get_by_kind(struct nl_cache *cache,
31 int ifindex, char *kind);
32
33extern int rtnl_qdisc_build_add_request(struct rtnl_qdisc *, int,
34 struct nl_msg **);
35extern int rtnl_qdisc_add(struct nl_sock *, struct rtnl_qdisc *, int);
36
37extern int rtnl_qdisc_build_update_request(struct rtnl_qdisc *,
38 struct rtnl_qdisc *,
39 int, struct nl_msg **);
40
41extern int rtnl_qdisc_update(struct nl_sock *, struct rtnl_qdisc *,
42 struct rtnl_qdisc *, int);
43
44extern int rtnl_qdisc_build_delete_request(struct rtnl_qdisc *,
45 struct nl_msg **);
46extern int rtnl_qdisc_delete(struct nl_sock *, struct rtnl_qdisc *);
47
48/* Deprecated functions */
49extern void rtnl_qdisc_foreach_child(struct rtnl_qdisc *, struct nl_cache *,
50 void (*cb)(struct nl_object *, void *),
51 void *) __attribute__ ((deprecated));
52
53extern void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *, struct nl_cache *,
54 void (*cb)(struct nl_object *, void *),
55 void *) __attribute__ ((deprecated));
56
57extern int rtnl_qdisc_build_change_request(struct rtnl_qdisc *,
58 struct rtnl_qdisc *,
59 struct nl_msg **)
60 __attribute__ ((deprecated));
61
62extern int rtnl_qdisc_change(struct nl_sock *, struct rtnl_qdisc *,
63 struct rtnl_qdisc *) __attribute__ ((deprecated));
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif
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:363
rtnl_qdisc_delete
int rtnl_qdisc_delete(struct nl_sock *, struct rtnl_qdisc *)
Delete qdisc.
Definition qdisc.c:335
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:526
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:268
rtnl_qdisc_get_by_kind
struct rtnl_qdisc * rtnl_qdisc_get_by_kind(struct nl_cache *cache, int ifindex, char *kind)
Search qdisc by kind.
Definition qdisc.c:415
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:541
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:382
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:504
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:448
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:109
rtnl_qdisc_update
int rtnl_qdisc_update(struct nl_sock *, struct rtnl_qdisc *, struct rtnl_qdisc *, int)
Update qdisc.
Definition qdisc.c:242
rtnl_qdisc_add
int rtnl_qdisc_add(struct nl_sock *, struct rtnl_qdisc *, int)
Add qdisc.
Definition qdisc.c:157
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:480
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:183
rtnl_qdisc
Definition nl-route.h:118