Re: Making NM portable

On Sep 25, 2008, at 7:26 AM, Dan Williams wrote:

On Thu, 2008-09-25 at 01:17 +0530, Debarshi Ray wrote:
So I have some FreeBSD support using PF_ROUTE sockets. It is possible
to show the routing table, and soon it will support addition and
deletion of routes. At the same time I am reworking the Linux backend
to use libnl instead of directly mucking with PF_NETLINK.

My private tree is available here:
git:// (see libroute/ and
route/) At the moment it is quite out of date with my working
directory. :-)

It would be very helpful if someon could enlist the basic
functionality that NetworkManager would need from a library that
abstracts out different kernels' interfaces. It looks to that atleast
the following are needed:
+ flush
+ add
+ delete
+ monitor

If by 'monitor' you mean enumerate, then yes.  This applies to _both_
addresses and routes.

NM also uses netlink for interface flag changes like carrier state, but
that may be out of the scope of libroute.  It looks like you're
hand-rolling netlink code though; any reason you can't back the Linux
stuff with libnl since Thomas already wrote all that stuff already?

I'd actually rather just link to libnl on Linux and libroute on *BSD I
think, abstracting the two inside NM.  Because unless you want to
basically copy the functionality of libnl into libroute (which might
take a while) it's probably easier to just abstract it in NM.

Going to agree with Dan here. Not really a need to make libroute do what libnl does... we already have libnl. We can create the necessary abstractions inside NetworkManager so we can work with either libnl or libroute.

Anything else?

Since GNU Inetutils is under GPLv3+ the license notices mention it,
but I am planning to mark 'libroute' as LGPLv3+ to make it easy for
GPLv2+ programs like NetworkManager to use it.

It could also be GPLv2+ and I think you'd be fine :)  Your call.

LGPLv3+ will only work if the software that links to libroute is GPLv2+ (the '+' being the key), I think. I mean, I'm not a licensing expert. I would check this page out (in particular, the GPL compatibility matrix):

David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]