From: Donald Sharp Date: Thu, 8 Sep 2016 17:17:38 +0000 (-0400) Subject: pimd: Add some MSDP infrastructure X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~235 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=111285870d5ef9a6cd8394aae5d1662fd9c27925;p=mirror%2Ffrr.git pimd: Add some MSDP infrastructure Add some very basic MSDP infrastructure to pim. Signed-off-by: Donald Sharp --- diff --git a/pimd/Makefile.am b/pimd/Makefile.am index eba05076d5..07679f2794 100644 --- a/pimd/Makefile.am +++ b/pimd/Makefile.am @@ -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) diff --git a/pimd/pim_main.c b/pimd/pim_main.c index 337f925271..53c7e092aa 100644 --- a/pimd/pim_main.c +++ b/pimd/pim_main.c @@ -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 index 0000000000..8cfe7864a3 --- /dev/null +++ b/pimd/pim_msdp.c @@ -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 + +#include + +#include + +void +pim_msdp_init (void) +{ + return; +} diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h new file mode 100644 index 0000000000..c6c38be257 --- /dev/null +++ b/pimd/pim_msdp.h @@ -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