summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMobashshera Rasool <mrasool@vmware.com>2022-02-10 09:14:41 +0100
committerMobashshera Rasool <mrasool@vmware.com>2022-02-28 10:38:41 +0100
commit26cd3d66127d69aca75c5961c917c62792b60066 (patch)
treeb070fa233e70e1147465ed73d7650a55cd28cb95
parentpimd: Change the show running commands based on address family (diff)
downloadfrr-26cd3d66127d69aca75c5961c917c62792b60066.tar.xz
frr-26cd3d66127d69aca75c5961c917c62792b60066.zip
pimd: Adding pim_cmd_common.h and .c
This is to keep the cmd changes common to v4 and v6 in this file. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
-rw-r--r--pimd/pim6_cmd.c1
-rw-r--r--pimd/pim_cmd.c1
-rw-r--r--pimd/pim_cmd_common.c40
-rw-r--r--pimd/pim_cmd_common.h22
-rw-r--r--pimd/subdir.am2
5 files changed, 66 insertions, 0 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c
index 1326a1ebf..8055cbe7f 100644
--- a/pimd/pim6_cmd.c
+++ b/pimd/pim6_cmd.c
@@ -37,6 +37,7 @@
#include "lib/northbound_cli.h"
#include "pim_errors.h"
#include "pim_nb.h"
+#include "pim_cmd_common.h"
#ifndef VTYSH_EXTRACT_PL
#include "pimd/pim6_cmd_clippy.c"
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 00f510a44..851af0ffc 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -67,6 +67,7 @@
#include "lib/northbound_cli.h"
#include "pim_errors.h"
#include "pim_nb.h"
+#include "pim_cmd_common.h"
#ifndef VTYSH_EXTRACT_PL
#include "pimd/pim_cmd_clippy.c"
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c
new file mode 100644
index 000000000..23fff2f47
--- /dev/null
+++ b/pimd/pim_cmd_common.c
@@ -0,0 +1,40 @@
+/*
+ * PIM for IPv6 FRR
+ * Copyright (C) 2022 Vmware, Inc.
+ * Mobashshera Rasool <mrasool@vmware.com>
+ *
+ * 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/json.h"
+#include "command.h"
+#include "if.h"
+#include "prefix.h"
+#include "zclient.h"
+#include "plist.h"
+#include "hash.h"
+#include "nexthop.h"
+#include "vrf.h"
+#include "ferr.h"
+
+#include "pimd.h"
+#include "pim_vty.h"
+#include "lib/northbound_cli.h"
+#include "pim_errors.h"
+#include "pim_nb.h"
+
+
diff --git a/pimd/pim_cmd_common.h b/pimd/pim_cmd_common.h
new file mode 100644
index 000000000..5ca600791
--- /dev/null
+++ b/pimd/pim_cmd_common.h
@@ -0,0 +1,22 @@
+/*
+ * PIM for IPv6 FRR
+ * Copyright (C) 2022 Vmware, Inc.
+ * Mobashshera Rasool <mrasool@vmware.com>
+ *
+ * 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_CMD_COMMON_H
+#define PIM_CMD_COMMON_H
+#endif /* PIM_CMD_COMMON_H */
diff --git a/pimd/subdir.am b/pimd/subdir.am
index 552fb171a..0fe40912b 100644
--- a/pimd/subdir.am
+++ b/pimd/subdir.am
@@ -22,6 +22,7 @@ pim_common = \
pimd/pim_bfd.c \
pimd/pim_br.c \
pimd/pim_bsm.c \
+ pimd/pim_cmd_common.c \
pimd/pim_errors.c \
pimd/pim_hello.c \
pimd/pim_iface.c \
@@ -103,6 +104,7 @@ noinst_HEADERS += \
pimd/pim_br.h \
pimd/pim_bsm.h \
pimd/pim_cmd.h \
+ pimd/pim_cmd_common.h \
pimd/pim_errors.h \
pimd/pim_hello.h \
pimd/pim_iface.h \