summaryrefslogtreecommitdiffstats
path: root/pimd/pim_cmd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pimd: Option to get IGMP groups and sources for a particular interfacePooja Jagadeesh Doijode2023-04-111-217/+508
| | | | | | | | | | | | | | | | | | | | | | | 1. Added interface name, group address and detail option to existing "show ip igmp groups" so that user can retrieve all the groups or a particular group for an interface. Detail option shows the source information for the group. With that, the show command looks like: "show ip igmp [vrf NAME$vrf_name] groups [INTERFACE$ifname [GROUP$grp_str]] [detail$detail] [json$json]" 2. Changed pim_cmd_lookup_vrf() to return empty JSON if VRF is not present 3. Changed "detail" option to print non pretty JSON 4. Added interface name and group address to existing "show ip igmp sources" so that user can retrieve all the sources for all the groups or, all the sorces for a particular group for an interface. With that, the show command looks like: "show ip igmp [vrf NAME$vrf_name] sourcess [INTERFACE$ifname [GROUP$grp_str]] [json$json]" Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-14/+1
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: fix non-const northbound XPath format stringsDavid Lamparter2023-01-271-10/+4
| | | | | | | Passing a pre-formatted buffer in these places needs a `"%s"` in front so it doesn't get formatted twice. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build, vtysh: extract vtysh commands from .xrefDavid Lamparter2022-10-261-2/+0
| | | | | | | | | | | | | | | | | | | Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Move "show ip pim bsm-database" cmd to DEFPYSarita Patra2022-10-201-174/+3
| | | | | | | | Added common pim_show_bsm_db_helper to suppport both PIM and PIMV6. pim_show_bsm_db is moved to pim_cmd_common.c file. Signed-off-by: Sarita Patra <saritap@vmware.com>
* pimd: Move "show ip pim bsrp-info [vrf] [json]" cmd to DEFPYSarita Patra2022-10-201-128/+3
| | | | | | | | Added pim_show_group_rp_mappings_info_helper to suppport both PIM and PIMV6. pim_show_group_rp_mappings_info() is moved to pim_cmd_common.c file. Signed-off-by: Sarita Patra <saritap@vmware.com>
* pimd: Add vrf optional parameter in "show ip pim bsr" cmdSarita Patra2022-10-201-83/+4
| | | | | | | | Added common API pim_show_bsr_helper to suppport both PIM and PIMV6. pim_show_bsr() is moved to pim_cmd_common.c file. Signed-off-by: Sarita Patra <saritap@vmware.com>
* pim6d: Add [no] ipv6 pim unicast-bsm" commandSarita Patra2022-10-201-26/+3
| | | | | | | | | Introduced common api pim_process_unicast_bsm_cmd, pim_process_no_unicast_bsm_cmd which will process both "[no] ip pim unicast-bsm" command and "[no] ipv6 pim unicast-bsm" command. Signed-off-by: Sarita Patra <saritap@vmware.com>
* pim6d: Add [no] ipv6 pim bsm" commandSarita Patra2022-10-201-25/+4
| | | | | | | | | Introduced common api pim_process_bsm_cmd, pim_process_no_bsm_cmd which will process both "[no] ip pim bsm" command and "[no] ipv6 pim bsm" command. Signed-off-by: Sarita Patra <saritap@vmware.com>
* Merge pull request #12066 from opensourcerouting/cleanup-cli-xrefDonald Sharp2022-10-131-1/+1
|\ | | | | *: clean up various CLI-related bits
| * *: fix some malformed CLI docstringsDavid Lamparter2022-10-061-1/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | Merge pull request #12074 from donaldsharp/lib_debugsDonatas Abraitis2022-10-121-0/+1
|\ \ | | | | | | *: Create and use infrastructure to show debugs in lib
| * | *: Create and use infrastructure to show debugs in libDonald Sharp2022-10-071-0/+1
| |/ | | | | | | | | | | | | | | | | There are lib debugs being set but never show up in `show debug` commands because there was no way to show that they were being used. Add a bit of infrastructure to allow this and then use it for `debug route-map` Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* / pim6d: Fix RpAddress in "show ipv6 pim bsm-database"Sarita Patra2022-10-111-1/+1
|/ | | | | | | | | RpAddress is showing wrong value in "show ipv6 pim bsm-database" cli. This is fixed now. Issue: #12089 Signed-off-by: Sarita Patra <saritap@vmware.com>
* pimd, pim6d: Changing IGMP to GM in debug macrosSai Gomathi N2022-09-061-14/+14
| | | | | | | | | | | | | | | | | | | Changing PIM_DO_DEBUG_IGMP_EVENTS to PIM_DO_DEBUG_GM_EVENTS PIM_DO_DEBUG_IGMP_PACKETS to PIM_DO_DEBUG_GM_PACKETS PIM_DO_DEBUG_IGMP_TRACE to PIM_DO_DEBUG_GM_TRACE PIM_DO_DEBUG_IGMP_TRACE_DETAIL to PIM_DO_DEBUG_GM_TRACE_DETAIL PIM_DONT_DEBUG_IGMP_EVENTS to PIM_DONT_DEBUG_GM_EVENTS PIM_DONT_DEBUG_IGMP_PACKETS to PIM_DONT_DEBUG_GM_PACKETS PIM_DONT_DEBUG_IGMP_TRACE to PIM_DONT_DEBUG_GM_TRACE PIM_DONT_DEBUG_IGMP_TRACE_DETAIL to PIM_DONT_DEBUG_GM_TRACE_DETAIL PIM_MASK_IGMP_EVENTS to PIM_MASK_GM_EVENTS PIM_MASK_IGMP_PACKETS to PIM_MASK_GM_PACKETS PIM_MASK_IGMP_TRACE to PIM_MASK_GM_TRACE PIM_MASK_IGMP_TRACE_DETAIL to PIM_MASK_GM_TRACE_DETAIL to be used for both IGMP and MLD debugs. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
* pimd: Modifying member of pim_instance to accomodate IPv6 changesSai Gomathi N2022-08-261-2/+2
| | | | | | | Modifying igmp_group_count of struct pim_instance to gm_group_count which is to be used for both IGMP and MLD. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
* pimd: vrf may be NULL from pim_cmd_lookup_vrfDonald Sharp2022-08-151-1/+2
| | | | | | | | | | | | | | | | The call into pim_cmd_lookup_vrf may be NULL and dereferencing it before ensuring that the vrf pointer is non-NULL is a good way to crash. A crash can be initiated in pim: eva# show ip msdp vrf NOEXIST mesh-group vtysh: error reading from pimd: Permission denied (13)Warning: closing connection to pimd because of an I/O error! eva# 2022/08/15 11:47:38 [PHJDC-499N2][EC 100663314] STARVATION: task vtysh_rl_read (560b77f76de6) ran for 16777ms (cpu time 0ms) eva# Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* pim6d: Implementing "clear ipv6 pim interface traffic" command.Abhishek N R2022-08-021-38/+5
| | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
* pim6d: Implementing "clear ipv6 pim interfaces" command.Abhishek N R2022-07-191-16/+4
| | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
* Merge pull request #11598 from patrasar/pim_get_instanceDavid Lamparter2022-07-131-12/+7
|\
| * pimd: Avoid unnecessary vrf lookupSarita Patra2022-07-121-12/+7
| | | | | | | | | | | | | | | | | | | | | | In several places, we are getting the vrf structure using vrf_lookup_by_name(). Again we are passing vrf->vrf_id to pim_get_pim_instance() to get the pim_instance. The API pim_get_pim_instance() again get the VRF structure using vrf_lookup_by_id(). This is avoided in this PR. Signed-off-by: Sarita Patra <saritap@vmware.com>
* | pimd: fix unaligned accessesDavid Lamparter2022-07-121-12/+16
|/ | | | | | | | | | These are in packed structs at weird offsets (e.g. 2 bytes), and as such need a memcpy to get them into proper alignment. It'd be even better if the pimd code used proper de/serialization, but let's get this improved one step at a time. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #10592 from patrasar/master_pimv6_bsmDavid Lamparter2022-07-081-67/+58
|\
| * pim6d: Adjust pim_show_bsm_db for IPV6sarita patra2022-07-071-16/+27
| | | | | | | | Signed-off-by: sarita patra <saritap@vmware.com>
| * pim6d: add pimv6 support for bsmmsg_rpinfosarita patra2022-07-071-15/+14
| | | | | | | | Signed-off-by: sarita patra <saritap@vmware.com>
| * pim6d: add pimv6 support for bsm_hdrsarita patra2022-07-071-6/+4
| | | | | | | | Signed-off-by: sarita patra <saritap@vmware.com>
| * pim6d: Add pim_addr rp_addr in bsm_rpinfosarita patra2022-07-071-22/+15
| | | | | | | | Signed-off-by: sarita patra <saritap@vmware.com>
| * pim6d: modify in_addr current_bsr to pim_addr current_bsrsarita patra2022-07-071-22/+12
| | | | | | | | Signed-off-by: sarita patra <saritap@vmware.com>
* | pimd: Fix description for "clear ip mroute" cmdSarita Patra2022-07-071-1/+1
|/ | | | Signed-off-by: Sarita Patra <saritap@vmware.com>
* Merge pull request #9307 from SaiGomathiN/sai-nhtDonatas Abraitis2022-07-061-3/+4
|\ | | | | pimd: json support for nexthop
| * pimd, pim6d: Adding json support for show ipv6 nexthopSai Gomathi N2022-06-301-122/+1
| | | | | | | | | | | | | | Moving the reusable code of pim_show_nexthop apis to common file pim_cmd_common.c file and adding the json support for show ipv6 pim nexthop Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
| * pimd: json support for nexthopnsaigomathi2022-06-301-3/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problems Identified: show ip pim nexthop cli didn't have json extension and show ip pim vrf all upstream have improper json format Description: show ip pim nexthop command shows the nexthops that are being used. Added json support for the command. show ip pim vrf all upstream displays upstream information for all vrfs about a S,G mroute. Formatted the json structure for this command. Signed-off-by: nsaigomathi <nsaigomathi@vmware.com>
* | pimd: Modifying member of pim_instance to accomodate IPv6 changesSai Gomathi N2022-06-301-5/+5
|/ | | | | | | Modifying igmp_watermark_limit of struct pim_instance to gm_watermark_limit which is to be used for both IGMP and MLD. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
* pimd: Change to DEFPY and make the api commonMobashshera Rasool2022-06-131-16/+3
| | | | | | | | | For show ip pim interface traffic cli, doing the below changes 1. Changing DEFUN to DEFPY 2. Move the whole code to a common api and modify it so that can be reused for pimv6. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* pim6d: Moving show apis to common fileMobashshera Rasool2022-06-131-178/+0
| | | | | | | | Moving pim_show_interface_traffic and pim_show_interface_traffic_single to pim_cmd_common.c from pim_cmd.c to make it common to pimd and pim6d. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* Merge pull request #11385 from AbhishekNR/show_cliDonald Sharp2022-06-121-518/+24
|\ | | | | pimd, pim6d: Moving reusable code to common api for show CLI's.
| * pim6d: Moving reusable code to common api for "show mroute summary" commandAbhishek N R2022-06-091-49/+2
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show ip/ipv6 mroute count" ↵Abhishek N R2022-06-091-48/+2
| | | | | | | | | | | | command Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show ip/ipv6 mroute" commandAbhishek N R2022-06-091-56/+2
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show ip/ipv6 multicast count" ↵Abhishek N R2022-06-091-47/+2
| | | | | | | | | | | | command Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show ip/ipv6 multicast" commandAbhishek N R2022-06-091-26/+2
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show pim state" commandAbhishek N R2022-06-091-46/+2
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show pim upstream rpf" commandAbhishek N R2022-06-091-19/+1
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show pim upstream join ↵Abhishek N R2022-06-091-19/+1
| | | | | | | | | | | | desired" command Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show pim upstream" commandAbhishek N R2022-06-091-58/+2
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show pim statistics" commandAbhishek N R2022-06-091-22/+1
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving reusable code to common api for "show pim secondary" commandAbhishek N R2022-06-091-18/+1
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving resuable code to common api for "show pim rp-info" commandAbhishek N R2022-06-091-64/+4
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
| * pim6d: Moving resuable code to common api for "show pim rpf" commandAbhishek N R2022-06-091-46/+2
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
* | Merge pull request #11387 from SaiGomathiN/pimshowDonald Sharp2022-06-121-247/+13
|\ \ | | | | | | pimd, pim6d: Moving the reusable code to common api for PIM show CLIs