summaryrefslogtreecommitdiffstats
path: root/lib/keychain.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-18/+18
| | | | | | | | | | | 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>
* *: apply DEFUN_NOSH for node-switch CLI commandsDavid Lamparter2017-03-281-2/+2
| | | | | | | | | | These have copies in vtysh that do the node-switch locally and are listed in extract.pl's ignore list. The ignore list however is redundant since DEFUN_NOSH does the same thing... ldpd is a bit hacky, but Renato is reworking this anyway. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: remove vty->indexDavid Lamparter2016-12-091-1/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge branch 'cmaster-next' into vtysh-grammarQuentin Young2016-10-181-66/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * lib: replace vty->index_sub with qobjDavid Lamparter2016-10-071-57/+20
| | | | | | | | | | | | | | The keychain code is the only user of vty->index_sub; this is also replaced with a qobj safe-pointer. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * lib: use qobj for vty->index context positionDavid Lamparter2016-10-071-8/+3
| | | | | | | | | | | | | | Prepares the library CLI functions for concurrent config access. Note the vty->index pointer is still kept functional for the daemons to use. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * lib: qobj: register ifaces, routemaps & keychainsDavid Lamparter2016-10-071-2/+12
| | | | | | | | | | | | | | This places the appropriate calls so library objects can be used with qobj "pointers", especially in the CLI. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib: add 'int idx_foo' argv index variablesDaniel Walton2016-09-231-38/+143
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | convert <1-255> to (1-255), ()s to <>s, etcDaniel Walton2016-09-231-18/+18
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | lib: argv update for filter.c, if_rmap.c keychain.c and plist.cDaniel Walton2016-09-231-38/+38
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | Revert "lib: Fixup more files"Daniel Walton2016-09-221-38/+38
| | | | | | | | This reverts commit f68cec764abf50b35945b907a2e005bc50c50831.
* | lib: Fixup more filesDonald Sharp2016-09-211-38/+38
|/
* *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEsDavid Lamparter2016-09-191-0/+3
| | | | | | | | | | | | | | | | | | | This is a rather large mechanical commit that splits up the memory types defined in lib/memtypes.c and distributes them into *_memory.[ch] files in the individual daemons. The zebra change is slightly annoying because there is no nice place to put the #include "zebra_memory.h" statement. bgpd, ospf6d, isisd and some tests were reusing MTYPEs defined in the library for its own use. This is bad practice and would break when the memtype are made static. Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> [CF: rebased for cmaster-next] Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* lib: silence type range warning in macroDavid Lamparter2016-05-261-6/+10
| | | | | | | | | While splitting up the CLI input macro is a bit annoying, this seems to be the least annoying way to get rid of the "< 0" comparison warning for unsigned long. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 81a4e85442e2011a47bbb25e8301dc40ec4ed9b6)
* Fixup code to use correct XMALLOC operatorsDonald Sharp2015-08-261-6/+6
| | | | | | | | | | | Ticket: CM-7177 Reviewed-by: CCR-3396 Testing: See bug This code change does several small things: (A) Fix a couple detected memory leaks (B) Fix all malloc operations to use the correct XMALLOC operation in bgpd and parts of lib (C) Adds a few new memory types to make it easier to detect issues
* *: nuke ^L (page feed)David Lamparter2014-06-041-4/+4
| | | | | | | | | | | | | | Quagga sources have inherited a slew of Page Feed (^L, \xC) characters from ancient history. Among other things, these break patchwork's XML-RPC API because \xC is not a valid character in XML documents. Nuke them from high orbit. Patches can be adapted simply by: sed -e 's%^L%%' -i filename.patch (you can type page feeds in some environments with Ctrl-V Ctrl-L) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* [cleanup] Make command nodes staticStephen Hemminger2009-06-121-2/+2
| | | | | 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-8/+2
| | | | Simple conversion of XMALLOC/memset to XCALLOC
* 2005-05-06 Paul Jakma <paul@dishone.st>paul2005-05-061-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | * (general) extern and static'ification of functions in code and header. Cleanup any definitions with unspecified arguments. Add casts for callback assignments where the callback is defined, typically, as passing void *, but the function being assigned has some other pointer type defined as its argument, as gcc complains about casts from void * to X* via function arguments. Fix some old K&R style function argument definitions. Add noreturn gcc attribute to some functions, as appropriate. Add unused gcc attribute to some functions (eg ones meant to help while debugging) Add guard defines to headers which were missing them. * command.c: (install_node) add const qualifier, still doesnt shut up the warning though, because of the double pointer. (cmp_node) ditto * keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived fromn vty.h ones to fix some of the (long) < 0 warnings. * thread.c: (various) use thread_empty (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type * vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they removed from ospfd/ospf_vty.h * zebra.h: Move definition of ZEBRA_PORT to here, to remove dependence of lib on zebra/zserv.h
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>paul2005-04-071-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (global): Fix up list loops to match changes in lib/linklist, and some basic auditing of usage. * configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES * HACKING: Add notes about deprecating interfaces and commands. * lib/linklist.h: Add usage comments. Rename getdata macro to listgetdata. Rename nextnode to listnextnode and fix its odd behaviour to be less dangerous. Make listgetdata macro assert node is not null, NULL list entries should be bug condition. ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use with for loop, Suggested by Jim Carlson of Sun. Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the "safety" of previous macro. LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to distinguish from the similarly named functions, and reflect their effect better. Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section with the old defines which were modified above, for backwards compatibility - guarded to prevent Quagga using it.. * lib/linklist.c: fix up for linklist.h changes. * ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single scan of the area list, rather than scanning all areas first for INTER_ROUTER and then again for INTER_NETWORK. According to 16.2, the scan should be area specific anyway, and further ospf6d does not seem to implement 16.3 anyway.
* 2004-10-31 Paul Jakma <paul@dishone.st>paul2004-10-311-24/+5
| | | | * keychain.c: Convert some more strtoul users to VTY_GET_INTEGER.
* Number of warnings is down to 3 again in lib directory. A lot of const'shasso2004-10-051-20/+23
| | | | added to strings and a lot of int -> unsigned int changes.
* Many warning fixes from PC Drew ([quagga-dev 940]) and removing using PAGERhasso2004-03-041-2/+2
| | | | from vtysh ([quagga-dev 932]).
* Initial revisionpaul2002-12-131-0/+1001