summaryrefslogtreecommitdiff
path: root/lib/termtable.h
AgeCommit message (Collapse)Author
2024-09-01*: Create termtable specific temp memoryDonald Sharp
When trying to track down a MTYPE_TMP memory leak it's harder to search for it when you happen to have some usage of ttable_dump. Let's just give it it's own memory type so that we can avoid confusion in the future. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-06-18lib: add json API to dump and override row naming conventionPhilippe Guibert
The following table is not compliant with caml format when displayed in json: > ttable_add_row( > tt, > "Vertex|Type|Metric|Next-Hop|Interface|Parent"); > > ttable_json(tt, "ssdsss"); output observed: > [..] > { > "Vertex":"r1", > "Type":"", > "Metric":0, > "Next-Hop":"", > "Interface":"", > "Parent":"" > } output expected: > [..] > { > "vertex":"r1", > "type":"", > "metric":0, > "nextHop":"", > "interface":"", > "parent":"" > } Override the ttable_json() function with a new function which has an extra paramter: this parameter will redefine the initial row value for json: > ttable_json_with_json_text(tt, > "vertex|type|metric|nextHop|interface|parent"); Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-04-18lib: convert termtable to jsonEric Kinzie
Add a function that returns a JSON-C structure containing a representation of a termtable. This is intended to be a quick way to implement JSON output to CLI commands. Signed-off-by: Eric Kinzie <ekinzie@labn.net>
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>
2022-08-08lib: Remove invalid function declarationWeiguo Li
there is no definition of ttable_cell_del(), thus remove its declaration. Signed-off-by: Weiguo Li <liwg06@foxmail.com>
2019-12-02*: generously apply constDavid Lamparter
const const const your boat, merrily down the stream... Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-12lib: make "%Ld" work for int64_tDavid Lamparter
... without compiler plugins. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-11lib: add extern "C" {} blocks to all libfrr headersRenato Westphal
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>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-30lib: printf bugfixes & improvementQuentin Young
* Fix bad format specifier in thread.[ch] * Move PRINTF_ATTRIBUTE macro to zebra.h * Use PRINTF_ATTRIBUTE on termtable printers Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-16lib: add table generatorQuentin Young
Allows for easy preparation of tabular output. Supports: -- Padding -- Alignment -- Styling