On Mon, Mar 02, 2015 at 09:33:30PM +0100, Niels Baggesen wrote: N> Den 27-02-2015 kl. 22:22 skrev Gleb Smirnoff: N> > Now time for net-snmp, which isn't piece of cake. And I'd like N> > to get it done properly, and not to store a patch in FreeBSD port N> > for ages, but to integrate the patch right in the main net-snmp repo. N> > So, I'm asking for your help here. Waiting for a net-snmp developer N> > to respond to this email, so that we can work on the problem together. N> > N> > P.S. This is doable, since native FreeBSD SNMP daemon implements N> > mibII without utilizing kvm(3). :) N> N> A lot of this changed between 5.7.2 and 5.7.3 to use sysctl interfaces.
I see, you use { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 }; I'd suggest to use getifaddrs(3), it uses more modern sysctl NET_RT_IFLISTL, note the L at end. And the library function takes the burden of parsing the stuff. N> With the current 5.7.3 release, and configured with N> --enable-mfd-rewrites, I think the only parts that uses kvm interfaces N> are the old and deprecated IPV6-MIB implementations inmibII/ipv6.c, now N> superseeded by the INET-XXX-MIB versions, and the hrSWRunTable that uses N> kvm_getargv and kvm_getprocs. Yes, mibII/ipv6.c is the place where build is broken right now, since struct ifaddr is now hidden from userland programs. struct ifnet is still visible, but soon to be hidden, too. Is it possible to disable compilation of deprecated IPV6-MIB implementation at compile time? It could be that would be just the right solution for future FreeBSD versions, instead of putting yet another ifdef into this awful pile of ifdefs, that I see in ipv6.c :) -- Totus tuus, Glebius. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders