Commit Graph

1084 Commits

Author SHA1 Message Date
Daniel Walton
e961923c72 bgpd, etc: changed .LINE to LINE...
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-27 00:07:46 +00:00
Daniel Walton
199d90a10e Expand #defines in command strings
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-25 16:49:39 +00:00
Daniel Walton
3ce54f7812 Expand #defines in command strings
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:   Don Slice <dslice@cumulusnetworks.com>
Reviewed-by:   Sam Tannous <stannous@cumulusnetworks.com>

Ticket:
2016-09-25 14:22:48 +00:00
Daniel Walton
9ccf14f739 Expand #defines in command strings
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-25 14:10:48 +00:00
Daniel Walton
412e5cd94f lib: added strmatch()
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 22:12:11 +00:00
Quentin Young
d862bffbda lib: lib compiles
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-23 21:34:33 +00:00
Daniel Walton
c349116d7c lib: add 'int idx_foo' argv index variables
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 20:17:29 +00:00
Quentin Young
f667a580b7 lib: Implement removed ALIAS into DEFUN
N.B.: some of these are de-facto ALIAS resurrections
that are necessary due to some parser limitations; these
are marked with ALIAS_FIXME so I can go back and add
capability to the parser to handle these special cases.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-23 20:08:47 +00:00
Daniel Walton
6147e2c694 convert <1-255> to (1-255), ()s to <>s, etc
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 13:47:20 +00:00
Daniel Walton
8d1fc5b581 lib: undo <> -> () change I made yesterday
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 11:33:50 +00:00
Daniel Walton
f412b39a33 ALIAS removal for bgp, ospf, pim, isis, rip, ripng, lib and zebra
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 03:55:26 +00:00
Daniel Walton
c0c053fa13 lib: argv update for distribute.c and ns.c
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 01:20:49 +00:00
Daniel Walton
6f1ccc12de lib: argv update for filter.c, if_rmap.c keychain.c and plist.c
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 00:58:26 +00:00
Quentin Young
7fcbbdaeb6 lib: argv update for routemap.c
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-22 22:53:09 +00:00
Quentin Young
fcbee69056 lib: argv update for if.c
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-22 21:40:28 +00:00
Quentin Young
1bf1b05af9 lib: argv update for thread.c
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-22 20:32:34 +00:00
Quentin Young
97e5b7c0b3 lib: argv fixes, XFREE -> free, rm decl in matcher
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-22 20:26:07 +00:00
Quentin Young
aa1c90a487 lib: distribute.c, smux.c, vty.c grammar refactor
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-22 20:17:48 +00:00
Daniel Walton
bf2bfafd7e ospfd: argv update for all but ospf_vty.c
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-22 19:15:24 +00:00
Quentin Young
b87c0c3cf0 lib: Remove last remnants of NUMBER_TKN...again
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-22 18:26:11 +00:00
Daniel Walton
5c307a08f2 Revert "lib: Get thread.c to compile"
This reverts commit 9c5f6b578e.
2016-09-22 18:23:29 +00:00
Daniel Walton
bcff2289ed Revert "lib, zebra: Fixup if.c to work in the new regime"
This reverts commit 2511cb40e6.
2016-09-22 18:23:21 +00:00
Daniel Walton
7e347cbe16 Revert "lib: Fix vty.c to compile with new parser"
This reverts commit c1ad0838e8.
2016-09-22 18:23:14 +00:00
Daniel Walton
7d0ca51ac8 Revert "lib: Fixup ns.c"
This reverts commit 5720e4ff95.
2016-09-22 18:23:08 +00:00
Daniel Walton
86c42eff78 Revert "lib: Fixup plist.c"
This reverts commit c65a0fe1c6.
2016-09-22 18:22:59 +00:00
Daniel Walton
e4123a9bb5 Revert "lib: Fixup more files"
This reverts commit f68cec764a.
2016-09-22 18:22:50 +00:00
Daniel Walton
4dcadbefd0 bgpd: argv update for all but bgp_vty.c
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-22 15:15:50 +00:00
Donald Sharp
8a2d6083d6 lib: Fixup json code to use struct cmd_token 2016-09-20 23:20:02 -04:00
Donald Sharp
f68cec764a lib: Fixup more files 2016-09-20 22:26:30 -04:00
Quentin Young
97e4e08d5f Merge branch 'vtysh-grammar' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into vtysh-grammar 2016-09-22 00:28:16 +00:00
Quentin Young
ffc9de904b lib: Remove NUMBER_TKN leftovers
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-22 00:27:22 +00:00
Quentin Young
287a4acf83 lib: Use listnode_add_before for prepending nodes
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-21 23:55:39 +00:00
Quentin Young
9547b5d072 lib: Update copyright headers
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-21 23:55:29 +00:00
Donald Sharp
c65a0fe1c6 lib: Fixup plist.c 2016-09-20 21:58:16 -04:00
Donald Sharp
5720e4ff95 lib: Fixup ns.c 2016-09-20 21:52:22 -04:00
Donald Sharp
c1ad0838e8 lib: Fix vty.c to compile with new parser 2016-09-20 21:49:32 -04:00
Donald Sharp
2511cb40e6 lib, zebra: Fixup if.c to work in the new regime
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-20 21:44:37 -04:00
Donald Sharp
9c5f6b578e lib: Get thread.c to compile
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-20 21:23:53 -04:00
Donald Sharp
460a768914 Merge remote-tracking branch 'origin/cmaster-next' into vtysh-grammar 2016-09-20 21:17:34 -04:00
Quentin Young
844ec28cee Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>

