This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
SNMP and PPP update
- From: Matt Jerdonek <maj1224 at yahoo dot com>
- To: Patches eCos <ecos-patches at sources dot redhat dot com>
- Date: Thu, 13 May 2004 09:57:27 -0700 (PDT)
- Subject: SNMP and PPP update
Attached patch correctly displays multiple interfaces
in SNMP. I also added a case for PPP.
-- Matt
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861
Index: net/snmp/agent/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/snmp/agent/current/ChangeLog,v
retrieving revision 1.27
diff -u -r1.27 ChangeLog
--- net/snmp/agent/current/ChangeLog 30 Oct 2003 19:11:35 -0000 1.27
+++ net/snmp/agent/current/ChangeLog 13 May 2004 16:47:25 -0000
@@ -1,3 +1,9 @@
+2004-05-13 Matt Jerdonek <maj1224@yahoo.com>
+
+ * src/mibgroup/mibII/interfaces.c: Add case for PPP
+ * src/mibgroup/mibII/helpers.c: Fix looping through
+ interfaces. Skip the loopback interface.
+
2003-10-09 Roland Cassebohm <roland.cassebohm@visionsystems.de>
* src/mibgroup/mibII/dot3.c: Make sure the agent responses with
Index: net/snmp/agent/current/src/mibgroup/mibII/helpers.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/snmp/agent/current/src/mibgroup/mibII/helpers.c,v
retrieving revision 1.2
diff -u -r1.2 helpers.c
--- net/snmp/agent/current/src/mibgroup/mibII/helpers.c 23 Jun 2003 10:16:38 -0000 1.2
+++ net/snmp/agent/current/src/mibgroup/mibII/helpers.c 13 May 2004 16:47:25 -0000
@@ -55,7 +55,7 @@
#include <sys/socket.h>
#include <sys/time.h>
#include <net/if.h>
-#include <net/if.h>
+#include <net/if_types.h>
/* How many interfaces are there? */
@@ -83,7 +83,12 @@
index++;
ifp = ifnet_addrs[index]->ifa_ifp;
- if_num--;
+
+ // Skip loopback interface
+ if (ifp->if_type != IFT_LOOP)
+ if_num--;
+
+ index++;
} while (if_num);
return ifp;
Index: net/snmp/agent/current/src/mibgroup/mibII/interfaces.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/snmp/agent/current/src/mibgroup/mibII/interfaces.c,v
retrieving revision 1.8
diff -u -r1.8 interfaces.c
--- net/snmp/agent/current/src/mibgroup/mibII/interfaces.c 28 Feb 2003 09:24:33 -0000 1.8
+++ net/snmp/agent/current/src/mibgroup/mibII/interfaces.c 13 May 2004 16:47:25 -0000
@@ -371,6 +371,9 @@
case IFT_PROPVIRTUAL:
strcpy( string, "(Proprietary Virtual/Internal)" );
break;
+ case IFT_PPP:
+ strcpy( string, "(Point to point interface)" );
+ break;
default:
strcpy( string, "Some shy network adaptor" );
break;