summaryrefslogtreecommitdiffstats
path: root/lib/subdir.am (follow)
Commit message (Collapse)AuthorAgeFilesLines
* yang: ietf-netconf-acm needs to be in libfrrDavid Lamparter2024-04-251-0/+1
| | | | | | | ietf-key-chain depends on ietf-netconf-acm, and lib/ code sets up the former, so ietf-netconf-acm needs to be embedded in the libfrr too. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: remove confd pluginIgor Ryzhov2024-03-141-12/+0
| | | | | | | | | ConfD is not supported anymore and its use is discouraged by developers: https://discuss.tail-f.com/t/confd-premium-no-longer-available-future-of-confd/4552/6 Remove the code and all mentions of ConfD from the documentation. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* lib: allow recirculating/relaying log messagesDavid Lamparter2024-03-101-0/+2
| | | | | | | | | | | This is primarily intended for ldpd with its split-process architecture. The LDE/LDPE subprocesses currently lose the extended zlog functionality. The zlog_live target already encapsulates all necessary bits for vtysh. Reuse it for a relay function to be used in the main ldpd process. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: add keychain northbound supportChristian Hopps2024-03-051-0/+5
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* lib,vtysh: add per-daemon log file configMark Stapp2024-01-171-0/+10
| | | | | | | | Add a config that specifies per-deamon log file names. Move the handy generated list of daemon names from vtysh to lib; edit the gitignore files to match. Signed-off-by: Mark Stapp <mjs@labn.net>
* lib: Breakout sendmmsg into it's own headerDonald Sharp2024-01-041-0/+1
| | | | | | | | The only 2 places sendmmsg is used is in zlog_5424.c and zlog_live.c. Why is the rest of the entire system paying for this compilation? Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* lib: northbound: add yielding and batching to oper-state queriesChristian Hopps2023-12-281-0/+1
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: add simplified native msg supportChristian Hopps2023-12-261-0/+2
| | | | | | This is intended to replace protobuf use in mgmtd. Signed-off-by: Christian Hopps <chopps@labn.net>
* lib, mgmtd: move common header to libIgor Ryzhov2023-11-171-0/+1
| | | | | | | The common header included from lib and other daemons should be located in lib, not in mgmt directory. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* *: Move distance related defines into their own headerDonald Sharp2023-11-071-0/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* lib: add dynamic array typeChristian Hopps2023-06-281-0/+2
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* mgmtd: fully implement debug flags for mgmtd and clientsChristian Hopps2023-05-011-0/+2
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* build: fix frr-if-rmap.yang model embeddingDavid Lamparter2023-04-241-0/+1
| | | | | | This was missed somewhere along the line, causing ripd to not start. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: add library for igp flexible-algorithmHiroki Shirokura2023-04-181-0/+2
| | | | | | | | | | | | Add a library to deal with Flexible Algorithm that will be common to IS-IS and OSPF. The functions enables to deal with: - Affinity-maps - Extended Admin Group (RFC7308) - Flex-Algo structures that contains the flex-algo configurations Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* lib,isisd: refactor igp-agnostic sr misc functionsHiroki Shirokura2023-04-181-0/+2
| | | | | | | | | | SR Algorithms are independent of specific IGPs such as IS-IS. This commit adds lib/sr to aggregate IGP agnostic functions and constants. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* lib: convert if_rmap to YANG northboundChristian Hopps2023-04-111-0/+1
| | | | | | | | | - nice correspondence between new YANG grouping and shared library code. - fixes bug with RIPNG use, certainly didn't work before. - removes rip header from shared library code - still has uses RIP_NODE/RIPNG_NODE as required by CLI foo. Signed-off-by: Christian Hopps <chopps@labn.net>
* Merge pull request #12698 from Orange-OpenSource/isisdRuss White2023-04-111-0/+2
|\ | | | | Isisd/Lib: Add new printfrr format facility for Intermediate System ID
| * lib: Add ISO System & Network format to printfrrOlivier Dugeon2023-03-211-0/+2
| | | | | | | | | | | | | | | | | | Like for IP addresses, this patch add a new format for printfrr collection to print ISO System ID and Network address a.k.a IS-IS system ID & Network. This new format is added to the library instead of isisd because other daemons and tools need to print ISO System ID & Network Address. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | lib: Remove getopt.c and getopt1.cDonald Sharp2023-03-281-3/+0
| | | | | | | | | | | | | | Why do we need getopt code that is standard in everything that we compile against? Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Convert event.h to frrevent.hDonald Sharp2023-03-241-1/+1
| | | | | | | | | | | | | | We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Rename thread.[ch] to event.[ch]Donald Sharp2023-03-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | lib: new message library for mgmtd client and adaptersChristian Hopps2023-03-221-0/+2
| | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | mgmtd: Add MGMT Backend Interface FrameworkChristian Hopps2023-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces the MGMT Backend Interface which can be used by back-end management client daemons like BGPd, Staticd, Zebra to connect with new FRR Management daemon (MGMTd) and utilize the new FRR Management Framework to let any Frontend clients to retrieve any operational data or manipulate any configuration data owned by the individual Backend daemon component. This commit includes the following functionalities in the changeset: 1. Add new Backend server for Backend daemons connect to. 2. Add a C-based Backend client library which can be used by daemons to communicate with MGMTd via the Backend interface. 3. Maintain a backend adapter for each connection from an appropriate Backend client to facilitate client requests and track one or more transactions initiated from Frontend client sessions that involves the backend client component. 4. Add the following commands to inspect various Backend client related information a. show mgmt backend-adapter all b. show mgmt backend-yang-xpath-registry c. show mgmt yang-xpath-subscription Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com> Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com> Co-authored-by: Ujwal P <ujwalp@vmware.com> Signed-off-by: Yash Ranjan <ranjany@vmware.com>
* | mgmtd: Add MGMT Frontend Interface FrameworkChristian Hopps2023-03-221-0/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces the Frontend Interface which can be used by front-end management clients like Netconf server, Restconf Server and CLI to interact with new FRR Management daemon (MGMTd) to access and sometimes modify FRR management data. This commit includes the following functionalities in the changeset: 1. Add new Frontend server for clients connect to. 2. Add a C-based Frontend client library which can be used by Frontend clients to communicate with MGMTd via the Frontend interface. 3. Maintain a frontend adapter for each connection from an appropriate Frontend client to facilitate client requests and track one or more client sessions across it. 4. Define the protobuf message format for messages to be exchanged between MGMTd Frontend module and the Frontend client. 5. This changeset also introduces an instance of MGMT Frontend client embedded within the lib/vty module that can be leveraged by any FRR daemon to connect to MGMTd's Frontend interface. The same has been integrated with and initialized within the MGMTd daemon's process context to implement a bunch of 'set-config', 'commit-apply', 'get-config' and 'get-data' commands via VTYSH Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com> Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com> Co-authored-by: Ujwal P <ujwalp@vmware.com> Signed-off-by: Yash Ranjan <ranjany@vmware.com>
* Merge pull request #12248 from pguibert6WIND/bgpasdotRuss White2023-02-211-0/+2
|\ | | | | lib, bgp: add initial support for asdot format
| * lib, bgp: add initial support for asdot formatPhilippe Guibert2023-02-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AS number can be defined as an unsigned long number, or two uint16 values separated by a period (.). The possible valus are: - usual 32 bit values : [1;2^32 -1] - <1.65535>.<0.65535> for dot notation - <0.65535>.<0.65535> for dot+ notation. The 0.0 value is forbidden when configuring BGP instances or peer configurations. A new ASN type is added for parsing in the vty. The following commands use that new identifier: - router bgp .. - bgp confederation .. - neighbor <> remote-as <> - neighbor <> local-as <> - clear ip bgp <> - route-map / set as-path <> An asn library is available in lib/ and provides some services: - convert an as string into an as number. - parse an as path list string and extract a number. - convert an as number into a string. Also, the bgp tests forge an as_zero_path, and to do that, an API to relax the possibility to have a 0 as value is specifically called from the tests. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | Merge pull request #12494 from louis-6wind/ext_admin_groupOlivier Dugeon2023-02-151-0/+8
|\ \ | | | | | | lib,zebra,isisd: add support for extended admin group RFC7308
| * | lib,yang,zebra: add extended admin-group supportLouis Scalbert2023-02-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the support of Extended Admin-Group (RFC7308) to the zebra interface link-params Traffic-Engineering context. Extended admin-groups can be configured with the affinity-map: > affinity-map blue bit-position 221 > int eth-rt1 > link-params > affinity blue > exit-link-params Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | lib,yang,zebra: add affinity-map supportLouis Scalbert2023-02-091-0/+6
| |/ | | | | | | | | | | | | | | Add the affinity-map global command to zebra. The syntax is: > affinity-map NAME bit-position (0-1023) Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* / lib: Add `debug routemap [detail]`Donald Sharp2023-02-131-0/+1
|/ | | | | | Add the ability to turn on `debug routemap detail` for FRR. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* build: consistently mkdir -p output for redirectDavid Lamparter2023-01-241-0/+2
| | | | | | | | | | | | When running the build in a separate build directory, redirecting output into a file can error out if the directory does not exist yet. Some places already had `mkdir -p` calls, but not all. Make all occurences of this consistently use `@$(MKDIR_P)`. (Extension of PR #12575 to catch more places.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Revert "lib: BGP registration with IGP for BGP ORR rSPF calc"Donatas Abraitis2023-01-171-1/+0
| | | | This reverts commit a5dd4bf47d1d24cfc5e916ff29f5124792e85a53.
* zebra: traffic control state managementSiger Yang2022-11-221-0/+2
| | | | | | | This allows Zebra to manage QDISC, TCLASS, TFILTER in kernel and do cleaning jobs when it starts up. Signed-off-by: Siger Yang <siger.yang@outlook.com>
* build, vtysh: extract vtysh commands from .xrefDavid Lamparter2022-10-261-23/+6
| | | | | | | | | | | | | | | | | | | Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: BGP registration with IGP for BGP ORR rSPF calcMadhuri Kuruganti2022-10-121-0/+1
| | | | Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
* build: unconditionally enable format checksDavid Lamparter2022-08-021-4/+0
| | | | | | | | | The format message checks done by clippy/xrelfo were still guarded behind `--enable-dev-build`. They've been clean and reliable, so it's time to enable them unconditionally. Fixes: #11680 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib/md5,lib/sha256: Use explicit_bzero to clean up sensitive data.Loganaden Velvindron2022-05-311-0/+3
| | | | | | | explicit_bzero() is available as an API to clean up sensitive data and avoid compiler optimizations that remove calls to memset() or bzero(). Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
* *: Fix spelling of neccessaryDonald Sharp2022-04-191-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* build: remove generated lib files during distcleanMark Stapp2022-03-231-0/+5
| | | | | | | Remove a couple of lex/yacc output files in lib/ during 'distclean'. Signed-off-by: Mark Stapp <mstapp@nvidia.com>
* Merge pull request #10566 from whichbug/masterRuss White2022-02-281-0/+2
|\ | | | | isisd: use base64 to encode the binary data.
| * isisd: fix #10505 using base64 encodingwhichbug2022-02-221-0/+2
| | | | | | | | | | | | | | Using base64 instead of the raw string to encode the binary data. Signed-off-by: whichbug <whichbug@github.com>
* | lib: implement `terminal monitor` for vtyshDavid Lamparter2022-02-281-0/+2
|/ | | | | | Adds a new logging target that sends log messages to vtysh. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #8458 from opensourcerouting/xref-5424Donald Sharp2022-02-081-0/+4
|\ | | | | lib: RFC5424 syslog support
| * lib: RFC5424 & journald extended syslog targetDavid Lamparter2022-01-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Not much to say here, user docs are coming up in a separate commit. RFC5424 and (systemd's) journald allow passing structured key-value data. This stuffs the metadata we have available into there. The "does the system syslogd support RFC5424" question is unfortunately not easily answered, so we can only give an affirmative answer on NetBSD 5.0+ or FreeBSD 12+. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib: Add CSPF Path Computation algorithmOlivier Dugeon2022-02-021-0/+2
|/ | | | | | | | | | | | | | As helper function of Segment Routing Flex Algo or RSVP-TE add Constrained Shortest Path First algorithm able to compute path with constraints. Supported constraints are as follow: - Standard IGP metric - TE IGP metric - Delay metric - Bandwidth for given Class of Service for bandwidth reservation (RSVP-TE) Usage of CSPF algorithms is detailed in the doc/developer/cspf.rst file Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* build: fix duplicate yang.c file inclusionsDavid Lamparter2021-11-111-1/+0
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: link libcrypt & libdl to libfrr onlyDavid Lamparter2021-11-111-1/+1
| | | | | | They're not needed elsewhere. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: Scan lib/resolver.c only when c-ares is installedJohn W. O'Brien2021-08-151-1/+1
| | | | | | Scan lib/resolver.c only when c-ares is installed Signed-off-by: John W. O'Brien <john@saltant.com>
* build: fix `AM_LDFLAGS` usage (and gcov)David Lamparter2021-07-211-8/+9
| | | | | | | | | | | | | | | | 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: add `-Werror` to xrelfo log format warningsDavid Lamparter2021-06-241-1/+1
| | | | | | | | | Adding a `\n' should now produce a warning. Controlled by `-Werror` so if you're doing a dev build and it's warning about some `prefix2str` that should be converted to `%pFX`, you can turn off `-Werror` to fix it later like with all other warnings. Signed-off-by: David Lamparter <equinox@diac24.net>