summaryrefslogtreecommitdiff
path: root/ldpd/ldp_vty_cmds.c
AgeCommit message (Collapse)Author
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-26build, vtysh: extract vtysh commands from .xrefDavid Lamparter
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>
2022-10-13Merge pull request #12066 from opensourcerouting/cleanup-cli-xrefDonald Sharp
*: clean up various CLI-related bits
2022-10-07*: Create and use infrastructure to show debugs in libDonald Sharp
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>
2022-10-06*: fix some malformed CLI docstringsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-10-31lib: Add autocomplete for access-listsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-08*: cleanup number-named access-lists in CLIIgor Ryzhov
There's no more difference between number-named and word-named access-lists. This commit removes separate arguments for number-named ACLs from CLI. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-03ldpd: make allowing broken-lsps to be installed with pop operation configurablelynne
If LDP is miss configured in a setup and the router has LSPs with no remote label, this code installs the LSP with a pop instruction of the top-level label so the packet can be forwarded using IP. This is a best-effort attempt to deliver labeled IP packets to their final destination instead of dropping them. If this config is turned off the code will only install LSPs that have a valid remote label. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2020-09-11Merge pull request #6789 from volta-networks/feat_ldp_igp_syncRenato Westphal
ldpd: Add support for LDP-IGP Synchronization
2020-09-09ldpd: Adding support for LDP IGP SynchronizationKaren Schoener
Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-09-04ldpd: Fix issue when starting up LDP with no configuration.lynne
LDP would mark all routes as learned on a non-ldp interface. Then when LDP was configured the labels were not updated correctly. This commit fixes issues 6841 and 6842. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2020-04-16*: remove second parameter on install_node()David Lamparter
There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
2020-03-20ldpd: adding support for LDP ordered label distribution controlKaren Schoener
LDP ordered label distribution control only binds a label to a FEC if it is the egress LSR, or the router received a label binding for a FEC from the next hop router. In this mode, an MPLS router will create a label binding for each FEC and distribute it to its neighbors so long as he has a entry in the RIB for the destination. Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>
2018-10-25*: spelchekDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-13ldpd: use DEFPY_NOSH whenever possibleRenato Westphal
All ldpd commands were written using DEFPY except the ones that needed to be ignored by vtysh, in which case we were using DEFUN_NOSH. Now that DEFPY_NOSH is available, convert the remaining commands for consistency and to simplify the code a little bit. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-07-23ldpd: add missing command under the ipv6 address-family nodeRenato Westphal
Bug found by Patrick Velder. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-11-09ldpd, zebra: Fix `make dist` compilesDonald Sharp
The original clippy implementation used if VTYSH_EXTRACT_PL was defined or not to know to include as part of the creation of vtysh. Follow their lead here. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-03Merge pull request #1282 from opensourcerouting/ldpd-minor-issuesDonald Sharp
ldpd minor issues
2017-10-03ldpd: remove the "discovery targeted-hello" commands from the interface nodeRenato Westphal
These commands belong only in the global LDP node and in the LDP address-family nodes. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-28ldpd: add more filtering options in some "show" commandsRenato Westphal
Being able to filter the output of some "show" commands is super useful when troubleshooting large MPLS networks. Examples: % show mpls ldp ipv4 binding 10.0.0.48/29 longer-prefixes neighbor 192.168.0.5 AF Destination Nexthop Local Label Remote Label In Use ipv4 10.0.0.48/30 192.168.0.5 24 26 no ipv4 10.0.0.52/30 192.168.0.5 25 27 no % show mpls ldp ipv4 binding 10.0.0.48/29 longer-prefixes neighbor 192.168.0.5 detail json { "10.0.0.48\/30":{ "localLabel":"24", "advertisedTo":[ { "neighborId":"192.168.0.5" } ], "remoteLabels":[ { "neighborId":"192.168.0.5", "label":"26", "inUse":0 } ] }, "10.0.0.52\/30":{ "localLabel":"25", "advertisedTo":[ { "neighborId":"192.168.0.5" } ], "remoteLabels":[ { "neighborId":"192.168.0.5", "label":"27", "inUse":0 } ] } } Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-12ldpd: guard the label allocation debug messagesRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-21*: Add 'show debugging' command from vtyshDonald Sharp
Allow vtysh to query every daemon about its debugging status in one go. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-08ldpd: Use JSON_STRDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-07ldpd: use NO_STRQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-31ldpd: add auto-complete for l2vpnsRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-31ldpd: convert CLI code to use DEFPYRenato Westphal
Yay :) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-31ldpd: fix missing "no" commands in vtyshRenato Westphal
Split the "no" version of some commands into a different DEFUN so that DEFUN_NOSH doesn't apply to them. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-31ldpd: fix segfault in "clear mpls ldp neighbor [addr]"Renato Westphal
Bug introduced by the CLI refactoring (c740f7d3678). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-26ldpd: add the exit-address-family commandRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-16ldpd: update copyright informationRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-16ldpd: convert cli and get rid of the xml interfaceRenato Westphal
The xml2cli.pl script was useful years ago when the vty code was very rudimentary. This is not the case anymore, so convert all ldpd CLI commands to use DEFUNs directly and get rid of the XML interface. The benefits are: * Consistency with the other daemons; * One less build dependency (the LibXML perl module); * Easier to add new commands. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-01-03build/ldpd: auto-generate ldp_vty_cmds.c from ldp_vty.xmlRenato Westphal
Having ldp_vty_cmds.c around as part of the git repository was being a major source of confusion. Since this file is auto-generated from ldp_vty.xml, remove it from this git repository and make it be generated on demand by adding a make target for it. This patch adds another dependency to build Quagga, namely the LibXML Perl module, which can be installed with this command: $ sudo cpan XML::LibXML Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-11-28xml2cli/ldpd: sync with the latest changes in CLI codeRenato Westphal
* use argv[N]->arg instead of argv[N]; * don't skip over non-variable args anymore; * convert <>s to ()s and ()s to <>s; Signed-off-by: Renato Westphal <renato@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-10-17Merge branch 'cmaster-next' into vtysh-grammarQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Conflicts: bgpd/bgp_route.c bgpd/bgp_routemap.c bgpd/bgp_vty.c isisd/isis_redist.c isisd/isis_routemap.c isisd/isis_vty.c isisd/isisd.c lib/command.c lib/distribute.c lib/if.c lib/keychain.c lib/routemap.c lib/routemap.h ospf6d/ospf6_asbr.c ospf6d/ospf6_interface.c ospf6d/ospf6_neighbor.c ospf6d/ospf6_top.c ospf6d/ospf6_zebra.c ospf6d/ospf6d.c ospfd/ospf_routemap.c ospfd/ospf_vty.c ripd/rip_routemap.c ripngd/ripng_routemap.c vtysh/extract.pl.in vtysh/vtysh.c zebra/interface.c zebra/irdp_interface.c zebra/rt_netlink.c zebra/rtadv.c zebra/test_main.c zebra/zebra_routemap.c zebra/zebra_vty.c
2016-10-07*: Consolidate all double VIEW_NODE and ENABLE_NODE'sDonald Sharp
If a command is put into the VIEW_NODE, it is going into the ENABLE_NODE as well. This is especially true for show commands. As such if a command is in both consolidate it down to VIEW_NODE. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-23ldpd: adapt the code for QuaggaRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>