Re: Making NM portable



On Fri, 2008-09-05 at 23:56 -1000, David Cantrell wrote:
> On Sep 5, 2008, at 6:39 PM, Debarshi Ray wrote:
> 
> >> currently Linux-specific is random bits to get info from the wireless
> >> card (which could be replaced by enhancing the wpa_supplicant dbus
> >> interface) and the routing and addressing stuff (which is pretty well
> >> encapsulated in libnl already and could be separated out in NM  
> >> itself).
> >
> > Isn't libnl PF_NETLINK socket specific? *BSDs use PF_ROUTE sockets
> > which differ from their PF_NETLINK counterparts.
> 
> NM's use of libnl and iproute2 will cause portability problems, yes.

Yeah, though the places are pretty much encapsulated and shouldn't be
too hard to pull out.

> >> It would be interesting to try a quick port and see just how much  
> >> needs
> >> to be changed and then start figuring out how best to break up the  
> >> code
> >> in SVN to help that effort.  Care to take a stab? :)
> >
> > I had a brief look at the code, and found that we need to replace the
> > parts which directly spawn iproute2 utilities. Would you to replace
> > those parts with API calls to some library?
> 
> 
> For the most part (what I've seen in the code), NM is using libnl in  
> as many places where it will work.  Some things were not implemented  
> in libnl and NM calls /sbin/ip directly.  I think moving NM to using  
> libnl completely is the best idea.  It should not be using /sbin/ip.

We've killed almost all usage of /sbin/ip already and if there's any
left it should be taken out and shot.

Dan



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