summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-01-19 15:45:11 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2022-02-16 16:40:56 +0100
commitb7f71639c93584eb92c459b66dde0037077aa67c (patch)
tree7f5eb5177dee7dcd73d1b4e0b244dde9e435c808
parentpim6d: drop off MLAG code (diff)
downloadfrr-b7f71639c93584eb92c459b66dde0037077aa67c.tar.xz
frr-b7f71639c93584eb92c459b66dde0037077aa67c.zip
pim6d: isolate remaining TODOs into stubs file
This creates `pim6_stubs.c`, which is intended to temporarily provide stubbed-out definitions of some functions we don't have yet for IPv6. This makes pim6d compile without the `PIM_V6_TEMP_BREAK` hack, and is very important as an intermediate step to get a working environment for further work. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--pimd/pim6_stubs.c141
-rw-r--r--pimd/subdir.am11
2 files changed, 147 insertions, 5 deletions
diff --git a/pimd/pim6_stubs.c b/pimd/pim6_stubs.c
new file mode 100644
index 000000000..038baa069
--- /dev/null
+++ b/pimd/pim6_stubs.c
@@ -0,0 +1,141 @@
+/*
+ * PIMv6 temporary stubs
+ * Copyright (C) 2022 David Lamparter for NetDEF, 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
+ */
+
+#include <zebra.h>
+
+#include "pimd.h"
+#include "pim_nht.h"
+#include "pim_zlookup.h"
+#include "pim_pim.h"
+#include "pim_register.h"
+#include "pim_cmd.h"
+
+/*
+ * NH lookup / NHT
+ */
+void pim_sendmsg_zebra_rnh(struct pim_instance *pim, struct zclient *zclient,
+ struct pim_nexthop_cache *pnc, int command)
+{
+}
+
+int pim_ecmp_nexthop_lookup(struct pim_instance *pim,
+ struct pim_nexthop *nexthop, struct prefix *src,
+ struct prefix *grp, int neighbor_needed)
+{
+ return 0;
+}
+
+int pim_find_or_track_nexthop(struct pim_instance *pim, struct prefix *addr,
+ struct pim_upstream *up, struct rp_info *rp,
+ struct pim_nexthop_cache *out_pnc)
+{
+ return 0;
+}
+
+void pim_delete_tracked_nexthop(struct pim_instance *pim, struct prefix *addr,
+ struct pim_upstream *up, struct rp_info *rp)
+{
+}
+
+struct pim_nexthop_cache *pim_nexthop_cache_find(struct pim_instance *pim,
+ struct pim_rpf *rpf)
+{
+ return NULL;
+}
+
+void pim_rp_nexthop_del(struct rp_info *rp_info)
+{
+}
+
+void pim_nht_bsr_add(struct pim_instance *pim, struct in_addr addr)
+{
+}
+
+void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr addr)
+{
+}
+
+int zclient_lookup_nexthop(struct pim_instance *pim,
+ struct pim_zlookup_nexthop nexthop_tab[],
+ const int tab_size, pim_addr addr,
+ int max_lookup)
+{
+ return -1;
+}
+
+void zclient_lookup_new(void)
+{
+}
+
+void zclient_lookup_free(void)
+{
+}
+
+/*
+ * packet handling
+ */
+int pim_msg_send(int fd, pim_addr src, pim_addr dst, uint8_t *pim_msg,
+ int pim_msg_size, const char *ifname)
+{
+ return 0;
+}
+
+int pim_hello_send(struct interface *ifp, uint16_t holdtime)
+{
+ return -1;
+}
+
+void pim_hello_restart_now(struct interface *ifp)
+{
+}
+
+void pim_hello_restart_triggered(struct interface *ifp)
+{
+}
+
+int pim_sock_add(struct interface *ifp)
+{
+ return -1;
+}
+
+void pim_sock_delete(struct interface *ifp, const char *delete_message)
+{
+}
+
+/*
+ * PIM register
+ */
+void pim_register_join(struct pim_upstream *up)
+{
+}
+
+void pim_null_register_send(struct pim_upstream *up)
+{
+}
+
+void pim_reg_del_on_couldreg_fail(struct interface *ifp)
+{
+}
+
+/*
+ * CLI
+ */
+void pim_cmd_init(void)
+{
+}
diff --git a/pimd/subdir.am b/pimd/subdir.am
index 0afaf666e..8e99b0c01 100644
--- a/pimd/subdir.am
+++ b/pimd/subdir.am
@@ -18,7 +18,6 @@ pim_common = \
pimd/pim_bfd.c \
pimd/pim_br.c \
pimd/pim_bsm.c \
- pimd/pim_cmd.c \
pimd/pim_errors.c \
pimd/pim_hello.c \
pimd/pim_iface.c \
@@ -34,10 +33,7 @@ pim_common = \
pimd/pim_nb.c \
pimd/pim_nb_config.c \
pimd/pim_neighbor.c \
- pimd/pim_nht.c \
pimd/pim_oil.c \
- pimd/pim_pim.c \
- pimd/pim_register.c \
pimd/pim_routemap.c \
pimd/pim_rp.c \
pimd/pim_rpf.c \
@@ -52,13 +48,13 @@ pim_common = \
pimd/pim_util.c \
pimd/pim_vty.c \
pimd/pim_zebra.c \
- pimd/pim_zlookup.c \
pimd/pim_vxlan.c \
pimd/pimd.c \
# end
pimd_pimd_SOURCES = \
$(pim_common) \
+ pimd/pim_cmd.c \
pimd/pim_igmp.c \
pimd/pim_igmp_mtrace.c \
pimd/pim_igmp_stats.c \
@@ -69,7 +65,11 @@ pimd_pimd_SOURCES = \
pimd/pim_msdp.c \
pimd/pim_msdp_packet.c \
pimd/pim_msdp_socket.c \
+ pimd/pim_nht.c \
+ pimd/pim_pim.c \
+ pimd/pim_register.c \
pimd/pim_signals.c \
+ pimd/pim_zlookup.c \
pimd/pim_zpthread.c \
# end
@@ -82,6 +82,7 @@ nodist_pimd_pimd_SOURCES = \
pimd_pim6d_SOURCES = \
$(pim_common) \
pimd/pim6_main.c \
+ pimd/pim6_stubs.c \
# end
nodist_pimd_pim6d_SOURCES = \