Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Nov 2005 18:11:53 GMT
From:      Victor Cruceru <soc-victor@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 86727 for review
Message-ID:  <200511131811.jADIBrS5068918@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=86727

Change 86727 by soc-victor@soc-victor_Pentium4 on 2005/11/13 18:11:27

	Integrated form CVS

Affected files ...

.. //depot/projects/soc2005/mta_bsnmp/contrib/bsnmp/snmp_mibII/mibII_interfaces.c#2 integrate
.. //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/Makefile.inc#2 integrate
.. //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_atm/Makefile#2 integrate
.. //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile#2 integrate
.. //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile#2 integrate
.. //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.c#2 integrate
.. //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_pf/Makefile#2 integrate

Differences ...

==== //depot/projects/soc2005/mta_bsnmp/contrib/bsnmp/snmp_mibII/mibII_interfaces.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Begemot: bsnmp/snmp_mibII/mibII_interfaces.c,v 1.15 2005/05/23 09:03:39 brandt_h Exp $
+ * $Begemot: bsnmp/snmp_mibII/mibII_interfaces.c,v 1.16 2005/11/02 12:07:40 brandt_h Exp $
  *
  * Interfaces group.
  */
@@ -280,8 +280,22 @@
 		break;
 
 	  case LEAF_ifOperStatus:
-		value->v.integer =
-		    (ifp->mib.ifmd_flags & IFF_RUNNING) ? 1 : 2;
+		/*
+		 * According to RFC 2863 the state should be Up if the
+		 * interface is ready to transmit packets. We takes this to
+		 * mean that the interface should be running and should have
+		 * a carrier. If it is running and has no carrier we interpret
+		 * this as 'waiting for an external event' (plugging in the
+		 * cable) and hence return 'dormant'.
+		 */
+		if (ifp->mib.ifmd_flags & IFF_RUNNING) {
+			if (ifp->mib.ifmd_data.ifi_link_state ==
+			    LINK_STATE_DOWN)
+				value->v.integer = 5;   /* state dormant */
+			else
+				value->v.integer = 1;   /* state up */
+		} else
+			value->v.integer = 2;   /* state down */
 		break;
 
 	  case LEAF_ifLastChange:

==== //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/Makefile.inc#2 (text+ko) ====

@@ -1,32 +1,7 @@
-# $FreeBSD: src/usr.sbin/bsnmpd/modules/Makefile.inc,v 1.11 2005/10/04 15:03:39 harti Exp $
+# $FreeBSD: src/usr.sbin/bsnmpd/modules/Makefile.inc,v 1.12 2005/11/10 10:14:56 harti Exp $
 
 SHLIB_MAJOR=	4
 WARNS?=		6
