summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zebra/Makefile.am2
-rw-r--r--zebra/zebra_vxlan_private.h76
2 files changed, 77 insertions, 1 deletions
diff --git a/zebra/Makefile.am b/zebra/Makefile.am
index a19e6e708..25e6b1bc1 100644
--- a/zebra/Makefile.am
+++ b/zebra/Makefile.am
@@ -44,7 +44,7 @@ noinst_HEADERS = \
zebra_ptm_redistribute.h zebra_ptm.h zebra_routemap.h \
zebra_ns.h zebra_vrf.h ioctl_solaris.h zebra_static.h zebra_mpls.h \
kernel_netlink.h if_netlink.h zebra_mroute.h label_manager.h \
- zebra_l2.h
+ zebra_l2.h zebra_vxlan_private.h
zebra_LDADD = $(otherobj) ../lib/libfrr.la $(LIBCAP)
diff --git a/zebra/zebra_vxlan_private.h b/zebra/zebra_vxlan_private.h
new file mode 100644
index 000000000..c33eba54e
--- /dev/null
+++ b/zebra/zebra_vxlan_private.h
@@ -0,0 +1,76 @@
+/*
+ * Zebra VxLAN (EVPN) Data structures and definitions
+ * These are "internal" to this function.
+ * Copyright (C) 2016, 2017 Cumulus Networks, Inc.
+ *
+ * This file is part of FRR.
+ *
+ * FRR 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, or (at your option) any
+ * later version.
+ *
+ * FRR 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 FRR; see the file COPYING. If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef _ZEBRA_VXLAN_PRIVATE_H
+#define _ZEBRA_VXLAN_PRIVATE_H
+
+#include <zebra.h>
+
+#include <zebra.h>
+
+#include "if.h"
+#include "linklist.h"
+
+/* definitions */
+typedef struct zebra_vni_t_ zebra_vni_t;
+typedef struct zebra_vtep_t_ zebra_vtep_t;
+
+/*
+ * VTEP info
+ *
+ * Right now, this just has each remote VTEP's IP address.
+ */
+struct zebra_vtep_t_
+{
+ /* Remote IP. */
+ /* NOTE: Can only be IPv4 right now. */
+ struct in_addr vtep_ip;
+
+ /* Links. */
+ struct zebra_vtep_t_ *next;
+ struct zebra_vtep_t_ *prev;
+};
+
+
+/*
+ * VNI hash table
+ *
+ * Contains information pertaining to a VNI:
+ * - the list of remote VTEPs (with this VNI)
+ */
+struct zebra_vni_t_
+{
+ /* VNI - key */
+ vni_t vni;
+
+ /* Corresponding VxLAN interface. */
+ struct interface *vxlan_if;
+
+ /* List of remote VTEPs */
+ zebra_vtep_t *vteps;
+
+ /* Local IP */
+ struct in_addr local_vtep_ip;
+};
+
+#endif /* _ZEBRA_VXLAN_PRIVATE_H */