summaryrefslogtreecommitdiff
path: root/pceplib
AgeCommit message (Collapse)Author
2025-04-08tools,pceplib,ospfclient: clean up variable-shadow warningsMark Stapp
Clean up -Wshadow warnings in these components Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-01-25Merge pull request #15215 from donaldsharp/pceplib_fixupDonatas Abraitis
Compile issue fixups
2024-01-24pceplib: Fix some new coverity issues that trickled inDonald Sharp
Several new issues came in because the coverity build system was not building the test infrastrucuture for the pceplib. Now we do, so we fixed it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-24pceplib: Fix code not building properlyDonald Sharp
The series of pceplib tests are not being run at the moment due to them not even building. Apparently adding the `libcunit1` debian package is enough to get them to build in our system. While weird, let's get this building at least for people that have this and `--enable-werror` turned on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-24pceplib: fix compilation errorPhilippe Guibert
The following compilation error happens, with pcep test files. > In file included from pceplib/test/pcep_utils_counters_test.c:31: > pceplib/test/pcep_utils_counters_test.c: In function 'test_create_subgroup_counter': > pceplib/test/pcep_utils_counters_test.c:127:25: error: too few arguments to function 'create_subgroup_counter' > 127 | CU_ASSERT_FALSE(create_subgroup_counter(subgroup, counter_id + 1, > | ^~~~~~~~~~~~~~~~~~~~~~~ > In file included from pceplib/test/pcep_utils_counters_test.c:33: > ./pceplib/pcep_utils_counters.h:163:6: note: declared here > 163 | bool create_subgroup_counter(struct counters_subgroup *subgroup, > | ^~~~~~~~~~~~~~~~~~~~~~~ > Makefile:10948: recipe for target 'pceplib/test/pceplib_test_pcep_utils_tests-pcep_utils_counters_test.o' failed > make[3]: *** [pceplib/test/pceplib_test_pcep_utils_tests-pcep_utils_counters_test.o] Error 1 > make[3]: *** Waiting for unfinished jobs.... There is a missing parameter. Fixes: 09047d2bf614 ("pceplib: add json string option to subgroup counter") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-01-18pceplib: add json string option to subgroup counterPhilippe Guibert
The created counters in pceplib library are structures with a string attribute which is used for further display. This string information is not formatted for json output. Add a second option in the create_subgroup_counter() creation API to provide the json attribute output. Create a json naming compatible with caml format for each subgroup counter used. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
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>
2023-02-07Merge pull request #12707 from donaldsharp/missed_enumsDonatas Abraitis
Missed enums
2023-02-06pceplib: add <time.h> include for time_tSam James
Fixes build on musl. Used for time_t in the header. Bug: https://bugs.gentoo.org/862558 Signed-off-by: Sam James <sam@gentoo.org>
2023-01-31pceplib: Add missing enum's to switch statementDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-27*: apply proper format string attributesDavid Lamparter
So that we get warnings about broken format strings. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-25pceplib: Fix clang-16 not happy with buildDonald Sharp
In this case it was functions without a prototype Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2022-05-11*: Properly use memset() when zeroingDonatas Abraitis
Wrong: memset(&a, 0, sizeof(struct ...)); Good: memset(&a, 0, sizeof(a)); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-10Merge pull request #11163 from opensourcerouting/fix/same_type_castingIgor Ryzhov
*: Avoid casting to the same type as on the left
2022-05-08*: Avoid casting to the same type as on the leftDonatas Abraitis
Just not necessary. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-06*: Fix doesnt spelling mistakesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-02*: Fix spelling of ojbectDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-22pceplib: Fix uninited data in test vehicleDonald Sharp
Coverity SA found this. Fix Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14pceplib: Fix spelling mistakesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-12-06pceplib: fix style issuesQuentin Young
run clang-format run clang-format run clang-format run clang-format run clang-format Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-11-02tests: clean up temp files in libpcep testsMark Stapp
Clean up temp files used by some libpcep unit tests. Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2021-09-02pceplib: fix for -Wstrict-prototypesDavid Lamparter
Just some "void" missing between empty braces. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-06-22pceplib: Extract fields needed for PcInitiated with Cisco pce. (1/4)Javier Garcia
1.- Unknown/non-standard tlv where cisco sends BSID. 2.- Non-standard Vendor Info object where cisco sends color. Co-authored-by: Javier Garcia <javier.garcia@voltanet.io> Signed-off-by: Sebastien Merle <sebastien@netdef.org> Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-05-28pceplib: fix mixup of global/local variablesIgor Ryzhov
CID 1502790 Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-05pceplib: Clean scan-build static analyzer messages.Javier Garcia
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-04-23*: make sure `config.h` or `zebra.h` is firstDavid Lamparter
`config.h` has all the defines from autoconf, which may include things that switch behavior of other included headers (e.g. _GNU_SOURCE enabling prototypes for additional functions.) So, the first include in any `.c` file must be either `config.h` (with the appropriate guard) or `zebra.h` (which includes `config.h` first thing.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21build: properly split CFLAGS from AC_CFLAGSDavid Lamparter
`CFLAGS` is a "user variable", not intended to be controlled by configure itself. Let's put all the "important" stuff in AC_CFLAGS and only leave debug/optimization controls in CFLAGS. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-12Merge pull request #8421 from opensourcerouting/xrelfo-armMark Stapp
fix xrelfo on ARM(32) & cross-compile
2021-04-09pceplib: add missing endian.h and config.hDavid Lamparter
endian.h supplies be*toh() and htobe*() functions. This fixes the build on musl libc. On other systems it seems endian.h comes in transitively from some other header. (Also, all .c files should have config.h or zebra.h as the first include, even if it works without that it's b0rked and only works due to luck.) Tested-by: Lucian Cristian <lucian.cristian@gmail.com> Signed-off-by: David Lamparter <equinox@diac24.net>
2021-04-09lib: use platform-neutral value for TCP MD5 signature lenMark Stapp
Use a pcep-specific value for MD5SIG_MAXLEN, use the OS value if present. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-31build: add pceplib test output to gitignoreMark Stapp
Add some pcep unit-test output files to gitignore. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-25libs: fix race in pcep libMark Stapp
Fix a race in the libpcep timer code; reported by coverity. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-20pceplib: Fixing coverity messages.Javier Garcia
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-03-17pathd: remove mid-string line breaksDavid Lamparter
cf. workflow.rst ("lines over 80 characters are allowed for text strings to make it possible to search the code for them"), matching Linux kernel coding style. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-05pceplib: Integrate pcelib into frrJavier Garcia
Signed-off-by: Brady Johnson <brady@voltanet.io> Co-authored-by: Javier Garcia <javier.garcia@voltanet.io> Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>