Debugging the RIP code
Jan Maria Matejka
jan.matejka at nic.cz
Mon May 21 11:44:35 CEST 2018
Disclaimer: There is no sarcasm in this mail. It may look like sarcasm
but I'm absolutely serious.
> I would like to get more understanding about one simple routing protocol
> (e.g. RIP) in BIRD by debugging the code step-by-step. However, I have
> got stuck at configuring the first step to run the code in Visual Studio
The code is C, not C++. It is probably not buildable as C++. Moreover,
BIRD currently supports Linux and several flavors of BSDs. We don't
support running on Windows natively and it seems to be quite a lot of
work to write all the needed bindings even for RIP to run. Anyway, it
would be too simple to tell you that you never want to do that. It is
definitely possible, yet quite difficult.
> Could you guys please point me out how could I configure things in C++
> to starting debugging. Any help you have to offer would be greatly
My recommendations are as follows:
1. Setup a Linux C development environment.
2. Trace RIP on Linux.
Then you are done with what you wanted (to learn how RIP is written).
You didn't want this? Then skip step 2 and continue this way:
3. Dig deeply into BIRD sysdep/ folder and research what are the needed
APIs on Windows to bind to. You may need to trace the low-level parts of
BIRD and read a lot of documentation to check that your understanding of
the code is correct.
4. Fix the build errors in Visual Studio in a portable way.
5. Write Windows bindings in sysdep/.
6. Send your patches to the mailing list.
7. Debug RIP on Windows.
I'm not kidding. I'm definitely not kidding. I'm absolutely serious.
If I wanted to trace RIP in Visual Studio, I would do it this way.
Yes, I know, it is a painful way, yet still the least painful way.
I believe that you can do it. I'm looking forward to your patches!
More information about the Bird-users