oops
[libnl.git] / include / netlink / route / qdisc-modules.h
1 /*
2  * netlink/route/qdisc-modules.h       Qdisc Module API
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-2006 Thomas Graf <tgraf@suug.ch>
10  */
11
12 #ifndef NETLINK_QDISC_MODULES_H_
13 #define NETLINK_QDISC_MODULES_H_
14
15 #include <netlink/netlink.h>
16
17 /**
18  * Qdisc Operations
19  * @ingroup qdisc
20  */
21 struct rtnl_qdisc_ops
22 {
23         /**
24          * Kind/Name of Qdisc
25          */
26         char qo_kind[32];
27
28         /**
29          * Dump callbacks
30          */
31         int  (*qo_dump[NL_DUMP_MAX+1])(struct rtnl_qdisc *,
32                                        struct nl_dump_params *, int);
33
34         /**
35          * Must return the contents supposed to be in TCA_OPTIONS
36          */
37         struct nl_msg *(*qo_get_opts)(struct rtnl_qdisc *);
38
39         /**
40          * TCA_OPTIONS message parser
41          */
42         int  (*qo_msg_parser)(struct rtnl_qdisc *);
43
44         /**
45          * Called before a Qdisc object gets destroyed
46          */
47         void (*qo_free_data)(struct rtnl_qdisc *);
48
49         /**
50          * INTERNAL (Do not use)
51          */
52         struct rtnl_qdisc_ops *qo_next;
53 };
54
55 extern int rtnl_qdisc_register(struct rtnl_qdisc_ops *);
56 extern int rtnl_qdisc_unregister(struct rtnl_qdisc_ops *);
57
58 #endif