-INCSDIR=	${INCLUDEDIR}/bsnmp
-
-SHLIB_NAME=	snmp_${MOD}.so.${SHLIB_MAJOR}
-SRCS+=		${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
-CLEANFILES+=	${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
-CFLAGS+=	-I${CONTRIB}/lib -I${CONTRIB}/snmpd -I.
-CFLAGS+=	-DQUADFMT='"llu"' -DQUADXFMT='"llx"' -DHAVE_STDINT_H
-CFLAGS+=	-DHAVE_INTTYPES_H
-
-${MOD}_oid.h: ${MOD}_tree.def ${EXTRAMIBDEFS}
-	cat ${.ALLSRC} | gensnmptree -e ${XSYM} > ${.TARGET}
-
-.ORDER: ${MOD}_tree.c ${MOD}_tree.h
-${MOD}_tree.c ${MOD}_tree.h: ${MOD}_tree.def ${EXTRAMIBDEFS}
-	cat ${.ALLSRC} | gensnmptree -l -p ${MOD}_
-
-.if defined(DEFS)
-FILESGROUPS+=	DEFS
-.endif
-DEFSDIR=	${SHAREDIR}/snmp/defs
-
-.if defined(BMIBS)
-FILESGROUPS+=	BMIBS
-.endif
-BMIBSDIR=	${SHAREDIR}/snmp/mibs
 
 MANFILTER=	sed -e 's%@MODPATH@%${LIBDIR}/%g'		\
 		    -e 's%@DEFPATH@%${DEFSDIR}/%g'		\

==== //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_atm/Makefile#2 (text+ko) ====

@@ -1,10 +1,9 @@
-# $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_atm/Makefile,v 1.3 2005/05/25 12:04:44 harti Exp $
+# $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_atm/Makefile,v 1.4 2005/11/10 10:14:56 harti Exp $
 #
 # Author: Harti Brandt <harti@freebsd.org>
 
-CONTRIB=${.CURDIR}/../../../../contrib/bsnmp
-SNMP_ATM=${.CURDIR}/../../../../contrib/ngatm/snmp_atm
-.PATH: ${SNMP_ATM}
+CONTRIB= ${.CURDIR}/../../../../contrib/ngatm
+.PATH: ${CONTRIB}/snmp_atm
 
 MOD=	atm
 SRCS=	snmp_atm.c atm_sys.c
@@ -17,6 +16,6 @@
 
 EXTRAMIBDEFS= atm_freebsd.def
 
-CFLAGS+= -I${SNMP_ATM}
+CFLAGS+= -I${CONTRIB}/snmp_atm
 
-.include <bsd.lib.mk>
+.include <bsd.snmpmod.mk>

==== //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile#2 (text+ko) ====

@@ -1,8 +1,8 @@
-# $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile,v 1.5 2004/01/23 16:22:49 harti Exp $
+# $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile,v 1.6 2005/11/10 10:14:56 harti Exp $
 #
 # Author: Harti Brandt <harti@freebsd.org>
 
-CONTRIB=${.CURDIR}/../../../../contrib/bsnmp
+CONTRIB= ${.CURDIR}/../../../../contrib/bsnmp
 .PATH: ${CONTRIB}/snmp_mibII
 
 MOD=	mibII
@@ -13,7 +13,9 @@
 	ipForward ifIndex linkDown linkUp
 MAN=	snmp_mibII.3
 
+CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd
+
 DEFS=	${MOD}_tree.def
 INCS=	snmp_${MOD}.h
 
-.include <bsd.lib.mk>
+.include <bsd.snmpmod.mk>

==== //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile#2 (text+ko) ====

@@ -1,9 +1,7 @@
-# $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile,v 1.6 2004/01/24 20:12:30 harti Exp $
+# $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile,v 1.7 2005/11/10 10:14:56 harti Exp $
 #
 # Author: Harti Brandt <harti@freebsd.org>
 
-CONTRIB=${.CURDIR}/../../../../contrib/bsnmp
-
 MOD=	netgraph
 SRCS=	snmp_netgraph.c
 XSYM=	begemotNg
@@ -16,4 +14,4 @@
 DPADD=	${LIBNETGRAPH}
 LDADD=	-lnetgraph
 
-.include <bsd.lib.mk>
+.include <bsd.snmpmod.mk>

==== //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.c,v 1.5 2005/05/23 11:24:39 harti Exp $
+ * $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.c,v 1.6 2005/11/10 10:12:01 harti Exp $
  *
  * Netgraph interface for SNMPd.
  */
@@ -44,7 +44,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <netgraph.h>
-#include "snmpmod.h"
+#include <bsnmp/snmpmod.h>
 #include "snmp_netgraph.h"
 #include "netgraph_tree.h"
 #include "netgraph_oid.h"

==== //depot/projects/soc2005/mta_bsnmp/usr.sbin/bsnmpd/modules/snmp_pf/Makefile#2 (text+ko) ====

@@ -1,9 +1,7 @@
-# $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_pf/Makefile,v 1.1 2005/03/14 22:16:39 philip Exp $
+# $FreeBSD: src/usr.sbin/bsnmpd/modules/snmp_pf/Makefile,v 1.2 2005/11/10 10:14:57 harti Exp $
 # 
 # Author: Philip Paeps <philip@freebsd.org>
 
-CONTRIB=${.CURDIR}/../../../../contrib/bsnmp
-
 MOD=	pf
 SRCS=	pf_snmp.c
 WARNS?=	6
@@ -12,4 +10,4 @@
 DEFS=	${MOD}_tree.def
 BMIBS=	BEGEMOT-PF-MIB.txt
 
-.include <bsd.lib.mk>
+.include <bsd.snmpmod.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511131811.jADIBrS5068918>