Conflicts:
	lib/.gitignore
	lib/command.c
	lib/command.h
2016-09-21 22:11:53 +00:00
Donald Sharp
51f8c3f2ea lib: Add #define str for JavaScript help string
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-21 10:07:04 -04:00
Quentin Young
d0bfb22c22 lib: Initial refactor pass on CLI backend
Shotgun commit:
* Remove shim sources from Makefile.am
* Move new types to command.c / command.h
* Rewrite command.c / command.h
* Refactor shim types to real types in matcher
  and parser
* Initial refactor pass on vty.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-19 23:46:51 +00:00
David Lamparter
af2d0efcac lib: deregister memtypes on exit/unload
This is useful for DSO modules in order to get support for unloading
them dynamically.  It also runs on exit, which doesn't matter much.

At some future point, the code could be extended to check that
allocation counts are 0 on unloading a module.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-09-19 16:31:08 -04:00
David Lamparter
7a13c923af lib: clean/restore memory debugging functions
This adapts the dump-at-exit handler and removes the old leftover code.

(Note the text in log_memtype_stderr was actually incorrect as the only
caller in bgpd cleans up configuration before calling it, i.e. any
remaining allocations are missing-cleanup bugs.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-19 16:31:08 -04:00
David Lamparter
4a1ab8e405 *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs
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>
2016-09-19 16:31:04 -04:00
David Lamparter
fc7948fafe lib: migrate to new memory-type handling
Move over to the new allocation counting added in the previous commit.

(This commit is mostly mechanical.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
2016-09-19 18:35:50 +02:00
David Lamparter
3b4cd78375 lib: add new extensible memory-type handling
This rewrites Quagga's memory per-type allocation counting, without
using a fixed global list of types.  Instead, source files can declare
memory types which get handled through constructor functions called by
the dynamic linker during startup.

Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
[DL: v3: forgot "nonnull" attribute on XFREE]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-09-19 17:52:05 +02:00
David Lamparter
6ba26ad5d2 lib: move memory.[ch] out of the way
The following commit will recreate memory.[ch].

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-19 17:51:36 +02:00
Quentin Young
9286efabb9 lib: Allow nesting options in selectors
Options may now be nested in selectors as long
as they are not the first token in sequence.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-18 20:32:21 +00:00
Quentin Young
ba06a3a0de lib: Add edge removal to graph data structure
Ability to remove directed edge between two nodes.
Also ensures that adjacency vectors have no null entries.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-18 20:31:20 +00:00