]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Add some MSDP infrastructure
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 8 Sep 2016 17:17:38 +0000 (13:17 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:08 +0000 (20:26 -0500)
Add some very basic MSDP infrastructure to pim.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/Makefile.am
pimd/pim_main.c
pimd/pim_msdp.c [new file with mode: 0644]
pimd/pim_msdp.h [new file with mode: 0644]

index eba05076d5f7ecb338d5031d7158e6197c55b42f..07679f27942d14a02d25523104750415ea75e95b 100644 (file)
@@ -54,7 +54,8 @@ libpim_a_SOURCES = \
        pim_hello.c pim_ifchannel.c pim_join.c pim_assert.c \
        pim_msg.c pim_upstream.c pim_rpf.c pim_macro.c \
        pim_ssmpingd.c pim_int.c pim_rp.c \
-       pim_static.c pim_br.c pim_register.c pim_routemap.c
+       pim_static.c pim_br.c pim_register.c pim_routemap.c \
+       pim_msdp.c
 
 noinst_HEADERS = \
        pim_memory.h \
@@ -65,7 +66,8 @@ noinst_HEADERS = \
        pim_hello.h pim_ifchannel.h pim_join.h pim_assert.h \
        pim_msg.h pim_upstream.h pim_rpf.h pim_macro.h \
        pim_igmp_join.h pim_ssmpingd.h pim_int.h pim_rp.h \
-       pim_static.h pim_br.h pim_register.h
+       pim_static.h pim_br.h pim_register.h \
+       pim_msdp.h
 
 pimd_SOURCES = \
        pim_main.c $(libpim_a_SOURCES)
index 337f925271ada44bfca2ede73c8e0d2f11f4ccbf..53c7e092aa03f4bc9eb27fb7a8b7f85144b69c53 100644 (file)
@@ -44,6 +44,7 @@
 #include "pim_version.h"
 #include "pim_signals.h"
 #include "pim_zebra.h"
+#include "pim_msdp.h"
 
 #ifdef PIM_ZCLIENT_DEBUG
 extern int zclient_debug;
@@ -209,6 +210,7 @@ int main(int argc, char** argv, char** envp) {
   prefix_list_init ();
   pim_route_map_init ();
   pim_init();
+  pim_msdp_init ();
 
   /*
    * Initialize zclient "update" and "lookup" sockets
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
new file mode 100644 (file)
index 0000000..8cfe786
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * PIM for Quagga
+ * Copyright (C) 2016 Cumulus Networks, Inc.
+ * Donald Sharp
+ *
+ * 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
+ */
+
+#include <zebra.h>
+
+#include <lib/prefix.h>
+
+#include <pimd/pim_msdp.h>
+
+void
+pim_msdp_init (void)
+{
+  return;
+}
diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h
new file mode 100644 (file)
index 0000000..c6c38be
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * PIM for Quagga
+ * Copyright (C) 2016 Cumulus Networks, Inc.
+ * Donald Sharp
+ *
+ * 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 PIM_MSDP_H
+#define PIM_MSDP_H
+
+enum pim_msdp_states_t
+  {
+    PIM_MSDP_DISABLED,
+    PIM_MSDP_INACTIVE,
+    PIM_MSDP_LISTEN,
+    PIM_MSDP_CONNECTING,
+    PIM_MSDP_ESTABLISHED
+  };
+
+enum pim_msdp_tlv_t
+  {
+    PIM_MSDP_V4_SOURCE_ACTIVE = 1,
+    PIM_MSDP_V4_SOURCE_ACTIVE_REQUEST,
+    PIM_MSDP_V4_SOURCE_ACTIVE_RESPONSE,
+    PIM_MSDP_KEEPALIVE,
+    PIM_MSDP_RESERVED,
+    PIM_MSDP_TRACEROUTE_PROGRESS,
+    PIM_MSDP_TRACEROUTE_REPLY,
+  };
+
+struct pim_msdp_t
+{
+  enum pim_msdp_states_t  state;
+
+  struct prefix peer;
+
+  struct thread *cr_timer;  // 5.6
+  struct thread *h_timer;   // 5.4
+  struct thread *ka_timer;  // 5.5
+
+};
+
+void pim_msdp_init (void);
+#endif