Hi David,

Here’s some back ground on FIB graph walks:
  
https://s3-docs.fd.io/vpp/21.10/gettingstarted/developers/fib20/graphwalks.html

I can’t think of any examples similar to what you are attempting, but you could 
conceivably achieve it with:
1 – a pub/sub API. Similar to want_ip_neighbor_events
2 – when an ip-neighbour resolution state changes walk all the adjacencies for 
that next-hop. You’ve probably already seen uses of adj_nbr_walk_nh() in the 
ip-neighbour code to do this
3 – from the adjacency back walk the FIB graph with fib_walk_[a]sync(). You’ll 
need to define a new back-walk type. In fib_entry_back_walk_notify you can push 
an event to your subscribers. You can decide at this point if you want to 
continue the walk to recursive prefixes or not.

For 1 you can work in a plugin, for 2 and 3 you’ll need to change the core code.

Have fun,
neale

From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> on behalf of David Gohberg via 
lists.fd.io <gohberg=gmail....@lists.fd.io>
Date: Wednesday, 29 December 2021 at 13:09
To: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] searching for all routes that point to an attached 
next-hop neighbor #routing
Hi Neale,

I have a custom plugin in which I want to extract this information and I much 
prefer this approach.
Do you have any references on how to walk the FIB graph or existing features 
that perform similar tasks?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20673): https://lists.fd.io/g/vpp-dev/message/20673
Mute This Topic: https://lists.fd.io/mt/87917518/21656
Mute #routing:https://lists.fd.io/g/vpp-dev/mutehashtag/routing
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to