[libvirt] [RFC] Refactoring bridge driver for portability

Roman Bogorodskiy bogorodskiy at gmail.com
Sun Dec 23 12:54:21 UTC 2012


Hi,

Few weeks ago when I have submitted my all-in-one huge FreeBSD,
Eric made some comments on the networking part:

http://www.redhat.com/archives/libvir-list/2012-December/msg00432.html

Now when we're done with most of the other things, I'd like
to discuss networking in more detail.

Basically, the main question that bothers me is what would be the
best way to refactor network/bridge_driver.c?

Currently it contains a number of things:

 - dnsmasq routines, static, but cross-platform, doesn't need
   any changes (at least major ones)
 - the same for radvd
 - minor firewalld bits, that are linux specifc
 - iptables routines. There are quite a lot of that code
   and it's also gets called from many places in the file

I'm thinking about an approach that Eric mentioned for virthread.c:

- keep dnsmasq and radvd in bridge_driver.c
- move out all linux specific code to bridge_driver_linux.c and
  #include it in a way similar to virthread.c
- in a similar way create bridge_driver_freebsd.c

Does it sound reasonable?

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121223/6da6e897/attachment-0001.sig>


More information about the libvir-list mailing list