summaryrefslogtreecommitdiffstats
path: root/qpb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: add XREF_SETUP() to libraries and utilitesDavid Lamparter2024-05-021-0/+5
| | | | | | | | | This is theoretically not needed if neither DEFUNs nor zlog_* calls are used, except I'm about to turn it into a build error to catch the cases where it _is_ necessary. Which is libmgmt_be_nb.la in this case, where it causes build failures on hppa. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* qpb: Add missing `#include nexthop.h`Carmine Scarpitta2024-02-101-0/+1
| | | | | | | | | | In `qpb.h` we have a bunch of functions that make use of `union g_addr`. `union g_addr` is defined in `nexthop.h`, which actually is NOT included in `qpb.h`. Let's add the missing `#include nexthop.h`. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
* mgmtd: Bringup MGMTD daemon and datastore module supportChristian Hopps2023-03-221-20/+0
| | | | | | | | | | | | | | | | | | | Features added in this commit: 1. Bringup/shutdown new management daemon 'mgmtd' along with FRR. 2. Support for Startup, Candidate and Running DBs. 3. Lock/Unlock DS feature using pthread lock. 4. Load config from a JSON file onto candidate DS. 5. Save config to a JSON file from running/candidate DS. 6. Dump candidate or running DS contents on the terminal or a file in JSON/XML format. 7. Maintaining commit history (Full rollback support to be added in future commits). 8. Addition of debug commands. Co-authored-by: Yash Ranjan <ranjany@vmware.com> Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com> Co-authored-by: Ujwal P <ujwalp@vmware.com> Signed-off-by: Pushpasis Sarkar <pushpasis@gmail.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-095-80/+5
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: manual SPDX License ID conversionsDavid Lamparter2023-02-091-0/+1
| | | | | | | | | | The files converted in this commit either had some random misspelling or formatting weirdness that made them escape automated replacement, or have a particularly "weird" licensing setup (e.g. dual-licensed.) This also marks a bunch of "public domain" files as SPDX License "NONE". Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* qpb: Add missing enum's to switch statementDonald Sharp2023-01-311-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* qpb: Tell coverity the actual size we are copyingDonald Sharp2022-08-021-2/+4
| | | | | | | `struct prefix` is a superset of `struct prefix_ipv4` and `struct prefix_ipv6`. Let's let coverity figure it out Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* build: fix `AM_LDFLAGS` usage (and gcov)David Lamparter2021-07-211-1/+1
| | | | | | | | | | | | | | | | like the other automake variables, setting `xyz_LDFLAGS` causes `AM_LDFLAGS` to be ignored for `xyz`. For some reason I had in my mind that automake doesn't do this for LDFLAGS, but... it does. (Which is consistent with `_CFLAGS` and co.) So, all the libraries and modules have been ignoring `AM_LDFLAGS` (which includes `SAN_FLAGS` too). Set up new `LIB_LDFLAGS` and `MODULE_LDFLAGS` to handle all of this correctly (and move these bits to a central location.) Fixes: #9034 Fixes: 0c4285d77eb ("build: properly split CFLAGS from AC_CFLAGS") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: fix assert() use in .pb-c.c filesDavid Lamparter2021-05-031-0/+1
| | | | | | | The .pb-c.c files pick up our assert() override, but that needs config.h to be included too, and that needs to go at the very top of the file... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: fix protobuf out-of-tree buildDavid Lamparter2021-04-211-2/+2
| | | | | | | Otherwise it aborts with "File does not reside within any path specified using --proto_path (or -I)" Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: add LLVM bitcode targetsDavid Lamparter2020-05-051-0/+1
| | | | | | | Just an easy way to produce LLVM .bc (bitcode) files. Not used during normal builds. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: fix "make tags"David Lamparter2019-09-171-0/+3
| | | | | | | | | | | Anything we list in a xxx_SOURCES variable will be included for "make tags", including filess marked as nodist_xxx_SOURCES. So if we don't have Protobuf enabled, even though the entire library isn't built, "make tags" will still try to process these files... which we can't autogenerate because Protobuf is disabled. Same for gRPC. Fixes: #3266 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: fix config.h/zebra.h include orderDavid Lamparter2018-09-081-0/+4
| | | | | | | | config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
* build: clean up protobuf build integrationDavid Lamparter2018-09-081-27/+12
| | | | | | | We were linking all libs and binaries against libprotobuf-c if the option was enabled... that makes no sense at all. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: cleanup .gitignore filesDavid Lamparter2018-09-081-15/+0
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* build: remove common.amDavid Lamparter2018-09-081-0/+36
| | | | | | Fold things into where they make sense. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-1/+0
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* build: clean up BUILT_SOURCESDavid Lamparter2017-08-041-1/+0
| | | | | | | | | | | | | | | BUILT_SOURCES doesn't do what the name suggests. What it actually means is "these files should be built first when doing a 'make' without explicit target" (or "make all"). It's pretty much almost always wrong to use BUILT_SOURCES, the only correct use is when a file is needed by an unspecified / large set of files. Also remove version.h and route_types.h from dist tarball while we're at it. configure will create them anyway. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* protobuf: fix buildDavid Lamparter2017-07-312-3/+4
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: non-recursive qpb & fpmDavid Lamparter2017-07-314-31/+37
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Revert "*: reindent pt. 2"David Lamparter2017-07-221-0/+1
| | | | | | | | | This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: reindent pt. 2whitespace / reindent2017-07-171-1/+0
| | | | | | | | w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
* *: reindentreindent-master-afterwhitespace / reindent2017-07-175-352/+320
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-155-20/+15
| | | | | | | | | | | 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>
* Protobuf: Update library name to reflect name change to FRRMartin Winter2017-01-194-7/+7
| | | | Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
* fpm/protobuf: fix compile errors & warningsDavid Lamparter2016-09-231-1/+2
| | | | | | | BABEL was removed, ifname nexthops were removed, additional includes were needed, and lastly the protobuf enum-handling triggers a warning. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Use only the ISC license for .proto files.Avneesh Sachdev2016-09-231-31/+0
| | | | | | | | | | Simplify licensing for protobuf files based on discussion on the quagga-dev mailing list. Previously, users could choose between the GPL and the ISC license. Signed-off-by: Avneesh Sachdev <avneesh@sproute.com> Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
* qpb: Add support for protobuf.Avneesh Sachdev2016-09-239-0/+955
Infrastructure that allows protocol buffers to be used in Quagga. The changes below comprise of: - Build hooks - Protobuf definitions for common types. - Library routines for working with protobuf, including functions that help translate between common quagga types and their protobuf equivalents. Changes: * qpb/{Makefile.am,README.txt,qpb.h,.gitignore} Add the qpb library, which provides shared code and definitions for using protocol buffers in quagga code. * qpb/qpb.proto Protobuf definitions that can be shared by all of quagga. * qpb/linear_allocator.h An allocator that allocates memory by walking down towards the end of a buffer. This is used to cheaply allocate/deallocate memory on the stack for protobuf operations. * qpb/qpb_allocator.[ch] Thin layer that allows a linear allocator to be used with the protobuf-c library. * common.am This is an automake fragment that is intended to be shared by Makefile.am files in the tree. It currently includes definitions related to protobuf. * configure.ac - Add logic to optionally build protobuf code. By default, protobuf support is enabled if the protobuf C compiler (protoc-c) is available, and the associated header files/library can be found. The user can choose to override this behavior via the new --disable-protobuf/--enable-protobuf flags. - Include the quagga protobuf library (qpb) in the build. * .gitignore Ignore source code generated by protobuf compiler. * Makefile.am Add 'qpb' to the list of subdirectories. Signed-off-by: Avneesh Sachdev <avneesh@sproute.com> Edited: Paul Jakma <paul.jakma@hpe.com>: Change the sense of the configure enable option to require explicit specifying, as an experimental feature.