Re: [PATCH] Fix error report from nl_recvmsg

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

 



On Sat, Mar 02, 2013 at 11:42:01AM -0600, Doug Goldstein wrote:
> On Fri, Mar 1, 2013 at 8:44 AM, Eric Blake <eblake@xxxxxxxxxx> wrote:
> > On 03/01/2013 03:18 AM, Daniel P. Berrange wrote:
> >>>
> >>> So the conclusion is that I see no extra harm in calling nl_geterror(). ACK.
> >>
> >> Except the API signature is different, so my patch won't work with
> >> both versions :-(
> >
> > Sounds like its time for a wrapper function that #ifdefs away the
> > difference in underlying API calls between libnl1 and libnl3, with the
> > bulk of our code using our wrapper instead of direct nl_* functions.
> > And by the time we convert our code to all go through our wrappers, how
> > much simpler is it to have our wrapper do the direct socket work instead
> > of catering to two parallel nl_ abstractions?
> >
> > --
> > Eric Blake   eblake redhat com    +1-919-301-3266
> > Libvirt virtualization library http://libvirt.org
> >
> 
> This is the same road I went down with for an application at work. By
> the time I got close to abstracting away all the badness, I had a
> working netlink layer and dropped libnl entirely. I wasn't using all
> the complex gennl types that libnl contains and abstracts however. A
> reasonable read is libnfnetlink to see how really simple it is to use
> netlink.
> 
> https://git.netfilter.org/libnfnetlink/

Thanks for the tip. I don't have time to work on this myself, but I'd
encourage anyone interested to cook up a patch to remove libvirt's
use of the nl_ prefixed functions (leaving only the nla_ functions)


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]