[quagga-dev 9159] BGP lookup
2012-04-02 17:07:39 GMT
Hello everyone,
I've been searching and reading bits and pieces of code relevant to bgp nexthop lookup. What I really am trying to do is spot the sections of code responsible for the lookup and forwarding of a packet to it's next hop at any given router.
I have spotted most of the functions that are responsible for these and have read them but I have no idea as to where in the code base are these functions called when a packet arrives and a nexthop lookup has to be done.
So far I have understood in a partial nitty gritty way that there is obviously some kind of prefix tree implementation (which one?) for the routing tables. I couldn't fully grasp the bgp_nexthop_cache struct especially the purpose of it's members such as u_char nexthop_num and struct nexthop *nexthop although i could follow the it's associated functions, unless i know why is there a linked list of *nexthop i wouldn't understand the purpose of the functions.
I have certainly done more research than the above and I understand there is a lot more to do but it would be great if anyone could give me a direction as to where to start to understand and ask questions as i go through code. I have started in a very unstructured way and I am definitely not able to see the flow of nexthop lookup and forwarding as of now. Thank you
Regards
Raja Naresh
<div><p>Hello everyone, <br><br>I've been searching and reading bits and pieces of code relevant to bgp nexthop lookup. What I really am trying to do is spot the sections of code responsible for the lookup and forwarding of a packet to it's next hop at any given router. <br><br>I have spotted most of the functions that are responsible for these and have read them but I have no idea as to where in the code base are these functions called when a packet arrives and a nexthop lookup has to be done. <br><br>So far I have understood in a partial nitty gritty way that there is obviously some kind of prefix tree implementation (which one?) for the routing tables. I couldn't fully grasp the <span>bgp_nexthop_cache</span> struct especially the purpose of it's members such as <span>u_char nexthop_num</span> and <span>struct nexthop *nexthop</span> although i could follow the it's associated functions, unless i know why is there a linked list of <span>*nexthop</span> i wouldn't understand the purpose of the functions. <br><br>I have certainly done more research than the above and I understand there is a lot more to do but it would be great if anyone could give me a direction as to where to start to understand and ask questions as i go through code. I have started in a very unstructured way and I am definitely not able to see the flow of nexthop lookup and forwarding as of now. Thank you <br><br>Regards<br>Raja Naresh<br></p></div>
RSS Feed