]> git.proxmox.com Git - mirror_frr.git/commitdiff
pim6d: Adding PIMV6 as VTYSH client
authorsarita patra <saritap@vmware.com>
Tue, 18 Jan 2022 06:01:18 +0000 (22:01 -0800)
committersarita patra <saritap@vmware.com>
Fri, 25 Feb 2022 14:08:42 +0000 (06:08 -0800)
Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: sarita patra <saritap@vmware.com>
pimd/pim6_main.c
pimd/subdir.am
vtysh/extract.pl.in
vtysh/vtysh.c
vtysh/vtysh.h

index 3d8ebd0d8665ef74684dbf2ba2b4a5c488f4c0fc..ba161915b7a59e95ece8e00e2bb65134863be27c 100644 (file)
@@ -36,6 +36,7 @@
 #include "pim_errors.h"
 #include "pim_iface.h"
 #include "pim_zebra.h"
+#include "pim_nb.h"
 
 zebra_capabilities_t _caps_p[] = {
        ZCAP_SYS_ADMIN,
@@ -109,6 +110,9 @@ static const struct frr_yang_module_info *const pim6d_yang_modules[] = {
        &frr_route_map_info,
        &frr_vrf_info,
        &frr_routing_info,
+       &frr_pim_info,
+       &frr_pim_rp_info,
+       &frr_gmp_info,
 };
 
 /* clang-format off */
index 6c267f290cedd7110aefa1fa989873e4f4d42585..c2b7b54ac60f71f515a1564df9dfb8793c9b5695 100644 (file)
@@ -7,7 +7,11 @@ sbin_PROGRAMS += pimd/pimd
 bin_PROGRAMS += pimd/mtracebis
 noinst_PROGRAMS += pimd/test_igmpv3_join
 vtysh_scan += pimd/pim_cmd.c
+
+# Add pim6_cmd.c under vtysh_scan, once the file is merged
+
 vtysh_daemons += pimd
+vtysh_daemons += pim6d
 man8 += $(MANBUILD)/frr-pimd.8
 man8 += $(MANBUILD)/mtracebis.8
 endif
@@ -85,6 +89,9 @@ pimd_pim6d_SOURCES = \
        # end
 
 nodist_pimd_pim6d_SOURCES = \
+       yang/frr-pim.yang.c \
+       yang/frr-pim-rp.yang.c \
+       yang/frr-gmp.yang.c \
        # end
 
 noinst_HEADERS += \
index 334bd7affad83f297ce92f1dec9d29ac19c9e210..93902266f0622d949bf18479c82a94bdc008399d 100755 (executable)
@@ -118,7 +118,7 @@ sub scan_file {
             if ($defun_array[1] =~ m/ipv6/) {
                 $protocol = "VTYSH_RIPNGD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ZEBRA|VTYSH_BABELD|VTYSH_ISISD|VTYSH_FABRICD";
             } else {
-                $protocol = "VTYSH_RIPD|VTYSH_OSPFD|VTYSH_BGPD|VTYSH_ZEBRA|VTYSH_PIMD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_ISISD|VTYSH_FABRICD";
+                $protocol = "VTYSH_RIPD|VTYSH_OSPFD|VTYSH_BGPD|VTYSH_ZEBRA|VTYSH_PIMD|VTYSH_PIM6D|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_ISISD|VTYSH_FABRICD";
             }
         }
         elsif ($file =~ /lib\/if_rmap\.c$/) {
@@ -143,6 +143,10 @@ sub scan_file {
         elsif ($fabricd) {
            $protocol = "VTYSH_FABRICD";
         }
+# Enable VTYSH_PIM6D once pim6_cmd.c is merged 
+#      elsif ($file =~ /pimd\/pim6_cmd\.c$/) {
+#              $protocol = "VTYSH_PIM6D";
+#      }
         else {
            ($protocol) = ($file =~ /^(?:.*\/)?([a-z0-9]+)\/[a-zA-Z0-9_\-]+\.c$/);
            $protocol = "VTYSH_" . uc $protocol;
index 8e95aaa47cc6eb6d60d3ec4f053cd6f180b87852..b6ca0a104b8d25f18157133f66c218522f44a1b4 100644 (file)
@@ -146,6 +146,7 @@ struct vtysh_client vtysh_client[] = {
        {.fd = -1, .name = "bfdd", .flag = VTYSH_BFDD, .next = NULL},
        {.fd = -1, .name = "vrrpd", .flag = VTYSH_VRRPD, .next = NULL},
        {.fd = -1, .name = "pathd", .flag = VTYSH_PATHD, .next = NULL},
+       {.fd = -1, .name = "pim6d", .flag = VTYSH_PIM6D, .next = NULL},
 };
 
 /* Searches for client by name, returns index */
index e56d482da2dda8d00872c0fe5e88bf72337f63c8..a89aa68f634cd1a05eeafb07282cb0a8a142620d 100644 (file)
@@ -44,6 +44,7 @@ DECLARE_MGROUP(MVTYSH);
 #define VTYSH_FABRICD   0x20000
 #define VTYSH_VRRPD     0x40000
 #define VTYSH_PATHD     0x80000
+#define VTYSH_PIM6D     0x100000
 
 #define VTYSH_WAS_ACTIVE (-2)
 
@@ -52,10 +53,10 @@ DECLARE_MGROUP(MVTYSH);
 /* watchfrr is not in ALL since library CLI functions should not be
  * run on it (logging & co. should stay in a fixed/frozen config, and
  * things like prefix lists are not even initialised) */
-#define VTYSH_ALL        VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_SHARPD|VTYSH_PBRD|VTYSH_STATICD|VTYSH_BFDD|VTYSH_FABRICD|VTYSH_VRRPD|VTYSH_PATHD
-#define VTYSH_ACL         VTYSH_BFDD|VTYSH_BABELD|VTYSH_BGPD|VTYSH_EIGRPD|VTYSH_ISISD|VTYSH_FABRICD|VTYSH_LDPD|VTYSH_NHRPD|VTYSH_OSPF6D|VTYSH_OSPFD|VTYSH_PBRD|VTYSH_PIMD|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_VRRPD|VTYSH_ZEBRA
-#define VTYSH_RMAP       VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_EIGRPD|VTYSH_FABRICD
-#define VTYSH_INTERFACE          VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_ISISD|VTYSH_PIMD|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_PBRD|VTYSH_FABRICD|VTYSH_VRRPD
+#define VTYSH_ALL        VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_PIM6D|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_SHARPD|VTYSH_PBRD|VTYSH_STATICD|VTYSH_BFDD|VTYSH_FABRICD|VTYSH_VRRPD|VTYSH_PATHD
+#define VTYSH_ACL         VTYSH_BFDD|VTYSH_BABELD|VTYSH_BGPD|VTYSH_EIGRPD|VTYSH_ISISD|VTYSH_FABRICD|VTYSH_LDPD|VTYSH_NHRPD|VTYSH_OSPF6D|VTYSH_OSPFD|VTYSH_PBRD|VTYSH_PIMD|VTYSH_PIM6D|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_VRRPD|VTYSH_ZEBRA
+#define VTYSH_RMAP       VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_PIM6D|VTYSH_EIGRPD|VTYSH_FABRICD
+#define VTYSH_INTERFACE          VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_ISISD|VTYSH_PIMD|VTYSH_PIM6D|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_PBRD|VTYSH_FABRICD|VTYSH_VRRPD
 #define VTYSH_VRF        VTYSH_INTERFACE|VTYSH_STATICD
 #define VTYSH_KEYS        VTYSH_RIPD|VTYSH_EIGRPD
 /* Daemons who can process nexthop-group configs */