Hi Alexander,

Thanks for the reply. I think the kernel/iface stuff is a little bit more complicated than you've explained - there are lots of places around the code where calls are made directly rather than referring to the functions in the proto structure. I'm trying to make clones of the krt and iface modules just to see what it'll take, but there are a few loose ends - for example, kif_choose_primary() is called directly in a few different places - this needs to be based on the proto structure for the kernel if we want any chance of being able to change kernel modules at config/runtime instead of at build time.

Cheers
Sam


On Fri, Jun 14, 2013 at 4:04 PM, Alexander V. Chernikov <melifaro@ipfw.ru> wrote:
On 14.06.2013 06:51, Sam Russell wrote:
Hi,

I want a way to swap out the kernel/iface stuff from BIRD and replace
that with something that can talk to an OpenFlow/SDN controller. I've
made a start debugging to find out where I need to cut things into place
and put it in github (bird Git was broken yesterday so had to start from
1.3.10 tarball) https://github.com/samrussell/bird

Is anyone else keen for this? I've hooked the krt_notify,
krt_learn_announce_update and ifa_send_notify functions and these seem
to be the main things - would this be enough to make a start?

My ideal goal would be to separate all the kernel/interface code from
the engine and abstract it away in another protocol (or 2) so that
It is already separated - no one stops you from not using Device / Kernel protocol instances in your config files. Kernel protocol is _a bit_ special and OS-dependent, but generally it is just the same protocol as any other.

Note that you still need to have some real interface information for IGP to work if you need it.

In all other cases you can simply add new protocol/protocols in proto/ section.

I've stared some tutorial on writing new bird protocol once, but it is currently in a very early stage.
http://bird.mpls.in/projects/mpls-bird/wiki/Bird_new_proto

Maybe this can help a bit..


different kernels/controllers can be swapped out at config time or run
time, not at build time.

Keen for any feedback

Cheers
Sam