diff options
| author | Mark Stapp <mjs@voltanet.io> | 2021-01-21 10:12:05 -0500 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2021-01-22 16:33:01 -0500 |
| commit | ee94437e28f8b5e7f9ad8584f36fe8fbc11facb3 (patch) | |
| tree | 3afb74d830ad4d1f0eb620a7322327b79ae9e946 /zebra/zebra_nhg.h | |
| parent | 5a9c0931aa9571b875db8658ced6f1dc6f10a2b1 (diff) | |
zebra: send async nhg update results
Send the results of daemons' nhg updates asynchronously,
after the update has actually completed. Capture additional
info about the source daemon in order to locate the correct
zapi session. Simplify the result types considered by the
zebra_nhg module.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_nhg.h')
| -rw-r--r-- | zebra/zebra_nhg.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/zebra_nhg.h b/zebra/zebra_nhg.h index 9382b8c65d..db20f2beaf 100644 --- a/zebra/zebra_nhg.h +++ b/zebra/zebra_nhg.h @@ -50,8 +50,14 @@ struct nhg_hash_entry { uint32_t id; afi_t afi; vrf_id_t vrf_id; + + /* Source protocol - zebra or another daemon */ int type; + /* zapi instance and session id, for groups from other daemons */ + uint16_t zapi_instance; + uint32_t zapi_session; + struct nexthop_group nhg; /* If supported, a mapping of backup nexthops. */ @@ -292,6 +298,7 @@ zebra_nhg_rib_find_nhe(struct nhg_hash_entry *rt_nhe, afi_t rt_afi); * Returns allocated NHE on success, otherwise NULL. */ struct nhg_hash_entry *zebra_nhg_proto_add(uint32_t id, int type, + uint16_t instance, uint32_t session, struct nexthop_group *nhg, afi_t afi); |
