]> git.proxmox.com Git - mirror_frr.git/commit - lib/northbound_confd.c
lib: introduce the northbound context structure
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 27 Apr 2020 16:13:57 +0000 (13:13 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Thu, 28 May 2020 22:22:54 +0000 (19:22 -0300)
commit13d6b9c1343a1f925e3ffd7be0938bf1f395b461
tree93f50208c9c3e0403fb01b697234b815f7889a50
parent1be4decb04be48d73ea90f6feb0f33af25499c19
lib: introduce the northbound context structure

The new northbound context structure contains information about
the client performing a configuration transaction. This information
will be made available to all configuration callbacks through the
args->context parameter.

The usefulness of this structure comes from the fact that it can be
used as a communication channel (both input and output) between the
northbound callbacks and the northbound clients. This can be done
through its "client_data" field which contains client-specific data.

This should cover some very specific scenarios where a northbound
callback should perform an action only if the configuration change
is coming from a given client. An example would be sending a PCEP
response to a PCE when an SR-TE policy is created or modified
through the PCEP northbound client (for that to happen, the
northbound callbacks need to have access to the PCEP request ID,
which needs to be available).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/libfrr.c
lib/northbound.c
lib/northbound.h
lib/northbound_cli.c
lib/northbound_confd.c
lib/northbound_db.c
lib/northbound_grpc.cpp
lib/northbound_sysrepo.c
lib/vty.c