summaryrefslogtreecommitdiffstats
path: root/include/netlink
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-10-05 08:55:38 (GMT)
committerThomas Haller <thaller@redhat.com>2015-11-19 16:20:28 (GMT)
commit3f231213c7c586b5a5e8ce6b1ea9c1d3b24d74c0 (patch)
treec617e155435b2d95abf27eb59070c105975fd242 /include/netlink
parente6b39c9e2355febfe16555b738ccdcf945497245 (diff)
downloadlibnl-3f231213c7c586b5a5e8ce6b1ea9c1d3b24d74c0.zip
libnl-3f231213c7c586b5a5e8ce6b1ea9c1d3b24d74c0.tar.gz
libnl-3f231213c7c586b5a5e8ce6b1ea9c1d3b24d74c0.tar.bz2
route/link: add macvtap support
This adds support for MAC-VLAN based tap interfaces (macvtap). http://lists.infradead.org/pipermail/libnl/2015-October/001976.html Signed-off-by: Beniamino Galvani <bgalvani@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'include/netlink')
-rw-r--r--include/netlink/route/link/macvtap.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/netlink/route/link/macvtap.h b/include/netlink/route/link/macvtap.h
new file mode 100644
index 0000000..affcddc
--- /dev/null
+++ b/include/netlink/route/link/macvtap.h
@@ -0,0 +1,46 @@
+/*
+ * netlink/route/link/macvtap.h MACVTAP interface
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2015 Beniamino Galvani <bgalvani@redhat.com>
+ */
+
+#ifndef NETLINK_LINK_MACVTAP_H_
+#define NETLINK_LINK_MACVTAP_H_
+
+#include <netlink/netlink.h>
+#include <netlink/route/link.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern struct rtnl_link *rtnl_link_macvtap_alloc(void);
+
+extern int rtnl_link_is_macvtap(struct rtnl_link *);
+
+extern char * rtnl_link_macvtap_mode2str(int, char *, size_t);
+extern int rtnl_link_macvtap_str2mode(const char *);
+
+extern char * rtnl_link_macvtap_flags2str(int, char *, size_t);
+extern int rtnl_link_macvtap_str2flags(const char *);
+
+extern int rtnl_link_macvtap_set_mode(struct rtnl_link *,
+ uint32_t);
+extern uint32_t rtnl_link_macvtap_get_mode(struct rtnl_link *);
+
+extern int rtnl_link_macvtap_set_flags(struct rtnl_link *,
+ uint16_t);
+extern int rtnl_link_macvtap_unset_flags(struct rtnl_link *,
+ uint16_t);
+extern uint16_t rtnl_link_macvtap_get_flags(struct rtnl_link *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif