Re: Unable to compile net-snmp due to netlink API change

2024-04-03 Thread Craig Small via Net-snmp-coders
On Wed, 3 Apr 2024 at 16:05, Bart Van Assche wrote: > Something else must be going on. This is the code from configure.ac that > checks for libnl-3: > > if test "x$ac_cv_header_netlink_netlink_h" = xyes; then > AC_EGREP_HEADER([nl_socket

Re: Unable to compile net-snmp due to netlink API change

2024-04-02 Thread Bart Van Assche
right with the configure script, because it evaluates libnl-3 + !libnl-route-3 = libnl1 instead of failing. Something else must be going on. This is the code from configure.ac that checks for libnl-3:     if test "x$ac_cv_header_netlink_netlink_h" = xyes; then     AC_EGRE

Re: Unable to compile net-snmp due to netlink API change

2024-04-02 Thread Craig Small via Net-snmp-coders
On Wed, 3 Apr 2024 at 02:19, Bart Van Assche wrote: > Can you please check the configure script logs to see why libnl-3 was > not detected? > libnl-3 was detected: configure:27875: $PKG_CONFIG --exists --print-errors "libnl-3.0" configure:27878: $? = 0 configure:27936: result: yes But libnl-rout

Re: Unable to compile net-snmp due to netlink API change

2024-04-02 Thread Bart Van Assche
On 4/2/24 01:49, Craig Small via Net-snmp-coders wrote: Hello All,   I was attempting to compile the git head of net-snmp. One big change is that uses netlink sockets instead of reading /proc/net/* The issue is the API is different to the library I can see. mibgroup/mibII/tcpTable.c:631:12

Unable to compile net-snmp due to netlink API change

2024-04-02 Thread Craig Small via Net-snmp-coders
Hello All, I was attempting to compile the git head of net-snmp. One big change is that uses netlink sockets instead of reading /proc/net/* The issue is the API is different to the library I can see. mibgroup/mibII/tcpTable.c:631:12: error: too few arguments to function ‘nl_geterror’ 631

RE: tcpTable.c and Netlink Use

2015-02-04 Thread David Hauck
Hi Bart, On Tuesday, February 03, 2015 7:46 AM, Bart Van Assche wrote: > On 02/02/15 18:57, David Hauck wrote: >> I assume this is something that you can fix up in the configure script? > > The patch I had mentioned in a previous e-mail has been checked in on > the v5.6, v5.7 and master branches

Re: tcpTable.c and Netlink Use

2015-02-03 Thread Bart Van Assche
On 02/02/15 18:57, David Hauck wrote: > I assume this is something that you can fix up in the configure script? The patch I had mentioned in a previous e-mail has been checked in on the v5.6, v5.7 and master branches. If you would like to test that patch, feedback is welcome. Bart.

Re: tcpTable.c and Netlink Use

2015-02-02 Thread Bart Van Assche
ey elements I kept wondering about were: >>> 1. Whether the configure script is doing the correct thing in the >>> case where >> the build environment (toolchain) contains *both* libnl2 and libnl3 >> (so libnl2 is available directly in /usr/include/netlink and &

RE: tcpTable.c and Netlink Use

2015-02-02 Thread David Hauck
oing the correct thing in the >> case where > the build environment (toolchain) contains *both* libnl2 and libnl3 > (so libnl2 is available directly in /usr/include/netlink and > libnl3 is available in /usr/include/libnl3/netlink). >> 2. The include directory is hardcoded as

Re: tcpTable.c and Netlink Use

2015-02-01 Thread Bart Van Assche
ibnl2 and libnl3 (so > libnl2 is available directly in /usr/include/netlink and libnl3 is > available in /usr/include/libnl3/netlink). > 2. The include directory is hardcoded as /usr/include/libnl3 and I'm > wondering whether this will do the right thing in a cross-development &

RE: tcpTable.c and Netlink Use

2015-01-27 Thread David Hauck
ow), but I eventually DH> discovered that this was related >> to the fact that the system the DH> agent was running on did not >> have netlink socket diagnostics DH> configured in the kernel. When >> this is the case the netlink DH> (TCPDIAG_GETSOCK) response returns >

RE: tcpTable.c and Netlink Use

2015-01-26 Thread David Hauck
t; mib-2 and > always occurred during attempts to walk DH> TCP-MIB::tcpConnTable. At > first I thought this might be related to DH> my build of v5.7.3 'snmpd' > (see below), but I eventually DH> discovered that this was related to > the fact that the system the DH

Re: tcpTable.c and Netlink Use

2015-01-25 Thread Robert Story
t this might be related to my build of v5.7.3 'snmpd' (see below), DH> but I eventually discovered that this was related to the fact that the DH> system the agent was running on did not have netlink socket diagnostics DH> configured in the kernel. When this is the case the netlink

tcpTable.c and Netlink Use

2015-01-06 Thread David Hauck
(see below), but I eventually discovered that this was related to the fact that the system the agent was running on did not have netlink socket diagnostics configured in the kernel. When this is the case the netlink (TCPDIAG_GETSOCK) response returns an error; the v5.7.3 version of agent/mibg

[PATCH 1/3] if-mib: move netlink listening code to a separate function

2012-07-21 Thread Vincent Bernat
ar *name, unsigned long long defaultspeed); @@ -1023,42 +1021,51 @@ netsnmp_linux_interface_get_if_speed(int fd, const char *name, } return retspeed; } -#ifdef SUPPORT_PREFIX_FLAGS -void netsnmp_prefix_process(int fd, void *data); -/* Open netlink socket to watch new ipv6 addre

use netlink to trigger linkUp/linkDown notifications

2012-07-21 Thread Vincent Bernat
n't finished reviewing this yet (but will). I'm sort of thinking that using the monitor line to continue registering things via netlink is a bit odd... It would make more sense to me to handle linkup/down traps directly. The monitor/disman hack was only put in place because there

[PATCH 3/3] if-mib: don't parse netlink message just to trigger a cache reload

2012-07-21 Thread Vincent Bernat
We need to trigger a cache reload in almost all legit cases. Therefore, we can just ignore the content of the netlink message. As long as we have received one, we trigger a cache refresh. --- .../mibgroup/if-mib/data_access/interface_linux.c | 42 ++-- 1 file changed, 3

[PATCH 2/3] if-mib: use Netlink to trigger a refresh of ifTable cache

2012-07-21 Thread Vincent Bernat
, (void*)&req, sizeof(req), 0); +if (status < 0) { +snmp_log(LOG_ERR,"netsnmp_iflink_listen: send failed\n"); +close(fd); +return -1; +} + +if (register_readfd(fd, netsnmp_iflink_process, NULL) != 0) { +snmp_log(LOG_ERR,"netsnmp_if

Re: netlink

2012-07-02 Thread Stephen Hemminger
On Mon, 02 Jul 2012 07:57:47 + Bart Van Assche wrote: > On 07/01/12 11:02, Vincent Bernat wrote: > > > NetSNMP contains several use of a netlink socket to gather information > > from the kernel for Linux: > > agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.

Re: netlink

2012-07-02 Thread Vincent Bernat
❦ 2 juillet 2012 09:57 CEST, Bart Van Assche  : >> NetSNMP contains several use of a netlink socket to gather information >> from the kernel for Linux: >> agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c >> agent/mibgroup/if-mib/data_access/interface_linux

Re: netlink

2012-07-02 Thread Bart Van Assche
On 07/01/12 11:02, Vincent Bernat wrote: > NetSNMP contains several use of a netlink socket to gather information > from the kernel for Linux: > agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c > agent/mibgroup/if-mib/data_access/interface_linux.c > agent/mibgroup/ip-

netlink

2012-07-01 Thread Vincent Bernat
Hi! NetSNMP contains several use of a netlink socket to gather information from the kernel for Linux: agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c agent/mibgroup/if-mib/data_access/interface_linux.c agent/mibgroup/ip-mib/data_access/arp_netlink.c agent/mibgroup/ip-mib

[PATCH 4/4] ip-forward-mib: use netlink for linux routing

2011-02-28 Thread Stephen Hemminger
Use netlink (instead of /proc) to read route table on linux. This is more efficient and has the advantage of returning interface index not interface name which avoids lots of unnecessary lookups. Both IPv4 and IPv6 share the same code as well. This code also handles multipath and ipv6 routes

[PATCH 1/2] ip-forward-mib using netlink

2008-09-04 Thread Stephen Hemminger
Rework how route table is read to use netlink interface. This solved major performance problems when using SNMP on full gateway table (>256K routes). The old code read /proc/net/route and then looked up the mapping from name "eth0" to ifindex for each entry. Much more efficient to u

Re: NETLINK-based notifications

2008-08-18 Thread Wes Hardaker
>>>>> On Thu, 7 Aug 2008 20:35:21 -0400, lanas <[EMAIL PROTECTED]> said: l> I am aiming at integrating the NETLINK patch, submitted last l> year, to the latest version of net-snmp, in the coming two months. l> The purpose of this patch is to bring instant (relativel

NETLINK-based notifications

2008-08-07 Thread lanas
Hello all, I am aiming at integrating the NETLINK patch, submitted last year, to the latest version of net-snmp, in the coming two months. The purpose of this patch is to bring instant (relatively...) notifications when an interface is brought down/up. The patch works with a prior version of

linux netlink routing table support

2008-06-12 Thread Stephen Hemminger
In testing Vyatta router, we found snmpd gets bogged down looking up routing table. Converting the code to use netlink fixed that. http://sourceforge.net/tracker/index.php?func=detail&aid=1991406&group_id=12694&

Re: Patch to net-snmp 5.2.3-7 (debian) to provide netlink-based link state trap generation

2007-06-26 Thread Wes Hardaker
ML> My apologies ahead of time for the vintage of net-snmp that I've ML> applied this to. The patch is relatively small, and should hopefully ML> be easily adaptable to more recent versions. We appreciate the submission none the less (we'd love a more recent patch, but we will take what we can ge

Patch to net-snmp 5.2.3-7 (debian) to provide netlink-based link state trap generation

2007-06-22 Thread Michael Leslie
Greetings SNMP coders and users, Every once in a while someone complains about having to wait for the 60 second timer to elapse before getting their 'linkUpDownNotifications'. The attached patch causes snmpd to register with the linux RT-NETLINK facility in order to be notified of

Successfully triggering DISMAN monitors using NETLINK, but...

2007-05-07 Thread Michael Leslie
Greetings all, Here is the scenario: I have (lightly) modified a version of snmpd - 5.2.3 (under debian) to listen to RT-NETLINK and thereby trigger "monitor" items for link up/down status immediately instead of using the "-r " option. I now receive traps immediately

Re: linkup linkdown monitoring via netlink revisited

2007-02-10 Thread Thomas Anders
Michael Leslie wrote: > Last March, Robert Story, Peder Norgaard and some others were discussing the > possibility of having the snmp agent receive interface status directly from > the linux kernel using the netlink interface, as opposed to polling on a > relatively infrequent bas

linkup linkdown monitoring via netlink revisited

2007-02-09 Thread Michael Leslie
Greetings All, Last March, Robert Story, Peder Norgaard and some others were discussing the possibility of having the snmp agent receive interface status directly from the linux kernel using the netlink interface, as opposed to polling on a relatively infrequent basis. Has anyone had a chance