Re: network interface/address API on FreeBSD
Den 04-03-2015 kl. 10:17 skrev Gleb Smirnoff: 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. That looks interesting. I will give it try:-) 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 :) ./configure --with-out-mib-modules=mibII/ipv6 should do the trick /Niels -- Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net The purpose of computing is insight, not numbers --- R W Hamming -- 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
Re: network interface/address API on FreeBSD
Niels, On Wed, Mar 04, 2015 at 09:06:11PM +0100, Niels Baggesen wrote: N Den 04-03-2015 kl. 10:17 skrev Gleb Smirnoff: N I see, you use { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 }; N N I'd suggest to use getifaddrs(3), it uses more modern sysctl N NET_RT_IFLISTL, note the L at end. And the library function N takes the burden of parsing the stuff. N N That looks interesting. I will give it try:-) Thanks a lot! You can see example usage in the URLs that I posted in the first email in this thread. If you move to getifaddrs(3), that might make our life much easier in future. NET_RT_IFLIST is considered somewhat internal API, between kernel and libc. A year ago, we did run over all software in FreeBSD ports collection to check whether any port uses it, and look like a year ago no one did: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=183357 N Is it possible to disable compilation of deprecated IPV6-MIB implementation N at compile time? It could be that would be just the right solution for N future FreeBSD versions, instead of putting yet another ifdef into this N awful pile of ifdefs, that I see in ipv6.c :) N N ./configure --with-out-mib-modules=mibII/ipv6 N N should do the trick Will try that, thanks! -- 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
Re: network interface/address API on FreeBSD
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 NmibII 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
Re: network interface/address API on FreeBSD
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 NmibII without utilizing kvm(3). :) N N A lot of this changed between 5.7.2 and 5.7.3 to use sysctl interfaces. N 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. What a good news! I will check build of latest net-snmp on latest FreeBSD and report back. -- 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
Re: network interface/address API on FreeBSD
Den 27-02-2015 kl. 22:22 skrev Gleb Smirnoff: Now time for net-snmp, which isn't piece of cake. And I'd like to get it done properly, and not to store a patch in FreeBSD port for ages, but to integrate the patch right in the main net-snmp repo. So, I'm asking for your help here. Waiting for a net-snmp developer to respond to this email, so that we can work on the problem together. P.S. This is doable, since native FreeBSD SNMP daemon implements mibII without utilizing kvm(3). :) A lot of this changed between 5.7.2 and 5.7.3 to use sysctl interfaces. With the current 5.7.3 release, and configured with --enable-mfd-rewrites, I think the only parts that uses kvm interfaces are the old and deprecated IPV6-MIB implementations inmibII/ipv6.c, now superseeded by the INET-XXX-MIB versions, and the hrSWRunTable that uses kvm_getargv and kvm_getprocs. /Niels -- Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net The purpose of computing is insight, not numbers -- R W Hamming -- 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