summaryrefslogtreecommitdiff
path: root/ldpd/ldp_vty_exec.c
AgeCommit message (Collapse)Author
2023-10-12build: add -Wimplicit-fallthroughIgor Ryzhov
Also: - replace all /* fallthrough */ comments with portable fallthrough; pseudo keyword to accomodate both gcc and clang - add missing break; statements as required by older versions of gcc - cleanup some code to remove unnecessary fallthrough Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2023-03-02Merge pull request #12920 from sri-mohan1/sri-mohan-ldpmobash-rasool
ldpd: changes for code maintainability
2023-03-01ldpd: changes for code maintainabilitysri-mohan1
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
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>
2023-01-31*: Drop deprecated incorrect JSON fields with wrong namingDonatas Abraitis
Deprecation cycle already passed. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-02-03*: Add camelCase JSON keys in addition to PascalCaseDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-25ldpd: Convert vty_out to vty_json for JSONDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18*: Remove unused variablesDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18ldpd: Replace inet_ntop to %pI4/6 for JSON outputsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-22ldpd: replace inet_ntoaMark Stapp
Replace all use of inet_ntoa; use pI4 or inet_ntop instead. Signed-off-by: Mark Stapp <mjs@voltanet.io>
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-07-14*: un-split strings across linesDavid Lamparter
Remove mid-string line breaks, cf. workflow doc: .. [#tool_style_conflicts] For example, lines over 80 characters are allowed for text strings to make it possible to search the code for them: please see `Linux kernel style (breaking long lines and strings) <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_ and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
2020-06-01ldpd: Relay data plane pseudowire status in LDP notificationKaren Schoener
Provide a way for the data plane to indicate pseudowire status (such as: not forwarding, AC failure). On a data plane pseudowire install failure, data plane sets the pseudowire status. Zebra relays the pseudowire status to LDP. LDP includes the pseudowire status in the LDP notification to the LDP peer. Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-05-11ldpd and Zebra: Expand existing debug commands.lynne
L2VPN PW are very hard to determine why they do not come up. The following fixes expand the existing show commands in ldp and zebra to display a reason why the PW is in the DOWN state and also display the labeled nexthop route selected to reach the PW peer. By adding this information it will provide the user some guidance on how to debug the PW issue. Also fixed an assert if labels were changed for a PW that is between directly connected peers. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2020-04-20*: sprintf -> snprintfQuentin Young
Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-10-03ldpd: Fix compiler warning about uninitialized rtDonald Sharp
Certain compilers cannot recognize that rt is actually being init'ed, but let's set it to NULL 'till we get them updated. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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-07-31ldpd: convert CLI code to use DEFPYRenato Westphal
Yay :) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-14*: remove VTYNL, part 6 of 6David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14*: remove VTYNL, part 3 of 6David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14*: remove VTYNL, part 1 of 6David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14*: ditch vty_outln(), part 2 of 2David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-13*: ditch vty_outln(), part 1 of 2David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-29*: vty_outln (vty, "") --> vty_out (vty, VTYNL)Quentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29*: s/VTY_NEWLINE/VTYNL/gQuentin Young
Should be able to fit more vty_out onto one line now Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29*: use vty_outlnQuentin Young
Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-04-26ldpd: minor changes in the output of some show commandsRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-03-31ldpd: fix harmless maybe-uninitialized warningRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-03-27ldpd: replace all occurrences of '\n' with VTY_NEWLINERenato Westphal
The format of the terse output of several ldpd's show commands was copied from the OpenBSD's ldpctl(8) control program. In the process of doing that I forgot to replace the occurrences of '\n' with VTY_NEWLINE. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-03-20ldpd: provide more detailed information in some show commandsRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-03-20ldpd: add commands to show sent/rcvd capabilitiesRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-03-20ldpd: provide both a brief and a detailed version of some show commandsRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-02-02Merge remote-tracking branch 'origin/stable/2.0'Donald Sharp
2017-01-26ldpd: add ctl_socket cli option to override the compiled-in location for the ↵Renato Westphal
control socket Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-01-13ldpd: reorganize json support and fix a few issuesRenato Westphal
* reorganize code to improve maintainability; * add json output for the l2vpn show commands as well; * in "show mpls ldp discovery json", nest the adjacencies inside the respective interfaces. Also, fix a segfault when trying to show a targeted adjacency; * in "show mpls ldp neighbor", show the address-family of the adjacencies of each neighbor. Also, remove "downstreamUnsolicited":true from the output; * in "show mpls ldp interface json", show all interface/address-family combinations; Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-01-13ldpd: json support for show commandsDaniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23ldpd: adapt the code for QuaggaRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>