summaryrefslogtreecommitdiffstats
path: root/lib/pw.h
diff options
context:
space:
mode:
authorßingen <bingen@voltanet.io>2017-05-15 17:09:28 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-09 12:35:15 +0200
commit6833ae01bc8cb0c15579d7098f2d525a6e36c8bb (patch)
treef9495c40c9edc6fb7f68bf91a07e56eab003db6e /lib/pw.h
parentzebra: add implicit-null labels to the rib (diff)
downloadfrr-6833ae01bc8cb0c15579d7098f2d525a6e36c8bb.tar.xz
frr-6833ae01bc8cb0c15579d7098f2d525a6e36c8bb.zip
zebra: add pseudowire manager
Base framework for supporting MPLS pseudowires in FRR. A consistent zserv interface is provided so that any client daemon (e.g. ldpd, bgpd) can install/uninstall pseudowires in a standard way. Static pseudowires can also be implemented by using the same interface. When zebra receives a request to install a pseudowire and the installation in the kernel or hardware fails, a notification is sent back to the client daemon and a new install attempt is made every 60 seconds (until it succeeds). Support for external dataplanes is provided by the use of hooks to install/uninstall pseudowires. Signed-off-by: ßingen <bingen@voltanet.io> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/pw.h')
-rw-r--r--lib/pw.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/pw.h b/lib/pw.h
new file mode 100644
index 000000000..b34f681ac
--- /dev/null
+++ b/lib/pw.h
@@ -0,0 +1,47 @@
+/* Pseudowire definitions
+ * Copyright (C) 2016 Volta Networks, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _FRR_PW_H
+#define _FRR_PW_H
+
+/* Pseudowire type - LDP and BGP use the same values. */
+#define PW_TYPE_ETHERNET_TAGGED 0x0004 /* RFC 4446 */
+#define PW_TYPE_ETHERNET 0x0005 /* RFC 4446 */
+#define PW_TYPE_WILDCARD 0x7FFF /* RFC 4863, RFC 6668 */
+
+/* Pseudowire flags. */
+#define F_PSEUDOWIRE_CWORD 0x01
+
+/* Pseudowire status. */
+#define PW_STATUS_DOWN 0
+#define PW_STATUS_UP 1
+
+/*
+ * Protocol-specific information about the pseudowire.
+ */
+union pw_protocol_fields {
+ struct {
+ /* TODO */
+ } ldp;
+ struct {
+ /* TODO */
+ } bgp;
+};
+
+#endif /* _FRR_PW_H */