summaryrefslogtreecommitdiffstats
path: root/lib/command.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: remove second parameter on install_node()David Lamparter2020-04-161-2/+2
| | | | | | | | | | 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>
* *: remove cmd_node->vtyshDavid Lamparter2020-04-161-3/+0
| | | | | | | The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd: Adding BGP GR Global & Per Neighbour FSM changesbisdhdh2020-01-231-2/+0
| | | | | | | | * Added FSM for peer and global configuration for graceful restart * Added debug option BGP_GRACEFUL_RESTART for logs specific to graceful restart processing Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
* bgpd: BGP Graceful Restart Per Neighbor(BGPN), DS & header files.bisdhdh2020-01-231-1/+18
| | | | | | | This pr contains all the header files changes for BGP GR per Neighbour(BGPN) feature. Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
* lib: make cmd_element & qobj_type constDavid Lamparter2019-11-301-4/+4
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #5224 from manuhalo/fix_frr_reload_pathsQuentin Young2019-11-191-2/+2
|\ | | | | Fixes and extensions to frr_reload.py
| * lib: include ldpd to the list of daemonsEmanuele Di Pascale2019-10-291-2/+2
| | | | | | | | | | | | ... for commands such as 'show running-config X'. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | vtysh: Add an option to set banner motd from an inputDonatas Abraitis2019-10-311-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to set motd from an input instead of creating a file. Example: root@exit2-debian-9:~/frr# telnet 127.0.0.1 2605 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Hello, this is bgpd User Access Verification Password: exit2-debian-9> enable exit2-debian-9# sh run Current configuration: ! frr version 7.3-dev-MyOwnFRRVersion frr defaults traditional ! hostname exit2-debian-9 password belekas log file /var/log/frr/labas.log log syslog informational banner motd line Hello, this is bgpd ! ! ! line vty ! end exit2-debian-9# Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* lib: fix typoIgor Ryzhov2019-10-081-1/+1
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* bgpd/bmp: BMP implementationDavid Lamparter2019-08-301-0/+1
| | | | | | | | This implements BMP. There's no fine-grained history here, the non-BMP preparations are already split out from here so all that remains is BMP proper. Signed-off-by: David Lamparter <equinox@diac24.net>
* all: remove logical-router functionalityIgor Ryzhov2019-08-021-1/+0
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* lib: split off c-ares code from nhrpdDavid Lamparter2019-07-031-0/+1
| | | | | | This is useful in other places too, e.g. for BMP outbound connections. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Run-time log filtering via vtysh commands (#4524)David Lamparter2019-07-031-0/+7
|\ | | | | Run-time log filtering via vtysh commands
| * lib: Add vrrpd,sharpd to DAEMONS_* stringsStephen Worley2019-06-191-2/+2
| | | | | | | | | | | | | | | | Add vrrpd and sharpd to the DAEMONS_* list so they can be dispatched daemons independent commands such as `show work-queues` and `log-filter`. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| * lib,vtysh: Add vtysh commands for log-filterStephen Worley2019-06-191-0/+1
| | | | | | | | | | | | | | | | Add vtysh commands to add/del/clear/show filters across all daemons and independently on each one. Add automake and clippy boilerplate for those commands as well. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| * lib: Add some all daemon command stringsStephen Worley2019-06-191-0/+6
| | | | | | | | | | | | | | Add some strings for defining vty commands that target all daemons. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
* | lib: use MTYPE_STATICDavid Lamparter2019-06-211-1/+0
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Lib: Debugs for route-map code in FRRAmeya Dharkar2019-06-121-0/+1
| | | | | | | | | | | | | Added a CLI "debug route-map" to enble route-map debugs Added debugs for following triggers 1. Add/delete a route-map 2. Add/delete a sequence in route-map 3. Add/delete a match statement(dependency) 4. Update a dependency 5. Apply a route-map Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
* lib: crash when FRR hostname length > 80 charsLakshman Krishnamoorthy2019-05-311-0/+11
| | | | | | | | | | | Although the RFC states hostname length should be < 255 chars, FRR allows infinite length technically. However, when you try to set a hostname > 80 chars, you would immediately notice a crash. RCA: Crash due to buffer overflow. Large buffer sprintf'd into smaller buffer. Usage of sprintf function instead of snprintf which is safer. Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
* vrrpd: add support for configuration writingQuentin Young2019-05-171-0/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: Allow DEFPY_HIDDEN to exist in vtyshDonald Sharp2019-02-211-0/+3
| | | | | | | The DEFPY_HIDDEN commands were not being picked up into vtysh. Fix this issue. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: add extern "C" {} blocks to all libfrr headersRenato Westphal2019-02-121-0/+9
| | | | | | | These are necessary to use functions defined in these headers from C++. Signed-off-by: David Lamparter <equinox@diac24.net> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #3202 from donaldsharp/evpn_dumpRuss White2018-11-091-0/+1
|\ | | | | Evpn dump
| * bgpd, lib, vtysh, zebra: Convert to using CMD_VNI_RANGEDonald Sharp2018-10-311-0/+1
| | | | | | | | | | | | For the vni range use a macro to keep track of it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | lib: introduce new northbound APIRenato Westphal2018-10-271-0/+1
|/ | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: spelchekDavid Lamparter2018-10-251-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* lib, vtysh: Allow notification across multiple lines of failureDonald Sharp2018-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When reading in config files and we have failures on multiple lines actually note the actual failure lines and return them. This fixes an issue where we stopped counting errors after the first one and we got missleading line numbers that did not correspond to the actual problem. This is fixed: sharpd@donna ~/frr> sudo /usr/lib/frr/pimd --log=stdout -A 127.0.0.1 -f /etc/frr/pimd.conf 2018/10/11 09:41:01 PIM: VRF Created: default(0) 2018/10/11 09:41:01 PIM: pim_vrf_enable: for default 2018/10/11 09:41:01 PIM: zclient_lookup_sched_now: zclient lookup immediate connection scheduled 2018/10/11 09:41:01 PIM: zclient_lookup_new: zclient lookup socket initialized 2018/10/11 09:41:01 PIM: pimd 6.1-dev starting: vty@2611 2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 2: inteface lo 2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 3: ip igmp 2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 4: ip igmp join 224.1.1.1 13.13.13.2 ^C2018/10/11 09:45:09 PIM: Terminating on signal SIGINT 2018/10/11 09:45:09 PIM: VRF Deletion: default(0) Fixes: #3161 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* fabricd: add new daemon as build of isisdChristian Franke2018-09-051-1/+1
| | | | | | | fabricd is built using the sources of isisd. To allow differentiation in the code, -DFABRICD=1 is added to its preprocessor flags. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* Merge branch 'master' into bfd-finalDonald Sharp2018-08-141-0/+6
|\
| * lib: implement DEFPY_NOSHRenato Westphal2018-08-131-0/+6
| | | | | | | | | | | | This is the DEFPY equivalent of DEFUN_NOSH. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | bfdd: add vty shell commandsRafael Zalamena2018-08-081-0/+2
|/ | | | | | | Implement vty shell integration and allow `bfdd` to be configured through FRR's vtysh. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* bgpd: clean up evpn prefix debugging commandsQuentin Young2018-08-071-0/+1
| | | | | | | | | * Fix memory leaks in debug commands * Use CLI tokens to properly sanitize input * Remove unnecessary error handling code from debug commands * Remove unnecessary parameters from conf print functions Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: remove DEFUN_DEPRECATEDQuentin Young2018-06-251-3/+0
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: Add --log-level to daemonsDonald Sharp2018-06-191-1/+1
| | | | | | | | Add the ability to specify the designated log level at startup. --log-level <emergencies|alerts|critical|errors|warnings|notifications|informational|debugging> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: Add new cli to specify where to output logs on startupDonald Sharp2018-06-191-0/+1
| | | | | | | | | | | When we are starting a daemon, allow the user to specify: --log <stdout|syslog|file:file_name> This can be used on early startup to put the log files where the end user wants them to show up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: add hook for preprocessing commandsQuentin Young2018-06-061-0/+22
| | | | | | | | | | | This patch adds a hook point intended to allow subscribers to modify the raw text of a CLI command before it is passed to the rest of the CLI pipeline. To give access to the raw text of the command, a new function for executing CLI has been defined whose only difference from `cmd_execute_command` is that it accepts the command to execute as a string rather than as a string vector. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: add string utilitiesQuentin Young2018-06-061-3/+0
| | | | | | | | I see lots of the same code being copy-pasted and slightly tweaked for string processing all over the codebase. Time to start aggregating these pieces into something consistent and correct. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: Moved no-password warnings into header filePascal Mathis2018-05-131-0/+4
| | | | | | | | | | | The warning string which appears when the users executes 'no (enable) password' was moved into command.h and declared as a constant named 'NO_PASSWD_CMD_WARNING'. This avoids duplicate code and makes it easy to change the warning message in all places at once. Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
* lib: move ip node above vrf node for config orderQuentin Young2018-05-091-1/+1
| | | | | | | | VRF static route commands adopt global static config if static config is placed after a vrf context with no separator, workaround by always writing static route config before vrf config Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: add ability to dump cli mode graphQuentin Young2018-04-221-0/+1
| | | | | | | | | The grammar sandbox has had the ability to dump individual commands as DOT graphs, but now that generalized DOT support is present it's trivial to extend this to entire submodes. This is quite useful for visualizing the CLI space when debugging CLI errors. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #1989 from qlyoung/defpy-hiddenLou Berger2018-04-121-0/+10
|\ | | | | lib, python: DEFPY_ATTR, DEFPY_HIDDEN
| * lib, python: DEFPY_ATTR, DEFPY_HIDDENQuentin Young2018-04-101-0/+10
| | | | | | | | | | | | Add support for element attributes in DEFPY macros. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | pbrd: Add PBR to FRRDonald Sharp2018-04-061-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an implementation of PBR for FRR. This implemenation uses a combination of rules and tables to determine how packets will flow. PBR introduces a new concept of 'nexthop-groups' to specify a group of nexthops that will be used for ecmp. Nexthop-groups are specified on the cli via: nexthop-group DONNA nexthop 192.168.208.1 nexthop 192.168.209.1 nexthop 192.168.210.1 ! PBR sees the nexthop-group and installs these as a default route with these nexthops starting at table 10000 robot# show pbr nexthop-groups Nexthop-Group: DONNA Table: 10001 Valid: 1 Installed: 1 Valid: 1 nexthop 192.168.209.1 Valid: 1 nexthop 192.168.210.1 Valid: 1 nexthop 192.168.208.1 I have also introduced the ability to specify a table in a 'show ip route table XXX' to see the specified tables. robot# show ip route table 10001 Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, P - PIM, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, > - selected route, * - FIB route F>* 0.0.0.0/0 [0/0] via 192.168.208.1, enp0s8, 00:14:25 * via 192.168.209.1, enp0s9, 00:14:25 * via 192.168.210.1, enp0s10, 00:14:25 PBR tracks PBR-MAPS via the pbr-map command: ! pbr-map EVA seq 10 match src-ip 4.3.4.0/24 set nexthop-group DONNA ! pbr-map EVA seq 20 match dst-ip 4.3.5.0/24 set nexthop-group DONNA ! pbr-maps can have 'match src-ip <prefix>' and 'match dst-ip <prefix>' to affect decisions about incoming packets. Additionally if you only have one nexthop to use for a pbr-map you do not need to setup a nexthop-group and can specify 'set nexthop XXXX'. To apply the pbr-map to an incoming interface you do this: interface enp0s10 pbr-policy EVA ! When a pbr-map is applied to interfaces it can be installed into the kernel as a rule: [sharpd@robot frr1]$ ip rule show 0: from all lookup local 309: from 4.3.4.0/24 iif enp0s10 lookup 10001 319: from all to 4.3.5.0/24 iif enp0s10 lookup 10001 1000: from all lookup [l3mdev-table] 32766: from all lookup main 32767: from all lookup default [sharpd@robot frr1]$ ip route show table 10001 default proto pbr metric 20 nexthop via 192.168.208.1 dev enp0s8 weight 1 nexthop via 192.168.209.1 dev enp0s9 weight 1 nexthop via 192.168.210.1 dev enp0s10 weight 1 The linux kernel now will use the rules and tables to properly apply these policies. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Don Slice <dslice@cumulusnetworks.com> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #2006 from qlyoung/remove-irdp-nodeRuss White2018-04-051-1/+0
|\ | | | | lib: remove IRDP_NODE
| * lib: remove IRDP_NODEQuentin Young2018-04-031-1/+0
| | | | | | | | | | | | Unused Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #2002 from qlyoung/remove-undebugRuss White2018-04-051-1/+1
|\ \ | |/ |/| bgpd, pim: remove undebug
| * bgpd, pim: remove undebugQuentin Young2018-04-021-1/+1
| | | | | | | | | | | | | | This 'undebug' syntax is only used in 5 commands and serves no apparent purpose. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #2005 from qlyoung/remove-masc-nodeRafael Zalamena2018-04-021-1/+0
|\ \ | | | | | | lib: remove MASC_NODE
| * | lib: remove MASC_NODEQuentin Young2018-03-301-1/+0
| |/ | | | | | | | | | | Unused Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* / lib: remove SERVICE_NODEQuentin Young2018-03-301-1/+0
|/ | | | | | Unused Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>