summaryrefslogtreecommitdiff
path: root/bfdd/bfdd_nb.h
AgeCommit message (Collapse)Author
2025-03-03bfdd: Add BFD "log-session-changes" feature.Acee Lindem
Add the BFD "log-session-changes" via the YANG and northbound API. Also add the configured value to show and operational state. Signed-off-by: Acee Lindem <acee@lindem.com>
2025-01-23bfdd: implement Xpath callbacks for SBFDwumu.zsl
Signed-off-by: wumu.zsl <wumu.zsl@alibaba-inc.com>
2023-05-31bfdd: remove redundant nb destroy callbacksIgor Ryzhov
Fixes warning logs: ``` 2023/05/29 20:11:50 BFD: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-bfdd:bfdd/bfd/profile/minimum-ttl' 2023/05/29 20:11:50 BFD: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-bfdd:bfdd/bfd/sessions/multi-hop/minimum-ttl' ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.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>
2021-10-13lib: northbound cli show/cmd functions must not modify data nodesIgor Ryzhov
To ensure this, add a const modifier to functions' arguments. Would be great do this initially and avoid this large code change, but better late than never. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-16bfdd: separate echo rx/tx timersIgor Ryzhov
Currently there is a single interval for both RX and TX echo functions. This commit introduces separate RX and TX timers for echo packets. The main advantage is to be able to set the receive interval to zero when we don't want to receive echo packets from the remote system. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-08-11bfdd: implement minimum TTLRafael Zalamena
Initial BFD protocol implementation had a hard coded value of maximum 5 hops, now we have a configurable hop amount with a safe default of 1 hop. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-08-11bfdd: implement passive modeRafael Zalamena
The passive mode is briefly described in the RFC 5880 Bidirectional Forwarding Detection (BFD), Section 6.1. Overview: > A system may take either an Active role or a Passive role in session > initialization. A system taking the Active role MUST send BFD > Control packets for a particular session, regardless of whether it > has received any BFD packets for that session. A system taking the > Passive role MUST NOT begin sending BFD packets for a particular > session until it has received a BFD packet for that session, and thus > has learned the remote system's discriminator value. At least one > system MUST take the Active role (possibly both). The role that a > system takes is specific to the application of BFD, and is outside > the scope of this specification. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-05-20bfdd: implement BFD session configuration profilesRafael Zalamena
Allow user to pre-configure peers with a profile. If a peer is using a profile any configuration made to the peer will take precedence over the profile configuration. In order to track the peer configuration we have now an extra copy of the peer configuration in `peer_profile` inside `struct bfd_session`. This information will help the profile functions to detect user configurations and avoid overriding what the user configured. This is especially important for peers created via other protocols where the default `shutdown` state is disabled (peers created manually are `shutdown` by default). Profiles can be used before they exist: if no profile exists then it will use the default configuration. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-23*: change the signature of the northbound callbacks to be more flexibleRenato Westphal
Having a fixed set of parameters for each northbound callback isn't a good idea since it makes it difficult to add new parameters whenever that becomes necessary, as several hundreds or thousands of existing callbacks need to be updated accordingly. To remediate this issue, this commit changes the signature of all northbound callbacks to have a single parameter: a pointer to a 'nb_cb_x_args' structure (where x is different for each type of callback). These structures encapsulate all real parameters (both input and output) the callbacks need to have access to. And adding a new parameter to a given callback is as simple as adding a new field to the corresponding 'nb_cb_x_args' structure, without needing to update any instance of that callback in any daemon. This commit includes a .cocci semantic patch that can be used to update old code to the new format automatically. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-10-30bfdd: split northbound callbacks into multiple filesRenato Westphal
Rearrange the bfdd northbound callbacks as following: * bfd_nb.h: prototypes of all northbound callbacks. * bfd_nb.c: definition of all northbound callbacks and their associated YANG data paths. * bfd_nb_config.c: implementation of YANG configuration nodes. * bfd_nb_state.c: implementation of YANG state nodes. This should help to keep to code more organized and easier to maintain. No behavior changes intended. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>