summaryrefslogtreecommitdiffstats
path: root/vtysh
Commit message (Collapse)AuthorAgeFilesLines
* doc, vtysh: Fixup of history handlingDonald Sharp2016-02-263-2/+42
| | | | | | | | | | | This fix does two things: 1) If the ${HOME}/.history_quagga file does not exist, create it for history storing. 2) Allow vtysh -c "..." commands to be stored in history file as well Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd, lib, vtysh: hook up bgp ENCAP CLI nodeLou Berger2016-02-263-0/+73
| | | | | Signed-off-by: Lou Berger <lberger@labn.net> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bgpd: improve cleanup in bgp_delete()Lou Berger2016-02-261-1/+1
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* bgpd, lib, vtysh: hook up bgp VPNv6 CLI nodeLou Berger2016-02-262-1/+44
| | | | | Signed-off-by: Lou Berger <lberger@labn.net> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* vtysh: When the config file is close to the boundry of size of buffer vtysh ↵Gautam Kumar2016-02-101-100/+77
| | | | hangs.
* isisd: add support to import routes from other protocolsChristian Franke2015-12-081-1/+1
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* vtysh: Fix Quagga.conf file read in.Donald Sharp2015-10-271-51/+1
| | | | | | | | | | | | | | | | | | | | | There exists a sequence of cli commands that are successfully read in by bgpd.conf, but not by a consolidated Quagga.conf. This issue stems from the fact that the consolidated config file attempts to match the current node + 1 node up the tree, while the individual config file searches for matches all the way up the tree. Quagga.conf read-in relies on vtysh_cmd.c command parsing which puts all nodes at CONFIG_NODE and if a match is found CMD_SUCCESS_DAEMON is returned. This signals to the parser to call the appropriate daemon with the comamnd. bgp as an example has three levels of config node's. If you are reading in a config node at the 3rd level(say address-family ipv6) then transition to another node under bgp it will not work in Quagga.conf because the code only looked up one node and was at CONFIG_BGP when it failed to find a match. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* vtysh: Allow display of individual daemons configsDonald Sharp2015-10-271-0/+44
| | | | | | | | | | When executing a 'show run' or 'write terminal' you see the entire integrated config. You have no way of knowing what an individual daemon is going to write until after you do a write of config to disk if you are not using an integrated configuration. This change allows the end-user to do such a thing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* vtysh: allow --with-libpam to build with --enable-werrorDonald Sharp2015-09-241-1/+1
| | | | | | | The function vtysh_pam fails the build with --enable-werror enabled because it is a static function not declared as such Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* vtysh: Add missing show thread/work-queues commandsDonald Sharp2015-09-241-0/+52
| | | | | | | | | 'show thread cpu ..' and 'show work-queues' are missing from vtysh, but are available from telnet. This commit adds these commands to the vtysh interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* build: Remove the old PIC/PIE patch, let libtool sort it outPaul Jakma2015-09-031-2/+1
| | | | | | | * Remove the old change from '08 to add in PIE arguments at automake level. Versions of libtool since then know how to deal with -fpie and do the right thing according to whether its building shared or executable objects. So just pass '-fpie' as CFLAG and let libtool do its thing.
* vtysh: adjust bad_cli_stomps in extract.pl.in to reflect fixes & fix buildPaul Jakma2015-08-041-1/+1
|
* Add code to extract.pl.in to prevent further cli function overwritesDonald Sharp2015-06-211-0/+29
| | | | | | | | | | | | | | | | | Currently extract.pl.in is used to build the vtysh cli. When two different cli's collide with the same command name, the original cli is never called, because it is dropped. This code notes the silent drop and tracks the number of drops. If they change then the code will fail the build. The current number of drops was figured out by running extract.pl and counting up the drops then adding code to compare the numbers returned. If you have added to the problem, the solution is to fix your cli command to not stomp on someone else's command. If you have removed a stomp, safely modify extract.pl.in as part of your commit. Signed-off-by: Donald Sharp <sharpd at cumulusnetworks.com> Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
* lib, vtysh: support multiple VRFs by using linux netnsFeng Lu2015-06-032-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | We realize VRFs with linux netns by default. The main job is to associate a VRF with a netns. Currently this is done by the configuration: [no] vrf N netns <netns-name> This command is also available in vtysh and goes to only zebra, because presently only zebra supports multiple VRF. A file descriptor is added to "struct vrf". This is for the associated netns file. Once the command "vrf N netns NAME" is executed, the specified file is opened and the file descriptor is stored in the VRF N. In this way the association is formed. In vrf_socket(), we first switch to the specified VRF by using the stored file descriptor, and then can allocate a socket which is working in the associated netns. Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
* lib, zebra, vtysh: configure an interface in non-default VRFFeng Lu2015-06-022-0/+20
| | | | | | | | | | | | | | Introduce a new command "interface IFNAME vrf N" to configure an interface in the non-default VRF. Till now, only zebra uses this command. Other daemons will install the command when they support multiple VRFs. Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* vtysh: fix the fix for babeld removal... (5460bae)David Lamparter2015-05-271-0/+7
| | | | | | | | | | | | Commit 5460bae ("*: fix 'babeld: Remove babeld from Quagga' (336724d)") unfortunately removed the BABEL_NODE from vtysh, which now no longer starts. Fix by restoring the node (even though it won't be accessible). Reported-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Fixes: 5460bae ("*: fix 'babeld: Remove babeld from Quagga' (336724d)") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: fix "babeld: Remove babeld from Quagga" (336724d)David Lamparter2015-05-204-24/+0
| | | | | | | | | | | | | | | | | | This removes some more bits of babeld, particularly from: - buildtest.sh - redhat/ build files - vtysh integration (which actively broke the build) The memtype and zclient/route type are kept in place since these don't break anything and -theoretically- make it possible to build babeld with some Quagga integration externally. (Keeping vtysh integration is unfortunately not as easy.) Reported-by: Donald Sharp <sharpd@cumulusnetworks.com> Fixes: 336724d ("babeld: Remove babeld from Quagga") Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> Acked-by: Paul Jakma <paul@quagga.net> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: add --enable-werrorDavid Lamparter2015-04-211-1/+1
| | | | | | | | | | | | | | | This allows enabling -Werror in a consistent way. Note that this is different from just specifiying it in CFLAGS, since that would either break configure tests (if done on ./configure), or would override configure's CFLAGS (if done on make). Using --enable-werror instead provides a new WERROR variable that is additionally used during make with a consistent set of warning flags. The tests/ directory is exempt. (Rationale being, better to have more tests than pedantically complain about them.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* vtysh: drop unused variables & RETSIGTYPEDavid Lamparter2015-04-212-17/+8
| | | | | | | | | Drop unused return values in vtysh. Also gets rid of the rather funny prototyping of signal setup in vtysh - which as a side effect makes it not need AC_TYPE_SIGNAL in configure.ac anymore. It wasn't used sensibly to begin with... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* vtysh: fix function prototypesDavid Lamparter2015-04-215-24/+29
| | | | | | | This makes a whole bunch of vtysh functions static, fixes prototypes for a few more, and masks user_free() and user_write_config() (both unused.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* vtysh: don't use '\0' as NULLDavid Lamparter2015-04-211-3/+3
| | | | | | for some reason, the vty code was using '\0' in place of NULL. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib, vtysh: reduce unneccessary C extension usageDavid Lamparter2015-04-211-1/+4
| | | | | | | We're only supporting GCC, Clang and ICC; but there's no reason to use nonstandard C constructs if they don't actually provide any benefit. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: add missing includesDavid Lamparter2015-04-211-0/+1
| | | | | | | Some places, particularly headers, were spewing warnings since they don't include neccessary other headers to get struct/enum definitions. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: get rid of INCLUDES, use AM_CPPFLAGSDavid Lamparter2015-02-141-1/+1
| | | | | | | | | | | | INCLUDES in configure.ac was not used at all, and INCLUDES in Makefile.am is supposed to be AM_CPPFLAGS these days. Reduces warnings spewed during bootstrap/autoreconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
* vtysh: add missing pimd defineDavid Lamparter2015-02-041-0/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Remove conflict marker.Everton Marques2015-02-041-1/+0
|
* [pim] pim commands added to vtyshLeonard Herve2015-02-043-2/+5
|
* vtysh: fix build against readline 6.3Sébastien Luttringer2014-05-271-2/+2
| | | | | | | | | readline 6.3 removes some old deprecated funnily-named types. This updates vtysh to use the new types so it builds again. Reported-by: Joel Teichroeb <klusark@archlinux.invalid> References: https://bugs.archlinux.org/task/39495 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib/command.c: rewrite command matching/parsingChristian Franke2014-04-012-13/+11
| | | | | | | | | | Add support for keyword commands. Includes new documentation for DEFUN() in lib/command.h, for preexisting features as well as new keyword specification. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* vtysh: don't append superflous spaces (BZ#750)Christian Franke2013-07-311-5/+3
| | | | | | | | | | | | | | | rl_completion_append_character is reset to space every time the completion function is entered. So we would have to set it to '\0' every time new_completion() is called. We can make this conditional and avoid using rl_pending_input. This code path is most relevant when there are multiple completion matches with the same prefix, e.g. in router bgp context: "neighbor 1.2.3.4 pa"<ssive|ssword> would have been completed to "neighbor 1.2.3.4 pass " instead of "neighbor 1.2.3.4 pass". Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* vtysh: fix false lib path matching in extract.pl.inJoakim Tjernlund2013-02-231-35/+34
| | | | | | | | | | | The if ($file =~ /lib/) path matching logic is supposed to match Quagga's lib directory only but will match all path having lib in it such as /var/lib/jenkins/quagga/... Fix by matching both lib and file: lib/keychain.c etc. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* zebra: add module to communicate routes to FPMAvneesh Sachdev2012-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhance zebra to send routes to the (optional) Forwarding Path Manager component using the interface defined by fpm/fpm.h. * configure.ac - Add --enable-fpm flag. The FPM-related code in zebra is activated only if the build is configured with '--enable-fpm'. - Add HAVE_NETLINK automake conditional. This allows us to conditionally build netlink-dependent C code. * zebra/{rib.h,zebra_rib.c} - Add the 'fpm_q_entries' field to the rib_dest_t structure. This allows dests to be placed on the fpm queue. - Define a couple new rib_dest_t flags that hold FPM-related state. - Invoke the zfpm_trigger_update() function for a route_node whenever the information to be sent to the FPM changes. - rib_can_delete_dest(): Return FALSE if we have to update the FPM about the given dest. This ensures that the dest is not deleted even if there are no ribs hanging off of it. * zebra/zebra_fpm.c This file holds most of the code for interacting with the FPM. - If quagga was configured with '--enable-fpm', periodically try to connect to the FPM. - When the connection comes up, enqueue all relevent dests to the FPM queue. - When the FPM socket is readable, dequeue the next rib_dest_t from the FPM queue, encode it in to a message and send the message to the FPM. - When the connection to the FPM goes down, remove all dests from the FPM queue, and then start trying to connect to the FPM again. - Expose the following new operational commands: show zebra fpm stats clear zebra fpm stats * zebra/zebra_fpm_netlink.c - zfpm_netlink_encode_route(): Function to encode information about a rib_dest_t in netlink format. * zebra/zebra_fpm_private.h Private header file for the zebra FPM module. * zebra/zebra_fpm.h Header file exported by zebra FPM module to the rest of zebra. * zebra/debug.c Add the 'debug zebra fpm' command. * zebra/main.c Initialize the zebra-FPM code on startup. * zebra/misc_null.c Add stub for zfpm_trigger_update(). * zebra/Makefile.am - Include new file zebra_fpm.c in build. - Include zebra_fpm_netlink.c in build if HAVE_NETLINK is defined. * vtysh/Makefile.am Include zebra_fpm.c in list of files that define cli commands. Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use array_size() helper macroBalaji.G2012-10-251-11/+10
| | | | | | | | Use the array_size() helper macro. Replaces several instances of local macros with the same definition. Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: fix extract.pl for cross compilationSerj Kalichev2012-09-251-1/+1
| | | | | | | | | extract.pl should invoke the C preprocessor for the target system, not the host. * vtysh/extract.pl.in: use @CPP@ to get target cpp Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: use net-snmp-config to configure NetSNMPVincent Bernat2012-06-251-1/+1
| | | | | | | | The correct method to link to NetSNMP is to use net-snmp-config (which is like pkg-config). Explicit link to libcrypto is also dropped (NetSNMP libs are linked to libcrypto, no need to link Quagga to it). Moreover, @SNMP_INCLUDES@ is dropped because useless. Due to a bug in configure.ac, it was properly populated.
* build: allow configure and build in a separate directoryVincent Bernat2012-06-252-2/+2
| | | | | | | | | | | Some .h files in lib/ are autogenerated. The search path should include the build directory and the source directory. They usually match but sometimes, they may be different. For example: $ mkdir build $ cd build $ ../configure $ make
* vtysh: Vtysh support for babeld.Juliusz Chroboczek2012-03-255-3/+31
|
* vtysh: fix regexp for install_element() in babeldAng Way Chuang2012-03-251-1/+1
|
* build: delete .cvsignore filesDenis Ovsienko2011-12-131-13/+0
|
* vtysh: [build] silence preprocessor errors in some casesDmitrij Tejblum2011-10-171-1/+1
| | | | * extract.pl.in: use configured CPPFLAGS in cpp invocation.
* [vtysh] Save vtysh history to a fileTomasz Pala2009-06-241-1/+7
| | | | | vtsh_main.c: save 1000 last lines of history to $HOME/.history_quagga (the file must be created by hand first, this is intended behaviour)
* Fix vtysh based "write term" output.Chris Caputo2009-06-232-2/+4
| | | | | | | | | * vtysh/vtysh.c: "end" should be printed at the bottom, not the top. * vtysh/vtysh_config.c: PROTOCOL_NODE was not being handled, and thus was being displayed at the top of a config, rather than in its rightful place near the bottom. Signed-off-by: Chris Caputo <ccaputo@alt.net>
* [vtysh] Add a --noerror optionStephen Hemminger2009-06-181-7/+18
| | | | | There are times that configuration scripts want to run vtysh but don't want to get error messages or failed exit status
* [vtysh] Return non-zero exit code on error.Stephen Hemminger2009-06-181-1/+2
| | | | If passed a bad command, return non-zero exit code
* [vtysh] Make vtysh more useable for scriptingStephen Hemminger2009-06-183-13/+53
| | | | | | Add environment variable (VTYSH_LOG) for logging. If a command fails, exit with non-zero exit code and don't continue multipart commands.
* [vtysh] Force line buffered mode.Stephen Hemminger2009-06-181-0/+1
| | | | | Vtysh is used in pipelines and it helps if the output starts right away instead of waiting for a whole buffer to fill.
* [cleanup] Make command nodes staticStephen Hemminger2009-06-121-16/+16
| | | | | The cmd_nodes used to configure vty, can mostly be static so (basic data hiding 101).
* [cleanup] Convert XMALLOC/memset to XCALLOCStephen Hemminger2009-06-121-4/+1
| | | | Simple conversion of XMALLOC/memset to XCALLOC
* [vtysh] Add commands from zebra_routemap.c to vtyshBartek Kania2008-10-041-1/+2
| | | | | | * Makefile.am: vtysh should also pull in commands from zebra_routemap.c Signed-off-by: Paul Jakma <paul@quagga.net>
* [administrivia] Git should ignore backup files and .loT filesPaul Jakma2008-08-221-0/+3
|