summaryrefslogtreecommitdiffstats
path: root/lib/route/tc-api.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-08-01 06:47:43 (GMT)
committerThomas Haller <thaller@redhat.com>2023-08-01 07:37:45 (GMT)
commitcf41e14dd44bbe6f80074335ae774567f55a5f47 (patch)
tree38098b246c151df31ed23808a66f85f56e9f7327 /lib/route/tc-api.h
parentdb810cfb8ce7f2620f3d865ac4e9e3f757030eb3 (diff)
downloadlibnl-cf41e14dd44bbe6f80074335ae774567f55a5f47.zip
libnl-cf41e14dd44bbe6f80074335ae774567f55a5f47.tar.gz
libnl-cf41e14dd44bbe6f80074335ae774567f55a5f47.tar.bz2
route: move "include/netlink-private/route/tc-api.h" to lib/route
This header is entirely private to lib/route (libnl-route-3). Move the header there, it should not be used by anybody else. Note that libnl-route-3 exports symbols from this private header. That is ugly, make that clearer by adding comments.
Diffstat (limited to 'lib/route/tc-api.h')
-rw-r--r--lib/route/tc-api.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/lib/route/tc-api.h b/lib/route/tc-api.h
new file mode 100644
index 0000000..7de8915
--- /dev/null
+++ b/lib/route/tc-api.h
@@ -0,0 +1,64 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
+/*
+ * Copyright (c) 2011-2013 Thomas Graf <tgraf@suug.ch>
+ */
+
+#ifndef NETLINK_TC_API_H_
+#define NETLINK_TC_API_H_
+
+#include <netlink/netlink.h>
+#include <netlink/msg.h>
+#include <netlink/route/tc.h>
+
+#include "nl-hidden-route/nl-hidden-route.h"
+
+struct rtnl_tc_type_ops
+{
+ enum rtnl_tc_type tt_type;
+
+ char *tt_dump_prefix;
+
+ /**
+ * Dump callbacks
+ */
+ void (*tt_dump[NL_DUMP_MAX+1])(struct rtnl_tc *,
+ struct nl_dump_params *);
+};
+
+void *rtnl_tc_data_peek(struct rtnl_tc *tc);
+
+/*****************************************************************************/
+
+/* WARNING: the following symbols are wrongly exported in libnl-route-3
+ * library. They are private API, but leaked. */
+extern int rtnl_tc_msg_parse(struct nlmsghdr *,
+ struct rtnl_tc *);
+extern int rtnl_tc_msg_build(struct rtnl_tc *, int,
+ int, struct nl_msg **);
+
+extern void rtnl_tc_free_data(struct nl_object *);
+extern int rtnl_tc_clone(struct nl_object *,
+ struct nl_object *);
+extern void rtnl_tc_dump_line(struct nl_object *,
+ struct nl_dump_params *);
+extern void rtnl_tc_dump_details(struct nl_object *,
+ struct nl_dump_params *);
+extern void rtnl_tc_dump_stats(struct nl_object *,
+ struct nl_dump_params *);
+extern uint64_t rtnl_tc_compare(struct nl_object *,
+ struct nl_object *,
+ uint64_t, int);
+
+extern void * rtnl_tc_data(struct rtnl_tc *);
+extern void * rtnl_tc_data_check(struct rtnl_tc *,
+ struct rtnl_tc_ops *, int *);
+
+extern int rtnl_tc_register(struct rtnl_tc_ops *);
+extern void rtnl_tc_unregister(struct rtnl_tc_ops *);
+
+extern void rtnl_tc_type_register(struct rtnl_tc_type_ops *);
+extern void rtnl_tc_type_unregister(struct rtnl_tc_type_ops *);
+
+/*****************************************************************************/
+
+#endif