changeset 13243:259bb55df8a9

368 snmpdx is obsolete and neesd to go Reviewed by: gwr@nexenta.com Reviewed by: rbg@openrbg.com Approved by: richlowe@richlowe.net
author Garrett D'Amore <garrett@nexenta.com>
date Thu, 18 Nov 2010 10:08:59 -0800
parents 35f707bf8b40
children 664a5b7b18e3
files exception_lists/closed-bins usr/src/cmd/Makefile usr/src/cmd/Makefile.check usr/src/cmd/agents/Makefile usr/src/cmd/agents/Makefile.vars usr/src/cmd/agents/include/netmgt/netmgt_release.h usr/src/cmd/agents/include/netmgt/sea_i18n.h usr/src/cmd/agents/snmp/Makefile usr/src/cmd/agents/snmp/THIRDPARTYLICENSE usr/src/cmd/agents/snmp/THIRDPARTYLICENSE.descrip usr/src/cmd/agents/snmp/agent/Makefile usr/src/cmd/agents/snmp/agent/Makefile.com usr/src/cmd/agents/snmp/agent/access.c usr/src/cmd/agents/snmp/agent/access.h usr/src/cmd/agents/snmp/agent/agent-mapfile-vers usr/src/cmd/agents/snmp/agent/agent.c usr/src/cmd/agents/snmp/agent/agent.h usr/src/cmd/agents/snmp/agent/agent_msg.h usr/src/cmd/agents/snmp/agent/amd64/Makefile usr/src/cmd/agents/snmp/agent/conf/agent.conf usr/src/cmd/agents/snmp/agent/config.h usr/src/cmd/agents/snmp/agent/config.l usr/src/cmd/agents/snmp/agent/i386/Makefile usr/src/cmd/agents/snmp/agent/llib-lssagent usr/src/cmd/agents/snmp/agent/node.c usr/src/cmd/agents/snmp/agent/node.h usr/src/cmd/agents/snmp/agent/pagent.c usr/src/cmd/agents/snmp/agent/pagent.h usr/src/cmd/agents/snmp/agent/personal.l usr/src/cmd/agents/snmp/agent/personal.y usr/src/cmd/agents/snmp/agent/reg_subtree.c usr/src/cmd/agents/snmp/agent/reg_subtree.h usr/src/cmd/agents/snmp/agent/snmpd.c usr/src/cmd/agents/snmp/agent/snmpd.h usr/src/cmd/agents/snmp/agent/sparc/Makefile usr/src/cmd/agents/snmp/agent/sparcv9/Makefile usr/src/cmd/agents/snmp/agent/subtree.c usr/src/cmd/agents/snmp/agent/subtree.h usr/src/cmd/agents/snmp/agent/table.h usr/src/cmd/agents/snmp/mib/Makefile usr/src/cmd/agents/snmp/mib/draft-ietf-entmib-entmib-02.txt usr/src/cmd/agents/snmp/mib/em/mib_NSM.em usr/src/cmd/agents/snmp/mib/gdmo/mib_NSM.gdmo usr/src/cmd/agents/snmp/mib/gdmo/mib_NSMTYPE.asn1 usr/src/cmd/agents/snmp/mib/mib_ALARM.txt usr/src/cmd/agents/snmp/mib/mib_DM.txt usr/src/cmd/agents/snmp/mib/mib_HTTP.txt usr/src/cmd/agents/snmp/mib/mib_II.txt usr/src/cmd/agents/snmp/mib/mib_MM.txt usr/src/cmd/agents/snmp/mib/mib_MS.txt usr/src/cmd/agents/snmp/mib/mib_MTRACK.txt usr/src/cmd/agents/snmp/mib/mib_NSM.txt usr/src/cmd/agents/snmp/mib/mib_X4GRP.txt usr/src/cmd/agents/snmp/mib/mib_X4MS.txt usr/src/cmd/agents/snmp/mib/mib_X5DSA.txt usr/src/cmd/agents/snmp/mib/mib_core.txt usr/src/cmd/agents/snmp/mib/mib_demo.txt usr/src/cmd/agents/snmp/mib/mib_relay.txt usr/src/cmd/agents/snmp/mib/mib_smi.txt usr/src/cmd/agents/snmp/mib/mib_trap.txt usr/src/cmd/agents/snmp/mib/rfc1381.txt usr/src/cmd/agents/snmp/mib/rfc1382.txt usr/src/cmd/agents/snmp/mib/rfc1461.txt usr/src/cmd/agents/snmp/mib/snm/mib_ALARM.snm usr/src/cmd/agents/snmp/mib/snm/mib_X4GRP.snm usr/src/cmd/agents/snmp/mib/snm/mib_X4MS.snm usr/src/cmd/agents/snmp/mib/snm/mib_X5DSA.snm usr/src/cmd/agents/snmp/mib/snmpdx.mib usr/src/cmd/agents/snmp/parser/Makefile usr/src/cmd/agents/snmp/parser/backend.c usr/src/cmd/agents/snmp/parser/parse.c usr/src/cmd/agents/snmp/parser/parse.h usr/src/cmd/agents/snmp/snmpdemod/Makefile usr/src/cmd/agents/snmp/snmpdemod/ReadMe usr/src/cmd/agents/snmp/snmpdemod/snmpdemo.acl usr/src/cmd/agents/snmp/snmpdemod/snmpdemo.reg usr/src/cmd/agents/snmp/snmpdemod/snmpdemo.rsrc usr/src/cmd/agents/snmp/snmplib/Makefile usr/src/cmd/agents/snmp/snmplib/Makefile.com usr/src/cmd/agents/snmp/snmplib/amd64/Makefile usr/src/cmd/agents/snmp/snmplib/asn1.c usr/src/cmd/agents/snmp/snmplib/asn1.h usr/src/cmd/agents/snmp/snmplib/error.c usr/src/cmd/agents/snmp/snmplib/error.h usr/src/cmd/agents/snmp/snmplib/i386/Makefile usr/src/cmd/agents/snmp/snmplib/impl.c usr/src/cmd/agents/snmp/snmplib/impl.h usr/src/cmd/agents/snmp/snmplib/llib-lssasnmp usr/src/cmd/agents/snmp/snmplib/madman_api.c usr/src/cmd/agents/snmp/snmplib/madman_api.h usr/src/cmd/agents/snmp/snmplib/madman_trap.c usr/src/cmd/agents/snmp/snmplib/madman_trap.h usr/src/cmd/agents/snmp/snmplib/pdu.c usr/src/cmd/agents/snmp/snmplib/pdu.h usr/src/cmd/agents/snmp/snmplib/request.c usr/src/cmd/agents/snmp/snmplib/request.h usr/src/cmd/agents/snmp/snmplib/signals.c usr/src/cmd/agents/snmp/snmplib/signals.h usr/src/cmd/agents/snmp/snmplib/snmp-mapfile-vers usr/src/cmd/agents/snmp/snmplib/snmp.h usr/src/cmd/agents/snmp/snmplib/snmp_api.c usr/src/cmd/agents/snmp/snmplib/snmp_api.h usr/src/cmd/agents/snmp/snmplib/snmp_msg.h usr/src/cmd/agents/snmp/snmplib/sparc/Makefile usr/src/cmd/agents/snmp/snmplib/sparcv9/Makefile usr/src/cmd/agents/snmp/snmplib/test/Makefile usr/src/cmd/agents/snmp/snmplib/test/asn1_test.c usr/src/cmd/agents/snmp/snmplib/test/error_test.c usr/src/cmd/agents/snmp/snmplib/test/madman_api_test.c usr/src/cmd/agents/snmp/snmplib/test/madman_api_test_2.c usr/src/cmd/agents/snmp/snmplib/test/madman_trap_test.c usr/src/cmd/agents/snmp/snmplib/test/trap_test.c usr/src/cmd/agents/snmp/snmplib/trace.c usr/src/cmd/agents/snmp/snmplib/trace.h usr/src/cmd/agents/snmp/snmplib/trap.c usr/src/cmd/agents/snmp/snmplib/trap.h usr/src/cmd/agents/snmp/snmprelayd/Makefile usr/src/cmd/agents/snmp/snmprelayd/agent.c usr/src/cmd/agents/snmp/snmprelayd/agent.h usr/src/cmd/agents/snmp/snmprelayd/conf/dispatcher.conf usr/src/cmd/agents/snmp/snmprelayd/conf/snmpd.snmprelay usr/src/cmd/agents/snmp/snmprelayd/conf/snmprelayd.template usr/src/cmd/agents/snmp/snmprelayd/conf/snmpx400d.snmprelay usr/src/cmd/agents/snmp/snmprelayd/config.h usr/src/cmd/agents/snmp/snmprelayd/config.l usr/src/cmd/agents/snmp/snmprelayd/config.y usr/src/cmd/agents/snmp/snmprelayd/dispatcher.c usr/src/cmd/agents/snmp/snmprelayd/dispatcher.h usr/src/cmd/agents/snmp/snmprelayd/enterprises.oid usr/src/cmd/agents/snmp/snmprelayd/mapfile-intf usr/src/cmd/agents/snmp/snmprelayd/mib_handler.c usr/src/cmd/agents/snmp/snmprelayd/mibiisa.rsrc- usr/src/cmd/agents/snmp/snmprelayd/name.h usr/src/cmd/agents/snmp/snmprelayd/relay.conf usr/src/cmd/agents/snmp/snmprelayd/relay/relay.snmprelay usr/src/cmd/agents/snmp/snmprelayd/res.c usr/src/cmd/agents/snmp/snmprelayd/res.h usr/src/cmd/agents/snmp/snmprelayd/resource.h usr/src/cmd/agents/snmp/snmprelayd/session.c usr/src/cmd/agents/snmp/snmprelayd/session.h usr/src/cmd/agents/snmp/snmprelayd/sh_table.c usr/src/cmd/agents/snmp/snmprelayd/sh_table.h usr/src/cmd/agents/snmp/snmprelayd/snmpdx.acl usr/src/cmd/agents/snmp/snmprelayd/snmpdx.reg usr/src/cmd/agents/snmp/snmprelayd/snmpdx.rsrc usr/src/cmd/agents/snmp/snmprelayd/snmpdx.xml usr/src/cmd/agents/snmp/snmprelayd/snmpdx_agentEntry.c usr/src/cmd/agents/snmp/snmprelayd/snmpdx_appl.c usr/src/cmd/agents/snmp/snmprelayd/snmpdx_regTblEntry.c usr/src/cmd/agents/snmp/snmprelayd/snmpdx_regTreeEntry.c usr/src/cmd/agents/snmp/snmprelayd/snmpdx_stub.c usr/src/cmd/agents/snmp/snmprelayd/snmpdx_stub.h usr/src/cmd/agents/snmp/snmprelayd/snmpdx_trap.c usr/src/cmd/agents/snmp/snmprelayd/snmpdx_tree.c usr/src/cmd/agents/snmp/snmprelayd/snmprelay.appl.c usr/src/cmd/agents/snmp/snmprelayd/snmprelay_msg.h usr/src/cmd/agents/snmp/snmprelayd/subtree.c usr/src/cmd/agents/snmp/snmprelayd/subtree.h usr/src/cmd/agents/snmp/snmprelayd/svc-snmpdx usr/src/cmd/agents/snmp/trapsend/Makefile usr/src/cmd/agents/snmp/trapsend/oid.c usr/src/cmd/agents/snmp/trapsend/oid.h usr/src/cmd/agents/snmp/trapsend/trapsend.c usr/src/cmd/agents/snmp/trapsend/usage.c usr/src/cmd/agents/snmp/trapsend/usage.h usr/src/cmd/initpkg/init.d/Makefile usr/src/cmd/initpkg/init.d/init.snmpdx usr/src/pkg/manifests/SUNWllc.mf usr/src/pkg/manifests/SUNWmibii.mf usr/src/pkg/manifests/SUNWsasnm.mf usr/src/pkg/manifests/developer-library-lint.mf usr/src/pkg/manifests/driver-network-llc2.mf usr/src/pkg/manifests/service-network-snmp-mibiisa.mf usr/src/pkg/manifests/system-management-snmp-sea-sea-config.mf usr/src/pkg/manifests/system-management-snmp-sea.mf
diffstat 175 files changed, 56 insertions(+), 65140 deletions(-) [+]
line wrap: on
line diff
--- a/exception_lists/closed-bins	Mon Nov 15 20:03:27 2010 -0800
+++ b/exception_lists/closed-bins	Thu Nov 18 10:08:59 2010 -0800
@@ -1,15 +1,33 @@
+./etc/certs
 ./etc/init.d/llc2
+./etc/rc1.d
 ./etc/rc1.d/K52llc2
+./etc/rc0.d
 ./etc/rc0.d/K52llc2
+./etc/rcS.d
 ./etc/rcS.d/K52llc2
 ./etc/llc2
 ./etc/llc2/llc2_start.default
 ./etc/rc2.d/S40llc2
+./etc/snmp
+./etc/snmp/conf
+./etc/snmp/conf/mibiisa.reg
+./etc/snmp/conf/snmp.conf
+./lib/crypto
 ./lib/crypto/kcfd
 ./lib/libc_i18n.a
 ./lib/amd64/libc_i18n.a
 ./lib/sparcv9/libc_i18n.a
+./usr/has
+./usr/has/bin
 ./usr/has/bin/patch
+./usr/kernel
+./usr/kernel/strmod
+./usr/kernel/strmod/amd64
+./usr/kernel/strmod/sparcv9
+./usr/kernel/drv
+./usr/kenrel/drv/amd64
+./usr/kenrel/drv/sparcv9
 ./usr/kernel/drv/amd64/llc2
 ./usr/kernel/drv/sparcv9/llc2
 ./usr/kernel/drv/llc2.conf
@@ -37,12 +55,16 @@
 ./usr/lib/localedef/src/iso_8859_1/charmap.src
 ./usr/lib/localedef/src/iso_8859_1/extension.src
 ./usr/lib/localedef/src/iso_8859_1/localedef.src
+./usr/lib/snmp
+./usr/lib/snmp/mibiisa
 ./usr/bin/kbdcomp
 ./usr/bin/localedef
 ./usr/bin/od
 ./usr/bin/printf
 ./usr/bin/tr
 ./usr/bin/tail
+./usr/platform/i86pc
+./usr/platform/i86pc/lib
 ./usr/xpg4/bin/alias
 ./usr/xpg4/bin/bg
 ./usr/xpg4/bin/cd
@@ -64,4 +86,10 @@
 ./usr/xpg4/bin/umask
 ./usr/xpg4/bin/unalias
 ./usr/xpg4/bin/wait
+./usr/xpg6
+./usr/xpg6/bin
 ./usr/xpg6/bin/tr
+./var
+./var/snmp
+./var/snmp/mib
+./var/snmp/mib/sun.mib
--- a/usr/src/cmd/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/cmd/Makefile	Thu Nov 18 10:08:59 2010 -0800
@@ -45,7 +45,6 @@
 	platexec
 
 COMMON_SUBDIRS=		\
-	agents		\
 	allocate	\
 	availdevs	\
 	lp		\
--- a/usr/src/cmd/Makefile.check	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/cmd/Makefile.check	Thu Nov 18 10:08:59 2010 -0800
@@ -77,7 +77,6 @@
 	zoneadmd
 
 MANIFEST_SUBDIRS=			\
-	agents/snmp/snmprelayd		\
 	boot/scripts			\
 	cmd-crypto/scripts		\
 	cmd-inet/usr.lib/ilbd		\
--- a/usr/src/cmd/agents/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-# cmd/agents/Makefile
-
-#########################################################
-#
-# Makefile for the Solstice Enterprise Agent
-#
-# Targets:
-#	all - compile everything
-#	install - create installation directories and copy files
-#	package - create packages in installation directory
-#	clean - remove all intermediate files
-#	clobber - make clean plus removing deliverable files
-#	lint - run lint on the source files
-#
-#########################################################
-
-# OPTIONAL_INCLUDE_FILE:sh = /bin/sh misc.sh ../Makefile.cmd
-# include $(OPTIONAL_INCLUDE_FILE)
-
-include $(SRC)/cmd/Makefile.cmd
-
-# Use $TARG_SYS for OS dependent variables
-#
-# TARG_SYS gets defined as SVR4 or SUNOS
-#
-TARG_SYS:sh =                           \
- (                                      \
-   UNAME=` uname -r 2>/dev/null` ||.;   \
-   case $UNAME in                       \
-   '') echo SUNOS;;                     \
-   4.*) echo SUNOS;;                    \
-   5.*) echo SVR4;;                     \
-   A.09.*) echo HPUX9;;                 \
-   *)  echo SVR4;;                      \
-   esac                                 \
- )
-
-ROOTDIR	: sh=echo ${ROOTDIR:-"`pwd`"}
-PKGLOC	: sh=echo ${PKGLOC:-'${ROOTDIR}/PACKAGES.`uname -p`'}
-
-$(CLOSED_BUILD)AGENTS= $(CLOSED)/cmd/agents/agents
-
-all	:=		TARGET = all
-clean	:=		TARGET = clean
-install	:=		TARGET = install
-lint	:=		TARGET = lint
-clobber :=		TARGET = clobber
-
-SUBDIRS = snmp $(AGENTS)
-
-#
-# all
-#
-
-all: $(SUBDIRS)
-
-$(SUBDIRS): FRC
-	@cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
-
-DIRMODE=	0755
-ROOTVAR=	$(ROOT)/var
-
-ROOTDIRS=	$(ROOTETC)/snmp \
-		$(ROOTETC)/snmp/conf \
-		$(ROOTLIB)/snmp \
-		$(ROOTBIN) \
-		$(ROOTVAR)/snmp \
-		$(ROOTVAR)/snmp/mib
-
-$(ROOTDIRS):
-	$(INS.dir)
-
-#
-# Need a "make install" target for integrating into Solaris 2.6.
-#
-
-install: $(ROOTDIRS) $(SUBDIRS)
-
-#
-# clean
-#
-
-clean: $(SUBDIRS)
-
-clobber: $(SUBDIRS)
-
-# Need a lint target for Solaris2.6 integration.
-
-lint:  $(SUBDIRS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/agents/Makefile.vars	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-
-#ident	"%Z%%M%	%I%	%E% SMI"
-
-BIN		= bin$(TARGET_ARCH)
-LDFLAGS		+= -g $(LDLIBS)
-
-#
-#	Compiler selection
-#
-TARG_SYS:sh =                                   \
- (                                              \
-   UNAME=` uname -r 2>/dev/null` ||.;           \
-   case $UNAME in                               \
-   '') echo SUNOS;;                             \
-   4.*) echo SUNOS;;                            \
-   5.*) PNAME=`uname -p 2>/dev/null` ||.;       \
-        case $PNAME in                          \
-        '') echo SVR4;;                         \
-        i386) echo INTEL;;                      \
-        *) echo SVR4;;                          \
-        esac;;                                  \
-   *)  echo SVR4;;                              \
-   esac                                         \
- )
-
-CCC += -norunpath -nolib
-
-SVR4_STRIP= /usr/ccs/bin/strip
-INTEL_STRIP= /usr/ccs/bin/strip
-SUNOS_STRIP=/bin/strip
-_STRIP=$(SVR4_STRIP)
-STRIP=$($(TARG_SYS)_STRIP)
-
-SVR4_SNMHOME=/opt/SUNWconn/snm
-INTEL_SNMHOME=
-SUNOS_SNMHOME=/usr/snm
-_SNMHOME=$(SVR4_SNMHOME)
-SNMHOME=$($(TARG_SYS)_SNMHOME)
-
-#
-#	Misc Tools
-#
-
-TEST	 = test
-
--- a/usr/src/cmd/agents/include/netmgt/netmgt_release.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#if !defined(lint) && !defined(NOID)
-#ifdef SVR4
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-#endif
-#endif
-
-#ifndef lint
-#ifndef _release_h
-#define _release_h
-
-static char product_name[]="Product:Site/Domain/SunNet Manager" ;
-#ifdef SVR4
-#ifdef i386
-static char release[]="Release:2.3 FCS - Solaris X86" ;
-#else
-static char release[]="Release:2.3 FCS - Solaris 2" ;
-#endif
-#else
-static char release[]="Release:2.3 FCS - Solaris 1" ;
-#endif
-#endif /* _release_h */
-#endif /* lint */
--- a/usr/src/cmd/agents/include/netmgt/sea_i18n.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/* Copyright 1996 Sun Microsystems, Inc. All Rights Reserved. */
-
-
-#ifndef sea_1_0_i18n_h
-#define sea_1_0_i18n_h
-
-
-#include <sys/param.h>
-#include <locale.h>
-#include <libintl.h>
-
-#define SEA_LOCALE_PATH	"/opt/SUNWconn/snm/lib/locale"
-
-#define DOMAIN_LGET	"SUNW_SEA_LABELS"
-#define DOMAIN_MGET	"SUNW_SEA_MESSAGES"
-#define DOMAIN_SGET	"SUNW_SEA_SCHEMAS"
-#define DOMAIN_LIBGET	"SUNW_SEA_LIBRARIES"
-#define DOMAIN_FGET	"SUNW_SEA_FORMATS"
-
-
-#define LGET(s)            (char *) dgettext(DOMAIN_LGET,  s)
-#define MGET(s)            (char *) dgettext(DOMAIN_MGET,    s)
-#define MGET(s)            (char *) dgettext(DOMAIN_MGET,    s)
-#define SGET(s)            (char *) dgettext(DOMAIN_SGET, s)
-#define LIBGET(s)          (char *) dgettext(DOMAIN_LIBGET,    s)
-#define FGET(s)		   (char *) dgettext(DOMAIN_FGET,    s)
-
-
-#define I18N_KEY           628323
-
-#endif /* sea_1_0_i18n_h*/
-
--- a/usr/src/cmd/agents/snmp/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-
-SUBDIRS=	snmplib \
-		agent \
-		parser \
-		snmprelayd \
-		trapsend \
-		mib
-
-
-all :=		TARGET= all
-install :=	TARGET= install
-clean :=	TARGET= clean
-clobber :=	TARGET= clobber
-lint :=		TARGET= lint
-
-all install clean clobber lint: $(SUBDIRS)
-
-$(SUBDIRS):	FRC
-	@cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
-
--- a/usr/src/cmd/agents/snmp/THIRDPARTYLICENSE	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-	Copyright 1988, 1989, 1991, 1992 by Carnegie Mellon University
-
-                      All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of CMU not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
--- a/usr/src/cmd/agents/snmp/THIRDPARTYLICENSE.descrip	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-PORTIONS OF SNMP FUNCTIONALITY
--- a/usr/src/cmd/agents/snmp/agent/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/Makefile.cmd
-
-SUBDIRS=	$(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
-
-all :=          TARGET= all
-install :=      TARGET= install
-clean :=        TARGET= clean
-clobber :=      TARGET= clobber
-lint :=         TARGET= lint
-install_h :=    TARGET= install_h
-
-all install clean clobber lint: $(SUBDIRS)
-
-$(SUBDIRS):	FRC
-	@cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/agents/snmp/agent/Makefile.com	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-LIBRARY =	libssagent.a
-VERS =		.1
-SRCOBJS =	node.o access.o agent.o snmpd.o pagent.o subtree.o reg_subtree.o
-OBJECTS =	$(SRCOBJS) personal.o
-
-include $(SRC)/lib/Makefile.lib
-
-LIBS =		$(DYNLIB) $(LINTLIB)
-SRCS = 		$(SRCOBJS:%.o=$(SRCDIR)/%.c) personal.c
-
-$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
-LDLIBS +=	-lssasnmp -lc -lsocket -lnsl
-
-CLEANFILES +=	personal.c personal.lex.c
-
-MAPFILES =	../agent-mapfile-vers 
-
-CPPFLAGS =	-I. -I.. -I../../snmplib $(CPPFLAGS.master)
-LINTFLAGS64 +=	-errchk=longptr64
-#
-# This library has references to hooks that are defined by the programs
-# that link with it; need to turn off -zdefs.
-#
-ZDEFS =
-
-.KEEP_STATE:
-
-all: $(LIBS)
-
-personal.c: ../personal.y
-	$(YACC.y) ../personal.y
-	$(MV) y.tab.c personal.c
-
-personal.lex.c: ../personal.l
-	$(LEX.l) ../personal.l > personal.lex.c
-
-pics/personal.o: personal.c personal.lex.c
-	$(COMPILE.c) -o pics/personal.o personal.c
-	$(POST_PROCESS_O)
-
-lint: lintcheck
-
-include $(SRC)/lib/Makefile.targ
--- a/usr/src/cmd/agents/snmp/agent/access.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1054 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "asn1.h"
-#include "snmp.h"
-#include "trap.h"
-
-#include "agent_msg.h"
-#include "access.h"
-
-#define WILD_CARD_HOST_NAME	"*"
-#define WILD_CARD_ADDRESS 0
-
-#define MAX_BUF_SIZE 256
-
-/***** STATIC VARIABLES *****/
-
-static Manager *first_manager = NULL;
-static Community *first_community = NULL;
-
-static EFilter *first_efilter = NULL;
-
-static NameOidPair *first_name_oid_pair = NULL;
-
-
-void init_manager_set ()
-{
-	first_community = NULL;	/* TODO: check this out */
-	first_manager = NULL;
-}
-
-void set_first_manager (Manager *mgr)
-{
-	first_manager = mgr;
-}
-
-Manager * get_curr_manager_set ()
-{
-	return first_manager;
-}
-
-/***********************************************************/
-
-/*
- *	returns	0 if OK
- *		1 if error
- *		-1 if fatal error
- */
-
-Manager* manager_add(char *name, char *error_label)
-{
-	IPAddress ip_address;
-	Manager *new;
-	Manager *m;
-
-
-	error_label[0] = '\0';
-
-
-	if(name == NULL)
-	{
-		(void)sprintf(error_label, "BUG: manager_add(): name is NULL");
-		return NULL;
-	}
-
-
-	/* skip the ip adx for wild-card host */
-
-	if(strcmp(name,WILD_CARD_HOST_NAME)){
-		/* try to find the IP address from the name */
-		if(name_to_ip_address(name, &ip_address, error_label))
-		{
-			return NULL;
-		}
-	}
-
-
-	/* checking for dup is on the wild-card host name */
-
-
-	/* check if this manager does not already exist */
-	if(strcmp(name,WILD_CARD_HOST_NAME)){
-		for(m = first_manager; m; m = m->next_manager)
-		{
-			if(ip_address.s_addr == m->ip_address.s_addr)
-			{
-				(void)sprintf(error_label, ERR_MSG_MANAGER_DUP, name);
-				return m;
-			}
-		}
-	}else{
-		for(m = first_manager; m; m = m->next_manager)
-		{
-			if(!strcmp(m->name,name))
-			{
-				return m;
-			}
-		}
-	}
-
-
-	/* allocate, initialize and link the new manager */
-	new = (Manager *) calloc(1,sizeof(Manager));
-	if(new == NULL)
-	{
-		(void)sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	new->next_manager = NULL;
-	new->name = NULL;
-
-	new->name = strdup(name);
-	if(new->name == NULL)
-	{
-		(void)sprintf(error_label, ERR_MSG_ALLOC);
-		free(new);
-		return NULL;
-	}
-
-	/* ip adx for wild-card host should be zero */
-
-	if(strcmp(name,WILD_CARD_HOST_NAME)){
-		new->ip_address.s_addr = ip_address.s_addr;
-	}else{
-		new->ip_address.s_addr = WILD_CARD_ADDRESS;
-		
-	}
-
-	new->next_manager = first_manager;
-	first_manager = new;
-
-
-	return new;
-}
-
-/***********************************************************/
-
-/*
- * returns a pointer to the manager if the request succeeds,
- * otherwise returns NULL
- */
-
-Manager *is_valid_manager(Address *address, Manager **mngr)
-{
-        Manager *m;
-
-        *mngr = NULL;
-
-        if(address == NULL)
-        {
-                error("BUG: is_valid_manager(): address is NULL");
-                return NULL;
-        }
-
-        if(first_manager == NULL)
-        {
-                return NULL;
-        }
-
-        for(m = first_manager; m; m = m->next_manager)
-        {
-                if(address->sin_addr.s_addr == m->ip_address.s_addr)
-                {
-                        *mngr = m;
-                        return m;
-                }
-        }
-
-        /* check for wild-card host */
-        for(m = first_manager; m; m = m->next_manager)
-        {
-                if(!strcmp(m->name,WILD_CARD_HOST_NAME)){
-                        *mngr = m;
-                        return m;
-                }
-        }
-
-        return m;
-}
-
-/***********************************************************/
-
-void delete_manager_list()
-{
-	Manager *next;
-
-
-	while(first_manager)
-	{
-		next = first_manager->next_manager;
-
-		if(first_manager->name)
-		{
-			free(first_manager->name);
-		}
-
-		free(first_manager);
-
-		first_manager = next;
-	}
-
-	first_manager = NULL;
-}
-
-void manager_list_free(Manager *mngr)
-{
-	Manager *next;
-
-
-	while(mngr)
-	{
-		next = mngr->next_manager;
-
-		if(mngr->name)
-		{
-			free(mngr->name);
-		}
-
-		free(mngr);
-
-		mngr = next;
-	}
-
-	mngr = NULL;
-}
-
-void sub_member_free(SubMember *mem)
-{
-  Manager *mngr;
-
-  if(mem==NULL) return;
-  mem->count--;
-  if(mem->count<0){
-  	mngr = mem->first_manager;
-  	manager_list_free(mngr);
-  	if(mem->community_string != NULL) free(mem->community_string);
-  	free(mem);  
-  }
-}
-
-void sub_group_list_free(SubGroup *group)
-{
-	SubGroup *next;
-
-
-	while(group)
-	{
-		next = group->next_sub_group;
-
-		if(group->first_sub_member != NULL)
-		{
-			sub_member_free(group->first_sub_member);
-		}
-
-		free(group);
-
-		group = next;
-	}
-
-}
-
-void trap_slot_list_free(TrapSlot *slot)
-{
-	TrapSlot *next;
-
-
-	while(slot)
-	{
-		next = slot->next_trap_slot;
-		if(slot->first_sub_group != NULL)
-		{
-			sub_group_list_free(slot->first_sub_group);
-		}
-
-		free(slot);
-
-		slot = next;
-	}
-
-}
-
-
-void delete_efilter_list()
-{
-	EFilter *next;
-
-
-	while(first_efilter)
-	{
-		next = first_efilter->next_efilter;
-
-		if(first_efilter->name)
-		{
-			free(first_efilter->name);
-		}
-
-		free(first_efilter);
-
-		first_efilter = next;
-	}
-
-	first_efilter = NULL;
-}
-
-/***********************************************************/
-
-void trace_managers()
-{
-	Manager *m;
-	AccessServer *as;
-
-	trace("MANAGERS:\n");
-	trace("---------\n");
-	for(m = first_manager; m; m = m->next_manager)
-	{
-		trace("%-30s %-20s\n",
-			m->name,
-			!strcmp(m->name,WILD_CARD_HOST_NAME)?
-			"0":inet_ntoa(m->ip_address)   );
-		for(as=m->first_acc_server;as;as=as->next_acc_server)
-			trace_access_server(as);
-		
-	}
-	trace("\n");
-}
-
-
-/***********************************************************/
-
-/*
- *	returns	0 if OK
- *		1 if error
- *		-1 if fatal error
- */
-
-int community_add(char *name, int type, char *error_label)
-{
-	int ret;
-	Community *new;
-	Community *c;
-	Community *last = NULL;
-
-
-	error_label[0] = '\0';
-
-	if(name == NULL)
-	{
-		(void)sprintf(error_label, "BUG: community_add(): name is NULL");
-		return -1;
-	}
-
-	if(name[0] == '\0')
-	{
-		(void)sprintf(error_label, "BUG: community_add(): name is empty");
-		return -1;
-	}
-
-	if( (type != READ_ONLY) && (type != READ_WRITE) )
-	{
-		(void)sprintf(error_label, "BUG: community_add(): bad type (%d)", type);
-		return -1;
-	}
-
-	for(c = first_community; c; c = c->next_community)
-	{
-		ret = strcmp(name, c->name);
-		if(ret > 0)
-		{
-			break;
-		}
-		else
-		if(ret == 0)
-		{
-			(void)sprintf(error_label, ERR_MSG_COMMUNITY_DUP, name);
-			return 1;
-		}
-
-		last = c;
-	}
-
-	new = (Community *) calloc(1,sizeof(Community));
-	if(new == NULL)
-	{
-		(void)sprintf(error_label, ERR_MSG_ALLOC);
-		return -1;
-	}
-	new->next_community = NULL;
-	new->name = NULL;
-
-	new->name = strdup(name);
-	if(new->name == NULL)
-	{
-		(void)sprintf(error_label, ERR_MSG_ALLOC);
-		free(new);
-		return -1;
-	}
-
-	new->type = type;
-
-	if(last)
-	{
-		last->next_community = new;
-	}
-	else
-	{
-		first_community = new;
-	}
-	new->next_community = c;
-
-
-	return 0;
-}
-
-int get_access_type(Manager *mngr,char *name)
-{
-  AccessServer *as;
-  AccessPolicy *ap;
-  Community *comm;
-  
-  if(name==NULL || mngr==NULL) return NULL;
-  for(as=mngr->first_acc_server;as;as=as->next_acc_server)
-  {
-    if((ap=as->first_acc_policy)!=NULL)
-	for(comm=ap->first_community;comm;comm=comm->next_community)
-		if(comm->name!=NULL && !strcmp(name,comm->name))
-			return ap->access_type;
-  }
-  return -1;
-}
-
-
-/***********************************************************/
-
-/* returns True or False        */
-
-int is_valid_community(char *name, int type, Manager *mngr)
-{
-	int access_type;
-
-
-	if(name == NULL)
-	{
-		error("BUG: is_valid_community(): name is NULL");
-		return False;
-	}
-
-	if( (type != GETNEXT_REQ_MSG )
-		&& (type != GET_REQ_MSG)
-		&& (type != SET_REQ_MSG) )
-	{
-		error("BUG: is_valid_community(): bad type(0x%x)", type);
-		return False;
-	}
-
-  	if(mngr==NULL)  return True; /* accept reqs from any hosts */
-
-	if(mngr->first_acc_server!=NULL){
-		if( (access_type = get_access_type(mngr,name)) == -1)
-			return False;
-	}
-
-	if(type != SET_REQ_MSG)
-	{
-		return True;
-	}
-	else
-	{
-		if(access_type == READ_WRITE)
-		{
-			return True;
-		}
-		else
-		{
-			return False;
-		}
-	}
-
-}
-
-
-/***********************************************************/
-
-void delete_community_list()
-{
-	Community *next;
-
-
-	while(first_community)
-	{
-		next = first_community->next_community;
-
-		if(first_community->name)
-		{
-			free(first_community->name);
-		}
-
-		free(first_community);
-
-		first_community = next;
-	}
-
-	first_community = NULL;
-}
-
-
-/***********************************************************/
-
-void trace_access_server(AccessServer *as)
-{
-  AccessPolicy *ap;
-
-  if(as==NULL) return;
-  if( (ap=as->first_acc_policy)!=NULL )
-	trace_access_policy(ap);
-}
-
-void trace_access_policy(AccessPolicy *ap)
-{
-  Community *c;
-
-  if(ap==NULL) return;
-  trace("\tCOMMUNITIES(");
-  switch(ap->access_type)
-  {
-	case READ_ONLY:
-		trace("%s", "READ_ONLY");
-		break;
-	case READ_WRITE:
-		trace("%s", "READ_WRITE");
-		break;
-  }
-  trace("): ");
-  for(c=ap->first_community;c;c=c->next_community)
-	trace_communities(c);
-  trace("\n");
-}
-
-void trace_communities(Community *c)
-{
-
-
-	trace(" %s", c->name);
-}
-
-
-/***********************************************************/
-void community_list_free(Community *comm)
-{
-	Community *next;
-
-
-	while(comm)
-	{
-		next = comm->next_community;
-
-		if(comm->name)
-		{
-			free(comm->name);
-		}
-
-		free(comm);
-
-		comm = next;
-	}
-
-	comm = NULL;
-}
-
-void access_policy_list_delete(AccessPolicy *ap)
-{
-  if(ap==NULL) return;
-  ap->count--;
-  if(ap->count<=0){ 
-  	free(ap);
-  }
-}
-
-void access_policy_list_free(AccessPolicy *ap)
-{
-  if(ap==NULL) return;
-  ap->count--;
-  if(ap->count<=0){ 
-  	community_list_free(ap->first_community);
-  	free(ap);
-  }
-}
-
-void access_server_delete(AccessServer *as)
-{
-  if(as==NULL) return;
-  access_policy_list_delete(as->first_acc_policy);
-  free(as);
-}
-
-void access_server_free(AccessServer *as)
-{
-  if(as==NULL) return;
-  access_policy_list_free(as->first_acc_policy);
-  free(as);
-}
-
-void agent_manager_list_free(Manager *mgr)
-{
-	Manager *nextmgr;
-	AccessServer *as, *last=NULL;
-
-	if (mgr == NULL)
-		return;
-
-	while(mgr)
-	{
-		nextmgr = mgr->next_manager;
-
-		as = mgr->first_acc_server;
-		while (as) {
-			last = as->next_acc_server;
-			access_server_delete(as);
-			as = last;
-		}
-
-		if(mgr->name)
-			free(mgr->name);
-
-		free(mgr);
-
-		mgr = nextmgr;
-	}
-
-	mgr = NULL;
-}
-
-void access_server_add_tail(Manager* mngr, AccessServer *acc_server)
-{
-  AccessServer *as, *last=NULL;
-
-  if(mngr==NULL || acc_server==NULL) return;
-  for(as=mngr->first_acc_server;as;as=as->next_acc_server)
-	last = as;
-
-  if(last==NULL){
-	mngr->first_acc_server = acc_server;
-  }else{
-	last->next_acc_server = acc_server;
-  }
-  acc_server->next_acc_server = NULL;
-  acc_server->attached = TRUE;
-}
-
-void community_attach(AccessPolicy *ap, Community *comm)
-{
-  if(ap==NULL || comm==NULL) return;
-  if(ap->first_community==NULL)
-	ap->first_community = comm;
-  else{
-	comm->next_community = ap->first_community;
-	ap->first_community = comm;
-  }
-}
-  
-		
-EFilter* efilter_add(char *name, char *error_label)
-{
-	EFilter *new;
-	EFilter *m;
-
-
-	error_label[0] = '\0';
-
-
-	if(name == NULL)
-	{
-		(void)sprintf(error_label, "BUG: efilter_add(): name is NULL");
-		return NULL;
-	}
-
-
-	for(m = first_efilter; m; m = m->next_efilter)
-	{
-		if(!strcmp(m->name,name))
-		{
-			return m;
-		}
-	}
-
-
-	/* allocate, initialize and link the new efilter */
-	new = (EFilter *) calloc(1,sizeof(EFilter));
-	if(new == NULL)
-	{
-		(void)sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	new->next_efilter = NULL;
-	new->name = NULL;
-
-	new->name = strdup(name);
-	if(new->name == NULL)
-	{
-		(void)sprintf(error_label, ERR_MSG_ALLOC);
-		free(new);
-		return NULL;
-	}
-
-	new->enterprise = enterprise_name_to_oid(new->name);
-
-	new->next_efilter = first_efilter;
-	first_efilter = new;
-
-	return new;
-}
-
-TrapSlot* trap_slot_add(int num,EFilter *efilter,char *error_label)
-{
-	TrapSlot *new;
-	TrapSlot *m;
-
-
-	if(efilter==NULL) return NULL;
-	if(num < 0)
-	{
-		(void)sprintf(error_label, "BUG: trap_slot_add(): name is NULL");
-		return NULL;
-	}
-
-
-	for(m = efilter->first_trap_slot; m; m = m->next_trap_slot)
-	{
-		if(m->num == num)
-		{
-			return m;
-		}
-	}
-
-
-	/* allocate, initialize and link the new efilter */
-	new = (TrapSlot *) calloc(1,sizeof(TrapSlot));
-	if(new == NULL)
-	{
-		(void)sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	new->num = num;
-	new->next_trap_slot = efilter->first_trap_slot;
-	efilter->first_trap_slot = new;
-
-	return new;
-}
-
-void sub_group_add_tail(TrapSlot *slot, SubGroup *group)
-{
-  SubGroup *sg, *last =NULL;
-
-  if(slot==NULL || group==NULL) return;
-  for(sg=slot->first_sub_group;sg;sg=sg->next_sub_group)
-	last = sg;
-
-  if(last==NULL){
-	slot->first_sub_group = group;
-  }else{
-	last->next_sub_group = group;
-  }
-  group->next_sub_group = NULL;
-}
-
-void mem_filter_join(int low, int high,SubMember *mem,EFilter *filter)
-{
-  /* find the trap slot in the filter */
-  /* create subgroup, attach submember to subgroup */
-  /* insert subgroup into the trap slot */
-
-  int idx;
-  TrapSlot *slot;
-  SubGroup *group;
-
-  if(low<0 || high<0 || filter==NULL || mem==NULL) return;
-  for(idx=low;idx<=high;idx++){
-	slot = trap_slot_add(idx,filter,error_label);
-	if(slot==NULL) continue;
-	group = calloc(1,sizeof(SubGroup));
-	if(group==NULL){
-		error("malloc() failed");
-	}
-        /* The efilter list may contain duplicate entries because
-           the agent ACL file may be read several times. This seems
-           to be necessary to mantain other functionality in the ACL
-           such as specifying managers. The following hack makes sure
-           the trap is sent to each host only by not allowing duplicate
-           members in an efilter.
-        */
-        if (slot->first_sub_group == NULL) {	/* always add initial first_sub_group */
-		sub_group_add_tail(slot,group);
-		group->first_sub_member = mem;
-		mem->count++;
-        }else {                                 /* at least one sub_group exists  */ 
-                if (strcmp(slot->first_sub_group->first_sub_member->first_manager->name,  
-                           mem->first_manager->name)) {  /* check for duplicate member */ 
-                                  sub_group_add_tail(slot,group);
-                                  group->first_sub_member = mem;
-                                  mem->count++; 
-                } else    /* don't add duplicate  */
-                      free(group);
-        }
-  }
-}
-
-static void trace_hosts(Manager *mngr)
-{
-   Manager *m;
-
-   for(m=mngr;m;m=m->next_manager){
-	trace("\t\t%s %s\n",
-			m->name,
-			inet_ntoa(m->ip_address));
-   }
-}
-
-static void trace_sub_member(SubMember *mem)
-{
-  if(mem==NULL) return;
-  if(mem->community_string != NULL)
-  	trace("\tcommunity-string: %s\n",mem->community_string);
-  trace_hosts(mem->first_manager);
-}
-
-static void trace_sub_group(SubGroup *group)
-{
-  if(group==NULL) return;
-  trace_sub_member(group->first_sub_member);
-}
-
-static void trace_trap_slot(TrapSlot *slot)
-{
-  SubGroup *group;
-
-  if(slot==NULL) return;
-  trace("\ttrap-num=%d",slot->num);
-  for(group=slot->first_sub_group;group;group=group->next_sub_group)
-  	trace_sub_group(group);
-}
-
-void trace_filter()
-{
-  EFilter *filter;
-  TrapSlot *slot;
-
-  trace("#EFILTER:\n");	
-  for(filter=first_efilter;filter;filter=filter->next_efilter)
-  {
-	trace("enterprise=\"%s\"\n",filter->name);
-	for(slot=filter->first_trap_slot;slot;slot=slot->next_trap_slot)
-		trace_trap_slot(slot);
-  }
-  trace("\n");
-}
-
-/**** Enterprise related functions *****/
-
-void trace_name_oid_pair()
-{
-  NameOidPair *np;
-
-  trace("NAME_OID_PAIR:\n");
-  for(np=first_name_oid_pair;np;np=np->next)
-        trace("name: %s oid: %s\n",np->name,SSAOidString(np->oid));
-  trace("\n");
-}
-
-Oid *enterprise_name_to_oid(char *name)
-{
-  NameOidPair *np;
-
-  if(name == NULL) return NULL;
-  for(np=first_name_oid_pair;np;np=np->next){
-        if(np->name!=NULL && !strcmp(name,np->name))
-                return np->oid;
-  }
-  return NULL;
-}
-
-static NameOidPair* set_name_and_oid_pair(char *inbuf)
-{
-        char *str;
-        char *name_str, *oid_str;
-        Oid  *oid = NULL;
-	NameOidPair *np;
-
-        if ((inbuf== NULL) || (inbuf[0]== '#')) return NULL;
-
-        /* first "  for name */
-        if ((str = strchr(inbuf, '"')) == NULL) return NULL;
-        str++;
-        name_str = str;
-
-                /* second " for name */
-        if ((str = strchr(str, '"')) == NULL) return NULL;
-        *str = '\0';
-
-        str++;
-        /* first " for oid_str*/
-        if ((str = strchr(str, '"')) == NULL)  return NULL;
-        str++;
-        oid_str = str;
-
-        /* second " for oid_str*/
-        if ((str = strchr(str, '"')) == NULL) return NULL;
-        *str = '\0';
-        oid = SSAOidStrToOid(oid_str,error_label);
-
-	np = calloc(1,sizeof(NameOidPair));	
-	if(np==NULL){
-	  error("calloc failed");
-	  return NULL;
-	}
-	np->oid = oid;
-	np->name = strdup(name_str);
-
-	if (np->name == NULL) {
-		free(np);
-		return(NULL);
-	}
-
-	return np;
-}
-
-static void insert_name_oid_pair(char *name_str,char* oid_str)
-{
-  char inbuf[MAX_BUF_SIZE];
-  NameOidPair *np;
-
-   (void)sprintf(inbuf,"\"%s\"   \"%s\"\n",name_str,oid_str);
-   if( (np=set_name_and_oid_pair(inbuf)) != NULL){
-		np->next = first_name_oid_pair;
-		first_name_oid_pair = np;
-   }
-}
-
-void load_enterprise_oid(char* filename)
-{
-  FILE *fd;
-  char inbuf[MAX_BUF_SIZE];
-  NameOidPair *np;
-
-  if(filename==NULL) return;
-  fd = fopen(filename,"r");
-  if(fd==NULL){
-	error("can open the file %s",filename);
-	return;
-  }
-  while(fgets(inbuf,MAX_BUF_SIZE,fd)){
-	if( (np=set_name_and_oid_pair(inbuf)) != NULL){
-	/* insert np */
-		np->next = first_name_oid_pair;
-		first_name_oid_pair = np;
-	}
-  }
-  /* insert a couple of extra name-oid pairs:
-	sun, snmp
-   */
-	insert_name_oid_pair("snmp", "1.3.6.1.2.1.11");
-	insert_name_oid_pair("sun", "1.3.6.1.4.1.42.2.1.1");
-
-  (void)fclose(fd);
-}
-
-static EFilter* find_efilter(Oid* oid)
-{
-  EFilter *filter;
-
-  for(filter=first_efilter;filter;filter=filter->next_efilter)
-  {
-	if(SSAOidCmp(filter->enterprise,oid)==0) return filter;
-  }
-  return NULL;
-}
-
-static TrapSlot* find_trap_slot(int num,EFilter *filter)
-{
-  TrapSlot *slot;
-
-  for(slot=filter->first_trap_slot;slot;slot=slot->next_trap_slot)
-	if(slot->num==num) return slot;
-  return NULL;
-}
-
-void trap_filter_action(Oid *oid,int generic,int specific,
-        uint32_t time_stamp,SNMP_variable *variables)
-{
-  EFilter *filter;
-  TrapSlot *slot;
-  SubGroup *group;
-  Manager *manager;
-  static Subid snmp_subids[] = {1,3,6,1,2,1,11};
-  static Oid snmp_oid = {snmp_subids, 7};
-  int trap_num;
-  IPAddress my_ip_address;
-
-  (void)memset(&my_ip_address, 0, sizeof(IPAddress));
-
-  if(oid==NULL) return;
-  if( (filter=find_efilter(oid))==NULL ) return;
-  if(SSAOidCmp(oid,&snmp_oid)==0)
-	trap_num = generic;
-  else
-	trap_num = specific;
-  if( (slot=find_trap_slot(trap_num,filter))==NULL ) return;
-  for(group=slot->first_sub_group;group;group=group->next_sub_group){
-	if(group->first_sub_member!=NULL){
-	  for(manager=group->first_sub_member->first_manager;manager;
-		manager=manager->next_manager){
-		trap_send_raw(&(manager->ip_address),my_ip_address,
-			group->first_sub_member->community_string,0,
-			oid,generic,specific, SNMP_TRAP_PORT,time_stamp,
-			variables,error_label);
-	  }
-	}
-  }
-}
- 
--- a/usr/src/cmd/agents/snmp/agent/access.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include "impl.h"
-#include "pdu.h"
-
-#ifndef _ACCESS_H_
-#define _ACCESS_H_
-
-#define READ_ONLY	1
-#define READ_WRITE	2
-
-typedef struct _Community {
-	struct _Community *next_community;
-	char *name;
-	int type;
-} Community;
-
-typedef struct _AccessPolicy {
-	Community *first_community;
-	int access_type; /* one access type for all the communities */
-	int count;
-} AccessPolicy;
-
-typedef struct _AccessServer {
-	struct _AccessServer *next_acc_server;
-	AccessPolicy *first_acc_policy;
-	int attached;
-} AccessServer;
-
-typedef struct _Manager {
-	struct _Manager *next_manager;
-	char *name;
-	IPAddress ip_address;
-	AccessServer *first_acc_server;	
-} Manager;
-
-/****************************************************
-
---------------
-| Manager     |-->
-| xxxxxxx     |
-| :name       |
-| :ip_address |
---------------
-   |
-   V                
-----------     --------------     -------------
-| Manager |-->| AccessServer |-->| AccessServer|-->
-----------     --------------     -------------
-   |		    0
-		    0 (link to shared object)
-   V		    V
-		-------------     ---------     ---------
-		|AccessPolicy|-->|Community|-->|Community|-->
-		|xxxxxxxxxxxx|   |xxxxxxxxx|    ---------
-		|:access_type|   |:name	   |
-		-------------     ---------    
-1
-******************************************************/
-typedef struct _SubMember {
-	Manager *first_manager;
-	char *community_string;
-	int count;
-} SubMember;
-
-typedef struct _SubGroup {
-	struct _SubGroup *next_sub_group;
-	SubMember *first_sub_member;
-} SubGroup;
-
-typedef struct _TrapSlot {
-	struct _TrapSlot *next_trap_slot;
-	SubGroup *first_sub_group;
-	int num;
-} TrapSlot;
-
-typedef struct _EFilter {
-	struct _EFilter *next_efilter;
-	TrapSlot *first_trap_slot;
-	Oid  *enterprise;
-	char *name;
-	int type; /* generic or specific */
-} EFilter;
-
-/****************************************************
-
---------------
-| EFilter     |-->
-| xxxxxxx     |
-| :enterprise |
---------------
-   | next_efilter
-   V                
----------- first_trap_slot -----------  next_trap_slot   ---------
-|EFilter |--------------->| TrapSlot  |---------------->| TrapSlot|-->
-----------     		  | xxxxxxxxx |  		 ---------
-   |		          | : num     |	
-   V		           -----------
-				| first_sub_group
-				V
-			------------------                ------------   
-			| SubGroup        |next_sub_group | SubGroup |
-			| xxxxxxxxxxxxxxxx|--------------> ----------
-			------------------  
-				0 first_sub_member
-				0
-				V
-			    -----------------
-			   | SubMember 	     |first_manager ---------
-			   | xxxxxxxxxxxxxxx |------------>| Manager |
-			   |:community_string|		    --------- 
-			    -----------------
-
-******************************************************/
-typedef struct _NameOidPair {
-  struct _NameOidPair *next;
-  char *name;
-  Oid *oid;
-} NameOidPair;
-
-/* routines for trap */
-extern EFilter* efilter_add(char* name, char *error_label);
-extern TrapSlot* trap_slot_add(int num,EFilter *efilter,char *error_label);
-extern void sub_group_add_tail(TrapSlot *slot,SubGroup *group);
-extern void sub_member_free(SubMember *mem);
-extern void sub_group_list_free(SubGroup *group);
-extern void trap_slot_list_free(TrapSlot *slot);
-extern void mem_filter_join(int low,int high,SubMember *mem,EFilter *filter);
-extern void trace_filter();
-
-extern void init_manager_set();
-extern Manager* get_curr_manager_set();
-extern Manager* manager_add(char *name, char *error_label);
-extern Manager* is_valid_manager(Address *address, Manager **mngr);
-extern void delete_manager_list();
-extern void manager_list_free(Manager *mngr);
-extern void trace_managers();
-
-extern int community_add(char *name, int type, char *error_label);
-extern int is_valid_community(char *name, int type, Manager *mngr);
-extern void delete_community_list();
-extern void trace_communities(Community *c);
-extern void trace_access_server(AccessServer *as);
-extern void trace_access_policy(AccessPolicy *ap);
-
-extern void community_attach(AccessPolicy *ap, Community *comm);
-extern void access_server_add_tail(Manager* mngr, AccessServer *acc_server);
-extern void access_server_free(AccessServer *as);
-extern void access_policy_list_free(AccessPolicy *ap);
-extern int get_access_type(Manager *mngr,char *name);
-
-/* name oid pair loading */
-extern void trace_name_oid_pair();
-extern Oid *enterprise_name_to_oid(char *name);
-extern void load_enterprise_oid(char* filename);
-
-extern void trap_filter_action(Oid *oid,int generic,int specific,
-	uint32_t time_stamp,SNMP_variable *variables);
-
-#endif
--- a/usr/src/cmd/agents/snmp/agent/agent-mapfile-vers	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-#
-# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-#	usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-$mapfile_version 2
-
-SYMBOL_VERSION SUNW_1.1 {
-	global:
-		SSAMain; 
-		SSARegSubagent; 
-		SSAGetTrapPort; 
-		SSASubagentOpen; 
-		_SSASendTrap; 
-		_SSASendTrap2; 
-		_SSASendTrap3; 
-		SSAAgentIsAlive;
-		SSARegSubtree; 
-		numTrapElem;
-		callItem;
-		trapTableMap;
-		trapBucket;
-		numCallItem;
-		trapEnterpriseInfo;
-		trapAnyEnterpriseInfo;
-	local:
-		*;
-};
-
-SYMBOL_VERSION SUNWprivate_1.1 {
-	global: 
-		load_enterprise_oid; 
-		delete_manager_list; 
-		access_policy_list_free; 
-		delete_community_list; 
-		trace_managers; 
-		mem_filter_join; 
-		trap_filter_action; 
-		access_server_add_tail; 
-		access_server_free;
-		init_manager_set;
-		set_first_manager;
-		get_curr_manager_set;
-		manager_list_free;
-		sub_member_free; 
-		agent_process; 
-		efilter_add; 
-		manager_add; 
-		community_attach; 
-		trace_filter; 
-		get_access_type;
-		is_valid_manager;
-		is_valid_community;
-		agent_manager_list_free;
-		_SSASendTrap4;
-	local: 
-		*; 
-}; 
--- a/usr/src/cmd/agents/snmp/agent/agent.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1446 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "request.h"
-#include "trap.h"
-
-#include "node.h"
-#include "access.h"
-
-static int ssa_mem_free = 1; /* on */
-
-#if defined(_LP64)
-#define	COLUMN_OFFSET(x)	(x) * 2
-#else
-#define	COLUMN_OFFSET(x)	(x)
-#endif
-
-#define OCTET_STRING 2
-
-/***** LOCAL VARIABLES *****/
-
-/*
- *	The idea of these cache variables is to avoid to call
- *	the same *(entry->get) function for variables contained
- *	in a single SNMP PDU.
- *
- *	There is still a problem in this mechanism.
- *	When you query a whole table row by row and when
- *	you reached the end of the table, the *(entry->get)
- *	will be called several times:
- *	- for the first column, *(entry->get) will be called
- *	  once to find that the end of the table is reached
- *	  (==> the knowledge that we reached the last row is cached)
- *	  and then *(entry->get) will be called on the first row of
- *	  the same table (==> the first row is cached).
- *	- Same behaviour for all the remaining columns
- *
- *	Possible solutions:
- *	- two caches but this implies the copy of the cached
- *	  structures + all theis pointers
- *	- only one cache + caching the knowledge that we reached the last
- *	  row ???
- *
- */
-
-static Entry *cache_input_entry = NULL;
-static Subid cache_input_index[MAX_OID_LEN];
-static void *cache_output_pointer = NULL;
-static int cache_output_snmp_error = -1;
-static Subid cache_output_index[MAX_OID_LEN];
-
-
-/***** LOCAL FUNCTIONS *****/
-
-static int agent_get_next(SNMP_pdu *pdu, char *error_label);
-static int agent_get_next_loop(SNMP_variable *variable, Node *node, Oid *suffix);
-static int agent_get(SNMP_pdu *pdu, char *error_label);
-static int agent_set(int pass, SNMP_pdu *pdu, char *error_label);
-
-
-/****************************************************************/
-
-/* returns:						*/
-/*	0 in case of success (the pdu should be sent	*/
-/*	  back to its originator even if an SNMP error	*/
-/*	  was detected)					*/
-/*	-1 in case of failure (no pdu should be sent	*/
-/*	  back)						*/
-
-int agent_process(Address *address, SNMP_pdu *pdu)
-{
-	int snmpEnableAuthTraps = FALSE;
-	Manager *mngr;
-
-
-	if(pdu == NULL)
-	{
-		error("BUG: agent_process(): pdu is NULL");
-		return -1;
-	}
-
-
-	/* check host */
-	if(is_valid_manager(address,&mngr) == NULL)
-	{
-		error("agent_process(): unauthorized manager (%s)",
-			ip_address_string(&(address->sin_addr)));
-
-		snmpEnableAuthTraps = request_snmpEnableAuthTraps(error_label);
-		switch(snmpEnableAuthTraps)
-		{
-			case TRUE:
-				if(trap_send_to_all_destinators(NULL,
-					SNMP_TRAP_AUTHFAIL, 0,
-					NULL, error_label))
-				{
-					error("trap_send_to_all_destinators() failed: %s\n",
-						error_label);
-				}
-				break;
-
-			case FALSE:
-			default:
-				break;
-		}
-
-		return -1;
-	}
-
-	/* if mngr == NULL -> allow requests from any hosts */
-
-	/* check pdu type */
-	if(pdu->type != GETNEXT_REQ_MSG
-		&& (pdu->type != GET_REQ_MSG)
-		&& (pdu->type != SET_REQ_MSG) )
-	{
-		error("agent_process(): bad PDU type (0x%x)", pdu->type);
-		return -1;
-	}
-
-
-	/* check host */
-	if(!is_valid_community(pdu->community, pdu->type,mngr))
-	{
-		/*
-		 * Earlier, the community name is displayed here
-		 * in this error message. But since these error
-		 * messages are readable by all users, it is not advisible
-		 * to display community names in the error messages.
-		 */
-		error("agent_process() : bad community from %s",
-			ip_address_string(&(address->sin_addr)));
-
-		snmpEnableAuthTraps = request_snmpEnableAuthTraps(error_label);
-		switch(snmpEnableAuthTraps)
-		{
-			case TRUE:
-				if(trap_send_to_all_destinators(NULL,
-					SNMP_TRAP_AUTHFAIL, 0,
-					NULL, error_label))
-				{
-					error("trap_send_to_all_destinators() failed: %s\n",
-						error_label);
-				}
-				break;
-
-			case FALSE:
-			default:
-				break;
-		}
-
-		return -1;
-	}
-
-
-	if(cache_input_entry != NULL && cache_output_pointer != NULL)
-		if(ssa_mem_free != 0 && cache_input_entry->dealloc != NULL){
-				(*(cache_input_entry->dealloc))(cache_output_pointer);
-				cache_output_pointer = NULL;
-		}
-
-	cache_input_entry = NULL;
-
-	switch(pdu->type)
-	{
-		case GETNEXT_REQ_MSG:
-			if(agent_get_next(pdu, error_label))
-			{
-				error("agent_get_next() failed: %s", error_label);
-				return -1;
-			}
-			return 0;
-
-		case GET_REQ_MSG:
-			if(agent_get(pdu, error_label))
-			{
-				error("agent_get() failed: %s", error_label);
-				return -1;
-			}
-			return 0;
-
-		case SET_REQ_MSG:
-			switch(agent_set(FIRST_PASS, pdu, error_label))
-			{
-				case 0:
-					switch(agent_set(SECOND_PASS, pdu, error_label))
-					{
-						case 0:
-						case 1:
-							return 0;
-
-						case -1:
-							error("agent_set(SECOND_PASS) failed: %s",
-								error_label);
-							return -1;
-					}
-
-					/* never reached */
-					break;
-
-				case 1:
-					return 0;
-
-				case -1:
-					error("agent_set(FIRST_PASS) failed: %s",
-						error_label);
-					return -1;
-			}
-	}
-
-	/* never reached */
-	return -1;
-}
-
-
-/****************************************************************/
-
-/* returns:						*/
-/*	0 in case of success (the pdu should be sent	*/
-/*	  back to its originator even if an SNMP error	*/
-/*	  was detected)					*/
-/*	-1 in case of failure (no pdu should be sent	*/
-/*	  back)						*/
-
-static int agent_get_next(SNMP_pdu *pdu, char *error_label)
-{
-	SNMP_variable *variable;
-	Node *node;
-	Oid suffix;
-	int index = 1;
-	int snmp_error;
-
-
-	error_label[0] = '\0';
-
-	pdu->type = GET_RSP_MSG;
-
-	for(variable = pdu->first_variable; variable; variable = variable->next_variable)
-	{
-		node = node_find(NEXT_ENTRY, &(variable->name), &suffix);
-		if(node == NULL)
-		{
-			pdu->error_status = SNMP_ERR_NOSUCHNAME;
-			pdu->error_index = index;
-			return 0;
-		}
-		/* we should not forget to free suffix.subids */
-
-		if(trace_level > 0)
-		{
-			trace("!! getnext(): processing the variable %s\n\n",
-				node->label);
-		}
-
-		if(variable->type != NULLOBJ)
-		{
-			error("ASN.1 type (0x%x) is not NULL for node %s",
-				variable->type, node->label);
-			variable->type = NULLOBJ;
-		}
-
-		if(variable->val.string)
-		{
-			error("val is not NULL for node %s",
-				node->label);
-			free(variable->val.string);
-			variable->val.string = NULL;
-		}
-
-		if(variable->val_len)
-		{
-			error("val_len is not 0 for node %s",
-				node->label);
-			variable->val_len = 0;
-		}
-
-		snmp_error = agent_get_next_loop(variable, node, &suffix);
-
-		if(snmp_error != SNMP_ERR_NOERROR)
-		{
-			pdu->error_status = snmp_error;
-			pdu->error_index = index;
-			return 0;
-		}
-
-		index++;
-	}
-
-	return 0;
-}
-
-
-/* This function will free suffix->subids	*/
-/* It returns a positive snmp_error code.	*/
-static int
-agent_get_next_loop(SNMP_variable *variable, Node *node, Oid *suffix)
-{
-	Object *object;
-	Column *column;
-	Entry *entry;
-	Integer integer = 0;
-	Integer *integer_ptr;
-	String string = { NULL, 0 };
-	String *string_ptr;
-	Oid oid = { NULL, 0 };
-	Oid *oid_ptr;
-	char *pointer;
-	int snmp_error;
-        Subid index[MAX_OID_LEN];
-        Index *pIndex;
-        int index_len;
-
-	/* create index struct */
-	IndexType index_obj;
-	int index_buffer[256];
-
-        int was_cached ;
-        int i;
-	int get_entry;
-
-	bzero(index, sizeof(Subid) * MAX_OID_LEN);
-	bzero(&index_obj, sizeof(index_obj));
-	bzero(index_buffer, sizeof(index_buffer));
-        index_obj.value = index_buffer;
-
-	if(node == NULL)
-	{
-		if(trace_level > 0)
-		{
-			trace("!! End of MIB\n\n");
-		}
-
-		SSAOidZero(suffix);
-		return SNMP_ERR_NOSUCHNAME;
-	}
-
-	if(trace_level > 0)
-		trace("!! Trying %s with suffix %s\n\n",
-			node->label, SSAOidString(suffix));
-
-	switch(node->type)
-	{
-		case OBJECT:
-			object = node->data.object;
-
-			switch(suffix->len)
-			{
-				case 0:
-					if( !(object->access & READ_FLAG) )
-						return SNMP_ERR_NOSUCHNAME;
-						
-					switch(object->asn1_type)
-					{
-						case INTEGER:
-						case COUNTER:
-						case GAUGE:
-						case TIMETICKS:
-							snmp_error = (*(object->get))(&integer);
-							break;
-
-						case OBJID:
-							snmp_error = (*(object->get))(&oid);
-							if(snmp_error != SNMP_ERR_NOERROR  &&
-							   ssa_mem_free != 0){
-								if(object->dealloc != NULL)
-								  (*(object->dealloc))(&oid);
-							}
-						break;
-
-						case STRING:
-						case IPADDRESS:
-						case OPAQUE:
-							snmp_error = (*(object->get))(&string);
-							if(snmp_error != SNMP_ERR_NOERROR  &&
-							   ssa_mem_free != 0){
-								if(object->dealloc != NULL)
-								  (*(object->dealloc))(&string);
-							}
-							break;
-					}
-
-					if(snmp_error != SNMP_ERR_NOERROR)
-					{
-						if(snmp_error < 0)
-						{
-							error("the get() method of %s returned %d",
-								node->label,
-								snmp_error);
-							snmp_error = SNMP_ERR_GENERR;
-						}
-						return snmp_error;
-					}
-
-					/* variable->name */
-					SSAOidZero(&(variable->name));
-					variable->name.subids = (Subid *) malloc((object->name.len + 1) *
-							(int32_t)sizeof(Subid));
-					(void)memcpy(variable->name.subids, object->name.subids,
-						object->name.len * (int32_t)sizeof(Subid));
-					variable->name.subids[object->name.len] = 0;
-					variable->name.len = object->name.len + 1;
-
-					/* variable->type */
-					variable->type = object->asn1_type;
-
-					/* variable->val, variable->val_len */
-					switch(object->asn1_type)
-					{
-						case INTEGER:
-						case COUNTER:
-						case GAUGE:
-						case TIMETICKS:
-							variable->val.integer = (Integer *) malloc(sizeof(Integer));
-							*(variable->val.integer) = integer;
-							variable->val_len = sizeof(Integer);
-							break;
-
-						case OBJID:
-							variable->val.objid = (Subid *) malloc(oid.len *
-								(int32_t)sizeof(Subid));
-							(void)memcpy(variable->val.objid, oid.subids, oid.len *
-								(int32_t)sizeof(Subid));
-							variable->val_len = oid.len *
-								(int32_t)sizeof(Subid);
-							if(ssa_mem_free !=0 && object->dealloc != NULL)
-								  (*(object->dealloc))(&oid);
-							break;
-
-						case STRING:
-						case IPADDRESS:
-						case OPAQUE:
-							variable->val.string = (u_char *) malloc(string.len);
-							(void)memcpy(variable->val.string, string.chars, string.len);
-							variable->val_len = string.len;
-							if(ssa_mem_free != 0 && object->dealloc != NULL)
-								  (*(object->dealloc))(&string);
-							break;
-
-					}
-
-					return SNMP_ERR_NOERROR;
-
-
-				case 1:
-					if(suffix->subids[0] != 0)
-					{
-						SSAOidZero(suffix);
-						return SNMP_ERR_NOSUCHNAME;
-					}
-					SSAOidZero(suffix);
-
-					return agent_get_next_loop(variable, node->next, suffix);
-
-				default:
-					SSAOidZero(suffix);
-					return SNMP_ERR_NOSUCHNAME;
-			}
-
-
-		case COLUMN:
-			column = node->data.column;
-			entry = column->entry;
-                        pIndex = entry->first_index;
-
-			if( !(column->access & READ_FLAG) )
-			{
-				SSAOidZero(suffix);
-				return SNMP_ERR_NOSUCHNAME;
-			}
-
-			if (entry->n_indexs < 0 || entry->n_indexs > MAX_OID_LEN) { 
-					SSAOidZero(suffix);
-					return SNMP_ERR_NOSUCHNAME;
-			}
-
-                       index_len = 0;
-                       for (pIndex=entry->first_index; pIndex; pIndex=pIndex->next_index)
-                       {
-			   if (pIndex->index_type == OCTET_STRING)
-                               index_len = index_len + (pIndex->index_len)+1; /* add extra suffix for str len */
-                           else
-                               index_len = index_len +1;    /* one subid per index */
-                       }     
-                       index_obj.len = index_len;
-
-                       for (i=0; i < suffix->len; i++)
-                       {
-                                index[i] = suffix->subids[i];
-                                index_obj.value[i] = suffix->subids[i];
-                       }
-
-                       for (i = suffix->len; i < index_len; i++)   /* Zero out remainder of suffixes */
-                       {
-                                index[i] = 0;
-                                index_obj.value[i] = 0;
-                       }
-
-                       for (i=0; i < index_len; i++)
-                       {
-                            if ((cache_input_entry == entry) && (cache_input_index[i] == index[i]))
-                                 was_cached = 1;
-                            else
-                            {
-                                 was_cached = 0;
-                                 break;
-                            }
-
-                       }
-
-                       if (was_cached)
-                       {
-                            pointer = cache_output_pointer;
-                            snmp_error = cache_output_snmp_error;
-                            for (i=0;i < index_len; i++)
-                                index[i]= cache_output_index[i];
-                       }
-                       else
-                       {
-                            if (cache_input_entry != NULL && cache_output_pointer != NULL)
-                                if (ssa_mem_free!=0 && cache_input_entry->dealloc != NULL)
-                                {
-                                    (*(cache_input_entry->dealloc))(cache_output_pointer);
-                                    cache_output_pointer = NULL;
-                                }
-                            cache_input_entry= entry;
-                            for (i=0; i < index_len; i++)
-                                 cache_input_index[i] = index[i];
-			
-			    if (suffix->len == 0)
-				get_entry = FIRST_ENTRY;
-			    else
-				get_entry = NEXT_ENTRY;
-
-                            snmp_error = (*(entry->get)) (get_entry, &pointer,&index_obj);
-
-                            for (i=0; i< index_len; i++)
-                                 index[i] = index_obj.value[i];
-                            cache_output_pointer = pointer;
-                            cache_output_snmp_error = snmp_error;
-                            for (i=0; i < index_len; i++)
-                                 cache_output_index[i] = index[i];
-                       }
-
-                       if (suffix->len !=0)
-                           SSAOidZero(suffix);
-
-                       if(pointer == NULL)
-                       {
-                          if(snmp_error == END_OF_TABLE)
-                          {
-                               if(trace_level > 0)
-                               {
-                                   trace("!! End of table %s\n\n",
-                                          node->parent->parent->label);
-                               }
-                               return agent_get_next_loop(variable, node->next, suffix);
-                          }
-
-                                if(snmp_error < 0)
-                                {
-                                      error("the get() method of %s returned %d",
-                                             node->parent->label,
-                                             snmp_error);
-                                      snmp_error = SNMP_ERR_GENERR;
-                                }
-                                return snmp_error;
-                       }
-
-			/* variable->name */
-		       SSAOidZero(&(variable->name));
-                       variable->name.subids = (Subid *) malloc((column->name.len + index_len) * sizeof(Subid));
-                       memcpy(variable->name.subids, column->name.subids, column->name.len * sizeof(Subid));
-                       for (i=0; i < index_len; i++)
-                            variable->name.subids[column->name.len + i] = index[i];
-                       variable->name.len = column->name.len + index_len;
-
-			/* variable->type */
-			variable->type = column->asn1_type;
-
-			/* variable->val, variable->val_len */
-			switch(column->asn1_type)
-			{
-				case INTEGER:
-				case COUNTER:
-				case GAUGE:
-				case TIMETICKS:
-					integer_ptr = (Integer *) (pointer +
-						COLUMN_OFFSET(column->offset));
-					variable->val.integer = (Integer *) malloc(sizeof(Integer));
-					*(variable->val.integer) = *integer_ptr;
-					variable->val_len = sizeof(Integer);
-					break;
-
-				case OBJID:
-					oid_ptr = (Oid *) (pointer +
-						COLUMN_OFFSET(column->offset));
-					/* fix the null subid */
-					if(oid_ptr->subids == NULL){
-					  variable->val.objid = NULL;
-					}else{
-					variable->val.objid = (Subid *) malloc(oid_ptr->len *
-						(int32_t)sizeof(Subid));
-					(void)memcpy(variable->val.objid, oid_ptr->subids, oid_ptr->len * 
-						(int32_t)sizeof(Subid));
-					}
-					variable->val_len = oid_ptr->len * 
-						(int32_t)sizeof(Subid);
-					break;
-
-				case STRING:
-				case IPADDRESS:
-				case OPAQUE:
-					string_ptr = (String *) (pointer +
-						COLUMN_OFFSET(column->offset));
-					if(string_ptr->chars == NULL){
-					  variable->val.string =(u_char*)NULL;
-					}else{
-					variable->val.string = (u_char *) malloc(string_ptr->len);
-					(void)memcpy(variable->val.string, string_ptr->chars, string_ptr->len);
-					}
-					variable->val_len = string_ptr->len;
-					break;
-			}
-
-
-			return SNMP_ERR_NOERROR;
-
-
-		case NODE:
-			return agent_get_next_loop(variable, node->next, suffix);
-	}
-
-	/* never reached */
-	return -1;
-}
-
-	
-/****************************************************************/
-
-/* returns:						*/
-/*	0 in case of success (the pdu should be sent	*/
-/*	  back to its originator even if an SNMP error	*/
-/*	  was detected)					*/
-/*	-1 in case of failure (no pdu should be sent	*/
-/*	  back)						*/
-
-static int agent_get(SNMP_pdu *pdu, char *error_label)
-{
-	SNMP_variable *variable;
-	Node *node;
-	Object *object;
-	Column *column;
-	Entry *entry=NULL;
-	Oid suffix;
-	int index_err = 1;
-	Integer integer;
-	Oid oid;
-	String string;
-	Integer *integer_ptr;
-	Oid *oid_ptr;
-	String *string_ptr;
-	int snmp_error;
-	char *pointer=NULL;
-        Subid index[MAX_OID_LEN];
-
-	/* create index struct */
-	IndexType index_obj;
-	int index_buffer[256];
-
-        int was_cached;
-        int i;
-        Index *pIndex;
-        int index_len;
-
-	index_obj.len = 0;
-	index_obj.type = 0;
-	index_obj.value = index_buffer; 
-
-
-	error_label[0] = '\0';
-
-	pdu->type = GET_RSP_MSG;
-
-	for(variable = pdu->first_variable; variable; variable = variable->next_variable)
-	{
-		node = node_find(EXACT_ENTRY, &(variable->name), &suffix);
-		if(node == NULL)
-		{
-			pdu->error_status = SNMP_ERR_NOSUCHNAME;
-			pdu->error_index = index_err;
-			return 0;
-		}
-		/* we should not forget to free suffix.subids */
-
-		if(trace_level > 0)
-		{
-			trace("!! get(): processing the variable %s\n\n",
-				node->label);
-		}
-
-		if(variable->type != NULLOBJ)
-		{
-			error("agent_get(): ASN.1 type (0x%x) is not NULL for node %s",
-					variable->type,
-					node->label);
-			variable->type = NULLOBJ;
-		}
-
-		if(variable->val.string)
-		{
-			error("agent_get(): val is not NULL for node %s", node->label);
-			free(variable->val.string);
-			variable->val.string = NULL;
-		}
-
-		if(variable->val_len)
-		{
-			error("agent_get(): val_len is not 0 for node %s", node->label);
-			variable->val_len = 0;
-		}
-
-		switch(node->type)
-		{
-			case OBJECT:
-				object = node->data.object;
-
-				if( (suffix.len != 1)
-					|| (suffix.subids[0] != 0) )
-				{
-					pdu->error_status = SNMP_ERR_NOSUCHNAME;
-					pdu->error_index = index_err;
-					SSAOidZero(&suffix);
-					return 0;
-				}
-
-				if( !(object->access & READ_FLAG) )
-				{
-					pdu->error_status = SNMP_ERR_NOSUCHNAME;
-					pdu->error_index = index_err;
-					SSAOidZero(&suffix);
-					return 0;
-				}
-
-				switch(object->asn1_type)
-				{
-					case INTEGER:
-					case COUNTER:
-					case GAUGE:
-					case TIMETICKS:
-						snmp_error = (*(object->get))(&integer);
-						break;
-
-					case OBJID:
-						snmp_error = (*(object->get))(&oid);
-                                                if(snmp_error != SNMP_ERR_NOERROR  &&
-                                                   ssa_mem_free != 0){
-                                                       if(object->dealloc != NULL)
-                                                         (*(object->dealloc))(&oid);
-						}
-						break;
-
-					case STRING:
-					case IPADDRESS:
-					case OPAQUE:
-						snmp_error = (*(object->get))(&string);
-                                                if(snmp_error != SNMP_ERR_NOERROR  &&
-                                                   ssa_mem_free != 0){
-                                                       if(object->dealloc != NULL)
-                                                         (*(object->dealloc))(&string);
-						}
-						break;
-				}
-
-				if(snmp_error != SNMP_ERR_NOERROR)
-				{
-					if(snmp_error < 0)
-					{
-						error("the get() method of %s returned %d",
-							node->label,
-							snmp_error);
-						snmp_error = SNMP_ERR_GENERR;
-					}
-					pdu->error_status = snmp_error;
-					pdu->error_index = index_err;
-					SSAOidZero(&suffix);
-					return 0;
-				}
-
-				/* variable->name */
-
-				/* variable->type */
-				variable->type = object->asn1_type;
-
-				/* variable->val, variable->val_len */
-				switch(object->asn1_type)
-				{
-					case INTEGER:
-					case COUNTER:
-					case GAUGE:
-					case TIMETICKS:
-						variable->val.integer = (Integer *) malloc(sizeof(Integer));
-						*(variable->val.integer) = integer;
-						variable->val_len = sizeof(Integer);
-						break;
-
-					case OBJID:
-						variable->val.objid = (Subid *) malloc(oid.len * 
-							(int32_t)sizeof(Subid));
-						(void)memcpy(variable->val.objid, oid.subids, oid.len *
-							(int32_t)sizeof(Subid));
-						variable->val_len = oid.len * 
-							(int32_t)sizeof(Subid);
-                                                  if (ssa_mem_free != 0){
-                                                       if(object->dealloc != NULL)
-                                                         (*(object->dealloc))(&oid);
-						}
-						break;
-
-					case STRING:
-					case IPADDRESS:
-					case OPAQUE:
-						variable->val.string = (u_char *) malloc(string.len);
-						(void)memcpy(variable->val.string, string.chars, string.len);
-						variable->val_len = string.len;
-                                                /*if(snmp_error != SNMP_ERR_NOERROR  &&*/
-                                                  if (ssa_mem_free != 0){
-                                                       if(object->dealloc != NULL)
-                                                         (*(object->dealloc))(&string);
-						}
-						break;
-				}
-
-
-				break;
-
-
-			case COLUMN:
-				column = node->data.column;
-				entry = column->entry;
-                                pIndex=entry->first_index;
-
-				if( !(column->access & READ_FLAG) )
-				{
-					pdu->error_status = SNMP_ERR_NOSUCHNAME;
-					pdu->error_index = index_err;
-					SSAOidZero(&suffix);
-					return 0;
-				}
-                               
-                                if (suffix.subids == NULL) {
-					pdu->error_status = SNMP_ERR_NOSUCHNAME;
-                                        pdu->error_index = index_err;
-                                        SSAOidZero(&suffix);
-                                        return 0;
-                                }
-
-			        index_len = 0;
-                                for (pIndex=entry->first_index; pIndex; pIndex=pIndex->next_index)
-                       		{
-                           	    if (pIndex->index_type == OCTET_STRING)
-                               		index_len = index_len + (pIndex->index_len)+1; /* add extra suffix for str len */
-                                    else
-                                       index_len = index_len +1;    /* one subid per index */
-                                }
-
- 
-                  	        for (i=0; i < index_len; i++)
-                                {
-                                        index[i] = suffix.subids[i];
-                                        index_obj.value[i] = suffix.subids[i];
-                                }
-                                index_obj.len = index_len;
-                                for (i=0; i < index_len; i++)
-                                {
-                                     if( (cache_input_entry == entry) && (cache_input_index[i] == index[i]) )
-                                         was_cached = 1;
-                                     else
-                                     {
-                                         was_cached = 0;
-                                         break;
-                                     }
-                                }
-                                if (was_cached)
-                                {
-                                     pointer = cache_output_pointer;
-                                     snmp_error = cache_output_snmp_error;
-                                }
-                                else
-                                {
-                                     if(cache_input_entry != NULL && cache_output_pointer != NULL)
-                                        if(ssa_mem_free != 0 && cache_input_entry->dealloc != NULL)
-                                        {
-                                              (*(cache_input_entry->dealloc))(cache_output_pointer);
-                                              cache_output_pointer = NULL;
-                                        }
-                                              cache_input_entry = entry;
-                                              for (i=0; i < index_len; i++)
-                                                   cache_input_index[i] = index[i];
-                                              snmp_error = (*(entry->get))(EXACT_ENTRY,&pointer,&index_obj);
-                                              cache_output_pointer = pointer;
-                                              cache_output_snmp_error = snmp_error;
-                                }
-
-
-				if(pointer == NULL)
-				{
-					if(snmp_error < 0)
-					{
-						error("the get() method of %s returned %d",
-							node->parent->label,
-							snmp_error);
-						snmp_error = SNMP_ERR_GENERR;
-					}
-					
-					pdu->error_status = snmp_error;
-					pdu->error_index = index_err;
-					SSAOidZero(&suffix);
-					return 0;
-				}
-
-				/* variable->type */
-				variable->type = column->asn1_type;
-
-				/* variable->val, variable->val_len */
-				switch(column->asn1_type)
-				{
-					case INTEGER:
-					case COUNTER:
-					case GAUGE:
-					case TIMETICKS:
-						integer_ptr = (Integer *) (pointer +
-							COLUMN_OFFSET(column->offset));
-						variable->val.integer = (Integer *) malloc(sizeof(Integer));
-						*(variable->val.integer) = *integer_ptr;
-						variable->val_len = sizeof(Integer);
-						break;
-
-					case OBJID:
-						oid_ptr = (Oid *) (pointer +
-							COLUMN_OFFSET(column->offset));
-						variable->val.objid = (Subid *) malloc(oid_ptr->len *
-							(int32_t)sizeof(Subid));
-						(void)memcpy(variable->val.objid, oid_ptr->subids, oid_ptr->len *
-							(int32_t)sizeof(Subid));
-						variable->val_len = oid_ptr->len * 
-							(int32_t)sizeof(Subid);
-						break;
-
-					case STRING:
-					case IPADDRESS:
-					case OPAQUE:
-						string_ptr = (String *) (pointer +
-							COLUMN_OFFSET(column->offset));
-						variable->val.string = (u_char *) malloc(string_ptr->len);
-						(void)memcpy(variable->val.string, string_ptr->chars, string_ptr->len);
-						variable->val_len = string_ptr->len;
-						break;
-				}
-
-				break;
-
-
-			case NODE:
-				pdu->error_status = SNMP_ERR_NOSUCHNAME;
-				pdu->error_index = index_err;
-				SSAOidZero(&suffix);
-				return 0;
-		}
-
-		SSAOidZero(&suffix);
-
-		index_err++;
-	}
-	/* Moved this down from the column loop because the cache must be
-	   freed only when the required columns in the row are all read.
-	   - Added pointer check because pointer will point to nothing
-	   if this is a non-column get. 
-	   - Added setting cache_output_pointer to NULL because if it is not
-	   NULL, the next iteration of agent_process will try to delete it */
-	/* Bug fix 4127458 . Added check to see if entry has been initialized */
-	if(ssa_mem_free != 0 && entry != NULL && entry->dealloc != NULL && pointer != NULL){
-	/* remember to turn off the caching */
-	(*(entry->dealloc))(pointer);
-	pointer = cache_output_pointer = NULL;
-				}
-
-	return 0;
-}
-
-
-/****************************************************************/
-
-/* returns							*/
-/*	0	in case of success. If we are in the		*/
-/*		FIRST_PASS, we should go to the second pass.	*/
-/*	-1	in case of failure. If we are in the		*/
-/*		FIRST_PASS, we should not go to the		*/
-/*		second pass and no pdu should be sent back.	*/
-/*	1	If we are in the FIRST_PASS, we should not go	*/
-/*		to the second pass but a pdu			*/
-/*		with an SNMP error should be sent back to its	*/
-/*		originator					*/
-
-static int agent_set(int pass, SNMP_pdu *pdu, char *error_label)
-{
-	SNMP_variable *variable;
-	Node *node;
-	Object *object;
-	Column *column;
-	Entry *entry;
-	Oid suffix;
-	int index = 1;
-	Integer integer = 0;
-	Oid oid = { NULL, 0 };
-	String string = { NULL, 0 };
-	int snmp_error;
-        int i;
-
-	/* create index struct */
-	IndexType index_obj;
-	int index_buffer[256];
-
-	index_obj.len = 0;
-	index_obj.value = index_buffer; 
-
-	error_label[0] = '\0';
-
-	pdu->type = GET_RSP_MSG;
-
-	for(variable = pdu->first_variable; variable; variable = variable->next_variable)
-	{
-		node = node_find(EXACT_ENTRY, &(variable->name), &suffix);
-		if(node == NULL)
-		{
-			pdu->error_status = SNMP_ERR_NOSUCHNAME;
-			pdu->error_index = index;
-			return 1;
-		}
-		/* we should not forget to free suffix.subids */
-
-		if(trace_level > 0)
-		{
-			trace("!! set(%s): processing the variable %s\n\n",
-				(pass == FIRST_PASS)? "FIRST_PASS": "SECOND_PASS",
-				node->label);
-		}
-
-/*
-		if(variable->val.string == NULL)
-		{
-			(void)sprintf(error_label, "val.string is NULL for node %s",
-				node->label);
-			SSAOidZero(&suffix);
-			return -1;
-		}
-
-		if(variable->val_len == 0)
-		{
-			(void)sprintf(error_label, "val_len is 0 for node %s",
-				node->label);
-			SSAOidZero(&suffix);
-			return -1;
-		}
-*/
-
-		switch(node->type)
-		{
-			case OBJECT:
-				object = node->data.object;
-
-				/* check the ASN.1 type */
-				if(variable->type != object->asn1_type)
-				{
-					(void)sprintf(error_label, "wrong ASN.1 type (0x%x) for node %s",
-						variable->type, node->label);
-					SSAOidZero(&suffix);
-					return -1;
-				}
-
-				/* check the suffix */
-				if( (suffix.len != 1)
-					|| (suffix.subids[0] != 0) )
-				{
-					pdu->error_status = SNMP_ERR_NOSUCHNAME;
-					pdu->error_index = index;
-					SSAOidZero(&suffix);
-					return 1;
-				}
-
-				/* check the access */
-				if( !(object->access & WRITE_FLAG) )
-				{
-					pdu->error_status = SNMP_ERR_READONLY;
-					pdu->error_index = index;
-					SSAOidZero(&suffix);
-					return 1;
-				}
-
-				/* check the value length */
-				switch(object->asn1_type)
-				{
-					case INTEGER:
-					case COUNTER:
-					case GAUGE:
-					case TIMETICKS:
-					case IPADDRESS:
-						if(variable->val_len != 4)
-						{
-							(void)sprintf(error_label, "val_len is not 4 (%d) for node %s",
-								variable->val_len, node->label);
-							SSAOidZero(&suffix);
-							return -1;
-						}
-
-						if(variable->val.integer == NULL)
-						{
-							(void)sprintf(error_label, "val.integer is NULL for node %s",
-								node->label);
-							SSAOidZero(&suffix);
-							return -1;
-						}
-
-						break;
-				}
-
-				/* in case of enumerated integer, check the value */
-				if( (object->asn1_type == INTEGER)
-					&& (object->first_enum != NULL) )
-				{
-					Enum *enums;
-
-
-					integer = *(variable->val.integer);
-
-					for(enums = object->first_enum; enums; enums = enums->next_enum)
-					{
-						if(enums->value == integer)
-						{
-							break;
-						}
-					}
-
-					if(enums == NULL)
-					{
-						pdu->error_status = SNMP_ERR_BADVALUE;
-						pdu->error_index = index;
-						SSAOidZero(&suffix);
-						return 1;
-					}
-				}
-
-				switch(object->asn1_type)
-				{
-					case INTEGER:
-					case COUNTER:
-					case GAUGE:
-					case TIMETICKS:
-						integer = *(variable->val.integer);
-
-						snmp_error = (*(object->set))(pass, &integer);
-						break;
-
-					case OBJID:
-						if(SSAOidInit(&oid, variable->val.objid,
-							variable->val_len / (int32_t)sizeof(Subid),
-							error_label)) {
-							SSAOidZero(&suffix);
-							return -1;
-						}
-
-						snmp_error = (*(object->set))(pass, &oid);
-						SSAOidZero(&oid);
-						break;
-
-					case STRING:
-					case IPADDRESS:
-					case OPAQUE:
-						if(SSAStringInit(&string, variable->val.string,
-							variable->val_len, error_label)) {
-							SSAOidZero(&suffix);
-							return -1;
-						}
-
-						snmp_error = (*(object->set))(pass, &string);
-						SSAStringZero(&string);
-						break;
-				}
-
-				if(snmp_error != SNMP_ERR_NOERROR)
-				{
-					if(snmp_error < 0)
-					{
-						error("the set(%s) method of %s returned %d",
-							(pass == FIRST_PASS)? "FIRST_PASS": "SECOND_PASS",
-							node->label, snmp_error);
-						snmp_error = SNMP_ERR_GENERR;
-					}
-					pdu->error_status = snmp_error;
-					pdu->error_index = index;
-					SSAOidZero(&suffix);
-					return 1;
-				}
-
-				break;
-
-
-			case COLUMN:
-				column = node->data.column;
-				entry = column->entry;
-
-				/* check the ASN.1 type */
-				if(variable->type != column->asn1_type)
-				{
-					(void)sprintf(error_label, "wrong ASN.1 type (0x%x) for node %s",
-						variable->type, node->label);
-					SSAOidZero(&suffix);
-					return -1;
-				}
-
-				/* check the suffix */
-				if (suffix.subids == NULL)
-				{
-					pdu->error_status = SNMP_ERR_NOSUCHNAME;
-					pdu->error_index = index;
-					SSAOidZero(&suffix);
-					return 1;
-				}
-
-				/* check the access */
-				if( !(column->access & WRITE_FLAG) )
-				{
-					pdu->error_status = SNMP_ERR_READONLY;
-					pdu->error_index = index;
-					SSAOidZero(&suffix);
-					return 1;
-				}
-
-				/* check the value length */
-				switch(column->asn1_type)
-				{
-					case INTEGER:
-					case COUNTER:
-					case GAUGE:
-					case TIMETICKS:
-					case IPADDRESS:
-						if(variable->val_len != 4)
-						{
-							(void)sprintf(error_label, "val_len is not 4 (%d) for node %s",
-								variable->val_len, node->label);
-							SSAOidZero(&suffix);
-							return -1;
-						}
-
-						if(variable->val.integer == NULL)
-						{
-							(void)sprintf(error_label, "val.integer is NULL for node %s",
-								node->label);
-							SSAOidZero(&suffix);
-							return -1;
-						}
-
-						break;
-				}
-
-				/* in case of enumerated integer, check the value */
-				if( (column->asn1_type == INTEGER)
-					&& (column->first_enum != NULL) )
-				{
-					Enum *enums;
-
-
-					integer = *(variable->val.integer);
-
-					for(enums = column->first_enum; enums; enums = enums->next_enum)
-					{
-						if(enums->value == integer)
-						{
-							break;
-						}
-					}
-
-					if(enums == NULL)
-					{
-						pdu->error_status = SNMP_ERR_BADVALUE;
-						pdu->error_index = index;
-						SSAOidZero(&suffix);
-						return 1;
-					}
-				}
-
-				switch(column->asn1_type)
-				{
-					case INTEGER:
-					case COUNTER:
-					case GAUGE:
-					case TIMETICKS:
-						integer = *(variable->val.integer);
-
-						break;
-
-					case OBJID:
-						if(SSAOidInit(&oid, variable->val.objid,
-							variable->val_len / (int32_t)sizeof(Subid), error_label)) {
-							SSAOidZero(&suffix);
-							return -1;
-						}
-
-						break;
-
-					case STRING:
-					case IPADDRESS:
-					case OPAQUE:
-						if(SSAStringInit(&string, variable->val.string, variable->val_len, error_label))
-						{
-							SSAOidZero(&suffix);
-							return -1;
-						}
-
-						break;
-				}
-
-				index_obj.len = suffix.len;
-				for (i = 0; i < suffix.len; i++)
-                                {
-                                    index_obj.value[i] = suffix.subids[i];
-                                }
-
-						
-						switch(column->asn1_type)
-						{
-							case INTEGER:
-							case COUNTER:
-							case GAUGE:
-							case TIMETICKS:
-								snmp_error = (*(column->set))(pass, index_obj, &integer);
-								break;
-
-							case OBJID:
-								snmp_error = (*(column->set))(pass, index_obj, &oid);
-								break;
-
-							case STRING:
-							case IPADDRESS:
-							case OPAQUE:
-								snmp_error = (*(column->set))(pass, index_obj, &string);
-								break;
-				}
-
-				switch(column->asn1_type)
-				{
-					case OBJID:
-						SSAOidZero(&oid);
-						break;
-
-					case STRING:
-					case IPADDRESS:
-					case OPAQUE:
-						SSAStringZero(&string);
-						break;
-				}
-
-				if(snmp_error != SNMP_ERR_NOERROR)
-				{
-					if(snmp_error < 0)
-					{
-						error("the set(%s) method of %s returned %d",
-							(pass == FIRST_PASS)? "FIRST_PASS": "SECOND_PASS",
-							node->parent->label,
-							snmp_error);
-							snmp_error = SNMP_ERR_GENERR;
-					}
-					
-					pdu->error_status = snmp_error;
-					pdu->error_index = index;
-					SSAOidZero(&suffix);
-					return 1;
-				}
-
-				break;
-
-
-			case NODE:
-				pdu->error_status = SNMP_ERR_NOSUCHNAME;
-				pdu->error_index = index;
-				SSAOidZero(&suffix);
-				return 1;
-		}
-
-		SSAOidZero(&suffix);
-
-		index++;
-	}
-
-	return 0;
-}
-
-
-/****************************************************************/
-
-/* flag == 0 means turn off auto mem free */
-void SSAAutoMemFree(int flag)
-{
-  ssa_mem_free = flag;
-}
-
-
--- a/usr/src/cmd/agents/snmp/agent/agent.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _AGENT_H_
-#define _AGENT_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern int agent_process(Address *address, SNMP_pdu *pdu);
-
-
-#endif
--- a/usr/src/cmd/agents/snmp/agent/agent_msg.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _AGENT_MSG_H_
-#define _AGENT_MSG_H_
-
-
-/***** TRACING MESSAGES *****/
-
-#define MSG_SIGHUP			"signal SIGHUP(%d) received"
-
-#define MSG_READING_CONFIG		"re-reading its configuration file %s..."
-#define MSG_CONFIG_READED		"...configuration re-read"
-
-
-/***** SYSTEM ERRORS ****/
-
-#define ERR_MSG_SOCKET			"socket() failed %s"
-#define ERR_MSG_BIND			"bind() failed on UDP port %d %s"
-#define ERR_MSG_SELECT			"select() failed %s"
-#define ERR_MSG_FORK			"fork() failed %s"
-#define ERR_MSG_FCLOSE			"fclose(%s) failed %s"
-#define ERR_MSG_CHDIR			"chdir(%s) failed %s"
-#define ERR_MSG_OPEN			"can't open config file %s %s"
-#define ERR_MSG_FSTAT			"can't stat config file %s %s"
-#define ERR_MSG_MMAP			"can't mmap config file %s %s"
-#define ERR_MSG_MUNMAP			"munmap() failed %s"
-#define ERR_MSG_CLOSE			"close() failed %s"
-
-
-/***** PDU RELATED ERRORS *****/
-
-#define ERR_MSG_PDU_RECEIVED		"error while receiving a pdu from %s: %s"
-#define ERR_MSG_PDU_PROCESS		"unable to process a pdu from %s"
-#define ERR_MSG_SNMP_ERROR		"SNMP error (%s, %lu) sent back to %s"
-#define ERR_MSG_PDU_SEND		"error while sending a pdu back to %s: %s"
-
-
-/***** MISCELLANEOUS *****/
-
-#define ERR_MSG_ALLOC			"cannot allocate memory" 
-
-#define ERR_MSG_MANAGER_DUP		"the manager %s already exists"
-#define ERR_MSG_COMMUNITY_DUP		"the community %s already exists"
-
-#define ERR_MSG_MY_IP_ADDRESS           "unable to get my IP address: %s"
- 
-#define ERR_MSG_VARBIND_LIMIT           "unable to handle SNMP request with more than 32 variables"
- 
-#define ERR_MSG_UNKNOWN_FRAGMENT        "unknown PDU fragment received from agent %s (%s)"
-#define ERR_MSG_AGENT_NOT_RESPONDING    "agent %s not responding"
- 
-
-#endif
--- a/usr/src/cmd/agents/snmp/agent/amd64/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../Makefile.com
-include $(SRC)/lib/Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
--- a/usr/src/cmd/agents/snmp/agent/conf/agent.conf	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc. All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Configuration file of an SNMP agent
-#
-
-##################
-# access control # 
-##################
-
-# The list of community names needed for read/write access
-# to the entire MIB.
-# If the list is empty, the only valid community name is "public"
-# and its access type is read-only
-
-communities = {
-	public		read-only
-	private		read-write
-}
-
-# The list of hosts that can send SNMP queries.
-# If this list is empty, all the hosts are allowed to
-# send SNMP queries.
-
-managers = {
-}
-
-
-###################
-# trap parameters #
-###################
-
-# The community name to be used in traps.
-
-trap-community = SNMP-trap
-
-# The list of hosts where traps should be sent to.
-
-trap-recipients =
-{
-	splat
-	panda
-}
-
--- a/usr/src/cmd/agents/snmp/agent/config.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _CONFIG_H_
-#define _CONFIG_H_
-
-extern void config_init(char *);
-extern void sec_config_init(char *);
-
-#endif
-
--- a/usr/src/cmd/agents/snmp/agent/config.l	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-%{
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/***** DEFINES *****/
-
-/*
-#define DEBUG_LEX printf("\tLEX: %s(%d) at line %d\n", yytext, yyval, yylineno);
-*/
-#define DEBUG_LEX
-
-
-/***** STATIC VARIABLES *****/
-
-static int token_value;
-
-
-%}
-
-%%
-
-#.*\n					{ ; }
-[ \t\n]*				{ ; }
-
-\{					{ DEBUG_LEX return OPENBRACKET; }
-\}					{ DEBUG_LEX return CLOSEBRACKET; }
-=					{ DEBUG_LEX return EQUAL; }
-\,					{ DEBUG_LEX return COMA; }
-
-[cC][oO][mM][mM][uU][nN][iI][tT][iI][eE][sS] { DEBUG_LEX return COMMUNITIES; }
-[rR][eE][aA][dD][-][oO][nN][lL][yY]	{ DEBUG_LEX return READONLY; }
-[rR][eE][aA][dD][-][wW][rR][iI][tT][eE]	{ DEBUG_LEX return READWRITE; }
-
-[mM][aA][nN][aA][gG][eE][rR][sS]	{ DEBUG_LEX return MANAGERS; }
-
-[tT][rR][aA][pP][-][cC][oO][mM][mM][uU][nN][iI][tT][yY] { DEBUG_LEX return TRAPCOMMUNITY; }
-[tT][rR][aA][pP][-][rR][eE][cC][iI][pP][iI][eE][nN][tT][sS] { DEBUG_LEX return TRAPDESTINATORS; }
-
-[a-zA-Z][_a-zA-Z0-9-]*			{ DEBUG_LEX return IDENTIFIER; }
-
-.					{ error_exit("syntax error in %s at line %d: the token %s is not valid",
-						config_file, yylineno, yytext);
-					}
-
-
-%%
-
-#undef input
-#undef unput
-#undef output
-
-/*
-# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
-# define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
-# define output(c) (void)putc(c,yyout)
-*/
-
-#define input() (((yytchar=*lexinput++)=='\n'?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
-#define unput(c) {yytchar= (c); if(yytchar=='\n')yylineno--;*--lexinput = yytchar;}
-#define output(c)
-
-/*************************************************************************/
-
--- a/usr/src/cmd/agents/snmp/agent/i386/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 1998, 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../Makefile.com
-
-install: $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
--- a/usr/src/cmd/agents/snmp/agent/llib-lssagent	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/* LINTLIBRARY */
-/* PROTOLIB1 */
-
-#include <node.h>
-#include <sys/socket.h>
-#include <pagent.h>
-#include <subtree.h>
-#include <table.h>
-#include <snmpd.h>
-#include <reg_subtree.h>
--- a/usr/src/cmd/agents/snmp/agent/node.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-
-#include "agent_msg.h"
-#include "node.h"
-
-
-/***** STATIC VARIABLES ******/
-
-static Node *root_node = &node_table[0];
-
-
-/*****************************************************************/
-
-Node *node_find(int search_type, Oid *name, Oid *suffix)
-{
-	int i;
-	Node *parent;
-	Node *previous;
-	Node *node;
-
-
-	if( (name == NULL)
-		|| (name->len < 1)
-		|| (name->subids[0] != root_node->subid) )
-	{
-		suffix->subids = NULL;
-		suffix->len = 0;
-
-		if(trace_level > 0)
-		{
-			trace("node_find() returned NULL\n\n");
-		}
-
-		return NULL;
-	}
-
-	parent = root_node;
-	for(i = 1; i < name->len; i++)
-	{
-		previous = NULL;
-
-		for(node = parent->first_child; node; node = node->next_peer)
-		{
-			if(node->subid > name->subids[i])
-			{
-				switch(search_type)
-				{
-					case NEXT_ENTRY:
-						suffix->len = 0;
-						suffix->subids = NULL;
-
-						if(trace_level > 0)
-						{
-							trace("node_find() returned %s with no suffix\n\n",
-								node->label);
-						}
-
-						return node;
-
-					case EXACT_ENTRY:
-						node = NULL;
-						break;
-				}
-
-				break;
-			}
-
-			if(node->subid == name->subids[i])
-			{
-				parent = node;
-				break;
-			}
-
-			previous = node;
-		}
-
-		if(node == NULL)
-		{
-			switch(search_type)
-			{
-				case NEXT_ENTRY:
-					suffix->subids = NULL;
-					suffix->len = 0;
-
-					if(previous)
-					{
-						if(trace_level > 0)
-						{
-							if(previous->next)
-							{
-								trace("node_find() returned %s with no suffix\n\n",
-									previous->next->label);
-							}
-							else
-							{
-								trace("node_find() returned NULL\n\n");
-							}
-						}
-
-						return previous->next;
-					}
-					else
-					{
-						if(trace_level > 0)
-						{
-							if(parent->next)
-							{
-								trace("node_find() returned %s with no suffix\n\n",
-									parent->next->label);
-							}
-							else
-							{
-								trace("node_find() returned NULL\n\n");
-							}
-						}
-
-						return parent->next;
-					}
-
-				case EXACT_ENTRY:
-					suffix->subids = NULL;
-					suffix->len = 0;
-
-					if(trace_level > 0)
-					{
-						trace("node_find() returned NULL\n\n");
-					}
-
-					return NULL;
-			}
-		}
-
-		if( (node->type == COLUMN)
-			|| (node->type == OBJECT) ) {
-			suffix->len = name->len - (i + 1);
-			if (suffix->len) {
-				suffix->subids = (Subid *) malloc(suffix->len *
-					(int32_t)sizeof(Subid));
-				if (suffix->subids == NULL) {
-					error(ERR_MSG_ALLOC);
-					return NULL;
-				}
-
-				(void)memcpy(suffix->subids, &(name->subids[i + 1]),
-					suffix->len * (int32_t)sizeof(Subid));
-			} else
-				suffix->subids = NULL;
-
-			if(trace_level > 0) {
-				trace("node_find() returned %s with suffix %s\n\n",
-					parent->label, SSAOidString(suffix));
-			}
-
-			return node;
-		}
-	}
-
-	suffix->len = 0;
-	suffix->subids = NULL;
-
-	if(trace_level > 0)
-	{
-		trace("node_find() returned %s with no suffix\n\n",
-			node->label);
-	}
-
-	return node;
-}
-
-
-/*****************************************************************/
-
-
-
-
--- a/usr/src/cmd/agents/snmp/agent/node.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _NODE_H_
-#define _NODE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "asn1.h"
-#define COLUMN		1
-#define OBJECT		2
-#define NODE		3
-
-#define READ_FLAG	0x1
-#define WRITE_FLAG	0x2
-
-
-typedef struct _Enum {
-	struct _Enum *next_enum;
-	char *label;
-	Integer value;
-} Enum;
-
-typedef struct _Object {
-	Oid name;
-	u_char asn1_type;
-	Enum *first_enum;
-	int access;
-        int type;
-	int (*get)();
-	int (*set)();
-	void (*dealloc)();
-} Object;
-
-typedef struct _Index {
-	struct _Index *next_index;
-	char *label;
-        int index_type;
-        int index_len;         /* for strings only */
-	struct _Node *node;
-} Index;
-
-typedef struct _Entry {
-	struct _Index *first_index;
-	int n_indexs;
-	int (*get)();
-	void (*dealloc)();
-} Entry;
-
-
-typedef struct _Column {
-	Oid name;
-	u_char asn1_type;
-	Enum *first_enum;
-	int access;
-        int type;
-        int (*get)();
-	int (*set)();
-	Entry *entry;
-	int offset;
-} Column;
-
-
-typedef struct _Node {
-	struct _Node *parent;
-	struct _Node *first_child;
-	struct _Node *next_peer;
-	struct _Node *next;
-
-	char *label;
-	Subid subid;
-
-	int type;
-	union {
-		Object *object;
-		Column *column;
-	} data;
-} Node;
-
-struct CallbackItem {
-        Object *ptr;
-        int type,next;
-};
-struct TrapHndlCxt {
-        char name[256];
-        int is_sun_enterprise;
-        int generic,specific;
-};
-
-struct TrapEnterpriseInfo {
-        Subid subids[7];
-};
-
-/* Handling arbitrary length enterprise OID in traps */
-struct TrapAnyEnterpriseInfo {
-        Subid subids[MAX_OID_LEN+1];
-};
-
-
-extern Enum enum_table[];
-extern int enum_table_size;
-
-extern Object object_table[];
-extern int object_table_size;
-
-extern Index index_table[];
-extern int index_table_size;
-
-extern Entry entry_table[];
-extern int entry_table_size;
-
-extern Column column_table[];
-extern int column_table_size;
-
-extern Node node_table[];
-extern int node_table_size;
-
-extern struct CallbackItem *callItem;
-extern int numCallItem;
-
-extern int *trapTableMap;
-
-extern struct TrapHndlCxt *trapBucket;
-extern int numTrapElem;
-
-extern struct TrapEnterpriseInfo *trapEnterpriseInfo;
-/* For arbitrary length enterprise OID in traps - bug 4133978 */
-extern struct TrapAnyEnterpriseInfo *trapAnyEnterpriseInfo;
-
-
-extern Node *node_find(int search_type, Oid *name, Oid *suffix);
-
-#endif
--- a/usr/src/cmd/agents/snmp/agent/pagent.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "pdu.h"
-
-#include "pagent.h"
-#include "subtree.h"
-
-
-/***** STATIC VARIABLES *****/
-
-/* the agent list */
-Agent *first_agent = NULL;
-
-
-/***** STATIC FUNCTIONS *****/
-
-static void agent_free(Agent *ap);
-
-
-/****************************************************************/
-
-void trace_agents()
-{
-	Agent *ap;
-
-
-	trace("AGENTS:\n");
-	for(ap = first_agent; ap; ap = ap->next_agent)
-	{
-		trace("\t%-30s %-30s %8d\n",
-			ap->name,
-			address_string(&(ap->address)),
-			ap->timeout);
-	}
-	trace("\n");
-}
-
-
-/****************************************************************/
-
-/* We must invoke subtree_list_delete() before invoking	*/
-/* this function because the first_agent_subtree member	*/
-/* of the agent structures should be NULL		*/
-
-void agent_list_delete()
-{
-	Agent *ap = first_agent;
-	Agent *next;
-
-
-	while(ap)
-	{
-		next = ap->next_agent;
-
-		agent_free(ap);
-
-		ap = next;
-	}
-
-	first_agent = NULL;
-
-	return;
-}
-
-
-/****************************************************************/
-
-/* The fisrt_agent_subtree member of the agent		*/
-/* structure should be NULL				*/
-
-static void agent_free(Agent *ap)
-{
-	if(ap == NULL)
-	{
-		return;
-	}
-
-	if(ap->first_agent_subtree)
-	{
-		error("BUG: agent_free(): first_agent_subtree not NULL");
-	}
-
-	free(ap->name);
-	free(ap);
-
-	return;
-}
-
-/****************************************************************/
-
-/* agent_find() is used to check if we have not		*/
-/* two SNMP agents registered on the same UDP port	*/
-
-Agent *agent_find(Address *address)
-{
-	Agent *ap;
-
-
-	for(ap = first_agent; ap; ap = ap->next_agent)
-	{
-		if(ap->address.sin_port == address->sin_port)
-		{
-			return ap;
-		}
-	}
-
-	return NULL;
-}
-
-	
-/****************************************************************/
-
--- a/usr/src/cmd/agents/snmp/agent/pagent.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998, 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#ifndef _PAGENT_H
-#define	_PAGENT_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define	SSA_OPER_STATUS_ACTIVE			1
-#define	SSA_OPER_STATUS_NOT_IN_SERVICE		2
-#define	SSA_OPER_STATUS_NOT_READY		3
-#define	SSA_OPER_STATUS_CREATE_AND_WAIT		4
-#define	SSA_OPER_STATUS_DESTROY			5
-
-/*
- * This macro depends on the AgentStatus field in MIB object in the
- * relay agent
- */
-
-typedef struct _Agent {
-	int		timeout;
-	int		agent_id;
-	int		agent_status;
-	char		*personal_file;
-	char		*config_file;
-	char		*executable;
-	char		*version_string;
-	char		*protocol;
-	int		process_id;
-	char		*name;
-	int		system_up_time;
-	int		watch_dog_time;
-
-	Address		address;
-	struct _Agent	*next_agent;
-	struct _Subtree	*first_agent_subtree;
-
-	int 	tree_index;
-	int	table_index;
-} Agent;
-
-
-/* the agent list */
-extern Agent *first_agent;
-
-/* the address is a unique key for an agent */
-extern Agent *agent_find(Address *address);
-
-/* We must invoke subtree_list_delete() before invoking */
-/* this function because the first_agent_subtree member */
-/* of the agent structures should be NULL */
-extern void agent_list_delete(void);
-extern void trace_agents(void);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* _PAGENT_H */
--- a/usr/src/cmd/agents/snmp/agent/personal.l	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-%{
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*
-#define DEBUG_LEX printf("\tLEX: %s(%d) at line %d\n", yytext, yyval, yylineno);
-*/
-#define DEBUG_LEX
-
-
-#define QUOTED_STRING_SIZE	100
-
-static int lex_bug4163217 = 1;
-static char quoted_string[QUOTED_STRING_SIZE];
-static int token_value;
-
-static void get_quoted_string();
-
-%}
-
-%%
-
-#.*\n					{ ; }
-[ \t\n]*				{ ; }
-\"					{ get_quoted_string();
-					  if (lex_bug4163217) return QUOTEDSTRING;
-					}
-
-\{					{ DEBUG_LEX if (lex_bug4163217) return OPENBRACKET; }
-\}					{ DEBUG_LEX if (lex_bug4163217) return CLOSEBRACKET; }
-\.					{ DEBUG_LEX if (lex_bug4163217) return DOT; }
-=					{ DEBUG_LEX if (lex_bug4163217) return EQUAL; }
-\,					{ DEBUG_LEX if (lex_bug4163217) return COMA; }
-\[					{ DEBUG_LEX if (lex_bug4163217) return OPENSQUAREBRACKET; }
-\]					{ DEBUG_LEX if (lex_bug4163217) return CLOSESQUAREBRACKET; }
-\-					{ DEBUG_LEX if (lex_bug4163217) return MINUS; }
-
-[0-9]+					{ DEBUG_LEX token_value = atoi(yytext);
-					  if (lex_bug4163217) return NUMBER;
-					}
-
-[mM][aA][cC][rR][oO][sS]		{ DEBUG_LEX if (lex_bug4163217) return MACROS; }
-[aA][gG][eE][nN][tT][sS]		{ DEBUG_LEX if (lex_bug4163217) return AGENTS; }
-[nN][aA][mM][eE]			{ DEBUG_LEX if (lex_bug4163217) return NAME; }
-[sS][uU][bB][tT][rR][eE][eE][sS]	{ DEBUG_LEX if (lex_bug4163217) return SUBTREES; }
-[tT][aA][bB][lL][eE][sS]		{ DEBUG_LEX if (lex_bug4163217) return TABLES; }
-[tT][aA][bB][lL][eE]			{ DEBUG_LEX if (lex_bug4163217) return TABLE; }
-[cC][oO][lL][uU][mM][nN][sS]		{ DEBUG_LEX if (lex_bug4163217) return COLUMNS; }
-[iI][nN][dD][eE][xX][sS]		{ DEBUG_LEX if (lex_bug4163217) return INDEXS; }
-[iI][nN][dD][eE][xX][eE][sS]		{ DEBUG_LEX if (lex_bug4163217) return INDEXS; }
-[tT][iI][mM][eE][oO][uU][tT]		{ DEBUG_LEX if (lex_bug4163217) return TIMEOUT; }
-[pP][oO][rR][tT]			{ DEBUG_LEX if (lex_bug4163217) return PORT; }
-[wW][aA][tT][cC][hH][-_][dD][o0][gG][-_][tT][iI][mM][eE]        { DEBUG_LEX if (lex_bug4163217) return WATCHDOGTIME; }
-
-[cC][oO][mM][mM][uU][nN][iI][tT][iI][eE][sS] { DEBUG_LEX if (lex_bug4163217) return COMMUNITIES; }
-[rR][eE][aA][dD][-][oO][nN][lL][yY]     { DEBUG_LEX if (lex_bug4163217) return READONLY; }
-[rR][eE][aA][dD][-][wW][rR][iI][tT][eE] { DEBUG_LEX if (lex_bug4163217) return READWRITE; }
-[mM][aA][nN][aA][gG][eE][rR][sS]        { DEBUG_LEX if (lex_bug4163217) return MANAGERS; }
-[tT][rR][aA][pP] { DEBUG_LEX if (lex_bug4163217) return TRAP; }
-[tT][rR][aA][pP][-][nN][uU][mM] { DEBUG_LEX if (lex_bug4163217) return TRAPNUM; }
-[tT][rR][aA][pP][-][cC][oO][mM][mM][uU][nN][iI][tT][yY] { DEBUG_LEX if (lex_bug4163217) return TRAPCOMMUNITY; }
-[tT][rR][aA][pP][-][rR][eE][cC][iI][pP][iI][eE][nN][tT][sS] { DEBUG_LEX if (lex_bug4163217) return TRAPDESTINATORS; }
-
-[aA][cC][lL]				{ DEBUG_LEX if (lex_bug4163217) return ACL; }
-[aA][cC][cC][eE][sS][sS]                { DEBUG_LEX if (lex_bug4163217) return ACCESS; } 
-[hH][oO][sS][tT][sS]			{ DEBUG_LEX if (lex_bug4163217) return HOSTS; }
-
-mib-2					{ DEBUG_LEX if (lex_bug4163217) return MIB2; }
-sun					{ DEBUG_LEX if (lex_bug4163217) return SUN; }
-enterprise				{ DEBUG_LEX if (lex_bug4163217) return ENTERPRISE; }
-
-[a-zA-Z\*][_a-zA-Z0-9-]*			{ DEBUG_LEX if (lex_bug4163217) return IDENTIFIER; }
-
-.					{ error_exit("syntax error in %s at line %d: the token %s is not valid",
-						current_filename, yylineno, yytext);
-					}
-
-
-%%
-
-#undef input
-#undef unput
-#undef output
-
-/*
-# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
-# define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
-# define output(c) (void)putc(c,yyout)
-*/
-
-#define input() (((yytchar=*lexinput++)=='\n'?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
-#define unput(c) {yytchar= (c); if(yytchar=='\n')yylineno--;*--lexinput = yytchar;}
-#define output(c)
-
-/*************************************************************************/
-
-static void get_quoted_string()
-{
-	int i = 0;
-	int c;
-
-
-	c = input();
-	while( (c != 0) && (c != '"') )
-	{
-		if(c == '\n')
-		{
-			error_exit("syntax error at line %d: can not have a \\n in a quoted string", yylineno);
-		}
-
-		if(i < QUOTED_STRING_SIZE - 1)
-		{
-			quoted_string[i++] = c;
-		}
-
-		c = input();
-	}
-	quoted_string[i] = '\0';
-
-	if(c == 0)
-	{
-		error_exit("syntax error at line %d: have not found a quote before the end of file", yylineno);
-	}
-}
-
-
--- a/usr/src/cmd/agents/snmp/agent/personal.y	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1914 +0,0 @@
-%{
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-%}
-
-%start configuration
-
-%token NUMBER
-%token MACROS
-%token EQUAL
-%token OPENBRACKET
-%token CLOSEBRACKET
-%token IDENTIFIER
-%token MIB2
-%token SUN
-%token ENTERPRISE
-%token DOT
-%token AGENTS
-%token NAME
-%token SUBTREES
-%token TABLES
-%token TABLE
-%token COLUMNS
-%token INDEXS
-%token TIMEOUT
-%token PORT
-%token QUOTEDSTRING
-%token COMA
-%token MINUS
-%token OPENSQUAREBRACKET
-%token CLOSESQUAREBRACKET
-%token WATCHDOGTIME
-
-/* support SNMP security(5-13-96) */
-%token COMMUNITIES
-%token READONLY
-%token READWRITE
-%token MANAGERS
-%token TRAPCOMMUNITY
-%token TRAPDESTINATORS
-%token ACL
-%token ACCESS
-%token TRAPNUM
-%token HOSTS
-%token TRAP
-
-%{
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <string.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "pdu.h"
-
-#include "pagent.h"
-#include "subtree.h"
-
-/** SNMP security (5-13-96) */
-#include "trap.h"
-#include "agent_msg.h"
-#include "access.h"
-#include "snmpd.h"
-
-
-/***** DEFINE *****/
-
-/*
-#define DEBUG_YACC(string) printf("\t\tYACC: %s: %s at line %d\n", string, yytext, yylineno);
-*/
-#define DEBUG_YACC(string)
-
-#define SNMPRELAY_SUFFIX	".snmprelay"
-
-
-/***** TYPEDEF *****/
-
-typedef struct _Macro {
-	struct _Macro *next_macro;
-	char *label;
-	Oid name;
-} Macro;
-
-#include "table.h"
-static int table_index=0;
-
-
-/*
-typedef struct _Table {
-	struct _Table *next_table;
-	Agent *agent;
-	Oid name;
-	Subid regTblStartColumn;
-	Subid regTblEndColumn;
-	Subid regTblStartRow;
-	Subid regTblEndRow;
-} Table;
-*/
-
-
-
-/***** STATIC VARIABLES AND FUNCTIONS *****/
-
-/* access control(6-20-96) */
-static AccessServer *static_access_server=NULL;
-static AccessPolicy *static_access_policy=NULL;
-static Community *static_community=NULL;
-
-/* trap filter (6-25-96) */
-static SubMember *static_sub_member=NULL;
-static Manager *static_host=NULL;
-static EFilter *static_filter=NULL;
-static int static_trap_low=-1;
-static int static_trap_high=-1;
-
-/* snmp security(5-13-96) */
-static int community_type = 0;
-static char *current_filename = NULL;
-
-/* lexinput points to the current focus point in the config file */
-static char *lexinput;
-
-/* first_macro is the begining of the list	*/
-/* of the user defined macros			*/
-
-static Macro *first_macro = NULL;
-
-
-/* first_table is the begining of the list	*/
-/* of tables supported by the agents		*/
-
-static Table *first_table = NULL;
-static Table *last_table = NULL;
-
-
-/* the boolean parsing_oid is used to		*/
-/* know if we are parsing an			*/
-/* object identifier or not.			*/
-
-static int parsing_oid = False;
-
-
-/* here are the values of the predifined macros	*/
-/* that can be used in the configuration file	*/
-
-static Subid subids_mib2[] = { 1, 3, 6, 1, 2, 1 };
-static int mib2_len = 6;
-static Subid subids_enterprise[] = { 1, 3, 6, 1, 4, 1 };
-static int enterprise_len = 6;
-static Subid subids_sun[] = { 1, 3, 6, 1, 4, 1, 42 };
-static int sun_len = 7;
-
-
-/* the 2 static variables static_subids and	*/
-/* static_len are used when parsing an	*/
-/* object identifier. Then the boolean		*/
-/* parsing_oid should be true. When a new sub-	*/
-/* identifier (or a list of sub-identifiers)	*/
-/* is found, we use the function		*/
-/* subids_cat to append it to the static_subids.*/
-
-static Subid *static_subids = NULL;
-static int static_len = 0;
-static int subids_cat(Subid *subids, int len);
-
-
-/* macro_add() is used to append a macro to	*/
-/* the macro list. macro_find is used to find	*/
-/* a macro in the macro list			*/
-
-static Macro *macro_add(char *label, Subid *subids, int len);
-static Macro *macro_find(char *label);
-static void macro_free(Macro *mp);
-static void macro_list_delete();
-
-
-static void table_free(Table *tp);
-static void table_list_delete();
-
-extern int SSARegSubagent(Agent *);
-extern int SSASubagentOpen(int, char *);
-extern int SSARegSubtable(SSA_Table *);
-
-/* static_label is used when parsing a macro	*/
-static char *static_label = NULL;
-
-/* static_agent is used when parsing an agent	*/
-static Agent *static_agent = NULL;
-
-/* static_table is used when parsing n table	*/
-static Table *static_table = NULL;
-
-/* static_inf_value and static_max_value are	*/
-/* used when parsing a range			*/
-static int static_inf_value = -1;
-static int static_sup_value = -1;
-
-static int count;
-%}
-
-%%
-
-
-configuration :	agents | macros agents | snmp_security
-		{
-			DEBUG_YACC("configuration")
-		}
-
-/******************* SNMP security (5-13-96) *********/
-snmp_security : acls  trap_block  /*trapcommunity trapdestinators*/
-                {
-                        DEBUG_YACC("security configuration")
-                }
-
-/***************/
-/* accesscontrol */
-/***************/
-
-acls :	/*empty */ | t_acls t_equal t_openbracket acls_list t_closebracket
-		{
-			DEBUG_YACC("acls_list")
-		}
-		| t_acls t_equal t_openbracket error t_closebracket
-		{
-		  error("BUG: acl stmt parsing error at line %d",yylineno);
-		  if(static_access_policy != NULL){
-			access_policy_list_free(static_access_policy);
-			static_access_policy = NULL;
-		  }
-		}
-
-acls_list : /*empty*/ | acls_list acl_item 
-	{
-		DEBUG_YACC("acls_list")
-	}
-
-acl_item : t_openbracket 
-	{
-		static_access_policy = calloc(1,sizeof(AccessPolicy));
-		if(static_access_policy == NULL)
-		{
-			error("calloc() failed");
-			YYERROR;
-		}
-	} communities_stmt acl_access
-	{
-		if(static_access_policy!=NULL)
-			static_access_policy->access_type = community_type;	
-	} hosts t_closebracket
-	{
-		/* create AccessServer */
-		/* put the AccessPolicy into AccessServer */
-		/* put AccessServer into corresponding manager */
-		static_access_server = NULL;
-		static_access_policy = NULL;
-		static_community = NULL;
-		community_type = 0;
-	}
-
-communities_stmt :      t_communities t_equal communities_set
-        {
-                DEBUG_YACC("communities_stmt");
-        }
-
-communities_set : communities_set t_coma community_elem | community_elem
-	{
-		DEBUG_YACC("communities_set");
-	}
-
-community_elem : ct_identifier
-	{
-		if(static_access_policy==NULL){
-			error("acl statement error");
-			YYERROR;
-		}
-		/* add community into AccessPolicy */
-		static_community = calloc(1, sizeof(Community));
-		if(static_community == NULL)
-		{
-			error("calloc() failed");
-			YYERROR;
-		}	
-		static_community->name = strdup(yytext);
-		community_attach(static_access_policy,static_community);
-		static_community = NULL;
-	}
-
-acl_access:	t_access t_equal acl_access_type
-	{
-		DEBUG_YACC("acl_access")
-	}
-
-acl_access_type : t_readonly | t_readwrite
-		{
-			DEBUG_YACC("acl_access_type")
-		}
-
-hosts : t_managers t_equal hosts_list
-        { 
-                DEBUG_YACC("hosts") 
-        } 
-
-hosts_list : hosts_list t_coma host_item | host_item
-	{
-		DEBUG_YACC("hosts_list");
-	}
-
-host_item :  ct_identifier
-	{
-		/* add the host item to manager list */
-		/* it should return the pointer if exists */
-                Manager *res;
- 
-                DEBUG_YACC("manager_item")
- 
-                res = manager_add(yytext, error_label);
-                if(res==NULL){
-                                error("error in %s at line %d: %s",
-                                        current_filename? current_filename:
-"???",
-                                        yylineno, error_label);
-                } 
-		static_access_server = calloc(1,sizeof(AccessServer));
-		if(static_access_server == NULL)
-		{
-			error("malloc() failed");
-			if(static_access_policy) 
-			  access_policy_list_free(static_access_policy);
-			YYERROR;
-		}
-		if(static_access_policy!=NULL)
-			static_access_policy->count++;
-		static_access_server->first_acc_policy = static_access_policy;
-		access_server_add_tail(res,static_access_server);
-		static_access_server = NULL;
-	}
-
-
-/************/
-/* managers */
-/************/
- 
-/*
-managers :      t_managers t_equal t_openbracket managers_list t_closebracket
-                {
-                        DEBUG_YACC("agents")
-                }
- 
- 
-managers_list :  | managers_list list_separator manager_item
-                {
-                        DEBUG_YACC("managers_list")
-                }
- 
- 
-manager_item :  ct_identifier
-                {
-                        Manager *res;
- 
-                        DEBUG_YACC("manager_item")
- 
-                        res = manager_add(yytext, error_label);
-			if(res==NULL){
-                                        error("error in %s at line %d: %s",
-                                                current_filename? current_filename:
-"???",
-                                                yylineno, error_label);
-			}
-                }
-*/
-
-/*** trap hanlding (6-25-96) */
-trap_block :	t_trap t_equal t_openbracket trap_list t_closebracket
-		{
-			DEBUG_YACC("trap_block")
-		}
-		| t_trap t_equal t_openbracket error t_closebracket
-		{
-			/* clean up */
-			if(static_sub_member != NULL){
-			  sub_member_free(static_sub_member);
-			  static_sub_member=NULL;
-			}	
-		}
-
-trap_list : /*empty*/ | trap_list trap_item
-	{
-		DEBUG_YACC("trap_list")
-	}
-
-trap_item : t_openbracket
-	{
-		/* create submember */
-		static_sub_member = calloc(1,sizeof(SubMember));
-		if(static_sub_member == NULL)
-		{
-			error("malloc() failed");
-			YYERROR;
-		}
-	} trap_community_string trap_interest_hosts
-	{
-		/* attach submember to subgroup */
-	} enterprise_list t_closebracket
-	{
-		static_sub_member = NULL;
-	}
-
-trap_community_string : t_trapcommunity t_equal ct_identifier
-	{
-		/* set the community field in submember */
-		if(static_sub_member != NULL)
-		{
-			static_sub_member->community_string = strdup(yytext);
-			if(static_sub_member == NULL)
-			{	
-				error(ERR_MSG_ALLOC);
-				YYERROR;
-			}
-		}else{
-			error("BUG: missing trap community name");
-		}
-	}
-
-trap_interest_hosts : t_hosts t_equal trap_interest_hosts_list
-	{
-		DEBUG_YACC("trap_interest_hosts")
-	}
-
-trap_interest_hosts_list : trap_interest_hosts_list t_coma 
-		 trap_interest_host_item | trap_interest_host_item
-	{
-		DEBUG_YACC("trap_interest_hosts_list")
-	}
-
-trap_interest_host_item : ct_identifier
-	{
-		DEBUG_YACC("trap_interest_host_item")
-		/* attach host to the submember */
-		if(static_sub_member==NULL){
-		 	error("trap statement error");
-			YYERROR;
-		}else{
-		  static_host = calloc(1,sizeof(Manager));
-		  if(static_host == NULL)
-		  {
-			error("malloc() failed");
-			YYERROR;
-		  }
-		  static_host->name = strdup(yytext);
-		  if(name_to_ip_address(static_host->name, 
-			&static_host->ip_address,error_label)){
-			error("unknown host %s",static_host->name);
-			free(static_host);
-			static_host=NULL;
-			YYERROR;
-		  }
-		  static_host->next_manager = static_sub_member->first_manager;
-		  static_sub_member->first_manager=static_host;
-		  static_host=NULL;
-		}
-	}
-
-enterprise_list : /* empty */ | enterprise_list enterprise_item
-	{
-		DEBUG_YACC("enterprise_list")
-	}
-
-enterprise_item : t_openbracket enterprise_stmt trap_number_stmt 
-		  t_closebracket
-		{
-			DEBUG_YACC("enterprise_item")
-		}
-
-enterprise_stmt : ENTERPRISE t_equal t_quotedstring
-		{
-			/* currently, it supports single enterprise */
-
-			DEBUG_YACC("enterprise_stmt")
-			/* add or find the enterprise */
-			static_filter = efilter_add(quoted_string,error_label);
-			if(static_filter==NULL){
-			  error("error in %s at line %d: %s",
-				current_filename?current_filename:"???",
-				yylineno,error_label);
-			}
-		}
-
-trap_number_stmt : t_trap_num t_equal trap_number_list
-		{
-			DEBUG_YACC("trap_number_stmt")
-		}
-
-trap_number_list : trap_number_item
-		{
-			DEBUG_YACC("trap_number_list")
-		}
-		| trap_number_list t_coma trap_number_item
-		{
-			DEBUG_YACC("trap_number_list")
-		}
-
-trap_number_item : trap_range
-	{
-			DEBUG_YACC("trap_number_item")
-			/* for each trap, find/add to the
-			   enterprise, and add_tailthe subgroup 
-			   to each trap */
-
-			if(static_filter!=NULL){
-				/* expand the trap */
-				mem_filter_join(static_trap_low,
-					static_trap_high,static_sub_member,
-					static_filter);
-			}else{
-				error("error in enterprise statement");
-				YYERROR;
-			}
-	}
-
-trap_range :	 NUMBER
-		{
-			/* starting trap num */
-		 	static_trap_low = token_value;
-		}
-		t_minus NUMBER
-		{
-			/* ending trap num */
-			static_trap_high = token_value;
-		}
-		| NUMBER
-		{
-			/* start & end num the same */
-			DEBUG_YACC("trap_range")
-			static_trap_low=static_trap_high=token_value;
-		}
-
- 
-/*
-trapcommunity : t_trapcommunity t_equal ct_identifier
-                {
-                        DEBUG_YACC("trap_community")
-
-                        if(trap_community)
-                        {
-                                error("BUG: trap_community not NULL in trap_community");
-                        }
-
-                        trap_community = strdup(yytext);
-                        if(trap_community == NULL)
-                        {
-                                error(ERR_MSG_ALLOC);
-                                YYERROR;
-                        }
-                }
-*/
-
-/*******************/
-/* trapdestinators */
-/*******************/
-/*
-
-trapdestinators : t_trapdestinators t_equal t_openbracket trapdestinators_list t_closebracket
-                {
-                        DEBUG_YACC("trapdestinators")
-                }
-
-
-trapdestinators_list :  | trapdestinators_list list_separator trapdestinator_item
-                {
-                        DEBUG_YACC("trapdestinators_list")
-                }
-
-
-trapdestinator_item : ct_identifier
-                {
-                        int res; 
-
-                        DEBUG_YACC("trapdestinator_item")
- 
-                        res = trap_destinator_add(yytext, error_label);
-                        switch(res)
-                        {
-                                case 0:
-                                        break;
- 
-                                case 1:
-                                        error("error in %s at line %d: %s",
-                                                current_filename? current_filename:
-"???",
-                                                yylineno, error_label);
-                                        break;
- 
-                                default:
-                                        error("fatal error in %s at line %d: %s",
-                                                current_filename? current_filename:
-"???",
-                                                yylineno, error_label);
-                                        YYERROR;
-                        }
-                }
-
-*/
-
-/******************* SNMP security (5-13-96) *********/
-
-
-
-
-/**********/
-/* macros */
-/**********/
-
-macros :	t_macros t_equal t_openbracket macros_list t_closebracket
-		{
-			DEBUG_YACC("macros")
-		}
-
-
-macros_list :	/* empty */ | macros_list macro_item
-		{
-			DEBUG_YACC("macros_list")
-		}
-
-
-macro_item :	label t_equal
-		{
-			if(parsing_oid != False)
-			{
-				error("BUG at line %d: parsing_oid not False in macro_item", yylineno);
-			}
-			parsing_oid = True;
-
-			if(static_subids != NULL)
-			{
-				error("BUG at line %d: static_subids not NULL in macro_item", yylineno);
-			}
-			if(static_len != 0)
-			{
-				error("BUG at line %d: static_len not 0 in macro_item", yylineno);
-			}
-		}
-		subids_list
-		{
-			DEBUG_YACC("macro_item")
-	
-			if(macro_add(static_label, static_subids, static_len) == NULL)
-			{
-				error("error at line %d", yylineno);
-				YYERROR;
-			}
-
-			parsing_oid = False;
-			free(static_label);
-			static_label = NULL;
-			free(static_subids);
-			static_subids = NULL;
-			static_len = 0;
-		}
-
-
-label :		t_identifier
-		{
-			DEBUG_YACC("label")
-
-			if(static_label != NULL)
-			{
-				error("BUG at line %d: static_label not NULL in label", yylineno);
-			}
-			static_label = strdup(yytext);
-			if(static_label == NULL)
-			{
-				error("malloc() failed");
-				YYERROR;
-			}
-		}
-
-
-
-/**********/
-/* agents */
-/**********/
-
-agents :	t_agents t_equal t_openbracket agents_list t_closebracket
-		{
-			DEBUG_YACC("agents")
-		}
-
-
-agents_list :	agent_item | agents_list agent_item
-		{
-			DEBUG_YACC("agents_list")
-		}
-
-
-agent_item :		t_openbracket
-		{
-			if(static_agent != NULL)
-			{
-				error("BUG at line %d: static_agent not NULL in agent", yylineno);
-			}
-			static_agent = malloc(sizeof(Agent));
-			if(static_agent == NULL)
-			{
-				error("malloc() failed");
-				YYERROR;
-			}
-			(void)memset(static_agent, 0, sizeof(Agent));
-			/* LINTED */
-			static_agent->agent_id = (int32_t)getpid();
-			static_agent->agent_status = SSA_OPER_STATUS_NOT_IN_SERVICE;
-			static_agent->personal_file = strdup (current_filename);
-		}
-		name subtrees_tables timeout optional_watch_dog_time optional_port t_closebracket
-		{
-			DEBUG_YACC("agent_item");
-
-			/* add the agent id to agent, currently, agent_id is pid */
-			if(first_agent == NULL)
-			{
-				static_agent->next_agent = NULL;
-			}
-			else
-			{
-				static_agent->next_agent = first_agent;
-			}
-			first_agent = static_agent;
-
-			/* if port is 0, assigned a non-reserved available port */
-			if(static_agent->address.sin_port == 0 && agent_port_number != -1)
-			  static_agent->address.sin_port = agent_port_number;
-			else if(static_agent->address.sin_port==0)
-			  static_agent->address.sin_port =
-				get_a_non_reserved_port();
-			if (agent_port_number == -1)
-			  agent_port_number = static_agent->address.sin_port;
-
-			/* the registration is for confirmation and
-	 		   fill in extra value */
-			static_agent->agent_status = SSA_OPER_STATUS_ACTIVE;
-			if(SSARegSubagent(static_agent) == 0)
-			{
-				error("subagent registration failed");
-				YYERROR;
-			}
-			static_agent = NULL;
-		}
-
-
-name :		t_name t_equal t_quotedstring
-		{
-			DEBUG_YACC("name")
-
-			if(static_agent->name != NULL)
-			{
-				error("BUG at line %d: static_agent->name not NULL in name", yylineno);
-			}
-			static_agent->name = strdup(quoted_string);
-			if(static_agent->name == NULL)
-			{
-				error("malloc() failed");
-				YYERROR;
-			}
-/*
- * Increased the num. of retries for SSASubagentOpen in order to insure success
- * typically for boot time race condition between the master and subagent
- * Initial sleep is introduced to increase the probability of success the very
- * first time. This could be removed at a later time, after modifying the timeout
- * parameters for the subagent
- */ 
-                        (void)sleep(15);
-                        count=1;
-                        while(count) {
-			if( (static_agent->agent_id =
-			     SSASubagentOpen(max_agent_reg_retry,static_agent->name)) == INVALID_HANDLER )
-			{
-                              if (count == 5) {
-				error_exit("subagent registration failed");
-				YYERROR;
-                              }
-			}
-                        if (static_agent->agent_id ) break;
-                         count++;
-                        }
-			if(SSARegSubagent(static_agent) == 0)
-			{
-				error("subagent registration failed");
-				YYERROR;
-			}
-			/* LINTED */
-			static_agent->process_id = (int32_t)getpid();
-		}
-
-
-subtrees_tables :  subtrees tables | subtrees | tables
-		{
-			DEBUG_YACC("subtrees_tables")
-		}
-
-
-subtrees :	t_subtrees t_equal t_openbracket
-		{
-			if(parsing_oid != False)
-			{
-				error("BUG at line %d: parsing_oid is not False in subtrees", yylineno);
-			}
-			parsing_oid = True;
-
-			if(static_subids != NULL)
-			{
-				error("BUG at line %d: static_subids not NULL in subtrees", yylineno);
-			}
-			if(static_len != 0)
-			{
-				error("BUG at line %d: static_len not 0 in subtrees", yylineno);
-			}
-		}
-		subtrees_list t_closebracket
-		{
-			DEBUG_YACC("subtrees")
-
-			if(parsing_oid != True)
-			{
-				error("BUG at line %d: parsing_oid is not True in subtrees", yylineno);
-			}
-			parsing_oid = False;
-		}
-
-
-subtrees_list : /* empty */ | subtrees_list_coma_separated
-		{
-			DEBUG_YACC("subtrees_list")
-		}
-
-
-subtrees_list_coma_separated : subtree_item | subtrees_list_coma_separated t_coma subtree_item
-		{
-			DEBUG_YACC("subtrees_list_coma_separated")
-		}
-
-
-subtree_item : subids_list
-		{
-			DEBUG_YACC("subtree_item")
-
-			if(parsing_oid != True)
-			{
-				error("BUG at line %d: parsing_oid is not True in subtree_item", yylineno);
-			}
-
-			if(subtree_add(static_agent, static_subids, static_len) == -1)
-			{
-				error("error at line %d", yylineno);
-				YYERROR;
-			}
-
-			free(static_subids);
-			static_subids = NULL;
-			static_len = 0;
-		}
-
-
-tables :	t_tables t_equal t_openbracket tables_list t_closebracket
-		{
-			DEBUG_YACC("tables")
-		}
-
-
-tables_list :	/* empty */ | tables_list table_item
-		{
-			DEBUG_YACC("tables_list")
-		}
-
-
-table_item :	t_openbracket
-		{
-			if(static_agent == NULL)
-			{
-				error("BUG at line %d: static_agent is NULL in table_item", yylineno);
-			}
-
-			if(static_table)
-			{
-				error("BUG at line %d: static_table not NULL in table_item", yylineno);
-			}
-
-			static_table = calloc(1,sizeof(Table));
-			if(static_table == NULL)
-			{
-				error("malloc() failed");
-				YYERROR;
-			}
-			static_table->regTblStatus =
-			 SSA_OPER_STATUS_NOT_IN_SERVICE;
-			static_table->next_table = NULL;
-			static_table->agent = static_agent;
-			if(static_agent!=NULL)
-			  static_table->regTblAgentID =
-			  static_agent->agent_id;
-			static_table->regTblOID.subids = NULL;
-			static_table->regTblOID.len = 0;
-			static_table->regTblStartColumn = 0;
-			static_table->regTblEndColumn = 0;
-			static_table->regTblIndex = ++table_index;
-/*
-			static_table->indexs.subids = NULL;
-			static_table->indexs.len = 0;
-*/
-		}
-		table columns indexs t_closebracket
-		{
-			DEBUG_YACC("table_item")
-
-			if(static_table == NULL)
-			{
-				error_exit("BUG at line %d: static_table is NULL in table_item", yylineno);
-			}
-	
-		 	/* register the table, if register fails, delete 
-			   the table */
-			if(SSARegSubtable(static_table)==0){
-				/* unregister the table */
-				
-				error_exit("TABLE CONFIG");
-			}
-	
-
-			if(last_table)
-			{
-				last_table->next_table = static_table;
-			}
-			else
-			{
-				first_table = static_table;
-			}
-			last_table = static_table;
-			static_table = NULL;
-		}
-
-
-table :		t_table t_equal
-		{
-			if(parsing_oid != False)
-			{
-				error("BUG at line %d: parsing_oid is not False in tables", yylineno);
-			}
-
-			parsing_oid = True;
-		}
-		subids_list
-		{
-			DEBUG_YACC("table")
-
-			if(parsing_oid != True)
-			{
-				error("BUG at line %d: parsing_oid is not True in tables", yylineno);
-			}
-			parsing_oid = False;
-
-			if(static_table == NULL)
-			{
-				error_exit("BUG at line %d: static_table is NULL in table", yylineno);
-			}
-
-			static_table->regTblOID.subids = static_subids;
-			static_subids = NULL;
-			static_table->regTblOID.len = static_len;
-			static_len = 0;
-		}
-
-
-columns :	t_columns t_equal range
-		{
-			DEBUG_YACC("columns")
-
-			if(static_table == NULL)
-			{
-				error_exit("BUG at line %d: static_table is NULL in columns", yylineno);
-			}
-
-			static_table->regTblStartColumn = static_inf_value;
-			static_inf_value = -1;
-			static_table->regTblEndColumn = static_sup_value;
-			static_sup_value = -1;
-		}
-
-
-/*
-indexs :	t_indexs t_equal
-		{
-			if(parsing_oid != False)
-			{
-				error("BUG at line %d: parsing_oid is not False in indexs", yylineno);
-			}
-
-			parsing_oid = True;
-		}
-		subids_list
-		{
-			DEBUG_YACC("indexs")
-
-			if(parsing_oid != True)
-			{
-				error("BUG at line %d: parsing_oid is not True in indexs", yylineno);
-			}
-			parsing_oid = False;
-
-			if(static_table == NULL)
-			{
-				error_exit("BUG at line %d: static_table is NULL in indexs", yylineno);
-			}
-
-			static_table->indexs.subids = static_subids;
-			static_subids = NULL;
-			static_table->indexs.len = static_len;
-			static_len = 0;
-		}
-*/
-
-indexs :	t_indexs t_equal range
-		{
-			DEBUG_YACC("indexs")
-
-			if(static_inf_value == -1)
-			{
-				error("BUG at line %d: static_inf_value is -1", yylineno);
-			}
-			if(static_sup_value == -1)
-			{
-				error("BUG at line %d: static_sup_value is -1", yylineno);
-			}
-			static_table->regTblStartRow = static_inf_value;
-			static_table->regTblEndRow = static_sup_value;
-			static_inf_value = -1;
-			static_sup_value = -1;
-		}
-
-
-range :		t_opensquarebracket t_number
-		{
-			if(static_inf_value != -1)
-			{
-				error("BUG at line %d: static_inf_value (%d) is not -1 in range",
-					yylineno,
-					static_inf_value);
-			}
-
-			static_inf_value = token_value;
-		}
-		t_minus t_number
-		{
-			if(static_sup_value != -1)
-			{
-				error("BUG at line %d: static_sup_value (%d) is not -1 in range",
-					yylineno,
-					static_inf_value);
-			}
-
-			static_sup_value = token_value;
-		}
-		t_closesquarebracket
-		{
-			DEBUG_YACC("range")
-		}
-		| t_number
-		{
-			if(static_inf_value != -1)
-			{
-				error("BUG at line %d: static_inf_value (%d) is not -1 in range",
-					yylineno,
-					static_inf_value);
-			}
-			if(static_sup_value != -1)
-			{
-				error("BUG at line %d: static_sup_value (%d) is not -1 in range",
-					yylineno,
-					static_sup_value);
-			}
-
-			static_inf_value = token_value;
-			static_sup_value = token_value;
-		}
-
-
-timeout :	t_timeout t_equal t_number
-		{
-			DEBUG_YACC("subtree")
-
-			static_agent->timeout = token_value;
-		}
-
-optional_watch_dog_time : /*empty*/ |   t_watch_dog_time t_equal NUMBER
-                {
-                        DEBUG_YACC("optional_watch_dog_time")
-                        static_agent->watch_dog_time = token_value;
-                }
-
-optional_port:	/*empty*/ | port
-	{
-                        DEBUG_YACC("optional_port")
-	}
-
-port :		t_port t_equal t_number
-		{
-			DEBUG_YACC("port")
-
-			if(token_value > 0xFFFF)
-			{
-				error("error at line %d: the port number (%d) should not be greater than %d", yylineno, token_value, 0xFFFF);
-				YYERROR;
-			}
-
-			/* LINTED */
-			static_agent->address.sin_port = (short) token_value;
-
-			if(agent_find(&(static_agent->address)))
-			{
-				error("error at line %d: the port number %d is already used by another agent", yylineno, token_value);
-				YYERROR;
-			}
-		}
-
-
-
-/***************/
-/* subids_list */
-/***************/
-
-subids_list :	subid | subids_list t_dot subid
-		{
-			DEBUG_YACC("subids_list")
-		}
-
-
-subid :		t_mib2 | t_sun | t_enterprise | t_identifier | t_number
-		{
-			DEBUG_YACC("subid")
-		}
-
-
-
-/*******************/
-/* terminal tokens */
-/*******************/
-
-/**************** SNMP security (5-13-96) ***/
-ct_identifier : IDENTIFIER
-		{
-			DEBUG_YACC("ct_indentifier")
-		}
-
-t_communities : COMMUNITIES
-                {
-                        DEBUG_YACC("t_communities")
-                }
-
-t_hosts : HOSTS
-	{
-		DEBUG_YACC("t_hosts")
-	}
-
-t_acls  : ACL
-        {
-                DEBUG_YACC("t_acls")
-        }
-
-t_access : ACCESS
-	{
-		DEBUG_YACC("t_access")
-	}
-
-t_readonly :    READONLY
-                {
-                        DEBUG_YACC("t_readonly")
-
-                        community_type = READ_ONLY;
-                }
-
-t_readwrite :   READWRITE
-                {
-                        DEBUG_YACC("t_readwrite")
-
-                        community_type = READ_WRITE;
-                }
-
-t_managers :    MANAGERS
-                {
-                        DEBUG_YACC("t_managers")
-                }
-
-
-t_trap :	TRAP
-		{
-			DEBUG_YACC("t_trap")
-		}
-
-t_trap_num:	TRAPNUM
-		{
-			DEBUG_YACC("t_trap_num")
-		}
-
-t_trapcommunity : TRAPCOMMUNITY
-                {
-                        DEBUG_YACC("t_trapcommunity")
-                }
-
-
-/*
-t_trapdestinators : TRAPDESTINATORS
-                {
-                        DEBUG_YACC("t_trapdestinators")
-                }
-
-list_separator : | t_coma
-                {
-                        DEBUG_YACC("list_separator")
-                }
-*/
-
-
-/**************** SNMP security (5-13-96) ***/
-
-
-t_number :	NUMBER
-		{
-			DEBUG_YACC("t_number")
-
-			if(parsing_oid == True)
-			{
-				if(subids_cat((Subid *) &token_value, 1) == -1)
-				{
-					YYERROR;
-				}
-			}
-		}
-
-
-t_macros :	MACROS
-		{
-			DEBUG_YACC("t_macros")
-		}
-
-
-t_equal :	EQUAL
-		{
-			DEBUG_YACC("t_equal")
-		}
-
-
-t_minus :	MINUS
-		{
-			DEBUG_YACC("t_minus")
-		}
-
-
-t_openbracket :	OPENBRACKET
-		{
-			DEBUG_YACC("t_openbracket")
-		}
-
-
-t_closebracket : CLOSEBRACKET
-		{
-			DEBUG_YACC("t_closebracket")
-		}
-
-
-t_opensquarebracket : OPENSQUAREBRACKET
-		{
-			DEBUG_YACC("t_opensquarebracket")
-		}
-
-
-t_closesquarebracket : CLOSESQUAREBRACKET
-		{
-			DEBUG_YACC("t_closesquarebracket")
-		}
-
-
-t_identifier :	IDENTIFIER
-		{
-			DEBUG_YACC("t_identifier")
-
-			if(parsing_oid == True)
-			{
-				Macro *mp;
-
-
-				mp = macro_find(yytext);
-				if(mp == NULL)
-				{
-					error("error at line %d: %s is not a macro", yylineno, yytext);
-					YYERROR;
-				}
-
-				if(subids_cat(mp->name.subids, mp->name.len) == -1)
-				{
-					YYERROR;	
-				}
-			}
-		}
-
-
-t_mib2 :	MIB2
-		{
-			DEBUG_YACC("t_mib2")
-
-			if(parsing_oid == False)
-			{
-				error("BUG at line %d: parsing_oid not True in t_mib2", yylineno);
-			}
-			if(subids_cat(subids_mib2, mib2_len) == -1)
-			{
-				YYERROR;
-			}
-		}
-
-
-t_sun :		SUN
-		{
-			DEBUG_YACC("t_sun")
-
-			if(parsing_oid == False)
-			{
-				error("BUG at line %d: parsing_oid not True in t_sun", yylineno);
-			}
-			if(subids_cat(subids_sun, sun_len) == -1)
-			{
-				YYERROR;
-			}
-		}
-
-
-t_enterprise :	ENTERPRISE
-		{
-			DEBUG_YACC("t_enterprise")
-
-			if(parsing_oid == False)
-			{
-				error("BUG at line %d: parsing_oid not True in t_enterprise", yylineno);
-			}
-			if(subids_cat(subids_enterprise, enterprise_len) == -1)
-			{
-				YYERROR;
-			}
-		}
-
-t_dot :		DOT
-		{
-			DEBUG_YACC("t_dot")
-		}
-
-
-t_agents :	AGENTS
-		{
-			DEBUG_YACC("t_agents")
-		}
-
-
-t_name :	NAME
-		{
-			DEBUG_YACC("t_name")
-		}
-
-
-t_subtrees :	SUBTREES
-		{
-			DEBUG_YACC("t_subtrees")
-		}
-
-
-t_tables :	TABLES
-		{
-			DEBUG_YACC("t_tables")
-		}
-
-
-t_table :	TABLE
-		{
-			DEBUG_YACC("t_table")
-		}
-
-
-t_columns :	COLUMNS
-		{
-			DEBUG_YACC("t_columns")
-		}
-
-
-t_indexs :	INDEXS
-		{
-			DEBUG_YACC("t_indexs")
-		}
-
-
-t_timeout :	TIMEOUT
-		{
-			DEBUG_YACC("t_timeout")
-		}
-
-t_watch_dog_time :      WATCHDOGTIME
-                {
-                        DEBUG_YACC("t_watch_dog_time")
-                }
-
-t_port :	PORT
-		{
-			DEBUG_YACC("t_port")
-		}
-
-
-t_quotedstring : QUOTEDSTRING
-		{
-			DEBUG_YACC("t_quotedstring\n")
-		}
-
-
-t_coma :	COMA
-		{
-			DEBUG_YACC("t_coma")
-		}
-%%
-
-#include "personal.lex.c"
-
-/****************************************************************/
-
-static int subids_cat(Subid *subids, int len)
-{
-	Subid *new_subids;
-	int new_len;
-
-
-	new_len = static_len + len;
-			/* LINTED */
-	new_subids = (Subid *) malloc(new_len * (int32_t)sizeof(Subid));
-	if(new_subids == NULL)
-	{
-		error("malloc() failed");
-		if(static_subids)
-		{
-			free(static_subids);
-		}
-		static_subids = NULL;
-		static_len = 0;
-		return -1;
-	}
-			/* LINTED */
-	(void)memcpy(new_subids, static_subids, static_len * (int32_t)sizeof(Subid));
-			/* LINTED */
-	(void)memcpy(&(new_subids[static_len]), subids, len * (int32_t)sizeof(Subid));
-
-
-	if(static_subids)
-	{
-		free(static_subids);
-	}
-	static_subids = new_subids;
-	static_len = new_len;
-
-	return 0;
-}
-
-
-/****************************************************************/
-
-static Macro *macro_add(char *label, Subid *subids, int len)
-{
-	Macro *new;
-
-
-	if(macro_find(label) != NULL)
-	{
-		error("%s is already a macro", label);
-		return NULL;
-	}
-
-	new = (Macro *) malloc(sizeof(Macro));
-	if(new == NULL)
-	{
-		error("malloc() failed");
-		return NULL;
-	}
-	new->label = NULL;
-	new->name.subids = NULL;
-
-	new->label = strdup(label);
-	if(new->label == NULL)
-	{
-		error("malloc() failed");
-		macro_free(new);
-		return NULL;
-	}
-			/* LINTED */
-	new->name.subids = (Subid *) malloc(len * (int32_t)sizeof(Subid));
-	if(new->name.subids == NULL)
-	{
-		error("malloc() failed");
-		macro_free(new);
-		return NULL;
-	}
-			/* LINTED */
-	(void)memcpy(new->name.subids, subids, len * (int32_t)sizeof(Subid));
-	new->name.len = len;
-	new->next_macro = first_macro;
-	first_macro = new;
-
-	return new;
-}
-
-
-/****************************************************************/
-
-static Macro *macro_find(char *label)
-{
-	Macro *mp;
-
-
-	for(mp = first_macro; mp; mp = mp->next_macro)
-	{
-		if(strcmp(mp->label, label) == 0)
-		{
-			return mp;
-		}
-	}
-
-	return NULL;
-}
-
-
-/****************************************************************/
-
-static void macro_free(Macro *mp)
-{
-	if(mp == NULL)
-	{
-		return;
-	}
-
-	if(mp->label)
-	{
-		free(mp->label);
-	}
-
-	if(mp->name.subids)
-	{
-		free(mp->name.subids);
-	}
-
-	free(mp);
-
-	return;
-}
-
-
-/****************************************************************/
-
-static void macro_list_delete()
-{
-	Macro *mp = first_macro;
-	Macro *next;
-
-
-	while(mp)
-	{
-		next = mp->next_macro;
-
-		macro_free(mp);
-
-		mp = next;
-	}
-
-	first_macro = NULL;
-
-	return;
-}
-
-
-
-/****************************************************************/
-
-int yyerror(char *s)
-{
-	error("%s at line %d: %s", s, yylineno, yytext);
-
-	return (0);
-}
-
-
-/****************************************************************/
-
-/* If we have a serious problem, this function will	*/
-/* terminate (<==> exit) the program			*/
-
-void config_init(char *filename)
-{
-		struct stat statb;
-		char *fileaddr;
-		int fd;
-
-
-		yylineno = 1;
-
-		if((fd = open(filename, O_RDONLY)) < 0)
-		{
-			error_exit(ERR_MSG_OPEN,
-				filename, errno_string());
-		}
-
-		/* 
-		 * get the size of the file
-		 */
-		if(fstat(fd, &statb) < 0)
-		{
-			error_exit(ERR_MSG_FSTAT,
-				filename, errno_string());
-		}
-		if(!S_ISREG(statb.st_mode))
-		{
-			error_exit("filename: %s is not a file\n",filename);
-		}
-
-		/* 
-		 * and map it into my address space
-		 */
-		if(statb.st_size != 0)
-		{
-			/* Purify IPR/IPW error - bug 4124843. yylook wants to
-			   read the last + 1 byte to decide EOF */
-			/* LINTED */
-			if((fileaddr = (char *) mmap(0, (int32_t)statb.st_size+1, PROT_READ|PROT_WRITE,
-				MAP_PRIVATE, fd, 0)) <= (char *) 0)
-			{
-				error_exit(ERR_MSG_MMAP,
-					filename, errno_string());
-			}
-
-			/*
-			 * set current lex focus on the file
-			 */
-
-			lexinput = fileaddr;
-
-			/*
-			 * and parse the file
-			 */
-			current_filename = filename;
-			if(yyparse() == 1)
-			{
-				error_exit("parsing %s failed", filename);
-			}
-			current_filename = NULL;
-
-			/*
-			 * Parsing is finished
-			 *
-			 * unmap the file and close it
-			 */
-
-			/* Purify IPR/IPW error - bug 4124843 */
-			/* LINTED */
-			if(munmap(fileaddr, (int32_t)statb.st_size+1) == -1)
-			{
-				error(ERR_MSG_MUNMAP, errno_string());
-			}
-		}
-		else
-		{
-			/* empty file, ignore it */
-
-			error_exit("empty configuration file %s", filename);
-		}
-
-		if(close(fd) == -1)
-		{
-			error(ERR_MSG_CLOSE, errno_string());
-		}
-
-		macro_list_delete();
-
-
-	table_list_delete();
-
-
-	if(first_agent == NULL)
-	{
-		error_exit("No SNMP agent configured");
-	}
-
-	if(trace_level > 0)
-	{
-		trace_subtrees();
-		trace_agents();
-	}
-}
-
-
-/****************************************************************/
-
-static void table_list_delete()
-{
-	Table *next;
-
-	while(first_table)
-	{
-		next = first_table->next_table;
-		table_free(first_table);
-		first_table = next;
-	}
-
-	first_table = NULL;
-	last_table = NULL;
-}
-
-
-/****************************************************************/
-
-static void table_free(Table *tp)
-{
-	if(tp == NULL)
-	{
-		return;
-	}
-
-	if(tp->regTblOID.subids)
-	{
-		free(tp->regTblOID.subids);
-	}
-
-/*
-	if(tp->indexs.subids)
-	{
-		free(tp->indexs.subids);
-	}
-*/
-
-	free(tp);
-}
-
-
-/****************************************************************/
-
-
-/*********** SNMP security (5-13-96) ******/
-/* If we have a serious problem, this function will	*/
-/* terminate (<==> exit) the program			*/
-
-void sec_config_init(char *filename)
-{
-	struct stat statb;
-	char *fileaddr;
-	int fd;
-
-
-	delete_manager_list();
-	delete_community_list();
-	if(trap_community)
-	{
-		free(trap_community);
-		trap_community = NULL;
-	}
-	delete_trap_destinator_list();
-
-
-	yylineno = 1;
-
-	if((fd = open(filename, O_RDONLY)) < 0)
-	{
-		error_exit(ERR_MSG_OPEN,
-			filename, errno_string());
-	}
-
-	/* 
-	 * get the size of the file
-	 */
-	if(fstat(fd, &statb) < 0 )
-	{
-		error_exit(ERR_MSG_FSTAT,
-			filename, errno_string());
-	}
-	if(!S_ISREG(statb.st_mode))
-	{
-		error_exit("filename: %s is not a file\n",filename);
-	}
-
-	/* 
-	 * and map it into my address space
-	 */
-	if(statb.st_size)
-	{
-		/* Purify IPR/IPW error - bug 4124843. yylook wants to
-		   read the last + 1 byte to decide EOF */
-			/* LINTED */
-		if((fileaddr = (char *) mmap(0, (int32_t)statb.st_size+1, PROT_READ|PROT_WRITE,
-			MAP_PRIVATE, fd, 0)) <= (char *) 0)
-		{
-			error_exit(ERR_MSG_MMAP,
-				filename, errno_string());
-		}
-
-		/*
-		 * set current lex focus on the file
-		 */
-
-		lexinput = fileaddr;
-
-		/*
-		 * and parse the file
-		 */
-
-		current_filename = filename;
-		if(yyparse() == 1)
-		{
-			error_exit("parsing %s failed", filename);
-		}
-		current_filename = NULL;
-
-		/*
-		 * Parsing is finished
-		 *
-		 * unmap the file and close it
-		 */
-
-		/* Purify IPR/IPW error - bug 4124843 */
-			/* LINTED */
-		if(munmap(fileaddr, (int32_t)statb.st_size+1) == -1)
-		{
-			error(ERR_MSG_MUNMAP,
-				errno_string());
-		}
-	}
-	else
-	{
-		/* empty file, ignore it */
-
-		error_exit("empty configuration file %s", filename);
-	}
-
-	if(close(fd) == -1)
-	{
-		error(ERR_MSG_CLOSE, errno_string());
-	}
-
-	if(trace_level > 0)
-	{
-		trace("\n");
-		trace_managers();
-		trace_filter();
-		trace_trap_destinators();
-	}
-}
-/*********** SNMP security (5-13-96) ******/
-
-int yywrap()
-{
-  return 1;
-}
-
-static int get_a_non_reserved_port()
-{
-  struct sockaddr_in me;
-  socklen_t len;
-  int cnt=0;
-  int sd;
-
-  sd = socket(AF_INET,SOCK_DGRAM,0);
-  if(sd<0) return 0;
-  me.sin_family = AF_INET;
-  me.sin_addr.s_addr = INADDR_ANY;
-
-  for(;cnt<5;cnt++){
-    me.sin_port = htons(0);
-    if(bind(sd,(struct sockaddr*)&me,sizeof(me))!=0)continue;
-    len = (socklen_t) sizeof(me);
-    if(getsockname(sd,(struct sockaddr*)&me, &len)==-1) continue;
-    (void)close(sd);
-    return me.sin_port;
-  }
-  (void)close(sd);
-  return 0;
-}
--- a/usr/src/cmd/agents/snmp/agent/reg_subtree.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1095 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/times.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <errno.h>
-#include <syslog.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <nlist.h>
-#include <limits.h>
-#include <stdlib.h>
-
-#include "asn1.h"
-#include "snmp_msg.h"
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "request.h"
-#include "pagent.h"
-#include "subtree.h"
-#include "table.h"
-#include "trap.h"
-#include "node.h"
-
-#define	READ_COMM	"public"
-#define	WRITE_COMM	"private"
-
-#define REG_AGENT_ID		1
-#define REG_AGENT_STATUS	2
-#define REG_AGENT_TIME_OUT	3
-#define REG_AGENT_PORT_NUMBER	4
-#define REG_AGENT_PERSONAL_FILE	5	
-#define REG_AGENT_CONFIG_FILE	6	
-#define REG_AGENT_EXECUTABLE	7
-#define REG_AGENT_VERSION_NUM	8
-#define REG_AGENT_PROCESS_ID	9
-#define REG_AGENT_NAME		10
-#define REG_AGENT_SYSTEM_UP_TIME 11
-
-#define REG_TREE_INDEX		1
-#define REG_TREE_AGENT_ID	2
-#define REG_TREE_OID		3
-#define REG_TREE_STATUS		4
-
-#define REG_TBL_INDEX		1
-#define REG_TBL_AGENT_ID	2
-#define REG_TBL_OID		3
-#define REG_TBL_SCOL	 	4
-#define REG_TBL_ECOL		5
-#define REG_TBL_SROW		6
-#define REG_TBL_EROW		7
-#define REG_TBL_STATUS		8
-#define FAIL 0
-#define SUCCESS 1
-
-#define	SNMP_COMM_MAX		32
-#define	AGENT_CONFIG_FILE	"/etc/snmp/conf/snmpd.conf"
-#define	MAX_CONFIG_FILE		128
-char	snmp_fullmib_read_community[SNMP_COMM_MAX] = {NULL};
-char	agent_config_file[MAX_CONFIG_FILE] = AGENT_CONFIG_FILE;
-
-int set_conf_word();
-int agent_read_config();
-
-struct cmd {
-	char *name;
-	int (*rtn)();
-	char *arg1;
-	int arg2;
-} cmds[] = {
-	{ "read-community", set_conf_word,
-	snmp_fullmib_read_community, SNMP_COMM_MAX },
-	{ 0, 0, 0, 0}
-};
-
-/* global variable */
-struct CallbackItem *callItem = NULL;
-int numCallItem=0;
-int *trapTableMap=NULL;
-struct TrapHndlCxt *trapBucket=NULL;
-struct TrapEnterpriseInfo *trapEnterpriseInfo=NULL;
-/* For arbitrary length enterprise OID in traps - bug 4133978 */
-struct TrapAnyEnterpriseInfo *trapAnyEnterpriseInfo=NULL;
-int numTrapElem=0;
-extern int dont_read_config_file;
-
-static Subid reg_subagent_subids[] = { 1,3,6,1,4,1,42,2,15,8,1,0,0 };
-static Oid reg_subagent_oid = {reg_subagent_subids, 13 };
-
-static Subid agent_tbl_index_subids[] = { 1,3,6,1,4,1,42,2,15,9,0 };
-static Oid agent_tbl_index_oid = { agent_tbl_index_subids, 11 };
-static Subid reg_tree_ra_subids[] = { 1,3,6,1,4,1,42,2,15,12,1,3,0,0};
-static Oid reg_tree_ra_oid = { reg_tree_ra_subids, 14};
-
-static Subid ra_trap_port_subids[] = { 1,3,6,1,4,1,42,2,15,4,0};
-static Oid ra_trap_port_oid = { ra_trap_port_subids, 11};
-
-static Subid ra_check_point_subids[] = { 1,3,6,1,4,1,42,2,15,5,0};
-static Oid ra_check_point_oid = { ra_check_point_subids, 11};
-
-/* last three numbers are columar obj, agentid, table_id */
-static Subid reg_shared_table_subids[] = { 1,3,6,1,4,1,42,2,15,10,1,0,0,0};
-static Oid reg_shared_table_oid = { reg_shared_table_subids, 14};
-
-static int _SSASendTrap_generic(char *, int);
-static int _SSASendTrap_generic2(char *, int, IndexType *);
-
-/*
- * agent table id can be: from command line, global var. sap_agent_tbl_id,
- * or from getpid(). The agent_id can be less than one.
- */
-int
-sap_glb_agent_table_id()
-{
-	return((int)getpid());
-}
-
-SNMP_variable *
-sap_append_integer_variable(SNMP_variable *list, Oid *oid, int num)
-{
-  SNMP_value value;
-
-  value.v_integer = num;
-  list = snmp_typed_variable_append(list,oid,INTEGER,&value,error_label);
-  if(list == NULL){
-	error("sap_append_integer_variable failed: oid: %s, value: %d\n",
-		SSAOidString(oid),num);
-  }
-  return(list);
-}
-
-SNMP_variable *
-sap_append_variable(SNMP_variable *list, Oid *oid, int num, int type)
-{
-  SNMP_value value;
-
-  value.v_integer = num;
-  list = snmp_typed_variable_append(list,oid,type,&value,error_label);
-  if(list == NULL){
-	error("sap_append_variable failed: oid: %s, value: %d, type: %d\n",
-		SSAOidString(oid),num,type);
-  }
-  return(list);
-}
-
-SNMP_variable *sap_append_string_variable(SNMP_variable *list, Oid *oid, char* str)
-{
-  SNMP_value value;
-
-  if(str == NULL) return NULL;
-  value.v_string.chars = (u_char *)str;
-  /* LINTED */
-  value.v_string.len = (int)strlen(str);
-  list = snmp_typed_variable_append(list,oid,STRING,&value,error_label);
-  if(list == NULL){
-	error("sap_append_string_variable failed: oid: %s, value: %s\n"
-		, SSAOidString(oid),str);
-  }
-  return(list);
-}
-
-SNMP_variable *sap_append_oid_variable(SNMP_variable *list, Oid *oid, Oid* name)
-{
-  SNMP_value value;
-
-  if(oid == NULL || name == NULL) return NULL;
-  value.v_oid.subids = name->subids;
-  value.v_oid.len = name->len;	
-  list = snmp_typed_variable_append(list,oid,OBJID,&value,error_label);
-  if(list == NULL){
-	error("sap_append_oid_varaible(%s,%s) failed\n",
-		SSAOidString(oid),SSAOidString(name));
-  }
-  return(list);
-}
-
-
-SNMP_variable *reg_subagent_form_variables(Agent *agent,SNMP_variable *list)
-{
-  struct tms buffer;
-  clock_t system_up_time;
-
-  if(agent == NULL){ return NULL; }
-
-  /* set up the index */
-  reg_subagent_oid.subids[reg_subagent_oid.len-1] = agent->agent_id;
-
-  reg_subagent_oid.subids[reg_subagent_oid.len-2] = REG_AGENT_PROCESS_ID;
-  list = sap_append_integer_variable(list,&reg_subagent_oid,agent->process_id);
-  if(list == NULL) return list;
-
-  if(agent->agent_status!=0){
-    reg_subagent_oid.subids[reg_subagent_oid.len-2] = REG_AGENT_STATUS;
-    list = sap_append_integer_variable(list,&reg_subagent_oid,agent->agent_status);
-    if(list == NULL) return list;
-    reg_subagent_oid.subids[reg_subagent_oid.len-2] = 
-		REG_AGENT_SYSTEM_UP_TIME;
-    system_up_time = times(&buffer);
-    list = sap_append_variable(list, &reg_subagent_oid,
-		/* LINTED */
-		(uint32_t)system_up_time,
-		TIMETICKS);
-    if(list == NULL) return list;
-  }
-  
-  reg_subagent_oid.subids[reg_subagent_oid.len-2] = REG_AGENT_TIME_OUT;
-  list = sap_append_integer_variable(list,&reg_subagent_oid,agent->timeout);
-  if(list == NULL) return list;
-
-  reg_subagent_oid.subids[reg_subagent_oid.len-2] = REG_AGENT_PORT_NUMBER;
-  list = sap_append_integer_variable(list,&reg_subagent_oid,agent->address.sin_port);
-  if(list == NULL) return list;
-
-  if(agent->personal_file != NULL){
-  	reg_subagent_oid.subids[reg_subagent_oid.len-2] = 
-				REG_AGENT_PERSONAL_FILE;
-  	list = sap_append_string_variable(list,&reg_subagent_oid,agent->personal_file);
-  	if(list == NULL) return list;
-  }
-
-  if(agent->config_file != NULL) {
-  	reg_subagent_oid.subids[reg_subagent_oid.len-2] = 
-				REG_AGENT_CONFIG_FILE;
-  	list = sap_append_string_variable(list,&reg_subagent_oid,agent->config_file);
-  	if(list == NULL) return list;
-  }
-
-  if(agent->executable != NULL) {
-  	reg_subagent_oid.subids[reg_subagent_oid.len-2] = 
-				REG_AGENT_EXECUTABLE;
-  	list = sap_append_string_variable(list,&reg_subagent_oid,agent->executable);
-  	if(list == NULL) return list;
-  }
-
-  if(agent->version_string != NULL) {
-  	reg_subagent_oid.subids[reg_subagent_oid.len-2] = 
-				REG_AGENT_VERSION_NUM;
-  	list = sap_append_string_variable(list,&reg_subagent_oid,agent->version_string);
-  	if(list == NULL) return list;
-  }
-
-  if(agent->name != NULL) {
-  	reg_subagent_oid.subids[reg_subagent_oid.len-2] = 
-				REG_AGENT_NAME;
-  	list = sap_append_string_variable(list,&reg_subagent_oid,agent->name);
-  	if(list == NULL) return list;
-  }
-
-
-  return(list);
-
-}
-
-/*
- * temporary using the process id as the agent id
- * set the following variables, 
- *	xtimeout 
- *	xportnumber
- *	xpersonal file
- *	xconfig file
- *	executable
- *	version number
- *	protocol
- *	xprocess id
- *	xagentname
- */
-static SNMP_pdu *send_request_to_agent(SNMP_variable *list, int type,
-		char* community, int port, struct timeval *timeout,
-		IPAddress *agent_addr)
-{
-	SNMP_pdu *request, *response=NULL;
-
-	error_label[0] = '\0';
-
-	request = request_create( (community==NULL?"public":community), type, error_label);
-	if(request == NULL)
-	{
-		return NULL;
-	}
-
-	if(list == NULL){
-		snmp_pdu_free(request);
-		error("SSARegSubagent failed\n");
-		return NULL;
-	}
-
-	request->first_variable = list;
-
-	/* later change the timeout to user-provided number */
-	response =
-	     request_send_to_port_time_out_blocking(agent_addr, port,timeout, request, error_label);
-	snmp_pdu_free(request);
-	return response;
-}
-
-SNMP_pdu *
-send_request_to_relay_agent(SNMP_variable *list, int type)
-{
-	char *community = READ_COMM;
-	struct timeval timeout;
-	static int my_ip_address_initialized = False;
-	static IPAddress my_ip_address;
-
-	if (my_ip_address_initialized == False) {
-		if (get_my_ip_address(&my_ip_address, error_label))
-			return (NULL);
-		my_ip_address_initialized = True;
-	}
-	timeout.tv_sec = 100;
-	timeout.tv_usec = 0;
-
-	if (type == SET_REQ_MSG)
-		community = WRITE_COMM;
-
-	return (send_request_to_agent(list, type, community, SNMP_PORT,
-		&timeout, &my_ip_address));
-}
- 
-
-static SNMP_variable *create_variable(Oid *name)
-{
-	SNMP_variable *new;
-	if((new = snmp_variable_new(error_label)) == NULL)
-		return NULL;
-	if(SSAOidCpy(&(new->name),name,error_label))
-	{
-		snmp_variable_free(new);
-		return NULL;
-	}
-	new->type = NULLOBJ;
- 	return new;
-}
-
-int 
-sap_avail_index(Oid *name, int type)
-{
-  	SNMP_pdu *response;
-	SNMP_variable *new, *variable;
-	int idx = 0;
-
-	if ((new = create_variable(name)) == NULL)
-		return (idx);
-
-	response = send_request_to_relay_agent(new,type);
-
-	if (response == NULL)
-		return (idx);
-
-	if (response->error_status) {
-		(void)sprintf(error_label, "%s",
-			error_status_string(response->error_status));
-		snmp_pdu_free(response);
-		return (idx);
-	}
-
-	/* need checking the response */
-	variable = response->first_variable;
-	if (SSAOidCmp(&(variable->name), name)
-		|| (variable->type != INTEGER)
-		|| (variable->val.integer == NULL)
-		|| (variable->val_len != sizeof (int)) ) {
-		(void)sprintf(error_label, ERR_MSG_BAD_RESPONSE);
-		snmp_pdu_free(response);
-		return (idx);
-	}
-
-	idx = *(variable->val.integer);
-	snmp_pdu_free(response);
-	return (idx);
-}
-
-/* 
- * send a request to an agent, return TRUE, if agent response
- * otherwise, FALSE
- */
-static int probe_agent(Oid *name, int type, char *community, int port, 
-		struct timeval *timeout,IPAddress *agent_addr)
-{
-  	SNMP_pdu *response;
-	SNMP_variable *new, *variable;
-  	static int my_ip_address_initialized = False;
-  	static IPAddress my_ip_address;
-
-  	if(my_ip_address_initialized == False)
-  	{
-		if(get_my_ip_address(&my_ip_address, error_label))
-		{
-			return NULL;
-		}
-		my_ip_address_initialized = True;
-  	}
-
-	if( (new = create_variable(name)) == NULL )
-		return -1;
-	response = send_request_to_agent(new,type,community,port,timeout,
-				agent_addr!=NULL?agent_addr:&my_ip_address);
-	if(response == NULL)
-	{
-		return FALSE;
-	}
-
-
-  /* need checking the response */
-	variable = response->first_variable;
-	if(SSAOidCmp(&(variable->name), name) )
-	{
-		snmp_pdu_free(response);
-		return FALSE;
-	}
-	snmp_pdu_free(response);
-	return(TRUE);
-}
-
-/*
- * agent_addr == NULL => use the local host address
- * community == NULL => public
- */
-int
-SSAAgentIsAlive(IPAddress *agent_addr, int port, char *community,
-	struct timeval *timeout)
-{
-	static Subid system_service_subids[] = {1, 3, 6, 1, 2, 1, 1, 7, 0};
-	static Oid system_service_oid = { system_service_subids, 9};
-		if (agent_read_config() == -1) {
-			perror("Can not read configuration file ");
-			return (-1);
-		}
-		community = snmp_fullmib_read_community;
-
-return (probe_agent(&system_service_oid, GET_REQ_MSG,
-			community != NULL ? community: "public",
-			port, timeout, agent_addr));
-}
-
-int
-get_available_index_from_relay_agent()
-{
-  return(sap_avail_index(&agent_tbl_index_oid,GET_REQ_MSG));
-}
-
-int 
-bump_index_of_relay_agent(int num)
-{
-  SNMP_variable *variable=NULL;
-  SNMP_pdu *response;
-  int idx = 0;
-
-  variable = sap_append_integer_variable(variable,&agent_tbl_index_oid,num++);
-
-  if(variable == NULL)
-	return  idx;
-
-  response = send_request_to_relay_agent(variable,SET_REQ_MSG);
-
-  if(response == NULL)
-	return idx;
-
-  if(response->error_status) {
-	(void)sprintf(error_label, "%s",
-		error_status_string(response->error_status));
-	snmp_pdu_free(response);
-	return idx;
-  }
-
-  /* need checking the response */
-	variable = response->first_variable;
-	if(SSAOidCmp(&(variable->name), &agent_tbl_index_oid)
-		|| (variable->type != INTEGER)
-		|| (variable->val.integer == NULL)
-		|| (variable->val_len != sizeof(int)) )
-	{
-		(void)sprintf(error_label, ERR_MSG_BAD_RESPONSE);
-		snmp_pdu_free(response);
-		return idx;
-	}
-  idx = *(variable->val.integer);
-  snmp_pdu_free(response);
-  return(idx);
-}
-
-int check_dup_agent_name(char *agent_name)
-{
-  SNMP_variable *variable=NULL;
-  SNMP_pdu *response;
-  int res=TRUE;
-
-  variable = sap_append_string_variable(variable,&ra_check_point_oid,agent_name);
-  if(variable == NULL) return  res;
-  response = send_request_to_relay_agent(variable,SET_REQ_MSG);
-  if(response == NULL)
-  {
-	return res;
-  }
-
-  if(response->error_status)
-  {
-	(void)sprintf(error_label, "%s",
-		error_status_string(response->error_status));
-	snmp_pdu_free(response);
-	return res;
-  }
-
-  /* need checking the response */
-	variable = response->first_variable;
-	if(SSAOidCmp(&(variable->name), &ra_check_point_oid)
-		|| (variable->type != STRING)
-		|| (variable->val.string == NULL)
-		|| (variable->val_len == 0) )
-	{
-		(void)sprintf(error_label, ERR_MSG_BAD_RESPONSE);
-		snmp_pdu_free(response);
-		return res;
-	}
-  res = FALSE;
-  snmp_pdu_free(response);
-  /*snmp_variable_free(variable);this mem. is freed above*/
-  return(res);
-}
-  
-
-/*
- * mechanism for getting agent id
- * first, set relayCheckPoint to agent name
- * second, if first successful(no agent name dup.), get the available id
- */
-int 
-SSASubagentOpen(int num_of_retry, char* agent_name)
-{
-	int i, index;
-
-	if (trace_level > 0)
-		trace("SSASubagent called with %s\n", agent_name); 
-
-	if (check_dup_agent_name(agent_name) == TRUE)
-		return INVALID_HANDLER;
-
-	for (i = 0; i < num_of_retry; i++) {
-		if ((index = get_available_index_from_relay_agent()) == 0)
-			return INVALID_HANDLER;
-		index++;
-		if ((bump_index_of_relay_agent(index)) == index )
-			return index - 1;
-		else 
-			if (i > num_of_retry)
-				return INVALID_HANDLER;
-	}
-	return INVALID_HANDLER;
-}
-
-int 
-SSARegSubagent(Agent* agent)
-{
-  SNMP_variable *list=NULL;
-  SNMP_pdu *response;
-
-  /* form variable list */
- 	list = reg_subagent_form_variables(agent,list);
-
-	if(list == NULL){
-		error("SSARegSubagent failed\n");
-		return 0;
-  	}
-
-	response = send_request_to_relay_agent(list,SET_REQ_MSG);
-	if(response == NULL)
-		return 0;
-
-	if(response->error_status)
-	{
-		(void)sprintf(error_label, "%s",
-			error_status_string(response->error_status));
-		snmp_pdu_free(response);
-		return 0;
-	}
-
-	snmp_pdu_free(response);
-
-	return 1;
-}
-
-
-/* 
- * register the subtree, index is AgentID.RegTreeIndex
- * if the registration is not accepted by the relay agent,
- * the error_status is non-zero
- */
-int SSARegSubtree(SSA_Subtree *subtree)
-{
-  Oid *tree_oid = &(subtree->name);
-  int agent_id = subtree->regTreeAgentID;
-  SNMP_variable *list=NULL;
-  SNMP_pdu *response;
-  int idx = subtree->regTreeIndex;
-
-	/* form variable list */
-	reg_tree_ra_oid.subids[reg_tree_ra_oid.len-1] = idx;
-	reg_tree_ra_oid.subids[reg_tree_ra_oid.len-2] = agent_id;
-
-        if (subtree->regTreeStatus != SSA_OPER_STATUS_NOT_IN_SERVICE) {
-	reg_tree_ra_oid.subids[reg_tree_ra_oid.len-3] = REG_TREE_OID;
-  	list = sap_append_oid_variable(list,&reg_tree_ra_oid,tree_oid);
-	if(list == NULL) return 0;
-        }
-
-	reg_tree_ra_oid.subids[reg_tree_ra_oid.len-3] = REG_TREE_STATUS;
-	list = sap_append_integer_variable(list,&reg_tree_ra_oid,subtree->regTreeStatus);
-	if(list == NULL) return 0;
-
-	response = send_request_to_relay_agent(list,SET_REQ_MSG);
-	if(response == NULL)
-	{
-		return 0;
-	}
-
-	if(response->error_status)
-	{
-		(void)sprintf(error_label, "%s",
-			error_status_string(response->error_status));
-		snmp_pdu_free(response);
-		return 0;
-	}
-
-/* needs checking
-	variable = response->first_variable;
-	if(variable->next_variable
-		|| SSAOidCmp(&(variable->name), &reg_tree_ra_oid)
-		|| (variable->type != OBJID)
-		|| (variable->val_len/sizeof(Subid) != tree_oid->len) )
-	{
-		(void)sprintf(error_label, ERR_MSG_BAD_RESPONSE);
-		snmp_pdu_free(response);
-		return 0;
-	}
-*/
-	snmp_pdu_free(response);
-
-	return idx;
-
-}
-
-int SSARegSubtable(SSA_Table *table)
-{
-  Oid *table_oid = &(table->regTblOID);
-  int agent_id = table->regTblAgentID;
-  SNMP_variable *list=NULL;
-  SNMP_pdu *response;
-  int idx = table->regTblIndex;
-
-	/* form variable list */
-	reg_shared_table_oid.subids[reg_shared_table_oid.len-1] = idx;
-	reg_shared_table_oid.subids[reg_shared_table_oid.len-2] = agent_id;
-
-	reg_shared_table_oid.subids[reg_shared_table_oid.len-3] = REG_TBL_OID;
-  	list = sap_append_oid_variable(list,&reg_shared_table_oid,table_oid);
-	if(list == NULL) return 0;
-
-	reg_shared_table_oid.subids[reg_shared_table_oid.len-3] = REG_TBL_SCOL;
-  	list = sap_append_integer_variable(list,&reg_shared_table_oid,table->regTblStartColumn);
-	if(list == NULL) return 0;
-
-	reg_shared_table_oid.subids[reg_shared_table_oid.len-3] = REG_TBL_ECOL;
-  	list = sap_append_integer_variable(list,&reg_shared_table_oid,table->regTblEndColumn);
-	if(list == NULL) return 0;
-
-	reg_shared_table_oid.subids[reg_shared_table_oid.len-3] = REG_TBL_SROW;
-  	list = sap_append_integer_variable(list,&reg_shared_table_oid,table->regTblStartRow);
-	if(list == NULL) return 0;
-
-	reg_shared_table_oid.subids[reg_shared_table_oid.len-3] = REG_TBL_EROW;
-  	list = sap_append_integer_variable(list,&reg_shared_table_oid,table->regTblEndRow);
-	if(list == NULL) return 0;
-
-
-	reg_shared_table_oid.subids[reg_shared_table_oid.len-3] = REG_TBL_STATUS;
-  	list = sap_append_integer_variable(list,&reg_shared_table_oid,table->regTblStatus);
-	if(list == NULL) return 0;
-
-	response = send_request_to_relay_agent(list,SET_REQ_MSG);
-	if(response == NULL)
-	{
-		return 0;
-	}
-
-	if(response->error_status)
-	{
-		(void)sprintf(error_label, "%s",
-			error_status_string(response->error_status));
-		snmp_pdu_free(response);
-		return 0;
-	}
-
-/* needs checking
-	variable = response->first_variable;
-	if(variable->next_variable
-		|| SSAOidCmp(&(variable->name), &reg_shared_table_oid)
-		|| (variable->type != OBJID)
-		|| (variable->val_len/sizeof(Subid) != table_oid->len) )
-	{
-		(void)sprintf(error_label, ERR_MSG_BAD_RESPONSE);
-		snmp_pdu_free(response);
-		return 0;
-	}
-*/
-	snmp_pdu_free(response);
-
-	return idx;
-
-}
-
-
-int SSAGetTrapPort() {
-
-	if (dont_read_config_file == TRUE)
-		return (SNMP_TRAP_PORT);
-
-	/* not agent_tbl_index_oid, but trap_port_number */
-return (sap_avail_index(&ra_trap_port_oid, GET_REQ_MSG));
-}
-
-static int search_trap_num(char* name)
-{
- int idx;
- if(!name) return -1;
- for(idx=0;idx<numTrapElem;idx++)
- 	if(!strcmp(name,trapBucket[idx].name)) return idx;
- return -1;
-}
-
-int _SSASendTrap(char *name)
-{
-	int mode=1;
-	return _SSASendTrap_generic(name, mode);
-}
-
-int _SSASendTrap2(char *name)
-{
-	int mode=2;
-	return _SSASendTrap_generic(name, mode);
-}
-
-/* For arbitrary length enterprise OID in traps - bug 4133978 */
-int _SSASendTrap3(char *name)
-{
-        int mode=3;
-        return _SSASendTrap_generic(name, mode);
-}
-
-/* Specific index of trap var bindings */ 
-int _SSASendTrap4(char *name, IndexType *pindex_obj)
-{
-	int mode=3;  /* shouldn't change */
-	return _SSASendTrap_generic2(name, mode, pindex_obj);
-}
-
-static int _SSASendTrap_generic(char *name, int mode)
-{
-	IPAddress dest_ip_address, my_ip_address;
-	int generic;
-	int specific;
-	uint32_t time_stamp;
-	int trap_port = SSAGetTrapPort();
-	SNMP_variable *variables=NULL;
-	Integer val_integer;
-	String val_str;
-
-	Oid val_oid, ent_oid;
-	Subid ent_subids[MAX_OID_LEN];
-	int num;
-	Object *ptr;
-	int trapNum;
-	int i;
-	Subid tempArray[MAX_OID_LEN],*oldArray;
-	int oidLen, j;
-	
-	if(!trapBucket) return -1;
-
-	if((trapNum=search_trap_num(name))==-1) return -1;
-
-	if(get_my_ip_address(&dest_ip_address,error_label)== -1) return -1;
-	if(get_my_ip_address(&my_ip_address,error_label)== -1) return -1;
-
-	generic = trapBucket[trapNum].generic;
-	specific = trapBucket[trapNum].specific;
-
-	num = trapTableMap[trapNum];
-	ptr=callItem[num].ptr;
-
-
-	if ( mode == 2 ) { /*_SSASendTrap2*/
-		ent_oid.subids = ent_subids;
-		ent_oid.len = sun_oid.len;
-		for (i=0;i<7;i++)
-			ent_subids[i]=trapEnterpriseInfo[trapNum].subids[i];
-	}
-
-	/* Handling arbitrary length OIDs. Retaining _SSASendTrap2 to maintain
-	   backward compatibility with subagents created using old mibcodegen 
-	   Bug 4133978 */
-	if ( mode == 3 ) { /*_SSASendTrap3*/
-		Subid k;
-		ent_oid.subids = ent_subids;
-		for (i=0;(k=trapAnyEnterpriseInfo[trapNum].subids[i]) !=-1;i++)
-			ent_subids[i]=k;
-		ent_oid.len = i;
-	}
-
-	while(num != -1 && ptr){
-
-		/* Appending a zero at the end: Bug ID 4103570*/
-		oldArray=ptr->name.subids;
-		oidLen = ptr->name.len;
-		for(j=0;j<oidLen;j++) 
-			tempArray[j]=ptr->name.subids[j];
-		tempArray[oidLen]=0; 
-		ptr->name.len=oidLen+1;
-		ptr->name.subids=&(tempArray[0]);
-
-	     	if((ptr->asn1_type == INTEGER) | (ptr->asn1_type == GAUGE) | (ptr->asn1_type == COUNTER) | (ptr->asn1_type == TIMETICKS)){
-			ptr->get(&val_integer);
-			variables = ssa_append_integer_variable(variables,&(ptr->name),val_integer,error_label, ptr->asn1_type);
-		}else if(ptr->asn1_type == STRING){
-			ptr->get(&val_str);
-			variables = ssa_append_string_variable(variables,&(ptr->name),val_str,error_label);
-			/* Memory leak fix */
-			free((void *)(val_str.chars));
-
-		}else if(ptr->asn1_type == OBJID){
-			ptr->get(&val_oid);
-			variables = ssa_append_oid_variable(variables,&(ptr->name),val_oid,error_label);
-			/* Memory leak fix */
-			free((void *)(val_oid.subids));
-		}                                                            
-		ptr->name.len=oidLen;
-		ptr->name.subids=oldArray;
-
-		num = callItem[num].next;
-                if(num <0 ) ptr=NULL;
-                   else ptr = callItem[num].ptr;
-	}
-
-	time_stamp = -1U;
-
-	if (trap_send_with_more_para(&dest_ip_address,
-		my_ip_address, NULL, 1, &ent_oid,
-		generic, specific, trap_port,
-		time_stamp, variables, error_label))
-			(void)printf("trap_send fails!\n");
-
-	/* Memory leak fix */
-	snmp_variable_list_free(variables);
-	return 0;
-}
-
-static int _SSASendTrap_generic2(char *name, int mode, IndexType *pindex_obj)
-{
-	IPAddress dest_ip_address, my_ip_address;
-	int generic;
-	int specific;
-	uint32_t time_stamp;
-	int trap_port = SSAGetTrapPort();
-	SNMP_variable *variables=NULL;
-	Integer val_integer;
-	String val_str={NULL,0};
-
-	Oid val_oid, ent_oid;
-	Subid ent_subids[MAX_OID_LEN];
-	int num;
-	Object *ptr;
-	int trapNum;
-	int i;
-        int n;
-	Subid tempArray[MAX_OID_LEN],*oldArray;
-	int oidLen, j;
-        int length;
-	
-	if(!trapBucket) return -1;
-
-	if((trapNum=search_trap_num(name))==-1) return -1;
-
-	if(get_my_ip_address(&dest_ip_address,error_label)== -1) return -1;
-	if(get_my_ip_address(&my_ip_address,error_label)== -1) return -1;
-
-	generic = trapBucket[trapNum].generic;
-	specific = trapBucket[trapNum].specific;
-
-	num = trapTableMap[trapNum];
-	ptr=callItem[num].ptr;
-
-
-	if ( mode == 2 ) { /*_SSASendTrap2*/
-		ent_oid.subids = ent_subids;
-		ent_oid.len = sun_oid.len;
-		for (i=0;i<7;i++)
-			ent_subids[i]=trapEnterpriseInfo[trapNum].subids[i];
-	}
-
-	/* Handling arbitrary length OIDs. Retaining _SSASendTrap2 to maintain
-	   backward compatibility with subagents created using old mibcodegen 
-	   Bug 4133978 */
-	if ( mode == 3 ) { /*_SSASendTrap3*/
-		Subid k;
-		ent_oid.subids = ent_subids;
-		for (i=0;(k=trapAnyEnterpriseInfo[trapNum].subids[i]) !=-1;i++)
-			ent_subids[i]=k;
-		ent_oid.len = i;
-	}
-         
-        n=0;  /* index to an array of an indices. Point to the first index */ 
-	while(num != -1 && ptr){
-
-		/* Appending a zero at the end: Bug ID 4103570*/
-		oldArray=ptr->name.subids;
-		oidLen = ptr->name.len;
-		for(j=0;j<oidLen;j++) 
-			tempArray[j]=ptr->name.subids[j];
-		tempArray[oidLen]=0; 
-		ptr->name.len=oidLen+1;
-                length = (ptr->name.len -1); /* for non-scalars don't add trailing yet */
-		ptr->name.subids=&(tempArray[0]);
-	        if (ptr->type == 1) {              /* scalar value */
-			if((ptr->asn1_type == INTEGER) | (ptr->asn1_type == GAUGE) | (ptr->asn1_type == COUNTER) | (ptr->asn1_type == TIMETICKS)){
-				ptr->get(&val_integer);
-				variables = ssa_append_integer_variable(variables,&(ptr->name),val_integer,error_label,ptr->asn1_type);
-                                n++;  /* Yes, even scalars need a dummy index */
-			}else if(ptr->asn1_type == STRING){
-				ptr->get(&val_str);
-				variables = ssa_append_string_variable(variables,&(ptr->name),val_str,error_label);
-				/* Memory leak fix */
-				free((void *)(val_str.chars));
-                                n++;
-			}else if(ptr->asn1_type == OBJID){
-				ptr->get(&val_oid);
-				variables = ssa_append_oid_variable(variables,&(ptr->name),val_oid,error_label);
-				/* Memory leak fix */
-				free((void *)(val_oid.subids));
-                                n++;
-			}
-               	} else                /* tabular value = 2 */
-                      {  if ((ptr->asn1_type == INTEGER) | (ptr->asn1_type == GAUGE) | (ptr->asn1_type == COUNTER) | (ptr->asn1_type == TIMETICKS)){
-                               ptr->get(EXACT_ENTRY,&val_integer,&pindex_obj[n]);
-                               for (i=0; i<= pindex_obj[n].len; i++)
-                                    ptr->name.subids[length+i] = pindex_obj[n].value[i];
-                               length = length + pindex_obj[n].len;
-                               ptr->name.len = length;
-                               ptr->name.subids[length] = 0;  /* append the trailing Zero */
-                               variables = ssa_append_integer_variable(variables,&(ptr->name),val_integer,error_label,ptr->asn1_type);
-                               n++; /* done with this index, increment to index for next trap variable */
-                       	 }else if(ptr->asn1_type == STRING){
-                               ptr->get(EXACT_ENTRY,&val_str,&pindex_obj[n]);
-                               for (i=0; i<= pindex_obj[n].len; i++)
-                                    ptr->name.subids[length+i] = pindex_obj[n].value[i];
-                               length = length + pindex_obj[n].len;
-                               ptr->name.len = length;
-                               ptr->name.subids[length] = 0;  /* append the trailing Zero */
-                               variables = ssa_append_string_variable(variables,&(ptr->name),val_str,error_label);
-	                       /* Memory leak fix */
-                               free((void *)(val_str.chars));
-                               n++;   /* index for next trap variable */
-                         }else if(ptr->asn1_type == OBJID){
-                               ptr->get(EXACT_ENTRY,&val_oid,&pindex_obj[n]);
-                               for (i=0; i<= pindex_obj[n].len; i++)
-                                    ptr->name.subids[length+i] = pindex_obj[n].value[i];
-                               length = length + pindex_obj[n].len;
-                               ptr->name.len = length;
-                               ptr->name.subids[length] = 0;  /* append the trailing Zero */ 
-                               variables = ssa_append_oid_variable(variables,&(ptr->name),val_oid,error_label);
-                                /* Memory leak fix */
-                                free((void *)(val_oid.subids));
-                                n++;  /* index for next trap variable */
-                        }        
-  
-               }  /* else */  
-                               
-
-		ptr->name.len=oidLen;
-		ptr->name.subids=oldArray;
-
-		num = callItem[num].next;
-                if(num <0 ) ptr=NULL;
-                   else ptr = callItem[num].ptr;
-	}
-
-	time_stamp = -1U;
-
-	if (trap_send_with_more_para(&dest_ip_address,
-		my_ip_address, NULL, 1, &ent_oid,
-		generic, specific, trap_port,
-		time_stamp, variables, error_label))
-			(void)printf("trap_send fails!\n");
-
-	/* Memory leak fix */
-	snmp_variable_list_free(variables);
-	return 0;
-}
-/*
- * This function is similar to one used in mibiisa
- * Here, we check the community strings from the snmpd.conf configuration file.
- */
-int
-agent_read_config()
-{
-	FILE	*hostf;
-	char	linebuff[256];
-	struct cmd *cmd;
-
-	if ((hostf = fopen(agent_config_file, "r")) == (FILE *)NULL) {
-		perror("Can not open agent configuration file");
-		return (-1);
-	}
-
-	for (;;) {
-		char *ccp;
-		int cmd_len;
-
-	(void) fgets(linebuff, sizeof (linebuff), hostf);
-	if (feof(hostf) || ferror(hostf))
-		break;
-
-		/* Weed out any comment text */
-		if ((ccp = strchr(linebuff, '#')) != (char *)NULL)
-			*ccp = '\0';
-
-	/* Zap the newline, if any */
-	if ((ccp = strchr(linebuff, '\n')) != (char *)NULL)
-		*ccp = '\0';
-	if ((linebuff[0] == '\0') || (linebuff[0] == '\n')) continue;
-
-	/* Parse off the command name */
-	cmd_len = strcspn(linebuff, " \t");
-	ccp = linebuff + cmd_len + strspn(linebuff + cmd_len, " \t");
-
-	/* Look up the command */
-	for (cmd = cmds; cmd->name; cmd++) {
-		if ((strlen(cmd->name) == cmd_len) &&
-		(strncmp(linebuff, cmd->name, cmd_len) == 0)) {
-			(*cmd->rtn)(ccp, cmd);
-			goto next;
-		}
-	}
-
-	next:
-	;
-	}
-
-fclose(hostf);
-return (0);
-}
-
-int
-set_conf_word(string, cmd)
-char *string;
-struct cmd *cmd;
-{
-	char *ccp;
-	/* Take only the first word */
-	if ((ccp = strchr(string, ' ')) != (char *)NULL)
-	    *ccp = '\0';
-	if ((ccp = strchr(string, '\t')) != (char *)NULL)
-	    *ccp = '\0';
-	strncpy(cmd->arg1, string, cmd->arg2);
-return (1);
-}
--- a/usr/src/cmd/agents/snmp/agent/reg_subtree.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998, 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#ifndef	_REG_SUBTREE_H
-#define	_REG_SUBTREE_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-extern int SSARegSubagent(Agent *agent);
-extern int SSARegSubtree(SSA_Subtree *subtree);
-extern int SSARegSubtable(SSA_Table *table);
-extern int SSAGetTrapPort(void);
-/*
- * it will request a resource handler(an agent id) from the relay agent,
- * it returns the agent id if successful, otherwise, return 0
- * if fails, it will retry "num_of_retry".
- */
-extern int SSASubagentOpen(int num_of_retry, char *agent_name);
-extern int SSAAgentIsAlive(IPAddress *agent_addr, int port, char *community,
-	struct timeval *timeout);
-/* if flag = 1, turn on the auto mode */
-extern void SSAAutoMemFree(int flag);
-extern void _SSASendTrap(char *name);
-extern void _SSASendTrap2(char *name);
-extern int _SSASendTrap3(char *name);
-extern int SSASendTrap4(char *name, IndexType *index_obj);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _REG_SUBTREE_H */
--- a/usr/src/cmd/agents/snmp/agent/snmpd.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,547 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002, 2003 by Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <errno.h>
-#include <syslog.h>
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "signals.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "agent_msg.h"
-#include "agent.h"
-#include "config.h"
-
-/***** DEFINES *****/
-
-#define DEFAULT_POLL_INTERVAL		30
-
-/***** IMPORTED VARIABLES *****/
-
-/* user defined data */
-
-extern char default_config_file[];
-extern char default_sec_config_file[];
-extern char default_error_file[];
-
-/***** IMPORTED FUNCTIONS *****/
-
-/* user defined functions */
-extern void agent_init();
-extern void agent_end();
-extern void agent_loop();
-extern void agent_select_info(fd_set *fdset, int *numfds);
-extern void agent_select_callback(fd_set *fdset);
-
-/***** STATIC VARIABLES *****/
-
-static int sighup = False;
-char *config_file = NULL;
-char *sec_config_file = NULL;
-int agent_port_number = -1;
-
-int dont_read_config_file = FALSE;
-
-static int poll_interval = DEFAULT_POLL_INTERVAL;
-int max_agent_reg_retry = 10;
-
-/***** LOCAL FUNCTIONS *****/
-
-static void signals_sighup(int siq);
-static void signals_exit(int siq);
-
-static int snmpd_init(int port);
-static void print_usage(char *command_name);
-static void snmpd_loop(int sd);
-static void sap_main(int, char **);
-
-
-/********************************************************************/
-
-static void
-application_end()
-{
-	agent_end();
-}
-
-
-/********************************************************************/
-
-static void
-signals_sighup(int sig)
-{
-	if(trace_level > 0)
-		trace("received signal SIGHUP(%d)\n\n", sig);
-
-	error(MSG_SIGHUP, sig);
-
-	sighup = True;
-}
-
-
-/********************************************************************/
-
-static void
-signals_exit(int sig)
-{
-
-	if (trace_level > 0)
-		trace("received signal %d", sig);
-
-	application_end();
-
-	exit(1);
-}
-
-
-/********************************************************************/
-
-static int
-snmpd_init(int port)
-{
-	int sd;
-	struct sockaddr_in me;
-
-	/* init the config_file pointer and then parse the configuration file */
-
-	if (port > 0)
-		agent_port_number = port;
-
-	if (dont_read_config_file == FALSE) {
-		if (config_file == NULL)
-			config_file = default_config_file;
-		config_init(config_file);
-	}
-
-	if (sec_config_file == NULL)
-		sec_config_file = default_sec_config_file;
-
-	(void)sec_config_init(sec_config_file);
-
-	/* successfully register the subagent, then set the operation status of
-	 * subagent to run.
-	 */
-	sd = socket(AF_INET, SOCK_DGRAM, 0);
-	if(sd < 0)
-		error_exit(ERR_MSG_SOCKET, errno_string());
-
-	/* evaluate the port to be used, the port priority is :
-	  command port > config. file port > def. port */
-	if(port == 0 && agent_port_number != 0){
-		port = agent_port_number;
-	}
-
-	me.sin_family = AF_INET;
-	me.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
-	me.sin_port = htons(port);
-	if(bind(sd, (struct sockaddr *)&me, sizeof(me)) != 0)
-		error_exit(ERR_MSG_BIND, port, errno_string());
-
-	if(trace_level > 0)
-		trace("Waiting for incoming SNMP requests on UDP port %d\n\n", port);
-
-	return sd;
-}
-
-static void
-snmpd_loop(int sd)
-{
-	int numfds;
-	fd_set fdset;
-	int count;
-	long long timer;
-
-	struct timeval expire;
-	struct timeval timeout;
-	struct timeval now;
-
-	expire.tv_sec = 0;
-	expire.tv_usec = 0;
-
-
-	/* CONSTCOND */
-	while (1) {
-		if (sighup) {
-			error(MSG_READING_CONFIG,
-				config_file);
-
-			config_init(config_file);
-
-			error(MSG_READING_CONFIG, sec_config_file);
-
-			(void) sec_config_init(sec_config_file);
-
-			error(MSG_CONFIG_READED);
-
-			sighup = False;
-		}
-
-		numfds = 0;
-		FD_ZERO(&fdset);
-
-		numfds = sd + 1;
-		FD_SET(sd, &fdset);
-
-		agent_select_info(&fdset, &numfds);
-
-		(void) gettimeofday(&now, (struct timezone *)0);
-
-		timer = (long long) (now.tv_sec - expire.tv_sec) * 1000000;
-		timer += (long long) (now.tv_usec - expire.tv_usec);
-
-		if (timer >= 0) {
-			/* now > timeval + poll_interval */
-			timeout.tv_sec = 0;
-			timeout.tv_usec = 0;
-		} else {
-			timeout.tv_sec = -timer / 1000000;
-			timeout.tv_usec = -timer % 1000000;
-		}
-
-		count = select(numfds, &fdset, 0, 0, &timeout);
-		if (count > 0) {
-			if (FD_ISSET(sd, &fdset)) {
-				Address address;
-				SNMP_pdu *pdu;
-
-				if ((pdu = snmp_pdu_receive(sd, &address,
-						error_label)) == NULL) {
-					error(ERR_MSG_PDU_RECEIVED,
-						address_string(&address),
-						error_label);
-					continue;
-				}
-
-				if (agent_process(&address, pdu) == -1) {
-					error(ERR_MSG_PDU_PROCESS,
-						address_string(&address));
-					snmp_pdu_free(pdu);
-					continue;
-				}
-
-				if (pdu->error_status ==
-					SNMP_ERR_AUTHORIZATIONERROR) {
-						snmp_pdu_free(pdu);
-						continue;
-				}
-
-				if ((pdu->error_status != SNMP_ERR_NOERROR)
-				&& (pdu->error_status != SNMP_ERR_NOSUCHNAME)) {
-					error(ERR_MSG_SNMP_ERROR,
-					error_status_string(pdu->error_status),
-						pdu->error_index,
-						address_string(&address));
-				}
-
-				if (snmp_pdu_send(sd, &address, pdu,
-						error_label) == -1) {
-					error(ERR_MSG_PDU_SEND,
-						address_string(&address),
-						error_label);
-					snmp_pdu_free(pdu);
-					continue;
-				}
-
-				snmp_pdu_free(pdu);
-			}
-
-			agent_select_callback(&fdset);
-		} else {
-			switch (count) {
-				case 0:
-					(void) gettimeofday(&expire,
-						(struct timezone *) 0);
-					expire.tv_sec = expire.tv_sec + poll_interval;
-					agent_loop();
-					break;
-
-				case -1:
-					if (errno == EINTR) {
-						continue;
-					} else if (errno == EBADF) {
-					FD_CLR(sd, &fdset);
-					fprintf(stderr, "select() failed %s\n",
-						errno_string());
-					continue;
-					} else {
-						error_exit(ERR_MSG_SELECT,
-							errno_string());
-					}
-			}
-		}
-	}
-}
-
-
-static void print_usage(char *command_name)
-{
-	(void)fprintf(stderr, "Usage: %s [-h]\n\
-\t[-k (don't read config file)]\n\
-\t[-p port ]\n\
-\t[-c config-file (default %s)]\n\
-\t[-a sec-config-file (default %s)]\n\
-\t[-i poll-interval (default %d seconds)]\n\
-\t[-d trace-level (range 0..%d, default %d)]\n\n",
-		command_name,
-		default_config_file,
-		default_sec_config_file,
-		DEFAULT_POLL_INTERVAL,
-		TRACE_LEVEL_MAX,
-		trace_level);
-	exit(1);
-}
-
-
-static void
-sap_main(argc, argv)
-	int argc;
-	char *argv[];
-{
-	int arg;
-	int port = 0;
-	int sd;
-	char *str;
-	int level;
-	char *error_file = NULL;
-
-
-
-	error_init(argv[0], application_end);
-
-	/* parse arguments */
-
-	for(arg = 1; arg < argc; arg++)
-	{
-		if(argv[arg][0] == '-')
-		{
-			switch(argv[arg][1])
-			{
-                                case 'k':
-                                        dont_read_config_file = TRUE;
-                                        break;
-				case 'h':
-				case '?':
-					print_usage(argv[0]);
-
-					/* never reached */
-					return;
-
-				case 'p':
-					arg++;
-					if(arg >= argc)
-					{
-						(void)fprintf(stderr, "Must have another argument following the -p option\n");
-						print_usage(argv[0]);
-					}
-
-					/* LINTED */
-					port = (int32_t)strtol(argv[arg], &str, 10);
-					if(argv[arg] == str)
-					{
-						(void)fprintf(stderr, "Not a valid integer following the -p option: %s\n", argv[arg]);
-						print_usage(argv[0]);
-					}
-
-					break;
-
-				case 'c':
-					arg++;
-					if(arg >= argc)
-					{
-						(void)fprintf(stderr, "Must have a configuration file name following the -c option\n");
-						print_usage(argv[0]);
-					}
-
-					config_file = (char *) strdup(argv[arg]);
-					if(config_file == NULL)
-					{
-						(void)fprintf(stderr, "%s\n", ERR_MSG_ALLOC);
-						exit(1);
-					}
-
-					break;
-
-				case 'a':
-					arg++;
-					if(arg >= argc)
-					{
-						(void)fprintf(stderr, "Must have a security configuration file name following the -a option\n");
-						print_usage(argv[0]);
-					}
-
-					sec_config_file = (char *) strdup(argv[arg]);
-					if(sec_config_file == NULL)
-					{
-						(void)fprintf(stderr, "%s\n", ERR_MSG_ALLOC);
-						exit(1);
-					}
-
-					break;
-
-
-				case 'i':
-					arg++;
-					if(arg >= argc)
-					{
-						(void)fprintf(stderr, "Must have another argument following the -i option\n");
-						print_usage(argv[0]);
-					}
-
-					/* LINTED */
-					poll_interval = (int32_t)strtol(argv[arg], &str, 10);
-					if(argv[arg] == str)
-					{
-						(void)fprintf(stderr, "Not a valid integer following the -i option: %s\n", argv[arg]);
-						print_usage(argv[0]);
-					}
-					if(poll_interval <= 0)
-					{
-						(void)fprintf(stderr, "The poll-interval must be greater than 0: %d\n", poll_interval);
-						print_usage(argv[0]);
-					}
-
-					break;
-
-				case 'd':
-					arg++;
-					if(arg >= argc)
-					{
-						(void)fprintf(stderr, "Must have another argument following the -d option\n");
-						print_usage(argv[0]);
-					}
-
-					/* LINTED */
-					level = (int32_t)strtol(argv[arg], &str, 10);
-					if(argv[arg] == str)
-					{
-						(void)fprintf(stderr, "Not a valid integer following the -d option: %s\n", argv[arg]);
-						print_usage(argv[0]);
-					}
-					if(trace_set(level, error_label))
-					{
-						print_usage(argv[0]);
-					}
-
-					break;
-
-				default:
-					(void)fprintf(stderr, "Invalid option: -%c\n", argv[arg][1]);
-					print_usage(argv[0]);
-			}
-			continue;
-		}
-	}
-
-
-	if(error_file == NULL)
-	{
-		error_file = default_error_file;
-	}
-	error_open(error_file);
-
-	if(trace_level == 0)
-	{
-		/* run the daemon in backgound */
-
-		pid_t pid; 
-
-		pid = fork();
-		switch(pid)
-		{
-			case -1:
-				error_exit(ERR_MSG_FORK, errno_string());
-
-				/* never reached */
-				return;
-
-			case 0: /* child process */
-				break;
-
-			default: /* parent process */
-				exit(0);
-		}
-	}
-
-	if(fclose(stdin) == EOF) 
-	{
-		error(ERR_MSG_FCLOSE, "stdin", errno_string());
-	}
-
-	sd = snmpd_init(port);
-
-	if(signals_init(signals_sighup, signals_exit, error_label))
-	{
-		error_exit("signals_init() failed: %s", error_label);
-	}
-
-	if(trace_level == 0)
-	{
-		if(fclose(stdout) == EOF)
-		{
-			error(ERR_MSG_FCLOSE, "stdout", errno_string());
-		}
-	}
-
-	if(trace_level == 0)
-	{
-		/* backgound */
-
-		if(chdir("/") == -1)
-		{
-			error(ERR_MSG_CHDIR, "/", errno_string());
-		}
-
-		/* set process group ID */
-		(void)setpgrp();
-
-		error_close_stderr();
-	}
-
-	/* have to be called after error_open() and error_close_stderr() */
-	agent_init();
-
-	snmpd_loop(sd);
-
-	/* never reached */
-}
-
-void 
-SSAMain(int argc, char** argv)
-{
-	sap_main(argc,argv);
-}
--- a/usr/src/cmd/agents/snmp/agent/snmpd.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-/*
- * HISTORY
- * 5-20-96	Jerry Yeung	support security file and subtree reg.
- */
-
-#ifndef _SNMPD_H_
-#define _SNMPD_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-extern char *config_file;
-extern char *sec_config_file;
-extern int agent_port_number;
-extern int max_agent_reg_retry;
-
-extern void SSAMain(int argc, char** argv);
-
-#endif
--- a/usr/src/cmd/agents/snmp/agent/sparc/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 1998, 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../Makefile.com
-
-install: $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
--- a/usr/src/cmd/agents/snmp/agent/sparcv9/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../Makefile.com
-include $(SRC)/lib/Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
--- a/usr/src/cmd/agents/snmp/agent/subtree.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,352 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "asn1.h"
-#include "snmp.h"
-#include "pdu.h"
-
-#include "pagent.h"
-#include "subtree.h"
-
-/***** STATIC VARIABLES *****/
-
-static Subtree *first_subtree = NULL;
-
-
-/***** STATIC FUNCTIONS *****/
-
-static void subtree_remove_from_agent_list(Subtree *subtree);
-static void subtree_free(Subtree *sp);
-extern int SSARegSubtree(SSA_Subtree *);
-
-
-/****************************************************************/
-/* currently, the index are processid(agentid) and local index */
-
-int subtree_add(Agent *agent, Subid *subids, int len)
-{
-
-	/* call reg. api */
-	Subtree *sp;
-	Subtree *new;
-	Subtree *last = NULL;
-	int ret;
-
-
-	if(agent == NULL)
-	{
-		error("BUG: subtree_add(): agent is NULL");
-		return -1;
-	}
-
-	new = (Subtree *) malloc(sizeof(Subtree));
-	if(new == NULL)
-	{
-		error("malloc() failed");
-		return -1;
-	}
-	new->next_subtree = NULL;
-	new->agent = agent;
-	new->next_agent_subtree = NULL;
-	new->name.subids = (Subid *) malloc(len * (int32_t)sizeof(Subid));
-	if(new->name.subids == NULL)
-	{
-		error("malloc() failed");
-		subtree_free(new);
-		return -1;
-	}
-	(void)memcpy(new->name.subids, subids, len * (int32_t)sizeof(Subid));
-	new->name.len = len;
-
-	for(sp = first_subtree; sp; sp = sp->next_subtree)
-	{
-		ret = SSAOidCmp(&(new->name), &(sp->name));
-		if(ret == 0)
-		{
-			error("The subtree %s already belongs to the agent %s",
-				SSAOidString(&(sp->name)),
-				sp->agent->name);
-			subtree_free(new);
-			return -1;
-		}
-		else
-		if(ret < 0)
-		{
-			break;
-		}
-
-		last = sp;
-	}
-
-	if(last == NULL)
-	{
-		new->next_subtree = first_subtree;
-		first_subtree = new;
-	}
-	else
-	{
-		new->next_subtree = last->next_subtree;
-		last->next_subtree = new;
-	}
-
-	new->next_agent_subtree = agent->first_agent_subtree;
-	agent->first_agent_subtree = new;
-
-	new->regTreeIndex = ++new->agent->tree_index;
-	new->regTreeAgentID = new->agent->agent_id;
-	new->regTreeStatus = SSA_OPER_STATUS_ACTIVE;
-	if(SSARegSubtree(new)==0)
-	{
-		return -1;
-	}
-	
-	return 0;
-}
-
-
-/****************************************************************/
-
-Subtree *subtree_match(u_char type, Oid *name)
-{
-	Subtree *sp;
-	Subtree *last;
-
-
-	if(name == NULL)
-	{
-		error("subtree_match(): name is NULL");
-		return NULL;
-	}
-
-	if(first_subtree == NULL)
-	{
-/*
-		if(trace_level > 1)
-		{
-			trace("subtree_match() returned NULL\n\n");
-		}
-*/
-
-		return NULL;
-	}
-
-
-	if(type == GETNEXT_REQ_MSG)
-	{
-		if(SSAOidCmp(name, &(first_subtree->name)) < 0)
-		{
-/*
-			if(trace_level > 1)
-			{
-				trace("subtree_match() returned %s supported by %s\n\n",
-					SSAOidString(&(first_subtree->name)),
-					first_subtree->agent->name);
-			}
-*/
-
-			return first_subtree;
-		}
-	}
-
-	last = NULL;
-	for(sp = first_subtree; sp; sp = sp->next_subtree)
-	{
-		if(SSAOidCmp(name, &(sp->name)) < 0)
-		{
-			break;
-		}
-
-		if(sp->name.len <= name->len)
-		{
-			int i;
-
-
-			for(i = 0; i < sp->name.len; i++)
-			{
-				if(sp->name.subids[i] == 0)
-				{
-					continue;
-				}
-
-				if(name->subids[i] != sp->name.subids[i])
-				{
-					break;
-				}
-			}
-
-			if(i == sp->name.len)
-			{
-				last = sp;
-			}
-		}
-	}
-
-
-/*
-	if(trace_level > 1)
-	{
-		if(last)
-		{
-			trace("subtree_match() returned %s supported by %s\n\n",
-				SSAOidString(&(last->name)),
-				last->agent->name);
-		}
-		else
-		{
-			trace("subtree_match() returned NULL\n\n");
-		}
-	}
-*/
-
-
-	return last;
-}
-
-
-/****************************************************************/
-
-void trace_subtrees()
-{
-	Subtree *sp;
-
-
-	trace("SUBTREES:\n");
-	for(sp = first_subtree; sp; sp = sp->next_subtree)
-	{
-		if(sp->agent)
-		{
-			trace("\t%-30s %-30s %d\n",
-				SSAOidString(&(sp->name)),
-				sp->agent->name,
-				sp->agent->address.sin_port);
-		}
-		else
-		{
-			trace("\t%-30s %-30s\n",
-				SSAOidString(&(sp->name)),
-				"NO AGENT!");
-		}
-	}
-	trace("\n");
-}
-
-
-/****************************************************************/
-
-static void subtree_free(Subtree *sp)
-{
-	if(sp == NULL)
-	{
-		return;
-	}
-
-	if(sp->name.subids)
-	{
-		free(sp->name.subids);
-	}
-
-	free(sp);
-}
-
-
-/****************************************************************/
-
-void subtree_list_delete()
-{
-	Subtree *sp = first_subtree;
-	Subtree *next;
-
-
-	while(sp)
-	{
-		next = sp->next_subtree;
-
-		subtree_remove_from_agent_list(sp);
-
-		subtree_free(sp);
-
-		sp = next;
-	}
-
-	first_subtree = NULL;
-
-	return;
-}
-
-
-/****************************************************************/
-
-static void subtree_remove_from_agent_list(Subtree *subtree)
-{
-	Agent *agent = subtree->agent;
-	Subtree *sp;
-	Subtree *osp;
-
-
-	osp = NULL;
-	for(sp = agent->first_agent_subtree; sp; sp = sp->next_agent_subtree)
-	{
-		if(sp == subtree)
-		{
-			break;
-		}
-
-		osp = sp;
-	}
-
-	if(sp == NULL)
-	{
-		error("subtree_remove_from_agent_list() : subtree (0x%x) not found", subtree);
-		return;
-	}
-
-	if(osp == NULL)
-	{
-		agent->first_agent_subtree = sp->next_agent_subtree;
-	}
-	else
-	{
-		osp->next_agent_subtree = sp->next_agent_subtree;
-	}
-
-	subtree->agent = NULL;
-
-	return;
-}
-
-
-
--- a/usr/src/cmd/agents/snmp/agent/subtree.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _SUBTREE_H_
-#define _SUBTREE_H_
-
-typedef struct _Subtree {
-	int regTreeIndex;
-	int regTreeAgentID;
-	Oid		name;
-	int regTreeStatus;
-	struct _Subtree	*next_subtree;
-	struct _Agent	*agent;
-	struct _Subtree	*next_agent_subtree;
-} Subtree;
-
-typedef Subtree SSA_Subtree;
-
-#define INVALID_HANDLER         0
-
-extern int subtree_add(Agent *agent, Subid *subids, int len);
-extern Subtree *subtree_match(u_char type, Oid *oid);
-extern void subtree_list_delete();
-extern void trace_subtrees();
-
-#endif /* _SUBTREE_H_ */
--- a/usr/src/cmd/agents/snmp/agent/table.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _TABLE_H_
-#define _TABLE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-typedef struct Table {
-	int regTblIndex;
-	int regTblAgentID;
-	Oid regTblOID;
-	int regTblStartColumn;
-	int regTblEndColumn;	
-	int	regTblStartRow;
-	int	regTblEndRow;
-	char 	*regTblView;
-	int regTblStatus;
-	struct Table* next_table;
-	Agent *agent;
-	
-} Table, SSA_Table;
-
-
-#endif
--- a/usr/src/cmd/agents/snmp/mib/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# snmp/mib/Makefile
-#
-
-include ../../Makefile.vars
-
-include $(SRC)/cmd/Makefile.cmd
-
-MIBS =		snmpdx.mib
-MIBDIR =	$(ROOT)/var/snmp/mib
-ROOTMIBS =	$(MIBS:%=$(MIBDIR)/%)
-
-$(ROOTMIBS) :=	FILEMODE = 644
-
-
-$(MIBDIR)/%: %
-	$(INS.file)
-
-install: $(ROOTMIBS)
-
-clean:
-
-clobber:
-
-lint:
-
-_msg:
-
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/agents/snmp/mib/draft-ietf-entmib-entmib-02.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2124 +0,0 @@
-#ident	"%Z%%M%	%I%	%E% SMI"
-
-Draft                          Entity MIB               January 22, 1996
-
-
-                   <draft-ietf-entmib-entmib-02.txt>
-                               Entity MIB
-
-                            22 January 1996
-
-
-                            Keith McCloghrie
-                           Cisco Systems Inc.
-                             kzm@cisco.com
-
-                              Andy Bierman
-                           Bierman Consulting
-                           abierman@west.net
-
-
-
-
-
-                          Status of this Memo
-
-This document is an Internet-Draft.  Internet-Drafts are working
-documents of the Internet Engineering Task Force (IETF), its areas, and
-its working groups.  Note that other groups may also distribute working
-documents as Internet-Drafts.
-
-Internet-Drafts are draft documents valid for a maximum of six months
-and may be updated, replaced, or obsoleted by other documents at any
-time.  It is inappropriate to use Internet- Drafts as reference material
-or to cite them other than as ``work in progress.''
-
-To learn the current status of any Internet-Draft, please check the
-``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow
-Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe),
-ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 1]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-1.  Introduction
-
-This memo defines an experimental portion of the Management Information
-Base (MIB) for use with network management protocols in the Internet
-community.  In particular, it describes managed objects used for
-managing multiple logical entities managed by a single SNMPv1 agent.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 2]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-2.  The SNMPv1 Network Management Framework
-
-The SNMPv1 Network Management Framework presently consists of two major
-components.  They are:
-
-o    RFC 1442 [1] which defines the SMI, the mechanisms used for
-     describing and naming objects for the purpose of management.
-
-o    STD 17, RFC 1213 [2] defines MIB-II, the core set of managed
-     objects for the Internet suite of protocols.
-
-
-The Framework permits new objects to be defined for the purpose of
-experimentation and evaluation.
-
-
-2.1.  Object Definitions
-
-Managed objects are accessed via a virtual information store, termed the
-Management Information Base or MIB.  Objects in the MIB are defined
-using the subset of Abstract Syntax Notation One (ASN.1) defined in the
-SMI.  In particular, each object type is named by an OBJECT IDENTIFIER,
-an administratively assigned name.  The object type together with an
-object instance serves to uniquely identify a specific instantiation of
-the object.  For human convenience, we often use a textual string,
-termed the descriptor, to refer to the object type.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 3]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-3.  Overview
-
-There is a need for a standardized way of representing a single agent
-which supports multiple instances of one MIB.  This is presently true
-for at least 3 standard MIBs, and is likely to become true for more and
-more MIBs as time passes.  For example:
-
-   - multiple instances of a bridge supported within a single device
-     having a single agent;
-
-   - multiple repeaters supported by a single agent;
-
-   - multiple OSPF backbone areas, each one operating as part of its own
-     Autonomous System, and each identified by the same area-id (e.g.,
-     0.0.0.0), supported inside a single router with one agent.
-
-The fact that it is a single agent in each of these cases implies there
-is some relationship which binds all of these entities together.
-Effectively, there is some "overall" physical entity which houses the
-sum of the things managed by that one agent, i.e., there are multiple
-"logical" entities within a single physical entity.  Sometimes, the
-overall physical entity contains multiple (smaller) physical entities
-and each logical entity is associated with a particular physical entity.
-Sometimes, the overall physical entity is a "compound" of multiple
-physical entities (e.g., a stack of stackable hubs).
-
-What is needed is a way to determine exactly what logical entities are
-managed by the agent (either by SNMPv1 or SNMPv2), and thereby to be
-able to communicate with the agent about a particular logical entity.
-When different logical entities are associated with different physical
-entities within the overall physical entity, it is also useful to be
-able to use this information to distinguish between logical entities.
-
-In these situations, there is no need for varbinds for multiple logical
-entities to be referenced in the same SNMPv1 message (although that
-might be useful in the future).  Rather, it is sufficient, and in some
-situations preferable, to have the context/community in the message
-identify the logical entity to which the varbinds apply.
-
-
-3.1.  Terms
-
-Some new terms are used throughout this document:
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 4]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-   - Naming Scope
-     A "naming scope" represents the set of information that may be
-     potentially accessed through a single SNMPv1 operation. All
-     instances within the naming scope share the same unique identifier
-     space. For SNMPv1, a naming scope is identified by the value of the
-     associated 'entLogicalCommunity' instance.
-
-   - Logical Entity
-     A managed system contains one or more logical entities, each
-     represented by at most one instantiation of each of a particular
-     set of MIB objects. A set of management functions is associated
-     with each logical entity. Examples of logical entities include
-     routers, bridges, print-servers, etc.
-
-   - Physical Entity
-     A "physical entity" or "physical component" represents an
-     identifiable physical resource within a managed system. Zero or
-     more logical entities may utilize a physical resource at any given
-     time. It is an implementation-specific manner as to which physical
-     components are represented by an agent in the EntPhysicalTable.
-     Typically, physical resources (e.g. communications ports,
-     backplanes, sensors, daughter-cards, power supplies, the overall
-     chassis) which can be managed via functions associated with one or
-     more logical entities are included in the MIB.
-
-   - Containment Tree
-     Each physical component may optionally be modeled as 'contained'
-     within another physical component. A "containment-tree" is the
-     conceptual sequence of entPhysicalIndex values which uniquely
-     specifies the exact physical location of a physical component
-     within the managed system. It is generated by 'following and
-     recording' each 'entPhysicalContainedIn' instance 'up the tree
-     towards the root', until a value of zero indicating no further
-     containment is found.
-
-     It is required that physical containment-trees retain their
-     identity across reboots. Specifically, two identical hardware
-     configurations should produce the same set of containment-trees for
-     every corresponding entry in the entPhysicalTable (i.e. the same
-     set of entPhysicalEntries with the same entPhysicalIndex values,
-
-     Note that chassis slots, which are capable of accepting one or more
-     module types from one or more vendors, are modeled as containers in
-     this MIB. The value of entPhysicalContainedIn for a particular
-     'module' entity (entPhysicalClass value of 'module(9)') should be
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 5]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-     equal to an entPhysicalIndex that represents the parent 'container'
-     entity (associated entPhysicalClass value of ('container(5)'). An
-     agent should represent both empty and full containers in the
-     entPhysicalTable.
-
-
-3.2.  Relationship to Community Strings
-
-For SNMPv1, distinguishing between different logical entities is one
-(but not the only) purpose of the community string [6].  This is
-accommodated by representing each community string as a logical entity.
-
-Note that different logical entities may 'share' the same naming scope
-(and therefore the same values of entLogicalCommunity). In such a case,
-individual logical entities can be identified by examining the
-sysORTable within the same naming scope.
-
-
-3.3.  Relationship to Proxy Mechanisms
-
-The Entity MIB is designed to allow functional component discovery.  The
-administrative relationships between different logical entities are not
-visible in any Entity MIB tables.
-
-The management of administrative framework functions is not an explicit
-goal of the Entity MIB WG at this time. This new area of functionality
-may be revisited after some operational experience with the Entity MIB
-is gained.
-
-
-3.4.  Relationship to a Chassis MIB
-
-Some readers may recall that a previous IETF working group attempted to
-define a Chassis MIB.  No consensus was reached by that working group,
-possibly because its scope was too broad.  As such, it is not the
-purpose of this MIB to be a "Chassis MIB replacement", nor is it within
-the scope of this MIB to contain all the information which might be
-necessary to manage a "chassis".  On the other hand, the entities
-represented by an implementation of this MIB might well be contained in
-a chassis.
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 6]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-3.5.  Relationship to the Interfaces MIB
-
-The Entity MIB contains a mapping table identifying physical components
-that have 'external values' (e.g. ifIndex) associated with them within a
-given naming scope.  This table can be used to identify the physical
-location of each interface in the ifTable. Since ifIndex values in
-different contexts are not related to one another, the interface to
-physical component associations are relative to a specific logical
-entity within the agent.
-
-
-
-3.6.  Relationship to the Other MIBs
-
-The Entity MIB contains a mapping table identifying physical components
-that have identifiers from other standard MIBs associated with them.
-For example, this table can be used along with the physical mapping
-table to identify the physical location of each repeater port in the
-rptrPortTable, each bridge port in the dot1dBasePortTable, or each
-ifIndex in the ifTable.
-
-
-3.7.  Re-Configuration of Entities
-
-All the MIB objects defined in this MIB have at most a read-only MAX-
-ACCESS clause, i.e., none are write-able.  This is another conscious
-decision by the authors to limit this MIB's scope.  It is possible that
-this restriction could be lifted after implementation experience.
-
-
-3.8.  MIB Structure
-
-This MIB contains five tables: the entPhysicalTable and the
-entLogicalTable each provide a list of entities. The entLPMappingTable
-provides mappings between logical and physical entities. The
-entAliasMappingTable provides mappings between physical components and
-associated identifiers from other MIBs. For example, a physical repeater
-port may be associated with an instance of 'rptrPortGroupIndex.1.5', or
-'ifIndex.12', or both. The entPhysicalContainsTable provides efficient
-discovery of the containment relationships of all physical entities
-(also derivable from 'entPhysicalContainedIn' values).
-
-
-The entPhysicalTable contains one row per physical entity, and should
-always contains at least one row for an "overall" physical entity.  Each
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 7]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-row is indexed by an arbitrary, small integer, and contains a
-description and type of the physical entity.  It also optionally
-contains the index number of another entPhysicalEntry indicating a
-containment relationship between the two.
-
-
-The entLogicalTable contains one row per logical entity.  Each row is
-indexed by an arbitrary, small integer and contains a name, description,
-and type of the logical entity. It also contains information to allow
-SNMPv1 access to the MIB information for the logical entity.
-
-
-The entLPMappingTable contains mappings between entLogicalIndex values
-(logical entities) and entPhysicalIndex values (the physical components
-supporting that entity). A logical entity can map to more than one
-physical component, and more than one logical entity can map to (share)
-the same physical component.
-
-
-The entAliasMappingTable contains mappings between entLogicalIndex,
-entPhysicalIndex pairs and 'alias' object identifier values.  This
-allows resources managed with other MIBs (e.g. repeater ports, bridge
-ports, physical and logical interfaces) to be identified in the physical
-entity hierarchy. Note that each alias identifier is only relevant in a
-particular naming scope.
-
-
-The entPhysicalContainsTable contains simple mappings between
-'entPhysicalContainedIn' values for each container/containee
-relationship in the managed system. The indexing of this table allows an
-NMS to quickly discover the 'entPhysicalIndex' values for all children
-of a given physical entity.
-
-
-3.9.  Multiple Agents
-
-Even though a primary motivation for this MIB is to represent the
-multiple logical entities supported by a single agent, it is also
-possible to use it to represent multiple logical entities supported by
-multiple agents (in the same "overall" physical entity).  Indeed, it is
-implicit in the SNMPv1 architecture, that the number of agents is
-transparent to a network management station.
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 8]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-4.  Definitions
-
-ENTITY-MIB DEFINITIONS ::= BEGIN
-
-IMPORTS
-    MODULE-IDENTITY, OBJECT-TYPE,
-    experimental, NOTIFICATION-TYPE
-        FROM SNMPv2-SMI
-    DisplayString, AutonomousType, TruthValue
-        FROM SNMPv2-TC
-    TAddress
-        FROM SNMPv2-PARTY-MIB
-    MODULE-COMPLIANCE, OBJECT-GROUP
-        FROM SNMPv2-CONF;
-
-entityMIB MODULE-IDENTITY
-    LAST-UPDATED "9601200000Z"
-    ORGANIZATION "IETF ENTMIB Working Group"
-    CONTACT-INFO
-            "        Keith McCloghrie
-                     Cisco Systems Inc.
-                     170 West Tasman Drive
-                     San Jose, CA 95134
-                     408-526-5260
-                     kzm@cisco.com
-
-                     Andy Bierman
-                     Bierman Consulting
-                     1200 Sagamore Lane
-                     Ventura, CA 93001
-                     805-648-2028
-                     abierman@west.net"
-    DESCRIPTION
-            "The MIB module for representing multiple logical
-            entities supported by a single SNMP agent."
-    ::= { experimental xx }
-
-entityMIBObjects OBJECT IDENTIFIER ::= { entityMIB 1 }
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                  [Page 9]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
---           The Physical Entity Table
-
-entPhysicalTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF EntPhysicalEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "This table contains one row per physical entity.  There is
-            always at least one row for an 'overall' physical entity."
-    ::= { entityMIBObjects 1 }
-
-entPhysicalEntry       OBJECT-TYPE
-    SYNTAX      EntPhysicalEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Information about a particular physical entity.  An agent
-            is expected to represent physical components in as much
-            detail as possible.  If more than one agent within a chassis
-            implements the Entity MIB, the information retrieved from
-            each agent must be consistent, but not necessarily
-            identical."
-    INDEX   { entPhysicalIndex }
-    ::= { entPhysicalTable 1 }
-
-EntPhysicalEntry ::= SEQUENCE {
-      entPhysicalIndex          INTEGER,
-      entPhysicalDescr          DisplayString,
-      entPhysicalVendorType     AutonomousType,
-      entPhysicalContainedIn    INTEGER,
-      entPhysicalClass          INTEGER,
-      entPhysicalParentRelPos   INTEGER
-}
-
-entPhysicalIndex    OBJECT-TYPE
-    SYNTAX      INTEGER (1..2147483647)
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "The value of this object uniquely identifies the physical
-            entity.  The value is a small positive integer; index values
-            for different physical entities are not necessarily
-            contiguous."
-    ::= { entPhysicalEntry 1 }
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 10]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-entPhysicalDescr OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "A textual description of physical entity."
-    ::= { entPhysicalEntry 2 }
-
-entPhysicalVendorType OBJECT-TYPE
-    SYNTAX      AutonomousType
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "An indication of the vendor-specific hardware type of the
-            physical entity. Note that this is different from the
-            definition of MIB-II's sysObjectID.
-
-            An agent should set this object to a enterprise-specific
-            registration identifier value indicating the specific
-            equipment type in detail.  The associated instance of
-            entPhysicalClass should be used to indicate the general type
-            of hardware device.
-
-            If no vendor-specific registration identifier exists for
-            this physical entity, then the value { 0 0 } is returned. If
-            the value is unknown by this agent, then the special value
-            'entPClassUnknown' is returned."
-    ::= { entPhysicalEntry 3 }
-
-entPhysicalContainedIn OBJECT-TYPE
-    SYNTAX      INTEGER (0..2147483647)
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of entPhysicalIndex for the physical entity which
-            'contains' this physical entity.  A value of zero indicates
-            this physical entity is not contained in any other physical
-            entity.  Note that the set of 'containment' relationships
-            define a strict hierarchy; that is, recursion is not
-            allowed."
-    ::= { entPhysicalEntry 4 }
-
-entPhysicalClass OBJECT-TYPE
-    SYNTAX      INTEGER  {
-        other(1),
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 11]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-        unknown(2),
-        chassis(3),
-        backplane(4),
-        container(5),   -- slot or daughter-card holder
-        powerSupply(6),
-        fan(7),
-        sensor(8),
-        module(9),      -- plug-in card  or daughter-card
-        port(10)
-    }
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "An indication of the general hardware type of the physical
-            entity.
-
-            An agent should set this object to the standard enumeration
-            value which most accurately indicates the general class of
-            the physical entity, or the primary class if there is more
-            than one.
-
-            If no appropriate standard registration identifier exists
-            for this physical entity, then the value 'other(1)' is
-            returned. If the value is unknown by this agent, then the
-            value 'unknown(2)' is returned."
-    ::= { entPhysicalEntry 5 }
-
-entPhysicalParentRelPos OBJECT-TYPE
-    SYNTAX      INTEGER (0..2147483647)
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "An indication of the position of this 'child' component
-            among all its 'sibling' components. The numbering is
-            relative to the 'parent' component. A component's parent is
-            identified by the associated instance of the
-            entPhysicalContainedIn object.  An NMS may use this value to
-            compare against other entPhysicalEntries with the same
-            parent (same value of entPhysicalContainedIn).
-
-            This value should match any external labeling of the
-            physical component if possible. For example, an
-            entPhysicalEntry representing entPhysicalParentRelPos value
-            of '10'. The entPhysicalContainedIn instance should equal
-            the entPhysicalIndex for the parent (module 3). The
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 12]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-            entPhysicalParentRelPos instance associated with the parent
-            should be equal to '3'.
-
-            If the physical position of this component does not match
-            any external labeling, then user documentation or other
-            external reference material should be used to determine the
-            parent-relative position. If this is not possible, then the
-            the agent should assign an arbitrary ordering to a given set
-            of 'sibling' components, perhaps based on internal
-            representation of the components.
-
-            If the agent cannot determine the parent-relative position
-            for some reason, or if the associated value of
-            entPhysicalContainedIn is '0', then the value '0' is
-            returned. Otherwise a positive integer is returned,
-            indicating the parent-relative position of this physical
-            entity.
-
-            Parent-relative ordering should start from '1' and continue
-            to 'N', where 'N' represents the highest positioned child
-            entity. Note that this ordering may be sparse or dense,
-            depending on agent implementation.  The actual values
-            returned are not globally meaningful, as each 'parent'
-            component may use different numbering algorithms. The
-            ordering is only meaningful among siblings of the same
-            parent component.
-
-            The agent should retain parent-relative position values
-            across reboots, either through algorithmic assignment or use
-            of non-volatile storage."
-    ::= { entPhysicalEntry 6 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 13]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
---           The Logical Entity Table
-entLogicalTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF EntLogicalEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "This table contains one row per logical entity."
-    ::= { entityMIBObjects 2 }
-
-entLogicalEntry       OBJECT-TYPE
-    SYNTAX      EntLogicalEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Information about a particular logical entity.  Entities
-            may be managed by this agent or other SNMP agents (possibly)
-            in the same chassis."
-    INDEX       { entLogicalIndex }
-    ::= { entLogicalTable 1 }
-
-EntLogicalEntry ::= SEQUENCE {
-      entLogicalIndex            INTEGER,
-      entLogicalDescr            DisplayString,
-      entLogicalType             AutonomousType,
-      entLogicalCommunity        OCTET STRING,
-      entLogicalTAddress         TAddress,
-      entLogicalTDomain          OBJECT IDENTIFIER
-}
-
-entLogicalIndex OBJECT-TYPE
-    SYNTAX      INTEGER (1..2147483647)
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "The value of this object uniquely identifies the logical
-            entity. The value is a small positive integer; index values
-            for different logical entities are are not necessarily
-            contiguous."
-    ::= { entLogicalEntry 1 }
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 14]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-entLogicalDescr OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "A textual description of logical entity."
-    ::= { entLogicalEntry 2 }
-
-entLogicalType OBJECT-TYPE
-    SYNTAX      AutonomousType
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "An indication of the type of logical entity.  This will
-            typically be the OBJECT IDENTIFIER name of the node in the
-            SMI's naming hierarchy which represents the major MIB
-            module, or the majority of the MIB modules, supported by the
-            logical entity.  For example:
-               a logical entity of a regular host/router -> mib-2
-               a logical entity of a 802.1d bridge     -> dot1dBridge
-               a logical entity of a 802.3 repeater  ->
-            snmpDot3RptrMgmt"
-    ::= { entLogicalEntry 3 }
-
-entLogicalCommunity OBJECT-TYPE
-    SYNTAX      OCTET STRING
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "A SNMPv1 community-string which can be used to access
-            detailed management information for this logical entity.
-            The agent should allow read access with this community
-            string (to an appropriate subset of all managed objects) and
-            may also choose to return a community string based on the
-            privileges of the request used to read this object (e.g.
-            only return a string having read-write privileges when
-            accessed with read-write privileges).
-
-            A conformant SNMP agent may wish to conserve naming scopes
-            by representing multiple logical entities in a single 'main'
-            naming scope.  This is possible when the logical entities
-            represented by the same value of entLogicalCommunity have no
-            object instances in common.  For example, 'bridge1' and
-            'repeater1' may be part of the main naming scope, but two
-            additional community strings are needed to represent
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 15]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-            'bridge2' and 'repeater2'.
-
-            Logical entities 'bridge1' and 'repeater1' would be
-            represented by sysOREntries associated with the 'main'
-            naming scope.
-
-            For agents not accessible via SNMPv1, the value of this
-            object is the empty-string."
-    ::= { entLogicalEntry 4 }
-
-
-entLogicalTAddress OBJECT-TYPE
-    SYNTAX      TAddress
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The transport service address by which the logical entity
-            receives network management traffic, formatted according to
-            the corresponding value of entLogicalTDomain. For
-            snmpUDPDomain, entLogicalTAddress is formatted as a 4-octet
-            IP Address concatenated with a 2-octet UDP port number."
-    ::= { entLogicalEntry 5 }
-
-entLogicalTDomain OBJECT-TYPE
-    SYNTAX      OBJECT IDENTIFIER
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "Indicates the kind of transport service by which the
-            logical entity receives network management traffic.
-            Possible values for this object are presently found in the
-            Transport Mappings for SNMPv2 document (RFC 1449 [8]).  [ed
-            -- RFC 1449 is now historic]"
-    ::= { entLogicalEntry 6 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 16]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
---   entLPMappingTable: for each entity index, there are N
---      rows, each representing a physical component
---      that is associated with the indicated entity
---
--- entity to component table
-entLPMappingTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF EntLPMappingEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "This table contains zero or more rows of logical entity to
-            physical equipment associations."
-    ::= { entityMIBObjects 3 }
-
-entLPMappingEntry       OBJECT-TYPE
-    SYNTAX      EntLPMappingEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Information about a particular logical entity to physical
-            equipment binding."
-    INDEX       { entLogicalIndex, entLPPhysicalIndex }
-    ::= { entLPMappingTable 1 }
-
-EntLPMappingEntry ::= SEQUENCE {
-      entLPPhysicalIndex         INTEGER
-}
-
-entLPPhysicalIndex OBJECT-TYPE
-    SYNTAX      INTEGER (1..2147483647)
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of this object identifies a particular
-            entPhysicalEntry associated with the indicated
-            entLogicalEntity."
-    ::= { entLPMappingEntry 1 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 17]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
--- logical entity/component to alias table
-entAliasMappingTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF EntAliasMappingEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "This table contains zero or more rows of logical entity,
-            and physical component to external identifier associations."
-    ::= { entityMIBObjects 4 }
-
-entAliasMappingEntry       OBJECT-TYPE
-    SYNTAX      EntAliasMappingEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Information about a particular physical equipment, logical
-            entity to external identifier binding. Note that the same
-            logical entity/ physical component pair may have an
-            arbitrary number of external identifier (alias) bindings."
-    INDEX { entLogicalIndex, entPhysicalIndex, entAliasMappingIndex }
-    ::= { entAliasMappingTable 1 }
-
-EntAliasMappingEntry ::= SEQUENCE {
-      entAliasMappingIndex      INTEGER,
-      entAliasIdentifier        OBJECT IDENTIFIER
-}
-
-entAliasMappingIndex OBJECT-TYPE
-    SYNTAX      INTEGER (1..2147483647)
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "The value of this object uniquely identifies the particular
-            binding for a specific logical entity on a particular
-            physical component. The value is a small positive integer;
-            index values for different entAlias mappings are not
-            necessarily contiguous."
-    ::= { entAliasMappingEntry 1 }
-
-entAliasIdentifier OBJECT-TYPE
-    SYNTAX      OBJECT IDENTIFIER
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of this object identifies a particular MIB
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 18]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-            instance associated with the indicated entPhysicalEntry and
-            entLogicalEntry pair.
-
-            For example, suppose a physical port was represented by
-            entPhysicalEntry.3, and entLogicalEntry.1 existed for a
-            repeater, entLogicalEntry.2 existed for a bridge, and the
-            bridge port was also represented in the ifTable. Then there
-            might be three related instances of entAliasIdentifier:
-               entAliasIdentifier.3.1.1 == rptrPortGroupIndex.5.2
-               entAliasIdentifier.3.2.1 == dot1dBasePort.2
-               entAliasIdentifier.3.2.2 == ifIndex.2 "
-    ::= { entAliasMappingEntry 2 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 19]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
--- physical mapping table
-entPhysicalContainsTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF EntPhysicalContainsEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "A table which exposes the container/containee relationships
-            between physical entities."
-    ::= { entityMIBObjects 5 }
-
-entPhysicalContainsEntry OBJECT-TYPE
-    SYNTAX      EntPhysicalContainsEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "A single container/containee relationship."
-    INDEX       { entPhysicalIndex, entPhysicalChildIndex }
-    ::= { entPhysicalContainsTable 1 }
-
-EntPhysicalContainsEntry ::= SEQUENCE {
-      entPhysicalChildIndex INTEGER
-}
-
-entPhysicalChildIndex OBJECT-TYPE
-    SYNTAX      INTEGER (1..2147483647)
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of entPhysicalIndex for the contained physical
-            entity."
-    ::= { entPhysicalContainsEntry 1 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 20]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
--- last change timestamp for the whole MIB
-entLastChangeTime OBJECT-TYPE
-    SYNTAX      Timestamp
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of sysUpTime at the time any of these events
-            occur:
-                * a conceptual row is created or deleted in any of these tables:
-                    - entPhysicalTable
-                    - entLogicalTable
-                    - entLPMappingTable
-                    - entAliasMappingTable
-                    - entPhysicalContainsTable
-
-                * any instance in the following list of objects changes value:
-                    - entPhysicalDescr
-                    - entPhysicalVendorType
-                    - entPhysicalContainedIn
-                    - entPhysicalClass
-                    - entLogicalDescr
-                    - entLogicalType
-                    - entLogicalCommunity
-                    - entLogicalTAddress
-                    - entLogicalTDomain
-                    - entAliasIdentifier
-            "
-    ::= { entityMIBObjects 6 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 21]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
--- Entity MIB Trap Definitions
-entityMIBTraps    OBJECT IDENTIFIER ::= { entityMIB 2 }
-
-entConfigChange NOTIFICATION-TYPE
-    OBJECTS {
-            entLastChangeTime
-            }
-    STATUS             current
-    DESCRIPTION
-            "An entConfigChange trap is sent when the value of
-            entLastChangeTime changes. It can be utilized by an NMS to
-            trigger logical/physical entity table maintenance polls.
-            This trap is throttled by the agent.
-
-            The value of entLastChangeTime at the time the
-            entConfigChange event is detected by the agent is encoded as
-            a var-bind in the trap. This should be the same value as the
-            sysUpTime instance included in the trap, but may not be if
-            trap generation is delayed at all within the agent.
-
-            An agent must take care not to generate more than one
-            entConfigChange 'trap-event' in a five second period, where
-            a 'trap-event' is the transmission of a single trap PDU to a
-            list of trap destinations.  If additional configuration
-            changes occur within the five second 'throttling' period,
-            then these events should be discarded by the agent. An NMS
-            should periodically check the value of entLastChangeTime to
-            detect any missed entConfigChange events due to throttling.
-   ::= { entityMIBTraps 1 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 22]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
--- conformance information
-entityConformance OBJECT IDENTIFIER ::= { entityMIB 3 }
-
-entityCompliances OBJECT IDENTIFIER ::= { entityConformance 1 }
-entityGroups      OBJECT IDENTIFIER ::= { entityConformance 2 }
-
--- compliance statements
-
-entityCompliance MODULE-COMPLIANCE
-    STATUS  current
-    DESCRIPTION
-            "The compliance statement for SNMPv2 entities
-            which implement the Entity MIB."
-    MODULE  -- this module
-        MANDATORY-GROUPS { entityGroup }
-    ::= { entityCompliances 1 }
-
-
--- units of conformance
-
-entityGroup    OBJECT-GROUP
-    OBJECTS { entPhysicalDescr,
-              entPhysicalVendorType,
-              entPhysicalContainedIn,
-              entPhysicalClass,
-              entPhysicalParentRelPos,
-              entLogicalDescr,
-              entLogicalType,
-              entLogicalCommunity,
-              entLogicalTAddress,
-              entLogicalTDomain,
-              entLPPhysicalIndex,
-              entAliasIdentifier,
-              entPhysicalChildIndex,
-              entLastChangeTime,
-              entConfigChange
-            }
-    STATUS  current
-    DESCRIPTION
-            "The collection of objects which are used to
-            represent the multiple logical entities,
-            physical components, interfaces, and port
-            alias identifiers for which a single agent
-            provides MIB information."
-    ::= { entityGroups 1 }
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 23]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-END
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 24]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-5.  Usage Examples
-
-The following sections iterate the instance values for two example
-networking devices. These examples are kept simple to make them more
-understandable. Auxillary components, such as fans, sensors, empty
-slots, and sub-modules are not shown, but should be modeled in real
-implementations.
-
-
-5.1.  Router/Bridge
-
-An SNMPv1 router containing two slots.  Each slot contains a 3 port
-router/bridge module. Each port is represented in the ifTable.  There
-are two logical instances of OSPF running and two logical bridges:
-
-  Physical entities -- entPhysicalTable:
-    1 Field-replaceable physical chassis:
-      entPhysicalDescr.1 ==             "Acme Chassis Model 100"
-      entPhysicalVendorType.1  ==       acmeProducts.chassisTypes.1
-      entPhysicalContainedIn.1 ==       0
-      entPhysicalClass.1 ==             chassis(3)
-      entPhysicalParentRelPos.1 ==      0
-
-    2 slots within the chassis:
-      entPhysicalDescr.2 ==             "Acme Router Chassis Slot 1"
-      entPhysicalVendorType.2  ==       acmeProducts.slotTypes.1
-      entPhysicalContainedIn.2 ==       1
-      entPhysicalClass.2 ==             container(5)
-      entPhysicalParentRelPos.2 ==      1
-
-      entPhysicalDescr.3 ==             "Acme Router Chassis Slot 2"
-      entPhysicalVendorType.3  ==       acmeProducts.slotTypes.1
-      entPhysicalContainedIn.3 ==       1
-      entPhysicalClass.3 ==             container(5)
-      entPhysicalParentRelPos.3 ==      2
-
-    2 Field-replaceable modules:
-    Slot 1 contains a module with 3 ports:
-      entPhysicalDescr.4 ==             "Acme Router Module Model 10"
-      entPhysicalVendorType.4  ==       acmeProducts.moduleTypes.14
-      entPhysicalContainedIn.4 ==       2
-      entPhysicalClass.4 ==             module(9)
-      entPhysicalParentRelPos.4 ==      1
-
-      entPhysicalDescr.5 ==             "Acme Router Ethernet Port 1"
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 25]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-      entPhysicalVendorType.5  ==       acmeProducts.portTypes.2
-      entPhysicalContainedIn.5 ==       4
-      entPhysicalClass.5 ==             port(10)
-      entPhysicalParentRelPos.5 ==      1
-
-      entPhysicalDescr.6 ==             "Acme Router Ethernet Port 2"
-      entPhysicalVendorType.6  ==       acmeProducts.portTypes.2
-      entPhysicalContainedIn.6 ==       4
-      entPhysicalClass.6 ==             port(10)
-      entPhysicalParentRelPos.6 ==      2
-
-      entPhysicalDescr.7 ==             "Acme Router Fddi Port 3"
-      entPhysicalVendorType.7  ==       acmeProducts.portTypes.3
-      entPhysicalContainedIn.7 ==       4
-      entPhysicalClass.7 ==             port(10)
-      entPhysicalParentRelPos.7 ==      3
-
-   Slot 2 contains another 3-port module:
-      entPhysicalDescr.8 ==             "Acme Router Module Model 11"
-      entPhysicalVendorType.8  ==       acmeProducts.moduleTypes.15
-      entPhysicalContainedIn.8 ==       3
-      entPhysicalClass.8 ==             module(9)
-      entPhysicalParentRelPos.8 ==      1
-
-      entPhysicalDescr.9 ==             "Acme Router Fddi Port 1"
-      entPhysicalVendorType.9 ==        acmeProducts.portTypes.3
-      entPhysicalContainedIn.9 ==       8
-      entPhysicalClass.9 ==             port(10)
-      entPhysicalParentRelPos.9 ==      1
-
-      entPhysicalDescr.10 ==            "Acme Router Ethernet Port 2"
-      entPhysicalVendorType.10 ==       acmeProducts.portTypes.2
-      entPhysicalContainedIn.10 ==      8
-      entPhysicalClass.10 ==            port(10)
-      entPhysicalParentRelPos.10 ==     2
-
-      entPhysicalDescr.11 ==            "Acme Router Ethernet Port 3"
-      entPhysicalVendorType.11 ==       acmeProducts.portTypes.2
-      entPhysicalContainedIn.11 ==      8
-      entPhysicalClass.11 ==            port(10)
-      entPhysicalParentRelPos.11 ==     3
-
-   Logical entities -- entLogicalTable
-   2 OSPF instances:
-      entLogicalDescr.1 ==            "ospf-1"
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 26]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-      entLogicalType.1 ==             ospf
-      entLogicalCommunity.1 ==        "public-ospf1"
-      entLogicalTAddress.1 ==         124.125.126.127:161
-      entLogicalTDomain.1 ==          snmpUDPDomain
-
-      entLogicalDescr.2 ==            "ospf-2"
-      entLogicalType.2 ==             ospf
-      entLogicalCommunity.2 ==        "public-ospf2"
-      entLogicalTAddress.2 ==         124.125.126.127:161
-      entLogicalTDomain.2 ==          snmpUDPDomain
-
-    2 logical bridges:
-      entLogicalDescr.3 ==            "bridge1"
-      entLogicalType.3  ==            dod1dBridge
-      entLogicalCommunity.3 ==        "public-bridge1"
-      entLogicalTAddress.3 ==         124.125.126.127:161
-      entLogicalTDomain.3 ==          snmpUDPDomain
-
-      entLogicalDescr.4 ==            "bridge2"
-      entLogicalType.4 ==             dod1dBridge
-      entLogicalCommunity.4 ==        "public-bridge2"
-      entLogicalTAddress.4 ==         124.125.126.127:161
-      entLogicalTDomain.4 ==          snmpUDPDomain
-
-Logical to Physical Mappings:
-  1st OSPF instance: uses module 1-port 1
-      entLPPhysicalIndex.1.5 ==         5
-
-  2nd OSPF instance: uses module 2-port 1
-      entLPPhysicalIndex.2.9 ==         9
-
-  1st bridge group: uses module 1, all ports
-      entLPPhysicalIndex.3.5 ==         5
-      entLPPhysicalIndex.3.6 ==         6
-      entLPPhysicalIndex.3.7 ==         7
-
-  2nd bridge group: uses module 2, all ports
-      entLPPhysicalIndex.4.9  ==        9
-      entLPPhysicalIndex.4.10 ==        10
-      entLPPhysicalIndex.4.11 ==        11
-
-Logical to Physical to Alias Mappings -- entAliasMappingTable:
-  Bridge 1 uses Ports 1..3 on Slot 1
-      entAliasIdentifier.3.5.1 ==       dot1dBasePort.1
-      entAliasIdentifier.3.5.2 ==       ifIndex.1
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 27]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-      entAliasIdentifier.3.6.1 ==       dot1dBasePort.2
-      entAliasIdentifier.3.6.2 ==       ifIndex.2
-      entAliasIdentifier.3.7.1 ==       dot1dBasePort.3
-      entAliasIdentifier.3.7.2 ==       ifIndex.3
-
-  Bridge 2 uses Ports 1..3 on Slot 2; uses same Bridge MIB and ifIndex
-  values as Bridge 1, but in a different context, and representing
-  different physical ports:
-      entAliasIdentifier.4.9.1 ==       dot1dBasePort.1
-      entAliasIdentifier.4.9.2 ==       ifIndex.1
-      entAliasIdentifier.4.10.1 ==      dot1dBasePort.2
-      entAliasIdentifier.4.10.2 ==      ifIndex.2
-      entAliasIdentifier.4.11.1 ==      dot1dBasePort.3
-      entAliasIdentifier.4.11.2 ==      ifIndex.3
-
-Physical Containment Tree -- entPhysicalContainsTable
-  chassis has two containers:
-      entPhysicalChildIndex.1.2 = 2
-      entPhysicalChildIndex.1.3 = 3
-
-  container 1 has a module:
-      entPhysicalChildIndex.2.4 = 4
-
-  container 2 has a module
-      entPhysicalChildIndex.3.8 = 8
-
-  module 1 has some ports:
-      entPhysicalChildIndex.4.5 = 5
-      entPhysicalChildIndex.4.6 = 6
-      entPhysicalChildIndex.4.7 = 7
-
-  module 2 has some ports:
-      entPhysicalChildIndex.8.9 = 9
-      entPhysicalChildIndex.8.10 = 10
-      entPhysicalChildIndex.1.11 = 11
-
-
-5.2.  Repeaters
-
-An SNMPv1 only, 3-slot Hub with 2 backplane ethernet segments.  Slot
-three is empty, and the remaining slots contain ethernet repeater
-modules.
-
-   Physical entities -- entPhysicalTable:
-    1 Field-replaceable physical chassis:
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 28]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-      entPhysicalDescr.1 ==          "Acme Repeater Chassis Model 110"
-      entPhysicalVendorType.1 ==     acmeProducts.chassisTypes.2
-      entPhysicalContainedIn.1 ==    0
-      entPhysicalClass.1 ==          chassis(3)
-      entPhysicalParentRelPos.1 ==   0
-
-    2 Chassis Ethernet Backplanes:
-      entPhysicalDescr.2 ==          "Ethernet Backplane 1"
-      entPhysicalVendorType.2 ==     acmeProducts.backplaneTypes.1
-      entPhysicalContainedIn.2 ==    1
-      entPhysicalClass.2 ==          backplane(4)
-      entPhysicalParentRelPos.2 ==   1
-
-      entPhysicalDescr.3 ==          "Ethernet Backplane 2"
-      entPhysicalVendorType.3  ==    acmeProducts.backplaneTypes.1
-      entPhysicalContainedIn.3 ==    1
-      entPhysicalClass.3 ==          backplane(4)
-      entPhysicalParentRelPos.3 ==   2
-
-     3 slots within the chassis:
-      entPhysicalDescr.4 ==          "Acme Hub Slot 1"
-      entPhysicalVendorType.4  ==    acmeProducts.slotTypes.5
-      entPhysicalContainedIn.4 ==    1
-      entPhysicalClass.4 ==          container(5)
-      entPhysicalParentRelPos.4 ==   1
-
-      entPhysicalDescr.5 ==          "Acme Hub Slot 2"
-      entPhysicalVendorType.5  ==    acmeProducts.slotTypes.5
-      entPhysicalContainedIn.5 ==    1
-      entPhysicalClass.5 ==          container(5)
-      entPhysicalParentRelPos.5 ==   2
-
-      entPhysicalDescr.6 ==          "Acme Hub Slot 3"
-      entPhysicalVendorType.6  ==    acmeProducts.slotTypes.5
-      entPhysicalContainedIn.6 ==    1
-      entPhysicalClass.6 ==          container(5)
-      entPhysicalParentRelPos.6 ==   3
-
-    Slot 1 contains a plug-in module with 4 10-BaseT ports:
-      entPhysicalDescr.7  ==         "10Base-T Module Model 14"
-      entPhysicalVendorType.7   ==   acmeProducts.moduleTypes.32
-      entPhysicalContainedIn.7  ==   4
-      entPhysicalClass.7 ==          module(9)
-      entPhysicalParentRelPos.7 ==   1
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 29]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-      entPhysicalDescr.8  ==         "10Base-T Port 1"
-      entPhysicalVendorType.8   ==   acmeProducts.portTypes.10
-      entPhysicalContainedIn.8  ==   7
-      entPhysicalClass.8 ==          port(10)
-      entPhysicalParentRelPos.8 ==   1
-
-      entPhysicalDescr.9  ==         "10Base-T Port 2"
-      entPhysicalVendorType.9   ==   acmeProducts.portTypes.10
-      entPhysicalContainedIn.9  ==   7
-      entPhysicalClass.9 ==          port(10)
-      entPhysicalParentRelPos.9 ==   2
-
-      entPhysicalDescr.10 ==         "10Base-T Port 3"
-      entPhysicalVendorType.10  ==   acmeProducts.portTypes.10
-      entPhysicalContainedIn.10 ==   7
-      entPhysicalClass.10 ==         port(10)
-      entPhysicalParentRelPos.10 ==  3
-
-      entPhysicalDescr.11 ==         "10Base-T Port 4"
-      entPhysicalVendorType.11  ==   acmeProducts.portTypes.10
-      entPhysicalContainedIn.11 ==   7
-      entPhysicalClass.11 ==         port(10)
-      entPhysicalParentRelPos.11 ==  4
-
-   Slot 2 contains another ethernet module with 2 ports.
-      entPhysicalDescr.12 ==         "Acme 10Base-T Module Model 4"
-      entPhysicalVendorType.12 ==    acmeProducts.moduleTypes.30
-      entPhysicalContainedIn.12 =    5
-      entPhysicalClass.12 ==         module(9)
-      entPhysicalParentRelPos.12 ==  1
-
-      entPhysicalDescr.13 ==         "802.3 AUI Port 1"
-      entPhysicalVendorType.13  ==   acmeProducts.portTypes.11
-      entPhysicalContainedIn.13 ==   12
-      entPhysicalClass.13 ==         port(10)
-      entPhysicalParentRelPos.13 ==  1
-
-      entPhysicalDescr.14 ==         "10Base-T Port 2"
-      entPhysicalVendorType.14  ==   acmeProducts.portTypes.10
-      entPhysicalContainedIn.14 ==   12
-      entPhysicalClass.14 ==         port(10)
-      entPhysicalParentRelPos.14 ==  2
-
-   Logical entities -- entLogicalTable
-     Repeater 1--comprised of any ports attached to backplane 1
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 30]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-      entLogicalDescr.1 ==         "repeater1"
-      entLogicalType.1  ==         snmpDot3RptrMgt
-      entLogicalCommunity.1        "public-repeater1"
-      entLogicalTAddress.1 ==      124.125.126.127:161
-      entLogicalTDomain.1 ==       snmpUDPDomain
-
-     Repeater 2--comprised of any ports attached to backplane 2:
-      entLogicalDescr.2 ==         "repeater2"
-      entLogicalType.2  ==         snmpDot3RptrMgt
-      entLogicalCommunity.2 ==     "public-repeater2"
-      entLogicalTAddress.2 ==      124.125.126.127:161
-      entLogicalTDomain.2 ==       snmpUDPDomain
-
-Logical to Physical Mappings -- entLPMappingTable:
-
-  repeater1 uses backplane 1, slot 1-ports 1 & 2, slot 2-port 1
-     entLPPhysicalIndex.1.2 ==          2
-     entLPPhysicalIndex.1.8 ==          8
-     entLPPhysicalIndex.1.9 ==          9
-     entLPPhysicalIndex.1.13 ==         13
-
-  repeater2 uses backplane 2, slot 1-ports 3 & 4, slot 2-port 2
-      entLPPhysicalIndex.2.3 ==         3
-      entLPPhysicalIndex.2.10 ==        10
-      entLPPhysicalIndex.2.11 ==        11
-      entLPPhysicalIndex.2.14 ==        14
-
-Logical to Physical to Alias Mappings -- entAliasMappingTable:
-  repeater1 uses slot 1-ports 1 & 2, slot 2-port 1
-      entAliasIdentifier.1.8.1 ==       rptrPortGroupIndex.1.1
-      entAliasIdentifier.1.9.1 ==       rptrPortGroupIndex.1.2
-      entAliasIdentifier.1.13.1 ==      rptrPortGroupIndex.2.1
-
-  repeater2 uses slot 1-ports 3 & 4, slot 2-port 2
-      entAliasIdentifier.2.10.1 ==      rptrPortGroupIndex.1.3
-      entAliasIdentifier.2.11.1 ==      rptrPortGroupIndex.1.4
-      entAliasIdentifier.2.14.1 ==      rptrPortGroupIndex.2.2
-
-Physical Containment Tree -- entPhysicalContainsTable
-
-  chassis has two backplanes and three containers:
-      entPhysicalChildIndex.1.2 = 2
-      entPhysicalChildIndex.1.3 = 3
-      entPhysicalChildIndex.1.4 = 4
-      entPhysicalChildIndex.1.5 = 5
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 31]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-      entPhysicalChildIndex.1.6 = 6
-
-  container 1 has a module:
-      entPhysicalChildIndex.4.7 = 7
-
-  container 2 has a module
-      entPhysicalChildIndex.5.12 = 12
-  -- container 3 is empty
-
-  module 1 has some ports:
-      entPhysicalChildIndex.7.8 = 8
-      entPhysicalChildIndex.7.9 = 9
-      entPhysicalChildIndex.7.10 = 10
-      entPhysicalChildIndex.7.11 = 11
-
-  module 2 has some ports:
-      entPhysicalChildIndex.12.13 = 13
-      entPhysicalChildIndex.12.14 = 14
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 32]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-6.  Acknowledgements
-
-This document was produced by the IETF Entity MIB Working Group.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 33]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-7.  References
-
-[1]  Case, J., McCloghrie, K., Rose, M., and S. Waldbusser, "Structure
-     of Management Information for version 2 of the Simple Network
-     Management Protocol (SNMPv2)", RFC 1442, SNMP Research,Inc., Hughes
-     LAN Systems, Dover Beach Consulting, Inc., Carnegie Mellon
-     University, April 1993.
-
-[2]  McCloghrie, K., and M. Rose, Editors, "Management Information Base
-     for Network Management of TCP/IP-based internets: MIB-II", STD 17,
-     RFC 1213, Hughes LAN Systems, Performance Systems International,
-     March 1991.
-
-[3]  Galvin, J., and K. McCloghrie, "Administrative Model for version 2
-     of the Simple Network Management Protocol (SNMPv2)", RFC 1445,
-     Trusted Information Systems, Hughes LAN Systems, April 1993.
-
-[4]  Case, J., McCloghrie, K., Rose, M., and S. Waldbusser, "Protocol
-     Operations for version 2 of the Simple Network Management Protocol
-     (SNMPv2)", RFC 1448, SNMP Research,Inc., Hughes LAN Systems, Dover
-     Beach Consulting, Inc., Carnegie Mellon University, April 1993.
-
-[5]  McCloghrie, K., and J.  Galvin, "Party MIB for Version 2 of the
-     Simple Network Management Protocol (SNMPv2)", RFC 1447, Hughes LAN
-     Systems, Trusted Information Systems, April 1993.
-
-[6]  Case, J., M. Fedor, M. Schoffstall, J. Davin, "Simple Network
-     Management Protocol", RFC 1157, SNMP Research, Performance Systems
-     International, MIT Laboratory for Computer Science, May 1990.
-
-[7]  McCloghrie, K., and Kastenholtz, F., "Interfaces Group Evolution",
-     RFC 1573, Hughes LAN Systems, FTP Software, January 1994.
-
-[8]  Case, J., McCloghrie, K., Rose, M., and Waldbusser, S., "Transport
-     Mappings for version 2 of the Simple Network Management Protocol
-     (SNMPv2)", RFC 1449, SNMP Research, Inc., Hughes LAN Systems, Dover
-     Beach Consulting, Inc., Carnegie Mellon University, April 1993.
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 34]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-8.  Security Considerations
-
-Security issues are not discussed in this memo.
-
-
-9.  Authors' Addresses
-
-     Keith McCloghrie
-     cisco Systems, Inc.
-     170 West Tasman Drive
-     San Jose, CA 95134
-     Phone: 408-526-5260
-     Email: kzm@cisco.com
-
-     Andy Bierman
-     Bierman Consulting
-     1200 Sagamore Lane
-     Ventura, CA 93001
-     Phone: 805-648-2028
-     Email: abierman@west.net
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 35]
-
-
-
-
-
-Draft                          Entity MIB               January 22, 1996
-
-
-Table of Contents
-
-
-1 Introduction ....................................................    2
-2 The SNMPv1 Network Management Framework .........................    3
-2.1 Object Definitions ............................................    3
-3 Overview ........................................................    4
-3.1 Terms .........................................................    4
-3.2 Relationship to Community Strings .............................    6
-3.3 Relationship to Proxy Mechanisms ..............................    6
-3.4 Relationship to a Chassis MIB .................................    6
-3.5 Relationship to the Interfaces MIB ............................    7
-3.6 Relationship to the Other MIBs ................................    7
-3.7 Re-Configuration of Entities ..................................    7
-3.8 MIB Structure .................................................    7
-3.9 Multiple Agents ...............................................    8
-4 Definitions .....................................................    9
-5 Usage Examples ..................................................   25
-5.1 Router/Bridge .................................................   25
-5.2 Repeaters .....................................................   28
-6 Acknowledgements ................................................   33
-7 References ......................................................   34
-8 Security Considerations .........................................   35
-9 Authors' Addresses ..............................................   35
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-McCloghrie/Bierman       Expires July 22, 1996                 [Page 36]
-
-
-
--- a/usr/src/cmd/agents/snmp/mib/em/mib_NSM.em	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,443 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-   APPLICATION-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-       mib-2
-         FROM RFC1213-MIB
-       DisplayString, TimeStamp
-         FROM SNMPv2-TC;
-
-
-   -- Textual conventions
-
-   -- DistinguishedName [5] is used to refer to objects in the
-   -- directory.
-
---   DistinguishedName ::= TEXTUAL-CONVENTION
---       STATUS current
---       DESCRIPTION
---           "A Distinguished Name represented in accordance with
---            RFC1485."
---       SYNTAX DisplayString
-
-DisplayString ::= OCTET STRING
-DistinguishedName ::= OCTET STRING
-TimeStamp ::= TimeTicks
-Gauge32 ::= Gauge
-Counter32 ::= Counter
-
---   application MODULE-IDENTITY
---       LAST-UPDATED "9311280000Z"
---       ORGANIZATION "IETF Mail and Directory Management Working Group"
---       CONTACT-INFO
---         "        Ned Freed
---
---          Postal: Innosoft International, Inc.
---                  250 West First Street, Suite 240
---                  Claremont, CA  91711
---                  US
---
---             Tel: +1 909 624 7907
---             Fax: +1 909 621 5319
---
---          E-Mail: ned@innosoft.com"
---       DESCRIPTION
---         "The MIB module describing network service applications"
---       ::= { mib-2 27 }
-
-iso           OBJECT IDENTIFIER ::= { 1 }
-org           OBJECT IDENTIFIER ::= { iso 3 }
-dod           OBJECT IDENTIFIER ::= { org 6 }
-internet      OBJECT IDENTIFIER ::= { dod 1 }
-mgmt          OBJECT IDENTIFIER ::= { internet 2 }
-mib-2         OBJECT IDENTIFIER ::= { mgmt 1 }
-application   OBJECT IDENTIFIER ::= { mib-2 27 }
-
-
-   -- The basic applTable contains a list of the application
-   -- entities.
-
-
-   applTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF ApplEntry
---       MAX-ACCESS not-accessible
-       ACCESS not-accessible
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-           "The table holding objects which apply to all different
-            kinds of applications providing network services."
-       ::= {application 1}
-
-   applEntry OBJECT-TYPE
-       SYNTAX ApplEntry
---       MAX-ACCESS not-accessible
-       ACCESS not-accessible
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "An entry associated with a network service application."
-       INDEX {applIndex}
-       ::= {applTable 1}
-
-   ApplEntry ::= SEQUENCE {
-       applIndex
-           INTEGER,
-       applName
-           DisplayString,
-       applDirectoryName
-           DistinguishedName,
-       applVersion
-           DisplayString,
-       applUptime
-           TimeStamp,
-       applOperStatus
-           INTEGER,
-       applLastChange
-           TimeStamp,
-       applInboundAssociations
-           Gauge32,
-       applOutboundAssociations
-           Gauge32,
-       applAccumulatedInboundAssociations
-           Counter32,
-       applAccumulatedOutboundAssociations
-           Counter32,
-       applLastInboundActivity
-           TimeStamp,
-       applLastOutboundActivity
-           TimeStamp,
-       applRejectedInboundAssociations
-           Counter32,
-       applFailedOutboundAssociations
-           Counter32
-   }
-
-   applIndex OBJECT-TYPE
---       SYNTAX INTEGER (1..2147483647)
-       SYNTAX INTEGER
---       MAX-ACCESS not-accessible
-       ACCESS not-accessible
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "An index to uniquely identify the network service
-          application."
-       ::= {applEntry 1}
-
-   applName OBJECT-TYPE
-       SYNTAX DisplayString
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The name the network service application chooses to be
-          known by."
-       ::= {applEntry 2}
-
-   applDirectoryName OBJECT-TYPE
-       SYNTAX DistinguishedName
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The Distinguished Name of the directory entry where
-          static information about this application is stored.
-          An empty string indicates that no information about
-          the application is available in the directory."
-       ::= {applEntry 3}
-
-   applVersion OBJECT-TYPE
-       SYNTAX DisplayString
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The version of network service application software."
-       ::= {applEntry 4}
-
-   applUptime OBJECT-TYPE
-       SYNTAX TimeStamp
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The value of sysUpTime at the time the network service
-          application was last initialized.  If the application was
-          last initialized prior to the last initialization of the
-          network management subsystem, then this object contains
-          a zero value."
-       ::= {applEntry 5}
-
-   applOperStatus OBJECT-TYPE
-       SYNTAX INTEGER {
-         up(1),
-         down(2),
-         halted(3),
-         congested(4),
-         restarting(5)
-       }
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "Indicates the operational status of the network service
-          application. 'down' indicates that the network service is
-          not available. 'running' indicates that the network service
-          is operational and available.  'halted' indicates that the
-          service is operational but not available.  'congested'
-          indicates that the service is operational but no additional
-          inbound associations can be accomodated.  'restarting'
-          indicates that the service is currently unavailable but is
-          in the process of restarting and will be available soon."
-       ::= {applEntry 6}
-
-   applLastChange OBJECT-TYPE
-       SYNTAX TimeStamp
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The value of sysUpTime at the time the network service
-          application entered its current operational state.  If
-          the current state was entered prior to the last
-          initialization of the local network management subsystem,
-          then this object contains a zero value."
-       ::= {applEntry 7}
-
-   applInboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The number of current associations to the network service
-          application, where it is the responder.  For dynamic single
-          threaded processes, this will be the number of application
-          instances."
-       ::= {applEntry 8}
-
-   applOutboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The number of current associations to the network service
-          application, where it is the initiator.  For dynamic single
-          threaded processes, this will be the number of application
-          instances."
-       ::= {applEntry 9}
-
-   applAccumulatedInboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The total number of associations to the application entity
-          since application initialization, where it was the responder.
-          For  dynamic single threaded processes, this will be the
-          number of application instances."
-       ::= {applEntry 10}
-
-   applAccumulatedOutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The total number of associations to the application entity
-          since application initialization, where it was the initiator.
-          For dynamic single threaded processes, this will be the
-          number of application instances."
-       ::= {applEntry 11}
-
-   applLastInboundActivity OBJECT-TYPE
-       SYNTAX TimeStamp
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The value of sysUpTime at the time this application last
-          had an inbound association.  If the last association
-          occurred prior to the last initialization of the network
-          subsystem, then this object contains a zero value."
-       ::= {applEntry 12}
-
-   applLastOutboundActivity OBJECT-TYPE
-       SYNTAX TimeStamp
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The value of sysUpTime at the time this application last
-          had an outbound association.  If the last association
-          occurred prior to the last initialization of the network
-          subsystem, then this object contains a zero value."
-       ::= {applEntry 13}
-
-   applRejectedInboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The total number of inbound associations the application
-          entity has rejected, since application initialization."
-       ::= {applEntry 14}
-
-   applFailedOutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The total number associations where the application entity
-          is initiator and association establishment has failed,
-          since application initialization."
-       ::= {applEntry 15}
-
-
-   -- The assocTable augments the information in the applTable
-   -- with information about associations.  Note that two levels
-   -- of compliance are specified below, depending on whether
-   -- association monitoring is mandated.
-
-   assocTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF AssocEntry
---       MAX-ACCESS not-accessible
-       ACCESS not-accessible
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-           "The table holding a set of all active application
-            associations."
-       ::= {application 2}
-
-   assocEntry OBJECT-TYPE
-       SYNTAX AssocEntry
---       MAX-ACCESS not-accessible
-       ACCESS not-accessible
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "An entry associated with an association for a network
-          service application."
-       INDEX {applIndex, assocIndex}
-       ::= {assocTable 1}
-
-   AssocEntry ::= SEQUENCE {
-       assocIndex
-           INTEGER,
-       assocRemoteApplication
-           DisplayString,
-       assocApplicationProtocol
-           OBJECT IDENTIFIER,
-       assocApplicationType
-           INTEGER,
-       assocDuration
-           TimeStamp
-   }
-
-   assocIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
---       MAX-ACCESS not-accessible
-       ACCESS not-accessible
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "An index to uniquely identify each association for a network
-          service application."
-       ::= {assocEntry 1}
-
-   assocRemoteApplication OBJECT-TYPE
-       SYNTAX DisplayString
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The name of the system running remote network service
-          application.  For an IP-based application this should be
-          either a domain name or IP address.  For an OSI application
-          it should be the string encoded distinguished name of the
-          managed object.  For X.400(84) MTAs which do not have a
-          Distinguished Name, the RFC1327 [6] syntax
-          'mta in globalid' should be used."
-       ::= {assocEntry 2}
-
-   assocApplicationProtocol OBJECT-TYPE
-       SYNTAX OBJECT IDENTIFIER
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "An identification of the protocol being used for the
-          application.  For an OSI Application, this will be the
-          Application Context.  For Internet applications, the IANA
-          maintains a registry of the OIDs which correspond to
-          well-known applications.  If the application protocol is
-          not listed in the registry, an OID value of the form
-          {applTCPProtoID port} or {applUDProtoID port} are used for
-          TCP-based and UDP-based protocols, respectively. In either
-          case 'port' corresponds to the primary port number being
-          used by the protocol."
-       ::= {assocEntry 3}
-
-   assocApplicationType OBJECT-TYPE
-       SYNTAX INTEGER {
-           ua-initiator(1),
-           ua-responder(2),
-           peer-initiator(3),
-           peer-responder(4)}
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "This indicates whether the remote application is some type of
-          client making use of this network service (e.g. a User Agent)
-          or a server acting as a peer. Also indicated is whether the
-          remote end initiated an incoming connection to the network
-          service or responded to an outgoing connection made by the
-          local application."
-       ::= {assocEntry 4}
-
-   assocDuration OBJECT-TYPE
-       SYNTAX TimeStamp
---       MAX-ACCESS read-only
-       ACCESS read-only
---       STATUS current
-       STATUS mandatory
-       DESCRIPTION
-         "The value of sysUpTime at the time this association was
-          started.  If this association started prior to the last
-          initialization of the network subsystem, then this
-          object contains a zero value."
-       ::= {assocEntry 5}
-
-
-   applTCPProtoID OBJECT IDENTIFIER ::= {application 4}
-   applUDPProtoID OBJECT IDENTIFIER ::= {application 5}
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/gdmo/mib_NSM.gdmo	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,414 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-MODULE "IIMCAPPLICATION-MIB"
-
-application MANAGED OBJECT CLASS
-   DERIVED FROM "Rec. X.721 | ISO/IEC 10165-2 : 1992":top;
-   CHARACTERIZED BY
-       applicationPkg PACKAGE
-          BEHAVIOUR
-       applicationPkgBehaviour BEHAVIOUR
-       DEFINED AS
-       !This Managed object class maps to the application group
-       with object id { mib-2 27 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-   ATTRIBUTES
-        "iimcManagementDoc 1": internetClassId	GET;;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 };
-
-application-proxyNB NAME BINDING
-    SUBORDINATE OBJECT CLASS application
-        AND SUBCLASSES;
-    NAMED BY SUPERIOR OBJECT CLASS
-        "iimcManagementProxyMIB":cmipsnmpProxyAgent
-        AND SUBCLASSES;
-    WITH ATTRIBUTE
-        "iimcManagementDoc 1": internetClassId;
-    BEHAVIOUR
-        application-proxyNBBehaviour BEHAVIOUR
-        DEFINED AS !The <internet instanceId> portion of
-        the internetClassId value shall be 0.!;;
-REGISTERED AS  { iimcManagementNB 1 1 3 6 1 2 1 27 };
-
-applTable MANAGED OBJECT CLASS
-   DERIVED FROM "Rec. X.721 | ISO/IEC 10165-2 : 1992":top;
-   CHARACTERIZED BY
-       applTablePkg PACKAGE
-          BEHAVIOUR
-       applTablePkgBehaviour BEHAVIOUR
-       DEFINED AS
-       !This Managed object class maps to the applTable object
-       with object id { application 1 } in APPLICATION-MIB
-       See APPLICATION-MIB for attribute semantics.!;;
-   ATTRIBUTES
-        "iimcManagementDoc 1": internetClassId	GET;;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 };
-
-applEntry MANAGED OBJECT CLASS
-   DERIVED FROM "Rec. X.721 | ISO/IEC 10165-2 : 1992":top;
-   CHARACTERIZED BY
-       applEntryPkg PACKAGE
-          BEHAVIOUR
-       applEntryPkgBehaviour BEHAVIOUR
-       DEFINED AS
-         !PARSE
-         MULTIPLEINSTANCES
-            INDEX
-                applIndex;
-            CREATEDELETEATT <label of attribute used for creation and deletion of entries>
-            CREATEDELETEVALUE <label of create/delete attribute indicating deletion>
-         ENDMULTIPLEINSTANCES
-         ENDPARSE
-       This Managed object class maps to the applEntry object
-       with object id { applTable 1 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-   ATTRIBUTES
-        "iimcManagementDoc 1": internetClassId	GET,
-        applName			GET,
-        applDirectoryName			GET,
-        applVersion			GET,
-        applUptime			GET,
-        applOperStatus			GET,
-        applLastChange			GET,
-        applInboundAssociations			GET,
-        applOutboundAssociations			GET,
-        applAccumulatedInboundAssociations			GET,
-        applAccumulatedOutboundAssociations			GET,
-        applLastInboundActivity			GET,
-        applLastOutboundActivity			GET,
-        applRejectedInboundAssociations			GET,
-        applFailedOutboundAssociations			GET;;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 };
-
-applTable-applicationNB NAME BINDING
-    SUBORDINATE OBJECT CLASS applTable
-        AND SUBCLASSES;
-    NAMED BY SUPERIOR OBJECT CLASS application
-        AND SUBCLASSES;
-    WITH ATTRIBUTE
-        "iimcManagementDoc 1": internetClassId;
-    BEHAVIOUR
-        applTable-applicationNBBehaviour BEHAVIOUR
-        DEFINED AS !The <internet instanceId> portion of
-        the internetClassId value shall be 0.!;;
-REGISTERED AS  { iimcManagementNB 1 1 3 6 1 2 1 27 1 };
-
-applEntry-applTableNB NAME BINDING
-    SUBORDINATE OBJECT CLASS applEntry
-        AND SUBCLASSES;
-    NAMED BY SUPERIOR OBJECT CLASS applTable
-        AND SUBCLASSES;
-    WITH ATTRIBUTE
-        "iimcManagementDoc 1": internetClassId;
-    BEHAVIOUR
-        applEntry-applTableNBBehaviour BEHAVIOUR
-        DEFINED AS 
-         !PARSE
-         MULTIPLEINSTANCES
-            INDEX
-                applIndex;
-            CREATEDELETEATT <label of attribute used for creation and deletion of entries>
-            CREATEDELETEVALUE <label of create/delete attribute indicating deletion>
-         ENDMULTIPLEINSTANCES
-         ENDPARSE
-        The <internet instanceId> portion of
-        the internetClassId value shall the value of the 
-        following attributes:
-            applIndex!;;
-        -- CREATE WITH-AUTOMATIC-INSTANCE-NAMING
-        -- DELETE DELETES-CONTAINED-OBJECTS
-REGISTERED AS  { iimcManagementNB 1 1 3 6 1 2 1 27 1 1 };
-
-assocTable MANAGED OBJECT CLASS
-   DERIVED FROM "Rec. X.721 | ISO/IEC 10165-2 : 1992":top;
-   CHARACTERIZED BY
-       assocTablePkg PACKAGE
-          BEHAVIOUR
-       assocTablePkgBehaviour BEHAVIOUR
-       DEFINED AS
-       !This Managed object class maps to the assocTable object
-       with object id { application 2 } in APPLICATION-MIB
-       See APPLICATION-MIB for attribute semantics.!;;
-   ATTRIBUTES
-        "iimcManagementDoc 1": internetClassId	GET;;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 2 };
-
-assocEntry MANAGED OBJECT CLASS
-   DERIVED FROM "Rec. X.721 | ISO/IEC 10165-2 : 1992":top;
-   CHARACTERIZED BY
-       assocEntryPkg PACKAGE
-          BEHAVIOUR
-       assocEntryPkgBehaviour BEHAVIOUR
-       DEFINED AS
-         !PARSE
-         MULTIPLEINSTANCES
-            INDEX
-                applIndex,
-                assocIndex;
-            CREATEDELETEATT <label of attribute used for creation and deletion of entries>
-            CREATEDELETEVALUE <label of create/delete attribute indicating deletion>
-         ENDMULTIPLEINSTANCES
-         ENDPARSE
-       This Managed object class maps to the assocEntry object
-       with object id { assocTable 1 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-   ATTRIBUTES
-        "iimcManagementDoc 1": internetClassId	GET,
-        assocRemoteApplication			GET,
-        assocApplicationProtocol			GET,
-        assocApplicationType			GET,
-        assocDuration			GET;;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 2 1 };
-
-assocTable-applicationNB NAME BINDING
-    SUBORDINATE OBJECT CLASS assocTable
-        AND SUBCLASSES;
-    NAMED BY SUPERIOR OBJECT CLASS application
-        AND SUBCLASSES;
-    WITH ATTRIBUTE
-        "iimcManagementDoc 1": internetClassId;
-    BEHAVIOUR
-        assocTable-applicationNBBehaviour BEHAVIOUR
-        DEFINED AS !The <internet instanceId> portion of
-        the internetClassId value shall be 0.!;;
-REGISTERED AS  { iimcManagementNB 1 1 3 6 1 2 1 27 2 };
-
-assocEntry-assocTableNB NAME BINDING
-    SUBORDINATE OBJECT CLASS assocEntry
-        AND SUBCLASSES;
-    NAMED BY SUPERIOR OBJECT CLASS assocTable
-        AND SUBCLASSES;
-    WITH ATTRIBUTE
-        "iimcManagementDoc 1": internetClassId;
-    BEHAVIOUR
-        assocEntry-assocTableNBBehaviour BEHAVIOUR
-        DEFINED AS 
-         !PARSE
-         MULTIPLEINSTANCES
-            INDEX
-                applIndex,
-                assocIndex;
-            CREATEDELETEATT <label of attribute used for creation and deletion of entries>
-            CREATEDELETEVALUE <label of create/delete attribute indicating deletion>
-         ENDMULTIPLEINSTANCES
-         ENDPARSE
-        The <internet instanceId> portion of
-        the internetClassId value shall the value of the 
-        following attributes:
-            applIndex,
-            assocIndex!;;
-        -- CREATE WITH-AUTOMATIC-INSTANCE-NAMING
-        -- DELETE DELETES-CONTAINED-OBJECTS
-REGISTERED AS  { iimcManagementNB 1 1 3 6 1 2 1 27 2 1 };
-
-applIndex ATTRIBUTE
-WITH ATTRIBUTE SYNTAX IimcCommonDef.Integer;
-MATCHES FOR EQUALITY, ORDERING;
-    BEHAVIOUR
-        applIndexBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applIndex with object id
-        { applEntry 1 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 1 };
-
-applName ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :displayString;
-    BEHAVIOUR
-        applNameBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applName with object id
-        { applEntry 2 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 2 };
-
-applDirectoryName ATTRIBUTE
-WITH ATTRIBUTE SYNTAX IimcCommonDef.OctetString;
-MATCHES FOR	EQUALITY, ORDERING, SUBSTRINGS;
-    BEHAVIOUR
-        applDirectoryNameBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applDirectoryName with object id
-        { applEntry 3 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 3 };
-
-applVersion ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :displayString;
-    BEHAVIOUR
-        applVersionBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applVersion with object id
-        { applEntry 4 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 4 };
-
-applUptime ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :timeTicks;
-    BEHAVIOUR
-        applUptimeBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applUptime with object id
-        { applEntry 5 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 5 };
-
-applOperStatus ATTRIBUTE
-WITH ATTRIBUTE SYNTAX IIMCAPPLICATION-MIBASN1.ApplOperStatus;
-MATCHES FOR EQUALITY;
-    BEHAVIOUR
-        applOperStatusBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applOperStatus with object id
-        { applEntry 6 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 6 };
-
-applLastChange ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :timeTicks;
-    BEHAVIOUR
-        applLastChangeBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applLastChange with object id
-        { applEntry 7 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 7 };
-
-applInboundAssociations ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :gauge32;
-    BEHAVIOUR
-        applInboundAssociationsBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applInboundAssociations with object id
-        { applEntry 8 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 8 };
-
-applOutboundAssociations ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :gauge32;
-    BEHAVIOUR
-        applOutboundAssociationsBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applOutboundAssociations with object id
-        { applEntry 9 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 9 };
-
-applAccumulatedInboundAssociations ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :counter32;
-    BEHAVIOUR
-        applAccumulatedInboundAssociationsBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applAccumulatedInboundAssociations with object id
-        { applEntry 10 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 10 };
-
-applAccumulatedOutboundAssociations ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :counter32;
-    BEHAVIOUR
-        applAccumulatedOutboundAssociationsBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applAccumulatedOutboundAssociations with object id
-        { applEntry 11 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 11 };
-
-applLastInboundActivity ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :timeTicks;
-    BEHAVIOUR
-        applLastInboundActivityBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applLastInboundActivity with object id
-        { applEntry 12 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 12 };
-
-applLastOutboundActivity ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :timeTicks;
-    BEHAVIOUR
-        applLastOutboundActivityBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applLastOutboundActivity with object id
-        { applEntry 13 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 13 };
-
-applRejectedInboundAssociations ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :counter32;
-    BEHAVIOUR
-        applRejectedInboundAssociationsBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applRejectedInboundAssociations with object id
-        { applEntry 14 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 14 };
-
-applFailedOutboundAssociations ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :counter32;
-    BEHAVIOUR
-        applFailedOutboundAssociationsBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to applFailedOutboundAssociations with object id
-        { applEntry 15 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 1 1 15 };
-
-assocIndex ATTRIBUTE
-WITH ATTRIBUTE SYNTAX IimcCommonDef.Integer;
-MATCHES FOR EQUALITY, ORDERING;
-    BEHAVIOUR
-        assocIndexBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to assocIndex with object id
-        { assocEntry 1 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 2 1 1 };
-
-assocRemoteApplication ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :displayString;
-    BEHAVIOUR
-        assocRemoteApplicationBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to assocRemoteApplication with object id
-        { assocEntry 2 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 2 1 2 };
-
-assocApplicationProtocol ATTRIBUTE
-WITH ATTRIBUTE SYNTAX IimcCommonDef.ObjectIdentifier;
-MATCHES FOR EQUALITY;
-    BEHAVIOUR
-        assocApplicationProtocolBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to assocApplicationProtocol with object id
-        { assocEntry 3 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 2 1 3 };
-
-assocApplicationType ATTRIBUTE
-WITH ATTRIBUTE SYNTAX IIMCAPPLICATION-MIBASN1.AssocApplicationType;
-MATCHES FOR EQUALITY;
-    BEHAVIOUR
-        assocApplicationTypeBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to assocApplicationType with object id
-        { assocEntry 4 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 2 1 4 };
-
-assocDuration ATTRIBUTE
-DERIVED FROM "iimcManagementDoc 1" :timeTicks;
-    BEHAVIOUR
-        assocDurationBehaviour BEHAVIOUR
-        DEFINED AS
-        !This attribute maps to assocDuration with object id
-        { assocEntry 5 } in APPLICATION-MIB.
-       See APPLICATION-MIB for attribute semantics.!;;
-REGISTERED AS  { iimcAutoTrans 1 3 6 1 2 1 27 2 1 5 };
-
-
-
-END
-
-
--- a/usr/src/cmd/agents/snmp/mib/gdmo/mib_NSMTYPE.asn1	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-IIMCAPPLICATION-MIBASN1 {iso(1) org(3) dod(6) internet(1) private(4) enterprise(1)
-	 sun(42) products(2) management(2) g2(2) iimc(9) iimcManagement(2)
-		iimcManagementModule(2) 3}
-DEFINITIONS IMPLICIT TAGS ::=
-BEGIN
-IMPORTS	 iimcAutoTrans, iimcManagementNB
-	 FROM IimcAssignedOIDs {iso(1) org(3) dod(6) internet(1)
-	 private(4) enterprise(1) sun(42) products(2) management(2)
-	 g2(2) iimc(9) iimcManagement(2) iimcManagementDoc(3) 1};
-
-
--- MIB specific syntax
-
-DisplayString ::=
-	 OCTET STRING
-
-DistinguishedName ::=
-	 OCTET STRING
-
-TimeStamp ::=
-	 TimeTicks
-
-Gauge32 ::=
-	 Gauge
-
-Counter32 ::=
-	 Counter
-
---   application MODULE-IDENTITY
---       LAST-UPDATED "9311280000Z"
---       ORGANIZATION "IETF Mail and Directory Management Working Group"
---       CONTACT-INFO
---         "        Ned Freed
---
---          Postal: Innosoft International, Inc.
---                  250 West First Street, Suite 240
---                  Claremont, CA  91711
---                  US
---
---             Tel: +1 909 624 7907
---             Fax: +1 909 621 5319
---
---          E-Mail: ned@innosoft.com"
---       DESCRIPTION
---         "The MIB module describing network service applications"
---       ::= { mib-2 27 }
-
-
-ApplOperStatus ::=
-	 INTEGER {
-         up(1),
-         down(2),
-         halted(3),
-         congested(4),
-         restarting(5)
-       }
---       MAX-ACCESS read-only
-       
-AssocApplicationType ::=
-	 INTEGER {
-           ua-initiator(1),
-           ua-responder(2),
-           peer-initiator(3),
-           peer-responder(4)}
---       MAX-ACCESS read-only
-       
-
-
-END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_ALARM.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   ALARM-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       ;
-
-   alarm MODULE-IDENTITY
-       LAST-UPDATED "9508170000Z"
-       ORGANIZATION "SunSoft"
-       CONTACT-INFO
-         ""
-       DESCRIPTION
-         "The MIB module describing variables used in SNMP traps"
-       ::= { private-mibs 3 }
-
-
-   alarmId OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The integer that identifies an alarm."
-       ::= {alarm 1}
-
-   alarmSeverity OBJECT-TYPE
-       SYNTAX INTEGER {
-         low(1),
-         medium(2),
-         high(3)
-       }
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The severity of an alarm."
-       ::= {alarm 2}
-
-   alarmDescr OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A description of the alarm."
-       ::= {alarm 3}
-
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_DM.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,654 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-DSA-MIB DEFINITIONS ::= BEGIN
-
-        IMPORTS
-          MODULE-IDENTITY,  OBJECT-TYPE,
-          NOTIFICATION-TYPE
-                     FROM SNMPv2-SMI
-          DisplayString,    TimeStamp,
-          TEXTUAL-CONVENTION
-                     FROM SNMPv2-TC
-          mib-2
-                     FROM RFC1213-MIB
-          applIndex, DistinguishedName
-                     FROM APPLICATION-MIB;
-
-        dsaMIB MODULE-IDENTITY
-           LAST-UPDATED "9311250000Z"
-           ORGANIZATION "IETF Mail and Directory Management Working
-                         Group"
-           CONTACT-INFO
-             "        Glenn Mansfield
-
-              Postal: AIC Systems Laboratory
-                      6-6-3, Minami Yoshinari
-                      Aoba-ku, Sendai, 989-32
-                      JP
-
-              Tel:    +81 22 279 3310
-              Fax:    +81 22 279 3640
-              E-Mail: glenn@aic.co.jp"
-         DESCRIPTION
-            " The MIB module for monitoring Directory System Agents."
-         ::= { mib-2 29 }
-
-
-        dsaOpsTable OBJECT-TYPE
-            SYNTAX SEQUENCE OF DsaOpsEntry
-            MAX-ACCESS not-accessible
-            STATUS current
-            DESCRIPTION
-              " The table holding information related to the
-                DSA operations."
-            ::= {dsaMIB 1}
-
-        dsaOpsEntry OBJECT-TYPE
-            SYNTAX DsaOpsEntry
-            MAX-ACCESS not-accessible
-            STATUS current
-            DESCRIPTION
-              " Entry containing operations related statistics
-                for a DSA."
-            INDEX { applIndex }
-            ::= {dsaOpsTable 1}
-
-        DsaOpsEntry ::= SEQUENCE {
-
- -- Bindings
-            dsaAnonymousBinds
-                Counter32,
-            dsaUnauthBinds
-                Counter32,
-            dsaSimpleAuthBinds
-                Counter32,
-            dsaStrongAuthBinds
-                Counter32,
-            dsaBindSecurityErrors
-                Counter32,
- -- In-coming operations
-
-            dsaInOps
-                Counter32,
-            dsaReadOps
-                Counter32,
-            dsaCompareOps
-                Counter32,
-            dsaAddEntryOps
-                Counter32,
-            dsaRemoveEntryOps
-                Counter32,
-            dsaModifyEntryOps
-                Counter32,
-            dsaModifyRDNOps
-                Counter32,
-            dsaListOps
-                Counter32,
-            dsaSearchOps
-                Counter32,
-            dsaOneLevelSearchOps
-                Counter32,
-            dsaWholeTreeSearchOps
-                Counter32,
-
- -- Out going operations
-
-            dsaReferrals
-                Counter32,
-            dsaChainings
-                Counter32,
-
- -- Errors
-
-            dsaSecurityErrors
-                Counter32,
-            dsaErrors
-                Counter32
-        }
-
-        dsaAnonymousBinds OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of anonymous  binds to this DSA from DUAs
-                since application start."
-            ::= {dsaOpsEntry 1}
-
-        dsaUnauthBinds OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of un-authenticated binds to this
-                DSA since application start."
-            ::= {dsaOpsEntry 2}
-
-        dsaSimpleAuthBinds OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of binds to this DSA that were authenticated
-                using simple authentication procedures since
-                application start."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 8.1.2.1.1."
-            ::= {dsaOpsEntry 3}
-
-
-        dsaStrongAuthBinds OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of binds to this DSA that were authenticated
-                using the strong authentication procedures since
-                application start. This includes the binds that were
-                authenticated using external authentication procedures."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Sections 8.1.2.1.2 &  8.1.2.1.3."
-            ::= {dsaOpsEntry 4}
-
-        dsaBindSecurityErrors OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of bind operations that have been rejected
-                by this DSA due to inappropriateAuthentication or
-                invalidCredentials."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 12.7.2"
-            ::= {dsaOpsEntry 5}
-
-        dsaInOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of operations forwarded to this DSA
-                from DUAs or other DSAs since application
-                start up."
-            ::= {dsaOpsEntry 6}
-
-        dsaReadOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of read operations serviced by
-                this DSA since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 9.1."
-            ::= {dsaOpsEntry 7}
-
-        dsaCompareOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of compare operations serviced by
-                this DSA  since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 9.2."
-            ::= {dsaOpsEntry 8}
-
-        dsaAddEntryOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of addEntry operations serviced by
-                this DSA since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 11.1."
-            ::= {dsaOpsEntry 9}
-
-        dsaRemoveEntryOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of removeEntry operations serviced by
-                this DSA since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 11.2."
-            ::= {dsaOpsEntry 10}
-
-        dsaModifyEntryOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of modifyEntry operations serviced by
-                this DSA since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 11.3."
-            ::= {dsaOpsEntry 11}
-
-        dsaModifyRDNOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of modifyRDN operations serviced by
-                this DSA since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 11.4."
-            ::= {dsaOpsEntry 12}
-
-        dsaListOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of list operations serviced by
-                this DSA since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 10.1."
-            ::= {dsaOpsEntry 13}
-
-        dsaSearchOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of search operations- baseObjectSearches,
-                oneLevelSearches and  subTreeSearches, serviced
-                by this DSA  since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 10.2."
-            ::= {dsaOpsEntry 14}
-
-        dsaOneLevelSearchOps OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of oneLevelSearch operations serviced
-                by this DSA since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 10.2.2.2."
-            ::= {dsaOpsEntry 15}
-
-        dsaWholeTreeSearchOps   OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of wholeTreeSearch operations serviced
-                by this DSA since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 10.2.2.2."
-            ::= {dsaOpsEntry 16}
-
-        dsaReferrals OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of referrals returned by this DSA in response
-                to requests for operations since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 12.6."
-            ::= {dsaOpsEntry 17}
-
-        dsaChainings OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of operations forwarded by this DSA
-                to other DSAs since application startup."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.518, 1988:
-                Section 14."
-            ::= {dsaOpsEntry 18}
-
-        dsaSecurityErrors OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of operations forwarded to this DSA
-                which did not meet the security requirements. "
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Section 12.7."
-            ::= {dsaOpsEntry 19}
-
-        dsaErrors        OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of operations that could not be serviced
-                due to errors other than security errors, and
-                referrals.
-                A partially serviced operation will not be counted
-                as an error.
-                The errors include NameErrors, UpdateErrors, Attribute
-                errors and ServiceErrors."
-            REFERENCE
-              " CCITT Blue Book Fascicle VIII.8 - Rec. X.511, 1988:
-                Sections 12.4, 12.5, 12.8 & 12.9."
-            ::= {dsaOpsEntry 20}
-
- -- Entry statistics/Cache performance
-        dsaEntriesTable OBJECT-TYPE
-            SYNTAX SEQUENCE OF DsaEntriesEntry
-            MAX-ACCESS not-accessible
-            STATUS current
-            DESCRIPTION
-              " The table holding information related to the
-                entry statistics and cache performance of the DSAs."
-            ::= {dsaMIB 2}
-
-        dsaEntriesEntry OBJECT-TYPE
-            SYNTAX DsaEntriesEntry
-            MAX-ACCESS not-accessible
-            STATUS current
-            DESCRIPTION
-              " Entry containing statistics pertaining to entries
-                held by a DSA."
-            INDEX { applIndex }
-            ::= {dsaEntriesTable 1}
-
-        DsaEntriesEntry ::= SEQUENCE {
-            dsaMasterEntries
-                Gauge32,
-            dsaCopyEntries
-                Gauge32,
-            dsaCacheEntries
-                Gauge32,
-            dsaCacheHits
-                Counter32,
-            dsaSlaveHits
-                Counter32
-        }
-
-        dsaMasterEntries OBJECT-TYPE
-            SYNTAX Gauge32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of entries mastered in the DSA."
-            ::= {dsaEntriesEntry 1}
-
-        dsaCopyEntries OBJECT-TYPE
-            SYNTAX Gauge32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of entries for which systematic (slave)
-                copies are maintained in the DSA."
-            ::= {dsaEntriesEntry 2}
-
-        dsaCacheEntries OBJECT-TYPE
-            SYNTAX Gauge32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of entries cached (non-systematic copies) in
-                the DSA. This will include the entries that are
-                cached partially. The negative cache is not counted."
-            ::= {dsaEntriesEntry 3}
-
-        dsaCacheHits OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of operations that were serviced from
-                the locally held cache since application
-                startup."
-            ::= {dsaEntriesEntry 4}
-
-        dsaSlaveHits  OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Number of operations that were serviced from
-                the locally held object replications [ shadow
-                entries] since application startup."
-            ::= {dsaEntriesEntry 5}
-
-
- -- The dsaIntTable contains statistical data on the peer DSAs
- -- with which the monitored DSAs [attempt to] interact.  This
- -- table  will provide a useful insight into  the   effect of
- -- neighbours on the DSA performance.
- -- The table keeps track of the last "N" DSAs with which  the
- -- monitored  DSAs  has  interacted  [attempted to interact],
- -- where "N" is a locally-defined constant.
-
-          dsaIntTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF DsaIntEntry
-                  MAX-ACCESS  not-accessible
-                  STATUS  current
-                  DESCRIPTION
-                    " Each row of this table contains some details
-                      related to the history of the interaction
-                      of the monitored DSAs with their respective
-                      peer DSAs."
-                  ::= { dsaMIB 3 }
-
-          dsaIntEntry OBJECT-TYPE
-                  SYNTAX  DsaIntEntry
-                  MAX-ACCESS  not-accessible
-                  STATUS  current
-                  DESCRIPTION
-                    " Entry containing interaction details of a DSA
-                      with a peer DSA."
-                  INDEX { applIndex,dsaIntIndex }
-                  ::= { dsaIntTable 1 }
-
-          DsaIntEntry ::= SEQUENCE {
-              dsaIntIndex
-                  INTEGER,
-              dsaName
-                  DistinguishedName,
-              dsaTimeOfCreation
-                  TimeStamp,
-              dsaTimeOfLastAttempt
-                  TimeStamp,
-              dsaTimeOfLastSuccess
-                  TimeStamp,
-              dsaFailuresSinceLastSuccess
-                  Counter32,
-              dsaFailures
-                  Counter32,
-              dsaSuccesses
-                  Counter32
-          }
-
-        dsaIntIndex  OBJECT-TYPE
-            SYNTAX INTEGER (1..2147483647)
-            MAX-ACCESS not-accessible
-            STATUS current
-            DESCRIPTION
-              " Together with applIndex it forms the unique key to
-                identify the conceptual row which contains useful info
-                on the (attempted) interaction between the DSA (referred
-                to by applIndex) and a peer DSA."
-            ::= {dsaIntEntry 1}
-
-        dsaName  OBJECT-TYPE
-            SYNTAX DistinguishedName
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Distinguished Name of the peer DSA to which this
-                entry pertains."
-            ::= {dsaIntEntry 2}
-
-        dsaTimeOfCreation  OBJECT-TYPE
-            SYNTAX TimeStamp
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " The value of sysUpTime when this row was created.
-                If the entry was created before the network management
-                subsystem was initialized, this object will contain
-                a value of zero."
-            ::= {dsaIntEntry 3}
-
-        dsaTimeOfLastAttempt  OBJECT-TYPE
-            SYNTAX TimeStamp
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " The value of sysUpTime when the last attempt was made
-                to contact this DSA. If the last attempt was made before
-                the network management subsystem was initialized, this
-                object will contain a value of zero."
-            ::= {dsaIntEntry 4}
-
-        dsaTimeOfLastSuccess  OBJECT-TYPE
-            SYNTAX TimeStamp
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " The value of sysUpTime when the last attempt made to
-                contact this DSA was successful. If there have
-                been no successful attempts this entry will have a value
-                of zero. If the last successful attempt was made before
-                the network management subsystem was initialized, this
-                object will contain a value of zero."
-            ::= {dsaIntEntry 5}
-
-        dsaFailuresSinceLastSuccess  OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " The number of failures since the last time an
-                attempt to contact this DSA was successful. If
-                there has been no successful attempts, this counter
-                will contain the number of failures since this entry
-                was created."
-            ::= {dsaIntEntry 6}
-
-        dsaFailures  OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Cumulative failures since the creation of
-                this entry."
-            ::= {dsaIntEntry 7}
-
-        dsaSuccesses  OBJECT-TYPE
-            SYNTAX Counter32
-            MAX-ACCESS read-only
-            STATUS current
-            DESCRIPTION
-              " Cumulative successes since the creation of
-                this entry."
-            ::= {dsaIntEntry 8}
-
-
- -- Conformance information
-
-        dsaConformance OBJECT IDENTIFIER ::= { dsaMIB 4 }
-
-        dsaGroups      OBJECT IDENTIFIER ::= { dsaConformance 1 }
-        dsaCompliances OBJECT IDENTIFIER ::= { dsaConformance 2 }
-
- -- Compliance statements
-
-        dsaOpsCompliance MODULE-COMPLIANCE
-            STATUS  current
-            DESCRIPTION
-                    "The compliance statement for SNMPv2 entities
-                    which implement the DSA-MIB for monitoring
-                    DSA operations."
-
-            MODULE  -- this module
-                MANDATORY-GROUPS { dsaOpsGroup }
-
-            ::= { dsaCompliances 1 }
-
-        dsaEntryCompliance MODULE-COMPLIANCE
-            STATUS  current
-            DESCRIPTION
-                    "The compliance statement for SNMPv2 entities
-                    which implement the DSA-MIB for monitoring
-                    DSA operations,  entry statistics and cache
-                    performance."
-
-            MODULE  -- this module
-                MANDATORY-GROUPS { dsaOpsGroup,dsaEntryGroup }
-
-            ::= { dsaCompliances 2 }
-
-        dsaIntCompliance MODULE-COMPLIANCE
-            STATUS  current
-            DESCRIPTION
-                    " The compliance statement  for SNMPv2  entities
-                      which implement the DSA-MIB for monitoring DSA
-                      operations and the interaction of the DSA with
-                      peer DSAs."
-
-            MODULE  -- this module
-                MANDATORY-GROUPS { dsaOpsGroup, dsaIntGroup }
-
-            ::= { dsaCompliances 3 }
-
-
- -- Units of conformance
-
-        dsaOpsGroup    OBJECT-GROUP
-            OBJECTS {
-              dsaAnonymousBinds,  dsaUnauthBinds,       dsaSimpleAuthBinds,
-              dsaStrongAuthBinds, dsaBindSecurityErrors,dsaInOps,
-              dsaReadOps,         dsaCompareOps,        dsaAddEntryOps,
-              dsaRemoveEntryOps,  dsaModifyEntryOps,    dsaModifyRDNOps,
-              dsaListOps,         dsaSearchOps,         dsaOneLevelSearchOps,
-              dsaWholeTreeSearchOps,dsaReferrals,       dsaChainings,
-              dsaSecurityErrors,  dsaErrors}
-            STATUS  current
-            DESCRIPTION
-                    " A collection of objects for monitoring the DSA
-                      operations."
-            ::= { dsaGroups 1 }
-
-        dsaEntryGroup    OBJECT-GROUP
-            OBJECTS {dsaMasterEntries,   dsaCopyEntries,       dsaCacheEntries,
-                     dsaCacheHits,       dsaSlaveHits}
-            STATUS  current
-            DESCRIPTION
-                    " A collection of objects for monitoring the DSA
-                      entry statistics and cache performance."
-            ::= { dsaGroups 2 }
-
-        dsaIntGroup    OBJECT-GROUP
-            OBJECTS {
-              dsaName,             dsaTimeOfCreation, dsaTimeOfLastAttempt,
-              dsaTimeOfLastSuccess,dsaFailuresSinceLastSuccess,dsaFailures,
-              dsaSuccesses}
-            STATUS  current
-            DESCRIPTION
-                    " A collection of objects for monitoring the DSA's
-                      interaction with peer DSAs."
-            ::= { dsaGroups 3 }
-
-
-END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_HTTP.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,814 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-
-XXX-MIB DEFINITIONS ::= BEGIN
-
---
---  References:
---    HTTP/1.0	
---	 http://www.w3.org/pub/WWW/Protocols/HTTP1.0/draft-ietf-http-spec.html
---
-
-IMPORTS
-    applIndex 				FROM  APPLICATION-MIB
-    MODULE-IDENTITY, OBJECT-TYPE, enterprises,
-    Counter32, IpAddress		FROM SNMPv2-SMI
-    TEXTUAL-CONVENTION, DisplayString,
-    TimeStamp				FROM SNMPv2-TC
-    MODULE-COMPLIANCE, OBJECT-GROUP	FROM SNMPv2-CONF;
-
-
-xxxMIB MODULE-IDENTITY
-    LAST-UPDATED "9601220000Z"
-    ORGANIZATION "HTTP MIB Interest Group"
-    CONTACT-INFO
-            "        Carl W. Kalbfleisch
-
-	     Postal: On-Ramp Technologies
-                     1950 Stemmons Freeway
-                     Suite 3042 - INFOMART
-                     Dallas, TX 75207
-                     US
-
-                Tel: +1 214 672-RAMP
-                Fax: +1 214 672-7275
-
-             E-mail: cwk@onramp.net"
-
-    DESCRIPTION
-            "The MIB module for xxx Servers and Clients.  The xxx in the module
-             name is intended to cover a family of 'Networked Information
-             Retrieval' protocols such as http, nntp, ftp, gopher and so on.
-             Membership of this family is difficult to define exactly, but
-             all members share a similar request-response structure used to
-             retrieve information (in the form of files, documents, articles)
-             from a remote server."
-
-    REVISION "9601220000Z"
-    DESCRIPTION
-	    "This is the second draft of the xxx-MIB.  It is based
-             on the idea to augment applTable of RFC-1565, several
-             threads on the mailing list since the original draft was
-             posted, and limited implementation experience.  The following
-             changes apply:
-            
-	     1)  Moved from experimental.98765 to onramp.onrampExperiments.1
-	     2)  Update imports.  
-		 Include enterprises, applIndex and IpAddress
-		 Exclude experimental and TAddress
-	     3)  Update xxxEntityTable
-		-augment applTable of RFC-1565 using applIndex
-		-re-order xxxEntityTable
-		-remove  xxxEntityIndex, Vendor, Uptime, Version
-		-add xxxEntityName, Port
-		-change xxxEntityAddress from TAddress to IpAddress
-		-change xxxEntityProtocol from INTEGER to OBJECT IDENTIFIER
-		-update DESCRIPTION clauses
-	     4)  Update xxxSummaryTable
-		-augment applTable of RFC-1565 using applIndex
-		-remove xxxSummaryEntityIndex
-	     5)  Update xxxRequestTable
-		-augment applTable of RFC-1565 using applIndex
-		-remove xxxRequestEntityIndex
-		-add xxxRequestInBytes, xxxRequestOutBytes
-	     6)  Update xxxResponseTable
-		-augment applTable of RFC-1565 using applIndex
-		-remove xxxResponseEntityIndex
-		-add xxxResponseInBytes, xxxResponseOutBytes
-	     7)  Update xxxTimeoutTable
-		-augment applTable of RFC-1565 using applIndex
-		-remove xxxTimeoutEntityIndex
-		-change xxxTimeoutRemoteAddressIndex from TAddress to IpAddress
-	     8) Conformance information
-		-define group for each table.
-		-update based on new and removed attributes above
-	     9) SMICng include file
-		-include APPLICATION-MIB"
-
-    REVISION "9511080000Z"
-    DESCRIPTION
-	    "The original draft of this MIB was edited by Mark Gamble 
-	     <mgamble@esys.co.uk> and based on the work of the
-	     http-mib@onramp.net mailing list.  The original draft is
-	     available at <http://http-mib.onramp.net/draft_1.my>"
-
-    ::= { onrampExperiments 1 }
-
---
---  Defined here for convience with distribution.  These values are
---  actually defined within onramp.my in the main OnRamp Technologies
---  enterprise MIB module.
---
-onramp 			OBJECT IDENTIFIER ::= {enterprises 1465}
-onrampExperiments 	OBJECT IDENTIFIER ::= {onramp 4}
-
---
---  Object Identifiers for the xxx-MIB
---
-xxxMIBObjects	  OBJECT IDENTIFIER ::= { xxxMIB 1 }
-xxxMIBConformance OBJECT IDENTIFIER ::= { xxxMIB 2 }
-xxxMIBCompliances OBJECT IDENTIFIER ::= { xxxMIBConformance 1 }
-xxxMIBGroups      OBJECT IDENTIFIER ::= { xxxMIBConformance 2 }
-
-
-XxxMethod ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-            "This data type is used to descripe xxx methods. The value of
-             a variable of this type is exactly the same method token used
-             in an xxx request. The currently defined methods for http are
-             GET, HEAD and POST.  For ftp, this type would cover the access
-             control, transfer parameter, and service commands."
-    SYNTAX       DisplayString (SIZE (1..40))
-
-
-XxxStatusCode ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-            "The status code of an xxx response as defined in the RFC
-             specification. 
-
-             The StatusCode (or reply code) is structured as a three digit
-             code, the following description is derived from the File
-             Transfer Protocol RFC:
-
-             the first digit specifies whether the response reflects
-             a preliminary completion (1), a positive completion (2), a
-             positive intermediate (3), a transient negative (4), or a
-             permanent negative (5);
-
-             the second digit specifies whether the response refers to
-             syntax (0), information (1), connections (2), authentication (3),
-             or file system (5) (4 is 'unspecified as yet');
-
-             the third digit 'gives a finer gradation of meaning in each of
-             the function categories'.
-
-             Currently defined values for http are:
- 
-             ok(200), created(201), accepted(202), noContent(204), 
-             movedPermanently(301), movedTemporarily(302), notModified(304),
-             badRequest(400), unauthorized(401), forbidden(403), notFound(404),
-             internalServerError(500), notImplemented(501), badGateway(502),
-             serviceUnavailable(503).
-
-             Examples for ftp include:
-
-             command okay (200), help message (214), user name okay, need
-             password (331), service not available (421)"
-
-    SYNTAX       INTEGER (100..999)
-
-
-
--- The xxx System Group
---
--- The xxx System group contains information about the xxx protocol entity.
-
-xxxSystem	OBJECT IDENTIFIER ::= { xxxMIBObjects 1 }
-
-xxxEntityTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF XxxEntityEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "The table of xxx Servers and Clients present on the system."
-    ::= { xxxSystem 1 }
-
-xxxEntityEntry OBJECT-TYPE
-    SYNTAX      XxxEntityEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Details of a particular xxx Server or Client."
-    INDEX   { applIndex }
-    ::= { xxxEntityTable 1 }
-
-XxxEntityEntry ::= SEQUENCE {
-	xxxEntityDescription		DisplayString,
-	xxxEntityObjectID		OBJECT IDENTIFIER,
-	xxxEntityContact		DisplayString,
-	xxxEntityProtocol		OBJECT IDENTIFIER,
-	xxxEntityProtocolVersion	DisplayString,
-	xxxEntityName			DisplayString,
-	xxxEntityAddress		IpAddress,
-	xxxEntityPort			INTEGER,
-	xxxEntityType			INTEGER
-    }
-
-
-xxxEntityDescription OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "Textual description of the xxx Server or Client.  This
-	    shall include at least the vendor and version number of
-	    the application. In a minimal case, this might be the
-	    Product Token for the application. For example, for a client,
-	    this might be 'CERN-LineMode/2.15 libwww/2.17b3' and for a
-	    server 'Apache/0.8.4'."
-    ::= { xxxEntityEntry 1 }
--- Instrumentation:  Direct Access
-
-xxxEntityObjectID OBJECT-TYPE
-    SYNTAX      OBJECT IDENTIFIER
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-         "The authoritative identification for entity.  This may be
-	  a value assigned within an enterprise MIB, or within a standard
-	  MIB.  A number of values are defined within this MIB for use
-	  for this value.  The version of the entity should be 
-	  encoded within the trailing sub-identifiers.
-
-	  For example, if the entity is verion 1.0.0 of a particular
-	  application, then the value might be '1.3.6.1.4.1.vendor.app.1.0.0'.
-
-	  If there is no appropriate value to return, then 0.0 is returned."
-    ::= { xxxEntityEntry 2 }
--- Instrumentation:  Direct access
-
-xxxEntityContact OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The textual identification of the contact person
-             for this xxx Server or Client, together with information
-             on how to contact this person.  For instance this might
-	     be 'webmaster@domain.name'."
-    ::= { xxxEntityEntry 3 }
--- Instrumentation:  Configuration file.
-
-xxxEntityProtocol OBJECT-TYPE
-    SYNTAX      OBJECT IDENTIFIER
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "An identification of the primary protocol in use by this
-	     entity.  For Internet applications, the IANA
-             maintains a registry of the OIDs which correspond to
-             well-known applications.  If the application protocol is
-             not listed in the registry, an OID value of the form
-             {applTCPProtoID port} or {applUDProtoID port} are used for
-             TCP-based and UDP-based protocols, respectively. In either
-             case 'port' corresponds to the primary port number being
-             used by the protocol."
-    ::= { xxxEntityEntry 4 }
--- Instrumentation:  System file.
-
-xxxEntityProtocolVersion OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "Textual description of the version of the protocol implemented.
-	     For HTTP, the value shall be the HTTP Version."
-    ::= { xxxEntityEntry 5 }
--- Instrumentation:  Log file
-
-
---
---  See article http://http-mib.onramp.net/archive/0191.html
---  for information on why xxxEntityName, Address and port are three
---  separate attributes.
---
-xxxEntityName OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The fully qualified domain name by which this entity is
-	     known.  This may be different than applName since that
-	     value is only a textual name for the application."
-    ::= { xxxEntityEntry 6 }
--- Instrumentation:  Config file
-
-xxxEntityAddress OBJECT-TYPE
-    SYNTAX      IpAddress
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The Transport Address at which the xxx Entity listens for
-             Requests or Responses."
-    ::= { xxxEntityEntry 7 }
--- Instrumentation:  DNS
-
-xxxEntityPort OBJECT-TYPE
-    SYNTAX      INTEGER (0..10000)
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The primary port used to communicate with this entity."
-    ::= { xxxEntityEntry 8 }
--- Instrumentation:  Config file
-
-
-xxxEntityType OBJECT-TYPE
-    SYNTAX      INTEGER {
-                    server(1),
-                    client(2),
-                    proxy(3),
-                    cachingProxy(4)
-                }
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "Identification of the role of the xxx Entity."
-    ::= { xxxEntityEntry 9 }
--- Instrumentation:  Direct access
-
-
--- The xxx Statistics Group
---
--- The xxx Statistics group contains information concerning the utilisation
--- of the xxx protocol entity.
-
-xxxStatistics	OBJECT IDENTIFIER ::= { xxxMIBObjects 2 }
-
-xxxSummaryTable	OBJECT-TYPE
-    SYNTAX	SEQUENCE OF XxxSummaryEntry
-    MAX-ACCESS	not-accessible
-    STATUS	current
-    DESCRIPTION
-            "The table providing overview statistics for the xxx protocol
-             entities on this system."
-    ::= { xxxStatistics 1 }
-
-xxxSummaryEntry	OBJECT-TYPE
-    SYNTAX      XxxSummaryEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Overview statistics for an individual xxx Server or Client."
-    INDEX	{ applIndex }
-    ::= { xxxSummaryTable 1 }
-
-
-XxxSummaryEntry ::= SEQUENCE {
-	xxxSummaryRequests		Counter32,
-	xxxSummaryRequestErrors		Counter32,
-	xxxSummaryRequestDiscards	Counter32,
-	xxxSummaryResponses		Counter32,
-	xxxSummaryResponseDiscards	Counter32,
-	xxxSummaryInUnknowns		Counter32,
-	xxxSummaryInBytes		Counter32,
-	xxxSummaryOutBytes		Counter32
-    }
-
-xxxSummaryRequests OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of Requests generated or received by this entity."
-    ::= { xxxSummaryEntry 1 }
--- Instrumentation:  Log file
-
-xxxSummaryRequestErrors OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of Request errors detected by this entity
-             (server only.)"
-    ::= { xxxSummaryEntry 2 }
--- Instrumentation:  Log file
-
-xxxSummaryRequestDiscards OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of Requests discarded by this entity
-             (server only)."
-    ::= { xxxSummaryEntry 3 }
--- Instrumentation:  Log file
-
-xxxSummaryResponses OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of Responses generated or received by this
-             entity."
-    ::= { xxxSummaryEntry 4 }
--- Instrumentation:  Log file
-
-xxxSummaryResponseDiscards OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of Responses discarded by this entity
-             (client only)."
-    ::= { xxxSummaryEntry 5 }
--- Instrumentation:  Log file
-
-xxxSummaryInUnknowns OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of unknown messages detected by this entity."
-    ::= { xxxSummaryEntry 6 }
--- Instrumentation:  Log file
-
-xxxSummaryInBytes OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of bytes received by this entity."
-    ::= { xxxSummaryEntry 7 }
--- Instrumentation:  Log file
-
-xxxSummaryOutBytes OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of bytes generated by this entity."
-    ::= { xxxSummaryEntry 8 }
--- Instrumentation:  Log file
-
-
-
-
-
-xxxRequestTable	OBJECT-TYPE
-    SYNTAX	SEQUENCE OF XxxRequestEntry
-    MAX-ACCESS	not-accessible
-    STATUS	current
-    DESCRIPTION
-            "The table providing detailed request statistics for the xxx
-             protocol entities on this system."
-    ::= { xxxStatistics 2 }
-
-xxxRequestEntry	OBJECT-TYPE
-    SYNTAX      XxxRequestEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Request statistics for an individual xxx Server or Client."
-    INDEX	{ applIndex, xxxRequestMethodIndex }
-    ::= { xxxRequestTable 1 }
-
-XxxRequestEntry ::= SEQUENCE {
-	xxxRequestMethodIndex		XxxMethod,
-	xxxRequestInCount		Counter32,
-	xxxRequestInBytes		Counter32,
-	xxxRequestInLastTime		TimeStamp,
-	xxxRequestOutCount		Counter32,
-	xxxRequestOutBytes		Counter32,
-	xxxRequestOutLastTime		TimeStamp
-    }
-
-xxxRequestMethodIndex OBJECT-TYPE
-    SYNTAX      XxxMethod
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The particular request method the statistics apply to."
-    ::= { xxxRequestEntry 1 }
--- Instrumentation:  Log file
-
-xxxRequestInCount OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of requests of this type received by this entity."
-    ::= { xxxRequestEntry 2 }
--- Instrumentation:  Log file
-
-xxxRequestInBytes OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of bytes this type received by this entity."
-    ::= { xxxRequestEntry 3 }
--- Instrumentation:  Log file
-
-xxxRequestInLastTime OBJECT-TYPE
-    SYNTAX      TimeStamp
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of sysUpTime at the time the last request was received."
-    ::= { xxxRequestEntry 4 }
--- Instrumentation:  Log file
-
-xxxRequestOutCount OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of requests of this type generated by this entity."
-    ::= { xxxRequestEntry 5 }
--- Instrumentation:  Log file
-
-xxxRequestOutBytes OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of bytes of this type generated by this entity."
-    ::= { xxxRequestEntry 6 }
--- Instrumentation:  Log file
-
-xxxRequestOutLastTime OBJECT-TYPE
-    SYNTAX      TimeStamp
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of sysUpTime at the time the last request was generated."
-    ::= { xxxRequestEntry 7 }
--- Instrumentation:  Log file
-
-
-
-
-
-
-xxxResponseTable	OBJECT-TYPE
-    SYNTAX	SEQUENCE OF XxxResponseEntry
-    MAX-ACCESS	not-accessible
-    STATUS	current
-    DESCRIPTION
-            "The table providing detailed response statistics for the xxx
-             protocol entities on this system."
-    ::= { xxxStatistics 3 }
-
-xxxResponseEntry	OBJECT-TYPE
-    SYNTAX      XxxResponseEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Response statistics for an individual xxx Server or Client."
-    INDEX	{ applIndex, xxxResponseStatusIndex }
-    ::= { xxxResponseTable 1 }
-
-XxxResponseEntry ::= SEQUENCE {
-	xxxResponseStatusIndex		XxxStatusCode,
-	xxxResponseInCount		Counter32,
-	xxxResponseInBytes		Counter32,
-	xxxResponseInLastTime		TimeStamp,
-	xxxResponseOutCount		Counter32,
-	xxxResponseOutBytes		Counter32,
-	xxxResponseOutLastTime		TimeStamp
-    }
-
-xxxResponseStatusIndex OBJECT-TYPE
-    SYNTAX      XxxStatusCode
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The particular response status the statistics apply to."
-    ::= { xxxResponseEntry 1 }
--- Instrumentation:  Log file
-
-xxxResponseInCount OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of responses of this type received by this entity."
-    ::= { xxxResponseEntry 2 }
--- Instrumentation:  Log file
-
-xxxResponseInBytes OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of bytes of this type received by this entity."
-    ::= { xxxResponseEntry 3 }
--- Instrumentation:  Log file
-
-xxxResponseInLastTime OBJECT-TYPE
-    SYNTAX      TimeStamp
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of sysUpTime at the time the last response was received."
-    ::= { xxxResponseEntry 4 }
--- Instrumentation:  Log file
-
-xxxResponseOutCount OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of responses of this type generated by this entity."
-    ::= { xxxResponseEntry 5 }
--- Instrumentation:  Log file
-
-xxxResponseOutBytes OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of bytes of this type generated by this entity."
-    ::= { xxxResponseEntry 6 }
--- Instrumentation:  Log file
-
-xxxResponseOutLastTime OBJECT-TYPE
-    SYNTAX      TimeStamp
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The value of sysUpTime at the time the last response was
-             generated."
-    ::= { xxxResponseEntry 7 }
--- Instrumentation:  Log file
-
-
-
-
-
-
-
-
-xxxTotalTimeouts OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only   
-    STATUS      current
-    DESCRIPTION
-            "The total number of timeouts for all xxx entities."
-    ::= { xxxStatistics 4 }
---Instrumentation:  Log file
-
-xxxLastTimeoutEntityIndex OBJECT-TYPE
-    SYNTAX      INTEGER (1..2147483647)
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The unique (on this machine) identifier for this entity.  This
-             Index corresponds to xxxEntityIndex in the xxx System group.
-             Note that this index can be used to retrieve details from the
-             xxxTimeoutTable."
-    ::= { xxxStatistics 5 }
--- Instrumentation:  Log file
-
-xxxLastTimeoutRemoteAddressIndex OBJECT-TYPE
-    SYNTAX      IpAddress
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The address of the remote entity.
-             Note that this index can be used to retrieve details from the
-             xxxTimeoutTable."
-    ::= { xxxStatistics 6 }
--- Instrumentation:  Log file
-
-xxxTimeoutTable	OBJECT-TYPE
-    SYNTAX	SEQUENCE OF XxxTimeoutEntry
-    MAX-ACCESS	not-accessible
-    STATUS	current
-    DESCRIPTION
-            "The table providing detailed timeout statistics for the xxx
-             protocol entities on this system."
-    ::= { xxxStatistics 7 }
-
-xxxTimeoutEntry	OBJECT-TYPE
-    SYNTAX      XxxTimeoutEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-            "Timeout statistics for a particular xxx Server or Client."
-    INDEX	{ applIndex, xxxTimeoutRemoteAddressIndex }
-    ::= { xxxTimeoutTable 1 }
-
-XxxTimeoutEntry ::= SEQUENCE {
-	xxxTimeoutRemoteAddressIndex	IpAddress,
-	xxxTimeoutTimeouts		Counter32
-    }
-
-xxxTimeoutRemoteAddressIndex OBJECT-TYPE
-    SYNTAX      IpAddress
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The address of the remote entity."
-    ::= { xxxTimeoutEntry 2 }
--- Instrumentation:  Log file
-
-xxxTimeoutTimeouts OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "Total number of timeouts which have occurred between these two
-             entities."
-    ::= { xxxTimeoutEntry 3 }
--- Instrumentation:  Log file
-
-
-
-
-
-
--- Conformance and compliance definitions.
-
-xxxMIBEntityGroup OBJECT-GROUP
-    OBJECTS 
-	{ 
-	xxxEntityDescription,
-	xxxEntityObjectID,
-	xxxEntityContact,
-	xxxEntityProtocol,
-	xxxEntityProtocolVersion,
-	xxxEntityName,
-	xxxEntityAddress,
-	xxxEntityPort,
-	xxxEntityType
-	}
-    STATUS  current
-    DESCRIPTION
-            ""
-    ::= { xxxMIBGroups 1 }
-
-xxxMIBSummaryGroup OBJECT-GROUP
-    OBJECTS 
-	{ 
-	xxxSummaryRequests,
-	xxxSummaryRequestErrors,
-	xxxSummaryRequestDiscards,
-	xxxSummaryResponses,
-	xxxSummaryResponseDiscards,
-	xxxSummaryInUnknowns,
-	xxxSummaryInBytes,
-	xxxSummaryOutBytes
-	}
-    STATUS  current
-    DESCRIPTION
-            ""
-    ::= { xxxMIBGroups 2 }
-
-xxxMIBRequestGroup OBJECT-GROUP
-    OBJECTS 
-	{ 
-	xxxRequestMethodIndex,
-	xxxRequestInCount,
-	xxxRequestInBytes,
-	xxxRequestInLastTime,
-	xxxRequestOutCount,
-	xxxRequestOutBytes,
-	xxxRequestOutLastTime
-	}
-    STATUS  current
-    DESCRIPTION
-            ""
-    ::= { xxxMIBGroups 3 }
-
-xxxMIBResponseGroup OBJECT-GROUP
-    OBJECTS 
-	{ 
-	xxxResponseStatusIndex,
-	xxxResponseInCount,
-	xxxResponseInBytes,
-	xxxResponseInLastTime,
-	xxxResponseOutCount,
-	xxxResponseOutBytes,
-	xxxResponseOutLastTime
-	}
-    STATUS  current
-    DESCRIPTION
-            ""
-    ::= { xxxMIBGroups 4 }
-
-xxxMIBTimeoutGroup OBJECT-GROUP
-    OBJECTS 
-	{ 
-	xxxTotalTimeouts,
-	xxxLastTimeoutEntityIndex,
-	xxxLastTimeoutRemoteAddressIndex,
-	xxxTimeoutRemoteAddressIndex,
-	xxxTimeoutTimeouts
-	}
-    STATUS  current
-    DESCRIPTION
-            ""
-    ::= { xxxMIBGroups 5 }
-
-xxxCompliance MODULE-COMPLIANCE
-    STATUS  current
-    DESCRIPTION
-            "The compliance statement for SNMP entities
-             which implement the HTTP MIB."
-    MODULE  -- this module
-        MANDATORY-GROUPS 
-		{ 
-		xxxMIBEntityGroup,
-		xxxMIBSummaryGroup,
-		xxxMIBRequestGroup,
-		xxxMIBResponseGroup,
-		xxxMIBTimeoutGroup
-		}
-    ::= { xxxMIBCompliances 4 }
-
-END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_II.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2635 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-          RFC1213-MIB DEFINITIONS ::= BEGIN
-
-          IMPORTS
-                  mgmt, NetworkAddress, IpAddress, Counter, Gauge,
-                          TimeTicks
-                      FROM RFC1155-SMI
-                  OBJECT-TYPE
-                          FROM RFC-1212;
-
-          --  This MIB module uses the extended OBJECT-TYPE macro as
-          --  defined in [14];
-
-
-          --  MIB-II (same prefix as MIB-I)
-
-          mib-2      OBJECT IDENTIFIER ::= { mgmt 1 }
-
-          -- textual conventions
-
-          DisplayString ::=
-              OCTET STRING
-          -- This data type is used to model textual information taken
-          -- from the NVT ASCII character set.  By convention, objects
-          -- with this syntax are declared as having
-          --
-          --      SIZE (0..255)
-
-          PhysAddress ::=
-              OCTET STRING
-          -- This data type is used to model media addresses.  For many
-          -- types of media, this will be in a binary representation.
-          -- For example, an ethernet address would be represented as
-          -- a string of 6 octets.
-
-
-          -- groups in MIB-II
-
-          system       OBJECT IDENTIFIER ::= { mib-2 1 }
-
-          interfaces   OBJECT IDENTIFIER ::= { mib-2 2 }
-
-          at           OBJECT IDENTIFIER ::= { mib-2 3 }
-
-          ip           OBJECT IDENTIFIER ::= { mib-2 4 }
-
-          icmp         OBJECT IDENTIFIER ::= { mib-2 5 }
-
-          tcp          OBJECT IDENTIFIER ::= { mib-2 6 }
-
-          udp          OBJECT IDENTIFIER ::= { mib-2 7 }
-
-          egp          OBJECT IDENTIFIER ::= { mib-2 8 }
-
-          -- historical (some say hysterical)
-          -- cmot      OBJECT IDENTIFIER ::= { mib-2 9 }
-
-          transmission OBJECT IDENTIFIER ::= { mib-2 10 }
-
-          snmp         OBJECT IDENTIFIER ::= { mib-2 11 }
-
-
-          -- the System group
-
-          -- Implementation of the System group is mandatory for all
-          -- systems.  If an agent is not configured to have a value
-          -- for any of these variables, a string of length 0 is
-          -- returned.
-
-          sysDescr OBJECT-TYPE
-              SYNTAX  DisplayString (SIZE (0..255))
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "A textual description of the entity.  This value
-                      should include the full name and version
-                      identification of the system's hardware type,
-                      software operating-system, and networking
-                      software.  It is mandatory that this only contain
-                      printable ASCII characters."
-              ::= { system 1 }
-
-          sysObjectID OBJECT-TYPE
-              SYNTAX  OBJECT IDENTIFIER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The vendor's authoritative identification of the
-                      network management subsystem contained in the
-                      entity.  This value is allocated within the SMI
-                      enterprises subtree (1.3.6.1.4.1) and provides an
-                      easy and unambiguous means for determining `what
-                      kind of box' is being managed.  For example, if
-                      vendor `Flintstones, Inc.' was assigned the
-                      subtree 1.3.6.1.4.1.4242, it could assign the
-                      identifier 1.3.6.1.4.1.4242.1.1 to its `Fred
-                      Router'."
-              ::= { system 2 }
-
-          sysUpTime OBJECT-TYPE
-              SYNTAX  TimeTicks
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The time (in hundredths of a second) since the
-                      network management portion of the system was last
-                      re-initialized."
-              ::= { system 3 }
-
-          sysContact OBJECT-TYPE
-              SYNTAX  DisplayString (SIZE (0..255))
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The textual identification of the contact person
-                      for this managed node, together with information
-                      on how to contact this person."
-              ::= { system 4 }
-
-          sysName OBJECT-TYPE
-              SYNTAX  DisplayString (SIZE (0..255))
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "An administratively-assigned name for this
-                      managed node.  By convention, this is the node's
-                      fully-qualified domain name."
-              ::= { system 5 }
-
-          sysLocation OBJECT-TYPE
-              SYNTAX  DisplayString (SIZE (0..255))
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The physical location of this node (e.g.,
-                      `telephone closet, 3rd floor')."
-              ::= { system 6 }
-
-          sysServices OBJECT-TYPE
-              SYNTAX  INTEGER (0..127)
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "A value which indicates the set of services that
-                      this entity primarily offers.
-
-                      The value is a sum.  This sum initially takes the
-                      value zero, Then, for each layer, L, in the range
-                      1 through 7, that this node performs transactions
-                      for, 2 raised to (L - 1) is added to the sum.  For
-                      example, a node which performs primarily routing
-                      functions would have a value of 4 (2^(3-1)).  In
-                      contrast, a node which is a host offering
-                      application services would have a value of 72
-                      (2^(4-1) + 2^(7-1)).  Note that in the context of
-                      the Internet suite of protocols, values should be
-                      calculated accordingly:
-
-                           layer  functionality
-                               1  physical (e.g., repeaters)
-                               2  datalink/subnetwork (e.g., bridges)
-                               3  internet (e.g., IP gateways)
-                               4  end-to-end  (e.g., IP hosts)
-                               7  applications (e.g., mail relays)
-
-                      For systems including OSI protocols, layers 5 and
-                      6 may also be counted."
-              ::= { system 7 }
-
-
-
-          -- the Interfaces group
-
-          -- Implementation of the Interfaces group is mandatory for
-          -- all systems.
-
-          ifNumber OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of network interfaces (regardless of
-                      their current state) present on this system."
-              ::= { interfaces 1 }
-
-
-          -- the Interfaces table
-
-          -- The Interfaces table contains information on the entity's
-          -- interfaces.  Each interface is thought of as being
-          -- attached to a `subnetwork'.  Note that this term should
-          -- not be confused with `subnet' which refers to an
-          -- addressing partitioning scheme used in the Internet suite
-          -- of protocols.
-
-          ifTable OBJECT-TYPE
-              SYNTAX  SEQUENCE OF IfEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "A list of interface entries.  The number of
-                      entries is given by the value of ifNumber."
-              ::= { interfaces 2 }
-
-          ifEntry OBJECT-TYPE
-              SYNTAX  IfEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "An interface entry containing objects at the
-                      subnetwork layer and below for a particular
-                      interface."
-              INDEX   { ifIndex }
-              ::= { ifTable 1 }
-
-          IfEntry ::=
-              SEQUENCE {
-                  ifIndex
-                      INTEGER,
-                  ifDescr
-                      DisplayString,
-                  ifType
-                      INTEGER,
-                  ifMtu
-                      INTEGER,
-                  ifSpeed
-                      Gauge,
-                  ifPhysAddress
-                      PhysAddress,
-                  ifAdminStatus
-                      INTEGER,
-                  ifOperStatus
-                      INTEGER,
-                  ifLastChange
-                      TimeTicks,
-                  ifInOctets
-                      Counter,
-                  ifInUcastPkts
-                      Counter,
-                  ifInNUcastPkts
-                      Counter,
-                  ifInDiscards
-                      Counter,
-                  ifInErrors
-                      Counter,
-                  ifInUnknownProtos
-                      Counter,
-                  ifOutOctets
-                      Counter,
-                  ifOutUcastPkts
-                      Counter,
-                  ifOutNUcastPkts
-                      Counter,
-                  ifOutDiscards
-                      Counter,
-                  ifOutErrors
-                      Counter,
-                  ifOutQLen
-                      Gauge,
-                  ifSpecific
-                      OBJECT IDENTIFIER
-              }
-
-          ifIndex OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "A unique value for each interface.  Its value
-                      ranges between 1 and the value of ifNumber.  The
-                      value for each interface must remain constant at
-                      least from one re-initialization of the entity's
-                      network management system to the next re-
-                      initialization."
-              ::= { ifEntry 1 }
-
-          ifDescr OBJECT-TYPE
-              SYNTAX  DisplayString (SIZE (0..255))
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "A textual string containing information about the
-                      interface.  This string should include the name of
-                      the manufacturer, the product name and the version
-                      of the hardware interface."
-              ::= { ifEntry 2 }
-
-          ifType OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          other(1),          -- none of the following
-                          regular1822(2),
-                          hdh1822(3),
-                          ddn-x25(4),
-                          rfc877-x25(5),
-                          ethernet-csmacd(6),
-                          iso88023-csmacd(7),
-                          iso88024-tokenBus(8),
-                          iso88025-tokenRing(9),
-                          iso88026-man(10),
-                          starLan(11),
-                          proteon-10Mbit(12),
-                          proteon-80Mbit(13),
-                          hyperchannel(14),
-                          fddi(15),
-                          lapb(16),
-                          sdlc(17),
-                          ds1(18),           -- T-1
-                          e1(19),            -- european equiv. of T-1
-                          basicISDN(20),
-                          primaryISDN(21),   -- proprietary serial
-                          propPointToPointSerial(22),
-                          ppp(23),
-                          softwareLoopback(24),
-                          eon(25),            -- CLNP over IP [11]
-                          ethernet-3Mbit(26),
-                          nsip(27),           -- XNS over IP
-                          slip(28),           -- generic SLIP
-                          ultra(29),          -- ULTRA technologies
-                          ds3(30),            -- T-3
-                          sip(31),            -- SMDS
-                          frame-relay(32)
-                      }
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The type of interface, distinguished according to
-                      the physical/link protocol(s) immediately `below'
-                      the network layer in the protocol stack."
-              ::= { ifEntry 3 }
-
-          ifMtu OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The size of the largest datagram which can be
-                      sent/received on the interface, specified in
-                      octets.  For interfaces that are used for
-                      transmitting network datagrams, this is the size
-                      of the largest network datagram that can be sent
-                      on the interface."
-              ::= { ifEntry 4 }
-
-          ifSpeed OBJECT-TYPE
-              SYNTAX  Gauge
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "An estimate of the interface's current bandwidth
-                      in bits per second.  For interfaces which do not
-                      vary in bandwidth or for those where no accurate
-                      estimation can be made, this object should contain
-                      the nominal bandwidth."
-              ::= { ifEntry 5 }
-
-          ifPhysAddress OBJECT-TYPE
-              SYNTAX  PhysAddress
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The interface's address at the protocol layer
-                      immediately `below' the network layer in the
-                      protocol stack.  For interfaces which do not have
-                      such an address (e.g., a serial line), this object
-                      should contain an octet string of zero length."
-              ::= { ifEntry 6 }
-
-          ifAdminStatus OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          up(1),       -- ready to pass packets
-                          down(2),
-                          testing(3)   -- in some test mode
-                      }
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The desired state of the interface.  The
-                      testing(3) state indicates that no operational
-                      packets can be passed."
-              ::= { ifEntry 7 }
-
-          ifOperStatus OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          up(1),       -- ready to pass packets
-                          down(2),
-                          testing(3)   -- in some test mode
-                      }
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The current operational state of the interface.
-                      The testing(3) state indicates that no operational
-                      packets can be passed."
-              ::= { ifEntry 8 }
-
-          ifLastChange OBJECT-TYPE
-              SYNTAX  TimeTicks
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The value of sysUpTime at the time the interface
-                      entered its current operational state.  If the
-                      current state was entered prior to the last re-
-                      initialization of the local network management
-                      subsystem, then this object contains a zero
-                      value."
-              ::= { ifEntry 9 }
-
-          ifInOctets OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of octets received on the
-                      interface, including framing characters."
-              ::= { ifEntry 10 }
-
-          ifInUcastPkts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of subnetwork-unicast packets
-                      delivered to a higher-layer protocol."
-              ::= { ifEntry 11 }
-
-          ifInNUcastPkts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of non-unicast (i.e., subnetwork-
-                      broadcast or subnetwork-multicast) packets
-                      delivered to a higher-layer protocol."
-              ::= { ifEntry 12 }
-
-          ifInDiscards OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of inbound packets which were chosen
-                      to be discarded even though no errors had been
-                      detected to prevent their being deliverable to a
-                      higher-layer protocol.  One possible reason for
-                      discarding such a packet could be to free up
-                      buffer space."
-              ::= { ifEntry 13 }
-
-          ifInErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of inbound packets that contained
-                      errors preventing them from being deliverable to a
-                      higher-layer protocol."
-              ::= { ifEntry 14 }
-
-          ifInUnknownProtos OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of packets received via the interface
-                      which were discarded because of an unknown or
-                      unsupported protocol."
-              ::= { ifEntry 15 }
-
-          ifOutOctets OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of octets transmitted out of the
-                      interface, including framing characters."
-              ::= { ifEntry 16 }
-
-          ifOutUcastPkts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of packets that higher-level
-                      protocols requested be transmitted to a
-                      subnetwork-unicast address, including those that
-                      were discarded or not sent."
-              ::= { ifEntry 17 }
-
-          ifOutNUcastPkts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of packets that higher-level
-                      protocols requested be transmitted to a non-
-                      unicast (i.e., a subnetwork-broadcast or
-                      subnetwork-multicast) address, including those
-                      that were discarded or not sent."
-              ::= { ifEntry 18 }
-
-          ifOutDiscards OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of outbound packets which were chosen
-                      to be discarded even though no errors had been
-                      detected to prevent their being transmitted.  One
-                      possible reason for discarding such a packet could
-                      be to free up buffer space."
-              ::= { ifEntry 19 }
-
-          ifOutErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of outbound packets that could not be
-                      transmitted because of errors."
-              ::= { ifEntry 20 }
-
-          ifOutQLen OBJECT-TYPE
-              SYNTAX  Gauge
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The length of the output packet queue (in
-                      packets)."
-              ::= { ifEntry 21 }
-
-          ifSpecific OBJECT-TYPE
-              SYNTAX  OBJECT IDENTIFIER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "A reference to MIB definitions specific to the
-                      particular media being used to realize the
-                      interface.  For example, if the interface is
-                      realized by an ethernet, then the value of this
-                      object refers to a document defining objects
-                      specific to ethernet.  If this information is not
-                      present, its value should be set to the OBJECT
-                      IDENTIFIER { 0 0 }, which is a syntatically valid
-                      object identifier, and any conformant
-                      implementation of ASN.1 and BER must be able to
-                      generate and recognize this value."
-              ::= { ifEntry 22 }
-
-
-          -- the Address Translation group
-
-          -- Implementation of the Address Translation group is
-          -- mandatory for all systems.  Note however that this group
-          -- is deprecated by MIB-II. That is, it is being included
-          -- solely for compatibility with MIB-I nodes, and will most
-          -- likely be excluded from MIB-III nodes.  From MIB-II and
-          -- onwards, each network protocol group contains its own
-          -- address translation tables.
-
-          -- The Address Translation group contains one table which is
-          -- the union across all interfaces of the translation tables
-          -- for converting a NetworkAddress (e.g., an IP address) into
-          -- a subnetwork-specific address.  For lack of a better term,
-          -- this document refers to such a subnetwork-specific address
-          -- as a `physical' address.
-
-          -- Examples of such translation tables are: for broadcast
-          -- media where ARP is in use, the translation table is
-          -- equivalent to the ARP cache; or, on an X.25 network where
-          -- non-algorithmic translation to X.121 addresses is
-          -- required, the translation table contains the
-          -- NetworkAddress to X.121 address equivalences.
-
-          atTable OBJECT-TYPE
-              SYNTAX  SEQUENCE OF AtEntry
-              ACCESS  not-accessible
-              STATUS  deprecated
-              DESCRIPTION
-                      "The Address Translation tables contain the
-                      NetworkAddress to `physical' address equivalences.
-                      Some interfaces do not use translation tables for
-                      determining address equivalences (e.g., DDN-X.25
-                      has an algorithmic method); if all interfaces are
-                      of this type, then the Address Translation table
-                      is empty, i.e., has zero entries."
-              ::= { at 1 }
-
-          atEntry OBJECT-TYPE
-              SYNTAX  AtEntry
-              ACCESS  not-accessible
-              STATUS  deprecated
-              DESCRIPTION
-                      "Each entry contains one NetworkAddress to
-                      `physical' address equivalence."
-              INDEX   { atIfIndex,
-                        atNetAddress }
-              ::= { atTable 1 }
-
-          AtEntry ::=
-              SEQUENCE {
-                  atIfIndex
-                      INTEGER,
-                  atPhysAddress
-                      PhysAddress,
-                  atNetAddress
-                      NetworkAddress
-              }
-
-          atIfIndex OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  deprecated
-              DESCRIPTION
-                      "The interface on which this entry's equivalence
-                      is effective.  The interface identified by a
-                      particular value of this index is the same
-                      interface as identified by the same value of
-                      ifIndex."
-              ::= { atEntry 1 }
-
-          atPhysAddress OBJECT-TYPE
-              SYNTAX  PhysAddress
-              ACCESS  read-write
-              STATUS  deprecated
-              DESCRIPTION
-                      "The media-dependent `physical' address.
-
-                      Setting this object to a null string (one of zero
-                      length) has the effect of invaliding the
-                      corresponding entry in the atTable object.  That
-                      is, it effectively dissasociates the interface
-                      identified with said entry from the mapping
-                      identified with said entry.  It is an
-                      implementation-specific matter as to whether the
-                      agent removes an invalidated entry from the table.
-                      Accordingly, management stations must be prepared
-                      to receive tabular information from agents that
-                      corresponds to entries not currently in use.
-                      Proper interpretation of such entries requires
-                      examination of the relevant atPhysAddress object."
-              ::= { atEntry 2 }
-
-          atNetAddress OBJECT-TYPE
-              SYNTAX  NetworkAddress
-              ACCESS  read-write
-              STATUS  deprecated
-              DESCRIPTION
-                      "The NetworkAddress (e.g., the IP address)
-                      corresponding to the media-dependent `physical'
-                      address."
-              ::= { atEntry 3 }
-
-
-          -- the IP group
-
-          -- Implementation of the IP group is mandatory for all
-          -- systems.
-
-          ipForwarding OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          forwarding(1),    -- acting as a gateway
-                          not-forwarding(2) -- NOT acting as a gateway
-                      }
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The indication of whether this entity is acting
-                      as an IP gateway in respect to the forwarding of
-                      datagrams received by, but not addressed to, this
-                      entity.  IP gateways forward datagrams.  IP hosts
-                      do not (except those source-routed via the host).
-
-                      Note that for some managed nodes, this object may
-                      take on only a subset of the values possible.
-                      Accordingly, it is appropriate for an agent to
-                      return a `badValue' response if a management
-                      station attempts to change this object to an
-                      inappropriate value."
-              ::= { ip 1 }
-
-          ipDefaultTTL OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The default value inserted into the Time-To-Live
-                      field of the IP header of datagrams originated at
-                      this entity, whenever a TTL value is not supplied
-                      by the transport layer protocol."
-              ::= { ip 2 }
-
-          ipInReceives OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of input datagrams received from
-                      interfaces, including those received in error."
-              ::= { ip 3 }
-
-          ipInHdrErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of input datagrams discarded due to
-                      errors in their IP headers, including bad
-                      checksums, version number mismatch, other format
-                      errors, time-to-live exceeded, errors discovered
-                      in processing their IP options, etc."
-              ::= { ip 4 }
-
-          ipInAddrErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of input datagrams discarded because
-                      the IP address in their IP header's destination
-                      field was not a valid address to be received at
-                      this entity.  This count includes invalid
-                      addresses (e.g., 0.0.0.0) and addresses of
-                      unsupported Classes (e.g., Class E).  For entities
-                      which are not IP Gateways and therefore do not
-                      forward datagrams, this counter includes datagrams
-                      discarded because the destination address was not
-                      a local address."
-              ::= { ip 5 }
-
-          ipForwDatagrams OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of input datagrams for which this
-                      entity was not their final IP destination, as a
-                      result of which an attempt was made to find a
-                      route to forward them to that final destination.
-                      In entities which do not act as IP Gateways, this
-                      counter will include only those packets which were
-                      Source-Routed via this entity, and the Source-
-                      Route option processing was successful."
-              ::= { ip 6 }
-
-          ipInUnknownProtos OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of locally-addressed datagrams
-                      received successfully but discarded because of an
-                      unknown or unsupported protocol."
-              ::= { ip 7 }
-
-          ipInDiscards OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of input IP datagrams for which no
-                      problems were encountered to prevent their
-                      continued processing, but which were discarded
-                      (e.g., for lack of buffer space).  Note that this
-                      counter does not include any datagrams discarded
-                      while awaiting re-assembly."
-              ::= { ip 8 }
-
-          ipInDelivers OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of input datagrams successfully
-                      delivered to IP user-protocols (including ICMP)."
-              ::= { ip 9 }
-
-          ipOutRequests OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of IP datagrams which local IP
-                      user-protocols (including ICMP) supplied to IP in
-                      requests for transmission.  Note that this counter
-                      does not include any datagrams counted in
-                      ipForwDatagrams."
-              ::= { ip 10 }
-
-          ipOutDiscards OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of output IP datagrams for which no
-                      problem was encountered to prevent their
-                      transmission to their destination, but which were
-                      discarded (e.g., for lack of buffer space).  Note
-                      that this counter would include datagrams counted
-                      in ipForwDatagrams if any such packets met this
-                      (discretionary) discard criterion."
-              ::= { ip 11 }
-
-          ipOutNoRoutes OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of IP datagrams discarded because no
-                      route could be found to transmit them to their
-                      destination.  Note that this counter includes any
-                      packets counted in ipForwDatagrams which meet this
-                      `no-route' criterion.  Note that this includes any
-                      datagarms which a host cannot route because all of
-                      its default gateways are down."
-              ::= { ip 12 }
-
-          ipReasmTimeout OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The maximum number of seconds which received
-                      fragments are held while they are awaiting
-                      reassembly at this entity."
-              ::= { ip 13 }
-
-          ipReasmReqds OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of IP fragments received which needed
-                      to be reassembled at this entity."
-              ::= { ip 14 }
-
-          ipReasmOKs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of IP datagrams successfully re-
-                      assembled."
-              ::= { ip 15 }
-
-          ipReasmFails OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of failures detected by the IP re-
-                      assembly algorithm (for whatever reason: timed
-                      out, errors, etc).  Note that this is not
-                      necessarily a count of discarded IP fragments
-                      since some algorithms (notably the algorithm in
-                      RFC 815) can lose track of the number of fragments
-                      by combining them as they are received."
-              ::= { ip 16 }
-
-          ipFragOKs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of IP datagrams that have been
-                      successfully fragmented at this entity."
-              ::= { ip 17 }
-
-          ipFragFails OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of IP datagrams that have been
-                      discarded because they needed to be fragmented at
-                      this entity but could not be, e.g., because their
-                      Don't Fragment flag was set."
-              ::= { ip 18 }
-
-          ipFragCreates OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of IP datagram fragments that have
-                      been generated as a result of fragmentation at
-                      this entity."
-              ::= { ip 19 }
-
-
-          -- the IP address table
-
-          -- The IP address table contains this entity's IP addressing
-          -- information.
-
-          ipAddrTable OBJECT-TYPE
-              SYNTAX  SEQUENCE OF IpAddrEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "The table of addressing information relevant to
-                      this entity's IP addresses."
-              ::= { ip 20 }
-
-          ipAddrEntry OBJECT-TYPE
-              SYNTAX  IpAddrEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "The addressing information for one of this
-                      entity's IP addresses."
-              INDEX   { ipAdEntAddr }
-              ::= { ipAddrTable 1 }
-
-          IpAddrEntry ::=
-              SEQUENCE {
-                  ipAdEntAddr
-                      IpAddress,
-                  ipAdEntIfIndex
-                      INTEGER,
-                  ipAdEntNetMask
-                      IpAddress,
-                  ipAdEntBcastAddr
-                      INTEGER,
-                  ipAdEntReasmMaxSize
-                      INTEGER (0..65535)
-              }
-
-          ipAdEntAddr OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The IP address to which this entry's addressing
-                      information pertains."
-              ::= { ipAddrEntry 1 }
-
-          ipAdEntIfIndex OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The index value which uniquely identifies the
-                      interface to which this entry is applicable.  The
-                      interface identified by a particular value of this
-                      index is the same interface as identified by the
-                      same value of ifIndex."
-              ::= { ipAddrEntry 2 }
-
-          ipAdEntNetMask OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The subnet mask associated with the IP address of
-                      this entry.  The value of the mask is an IP
-                      address with all the network bits set to 1 and all
-                      the hosts bits set to 0."
-              ::= { ipAddrEntry 3 }
-
-          ipAdEntBcastAddr OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The value of the least-significant bit in the IP
-                      broadcast address used for sending datagrams on
-                      the (logical) interface associated with the IP
-                      address of this entry.  For example, when the
-                      Internet standard all-ones broadcast address is
-                      used, the value will be 1.  This value applies to
-                      both the subnet and network broadcasts addresses
-                      used by the entity on this (logical) interface."
-              ::= { ipAddrEntry 4 }
-
-          ipAdEntReasmMaxSize OBJECT-TYPE
-              SYNTAX  INTEGER (0..65535)
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The size of the largest IP datagram which this
-                      entity can re-assemble from incoming IP fragmented
-                      datagrams received on this interface."
-              ::= { ipAddrEntry 5 }
-
-
-          -- the IP routing table
-
-          -- The IP routing table contains an entry for each route
-          -- presently known to this entity.
-
-          ipRouteTable OBJECT-TYPE
-              SYNTAX  SEQUENCE OF IpRouteEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "This entity's IP Routing table."
-              ::= { ip 21 }
-
-          ipRouteEntry OBJECT-TYPE
-              SYNTAX  IpRouteEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "A route to a particular destination."
-              INDEX   { ipRouteDest }
-              ::= { ipRouteTable 1 }
-
-          IpRouteEntry ::=
-              SEQUENCE {
-                  ipRouteDest
-                      IpAddress,
-                  ipRouteIfIndex
-                      INTEGER,
-                  ipRouteMetric1
-                      INTEGER,
-                  ipRouteMetric2
-                      INTEGER,
-                  ipRouteMetric3
-                      INTEGER,
-                  ipRouteMetric4
-                      INTEGER,
-                  ipRouteNextHop
-                      IpAddress,
-                  ipRouteType
-                      INTEGER,
-                  ipRouteProto
-                      INTEGER,
-                  ipRouteAge
-                      INTEGER,
-                  ipRouteMask
-                      IpAddress,
-                  ipRouteMetric5
-                      INTEGER,
-                  ipRouteInfo
-                      OBJECT IDENTIFIER
-              }
-
-          ipRouteDest OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The destination IP address of this route.  An
-                      entry with a value of 0.0.0.0 is considered a
-                      default route.  Multiple routes to a single
-                      destination can appear in the table, but access to
-                      such multiple entries is dependent on the table-
-                      access mechanisms defined by the network
-                      management protocol in use."
-              ::= { ipRouteEntry 1 }
-
-          ipRouteIfIndex OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The index value which uniquely identifies the
-                      local interface through which the next hop of this
-                      route should be reached.  The interface identified
-                      by a particular value of this index is the same
-                      interface as identified by the same value of
-                      ifIndex."
-              ::= { ipRouteEntry 2 }
-
-          ipRouteMetric1 OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The primary routing metric for this route.  The
-                      semantics of this metric are determined by the
-                      routing-protocol specified in the route's
-                      ipRouteProto value.  If this metric is not used,
-                      its value should be set to -1."
-              ::= { ipRouteEntry 3 }
-
-          ipRouteMetric2 OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "An alternate routing metric for this route.  The
-                      semantics of this metric are determined by the
-                      routing-protocol specified in the route's
-                      ipRouteProto value.  If this metric is not used,
-                      its value should be set to -1."
-              ::= { ipRouteEntry 4 }
-
-          ipRouteMetric3 OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "An alternate routing metric for this route.  The
-                      semantics of this metric are determined by the
-                      routing-protocol specified in the route's
-                      ipRouteProto value.  If this metric is not used,
-                      its value should be set to -1."
-              ::= { ipRouteEntry 5 }
-
-          ipRouteMetric4 OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "An alternate routing metric for this route.  The
-                      semantics of this metric are determined by the
-                      routing-protocol specified in the route's
-                      ipRouteProto value.  If this metric is not used,
-                      its value should be set to -1."
-              ::= { ipRouteEntry 6 }
-
-          ipRouteNextHop OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The IP address of the next hop of this route.
-                      (In the case of a route bound to an interface
-                      which is realized via a broadcast media, the value
-                      of this field is the agent's IP address on that
-                      interface.)"
-              ::= { ipRouteEntry 7 }
-
-          ipRouteType OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          other(1),        -- none of the following
-
-                          invalid(2),      -- an invalidated route
-                                           -- route to directly
-                          direct(3),       -- connected (sub-)network
-
-                                           -- route to a non-local
-                          indirect(4)      -- host/network/sub-network
-                      }
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The type of route.  Note that the values
-                      direct(3) and indirect(4) refer to the notion of
-                      direct and indirect routing in the IP
-                      architecture.
-
-                      Setting this object to the value invalid(2) has
-                      the effect of invalidating the corresponding entry
-                      in the ipRouteTable object.  That is, it
-                      effectively dissasociates the destination
-                      identified with said entry from the route
-                      identified with said entry.  It is an
-                      implementation-specific matter as to whether the
-                      agent removes an invalidated entry from the table.
-                      Accordingly, management stations must be prepared
-                      to receive tabular information from agents that
-                      corresponds to entries not currently in use.
-                      Proper interpretation of such entries requires
-                      examination of the relevant ipRouteType object."
-              ::= { ipRouteEntry 8 }
-
-          ipRouteProto OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          other(1),       -- none of the following
-
-                                          -- non-protocol information,
-                                          -- e.g., manually configured
-                          local(2),       -- entries
-
-                                          -- set via a network
-                          netmgmt(3),     -- management protocol
-
-                                          -- obtained via ICMP,
-                          icmp(4),        -- e.g., Redirect
-
-                                          -- the remaining values are
-                                          -- all gateway routing
-                                          -- protocols
-                          egp(5),
-                          ggp(6),
-                          hello(7),
-                          rip(8),
-                          is-is(9),
-                          es-is(10),
-                          ciscoIgrp(11),
-                          bbnSpfIgp(12),
-                          ospf(13),
-                          bgp(14)
-                      }
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The routing mechanism via which this route was
-                      learned.  Inclusion of values for gateway routing
-                      protocols is not intended to imply that hosts
-                      should support those protocols."
-              ::= { ipRouteEntry 9 }
-
-          ipRouteAge OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of seconds since this route was last
-                      updated or otherwise determined to be correct.
-                      Note that no semantics of `too old' can be implied
-                      except through knowledge of the routing protocol
-                      by which the route was learned."
-              ::= { ipRouteEntry 10 }
-
-          ipRouteMask OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "Indicate the mask to be logical-ANDed with the
-                      destination address before being compared to the
-                      value in the ipRouteDest field.  For those systems
-                      that do not support arbitrary subnet masks, an
-                      agent constructs the value of the ipRouteMask by
-                      determining whether the value of the correspondent
-                      ipRouteDest field belong to a class-A, B, or C
-                      network, and then using one of:
-
-                           mask           network
-                           255.0.0.0      class-A
-                           255.255.0.0    class-B
-                           255.255.255.0  class-C
-
-                      If the value of the ipRouteDest is 0.0.0.0 (a
-                      default route), then the mask value is also
-                      0.0.0.0.  It should be noted that all IP routing
-                      subsystems implicitly use this mechanism."
-              ::= { ipRouteEntry 11 }
-
-          ipRouteMetric5 OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "An alternate routing metric for this route.  The
-                      semantics of this metric are determined by the
-                      routing-protocol specified in the route's
-                      ipRouteProto value.  If this metric is not used,
-                      its value should be set to -1."
-              ::= { ipRouteEntry 12 }
-
-          ipRouteInfo OBJECT-TYPE
-              SYNTAX  OBJECT IDENTIFIER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "A reference to MIB definitions specific to the
-                      particular routing protocol which is responsible
-                      for this route, as determined by the value
-                      specified in the route's ipRouteProto value.  If
-                      this information is not present, its value should
-                      be set to the OBJECT IDENTIFIER { 0 0 }, which is
-                      a syntatically valid object identifier, and any
-                      conformant implementation of ASN.1 and BER must be
-                      able to generate and recognize this value."
-              ::= { ipRouteEntry 13 }
-
-
-          -- the IP Address Translation table
-
-          -- The IP address translation table contain the IpAddress to
-          -- `physical' address equivalences.  Some interfaces do not
-          -- use translation tables for determining address
-          -- equivalences (e.g., DDN-X.25 has an algorithmic method);
-          -- if all interfaces are of this type, then the Address
-          -- Translation table is empty, i.e., has zero entries.
-
-          ipNetToMediaTable OBJECT-TYPE
-              SYNTAX  SEQUENCE OF IpNetToMediaEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "The IP Address Translation table used for mapping
-                      from IP addresses to physical addresses."
-              ::= { ip 22 }
-
-          ipNetToMediaEntry OBJECT-TYPE
-              SYNTAX  IpNetToMediaEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "Each entry contains one IpAddress to `physical'
-                      address equivalence."
-              INDEX   { ipNetToMediaIfIndex,
-                        ipNetToMediaNetAddress }
-              ::= { ipNetToMediaTable 1 }
-
-          IpNetToMediaEntry ::=
-              SEQUENCE {
-                  ipNetToMediaIfIndex
-                      INTEGER,
-                  ipNetToMediaPhysAddress
-                      PhysAddress,
-                  ipNetToMediaNetAddress
-                      IpAddress,
-                  ipNetToMediaType
-                      INTEGER
-              }
-
-          ipNetToMediaIfIndex OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The interface on which this entry's equivalence
-                      is effective.  The interface identified by a
-                      particular value of this index is the same
-                      interface as identified by the same value of
-                      ifIndex."
-              ::= { ipNetToMediaEntry 1 }
-
-          ipNetToMediaPhysAddress OBJECT-TYPE
-              SYNTAX  PhysAddress
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The media-dependent `physical' address."
-              ::= { ipNetToMediaEntry 2 }
-
-          ipNetToMediaNetAddress OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The IpAddress corresponding to the media-
-                      dependent `physical' address."
-              ::= { ipNetToMediaEntry 3 }
-
-          ipNetToMediaType OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          other(1),        -- none of the following
-                          invalid(2),      -- an invalidated mapping
-                          dynamic(3),
-                          static(4)
-                      }
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The type of mapping.
-
-                      Setting this object to the value invalid(2) has
-                      the effect of invalidating the corresponding entry
-                      in the ipNetToMediaTable.  That is, it effectively
-                      dissasociates the interface identified with said
-                      entry from the mapping identified with said entry.
-                      It is an implementation-specific matter as to
-                      whether the agent removes an invalidated entry
-                      from the table.  Accordingly, management stations
-                      must be prepared to receive tabular information
-                      from agents that corresponds to entries not
-                      currently in use.  Proper interpretation of such
-                      entries requires examination of the relevant
-                      ipNetToMediaType object."
-              ::= { ipNetToMediaEntry 4 }
-
-
-          -- additional IP objects
-
-          ipRoutingDiscards OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of routing entries which were chosen
-                      to be discarded even though they are valid.  One
-                      possible reason for discarding such an entry could
-                      be to free-up buffer space for other routing
-                      entries."
-              ::= { ip 23 }
-
-
-          -- the ICMP group
-
-          -- Implementation of the ICMP group is mandatory for all
-          -- systems.
-
-          icmpInMsgs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of ICMP messages which the
-                      entity received.  Note that this counter includes
-                      all those counted by icmpInErrors."
-              ::= { icmp 1 }
-
-          icmpInErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP messages which the entity
-                      received but determined as having ICMP-specific
-                      errors (bad ICMP checksums, bad length, etc.)."
-              ::= { icmp 2 }
-
-          icmpInDestUnreachs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Destination Unreachable
-                      messages received."
-              ::= { icmp 3 }
-
-          icmpInTimeExcds OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Time Exceeded messages
-                      received."
-              ::= { icmp 4 }
-
-          icmpInParmProbs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Parameter Problem messages
-                      received."
-              ::= { icmp 5 }
-
-          icmpInSrcQuenchs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Source Quench messages
-                      received."
-              ::= { icmp 6 }
-
-          icmpInRedirects OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Redirect messages received."
-              ::= { icmp 7 }
-
-          icmpInEchos OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Echo (request) messages
-                      received."
-              ::= { icmp 8 }
-
-          icmpInEchoReps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Echo Reply messages received."
-              ::= { icmp 9 }
-
-          icmpInTimestamps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Timestamp (request) messages
-                      received."
-              ::= { icmp 10 }
-
-          icmpInTimestampReps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Timestamp Reply messages
-                      received."
-              ::= { icmp 11 }
-
-          icmpInAddrMasks OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Address Mask Request messages
-                      received."
-              ::= { icmp 12 }
-
-          icmpInAddrMaskReps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Address Mask Reply messages
-                      received."
-              ::= { icmp 13 }
-
-          icmpOutMsgs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of ICMP messages which this
-                      entity attempted to send.  Note that this counter
-                      includes all those counted by icmpOutErrors."
-              ::= { icmp 14 }
-
-          icmpOutErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP messages which this entity did
-                      not send due to problems discovered within ICMP
-                      such as a lack of buffers.  This value should not
-                      include errors discovered outside the ICMP layer
-                      such as the inability of IP to route the resultant
-                      datagram.  In some implementations there may be no
-                      types of error which contribute to this counter's
-                      value."
-              ::= { icmp 15 }
-
-          icmpOutDestUnreachs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Destination Unreachable
-                      messages sent."
-              ::= { icmp 16 }
-
-          icmpOutTimeExcds OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Time Exceeded messages sent."
-              ::= { icmp 17 }
-
-          icmpOutParmProbs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Parameter Problem messages
-                      sent."
-              ::= { icmp 18 }
-
-          icmpOutSrcQuenchs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Source Quench messages sent."
-              ::= { icmp 19 }
-
-          icmpOutRedirects OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Redirect messages sent.  For a
-                      host, this object will always be zero, since hosts
-                      do not send redirects."
-              ::= { icmp 20 }
-
-          icmpOutEchos OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Echo (request) messages sent."
-              ::= { icmp 21 }
-
-          icmpOutEchoReps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Echo Reply messages sent."
-              ::= { icmp 22 }
-
-          icmpOutTimestamps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Timestamp (request) messages
-                      sent."
-              ::= { icmp 23 }
-
-          icmpOutTimestampReps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Timestamp Reply messages
-                      sent."
-              ::= { icmp 24 }
-
-          icmpOutAddrMasks OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Address Mask Request messages
-                      sent."
-              ::= { icmp 25 }
-
-          icmpOutAddrMaskReps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of ICMP Address Mask Reply messages
-                      sent."
-              ::= { icmp 26 }
-
-
-          -- the TCP group
-
-          -- Implementation of the TCP group is mandatory for all
-          -- systems that implement the TCP.
-
-          -- Note that instances of object types that represent
-          -- information about a particular TCP connection are
-          -- transient; they persist only as long as the connection
-          -- in question.
-
-          tcpRtoAlgorithm OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          other(1),    -- none of the following
-
-                          constant(2), -- a constant rto
-                          rsre(3),     -- MIL-STD-1778, Appendix B
-                          vanj(4)      -- Van Jacobson's algorithm [10]
-                      }
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The algorithm used to determine the timeout value
-                      used for retransmitting unacknowledged octets."
-              ::= { tcp 1 }
-
-          tcpRtoMin OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The minimum value permitted by a TCP
-                      implementation for the retransmission timeout,
-                      measured in milliseconds.  More refined semantics
-                      for objects of this type depend upon the algorithm
-                      used to determine the retransmission timeout.  In
-                      particular, when the timeout algorithm is rsre(3),
-                      an object of this type has the semantics of the
-                      LBOUND quantity described in RFC 793."
-              ::= { tcp 2 }
-
-
-          tcpRtoMax OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The maximum value permitted by a TCP
-                      implementation for the retransmission timeout,
-                      measured in milliseconds.  More refined semantics
-                      for objects of this type depend upon the algorithm
-                      used to determine the retransmission timeout.  In
-                      particular, when the timeout algorithm is rsre(3),
-                      an object of this type has the semantics of the
-                      UBOUND quantity described in RFC 793."
-              ::= { tcp 3 }
-
-          tcpMaxConn OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The limit on the total number of TCP connections
-                      the entity can support.  In entities where the
-                      maximum number of connections is dynamic, this
-                      object should contain the value -1."
-              ::= { tcp 4 }
-
-          tcpActiveOpens OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of times TCP connections have made a
-                      direct transition to the SYN-SENT state from the
-                      CLOSED state."
-              ::= { tcp 5 }
-
-          tcpPassiveOpens OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of times TCP connections have made a
-                      direct transition to the SYN-RCVD state from the
-                      LISTEN state."
-              ::= { tcp 6 }
-
-          tcpAttemptFails OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of times TCP connections have made a
-                      direct transition to the CLOSED state from either
-                      the SYN-SENT state or the SYN-RCVD state, plus the
-                      number of times TCP connections have made a direct
-                      transition to the LISTEN state from the SYN-RCVD
-                      state."
-              ::= { tcp 7 }
-
-          tcpEstabResets OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of times TCP connections have made a
-                      direct transition to the CLOSED state from either
-                      the ESTABLISHED state or the CLOSE-WAIT state."
-              ::= { tcp 8 }
-
-          tcpCurrEstab OBJECT-TYPE
-              SYNTAX  Gauge
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of TCP connections for which the
-                      current state is either ESTABLISHED or CLOSE-
-                      WAIT."
-              ::= { tcp 9 }
-
-          tcpInSegs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of segments received, including
-                      those received in error.  This count includes
-                      segments received on currently established
-                      connections."
-              ::= { tcp 10 }
-
-          tcpOutSegs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of segments sent, including
-                      those on current connections but excluding those
-                      containing only retransmitted octets."
-              ::= { tcp 11 }
-
-          tcpRetransSegs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of segments retransmitted - that
-                      is, the number of TCP segments transmitted
-                      containing one or more previously transmitted
-                      octets."
-              ::= { tcp 12 }
-
-
-          -- the TCP Connection table
-
-          -- The TCP connection table contains information about this
-          -- entity's existing TCP connections.
-
-          tcpConnTable OBJECT-TYPE
-              SYNTAX  SEQUENCE OF TcpConnEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "A table containing TCP connection-specific
-                      information."
-              ::= { tcp 13 }
-
-          tcpConnEntry OBJECT-TYPE
-              SYNTAX  TcpConnEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "Information about a particular current TCP
-                      connection.  An object of this type is transient,
-                      in that it ceases to exist when (or soon after)
-                      the connection makes the transition to the CLOSED
-                      state."
-              INDEX   { tcpConnLocalAddress,
-                        tcpConnLocalPort,
-                        tcpConnRemAddress,
-                        tcpConnRemPort }
-              ::= { tcpConnTable 1 }
-
-          TcpConnEntry ::=
-              SEQUENCE {
-                  tcpConnState
-                      INTEGER,
-                  tcpConnLocalAddress
-                      IpAddress,
-                  tcpConnLocalPort
-                      INTEGER (0..65535),
-                  tcpConnRemAddress
-                      IpAddress,
-                  tcpConnRemPort
-                      INTEGER (0..65535)
-              }
-
-          tcpConnState OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          closed(1),
-                          listen(2),
-                          synSent(3),
-                          synReceived(4),
-                          established(5),
-                          finWait1(6),
-                          finWait2(7),
-                          closeWait(8),
-                          lastAck(9),
-                          closing(10),
-                          timeWait(11),
-                          deleteTCB(12)
-                      }
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "The state of this TCP connection.
-
-                      The only value which may be set by a management
-                      station is deleteTCB(12).  Accordingly, it is
-                      appropriate for an agent to return a `badValue'
-                      response if a management station attempts to set
-                      this object to any other value.
-
-                      If a management station sets this object to the
-                      value deleteTCB(12), then this has the effect of
-                      deleting the TCB (as defined in RFC 793) of the
-                      corresponding connection on the managed node,
-                      resulting in immediate termination of the
-                      connection.
-
-                      As an implementation-specific option, a RST
-                      segment may be sent from the managed node to the
-                      other TCP endpoint (note however that RST segments
-                      are not sent reliably)."
-              ::= { tcpConnEntry 1 }
-
-          tcpConnLocalAddress OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The local IP address for this TCP connection.  In
-                      the case of a connection in the listen state which
-                      is willing to accept connections for any IP
-                      interface associated with the node, the value
-                      0.0.0.0 is used."
-              ::= { tcpConnEntry 2 }
-
-          tcpConnLocalPort OBJECT-TYPE
-              SYNTAX  INTEGER (0..65535)
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The local port number for this TCP connection."
-              ::= { tcpConnEntry 3 }
-
-          tcpConnRemAddress OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The remote IP address for this TCP connection."
-              ::= { tcpConnEntry 4 }
-
-          tcpConnRemPort OBJECT-TYPE
-              SYNTAX  INTEGER (0..65535)
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The remote port number for this TCP connection."
-              ::= { tcpConnEntry 5 }
-
-
-          -- additional TCP objects
-
-          tcpInErrs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of segments received in error
-                      (e.g., bad TCP checksums)."
-              ::= { tcp 14 }
-
-          tcpOutRsts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of TCP segments sent containing the
-                      RST flag."
-              ::= { tcp 15 }
-
-
-          -- the UDP group
-
-          -- Implementation of the UDP group is mandatory for all
-          -- systems which implement the UDP.
-
-          udpInDatagrams OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of UDP datagrams delivered to
-                      UDP users."
-              ::= { udp 1 }
-
-          udpNoPorts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of received UDP datagrams for
-                      which there was no application at the destination
-                      port."
-              ::= { udp 2 }
-
-          udpInErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of received UDP datagrams that could
-                      not be delivered for reasons other than the lack
-                      of an application at the destination port."
-              ::= { udp 3 }
-
-          udpOutDatagrams OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of UDP datagrams sent from this
-                      entity."
-              ::= { udp 4 }
-
-
-          -- the UDP Listener table
-
-          -- The UDP listener table contains information about this
-          -- entity's UDP end-points on which a local application is
-          -- currently accepting datagrams.
-
-          udpTable OBJECT-TYPE
-              SYNTAX  SEQUENCE OF UdpEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "A table containing UDP listener information."
-              ::= { udp 5 }
-
-          udpEntry OBJECT-TYPE
-              SYNTAX  UdpEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "Information about a particular current UDP
-                      listener."
-              INDEX   { udpLocalAddress, udpLocalPort }
-              ::= { udpTable 1 }
-
-          UdpEntry ::=
-              SEQUENCE {
-                  udpLocalAddress
-                      IpAddress,
-                  udpLocalPort
-                      INTEGER (0..65535)
-              }
-
-          udpLocalAddress OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The local IP address for this UDP listener.  In
-                      the case of a UDP listener which is willing to
-                      accept datagrams for any IP interface associated
-                      with the node, the value 0.0.0.0 is used."
-              ::= { udpEntry 1 }
-
-          udpLocalPort OBJECT-TYPE
-              SYNTAX  INTEGER (0..65535)
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The local port number for this UDP listener."
-              ::= { udpEntry 2 }
-
-
-          -- the EGP group
-
-          -- Implementation of the EGP group is mandatory for all
-          -- systems which implement the EGP.
-
-          egpInMsgs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of EGP messages received without
-                      error."
-              ::= { egp 1 }
-
-          egpInErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of EGP messages received that proved
-                      to be in error."
-              ::= { egp 2 }
-
-          egpOutMsgs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of locally generated EGP
-                      messages."
-              ::= { egp 3 }
-
-          egpOutErrors OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of locally generated EGP messages not
-                      sent due to resource limitations within an EGP
-                      entity."
-              ::= { egp 4 }
-
-
-          -- the EGP Neighbor table
-
-          -- The EGP neighbor table contains information about this
-          -- entity's EGP neighbors.
-
-          egpNeighTable OBJECT-TYPE
-              SYNTAX  SEQUENCE OF EgpNeighEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "The EGP neighbor table."
-              ::= { egp 5 }
-
-          egpNeighEntry OBJECT-TYPE
-              SYNTAX  EgpNeighEntry
-              ACCESS  not-accessible
-              STATUS  mandatory
-              DESCRIPTION
-                      "Information about this entity's relationship with
-                      a particular EGP neighbor."
-              INDEX   { egpNeighAddr }
-              ::= { egpNeighTable 1 }
-
-          EgpNeighEntry ::=
-              SEQUENCE {
-                  egpNeighState
-                      INTEGER,
-                  egpNeighAddr
-                      IpAddress,
-                  egpNeighAs
-                      INTEGER,
-                  egpNeighInMsgs
-                      Counter,
-                  egpNeighInErrs
-                      Counter,
-                  egpNeighOutMsgs
-                      Counter,
-                  egpNeighOutErrs
-                      Counter,
-                  egpNeighInErrMsgs
-                      Counter,
-                  egpNeighOutErrMsgs
-                      Counter,
-                  egpNeighStateUps
-                      Counter,
-                  egpNeighStateDowns
-                      Counter,
-                  egpNeighIntervalHello
-                      INTEGER,
-                  egpNeighIntervalPoll
-                      INTEGER,
-                  egpNeighMode
-                      INTEGER,
-                  egpNeighEventTrigger
-                      INTEGER
-              }
-
-          egpNeighState OBJECT-TYPE
-              SYNTAX  INTEGER {
-                          idle(1),
-                          acquisition(2),
-                          down(3),
-                          up(4),
-                          cease(5)
-                      }
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The EGP state of the local system with respect to
-                      this entry's EGP neighbor.  Each EGP state is
-                      represented by a value that is one greater than
-                      the numerical value associated with said state in
-                      RFC 904."
-              ::= { egpNeighEntry 1 }
-
-          egpNeighAddr OBJECT-TYPE
-              SYNTAX  IpAddress
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The IP address of this entry's EGP neighbor."
-              ::= { egpNeighEntry 2 }
-
-          egpNeighAs OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The autonomous system of this EGP peer.  Zero
-                      should be specified if the autonomous system
-                      number of the neighbor is not yet known."
-              ::= { egpNeighEntry 3 }
-
-          egpNeighInMsgs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of EGP messages received without error
-                      from this EGP peer."
-              ::= { egpNeighEntry 4 }
-
-          egpNeighInErrs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of EGP messages received from this EGP
-                      peer that proved to be in error (e.g., bad EGP
-                      checksum)."
-              ::= { egpNeighEntry 5 }
-
-          egpNeighOutMsgs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of locally generated EGP messages to
-                      this EGP peer."
-              ::= { egpNeighEntry 6 }
-
-          egpNeighOutErrs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of locally generated EGP messages not
-                      sent to this EGP peer due to resource limitations
-                      within an EGP entity."
-              ::= { egpNeighEntry 7 }
-
-          egpNeighInErrMsgs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of EGP-defined error messages received
-                      from this EGP peer."
-              ::= { egpNeighEntry 8 }
-
-          egpNeighOutErrMsgs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of EGP-defined error messages sent to
-                      this EGP peer."
-              ::= { egpNeighEntry 9 }
-
-          egpNeighStateUps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of EGP state transitions to the UP
-                      state with this EGP peer."
-              ::= { egpNeighEntry 10 }
-
-          egpNeighStateDowns OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The number of EGP state transitions from the UP
-                      state to any other state with this EGP peer."
-              ::= { egpNeighEntry 11 }
-
-          egpNeighIntervalHello OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The interval between EGP Hello command
-                      retransmissions (in hundredths of a second).  This
-                      represents the t1 timer as defined in RFC 904."
-              ::= { egpNeighEntry 12 }
-
-          egpNeighIntervalPoll OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The interval between EGP poll command
-
-
-
-SNMP Working Group                                             [Page 58]
-
-RFC 1213                         MIB-II                       March 1991
-
-
-                      retransmissions (in hundredths of a second).  This
-                      represents the t3 timer as defined in RFC 904."
-              ::= { egpNeighEntry 13 }
-
-          egpNeighMode OBJECT-TYPE
-              SYNTAX  INTEGER { active(1), passive(2) }
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The polling mode of this EGP entity, either
-                      passive or active."
-              ::= { egpNeighEntry 14 }
-
-          egpNeighEventTrigger OBJECT-TYPE
-              SYNTAX  INTEGER { start(1), stop(2) }
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "A control variable used to trigger operator-
-                      initiated Start and Stop events.  When read, this
-                      variable always returns the most recent value that
-                      egpNeighEventTrigger was set to.  If it has not
-                      been set since the last initialization of the
-                      network management subsystem on the node, it
-                      returns a value of `stop'.
-
-                      When set, this variable causes a Start or Stop
-                      event on the specified neighbor, as specified on
-                      pages 8-10 of RFC 904.  Briefly, a Start event
-                      causes an Idle peer to begin neighbor acquisition
-                      and a non-Idle peer to reinitiate neighbor
-                      acquisition.  A stop event causes a non-Idle peer
-                      to return to the Idle state until a Start event
-                      occurs, either via egpNeighEventTrigger or
-                      otherwise."
-              ::= { egpNeighEntry 15 }
-
-
-          -- additional EGP objects
-
-          egpAs OBJECT-TYPE
-              SYNTAX  INTEGER
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The autonomous system number of this EGP entity."
-              ::= { egp 6 }
-
-
-          -- the Transmission group
-
-          -- Based on the transmission media underlying each interface
-          -- on a system, the corresponding portion of the Transmission
-          -- group is mandatory for that system.
-
-          -- When Internet-standard definitions for managing
-          -- transmission media are defined, the transmission group is
-          -- used to provide a prefix for the names of those objects.
-
-          -- Typically, such definitions reside in the experimental
-          -- portion of the MIB until they are "proven", then as a
-          -- part of the Internet standardization process, the
-          -- definitions are accordingly elevated and a new object
-          -- identifier, under the transmission group is defined. By
-          -- convention, the name assigned is:
-          --
-          --     type OBJECT IDENTIFIER    ::= { transmission number }
-          --
-          -- where "type" is the symbolic value used for the media in
-          -- the ifType column of the ifTable object, and "number" is
-          -- the actual integer value corresponding to the symbol.
-
-
-          -- the SNMP group
-
-          -- Implementation of the SNMP group is mandatory for all
-          -- systems which support an SNMP protocol entity.  Some of
-          -- the objects defined below will be zero-valued in those
-          -- SNMP implementations that are optimized to support only
-          -- those functions specific to either a management agent or
-          -- a management station.  In particular, it should be
-          -- observed that the objects below refer to an SNMP entity,
-          -- and there may be several SNMP entities residing on a
-          -- managed node (e.g., if the node is hosting acting as
-          -- a management station).
-
-          snmpInPkts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of Messages delivered to the
-                      SNMP entity from the transport service."
-              ::= { snmp 1 }
-
-          snmpOutPkts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Messages which were
-                      passed from the SNMP protocol entity to the
-                      transport service."
-              ::= { snmp 2 }
-
-          snmpInBadVersions OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Messages which were
-                      delivered to the SNMP protocol entity and were for
-                      an unsupported SNMP version."
-              ::= { snmp 3 }
-
-          snmpInBadCommunityNames OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Messages delivered to
-                      the SNMP protocol entity which used a SNMP
-                      community name not known to said entity."
-              ::= { snmp 4 }
-
-          snmpInBadCommunityUses OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Messages delivered to
-                      the SNMP protocol entity which represented an SNMP
-                      operation which was not allowed by the SNMP
-                      community named in the Message."
-              ::= { snmp 5 }
-
-          snmpInASNParseErrs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of ASN.1 or BER errors
-                      encountered by the SNMP protocol entity when
-                      decoding received SNMP Messages."
-              ::= { snmp 6 }
-
-          -- { snmp 7 } is not used
-
-          snmpInTooBigs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP PDUs which were
-                      delivered to the SNMP protocol entity and for
-                      which the value of the error-status field is
-                      `tooBig'."
-              ::= { snmp 8 }
-
-          snmpInNoSuchNames OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP PDUs which were
-                      delivered to the SNMP protocol entity and for
-                      which the value of the error-status field is
-                      `noSuchName'."
-              ::= { snmp 9 }
-
-          snmpInBadValues OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP PDUs which were
-                      delivered to the SNMP protocol entity and for
-                      which the value of the error-status field is
-                      `badValue'."
-              ::= { snmp 10 }
-
-          snmpInReadOnlys OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number valid SNMP PDUs which were
-                      delivered to the SNMP protocol entity and for
-                      which the value of the error-status field is
-                      `readOnly'.  It should be noted that it is a
-                      protocol error to generate an SNMP PDU which
-                      contains the value `readOnly' in the error-status
-                      field, as such this object is provided as a means
-                      of detecting incorrect implementations of the
-                      SNMP."
-              ::= { snmp 11 }
-
-          snmpInGenErrs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP PDUs which were
-                      delivered to the SNMP protocol entity and for
-                      which the value of the error-status field is
-                      `genErr'."
-              ::= { snmp 12 }
-
-          snmpInTotalReqVars OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of MIB objects which have been
-                      retrieved successfully by the SNMP protocol entity
-                      as the result of receiving valid SNMP Get-Request
-                      and Get-Next PDUs."
-              ::= { snmp 13 }
-
-          snmpInTotalSetVars OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of MIB objects which have been
-                      altered successfully by the SNMP protocol entity
-                      as the result of receiving valid SNMP Set-Request
-                      PDUs."
-              ::= { snmp 14 }
-
-          snmpInGetRequests OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Get-Request PDUs which
-                      have been accepted and processed by the SNMP
-                      protocol entity."
-              ::= { snmp 15 }
-
-          snmpInGetNexts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Get-Next PDUs which have
-                      been accepted and processed by the SNMP protocol
-                      entity."
-              ::= { snmp 16 }
-
-          snmpInSetRequests OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Set-Request PDUs which
-                      have been accepted and processed by the SNMP
-                      protocol entity."
-              ::= { snmp 17 }
-
-          snmpInGetResponses OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Get-Response PDUs which
-                      have been accepted and processed by the SNMP
-                      protocol entity."
-              ::= { snmp 18 }
-
-          snmpInTraps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Trap PDUs which have
-                      been accepted and processed by the SNMP protocol
-                      entity."
-              ::= { snmp 19 }
-
-          snmpOutTooBigs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP PDUs which were
-                      generated by the SNMP protocol entity and for
-                      which the value of the error-status field is
-                      `tooBig.'"
-              ::= { snmp 20 }
-
-          snmpOutNoSuchNames OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP PDUs which were
-                      generated by the SNMP protocol entity and for
-                      which the value of the error-status is
-                      `noSuchName'."
-              ::= { snmp 21 }
-
-          snmpOutBadValues OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP PDUs which were
-                      generated by the SNMP protocol entity and for
-                      which the value of the error-status field is
-                      `badValue'."
-              ::= { snmp 22 }
-
-          -- { snmp 23 } is not used
-
-          snmpOutGenErrs OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP PDUs which were
-                      generated by the SNMP protocol entity and for
-                      which the value of the error-status field is
-                      `genErr'."
-              ::= { snmp 24 }
-
-          snmpOutGetRequests OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Get-Request PDUs which
-                      have been generated by the SNMP protocol entity."
-              ::= { snmp 25 }
-
-          snmpOutGetNexts OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Get-Next PDUs which have
-                      been generated by the SNMP protocol entity."
-              ::= { snmp 26 }
-
-          snmpOutSetRequests OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Set-Request PDUs which
-                      have been generated by the SNMP protocol entity."
-              ::= { snmp 27 }
-
-          snmpOutGetResponses OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Get-Response PDUs which
-                      have been generated by the SNMP protocol entity."
-              ::= { snmp 28 }
-
-          snmpOutTraps OBJECT-TYPE
-              SYNTAX  Counter
-              ACCESS  read-only
-              STATUS  mandatory
-              DESCRIPTION
-                      "The total number of SNMP Trap PDUs which have
-                      been generated by the SNMP protocol entity."
-              ::= { snmp 29 }
-
-          snmpEnableAuthenTraps OBJECT-TYPE
-              SYNTAX  INTEGER { enabled(1), disabled(2) }
-              ACCESS  read-write
-              STATUS  mandatory
-              DESCRIPTION
-                      "Indicates whether the SNMP agent process is
-                      permitted to generate authentication-failure
-                      traps.  The value of this object overrides any
-                      configuration information; as such, it provides a
-                      means whereby all authentication-failure traps may
-                      be disabled.
-
-                      Note that it is strongly recommended that this
-                      object be stored in non-volatile memory so that it
-                      remains constant between re-initializations of the
-                      network management system."
-              ::= { snmp 30 }
-
-          END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_MM.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,656 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-   MTA-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-       DisplayString, TimeInterval
-         FROM SNMPv2-TC
-       mib-2
-         FROM RFC1213-MIB
-       applIndex
-         FROM APPLICATION-MIB;
-
-   mta MODULE-IDENTITY
-       LAST-UPDATED "9311280000Z"
-       ORGANIZATION "IETF Mail and Directory Management Working Group"
-       CONTACT-INFO
-         "        Ned Freed
-
-          Postal: Innosoft International, Inc.
-                  250 West First Street, Suite 240
-                  Claremont, CA  91711
-                  US
-
-          Tel: +1 909 624 7907
-          Fax: +1 909 621 5319
-
-          E-Mail: ned@innosoft.com"
-       DESCRIPTION
-         "The MIB module describing Message Transfer Agents (MTAs)"
-       ::= { mib-2 28 }
-
-   mtaTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MtaEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information specific to an MTA."
-       ::= {mta 1}
-
-   mtaEntry OBJECT-TYPE
-       SYNTAX MtaEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MTA."
-       INDEX {applIndex}
-       ::= {mtaTable 1}
-
-   MtaEntry ::= SEQUENCE {
-       mtaReceivedMessages
-         Counter32,
-       mtaStoredMessages
-         Gauge32,
-       mtaTransmittedMessages
-         Counter32,
-       mtaReceivedVolume
-         Counter32,
-       mtaStoredVolume
-         Gauge32,
-       mtaTransmittedVolume
-         Counter32,
-       mtaReceivedRecipients
-         Counter32,
-       mtaStoredRecipients
-         Gauge32,
-       mtaTransmittedRecipients
-         Counter32
-   }
-
-   mtaReceivedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages received since MTA initialization."
-       ::= {mtaEntry 1}
-
-   mtaStoredMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages currently stored in the MTA."
-       ::= {mtaEntry 2}
-
-   mtaTransmittedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages transmitted since MTA initialization."
-       ::= {mtaEntry 3}
-
-   mtaReceivedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages received since MTA
-         initialization, measured in kilo-octets.  This volume should
-         include all transferred data that is logically above the mail
-         transport protocol level.  For example, an SMTP-based MTA
-         should use the number of kilo-octets in the message header
-         and body, while an X.400-based MTA should use the number of
-         kilo-octets of P2 data."
-       ::= {mtaEntry 4}
-
-   mtaStoredVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages currently stored in the MTA,
-         measured in kilo-octets.  This volume should include all
-         stored data that is logically above the mail transport
-         protocol level.  For example, an SMTP-based MTA should
-         use the number of kilo-octets in the message header and
-         body, while an X.400-based MTA would use the number of
-         kilo-octets of P2 data."
-       ::= {mtaEntry 5}
-
-   mtaTransmittedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages transmitted since MTA
-         initialization, measured in kilo-octets.  This volume should
-         include all transferred data that is logically above the mail
-         transport protocol level.  For example, an SMTP-based MTA
-         should use the number of kilo-octets in the message header
-         and body, while an X.400-based MTA should use the number of
-         kilo-octets of P2 data."
-       ::= {mtaEntry 6}
-
-   mtaReceivedRecipients OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of recipients specified in all messages
-         received since MTA initialization.  Recipients this MTA
-         had no responsibility for should not be counted even if
-         information about such recipients is available."
-       ::= {mtaEntry 7}
-
-   mtaStoredRecipients OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of recipients specified in all messages
-         currently stored in the MTA.  Recipients this MTA had no
-         responsibility for should not be counted."
-       ::= {mtaEntry 8}
-
-   mtaTransmittedRecipients OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of recipients specified in all messages
-         transmitted since MTA initialization.  Recipients this MTA
-         had no responsibility for should not be counted."
-       ::= {mtaEntry 9}
-
-
-   -- MTAs typically group inbound reception, queue storage, and
-   -- outbound transmission in some way. In the most extreme case
-   -- information will be maintained for each different entity that
-   -- receives messages and for each entity the MTA stores messages for
-   -- and delivers messages to.  Other MTAs may elect to treat all
-   -- reception equally, all queue storage equally, all deliveries
-   -- equally, or some combination of this.
-
-   -- In any case, a grouping abstraction is an extremely useful for
-   -- breaking down the activities of an MTA. For purposes of labelling
-   -- this will be called a "group" in this MIB.
-
-   -- Each group contains all the variables needed to monitor all aspects
-   -- of an MTA's operation.  However, the fact that all groups contain
-   -- all possible variables does not imply that all groups must use all
-   -- possible variables. For example, a single group might be used to
-   -- monitor only one kind of event (inbound processing, outbound
-   -- processing, or storage). In this sort of configuration all unused
-   -- counters would be inaccessible; e.g., returning either a
-   -- noSuchName error (for an SNMPv1 get), or a noSuchInstance
-   -- exception (for an SNMPv2 get).
-
-   -- Groups are not necessarily mutually exclusive. A given event may
-   -- be recorded by more than one group, a message may be seen as
-   -- stored by more than one group, and so on.  Groups should be all
-   -- inclusive, however: if groups are implemented all aspects of an
-   -- MTA's operation should be registered in at least one group. This
-   -- freedom lets implementors use different sets of groups to
-   -- provide differents "views" of an MTA.
-
-   -- The possibility of overlap between groups means that summing
-   -- variables across groups may not produce values equal to those in
-   -- the mtaTable. mtaTable should always provide accurate information
-   -- about the MTA as a whole.
-
-   -- The term "channel" is often used in MTA implementations; channels
-   -- are usually, but not always, equivalent to a group. However,
-   -- this MIB does not use the term "channel" because there is no
-   -- requirement that an MTA supporting this MIB has to map its
-   -- "channel" abstraction one-to-one onto the MIB's group abstration.
-
-   mtaGroupTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MtaGroupEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information specific to each MTA group."
-       ::= {mta 2}
-
-   mtaGroupEntry OBJECT-TYPE
-       SYNTAX MtaGroupEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MTA group."
-       INDEX {applIndex, mtaGroupIndex}
-       ::= {mtaGroupTable 1}
-
-   MtaGroupEntry ::= SEQUENCE {
-       mtaGroupIndex
-           INTEGER,
-       mtaGroupReceivedMessages
-           Counter32,
-       mtaGroupRejectedMessages
-           Counter32,
-       mtaGroupStoredMessages
-           Gauge32,
-       mtaGroupTransmittedMessages
-           Counter32,
-       mtaGroupReceivedVolume
-           Counter32,
-       mtaGroupStoredVolume
-           Gauge32,
-       mtaGroupTransmittedVolume
-           Counter32,
-       mtaGroupReceivedRecipients
-           Counter32,
-       mtaGroupStoredRecipients
-           Gauge32,
-       mtaGroupTransmittedRecipients
-           Counter32,
-       mtaGroupOldestMessageStored
-           TimeInterval,
-       mtaGroupInboundAssociations
-           Gauge32,
-       mtaGroupOutboundAssociations
-           Gauge32,
-       mtaGroupAccumulatedInboundAssociations
-           Counter32,
-       mtaGroupAccumulatedOutboundAssociations
-           Counter32,
-       mtaGroupLastInboundActivity
-           TimeInterval,
-       mtaGroupLastOutboundActivity
-           TimeInterval,
-       mtaGroupRejectedInboundAssociations
-           Counter32,
-       mtaGroupFailedOutboundAssociations
-           Counter32,
-       mtaGroupInboundRejectionReason
-           DisplayString,
-       mtaGroupOutboundConnectFailureReason
-           DisplayString,
-       mtaGroupScheduledRetry
-           TimeInterval,
-       mtaGroupMailProtocol
-           OBJECT IDENTIFIER,
-       mtaGroupName
-           DisplayString
-   }
-
-   mtaGroupIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The index associated with a group for a given MTA."
-       ::= {mtaGroupEntry 1}
-
-   mtaGroupReceivedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages received to this group since MTA
-         initialization."
-       ::= {mtaGroupEntry 2}
-
-   mtaGroupRejectedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages rejected by this group since MTA
-         initialization."
-       ::= {mtaGroupEntry 3}
-
-   mtaGroupStoredMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages currently stored in this
-         group's queue."
-       ::= {mtaGroupEntry 4}
-
-   mtaGroupTransmittedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages transmitted by this group since MTA
-         initialization."
-       ::= {mtaGroupEntry 5}
-
-   mtaGroupReceivedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages received to this group since
-         MTA initialization, measured in kilo-octets.  This volume
-         should include all transferred data that is logically above
-         the mail transport protocol level.  For example, an
-         SMTP-based MTA should use the number of kilo-octets in the
-         message header and body, while an X.400-based MTA should use
-         the number of kilo-octets of P2 data."
-       ::= {mtaGroupEntry 6}
-
-   mtaGroupStoredVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages currently stored in this
-         group's queue, measured in kilo-octets.  This volume should
-         include all stored data that is logically above the mail
-         transport protocol level.  For example, an SMTP-based
-         MTA should use the number of kilo-octets in the message
-         header and body, while an X.400-based MTA would use the
-         number of kilo-octets of P2 data."
-       ::= {mtaGroupEntry 7}
-
-   mtaGroupTransmittedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages transmitted by this group
-         since MTA initialization, measured in kilo-octets.  This
-         volume should include all transferred data that is logically
-         above the mail transport protocol level.  For example, an
-         SMTP-based MTA should use the number of kilo-octets in the
-         message header and body, while an X.400-based MTA should use
-         the number of kilo-octets of P2 data."
-       ::= {mtaGroupEntry 8}
-
-   mtaGroupReceivedRecipients OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of recipients specified in all messages
-         received to this group since MTA initialization.
-         Recipients this MTA had no responsibility for should not
-         be counted."
-       ::= {mtaGroupEntry 9}
-
-   mtaGroupStoredRecipients OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of recipients specified in all messages
-         currently stored in this group's queue.  Recipients this
-         MTA had no responsibility for should not be counted."
-       ::= {mtaGroupEntry 10}
-
-   mtaGroupTransmittedRecipients OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of recipients specified in all messages
-         transmitted by this group since MTA initialization.
-         Recipients this MTA had no responsibility for should not
-         be counted."
-       ::= {mtaGroupEntry 11}
-
-   mtaGroupOldestMessageStored OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the oldest message in this group's queue was
-          placed in the queue."
-       ::= {mtaGroupEntry 12}
-
-   mtaGroupInboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current associations to the group, where the
-          group is the responder."
-       ::= {mtaGroupEntry 13}
-
-   mtaGroupOutboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current associations to the group, where the
-         group is the initiator."
-       ::= {mtaGroupEntry 14}
-
-   mtaGroupAccumulatedInboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of associations to the group since MTA
-         initialization, where the group is the responder."
-       ::= {mtaGroupEntry 15}
-
-   mtaGroupAccumulatedOutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of associations from the group since MTA
-          initialization, where the group was the initiator."
-       ::= {mtaGroupEntry 16}
-
-   mtaGroupLastInboundActivity OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this group had an active
-         inbound association for purposes of message reception."
-       ::= {mtaGroupEntry 17}
-
-   mtaGroupLastOutboundActivity OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this group had an
-         outbound association for purposes of message delivery."
-       ::= {mtaGroupEntry 18}
-
-   mtaGroupRejectedInboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of inbound associations the group has
-         rejected, since MTA initialization."
-       ::= {mtaGroupEntry 19}
-
-   mtaGroupFailedOutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number associations where the group was the
-         initiator and association establishment has failed,
-         since MTA initialization."
-       ::= {mtaGroupEntry 20}
-
-   mtaGroupInboundRejectionReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The failure reason, if any, for the last association this
-         group refused to respond to. An empty string indicates that
-         the last attempt was successful.  If no association attempt
-         has been made since the MTA was initializaed the value
-         should be 'never'."
-       ::= {mtaGroupEntry 21}
-
-   mtaGroupOutboundConnectFailureReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The failure reason, if any, for the last association attempt
-         this group initiated. An empty string indicates that the last
-         attempt was successful.  If no association attempt has been
-         made since the MTA was initialized the value should be
-         'never'."
-       ::= {mtaGroupEntry 22}
-
-   mtaGroupScheduledRetry OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The time when this group is scheduled to next attempt to
-          make an association."
-       ::= {mtaGroupEntry 23}
-
-   mtaGroupMailProtocol OBJECT-TYPE
-       SYNTAX OBJECT IDENTIFIER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "An identification of the protocol being used by this group.
-         For an group employing OSI protocols, this will be the
-         Application Context.  For Internet applications, the IANA
-         maintains a registry of the OIDs which correspond to well-known
-         message transfer protocols.  If the application protocol is
-         not listed in the registry, an OID value of the form
-         {applTCPProtoID port} or {applUDProtoID port} are used for
-         TCP-based and UDP-based protocols, respectively.  In either
-         case 'port' corresponds to the primary port number being
-         used by the group.  applTCPProtoID and applUDPProtoID are
-         defined in [5]."
-       ::= {mtaGroupEntry 24}
-
-   mtaGroupName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "A descriptive name for the group. If this group connects to
-         a single remote MTA this should be the name of that MTA. If
-         this in turn is an Internet MTA this should be the domain name.
-         For an OSI MTA it should be the string encoded distinguished
-         name of the managed object using the format defined in RFC-1485.
-         For X.400(1984) MTAs which do not have a Distinguished Name,
-         the RFC-1327 syntax 'mta in globalid' should be used."
-       ::= {mtaGroupEntry 25}
-
-   mtaGroupAssociationTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MtaGroupAssociationEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information regarding the associations
-          for each MTA group."
-       ::= {mta 3}
-
-   mtaGroupAssociationEntry OBJECT-TYPE
-       SYNTAX MtaGroupAssociationEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry holding information regarding the associations
-          for each MTA group."
-       INDEX {applIndex, mtaGroupIndex, mtaGroupAssociationIndex}
-       ::= {mtaGroupAssociationTable 1}
-
-   MtaGroupAssociationEntry ::= SEQUENCE {
-       mtaGroupAssociationIndex
-           INTEGER
-   }
-
-   mtaGroupAssociationIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Reference into association table to allow correlation of
-          this group's active associations with the association table."
-       ::= {mtaGroupAssociationEntry 1}
-
-
-   -- Conformance information
-
-   mtaConformance OBJECT IDENTIFIER ::= {mta 4}
-
-   mtaGroups      OBJECT IDENTIFIER ::= {mtaConformance 1}
-   mtaCompliances OBJECT IDENTIFIER ::= {mtaConformance 2}
-
-
-   -- Compliance statements
-
-   mtaCompliance MODULE-COMPLIANCE
-       STATUS current
-       DESCRIPTION
-         "The compliance statement for SNMPv2 entities which
-          implement the Mail Monitoring MIB for basic
-          monitoring of MTAs."
-       MODULE  -- this module
-         MANDATORY-GROUPS {mtaGroup}
-       ::= {mtaCompliances 1}
-
-
-   mtaAssocCompliance MODULE-COMPLIANCE
-       STATUS current
-       DESCRIPTION
-         "The compliance statement for SNMPv2 entities which
-          implement the Mail Monitoring MIB for monitoring of
-          MTAs and their associations."
-       MODULE  -- this module
-         MANDATORY-GROUPS {mtaGroup, mtaAssocGroup}
-       ::= {mtaCompliances 2}
-
-
-   -- Units of conformance
-
-   mtaGroup OBJECT-GROUP
-       OBJECTS {
-         mtaReceivedMessages, mtaStoredMessages,
-         mtaTransmittedMessages, mtaReceivedVolume, mtaStoredVolume,
-         mtaTransmittedVolume, mtaReceivedRecipients,
-         mtaStoredRecipients, mtaTransmittedRecipients,
-         mtaGroupReceivedMessages, mtaGroupRejectedMessages,
-         mtaGroupStoredMessages, mtaGroupTransmittedMessages,
-         mtaGroupReceivedVolume, mtaGroupStoredVolume,
-         mtaGroupTransmittedVolume, mtaGroupReceivedRecipients,
-         mtaGroupStoredRecipients, mtaGroupTransmittedRecipients,
-         mtaGroupOldestMessageStored, mtaGroupInboundAssociations,
-         mtaGroupOutboundAssociations,
-         mtaGroupAccumulatedInboundAssociations,
-         mtaGroupAccumulatedOutboundAssociations,
-         mtaGroupLastInboundActivity, mtaGroupLastOutboundActivity,
-         mtaGroupRejectedInboundAssociations,
-         mtaGroupFailedOutboundAssociations,
-         mtaGroupInboundRejectionReason,
-         mtaGroupOutboundConnectFailureReason,
-         mtaGroupScheduledRetry, mtaGroupMailProtocol, mtaGroupName}
-       STATUS current
-       DESCRIPTION
-         "A collection of objects providing basic monitoring of MTAs."
-       ::= {mtaGroups 1}
-
-   mtaAssocGroup OBJECT-GROUP
-       OBJECTS {
-         mtaGroupAssociationIndex}
-       STATUS current
-       DESCRIPTION
-         "A collection of objects providing monitoring of MTA
-          associations."
-       ::= {mtaGroups 2}
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_MS.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1375 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   MS-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-       DisplayString, TimeInterval
-         FROM SNMPv2-TC
-       mib-2
-         FROM RFC1213-MIB
-       applIndex
-         FROM APPLICATION-MIB;
-
-   ms MODULE-IDENTITY
-       LAST-UPDATED "9601290000Z"
-       ORGANIZATION "ICNC, SunSoft"
-       CONTACT-INFO
-         "        Olivier Reisacher
-
-          Postal: ICNC, SunSoft
-                  32, chemin du vieux chene
-                  38 240 Meylan
-                  FRANCE
-
-          Tel: +33 76 41 42 43
-          Fax: +33 76 41 42 41
-
-          E-Mail: oreisache@france.sun.com"
-       DESCRIPTION
-         "The MIB module describing Message Stores (MSs)"
-       ::= { private-mibs 4 }
-
-
-
---	---------------------
---	| ADMISTRATOR NEEDS |
---	---------------------
---
---	1. Is the MS running? Is it down? Is it overloaded?
---	2. Which are the Users that are creating the load?
---	3. What is the current number of connections compare to
---	   the maximum number of connections supported?
---	4. Is the disk full? How much disk space is still available?
---	5. Does a given User regularly read his mail?
---
---
---	---------
---	| GOALS |
---	---------
---
---	Here are the 5 major goals we have tried to reach:
---	- solve the administrator needs.
---	- build/integrate this MIB on top of the Network Services
---	  Monitoring MIB (RFC 1565).
---	- use as much as possible the design/ideas contained in the
---	  MTA MIB (RFC 1566), the DSA MIB (RFC 1567) and the HTTP MIB.
---	  All these three MIBs are on the standard track and are also built on
---	  top of the Network Services Monitoring MIB.
---	- build a model to hold common variables/counters to monitor all kinds
---	  of Message Stores. This model should be as hierarchical as possible
---	  to be efficient.
---	- test the resulting model against the following scenarios:
---		the Berkeley Mailboxes that can be accessed by IMAP or POP
---		the Solstice X.400 Message Store
---		the Solstice Message Center
---
---
---	---------
---	| MODEL |
---	---------
---	
---	The proposed model is the following:
---		a MS is a APPLICATION (see RFC 1565)
---		a MS serves several USERs
---		a USER owns several FOLDERs
---
---	As we can guess, the number of USERs supported by a single MS will continue
---	to grow in the future.
---	Dumping some huge tables using SNMP is slow and resource consuming, so we
---	decided to introduce a intermediate level between the MS and its USERs:
---		the notion of GROUP.
---
---	We have then the resulting model:
---		a MS is an APPLICATION (see RFC 1565)
---		a MS serves several GROUPs
---		a GROUP is composed of several USERs
---		a USER owns several FOLDERs
---
---
---	We have also introduced two new types of variables because
---	a single MS may support several protocols:
---		MsAccessMethod
---		MsTransferMethod
---
---	These two new types are used in the msAccessTable, msTransferTable,
---	msUserAccessTable, msUserTransferTable.
---	The two first tables provide some statistics per Access/Transfer method
---	for the entire MS and the other two tables provide some statistics
---	per Access/Transfer Method and per User.
---
---	We do not provide statistics per Access/Transfer method per Group
---      because this implies two extra tables and we think that it will
---	be easy to sum these statistics on all users contained in that Group
---      (a Group should not contain thousand of Users).
---
---	Comments:
---
---	- Variables which name looks like XXXAccessYYY are related to the
---	  communication between Users and the MS.
---	- Variables which name looks like XXXTransferYYY are related to the
---	  communication between the MS and the MTA.
---
---
---	 MS
---      |---------------------------------------------------------|
---      |                                                         |
---      |         global stats of the MS                          |
---      |                                                         |
---      |       |----------------------------|                    |
---      |       | stats per Transfer method  |                    |
---      |       |----------------------------|                    |
---      |                                                         |
---      |       |----------------------------|                    |
---      |       | stats per Access method    |                    |
---      |       |----------------------------|                    |
---      |                                                         |
---      |   GROUP                                                 |
---      | |-----------------------------------------------------| |
---      | |                                                     | |
---      | |       global stats of the GROUP                     | |
---      | |                                                     | |
---      | |   USER                                              | |
---      | | |-------------------------------------------------| | |
---      | | |                                                 | | |
---      | | |     global stats of the USER                    | | |
---      | | |                                                 | | |
---      | | |   |----------------------------|                | | |
---      | | |   | stats per Transfer method  |                | | |
---      | | |   |----------------------------|                | | |
---      | | |                                                 | | |
---      | | |   |----------------------------|                | | |
---      | | |   | stats per Access method    |                | | |
---      | | |   |----------------------------|                | | |
---      | | |                                                 | | |
---      | | |                                                 | | |
---      | | |   FOLDER                                        | | |
---      | | | |---------------------------------------------| | | |
---      | | | |                                             | | | |
---      | | | |   global stats of the FOLDER                | | | |
---      | | | |                                             | | | |
---      | | | |                                             | | | |
---      | | | |                                             | | | |
---      | | | |                                             | | | |
---      | | | |---------------------------------------------| | | |
---      | | |                                                 | | |
---      | | |-------------------------------------------------| | |
---      | |                                                     | |
---      | |-----------------------------------------------------| |
---      |                                                         |
---      |---------------------------------------------------------|
---
---
---	Assumptions we made:
---	- a User belongs to an MS (configuration of the MS)
---	- a Association is always owned by a User
---	- a Folder is always owned by a User
---
---	Example of questions we can answer:
---	- Which is the Folder currently accessed by a given User?
---
---	Known limitation of the model:
---	- each User can only belong to one Group.
---	- each Folder is associated with a single User, the owner
---        of the Folder (see msFolderIsShared).
---	- we won't be able to provide the history list of Users
---	  who accessed a given Folder
-
-
-
-   MsAccessMethod ::= TEXTUAL-CONVENTION
-       STATUS current
-       DESCRIPTION
-         "The Access method used by the UA to access the MS.
-
-          This new type is used in both the msAccessTable and the
-          msUserAccessTable.
-
-          pop(1), imap(4), p7(9) should only be used if the protocol
-          version is unknown."
-       SYNTAX INTEGER {
-          pop(1),
-          pop-2(2),
-          pop-3(3),
-          imap(4),
-          imap-2(5),
-          imap-2bis(6),
-          imap-3(7),
-          imap-4(8),
-          p7(9),
-          p7-88(10)
-       }
-      
-   MsTransferMethod ::= TEXTUAL-CONVENTION
-       STATUS current
-       DESCRIPTION
-         "The Transfer method used by the MS to submit a message
-          to the Message Tranfer System (MTS) or the Transfer method used
-          by the Message Transfer System to deliver a message to the MS.
-
-          This new type is used in both the msTransferTable and the
-          msUserTransferTable.
-
-          p3(1) should only be used if the protocol version is unknown."
-       SYNTAX INTEGER {
-          p3(1),
-          p3-88(2)
-       }
-
-
-
-   -- The msTable can be seen as an extension of the applTable
-   -- (see INDEX clause in the msEntry)
-   --
-   -- Comments:
-   -- ---------
-   -- The sum on all the Users of the used volume >= sum of the volume used by the MS
-   -- (some messages may be shared by several Users)
-
-   msTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information specific to an MS."
-       ::= { ms 1 }
-
-   msEntry OBJECT-TYPE
-       SYNTAX MsEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MS."
-       INDEX { applIndex }
-       ::= { msTable 1 }
-
-   MsEntry ::= SEQUENCE {
-       msMessages
-         Gauge32,
-       msVolume
-         Gauge32,
-       msFreeSpace
-         INTEGER,
-       msGroups
-         Gauge32
-   }
-
-   msMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages stored in the MS."
-       ::= { msEntry 1 }
-
-   msVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume measured in kilo-octet of messages stored
-          in the MS."
-       ::= { msEntry 2 }
-
-   msFreeSpace OBJECT-TYPE
-       SYNTAX INTEGER
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The free space available to store new messages in the MS.
-          This space is measured in kilo-octets.
-          If this value is not available, it should be set to -1."
-       ::= { msEntry 3 }
-
-   msGroups OBJECT-TYPE
-       SYNTAX Gauge
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of Groups of Users in the MS."
-       ::= { msEntry 4 }
-
-
-
-   -- The msAccessTable provide some statitics about the usage
-   -- of the MS per Access method.
-
-   msAccessTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsAccessEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding statistics for an MS per
-          Access method."
-       ::= { ms 2 }
-
-   msAccessEntry OBJECT-TYPE
-       SYNTAX MsAccessEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MS and per Access method."
-       INDEX { applIndex, msAccessIndex }
-       ::= { msAccessTable 1 }
-
-   MsAccessEntry ::= SEQUENCE {
-       msAccessIndex,
-         MsAccessMethod,
-       msAccessListedMessages
-         Counter32,
-       msAccessFetchedMessages
-         Counter32,
-       msAccessDeletedMessages
-         Counter32,
-       msAccessListedVolume
-         Counter32,
-       msAccessFetchedVolume
-         Counter32,
-       msAccessDeletedVolume
-         Counter32,
-       msAccesses
-         Gauge32,
-       msAccumulatedAccesses
-         Counter32,
-       msLastAccess
-         TimeInterval,
-       msAccumulatedAccesseTime
-         TimeInterval,
-       msRejectedAccesses
-         Counter32,
-       msAccessRejectionReason
-         DisplayString
-   }
-
-   msAccessIndex OBJECT-TYPE
-       SYNTAX MsAccessMethod
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The index used to group statistics per Access method."
-       ::= { msAccessEntry 1 }
-
-   msAccessListedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages listed since MS initialization,
-          per Access method."
-       ::= { msAccessEntry 2 }
-
-   msAccessFetchedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages fetched since MS initialization,
-          per Access method."
-       ::= { msAccessEntry 3 }
-
-   msAccessDeletedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages deleted since MS initialization,
-          per Access method."
-       ::= { msAccessEntry 4 }
-
-   msAccessListedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages listed since MS initialization,
-          per Access method, measured in kilo-octets."
-       ::= { msAccessEntry 5 }
-
-   msAccessFetchedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages fetched since MS initialization,
-          per Access method, measured in kilo-octets."
-       ::= { msAccessEntry 6 }
-
-   msAccessDeletedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages deleted since MS initialization,
-          per Access method, measured in kilo-octets."
-       ::= { msAccessEntry 7 }
-
-   msAccesses OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current accesses to the MS, per Access method."
-       ::= { msAccessEntry 8 }
-
-   msAccumulatedAccesses OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of accesses to the MS since MS initialization,
-          per Access method."
-       ::= { msAccessEntry 9 }
-
-   msLastAccess OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that the MS was accessed,
-          per Access method."
-       ::= { msAccessEntry 10 }
-
-   msAccumulatedAccessTime OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total time of connection to the MS
-          since MS initialization, per Access method."
-       ::= { msAccessEntry 11 }
-
-   msRejectedAccesses OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of accesses the MS has rejected since MS
-          initialization, per Access method."
-       ::= { msAccessEntry 12 }
-
-   msAccessRejectedReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The failure reason, if any, for the last access this
-         MS refused. An empty string indicates that
-         the last attempt was successful.  If no access attempt
-         has been made since the MS was initialized the value
-         should be 'never'."
-       ::= { msAccessEntry 13 }
-
-
-
-   -- The msTransferTable provide some statitics about the usage
-   -- of the MS per Transfer method.
-   --
-   -- When the MS application does not communicate with the MTA
-   -- (like "Berkeley Mailboxes"), there will no entry in this table.
-
-   msTransferTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsTransferEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding statistics for a entire MS per
-          Transfer method."
-       ::= { ms 3 }
-
-   msTransferEntry OBJECT-TYPE
-       SYNTAX MsTransferEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MS and per Transfer method."
-       INDEX { applIndex, msTransferIndex }
-       ::= { msTransferTable 1 }
-
-   MsTransferEntry ::= SEQUENCE {
-       msTransferIndex,
-         MsTransferMethod,
-       msTransferSentMessages
-         Counter32,
-       msTransferReceivedMessages
-         Counter32,
-       msTransferSentVolume
-         Counter32,
-       msTransferReceivedVolume
-         Counter32,
-       msTransfers
-         Gauge32,
-       msAccumulatedTranfers,
-         Counter32,
-       msLastTransfer
-         TimeInterval,
-       msFailedTransfers
-         Counter32,
-       msTransferFailureReason
-         DisplayString
-   }
-
-   msTransferIndex OBJECT-TYPE
-       SYNTAX MsTransferMethod
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The index used to group statistics per Transfer method."
-       ::= { msTransferEntry 1 }
-
-   msTransferSentMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages sent since MS initialization,
-          per Transfer method."
-       ::= { msTransferEntry 2 }
-
-   msTransferReceivedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages received since MS initialization,
-          per Transfer method."
-       ::= { msTransferEntry 3 }
-
-   msTransferSentVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages sent since MS initialization,
-          per Transfer method, measured in kilo-octets."
-       ::= { msTransferEntry 4 }
-
-   msTransferReceivedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages received since MS initialization,
-          per Transfer method, measured in kilo-octets."
-       ::= { msTransferEntry 5 }
-
-   msTransfers OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current tranfers to/from the MS, per Transfert method."
-       ::= { msTransferEntry 6 }
-
-   msAccumulatedTransfers OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of transfers to/from the MS since MS initialization,
-          per Transfer method."
-       ::= { msTransferEntry 7 }
-
-   msLastTransfer OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that a message was transferred to/from the MS,
-          per Transfer method."
-       ::= { msTransferEntry 8 }
-
-   msRejectedTransfers OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of Transfers that failed since MS
-          initialization, per Transfer method."
-       ::= { msTransferEntry 9 }
-
-   msTransferFailureReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The failure reason, if any, for the last Transfer that failed.
-         An empty string indicates that
-         the last Transfer was successful. If no Transfer attempt
-         has been made since the MS was initialized the value
-         should be 'never'."
-       ::= { msTransferEntry 10 }
-
-
-
-   -- We have introduced the notion of Groups of Users to avoid
-   -- dumping a large table of Users each time we want some detailed
-   -- statistics about the MS.
-   --
-   -- In the case of "Berkeley Mailboxes" a group could correspond to UNIX groups.
-   -- In the case of the "Solstice X.400 MS", we have already introduced
-   -- this notion of Group of Users.
-   --
-   -- If the MS does not support the notion of Group of Users or if a User
-   -- does not belong to any group, then the User should be added to the
-   -- dummy "anonymous" group.
-
-   msGroupTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsGroupEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information specific to each Group of Users."
-       ::= { ms 4 }
-
-   msGroupEntry OBJECT-TYPE
-       SYNTAX MsGroupEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each Group of Users."
-       INDEX { applIndex, msGroupIndex }
-       ::= { msGroupTable 1 }
-
-   MsGroupEntry ::= SEQUENCE {
-       msGroupIndex
-           INTEGER,
-       msGroupUsers
-           Gauge32,
-       msGroupMessages
-           Counter32,
-       msGroupVolume
-           Counter32,
-       msGroupUsers,
-           Gauge32,
-       msGroupName
-           DisplayString
-   }
-
-   msGroupIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The index associated with a Group of Users for a given MS."
-       ::= { msGroupEntry 1 }
-
-   msGroupMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages stored for this Group of Users."
-       ::= { msGroupEntry 2 }
-
-   msGroupVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages stored for this Group of Users,
-         measured in kilo-octets."
-       ::= { msGroupEntry 3 }
-
-   msGroupUsers OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of Users in this Group."
-       ::= { msGroupEntry 4 }
-
-   msGroupName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "A descriptive name for the Group of Users."
-       ::= { msGroupEntry 5 }
-
-
-
-   -- msUserTable
-
-   msUserTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsUserEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information specific to each User."
-       ::= { ms 5 }
-
-   msUserEntry OBJECT-TYPE
-       SYNTAX MsUserEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each User."
-       INDEX { applIndex, msGroupIndex, msUserIndex }
-       ::= { msUserTable 1 }
-
-   MsUserEntry ::= SEQUENCE {
-       msUserIndex
-           INTEGER,
-       msUserMessages
-           Counter32,
-       msUserVolume
-           Counter32,
-       msUserFolders
-           Gauge32,
-       msUserName
-           DisplayString
-   }
-
-   msUserIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The index associated with a User."
-       ::= { msUserEntry 1 }
-
-   msUserMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages stored for this User."
-       ::= { msUserEntry 2 }
-
-   msUserVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages stored for this User,
-          measured in kilo-octets."
-       ::= { msUserEntry 3 }
-
-   msUserFolders OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of Folders this User owns."
-       ::= { msUserEntry 4 }
-
-   msUserName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "A descriptive name for the User."
-       ::= { msUserEntry 5 }
-
-
-
-   -- msFolderTable:
-   --
-   -- A message can be in 4 different states: new, listed, processed, pending.
-   -- A pending message is a message with the deletion flag set (see IMAP)
-   --
-   -- Question: Is is possible to have an complete of the Folders for a
-   --           a given User? In an X.500 DSA?
-   --
-   -- In the case of the MS "Berkeley Mailboxes", there will be at least
-   -- one Folder: the INBOX Folder.
-   -- The IMAP could perhaps learn the Folders accessed by a User?
-   -- And what about the subsribed Folders?
-
-   msFolderTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsFolderEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information specific to each Folder."
-       ::= { ms 6 }
-
-   msFolderEntry OBJECT-TYPE
-       SYNTAX MsFolderEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each Folder."
-       INDEX { applIndex, msGroupIndex, msUserIndex, msFolderIndex }
-       ::= { msFolderTable 1 }
-
-   MsFolderEntry ::= SEQUENCE {
-       msFolderIndex
-           INTEGER,
-       msFolderNewMessages
-           Gauge32,
-       msFolderListedMessages
-           Gauge32,
-       msFolderProcessedMessages
-           Gauge32,
-       msFolderPendingMessages
-           Gauge32,
-       msFolderNewVolume
-           Gauge32,
-       msFolderListedVolume
-           Gauge32,
-       msFolderProcessedVolume
-           Gauge32,
-       msFolderPendingVolume
-           Gauge32,
-       msFolderCreation
-           TimeInterval,
-       msFolderLastNewMessage
-           TimeInterval,
-       msFolderAccesses
-           Gauge32,
-       msFolderAccumulatedAccesses
-           Counter32,
-       msFolderLastAccess
-           TimeInterval,
-       msFolderIsShared,
-           INTEGER,
-       msFolderName
-           DisplayString
-   }
-
-   msFolderIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The index associated with a Folder."
-       ::= { msFolderEntry 1 }
-
-   msFolderNewMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of new messages stored in this Folder."
-       ::= { msFolderEntry 2 }
-
-   msFolderListedMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of listed messages stored in this Folder."
-       ::= { msFolderEntry 3 }
-
-   msFolderProcessedMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of processed messages stored in this Folder."
-       ::= { msFolderEntry 4 }
-
-   msFolderPendingMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of pending messages stored in this Folder."
-       ::= { msFolderEntry 5 }
-
-   msFolderNewVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of new messages stored in this Folder,
-         measured in kilo-octets."
-       ::= { msFolderEntry 6 }
-
-   msFolderListedVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of listed messages stored in this Folder,
-         measured in kilo-octets."
-       ::= { msFolderEntry 7 }
-
-   msFolderProcessedVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of processed messages stored in this Folder,
-         measured in kilo-octets."
-       ::= { msFolderEntry 8 }
-
-   msFolderPendingVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of pending messages stored in this Folder,
-         measured in kilo-octets."
-       ::= { msFolderEntry 9 }
-
-   msFolderCreation OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-	"Time since the this Folder was created."
-       ::= { msFolderEntry 10 }
-
-   msFolderLastNewMessage OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-	"Time since the last new message was received in this Folder."
-       ::= { msFolderEntry 11 }
-
-   msFolderAccesses OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-	"Number of current accesses to this Folder."
-       ::= { msFolderEntry 12 }
-
-   msFolderAccumulatedAccesses OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-	"Number of accumulated accesses to this Folder."
-       ::= { msFolderEntry 13 }
-
-   msFolderLastAccess OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-	"Time since a User last accessed this Folder."
-       ::= { msFolderEntry 14 }
-
-   msFolderIsShared OBJECT-TYPE
-       SYNTAX INTEGER {
-         yes(1),
-         no(2)
-       }
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-	"yes(1) if this Folder is shared by many Users."
-       ::= { msFolderEntry 15 }
-
-   msFolderName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "A descriptive name for the Folder."
-       ::= { msFolderEntry 16 }
-
-
-
-   -- The msUserAccessTable provide some statitics about the usage
-   -- of the MS per Access method.
-
-   msUserAccessTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF msGroupEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding statistics specific to each User per
-          Access method."
-       ::= { ms 7 }
-
-   msUserAccessEntry OBJECT-TYPE
-       SYNTAX MsUserAccessEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each User per Access method."
-       INDEX { applIndex, msGroupIndex, msUserIndex, msUserAccessIndex }
-       ::= { msUserAccessTable 1 }
-
-   MsUserAccessEntry ::= SEQUENCE {
-       msUserAccessIndex,
-         MsAccessMethod,
-       msUserAccessListedMessages
-         Counter32,
-       msUserAccessFetchedMessages
-         Counter32,
-       msUserAccessDeletedMessages
-         Counter32,
-       msUserAccessListedVolume
-         Counter32,
-       msUserAccessFetchedVolume
-         Counter32,
-       msUserAccessDeletedVolume
-         Counter32,
-       msUserAccesses
-         Gauge32,
-       msUserAccumulatedAccesses
-         Counter32,
-       msUserLastAccess
-         TimeInterval,
-       msUserAccumulatedAccessTime
-         TimeInterval,
-       msUserRejectedAccesses
-         Counter32,
-       msUserAccessRejectionReason
-         DisplayString
-   }
-
-   msUserAccessIndex OBJECT-TYPE
-       SYNTAX MsAccessMethod
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The index used to group statistics per Access method."
-       ::= { msUserAccessEntry 1 }
-
-   msUserAccessListedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages listed since MS initialization,
-          per User and per Access method."
-       ::= { msUserAccessEntry 2 }
-
-   msUserAccessFetchedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages fetched since MS initialization,
-          per User and per Access method."
-       ::= { msUserAccessEntry 3 }
-
-   msUserAccessDeletedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages deleted since MS initialization,
-          per User and per Access method."
-       ::= { msUserAccessEntry 4 }
-
-   msUserAccessListedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages listed since MS initialization,
-          per User and per Access method, measured in kilo-octets."
-       ::= { msUserAccessEntry 5 }
-
-   msUserAccessFetchedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages fetched since MS initialization,
-          per User and per Access method, measured in kilo-octets."
-       ::= { msUserAccessEntry 6 }
-
-   msUserAccessDeletedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages deleted since MS initialization,
-          per User and per Access method, measured in kilo-octets."
-       ::= { msUserAccessEntry 7 }
-
-   msUserAccesses OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current accesses per User per Access method."
-       ::= { msUserAccessEntry 8 }
-
-   msUserAccumulatedAccesses OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of accesses to the MS since MS initialization,
-          per User and per Access method."
-       ::= { msUserAccessEntry 9 }
-
-   msUserLastAccess OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that the MS was accessed,
-          per User and per Access method."
-       ::= { msUserAccessEntry 10 }
-
-   msUserAccumulatedAccessTime OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total time this User was connected to the
-          MS since MS initialization, per Access method."
-       ::= { msUserAccessEntry 11 }
-
-   msUserRejectedAccesses OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of accesses the MS has rejected since MS
-          initialization, per User and per Access method."
-       ::= { msUserAccessEntry 12 }
-
-   msUserAccessRejectedReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The failure reason, if any, for the last access this
-         MS refused for that User. An empty string indicates that
-         the last attempt was successful.  If no access attempt
-         has been made since the MS was initialized the value
-         should be 'never'."
-       ::= { msUserAccessEntry 13 }
-
-
-
-   -- The msUserTransferTable provide some statitics about the usage
-   -- of the MS per User and per Transfer method.
-   --
-   -- When the MS application does not communicate with the MTA
-   -- (like "Berkeley Mailboxes"), there will no entry in this table.
-
-   msUserTransferTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsUserTransferEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding statistics per User and per
-          Transfer method."
-       ::= { ms 8 }
-
-   msUserTransferEntry OBJECT-TYPE
-       SYNTAX MsUserTransferEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated per User and per Transfer method."
-       INDEX { applIndex, msGroupIndex, msUserIndex, msUserTransferIndex }
-       ::= { msUserTransferTable 1 }
-
-   MsUserTransferEntry ::= SEQUENCE {
-       msUserTransferIndex,
-         MsTransferMethod,
-       msUserTransferSentMessages
-         Counter32,
-       msUserTransferReceivedMessages
-         Counter32,
-       msUserTransferSentVolume
-         Counter32,
-       msUserTransferReceivedVolume
-         Counter32,
-       msUserTransfers
-         Gauge32,
-       msUserAccumulatedTranfers,
-         Counter32,
-       msUserLastTransfer
-         TimeInterval,
-       msUserFailedTransfers
-         Counter32,
-       msUserTransferFailureReason
-         DisplayString
-   }
-
-   msUserTransferIndex OBJECT-TYPE
-       SYNTAX MsTransferMethod
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The index used to group statistics per Transfer method."
-       ::= { msUserTransferEntry 1 }
-
-   msUserTransferSentMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages sent since MS initialization,
-          per User and per Transfer method."
-       ::= { msUserTransferEntry 2 }
-
-   msUserTransferReceivedMessages OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages received since MS initialization,
-          per User and per Transfer method."
-       ::= { msUserTransferEntry 3 }
-
-   msUserTransferSentVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages sent since MS initialization,
-          per User and per Transfer method, measured in kilo-octets."
-       ::= { msUserTransferEntry 4 }
-
-   msUserTransferReceivedVolume OBJECT-TYPE
-       SYNTAX Counter32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages received since MS initialization,
-          per User and per Transfer method, measured in kilo-octets."
-       ::= { msUserTransferEntry 5 }
-
-   msUserTransfers OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current tranfers to/from the MS,
-          per User and per Transfert method."
-       ::= { msUserTransferEntry 6 }
-
-   msUserAccumulatedTransfers OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of transfers to/from the MS since MS initialization,
-          per User and per Transfer method."
-       ::= { msUserTransferEntry 7 }
-
-   msUserLastTransfer OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that a message was transferred to/from the MS,
-          per User and per Transfer method."
-       ::= { msUserTransferEntry 8 }
-
-   msUserRejectedTransfers OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of Transfers that failed since MS
-          initialization, per User and per Transfer method."
-       ::= { msUserTransferEntry 9 }
-
-   msUserTransferFailureReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The failure reason, if any, for the last Transfer that failed.
-         An empty string indicates that
-         the last Transfer was successful. If no Transfer attempt
-         has been made since the MS was initialized the value
-         should be 'never'."
-       ::= { msUserTransferEntry 10 }
-
-
-
-   -- The msAssocTable is useful to correlate the associations listed
-   -- in the assocTable (see RFC 1565) with a User, its Group
-   -- and the Folder he is currently accessing.
-   --
-   -- If we do not know the Folder he is currently accessing,
-   -- the value of the msAssocFolderIndex should be "-1".
-
-   msAssocTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF msAssocEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information regarding the associations
-          for each User."
-       ::= { ms 9 }
-
-   msAssocEntry OBJECT-TYPE
-       SYNTAX MsAssocEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry holding information regarding the associations
-          for each User."
-       INDEX { applIndex, msGroupIndex, msUserIndex, msAssocIndex, msAssocFolderIndex }
-       ::= { msAssocTable 1}
-
-   MsAssocEntry ::= SEQUENCE {
-       msAssocIndex
-           INTEGER,
-       msAssocFolderIndex
-           INTEGER
-   }
-
-   msAssocIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of assocIndex."
-       ::= { msAssocEntry 1 }
-
-   msAssocFolderIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of msFolderIndex."
-       ::= { msAssocEntry 2 }
-
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_MTRACK.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-MTA-MESSAGE-TRACK-MIB DEFINITIONS ::= BEGIN
-
-  IMPORTS
-    OBJECT-TYPE, MODULE-IDENTY, Counter32, Gauge32
-     FROM SNMPv2-SMI
-    DisplayString, TimeInterval, DateAndTime
-     DROM SNMPv2-TC;
-
-
-  ema OBJECT IDENTIFIER ::= { 2 16 840 1 113694 }
-  emaMsgTracking OBJECT IDENTIFIER ::= { ema 1 1 1 2 }
-
-
-  mta-message-track MODULE-IDENTITY
-    LAST-UPDATED "9503200000Z"
-    ORGANISATION "EMA"
-    CONTACT-INFO
-     ""
-    DESCRIPTION
-     "The MIB module describing Message Tracking"
-    ::= { emaMsgTracking 1 }
-
--- Note that the MODULE-IDENTITY MACRO does not exist in SNMP version 1,
--- and the above would be replaced by something like
--- mta-message-track OBJECT IDENTIFIER ::= { emaMsgTracking 1 }
-
-
-  mtaInformationTable						-- should augment applTable ???
-    SYNTAX SEQUENCE OF mtaInformationEntry
-    MAX-ACCESS not-accessible
-    STATUS current
-    DESCRIPTION
-     "The table holding information about the MTA being queried . A table
-      is used because there may be several MTAs at a single host."
-    ::= { mta-message-track 1 }
-
-  mtaInformationEntry OBJECT-TYPE
-    SYNTAX MtaInformationEntry
-    MAX-ACCESS not-accessible
-    STATUS current
-    DESCRIPTION
-     "One entry in the table holding information about the MTA being
-      queried."
-    INDEX { mtaIndex }						-- applIndex
-    ::= { mtaInformationTable 1 }
-
-  MtaInformationEntry ::= SEQUENCE {
-    mtaIndex							-- remove ???
-      INTEGER,							-- remove ???
-    mtaName
-      DisplayString,
-    mtaMessagingType
-      DisplayString,
-    startTimeforRecordedInformation
-      DateAndTime,
-    alternativeAgent
-      DisplayString
-  }
-
-  mtaMessageTable OBJECT-TYPE					-- messageTable
-    SYNTAX SEQUENCE OF MessageEntry
-    MAX-ACCESS not-accessible
-    STATUS current
-    DESCRIPTION
-     "The table holding information about messages that have passed
-      through a specific MTA."
-    ::= { emaMsgTracking 2 }
-
-  messageEntry OBJECT-TYPE
-    SYNTAX MessageEntry
-    MAX-ACCESS not-accessible
-    STATUS current
-    DESCRIPTION
-     "The entry associated with each message."
-    INDEX { mtaIndex, messageID, Recipient, messageIndex }
-    ::= { mtaMessageTable 1 }					-- messageTable
-
-  MessageEntry ::= SEQUENCE {
-    messageID
-      DisplayString,
-    Originator							-- lowercase for names of variables ???
-      DisplayString,
-    Recipient
-      DisplayString,
-    ArrivalTime
-      DateAndTime,
-    CreationTime
-      DateAndTime,
-    Subject							-- dangerous ???
-      DisplayString,
-    Size
-      INTEGER,
-    Priority
-      DisplayString,
-    MtaSource
-      DisplayString,
-    DispositionTime
-      DateAndTime,
-    DispositionStatus
-      INTEGER,
-    DeliveredTo
-      DisplayString,
-    NonDeliveryReason
-      INTEGER,
-    TransferredTo
-      DisplayString,
-    TransferredToAgent
-      DisplayString,
-    RedirectedTo
-      DisplayString,
-    InQueueState
-      INTEGER,
-    SupplementalInfo
-      DisplayString,
-    messageIndex
-     INTEGER
-  }
-
-  messageID OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only						-- MAX-ACCESS ???
-    STATUS current
-    DESCRIPTION
-     "Message ID of requested message"
-    ::= { messageEntry 1 }
-
-  OriginatorName OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Address of Originator of the sought after message(s)"
-    ::= { messageEntry 2 }
-
-  Recipient OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Address of a Recipient of the sought after message(s)"
-    ::= { messageEntry 3 }
-
-  ArrivalTime OBJECT-TYPE
-    SYNTAX DateAndTime
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Time that the message arrived at this MTA"
-    ::= { messageEntry 4 }
-
-  CreationTime OBJECT-TIME
-    SYNTAX DateAndTime
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Time that the message was created/submitted to the first MTA"
-    ::= { messageEntry 5 }
-
-  Subject OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Subject of the message"
-    ::= { messageEntry 6 }
-
-  Size OBJECT-TYPE
-    SYNTAX INTEGER
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Size in octets of the message upon receipt"
-    ::= { messageEntry 7 }
-
-  Priority OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Priority of the message"
-    ::= { messageEntry 8 }
-
-  MtaSource OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Name of the MTA or Originator from which this MTA received
-      the message"
-    ::= { messageEntry 9 }
-
-  Priority OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Priority of the message"
-    ::= { messageEntry 10 }
-
-  DispositionTime OBJECT-TYPE
-    SYNTAX DateAndTime
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Time at which this MTA disposed of this message for this
-      recipient"
-    ::= { messageEntry 11 }
-
-  DispositionStatus OBJECT-TYPE
-    SYNTAX INTEGER {
-      transferred(1),
-      delivered(2),
-      non-delivered(3),
-      redirected(4),
-      dlist-expanded(5),
-      in-queue(6)
-    }
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Disposition of this message by this MTA for this recipient"
-    ::= { messageEntry 12 }
-
-  NonDeliveryReason OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Reason why this MTA was unable to progress this message"
-    ::= { messageEntry 13 }
-
-  MtaNameTransferredTo OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Name of the MTA that this MTA sent this message to"
-    ::= { messageEntry 14 }
-
-  MtaAgentTransferredTo OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Address of the management agent for the transferred to MTA"
-    ::= { messageEntry 15 }
-
-  RecipientRedirectedTo OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Address to which this recipient's message was redirected"
-    ::= { messageEntry 16 }
-
-  InQueueState OBJECT-TYPE
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "Implementation specific information concerning the status of
-      this message in the MTA's queue"
-    ::= { messageEntry 17 }
-
-  SupplementalInfo OBJECT-TYPE				-- was InQueueState
-    SYNTAX DisplayString
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "This attribute contains information provided by the managed
-      agent that may be use to the management console when
-      tracking this message. No formal structure for this
-      information is specified. Knowlwdge of the contents of this
-      field is by bilateral agreement."
-    ::= { messageEntry 18 }
-
-  messageIndex OBJECT-TYPE
-    SYNTAX INTEGER
-    ACCESS read-only
-    STATUS current
-    DESCRIPTION
-     "The same message may potentially pass through the same MTA
-      several times for any number of reasons. This MTA synthesized
-      datum allows the distinction among the several times that the
-      same MTA acts on the same message for the same reipient."
-    ::= { messageEntry 19 }
-
-
-
-
-
-
--- a/usr/src/cmd/agents/snmp/mib/mib_NSM.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,446 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-   APPLICATION-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-       mib-2
-         FROM RFC1213-MIB
-       DisplayString, TimeStamp
-         FROM SNMPv2-TC;
-
-
-   -- Textual conventions
-
-   -- DistinguishedName [5] is used to refer to objects in the
-   -- directory.
-
-   DistinguishedName ::= TEXTUAL-CONVENTION
-       STATUS current
-       DESCRIPTION
-           "A Distinguished Name represented in accordance with
-            RFC1485."
-       SYNTAX DisplayString
-
-   application MODULE-IDENTITY
-       LAST-UPDATED "9311280000Z"
-       ORGANIZATION "IETF Mail and Directory Management Working Group"
-       CONTACT-INFO
-         "        Ned Freed
-
-          Postal: Innosoft International, Inc.
-                  250 West First Street, Suite 240
-                  Claremont, CA  91711
-                  US
-
-             Tel: +1 909 624 7907
-             Fax: +1 909 621 5319
-
-          E-Mail: ned@innosoft.com"
-       DESCRIPTION
-         "The MIB module describing network service applications"
-       ::= { mib-2 27 }
-
-   -- The basic applTable contains a list of the application
-   -- entities.
-
-
-   applTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF ApplEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-           "The table holding objects which apply to all different
-            kinds of applications providing network services."
-       ::= {application 1}
-
-   applEntry OBJECT-TYPE
-       SYNTAX ApplEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An entry associated with a network service application."
-       INDEX {applIndex}
-       ::= {applTable 1}
-
-   ApplEntry ::= SEQUENCE {
-       applIndex
-           INTEGER,
-       applName
-           DisplayString,
-       applDirectoryName
-           DistinguishedName,
-       applVersion
-           DisplayString,
-       applUptime
-           TimeStamp,
-       applOperStatus
-           INTEGER,
-       applLastChange
-           TimeStamp,
-       applInboundAssociations
-           Gauge32,
-       applOutboundAssociations
-           Gauge32,
-       applAccumulatedInboundAssociations
-           Counter32,
-       applAccumulatedOutboundAssociations
-           Counter32,
-       applLastInboundActivity
-           TimeStamp,
-       applLastOutboundActivity
-           TimeStamp,
-       applRejectedInboundAssociations
-           Counter32,
-       applFailedOutboundAssociations
-           Counter32
-   }
-
-   applIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An index to uniquely identify the network service
-          application."
-       ::= {applEntry 1}
-
-   applName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The name the network service application chooses to be
-          known by."
-       ::= {applEntry 2}
-
-   applDirectoryName OBJECT-TYPE
-       SYNTAX DistinguishedName
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The Distinguished Name of the directory entry where
-          static information about this application is stored.
-          An empty string indicates that no information about
-          the application is available in the directory."
-       ::= {applEntry 3}
-
-   applVersion OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The version of network service application software."
-       ::= {applEntry 4}
-
-   applUptime OBJECT-TYPE
-       SYNTAX TimeStamp
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of sysUpTime at the time the network service
-          application was last initialized.  If the application was
-          last initialized prior to the last initialization of the
-          network management subsystem, then this object contains
-          a zero value."
-       ::= {applEntry 5}
-
-   applOperStatus OBJECT-TYPE
-       SYNTAX INTEGER {
-         up(1),
-         down(2),
-         halted(3),
-         congested(4),
-         restarting(5)
-       }
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Indicates the operational status of the network service
-          application. 'down' indicates that the network service is
-          not available. 'running' indicates that the network service
-          is operational and available.  'halted' indicates that the
-          service is operational but not available.  'congested'
-          indicates that the service is operational but no additional
-          inbound associations can be accomodated.  'restarting'
-          indicates that the service is currently unavailable but is
-          in the process of restarting and will be available soon."
-       ::= {applEntry 6}
-
-   applLastChange OBJECT-TYPE
-       SYNTAX TimeStamp
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of sysUpTime at the time the network service
-          application entered its current operational state.  If
-          the current state was entered prior to the last
-          initialization of the local network management subsystem,
-          then this object contains a zero value."
-       ::= {applEntry 7}
-
-   applInboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current associations to the network service
-          application, where it is the responder.  For dynamic single
-          threaded processes, this will be the number of application
-          instances."
-       ::= {applEntry 8}
-
-   applOutboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current associations to the network service
-          application, where it is the initiator.  For dynamic single
-          threaded processes, this will be the number of application
-          instances."
-       ::= {applEntry 9}
-
-   applAccumulatedInboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of associations to the application entity
-          since application initialization, where it was the responder.
-          For  dynamic single threaded processes, this will be the
-          number of application instances."
-       ::= {applEntry 10}
-
-   applAccumulatedOutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of associations to the application entity
-          since application initialization, where it was the initiator.
-          For dynamic single threaded processes, this will be the
-          number of application instances."
-       ::= {applEntry 11}
-
-   applLastInboundActivity OBJECT-TYPE
-       SYNTAX TimeStamp
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of sysUpTime at the time this application last
-          had an inbound association.  If the last association
-          occurred prior to the last initialization of the network
-          subsystem, then this object contains a zero value."
-       ::= {applEntry 12}
-
-   applLastOutboundActivity OBJECT-TYPE
-       SYNTAX TimeStamp
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of sysUpTime at the time this application last
-          had an outbound association.  If the last association
-          occurred prior to the last initialization of the network
-          subsystem, then this object contains a zero value."
-       ::= {applEntry 13}
-
-   applRejectedInboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of inbound associations the application
-          entity has rejected, since application initialization."
-       ::= {applEntry 14}
-
-   applFailedOutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number associations where the application entity
-          is initiator and association establishment has failed,
-          since application initialization."
-       ::= {applEntry 15}
-
-
-   -- The assocTable augments the information in the applTable
-   -- with information about associations.  Note that two levels
-   -- of compliance are specified below, depending on whether
-   -- association monitoring is mandated.
-
-   assocTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF AssocEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-           "The table holding a set of all active application
-            associations."
-       ::= {application 2}
-
-   assocEntry OBJECT-TYPE
-       SYNTAX AssocEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An entry associated with an association for a network
-          service application."
-       INDEX {applIndex, assocIndex}
-       ::= {assocTable 1}
-
-   AssocEntry ::= SEQUENCE {
-       assocIndex
-           INTEGER,
-       assocRemoteApplication
-           DisplayString,
-       assocApplicationProtocol
-           OBJECT IDENTIFIER,
-       assocApplicationType
-           INTEGER,
-       assocDuration
-           TimeStamp
-   }
-
-   assocIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An index to uniquely identify each association for a network
-          service application."
-       ::= {assocEntry 1}
-
-   assocRemoteApplication OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The name of the system running remote network service
-          application.  For an IP-based application this should be
-          either a domain name or IP address.  For an OSI application
-          it should be the string encoded distinguished name of the
-          managed object.  For X.400(84) MTAs which do not have a
-          Distinguished Name, the RFC1327 [6] syntax
-          'mta in globalid' should be used."
-       ::= {assocEntry 2}
-
-   assocApplicationProtocol OBJECT-TYPE
-       SYNTAX OBJECT IDENTIFIER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "An identification of the protocol being used for the
-          application.  For an OSI Application, this will be the
-          Application Context.  For Internet applications, the IANA
-          maintains a registry of the OIDs which correspond to
-          well-known applications.  If the application protocol is
-          not listed in the registry, an OID value of the form
-          {applTCPProtoID port} or {applUDProtoID port} are used for
-          TCP-based and UDP-based protocols, respectively. In either
-          case 'port' corresponds to the primary port number being
-          used by the protocol."
-       ::= {assocEntry 3}
-
-   assocApplicationType OBJECT-TYPE
-       SYNTAX INTEGER {
-           ua-initiator(1),
-           ua-responder(2),
-           peer-initiator(3),
-           peer-responder(4)}
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "This indicates whether the remote application is some type of
-          client making use of this network service (e.g. a User Agent)
-          or a server acting as a peer. Also indicated is whether the
-          remote end initiated an incoming connection to the network
-          service or responded to an outgoing connection made by the
-          local application."
-       ::= {assocEntry 4}
-
-   assocDuration OBJECT-TYPE
-       SYNTAX TimeStamp
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of sysUpTime at the time this association was
-          started.  If this association started prior to the last
-          initialization of the network subsystem, then this
-          object contains a zero value."
-       ::= {assocEntry 5}
-
-
-   -- Conformance information
-
-   applConformance OBJECT IDENTIFIER ::= {application 3}
-
-   applGroups      OBJECT IDENTIFIER ::= {applConformance 1}
-   applCompliances OBJECT IDENTIFIER ::= {applConformance 2}
-
-
-   -- Compliance statements
-
-   applCompliance MODULE-COMPLIANCE
-       STATUS current
-       DESCRIPTION
-         "The compliance statement for SNMPv2 entities
-          which implement the Network Services Monitoring MIB
-          for basic monitoring of network service applications."
-       MODULE  -- this module
-         MANDATORY-GROUPS {applGroup}
-       ::= {applCompliances 1}
-
-   assocCompliance MODULE-COMPLIANCE
-       STATUS current
-       DESCRIPTION
-         "The compliance statement for SNMPv2 entities which
-          implement the Network Services Monitoring MIB for basic
-          monitoring of network service applications and their
-          associations."
-       MODULE  -- this module
-         MANDATORY-GROUPS {applGroup, assocGroup}
-       ::= {applCompliances 2}
-
-   -- Units of conformance
-
-   applGroup OBJECT-GROUP
-       OBJECTS {
-         applName, applVersion, applUptime, applOperStatus,
-         applLastChange, applInboundAssociations,
-         applOutboundAssociations, applAccumulatedInboundAssociations,
-         applAccumulatedOutboundAssociations, applLastInboundActivity,
-         applLastOutboundActivity, applRejectedInboundAssociations,
-         applFailedOutboundAssociations}
-       STATUS current
-       DESCRIPTION
-         "A collection of objects providing basic monitoring of
-          network service applications."
-       ::= {applGroups 1}
-
-   assocGroup OBJECT-GROUP
-       OBJECTS {
-         assocRemoteApplication, assocApplicationProtocol,
-         assocApplicationType, assocDuration}
-       STATUS current
-       DESCRIPTION
-         "A collection of objects providing basic monitoring of
-          network service applications' associations."
-       ::= {applGroups 2}
-
-
-   -- OIDs of the form {applTCPProtoID port} are intended to be used
-   -- for TCP-based protocols that don't have OIDs assigned by other
-   -- means. {applUDPProtoID port} serves the same purpose for
-   -- UDP-based protocols. In either case 'port' corresponds to
-   -- the primary port number being used by the protocol. For example,
-   -- assuming no other OID is assigned for SMTP, an OID of
-   -- {applTCPProtoID 25} could be used, since SMTP is a TCP-based
-   -- protocol that uses port 25 as its primary port.
-
-   applTCPProtoID OBJECT IDENTIFIER ::= {application 4}
-   applUDPProtoID OBJECT IDENTIFIER ::= {application 5}
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_X4GRP.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   X4GRP-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       ;
-
-   x4grp MODULE-IDENTITY
-       LAST-UPDATED "9508170000Z"
-       ORGANIZATION "SunSoft"
-       CONTACT-INFO
-         ""
-       DESCRIPTION
-         "The MIB module describing X.400 Groups of Users"
-       ::= { private-mibs 2 }
-
-
---
---	x4grpTable
---
-
-   x4grpTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4grpEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information specific to a X.400 Group of Users."
-       ::= {x4grp 1}
-
-   x4grpEntry OBJECT-TYPE
-       SYNTAX X4grpEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each X.400 Group of Users."
-       INDEX {x4grpIndex}
-       ::= {x4grpTable 1}
-
-   X4grpEntry ::= SEQUENCE {
-       x4grpIndex
-         INTEGER,
-       x4grpName
-         DisplayString
-   }
-
-   x4grpIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A integer that uniquely identify an X.400 Group of Users."
-       ::= {x4grpEntry 1}
-
-   x4grpName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The name of the X.400 Group of Users."
-       ::= {x4grpEntry 2}
-
-
---
---	x4grpMappingTable
---
-
-   x4grpMappingTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4gMappingEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "This table allows to correlate the x4grpTable, msUserTable,
-         and the mtaGroupTable."
-       ::= {x4grp 2}
-
-   x4grpMappingEntry OBJECT-TYPE
-       SYNTAX X4gMappingEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each User."
-       INDEX {x4grpIndex, x4grpMappingMSIndex, x4grpMappingMTAIndex}
-       ::= {x4grpMappingTable 1}
-
-   X4gMappingEntry ::= SEQUENCE {
-       x4grpMappingMSIndex
-         INTEGER,
-       x4grpMappingMTAIndex
-         INTEGER
-   }
-
-   x4grpMappingMSIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of msUserIndex."
-       ::= {x4grpMappingEntry 1}
-
-   x4grpMappingMTAIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of mtaGroupIndex."
-       ::= {x4grpMappingEntry 2}
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_X4MS.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,625 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   X4MS-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-       DisplayString,
-         FROM SNMPv2-TC
-       DistinguishedName
-         FROM APPLICATION-MIB;
-
-   x4ms MODULE-IDENTITY
-       LAST-UPDATED "9508170000Z"
-       ORGANIZATION "SunSoft"
-       CONTACT-INFO
-         ""
-       DESCRIPTION
-         "This MIB module is used to monitor the Solstice X.400
-          Message Store.
-
-          Implementation choice:
-            I decided to add a single entry in the applTable to
-            monitor the whole X.400 MS process even through it may
-            serves several users. That is why I introduced the an
-            x4msUserTable that contains an entry for every MS User.
-            This is in line with the X.400 concepts of one
-            MS entity per user."
-       ::= { private-mibs 1 }
-
-
---
---	x4msMtaTable
---
-
-   x4msMtaTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4msMtaEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The Solstice X.400 Message Store can have associations
-          with a limited set of MTAs. All these MTAs are
-          registered in this table."
-       ::= {x4ms 1}
-
-   x4msMtaEntry OBJECT-TYPE
-       SYNTAX X4msMtaEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MTA."
-       INDEX {x4msMtaIndex}
-       ::= {x4msMtaTable 1}
-
-   X4msMtaEntry ::= SEQUENCE {
-       x4msMtaIndex
-         INTEGER,
-       x4msMtaName
-         DisplayString
-   }
-
-   x4msMtaIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A integer that uniquely identifies the MTA."
-       ::= {x4msMtaEntry 1}
-
-   x4msMtaName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The name of the MTA:
-         example: Local/Remote $MTANAME on IP = $HOSTNAME"
-       ::= {x4msMtaEntry 2}
-
-
---
---	x4msUserTablePart1
---
-
-   x4msUserTablePart1 OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4msUserEntryPart1
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information about all MS Users."
-       ::= {x4ms 2}
-
-   x4msUserEntryPart1 OBJECT-TYPE
-       SYNTAX X4msUserEntryPart1
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MS User."
-       INDEX {x4msUserIndex}
-       ::= {x4msUserTablePart1 1}
-
-   X4msUserEntryPart1 ::= SEQUENCE {
-       x4msUserIndex
-         INTEGER,
-       x4msUserMessages
-         Gauge32,
-       x4msUserVolume
-         Gauge32,
-       x4msUserP3Associations
-         Gauge32,
-       x4msUserP7Associations
-         Gauge32,
-       x4msUserLastP7Association
-         TimeInterval,
-       x4msUserAuthentificationsFailures
-         Counter32,
-       x4msUserAuthentificationFailureReason
-         DisplayString,
-       x4msUserName
-         DisplayString
-   }
-
-   x4msUserIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An integer that uniquely identifies a MS User."
-       ::= {x4msUserEntryPart1 1}
-
-   x4msUserTotalMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages stored in the MS User's mailbox."
-       ::= {x4msUserEntryPart1 2}
-
-   x4msUserTotalVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages stored in the MS User's mailbox."
-       ::= {x4msUserEntryPart1 3}
-
-   x4msUserP3Associations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P3 associations with the MTA."
-       ::= {x4msUserEntryPart1 4}
-
-   x4msUserP7Associations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P7 associations."
-       ::= {x4msUserEntryPart1 5}
-
-   x4msUserLastP7Association OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this MS had a P7 association."
-       ::= {x4msUserEntryPart1 6}
-
-   x4msUserAuthentificationFailures OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of authentifictaion failures that occurred
-         since the MS initialization (Security Violation)."
-       ::= {x4msUserEntryPart1 7}
-
-   x4msUserAuthentificationFailureReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "A string describing the last authentification reason.
-         If no authentification failure occurred since the MS was
-         initialized the value should be 'never'."
-       ::= {x4msUserEntryPart1 8}
-
-   x4msUserName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The Name of the MS User."
-       ::= {x4msUserEntryPart1 9}
-
-
---
---	x4msUserTablePart2
---
-
-   x4msUserTablePart2 OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4msUserEntryPart2
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding detailed statistics about the messages
-          stored in an MS User mailbox.
-          To access the information stored in this table, the manager
-          will have to do an SNMP GET request and specify a valid x4msUserIndex.
-          A manager will not be able to do an SNMP GET-NEXT request
-          on this table (an empty table is returned)."
-       ::= {x4ms 3}
-
-   x4msUserEntryPart2 OBJECT-TYPE
-       SYNTAX X4msUserEntryPart2
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MS User."
-       INDEX {x4msUserIndex}
-       ::= {x4msUserTablePart2 1}
-
-   X4msUserEntryPart2 ::= SEQUENCE {
-       x4msUserNewMessages
-         Gauge32,
-       x4msUserNewVolume
-         Gauge32,
-       x4msUserListedMessages
-         Gauge32,
-       x4msUserListedVolume
-         Gauge32,
-       x4msUserProcessedMessages
-         Gauge32,
-       x4msUserProcessedVolume
-         Gauge32,
-       x4msUserMessagesOlderThanWeek
-         Gauge32,
-       x4msUserVolumeOlderThanWeek
-         Gauge32,
-       x4msUserMessagesOlderThanMonth
-         Gauge32,
-       x4msUserVolumeOlderThanMonth
-         Gauge32,
-       x4msUserMessagesOlderThanYear
-         Gauge32,
-       x4msUserVolumeOlderThanYear
-         Gauge32,
-       x4msUserP3InboundAssociations
-         Gauge32,
-       x4msUserP7InboundAssociations
-         Gauge32,
-       x4msUserP3OutboundAssociations
-         Gauge32,
-       x4msUserAccumulatedP3InboundAssociations
-         Counter32,
-       x4msUserAccumulatedP7InboundAssociations
-         Counter32,
-       x4msUserAccumulatedP3OutboundAssociations
-         Counter32,
-       x4msUserLastP3InboundActivity
-         TimeInterval,
-       x4msUserLastP7InboundActivity
-         TimeInterval,
-       x4msUserLastP3OutboundActivity
-         TimeInterval,
-       x4msUserRejectedP3InboundAssociations
-         Counter32,
-       x4msUserRejectedP7InboundAssociations
-         Counter32,
-       x4msUserFailedP3OutboundAssociations
-         Counter32,
-       x4msUserP3InboundRejectionReason
-         DisplayString,
-       x4msUserP7InboundRejectionReason
-         DisplayString,
-       x4msUserP3OutboundConnectFailureReason
-         DisplayString,
-       x4msUserMtaIndex
-         INTEGER,
-       x4msUserORName
-         DistinguishedName
-   }
-
-   x4msUserNewMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages whose Entry-Status is new(0)
-         and currently stored in the MS User's mailbox.
-         (see Entry-Status of a Message, CCITT X.413 page 463)"
-       ::= {x4msUserEntryPart2 1}
-
-   x4msUserNewVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of messages whose Entry-Status is new(0)
-         and currently stored in the MS User's mailbox.
-         (see Content-Length of a Message, CCITT X.413 page 461)"
-       ::= {x4msUserEntryPart2 2}
-
-   x4msUserListedMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages whose Entry-Status is listed(1)
-         and currently stored in the MS User's mailbox.
-         (see Entry-Status of a Message, CCITT X.413 page 463)"
-       ::= {x4msUserEntryPart2 3}
-
-   x4msUserListedVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of messages whose Entry-Status is listed(1)
-         and currently stored in the MS User's mailbox.
-         (see Content-Length of a Message, CCITT X.413 page 461)"
-       ::= {x4msUserEntryPart2 4}
-
-   x4msUserProcessedMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages whose Entry-Status is processed(2)
-         and currently stored in the MS User's mailbox.
-         (see Entry-Status of a Message, CCITT X.413 page 463)"
-       ::= {x4msUserEntryPart2 5}
-
-   x4msUserProcessedVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of messages whose Entry-Status is processed(2)
-         and currently stored in the MS User's mailbox.
-         (see Content-Length of a Message, CCITT X.413 page 461)"
-       ::= {x4msUserEntryPart2 6}
-
-   x4msUserMessagesOlderThanWeek OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages older than a week in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 7}
-
-   x4msUserVolumeOlderThanWeek OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of the messages older than a week in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 8}
-
-   x4msUserMessagesOlderThanMonth OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages older than a month (30 days) in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 9}
-
-   x4msUserVolumeOlderThanMonth OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of the messages older than a month (30 days) in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 10}
-
-   x4msUserMessagesOlderThanYear OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages older than a year (365 days) in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 11}
-
-   x4msUserVolumeOlderThanYear OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of the messages older than a year (365 days) in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 12}
-
-   x4msUserP3InboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P3 associations with the MTA, where the
-         MS is the responder."
-       ::= {x4msUserEntryPart2 13}
-
-   x4msUserP7InboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P7 associations with the MS, where the
-         MS is the responder."
-       ::= {x4msUserEntryPart2 14}
-
-   x4msUserP3OutboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P3 associations with the MS, where the
-         MS is the initiator."
-       ::= {x4msUserEntryPart2 15}
-
-   x4msUserAccumulatedP3InboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of P3 associations with the MTA, where the
-         MS is the responder."
-       ::= {x4msUserEntryPart2 16}
-
-   x4msUserAccumulatedP7InboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of P7 associations with the MS, where the
-         MS the responder."
-       ::= {x4msUserEntryPart2 17}
-
-   x4msUserAccumulatedP3OutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of associations with the MS, where the
-         MS is the initiator."
-       ::= {x4msUserEntryPart2 18}
-
-   x4msUserLastP3InboundActivity OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this MS had a P3 inbound
-         association."
-       ::= {x4msUserEntryPart2 19}
-
-   x4msUserLastP7InboundActivity OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this MS had a P7 inbound
-         association."
-       ::= {x4msUserEntryPart2 20}
-
-   x4msUserLastP3OutboundActivity OBJECT-TYPE
-       SYNTAX TimeInterval
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this MS had a P3 outbound
-         association."
-       ::= {x4msUserEntryPart2 21}
-
-   x4msUserRejectedP3InboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of P3 inbound associations this MS has rejected."
-       ::= {x4msUserEntryPart2 22}
-
-   x4msUserRejectedP7InboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of P7 inbound associations this MS has rejected."
-       ::= {x4msUserEntryPart2 23}
-
-   x4msUserFailedP3OutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of P3 outbound associations that failed."
-       ::= {x4msUserEntryPart2 24}
-
-   x4msUserP3InboundRejectionReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The reason of the rejection of the last P3 inbound
-         association."
-       ::= {x4msUserEntryPart2 25}
-
-   x4msUserP7InboundRejetionReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The reason of the rejection of the last P7 inbound
-         association."
-       ::= {x4msUserEntryPart2 26}
-
-   x4msUserP3OutboundConnectFailureReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The reason of the failure of the last P3 outbound
-         association."
-       ::= {x4msUserEntryPart2 27}
-
-   x4msUserMtaIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "A pointer to the MS MTA table."
-       ::= {x4msUserEntryPart2 28}
-
-   x4msUserORName OBJECT-TYPE
-       SYNTAX DistinguishedName
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The O/R Name of the MS User."
-       ::= {x4msUserEntryPart2 29}
-
-
---
---	x4msUserAssociationTable
---
-
-   x4msUserAssociationTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsUserAssociationEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information regarding the associations
-          for each MS User."
-       ::= {x4ms 4}
-
-   x4msUserAssociationEntry OBJECT-TYPE
-       SYNTAX MsUserAssociationEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry holding information regarding the associations
-          for each MS User."
-       INDEX {x4msUserIndex, x4msUserAssociationIndex}
-       ::= {x4msUserAssociationTable 1}
-
-   MsUserAssociationEntry ::= SEQUENCE {
-       x4msUserAssociationIndex
-           INTEGER
-   }
-
-   x4msUserAssociationIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Reference into association table to allow correlation of
-          this MS User's active associations with the association table."
-       ::= {x4msUserAssociationEntry 1}
-
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_X5DSA.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   X5DSA-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-       DisplayString
-         FROM SNMPv2-TC
-       DistinguishedName
-         FROM APPLICATION-MIB;
-
-   x5dsa MODULE-IDENTITY
-       LAST-UPDATED "9508170000Z"
-       ORGANIZATION "SunSoft"
-       CONTACT-INFO
-         "        Olivier Reisacher
-
-          Postal: ICNC SunSoft, Inc.
-                  32 chemin du vieux chene
-                  38240 MEYLAN
-                  France
-
-          Tel: (33) 76 41 42 46
-          Fax: (33) 76 41 42 41
-
-          E-Mail: oreisach@france.sun.com"
-       DESCRIPTION
-         "This MIB module is used to monitor the Solstice X.500 DSA."
-       ::= { private-mibs 4 }
-
-
---
---	x5dsaReferenceTable
---
-
-   x5dsaReferenceTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF X5dsaReferenceEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table of references of the Solstice X.500 DSA."
-       ::= {x5dsa 1}
-
-   x5dsaReferenceEntry OBJECT-TYPE
-       SYNTAX X5dsaReferenceEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A reference."
-       INDEX {x5dsaReferenceIndex}
-       ::= {x5dsaReferenceTable 1}
-
-   X5dsaReferenceEntry ::= SEQUENCE {
-       x5dsaReferenceIndex
-         INTEGER,
-       x5dsaReferenceType
-         INTEGER,
-       x5dsaReferenceNamingContext
-         DistinguishedName,
-       x5dsaReferenceSubordinate
-         DistinguishedName,
-       x5dsaReferenceName
-         DisplayString
-   }
-
-   x5dsaReferenceIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A integer that uniquely identifies a reference."
-       ::= {x5dsaReferenceEntry 1}
-
-   x5dsaReferenceType OBJECT-TYPE
-       SYNTAX INTEGER {
-         superior(1),
-         cross(2),
-         subordinate(3),
-         non-specific-subordinate(4)
-       }
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The type of the reference."
-       ::= {x5dsaReferenceEntry 2}
-
-   x5dsaReferenceNamingContext OBJECT-TYPE
-       SYNTAX DistinguishedName
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The naming context of the reference.
-          This field is valid for the following reference types:
-          - cross(2),
-          - subordinate(3),
-          - non-specific-subordinate(4)"
-       ::= {x5dsaReferenceEntry 3}
-
-   x5dsaReferenceSubordinate OBJECT-TYPE
-       SYNTAX DistinguishedName
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The subordinate of the reference.
-          This field is valid for the following reference types:
-          - subordinate(3)"
-       ::= {x5dsaReferenceEntry 4}
-
-   x5dsaReferenceName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The name of the MTA:
-         example: DSA $DSANAME on IP = $HOSTNAME"
-       ::= {x5dsaReferenceEntry 5}
-
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_core.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-          CORE-MIB DEFINITIONS ::= BEGIN
-
-
-          IMPORTS ;
-
-
---------------
--- from SMI --
---------------
-
-          -- the path to the root
-
-          internet       OBJECT IDENTIFIER ::= { iso(1) org(3) dod(6) 1 }
-
-          directory      OBJECT IDENTIFIER ::= { internet 1 }
-
-          mgmt           OBJECT IDENTIFIER ::= { internet 2 }
-
-          experimental   OBJECT IDENTIFIER ::= { internet 3 }
-
-          private        OBJECT IDENTIFIER ::= { internet 4 }
-          enterprises    OBJECT IDENTIFIER ::= { private 1 }
-
-          security       OBJECT IDENTIFIER ::= { internet 5 }
-
-          snmpV2         OBJECT IDENTIFIER ::= { internet 6 }
-
-          -- transport domains
-          snmpDomains    OBJECT IDENTIFIER ::= { snmpV2 1 }
-
-          -- transport proxies
-          snmpProxys     OBJECT IDENTIFIER ::= { snmpV2 2 }
-
-          -- module identities
-          snmpModules    OBJECT IDENTIFIER ::= { snmpV2 3 }
-
-
------------------
--- from MIB-II --
------------------
-
-
-          mib-2      OBJECT IDENTIFIER ::= { mgmt 1 }
-
-          -- textual conventions
-
-          DisplayString ::=
-              OCTET STRING
-          -- This data type is used to model textual information taken
-          -- from the NVT ASCII character set.  By convention, objects
-          -- with this syntax are declared as having
-          --
-          --      SIZE (0..255)
-
-          PhysAddress ::=
-              OCTET STRING
-          -- This data type is used to model media addresses.  For many
-          -- types of media, this will be in a binary representation.
-          -- For example, an ethernet address would be represented as
-          -- a string of 6 octets.
-
-
--------------------
--- from RFC 1271 --
--------------------
-
-              EntryStatus ::= INTEGER
-                         { valid(1),
-                           createRequest(2),
-                           underCreation(3),
-                           invalid(4)
-                         }
- 
-              -- The status of a table entry.
-              --
-              -- Setting this object to the value invalid(4) has the
-              -- effect of invalidating the corresponding entry.
-              -- That is, it effectively disassociates the mapping
-              -- identified with said entry.
-              -- It is an implementation-specific matter as to whether
-              -- the agent removes an invalidated entry from the table.
-              -- Accordingly, management stations must be prepared to
-              -- receive tabular information from agents that corresponds
-              -- to entries currently not in use.  Proper
-              -- interpretation of such entries requires examination
-              -- of the relevant EntryStatus object.
-              --
-              -- An existing instance of this object cannot be set to
-              -- createRequest(2).  This object may only be set to
-              -- createRequest(2) when this instance is created.  When
-              -- this object is created, the agent may wish to create
-              -- supplemental object instances to complete a conceptual
-              -- row in this table.  Immediately after completing the
-              -- create operation, the agent must set this object to
-              -- underCreation(3).
-              --
-              -- Entries shall exist in the underCreation(3) state until
-              -- the management station is finished configuring the
-              -- entry and sets this object to valid(1) or aborts,
-              -- setting this object to invalid(4).  If the agent
-              -- determines that an entry has been in the
-              -- underCreation(3) state for an abnormally long time,
-              -- it may decide that the management station has
-              -- crashed.  If the agent makes this decision,
-              -- it may set this object to invalid(4) to reclaim the
-              -- entry.  A prudent agent will understand that the
-              -- management station may need to wait for human input
-              -- and will allow for that possibility in its
-              -- determination of this abnormally long period.
-
-
--------------------
--- from RFC 1316 --
--------------------
-
-                InstancePointer   ::= OBJECT IDENTIFIER
-
-            -- The object identifier is a pointer to a specific instance
-            -- of a MIB object in this agent's implemented MIB.  By
-            -- convention, it is the first object in the conceptual row
-            -- for the instance.
-
-
--------------------
--- from RFC 1443 --
--------------------
-
-
-	TimeStamp ::= TEXTUAL-CONVENTION
-		STATUS       current
-		DESCRIPTION
-			"The value of MIB-II's sysUpTime object at which a  1133
-			specific occurrence happened.  The specific
-			occurrence must be defined in the description of
-			any object defined using this type."
-		SYNTAX       TimeTicks
-
-	TimeInterval ::= TEXTUAL-CONVENTION
-		STATUS       current
-		DESCRIPTION
-			"A period of time, measured in units of 0.01
-			seconds."
-		SYNTAX       INTEGER (0..2147483647)
-
-
-------------------------
--- from RFC 1065/1442 --
-------------------------
-
-	Gauge32 ::= Gauge
-
-	Counter32 ::= Counter
-
-
------------------
--- entreprises --
------------------
-
-	sun		OBJECT IDENTIFIER ::= { enterprises 42 }
-	messaging	OBJECT IDENTIFIER ::= { sun products(2) 8 }
-
-	agents		OBJECT IDENTIFIER ::= { messaging 1 }
-	private-mibs	OBJECT IDENTIFIER ::= { messaging 2 }
-
-	snmpx400d	OBJECT IDENTIFIER ::= { agents 1 }
-	snmpxapiad	OBJECT IDENTIFIER ::= { agents 2 }
-	snmpx500d	OBJECT IDENTIFIER ::= { agents 3 }
-
-
-END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_demo.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
--- HISTORY
--- 5-20-96	Jerry Yeung	fix the mib for sun net manager
-
--- **jerry** using command v2mib2schema
-
-   DEMO-MIB DEFINITIONS ::= BEGIN
-
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-
--- **jerry** not recognized mib-2 ???
---       mib-2
---	 FROM RFC1213-MIB
-       DisplayString, TimeStamp
-         FROM SNMPv2-TC;
-
-   mib-2	OBJECT IDENTIFIER ::= { mgmt 1 }
-   sun	OBJECT IDENTIFIER ::= { enterprises 42 }
-   demo	OBJECT IDENTIFIER ::= { sun 1000 }
-
--- **jerry** using MODULE-IDENTITY, no group table generated
---   demo MODULE-IDENTITY
---       LAST-UPDATED "9503310000Z"
---       ORGANIZATION "SunSoft"
---       CONTACT-INFO
---         ""
---       DESCRIPTION
---         "An demo MIB module"
---       ::= { sun 1000 }
-
-
---
--- Some objects
---
-
-   demoString OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write object of type String."
-       ::= {demo 1}
-
-   demoInteger OBJECT-TYPE
-       SYNTAX INTEGER {
-         up(1),
-         down(2)
-       }
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write object of type Integer."
-       ::= {demo 2}
-
-   demoOid OBJECT-TYPE
-       SYNTAX OBJECT IDENTIFIER
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write object of type Oid."
-       ::= {demo 3}
-
-
---
--- A table composed of some columns
---
-
-   demoTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF DemoEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-           "A table."
-       ::= {demo 10}
-
-   demoEntry OBJECT-TYPE
-       SYNTAX DemoEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An entry in the table demoTable."
-       INDEX {demoEntryIndex}
-
-       ::= {demoTable 1}
-
-   DemoEntry ::= SEQUENCE {
-       demoEntryIndex
-           INTEGER,
-       demoEntryString
-           DisplayString,
-       demoEntryInteger
-           INTEGER,
-       demoEntryOid
-	   OBJECT IDENTIFIER
-   }
-
-   demoEntryIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An index to uniquely identify the entry."
-       ::= {demoEntry 1}
-
-   demoEntryString OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write column of type String."
-       ::= {demoEntry 2}
-
-   demoEntryInteger OBJECT-TYPE
-       SYNTAX INTEGER {
-         up(1),
-         down(2)
-       }
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write column of type Integer."
-       ::= {demoEntry 3}
-
-   demoEntryOid OBJECT-TYPE
-       SYNTAX OBJECT IDENTIFIER
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write column of type Oid."
-       ::= {demoEntry 4}
-
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_relay.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,559 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
--- --------------------------------------------------------------------------
--- ra.mib mib file for relay agent
---
--- Dependence: $(MIB_HOME)/mib_core.txt has read
---	      by the MIB compiler/generator
--- Assumption: The oid for RelayAgent-mib is sun.500(not sure)
--- ---------------------------------------------------------------------------
--- History:
--- Date		Developer		Comment
--- 5-13-96	Jerry Yeung		create 
--- 6-11-96	Jerry Yeung		agentTableIndex becomes read-write
---					regTree has double index
---					trap port
---					no agentOperStatus
---					agent system up time
---					check point
---					statical data
---					subtree view
---					table for subtree
--- 6-23-96	Jerry Yeung		change some index to read ony
--- 7-3-96	Jerry Yeung		add relayPollInterval  and
---					relayMaxAgentTimeOut
---					add agentWatchDogTime in entry
--- 7-09-96	Jerry Yeung		change oid for relay agent
--- ---------------------------------------------------------------------------
-
-RELAY-AGENT-MIB DEFINITIONS ::= BEGIN
-
-  IMPORTS
-	enterprises
-		FROM RFC1155-SMI
-	OBJECT-TYPE, DisplayString
-		FROM RFC1212;
-  sun 	OBJECT IDENTIFIER ::= { enterprises 42 }
-  relay-agent 	OBJECT IDENTIFIER ::= { sun products(2) 15 }
-
---
--- *********** agentTable **************
---
-  agentTable	OBJECT-TYPE
-	SYNTAX	SEQUENCE OF AgentEntry
-	ACCESS	not-accessible
-	STATUS	mandatory
-	DESCRIPTION
-		"The sub-agent table."
-	::= { relay-agent 1 }
-
-  agentTableIndex	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The next available index in agentTable."
-	::= { relay-agent 2 }
--- ****************************************
-
---
--- ********** RegTreeTable ****************
---
-  regTreeTable        OBJECT-TYPE
-        SYNTAX SEQUENCE OF RegTreeEntry
-        ACCESS not-accessible
-        STATUS mandatory
-        DESCRIPTION
-                "Table for subtree registered by sub-agents."
-        ::= { relay-agent 3 }
-
-  regTreeTableIndex	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The next available index in regTreeTable."
-	::= { relay-agent 4 }
-
--- ****************************************
-
---
--- ********** Global Relay agent Info ******
---
-  relayProcessIDFile	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The file storing all the process id." 
-	::= { relay-agent 5 }
-
-  relayResourceFile	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The file storing all the agents info." 
-	::= { relay-agent 6 }
-
-  relayPersonalFileDir	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The directory of the personal file."
-	::= { relay-agent 7 }
-
-  relayLogFile	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The log file of the relay agent."
-	::= { relay-agent 8 }
-
-  relayOperationStatus	OBJECT-TYPE
-	SYNTAX	INTEGER { active(1), inactive(2) }
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"operation mode of the relay agent"
-	::= { relay-agent 9 }
-
-  relayTrapPort	OBJECT-TYPE
-	SYNTAX	INTEGER 
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"operation mode of the relay agent"
-	::= { relay-agent 10 }
-
-  relayCheckPoint OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"check the agent name is duplicate or not."
-	::= { relay-agent 11 }
-
-  relayNSession OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"num of total sessions received."
-	::= { relay-agent 12 }
-
-  relayNSessionDiscards OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"num of total sessions received."
-	::= { relay-agent 13 }
-
--- ****************************************
-
---
--- ********** TableForRegTable ****************
---
-  regTblTable        OBJECT-TYPE
-        SYNTAX SEQUENCE OF RegTblEntry
-        ACCESS not-accessible
-        STATUS mandatory
-        DESCRIPTION
-                "Table for table registered by sub-agents."
-        ::= { relay-agent 14 }
-
-  regTblTableIndex	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The next available index in regTblTable."
-	::= { relay-agent 15 }
-
--- ****************************************
-
---
--- ************** Global Info for relay agent **********
---
-  relayPollInterval OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"time interval for executing the watch-dog monitor"
-	::= { relay-agent 16 }
-
-  relayMaxAgentTimeOut OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"the max-allowable response time for any agent"
-	::= { relay-agent 17 }
-
---
--- ************** agentEntry(Table Entry) ************
---
-  agentEntry 	OBJECT-TYPE
-	SYNTAX	AgentEntry
-	ACCESS	not-accessible
-	STATUS	mandatory
-	DESCRIPTION	
-		"An entry in the sub-agent table."
-	INDEX { agentID }
-	::= { agentTable 1}
-
-  AgentEntry ::=
-	SEQUENCE {
-		agentID
-			INTEGER,
-		agentStatus
-			INTEGER,
-		agentTimeout
-			INTEGER,
-		agentPortNumber
-			INTEGER,
-		agentPersonalFile
-			DisplayString,
-		agentConfigFile
-			DisplayString,
-		agentExecutable
-			DisplayString,
-		agentVersionNum
-			DisplayString,
-		agentProtocol
-			DisplayString,
-		agentProcessID
-			INTEGER,
-		agentName
-			DisplayString,
-  		agentSystemUpTime
-			TimeTicks,
-		agentWatchDogTime
-			INTEGER
-	}
-
-  agentID 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"An id for each connected agent"
-	::= { agentEntry 1 }
-
-  agentStatus 	OBJECT-TYPE
-	SYNTAX	INTEGER { active(1), inactive(2), init(3), load(4), destroy(5) }
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The status of the sub-agent."
-	::= { agentEntry 2 }
-
-  agentTimeOut 	OBJECT-TYPE
-	SYNTAX	INTEGER 
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The max. time for sub-agent to process the request in usec. "
-	::= { agentEntry 3 }
-
-  agentPortNumber 	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The port number of the sub-agent."
-	::= { agentEntry 4 }
-
-  agentPersonalFile 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The personal file of the sub-agent."
-	::= { agentEntry 5 }
-
-  agentConfigFile 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The configuratioin file of the sub-agent."
-	::= { agentEntry 6 }
-
-  agentExecutable 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The executable file of the sub-agent."
-	::= { agentEntry 7 }
-  
-  agentVersionNum 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The version number  of the sub-agent."
-	::= { agentEntry 8 }
-
-  agentProtocol 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The protocol of the sub-agent."
-	::= { agentEntry 9 }
-
-  agentProcessID 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The process id of the sub-agent."
-	::= { agentEntry 10 }
-
-  agentName 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The name of the sub-agent."
-	::= { agentEntry 11 }
-
-  agentSystemUpTime 	OBJECT-TYPE
-	SYNTAX	TimeTicks
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The system up time of the subagent."
-	::= { agentEntry 12 }
-
-  agentWatchDogTime 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The period for relay agent to probe the agent"
-	::= { agentEntry 13 }
-
-
--- ****************************************************************
-
---
--- ************** RegTreeEntry(Table Entry) ************
---
-  regTreeEntry        OBJECT-TYPE
-        SYNTAX RegTreeEntry
-        ACCESS  not-accessible
-        STATUS  mandatory
-        DESCRIPTION
-                "An entry for tree registration."
-        INDEX { regTreeAgentID, regTreeIndex }
-        ::= { regTreeTable 1 }
-
-  RegTreeEntry ::=
-        SEQUENCE {
-		regTreeIndex
-			INTEGER,
-		regTreeAgentID
-			INTEGER,
-		regTreeOID
-			OBJECT IDENTIFIER,
-		regTreeView
-			DisplayString,
-		regTreeStatus
-			INTEGER,
-		regTreePriority
-			INTEGER
-	}
-
-
-  regTreeIndex 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The index of the registration, currently same as agentid."
-	::= { regTreeEntry 1 }
-
-  regTreeAgentID 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"process ID of the sub-agent."
-	::= { regTreeEntry  2 }
-
-  regTreeOID 	OBJECT-TYPE
-	SYNTAX	OBJECT IDENTIFIER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The oid of the subtree."
-	::= { regTreeEntry 3 }
-
-  regTreeView 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The scope name of the mib subtree."
-	::= { regTreeEntry 4 }
-
-  regTreeStatus 	OBJECT-TYPE
-	SYNTAX	INTEGER { active(1), inactive(2) }
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"the entry is deleted or not."
-	::= { regTreeEntry 5 }
-
-  regTreePriority 	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		" 0 is the highest priority."
-	::= { regTreeEntry 6 }
-		
-
--- ****************************************************************
-
---
--- ************** RegTreeEntry(Table Entry) ************
---
-  regTblEntry        OBJECT-TYPE
-        SYNTAX RegTblEntry
-        ACCESS  not-accessible
-        STATUS  mandatory
-        DESCRIPTION
-                "An entry for table registration."
-        INDEX { regTblAgentID, regTblIndex }
-        ::= { regTblTable 1 }
-
-  RegTblEntry ::=
-        SEQUENCE {
-		regTblIndex
-			INTEGER,
-		regTblAgentID
-			INTEGER,
-		regTblOID
-			OBJECT IDENTIFIER,
-		regTblStartColumn
-			INTEGER,
-		regTblEndColumn
-			INTEGER,
-		regTblStartRow
-			INTEGER,
-		regTblEndRow
-			INTEGER,
-		regTblView
-			DisplayString,
-		regTblStatus
-			INTEGER
-	}
-
-  regTblIndex 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The index of the table registration."
-	::= { regTblEntry 1 }
-
-  regTblAgentID 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"agent ID of the sub-agent."
-	::= { regTblEntry  2 }
-
-  regTblOID 	OBJECT-TYPE
-	SYNTAX	OBJECT IDENTIFIER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The oid of the subtree table."
-	::= { regTblEntry 3 }
-
-  regTblStartColumn 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"starting column of the subtable."
-	::= { regTblEntry  4 }
-
-  regTblEndColumn 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"ending column of the subtable."
-	::= { regTblEntry  5 }
-
-  regTblStartRow 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"starting row of the subtable"
-	::= { regTblEntry  6 }
-
-  regTblEndRow 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"ending row of the subtable"
-	::= { regTblEntry  7 }
-
-  regTblView 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The scope name of the subtree table."
-	::= { regTblEntry 8 }
-
-  regTblStatus 	OBJECT-TYPE
-	SYNTAX	INTEGER { active(1), inactive(2) }
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"the entry is deleted or not."
-	::= { regTblEntry 9 }
-
--- ****************************************************************
-
-END
--- a/usr/src/cmd/agents/snmp/mib/mib_smi.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-          SNMPv2-SMI DEFINITIONS ::= BEGIN
-
-
-          -- the path to the root
-
-          internet       OBJECT IDENTIFIER ::= { iso 3 6 1 }
-
-          directory      OBJECT IDENTIFIER ::= { internet 1 }
-
-          mgmt           OBJECT IDENTIFIER ::= { internet 2 }
-
-          experimental   OBJECT IDENTIFIER ::= { internet 3 }
-
-          private        OBJECT IDENTIFIER ::= { internet 4 }
-          enterprises    OBJECT IDENTIFIER ::= { private 1 }
-
-          security       OBJECT IDENTIFIER ::= { internet 5 }
-
-          snmpV2         OBJECT IDENTIFIER ::= { internet 6 }
-
-          -- transport domains
-          snmpDomains    OBJECT IDENTIFIER ::= { snmpV2 1 }
-
-          -- transport proxies
-          snmpProxys     OBJECT IDENTIFIER ::= { snmpV2 2 }
-
-          -- module identities
-          snmpModules    OBJECT IDENTIFIER ::= { snmpV2 3 }
-
-
-
-          -- definitions for information modules
-
-          MODULE-IDENTITY MACRO ::=
-          BEGIN
-              TYPE NOTATION ::=
-                            "LAST-UPDATED" value(Update UTCTime)
-                            "ORGANIZATION" Text
-                            "CONTACT-INFO" Text
-                            "DESCRIPTION" Text
-                            RevisionPart
-
-              VALUE NOTATION ::=
-                            value(VALUE OBJECT IDENTIFIER)
-
-              RevisionPart ::=
-                            Revisions
-                          | empty
-              Revisions ::=
-                            Revision
-                          | Revisions Revision
-              Revision ::=
-                            "REVISION" value(Update UTCTime)
-                            "DESCRIPTION" Text
-
-              -- uses the NVT ASCII character set
-              Text ::= """" string """"
-          END
-
-
-
-          OBJECT-IDENTITY MACRO ::=
-          BEGIN
-              TYPE NOTATION ::=
-                            "STATUS" Status
-                            "DESCRIPTION" Text
-                            ReferPart
-
-              VALUE NOTATION ::=
-                            value(VALUE OBJECT IDENTIFIER)
-
-              Status ::=
-                            "current"
-                          | "obsolete"
-
-              ReferPart ::=
-                          "REFERENCE" Text
-                        | empty
-
-              Text ::= """" string """"
-          END
-
-
-
-          -- names of objects
-
-          ObjectName ::=
-              OBJECT IDENTIFIER
-
-
-          -- syntax of objects
-
-          ObjectSyntax ::=
-              CHOICE {
-                  simple
-                      SimpleSyntax,
-
-                    -- note that SEQUENCEs for conceptual tables and
-                    -- rows are not mentioned here...
-
-                  application-wide
-                      ApplicationSyntax
-              }
-
-
-          -- built-in ASN.1 types
-
-          SimpleSyntax ::=
-              CHOICE {
-                  -- INTEGERs with a more restrictive range
-                  -- may also be used
-                  integer-value
-                      INTEGER (-2147483648..2147483647),
-
-                  string-value
-                      OCTET STRING,
-
-                  objectID-value
-                      OBJECT IDENTIFIER,
-
-                  -- only the enumerated form is allowed
-                  bit-value
-                      BIT STRING
-              }
-
-
-
-          -- indistinguishable from INTEGER, but never needs more than
-          -- 32-bits for a two's complement representation
-          Integer32 ::=
-              [UNIVERSAL 2]
-                  IMPLICIT INTEGER (-2147483648..2147483647)
-
-
-          -- application-wide types
-
-          ApplicationSyntax ::=
-              CHOICE {
-                  ipAddress-value
-                      IpAddress,
-
-                  counter-value
-                      Counter32,
-
-                  gauge-value
-                      Gauge32,
-
-                  timeticks-value
-                      TimeTicks,
-
-                  arbitrary-value
-                      Opaque,
-
-                  nsapAddress-value
-                      NsapAddress,
-
-                  big-counter-value
-                      Counter64,
-
-                  unsigned-integer-value
-                      UInteger32
-              }
-
-          -- in network-byte order
-          -- (this is a tagged type for historical reasons)
-          IpAddress ::=
-              [APPLICATION 0]
-                  IMPLICIT OCTET STRING (SIZE (4))
-
-          -- this wraps
-          Counter32 ::=
-              [APPLICATION 1]
-                  IMPLICIT INTEGER (0..4294967295)
-
-          -- this doesn't wrap
-          Gauge32 ::=
-              [APPLICATION 2]
-                  IMPLICIT INTEGER (0..4294967295)
-
-          -- hundredths of seconds since an epoch
-          TimeTicks ::=
-              [APPLICATION 3]
-                  IMPLICIT INTEGER (0..4294967295)
-
-          -- for backward-compatibility only
-          Opaque ::=
-              [APPLICATION 4]
-                  IMPLICIT OCTET STRING
-
-          -- for OSI NSAP addresses
-          -- (this is a tagged type for historical reasons)
-          NsapAddress ::=
-              [APPLICATION 5]
-                  IMPLICIT OCTET STRING (SIZE (1 | 4..21))
-
-          -- for counters that wrap in less than one hour with only 32 bits
-          Counter64 ::=
-              [APPLICATION 6]
-                  IMPLICIT INTEGER (0..18446744073709551615)
-
-          -- an unsigned 32-bit quantity
-          UInteger32 ::=
-              [APPLICATION 7]
-                  IMPLICIT INTEGER (0..4294967295)
-
-
-
-
-          -- definition for objects
-
-          OBJECT-TYPE MACRO ::=
-          BEGIN
-              TYPE NOTATION ::=
-                            "SYNTAX" type(Syntax)
-                            UnitsPart
-                            "MAX-ACCESS" Access
-                            "STATUS" Status
-                            "DESCRIPTION" Text
-                            ReferPart
-                            IndexPart
-                            DefValPart
-
-              VALUE NOTATION ::=
-                            value(VALUE ObjectName)
-
-              UnitsPart ::=
-                            "UNITS" Text
-                          | empty
-
-              Access ::=
-                            "not-accessible"
-                          | "read-only"
-                          | "read-write"
-                          | "read-create"
-
-              Status ::=
-                            "current"
-                          | "deprecated"
-                          | "obsolete"
-
-              ReferPart ::=
-                            "REFERENCE" Text
-                          | empty
-
-              IndexPart ::=
-                            "INDEX"    "{" IndexTypes "}"
-                          | "AUGMENTS" "{" Entry      "}"
-                          | empty
-              IndexTypes ::=
-                            IndexType
-                          | IndexTypes "," IndexType
-
-              IndexType ::=
-                            "IMPLIED" Index
-                          | Index
-              Index ::=
-                              -- use the SYNTAX value of the
-                              -- correspondent OBJECT-TYPE invocation
-                            value(Indexobject ObjectName)
-              Entry ::=
-                              -- use the INDEX value of the
-                              -- correspondent OBJECT-TYPE invocation
-                            value(Entryobject ObjectName)
-
-              DefValPart ::=
-                            "DEFVAL" "{" value(Defval Syntax) "}"
-                          | empty
-
-              -- uses the NVT ASCII character set
-              Text ::= """" string """"
-          END
-
-
-
-          -- definitions for notifications
-
-          NOTIFICATION-TYPE MACRO ::=
-          BEGIN
-              TYPE NOTATION ::=
-                            ObjectsPart
-                            "STATUS" Status
-                            "DESCRIPTION" Text
-                            ReferPart
-
-              VALUE NOTATION ::=
-                            value(VALUE OBJECT IDENTIFIER)
-
-              ObjectsPart ::=
-                            "OBJECTS" "{" Objects "}"
-                          | empty
-              Objects ::=
-                            Object
-                          | Objects "," Object
-              Object ::=
-                            value(Name ObjectName)
-
-              Status ::=
-                            "current"
-                          | "deprecated"
-                          | "obsolete"
-
-              ReferPart ::=
-                          "REFERENCE" Text
-                        | empty
-
-              -- uses the NVT ASCII character set
-              Text ::= """" string """"
-          END
-
-
-          END
-
--- a/usr/src/cmd/agents/snmp/mib/mib_trap.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
--- **jerry** using command v2mib2schema
-
-   DEMO-MIB DEFINITIONS ::= BEGIN
-
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-
--- **jerry** not recognized mib-2 ???
---       mib-2
---	 FROM RFC1213-MIB
-       DisplayString, TimeStamp
-         FROM SNMPv2-TC;
-
-   mib-2	OBJECT IDENTIFIER ::= { mgmt 1 }
-   sun	OBJECT IDENTIFIER ::= { enterprises 42 }
-   demo	OBJECT IDENTIFIER ::= { sun 1000 }
-
--- **jerry** using MODULE-IDENTITY, no group table generated
---   demo MODULE-IDENTITY
---       LAST-UPDATED "9503310000Z"
---       ORGANIZATION "SunSoft"
---       CONTACT-INFO
---         ""
---       DESCRIPTION
---         "An demo MIB module"
---       ::= { sun 1000 }
-
-
---
--- Some objects
---
-
-   demoString OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write object of type String."
-       ::= {demo 1}
-
-   demoInteger OBJECT-TYPE
-       SYNTAX INTEGER {
-         up(1),
-         down(2)
-       }
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write object of type Integer."
-       ::= {demo 2}
-
-   demoOid OBJECT-TYPE
-       SYNTAX OBJECT IDENTIFIER
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write object of type Oid."
-       ::= {demo 3}
-
-
---
--- A table composed of some columns
---
-
-   demoTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF DemoEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-           "A table."
-       ::= {demo 10}
-
-   demoEntry OBJECT-TYPE
-       SYNTAX DemoEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An entry in the table demoTable."
-       INDEX {demoEntryIndex}
-
-       ::= {demoTable 1}
-
-   DemoEntry ::= SEQUENCE {
-       demoEntryIndex
-           INTEGER,
-       demoEntryString
-           DisplayString,
-       demoEntryInteger
-           INTEGER,
-       demoEntryOid
-	   OBJECT IDENTIFIER
-   }
-
-   demoEntryIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An index to uniquely identify the entry."
-       ::= {demoEntry 1}
-
-   demoEntryString OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write column of type String."
-       ::= {demoEntry 2}
-
-   demoEntryInteger OBJECT-TYPE
-       SYNTAX INTEGER {
-         up(1),
-         down(2)
-       }
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write column of type Integer."
-       ::= {demoEntry 3}
-
-   demoEntryOid OBJECT-TYPE
-       SYNTAX OBJECT IDENTIFIER
-       MAX-ACCESS read-write
-       STATUS current
-       DESCRIPTION
-         "A read-write column of type Oid."
-       ::= {demoEntry 4}
-
-   demoTrap TRAP-TYPE
-	ENTERPRISE sun
-	VARIABLES { demoInteger , demoString, demoOid}
-	DESCRIPTION
-	" Trap for testing."
-	::= 2
-
-   demoColdLinkTrap TRAP-TYPE
-	ENTERPRISE snmp
-	DESCRIPTION
-	" Trap for testing."
-	::= 0
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/rfc1381.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1119 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-
-          RFC1381-MIB DEFINITIONS ::= BEGIN
-
-          IMPORTS
-                  Counter
-                          FROM RFC1155-SMI
-                  transmission
-                          FROM RFC1213-MIB
-                  OBJECT-TYPE
-                          FROM RFC-1212;
-
-
-                          --  LAPB MIB
-
-          -- see Olivier Reisacher
-          transmission OBJECT IDENTIFIER ::= { mib-2 10 }
-
-          lapb    OBJECT IDENTIFIER ::= { transmission 16 }
-
-          PositiveInteger ::= INTEGER (0..2147483647)
-
-          IfIndexType     ::= INTEGER (1..2147483647)
-          -- IfIndexType specifies an index object for a table
-          -- with entries that match entries in the MIB-II ifTable.
-          -- The value of the index for the table will match the
-          -- ifIndex entry for same interface in the ifTable.
-          -- The values of this object range from 1 to ifNumber
-          -- inclusive.
-
-
-          -- ###########################################################
-          --                      LAPB Admn Table
-          -- ###########################################################
-
-          -- Support of the lapbAdmnTable is mandatory for all
-          -- agents of systems that implement LAPB.
-
-          lapbAdmnTable   OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF LapbAdmnEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-
-
-
-
-
-                  DESCRIPTION
-                          "This table contains objects that can be
-                          changed to manage a LAPB interface.
-                          Changing one of these parameters may take
-                          effect in the operating LAPB immediately or
-                          may wait until the interface is restarted
-                          depending on the details of the
-                          implementation.
-
-                          Most of the objects in this read-write table
-                          have corresponding read-only objects in the
-                          lapbOperTable that return the current
-                          operating value.
-
-                          The operating values may be different from
-                          these configured values if changed by XID
-                          negotiation or if a configured parameter was
-                          changed after the interface was started."
-                  ::= { lapb 1 }
-
-          lapbAdmnEntry   OBJECT-TYPE
-                  SYNTAX  LapbAdmnEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Configured parameter values for a specific
-                          LAPB."
-                  INDEX { lapbAdmnIndex }
-                  ::= { lapbAdmnTable 1 }
-
-          LapbAdmnEntry ::= SEQUENCE {
-                  lapbAdmnIndex
-                          IfIndexType,
-                  lapbAdmnStationType
-                          INTEGER,
-                  lapbAdmnControlField
-                          INTEGER,
-                  lapbAdmnTransmitN1FrameSize
-                          PositiveInteger,
-                  lapbAdmnReceiveN1FrameSize
-                          PositiveInteger,
-                  lapbAdmnTransmitKWindowSize
-                          INTEGER,
-                  lapbAdmnReceiveKWindowSize
-                          INTEGER,
-                  lapbAdmnN2RxmitCount
-                  INTEGER,
-                  lapbAdmnT1AckTimer
-
-
-
-
-                          PositiveInteger,
-                  lapbAdmnT2AckDelayTimer
-                          PositiveInteger,
-                  lapbAdmnT3DisconnectTimer
-                          PositiveInteger,
-                  lapbAdmnT4IdleTimer
-                          PositiveInteger,
-                  lapbAdmnActionInitiate
-                          INTEGER,
-                  lapbAdmnActionRecvDM
-                          INTEGER
-                  }
-
-          lapbAdmnIndex   OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The ifIndex value for the LAPB interface."
-                  ::= { lapbAdmnEntry 1 }
-
-          lapbAdmnStationType     OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                          dte (1),
-                          dce (2),
-                          dxe (3)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Identifies the desired station type of this
-                          interface."
-                  REFERENCE "ISO 7776 section 3.1"
-                  DEFVAL { dte }
-                  ::= { lapbAdmnEntry 2 }
-
-          lapbAdmnControlField OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                          modulo8 (1),
-                          modulo128 (2)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The desired size of the sequence numbers
-                          used to number frames."
-                  REFERENCE "ISO 8885 Table 3, Name: HDLC Option - 10"
-                  DEFVAL { modulo8 }
-
-
-
-
-
-                  ::= { lapbAdmnEntry 3 }
-
-          lapbAdmnTransmitN1FrameSize OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The default maximum N1 frame size desired
-                          in number of bits for a frame transmitted by
-                          this DTE.  This excludes flags and 0 bits
-                          inserted for transparency."
-                  REFERENCE "ISO 8885 Table 3,
-                          Name: Information Field length"
-                  DEFVAL { 36000 } -- 4500 * 8; 802.5 Frame size
-                  ::= { lapbAdmnEntry 4 }
-
-          lapbAdmnReceiveN1FrameSize OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The default maximum N1 frame size desired
-                          in number of bits for a frame the DCE/remote
-                          DTE transmits to this DTE.  This excludes
-                          flags and 0 bits inserted for transparency."
-                  DEFVAL { 36000  } -- 4500 * 8; 802.5 Frame size
-                  ::= { lapbAdmnEntry 5 }
-
-          lapbAdmnTransmitKWindowSize OBJECT-TYPE
-                  SYNTAX  INTEGER (1..127)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The default transmit window size for this
-                          Interface.  This is the maximum number of
-                          unacknowledged sequenced PDUs that may be
-                          outstanding from this DTE at any one time."
-                  REFERENCE "ISO 8885 Table 3, Name: Window size"
-                  DEFVAL { 7 }
-                  ::= { lapbAdmnEntry 6 }
-
-          lapbAdmnReceiveKWindowSize OBJECT-TYPE
-                  SYNTAX  INTEGER (1..127)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The default receive window size for this
-                          Interface.  This is the maximum number of
-
-
-
-
-
-                          unacknowledged sequenced PDUs that may be
-                          outstanding from the DCE/remote DTE at any
-                          one time."
-                  REFERENCE "ISO 8885 Table 3, Name: Window size"
-                  DEFVAL { 7 }
-                  ::= { lapbAdmnEntry 7 }
-
-          lapbAdmnN2RxmitCount    OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The default N2 retry counter for this
-                          interface.  This specifies the number of
-                          times a PDU will be resent after the T1
-                          timer expires without an acknowledgement for
-                          the PDU."
-                  REFERENCE "ISO 8885 Table 3,
-                          Name: Retransmission Attempts"
-                  DEFVAL { 20 }
-                  ::= { lapbAdmnEntry 8 }
-
-          lapbAdmnT1AckTimer      OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The default T1 timer for this interface.
-                          This specifies the maximum time in
-                          Milliseconds to wait for acknowledgment of a
-                          PDU."
-                  REFERENCE "ISO 8885 Table 3, Name:
-                          Acknowledgement timer"
-                  DEFVAL { 3000 }
-                  ::= { lapbAdmnEntry 9 }
-
-          lapbAdmnT2AckDelayTimer         OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The default T2 timer for this interface.
-                          This specifies the maximum time in
-                          Milliseconds to wait before sending an
-                          acknowledgment for a sequenced PDU.  A value
-                          of zero means there will be no delay in
-                          acknowledgement generation."
-                  REFERENCE "ISO 8885 Table 3,
-
-
-
-
-
-                          Name: Reply delay timer"
-                  DEFVAL { 0 }
-                  ::= { lapbAdmnEntry 10 }
-
-          lapbAdmnT3DisconnectTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T3 timer for this interface.  This
-                          specifies the time in Milliseconds to wait
-                          before considering the link disconnected.  A
-                          value of zero indicates the link will be
-                          considered disconnected upon completion of
-                          the frame exchange to disconnect the link."
-                  REFERENCE "ISO 7776 section 5.7.1.3"
-                  DEFVAL { 60000 }
-                  ::= { lapbAdmnEntry 11 }
-
-          lapbAdmnT4IdleTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T4 timer for this interface.  This
-                          specifies the maximum time in Milliseconds
-                          to allow without frames being exchanged on
-                          the data link.  A value of 2147483647
-                          indicates no idle timer is being kept."
-                  REFERENCE "ISO 7776 section 5.7.1.4"
-                  DEFVAL { 2147483647 }
-                  ::= { lapbAdmnEntry 12 }
-
-          lapbAdmnActionInitiate OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                  sendSABM (1),
-                          sendDISC (2),
-                          sendDM (3),
-                          none (4),
-                          other (5)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This identifies the action LAPB will take
-                          to initiate link set-up."
-                  DEFVAL { sendSABM }
-                  ::= { lapbAdmnEntry 13 }
-
-
-
-
-
-          lapbAdmnActionRecvDM OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                          sendSABM (1),
-                          sendDISC (2),
-                          other (3)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This identifies the action LAPB will take
-                          when it receives a DM response."
-                  DEFVAL { sendSABM }
-                  ::= { lapbAdmnEntry 14 }
-
-
-          -- ###########################################################
-          --                      LAPB operating parameters.
-          -- ###########################################################
-
-          -- Support of the lapbOperTable is mandatory for all
-          -- agents of systems that implement LAPB.
-
-          lapbOperTable   OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF LapbOperEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This table contains configuration
-                          information about interface parameters
-                          currently set in the interface.  Many of
-                          these objects have corresponding objects in
-                  the lapbAdmnTable."
-                  ::= { lapb 2 }
-
-          lapbOperEntry   OBJECT-TYPE
-                  SYNTAX  LapbOperEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Currently set parameter values for a
-                          specific LAPB."
-                  INDEX { lapbOperIndex }
-                  ::= { lapbOperTable 1 }
-
-          LapbOperEntry ::= SEQUENCE {
-                  lapbOperIndex
-                          IfIndexType,
-                  lapbOperStationType
-
-
-
-
-
-                          INTEGER,
-                  lapbOperControlField
-                          INTEGER,
-                  lapbOperTransmitN1FrameSize
-                          PositiveInteger,
-                  lapbOperReceiveN1FrameSize
-                          PositiveInteger,
-                  lapbOperTransmitKWindowSize
-                          INTEGER,
-                  lapbOperReceiveKWindowSize
-                          INTEGER,
-                  lapbOperN2RxmitCount
-                          INTEGER,
-                  lapbOperT1AckTimer
-                          PositiveInteger,
-                  lapbOperT2AckDelayTimer
-                          PositiveInteger,
-                  lapbOperT3DisconnectTimer
-                          PositiveInteger,
-                  lapbOperT4IdleTimer
-                          PositiveInteger,
-                  lapbOperPortId
-                          OBJECT IDENTIFIER,
-                  lapbOperProtocolVersionId
-                          OBJECT IDENTIFIER
-                  }
-
-          lapbOperIndex   OBJECT-TYPE
-             SYNTAX       IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The ifIndex value for the LAPB interface."
-                  ::= { lapbOperEntry 1 }
-
-          lapbOperStationType     OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                          dte (1),
-                          dce (2),
-                          dxe (3)
-                          }
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Identifies the current operating station
-                          type of this interface.  A value of dxe (3)
-                          indicates XID negotiation has not yet taken
-                          place."
-
-
-
-
-
-                  REFERENCE "ISO 7776 section 3.1"
-                  ::= { lapbOperEntry 2 }
-
-          lapbOperControlField OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                          modulo8 (1),
-                          modulo128 (2)
-                          }
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current operating size of the sequence
-                          numbers used to number frames."
-                  REFERENCE "ISO 7776 section 3.3"
-                  ::= { lapbOperEntry 3 }
-
-          lapbOperTransmitN1FrameSize OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current operating N1 frame size used
-                          for the maximum number of bits in a frame
-                          this DTE can transmit.  This excludes flags
-                          and 0 bits inserted for transparency."
-                  REFERENCE "ISO 7776 section 5.7.3"
-                  ::= { lapbOperEntry 4 }
-
-          lapbOperReceiveN1FrameSize OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  -- See lapbOperTransmitN1FrameSize above
-                  DESCRIPTION
-                          "The current operating N1 frame size used
-                          for the maximum number of bits in a frame
-                          the DCE/remote DTE can transmit.  This
-                          excludes flags and 0 bits inserted for
-                          transparency."
-                  ::= { lapbOperEntry 5 }
-
-          lapbOperTransmitKWindowSize OBJECT-TYPE
-                  SYNTAX  INTEGER (1..127)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current PDU window size this Interface
-                          uses to transmit.  This is the maximum
-
-
-
-
-
-                          number of unacknowledged sequenced PDUs that
-                          may be outstanding from this DTE at any one
-                          time."
-                  REFERENCE "ISO 7776 section 5.7.4"
-                  ::= { lapbOperEntry 6 }
-
-          lapbOperReceiveKWindowSize OBJECT-TYPE
-                  SYNTAX  INTEGER (1..127)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current receive PDU window size for
-                          this Interface.  This is the maximum number
-                          of unacknowledged sequenced PDUs that may be
-                          outstanding from the DCE/remote DTE at any
-                          one time."
-                  REFERENCE "ISO 7776 section 5.7.4"
-                  ::= { lapbOperEntry 7 }
-
-          lapbOperN2RxmitCount    OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current N2 retry counter used for this
-                          interface.  This specifies the number of
-                          times a PDU will be resent after the T1
-                          timer expires without an acknowledgement for
-                          the PDU."
-                  REFERENCE "ISO 7776 section 5.7.2"
-                  ::= { lapbOperEntry 8 }
-
-          lapbOperT1AckTimer      OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current T1 timer for this interface.
-                          This specifies the maximum time in
-                          Milliseconds to wait for acknowledgment of a
-                          PDU."
-                  REFERENCE "ISO 7776 section 5.7.1.1"
-                  ::= { lapbOperEntry 9 }
-
-          lapbOperT2AckDelayTimer         OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-
-
-
-
-
-                  DESCRIPTION
-                          "The current T2 timer for this interface.
-                          This specifies the maximum time in
-                          Milliseconds to wait before sending an
-                          acknowledgment for a sequenced PDU.  A value
-                          of zero means there will be no delay in
-                          acknowledgement generation."
-                  REFERENCE "ISO 7776 section 5.7.1.2"
-                  ::= { lapbOperEntry 10 }
-
-          lapbOperT3DisconnectTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current T3 timer for this interface.
-                          This specifies the time in Milliseconds to
-                          wait before considering the link
-                          disconnected.  A value of zero indicates the
-                          link will be considered disconnected upon
-                          completion of the frame exchange to
-                          disconnect the link."
-                  REFERENCE "ISO 7776 section 5.7.1.3"
-                  ::= { lapbOperEntry 11 }
-
-          lapbOperT4IdleTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current T4 timer for this interface.
-                          This specifies the maximum time in
-                          Milliseconds to allow without frames being
-                          exchanged on the data link.  A value of
-                          2147483647 indicates no idle timer is being
-                          kept."
-                  REFERENCE "ISO 7776 section 5.7.1.4"
-                  ::= { lapbOperEntry 12 }
-
-          lapbOperPortId OBJECT-TYPE
-                  SYNTAX  OBJECT IDENTIFIER
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This object identifies an instance of the
-                          index object in the first group of objects
-                          in the MIB specific to the physical device
-                          or interface used to send and receive
-
-
-
-
-
-                          frames.  If an agent does not support any
-                          such objects, it should return nullSpec
-                          OBJECT IDENTIFIER {0 0}."
-                  ::= { lapbOperEntry 13 }
-
-          lapbOperProtocolVersionId       OBJECT-TYPE
-                  SYNTAX  OBJECT IDENTIFIER
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This object identifies the version of the
-                          lapb protocol implemented by this
-                          interface."
-                  ::= { lapbOperEntry 14 }
-
-
-          -- ###########################################################
-          --                      LAPB    Flow Table
-          -- ###########################################################
-
-          -- Support of the lapbFlowTable is mandatory for all
-          -- agents of systems that implement LAPB.
-
-          lapbFlowTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF LapbFlowEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This table defines the objects recorded by
-                          LAPB to provide information about the
-                          traffic flow through the interface."
-                  ::= { lapb 3 }
-
-          lapbFlowEntry OBJECT-TYPE
-                  SYNTAX  LapbFlowEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The information regarding the effects of
-                          flow controls in LAPB."
-                   INDEX { lapbFlowIfIndex }
-                  ::= { lapbFlowTable 1 }
-
-          LapbFlowEntry ::= SEQUENCE {
-                  lapbFlowIfIndex
-                          IfIndexType,
-                  lapbFlowStateChanges
-                          Counter,
-
-
-
-
-
-                  lapbFlowChangeReason
-                          INTEGER,
-                  lapbFlowCurrentMode
-                          INTEGER,
-                  lapbFlowBusyDefers
-                          Counter,
-                  lapbFlowRejOutPkts
-                          Counter,
-                  lapbFlowRejInPkts
-                          Counter,
-                  lapbFlowT1Timeouts
-                          Counter,
-                  lapbFlowFrmrSent
-                  OCTET STRING,
-                  lapbFlowFrmrReceived
-                          OCTET STRING,
-                  lapbFlowXidReceived
-                          OCTET STRING
-                  }
-
-          lapbFlowIfIndex OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The ifIndex value for the LAPB Interface."
-                  ::= { lapbFlowEntry 1 }
-
-          lapbFlowStateChanges OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of LAPB State Changes, including
-                          resets."
-                  ::= { lapbFlowEntry 2 }
-
-          lapbFlowChangeReason OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                          notStarted (1),    -- Initial state
-                          abmEntered (2),    -- SABM or UA
-                          abmeEntered (3),   -- SABME or UA
-                          abmReset (4),      -- SABM in ABM
-                          abmeReset (5),     -- SABME in ABME
-                          dmReceived (6),    -- DM Response
-                          dmSent (7),        -- DM sent
-                          discReceived (8),  -- DISC Response
-                          discSent (9),      -- DISC Sent
-
-
-
-
-
-                          frmrReceived (10), -- FRMR Received
-                          frmrSent (11),     -- FRMR Sent
-                          n2Timeout (12),    -- N2 Timer Expired
-                          other (13)
-                            }
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The reason for the most recent incrementing
-                          of lapbFlowStateChanges.  A DM or DISC frame
-                          generated to initiate link set-up does not
-                          alter this object.  When the MIB-II object
-                          ifOperStatus does not have a value of
-                          testing, there exists a correlation between
-                          this object and ifOperStatus.  IfOperStatus
-                          will have a value of up when this object
-                          contains:  abmEntered, abmeEntered,
-                          abmReset, or abmeReset.  IfOperStatus will
-                          have a value of down when this object has a
-                          value of notStarted, or dmReceived through
-                          n2Timeout.  There is no correlation when
-                          this object has the value other."
-                  ::= { lapbFlowEntry 3 }
-
-          lapbFlowCurrentMode OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                          disconnected (1),
-                                  -- initial state or DISC received
-
-                          linkSetup (2),
-                                  -- SABM sent
-
-                          frameReject (3),
-                                  -- Invalid frame received and
-                                  -- FRMR sent
-
-                          disconnectRequest (4),
-                                  -- DISC sent
-
-                          informationTransfer (5),
-                                  -- normal information transfer state
-                                  -- SABM(E) sent and UA received, or
-                                  -- SABM(E) received and UA sent
-
-                          rejFrameSent (6),
-                                  -- invalid NS received and REJ sent
-
-                          waitingAcknowledgement (7),
-
-
-
-
-
-                                  -- T1 expired and RR sent
-
-                          stationBusy (8),
-                                  -- RNR sent
-
-                          remoteStationBusy (9),
-                                  -- RNR received
-
-                          bothStationsBusy (10),
-                                  -- RNR received and RNR sent
-
-                          waitingAckStationBusy (11),
-                                  -- T1 expired, RNR sent
-
-                          waitingAckRemoteBusy (12),
-                                  -- T1 expired, RNR received
-
-                          waitingAckBothBusy (13),
-                                  -- T1 expired, RNR sent,
-                                  -- and RNR received
-
-                          rejFrameSentRemoteBusy (14),
-                                  -- REJ sent and RNR received
-
-                          xidFrameSent (15),
-                                  -- XID frame sent
-
-                          error (16),
-                                  -- An error state other than
-                                  -- a one defined above
-
-                          other (17)
-                                  --  A state not listed above
-                            }
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The current condition of the conversation."
-                  ::= { lapbFlowEntry 4 }
-
-          lapbFlowBusyDefers OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times this device was unable
-                          to transmit a frame due to a perceived
-                          remote busy condition.  Busy conditions can
-
-
-
-
-
-                          result from the receipt of an RNR from the
-                          remote device, the lack of valid sequence
-                          number space (window saturation), or other
-                          conditions."
-                  ::= { lapbFlowEntry 5 }
-
-          lapbFlowRejOutPkts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of REJ or SREJ frames sent by
-                          this station."
-                  ::= { lapbFlowEntry 6 }
-
-          lapbFlowRejInPkts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of REJ or SREJ frames received
-                          by this station."
-                  ::= { lapbFlowEntry 7 }
-
-          lapbFlowT1Timeouts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times a re-transmission was
-                          effected by the T1 Timer expiring."
-                  ::= { lapbFlowEntry 8 }
-
-          lapbFlowFrmrSent OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..7))
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Information Field of the FRMR most
-                          recently sent.  If no FRMR has been sent
-                          (the normal case) or the information isn't
-                          available, this will be an OCTET STRING of
-                          zero length."
-                  REFERENCE "ISO 7776 Section 4.3.9, tables 7 and 8"
-                  ::= { lapbFlowEntry 9 }
-
-          lapbFlowFrmrReceived OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..7))
-
-
-
-
-
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Information Field of the FRMR most
-                          recently received.  If no FRMR has been
-                          received (the normal case) or the
-                          information isn't available, this will be an
-                          OCTET STRING of zero length."
-                  REFERENCE "ISO 7776 Section 4.3.9, tables 7 and 8"
-                  ::= { lapbFlowEntry 10 }
-
-          lapbFlowXidReceived OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..8206))
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Information Field of the XID frame most
-                          recently received.  If no XID frame has been
-                          received, this will be an OCTET STRING of
-                          zero length."
-                  REFERENCE "ISO 8885"
-                  ::= { lapbFlowEntry 11 }
-
-
-          -- ###########################################################
-          --                      LAPB    XID Table
-          -- ###########################################################
-
-          -- Support for the lapbXidTable is mandatory for all agents
-          -- of systems that have a LAPB implementation using XID
-          -- negotiation.  Agents of systems without XID negotiation
-          -- support should not implement this table.
-
-          lapbXidTable    OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF LapbXidEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This table defines values to use for XID
-                          negotiation that are not found in the
-                          lapbAdmnTable.  This table is optional for
-                          implementations that don't support XID and
-                          mandatory for implementations that do
-                          initiate XID negotiation."
-                  ::= { lapb 4 }
-
-          lapbXidEntry    OBJECT-TYPE
-                  SYNTAX  LapbXidEntry
-
-
-
-
-
-             ACCESS       not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "XId negotiation parameter values for a
-                          specific LAPB."
-                  INDEX { lapbXidIndex }
-                  ::= { lapbXidTable 1 }
-
-
-          LapbXidEntry ::= SEQUENCE {
-                  lapbXidIndex
-                          IfIndexType,
-                  lapbXidAdRIdentifier
-                          OCTET STRING,
-                  lapbXidAdRAddress
-                          OCTET STRING,
-                  lapbXidParameterUniqueIdentifier
-                          OCTET STRING,
-                  lapbXidGroupAddress
-                          OCTET STRING,
-                  lapbXidPortNumber
-                          OCTET STRING,
-                  lapbXidUserDataSubfield
-                          OCTET STRING
-                  }
-
-          lapbXidIndex    OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The ifIndex value for the LAPB interface."
-                  ::= { lapbXidEntry 1 }
-
-          lapbXidAdRIdentifier OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..255))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of the Address Resolution
-                          Identifier.  A zero length string indicates
-                          no Identifier value has been assigned."
-                  REFERENCE "ISO 8885 Table 2, Name: Identifier"
-                  DEFVAL { ''h }
-                  ::= { lapbXidEntry 2 }
-
-          lapbXidAdRAddress OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..255))
-
-
-
-
-
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of the Address Resolution
-                          Address.  A zero length string indicates no
-                          Address value has been assigned."
-                  REFERENCE "ISO 8885 Table 2, Name: Address"
-                  DEFVAL { ''h }
-                  ::= { lapbXidEntry 3 }
-
-          lapbXidParameterUniqueIdentifier OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..255))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of the parameter unique
-                          Identifier.  A zero length string indicates
-                          no Unique identifier value has been
-                          assigned."
-                  REFERENCE "ISO 8885 Table 3, Name: Identifier"
-                  DEFVAL { ''h }
-                  ::= { lapbXidEntry 4 }
-
-          lapbXidGroupAddress OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..255))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of the parameter Group address.
-                          A zero length string indicates no Group
-                          address value has been assigned."
-                  REFERENCE "ISO 8885 Table 3, Name: Group address"
-                  DEFVAL { ''h }
-                  ::= { lapbXidEntry 5 }
-
-          lapbXidPortNumber OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..255))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The port number assigned for this link.  A
-                          zero length string indicates no local port
-                          number identifier has been assigned."
-                  REFERENCE "ISO 8885 Table 3, Name: Port number"
-                  DEFVAL { ''h }
-                  ::= { lapbXidEntry 6 }
-
-          lapbXidUserDataSubfield OBJECT-TYPE
-
-
-
-
-
-                  SYNTAX  OCTET STRING (SIZE (0..8206))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "A user data subfield, if any, to be
-                          transmitted in an XID frame.  A zero length
-                          frame indicates no user data subfield has
-                          been assigned.  The octet string should
-                          include both the User data identifier and
-                          User data field as shown in Figures 1 and
-                          4."
-                  REFERENCE "ISO 8885 section 4.3"
-                  DEFVAL { ''h }
-                  ::= { lapbXidEntry 7 }
-
-
-          -- ###########################################################
-          --                      LAPB protocol versions
-          -- ###########################################################
-
-          lapbProtocolVersion OBJECT IDENTIFIER
-                  ::= { lapb 5 }
-
-          lapbProtocolIso7776v1986 OBJECT IDENTIFIER
-                  ::= { lapbProtocolVersion 1 }
-
-          lapbProtocolCcittV1980 OBJECT IDENTIFIER
-                  ::= { lapbProtocolVersion 2 }
-
-          lapbProtocolCcittV1984 OBJECT IDENTIFIER
-                  ::= { lapbProtocolVersion 3 }
-
-
-
-          -- The following describes some of the MIB-II interface
-          -- objects and their relationship with the objects in this
-          -- MIB extension.
-
-          -- ifDescr:  describes the interface.   It should include
-          -- identification information for the physical line and a
-          -- description of the network.  For connections to PDNs,
-          -- it should name the PDN.
-
-          -- ifMtu: the maximum number of octets an upper layer can
-          -- pass to this interface as a single frame.
-
-          -- ifSpeed:
-
-
-
-
-
-
-          -- ifAdminStatus:
-
-          -- ifOperStatus:
-
-          -- ifLastChange: the last time the state of the interface
-          -- changed.  A reset is considered an instantaneous change to
-          -- the ndm state and back to abm or abme.  This will be the
-          -- last time that lapbFlowChangeReason and lapbFlowChanges
-          -- changed.
-
-          -- ifInOctets: contains the number of octets
-          -- received from the peer LAPB including FCS.
-
-          -- ifInUcastPkts: contains the number of I-frames delivered
-          -- by this interface to a higher layer interface.
-
-          -- ifInDiscards: contains the number of received
-          -- frames discarded because of internal conditions
-          -- (such as lack of buffering).
-
-          -- ifInErrors: contains the number of Invalid frames received.
-          -- This does not have any relationship with the number REJ,
-          -- or RNR frames sent or received.
-
-          -- ifInUnknownProtos: contains the number of frames
-          -- that were correct but were dropped because they
-          -- were inappropriate for the current state.  This
-          -- includes an invalid Poll bit, an unknown address,
-          -- or other condition such as an RNR when connection
-          -- not established.  This also includes the number of
-          -- DISC or other frames that were ignored because the
-          -- link was not established and this interface was not
-          -- configured to perform link setup on that type frame.
-
-          -- ifOutOctets: number of octets sent to peer including
-          -- FCS octets.
-
-          -- ifOutUcastPkts: number of I-frames received from
-          -- a higher layer for transmission to peer.
-
-          -- ifOutDiscards: number of frames to be sent that were
-          -- dropped due to internal conditions such as buffering etc.
-
-          -- ifOutErrors: number of transmissions that failed
-          -- due to errors or were considered invalid by the receiver.
-          -- This does not have any relationship with the number REJ,
-          -- or RNR frames sent or received.
-
-
-
-
-
-
-          -- ifOutQLen: number of frames waiting to be transmitted.
-
-
-          -- This MIB does not provide any support for:
-          --      Multilink procedure (MLP) in ISO 7776 section 6
-          --      LLC Pbit timer
-          --      LLC REJ timer
-          --      LLC Busy State Timer 7.8.1.4
-
-          -- ###########################################################
-
-          END
--- a/usr/src/cmd/agents/snmp/mib/rfc1382.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2890 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-
-          RFC1382-MIB DEFINITIONS ::= BEGIN
-
-          IMPORTS
-                  Counter, Gauge, TimeTicks
-                          FROM RFC1155-SMI
-                  OBJECT-TYPE
-                          FROM RFC-1212
-                  DisplayString, transmission
-                          FROM RFC1213-MIB
-                  TRAP-TYPE
-                          FROM RFC-1215
-                  EntryStatus
-                          FROM RFC1271-MIB
-                  PositiveInteger,
-                  IfIndexType
-                          FROM RFC1381-MIB;
-
-          x25     OBJECT IDENTIFIER ::= { transmission 5 }
-
-
-          -- Support of the X25 subtree and all subtrees under it
-          -- is mandatory for all agents of system that implement X.25.
-
-          X121Address ::= OCTET STRING (SIZE(0..17))
-           -- 0 to 17 bytes in length containing the ASCII
-           -- characters [0-9], each octet contains one digit
-           -- of the address.
-
-
-          -- ###########################################################
-          --            X.25 Administration Table
-          -- ###########################################################
-
-          x25AdmnTable OBJECT-TYPE
-
-
-
-
-
-                  SYNTAX  SEQUENCE OF X25AdmnEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This table contains the administratively
-                          set configuration parameters for an X.25
-                          Packet Level Entity (PLE).
-
-                         Most of the objects in this table have
-                          corresponding objects in the x25OperTable.
-                          This table contains the values as last set
-                          by the administrator.  The x25OperTable
-                          contains the values actually in use by an
-                          X.25 PLE.
-
-                          Changing an administrative value may or may
-                          not change a current operating value.  The
-                          operating value may not change until the
-                          interface is restarted.  Some
-                          implementations may change the values
-                          immediately upon changing the administrative
-                          table.  All implementations are required to
-                          load the values from the administrative
-                          table when initializing a PLE."
-                  ::= { x25 1 }
-
-          x25AdmnEntry OBJECT-TYPE
-                  SYNTAX  X25AdmnEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Entries of x25AdmnTable."
-                  INDEX { x25AdmnIndex }
-                  ::= { x25AdmnTable 1 }
-
-          X25AdmnEntry ::= SEQUENCE {
-                  x25AdmnIndex
-                          IfIndexType,
-                  x25AdmnInterfaceMode
-                          INTEGER,
-                  x25AdmnMaxActiveCircuits
-                          INTEGER,
-                  x25AdmnPacketSequencing
-                          INTEGER,
-                  x25AdmnRestartTimer
-                          PositiveInteger,
-               x25AdmnCallTimer
-                          PositiveInteger,
-
-
-
-
-
-                  x25AdmnResetTimer
-                          PositiveInteger,
-                  x25AdmnClearTimer
-                          PositiveInteger,
-                  x25AdmnWindowTimer
-                          PositiveInteger,
-                  x25AdmnDataRxmtTimer
-                          PositiveInteger,
-                  x25AdmnInterruptTimer
-                          PositiveInteger,
-                  x25AdmnRejectTimer
-                          PositiveInteger,
-                  x25AdmnRegistrationRequestTimer
-                          PositiveInteger,
-                  x25AdmnMinimumRecallTimer
-                          PositiveInteger,
-                  x25AdmnRestartCount
-                          INTEGER,
-                  x25AdmnResetCount
-                          INTEGER,
-                  x25AdmnClearCount
-                          INTEGER,
-                  x25AdmnDataRxmtCount
-                          INTEGER,
-                  x25AdmnRejectCount
-                          INTEGER,
-                  x25AdmnRegistrationRequestCount
-                          INTEGER,
-                  x25AdmnNumberPVCs
-                          INTEGER,
-                  x25AdmnDefCallParamId
-                          OBJECT IDENTIFIER,
-                  x25AdmnLocalAddress
-                          X121Address,
-                  x25AdmnProtocolVersionSupported
-                          OBJECT IDENTIFIER
-                  }
-
-          x25AdmnIndex OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                  "The ifIndex value for the X.25 Interface."
-                  ::= { x25AdmnEntry 1 }
-
-          x25AdmnInterfaceMode OBJECT-TYPE
-                  SYNTAX  INTEGER {
-
-
-
-
-
-                                  dte (1),
-                                  dce (2),
-                                  dxe (3)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Identifies DCE/DTE mode in which the
-                          interface operates.  A value of dxe
-                          indicates the mode will be determined by XID
-                          negotiation."
-                  REFERENCE "10733 5.9 interfaceMode"
-                  ::= { x25AdmnEntry 2 }
-
-          x25AdmnMaxActiveCircuits        OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4096)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The maximum number of circuits this PLE can
-                          support; including PVCs."
-                  REFERENCE "10733 5.9 maxActiveCircuits;
-                          See ISO 8208, Section 3.7"
-                  ::= { x25AdmnEntry 3 }
-
-          x25AdmnPacketSequencing OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  modulo8 (1),
-                                  modulo128 (2)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The modulus of the packet sequence number
-                          space."
-                  REFERENCE "10733 extendedPacketSequencing;
-                          See ISO 8208 Section 7.1.1"
-                  ::= { x25AdmnEntry 4 }
-
-          x25AdmnRestartTimer OBJECT-TYPE
-               SYNTAX     PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T20 restart timer in milliseconds."
-                  REFERENCE "10733 5.9 restartTime
-                          See ISO 8208 Section 4.1, table 26"
-                  ::= { x25AdmnEntry 5 }
-
-
-
-
-
-          x25AdmnCallTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T21 Call timer in milliseconds."
-                  REFERENCE "10733 callTime;
-                          See ISO 8208 Section 5.2.1, table 26"
-                  ::= { x25AdmnEntry 6 }
-
-          x25AdmnResetTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T22 Reset timer in milliseconds."
-                  REFERENCE "10733 resetTime;
-                          See ISO 8208 Section 8.1, table 26"
-                  ::= { x25AdmnEntry 7 }
-
-          x25AdmnClearTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T23 Clear timer in milliseconds."
-                  REFERENCE "10733 clearTime;
-                          See ISO 8208 Section 5.5.1, table 26"
-                  ::= { x25AdmnEntry 8 }
-
-          x25AdmnWindowTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T24 window status transmission timer in
-                          milliseconds.  A value of 2147483647
-                          indicates no window timer in use."
-                  REFERENCE "10733 5.10.1 windowTime (opt);
-                          See ISO 8208 Section 11.2.2, table 26"
-                  ::= { x25AdmnEntry 9 }
-
-          x25AdmnDataRxmtTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T25 data retransmission timer in
-
-
-
-
-
-                          milliseconds.  A value of 2147483647
-                          indicates no data retransmission timer in
-                          use."
-                  REFERENCE "10733 5.10.1 dataRetransmissionTime (opt);
-                          See ISO 8208 Section 11.2.1, table 26"
-                  ::= { x25AdmnEntry 10 }
-
-          x25AdmnInterruptTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T26 interrupt timer in milliseconds.  A
-                          value of 2147483647 indicates no interrupt
-                          timer in use."
-                  REFERENCE "10733 interruptTime;
-                          See ISO 8208 Section 6.8.1, table 26"
-                  ::= { x25AdmnEntry 11 }
-
-          x25AdmnRejectTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T27 Reject retransmission timer in
-                          milliseconds.  A value of 2147483647
-                          indicates no reject timer in use."
-                  REFERENCE "10733 5.10.1 dataRejectTime (opt);
-                          See ISO 8208 Section 13.4.1, table 26"
-                  ::= { x25AdmnEntry 12 }
-
-          x25AdmnRegistrationRequestTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T28 registration timer in milliseconds.
-                          A value of 2147483647 indicates no
-                          registration timer in use."
-                  REFERENCE "10733 5.8.1 registrationRequestTime (opt)
-                          See ISO 8208    Section 13.1.1.1, table 26"
-                  ::= { x25AdmnEntry 13 }
-
-          x25AdmnMinimumRecallTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-
-
-
-
-
-                          "Minimum time interval between unsuccessful
-                          call attempts in milliseconds."
-                  REFERENCE "10733 5.9 minimum RecallTimer"
-                  ::= { x25AdmnEntry 14 }
-
-          x25AdmnRestartCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The R20 restart retransmission count."
-                  REFERENCE "10733 5.9 restartCount;
-                          See ISO 8208    Section 4.1, table 27"
-                  ::= { x25AdmnEntry 15 }
-
-          x25AdmnResetCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The r22 Reset retransmission count."
-                  REFERENCE "10733 resetCount;
-                          See section ISO 8208 8.1, table 27"
-                  ::= { x25AdmnEntry 16 }
-
-          x25AdmnClearCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                  "The r23 Clear retransmission count."
-                  REFERENCE "10733 clearCount;
-                          See ISO 8208 Section 5.5.1, table 27"
-                  ::= { x25AdmnEntry 17 }
-
-          x25AdmnDataRxmtCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The R25 Data retransmission count.  This
-                          value is irrelevant if the
-                          x25AdmnDataRxmtTimer indicates no timer in
-                          use."
-                  REFERENCE "10733 5.10.1 dataRetransmissionCount (opt)
-                          See ISO 8208 Section 11.2.1, table 27"
-                  ::= { x25AdmnEntry 18 }
-
-
-
-
-
-
-          x25AdmnRejectCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The R27 reject retransmission count.  This
-                          value is irrelevant if the
-                          x25AdmnRejectTimer indicates no timer in
-                          use."
-                  REFERENCE "10733 5.10.1 dataRejectCount (opt)"
-                  ::= { x25AdmnEntry 19 }
-
-          x25AdmnRegistrationRequestCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The R28 Registration retransmission Count.
-                          This value is irrelevant if the
-                          x25AdmnRegistrationRequestTimer indicates no
-                          timer in use."
-                  REFERENCE "10733 5.8.1 registrationRequestCount (opt);
-                          See ISO 8208    Section 13.1.1.1, table 27"
-                  ::= { x25AdmnEntry 20 }
-
-          x25AdmnNumberPVCs OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4096)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of PVC configured for this PLE.
-                          The PVCs use channel numbers from 1 to this
-                          number."
-                  ::= { x25AdmnEntry 21 }
-
-          x25AdmnDefCallParamId OBJECT-TYPE
-                  SYNTAX  OBJECT IDENTIFIER
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This identifies the instance of the
-                          x25CallParmIndex for the entry in the
-                          x25CallParmTable which contains the default
-                          call parameters for this PLE."
-                  ::= { x25AdmnEntry 22 }
-
-          x25AdmnLocalAddress OBJECT-TYPE
-                  SYNTAX  X121Address
-
-
-
-
-
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The local address for this PLE subnetwork.
-                          A zero length address maybe returned by PLEs
-                          that only support PVCs."
-                  REFERENCE "10733 5.9 localDTEAddress"
-                  ::= { x25AdmnEntry 23 }
-
-          x25AdmnProtocolVersionSupported OBJECT-TYPE
-                  SYNTAX  OBJECT IDENTIFIER
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Identifies the version of the X.25 protocol
-                          this interface should support.  Object
-                          identifiers for common versions are defined
-                          below in the x25ProtocolVersion subtree."
-                  REFERENCE "10733 5.9 protocolVersionSupported"
-                  ::= { x25AdmnEntry 24 }
-
-
-          -- ###########################################################
-          --            X.25 Operational Table
-          -- ###########################################################
-
-          x25OperTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF X25OperEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The operation parameters in use by the X.25
-                          PLE."
-                  ::= { x25 2 }
-
-          x25OperEntry OBJECT-TYPE
-                  SYNTAX  X25OperEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Entries of x25OperTable."
-                  INDEX { x25OperIndex }
-                  ::= { x25OperTable 1 }
-
-          X25OperEntry ::= SEQUENCE {
-                  x25OperIndex
-                          IfIndexType,
-                  x25OperInterfaceMode
-
-
-
-
-
-                          INTEGER,
-                  x25OperMaxActiveCircuits
-                          INTEGER,
-                  x25OperPacketSequencing
-                          INTEGER,
-                  x25OperRestartTimer
-                          PositiveInteger,
-                  x25OperCallTimer
-                          PositiveInteger,
-                  x25OperResetTimer
-                          PositiveInteger,
-                  x25OperClearTimer
-                          PositiveInteger,
-                  x25OperWindowTimer
-                          PositiveInteger,
-                  x25OperDataRxmtTimer
-                          PositiveInteger,
-                  x25OperInterruptTimer
-                          PositiveInteger,
-                  x25OperRejectTimer
-                          PositiveInteger,
-               x25OperRegistrationRequestTimer
-                          PositiveInteger,
-                  x25OperMinimumRecallTimer
-                          PositiveInteger,
-                  x25OperRestartCount
-                          INTEGER,
-                  x25OperResetCount
-                          INTEGER,
-                  x25OperClearCount
-                          INTEGER,
-                  x25OperDataRxmtCount
-                          INTEGER,
-                  x25OperRejectCount
-                          INTEGER,
-                  x25OperRegistrationRequestCount
-                          INTEGER,
-                  x25OperNumberPVCs
-                          INTEGER,
-                  x25OperDefCallParamId
-                          OBJECT IDENTIFIER,
-                  x25OperLocalAddress
-                          X121Address,
-                  x25OperDataLinkId
-                          OBJECT IDENTIFIER,
-                  x25OperProtocolVersionSupported
-                          OBJECT IDENTIFIER
-                  }
-
-
-
-
-
-          x25OperIndex OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The ifIndex value for the X.25 interface."
-                  ::= { x25OperEntry 1 }
-
-          x25OperInterfaceMode OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  dte (1),
-                                  dce (2),
-                                  dxe (3)
-                          }
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                  "Identifies DCE/DTE mode in which the
-                          interface operates.  A value of dxe
-                          indicates the role will be determined by XID
-                          negotiation at the Link Layer and that
-                          negotiation has not yet taken place."
-                  REFERENCE "10733 5.9 interfaceMode"
-                  ::= { x25OperEntry 2 }
-
-          x25OperMaxActiveCircuits        OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4096)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Maximum number of circuits this PLE can
-                          support."
-                  REFERENCE "10733 5.9 maxActiveCircuits
-                          See ISO 8208, Section 3.7"
-                  ::= { x25OperEntry 3 }
-
-          x25OperPacketSequencing OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  modulo8 (1),
-                                  modulo128 (2)
-                          }
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The modulus of the packet sequence number
-                          space."
-                  REFERENCE "10733 extendedPacketSequencing;
-                          See ISO 8208    Section 7.1.1"
-
-
-
-
-
-                  ::= { x25OperEntry 4 }
-
-          x25OperRestartTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T20 restart timer in milliseconds."
-                  REFERENCE "10733 5.9 restartTime;
-                          See ISO 8208    Section 4.1, table 26"
-                  ::= { x25OperEntry 5 }
-
-          x25OperCallTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T21 Call timer in milliseconds."
-                  REFERENCE "10733 callTime;
-                          See ISO 8208 Section 5.2.1, table 26"
-                  ::= { x25OperEntry 6 }
-
-          x25OperResetTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T22 Reset timer in milliseconds."
-                  REFERENCE "10733 resetTime;
-                          See ISO 8208    Section 8.1, table 26"
-                  ::= { x25OperEntry 7 }
-
-          x25OperClearTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T23 Clear timer in milliseconds."
-                  REFERENCE "10733 clearTime;
-                          See ISO 8208 Section 5.5.1, table 26"
-                  ::= { x25OperEntry 8 }
-
-          x25OperWindowTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T24 window status transmission timer
-
-
-
-
-
-                          milliseconds.  A value of 2147483647
-                          indicates no window timer in use."
-                  REFERENCE "10733 5.10.1 windowTime (opt);
-                          See ISO 8208 Section 11.2.2, table 26"
-                  ::= { x25OperEntry 9 }
-
-          x25OperDataRxmtTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T25 Data Retransmission timer in
-                          milliseconds.  A value of 2147483647
-                          indicates no data retransmission timer in
-                          use."
-                  REFERENCE "10733 5.10.1 dataRetransmissionTime (opt);
-                          See ISO 8208 Section 11.2.1, table 26"
-                  ::= { x25OperEntry 10 }
-
-          x25OperInterruptTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T26 Interrupt timer in milliseconds.  A
-                          value of 2147483647 indicates interrupts are
-                          not being used."
-                  REFERENCE "10733 interruptTime;
-                          See ISO 8208 Section 6.8.1, table 26"
-                  ::= { x25OperEntry 11 }
-
-          x25OperRejectTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The T27 Reject retransmission timer in
-                          milliseconds.  A value of 2147483647
-                          indicates no reject timer in use."
-                  REFERENCE "10733 5.10.1 dataRejectTime (opt);
-                          See ISO 8208 Section 13.4.1, table 26"
-                  ::= { x25OperEntry 12 }
-
-          x25OperRegistrationRequestTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-
-
-
-
-
-                          "The T28 registration timer in milliseconds.
-                          A value of 2147483647 indicates no
-                          registration timer in use."
-                  REFERENCE "10733 5.8.1 registrationRequestTime (opt);
-                          See ISO 8208    Section 13.1.1.1, table 26"
-                  ::= { x25OperEntry 13 }
-
-          x25OperMinimumRecallTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Minimum time interval between unsuccessful
-                          call attempts in milliseconds."
-                  REFERENCE "10733 5.9 minimum RecallTimer"
-                  ::= { x25OperEntry 14 }
-
-          x25OperRestartCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The R20 restart retransmission count."
-                  REFERENCE "10733 5.9 restartCount
-                          See ISO 8208    Section 4.1, table 27"
-                  ::= { x25OperEntry 15 }
-
-          x25OperResetCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The r22 Reset retransmission count."
-                  REFERENCE "10733 resetCount;
-                          See section ISO 8208 8.1, table 27"
-                  ::= { x25OperEntry 16 }
-
-          x25OperClearCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The r23 Clear retransmission count."
-                  REFERENCE "10733 clearCount;
-                          See ISO 8208 Section 5.5.1, table 27"
-                  ::= { x25OperEntry 17 }
-
-          x25OperDataRxmtCount OBJECT-TYPE
-
-
-
-
-
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The R25 Data retransmission count.  This
-                          value is undefined if the
-                          x25OperDataRxmtTimer indicates no timer in
-                          use."
-                  REFERENCE "10733 5.10.1 dataRetransmissionCount (opt);
-                          See ISO 8208 Section 11.2.1, table 27"
-                  ::= { x25OperEntry 18 }
-
-          x25OperRejectCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The R27 reject retransmission count.  This
-                          value is undefined if the x25OperRejectTimer
-                          indicates no timer in use."
-                  REFERENCE "10733 5.10.1 dataRejectCount (opt)"
-                  ::= { x25OperEntry 19 }
-
-          x25OperRegistrationRequestCount OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65535)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The R28 Registration retransmission Count.
-                          This value is undefined if the
-                          x25OperREgistrationRequestTimer indicates no
-                          timer in use."
-                  REFERENCE "10733 5.8.1 registrationRequestCount (opt);
-                          See ISO 8208    Section 13.1.1.1, table 27"
-                  ::= { x25OperEntry 20 }
-
-          x25OperNumberPVCs OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4096)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of PVC configured for this PLE.
-                          The PVCs use channel numbers from 1 to this
-                          number."
-                  ::= { x25OperEntry 21 }
-
-          x25OperDefCallParamId OBJECT-TYPE
-                  SYNTAX  OBJECT IDENTIFIER
-
-
-
-
-
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This identifies the instance of the
-                          x25CallParmIndex for the entry in the
-                          x25CallParmTable that contains the default
-                          call parameters for this PLE."
-                  ::= { x25OperEntry 22 }
-
-          x25OperLocalAddress OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The local address for this PLE subnetwork.
-                          A zero length address maybe returned by PLEs
-                          that only support PVCs."
-                  REFERENCE "10733 5.9 localDTEAddress"
-                  ::= { x25OperEntry 23 }
-
-          x25OperDataLinkId OBJECT-TYPE
-                  SYNTAX  OBJECT IDENTIFIER
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This identifies the instance of the index
-                          object in the first table of the most device
-                          specific MIB for the interface used by this
-                          PLE."
-                  ::= { x25OperEntry 24 }
-
-          x25OperProtocolVersionSupported OBJECT-TYPE
-                  SYNTAX  OBJECT IDENTIFIER
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Identifies the version of the X.25 protocol
-                          this interface supports.  Object identifiers
-                          for common versions are defined below in the
-                          x25ProtocolVersion subtree."
-                  REFERENCE "10733 5.9 protocolVersionSupported"
-                  ::= { x25OperEntry 25 }
-
-
-          --      MIB-II also provides:
-
-          -- ifDescr:
-          -- On an X.25 interface this must include sufficient
-
-
-
-
-
-          -- information to enable the system's administrator
-          -- to determine the appropriate configuration
-          -- information on a system having multiple X.25
-          -- subnetworks.
-
-          -- ifType: ddn-x25 or rfc877-x25
-          --      an interface of type ddn-x25 will use an algorithm to
-          --      translate between X.121 address and IP addresses.
-          --      An interface of type rfc877-x25 will use a
-          --      configuration table to translate between X.121
-          --      addresses and IP addresses.
-
-          -- ifMtu: the maximum PDU a higher layer can pass to X.25 or
-          -- receive from X.25
-
-          -- ifSpeed:
-          -- This will be the value of the local clock for this line.
-          -- A value of zero indicates external clocking.
-
-          -- ifAdminStatus:
-
-          -- ifOperStatus
-
-          -- ifLastChange
-
-
-          -- ###########################################################
-          --            X.25 Statistics Table
-          -- ###########################################################
-
-          x25StatTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF X25StatEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Statistics information about this X.25
-                          PLE."
-                  ::= { x25 3 }
-
-          x25StatEntry OBJECT-TYPE
-                  SYNTAX  X25StatEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                           "Entries of the x25StatTable."
-                           INDEX { x25StatIndex }
-                  ::= { x25StatTable 1 }
-
-
-
-
-
-
-          X25StatEntry ::= SEQUENCE {
-                  x25StatIndex
-                          IfIndexType,
-                  x25StatInCalls
-                          Counter,
-                  x25StatInCallRefusals
-                          Counter,
-                  x25StatInProviderInitiatedClears
-                          Counter,
-                  x25StatInRemotelyInitiatedResets
-                          Counter,
-                  x25StatInProviderInitiatedResets
-                          Counter,
-                  x25StatInRestarts
-                          Counter,
-                  x25StatInDataPackets
-                          Counter,
-                  x25StatInAccusedOfProtocolErrors
-                          Counter,
-                  x25StatInInterrupts
-                          Counter,
-                  x25StatOutCallAttempts
-                          Counter,
-                  x25StatOutCallFailures
-                          Counter,
-                  x25StatOutInterrupts
-                          Counter,
-                  x25StatOutDataPackets
-                          Counter,
-                  x25StatOutgoingCircuits
-                          Gauge,
-                  x25StatIncomingCircuits
-                          Gauge,
-                  x25StatTwowayCircuits
-                          Gauge,
-                  x25StatRestartTimeouts
-                          Counter,
-                  x25StatCallTimeouts
-                          Counter,
-                  x25StatResetTimeouts
-                          Counter,
-                  x25StatClearTimeouts
-                          Counter,
-                  x25StatDataRxmtTimeouts
-                          Counter,
-                  x25StatInterruptTimeouts
-                          Counter,
-                  x25StatRetryCountExceededs
-
-
-
-
-
-                          Counter,
-                  x25StatClearCountExceededs
-                          Counter
-                  }
-
-          x25StatIndex OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The ifIndex value for the X.25 interface."
-                  ::= { x25StatEntry 1 }
-
-          x25StatInCalls OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of incoming calls received."
-                  ::= { x25StatEntry 2 }
-
-          x25StatInCallRefusals OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of incoming calls refused.  This
-                          includes calls refused by the PLE and by
-                          higher layers.  This also includes calls
-                          cleared because of restricted fast select."
-                  ::= { x25StatEntry 3 }
-
-          x25StatInProviderInitiatedClears        OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of clear requests with a cause
-                          code other than DTE initiated."
-                          REFERENCE "10733 providerInitiatedDisconnect"
-                  ::= { x25StatEntry 4 }
-
-          x25StatInRemotelyInitiatedResets        OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of reset requests received with
-
-
-
-
-
-                          cause code DTE initiated."
-                  REFERENCE "10733 remotelyInitiatedResets"
-                  ::= { x25StatEntry 5 }
-
-          x25StatInProviderInitiatedResets        OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of reset requests received with
-                          cause code other than DTE initiated."
-                  REFERENCE "10733 ProviderInitiatedResets"
-                  ::= { x25StatEntry 6 }
-
-          x25StatInRestarts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of remotely initiated (including
-                          provider initiated) restarts experienced by
-                          the PLE excluding the restart associated
-                          with bringing up the PLE interface.  This
-                          only counts restarts received when the PLE
-                          already has an established connection with
-                          the remove PLE."
-                  REFERENCE "10733 5.9 remotelyInitiatedRestarts"
-                  ::= { x25StatEntry 7 }
-
-          x25StatInDataPackets    OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of data packets received."
-                          REFERENCE "10733 5.9 dataPacketsReceived."
-                  ::= { x25StatEntry 8 }
-
-          x25StatInAccusedOfProtocolErrors        OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of packets received containing a
-                          procedure error cause code.  These include
-                          clear, reset, restart, or diagnostic
-                          packets."
-                  REFERENCE "CD 10733 5.9 accusedOfProtocolError"
-
-
-
-
-
-                  ::= { x25StatEntry 9 }
-
-          x25StatInInterrupts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of interrupt packets received by
-                          the PLE or over the PVC/VC."
-                  REFERENCE "10733 interruptPacketsReceived"
-                  ::= { x25StatEntry 10 }
-
-          x25StatOutCallAttempts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of calls attempted."
-                  REFERENCE "10733 5.9 callAttempts"
-                  ::= { x25StatEntry 11 }
-
-          x25StatOutCallFailures OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of call attempts which failed.
-                          This includes calls that were cleared
-                          because of restrictive fast select."
-                  ::= { x25StatEntry 12 }
-
-          x25StatOutInterrupts    OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of interrupt packets send by the
-                          PLE or over the PVC/VC."
-                  REFERENCE "10733 InterruptPacketsSent"
-                  ::= { x25StatEntry 13 }
-
-          x25StatOutDataPackets   OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of data packets sent by this
-                          PLE."
-
-
-
-
-
-                  REFERENCE "10733 dataPacketSent"
-                  ::= { x25StatEntry 14 }
-
-          x25StatOutgoingCircuits OBJECT-TYPE
-                  SYNTAX  Gauge
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of active outgoing circuits.
-                          This includes call requests sent but not yet
-                          confirmed.  This does not count PVCs."
-                  ::= { x25StatEntry 15 }
-
-          x25StatIncomingCircuits OBJECT-TYPE
-                  SYNTAX  Gauge
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of active Incoming Circuits.
-                          This includes call indications received but
-                          not yet acknowledged.  This does not count
-                          PVCs."
-                  ::= { x25StatEntry 16 }
-
-          x25StatTwowayCircuits   OBJECT-TYPE
-                  SYNTAX  Gauge
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                  "The number of active two-way Circuits.
-                          This includes call requests sent but not yet
-                          confirmed.  This does not count PVCs."
-                  ::= { x25StatEntry 17 }
-
-          x25StatRestartTimeouts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the T20 restart timer
-                          expired."
-                  REFERENCE "10733 5.9 restartTimeouts"
-                  ::= { x25StatEntry 18 }
-
-          x25StatCallTimeouts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-
-
-
-
-
-                  DESCRIPTION
-                          "The number of times the T21 call timer
-                          expired."
-                  REFERENCE "10733 5.9 callTimeouts"
-                  ::= { x25StatEntry 19 }
-
-          x25StatResetTimeouts    OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the T22 reset timer
-                          expired."
-                  REFERENCE "10733 5.9 resetTimeouts"
-                  ::= { x25StatEntry 20 }
-
-          x25StatClearTimeouts    OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the T23 clear timer
-                          expired."
-                  REFERENCE "10733 5.9 clearTimeouts"
-                  ::= { x25StatEntry 21 }
-
-          x25StatDataRxmtTimeouts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the T25 data timer
-                          expired."
-                  REFERENCE "10733 5.9 dataRetransmissionsTimerExpiries"
-                  ::= { x25StatEntry 22 }
-
-          x25StatInterruptTimeouts        OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the T26 interrupt timer
-                          expired."
-                  REFERENCE "10733 5.9 interruptTimerExpires"
-                  ::= { x25StatEntry 23 }
-
-          x25StatRetryCountExceededs OBJECT-TYPE
-                  SYNTAX  Counter
-
-
-
-
-
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times a retry counter was
-                          exhausted."
-                  REFERENCE "10733 5.9 retryCountsExceeded"
-                  ::= { x25StatEntry 24 }
-
-          x25StatClearCountExceededs OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the R23 clear count was
-                          exceeded."
-                  REFERENCE "10733 5.9 clearCountsExceeded"
-                  ::= { x25StatEntry 25 }
-
-
-          --      MIB-II also contains:
-
-          -- ifInOctets: Number of data octets delivered to upper
-          -- layer entities.
-
-          -- ifInUcastPkts: Number of packets with a clear M-bit
-          -- delivered to higher layer entities.
-
-          -- ifDiscards: Number of packets dropped for lack of buffering
-
-          -- ifInErrors: Number of packets received containing errors
-            -- REFERENCE ProtocolErrorsDetectedLocally
-
-          -- ifInUnknownProtos: Number of packets with unknown circuit
-          -- identifier.
-
-          -- ifOutOctets: Number of data octets delivered by
-          --      X.25 to upper layers.
-
-          -- ifOutUcastPkts: Number of packets with a clear M-bit
-          -- received from higher layer entities.
-
-
-          -- ###########################################################
-          --                    X.25 Channel Table
-          -- ###########################################################
-
-          x25ChannelTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF X25ChannelEntry
-
-
-
-
-
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "These objects contain information about the
-                          channel number configuration in an X.25 PLE.
-                          These values are the configured values.
-                          changes in these values after the interfaces
-                          has started may not be reflected in the
-                          operating PLE."
-                  REFERENCE "See ISO 8208, Section 3.7"
-                  ::= { x25 4 }
-
-          x25ChannelEntry OBJECT-TYPE
-                  SYNTAX  X25ChannelEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Entries of x25ChannelTable."
-                  REFERENCE "This provides the information available
-                          in 10733 logicalChannelAssignments."
-                  INDEX { x25ChannelIndex }
-                  ::= { x25ChannelTable 1    }
-
-          X25ChannelEntry ::= SEQUENCE {
-                  x25ChannelIndex
-                          IfIndexType,
-                  x25ChannelLIC
-                          INTEGER,
-                  x25ChannelHIC
-                          INTEGER,
-                  x25ChannelLTC
-                          INTEGER,
-                  x25ChannelHTC
-                          INTEGER,
-                  x25ChannelLOC
-                          INTEGER,
-                  x25ChannelHOC
-                          INTEGER
-                  }
-
-          x25ChannelIndex OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The ifIndex value for the X.25 Interface."
-                  ::= { x25ChannelEntry 1 }
-
-
-
-
-
-
-          x25ChannelLIC OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4095)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Lowest Incoming channel."
-                  ::= { x25ChannelEntry 2 }
-
-          x25ChannelHIC OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4095)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Highest Incoming channel.  A value of zero
-                          indicates no channels in this range."
-                  ::= { x25ChannelEntry 3 }
-
-          x25ChannelLTC OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4095)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Lowest Two-way channel."
-                  ::= { x25ChannelEntry 4 }
-
-          x25ChannelHTC OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4095)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Highest Two-way channel.  A value of zero
-                          indicates no channels in this range."
-                  ::= { x25ChannelEntry 5 }
-
-          x25ChannelLOC OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4095)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Lowest outgoing channel."
-                  ::= { x25ChannelEntry 6 }
-
-          x25ChannelHOC OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4095)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Highest outgoing channel.  A value of zero
-
-
-
-
-
-                          indicates no channels in this range."
-                  ::= { x25ChannelEntry 7 }
-
-
-
-
-          -- ###########################################################
-          --          X25 Per Circuits Information Table
-          -- ###########################################################
-
-          x25CircuitTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF X25CircuitEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "These objects contain general information
-                          about a specific circuit of an X.25 PLE."
-                  ::= { x25 5 }
-
-          x25CircuitEntry OBJECT-TYPE
-                  SYNTAX  X25CircuitEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Entries of x25CircuitTable."
-                  INDEX { x25CircuitIndex,
-                          x25CircuitChannel }
-                  ::= { x25CircuitTable 1 }
-
-          X25CircuitEntry ::= SEQUENCE {
-                  x25CircuitIndex
-                          IfIndexType,
-                  x25CircuitChannel
-                          INTEGER,
-                  x25CircuitStatus
-                          INTEGER,
-                  x25CircuitEstablishTime
-                          TimeTicks,
-                  x25CircuitDirection
-                          INTEGER,
-                  x25CircuitInOctets
-                          Counter,
-                  x25CircuitInPdus
-                          Counter,
-                  x25CircuitInRemotelyInitiatedResets
-                          Counter,
-                  x25CircuitInProviderInitiatedResets
-                          Counter,
-
-
-
-
-
-                  x25CircuitInInterrupts
-                          Counter,
-                  x25CircuitOutOctets
-                          Counter,
-                  x25CircuitOutPdus
-                          Counter,
-                  x25CircuitOutInterrupts
-                          Counter,
-                  x25CircuitDataRetransmissionTimeouts
-                          Counter,
-                  x25CircuitResetTimeouts
-                          Counter,
-                  x25CircuitInterruptTimeouts
-                          Counter,
-                  x25CircuitCallParamId
-                          OBJECT IDENTIFIER,
-                  x25CircuitCalledDteAddress
-                          X121Address,
-                  x25CircuitCallingDteAddress
-                          X121Address,
-                  x25CircuitOriginallyCalledAddress
-                          X121Address,
-                  x25CircuitDescr
-                          DisplayString
-                  }
-
-          x25CircuitIndex OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The ifIndex value for the X.25 Interface."
-                  ::= { x25CircuitEntry 1 }
-
-          x25CircuitChannel OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4095)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The channel number for this circuit."
-                  ::= { x25CircuitEntry 2 }
-
-          x25CircuitStatus OBJECT-TYPE
-                  SYNTAX  INTEGER {               -- state table states
-                                  invalid (1),
-                                  closed (2),             -- (p1)
-                                  calling (3),            -- (p2,p3,p5)
-                                  open (4),               -- (p4)
-
-
-
-
-
-                                  clearing (5),           -- (p6,p7)
-                                  pvc (6),
-                                  pvcResetting (7),
-                                  startClear (8),         -- Close cmd
-                                  startPvcResetting (9),  -- Reset cmd
-                                  other (10)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This object reports the current status of
-                          the circuit.
-
-                          An existing instance of this object can only
-                          be set to startClear, startPvcResetting, or
-                          invalid.  An instance with the value calling
-                          or open can only be set to startClear and
-                          that action will start clearing the circuit.
-                          An instance with the value PVC can only be
-                          set to startPvcResetting or invalid and that
-                          action resets the PVC or deletes the circuit
-                          respectively.  The values startClear or
-                          startPvcResetting will never be returned by
-                          an agent.  An attempt to set the status of
-                          an existing instance to a value other than
-                          one of these values will result in an error.
-
-                          A non-existing instance can be set to PVC to
-                          create a PVC if the implementation supports
-                          dynamic creation of PVCs.  Some
-                          implementations may only allow creation and
-                          deletion of PVCs if the interface is down.
-                          Since the instance identifier will supply
-                          the PLE index and the channel number,
-                          setting this object alone supplies
-                          sufficient information to create the
-                          instance.  All the DEFVAL clauses for the
-                          other objects of this table are appropriate
-                          for creating a PVC; PLEs creating entries
-                          for placed or accepted calls will use values
-                          appropriate for the call rather than the
-                          value of the DEFVAL clause.  Two managers
-                          trying to create the same PVC can determine
-                          from the return code which manager succeeded
-                          and which failed (the failing manager fails
-                          because it can not set a value of PVC for an
-                          existing object).
-
-
-
-
-
-
-                          An entry in the closed or invalid state may
-                          be deleted or reused at the agent's
-                          convence.  If the entry is kept in the
-                          closed state, the values of the parameters
-                          associated with the entry must be correct.
-                          Closed implies the values in the circuit
-                          table are correct.
-
-                          The value of invalid indicates the other
-                          values in the table are invalid.  Many
-                          agents may never return a value of invalid
-                          because they dynamically allocate and free
-                          unused table entries.  An agent for a
-                          statically configured systems can return
-                          invalid to indicate the entry has not yet
-                          been used so the counters contain no
-                          information."
-                  REFERENCE "See ISO 8208,
-                                  table 33 for (p<n>) state table"
-                  ::= { x25CircuitEntry 3 }
-
-          x25CircuitEstablishTime OBJECT-TYPE
-                  SYNTAX  TimeTicks
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of sysUpTime when the channel was
-                          associated with this circuit.  For outgoing
-                          SVCs, this is the time the first call packet
-                          was sent.  For incoming SVCs, this is the
-                          time the call indication was received.  For
-                          PVCs this is the time the PVC was able to
-                          pass data to a higher layer entity without
-                          loss of data."
-                  ::= { x25CircuitEntry 4 }
-
-          x25CircuitDirection OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  incoming (1),
-                                  outgoing (2),
-                                  pvc (3)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The direction of the call that established
-                          this circuit."
-                  REFERENCE "10733 direction"
-
-
-
-
-
-                  DEFVAL { pvc }
-                  ::= { x25CircuitEntry 5 }
-
-                          -- X25 Circuit data flow statistics
-
-          x25CircuitInOctets OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of octets of user data delivered
-                          to upper layer."
-                  REFERENCE "5.11 octetsReceivedCounter"
-                  ::= { x25CircuitEntry 6 }
-
-          x25CircuitInPdus OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of PDUs received for this
-                          circuit."
-                  REFERENCE "10733 5.11 dataPacketsReceived"
-                  ::= { x25CircuitEntry 7 }
-
-          x25CircuitInRemotelyInitiatedResets OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of Resets received for this
-                          circuit with cause code of DTE initiated."
-                  REFERENCE "10733 remotelyInitiatedResets"
-                  ::= { x25CircuitEntry 8 }
-
-          x25CircuitInProviderInitiatedResets OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of Resets received for this
-                          circuit with cause code other than DTE
-                          initiated."
-                  REFERENCE "10733 ProviderInitiatedResets"
-                  ::= { x25CircuitEntry 9 }
-
-          x25CircuitInInterrupts OBJECT-TYPE
-                  SYNTAX  Counter
-
-
-
-
-
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of interrupt packets received
-                          for this circuit."
-                  REFERENCE "10733 interruptPacketsReceived"
-                  ::= { x25CircuitEntry 10 }
-
-          x25CircuitOutOctets OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of octets of user data sent for
-                          this circuit."
-                  REFERENCE "10733 5.11 octetsSentCounter"
-                  ::= { x25CircuitEntry 11 }
-
-          x25CircuitOutPdus OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of PDUs sent for this circuit."
-                  REFERENCE "10733 5.11 dataPacketsSent"
-                  ::= { x25CircuitEntry 12 }
-
-          x25CircuitOutInterrupts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of interrupt packets sent on
-                          this circuit."
-                  REFERENCE "10733 interruptPacketsSent"
-                  ::= { x25CircuitEntry 13 }
-
-
-                          -- X25 circuit timer statistics
-
-          x25CircuitDataRetransmissionTimeouts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the T25 data
-                          retransmission timer expired for this
-                          circuit."
-
-
-
-
-
-                  REFERENCE "10733 5.11 dataRetransmissionTimerExpiries"
-                  ::= { x25CircuitEntry 14 }
-
-          x25CircuitResetTimeouts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the T22 reset timer
-                          expired for this circuit."
-                  REFERENCE "10733 5.11 resetTimeouts"
-                  ::= { x25CircuitEntry 15 }
-
-          x25CircuitInterruptTimeouts OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the T26 Interrupt timer
-                          expired for this circuit."
-                  REFERENCE "10733 interruptTimerExpiries"
-                  ::= { x25CircuitEntry 16 }
-
-          x25CircuitCallParamId OBJECT-TYPE
-                  SYNTAX  OBJECT IDENTIFIER
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This identifies the instance of the
-                          x25CallParmIndex for the entry in the
-                          x25CallParmTable which contains the call
-                          parameters in use with this circuit.  The
-                          entry referenced must contain the values
-                          that are currently in use by the circuit
-                          rather than proposed values.  A value of
-                          NULL indicates the circuit is a PVC or is
-                          using all the default parameters."
---                  DEFVAL { {0 0} }
-                  ::= { x25CircuitEntry 17 }
-
-          x25CircuitCalledDteAddress OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "For incoming calls, this is the called
-                          address from the call indication packet.
-                          For outgoing calls, this is the called
-
-
-
-
-
-                          address from the call confirmation packet.
-                          This will be zero length for PVCs."
-                  REFERENCE "10733 calledDTEAddress"
-                  DEFVAL { ''h }
-                  ::= { x25CircuitEntry 18 }
-
-          x25CircuitCallingDteAddress OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "For incoming calls, this is the calling
-                          address from the call indication packet.
-                          For outgoing calls, this is the calling
-                          address from the call confirmation packet.
-                          This will be zero length for PVCs."
-                  REFERENCE "10733 callingDTEAddress"
-                  DEFVAL { ''h }
-                  ::= { x25CircuitEntry 19 }
-
-          x25CircuitOriginallyCalledAddress OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "For incoming calls, this is the address in
-                          the call Redirection or Call Deflection
-                          Notification facility if the call was
-                          deflected or redirected, otherwise it will
-                          be called address from the call indication
-                          packet.  For outgoing calls, this is the
-                          address from the call request packet.  This
-                          will be zero length for PVCs."
-                  REFERENCE "10733 originallyCalledAddress"
-                  DEFVAL { ''h }
-                  ::= { x25CircuitEntry 20 }
-
-          x25CircuitDescr OBJECT-TYPE
-                  SYNTAX  DisplayString (SIZE (0..255))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "A descriptive string associated with this
-                          circuit.  This provides a place for the
-                          agent to supply any descriptive information
-                          it knows about the use or owner of the
-                          circuit.  The agent may return the process
-                          identifier and user name for the process
-
-
-
-
-
-                          using the circuit.  Alternative the agent
-                          may return the name of the configuration
-                          entry that caused a bridge to establish the
-                          circuit.  A zero length value indicates the
-                          agent doesn't have any additional
-                          information."
-                  DEFVAL { ''h }
-                  ::= { x25CircuitEntry 21 }
-
-
-
-          -- ###########################################################
-          --              The Cleared Circuit Table
-          -- ###########################################################
-
-          x25ClearedCircuitEntriesRequested OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The requested number of entries for the
-                          agent to keep in the x25ClearedCircuit
-                          table."
-                  ::= { x25 6 }
-
-          x25ClearedCircuitEntriesGranted OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The actual number of entries the agent will
-                          keep in the x25ClearedCircuit Table."
-                  ::= { x25 7 }
-
-          x25ClearedCircuitTable  OBJECT-TYPE
-                  SYNTAX SEQUENCE OF      X25ClearedCircuitEntry
-                  ACCESS not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "A table of entries about closed circuits.
-                          Entries must be made in this table whenever
-                          circuits are closed and the close request or
-                          close indication packet contains a clearing
-                          cause other than DTE Originated or a
-                          Diagnostic code field other than Higher
-                          Layer Initiated disconnection-normal.  An
-                          agent may optionally make entries for normal
-                          closes (to record closing facilities or
-
-
-
-
-
-                          other information).
-
-                          Agents will delete the oldest entry in the
-                          table when adding a new entry would exceed
-                          agent resources.  Agents are required to
-                          keep the last entry put in the table and may
-                          keep more entries.  The object
-                          x25OperClearEntriesGranted returns the
-                          maximum number of entries kept in the
-                          table."
-                  REFERENCE "See ISO 8208 Section 12.2.3.1.1
-                                  and 12.2.3.1.2"
-                  ::= { x25 8 }
-
-          x25ClearedCircuitEntry  OBJECT-TYPE
-                  SYNTAX  X25ClearedCircuitEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Information about a cleared circuit."
-                  INDEX { x25ClearedCircuitIndex }
-                  ::= { x25ClearedCircuitTable 1 }
-
-          X25ClearedCircuitEntry ::= SEQUENCE {
-                  x25ClearedCircuitIndex
-                          PositiveInteger,
-                  x25ClearedCircuitPleIndex
-                          IfIndexType,
-                  x25ClearedCircuitTimeEstablished
-                          TimeTicks,
-                  x25ClearedCircuitTimeCleared
-                          TimeTicks,
-                  x25ClearedCircuitChannel
-                          INTEGER,
-                  x25ClearedCircuitClearingCause
-                          INTEGER,
-                  x25ClearedCircuitDiagnosticCode
-                          INTEGER,
-                  x25ClearedCircuitInPdus
-                          Counter,
-                  x25ClearedCircuitOutPdus
-                          Counter,
-                  x25ClearedCircuitCalledAddress
-                          X121Address,
-                  x25ClearedCircuitCallingAddress
-                          X121Address,
-                  x25ClearedCircuitClearFacilities
-                          OCTET STRING
-
-
-
-
-
-                  }
-
-          x25ClearedCircuitIndex OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "An index that uniquely distinguishes one
-                          entry in the clearedCircuitTable from
-                          another.  This index will start at
-                          2147483647 and will decrease by one for each
-                          new entry added to the table.  Upon reaching
-                          one, the index will reset to 2147483647.
-                          Because the index starts at 2147483647 and
-                          decreases, a manager may do a getnext on
-                          entry zero and obtain the most recent entry.
-                          When the index has the value of 1, the next
-                          entry will delete all entries in the table
-                          and that entry will be numbered 2147483647."
-                  ::= { x25ClearedCircuitEntry 1 }
-
-          x25ClearedCircuitPleIndex OBJECT-TYPE
-                  SYNTAX  IfIndexType
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of ifIndex for the PLE which
-                          cleared the circuit that created the entry."
-                  ::= { x25ClearedCircuitEntry 2 }
-
-          x25ClearedCircuitTimeEstablished OBJECT-TYPE
-                  SYNTAX  TimeTicks
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of sysUpTime when the circuit was
-                          established.  This will be the same value
-                          that was in the x25CircuitEstablishTime for
-                          the circuit."
-                  ::= { x25ClearedCircuitEntry 3 }
-
-          x25ClearedCircuitTimeCleared OBJECT-TYPE
-                  SYNTAX  TimeTicks
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of sysUpTime when the circuit was
-                          cleared.  For locally initiated clears, this
-
-
-
-
-
-                          will be the time when the clear confirmation
-                          was received.  For remotely initiated
-                          clears, this will be the time when the clear
-                          indication was received."
-                  ::= { x25ClearedCircuitEntry 4 }
-
-          x25ClearedCircuitChannel OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4095)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The channel number for the circuit that was
-                          cleared."
-                  ::= { x25ClearedCircuitEntry 5 }
-
-          x25ClearedCircuitClearingCause OBJECT-TYPE
-                  SYNTAX  INTEGER (0..255)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Clearing Cause from the clear request
-                          or clear indication packet that cleared the
-                          circuit."
-                  REFERENCE "See ISO 8208 Section 12.2.3.1.1"
-                  ::= { x25ClearedCircuitEntry 6 }
-
-          x25ClearedCircuitDiagnosticCode OBJECT-TYPE
-                  SYNTAX  INTEGER (0..255)
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Diagnostic Code from the clear request
-                          or clear indication packet that cleared the
-                          circuit."
-                  REFERENCE "See ISO 8208 Section 12.2.3.1.2"
-                  ::= { x25ClearedCircuitEntry 7 }
-
-          x25ClearedCircuitInPdus OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of PDUs received on the
-                          circuit."
-                  ::= { x25ClearedCircuitEntry 8 }
-
-          x25ClearedCircuitOutPdus OBJECT-TYPE
-                  SYNTAX  Counter
-
-
-
-
-
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of PDUs transmitted on the
-                          circuit."
-                  ::= { x25ClearedCircuitEntry 9 }
-
-          x25ClearedCircuitCalledAddress OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The called address from the cleared
-                          circuit."
-                  ::= { x25ClearedCircuitEntry 10 }
-
-          x25ClearedCircuitCallingAddress OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The calling address from the cleared
-                          circuit."
-                  ::= { x25ClearedCircuitEntry 11 }
-
-          x25ClearedCircuitClearFacilities OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..109))
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The facilities field from the clear request
-                          or clear indication packet that cleared the
-                          circuit.  A size of zero indicates no
-                          facilities were present."
-                  ::= { x25ClearedCircuitEntry 12 }
-
-
-
-
-          -- ###########################################################
-          --                The Call Parameter Table
-          -- ###########################################################
-
-          x25CallParmTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF X25CallParmEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-
-
-
-
-
-                          "These objects contain the parameters that
-                          can be varied between X.25 calls.  The
-                          entries in this table are independent of the
-                          PLE.  There exists only one of these tables
-                          for the entire system.  The indexes for the
-                          entries are independent of any PLE or any
-                          circuit.  Other tables reference entries in
-                          this table.  Entries in this table can be
-                          used for default PLE parameters, for
-                          parameters to use to place/answer a call,
-                          for the parameters currently in use for a
-                          circuit, or parameters that were used by a
-                          circuit.
-
-                          The number of references to a given set of
-                          parameters can be found in the
-                          x25CallParmRefCount object sharing the same
-                          instance identifier with the parameters.
-                          The value of this reference count also
-                          affects the access of the objects in this
-                          table.  An object in this table with the
-                          same instance identifier as the instance
-                          identifier of an x25CallParmRefCount must be
-                          consider associated with that reference
-                          count.  An object with an associated
-                          reference count of zero can be written (if
-                          its ACCESS clause allows it).  An object
-                          with an associated reference count greater
-                          than zero can not be written (regardless of
-                          the ACCESS clause).  This ensures that a set
-                          of call parameters being referenced from
-                          another table can not be modified or changed
-                          in a ways inappropriate for continued use by
-                          that table."
-                  ::= { x25 9 }
-
-          x25CallParmEntry OBJECT-TYPE
-                  SYNTAX  X25CallParmEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Entries of x25CallParmTable."
-                  INDEX { x25CallParmIndex }
-                  ::= { x25CallParmTable 1 }
-
-          X25CallParmEntry ::= SEQUENCE {
-                  x25CallParmIndex
-                          PositiveInteger,
-                  x25CallParmStatus
-                          EntryStatus,
-                  x25CallParmRefCount
-                          PositiveInteger,
-                  x25CallParmInPacketSize
-                          INTEGER,
-                  x25CallParmOutPacketSize
-                          INTEGER,
-                  x25CallParmInWindowSize
-                          INTEGER,
-                  x25CallParmOutWindowSize
-                          INTEGER,
-                  x25CallParmAcceptReverseCharging
-                          INTEGER,
-                  x25CallParmProposeReverseCharging
-                          INTEGER,
-                  x25CallParmFastSelect
-                          INTEGER,
-                  x25CallParmInThruPutClasSize
-                          INTEGER,
-                  x25CallParmOutThruPutClasSize
-                          INTEGER,
-                  x25CallParmCug
-                          DisplayString,
-                  x25CallParmCugoa
-                          DisplayString,
-                  x25CallParmBcug
-                          DisplayString,
-                  x25CallParmNui
-                          OCTET STRING,
-                  x25CallParmChargingInfo
-                          INTEGER,
-                  x25CallParmRpoa
-                          DisplayString,
-                  x25CallParmTrnstDly
-                          INTEGER,
-                  x25CallParmCallingExt
-                          DisplayString,
-                  x25CallParmCalledExt
-                          DisplayString,
-                  x25CallParmInMinThuPutCls
-                          INTEGER,
-                  x25CallParmOutMinThuPutCls
-                          INTEGER,
-                  x25CallParmEndTrnsDly
-                          OCTET STRING,
-                  x25CallParmPriority
-                          OCTET STRING,
-
-
-
-
-
-                  x25CallParmProtection
-                          DisplayString,
-                  x25CallParmExptData
-                          INTEGER,
-                  x25CallParmUserData
-                          OCTET STRING,
-                  x25CallParmCallingNetworkFacilities
-                          OCTET STRING,
-                  x25CallParmCalledNetworkFacilities
-                          OCTET STRING
-                  }
-
-          x25CallParmIndex OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "A value that distinguishes this entry from
-                          another entry.  Entries in this table are
-                          referenced from other objects which identify
-                          call parameters.
-
-                          It is impossible to know which other objects
-                          in the MIB reference entries in the table by
-                          looking at this table.  Because of this,
-                          changes to parameters must be accomplished
-                          by creating a new entry in this table and
-                          then changing the referencing table to
-                          identify the new entry.
-
-                          Note that an agent will only use the values
-                          in this table when another table is changed
-                          to reference those values.  The number of
-                          other tables that reference an index object
-                          in this table can be found in
-                          x25CallParmRefCount.  The value of the
-                          reference count will affect the writability
-                          of the objects as explained above.
-
-                          Entries in this table which have a reference
-                          count of zero maybe deleted at the convence
-                          of the agent.  Care should be taken by the
-                          agent to give the NMS sufficient time to
-                          create a reference to newly created entries.
-
-                          Should a Management Station not find a free
-                          index with which to create a new entry, it
-                          may feel free to delete entries with a
-
-
-
-
-
-                          reference count of zero.  However in doing
-                          so the Management Station much realize it
-                          may impact other Management Stations."
-                  ::= { x25CallParmEntry 1 }
-
-          x25CallParmStatus OBJECT-TYPE
-                  SYNTAX  EntryStatus
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The status of this call parameter entry.
-                          See RFC 1271 for details of usage."
-                  ::= { x25CallParmEntry 2 }
-
-          x25CallParmRefCount OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of references know by a
-                          management station to exist to this set of
-                          call parameters.  This is the number of
-                          other objects that have returned a value of,
-                          and will return a value of, the index for
-                          this set of call parameters.  Examples of
-                          such objects are the x25AdmnDefCallParamId,
-                          x25OperDataLinkId, or x25AdmnDefCallParamId
-                          objects defined above."
-                  ::= { x25CallParmEntry 3 }
-
-          x25CallParmInPacketSize OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4096)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The maximum receive packet size in octets
-                          for a circuit.  A size of zero for a circuit
-                          means use the PLE default size.  A size of
-                          zero for the PLE means use a default size of
-                          128."
-                  REFERENCE "10733 proposedPacketSize;
-                          See ISO 8208 Section 15.2.2.1.1"
-                  DEFVAL { 128 }
-                  ::= { x25CallParmEntry 4 }
-
-          x25CallParmOutPacketSize OBJECT-TYPE
-                  SYNTAX  INTEGER (0..4096)
-                  ACCESS  read-write
-
-
-
-
-
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The maximum transmit packet size in octets
-                          for a circuit.  A size of zero for a circuit
-                          means use the PLE default size.  A size of
-                          zero for the PLE default means use a default
-                          size of 128."
-                  REFERENCE "10733 proposedPacketSize;
-                          See ISO 8208 Section 15.2.2.1.1"
-                  DEFVAL { 128 }
-                  ::= { x25CallParmEntry 5 }
-
-          x25CallParmInWindowSize OBJECT-TYPE
-                  SYNTAX  INTEGER (0..127)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The receive window size for a circuit.  A
-                          size of zero for a circuit means use the PLE
-                          default size.  A size of zero for the PLE
-                          default means use 2."
-                  REFERENCE "10733 proposedWindowSize;
-                          See ISO 8208 Section 15.2.2.1.2"
-                  DEFVAL { 2 }
-                  ::= { x25CallParmEntry 6 }
-
-          x25CallParmOutWindowSize OBJECT-TYPE
-                  SYNTAX  INTEGER (0..127)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The transmit window size for a circuit.  A
-                          size of zero for a circuit means use the PLE
-                          default size.  A size of zero for the PLE
-                          default means use 2."
-                  REFERENCE "10733 proposedWindowSize;
-                          See ISO 8208 Section 15.2.2.1.2"
-                  DEFVAL { 2 }
-                  ::= { x25CallParmEntry 7 }
-
-          x25CallParmAcceptReverseCharging OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  default (1),
-                                  accept (2),
-                                  refuse (3),
-                                  neverAccept (4)
-                          }
-                  ACCESS  read-write
-
-
-
-
-
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "An enumeration defining if the PLE will
-                          accept or refuse charges.  A value of
-                          default for a circuit means use the PLE
-                          default value.  A value of neverAccept is
-                          only used for the PLE default and indicates
-                          the PLE will never accept reverse charging.
-                          A value of default for a PLE default means
-                          refuse."
-                  REFERENCE "10733 acceptReverseCharging"
-                  DEFVAL { refuse }
-                  ::= { x25CallParmEntry 8 }
-
-          x25CallParmProposeReverseCharging OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  default (1),
-                                  reverse (2),
-                                  local (3)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "An enumeration defining if the PLE should
-                          propose reverse or local charging.  The
-                          value of default for a circuit means use the
-                          PLE default.  The value of default for the
-                          PLE default means use local."
-                  REFERENCE "10733 proposedPacketSize;
-                          See ISO 8208 Section 15.2.2.6"
-                  DEFVAL { local }
-                  ::= { x25CallParmEntry 9 }
-
-          x25CallParmFastSelect OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  default (1),
-                                  notSpecified (2),
-                                  fastSelect (3),
-                                  restrictedFastResponse (4),
-                                  noFastSelect (5),
-                                  noRestrictedFastResponse (6)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Expresses preference for use of fast select
-                          facility.  The value of default for a
-                          circuit is the PLE default.  A value of
-
-
-
-
-
-                          default for the PLE means noFastSelect.  A
-                          value of noFastSelect or
-                          noRestrictedFastResponse indicates a circuit
-                          may not use fast select or restricted fast
-                          response."
-                  REFERENCE "10733 fastSelect;
-                  Sec ISO 8208 Section 15.2.2.6"
-                  DEFVAL { noFastSelect }
-                  ::= { x25CallParmEntry 10 }
-
-          x25CallParmInThruPutClasSize    OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  tcReserved1 (1),
-                                  tcReserved2 (2),
-                                  tc75 (3),
-                                  tc150 (4),
-                                  tc300 (5),
-                                  tc600 (6),
-                                  tc1200  (7),
-                                  tc2400  (8),
-                                  tc4800  (9),
-                                  tc9600  (10),
-                                  tc19200 (11),
-                                  tc48000 (12),
-                                  tc64000 (13),
-                                  tcReserved14 (14),
-                                  tcReserved15 (15),
-                                  tcReserved0 (16),
-                                  tcNone  (17),
-                                  tcDefault (18)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The incoming throughput class to negotiate.
-                          A value of tcDefault for a circuit means use
-                          the PLE default.  A value of tcDefault for
-                          the PLE default means tcNone.  A value of
-                          tcNone means do not negotiate throughtput
-                          class."
-                  REFERENCE "See ISO 8208 Section 15.2.2.2, table 18"
-                  DEFVAL { tcNone }
-                  ::= { x25CallParmEntry 11 }
-
-          x25CallParmOutThruPutClasSize   OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  tcReserved1 (1),
-                                  tcReserved2 (2),
-
-
-
-
-
-                                  tc75 (3),
-                                  tc150 (4),
-                                  tc300 (5),
-                          tc600 (6),
-                                  tc1200  (7),
-                                  tc2400  (8),
-                                  tc4800  (9),
-                                  tc9600  (10),
-                                  tc19200 (11),
-                                  tc48000 (12),
-                                  tc64000 (13),
-                                  tcReserved14 (14),
-                                  tcReserved15 (15),
-                                  tcReserved0 (16),
-                                  tcNone  (17),
-                                  tcDefault (18)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The outgoing throughput class to negotiate.
-                          A value of tcDefault for a circuit means use
-                          the PLE default.  A value of tcDefault for
-                          the PLE default means use tcNone.  A value
-                          of tcNone means do not negotiate throughtput
-                          class."
-                  REFERENCE "See ISO 8208 Section 15.2.2.2, table 18"
-                  DEFVAL { tcNone }
-                  ::= { x25CallParmEntry 12 }
-
-          x25CallParmCug  OBJECT-TYPE
-                  SYNTAX  DisplayString (SIZE(0..4))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Closed User Group to specify.  This
-                          consists of two or four octets containing
-                          the characters 0 through 9.  A zero length
-                          string indicates no facility requested.  A
-                          string length of three containing the
-                          characters DEF for a circuit means use the
-                          PLE default, (the PLE default parameter may
-                          not reference an entry of DEF.)"
-                  REFERENCE "See ISO 8208 Section 15.2.2.3"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 13 }
-
-          x25CallParmCugoa        OBJECT-TYPE
-
-
-
-
-
-                  SYNTAX  DisplayString (SIZE(0..4))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Closed User Group with Outgoing Access
-                          to specify.  This consists of two or four
-                          octets containing the characters 0 through
-                          9.  A string length of three containing the
-                          characters DEF for a circuit means use the
-                          PLE default (the PLE default parameters may
-                          not reference an entry of DEF).  A zero
-                          length string indicates no facility
-                          requested."
-                  REFERENCE "See ISO 8208 Section 15.2.2.4"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 14 }
-
-          x25CallParmBcug OBJECT-TYPE
-                  SYNTAX  DisplayString (SIZE(0..3))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Bilateral Closed User Group to specify.
-                          This consists of two octets containing the
-                          characters 0 through 9.  A string length of
-                          three containing the characters DEF for a
-                          circuit means use the PLE default (the PLE
-                          default parameter may not reference an entry
-                          of DEF).  A zero length string indicates no
-                          facility requested."
-                  REFERENCE "See ISO 8208 Section 15.2.2.5"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 15 }
-
-          x25CallParmNui  OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE(0..108))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Network User Identifier facility.  This
-                          is binary value to be included immediately
-                          after the length field.  The PLE will supply
-                          the length octet.  A zero length string
-                          indicates no facility requested.  This value
-                          is ignored for the PLE default parameters
-                          entry."
-                  REFERENCE "See ISO 8208 Section 15.2.2.7"
-                  DEFVAL { ''h }
-
-
-
-
-
-                  ::= { x25CallParmEntry 16 }
-
-          x25CallParmChargingInfo OBJECT-TYPE
-                  SYNTAX INTEGER {
-                                  default (1),
-                                  noFacility (2),
-                                  noChargingInfo (3),
-                                  chargingInfo (4)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The charging Information facility.  A value
-                          of default for a circuit means use the PLE
-                          default.  The value of default for the
-                          default PLE parameters means use noFacility.
-                          The value of noFacility means do not include
-                          a facility."
-                  REFERENCE "See ISO 8208 Section 15.2.2.8"
-                  DEFVAL { noFacility }
-                  ::= { x25CallParmEntry 17 }
-
-          x25CallParmRpoa OBJECT-TYPE
-                  SYNTAX  DisplayString (SIZE(0..108))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The RPOA facility.  The octet string
-                          contains n * 4 sequences of the characters
-                          0-9 to specify a facility with n entries.
-                          The octet string containing the 3 characters
-                          DEF for a circuit specifies use of the PLE
-                          default (the entry for the PLE default may
-                          not contain DEF).  A zero length string
-                          indicates no facility requested."
-                  REFERENCE "See ISO 8208, section 15.2.2.9"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 18 }
-
-          x25CallParmTrnstDly     OBJECT-TYPE
-                  SYNTAX  INTEGER (0..65537)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Transit Delay Selection and Indication
-                          value.  A value of 65536 indicates no
-                          facility requested.  A value of 65537 for a
-                          circuit means use the PLE default (the PLE
-
-
-
-
-
-                          default parameters entry may not use the
-                          value 65537).  The value 65535 may only be
-                          used to indicate the value in use by a
-                          circuit."
-                  REFERENCE "See ISO 8208, Section 15.2.2.13"
-                  DEFVAL { 65536 }
-                  ::= { x25CallParmEntry 19 }
-
-
-                  -- The following parameters are for CCITT facilities.
-
-          x25CallParmCallingExt OBJECT-TYPE
-                  SYNTAX  DisplayString (SIZE(0..40))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Calling Extension facility.  This
-                          contains one of the following:
-
-                          A sequence of hex digits with the value to
-                          be put in the facility. These digits will be
-                          converted to binary by the agent and put in
-                          the facility.  These octets do not include
-                          the length octet.
-
-                          A value containing the three character DEF
-                          for a circuit means use the PLE default,
-                          (the entry for the PLE default parameters
-                          may not use the value DEF).
-
-                          A zero length string indicates no facility
-                          requested."
-                  REFERENCE "See ISO 8208 Section 15.3.2.1"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 20 }
-
-          x25CallParmCalledExt OBJECT-TYPE
-                  SYNTAX  DisplayString (SIZE(0..40))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Called Extension facility.  This
-                          contains one of the following:
-
-                          A sequence of hex digits with the value to
-                          be put in the facility.  These digits will be
-                          converted to binary by the agent and put in
-                          the facility.  These octets do not include
-
-
-
-
-
-                          the length octet.
-
-                          A value containing the three character DEF
-                          for a circuit means use the PLE default,
-                          (the entry for the PLE default parameters
-                          may not use the value DEF).
-
-                          A zero length string indicates no facility
-                          requested."
-                  REFERENCE "See ISO 8208 Section 15.3.2.2"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 21 }
-
-          x25CallParmInMinThuPutCls       OBJECT-TYPE
-                  SYNTAX  INTEGER (0..17)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The minimum input throughput Class.  A
-                          value of 16 for a circuit means use the PLE
-                          default (the PLE parameters entry may not
-                          use this value).  A value of 17 indicates no
-                          facility requested."
-                  REFERENCE "See ISO 8208 Section 15.3.2.3"
-                  DEFVAL { 17 }
-                  ::= { x25CallParmEntry 22 }
-
-          x25CallParmOutMinThuPutCls OBJECT-TYPE
-                  SYNTAX  INTEGER (0..17)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The minimum output throughput Class.  A
-                          value of 16 for a circuit means use the PLE
-                          default (the PLE parameters entry may not
-                          use this value).  A value of 17 indicates no
-                          facility requested."
-                  REFERENCE "See ISO 8208 Section 15.3.2.3"
-                  DEFVAL { 17 }
-                  ::= { x25CallParmEntry 23 }
-
-          x25CallParmEndTrnsDly OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE(0..6))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The End-to-End Transit Delay to negotiate.
-                          An octet string of length 2, 4, or 6
-
-
-
-
-
-                          contains the facility encoded as specified
-                          in ISO/IEC 8208 section 15.3.2.4.  An octet
-                          string of length 3 containing the three
-                          character DEF for a circuit means use the
-                          PLE default (the entry for the PLE default
-                          can not contain the characters DEF).  A zero
-                          length string indicates no facility
-                          requested."
-                  REFERENCE "See ISO 8208 Section 15.3.2.4"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 24 }
-
-          x25CallParmPriority OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE(0..6))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The priority facility to negotiate.  The
-                          octet string encoded as specified in ISO/IEC
-                          8208 section 15.3.2.5.  A zero length string
-                          indicates no facility requested.  The entry
-                          for the PLE default parameters must be zero
-                          length."
-                  REFERENCE "See ISO 8208 Section 15.3.2.5"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 25 }
-
-          x25CallParmProtection OBJECT-TYPE
-                  SYNTAX  DisplayString (SIZE(0..108))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "A string contains the following:
-                          A hex string containing the value for the
-                          protection facility.  This will be converted
-                          from hex to the octets actually in the
-                          packet by the agent.  The agent will supply
-                          the length field and the length octet is not
-                          contained in this string.
-
-                          An string containing the 3 characters DEF
-                          for a circuit means use the PLE default (the
-                          entry for the PLE default parameters may not
-                          use the value DEF).
-
-                          A zero length string mean no facility
-                          requested."
-                  REFERENCE "See ISO 8208 Section 15.3.2.5"
-
-
-
-
-
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 26 }
-
-          x25CallParmExptData OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  default (1),
-                                  noExpeditedData (2),
-                                  expeditedData (3)
-                          }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Expedited Data facility to negotiate.
-                          A value of default for a circuit means use
-                          the PLE default value.  The entry for the
-                          PLE default parameters may not have the
-                          value default."
-                  REFERENCE "See ISO 8208 Section 15.3.2.7"
-                  DEFVAL { noExpeditedData }
-                  ::= { x25CallParmEntry 27 }
-
-          x25CallParmUserData     OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..128))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The call user data as placed in the packet.
-                          A zero length string indicates no call user
-                          data.  If both the circuit call parameters
-                          and the PLE default have call user data
-                          defined, the data from the circuit call
-                          parameters will be used.  If only the PLE
-                          has data defined, the PLE entry will be
-                          used.  If neither the circuit call
-                          parameters or the PLE default entry has a
-                          value, no call user data will be sent."
-                  REFERENCE "See ISO 8208 Section 12.2.1.1.6, 12.2.1.2"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 28 }
-
-          x25CallParmCallingNetworkFacilities     OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..108))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The calling network facilities.  The
-                          facilities are encoded here exactly as
-                          encoded in the call packet.  These
-
-
-
-
-
-                          facilities do not include the marker
-                          facility code.
-
-                          A zero length string in the entry for the
-                          parameter to use when establishing a circuit
-                          means use the PLE default.  A zero length
-                          string in the entry for PLE default
-                          parameters indicates no default facilities."
-                  REFERENCE "See ISO 8206 Section 15.1, category b"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 29 }
-
-          x25CallParmCalledNetworkFacilities      OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE (0..108))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The called network facilities.  The
-                          facilities are encoded here exactly as
-                          encoded in the call packet.  These
-                          facilities do not include the marker
-                          facility code.
-
-                          A zero length string in the entry for the
-                          parameter to use when establishing a circuit
-                          means use the PLE default.  A zero length
-                          string in the entry for PLE default
-                          parameters indicates no default facilities."
-                  REFERENCE "See ISO 8206 Section 15.1, category c"
-                  DEFVAL { ''h }
-                  ::= { x25CallParmEntry 30 }
-
-          -- ###########################################################
-          --              X.25 Traps
-          -- ###########################################################
-
---          x25Restart      TRAP-TYPE
---                  ENTERPRISE  x25
---                  VARIABLES { x25OperIndex }
---                  DESCRIPTION
---                          "This trap means the X.25 PLE sent or
---                          received a restart packet.  The restart that
---                          brings up the link should not send a
---                          x25Restart trap so the interface should send
---                          a linkUp trap.  Sending this trap means the
---                          agent does not send a linkDown and linkUp
---                          trap."
---                  ::= 1
-
-
-
-
-
---          x25Reset        TRAP-TYPE
---                  ENTERPRISE  x25
---                  VARIABLES { x25CircuitIndex,
---                          x25CircuitChannel }
---                  DESCRIPTION
---                          "If the PLE sends or receives a reset, the
---                          agent should send an x25Reset trap."
---                  ::= 2
-
-
-          -- ###########################################################
-          --              X.25 Protocol Version Identifiers
-          -- ###########################################################
-
-          x25ProtocolVersion OBJECT IDENTIFIER
-                  ::= { x25 10 }
-
-                  -- X.25 CCITT 1976 version.
-          x25protocolCcittV1976 OBJECT IDENTIFIER
-                  ::= { x25ProtocolVersion 1 }
-
-                  -- X.25 CCITT 1980 version.
-          x25protocolCcittV1980 OBJECT IDENTIFIER
-                  ::= { x25ProtocolVersion 2 }
-
-                  -- X.25 CCITT 1984 version.
-          x25protocolCcittV1984 OBJECT IDENTIFIER
-                  ::= { x25ProtocolVersion 3 }
-
-                  -- X.25 CCITT 1988 version.
-          x25protocolCcittV1988 OBJECT IDENTIFIER
-                  ::= { x25ProtocolVersion 4 }
-
-                  -- X.25 1987 version of ISO 8208.
-          x25protocolIso8208V1987 OBJECT IDENTIFIER
-                  ::= { x25ProtocolVersion 5 }
-
-                  -- X.25 1989 version of ISO 8208.
-          x25protocolIso8208V1989 OBJECT IDENTIFIER
-                  ::= { x25ProtocolVersion 6 }
-
-          -- ###########################################################
-
-          END
--- a/usr/src/cmd/agents/snmp/mib/rfc1461.txt	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,778 +0,0 @@
--- #ident	"%Z%%M%	%I%	%E% SMI"
-
-          MIOX25-MIB DEFINITIONS  ::= BEGIN
-
-          IMPORTS
-                  Counter,
-                  TimeTicks
-                          FROM RFC1155-SMI
-                  OBJECT-TYPE
-                          FROM RFC-1212
-                  DisplayString, transmission,
-                  ifIndex
-                          FROM RFC1213-MIB
-                  InstancePointer
-                          FROM RFC1316-MIB
-                  X121Address
-                          FROM RFC1382-MIB
-                  PositiveInteger
-                          FROM RFC1381-MIB;
-
-                          -- IP over X.25 MIB
-
-          miox    OBJECT IDENTIFIER ::= { transmission 38 }
-
-          mioxPle         OBJECT IDENTIFIER ::= { miox 1 }
-          mioxPeer        OBJECT IDENTIFIER ::= { miox 2 }
-
-          -- ###########################################################
-          --              Ple Table
-          -- ###########################################################
-
-          -- Systems that implement RFC 1356 must also implement
-          -- all objects in this group.
-
-          mioxPleTable    OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF MioxPleEntry
-
-
-
-
-
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This table contains information relative to
-                          an interface to an X.25 Packet Level Entity
-                          (PLE)."
-                  ::= { mioxPle 1   }
-
-          mioxPleEntry    OBJECT-TYPE
-                  SYNTAX  MioxPleEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "These objects manage the encapsulation of
-                          other protocols within X.25."
-                  INDEX { ifIndex }
-                  ::= { mioxPleTable 1 }
-
-          MioxPleEntry ::= SEQUENCE {
-                  mioxPleMaxCircuits
-                          INTEGER,
-                  mioxPleRefusedConnections
-                          Counter,
-                  mioxPleEnAddrToX121LkupFlrs
-                          Counter,
-                  mioxPleLastFailedEnAddr
-                          OCTET STRING,
-                  mioxPleEnAddrToX121LkupFlrTime
-                          TimeTicks,
-                  mioxPleX121ToEnAddrLkupFlrs
-                          Counter,
-                  mioxPleLastFailedX121Address
-                          X121Address,
-                  mioxPleX121ToEnAddrLkupFlrTime
-                          TimeTicks,
-                  mioxPleQbitFailures
-                          Counter,
-                  mioxPleQbitFailureRemoteAddress
-                          X121Address,
-                  mioxPleQbitFailureTime
-                          TimeTicks,
-                  mioxPleMinimumOpenTimer
-                          PositiveInteger,
-                  mioxPleInactivityTimer
-                          PositiveInteger,
-                  mioxPleHoldDownTimer
-                          PositiveInteger,
-                  mioxPleCollisionRetryTimer
-
-
-
-
-
-                          PositiveInteger,
-                  mioxPleDefaultPeerId
-                          InstancePointer
-                  }
-
-          mioxPleMaxCircuits OBJECT-TYPE
-                  SYNTAX  INTEGER (0..2147483647)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The maximum number of X.25 circuits that
-                          can be open at one time for this interface.
-                          A value of zero indicates the interface will
-                          not allow any additional circuits (as it may
-                          soon be shutdown).  A value of 2147483647
-                          allows an unlimited number of circuits."
-                  ::= { mioxPleEntry 1 }
-
-          mioxPleRefusedConnections OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of X.25 calls from a remote
-                          systems to this system that were cleared by
-                          this system.  The interface instance should
-                          identify the X.25 interface the call came in
-                          on."
-                  ::= { mioxPleEntry 2 }
-
-          mioxPleEnAddrToX121LkupFlrs OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times a translation from an
-                          Encapsulated Address to an X.121 address
-                          failed to find a corresponding X.121
-                          address.  Encapsulated addresses can be
-                          looked up in the mioxPeerTable or translated
-                          via an algorithm as for the DDN.  Addresses
-                          that are successfully recognized do not
-                          increment this counter.  Addresses that are
-                          not recognized (reflecting an abnormal
-                          packet delivery condition) increment this
-                          counter.
-
-                          If an address translation fails, it may be
-
-
-
-
-
-                          difficult to determine which PLE entry
-                          should count the failure.  In such cases the
-                          first likely entry in this table should be
-                          selected.  Agents should record the failure
-                          even if they are unsure which PLE should be
-                          associated with the failure."
-                  ::= { mioxPleEntry 3 }
-
-          mioxPleLastFailedEnAddr OBJECT-TYPE
-                  SYNTAX  OCTET STRING (SIZE(2..128))
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The last Encapsulated address that failed
-                          to find a corresponding X.121 address and
-                          caused mioxPleEnAddrToX121LkupFlrs to be
-                          incremented.  The first octet of this object
-                          contains the encapsulation type, the
-                          remaining octets contain the address of that
-                          type that failed.  Thus for an IP address,
-                          the length will be five octets, the first
-                          octet will contain 204 (hex CC), and the
-                          last four octets will contain the IP
-                          address.  For a snap encapsulation, the
-                          first byte would be 128 (hex 80) and the
-                          rest of the octet string would have the snap
-                          header."
-                  ::= { mioxPleEntry 4 }
-
-          mioxPleEnAddrToX121LkupFlrTime OBJECT-TYPE
-                  SYNTAX  TimeTicks
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The most recent value of sysUpTime when the
-                          translation from an Encapsulated Address to
-                          X.121 address failed to find a corresponding
-                          X.121 address."
-                  ::= { mioxPleEntry 5 }
-
-
-          mioxPleX121ToEnAddrLkupFlrs OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times the translation from an
-                          X.121 address to an Encapsulated Address
-
-
-
-
-
-                          failed to find a corresponding Encapsulated
-                          Address.  Addresses successfully recognized
-                          by an algorithm do not increment this
-                          counter.  This counter reflects the number
-                          of times call acceptance encountered the
-                          abnormal condition of not recognizing the
-                          peer."
-                  ::= { mioxPleEntry 6 }
-
-          mioxPleLastFailedX121Address OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The last X.121 address that caused
-                          mioxPleX121ToEnAddrLkupFlrs to increase."
-                  ::= { mioxPleEntry 7 }
-
-          mioxPleX121ToEnAddrLkupFlrTime OBJECT-TYPE
-                  SYNTAX  TimeTicks
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The most recent value of sysUpTime when the
-                          translation from an X.121 address to an
-                          Encapsulated Address failed to find a
-                          corresponding Encapsulated Address."
-                  ::= { mioxPleEntry 8 }
-
-          mioxPleQbitFailures OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of times a connection was closed
-                          because of a Q-bit failure."
-                  ::= { mioxPleEntry 9 }
-
-          mioxPleQbitFailureRemoteAddress OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The remote address of the most recent
-                          (last) connection that was closed because of
-                          a Q-bit failure."
-                  ::= { mioxPleEntry 10 }
-
-
-
-
-
-
-          mioxPleQbitFailureTime OBJECT-TYPE
-                  SYNTAX  TimeTicks
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The most recent value of sysUpTime when a
-                          connection was closed because of a Q-bit
-                          failure.  This will also be the last time
-                          that mioxPleQbitFailures was incremented."
-                  ::= { mioxPleEntry 11 }
-
-          mioxPleMinimumOpenTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The minimum time in milliseconds this
-                          interface will keep a connection open before
-                          allowing it to be closed.  A value of zero
-                          indicates no timer."
-                  DEFVAL { 0 }
-                  ::= { mioxPleEntry 12 }
-
-          mioxPleInactivityTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The amount of time time in milliseconds
-                          this interface will keep an idle connection
-                          open before closing it.  A value of
-                          2147483647 indicates no timer."
-                  DEFVAL { 10000 }
-                  ::= { mioxPleEntry 13 }
-
-          mioxPleHoldDownTimer    OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The hold down timer in milliseconds.  This
-                          is the minimum amount of time to wait before
-                          trying another call to a host that was
-                          previously unsuccessful.  A value of
-                          2147483647 indicates the host will not be
-                          retried."
-                  DEFVAL { 0 }
-                  ::= { mioxPleEntry 14 }
-
-
-
-
-
-          mioxPleCollisionRetryTimer OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Collision Retry Timer in milliseconds.
-                          The time to delay between call attempts when
-                          the maximum number of circuits is exceeded
-                          in a call attempt."
-                  DEFVAL { 0 }
-                  ::= { mioxPleEntry 15 }
-
-
-          mioxPleDefaultPeerId OBJECT-TYPE
-                  SYNTAX  InstancePointer
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This identifies the instance of the index
-                          in the mioxPeerTable for the default
-                          parameters to use with this interface.
-
-                          The entry identified by this object may have
-                          a zero length Encapsulation address and a
-                          zero length X.121 address.
-
-                          These default parameters are used with
-                          connections to hosts that do not have
-                          entries in the mioxPeerTable.  Such
-                          connections occur when using ddn-x25 IP-X.25
-                          address mapping or when accepting
-                          connections from other hosts not in the
-                          mioxPeerTable.
-
-                          The mioxPeerEncTable entry with the same
-                          index as the mioxPeerTable entry specifies
-                          the call encapsulation types this PLE will
-                          accept for peers not in the mioxPeerTable.
-                          If the mioxPeerEncTable doesn't contain any
-                          entries, this PLE will not accept calls from
-                          entries not in the mioxPeerTable."
-                  ::= { mioxPleEntry 16 }
-
-
-
-          -- ###########################################################
-          --              Peer Table
-          -- ###########################################################
-
-
-
-
-
-          -- Systems that implement RFC 1356 must also implement
-          -- all objects in this group.
-
-          mioxPeerTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF MioxPeerEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This table contains information about the
-                          possible peers this machine may exchange
-                          packets with."
-                  ::= { mioxPeer 1 }
-
-          mioxPeerEntry OBJECT-TYPE
-                  SYNTAX  MioxPeerEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Per peer information."
-                  INDEX { mioxPeerIndex   }
-                  ::= { mioxPeerTable 1 }
-
-
-          MioxPeerEntry ::= SEQUENCE {
-                  mioxPeerIndex
-                          PositiveInteger,
-                  mioxPeerStatus
-                          INTEGER,
-                  mioxPeerMaxCircuits
-                          PositiveInteger,
-                  mioxPeerIfIndex
-                          PositiveInteger,
-                  mioxPeerConnectSeconds
-                          Counter,
-                  mioxPeerX25CallParamId
-                          InstancePointer,
-                  mioxPeerEnAddr
-                          OCTET STRING,
-                  mioxPeerX121Address
-                          X121Address,
-                  mioxPeerX25CircuitId
-                          InstancePointer,
-                  mioxPeerDescr
-                          DisplayString
-                  }
-
-          mioxPeerIndex   OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-
-
-
-
-
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "An index value that distinguished one entry
-                          from another.  This index is independent of
-                          any other index."
-                  ::= { mioxPeerEntry 1 }
-
-          -- Systems can claim conformance with this MIB without
-          -- implementing sets to mioxPeerStatus with a value of
-          -- clearCall or makeCall.
-          -- All other defined values must be accepted.
-          -- Implementors should realize that allowing these values
-          -- provides richer management, and implementations
-          -- are encouraged to accept these values.
-          mioxPeerStatus OBJECT-TYPE
-                  SYNTAX  INTEGER {
-                                  valid (1),
-                                  createRequest (2),
-                                  underCreation (3),
-                                  invalid (4),
-                                  clearCall (5),
-                                  makeCall (6)
-                                  }
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This reports the status of a peer entry.
-                          A value of valid indicates a normal entry
-                          that is in use by the agent.  A value of
-                          underCreation indicates a newly created
-                          entry which isn't yet in use because the
-                          creating management station is still setting
-                          values.
-
-                          The value of invalid indicates the entry is
-                          no longer in use and the agent is free to
-                          delete the entry at any time.  A management
-                          station is also free to use an entry in the
-                          invalid state.
-
-                          Entries are created by setting a value of
-                          createRequest.  Only non-existent or invalid
-                          entries can be set to createRequest.  Upon
-                          receiving a valid createRequest, the agent
-                          will create an entry in the underCreation
-                          state.  This object can not be set to a
-                          value of underCreation directly, entries can
-
-
-
-
-
-                          only be created by setting a value of
-                          createRequest.  Entries that exist in other
-                          than the invalid state can not be set to
-                          createRequest.
-
-                          Entries with a value of underCreation are
-                          not used by the system and the management
-                          station can change the values of other
-                          objects in the table entry.  Management
-                          stations should also remember to configure
-                          values in the mioxPeerEncTable with the same
-                          peer index value as this peer entry.
-
-                          An entry in the underCreation state can be
-                          set to valid or invalid.  Entries in the
-                          underCreation state will stay in that state
-                          until 1) the agent times them out, 2) they
-                          are set to valid, 3) they are set to
-                          invalid.  If an agent notices an entry has
-                          been in the underCreation state for an
-                          abnormally long time, it may decide the
-                          management station has failed and invalidate
-                          the entry.  A prudent agent will understand
-                          that the management station may need to wait
-                          for human input and will allow for that
-                          possibility in its determination of this
-                          abnormally long period.
-
-                          Once a management station has completed all
-                          fields of an entry, it will set a value of
-                          valid.  This causes the entry to be
-                          activated.
-
-                          Entries in the valid state may also be set
-                          to makeCall or clearCall to make or clear
-                          X.25 calls to the peer.  After such a set
-                          request the entry will still be in the valid
-                          state.  Setting a value of makeCall causes
-                          the agent to initiate an X.25 call request
-                          to the peer specified by the entry.  Setting
-                          a value of clearCall causes the agent to
-                          initiate clearing one X.25 call present to
-                          the peer.  Each set request will initiate
-                          another call or clear request (up to the
-                          maximum allowed); this means that management
-                          stations that fail to get a response to a
-                          set request should query to see if a call
-                          was in fact placed or cleared before
-
-
-
-
-
-                          retrying the request.  Entries not in the
-                          valid state can not be set to makeCall or
-                          clearCall.
-
-                          The values of makeCall and clearCall provide
-                          for circuit control on devices which perform
-                          Ethernet Bridging using static circuit
-                          assignment without address recognition;
-                          other devices which dynamically place calls
-                          based on destination addresses may reject
-                          such requests.
-
-                          An agent that (re)creates a new entry
-                          because of a set with createRequest, should
-                          also (re)create a mioxPeerEncTable entry
-                          with a mioxPeerEncIndex of 1, and a
-                          mioxPeerEncType of 204 (hex CC)."
-                  ::= { mioxPeerEntry 2 }
-
-          mioxPeerMaxCircuits OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS    mandatory
-                  DESCRIPTION
-                          "The maximum number of X.25 circuits allowed
-                          to this peer."
-                  DEFVAL { 1 }
-                  ::= { mioxPeerEntry 3 }
-
-          mioxPeerIfIndex OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of the ifIndex object for the
-                          interface to X.25 to use to call the peer."
-                  DEFVAL { 1 }
-                  ::= { mioxPeerEntry 4 }
-
-          mioxPeerConnectSeconds OBJECT-TYPE
-                  SYNTAX  Counter
-                  ACCESS  read-only
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The number of seconds a call to this peer
-                          was active.  This counter will be
-                          incremented by one for every second a
-                          connection to a peer was open.  If two calls
-
-
-
-
-
-                          are open at the same time, one second of
-                          elapsed real time will results in two
-                          seconds of connect time."
-                  ::= { mioxPeerEntry 5 }
-
-          mioxPeerX25CallParamId OBJECT-TYPE
-                  SYNTAX  InstancePointer
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The instance of the index object in the
-                          x25CallParmTable from RFC 1382 for the X.25
-                          call parameters used to communicate with the
-                          remote host.  The well known value {0 0}
-                          indicates no call parameters specified."
---                  DEFVAL { {0 0} }
-                  ::= { mioxPeerEntry 6 }
-
-          mioxPeerEnAddr  OBJECT-TYPE
-                  SYNTAX    OCTET STRING (SIZE (0..128))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The Encapsulation address of the remote
-                          host mapped by this table entry.  A length
-                          of zero indicates the remote IP address is
-                          unknown or unspecified for use as a PLE
-                          default.
-
-                          The first octet of this object contains the
-                          encapsulation type, the remaining octets
-                          contain an address of that type.  Thus for
-                          an IP address, the length will be five
-                          octets, the first octet will contain 204
-                          (hex CC), and the last four octets will
-                          contain the IP address.  For a snap
-                          encapsulation, the first byte would be 128
-                          (hex 80) and the rest of the octet string
-                          would have the snap header."
-                  DEFVAL { ''h }
-                  ::= { mioxPeerEntry 7 }
-
-          mioxPeerX121Address OBJECT-TYPE
-                  SYNTAX  X121Address
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The X.25 address of the remote host mapped
-
-
-
-
-
-                          by this table entry.  A zero length string
-                          indicates the X.25 address is unspecified
-                          for use as the PLE default."
-                  DEFVAL { ''h }
-                  ::= { mioxPeerEntry 8 }
-
-          -- Systems can claim conformance to this MIB without
-          -- implementing sets to mioxPeerX25CircuitId.
-          -- However systems that use PVCs with RFC1356
-          -- are encouraged to implement sets.
-          mioxPeerX25CircuitId OBJECT-TYPE
-                  SYNTAX  InstancePointer
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This object identifies the instance of the
-                          index for the X.25 circuit open to the peer
-                          mapped by this table entry.  The well known
-                          value {0 0} indicates no connection
-                          currently active.  For multiple connections,
-                          this identifies the index of a multiplexing
-                          table entry for the connections.  This can
-                          only be written to configure use of PVCs
-                          which means the identified circuit table
-                          entry for a write must be a PVC."
---                  DEFVAL { {0 0} }
-                  ::= { mioxPeerEntry 9 }
-
-          mioxPeerDescr   OBJECT-TYPE
-                  SYNTAX  DisplayString (SIZE (0..255))
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This object returns any identification
-                          information about the peer.  An agent may
-                          supply the comment information found in the
-                          configuration file entry for this peer.  A
-                          zero length string indicates no information
-                          available."
---                  DEFVAL { ''h }
-                  ::= { mioxPeerEntry 10 }
-
-
-
-          -- ###########################################################
-          --              Peer Encapsulation Table
-          -- ###########################################################
-
-
-
-
-
-
-          mioxPeerEncTable OBJECT-TYPE
-                  SYNTAX  SEQUENCE OF MioxPeerEncEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "This table contains the list of
-                          encapsulations used to communicate with a
-                          peer.  This table has two indexes, the first
-                          identifies the peer, the second
-                          distinguishes encapsulation types.
-
-                          The first index identifies the corresponding
-                          entry in the mioxPeerTable.  The second
-                          index gives the priority of the different
-                          encapsulations.
-
-                          The encapsulation types are ordered in
-                          priority order.  For calling a peer, the
-                          first entry (mioxPeerEncIndex of 1) is tried
-                          first.  If the call doesn't succeed because
-                          the remote host clears the call due to
-                          incompatible call user data, the next entry
-                          in the list is tried.  Each entry is tried
-                          until the list is exhausted.
-
-                          For answering a call, the encapsulation type
-                          requested by the peer must be found the list
-                          or the call will be refused.  If there are
-                          no entries in this table for a peer, all
-                          call requests from the peer will be refused.
-
-                          Objects in this table can only be set when
-                          the mioxPeerStatus object with the same
-                          index has a value of underCreation.  When
-                          that status object is set to invalid and
-                          deleted, the entry in this table with that
-                          peer index must also be deleted."
-                  ::= { mioxPeer 2 }
-
-          mioxPeerEncEntry OBJECT-TYPE
-                  SYNTAX  MioxPeerEncEntry
-                  ACCESS  not-accessible
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "Per connection information."
-                  INDEX { mioxPeerIndex, mioxPeerEncIndex}
-                  ::= { mioxPeerEncTable 1 }
-
-
-
-
-
-
-          MioxPeerEncEntry ::= SEQUENCE {
-                  mioxPeerEncIndex
-                          PositiveInteger,
-                  mioxPeerEncType
-                          INTEGER
-                  }
-
-          mioxPeerEncIndex        OBJECT-TYPE
-                  SYNTAX  PositiveInteger
-                  ACCESS  read-only
-                  STATUS    mandatory
-                  DESCRIPTION
-                          "The second index in the table which
-                          distinguishes different encapsulation
-                          types."
-                  ::= { mioxPeerEncEntry 1 }
-
-          mioxPeerEncType OBJECT-TYPE
-                  SYNTAX  INTEGER (0..256)
-                  ACCESS  read-write
-                  STATUS  mandatory
-                  DESCRIPTION
-                          "The value of the encapsulation type.  For
-                          IP encapsulation this will have a value of
-                          204 (hex CC).  For SNAP encapsulated
-                          packets, this will have a value of 128 (hex
-                          80).  For CLNP, ISO 8473, this will have a
-                          value of 129 (hex 81).  For ES-ES, ISO 9542,
-                          this will have a value of 130 (hex 82).  A
-                          value of 197 (hex C5) identifies the Blacker
-                          X.25 encapsulation.  A value of 0,
-                          identifies the Null encapsulation.
-
-                          This value can only be written when the
-                          mioxPeerStatus object with the same
-                          mioxPeerIndex has a value of underCreation.
-                          Setting this object to a value of 256
-                          deletes the entry.  When deleting an entry,
-                          all other entries in the mioxPeerEncTable
-                          with the same mioxPeerIndex and with an
-                          mioxPeerEncIndex higher then the deleted
-                          entry, will all have their mioxPeerEncIndex
-                          values decremented by one."
-                  ::= { mioxPeerEncEntry 2 }
-
-          -- ###########################################################
-
-          END
--- a/usr/src/cmd/agents/snmp/mib/snm/mib_ALARM.snm	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   ALARM-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       ;
-
---   alarm MODULE-IDENTITY
---       LAST-UPDATED "9508170000Z"
---       ORGANIZATION "SunSoft"
---       CONTACT-INFO
---         "        Olivier Reisacher
---
---          Postal: ICNC SunSoft, Inc.
---                  32 chemin du vieux chene
---                  38240 MEYLAN
---                  France
---
---          Tel: (33) 76 41 42 46
---          Fax: (33) 76 41 42 41
---
---          E-Mail: oreisach@france.sun.com"
---       DESCRIPTION
---         "The MIB module describing variables used in SNMP traps"
---       ::= { private-mibs 3 }
-
-internet      OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
-directory     OBJECT IDENTIFIER ::= { internet 1 }
-mgmt          OBJECT IDENTIFIER ::= { internet 2 }
-experimental  OBJECT IDENTIFIER ::= { internet 3 }
-private       OBJECT IDENTIFIER ::= { internet 4 }
-enterprises   OBJECT IDENTIFIER ::= { private 1 }
-mib-2         OBJECT IDENTIFIER ::= { mgmt 1 }
-sun           OBJECT IDENTIFIER ::= { enterprises 42 }
-messaging     OBJECT IDENTIFIER ::= { sun 2 8 }
-private-mibs  OBJECT IDENTIFIER ::= { messaging 2 }
-alarm         OBJECT IDENTIFIER ::= { private-mibs 3 }
-
-
-   alarmId OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The integer that identifies an alarm."
-       ::= {alarm 1}
-
-   alarmSeverity OBJECT-TYPE
-       SYNTAX INTEGER {
-         low(1),
-         medium(2),
-         high(3)
-       }
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The severity of an alarm."
-       ::= {alarm 2}
-
-   alarmDescr OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A description of the alarm."
-       ::= {alarm 3}
-
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/snm/mib_X4GRP.snm	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   X4GRP-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       ;
-
---   x4grp MODULE-IDENTITY
---       LAST-UPDATED "9508170000Z"
---       ORGANIZATION "SunSoft"
---       CONTACT-INFO
---         "        Olivier Reisacher
---
---          Postal: ICNC SunSoft, Inc.
---                  32 chemin du vieux chene
---                  38240 MEYLAN
---                  France
---
---          Tel: (33) 76 41 42 46
---          Fax: (33) 76 41 42 41
---
---          E-Mail: oreisach@france.sun.com"
---       DESCRIPTION
---         "The MIB module describing X.400 Groups of Users"
---       ::= { private-mibs 2 }
-
-internet      OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
-directory     OBJECT IDENTIFIER ::= { internet 1 }
-mgmt          OBJECT IDENTIFIER ::= { internet 2 }
-experimental  OBJECT IDENTIFIER ::= { internet 3 }
-private       OBJECT IDENTIFIER ::= { internet 4 }
-enterprises   OBJECT IDENTIFIER ::= { private 1 }
-mib-2         OBJECT IDENTIFIER ::= { mgmt 1 }
-sun           OBJECT IDENTIFIER ::= { enterprises 42 }
-messaging     OBJECT IDENTIFIER ::= { sun 2 8 }
-private-mibs  OBJECT IDENTIFIER ::= { messaging 2 }
-x4grp         OBJECT IDENTIFIER ::= { private-mibs 2 }
-
---
---	x4grpTable
---
-
-   x4grpTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4grpEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information specific to a X.400 Group of Users."
-       ::= {x4grp 1}
-
-   x4grpEntry OBJECT-TYPE
-       SYNTAX X4grpEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each X.400 Group of Users."
-       INDEX {x4grpIndex}
-       ::= {x4grpTable 1}
-
-   X4grpEntry ::= SEQUENCE {
-       x4grpIndex
-         INTEGER,
-       x4grpName
-         DisplayString
-   }
-
-   x4grpIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A integer that uniquely identify an X.400 Group of Users."
-       ::= {x4grpEntry 1}
-
-   x4grpName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The name of the X.400 Group of Users."
-       ::= {x4grpEntry 2}
-
-
---
---	x4grpMappingTable
---
-
-   x4grpMappingTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4gMappingEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "This table allows to correlate the x4grpTable, msUserTable,
-         and the mtaGroupTable."
-       ::= {x4grp 2}
-
-   x4grpMappingEntry OBJECT-TYPE
-       SYNTAX X4gMappingEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each User."
-       INDEX {x4grpIndex, x4grpMappingMSIndex, x4grpMappingMTAIndex}
-       ::= {x4grpMappingTable 1}
-
-   X4gMappingEntry ::= SEQUENCE {
-       x4grpMappingMSIndex
-         INTEGER,
-       x4grpMappingMTAIndex
-         INTEGER
-   }
-
-   x4grpMappingMSIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of msUserIndex."
-       ::= {x4grpMappingEntry 1}
-
-   x4grpMappingMTAIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The value of mtaGroupIndex."
-       ::= {x4grpMappingEntry 2}
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/snm/mib_X4MS.snm	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,657 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   X4MS-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-       DisplayString
-         FROM SNMPv2-TC
---       DistinguishedName
---         FROM APPLICATION-MIB
-       ; 
- 
---   x4ms MODULE-IDENTITY
---       LAST-UPDATED "9508170000Z"
---       ORGANIZATION "SunSoft"
---       CONTACT-INFO
---         "        Olivier Reisacher
---
---          Postal: ICNC SunSoft, Inc.
---                  32 chemin du vieux chene
---                  38240 MEYLAN
---                  France
---
---          Tel: (33) 76 41 42 46
---          Fax: (33) 76 41 42 41
---
---          E-Mail: oreisach@france.sun.com"
---       DESCRIPTION
---         "This MIB module is used to monitor the Solstice X.400
---          Message Store.
---
---          Implementation choice:
---            I decided to add a single entry in the applTable to
---            monitor the whole X.400 MS process even through it may
---            serves several users. That is why I introduced the an
---            x4msUserTable that contains an entry for every MS User.
---            This is in line with the X.400 concepts of one
---            MS entity per user."
---       ::= { private-mibs 1 }
-
-internet      OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
-directory     OBJECT IDENTIFIER ::= { internet 1 }
-mgmt          OBJECT IDENTIFIER ::= { internet 2 }
-experimental  OBJECT IDENTIFIER ::= { internet 3 }
-private       OBJECT IDENTIFIER ::= { internet 4 }
-enterprises   OBJECT IDENTIFIER ::= { private 1 }
-mib-2         OBJECT IDENTIFIER ::= { mgmt 1 }
-sun           OBJECT IDENTIFIER ::= { enterprises 42 }
-messaging     OBJECT IDENTIFIER ::= { sun 2 8 }
-private-mibs  OBJECT IDENTIFIER ::= { messaging 2 }
-x4ms          OBJECT IDENTIFIER ::= { private-mibs 1 }
-
-
---
---	x4msMtaTable
---
-
-   x4msMtaTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4msMtaEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The Solstice X.400 Message Store can have associations
-          with a limited set of MTAs. All these MTAs are
-          registered in this table."
-       ::= {x4ms 1}
-
-   x4msMtaEntry OBJECT-TYPE
-       SYNTAX X4msMtaEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MTA."
-       INDEX {x4msMtaIndex}
-       ::= {x4msMtaTable 1}
-
-   X4msMtaEntry ::= SEQUENCE {
-       x4msMtaIndex
-         INTEGER,
-       x4msMtaName
-         DisplayString
-   }
-
-   x4msMtaIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A integer that uniquely identifies the MTA."
-       ::= {x4msMtaEntry 1}
-
-   x4msMtaName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The name of the MTA:
-         example: Local/Remote $MTANAME on IP = $HOSTNAME"
-       ::= {x4msMtaEntry 2}
-
-
---
---	x4msUserTablePart1
---
-
-   x4msUserTablePart1 OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4msUserEntryPart1
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information about all MS Users."
-       ::= {x4ms 2}
-
-   x4msUserEntryPart1 OBJECT-TYPE
-       SYNTAX X4msUserEntryPart1
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MS User."
-       INDEX {x4msUserIndex}
-       ::= {x4msUserTablePart1 1}
-
-   X4msUserEntryPart1 ::= SEQUENCE {
-       x4msUserIndex
-         INTEGER,
-       x4msUserMessages
-         Gauge32,
-       x4msUserVolume
-         Gauge32,
-       x4msUserP3Associations
-         Gauge32,
-       x4msUserP7Associations
-         Gauge32,
-       x4msUserLastP7Association
---         TimeInterval,
-         INTEGER,
-       x4msUserAuthentificationsFailures
-         Counter32,
-       x4msUserAuthentificationFailureReason
-         DisplayString,
-       x4msUserName
-         DisplayString
-   }
-
-   x4msUserIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "An integer that uniquely identifies a MS User."
-       ::= {x4msUserEntryPart1 1}
-
-   x4msUserTotalMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of messages stored in the MS User's mailbox."
-       ::= {x4msUserEntryPart1 2}
-
-   x4msUserTotalVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total volume of messages stored in the MS User's mailbox."
-       ::= {x4msUserEntryPart1 3}
-
-   x4msUserP3Associations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P3 associations with the MTA."
-       ::= {x4msUserEntryPart1 4}
-
-   x4msUserP7Associations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P7 associations."
-       ::= {x4msUserEntryPart1 5}
-
-   x4msUserLastP7Association OBJECT-TYPE
---       SYNTAX TimeInterval
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this MS had a P7 association."
-       ::= {x4msUserEntryPart1 6}
-
-   x4msUserAuthentificationFailures OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of authentifictaion failures that occurred
-         since the MS initialization (Security Violation)."
-       ::= {x4msUserEntryPart1 7}
-
-   x4msUserAuthentificationFailureReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "A string describing the last authentification reason.
-         If no authentification failure occurred since the MS was
-         initialized the value should be 'never'."
-       ::= {x4msUserEntryPart1 8}
-
-   x4msUserName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The Name of the MS User."
-       ::= {x4msUserEntryPart1 9}
-
-
---
---	x4msUserTablePart2
---
-
-   x4msUserTablePart2 OBJECT-TYPE
-       SYNTAX SEQUENCE OF X4msUserEntryPart2
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding detailed statistics about the messages
-          stored in an MS User mailbox.
-          To access the information stored in this table, the manager
-          will have to do an SNMP GET request and specify a valid x4msUserIndex.
-          A manager will not be able to do an SNMP GET-NEXT request
-          on this table (an empty table is returned)."
-       ::= {x4ms 3}
-
-   x4msUserEntryPart2 OBJECT-TYPE
-       SYNTAX X4msUserEntryPart2
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry associated with each MS User."
-       INDEX {x4msUserIndex}
-       ::= {x4msUserTablePart2 1}
-
-   X4msUserEntryPart2 ::= SEQUENCE {
-       x4msUserNewMessages
-         Gauge32,
-       x4msUserNewVolume
-         Gauge32,
-       x4msUserListedMessages
-         Gauge32,
-       x4msUserListedVolume
-         Gauge32,
-       x4msUserProcessedMessages
-         Gauge32,
-       x4msUserProcessedVolume
-         Gauge32,
-       x4msUserMessagesOlderThanWeek
-         Gauge32,
-       x4msUserVolumeOlderThanWeek
-         Gauge32,
-       x4msUserMessagesOlderThanMonth
-         Gauge32,
-       x4msUserVolumeOlderThanMonth
-         Gauge32,
-       x4msUserMessagesOlderThanYear
-         Gauge32,
-       x4msUserVolumeOlderThanYear
-         Gauge32,
-       x4msUserP3InboundAssociations
-         Gauge32,
-       x4msUserP7InboundAssociations
-         Gauge32,
-       x4msUserP3OutboundAssociations
-         Gauge32,
-       x4msUserAccumulatedP3InboundAssociations
-         Counter32,
-       x4msUserAccumulatedP7InboundAssociations
-         Counter32,
-       x4msUserAccumulatedP3OutboundAssociations
-         Counter32,
-       x4msUserLastP3InboundActivity
---         TimeInterval,
-         INTEGER,
-       x4msUserLastP7InboundActivity
---         TimeInterval,
-         INTEGER,
-       x4msUserLastP3OutboundActivity
---         TimeInterval,
-         INTEGER,
-       x4msUserRejectedP3InboundAssociations
-         Counter32,
-       x4msUserRejectedP7InboundAssociations
-         Counter32,
-       x4msUserFailedP3OutboundAssociations
-         Counter32,
-       x4msUserP3InboundRejectionReason
-         DisplayString,
-       x4msUserP7InboundRejectionReason
-         DisplayString,
-       x4msUserP3OutboundConnectFailureReason
-         DisplayString,
-       x4msUserMtaIndex
-         INTEGER,
-       x4msUserORName
---         DistinguishedName
-         DisplayString
-   }
-
-   x4msUserNewMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages whose Entry-Status is new(0)
-         and currently stored in the MS User's mailbox.
-         (see Entry-Status of a Message, CCITT X.413 page 463)"
-       ::= {x4msUserEntryPart2 1}
-
-   x4msUserNewVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of messages whose Entry-Status is new(0)
-         and currently stored in the MS User's mailbox.
-         (see Content-Length of a Message, CCITT X.413 page 461)"
-       ::= {x4msUserEntryPart2 2}
-
-   x4msUserListedMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages whose Entry-Status is listed(1)
-         and currently stored in the MS User's mailbox.
-         (see Entry-Status of a Message, CCITT X.413 page 463)"
-       ::= {x4msUserEntryPart2 3}
-
-   x4msUserListedVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of messages whose Entry-Status is listed(1)
-         and currently stored in the MS User's mailbox.
-         (see Content-Length of a Message, CCITT X.413 page 461)"
-       ::= {x4msUserEntryPart2 4}
-
-   x4msUserProcessedMessages OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages whose Entry-Status is processed(2)
-         and currently stored in the MS User's mailbox.
-         (see Entry-Status of a Message, CCITT X.413 page 463)"
-       ::= {x4msUserEntryPart2 5}
-
-   x4msUserProcessedVolume OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of messages whose Entry-Status is processed(2)
-         and currently stored in the MS User's mailbox.
-         (see Content-Length of a Message, CCITT X.413 page 461)"
-       ::= {x4msUserEntryPart2 6}
-
-   x4msUserMessagesOlderThanWeek OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages older than a week in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 7}
-
-   x4msUserVolumeOlderThanWeek OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of the messages older than a week in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 8}
-
-   x4msUserMessagesOlderThanMonth OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages older than a month (30 days) in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 9}
-
-   x4msUserVolumeOlderThanMonth OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of the messages older than a month (30 days) in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 10}
-
-   x4msUserMessagesOlderThanYear OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of messages older than a year (365 days) in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 11}
-
-   x4msUserVolumeOlderThanYear OBJECT-TYPE
-       SYNTAX Gauge32
-       UNITS "K-octets"
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The volume of the messages older than a year (365 days) in the
-         MS User's mailbox.
-         (see Creation-Time of a Message, CCITT X.413 page 462)"
-       ::= {x4msUserEntryPart2 12}
-
-   x4msUserP3InboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P3 associations with the MTA, where the
-         MS is the responder."
-       ::= {x4msUserEntryPart2 13}
-
-   x4msUserP7InboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P7 associations with the MS, where the
-         MS is the responder."
-       ::= {x4msUserEntryPart2 14}
-
-   x4msUserP3OutboundAssociations OBJECT-TYPE
-       SYNTAX Gauge32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of current P3 associations with the MS, where the
-         MS is the initiator."
-       ::= {x4msUserEntryPart2 15}
-
-   x4msUserAccumulatedP3InboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of P3 associations with the MTA, where the
-         MS is the responder."
-       ::= {x4msUserEntryPart2 16}
-
-   x4msUserAccumulatedP7InboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of P7 associations with the MS, where the
-         MS the responder."
-       ::= {x4msUserEntryPart2 17}
-
-   x4msUserAccumulatedP3OutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The total number of associations with the MS, where the
-         MS is the initiator."
-       ::= {x4msUserEntryPart2 18}
-
-   x4msUserLastP3InboundActivity OBJECT-TYPE
---       SYNTAX TimeInterval
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this MS had a P3 inbound
-         association."
-       ::= {x4msUserEntryPart2 19}
-
-   x4msUserLastP7InboundActivity OBJECT-TYPE
---       SYNTAX TimeInterval
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this MS had a P7 inbound
-         association."
-       ::= {x4msUserEntryPart2 20}
-
-   x4msUserLastP3OutboundActivity OBJECT-TYPE
---       SYNTAX TimeInterval
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Time since the last time that this MS had a P3 outbound
-         association."
-       ::= {x4msUserEntryPart2 21}
-
-   x4msUserRejectedP3InboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of P3 inbound associations this MS has rejected."
-       ::= {x4msUserEntryPart2 22}
-
-   x4msUserRejectedP7InboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of P7 inbound associations this MS has rejected."
-       ::= {x4msUserEntryPart2 23}
-
-   x4msUserFailedP3OutboundAssociations OBJECT-TYPE
-       SYNTAX Counter32
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The number of P3 outbound associations that failed."
-       ::= {x4msUserEntryPart2 24}
-
-   x4msUserP3InboundRejectionReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The reason of the rejection of the last P3 inbound
-         association."
-       ::= {x4msUserEntryPart2 25}
-
-   x4msUserP7InboundRejetionReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The reason of the rejection of the last P7 inbound
-         association."
-       ::= {x4msUserEntryPart2 26}
-
-   x4msUserP3OutboundConnectFailureReason OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The reason of the failure of the last P3 outbound
-         association."
-       ::= {x4msUserEntryPart2 27}
-
-   x4msUserMtaIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "A pointer to the MS MTA table."
-       ::= {x4msUserEntryPart2 28}
-
-   x4msUserORName OBJECT-TYPE
---       SYNTAX DistinguishedName
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The O/R Name of the MS User."
-       ::= {x4msUserEntryPart2 29}
-
---
---	x4msUserAssociationTable
---
-
-   x4msUserAssociationTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF MsUserAssociationEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table holding information regarding the associations
-          for each MS User."
-       ::= {x4ms 4}
-
-   x4msUserAssociationEntry OBJECT-TYPE
-       SYNTAX MsUserAssociationEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The entry holding information regarding the associations
-          for each MS User."
-       INDEX {x4msUserIndex, x4msUserAssociationIndex}
-       ::= {x4msUserAssociationTable 1}
-
-   MsUserAssociationEntry ::= SEQUENCE {
-       x4msUserAssociationIndex
-           INTEGER
-   }
-
-   x4msUserAssociationIndex OBJECT-TYPE
-       SYNTAX INTEGER (1..2147483647)
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "Reference into association table to allow correlation of
-          this MS User's active associations with the association table."
-       ::= {x4msUserAssociationEntry 1}
-
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/snm/mib_X5DSA.snm	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
-   X5DSA-MIB DEFINITIONS ::= BEGIN
-
-   IMPORTS
-       OBJECT-TYPE, Counter32, Gauge32
-         FROM SNMPv2-SMI
-       DisplayString
-         FROM SNMPv2-TC
---       DistinguishedName
---         FROM APPLICATION-MIB;
-       ;
-
---   x5dsa MODULE-IDENTITY
---       LAST-UPDATED "9508170000Z"
---       ORGANIZATION "SunSoft"
---       CONTACT-INFO
---         "        Olivier Reisacher
---
---          Postal: ICNC SunSoft, Inc.
---                  32 chemin du vieux chene
---                  38240 MEYLAN
---                  France
---
---          Tel: (33) 76 41 42 46
---          Fax: (33) 76 41 42 41
---
---          E-Mail: oreisach@france.sun.com"
---       DESCRIPTION
---         "This MIB module is used to monitor the Solstice X.500 DSA."
---       ::= { private-mibs 4 }
-
-internet      OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
-directory     OBJECT IDENTIFIER ::= { internet 1 }
-mgmt          OBJECT IDENTIFIER ::= { internet 2 }
-experimental  OBJECT IDENTIFIER ::= { internet 3 }
-private       OBJECT IDENTIFIER ::= { internet 4 }
-enterprises   OBJECT IDENTIFIER ::= { private 1 }
-mib-2         OBJECT IDENTIFIER ::= { mgmt 1 }
-sun           OBJECT IDENTIFIER ::= { enterprises 42 }
-messaging     OBJECT IDENTIFIER ::= { sun 2 8 }
-private-mibs  OBJECT IDENTIFIER ::= { messaging 2 }
-x5dsa         OBJECT IDENTIFIER ::= { private-mibs 4 }
-
-
---
---	x5dsaReferenceTable
---
-
-   x5dsaReferenceTable OBJECT-TYPE
-       SYNTAX SEQUENCE OF X5dsaReferenceEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "The table of references of the Solstice X.500 DSA."
-       ::= {x5dsa 1}
-
-   x5dsaReferenceEntry OBJECT-TYPE
-       SYNTAX X5dsaReferenceEntry
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A reference."
-       INDEX {x5dsaReferenceIndex}
-       ::= {x5dsaReferenceTable 1}
-
-   X5dsaReferenceEntry ::= SEQUENCE {
-       x5dsaReferenceIndex
-         INTEGER,
-       x5dsaReferenceType
-         INTEGER,
-       x5dsaReferenceNamingContext
---         DistinguishedName,
-         DisplayString,
-       x5dsaReferenceSubordinate
---         DistinguishedName,
-         DisplayString,
-       x5dsaReferenceName
-         DisplayString
-   }
-
-   x5dsaReferenceIndex OBJECT-TYPE
-       SYNTAX INTEGER
-       MAX-ACCESS not-accessible
-       STATUS current
-       DESCRIPTION
-         "A integer that uniquely identifies a reference."
-       ::= {x5dsaReferenceEntry 1}
-
-   x5dsaReferenceType OBJECT-TYPE
-       SYNTAX INTEGER {
-         superior(1),
-         cross(2),
-         subordinate(3),
-         non-specific-subordinate(4)
-       }
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The type of the reference."
-       ::= {x5dsaReferenceEntry 2}
-
-   x5dsaReferenceNamingContext OBJECT-TYPE
---       SYNTAX DistinguishedName
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The naming context of the reference.
-          This field is valid for the following reference types:
-          - cross(2),
-          - subordinate(3),
-          - non-specific-subordinate(4)"
-       ::= {x5dsaReferenceEntry 3}
-
-   x5dsaReferenceSubordinate OBJECT-TYPE
---       SYNTAX DistinguishedName
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The subordinate of the reference.
-          This field is valid for the following reference types:
-          - subordinate(3)"
-       ::= {x5dsaReferenceEntry 4}
-
-   x5dsaReferenceName OBJECT-TYPE
-       SYNTAX DisplayString
-       MAX-ACCESS read-only
-       STATUS current
-       DESCRIPTION
-         "The name of the MTA:
-         example: DSA $DSANAME on IP = $HOSTNAME"
-       ::= {x5dsaReferenceEntry 5}
-
-
-   END
-
--- a/usr/src/cmd/agents/snmp/mib/snmpdx.mib	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,542 +0,0 @@
---
--- CDDL HEADER START
---
--- The contents of this file are subject to the terms of the
--- Common Development and Distribution License, Version 1.0 only
--- (the "License").  You may not use this file except in compliance
--- with the License.
---
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- or http://www.opensolaris.org/os/licensing.
--- See the License for the specific language governing permissions
--- and limitations under the License.
---
--- When distributing Covered Code, include this CDDL HEADER in each
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
--- If applicable, add the following below this CDDL HEADER, with the 
--- fields enclosed by brackets "[]" replaced with your own identifying
--- information: Portions Copyright [yyyy] [name of copyright owner]
---
--- CDDL HEADER END
---
--- Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.
--- Use is subject to license terms.
---
--- #ident	"%Z%%M%	%I%	%E% SMI"
---
-
---
--- --------------------------------------------------------------------------
--- snmpdx.mib
---      MIB for the SNMP Master Agent included with Solstice Enterprise Agents
---
--- Release version = 1.0
--- Patch level     = 0
--- --------------------------------------------------------------------------
---
-
-SUN-MASTER-AGENT-MIB DEFINITIONS ::= BEGIN
-
-  IMPORTS
-	enterprises
-		FROM RFC1155-SMI
-	OBJECT-TYPE, DisplayString
-		FROM RFC1212;
-  sun 	OBJECT IDENTIFIER ::= { enterprises 42 }
-  products OBJECT IDENTIFIER ::= { sun 2 }
-  sunMasterAgent 	OBJECT IDENTIFIER ::= { products 15 }
-
-
---
--- ********** Global Master agent Information ******
---
-
-  sunMasterAgentStatusFile	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"This file stores the process id's of all the sub agents
-		 that are invoked by the master agent.
-		 The purpose of this file is for Master Agent recovery in
-		 case the Master Agent dies or is killed. When the Master
-		 Agent restarts, the entries in this file will indicate
-		 which subagents are spawned by it previously and what
-		 were their port numbers." 
-	::= { sunMasterAgent 1 }
-
-  sunMasterAgentResourceConfigFile	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"This file is exclusively used by the Master Agent.
-		 When the Master Agent comes up, it reads this file.
-		 This files stores information for all those agents
-		 that can be managed by the Master Agent. Each entry
-		 in the configuration file also includes the methods
-		 for invoking these subagents. It is also possible for
-		 a subagent not to have an entry in this configuration
-		 file. Such a subagent can dynamically come up and
-		 register with the Master Agent when it comes up."
-	::= { sunMasterAgent 2 }
-
-  sunMasterAgentConfigurationDir	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"This is the directory that contains the configuration
-		 files for the Master Agent."
-	::= { sunMasterAgent 3 }
-
-  sunMasterAgentTrapPort	OBJECT-TYPE
-	SYNTAX	INTEGER 
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"This is the port that master agent opens to receive SNMP trap
-		 notifications from various subagents. The master agent 
-		 forwards these traps to the managers appropriately."
-	::= { sunMasterAgent 4 }
-
-  sunCheckSubAgentName OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"This variable is of use to the sub agents only. It is
-		 used by the sub agents to check with the master agent
-		 to  check for duplicate sub agent names."
-	::= { sunMasterAgent 5 }
-
-  sunMasterAgentPollInterval OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"This variable speicifies the time interval after which
-		 the Master Agent will perform activities other than
-		 receiving/sending of SNMP messages. The other activities
-		 include trying to find out if there is a change in the
-		 resource file, discover if all the agents are responding,
-		 and other such routine house keeping activities.
- 		 This field contains values in seconds."
-	::= { sunMasterAgent 6 }
-
-  sunMasterAgentMaxAgentTimeOut OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The value of this field can be specified in microseconds.
-		 This field signifies the max allowed time-out a subagent
-		 can request during registration; e.g., when the Master
-		 Agent sends a request to a subagent. It waits for some
-		 time-out to receive the response. This time-out can be
-		 specified in the registration file or can also be set
-		 using dynamic registration. If an agent sets this time-out
-		 outrageously high, it can create problems for the
-		 Master Agent and other agents. To avoid such a problem,
-		 the Master Agent can have a policy of specifying a
-		 maximum value for which the Master Agent will wait for
-		 a response from the subagent. This maximum value of
-		 time-out is specified with this variable."
-	::= { sunMasterAgent 7 }
-
---
--- *********** agentTable **************
---
-  sunSubAgentTable	OBJECT-TYPE
-	SYNTAX	SEQUENCE OF SunSubAgentEntry
-	ACCESS	not-accessible
-	STATUS	mandatory
-	DESCRIPTION
-		"This table lists all the sub-agents that are registered
-		 with the master agent. The list contains the names of all
-		 the sub agents that are currently running on the system.
-		 Some of these sub agents could be invoked by the master
-		 agent and other's could have benn invoked by other means."
-	::= { sunMasterAgent 8 }
-
-  sunSubAgentTableIndex	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The next available index in sunSubAgentTable."
-	::= { sunMasterAgent 9 }
-
---
--- ************** agentEntry(Table Entry) ************
---
-  sunSubAgentEntry 	OBJECT-TYPE
-	SYNTAX	SunSubAgentEntry
-	ACCESS	not-accessible
-	STATUS	mandatory
-	DESCRIPTION	
-		"An entry in the sub-agent table."
-	INDEX { sunSubAgentID }
-	::= { sunSubAgentTable 1}
-
-  SunSubAgentEntry ::=
-	SEQUENCE {
-		sunSubAgentID
-			INTEGER,
-		sunSubAgentStatus
-			INTEGER,
-		sunSubAgentTimeout
-			INTEGER,
-		sunSubAgentPortNumber
-			INTEGER,
-		sunSubAgentRegistrationFile
-			DisplayString,
-		sunSubAgentAccessControlFile
-			DisplayString,
-		sunSubAgentExecutable
-			DisplayString,
-		sunSubAgentVersionNum
-			DisplayString,
-		sunSubAgentProcessID
-			INTEGER,
-		sunSubAgentName
-			DisplayString,
-  		sunSubAgentSystemUpTime
-			TimeTicks,
-		sunSubAgentWatchDogTime
-			INTEGER
-	}
-
-
-  sunSubAgentID 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"This is the id for each sub agent that is running and
-		 registered with the master agent."
-	::= { sunSubAgentEntry 1 }
-
-  sunSubAgentStatus 	OBJECT-TYPE
-	SYNTAX	INTEGER { init(1), load(2), active(3), inactive(4), destroy(5) }
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"This variable provides the state of the sub-agent. When the
-		 sub-agent is started the state is 'init'. Once the sub-agent
-		 has read it's configuration files, but has not registered
-		 with the master , the state is 'load'. After the 'load'
-		 state the  sub-agent goes into 'active' state. In this state
-		 the sub-agent has registered with the master agent and
-		 would respond to any requests from the master agent and can
-		 also generate traps."
-	::= { sunSubAgentEntry 2 }
-
-  sunSubAgentTimeout 	OBJECT-TYPE
-	SYNTAX	INTEGER 
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The max. time for which the master agent would wait
-		 for a  sub-agent to complete the request. The value is
-		 specified in usec. "
-	::= { sunSubAgentEntry 3 }
-
-  sunSubAgentPortNumber 	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The port number of the sub-agent on which it listens for
-		 requests from the master agent."
-	::= { sunSubAgentEntry 4 }
-
-  sunSubAgentRegistrationFile 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"This is the registration file of a sub-agent. Each sub-agent
-		 has its own registration file. This file contains information
-		 pertinent to each agent. The information includes the name
-		 of the agent, the subtree OIDs managed by the respective
-		 agent, request time out, the preferred port number, etc."
-	::= { sunSubAgentEntry 5 }
-
-  sunSubAgentAccessControlFile 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"This is a file that has the access control information
-		 for each sub agent. It stores SNMP-related community
-		 information. Every subagent and a Master Agent can have
-		 its own access control file."
-	::= { sunSubAgentEntry 6 }
-
-  sunSubAgentExecutable 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The executable file of the sub-agent."
-	::= { sunSubAgentEntry 7 }
-  
-  sunSubAgentVersionNum 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The version number  of the sub-agent."
-	::= { sunSubAgentEntry 8 }
-
-  sunSubAgentProcessID 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The process id of the sub-agent."
-	::= { sunSubAgentEntry 9 }
-
-  sunSubAgentName 	OBJECT-TYPE
-	SYNTAX	DisplayString
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The name of the sub-agent. This is assigned by the user."
-	::= { sunSubAgentEntry 10 }
-
-  sunSubAgentSystemUpTime 	OBJECT-TYPE
-	SYNTAX	TimeTicks
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The system up time of the sub-agent."
-	::= { sunSubAgentEntry 11 }
-
-  sunSubAgentWatchDogTime 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"This timeout is used by the Master Agent to determine
-		 if the subagent is up or not. The Master Agent will poll
-		 the subagent only if there has been no activity between
-		 the Master Agent and the subagent for this specified
-		 interval. This interval is specified in seconds."
-	::= { sunSubAgentEntry 12 }
-
-
-
---
--- ********** SubTreeConfigurationTable ****************
---
-  sunSubTreeConfigurationTable        OBJECT-TYPE
-        SYNTAX SEQUENCE OF SunSubTreeConfigurationEntry
-        ACCESS not-accessible
-        STATUS mandatory
-        DESCRIPTION
-                "This is the table of subtree registration requests made
-		 by the sub agents. The enteries in this table also include
-		 the sub tree OID's of those agents that are invkoed by
-		 the master agent. This table thus consists of enteries
-		 as configured in the sub agent registration files. These
-		 sub tree OID's are flattened into a OID sub tree dispatch
-		 table in the master agent which is also defined in this MIB."
-        ::= { sunMasterAgent 10 }
-
-  sunSubTreeConfigurationTableIndex	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The next available index in sunSubTreeConfigurationTable."
-	::= { sunMasterAgent 11 }
-
---
--- ************** RegTreeEntry(Table Entry) ************
---
-  sunSubTreeConfigurationEntry        OBJECT-TYPE
-        SYNTAX SunSubTreeConfigurationEntry
-        ACCESS  not-accessible
-        STATUS  mandatory
-        DESCRIPTION
-                "An entry for table registration."
-        INDEX { sunSubTreeAgentID, sunSubTreeIndex }
-        ::= { sunSubTreeConfigurationTable 1 }
-
-  SunSubTreeConfigurationEntry ::=
-        SEQUENCE {
-		sunSubTreeIndex
-			INTEGER,
-		sunSubTreeAgentID
-			INTEGER,
-		sunSubTreeOID
-			OBJECT IDENTIFIER,
-		sunSubTreeStartColumn
-			INTEGER,
-		sunSubTreeEndColumn
-			INTEGER,
-		sunSubTreeStartRow
-			INTEGER,
-		sunSubTreeEndRow
-			INTEGER,
---		sunSubTreeView
---			DisplayString,
-		sunSubTreeStatus
-			INTEGER
-	}
-
-  sunSubTreeIndex 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The index of the table registration."
-	::= { sunSubTreeConfigurationEntry 1 }
-
-  sunSubTreeAgentID 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"ID of the sub-agent."
-	::= { sunSubTreeConfigurationEntry  2 }
-
-  sunSubTreeOID 	OBJECT-TYPE
-	SYNTAX	OBJECT IDENTIFIER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The oid of the subtree table that is being registered. A
-		 sub agent can have multiple sub tree oid's registered
-		 as seperate enteries."
-	::= { sunSubTreeConfigurationEntry 3 }
-
-  sunSubTreeStartColumn 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"Starting column of the sub table."
-	::= { sunSubTreeConfigurationEntry  4 }
-
-  sunSubTreeEndColumn 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"Ending column of the sub table."
-	::= { sunSubTreeConfigurationEntry  5 }
-
-  sunSubTreeStartRow 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"Starting row of the sub table."
-	::= { sunSubTreeConfigurationEntry  6 }
-
-  sunSubTreeEndRow 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"Ending row of the sub table."
-	::= { sunSubTreeConfigurationEntry  7 }
-
-
-  sunSubTreeStatus 	OBJECT-TYPE
-	SYNTAX	INTEGER { active(1), inactive(2) }
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The variable allows to activate or delete the enteries
-		 in this table."
-	::= { sunSubTreeConfigurationEntry 8 }
-
---
--- ********** RegTreeTable ****************
---
-  sunSubTreeDispatchTable        OBJECT-TYPE
-        SYNTAX SEQUENCE OF SunSubTreeDispatchEntry
-        ACCESS not-accessible
-        STATUS mandatory
-        DESCRIPTION
-                "This table lists all the OID enteries that are
-		 used by the master agent to dispatch the requests to the
-		 sub agents. This table is based on the sub-tree
-		 registration configured in the sub agents registration
-		 files."
-        ::= { sunMasterAgent 12 }
-
-  sunSubTreeDispatchTableIndex	OBJECT-TYPE
-	SYNTAX	INTEGER (0..65535)
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The next available index in sunSubTreeDispatchTable."
-	::= { sunMasterAgent 13 }
-
-
---
--- ************** Dispatch Table ************
---
-  sunSubTreeDispatchEntry        OBJECT-TYPE
-        SYNTAX SunSubTreeDispatchEntry
-        ACCESS  not-accessible
-        STATUS  mandatory
-        DESCRIPTION
-                "An entry for tree registration."
-        INDEX { sunSubTreeDispatchAgentID, sunSubTreeDispatchIndex }
-        ::= { sunSubTreeDispatchTable 1 }
-
-  SunSubTreeDispatchEntry ::=
-        SEQUENCE {
-		sunSubTreeDispatchIndex
-			INTEGER,
-		sunSubTreeDispatchAgentID
-			INTEGER,
-		sunSubTreeDispatchOID
-			OBJECT IDENTIFIER,
-		sunSubTreeDispatchStatus
-			INTEGER
-	}
-
-
-  sunSubTreeDispatchIndex 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		"The index of the dispatch table entry."
-	::= { sunSubTreeDispatchEntry 1 }
-
-  sunSubTreeDispatchAgentID 	OBJECT-TYPE
-	SYNTAX	INTEGER
-	ACCESS	read-only
-	STATUS	mandatory
-	DESCRIPTION
-		""
-	::= { sunSubTreeDispatchEntry  2 }
-
-  sunSubTreeDispatchOID 	OBJECT-TYPE
-	SYNTAX	OBJECT IDENTIFIER
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The oid of the subtree."
-	::= { sunSubTreeDispatchEntry 3 }
-
-
-  sunSubTreeDispatchStatus 	OBJECT-TYPE
-	SYNTAX	INTEGER { active(1), inactive(2) }
-	ACCESS	read-write
-	STATUS	mandatory
-	DESCRIPTION
-		"The variable allows to activate or delete the enteries
-		 in this table."
-	::= { sunSubTreeDispatchEntry 4 }
-
-
-END
--- a/usr/src/cmd/agents/snmp/parser/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-##############################################
-#
-# Makefile for parser
-#
-##############################################
-
-#
-# Makefile.vars
-#
-
-include ../../Makefile.vars
-
-include $(SRC)/cmd/Makefile.cmd
-
-TARGET=	mibcodegen
-
-# 
-OPTBIN = $(ROOT)/usr/bin
-OPTPROG = $(PROG:%=$(OPTBIN)/%)
-
-#
-# other variables
-#
-
-.KEEP_STATE:
-
-SOURCES.c=\
-	parse.c\
-	backend.c
-
-SOURCES.h=\
-	../snmplib/impl.h\
-	../snmplib/error.h\
-	../snmplib/asn1.h\
-	parse.h
-
-OBJECTS= $(SOURCES.c:%.c=$(BIN)/%.o)
-
-EXT = 1
-MYLIBS= ../snmplib/$(MACH)/libssasnmp.so.$(EXT)
-MYLINKLIBS += -L../snmplib -lssasnmp
-
-LIBS= -lsocket -lnsl
-
-DEFINES= -D$(TARG_SYS)
-
-CPPFLAGS += -I. -I../snmplib -I../../include/netmgt
-
-CFLAGS += -c 
-
-LDFLAGS += $(LDLIBS)
-
-LINT= lint
-
-MIB_HOME=	../mib
-
-MIBS=		$(MIB_HOME)/mib_core.txt $(MIB_HOME)/mib_example.txt
-
-LINTFLAGS= -aumx
-
-LINT=   lint
-
-CLOBBERFILES += $(TARGET)
-
-##############################################
-
-#
-# all
-#
-
-all: $(SOURCES.h) $(TARGET)
-
-install: all
-
-$(TARGET): $(BIN) $(OBJECTS) $(MYLIBS)
-	$(CC) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(MYLINKLIBS) $(LIBS)
-
-$(BIN)/%.o: %.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $*.c -o $@
-
-#
-# lint
-#
-
-lint:
-	$(LINT) $(CPPFLAGS) $(DEFINES) $(SOURCES.c)
-
-lintlib: $(BIN) $(LINTTARGET)
-
-$(LINTTARGET) : $(LINTOBJECTS)
-	$(LINT) $(LINTOBJECTS) -o $(LIBNAME)
-	mv llib-l$(LIBNAME).ln $(LINTTARGET)
-
-$(BIN)/%.ln: %.c
-	$(LINT) $(CPPFLAGS) $(DEFINES) $*.c -C $(BIN)/$*
-
-#
-# example
-#
-
-example:
-	$(TARGET) example $(MIBS);
-
-
-#
-# directories
-#
-
-$(BIN):
-	@$(TEST) -d $@ || mkdir $@
-
-
-#
-# clean
-#
-
-clean:
-	$(RM) $(OBJECTS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/agents/snmp/parser/backend.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3068 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/** HISTORY
- * 5-15-96	Jerry Yeung	replace the Integer to Integer*
- * 5-20-96	Jerry Yeung	add default_sec_config_file
- * 8-23-96	Jerry Yeung	change the default path
- * 8-27-96      Jerry Yeung	change oid_string
- * 9-06-96      Jiten Gaitonde  change cmd line usage
- * 10-21-96	Jerry Yeung	fix template-code
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-
-#include "impl.h"
-#include "error.h"
-#include "asn1.h"
-
-#include "parse.h"
-
-#define OBJECT			1
-#define COLUMN			2
-#define NODE			3
-#define TABLE			4
-#define ENTRY			5
-
-
-#define PRINT_OPEN_BRACKET fprintf(fp, "{\n");
-#define PRINT_TAG_OPEN_BRACKET fprintf(fp, "\t{\n");
-#define PRINT_CLOSE_BRACKET fprintf(fp, "}\n");
-#define PRINT_TAG_CLOSE_BRACKET fprintf(fp, "\t}\n");
-
-#define SET_PRINT_ENTRY_BLOCK \
-	fprintf(fp,"\tswitch(pass)\n");\
-	fprintf(fp,"\t{\n");\
-	fprintf(fp,"\t\tcase FIRST_PASS:\n\n");\
-	fprintf(fp,"\t\t\t/* check the existence of the element */\n");\
-	fprintf(fp,"\t\t\t/* which corresponds to the given index and */\n");\
-	fprintf(fp,"\t\t\t/* check the validity of the input value */\n");\
-	fprintf(fp,"\t\t\t/* if not valid or not exist, */\n\n");\
-	fprintf(fp,"\t\t\treturn SNMP_ERR_NOERROR;\n\n");\
-	fprintf(fp,"\t\tcase SECOND_PASS:\n\n");\
-	fprintf(fp,"\t\t\t/* change the following coding, such that */\n");\
-	fprintf(fp,"\t\t\t/* the input value will be stored in the */\n");\
-	fprintf(fp,"\t\t\t/* corresponding mib variable of the given */\n");\
-	fprintf(fp,"\t\t\t/* index */\n");
-
-
-#define PRINT_GET_STRING_DUMBY_BLOCK \
-	fprintf(fp, "\t/* It is required to allocate memory to the pointers */\n"); \
-	fprintf(fp, "\t/* inside the input argument */\n"); \
-	fprintf(fp, "\t/* Here, we assume that \"hello\" is the value of the mib variable */\n"); \
-	fprintf(fp, "\t/* please change it to the real one */\n\n"); \
-	fprintf(fp, "\tlen = strlen(\"hello\");\n"); \
-	fprintf(fp, "\tstr = (u_char*)calloc(len,sizeof(char));\n");  \
-	fprintf(fp, "\tif(str==NULL){\n"); \
-	fprintf(fp, "\t\treturn SNMP_ERR_GENERR;\n"); \
-	fprintf(fp, "\t}\n"); \
-	fprintf(fp, "\tmemcpy(str,\"hello\",len);\n\n"); \
-	fprintf(fp, "\t/*fill in the contents of the argument */\n\n"); \
-	fprintf(fp, "\t%s->chars = str;\n",current->label); \
-	fprintf(fp, "\t%s->len = len;\n",current->label); \
-	fprintf(fp, "\treturn SNMP_ERR_NOERROR;\n");
-
-#define PRINT_GET_OID_DUMBY_BLOCK \
-	fprintf(fp, "\t/* It is required to allocate memory to the pointers */\n");\
-	fprintf(fp, "\t/* inside the input argument */\n");\
-	fprintf(fp, "\t/* Here, we assume that \"1.3.6.1.4.1.42\" is the value */\n");\
-	fprintf(fp, "\t/* of the mib variable */\n");\
-	fprintf(fp, "\t/* please change it to the real one */\n\n");\
-	fprintf(fp, "\t/* 1.3.6.1.4.1.42 has 7 number separated by \".\" */\n");\
-	fprintf(fp, "\n");\
-	fprintf(fp, "\tlen =7 ;\n");\
-	fprintf(fp, "\tsub = (Subid*)calloc(len,sizeof(Subid));\n");\
-	fprintf(fp, "\tif(sub==NULL) return SNMP_ERR_GENERR;\n");\
-	fprintf(fp, "\tmemcpy(sub,fake_sub,len*sizeof(Subid));\n\n");\
-	fprintf(fp, "\t/* fill in the contents of the argument */\n\n");\
-	fprintf(fp, "\t%s->subids = sub;\n",current->label);\
-	fprintf(fp, "\t%s->len = len;\n",current->label);\
-	fprintf(fp, "\treturn SNMP_ERR_NOERROR;\n");
-
-#define PRINT_SET_CASE_BLOCK \
-	fprintf(fp, "\t\tcase FIRST_PASS:\n");\
-	fprintf(fp, "\n");\
-	fprintf(fp, "\t\t\t/* check the validity of the input argument */\n");\
-	fprintf(fp, "\t\t\t/* if not valid, return SNMP_GEN_ERROR */\n\n");\
-	fprintf(fp, "\t\t\treturn SNMP_ERR_NOERROR;\n\n");\
-	fprintf(fp, "\t\tcase SECOND_PASS:\n");\
-	fprintf(fp, "\t\t\t/* change the following coding, such that */\n");\
-	fprintf(fp, "\t\t\t/* the input value will be stored in the */\n");\
-	fprintf(fp, "\t\t\t/* corresponding mib variable */\n\n");
-
-
-#define PRINT_GET_CASE_BLOCK \
-	fprintf(fp, "\t/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */\n");\
-	fprintf(fp, "\t/* this function should modify the index argument to the */\n");\
-	fprintf(fp, "\t/* appropriate value */\n");\
-	fprintf(fp, "\tswitch(search_type)\n");\
-	fprintf(fp, "\t{\n");\
-	fprintf(fp, "\t\tcase FIRST_ENTRY:\n");\
-	fprintf(fp, "\t\t\t\t/* assume 1 is the first index */\n\n");\
-	fprintf(fp, "\t\t\t\tindex->value[0] = 1;\n");\
-	fprintf(fp, "\t\t\t\tindex->len = 1;\n");\
-	fprintf(fp, "\t\t\tbreak;\n\n");\
-	fprintf(fp, "\t\tcase NEXT_ENTRY:\n");\
-	fprintf(fp, "\t\t\t\tindex->value[0]++;\n");\
-	fprintf(fp, "\t\t\t\tif(index->value[0]>2)\n");\
-	fprintf(fp, "\t\t\t\t\treturn END_OF_TABLE;\n");\
-	fprintf(fp, "\t\t\tbreak;\n\n");\
-	fprintf(fp, "\t\tcase EXACT_ENTRY:\n");\
-	fprintf(fp, "\t\t\tbreak;\n");\
-	fprintf(fp, "\t}\n\n");
-
-/* trap support snmp oid */
-static Subid snmp_subids[] = { 1,3,6,1,2,1,11,(Subid)-1}; /* -1 is null(hack) */
-
-static char *base_name = NULL;
-
-static struct tree *root = NULL;
-
-extern int    trace_level;
-
-/*************************************************************************/
-
-static FILE* output_file(char* filename);
-static void application_end();
-
-static struct tree *find_node(struct tree *current, char *label);
-static int get_node_type(struct tree *tp);
-
-
-static void init_tree_first_pass(struct tree *current, int *index, int *object_index, int *column_index, int *entry_index);
-static void init_tree_second_pass(struct tree *current);
-
-
-static void output_tree_c(struct tree *current);
-
-static void output_extern_function(FILE *fp, struct tree *current);
-static void output_extern_trap_function(FILE *fp);
-static void output_trap_function_call(FILE *fp);
-static void output_trap_structure(FILE *fp);
-
-static void output_subid_table(FILE *fp, struct tree *current, int *subid_index);
-static void output_enum_table(FILE *fp, struct tree *current, int *enum_index);
-static void output_object_table(FILE *fp, struct tree *current, int *subid_index, int *enum_index, int *size);
-static void output_entry_table(FILE *fp, struct tree *current, int *index_index, int *size);
-static void output_column_table(FILE *fp, struct tree *current, int *subid_index, int *enum_index, int *size);
-static void output_node_table(FILE *fp, struct tree *current, int *size);
-
-
-static void output_stub_h(struct tree *current);
-
-
-static void output_stub_c(struct tree *current);
-static void output_appl_c(struct tree *current);
-static void output_trap_c(struct tree *current);
-static void output_entry_function(FILE *fp, struct tree *current);
-static void output_single_obj_function(FILE *fp, struct tree *current);
-
-
-/*************************************************************************/
-
-static void application_end()
-{
-}
-
-
-/*************************************************************************/
-
-static void print_usage()
-{
-	fprintf(stderr, "Usage: mibcodegen -b SubagentName -f mib_1.txt [mib2.txt....] [-h]\n");
-        exit(1);
-#if 0
-	error_exit("Usage: mibcodegen -b SubagentName -f mib_1.txt [mib2.txt....] [-h]");
-#endif
-}
-
-/* 
- * get the reverse-subid list from the given tree node
- * len stores the number of subids
- */
-void get_subid_of_node(struct tree *t, Subid *subids, int *len)
-{
-  struct tree *parent;
-
-  *len=0 ;
-  parent = t;
-  while(parent){
- 	subids[(*len)++] = parent->subid;
-	parent = parent->parent;
-  }	
-}
-
-
-/*************************************************************************/
-
-int
-main(int argc, char *argv[])
-{
-	struct node *nodes = NULL;
-	int i;
-	int node_index;
-	int object_index;
-	int column_index;
-	int entry_index;
-        char *filep[50];
-        int  filecount,loop=0,mibcoreflag;
-        int opt, doit;
-        extern char * optarg;
-        extern int    optind;
-
-
-	doit = 0;
-        trace_level=filecount=1;
-        mibcoreflag=0;
-        filep[0] = "/var/snmp/mib/mib_core.txt"; 
-	error_init(argv[0], application_end);
-
-        while((opt = getopt(argc, argv, "b:f:h")) != EOF) {
-          switch(opt) {
-            case 'b':
-                      base_name = (char *)strdup(optarg);
-                      break;
-            case 'f':
-                      filep[filecount++] = (char *)strdup(optarg);
-                      if (strstr(filep[filecount-1], "mib_core")) 
-                           mibcoreflag=1;
-			else
-				doit=1;
-   
-                      for(;((argv[optind]!=NULL) && 
-                                  (argv[optind][0] != '-'));
-                                  optind++) {
-                        filep[filecount++] = (char *)strdup(argv[optind+loop]);
-                        if (strstr(filep[filecount-1], "mib_core"))
-                              mibcoreflag=1;
-			else
-				doit = 1;
-                      }
-                      break;
-            case 'h':
-            default:
-                      print_usage();
-
-          }
-        } /*end of while*/
-
-        if ((optind != argc) || (!base_name) || (!doit))
-           print_usage();
-
-
-/******
-	if(argc < 3)
-	{
-		print_usage();
-	}
-
-
-	base_name = (char *) malloc(strlen(argv[1]) + 1);
-	strcpy(base_name, argv[1]);
-*******/
-
-	parse_init();
-
-	for(i = mibcoreflag; i < filecount; i++)
-	{
-		FILE *fp;
-		struct node *n, *last;
-
-
-		fp = fopen(filep[i], "r");
-		if(fp == NULL)
-		{
-			error("open() failed on %s %s\n\n", filep[i], errno_string());
-			print_usage();
-		}
-
-		n = parse(fp);
-		fclose(fp);
-
-		if(n == NULL)
-		{
-			error("WARNING : n is NULL for %s", argv[i]);
-		}
-		else
-		{
-			if(nodes == NULL)
-			{
-				nodes = n;
-			}
-			else
-			{
-				last = nodes;
-				while(last->next)
-				{
-					last = last->next;
-				}
-				last->next = n;
-			}
-		}
-	}
-
-		
-	root = build_tree(nodes);
-
-	node_index = 0;
-	object_index = 0;
-	column_index = 0;
-	entry_index = 0;
-	init_tree_first_pass(root, &node_index, &object_index, &column_index, &entry_index);
-	init_tree_second_pass(root);
-
-	output_tree_c(root);
-	output_stub_h(root);
-	output_stub_c(root);
-	output_appl_c(root);
-	output_trap_c(root);
-
-	return (0);
-}
-
-
-/*************************************************************************/
-
-/* Possible returned values:			*/
-/*	NODE, TABLE, ENTRY, OBJECT, COLUMN	*/
-
-static int get_node_type(struct tree *tp)
-{
-	if( (tp->type == TYPE_INTEGER)
-		|| (tp->type == TYPE_COUNTER)
-		|| (tp->type == TYPE_GAUGE)
-		|| (tp->type == TYPE_TIMETICKS)
-		|| (tp->type == TYPE_OCTETSTR)
-		|| (tp->type == TYPE_IPADDR)
-		|| (tp->type == TYPE_OPAQUE)
-		|| (tp->type == TYPE_OBJID) )
-	{
-		if(tp->parent->type == TYPE_ENTRY)
-		{
-			if(tp->parent->parent->type == TYPE_TABLE)
-			{
-				return COLUMN;
-			}
-			else
-			{
-				error_exit("get_node_type(): Inconsistent table definition: %s->%s->%s", tp->label, tp->parent->label, tp->parent->parent->label);
-			}
-		}
-		else
-		{
-			return OBJECT;
-		}
-	}
-	else
-	{
-		switch(tp->type)
-		{
-			case TYPE_TABLE:
-				return TABLE;
-
-			case TYPE_ENTRY:
-				return ENTRY;
-
-			default:
-				return NODE;
-		}
-	}
-     	return NODE; /*lint*/
-}
-
-
-/*************************************************************************/
-
-/* we suppose that the tree is ordered according to the value of subid */
-
-static void init_tree_first_pass(struct tree *current, int *node_index, int *object_index, int *column_index, int *entry_index)
-{
-	struct tree *tp;
-	int node_type;
-	struct tree *next;
-
-
-	/* node_index */
-	current->node_index = *node_index;
-	(*node_index)++;
-
-
-	/* node_type, object_index, column_index */
-	node_type = get_node_type(current);
-	current->node_type = node_type;
-	switch(node_type)
-	{
-		case OBJECT:
-			current->object_index = *object_index;
-			current->column_index = -1;
-			current->entry_index = -1;
-			(*object_index)++;
-			break;
-
-		case COLUMN:
-			current->object_index = -1;
-			current->column_index = *column_index;
-			current->entry_index = -1;
-			(*column_index)++;
-			break;
-
-		case NODE:
-		case TABLE:
-			current->object_index = -1;
-			current->column_index = -1;
-			current->entry_index = -1;
-			break;
-
-		case ENTRY:
-			current->object_index = -1;
-			current->column_index = -1;
-			current->entry_index = *entry_index;
-			(*entry_index)++;
-			break;
-
-		default:
-			error_exit("init_tree_first_pass(): Unknown node type (%d) for node %s",
-				node_type, current->label);
-
-	}
-
-
-	/* next FIRST PASS */
-	next = current->child_list;
-	if(next)
-	{
-		/* current is not a leaf of the tree */
-
-		while(next->child_list)
-		{
-			next = next->child_list;
-		}
-		current->next = next;
-	}
-	else
-	{
-		/* current is a leaf of the tree */
-
-		struct tree *parent;
-
-
-		parent = current;
-		while(parent)
-		{
-			/* the goal of this loop is to find an ancestor	*/
-			/* of current for which the subtree that contains */
-			/* current is not the last subtree		*/
-
-
-			/* is parent the last child? */
-			if(parent->next_peer == NULL)
-			{
-				/* parent is the last child in the child*/
-				/* list of its parent, so go one step up*/
-
-				parent = parent->parent;
-			}
-			else
-			{
-				/* parent is not the last child in the	*/
-				/* child list of its parent		*/
-
-				next = parent->next_peer;
-				break;
-			}
-		}
-
-		if(parent == NULL)
-		{
-			/* we found the last node of the MIB */
-
-			current->next = NULL;
-		}
-		else
-		{
-			while(next->child_list)
-			{
-				next = next->child_list;
-			}
-			current->next = next;
-		}
-	}
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		init_tree_first_pass(tp, node_index, object_index, column_index, entry_index);
-	}
-}
-
-
-/*************************************************************************/
-
-static void init_tree_second_pass(struct tree *current)
-{
-	struct tree *tp;
-	struct tree *next;
-	int node_type;
-	struct index_list *indexs;
-
-
-	/* next SECOND PASS */
-	next = current->next;
-	while(next)
-	{
-		node_type = get_node_type(next);
-		if(node_type == OBJECT || node_type == COLUMN)
-		{
-			if(next->access & READ_FLAG)
-			{
-				break;
-			}
-		}
-
-		next = next->next;
-	}
-	current->next = next;
-
-
-	/* consistency of node_type COLUMN, ENTRY, TABLE */
-	switch(current->node_type)
-	{
-		case COLUMN:
-			if(current->parent->node_type != ENTRY)
-			{
-				error_exit("The node type (%d) of %s is not ENTRY although the node type of %s is COLUMN",
-					current->parent->node_type,
-					current->parent->label,
-					current->label);
-			}
-			if(current->parent->parent->node_type != TABLE)
-			{
-				error_exit("The node type (%d) of %s is not TABLE although the node type of %s is COLUMN",
-					current->parent->parent->node_type,
-					current->parent->parent->label,
-					current->label);
-			}
-
-			if( (current->n_indexs != 0) || ( current->indexs != NULL) )
-			{
-				error_exit("The node %s of type COLUMN has some INDEXs!",
-					current->label);
-			}
-
-			break;
-
-
-		case ENTRY:
-			if(current->parent->node_type != TABLE)
-			{
-				error_exit("The node type (%d) of %s is not TABLE although the node type of %s is ENTRY",
-					current->parent->node_type,
-					current->parent->label,
-					current->label);
-			}
-
-			/* n_indexs, indexs */
-			if( (current->n_indexs == 0) || ( current->indexs == NULL) )
-			{
-				error_exit("The node %s of type ENTRY has no INDEX",
-					current->label);
-			}
-
-			indexs = current->indexs;
-			while(indexs)
-			{
-				indexs->tp = find_node(root, indexs->label);
-				if(indexs->tp == NULL)
-				{
-					error("WARNING: Can't match the INDEX %s of the entry %s",
-						indexs->label,
-						current->label);
-				}
-				else
-				{
-					switch(indexs->tp->type)
-					{
-						case TYPE_INTEGER:
-						case TYPE_COUNTER:
-						case TYPE_GAUGE:
-						case TYPE_TIMETICKS:
-                                                case TYPE_OCTETSTR:
-							break;
-
-						default:
-							error("WARNING: The agent will not support the INDEX %s whose type %d for the entry %s",
-								indexs->tp->label,
-								indexs->tp->type,
-								current->label);
-					}
-				}
-				indexs = indexs->next;
-			}
-
-			break;
-
-
-		default:
-			/* n_indexs, indexs */
-			if( (current->n_indexs != 0) || ( current->indexs != NULL) )
-			{
-				error_exit("The node %s of type %d has some INDEXs!",
-					current->label,
-					current->node_type);
-			}
-
-			break;
-	}
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		init_tree_second_pass(tp);
-	}
-}
-
-
-/*************************************************************************/
-static void output_extern_trap_function(FILE *fp)
-{
-  struct trap_item *ip;
-
-  fprintf(fp,"extern int SSAGetTrapPort();\n");
-  for(ip=trap_list;ip;ip=ip->next){
-	fprintf(fp, "extern int trap_handler_%s();\n",ip->label);
-  }
-}
-
-static void output_trap_function_call(FILE *fp)
-{
-	struct trap_item *ip;
-	struct tree *tp;
-	struct index_list *variables;
-	int index;
-
-	for (ip = trap_list; ip; ip = ip->next) {
-		for (index = 1, variables = ip->var_list; variables;
-			variables = variables->next) {
-			if ((variables->tp = find_node(root,
-				variables->label)) == NULL)
-				error_exit("output_trap_structure(): \
-				Unknown variable:%s", variables->label);
-			tp = variables->tp;
-			if (tp->node_type == COLUMN)
-				fprintf(fp,
-				"\t\tSSASetVarIndx(\"%s\",%d);\n",
-				variables->label, index++);
-			}
-	fprintf(fp, "\t\tSSASendTrap(\"%s\");\n", ip->label);
-	}
-}
-
-static void output_extern_function(FILE *fp, struct tree *current)
-{
-	struct tree *tp;
-	struct index_list *indexs;
-
-
-	switch(current->node_type)
-	{
-		case OBJECT:
-			if(current->access & READ_FLAG)
-			{
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS:
-						fprintf(fp, "extern int get_%s(Integer *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "extern int get_%s(String *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "extern int get_%s(Oid *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					default:
-						error_exit("output_extern_function(): Unknown type (%d) for %s",
-							current->type,
-							current->label);
-				}
-			}
-			if(current->access & WRITE_FLAG)
-			{
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-95)*/
-						fprintf(fp, "extern int set_%s(int pass, Integer* %s);\n",
-							current->label,
-							current->label);
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "extern int set_%s(int pass, String *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "extern int set_%s(int pass, Oid *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					default:
-						error_exit("output_extern_function(): Unknown type (%d) for %s",
-							current->type,
-							current->label);
-				}
-			}
-
-			if( (current->access & READ_FLAG) || (current->access & WRITE_FLAG) )
-			{
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-95)*/
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "extern void free_%s(String *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "extern void free_%s(Oid *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					default:
-						error_exit("output_extern_function(): Unknown type (%d) for %s",
-							current->type,
-							current->label);
-				}
-			}
-
-			break;
-
-
-		case COLUMN:
-			if(current->access & READ_FLAG)
-			{
-				fprintf(fp, "extern int get_%s(int search_type, ",
-					current->label);
-
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-96)*/
-						fprintf(fp, "Integer *%s, ",
-							current->label);
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "String *%s, ",
-							current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "Oid *%s, ",
-							current->label);
-						break;
-
-					default:
-						error_exit("output_extern_function(): Unknown type (%d) for %s",
-						current->type,
-						current->label);
-				}
-
-				indexs = current->parent->indexs;
-
-/* not more ind. index */
- 
-				if(indexs)
-				{
-					if(indexs->tp)
-					{
-						switch(indexs->tp->type)
-						{
-							case TYPE_INTEGER:
-							case TYPE_COUNTER:
-							case TYPE_GAUGE:
-							case TYPE_TIMETICKS: 
-								fprintf(fp, "IndexType *%s);\n",
-									"index");
-								break;
-
-							case TYPE_OCTETSTR:
-							case TYPE_IPADDR:
-							case TYPE_OPAQUE:
-								fprintf(fp, "IndexType *%s);\n",
-									"index");
-								break;
-
-							case TYPE_OBJID:
-								fprintf(fp, "IndexType *%s);\n",
-									"index");
-								break;
-
-							default:
-								error_exit("output_extern_function(): Unknown type (%d) for %s",
-								indexs->tp->type,
-								indexs->tp->label);
-						}
-					}
-					else
-					{
-						error("WARNING: By default, the type of INDEX %s set to INTEGER",
-							indexs->label);
-						fprintf(fp, "IndexType *%s);\n",
-								"index");
-					}
-
-					indexs = indexs->next;
-				}
-
-				
-			}
-
-			if(current->access & WRITE_FLAG)
-			{
-				fprintf(fp, "extern int set_%s(int pass, ",
-					current->label);
-
-				indexs = current->parent->indexs;
-
-/* not more ind. index */
- 
-				if(indexs)
-				{
-					if(indexs->tp)
-					{
-						switch(indexs->tp->type)
-						{
-							case TYPE_INTEGER:
-							case TYPE_COUNTER:
-							case TYPE_GAUGE:
-							case TYPE_TIMETICKS: 
-								fprintf(fp, "IndexType %s, ",
-									"index");
-								break;
-
-							case TYPE_OCTETSTR:
-							case TYPE_IPADDR:
-							case TYPE_OPAQUE:
-								fprintf(fp, "IndexType %s, ",
-									"index");
-								break;
-
-							case TYPE_OBJID:
-								fprintf(fp, "IndexType %s, ",
-									"index");
-								break;
-
-							default:
-								error_exit("output_extern_function(): Unknown type (%d) for %s",
-								indexs->tp->type,
-								indexs->tp->label);
-						}
-					}
-					else
-					{
-						error("WARNING: By default, the type of INDEX %s set to INTEGER",
-							indexs->label);
-						fprintf(fp, "IndexType %s, ",
-								"index");
-					}
-
-					indexs = indexs->next;
-				}
-
-				
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-96)*/
-						fprintf(fp, "Integer *%s);\n",
-							current->label);
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "String *%s);\n",
-							current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "Oid *%s);\n",
-							current->label);
-						break;
-
-					default:
-						error_exit("output_extern_function(): Unknown type (%d) for %s",
-						current->type,
-						current->label);
-				}
-			}
-
-			if( (current->access & READ_FLAG) || (current->access & WRITE_FLAG) )
-			{
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-95)*/
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "extern void free_%s(String *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "extern void free_%s(Oid *%s);\n",
-							current->label,
-							current->label);
-						break;
-
-					default:
-						error_exit("output_extern_function(): Unknown type (%d) for %s",
-							current->type,
-							current->label);
-				}
-			}
-
-			break;
-
-
-		case ENTRY:
-			fprintf(fp, "extern int get_%s(int search_type, %c%s_t **%s_data",
-				current->label,
-				toupper(current->label[0]),
-				&(current->label[1]),
-				current->label);
-				
-
-			indexs = current->indexs;
-
-/* no more ind. index */
-			if(indexs)
-			{
-				if(indexs->tp)
-				{
-					switch(indexs->tp->type)
-					{
-						case TYPE_INTEGER:
-						case TYPE_COUNTER:
-						case TYPE_GAUGE:
-						case TYPE_TIMETICKS:
-							fprintf(fp, ", IndexType *%s",
-								"index");
-							break;
-
-						case TYPE_OCTETSTR:
-						case TYPE_IPADDR:
-						case TYPE_OPAQUE:
-							fprintf(fp, ", IndexType *%s",
-								"index");
-							break;
-
-						case TYPE_OBJID:
-							fprintf(fp, ", IndexType *%s",
-								"index");
-
-						default:
-							error_exit("output_extern_function(): Unknown type (%d) for %s",
-							indexs->tp->type,
-							indexs->tp->label);
-					}
-				}
-				else
-				{
-					error("WARNING: By default, the type of INDEX %s set to INTEGER",
-						indexs->label);
-					fprintf(fp, ", IndexType *%s",
-							"index");
-				}
-
-				indexs = indexs->next;
-			}
-			fprintf(fp, ");\n");
-
-			fprintf(fp, "extern void free_%s(%c%s_t *%s);\n",
-				current->label,
-				toupper(current->label[0]),
-				&(current->label[1]),
-				current->label);
-			break;
-	}
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_extern_function(fp, tp);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_enum_table(FILE *fp, struct tree *current, int *enum_index)
-{
-	struct tree *tp;
-	struct enum_list *enums;
-
-
-	for(enums = current->enums; enums; enums = enums->next)
-	{
-		if(enums->next == NULL)
-		{
-			fprintf(fp, "/* %6d */ { %17s, \"%s\", %d },\n",
-				*enum_index,
-				"NULL",
-				enums->label,
-				enums->value);
-		}
-		else
-		{
-			fprintf(fp, "/* %6d */ { &enum_table[%4d], \"%s\", %d },\n",
-				*enum_index,
-				(*enum_index) + 1,
-				enums->label,
-				enums->value);
-		}
-		(*enum_index)++;
-	}
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_enum_table(fp, tp, enum_index);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_subid_table(FILE *fp, struct tree *current, int *subid_index)
-{
-	struct tree *tp;
-	struct tree *parent;
-	Subid subids[MAX_OID_LEN];
-	int len = 0;
-	int i;
-
-
-	if( (current->node_type == OBJECT)
-		|| (current->node_type == COLUMN) )
-	{
-		fprintf(fp, "/* %6d */",
-			*subid_index);
-
-		parent = current;
-		while(parent)
-		{
-			subids[len++] = parent->subid;
-
-			parent = parent->parent;
-		}
-		fprintf(fp, " %d", subids[len - 1]);
-		(*subid_index)++;
-		for(i = len - 2; i >= 0; i--)
-		{
-			fprintf(fp, ", %d", subids[i]);
-			(*subid_index)++;
-		}
-		fprintf(fp, ",\n");
-	}
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_subid_table(fp, tp, subid_index);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_object_table(FILE *fp, struct tree *current, int *subid_index, int *enum_index, int *size)
-{
-	struct tree *tp;
-	struct tree *parent;
-	struct enum_list *enums;
-	int len;
-
-
-	if(current->node_type == OBJECT)
-	{
-		fprintf(fp, "/* %6d */ {",
-			current->object_index);
-
-		/* name */
-		len = 0;
-		parent = current;
-		while(parent)
-		{
-			len++;
-
-			parent = parent->parent;
-		}
-		fprintf(fp, " { &subid_table[%d], %d }", *subid_index, len);
-
-		/* asn1_type */
-		switch(current->type)
-		{
-			case TYPE_INTEGER:
-				fprintf(fp, ", INTEGER");
-				break;
-
-			case TYPE_COUNTER:
-				fprintf(fp, ", COUNTER");
-				break;
-
-			case TYPE_GAUGE:
-				fprintf(fp, ", GAUGE");
-				break;
-
-			case TYPE_TIMETICKS:
-				fprintf(fp, ", TIMETICKS");
-				break;
-
-			case TYPE_OCTETSTR:
-				fprintf(fp, ", STRING");
-				break;
-
-			case TYPE_IPADDR:
-				fprintf(fp, ", IPADDRESS");
-				break;
-
-			case TYPE_OPAQUE:
-				fprintf(fp, ", OPAQUE");
-				break;
-
-			case TYPE_OBJID:
-				fprintf(fp, ", OBJID");
-				break;
-
-			default:
-				fprintf(fp, "ERROR!");
-				error_exit("Unknown ASN.1 type (%d) for object %s",
-					current->type,
-					current->label);
-		}
-
-		/* first_enum */
-		if(current->enums)
-		{
-			fprintf(fp, ", &enum_table[%d]", *enum_index);
-		}
-		else
-		{
-			fprintf(fp, ", NULL");
-		}
-
-		/* access */
-		if( (current->access & READ_FLAG) && (current->access & WRITE_FLAG) )
-		{
-			fprintf(fp, ", READ_FLAG | WRITE_FLAG");
-		}
-		else
-		if( (current->access & READ_FLAG) && !(current->access & WRITE_FLAG) )
-		{
-			fprintf(fp, ", READ_FLAG");
-		}
-		else
-		if( !(current->access & READ_FLAG) && (current->access & WRITE_FLAG) )
-		{
-			fprintf(fp, ", WRITE_FLAG");
-		}
-		else
-		{
-			fprintf(fp, ", 0");
-		}
-                /* type for trap fix */
-
-                fprintf(fp, ", 1");
-
-		/* get() */
-		if(current->access & READ_FLAG)
-		{
-			fprintf(fp, ", get_%s", current->label);
-		}
-		else
-		{
-			fprintf(fp, ", NULL");
-		}
-
-		/* set() */
-		if(current->access & WRITE_FLAG)
-		{
-			fprintf(fp, ", set_%s", current->label);
-		}
-		else
-		{
-			fprintf(fp, ", NULL");
-		}
-
-		/* dealloc() */
-		if( (current->access & READ_FLAG) || (current->access & WRITE_FLAG) )
-		{
-			switch(current->type)
-			{
-				case TYPE_INTEGER:
-				case TYPE_COUNTER:
-				case TYPE_GAUGE:
-				case TYPE_TIMETICKS:
-					fprintf(fp,",NULL");
-					break;
-				default:
-					fprintf(fp,",free_%s",current->label);
-			}
-		}
-		else
-		{
-			fprintf(fp,", NULL");
-		}
-
-
-		fprintf(fp, " },\n");
-
-
-		(*size)++;
-	}
-
-
-	if( (current->node_type == OBJECT)
-		|| (current->node_type == COLUMN) )
-	{
-		parent = current;
-		while(parent)
-		{
-			(*subid_index)++;
-
-			parent = parent->parent;
-		}
-	}
-
-
-	for(enums = current->enums; enums; enums = enums->next)
-	{
-		(*enum_index)++;
-	}
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_object_table(fp, tp, subid_index, enum_index, size);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_index_table(FILE *fp, struct tree *current, int *index_index)
-{
-	struct tree *tp;
-	struct index_list *indexs;
-
-
-	for(indexs = current->indexs; indexs; indexs = indexs->next)
-	{
-		if(indexs->tp)
-		{
-			if(indexs->next == NULL)
-			{
-				fprintf(fp, "/* %6d */ { %17s, \"%s\", %2d, %2d, &node_table[%d] },\n",
-					*index_index,
-					"NULL",
-					indexs->label,
-                                        indexs->tp->type,
-                                        indexs->tp->oct_str_len,
-					indexs->tp->node_index);
-			}
-			else
-			{
-				fprintf(fp, "/* %6d */ { &index_table[%4d], \"%s\", %2d, %2d, &node_table[%d] },\n",
-					*index_index,
-					(*index_index) + 1,
-					indexs->label,
-                                        indexs->tp->type, 
-                                        indexs->tp->oct_str_len,
-					indexs->tp->node_index);
-			}
-		}
-		else
-		{
-			error("WARNING: node pointer for INDEX %s is NULL",
-				indexs->label);
-
-			if(indexs->next == NULL)
-			{
-				fprintf(fp, "/* %6d */ { %17s, \"%s\", %2d, %2d, NULL },\n",
-					*index_index,
-					"NULL",
-					indexs->label,
-                                        indexs->tp->type,
-                                        indexs->tp->oct_str_len); 
-			}
-			else
-			{
-				fprintf(fp, "/* %6d */ { &index_table[%4d], \"%s\", %2d, %2d, NULL },\n",
-					*index_index,
-					(*index_index) + 1,
-					indexs->label,
-                                        indexs->tp->type,
-                                        indexs->tp->oct_str_len);
-			}
-		}
-
-		(*index_index)++;
-	}
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_index_table(fp, tp, index_index);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_entry_table(FILE *fp, struct tree *current, int *index_index, int *size)
-{
-	struct tree *tp;
-
-
-	if(current->node_type == ENTRY)
-	{
-		struct index_list *indexs;
-
-
-		fprintf(fp, "/* %6d */ {",
-			current->entry_index);
-
-		/* first_index, n_indexs */
-		fprintf(fp, " &index_table[%d], %d",
-			*index_index,
-			current->n_indexs);
-
-		for(indexs = current->indexs; indexs; indexs = indexs->next)
-		{
-			(*index_index)++;
-		}
-
-		/* get() */
-		fprintf(fp, ", get_%s", current->label);
-
-		/* dealloc() */
-		fprintf(fp, ", free_%s", current->label);
-
-		fprintf(fp, " },\n");
-
-
-		(*size)++;
-	}
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_entry_table(fp, tp, index_index, size);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_column_table(FILE *fp, struct tree *current, int *subid_index, int *enum_index, int *size)
-{
-	struct tree *tp;
-	struct tree *parent;
-	struct enum_list *enums;
-
-
-	if(current->node_type == COLUMN)
-	{
-		int offset;
-		int len;
-		struct tree *child;
-
-
-		fprintf(fp, "/* %6d */ {",
-			current->column_index);
-
-		/* name */
-		len = 0;
-		parent = current;
-		while(parent)
-		{
-			len++;
-
-			parent = parent->parent;
-		}
-		fprintf(fp, " { &subid_table[%d], %d }", *subid_index, len);
-
-		/* asn1_type */
-		switch(current->type)
-		{
-			case TYPE_INTEGER:
-				fprintf(fp, ", INTEGER");
-				break;
-
-			case TYPE_COUNTER:
-				fprintf(fp, ", COUNTER");
-				break;
-
-			case TYPE_GAUGE:
-				fprintf(fp, ", GAUGE");
-				break;
-
-			case TYPE_TIMETICKS:
-				fprintf(fp, ", TIMETICKS");
-				break;
-
-			case TYPE_OCTETSTR:
-				fprintf(fp, ", STRING");
-				break;
-
-			case TYPE_IPADDR:
-				fprintf(fp, ", IPADDRESS");
-				break;
-
-			case TYPE_OPAQUE:
-				fprintf(fp, ", OPAQUE");
-				break;
-
-			case TYPE_OBJID:
-				fprintf(fp, ", OBJID");
-				break;
-
-			default:
-				fprintf(fp, "ERROR!");
-				error_exit("Unknown ASN.1 type (%d) for object %s",
-					current->type,
-					current->label);
-		}
-
-		/* first_enum */
-		if(current->enums)
-		{
-			fprintf(fp, ", &enum_table[%d]", *enum_index);
-		}
-		else
-		{
-			fprintf(fp, ", NULL");
-		}
-
-		/* access */
-		if( (current->access & READ_FLAG) && (current->access & WRITE_FLAG) )
-		{
-			fprintf(fp, ", READ_FLAG | WRITE_FLAG");
-		}
-		else
-		if( (current->access & READ_FLAG) && !(current->access & WRITE_FLAG) )
-		{
-			fprintf(fp, ", READ_FLAG");
-		}
-		else
-		if( !(current->access & READ_FLAG) && (current->access & WRITE_FLAG) )
-		{
-			fprintf(fp, ", WRITE_FLAG");
-		}
-		else
-		{
-			fprintf(fp, ", 0");
-		}
-                /* type  for trap fix */
-
-                fprintf(fp, ", 2");
-
-               /* get() */
-
-                if(current->access & READ_FLAG)
-                {
-                        fprintf(fp, ", get_%s", current->label);
-                }
-                else
-                {
-                        fprintf(fp, ", NULL");
-                }
-
-		/* set() */
-		if(current->access & WRITE_FLAG)
-		{
-			fprintf(fp, ", set_%s", current->label);
-		}
-		else
-		{
-			fprintf(fp, ", NULL");
-		}
-
-		/* table */
-		fprintf(fp, ", &entry_table[%d]", current->parent->entry_index);
-
-		/* offset */
-		offset = 0;
-		for(child = current->parent->child_list; child != current; child = child->next_peer)
-		{
-			if( !(child->access & READ_FLAG) )
-			{
-				continue;
-			}
-
-			switch(child->type)
-			{
-				case TYPE_INTEGER:
-				case TYPE_COUNTER:
-				case TYPE_GAUGE:
-				case TYPE_TIMETICKS:
-					offset = offset + sizeof(Integer);
-					break;
-
-				case TYPE_OCTETSTR:
-				case TYPE_IPADDR:
-				case TYPE_OPAQUE:
-					offset = offset + sizeof(String);
-					break;
-
-				case TYPE_OBJID:
-					offset = offset + sizeof(Oid);
-					break;
-
-				default:
-					error_exit("output_column_table(): Unknown type (%d) for %s",
-						child->type,
-						child->label);
-			}
-		}
-		fprintf(fp, ", %d", offset);
-
-		fprintf(fp, " },\n");
-
-
-		(*size)++;
-	}
-
-
-	if( (current->node_type == OBJECT)
-		|| (current->node_type == COLUMN) )
-	{
-		parent = current;
-		while(parent)
-		{
-			(*subid_index)++;
-
-			parent = parent->parent;
-		}
-	}
-
-
-	for(enums = current->enums; enums; enums = enums->next)
-	{
-		(*enum_index)++;
-	}
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_column_table(fp, tp, subid_index, enum_index, size);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_node_table(FILE *fp, struct tree *current, int *size)
-{
-	struct tree *tp;
-
-
-	fprintf(fp, "/* %6d */ {",
-		current->node_index);
-
-	/* parent */
-	if(current->parent == NULL)
-	{
-		fprintf(fp, " %17s", "NULL");
-	}
-	else
-	{
-		fprintf(fp, " &node_table[%4d]",
-			current->parent->node_index);
-	}
-
-	/* first_child */
-	if(current->child_list == NULL)
-	{
-		fprintf(fp, ", %17s", "NULL");
-	}
-	else
-	{
-		fprintf(fp, ", &node_table[%4d]",
-			current->child_list->node_index);
-	}
-
-	/* next_peer */
-	if(current->next_peer == NULL)
-	{
-		fprintf(fp, ", %17s", "NULL");
-	}
-	else
-	{
-		fprintf(fp, ", &node_table[%4d]",
-			current->next_peer->node_index);
-	}
-
-	/* next */
-	if(current->next == NULL)
-	{
-		fprintf(fp, ", %17s", "NULL");
-	}
-	else
-	{
-		fprintf(fp, ", &node_table[%4d]",
-			current->next->node_index);
-	}
-
-	/* label, subid */
-	fprintf(fp, ", \"%s\", %d",
-		current->label, current->subid);
-
-	/* type, data */
-	switch(current->node_type)
-	{
-		case OBJECT:
-			fprintf(fp, ", OBJECT, (void *) &object_table[%d]",
-				current->object_index);
-			break;
-
-		case COLUMN:
-			fprintf(fp, ", COLUMN, (void *) &column_table[%d]",
-				current->column_index);
-			break;
-
-		case NODE:
-		case TABLE:
-		case ENTRY:
-			fprintf(fp, ", NODE, NULL");
-			break;
-
-
-		default:
-			error_exit("Unknown node type (%d) for %s",
-				current->type, current->label);
-	}
-
-	fprintf(fp, " },\n");
-
-
-	(*size)++;
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_node_table(fp, tp, size);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_tree_c(struct tree *current)
-{
-	char pathname[MAXPATHLEN];
-	char backup_pathname[MAXPATHLEN];
-	struct stat buf;
-	FILE *fp;
-	int subid_index;
-	int enum_index;
-	int index_index;
-	int size;
-
-
-	sprintf(pathname, "%s_tree.c", base_name);
-	sprintf(backup_pathname, "%s_tree.c.old", base_name);
-	trace("Creating %s ...\n", pathname);
-	if(stat(pathname, &buf) == 0)
-	{
-                if(rename(pathname,backup_pathname)==-1){
-                  error_exit("The file %s already exists and can't be renamed!", pathname);
-                }
-	}
-
-	fp = fopen(pathname, "w");
-	if(fp == NULL)
-	{
-		error_exit("Can't open %s %s", pathname, errno_string());
-	}
-
-	fprintf(fp, "#include <sys/types.h>\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "#include \"impl.h\"\n");
-	fprintf(fp, "#include \"asn1.h\"\n");
-	fprintf(fp, "#include \"node.h\"\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "#include \"%s_stub.h\"\n", base_name);
-	fprintf(fp, "\n");
-	fprintf(fp, "\n");
-
-
-
-	subid_index = 0;
-	fprintf(fp, "Subid subid_table[] = {\n");
-	output_subid_table(fp, current, &subid_index);
-	fprintf(fp, "0\n");
-	fprintf(fp, "};\n");
-	fprintf(fp, "int subid_table_size = %d;\n\n", subid_index);
-
-	enum_index = 0;
-	fprintf(fp, "Enum enum_table[] = {\n");
-	output_enum_table(fp, current, &enum_index);
-	fprintf(fp, "{ NULL, NULL, 0 }\n");
-	fprintf(fp, "};\n");
-	fprintf(fp, "int enum_table_size = %d;\n\n", enum_index);
-
-	subid_index = 0;
-	enum_index = 0;
-	size = 0;
-	fprintf(fp, "Object object_table[] = {\n");
-	output_object_table(fp, current, &subid_index, &enum_index, &size);
-	fprintf(fp, "{ { NULL, 0}, 0, NULL, 0, NULL, NULL }\n");
-	fprintf(fp, "};\n");
-	fprintf(fp, "int object_table_size = %d;\n\n", size);
-
-	index_index = 0;
-	fprintf(fp, "Index index_table[] = {\n");
-	output_index_table(fp, current, &index_index);
-	fprintf(fp, "{ NULL, NULL, NULL }\n");
-	fprintf(fp, "};\n");
-	fprintf(fp, "int index_table_size = %d;\n\n", index_index);
-
-	size = 0;
-	index_index = 0;
-	fprintf(fp, "Entry entry_table[] = {\n");
-	output_entry_table(fp, current, &index_index, &size);
-	fprintf(fp, "{ NULL, 0, NULL }\n");
-	fprintf(fp, "};\n");
-	fprintf(fp, "int entry_table_size = %d;\n\n", size);
-
-	subid_index = 0;
-	enum_index = 0;
-	size = 0;
-	fprintf(fp, "Column column_table[] = {\n");
-	output_column_table(fp, current, &subid_index, &enum_index, &size);
-	fprintf(fp, "{ { NULL, 0}, 0, NULL, 0, NULL, NULL , 0 }\n");
-	fprintf(fp, "};\n");
-	fprintf(fp, "int column_table_size = %d;\n\n", size);
-
-	size = 0;
-	fprintf(fp, "Node node_table[] = {\n");
-	output_node_table(fp, current, &size);
-	fprintf(fp, "{ NULL, NULL, NULL, NULL, NULL, 0, 0, NULL }\n");
-	fprintf(fp, "};\n");
-	fprintf(fp, "int node_table_size = %d;\n\n", size);
-
-
-	fclose(fp);
-}
-
-
-/*************************************************************************/
-
-static struct tree *find_node(struct tree *current, char *label)
-{
-	struct tree *tp;
-	struct tree *t;
-
-
-	if(strcmp(current->label, label) == 0)
-	{
-		return current;
-	}
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		t = find_node(tp, label);
-		if(t != NULL)
-		{
-			return t;
-		}
-	}
-
-	return NULL;
-}
-
-
-/*************************************************************************/
-
-static void output_structure(FILE *fp, struct tree *current)
-{
-	struct tree *tp;
-
-
-	if(current->node_type == ENTRY)
-	{
-		struct tree *child;
-
-
-		fprintf(fp, "\n");
-		fprintf(fp, "typedef struct _%c%s_t {\n",
-			toupper(current->label[0]),
-			&(current->label[1]));
-		for(child = current->child_list; child; child = child->next_peer)
-		{
-			if( !(child->access & READ_FLAG) )
-			{
-				continue;
-			}
-
-			switch(child->type)
-			{
-				case TYPE_INTEGER:
-				case TYPE_COUNTER:
-				case TYPE_GAUGE:
-				case TYPE_TIMETICKS:
-					fprintf(fp, "\tInteger %s;\n", child->label);
-					break;
-
-				case TYPE_OCTETSTR:
-				case TYPE_IPADDR:
-				case TYPE_OPAQUE:
-					fprintf(fp, "\tString %s;\n", child->label);
-					break;
-
-				case TYPE_OBJID:
-					fprintf(fp, "\tOid %s;\n", child->label);
-					break;
-
-				default:
-					error_exit("output_structure(): Unknown type (%d) for %s",
-						child->type,
-						child->label);
-			}
-		}
-		fprintf(fp, "} %c%s_t;\n",
-			toupper(current->label[0]),
-			&(current->label[1]));
-	}
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_structure(fp, tp);
-	}
-}
-
-
-/*************************************************************************/
-
-static void output_stub_h(struct tree *current)
-{
-	char pathname[MAXPATHLEN];
-	char backup_pathname[MAXPATHLEN];
-	struct stat buf;
-	FILE *fp;
-	int i;
-
-
-	sprintf(pathname, "%s_stub.h", base_name);
-	sprintf(backup_pathname, "%s_stub.h.old", base_name);
-	trace("Creating %s ...\n", pathname);
-	if(stat(pathname, &buf) == 0)
-	{
-                if(rename(pathname,backup_pathname)==-1){
-                  error_exit("The file %s already exists and can't be renamed!", pathname);
-                }
-	}
-
-	fp = fopen(pathname, "w");
-	if(fp == NULL)
-	{
-		error_exit("Can't open %s %s", pathname, errno_string());
-	}
-
-	fprintf(fp, "#ifndef _");
-	for(i = 0; base_name[i] != '\0'; i++)
-	{
-		fprintf(fp, "%c", toupper(base_name[i]));
-	}
-	fprintf(fp, "_STUB_H_\n");
-	fprintf(fp, "#define _");
-	for(i = 0; base_name[i] != '\0'; i++)
-	{
-		fprintf(fp, "%c", toupper(base_name[i]));
-	}
-	fprintf(fp, "_STUB_H_\n");
-	fprintf(fp, "\n");
-
-
-	output_structure(fp, current);
-	fprintf(fp, "\n");
-
-	output_extern_function(fp, current);
-	fprintf(fp, "\n");
-
-	output_extern_trap_function(fp);
-
-	fprintf(fp, "#endif\n");
-
-	fclose(fp);
-}
-
-
-/*************************************************************************/
-
-static void get_subids_by_name(Subid *dst,char *oid_name)
-{
-  struct tree *tp;
-  Subid subids[MAX_OID_LEN+1];
-  int i,j,len;
-
-  /* find the enterprise_subids */
-  if((tp = find_node(root,oid_name)) == NULL)
-    fprintf (stderr, "Unknown trap enterprise variable:%s\n",oid_name);
-  get_subid_of_node(tp,subids,&len);
-  for(j=0,i=len-1;i>=0;i--,j++)
-	dst[j] = subids[i];
-  dst[j]=(u_long)-1;
-}
-
-
-static void output_trap_structure(FILE *fp)
-{
-	struct trap_item *ip;
-	int i, enterprise_trap;
-	struct index_list *var;
-	struct tree *tp;
-	int numCallItem = 0;
-	int numTrapElem = 0;
-	int *trapTableMap = NULL;
-	int idx, index;
-	int variableExist, columnExist = 0;
-
-
-	for (ip = trap_list; ip; ip = ip->next) {
-		numTrapElem++;
-		for (var = ip->var_list; var; var = var->next)
-			numCallItem++;
-	}
-
-	if (numTrapElem > 0) {
-		trapTableMap = (int *)malloc(sizeof (int) * (numTrapElem + 10));
-		if (!trapTableMap)
-			error_exit("malloc failed");
-	for (idx = 0; idx < numTrapElem+10; idx++)
-		trapTableMap[idx] = -1;
-	}
-
-	if (numCallItem > 0)
-		fprintf(fp, "struct CallbackItem genCallItem[%d] = {\n",
-			numCallItem+10);
-	else
-		fprintf(fp, "struct CallbackItem genCallItem[%d];\n",
-			numCallItem+10);
-	numCallItem = 0;
-	numTrapElem = 0;
-	for (ip = trap_list; ip; ip = ip->next) {
-		variableExist = 0;
-		trapTableMap[numTrapElem] = numCallItem;
-		for (var = ip->var_list; var; var = var->next) {
-			variableExist = 1;
-			if ((var->tp = find_node(root, var->label)) == NULL)
-				error_exit("output_trap_structure():Unknown \
-					variable:%s", var->label);
-				tp = var->tp;
-				if (tp->node_type == OBJECT)
-					fprintf(fp, "\t{&object_table[%d],",
-					tp->object_index);
-				else
-					if (tp->node_type == COLUMN) {
-					columnExist = 1;
-						fprintf(fp,
-					"\t{(Object *)&column_table[%d],",
-						tp->column_index);
-					} else
-						error_exit("variable: %s is not\
-						individual object", var->label);
-
-			switch (tp->type) { /* only accept object node type */
-				case TYPE_INTEGER:
-				case TYPE_COUNTER:
-				case TYPE_GAUGE:
-				case TYPE_TIMETICKS:
-					fprintf(fp, "INTEGER,");
-					break;
-				case TYPE_OCTETSTR:
-				case TYPE_IPADDR:
-				case TYPE_OPAQUE:
-					fprintf(fp, "STRING,");
-					break;
-				case TYPE_OBJID:
-					fprintf(fp, "OBJID,");
-					break;
-				default:
-					error_exit("unknown object type of \
-					variable %s", var->label);
-			}
-		numCallItem++;
-		if (var->next)
-			fprintf(fp, "%d},\n", numCallItem);
-		else
-			fprintf(fp, "-1},\n");
-		}
-		if (variableExist == 0)
-			trapTableMap[numTrapElem] = -1;
-	numTrapElem++;
-	}
-	if (numCallItem > 0) fprintf(fp, "};\n");
-	fprintf(fp, "int genNumCallItem = %d;\n", numCallItem);
-
-	/* dumby the map */
-	if (numTrapElem > 0)
-		fprintf(fp, "int genTrapTableMap[%d] = {\n", numTrapElem + 10);
-	else
-		fprintf(fp, "int genTrapTableMap[%d];\n", numTrapElem + 10);
-	for (idx = 0; idx < numTrapElem; idx++) {
-		fprintf(fp, "%d,", trapTableMap[idx]);
-	}
-	if (numTrapElem > 0) fprintf(fp, "};\n");
-
-	fprintf(fp, "int genNumTrapElem = %d;\n", numTrapElem);
-	if (numTrapElem > 0)
-		fprintf(fp, "struct TrapHndlCxt genTrapBucket[%d] = {\n",
-			numTrapElem + 10);
-	else
-		fprintf(fp, "struct TrapHndlCxt genTrapBucket[%d];\n",
-			numTrapElem+10);
-	for (ip = trap_list; ip; ip = ip->next) {
-		fprintf(fp, "\t{\"%s\",", ip->label);
-		if (!strcmp(ip->enterprise_label, "snmp"))
-			fprintf(fp, "0,");
-		else
-			fprintf(fp, "1,");
-		if (!strcmp(ip->enterprise_label, "snmp")) {
-			for (i = 0; i < 8; i++) {
-				ip->enterprise_subids[i] = snmp_subids[i];
-			}
-		} else {
-			get_subids_by_name(ip->enterprise_subids,
-				ip->enterprise_label);
-		}
-
-		enterprise_trap = FALSE;
-		for (i = 0; i < 7; i++) {
-			if (ip->enterprise_subids[i] != snmp_subids[i]) {
-				enterprise_trap = TRUE;
-				break;
-			}
-		}
-		if (enterprise_trap) {
-			fprintf(fp, "6,");
-			fprintf(fp, "%d},\n", ip->value);
-		} else {
-			fprintf(fp, "%d,", ip->value);
-			fprintf(fp, "0},\n");
-		}
-	}
-	if (numTrapElem > 0) fprintf(fp, "};\n");
-
-/* For arbitrary length enterprise OID in traps - bug 4133978 */
-/* Initializing new trap enterprise info which handles arbitrary subids */
-	if (numTrapElem > 0)
-		fprintf(fp,
-	"struct TrapAnyEnterpriseInfo genTrapAnyEnterpriseInfo[%d] = {\n",
-		numTrapElem + 10);
-	else
-		fprintf(fp, "struct TrapAnyEnterpriseInfo \
-			genTrapAnyEnterpriseInfo[%d]; \n", numTrapElem + 10);
-	for (ip = trap_list; ip; ip = ip->next) {
-		fprintf(fp, "\t{");
-		for (i = 0; ip->enterprise_subids[i] != -1; i++) {
-			fprintf(fp, "%d, ", ip->enterprise_subids[i]);
-		}
-		fprintf(fp, "(uint32_t)-1},\n");
-	}
-	if (numTrapElem > 0) fprintf(fp, "};\n");
-
-	if (numTrapElem == 0)
-		return;
-
-	fprintf(fp, "struct _CallTrapIndx { \n");
-	fprintf(fp, "\tchar name[256];\n");
-	fprintf(fp, "\tIndexType *pindex_obj; \n");
-	fprintf(fp, "};\n\n");
-
-	fprintf(fp, "struct _Indx { \n");
-	fprintf(fp, "\tchar name[256]; \n");
-	fprintf(fp, "\tint index; \n");
-	fprintf(fp, "};\n\n");
-
-	if (columnExist != 0) {
-	index = 0;
-	for (ip = trap_list; ip; ip = ip->next) {
-		for (var = ip->var_list; var; var = var->next) {
-			tp = var->tp;
-			if (tp->node_type == COLUMN) {
-				index++;
-			}
-		}
-	}
-
-	fprintf(fp, "int numIndxElem = %d; \n", index);
-	fprintf(fp, "struct _Indx Indx[%d] = { \n", index);
-	for (ip = trap_list; ip; ip = ip->next) {
-		for (var = ip->var_list; var; var = var->next) {
-			tp = var->tp;
-			if (tp->node_type == COLUMN) {
-				fprintf(fp, "\t{\"%s\", 0},\n", var->label);
-			}
-		}
-	}
-	fprintf(fp, "};\n\n");
-	fprintf(fp, "int SSASetVarIndx(char* name, int index)\n{\n");
-	fprintf(fp, "\tint i;\n\n");
-	fprintf(fp, "\tif (!name) \n");
-	fprintf(fp, "\treturn (-1); \n\n");
-	fprintf(fp, "\tfor (i = 0; i < numIndxElem; i++) \n");
-	fprintf(fp, "\t\tif (!strcmp(name, Indx[i].name)) { \n");
-	fprintf(fp, "\t\t\tIndx[i].index = index;\n");
-	fprintf(fp, "\t\t\treturn (0);\n");
-	fprintf(fp, "\t\t}\n");
-	fprintf(fp, "\treturn (-1);\n");
-	fprintf(fp, "}\n\n");
-	}
-
-	index = 0;
-	fprintf(fp, "IndexType TrapIndx[%d] = { \n", numCallItem);
-		for (ip = trap_list; ip; ip = ip->next) {
-			for (var = ip->var_list; var; var = var->next) {
-				tp = var->tp;
-				if (tp->node_type == OBJECT)
-					fprintf(fp, "\t{0,0,NULL},\n");
-				else if (tp->node_type == COLUMN) {
-					fprintf(fp,
-					"\t{1,1,&Indx[%d].index},\n", index++);
-				} else
-					error_exit("variable: %s is not \
-					individual object", var->label);
-			}
-		}
-	fprintf(fp, "};\n\n");
-
-	fprintf(fp, "struct _CallTrapIndx CallTrapIndx[%d] = {\n", numTrapElem);
-		for (idx = 0, ip = trap_list; ip && idx < numTrapElem;
-			ip = ip->next, idx++) {
-			fprintf(fp, "\t{\"%s\",&TrapIndx[%d]},\n", ip->label,
-			trapTableMap[idx]);
-		}
-	fprintf(fp, "};\n\n");
-
-
-	if (numTrapElem > 0) {
-		fprintf(fp, "int SSASendTrap(char* name)\n");
-		fprintf(fp, "{\n");
-		fprintf(fp, "\tint i;\n\n");
-		fprintf(fp, "\tif (!name) \n");
-		fprintf(fp, "\treturn (-1);\n\n");
-
-		fprintf(fp, "\tnumCallItem = genNumCallItem;\n");
-		fprintf(fp, "\tnumTrapElem = genNumTrapElem;\n");
-		fprintf(fp, "\tcallItem = genCallItem;\n");
-		fprintf(fp, "\ttrapTableMap = genTrapTableMap;\n");
-		fprintf(fp, "\ttrapBucket = genTrapBucket;\n");
-		fprintf(fp,
-		"\ttrapAnyEnterpriseInfo = genTrapAnyEnterpriseInfo;\n");
-	/* SSASendTrap4 handles tabular column elements - 4519879 */
-		fprintf(fp, "\tfor (i = 0; i < numTrapElem; i++) \n");
-	fprintf(fp, "\tif (!strcmp(name, CallTrapIndx[i].name)) \n");
-	fprintf(fp, "\t\treturn \
-	(_SSASendTrap4(name, CallTrapIndx[i].pindex_obj)); \n");
-	fprintf(fp, "\treturn (-1); \n");
-	fprintf(fp, "}\n");
-	}
-}
-
-
-static void output_entry_function(FILE *fp, struct tree *current)
-{
-	struct tree *tp;
-	struct index_list *indexs;
-	struct tree *child;
-	int first_time_entry_print;
-
-
-	switch(current->node_type)
-	{
-		case COLUMN:
-			if( !(current->access & WRITE_FLAG) )
-			{
-				break;
-			}
-			break;
-		case ENTRY:
-			/* open a new file */
-			fclose(fp);
-		        fp = output_file(current->label);
-			fprintf(fp, "\n");
-			fprintf(fp, "/***** %-20s ********************************/\n",
-				current->label);
-			break;
-	}
-
-	switch(current->node_type)
-	{
-		case COLUMN:
-			if(current->access & READ_FLAG)
-			{
-				fprintf(fp, "\n");
-				fprintf(fp, "int get_%s(int search_type, ",
-					current->label);
-
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-96)*/
-						fprintf(fp, "Integer *%s, ",
-							current->label);
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "String *%s, ",
-							current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "Oid *%s, ",
-							current->label);
-						break;
-
-					default:
-						error_exit("output_extern_function(): Unknown type (%d) for %s",
-						current->type,
-						current->label);
-				}
-
-				indexs = current->parent->indexs;
-
-/* not more ind. index */
- 
-				if(indexs)
-				{
-					if(indexs->tp)
-					{
-						switch(indexs->tp->type)
-						{
-							case TYPE_INTEGER:
-							case TYPE_COUNTER:
-							case TYPE_GAUGE:
-							case TYPE_TIMETICKS: 
-								fprintf(fp, "IndexType *%s)\n",
-									"index");
-								break;
-
-							case TYPE_OCTETSTR:
-							case TYPE_IPADDR:
-							case TYPE_OPAQUE:
-								fprintf(fp, "IndexType *%s)\n",
-									"index");
-								break;
-
-							case TYPE_OBJID:
-								fprintf(fp, "IndexType *%s)\n",
-									"index");
-								break;
-
-							default:
-								error_exit("output_extern_function(): Unknown type (%d) for %s",
-								indexs->tp->type,
-								indexs->tp->label);
-						}
-					}
-					else
-					{
-						error("WARNING: By default, the type of INDEX %s set to INTEGER",
-							indexs->label);
-						fprintf(fp, "IndexType *%s)\n",
-								"index");
-					}
-
-					indexs = indexs->next;
-				}
-
-			PRINT_OPEN_BRACKET
-
-			switch(current->type)
-			{ 
-						case TYPE_INTEGER:
-						case TYPE_COUNTER:
-						case TYPE_TIMETICKS: 
-						case TYPE_GAUGE:
-							PRINT_GET_CASE_BLOCK 
-							fprintf(fp,"\t/*assume that the mib variable has a value of 1 */\n\n");
-							fprintf(fp,"\t*%s = 1;\n",current->label);
-							fprintf(fp,"\treturn SNMP_ERR_NOERROR;\n");
-							break;
-
-						case TYPE_OCTETSTR:
-						case TYPE_IPADDR:
-						case TYPE_OPAQUE:
-							fprintf(fp, "\tu_char *str;\n");
-							fprintf(fp, "\tint len;\n\n");
-							PRINT_GET_CASE_BLOCK 
-							PRINT_GET_STRING_DUMBY_BLOCK 
-							break;
-
-						case TYPE_OBJID:
-							fprintf(fp, "\tSubid *sub;\n");
-							fprintf(fp, "\tSubid fake_sub[] = {1,3,6,1,4,1,4,42};\n");
-							fprintf(fp, "\tint len;\n\n");
-							PRINT_GET_CASE_BLOCK 
-							PRINT_GET_OID_DUMBY_BLOCK 
-							break;
-
-							default:
-								error_exit("output_extern_function(): Unknown type (%d) for %s",
-								current->type,
-								current->label);
-			}
-
-				PRINT_CLOSE_BRACKET
-			}
-
-			if(current->access & WRITE_FLAG)
-			{
-				fprintf(fp, "\n");
-				fprintf(fp, "int set_%s(int pass, ",
-					current->label);
-
-				indexs = current->parent->indexs;
-
-				/* no more ind. index */
-				if(indexs)
-				{
-					if(indexs->tp)
-					{
-						switch(indexs->tp->type)
-						{
-							case TYPE_INTEGER:
-							case TYPE_COUNTER:
-							case TYPE_GAUGE:
-							case TYPE_TIMETICKS:
-							case TYPE_OCTETSTR:
-							case TYPE_IPADDR:
-							case TYPE_OPAQUE:
-							case TYPE_OBJID:
-								fprintf(fp, "IndexType %s, ",
-									"index");
-								break;
-
-							default:
-								error_exit("output_function(): Unknown type (%d) for %s",
-									indexs->tp->type,
-								indexs->tp->label);
-						}
-					}
-					else
-					{
-						error("WARNING: By default, the type of INDEX %s set to INTEGER",
-							indexs->label);
-						fprintf(fp, "Integer %s, ",
-							indexs->label);
-					}
-					indexs = indexs->next;
-				}
-
-				
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-96)*/
-						fprintf(fp, "Integer *%s)\n",
-							current->label);
-						PRINT_OPEN_BRACKET
-						SET_PRINT_ENTRY_BLOCK
-						fprintf(fp, "\t\t\tprintf(\"The new value is %%d\\n\",%s);\n",current->label);
-						fprintf(fp, "\t\t\treturn SNMP_ERR_NOERROR;\n");
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "String *%s)\n",
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\tchar buf[100];\n\n");
-						SET_PRINT_ENTRY_BLOCK
-						fprintf(fp, "\t\t\tmemcpy(buf,%s->chars,%s->len);\n",current->label,current->label);
-						fprintf(fp, "\t\t\tbuf[%s->len+1] = '\\0';\n",current->label);
-						fprintf(fp, "\t\t\tprintf(\"The new value is %%s\\n\",buf);\n");
-						fprintf(fp, "\t\t\treturn SNMP_ERR_NOERROR;\n");
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "Oid *%s)\n",
-							current->label);
-						PRINT_OPEN_BRACKET
-						SET_PRINT_ENTRY_BLOCK
-						fprintf(fp, "\t\t\tprintf(\"The new value is %%s\\n\",SSAOidString(%s));\n",current->label);
-						fprintf(fp, "\t\t\treturn SNMP_ERR_NOERROR;\n");
-						break;
-
-					default:
-						error_exit("output_function(): Unknown type (%d) for %s",
-							current->type,
-							current->label);
-				}
-				PRINT_TAG_CLOSE_BRACKET
-				PRINT_CLOSE_BRACKET
-				fprintf(fp, "\n");
-			}
-
-			if( (current->access & READ_FLAG) || (current->access & WRITE_FLAG) )
-			{
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-95)*/
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "\n");
-						fprintf(fp, "void free_%s(String *%s)\n",
-							current->label,
-							current->label);
-                                		fprintf(fp, "{\n");
-                                		fprintf(fp, "\t if(%s->",current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "\n");
-						fprintf(fp, "void free_%s(Oid *%s)\n",
-							current->label,
-							current->label);
-                                		fprintf(fp, "{\n");
-                                		fprintf(fp, "\t if(%s->",current->label);
-						break;
-
-					default:
-						error_exit("output_extern_function(): Unknown type (%d) for %s",
-							current->type,
-							current->label);
-				}
-                                switch(current->type)
-                                {
-                                        case TYPE_INTEGER:
-                                        case TYPE_COUNTER:
-                                        case TYPE_GAUGE:
-                                        case TYPE_TIMETICKS:
-                                                break;
- 
-                                        case TYPE_OCTETSTR:
-                                        case TYPE_IPADDR:
-                                        case TYPE_OPAQUE:
-                                                fprintf(fp, "chars!=NULL && %s->len !=0)\n",current->label);
-						fprintf(fp, "\t{\n");
-                                                fprintf(fp, "\t\tfree(%s->chars);\n",current->label);
-                                                fprintf(fp,"\t\t%s->len = 0;\n",current->label);
-						fprintf(fp, "\t}\n");
-                                		fprintf(fp, "}\n");
-                                                break;
- 
-                                        case TYPE_OBJID:
-                                                fprintf(fp, "subids!=NULL && %s->len !=0)\n",current->label);
-						fprintf(fp, "\t{\n");
-                                                fprintf(fp, "\t\tfree(%s->subids);\n",current->label);
-                                                fprintf(fp,"\t\t%s->len = 0;\n",current->label);
-						fprintf(fp, "\t}\n");
-                                		fprintf(fp, "}\n");
-                                                break;
- 
-                                        default:
-                                                error_exit("output_function(): Unknown type (%d) for %s",
-                                                        current->type,
-                                                        current->label);
-                                }
-			}
-
-			break;
-
-
-		case ENTRY:
-			fprintf(fp, "\n");
-			fprintf(fp, "extern int get_%s(int search_type, %c%s_t **%s_data",
-				current->label,
-				toupper(current->label[0]),
-				&(current->label[1]),
-				current->label);
-
-			indexs = current->indexs;
-
-/* no more ind. index */
-			if(indexs)
-			{
-				if(indexs->tp)
-				{
-					switch(indexs->tp->type)
-					{
-						case TYPE_INTEGER:
-						case TYPE_COUNTER:
-						case TYPE_GAUGE:
-						case TYPE_TIMETICKS:
-
-						case TYPE_OCTETSTR:
-						case TYPE_IPADDR:
-						case TYPE_OPAQUE:
-
-						case TYPE_OBJID:
-							fprintf(fp, ", IndexType *%s",
-								"index");
-							break;
-
-						default:
-							error_exit("output_function(): Unknown type (%d) for %s",
-								indexs->tp->type,
-								indexs->tp->label);
-					}
-				}
-				else
-				{
-					error("WARNING: By default, the type of INDEX %s set to INTEGER",
-						indexs->label);
-					fprintf(fp, ", Integer *%s",
-						indexs->label);
-				}
-
-				indexs = indexs->next;
-			}
-			fprintf(fp, ")\n");
-			fprintf(fp, "{\n");
-			fprintf(fp, "\n");
-			fprintf(fp, "\tint res;\n");
-			fprintf(fp, "\tIndexType backupIndex, useIndex;\n");
-			fprintf(fp, "\tint i;\n");
-			fprintf(fp, "\n");
-			fprintf(fp, "\t*%s_data = (%c%s_t*)calloc(1,sizeof(%c%s_t));\n",
-					current->label,
-					toupper(current->label[0]), &(current->label[1]),
-					toupper(current->label[0]), &(current->label[1]));
-			fprintf(fp,"\tif(%s_data == NULL) return SNMP_ERR_GENERR;\n",current->label);
-			fprintf(fp,"\n");
-		
-				first_time_entry_print = 0;
-				for(child = current->child_list; child; child = child->next_peer)
-				{
-					if(!(child->access & READ_FLAG) )
-						continue;
-
-                                	switch(child->type)
-                                	{
-                                       	 case TYPE_INTEGER:
-                                       	 case TYPE_COUNTER:
-                                       	 case TYPE_GAUGE:
-                                       	 case TYPE_TIMETICKS:
-                                       	 case TYPE_OCTETSTR:
-                                       	 case TYPE_IPADDR:
-                                       	 case TYPE_OPAQUE:
-                                        case TYPE_OBJID:
-						first_time_entry_print++;
-						if(first_time_entry_print==1){
-			fprintf(fp, "\n");
-			fprintf(fp, "\tbackupIndex.type = index->type;\n");
-			fprintf(fp, "\tbackupIndex.len = index->len;\n");
-			fprintf(fp, "\tbackupIndex.value = (int*)calloc(index->len,sizeof(int));\n");
-			fprintf(fp, "\tfor(i=0;i<index->len;i++)\n");
-			fprintf(fp, "\t\tbackupIndex.value[i] = index->value[i];\n");
-	fprintf(fp, "\tuseIndex.type = backupIndex.type;\n");
-	fprintf(fp, "\tuseIndex.len = backupIndex.len;\n");
-	fprintf(fp, "\tuseIndex.value = (int*)calloc(backupIndex.len,sizeof(int));\n");
-	fprintf(fp, "\n");
-}else{
-	fprintf(fp, "\n");
-	fprintf(fp, "\tfor(i=0;i<backupIndex.len;i++)\n");
-	fprintf(fp, "\t\tuseIndex.value[i] = backupIndex.value[i];\n");
-	fprintf(fp, "\n");
-}
-						fprintf(fp,"\tres = ");
-						fprintf(fp,"get_%s(\n",child->label);
-						fprintf(fp,"\t        search_type,\n");
-						fprintf(fp,"\t        &((*%s_data)->%s),\n",current->label,child->label);
-						if(first_time_entry_print==1)
-						  fprintf(fp,"\t        index);\n");
-						else
-						  fprintf(fp,"\t        &useIndex);\n");
-						fprintf(fp,"\tif(res != SNMP_ERR_NOERROR){\n"); 
-                                                fprintf(fp,"\t\tfree_%s(*%s_data);\n",current->label,current->label);
-						fprintf(fp, "\t\t*%s_data=NULL;\n",current->label);
-                                                fprintf(fp,"\t\tfree((char *)backupIndex.value);\n");
-                                                fprintf(fp,"\t\tfree((char *)useIndex.value);\n");
-						fprintf(fp, "\t\treturn res;\n\n");
-						fprintf(fp, "\t}\n");
-
-                                                break;
-
-                                        default:
-                                                error_exit("output_function(): Unknown type (%d) for %s",
-                                                        child->type,
-                                                        child->label);
-                                	}
-				}
-
-
-                        fprintf(fp,"\t free((char *)backupIndex.value);\n");
-                        fprintf(fp,"\t free((char *)useIndex.value);\n");
-			fprintf(fp, "\t return res;\n");
-			fprintf(fp, "}\n");
-			fprintf(fp, "\n");
-
-				fprintf(fp, "\n");
-				fprintf(fp, "void free_%s(%c%s_t *%s)\n",
-			                current->label, toupper(current->label[0]),
-                                        &(current->label[1]), current->label);
-                                fprintf(fp, "{\n");
- 
-                                fprintf(fp,"\tif (%s) {\n", current->label);
-	
-				for(child = current->child_list; child; child = child->next_peer)
-				{
-					if(!(child->access & READ_FLAG) )
-						continue;
-
-                                	switch(child->type)
-                                	{
-                                       	 case TYPE_INTEGER:
-                                       	 case TYPE_COUNTER:
-                                       	 case TYPE_GAUGE:
-                                       	 case TYPE_TIMETICKS:
-                                       	         break;
- 
-                                       	 case TYPE_OCTETSTR:
-                                       	 case TYPE_IPADDR:
-                                       	 case TYPE_OPAQUE:
-                                        case TYPE_OBJID:
-						fprintf(fp, "\t\tfree_%s(&(%s->%s));\n",
-								child->label,
-								current->label,child->label);
-                                                break;
-
-                                        default:
-                                                error_exit("output_function(): Unknown type (%d) for %s",
-                                                        child->type,
-                                                        child->label);
-                                	}
-				}
-                                fprintf(fp,"\t\tfree(%s);\n",current->label);
-                                fprintf(fp,"\t\t%s=NULL;\n",current->label);
-                                fprintf(fp,"\t}\n");
-                                fprintf(fp, "}\n");
-			
-			break;
-	}
-
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_entry_function(fp, tp);
-	}
-
-}
-static void output_single_obj_function(FILE *fp, struct tree *current)
-{
-	struct tree *tp;
-
-
-	switch(current->node_type)
-	{
-		case OBJECT:
-			if(current->access & READ_FLAG)
-			{
-				fprintf(fp, "\n");
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS:
-						fprintf(fp, "int get_%s(Integer *%s)\n",
-							current->label,
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\t/* assume that the mib variable has a value of 1 */\n\n");
-						fprintf(fp, "\t*%s = 1;\n",current->label);
-						fprintf(fp, "\treturn SNMP_ERR_NOERROR;\n");
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "int get_%s(String *%s)\n",
-							current->label,
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\tu_char *str;\n");
-						fprintf(fp, "\tint len;\n\n");
-
-						PRINT_GET_STRING_DUMBY_BLOCK 
-						
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "int get_%s(Oid *%s)\n",
-							current->label,
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\tSubid *sub;\n");
-						fprintf(fp, "\tSubid fake_sub[] = {1,3,6,1,4,1,4,42};\n");
-						fprintf(fp, "\tint len;\n\n");
-
-						PRINT_GET_OID_DUMBY_BLOCK 
-
-						break;
-
-					deafult:
-						error_exit("output_function(): Unknown type (%d) for %s", current->type,
-							current->label);
-				}
-				PRINT_CLOSE_BRACKET
-			}
-
-			if(current->access & WRITE_FLAG)
-			{
-				fprintf(fp, "\n");
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS: /*(5-15-96)*/
-						fprintf(fp, "int set_%s(int pass, Integer *%s)\n",
-							current->label,
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\tswitch(pass)\n");
-						fprintf(fp, "\t{\n");
-						PRINT_SET_CASE_BLOCK 
-						fprintf(fp, "\t\t\tprintf(\"The new value is %%d\\n\",%s);\n",current->label);
-						fprintf(fp, "\t\t\treturn SNMP_ERR_NOERROR;\n");
-						fprintf(fp, "\t}\n");
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "int set_%s(int pass, String *%s)\n",
-							current->label,
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\tchar buf[100];\n\n");
-						fprintf(fp, "\tswitch(pass)\n");
-						fprintf(fp, "\t{\n");
-						PRINT_SET_CASE_BLOCK 
-						fprintf(fp, "\t\t\tmemcpy(buf,%s->chars,%s->len);\n",current->label,current->label);
-						fprintf(fp, "\t\t\tbuf[%s->len+1] = '\\0';\n",current->label);
-						fprintf(fp, "\t\t\tprintf(\"The new value is %%s\\n\",buf);\n");
-						fprintf(fp, "\t\t\treturn SNMP_ERR_NOERROR;\n");
-						fprintf(fp, "\t}\n");
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "int set_%s(int pass, Oid *%s)\n",
-							current->label,
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\tswitch(pass)\n");
-						fprintf(fp, "\t{\n");
-						PRINT_SET_CASE_BLOCK 
-						fprintf(fp, "\t\t\tprintf(\"The new value is %%s\\n\",SSAOidString(%s));\n",current->label);
-						fprintf(fp, "\t\t\treturn SNMP_ERR_NOERROR;\n");
-						fprintf(fp, "\t}\n");
-						break;
-
-					default:
-						error_exit("output_function(): Unknown type (%d) for %s", current->type,
-							current->label);
-				}
-
-				PRINT_CLOSE_BRACKET
-				fprintf(fp, "\n");
-			}
-
-			if( (current->access & READ_FLAG) || (current->access & WRITE_FLAG) )
-			{
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS:
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "\n");
-						fprintf(fp, "void free_%s(String *%s)\n",
-							current->label,
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\t if(%s->",current->label);
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "\n");
-						fprintf(fp, "void free_%s(Oid *%s)\n",
-							current->label,
-							current->label);
-						PRINT_OPEN_BRACKET
-						fprintf(fp, "\t if(%s->",current->label);
-						break;
-
-					default:
-						error_exit("output_function(): Unknown type (%d) for %s",
-							current->type,
-							current->label);
-				}
-				switch(current->type)
-				{
-					case TYPE_INTEGER:
-					case TYPE_COUNTER:
-					case TYPE_GAUGE:
-					case TYPE_TIMETICKS:
-						break;
-
-					case TYPE_OCTETSTR:
-					case TYPE_IPADDR:
-					case TYPE_OPAQUE:
-						fprintf(fp, "chars!=NULL && %s->len !=0)\n",current->label);
-						fprintf(fp, "\t{\n");
-						fprintf(fp, "\t\tfree(%s->chars);\n",current->label);
-						fprintf(fp,"\t\t%s->len = 0;\n",current->label);
-						fprintf(fp,"\t}\n");
-						PRINT_CLOSE_BRACKET
-						break;
-
-					case TYPE_OBJID:
-						fprintf(fp, "subids!=NULL && %s->len !=0)\n",current->label);
-						fprintf(fp, "\t{\n");
-						fprintf(fp, "\t\tfree(%s->subids);\n",current->label);
-						fprintf(fp,"\t\t%s->len = 0;\n",current->label);
-						fprintf(fp,"\t}\n");
-						PRINT_CLOSE_BRACKET
-						break;
-
-					default:
-						error_exit("output_function(): Unknown type (%d) for %s",
-							current->type,
-							current->label);
-				}
-			}
-			break;
-	}
-
-	for(tp = current->child_list; tp; tp = tp->next_peer)
-	{
-		output_single_obj_function(fp, tp);
-	}
-
-}
-
-
-/*************************************************************************/
-static FILE* output_file(char* filename)
-{
-	char pathname[MAXPATHLEN];
-	char backup_pathname[MAXPATHLEN];
-	FILE *fp;
-	struct stat buf;
-
-
-	sprintf(pathname, "%s_%s.c", base_name,filename);
-	sprintf(backup_pathname, "%s.%s.c.old", base_name,filename);
-	trace("Creating %s ...\n", pathname);
-	if(stat(pathname, &buf) == 0)
-	{
-		if(rename(pathname,backup_pathname)==-1){
-		  error_exit("The file %s already exists and can't be renamed!", pathname);
-		}
-	}
-
-	fp = fopen(pathname, "w");
-	if(fp == NULL)
-	{
-		error_exit("Can't open %s %s", pathname, errno_string());
-	}
-
-	fprintf(fp, "#include <sys/types.h>\n");
-	fprintf(fp, "#include <netinet/in.h>\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "#include \"impl.h\"\n");
-	fprintf(fp, "#include \"asn1.h\"\n");
-	fprintf(fp, "#include \"error.h\"\n");
-	fprintf(fp, "#include \"snmp.h\"\n");
-	fprintf(fp, "#include \"trap.h\"\n");
-	fprintf(fp, "#include \"pdu.h\"\n");
-	fprintf(fp, "#include \"node.h\"\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "#include \"%s_stub.h\"\n", base_name);
-	fprintf(fp, "\n");
-	fprintf(fp, "\n");
-
-	return(fp);
-}
-
-static void output_appl_c(struct tree *current)
-{
-	FILE *fp;
-
-	fp = output_file("appl");
-	fprintf(fp, "/***** GLOBAL VARIABLES *****/\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "char default_config_file[] = \"/etc/snmp/conf/%s.reg\";\n", base_name);
-	fprintf(fp, "char default_sec_config_file[] = \"/etc/snmp/conf/%s.acl\";\n", base_name);
-	fprintf(fp, "char default_error_file[] = \"/var/snmp/%sd.log\";\n", base_name);
-	fprintf(fp, "\n");
-	fprintf(fp, "\n");
-
-	fprintf(fp, "/***********************************************************/\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "void agent_init()\n");
-	fprintf(fp, "{\n");
-	fprintf(fp, "}\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "\n");
-
-	fprintf(fp, "/***********************************************************/\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "void agent_end()\n");
-	fprintf(fp, "{\n");
-	fprintf(fp, "}\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "\n");
-
-	fprintf(fp, "/***********************************************************/\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "void agent_loop()\n");
-	fprintf(fp, "{\n");
-	fprintf(fp,"\tint condition=FALSE;\n\n");
- 	fprintf(fp,"\tif(condition==TRUE){\n");
-	output_trap_function_call(fp);
-	fprintf(fp, "\t}\n");
-	fprintf(fp, "}\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "\n");
-
-	fprintf(fp, "/***********************************************************/\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "void agent_select_info(fd_set *fdset, int *numfds)\n");
-	fprintf(fp, "{\n");
-	fprintf(fp, "}\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "\n");
-
-	fprintf(fp, "/***********************************************************/\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "void agent_select_callback(fd_set *fdset)\n");
-	fprintf(fp, "{\n");
-	fprintf(fp, "}\n");
-	fprintf(fp, "\n");
-	fprintf(fp, "\n");
-
-	fprintf(fp,"void main(int argc, char** argv)\n");
-	fprintf(fp,"{\n");
-	fprintf(fp,"\tSSAMain(argc,argv);\n");
-	fprintf(fp,"}\n\n");
-
-	fprintf(fp, "\n");
-	fclose(fp);
-}
-
-static void output_trap_c(struct tree *current)
-{
-	FILE *fp;
-
-	fp = output_file("trap");
-	output_trap_structure(fp);
-	fclose(fp);
-}
-
-static void output_stub_c(struct tree *current)
-{
-	FILE *fp;
-
-	fp = output_file("stub");
-	output_single_obj_function(fp, current);
-	output_entry_function(fp, current);
-
-	fclose(fp);
-}
-
-
-
--- a/usr/src/cmd/agents/snmp/parser/parse.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2357 +0,0 @@
-/*
- * Copyright 1999 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/******************************************************************
-	Copyright 1989, 1991, 1992 by Carnegie Mellon University
-
-                      All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of CMU not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-******************************************************************/
-/*
- * parse.c
- */
-
-/* HISTORY
- * Jerry Yeung	6-6-96
- * Jerry Yeung	1-9-97	fix 4019317
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include "parse.h"
-
-struct trap_item *trap_list = NULL;
-
-/* A quoted string value-- too long for a general "token" */
-char *quoted_string_buffer;
-
-/*
- * This is one element of an object identifier with either an integer
- * subidentifier, or a textual string label, or both.
- * The subid is -1 if not present, and label is NULL if not present.
- */
-struct subid {
-    int subid;
-    char *label;
-};
-
-#define MAXTC	128
-struct tc {	/* textual conventions */
-    int type;
-    char descriptor[MAXTOKEN];
-    struct enum_list *enums;
-} tclist[MAXTC];
-
-
-
-int Line = 1;
-
-#define SYNTAX_MASK	0x80
-/* types of tokens
- Tokens wiht the SYNTAX_MASK bit set are syntax tokens */
-#define	CONTINUE    -1
-#define ENDOFFILE   0
-#define LABEL	    1
-#define SUBTREE	    2
-#define SYNTAX	    3
-#define PARSE_OBJID	    (4 | SYNTAX_MASK)
-#define OCTETSTR    (5 | SYNTAX_MASK)
-#define PARSE_INTEGER	    (6 | SYNTAX_MASK)
-#define NETADDR	    (7 | SYNTAX_MASK)
-#define	IPADDR	    (8 | SYNTAX_MASK)
-#define PARSE_COUNTER	    (9 | SYNTAX_MASK)
-#define PARSE_GUAGE	    (10 | SYNTAX_MASK)
-#define PARSE_TIMETICKS   (11 | SYNTAX_MASK)
-#define PARSE_OPAQUE	    (12 | SYNTAX_MASK)
-#define NUL	    (13 | SYNTAX_MASK)
-#define SEQUENCE    14
-#define OF	    15	/* SEQUENCE OF */
-#define OBJTYPE	    16
-#define ACCESS	    17
-#define READONLY    18
-#define READWRITE   19
-#define	WRITEONLY   20
-#define NOACCESS    21
-#define STATUS	    22
-#define MANDATORY   23
-#define OPTIONAL    24
-#define OBSOLETE    25
-/* #define RECOMMENDED 26 */
-#define PUNCT	    27
-#define EQUALS	    28
-#define NUMBER	    29
-#define LEFTBRACKET 30
-#define RIGHTBRACKET 31
-#define	LEFTPAREN   32
-#define RIGHTPAREN  33
-#define COMMA	    34
-#define DESCRIPTION 35
-#define QUOTESTRING 36
-#define INDEX       37
-#define DEFVAL      38
-#define DEPRECATED  39
-#define SIZE        40
-#define BITSTRING   (41 | SYNTAX_MASK)
-#define NSAPADDRESS (42 | SYNTAX_MASK)
-#define PARSE_COUNTER64   (43 | SYNTAX_MASK)
-#define OBJGROUP    44
-#define NOTIFTYPE   45
-#define AUGMENTS    46
-#define COMPLIANCE  47
-#define READCREATE  48
-#define UNITS       49
-#define REFERENCE   50
-#define NUM_ENTRIES 51
-#define MODULEIDENTITY 52
-#define LASTUPDATED 53
-#define ORGANIZATION 54
-#define CONTACTINFO 55
-#define UINTEGER32 (56 | SYNTAX_MASK)
-#define CURRENT	    57
-#define DEFINITIONS 58
-#define END         59
-#define SEMI        60
-
-/*
--- Olivier Reisacher 95/2/14
-*/
-#define PSEUDO_TOKEN_TABLE        61
-#define PSEUDO_TOKEN_ENTRY        62
-
-/* Jerry Yeung 6-6-96 (trap-support) */
-#define TRAPTYPE 63
-#define ENTERPRISE 64
-#define VARIABLES 65
-
-struct tok {
-	char *name;			/* token name */
-	int len;			/* length not counting nul */
-	int token;			/* value */
-	int hash;			/* hash of name */
-	struct tok *next;		/* pointer to next in hash table */
-};
-
-
-struct tok tokens[] = {
-	{ "obsolete", sizeof ("obsolete")-1, OBSOLETE },
-	{ "Opaque", sizeof ("Opaque")-1, PARSE_OPAQUE },
-/*	{ "recommended", sizeof("recommended")-1, RECOMMENDED },  */
-	{ "optional", sizeof ("optional")-1, OPTIONAL },
-	{ "LAST-UPDATED", sizeof ("LAST-UPDATED")-1, LASTUPDATED },
-	{ "ORGANIZATION", sizeof ("ORGANIZATION")-1, ORGANIZATION },
-	{ "CONTACT-INFO", sizeof ("CONTACT-INFO")-1, CONTACTINFO },
-	{ "MODULE-IDENTITY", sizeof ("MODULE-IDENTITY")-1, MODULEIDENTITY },
-	{ "MODULE-COMPLIANCE", sizeof ("MODULE-COMPLIANCE")-1, COMPLIANCE },
-        { "DEFINITIONS", sizeof("DEFINITIONS")-1, DEFINITIONS},
-        { "END", sizeof("END")-1, END},
-        { ";", sizeof(";")-1, SEMI},
-	{ "AUGMENTS", sizeof ("AUGMENTS")-1, AUGMENTS },
-	{ "not-accessible", sizeof ("not-accessible")-1, NOACCESS },
-	{ "write-only", sizeof ("write-only")-1, WRITEONLY },
-	{ "NsapAddress", sizeof("NsapAddress")-1, NSAPADDRESS},
-	{ "UNITS", sizeof("Units")-1, UNITS},
-	{ "REFERENCE", sizeof("REFERENCE")-1, REFERENCE},
-	{ "NUM-ENTRIES", sizeof("NUM-ENTRIES")-1, NUM_ENTRIES},
-	{ "BITSTRING", sizeof("BitString")-1, BITSTRING},
-	{ "BIT", sizeof("BIT")-1, CONTINUE},
-	{ "Counter64", sizeof("Counter64")-1, PARSE_COUNTER64},
-	{ "TimeTicks", sizeof ("TimeTicks")-1, PARSE_TIMETICKS },
-	{ "NOTIFICATION-TYPE", sizeof ("NOTIFICATION-TYPE")-1, NOTIFTYPE },
-	{ "OBJECT-GROUP", sizeof ("OBJECT-GROUP")-1, OBJGROUP },
-	{ "OBJECTIDENTIFIER", sizeof ("OBJECTIDENTIFIER")-1, PARSE_OBJID },
-	/*
-	 * This CONTINUE appends the next word onto OBJECT,
-	 * hopefully matching OBJECTIDENTIFIER above.
-	 */
-	{ "OBJECT", sizeof ("OBJECT")-1, CONTINUE },
-	{ "NetworkAddress", sizeof ("NetworkAddress")-1, NETADDR },
-	{ "Gauge", sizeof ("Gauge")-1, PARSE_GUAGE },
-	{ "read-write", sizeof ("read-write")-1, READWRITE },
-	{ "read-create", sizeof ("read-create")-1, READCREATE },
-	{ "OCTETSTRING", sizeof ("OCTETSTRING")-1, OCTETSTR },
-	{ "OCTET", sizeof ("OCTET")-1, -1 },
-	{ "OF", sizeof ("OF")-1, OF },
-	{ "SEQUENCE", sizeof ("SEQUENCE")-1, SEQUENCE },
-	{ "NULL", sizeof ("NULL")-1, NUL },
-	{ "IpAddress", sizeof ("IpAddress")-1, IPADDR },
-	{ "UInteger32", sizeof ("UInteger32")-1, UINTEGER32 },
-	{ "INTEGER", sizeof ("INTEGER")-1, PARSE_INTEGER },
-	{ "Counter", sizeof ("Counter")-1, PARSE_COUNTER },
-	{ "read-only", sizeof ("read-only")-1, READONLY },
-        { "DESCRIPTION", sizeof ("DESCRIPTION")-1, DESCRIPTION },
-        { "INDEX", sizeof ("INDEX")-1, INDEX },
-        { "DEFVAL", sizeof ("DEFVAL")-1, DEFVAL },
-        { "deprecated", sizeof ("deprecated")-1, DEPRECATED },
-        { "SIZE", sizeof ("SIZE")-1, SIZE },
-	{ "MAX-ACCESS", sizeof ("MAX-ACCESS")-1, ACCESS },
-	{ "ACCESS", sizeof ("ACCESS")-1, ACCESS },
-	{ "mandatory", sizeof ("mandatory")-1, MANDATORY },
-	{ "current", sizeof ("current")-1, CURRENT },
-	{ "STATUS", sizeof ("STATUS")-1, STATUS },
-	{ "SYNTAX", sizeof ("SYNTAX")-1, SYNTAX },
-	{ "OBJECT-TYPE", sizeof ("OBJECT-TYPE")-1, OBJTYPE },
-	{ "{", sizeof ("{")-1, LEFTBRACKET },
-	{ "}", sizeof ("}")-1, RIGHTBRACKET },
-	{ "::=", sizeof ("::=")-1, EQUALS },
-	{ "(", sizeof ("(")-1, LEFTPAREN },
-	{ ")", sizeof (")")-1, RIGHTPAREN },
-	{ ",", sizeof (",")-1, COMMA },
-	{ "TRAP-TYPE", sizeof ("TRAP-TYPE")-1, TRAPTYPE },
-	{ "ENTERPRISE", sizeof ("ENTERPRISE")-1, ENTERPRISE },
-	{ "VARIABLES", sizeof ("VARIABLES")-1, VARIABLES },
-	{ NULL }
-};
-
-#define	HASHSIZE	32
-#define	BUCKET(x)	(x & 0x01F)
-
-struct tok	*buckets[HASHSIZE];
-static void
-do_subtree(struct tree *root, struct node **nodes);
-static int
-get_token(register FILE *fp, register char *token);
-static int
-parseQuoteString(register FILE *fp, register char *token);
-static int
-tossObjectIdentifier(register FILE *fp);
-
-int number_value;
-
-static void
-hash_init()
-{
-	register struct tok	*tp;
-	register char	*cp;
-	register int	h;
-	register int	b;
-
-/*
--- Olivier Reisacher 95/2/14
-	bzero((char *)buckets, sizeof(buckets));
-*/
-	memset((void *) buckets, 0, sizeof(buckets));
-
-	for (tp = tokens; tp->name; tp++) {
-		for (h = 0, cp = tp->name; *cp; cp++)
-			h += *cp;
-		tp->hash = h;
-		b = BUCKET(h);
-		if (buckets[b])
-		    tp->next = buckets[b]; /* BUG ??? */
-		buckets[b] = tp;
-	}
-}
-
-#define NHASHSIZE    128
-#define NBUCKET(x)   (x & 0x7F)
-struct node *nbuckets[NHASHSIZE];
-
-void init_node_hash(nodes)
-     struct node *nodes;
-{
-     register struct node *np, *nextp;
-     register char *cp;
-     register int hash;
-
-/*
--- Olivier Reisacher 95/2/14
-     bzero((char *)nbuckets,sizeof(nbuckets));
-*/
-     memset((void *) nbuckets, 0, sizeof(nbuckets));
-
-     for(np = nodes; np;){
-         nextp = np->next;
-         hash = 0;
-	 for(cp = np->parent; *cp; cp++)
-	     hash += *cp;
-	 np->next = nbuckets[NBUCKET(hash)];
-	 nbuckets[NBUCKET(hash)] = np;
-	 np = nextp;
-     }
-}
-
-static char *
-Malloc(num)
-    unsigned num;
-{
-    char     *buf;
-    
-    /* this is to fix (what seems to be) a problem with the IBM RT C
-library malloc */
-    if (num < 16)
-	num = 16;
-    buf = (char *)malloc (num);
-    if (buf == NULL) {
-      fprintf(stderr, "malloc failed.  Exiting\n");
-      exit(1);
-    }
-    return (char *)buf;
-}
-
-static void
-print_error(string, token, type)
-    char *string;
-    char *token;
-    int type;
-{
-    if (type == ENDOFFILE)
-	fprintf(stderr, "%s(EOF): On or around line %d\n", string, Line);
-    else if (token)
-	fprintf(stderr, "%s(%s): On or around line %d\n", string, token, Line);
-    else
-	fprintf(stderr, "%s: On or around line %d\n", string, Line);
-}
-
-/*
--- Olivier Reisacher 95/2/14
-#ifdef TEST
-print_subtree(tree, count)
-*/
-void print_subtree(tree, count)
-    struct tree *tree;
-    int count;
-{
-    struct tree *tp;
-    int i;
-
-    for(i = 0; i < count; i++)
-	printf("  ");
-    printf("Children of %s:\n", tree->label);
-    count++;
-    for(tp = tree->child_list; tp; tp = tp->next_peer){
-	for(i = 0; i < count; i++)
-	    printf("  ");
-	printf("%s\n", tp->label);
-    }
-    for(tp = tree->child_list; tp; tp = tp->next_peer){
-	print_subtree(tp, count);
-    }
-}
-/*
--- Olivier Reisacher 95/2/14
-#endif
-*/
-
-int translation_table[256];
-
-void build_translation_table(){
-    int count;
-
-    for(count = 0; count < 256; count++){
-	switch(count){
-	    case PARSE_OBJID:
-		translation_table[count] = TYPE_OBJID;
-		break;
-	    case OCTETSTR:
-		translation_table[count] = TYPE_OCTETSTR;
-		break;
-	    case PARSE_INTEGER:
-		translation_table[count] = TYPE_INTEGER;
-		break;
-	    case NETADDR:
-		translation_table[count] = TYPE_IPADDR;
-		break;
-	    case IPADDR:
-		translation_table[count] = TYPE_IPADDR;
-		break;
-	    case PARSE_COUNTER:
-		translation_table[count] = TYPE_COUNTER;
-		break;
-	    case PARSE_GUAGE:
-		translation_table[count] = TYPE_GAUGE;
-		break;
-	    case PARSE_TIMETICKS:
-		translation_table[count] = TYPE_TIMETICKS;
-		break;
-	    case PARSE_OPAQUE:
-		translation_table[count] = TYPE_OPAQUE;
-		break;
-	    case NUL:
-		translation_table[count] = TYPE_NULL;
-		break;
-	    case PARSE_COUNTER64:
-		translation_table[count] = TYPE_COUNTER64;
-		break;
-	    case BITSTRING:
-		translation_table[count] = TYPE_BITSTRING;
-		break;
-	    case NSAPADDRESS:
-		translation_table[count] = TYPE_NSAPADDRESS;
-		break;
-	    case UINTEGER32:
-		translation_table[count] = TYPE_UINTEGER;
-		break;
-
-/*
--- Olivier Reisacher 95/2/14
-*/
-		case PSEUDO_TOKEN_TABLE:
-			translation_table[count] = TYPE_TABLE;
-			break;
-		case PSEUDO_TOKEN_ENTRY:
-			translation_table[count] = TYPE_ENTRY;
-			break;
-
-	    default:
-		translation_table[count] = TYPE_OTHER;
-		break;
-	}
-    }
-}
-
-/*
--- Olivier Reisacher 95/2/14
-static struct tree *
-*/
-struct tree *
-build_tree(nodes)
-    struct node *nodes;
-{
-    struct node *np;
-    struct tree *tp;
-    int bucket, nodes_left = 0;
-    
-    build_translation_table();
-    /* grow tree from this root node */
-    init_node_hash(nodes);
-
-/*
--- Olivier Reisacher 95/2/14
-     build root node 
-    tp = (struct tree *)Malloc(sizeof(struct tree));
-    tp->parent = NULL;
-    tp->next_peer = NULL;
-    tp->child_list = NULL;
-    tp->enums = NULL;
-    strcpy(tp->label, "joint-iso-ccitt");
-    tp->subid = 2;
-    tp->type = 0;
-    tp->description = 0;
-     XXX nodes isn't needed in do_subtree() ??? 
-    do_subtree(tp, &nodes);
-    lasttp = tp;
-
-     build root node 
-    tp = (struct tree *)Malloc(sizeof(struct tree));
-    tp->parent = NULL;
-    tp->next_peer = lasttp;
-    tp->child_list = NULL;
-    tp->enums = NULL;
-    strcpy(tp->label, "ccitt");
-    tp->subid = 0;
-    tp->type = 0;
-    tp->description = 0;
-     XXX nodes isn't needed in do_subtree() ??? 
-    do_subtree(tp, &nodes);
-    lasttp = tp;
-*/
-
-    /* build root node */
-    tp = (struct tree *)Malloc(sizeof(struct tree));
-    tp->parent = NULL;
-/*
--- Olivier Reisacher 95/2/14
-    tp->next_peer = lasttp;
-*/
-    tp->next_peer = NULL;
-    tp->child_list = NULL;
-    tp->enums = NULL;
-    strcpy(tp->label, "iso");
-    tp->subid = 1;
-    tp->type = 0;
-    tp->description = 0;
-    /* XXX nodes isn't needed in do_subtree() ??? */
-    do_subtree(tp, &nodes);
-/*
--- Olivier Reisacher 95/2/14
-*/
-	tp->access = 0;
-	tp->indexs = NULL;
-	tp->n_indexs = 0;
-
-
-#ifdef TEST
-    print_subtree(tp, 0);
-#endif /* TEST */
-    /* If any nodes are left, the tree is probably inconsistent */
-    for(bucket = 0; bucket < NHASHSIZE; bucket++){
-        if (nbuckets[bucket]){
-	    nodes_left = 1;
-	    break;
-	}
-    }
-    if (nodes_left){
-	fprintf(stderr, "The mib description doesn't seem to be consistent.\n");
-	fprintf(stderr, "Some nodes couldn't be linked under the \"iso\" tree.\n");
-	fprintf(stderr, "these nodes are left:\n");
-	for(bucket = 0; bucket < NHASHSIZE; bucket++){
-	    for(np = nbuckets[bucket]; np; np = np->next)
-	        fprintf(stderr, "%s ::= { %s %d } (%d)\n", np->label,
-			np->parent, np->subid, np->type);
-	}
-    }
-    return tp;
-}
-
-/*
- * Find all the children of root in the list of nodes.  Link them into the
- * tree and out of the nodes list.
- */
-static void
-do_subtree(root, nodes)
-    struct tree *root;
-    struct node **nodes;
-{
-    register struct tree *tp;
-    register struct node *np, **headp;
-    struct node *oldnp = NULL, *child_list = NULL, *childp = NULL;
-    char *cp;
-    int hash;
-    
-    tp = root;
-    hash = 0;
-    for(cp = tp->label; *cp; cp++)
-        hash += *cp;
-    headp = &nbuckets[NBUCKET(hash)];
-    /*
-     * Search each of the nodes for one whose parent is root, and
-     * move each into a separate list.
-     */
-    for(np = *headp; np; np = np->next){
-	if ((*tp->label != *np->parent) || strcmp(tp->label, np->parent)){
-	    if ((*tp->label == *np->label) && !strcmp(tp->label, np->label)){
-		/* if there is another node with the same label, assume that
-		 * any children after this point in the list belong to the other node.
-		 * This adds some scoping to the table and allows vendors to
-		 * reuse names such as "ip".
-		 */
-		break;
-	    }
-	    oldnp = np;
-	} else {
-	    if (child_list == NULL){
-		child_list = childp = np;   /* first entry in child list */
-	    } else {
-		childp->next = np;
-		childp = np;
-	    }
-	    /* take this node out of the node list */
-	    if (oldnp == NULL){
-		*headp = np->next;  /* fix root of node list */
-	    } else {
-		oldnp->next = np->next;	/* link around this node */
-	    }
-	}
-    }
-    if (childp)
-	childp->next = 0;	/* re-terminate list */
-    /*
-     * Take each element in the child list and place it into the tree.
-     */
-    for(np = child_list; np; np = np->next){
-	tp = (struct tree *)Malloc(sizeof(struct tree));
-	tp->parent = root;
-	tp->next_peer = NULL;
-	tp->child_list = NULL;
-	strcpy(tp->label, np->label);
-	tp->subid = np->subid;
-	tp->type = translation_table[np->type];
-        tp->oct_str_len = np->oct_str_len;
-	tp->enums = np->enums;
-	np->enums = NULL;	/* so we don't free them later */
-	tp->description = np->description; /* steals memory from np */
-	np->description = NULL; /* so we don't free it later */
-/*
--- Olivier Reisacher 95/2/14
-*/
-	tp->access = np->access;
-	tp->indexs = np->indexs;
-	np->indexs = NULL;
-	tp->n_indexs = np->n_indexs;
-/*
--- Olivier Reisacher 95/2/14
--- The goal of this modification is to order the
--- tree according to the subid
-
-	if (root->child_list == NULL){
-	    root->child_list = tp;
-	} else {
-	    peer->next_peer = tp;
-	}
-	peer = tp;
-*/
-	if(root->child_list == NULL)
-	{
-		root->child_list = tp;
-	}
-	else
-	{
-		struct tree *t = root->child_list;
-		struct tree *l = NULL;
-
-		while(t)
-		{
-			if(tp->subid < t->subid)
-			{
-				break;
-			}
-			l = t;
-			t = t->next_peer;
-		}
-		if(l == NULL)
-		{
-			tp->next_peer = root->child_list;
-			root->child_list = tp;
-		}
-		else
-		{
-			tp->next_peer = l->next_peer;
-			l->next_peer = tp;
-		}
-	}
-
-/*	if (tp->type == TYPE_OTHER) */
-	    do_subtree(tp, nodes);	/* recurse on this child if it isn't
-					   an end node */
-    }
-    /* free all nodes that were copied into tree */
-    oldnp = NULL;
-    for(np = child_list; np; np = np->next){
-	if (oldnp)
-	    free(oldnp);
-	oldnp = np;
-    }
-    if (oldnp)
-	free(oldnp);
-}
-
-
-/*
- * Takes a list of the form:
- * { iso org(3) dod(6) 1 }
- * and creates several nodes, one for each parent-child pair.
- * Returns NULL on error.
- */
-static int
-getoid(fp, oid,  length)
-    register FILE *fp;
-    register struct subid *oid;	/* an array of subids */
-    int length;	    /* the length of the array */
-{
-    register int count;
-    int type;
-    char token[MAXTOKEN];
-    register char *cp;
-
-#ifdef TRACE_PROC
-printf("getoid() invoked\n");
-#endif
-
-    if ((type = get_token(fp, token)) != LEFTBRACKET){
-	print_error("Expected \"{\"", token, type);
-	return NULL;
-    }
-    type = get_token(fp, token);
-    for(count = 0; count < length; count++, oid++){
-	oid->label = 0;
-	oid->subid = -1;
-	if (type == RIGHTBRACKET){
-	    return count;
-	} else if (type != LABEL && type != NUMBER){
-	    print_error("Not valid for object identifier", token, type);
-	    return NULL;
-	}
-	if (type == LABEL){
-	    /* this entry has a label */
-	    cp = (char *)Malloc((unsigned)strlen(token) + 1);
-	    strcpy(cp, token);
-	    oid->label = cp;
-	    type = get_token(fp, token);
-	    if (type == LEFTPAREN){
-		type = get_token(fp, token);
-		if (type == NUMBER){
-		    oid->subid = atoi(token);
-		    if ((type = get_token(fp, token)) != RIGHTPAREN){
-			print_error("Unexpected a closing parenthesis", token, type);
-			return NULL;
-		    }
-		} else {
-		    print_error("Expected a number", token, type);
-		    return NULL;
-		}
-	    } else {
-		continue;
-	    }
-	} else {
-	    /* this entry  has just an integer sub-identifier */
-	    oid->subid = atoi(token);
-	}
-	type = get_token(fp, token);
-    }
-    return count;
-
-
-}
-
-static void
-free_node(np)
-    struct node *np;
-{
-    struct enum_list *ep, *tep;
-/*
--- Olivier Reisacher 95/2/14
-*/
-	struct index_list *ip, *tip;
-
-	ip = np->indexs;
-	while(ip)
-	{
-		tip = ip;
-		ip = ip->next;
-		free((char *)tip);
-	}
-
-
-    ep = np->enums;
-    while(ep){
-	tep = ep;
-	ep = ep->next;
-	free((char *)tep);
-    }
-    free((char *)np);
-}
-
-int parse_traptype(fp,name)
-FILE *fp;
-char *name;
-{
-   int type;
-   char token[MAXTOKEN];
-   struct trap_item *ti;
-   struct index_list *ip;
-   static struct trap_item *last_trap_item=NULL;
-
-#ifdef TRACE_PROC
-printf("parse_traptype() invoked\n");
-#endif
-
-   type = get_token(fp,token);
-   if( type == ENTERPRISE){
-     if( (type = get_token(fp,token)) == LABEL){
-	/* create a trap item */
-        ti = (struct trap_item*)calloc(1, sizeof(struct trap_item));
-        if(ti==NULL){ 
-	 fprintf(stderr,"calloc failed\n");
-	 return 0;
-        }
-	strcpy(ti->label,name);
-	strcpy(ti->enterprise_label,token);
-	ti->enterprise_subids[0] = (u_long)-1;
-
-	type = get_token(fp,token);
-	while(type != EQUALS){
-	  switch(type){
-	    case VARIABLES:
-		type = get_token(fp,token);
-		if(type != LEFTBRACKET){
-		  print_error("{ expected in VARIABLES clause",token,type);
-		  free(ti);
-		  return 0;
-		}
-		type = get_token(fp,token);
-		while(type != RIGHTBRACKET)
-		{
-			if(type != LABEL)
-			{
-				print_error("LABEL expected in VARIABLES1 clause",token,type);
-				free(ti);
-				return 0;
-			}
-
-
-			(ti->n_variables)++;
-		    	if(ti->var_list == NULL)
-			{
-				ip = ti->var_list = (struct index_list *)
-					Malloc(sizeof(struct index_list));
-			}
-			else
-			{
-				ip->next = (struct index_list *)
-					Malloc(sizeof(struct enum_list));
-				ip = ip->next;
-			}
-			ip->next = 0;
-			ip->tp = NULL;
-
-			ip->label =
-				(char *)Malloc((unsigned)strlen(token) + 1);
-			strcpy(ip->label, token);
-
-			type = get_token(fp, token);
-
-			switch(type)
-			{
-				case COMMA:
-					type = get_token(fp, token);
-					break;
-
-				case RIGHTBRACKET:
-					break;
-
-				default:
-					print_error(", or } expected in VARIABLES clause",token,type);
-					free(ti);
-					return 0;
-
-			}
-		}
-		break;
-		
-	    case DESCRIPTION:
-		type = get_token(fp,token);
-		if(type != QUOTESTRING){
-		  print_error("Bad DESCRIPTION",token,type);
-		  free(ti);
-		  return 0;
-		}
-		ti->description = quoted_string_buffer;
-		quoted_string_buffer = (char*)malloc(MAXQUOTESTR);
-		if(quoted_string_buffer==NULL){ 
-		  fprintf(stderr,"malloc failed\n");
-		  return 0;
-		}
-		break;
-	    case REFERENCE:
-		type = get_token(fp,token);
-		if(type != QUOTESTRING){
-		  print_error("Bad DESCRIPTION",token,type);
-		  free(ti);
-		  return 0;
-		}
-		break;
-	    default:
-		/* NOTHING*/
-		break;
-	  }
-	  type = get_token(fp,token);
-	}
-	/* get the integer */
-	if( (type = get_token(fp,token)) == NUMBER){
-		ti->value = atoi(token);
-		/* attach the item to list */
-		
-
-
-	}else{
-        	print_error("Expected a number",token,type);
-		free(ti);
-		return 0;
-	}
-     }else{
-        print_error("Expected \"enterprise name\"",token,type);
-        return 0;
-     }
-   }else{
-     print_error("Expected \"ENTERPRISE\"",token,type);
-     return 0;
-   }
-   if(trap_list == NULL){
-	last_trap_item = trap_list = ti;
-   }else{
-	last_trap_item->next = ti;
-	last_trap_item = ti;
-   }
-   return 1;
-}
-
-/*
- * Parse an entry of the form:
- * label OBJECT IDENTIFIER ::= { parent 2 }
- * The "label OBJECT IDENTIFIER" portion has already been parsed.
- * Returns 0 on error.
- */
-static struct node *
-parse_objectid(fp, name)
-    FILE *fp;
-    char *name;
-{
-    int type;
-    char token[MAXTOKEN];
-    register int count;
-    register struct subid *op, *nop;
-    int length;
-    struct subid oid[32];
-    struct node *np, *root, *oldnp = NULL;
-
-    type = get_token(fp, token);
-    if (type != EQUALS){
-	print_error("Bad format", token, type);
-	return 0;
-    }
-    if ((length = getoid(fp, oid, 32)) != 0){
-	np = root = (struct node *)Malloc(sizeof(struct node));
-
-/*
--- Olivier Reisacher 95/2/14
-	bzero((char *)np, sizeof(struct node));
-*/
-	memset((void *) np, 0, sizeof(struct node));
-
-	/*
-	 * For each parent-child subid pair in the subid array,
-	 * create a node and link it into the node list.
-	 */
-	for(count = 0, op = oid, nop=oid+1; count < (length - 2); count++,
-	    op++, nop++){
-	    /* every node must have parent's name and child's name or number */
-	    if (op->label && (nop->label || (nop->subid != -1))){
-		strcpy(np->parent, op->label);
-		if (nop->label)
-		    strcpy(np->label, nop->label);
-		if (nop->subid != -1)
-		    np->subid = nop->subid;
-		np->type = 0;
-		np->enums = 0;
-/*
--- Olivier Reisacher 95/2/14
-*/
-		np->access = 0;
-		np->n_indexs = 0;
-		np->indexs = NULL;
-
-		/* set up next entry */
-		np->next = (struct node *)Malloc(sizeof(*np->next));
-
-/*
--- Olivier Reisacher 95/2/14
-		bzero((char *)np->next, sizeof(struct node));
-*/
-		memset((void *) np->next, 0, sizeof(struct node));
-
-		oldnp = np;
-		np = np->next;
-	    }
-	}
-	np->next = (struct node *)NULL;
-	/*
-	 * The above loop took care of all but the last pair.  This pair is taken
-	 * care of here.  The name for this node is taken from the label for this
-	 * entry.
-	 * np still points to an unused entry.
-	 */
-	if (count == (length - 2)){
-	    if (op->label){
-		strcpy(np->parent, op->label);
-		strcpy(np->label, name);
-		if (nop->subid != -1)
-		    np->subid = nop->subid;
-		else
-		    print_error("Warning: This entry is pretty silly",
-				np->label, type);
-	    } else {
-		free_node(np);
-		if (oldnp)
-		    oldnp->next = NULL;
-		else
-		    return NULL;
-	    }
-	} else {
-	    print_error("Missing end of oid", (char *)NULL, type);
-	    free_node(np);   /* the last node allocated wasn't used */
-	    if (oldnp)
-		oldnp->next = NULL;
-	    return NULL;
-	}
-	/* free the oid array */
-	for(count = 0, op = oid; count < length; count++, op++){
-	    if (op->label)
-		free(op->label);
-	    op->label = 0;
-	}
-	return root;
-    } else {
-	print_error("Bad object identifier", (char *)NULL, type);
-	return 0;
-    }
-}
-
-static int
-get_tc(descriptor, ep)
-    char *descriptor;
-    struct enum_list **ep;
-{
-    int i;
-
-    for(i = 0; i < MAXTC; i++){
-	if (tclist[i].type == 0)
-	    break;
-	if (!strcmp(descriptor, tclist[i].descriptor)){
-	    *ep = tclist[i].enums;
-	    return tclist[i].type;
-	}
-    }
-    return LABEL;
-}
-
-/*
- * Parses an asn type.  Structures are ignored by this parser.
- * Returns NULL on error.
- */
-static int
-parse_asntype(fp, name, ntype, ntoken)
-    FILE *fp;
-    char *name;
-    int *ntype;
-    char *ntoken;
-{
-    int type, i;
-    char token[MAXTOKEN];
-    struct enum_list *ep;
-    struct tc *tcp;
-    int level;
-
-#ifdef TRACE_PROC
-printf("parse_asntype() invoked\n");
-#endif
-    
-    type = get_token(fp, token);
-    if (type == SEQUENCE){
-	while((type = get_token(fp, token)) != ENDOFFILE){
-	    if (type == RIGHTBRACKET){
-		*ntype = get_token(fp, ntoken);
-		return 1;
-	    }
-	}
-	print_error("Expected \"}\"", token, type);
-	return 0;
-    } else {
-	if (!strcmp(token, "TEXTUAL-CONVENTION")){
-	    while (type != SYNTAX)
-		type = get_token(fp, token);
-	    type = get_token(fp, token);
-	}
-	/* textual convention */
-	for(i = 0; i < MAXTC; i++){
-	    if (tclist[i].type == 0)
-		break;
-	}
-	if (i == MAXTC){
-	    print_error("No more textual conventions possible.", token, type);
-	    return 0;
-	}
-	tcp = &tclist[i];
-	strcpy(tcp->descriptor, name);
-	if (!(type & SYNTAX_MASK)){
-
-/*
--- Olivier Reisacher 95/2/14
-	    print_error("Textual convention doesn't map to real type.", token,
-			type);
-	    return 0;
-	}
-*/
-		int w;
-
-		w = get_tc(token, &ep);
-		if(!(w & SYNTAX_MASK))
-		{
-	    		print_error("Textual convention doesn't map to real type.", token, type);
-	    		return 0;
-		}
-		type = w;
-	}
-
-	tcp->type = type;
-	*ntype = get_token(fp, ntoken);
-	if (*ntype == LEFTPAREN){
-	    level = 1;
-	    /* don't record any constraints for now */
-	    while(level > 0){
-		*ntype = get_token(fp, ntoken);
-		if (*ntype == LEFTPAREN)
-		    level++;
-		if (*ntype == RIGHTPAREN)
-		    level--;		
-	    }
-	    *ntype = get_token(fp, ntoken);
-	} else if (*ntype == LEFTBRACKET) {
-	    /* if there is an enumeration list, parse it */
-	    while((type = get_token(fp, token)) != ENDOFFILE){
-		if (type == RIGHTBRACKET)
-		    break;
-		if (type == LABEL){
-		    /* this is an enumerated label */
-		    if (tcp->enums == 0){
-			ep = tcp->enums = (struct enum_list *)
-			    Malloc(sizeof(struct enum_list));
-		    } else {
-			ep->next = (struct enum_list *)
-			    Malloc(sizeof(struct enum_list));
-			ep = ep->next;
-		    }
-		    ep->next = 0;
-		    /* a reasonable approximation for the length */
-		    ep->label =
-			(char *)Malloc((unsigned)strlen(token) + 1);
-		    strcpy(ep->label, token);
-		    type = get_token(fp, token);
-		    if (type != LEFTPAREN){
-			print_error("Expected \"(\"", token, type);
-			/* free_node(np); */
-			return 0;
-		    }
-		    type = get_token(fp, token);
-		    if (type != NUMBER){
-			print_error("Expected integer", token, type);
-			/* free_node(np); */
-			return 0;
-		    }
-		    ep->value = atoi(token);
-		    type = get_token(fp, token);
-		    if (type != RIGHTPAREN){
-			print_error("Expected \")\"", token, type);
-			/* free_node(np); */
-			return 0;
-		    }
-		}
-	    }
-	    if (type == ENDOFFILE){
-		print_error("Expected \"}\"", token, type);
-		/* free_node(np); */
-		return 0;
-	    }
-	    *ntype = get_token(fp, ntoken);
-	}
-	return 1;
-    }
-}
-
-
-/*
- * Parses an OBJECT TYPE macro.
- * Returns 0 on error.
- */
-static struct node *
-parse_objecttype(fp, name)
-    register FILE *fp;
-    char *name;
-{
-    register int type;
-    char token[MAXTOKEN];
-    int count, length;
-    struct subid oid[32];
-    char syntax[MAXTOKEN];
-    int nexttype, tctype;
-    char nexttoken[MAXTOKEN];
-    register struct node *np;
-    register struct enum_list *ep;
-/*
--- Olivier Reisacher 95/2/14
-*/
-	struct index_list *ip;
-
-    type = get_token(fp, token);
-    if (type != SYNTAX){
-	print_error("Bad format for OBJECT TYPE", token, type);
-	return 0;
-    }
-    np = (struct node *)Malloc(sizeof(struct node));
-    np->next = 0;
-    np->enums = 0;
-    np->description = NULL;        /* default to an empty description */
-/*
--- Olivier Reisacher 95/2/14
-*/
-	np->access = 0;
-	np->n_indexs = 0;
-	np->indexs = 0;
-
-    type = get_token(fp, token);
-    if (type == LABEL){
-	tctype = get_tc(token, &(np->enums));
-#if 0
-	if (tctype == LABEL){
-	    print_error("No known translation for type", token, type);
-	    return 0;
-	}
-#endif
-	type = tctype;
-    }
-    np->type = type;
-    np->oct_str_len = 0;
-    nexttype = get_token(fp, nexttoken);
-    switch(type){
-	case SEQUENCE:
-	    strcpy(syntax, token);
-	    if (nexttype == OF){
-		strcat(syntax, " ");
-		strcat(syntax, nexttoken);
-		nexttype = get_token(fp, nexttoken);
-		strcat(syntax, " ");
-		strcat(syntax, nexttoken);
-		nexttype = get_token(fp, nexttoken);
-
-/*
--- Olivier Reisacher 95/2/14
-*/
-		np->type = PSEUDO_TOKEN_TABLE;
-	    }
-		
-	    break;
-	case PARSE_INTEGER:
-	case UINTEGER32:
-	    strcpy(syntax, token);
-	    if (nexttype == LEFTBRACKET) {
-		/* if there is an enumeration list, parse it */
-		while((type = get_token(fp, token)) != ENDOFFILE){
-		    if (type == RIGHTBRACKET)
-			break;
-		    if (type == LABEL){
-			/* this is an enumerated label */
-			if (np->enums == 0){
-			    ep = np->enums = (struct enum_list *)
-					Malloc(sizeof(struct enum_list));
-			} else {
-			    ep->next = (struct enum_list *)
-					Malloc(sizeof(struct enum_list));
-			    ep = ep->next;
-			}
-			ep->next = 0;
-			/* a reasonable approximation for the length */
-			ep->label =
-			    (char *)Malloc((unsigned)strlen(token) + 1);
-			strcpy(ep->label, token);
-			type = get_token(fp, token);
-			if (type != LEFTPAREN){
-			    print_error("Expected \"(\"", token, type);
-			    free_node(np);
-			    return 0;
-			}
-			type = get_token(fp, token);
-			if (type != NUMBER){
-			    print_error("Expected integer", token, type);
-			    free_node(np);
-			    return 0;
-			}
-			ep->value = atoi(token);
-			type = get_token(fp, token);
-			if (type != RIGHTPAREN){
-			    print_error("Expected \")\"", token, type);
-			    free_node(np);
-			    return 0;
-			}
-		    }
-		}
-		if (type == ENDOFFILE){
-		    print_error("Expected \"}\"", token, type);
-		    free_node(np);
-		    return 0;
-		}
-		nexttype = get_token(fp, nexttoken);
-	    } else if (nexttype == LEFTPAREN){
-		/* ignore the "constrained integer" for now */
-		nexttype = get_token(fp, nexttoken);
-		nexttype = get_token(fp, nexttoken);
-		nexttype = get_token(fp, nexttoken);
-	    }
-	    break;
-	case BITSTRING:
-	    strcpy(syntax, token);
-	    if (nexttype == LEFTBRACKET) {
-		/* if there is an enumeration list, parse it */
-		while((type = get_token(fp, token)) != ENDOFFILE){
-		    if (type == RIGHTBRACKET)
-			break;
-		    if (type == LABEL){
-			/* this is an enumerated label */
-			if (np->enums == 0){
-			    ep = np->enums = (struct enum_list *)
-					Malloc(sizeof(struct enum_list));
-			} else {
-			    ep->next = (struct enum_list *)
-					Malloc(sizeof(struct enum_list));
-			    ep = ep->next;
-			}
-			ep->next = 0;
-			/* a reasonable approximation for the length */
-			ep->label =
-			    (char *)Malloc((unsigned)strlen(token) + 1);
-			strcpy(ep->label, token);
-			type = get_token(fp, token);
-			if (type != LEFTPAREN){
-			    print_error("Expected \"(\"", token, type);
-			    free_node(np);
-			    return 0;
-			}
-			type = get_token(fp, token);
-			if (type != NUMBER){
-			    print_error("Expected integer", token, type);
-			    free_node(np);
-			    return 0;
-			}
-			ep->value = atoi(token);
-			type = get_token(fp, token);
-			if (type != RIGHTPAREN){
-			    print_error("Expected \")\"", token, type);
-			    free_node(np);
-			    return 0;
-			}
-		    }
-		}
-		if (type == ENDOFFILE){
-		    print_error("Expected \"}\"", token, type);
-		    free_node(np);
-		    return 0;
-		}
-		nexttype = get_token(fp, nexttoken);
-	    } else if (nexttype == LEFTPAREN){
-		/* ignore the "constrained integer" for now */
-		nexttype = get_token(fp, nexttoken);
-		nexttype = get_token(fp, nexttoken);
-		nexttype = get_token(fp, nexttoken);
-	    }
-	    break;
-	case OCTETSTR:
-	    strcpy(syntax, token);
-            /* ignore the "constrained octet string" for now */
-            if (nexttype == LEFTPAREN) {
-                nexttype = get_token(fp, nexttoken);
-                if (nexttype == SIZE) {
-                    nexttype = get_token(fp, nexttoken);
-                    if (nexttype == LEFTPAREN) {
-                        nexttype = get_token(fp, nexttoken); /* 0..255 */
-                        np->oct_str_len = number_value;
-                        number_value = 0;
-                        nexttype = get_token(fp, nexttoken); /* ) */
-                        nexttype = get_token(fp, nexttoken); /* ) */
-                        if (nexttype == RIGHTPAREN)
-                        {
-                            nexttype = get_token(fp, nexttoken);
-                            break;
-                        }
-                    }
-                }
-                print_error("Bad syntax", token, type);
-                free_node(np);
-                return 0;
-            }
-	    break;
-	case PARSE_OBJID:
-	case NETADDR:
-	case IPADDR:
-	case PARSE_COUNTER:
-	case PARSE_GUAGE:
-	case PARSE_TIMETICKS:
-	case PARSE_OPAQUE:
-	case NUL:
-	case LABEL:
-	case NSAPADDRESS:
-	case PARSE_COUNTER64:
-	    strcpy(syntax, token);
-	    break;
-	default:
-	    print_error("Bad syntax", token, type);
-	    free_node(np);
-	    return 0;
-    }
-    if (nexttype == UNITS){
-	type = get_token(fp, token);
-	if (type != QUOTESTRING) {
-	    print_error("Bad DESCRIPTION", token, type);
-	    free_node(np);
-	    return 0;
-	}
-	nexttype = get_token(fp, nexttoken);
-    }
-    if (nexttype != ACCESS){
-	print_error("Should be ACCESS", nexttoken, nexttype);
-	free_node(np);
-	return 0;
-    }
-    type = get_token(fp, token);
-    if (type != READONLY && type != READWRITE && type != WRITEONLY
-	&& type != NOACCESS && type != READCREATE){
-	print_error("Bad access type", nexttoken, nexttype);
-	free_node(np);
-	return 0;
-    }
-
-/*
--- Olivier Reisacher 95/2/14
-*/
-	switch(type)
-	{
-		case READONLY:
-			np->access = READ_FLAG;
-			break;
-
-		case READWRITE:
-			np->access = READ_FLAG | WRITE_FLAG;
-			break;
-
-		case WRITEONLY:
-			np->access = WRITE_FLAG;
-			break;
-
-		case NOACCESS:
-			np->access = 0;
-			break;
-
-		case READCREATE:
-			np->access = READ_FLAG | CREATE_FLAG;
-			break;
-	}
-			
-    type = get_token(fp, token);
-    if (type != STATUS){
-	print_error("Should be STATUS", token, nexttype);
-	free_node(np);
-	return 0;
-    }
-    type = get_token(fp, token);
-    if (type != MANDATORY && type != CURRENT && type != OPTIONAL && type != OBSOLETE && type != DEPRECATED){
-	print_error("Bad status", token, type);
-	free_node(np);
-	return 0;
-    }
-    /*
-     * Optional parts of the OBJECT-TYPE macro
-     */
-    type = get_token(fp, token);
-    while (type != EQUALS) {
-      switch (type) {
-        case DESCRIPTION:
-          type = get_token(fp, token);
-          if (type != QUOTESTRING) {
-              print_error("Bad DESCRIPTION", token, type);
-              free_node(np);
-              return 0;
-          }
-#ifdef TEST
-printf("Description== \"%.50s\"\n", quoted_string_buffer);
-#endif
-	  np->description = quoted_string_buffer;
-	  quoted_string_buffer = (char *)malloc(MAXQUOTESTR);
-	  if (!quoted_string_buffer){
-	    fprintf(stderr, "malloc failed.  Exiting\n");
-	    exit(1);
-	  }
-          break;
-
-	case REFERENCE:
-	  type = get_token(fp, token);
-	  if (type != QUOTESTRING) {
-	      print_error("Bad DESCRIPTION", token, type);
-	      free_node(np);
-	      return 0;
-	  }
-	  break;
-/*
--- Olivier Reisacher 95/2/14
-*/
-       	case INDEX:
-		np->type = PSEUDO_TOKEN_ENTRY;
-
-		type = get_token(fp, token);
-		if(type != LEFTBRACKET)
-		{
-			print_error("{ expected in INDEX clause",token,type);
-			free_node(np);
-			return 0;
-		}
-		type = get_token(fp, token);
-		while(type != RIGHTBRACKET)
-		{
-			if(type != LABEL)
-			{
-				print_error("LABEL expected in INDEX clause",token,type);
-				free_node(np);
-				return 0;
-			}
-
-
-			(np->n_indexs)++;
-		    	if(np->indexs == NULL)
-			{
-				ip = np->indexs = (struct index_list *)
-					Malloc(sizeof(struct index_list));
-			}
-			else
-			{
-				ip->next = (struct index_list *)
-					Malloc(sizeof(struct enum_list));
-				ip = ip->next;
-			}
-			ip->next = 0;
-			ip->tp = NULL;
-
-			ip->label =
-				(char *)Malloc((unsigned)strlen(token) + 1);
-			strcpy(ip->label, token);
-
-			type = get_token(fp, token);
-
-			switch(type)
-			{
-				case COMMA:
-					type = get_token(fp, token);
-					break;
-
-				case RIGHTBRACKET:
-					break;
-
-				default:
-					print_error(", or } expected in INDEX clause",token,type);
-					free_node(np);
-					return 0;
-
-			}
-		}
-		break;
-
-        case DEFVAL:
-	case AUGMENTS:
-	case NUM_ENTRIES:
-          if (tossObjectIdentifier(fp) != PARSE_OBJID) {
-              print_error("Bad Object Identifier", token, type);
-              free_node(np);
-              return 0;
-          }
-          break;
-
-        default:
-          print_error("Bad format of optional clauses", token,type);
-          free_node(np);
-          return 0;
-
-      }
-      type = get_token(fp, token);
-    }
-    if (type != EQUALS){
-	print_error("Bad format", token, type);
-	free_node(np);
-	return 0;
-    }
-    length = getoid(fp, oid, 32);
-    if (length > 1 && length <= 32){
-	/* just take the last pair in the oid list */
-	if (oid[length - 2].label)
-	    strncpy(np->parent, oid[length - 2].label, MAXLABEL);
-	strcpy(np->label, name);
-	if (oid[length - 1].subid != -1)
-	    np->subid = oid[length - 1].subid;
-	else
-	    print_error("Warning: This entry is pretty silly", np->label, type);
-    } else {
-	print_error("No end to oid", (char *)NULL, type);
-	free_node(np);
-	np = 0;
-    }
-    /* free oid array */
-    for(count = 0; count < length; count++){
-	if (oid[count].label)
-	    free(oid[count].label);
-	oid[count].label = 0;
-    }
-    return np;
-}
-
-
-/*
- * Parses an OBJECT GROUP macro.
- * Returns 0 on error.
- */
-static struct node *
-parse_objectgroup(fp, name)
-    register FILE *fp;
-    char *name;
-{
-    register int type;
-    char token[MAXTOKEN];
-    int count, length;
-    struct subid oid[32];
-    register struct node *np;
-
-    np = (struct node *)Malloc(sizeof(struct node));
-    np->type = 0;
-    np->next = 0;
-    np->enums = 0;
-    np->description = NULL;        /* default to an empty description */
-
-/*
--- Olivier Reisacher 95/2/14
-*/
-	np->access = 0;
-	np->n_indexs = 0;
-	np->indexs = 0;
-
-    type = get_token(fp, token);
-    while (type != EQUALS) {
-      switch (type) {
-        case DESCRIPTION:
-          type = get_token(fp, token);
-          if (type != QUOTESTRING) {
-              print_error("Bad DESCRIPTION", token, type);
-              free_node(np);
-              return 0;
-          }
-#ifdef TEST
-printf("Description== \"%.50s\"\n", quoted_string_buffer);
-#endif
-	  np->description = quoted_string_buffer;
-	  quoted_string_buffer = (char *)malloc(MAXQUOTESTR);
-	  if (!quoted_string_buffer){
-	    fprintf(stderr, "malloc failed.  Exiting\n");
-	    exit(1);
-	  }
-          break;
-
-        default:
-	  /* NOTHING */
-	  break;
-      }
-      type = get_token(fp, token);
-    }
-    length = getoid(fp, oid, 32);
-    if (length > 1 && length <= 32){
-	/* just take the last pair in the oid list */
-	if (oid[length - 2].label)
-	    strncpy(np->parent, oid[length - 2].label, MAXLABEL);
-	strcpy(np->label, name);
-	if (oid[length - 1].subid != -1)
-	    np->subid = oid[length - 1].subid;
-	else
-	    print_error("Warning: This entry is pretty silly", np->label, type);
-    } else {
-	print_error("No end to oid", (char *)NULL, type);
-	free_node(np);
-	np = 0;
-    }
-    /* free oid array */
-    for(count = 0; count < length; count++){
-	if (oid[count].label)
-	    free(oid[count].label);
-	oid[count].label = 0;
-    }
-    return np;
-}
-
-/*
- * Parses a NOTIFICATION-TYPE macro.
- * Returns 0 on error.
- */
-static struct node *
-parse_notificationDefinition(fp, name)
-    register FILE *fp;
-    char *name;
-{
-    register int type;
-    char token[MAXTOKEN];
-    int count, length;
-    struct subid oid[32];
-    register struct node *np;
-
-    np = (struct node *)Malloc(sizeof(struct node));
-    np->type = 0;
-    np->next = 0;
-    np->enums = 0;
-    np->description = NULL;        /* default to an empty description */
-/*
--- Olivier Reisacher 95/2/14
-*/
-	np->access = 0;
-	np->n_indexs = 0;
-	np->indexs = 0;
-
-    type = get_token(fp, token);
-    while (type != EQUALS) {
-      switch (type) {
-        case DESCRIPTION:
-          type = get_token(fp, token);
-          if (type != QUOTESTRING) {
-              print_error("Bad DESCRIPTION", token, type);
-              free_node(np);
-              return 0;
-          }
-#ifdef TEST
-printf("Description== \"%.50s\"\n", quoted_string_buffer);
-#endif
-	  np->description = quoted_string_buffer;
-	  quoted_string_buffer = (char *)malloc(MAXQUOTESTR);
-	  if (!quoted_string_buffer){
-	    fprintf(stderr, "malloc failed.  Exiting\n");
-	    exit(1);
-	  }
-          break;
-
-        default:
-	  /* NOTHING */
-	  break;
-      }
-      type = get_token(fp, token);
-    }
-    length = getoid(fp, oid, 32);
-    if (length > 1 && length <= 32){
-	/* just take the last pair in the oid list */
-	if (oid[length - 2].label)
-	    strncpy(np->parent, oid[length - 2].label, MAXLABEL);
-	strcpy(np->label, name);
-	if (oid[length - 1].subid != -1)
-	    np->subid = oid[length - 1].subid;
-	else
-	    print_error("Warning: This entry is pretty silly", np->label, type);
-    } else {
-	print_error("No end to oid", (char *)NULL, type);
-	free_node(np);
-	np = 0;
-    }
-    /* free oid array */
-    for(count = 0; count < length; count++){
-	if (oid[count].label)
-	    free(oid[count].label);
-	oid[count].label = 0;
-    }
-    return np;
-}
-
-/*
- * Parses a compliance macro
- * Returns 0 on error.
- */
-static struct node *
-parse_compliance(fp, name)
-    register FILE *fp;
-    char *name;
-{
-    register int type;
-    char token[MAXTOKEN];
-    int count, length;
-    struct subid oid[32];
-    register struct node *np;
-
-    np = (struct node *)Malloc(sizeof(struct node));
-    np->type = 0;
-    np->next = 0;
-    np->enums = 0;
-    np->description = NULL;        /* default to an empty description */
-/*
--- Olivier Reisacher 95/2/14
-*/
-	np->access = 0;
-	np->n_indexs = 0;
-	np->indexs = 0;
-
-    type = get_token(fp, token);
-    while (type != EQUALS) {
-	type = get_token(fp, token);
-    }
-    length = getoid(fp, oid, 32);
-    if (length > 1 && length <= 32){
-	/* just take the last pair in the oid list */
-	if (oid[length - 2].label)
-	    strncpy(np->parent, oid[length - 2].label, MAXLABEL);
-	strcpy(np->label, name);
-	if (oid[length - 1].subid != -1)
-	    np->subid = oid[length - 1].subid;
-	else
-	    print_error("Warning: This entry is pretty silly", np->label, type);
-    } else {
-	print_error("No end to oid", (char *)NULL, type);
-	free_node(np);
-	np = 0;
-    }
-    /* free oid array */
-    for(count = 0; count < length; count++){
-	if (oid[count].label)
-	    free(oid[count].label);
-	oid[count].label = 0;
-    }
-    return np;
-}
-
-
-
-/*
- * Parses a module identity macro
- * Returns 0 on error.
- */
-static struct node *
-parse_moduleIdentity(fp, name)
-    register FILE *fp;
-    char *name;
-{
-    register int type;
-    char token[MAXTOKEN];
-    int count, length;
-    struct subid oid[32];
-    register struct node *np;
-
-    np = (struct node *)Malloc(sizeof(struct node));
-    np->type = 0;
-    np->next = 0;
-    np->enums = 0;
-    np->description = NULL;        /* default to an empty description */
-/*
--- Olivier Reisacher 95/2/14
-*/
-	np->n_indexs = 0;
-	np->indexs = 0;
-	np->access = 0;
-
-    type = get_token(fp, token);
-    while (type != EQUALS) {
-	type = get_token(fp, token);
-    }
-    length = getoid(fp, oid, 32);
-    if (length > 1 && length <= 32){
-	/* just take the last pair in the oid list */
-	if (oid[length - 2].label)
-	    strncpy(np->parent, oid[length - 2].label, MAXLABEL);
-	strcpy(np->label, name);
-	if (oid[length - 1].subid != -1)
-	    np->subid = oid[length - 1].subid;
-	else
-	    print_error("Warning: This entry is pretty silly", np->label, type);
-    } else {
-	print_error("No end to oid", (char *)NULL, type);
-	free_node(np);
-	np = 0;
-    }
-    /* free oid array */
-    for(count = 0; count < length; count++){
-	if (oid[count].label)
-	    free(oid[count].label);
-	oid[count].label = 0;
-    }
-    return np;
-}
-
-int parse_mib_header(fp, name)
-    register FILE *fp;
-    char *name;
-{
-    int type = DEFINITIONS;
-    char token[MAXTOKEN];
-    
-#ifdef TRACE_PROC
-printf("parse_mib_header() invoked\n");
-#endif
-
-    /* This probably isn't good enough.  If there is no
-       imports clause we can't go around waiting (forever) for a semicolon.
-       We need to check for semi following an EXPORTS clause or an IMPORTS
-       clause of both.  Look for BEGIN; in my initial MIBs to see those
-       that I needed to hack to get to parse because they didn't have
-       an IMPORTS or and EXPORTS clause.
-       */
-    while(type != SEMI){
-	type = get_token(fp, token);
-    }
-    return 1;
-}
-
-
-/*
--- Olivier Reisacher 95/2/14
-*/
-void parse_init()
-{
-	hash_init();
-	memset((void *) tclist, 0, 64 * sizeof(struct tc));
-}
-
-
-/*
- * Parses a mib file and returns a linked list of nodes found in the file.
- * Returns NULL on error.
- */
-/*
--- Olivier Reisacher 95/2/14
-static struct node *
-*/
-struct node *
-parse(fp)
-    FILE *fp;
-{
-    char token[MAXTOKEN];
-    char name[MAXTOKEN];
-    int	type = 1;
-#define BETWEEN_MIBS  	      1
-#define IN_MIB                2
-    int state = BETWEEN_MIBS;
-    struct node *np, *root = NULL;
-
-#ifdef TRACE_PROC
-printf("parse() invoked\n");
-#endif
-
-/*
--- Olivier Reisacher 95/2/14
-    hash_init();
-*/
-    Line = 1;
-
-    quoted_string_buffer = (char *)malloc(MAXQUOTESTR);  /* free this later */
-    if (!quoted_string_buffer){
-      fprintf(stderr, "malloc failed.  Exiting\n");
-      exit(1);
-    }
-
-/*
--- Olivier Reisacher 95/2/14
-    bzero(tclist, 64 * sizeof(struct tc));
-*/
-
-    while(type != ENDOFFILE){
-	type = get_token(fp, token);
-skipget:
-	if (type == END){
-	    if (state != IN_MIB){
-		print_error("Error, end before start of MIB.", (char *)NULL, type);
-		return NULL;
-	    }
-	    state = BETWEEN_MIBS;
-	    continue;
-	} else if (type != LABEL){
-	    if (type == ENDOFFILE){
-		return root;
-	    }
-	    print_error(token, "is a reserved word", type);
-	    return NULL;
-	}
-	strncpy(name, token, MAXTOKEN);
-	type = get_token(fp, token);
-	if (type == DEFINITIONS){
-	    if (state != BETWEEN_MIBS){
-		print_error("Error, nested MIBS.", (char *)NULL, type);
-		return NULL;
-	    }
-	    state = IN_MIB;
-	    if (!parse_mib_header(fp, name)){
-		print_error("Bad parse of module header", (char *)NULL, type);
-		return NULL;
-	    }
-       } else if (type == OBJTYPE){
-	    if (root == NULL){
-		/* first link in chain */
-		np = root = parse_objecttype(fp, name);
-		if (np == NULL){
-		    print_error("Bad parse of object type", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    } else {
-		np->next = parse_objecttype(fp, name);
-		if (np->next == NULL){
-		    print_error("Bad parse of objecttype", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    }
-	    /* now find end of chain */
-	    while(np->next)
-		np = np->next;
-	} else if (type == OBJGROUP){
-	    if (root == NULL){
-		/* first link in chain */
-		np = root = parse_objectgroup(fp, name);
-		if (np == NULL){
-		    print_error("Bad parse of object group", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    } else {
-		np->next = parse_objectgroup(fp, name);
-		if (np->next == NULL){
-		    print_error("Bad parse of objectgroup", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    }
-	    /* now find end of chain */
-	    while(np->next)
-		np = np->next;
-	} else if (type == NOTIFTYPE){
-	    if (root == NULL){
-		/* first link in chain */
-		np = root = parse_notificationDefinition(fp, name);
-		if (np == NULL){
-		    print_error("Bad parse of notification definition",
-				(char *)NULL, type);
-		    return NULL;
-		}
-	    } else {
-		np->next = parse_notificationDefinition(fp, name);
-		if (np->next == NULL){
-		    print_error("Bad parse of notification definition",
-				(char *)NULL, type);
-		    return NULL;
-		}
-	    }
-	    /* now find end of chain */
-	    while(np->next)
-		np = np->next;
-	} else if (type == COMPLIANCE){
-	    if (root == NULL){
-		/* first link in chain */
-		np = root = parse_compliance(fp, name);
-		if (np == NULL){
-		    print_error("Bad parse of module compliance", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    } else {
-		np->next = parse_compliance(fp, name);
-		if (np->next == NULL){
-		    print_error("Bad parse of module compliance", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    }
-	    /* now find end of chain */
-	    while(np->next)
-		np = np->next;
-	} else if (type == MODULEIDENTITY){
-	    if (root == NULL){
-		/* first link in chain */
-		np = root = parse_moduleIdentity(fp, name);
-		if (np == NULL){
-		    print_error("Bad parse of module identity", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    } else {
-		np->next = parse_moduleIdentity(fp, name);
-		if (np->next == NULL){
-		    print_error("Bad parse of module identity", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    }
-	    /* now find end of chain */
-	    while(np->next)
-		np = np->next;
-	} else if (type == PARSE_OBJID){
-	    if (root == NULL){
-		/* first link in chain */
-		np = root = parse_objectid(fp, name);
-		if (np == NULL){
-		    print_error("Bad parse of object id", (char *)NULL, type);
-		    return NULL;
-		}
-	    } else {
-		np->next = parse_objectid(fp, name);
-		if (np->next == NULL){
-		    print_error("Bad parse of object type", (char *)NULL,
-				type);
-		    return NULL;
-		}
-	    }
-	    /* now find end of chain */
-	    while(np->next)
-		np = np->next;
-	} else if (type == EQUALS){
-	    if (!parse_asntype(fp, name, &type, token)){
-		print_error("Bad parse of ASN type definition.", (char*)NULL, EQUALS);
-		return NULL;
-	    }
-	    goto skipget;
-	} else if (type == TRAPTYPE){ /* Jerry Yeung 6-6-96 */
-	    if(!parse_traptype(fp,name)){
-		 print_error("Bad parse of TRAP type",(char*)NULL,type);
-		 return NULL;
-	    }
-	} else if (type == ENDOFFILE){
-	    break;
-	} else {
-	    print_error("Bad operator", (char *)NULL, type);
-	    return NULL;
-	}
-    }
-#ifdef TEST
-{
-    struct enum_list *ep;
-    
-    for(np = root; np; np = np->next){
-	printf("%s ::= { %s %d } (%d)\n", np->label, np->parent, np->subid,
-		np->type);
-	if (np->enums){
-	    printf("Enums: \n");
-	    for(ep = np->enums; ep; ep = ep->next){
-		printf("%s(%d)\n", ep->label, ep->value);
-	    }
-	}
-    }
-}
-#endif /* TEST */
-    return root;
-}
-
-/*
- * Parses a token from the file.  The type of the token parsed is returned,
- * and the text is placed in the string pointed to by token.
- */
-static int
-get_token(fp, token)
-    register FILE *fp;
-    register char *token;
-{
-    static char last = ' ';
-    register int ch;
-    register char *cp = token;
-    register int hash = 0;
-    register struct tok *tp;
-
-    *cp = 0;
-    ch = last;
-    /* skip all white space */
-    while(isspace(ch) && ch != -1){
-	ch = getc(fp);
-	if (ch == '\n')
-	    Line++;
-    }
-    if (ch == -1) {
-#ifdef TRACE_GET_TOKEN
-print_error("TRACE", token, ENDOFFILE);
-#endif
-	return ENDOFFILE;
-    } else if (ch == '"') {
-	return parseQuoteString(fp, token);
-    }
-
-    /*
-     * Accumulate characters until end of token is found.  Then attempt to
-     * match this token as a reserved word.  If a match is found, return the
-     * type.  Else it is a label.
-     */
-    do {
-	if (ch == '\n')
-	    Line++;
-	if (isspace(ch) || ch == '(' || ch == ')' || ch == '{' || ch == '}' ||
-	    ch == ',' || ch == ';'){
-	    if (!isspace(ch) && *token == 0){
-		hash += ch;
-		*cp++ = ch;
-		last = ' ';
-	    } else {
-		last = ch;
-	    }
-	    *cp = '\0';
-
-	    for (tp = buckets[BUCKET(hash)]; tp; tp = tp->next) {
-		if ((tp->hash == hash) && (strcmp(tp->name, token) == 0))
-			break;
-	    }
-	    if (tp){
-		if (tp->token == CONTINUE)
-		    continue;
-#ifdef TRACE_GET_TOKEN
-print_error("TRACE", token, tp->token);
-#endif
-		return (tp->token);
-	    }
-
-	    if (token[0] == '-' && token[1] == '-'){
-		/* strip comment */
-		if (ch != '\n'){
-		    while ((ch = getc(fp)) != -1)
-			if (ch == '\n'){
-			    Line++;
-			    break;
-			}
-		}
-		if (ch == -1)
-{
-#ifdef TRACE_GET_TOKEN
-print_error("TRACE", token, ENDOFFILE);
-#endif
-		    return ENDOFFILE;
-}
-		last = ch;
-		return get_token(fp, token);		
-	    }
-	    for(cp = token; *cp; cp++)
-		if (!isdigit(*cp))
-{
-#ifdef TRACE_GET_TOKEN
-print_error("TRACE", token, LABEL);
-#endif
-		    return LABEL;
-}
-#ifdef TRACE_GET_TOKEN
-print_error("TRACE", token, NUMBER);
-#endif
-            number_value = atoi(token);   /* octet string size */
-	    return NUMBER;
-	} else {
-	    hash += ch;
-	    *cp++ = ch;
-	    if (ch == '\n')
-		Line++;
-	}
-    
-    } while ((ch = getc(fp)) != -1);
-#ifdef TRACE_GET_TOKEN
-print_error("TRACE", token, ENDOFFILE);
-#endif
-    return ENDOFFILE;
-}
-
-struct tree *
-read_mib(filename)
-    char *filename;
-{
-    FILE *fp;
-    struct node *nodes;
-    struct tree *tree;
-
-    fp = fopen(filename, "r");
-    if (fp == NULL)
-	return NULL;
-    nodes = parse(fp);
-    if (!nodes){
-	fprintf(stderr, "Mib table is bad.  Exiting\n");
-	exit(1);
-    }
-    tree = build_tree(nodes);
-    fclose(fp);
-    return tree;
-}
-
-
-#ifdef TEST
-main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    FILE *fp;
-    struct node *nodes;
-    struct tree *tp;
-
-    fp = fopen("mib.txt", "r");
-    if (fp == NULL){
-	fprintf(stderr, "open failed\n");
-	return 1;
-    }
-    nodes = parse(fp);
-    if (!nodes){
-      fprintf(stderr, "Mib table is bad. \n");
-      return (1);
-    }
-    tp = build_tree(nodes);
-    print_subtree(tp, 0);
-    fclose(fp);
-}
-
-#endif /* TEST */
-
-static int
-parseQuoteString(fp, token)
-    register FILE *fp;
-    register char *token;
-{
-    register int ch;
-    register char *ptr, *ptr1;
-    register int len = 0;
-
-    ch = ' ';
-    *token = '\0';                      /* make the token empty */
-
-    ptr = quoted_string_buffer;
-    if (ptr)
-	*ptr = 0;
-
-
-    while(ch != -1) {
-        ch = getc(fp);
-	if (ch != '"') {
-		if (ptr) {
-			* ptr ++ = ch;
-			len ++;
-			if (len % MAXQUOTESTR == 0) {
-				ptr1 = (char *) malloc (len + MAXQUOTESTR);
-				if (!ptr1){
-				  fprintf(stderr, "malloc failed.  Exiting\n");
-				  exit(1);
-				}
-				memcpy (ptr1, quoted_string_buffer, len);
-				free (quoted_string_buffer);
-				quoted_string_buffer = ptr1;
-				ptr = ptr1 + len;
-			}
-		}
-	} else {
-		if (ptr)
-			* ptr = 0;
-	}
-	if (ch == '\n')
-	    Line++;
-	else if (ch == '"') {
-#ifdef TRACE_GET_TOKEN
-print_error("TRACE", token, QUOTESTRING);
-#endif
-            return QUOTESTRING;
-        }
-
-    }
-
-#ifdef TRACE_GET_TOKEN
-print_error("TRACE", token, NULL);
-#endif
-    return NULL;
-}
-
-/*
- * This routine parses a string like  { blah blah blah } and returns PARSE_OBJID if
- * it is well formed, and NULL if not.
- */
-static int
-tossObjectIdentifier(fp)
-    register FILE *fp;
-{
-    register int ch;
-
-        ch = getc(fp);
-/*    ch = last; = ' '? */
-    /* skip all white space */
-    while(isspace(ch) && ch != -1){
-        ch = getc(fp);
-        if (ch == '\n')
-            Line++;
-    }
-    if (ch != '{')
-        return NULL;
-
-    while(ch != -1) {
-        ch = getc(fp);
-
-        if (ch == '\n')
-            Line++;
-        else if (ch == '}')
-            return PARSE_OBJID;
-    }
-
-/*    last = ch;*/
-    return NULL;
-}
--- a/usr/src/cmd/agents/snmp/parser/parse.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _PARSE_H_
-#define _PARSE_H_
-
-/***********************************************************
-	Copyright 1989 by Carnegie Mellon University
-
-                      All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of CMU not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-******************************************************************/
-/*
- * parse.h
- */
-
-#include <sys/types.h>
-#include "asn1.h"
-
-#define MAXLABEL	64	/* maximum characters in a label */
-#define MAXTOKEN	64	/* maximum characters in a token */
-#define MAXQUOTESTR	512	/* maximum characters in a quoted string */
-
-#define READ_FLAG	0x1
-#define WRITE_FLAG	0x2
-#define CREATE_FLAG	0x4
-
-
-struct index_list {
-    struct index_list *next;
-    struct tree *tp;
-    char *label;
-    int mark;
-};
-
-
-
-/*
- * A linked list of tag-value pairs for enumerated integers.
- */
-struct enum_list {
-    struct enum_list *next;
-    int	value;
-    char *label;
-};
-
-struct trap_item {
-	struct trap_item *next;
-	char label[MAXLABEL];
-	char enterprise_label[MAXLABEL];
-	/* For arbitrary length enterprise OID in traps - bug 4133978 */
-	/* There is an extra -1 to indicate end of the oid sequence */
-	uint32_t enterprise_subids[MAX_OID_LEN+1]; 
-	struct index_list *var_list;
-	int n_variables;
-        char *description;
-	int value;	/* trap-value */
-}; 
-
-extern struct trap_item *trap_list;
-
-
-/*
- * A linked list of nodes.
- */
-struct node {
-    struct node *next;
-    char label[MAXLABEL]; /* This node's (unique) textual name */
-    uint32_t  subid;  /* This node's integer subidentifier */
-    char parent[MAXLABEL];/* The parent's textual name */
-    int type;	    /* The type of object this represents */
-    int oct_str_len; /* if octet string, SIZE len*/
-    struct enum_list *enums;	/* (optional) list of enumerated integers
-(otherwise NULL) */
-    char *description;	/* description (a quoted string) */
-/*
--- Olivier Reisacher 95/2/14
-*/
-	int access;
-	struct index_list *indexs;
-	int n_indexs;
-};
-
-/*
- * A tree in the format of the tree structure of the MIB.
- */
-struct tree {
-    struct tree *child_list;	/* list of children of this node */
-    struct tree *next_peer;	/* Next node in list of peers */
-    struct tree *parent;
-    char label[MAXLABEL];		/* This node's textual name */
-    uint32_t subid;		/* This node's integer subidentifier */
-    int type;			/* This node's object type */
-    struct enum_list *enums;	/* (optional) list of enumerated integers
-(otherwise NULL) */
-    void (*printer)();     /* Value printing function */
-    char *description;	/* description (a quoted string) */
-/*
- -- Olivier Reisacher 95/2/14
-*/
-	int access;
-	struct index_list *indexs;
-	int n_indexs;
-	struct tree *next;
-	int node_index;
-	int node_type;
-        int oct_str_len;
-	int object_index;
-	int column_index;
-	int entry_index;
-};
-
-/* non-aggregate types for tree end nodes */
-#define TYPE_OTHER	    0
-#define TYPE_OBJID	    1
-#define TYPE_OCTETSTR	    2
-#define TYPE_INTEGER	    3
-#define TYPE_NETADDR	    4
-#define	TYPE_IPADDR	    5
-#define TYPE_COUNTER	    6
-#define TYPE_GAUGE	    7
-#define TYPE_TIMETICKS	    8
-#define TYPE_OPAQUE	    9
-#define TYPE_NULL	    10
-#define TYPE_COUNTER64      11
-#define TYPE_BITSTRING      12
-#define TYPE_NSAPADDRESS    13
-#define TYPE_UINTEGER	    14
-/*
--- Olivier Reisacher 95/2/14
-*/
-#define TYPE_TABLE	20
-#define TYPE_ENTRY	21
-
-struct tree *read_mib();
-
-/*
--- Olivier Reisacher 95/2/14
-*/
-void parse_init();
-struct node *parse(FILE *fp);
-struct tree *build_tree(struct node *nodes);
-void print_subtree(struct tree *subtree, int count);
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmpdemod/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#####################################################
-#
-# Makefile for a SNMP Agent
-#
-#####################################################
-
-#
-# Makefile.vars
-#
-
-#####################################################
-# Edit the following variables as needed
-#####################################################
-
-BIN=		bin
-
-SNMP_ROOT=	/usr
-
-SNMP_LIB=	$(SNMP_ROOT)/lib
-
-SNMP_INC=	$(SNMP_ROOT)/include/snmp
-
-PURIFY_HOME=	/usr/soft/purify3.0
-
-
-AGENT=		snmpdemo
-
-MIBS=		mib_demo.txt
-
-
-#####################################################
-
-TARGET=		$(AGENT)d
-
-
-.KEEP_STATE:
-
-SOURCES.c=\
-	$(AGENT)_tree.c\
-	$(AGENT)_stub.c\
-	$(AGENT)_trap.c\
-	$(AGENT)_appl.c\
-	$(AGENT)_demoEntry.c
-
-SOURCES.h=\
-	$(SNMP_INC)/impl.h\
-	$(SNMP_INC)/asn1.h\
-	$(SNMP_INC)/error.h\
-	$(SNMP_INC)/pdu.h\
-	$(SNMP_INC)/trap.h\
-	$(SNMP_INC)/node.h\
-	$(AGENT)_stub.h
-
-OBJECTS= $(SOURCES.c:%.c=$(BIN)/%.o)
-
-
-#
-#  CC flags
-#
-
-DEFINES=
-
-MY_INCLUDE=	-I. -I$(SNMP_INC)
-
-CPPFLAGS +=	$(MY_INCLUDE)
-
-CFLAGS=		-c
-
-
-#
-# LD flags
-#
-
-EXT = 1
-
-MYLINKLIBS += $(LDLIBS) -L$(SNMP_LIB) -lssagent -L$(SNMP_LIB) -lssasnmp
-
-LIBS=	$(MYLINKLIBS) -lsocket -lnsl -ly -ll -lelf -lgen
-
-TEST=	test
-
-PURIFY= $(PURIFY_HOME)/purify
-
-PARSER=	$(SNMP_ROOT)/$(BIN)/mibcodegen
-
-
-#####################################################
-
-#
-# all
-#
-
-all: $(SOURCES.h) $(TARGET)   
-
-install: all
-
-$(TARGET): $(BIN) $(OBJECTS) $(MYLIBS)
-	$(CC) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(MYLIBS) $(LIBS)
-
-$(BIN)/%.o: %.c  
-	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $*.c -o $@
-
-
-#
-# parse
-#
-
-parse:	$(MIBS)
-	$(PARSER) -b $(AGENT) -f $(MIBS)
-
-
-#
-# lint
-#
-
-lint:
-	$(LINT) $(LDFLAGS) $(CPPFLAGS) $(DEFINES) $(SOURCES.c) $(MYLIBS) $(LIBS)
-
-
-#
-# purify
-#
-
-purify:
-	$(PURIFY) $(CC) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(MYLIBS) $(LIBS)
-
-
-#
-# directories
-#
-
-$(BIN):
-	@$(TEST) -d $@ || mkdir $@
-
-
-#
-# clean
-#
-
-clean:
-	$(RM) $(OBJECTS)
-
-clobber: clean
-	$(RM) $(TARGET)
--- a/usr/src/cmd/agents/snmp/snmpdemod/ReadMe	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-steps to create the sample agent using the agent toolkit.
-
-Step 1 : Create your MIB
-Step 2 : Copy the files in the sample directory to your own directory
-	 where you want to create your sub agent.
-Step 3 : Copy your MIB file in this directory.
-Step 4 : Modify the Makefile. Look for AGENT and assign the name of
-	 your sub agent.
-Step 5 : Modify the MIBS entry in the Makefile. You can replace mib_demo.txt
-	 with your mib file name(e.g mymib.txt).
-Step 6 : Type "make parse" to invoke the mibcodegen executable with
-	 the required mib files. This will create multiple 'c' code files.
-Step 7 : Modify the SOURCES entry in the Makefile. Add the 'c' files
-	 which are created in the previous step.
-Step 8 : Type "make", the sample agent executable will be created
-Step 9 : Modify the various generated 'c' files to add the functionality that
-	 the sub agent need to provide.
-
-Remark:
-Usage: snmpdemod  /* the generated subagent executable */
-	[-h] /* help message */
-
-	[-k (don't read config file)] /* run the subagent as standalone, in
-				other words, it doesn't register with master
-				agent */
-
-	[-p port ] /* port for listening SNMP requests */
-
-	[-c config-file (default /etc/opt/SUNWconn/SSA/snmp/conf/snmpdemo.reg)]
-		/* file for oid(subtrees) registration with master agent.
-		   with -k option, this file won't be read */
-
-	[-a sec-config-file (default /etc/opt/SUNWconn/SSA/snmp/conf/snmpdemo.acl)]
-		/* access control file for the subagent */
-
-	[-i poll-interval (default 30 seconds)]
-		/* maximum interval for subagent to wait for requests */
-
-	[-d trace-level (range 0..4, default 0)]
-		/* debugging purpose */
-
--- a/usr/src/cmd/agents/snmp/snmpdemod/snmpdemo.acl	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Configuration file of an SNMP agent
-#
-
-
-##################
-# access control # 
-##################
-
-# The list of community names needed for read/write access
-# to the entire MIB.
-# If the list is empty, the only valid community name is "public"
-# and its access type is read-only
-
-acl = {
-        {
-                communities = public, private
-                access = read-write
-                managers = *
-        }
-}
-
-
-#communities = {
-#public		read-write
-#	private		read-write
-#}
-
-# The list of hosts that can send SNMP queries.
-# If this list is empty, all the hosts are allowed to
-# send SNMP queries.
-
-#managers = {
-#}
-
-
-###################
-# trap parameters #
-###################
-
-trap = {
-#  {
-#	trap-community = SNMP-trap
-#	hosts = hubble, snowbell
-#	{
-#	  enterprise = "Sun Microsystems"
-#	  trap-num = 1, 2-5, 6
-# 	}
-#	{
-#	  enterprise = "3Com"
-#	  trap-num = 4
-# 	}
-#	{
-#	  enterprise = "snmp"
-#	  trap-num = 0, 2, 5
-# 	}
-#  }
-#  {
-#	trap-community = jerry-trap
-#	hosts = jerry, nanak, hubble
-#	{
-#	  enterprise = "sun"
-#	  trap-num = 1, 3
-# 	}
-#	{
-#	  enterprise = "snmp"
-#	  trap-num = 1-3
-# 	}
-#  }
-}
-
-# The community name to be used in traps.
-
-#trap-community = SNMP-trap
-
-# The list of hosts where traps should be sent.
-
-#trap-recipients =
-#{
-#hubble
-#}
-
--- a/usr/src/cmd/agents/snmp/snmpdemod/snmpdemo.reg	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#	The configuration file of the SNMP Relay for snmpdemod
-#	
-
-# IMPORTANT:
-# ----------
-#	So that the SNMP Relay will take into account
-#	your configuration file, you must:
-#	- rename this file with the ".snmprelay" extension
-#	  (for example: myagent.snmprelay)
-#	- check that this file is located in the configuration directory
-#	  for the SNMP Relay (by default: /opt/SUNWconn/snmprelay)
-
-
-##########
-# macros # 
-##########
-
-# The following 3 macros are predefined:
-#
-#	mib-2 =		1.3.6.1.2.1
-#	enterprise =	1.3.6.1.4.1
-#	sun =		1.3.6.1.4.1.42
-#
-# Your can define your own macros, so that you can
-# manipulate strings instead of OIDs in defining the agent.
-# See the "agent" section below.
-
-macros = {
-	demo =	sun.1000
-}
-
-
-##########
-# agent #
-##########
-
-# You must fill in at least the following fields:
-#
-#	- name:		the name of your agent (for example, the executable
-#			file name of your agent)
-#
-#	- subtrees:	the list of OIDs / subtrees of OIDs your agent
-#			supports. The listed items must be separated by
-#			a coma.
-#
-#	- port:		the UDP port number on which you will start
-#			your agent
-#
-# You can also change the following fields:
-#
-#	- timeout:	the number of micro-seconds the SNMP Relay will
-#			wait for a reponse from your agent
-
-agents =
-{
-	{
-		name = "snmpdemo"
-                subtrees = { demo }
-		timeout = 4000000
-		watch-dog-time = 2
-		port = 7041
-	}
-}
-
-
--- a/usr/src/cmd/agents/snmp/snmpdemod/snmpdemo.rsrc	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subhect to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Configuration file of the SNMP Relay
-#  for the SNMP agent bundled with SNM
-#
-
-
-##########
-# agents #
-##########
-
-resource =
-{
-        {
-                registration_file = "/etc/sea/snmp/conf/snmpdemo.reg"
-                security = "/etc/sea/snmp/conf/snmpdemo.acl"
-                policy = "spawn"
-                command = "/opt/SUNWconn/sea/snmp/sample/snmpdemod -k -p $PORT" 
-
-        }
-}
-
-
--- a/usr/src/cmd/agents/snmp/snmplib/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/Makefile.cmd
-
-SUBDIRS=	$(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
-
-all :=          TARGET= all
-install :=      TARGET= install
-clean :=        TARGET= clean
-clobber :=      TARGET= clobber
-lint :=         TARGET= lint
-install_h :=    TARGET= install_h
-
-all install clean clobber lint: $(SUBDIRS)
-
-$(SUBDIRS):	FRC
-	@cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/agents/snmp/snmplib/Makefile.com	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-LIBRARY =	libssasnmp.a
-VERS =		.1
-OBJECTS =	impl.o error.o trace.o signals.o asn1.o pdu.o request.o \
-		trap.o snmp_api.o madman_api.o madman_trap.o
-
-include $(SRC)/lib/Makefile.lib
-
-LIBS =		$(DYNLIB) $(LINTLIB)
-LDLIBS +=	-lc -lsocket -lnsl
-$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
-
-MAPFILES =	../snmp-mapfile-vers 
-
-CPPFLAGS +=	-I..
-LINTFLAGS64 +=	-errchk=longptr64
-
-.KEEP_STATE:
-
-all: $(LIBS)
-
-lint: lintcheck
-
-include $(SRC)/lib/Makefile.targ
--- a/usr/src/cmd/agents/snmp/snmplib/amd64/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../Makefile.com
-include $(SRC)/lib/Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
--- a/usr/src/cmd/agents/snmp/snmplib/asn1.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,758 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2001,2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include "snmp_msg.h"
-#include "asn1.h"
-
-
-/*
- * asn_parse_int - pulls a int32_t out of an ASN int type.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the end of this object.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_parse_int(
-    u_char	    *data,	/* IN - pointer to start of object */
-    uint32_t	    *datalength,/* IN/OUT - number of valid bytes left in buffer */
-    u_char	    *type,	/* OUT - asn type of object */
-    int32_t	    *intp,	/* IN/OUT - pointer to start of output buffer */
-    uint32_t	    intsize,    /* IN - size of output buffer */
-    char 	    *error_label)
-{
-/*
- * ASN.1 integer ::= 0x02 asnlength byte {byte}*
- */
-    u_char *bufp = data;
-    uint32_t  asn_length = 0;
-    int32_t   value = 0;
-
-
-	error_label[0] = '\0';
-
-    if (intsize != sizeof (int32_t)){
-	(void)sprintf(error_label, ERR_MSG_NOT_LONG);
-	return NULL;
-    }
-    *type = *bufp++;
-    bufp = asn_parse_length(bufp, &asn_length, error_label);
-    if (bufp == NULL){
-	(void)sprintf(error_label, ERR_MSG_BAD_LENGTH);
-	return NULL;
-    }
-    /* LINTED */
-    if (asn_length + (uint32_t)(bufp - data) > *datalength){
-	(void)sprintf(error_label, ERR_MSG_OVERFLOW);
-	return NULL;
-    }
-    if (asn_length > intsize){
-	(void)sprintf(error_label, ERR_MSG_DONT_SUPPORT_LARGE_INT);
-	return NULL;
-    }
-    /* LINTED */
-    *datalength -= asn_length + (uint32_t)(bufp - data);
-    if (*bufp & 0x80)
-	value = -1; /* integer is negative */
-    while(asn_length--)
-	value = (value << 8) | *bufp++;
-    *intp = value;
-    return bufp;
-}
-
-/*
- * asn_parse_unsigned_int - pulls an unsigned int32_t out of an ASN int type.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the end of this object.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_parse_unsigned_int(
-    u_char      *data,      /* IN - pointer to start of object */
-    uint32_t *	datalength,/* IN/OUT - number of valid bytes left in buffer */
-    u_char      *type,      /* OUT - asn type of object */
-    int32_t    *intp,      /* IN/OUT - pointer to start of output buffer */
-    uint32_t    intsize,    /* IN - size of output buffer */
-    char        *error_label)
-{
-/*
- * ASN.1 integer ::= 0x02 asnlength byte {byte}*
- */
-    u_char *bufp = data;
-    uint32_t asn_length;
-    uint32_t value = 0;
-
-    error_label[0] = '\0';
-
-    if (intsize != sizeof (int32_t)){
-	(void)sprintf(error_label, ERR_MSG_NOT_LONG);
-	return NULL;
-    }
-    *type = *bufp++;
-    bufp = asn_parse_length(bufp, &asn_length, error_label);
-    if (bufp == NULL){
-	(void)sprintf(error_label, ERR_MSG_BAD_LENGTH);
-        return NULL;
-    }
-    /* LINTED */
-    if (asn_length + (uint32_t)(bufp - data) > *datalength){
-	(void)sprintf(error_label, ERR_MSG_OVERFLOW);
-        return NULL;
-    }
-    if ((asn_length > (intsize + 1)) ||
-        ((asn_length == intsize + 1) && *bufp != 0x00)){
-	(void)sprintf(error_label, ERR_MSG_DONT_SUPPORT_LARGE_INT);
-        return NULL;
-    }
-    /* LINTED */
-    *datalength -= asn_length + (uint32_t)(bufp - data);
-    if (*bufp & 0x80)
-        value = -1U; /* integer is negative */
-    while(asn_length--)
-        value = (value << 8) | *bufp++;
-    *intp = value;
-    return bufp;
-}
-
-
-/*
- * asn_build_int - builds an ASN object containing an integer.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the end of this object.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_build_int(
-    u_char *data,	/* IN - pointer to start of output buffer */
-    uint32_t * datalength,/* IN/OUT - number of valid bytes left in buffer */
-    u_char    type,	/* IN - asn type of object */
-    int32_t   *intp,	/* IN - pointer to start of integer */
-    uint32_t    intsize,    /* IN - size of *intp */
-    char *error_label)
-{
-/*
- * ASN.1 integer ::= 0x02 asnlength byte {byte}*
- */
-
-    int32_t integer;
-    uint32_t mask;
-
-	error_label[0] = '\0';
-
-    if (intsize != sizeof (int32_t))
-	return NULL;
-    integer = *intp;
-    /*
-     * Truncate "unnecessary" bytes off of the most significant end of this 2's
-     * complement integer. There should be no sequence of 9 consecutive 1's or
-     *  0's at the most significant end of the integer.
-     */
-	mask = ((uint32_t) 0x1FF) << ((8 * (sizeof(int32_t) - 1)) - 1);
-
-    /* mask is 0xFF800000 on a big-endian machine */
-    while((((integer & mask) == 0) || ((integer & mask) == mask)) && intsize > 1){
-	intsize--;
-	integer <<= 8;
-    }
-    data = asn_build_header(data, datalength, type, intsize, error_label);
-    if (data == NULL)
-	return NULL;
-    if (*datalength < intsize)
-	return NULL;
-    *datalength -= intsize;
-
-	mask = ((uint32_t) 0xFF) << (8 * (sizeof(int32_t) - 1));
-
-    /* mask is 0xFF000000 on a big-endian machine */
-    while(intsize--){
-	/* LINTED */
-	*data++ = (u_char)((integer & mask) >> (8 * (sizeof(int32_t) - 1)));
-	integer <<= 8;
-    }
-    return data;
-}
-
-/*
- * asn_build_unsigned_int - builds an ASN object containing an integer.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the end of this object.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_build_unsigned_int(
-    u_char *data,      /* IN - pointer to start of output buffer */
-    uint32_t    *datalength,/* IN/OUT - number of valid bytes left in buffer */
-    u_char          type,       /* IN - asn type of object */
-    int32_t *intp,      /* IN - pointer to start of int32_t integer */
-    uint32_t    intsize,    /* IN - size of *intp */
-    char            *error_label)
-{
-/*
- * ASN.1 integer ::= 0x02 asnlength byte {byte}*
- */
-
-    uint32_t integer;
-    uint32_t mask;
-    int add_null_byte = 0;
-
-    error_label[0] = '\0';
-
-    if (intsize != sizeof (int32_t))
-        return NULL;
-    integer = *intp;
-    mask = ((uint32_t) 0xFF) << (8 * (sizeof(int32_t) - 1));
-    /* mask is 0xFF000000 on a big-endian machine */
-	/* LINTED */
-    if ((u_char)((integer & mask) >> (8 * (sizeof(int32_t) - 1))) & 0x80){
-        /* if MSB is set */
-        add_null_byte = 1;
-        intsize++;
-    } else {
-        /*
-         * Truncate "unnecessary" bytes off of the most significant end of this 2's complement integer.
-         * There should be no sequence of 9 consecutive 1's or 0's at the most significant end of the
-         * integer.
-         */
-        mask = ((uint32_t) 0x1FF) << ((8 * (sizeof(int32_t) - 1)) - 1);
-        /* mask is 0xFF800000 on a big-endian machine */
-        while(((integer & mask) == 0) && intsize > 1){
-            intsize--;
-            integer <<= 8;
-        }
-    }
-    data = asn_build_header(data, datalength, type, intsize, error_label);
-    if (data == NULL)
-        return NULL;
-    if (*datalength < intsize)
-        return NULL;
-    *datalength -= intsize;
-    if (add_null_byte == 1){
-        *data++ = '\0';
-        intsize--;
-    }
-    mask = ((uint32_t) 0xFF) << (8 * (sizeof(int32_t) - 1));
-    /* mask is 0xFF000000 on a big-endian machine */
-    while(intsize--){
-	/* LINTED */
-        *data++ = (u_char)((integer & mask) >> (8 * (sizeof(int32_t) - 1)));
-        integer <<= 8;
-    }
-    return data;
-}
-
-
-/*
- * asn_parse_string - pulls an octet string out of an ASN octet string type.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the beginning of the next object.
- *
- *  "string" is filled with the octet string.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_parse_string(
-    u_char	*data,	    /* IN - pointer to start of object */
-    uint32_t    *datalength,    /* IN/OUT - number of valid bytes left in buffer */
-    u_char	*type,	    /* OUT - asn type of object */
-    u_char	*string,	    /* IN/OUT - pointer to start of output buffer */
-    uint32_t    *strlength,     /* IN/OUT - size of output buffer */
-    char *error_label)
-{
-/*
- * ASN.1 octet string ::= primstring | cmpdstring
- * primstring ::= 0x04 asnlength byte {byte}*
- * cmpdstring ::= 0x24 asnlength string {string}*
- * This doesn't yet support the compound string.
- */
-    u_char *bufp = data;
-    uint32_t	    asn_length = 0;
-
-
-	error_label[0] = '\0';
-
-    *type = *bufp++;
-    bufp = asn_parse_length(bufp, &asn_length, error_label);
-    if (bufp == NULL)
-	return NULL;
-    /* LINTED */
-    if (asn_length + (uint32_t)(bufp - data) > *datalength){
-	(void)sprintf(error_label, ERR_MSG_OVERFLOW);
-	return NULL;
-    }
-    if (asn_length > *strlength){
-	(void)sprintf(error_label, ERR_MSG_DONT_SUPPORT_LARGE_STR);
-	return NULL;
-    }
-    memcpy(string, bufp, asn_length);
-    *strlength = asn_length;
-    /* LINTED */
-    *datalength -= asn_length + (uint32_t)(bufp - data);
-    return bufp + asn_length;
-}
-
-
-/*
- * asn_build_string - Builds an ASN octet string object containing the input string.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the beginning of the next object.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_build_string(
-    u_char	    *data,	    /* IN - pointer to start of object */
-    uint32_t    *datalength,    /* IN/OUT - number of valid bytes left in buffer */
-    u_char	    type,	    /* IN - ASN type of string */
-    u_char	    *string,	    /* IN - pointer to start of input buffer */
-    uint32_t    strlength,	    /* IN - size of input buffer */
-    char *error_label)
-{
-/*
- * ASN.1 octet string ::= primstring | cmpdstring
- * primstring ::= 0x04 asnlength byte {byte}*
- * cmpdstring ::= 0x24 asnlength string {string}*
- * This code will never send a compound string.
- */
-
-	error_label[0] = '\0';
-
-    data = asn_build_header(data, datalength, type, strlength, error_label);
-    if (data == NULL)
-	return NULL;
-    if (*datalength < strlength)
-	return NULL;
-    memcpy(data, string, strlength);
-    *datalength -= strlength;
-    return data + (intptr_t)strlength;
-}
-
-
-/*
- * asn_parse_header - interprets the ID and length of the current object.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   in this object following the id and length.
- *
- *  Returns a pointer to the first byte of the contents of this object.
- *  Returns NULL on any error.
- */
-u_char *
-asn_parse_header(
-    u_char	    *data,	/* IN - pointer to start of object */
-    uint32_t *	    datalength,/* IN/OUT - number of valid bytes left in buffer */
-    u_char	    *type,	/* OUT - ASN type of object */
-    char *error_label)
-{
-    u_char *bufp = data;
-    uint32_t	    header_len;
-    uint32_t	    asn_length = 0;
-
-    error_label[0] = '\0';
-
-    /* this only works on data types < 30, i.e. no extension octets */
-    if (IS_EXTENSION_ID(*bufp)){
-	(void)sprintf(error_label, ERR_MSG_CANT_PROCESS_LONG_ID);
-	return NULL;
-    }
-    *type = *bufp;
-    bufp = asn_parse_length(bufp + 1, &asn_length, error_label);
-    if (bufp == NULL)
-	return NULL;
-
-    /* LINTED */
-    header_len = (uint32_t)(bufp - data);
-    if (header_len + asn_length > *datalength){
-	(void)sprintf(error_label, ERR_MSG_ASN_LEN_TOO_LONG);
-	return NULL;
-    }
-    *datalength = asn_length;
-    return bufp;
-}
-
-/*
- * asn_build_header - builds an ASN header for an object with the ID and
- * length specified.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   in this object following the id and length.
- *
- *  This only works on data types < 30, i.e. no extension octets.
- *  The maximum length is 0xFFFF;
- *
- *  Returns a pointer to the first byte of the contents of this object.
- *  Returns NULL on any error.
- */
-u_char *
-asn_build_header(
-    u_char *data,	/* IN - pointer to start of object */
-    uint32_t   *datalength,/* IN/OUT - number of valid bytes left in buffer */
-    u_char	    type,	/* IN - ASN type of object */
-    uint32_t	    length,	/* IN - length of object */
-    char *error_label)
-{
-	error_label[0] = '\0';
-
-    if (*datalength == 0)
-	return NULL;
-    *data++ = type;
-    (*datalength)--;
-    return asn_build_length(data, datalength, length, error_label);
-    
-}
-
-/*
- * asn_parse_length - interprets the length of the current object.
- *  On exit, length contains the value of this length field.
- *
- *  Returns a pointer to the first byte after this length
- *  field (aka: the start of the data field).
- *  Returns NULL on any error.
- */
-u_char *
-asn_parse_length(
-    u_char  *data,	/* IN - pointer to start of length field */
-    uint32_t  *length,	/* OUT - value of length field */
-    char *error_label)
-{
-    u_char lengthbyte = *data;
-
-	error_label[0] = '\0';
-
-    if (lengthbyte & ASN_LONG_LEN){
-	lengthbyte &= ~ASN_LONG_LEN;	/* turn MSb off */
-	if (lengthbyte == 0){
-		(void)sprintf(error_label, ERR_MSG_DONT_SUPPORT_INDEF_LEN);
-	    return NULL;
-	}
-	if (lengthbyte > sizeof(int32_t)){
-		(void)sprintf(error_label, ERR_MSG_DONT_SUPPORT_SUCH_LEN);
-	    return NULL;
-	}
-	memcpy(length, data + 1, (int)lengthbyte);
-	*length = ntohl(*length);
-	*length >>= (8 * ((sizeof *length) - lengthbyte));
-	return data + lengthbyte + 1;
-    } else { /* short asnlength */
-	*length = (int32_t)lengthbyte;
-	return data + 1;
-    }
-}
-
-u_char *
-asn_build_length(
-    u_char *data,	/* IN - pointer to start of object */
-    uint32_t   *datalength, /* IN/OUT - number of valid bytes left in buffer */
-    uint32_t    length,	/* IN - length of object */
-    char *error_label)
-{
-    u_char    *start_data = data;
-
-	error_label[0] = '\0';
-
-    /* no indefinite lengths sent */
-    if (length < 0x80){
-	if (*datalength < 1)
-		goto errout;
-	/* LINTED */
-	*data++ = (u_char)length;
-    } else if (length <= 0xFF){
-	if (*datalength < 2)
-		goto errout;
-	/* LINTED */
-	*data++ = (u_char)(0x01 | ASN_LONG_LEN);
-	/* LINTED */
-	*data++ = (u_char)length;
-    } else { /* 0xFF < length <= 0xFFFF */
-	if (*datalength < 3)
-		goto errout;
-	/* LINTED */
-	*data++ = (u_char)(0x02 | ASN_LONG_LEN);
-	/* LINTED */
-	*data++ = (u_char)((length >> 8) & 0xFF);
-	/* LINTED */
-	*data++ = (u_char)(length & 0xFF);
-    }
-    /* LINTED */
-    *datalength -= (uint32_t)(data - start_data);
-    return data;
-
-errout:
-    (void)sprintf(error_label, ERR_MSG_BUILD_LENGTH);
-    return NULL;
-}
-
-/*
- * asn_parse_objid - pulls an object indentifier out of an ASN object identifier type.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the beginning of the next object.
- *
- *  "objid" is filled with the object identifier.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_parse_objid(
-    u_char	    *data,	    /* IN - pointer to start of object */
-    uint32_t 	    *datalength,    /* IN/OUT - number of valid bytes left in buffer */
-    u_char	    *type,	    /* OUT - ASN type of object */
-    Subid	    *objid,	    /* IN/OUT - pointer to start of output buffer */
-    int32_t	    *objidlength,   /* IN/OUT - number of sub-id's in objid */
-    char *error_label)
-{
-/*
- * ASN.1 objid ::= 0x06 asnlength subidentifier {subidentifier}*
- * subidentifier ::= {leadingbyte}* lastbyte
- * leadingbyte ::= 1 7bitvalue
- * lastbyte ::= 0 7bitvalue
- */
-    u_char *bufp = data;
-    Subid *oidp = objid + 1;
-    uint32_t subidentifier;
-    int32_t   length;
-    uint32_t	    asn_length = 0;
-
-
-	error_label[0] = '\0';
-
-    *type = *bufp++;
-    bufp = asn_parse_length(bufp, &asn_length, error_label);
-    if (bufp == NULL)
-	return NULL;
-    /* LINTED */
-    if (asn_length + (uint32_t)(bufp - data) > *datalength){
-	(void)sprintf(error_label, ERR_MSG_OVERFLOW);
-	return NULL;
-    }
-    /* LINTED */
-    *datalength -= asn_length + (uint32_t)(bufp - data);
-
-    length = asn_length;
-    (*objidlength)--;	/* account for expansion of first byte */
-    while (length > 0 && (*objidlength)-- > 0){
-	subidentifier = 0;
-	do {	/* shift and add in low order 7 bits */
-	    subidentifier = (subidentifier << 7) + (*(u_char *)bufp & ~ASN_BIT8);
-	    length--;
-	} while (*(u_char *)bufp++ & ASN_BIT8);	/* last byte has high bit clear */
-	if (subidentifier > (uint32_t)MAX_SUBID){
-		(void)sprintf(error_label, ERR_MSG_SUBIDENTIFIER_TOO_LONG);
-	    return NULL;
-	}
-	*oidp++ = (Subid)subidentifier;
-    }
-
-    /*
-     * The first two subidentifiers are encoded into the first component
-     * with the value (X * 40) + Y, where:
-     *	X is the value of the first subidentifier.
-     *  Y is the value of the second subidentifier.
-     */
-    subidentifier = (uint32_t)objid[1];
-    /* LINTED */ 
-    objid[1] = (u_char)(subidentifier % 0x28);
-    /* LINTED */ 
-    objid[0] = (u_char)((subidentifier - objid[1]) / 0x28);
-
-    /* LINTED */
-    *objidlength = (int32_t)(oidp - objid);
-    return bufp;
-}
-
-/*
- * asn_build_objid - Builds an ASN object identifier object containing the input string.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the beginning of the next object.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_build_objid(
-    u_char *data,	    /* IN - pointer to start of object */
-    uint32_t    *datalength,    /* IN/OUT - number of valid bytes left in buffer */
-    u_char	    type,	    /* IN - ASN type of object */
-    Subid	    *objid,	    /* IN - pointer to start of input buffer */
-    int32_t	    objidlength,    /* IN - number of sub-id's in objid */
-    char *error_label)
-{
-/*
- * ASN.1 objid ::= 0x06 asnlength subidentifier {subidentifier}*
- * subidentifier ::= {leadingbyte}* lastbyte
- * leadingbyte ::= 1 7bitvalue
- * lastbyte ::= 0 7bitvalue
- */
-
-	uchar_t buf[MAX_OID_LEN * 5];
-	uchar_t *bp = buf;
-	Subid objbuf[MAX_OID_LEN];
-	Subid *op = objbuf;
-	uint32_t    asnlength;
-	uint32_t subid, mask, testmask;
-	int bits, testbits;
-
-	error_label[0] = '\0';
-
-	if (objidlength > MAX_OID_LEN)
-		return (NULL);
-
-	memcpy(objbuf, objid, objidlength * (int32_t)sizeof (Subid));
-	/* transform size in bytes to size in subid's */
-	/* encode the first two components into the first subidentifier */
-	op[1] = op[1] + (op[0] * 40);
-	op++;
-	objidlength--;
-
-	while (objidlength-- > 0){
-	subid = *op++;
-	mask = 0x7F; /* handle subid == 0 case */
-	bits = 0;
-	/* testmask *MUST* !!!! be of an unsigned type */
-	for (testmask = 0x7F, testbits = 0; testmask != 0;
-			testmask <<= 7, testbits += 7) {
-		if (subid & testmask) {	/* if any bits set */
-			mask = testmask;
-			bits = testbits;
-		}
-	}
-	/* mask can't be zero here */
-	for (; mask != 0x7F; mask >>= 7, bits -= 7){
-		if (mask == 0x1E00000)
-			/* fix a mask that got truncated above */
-		mask = 0xFE00000;
-	/* LINTED */
-	*bp++ = (uchar_t)(((subid & mask) >> bits) | ASN_BIT8);
-	}
-	/* LINTED */
-	*bp++ = (uchar_t)(subid & mask);
-	}
-	/* LINTED */
-	asnlength = (uint32_t)(bp - buf);
-	data = asn_build_header(data, datalength, type, asnlength, error_label);
-	if (data == NULL)
-		return (NULL);
-	if (*datalength < asnlength)
-		return (NULL);
-	memcpy(data, buf, asnlength);
-	*datalength -= asnlength;
-	return (data + (uintptr_t)asnlength);
-}
-
-/*
- * asn_parse_null - Interprets an ASN null type.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the beginning of the next object.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_parse_null(
-    u_char	    *data,	    /* IN - pointer to start of object */
-    uint32_t	    *datalength,    /* IN/OUT - number of valid bytes left in buffer */
-    u_char	    *type,	    /* OUT - ASN type of object */
-    char *error_label)
-{
-/*
- * ASN.1 null ::= 0x05 0x00
- */
-    u_char	*bufp = data;
-    uint32_t	asn_length = 0;
-
-
-	error_label[0] = '\0';
-
-    *type = *bufp++;
-    bufp = asn_parse_length(bufp, &asn_length, error_label);
-    if (bufp == NULL)
-	return NULL;
-    if (asn_length != 0){
-	(void)sprintf(error_label, ERR_MSG_MALFORMED_NULL);
-	return NULL;
-    }
-    /* LINTED */
-    *datalength -= (uint32_t)(bufp - data);
-    return bufp + (uintptr_t)asn_length;
-}
-
-/*
- * asn_build_null - Builds an ASN null object.
- *  On entry, datalength is input as the number of valid bytes following
- *   "data".  On exit, it is returned as the number of valid bytes
- *   following the beginning of the next object.
- *
- *  Returns a pointer to the first byte past the end
- *   of this object (i.e. the start of the next object).
- *  Returns NULL on any error.
- */
-u_char *
-asn_build_null(
-    u_char	    *data,	    /* IN - pointer to start of object */
-    uint32_t	    *datalength,    /* IN/OUT - number of valid bytes left in buffer */
-    u_char	    type,	    /* IN - ASN type of object */
-    char *error_label)
-{
-/*
- * ASN.1 null ::= 0x05 0x00
- */
-	error_label[0] = '\0';
-
-	return asn_build_header(data, datalength, type, 0, error_label);
-}
--- a/usr/src/cmd/agents/snmp/snmplib/asn1.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _ASN1_H_
-#define _ASN1_H_
-
-#include <sys/types.h>
-#include "impl.h"
-
-/***** GLOBAL CONSTANTS *****/
-
-#define MAX_SUBID   0xFFFFFFFF
-                                /*SNMP imposes a restriction on the max. length     */
-                                /* of any OID value to 128 numbers in the sequence. */
-#define MAX_OID_LEN	    128	/* max subid's in an oid */
-
-#define ASN_BOOLEAN	    (0x01)
-#define ASN_INTEGER	    (0x02)
-#define ASN_BIT_STR	    (0x03)
-#define ASN_OCTET_STR	    (0x04)
-#define ASN_NULL	    (0x05)
-#define ASN_OBJECT_ID	    (0x06)
-#define ASN_SEQUENCE	    (0x10)
-#define ASN_SET		    (0x11)
-
-#define ASN_UNIVERSAL	    (0x00)
-#define ASN_APPLICATION     (0x40)
-#define ASN_CONTEXT	    (0x80)
-#define ASN_PRIVATE	    (0xC0)
-
-#define ASN_PRIMITIVE	    (0x00)
-#define ASN_CONSTRUCTOR	    (0x20)
-
-#define ASN_LONG_LEN	    (0x80)
-#define ASN_EXTENSION_ID    (0x1F)
-#define ASN_BIT8	    (0x80)
-
-#define IS_CONSTRUCTOR(byte)	((byte) & ASN_CONSTRUCTOR)
-#define IS_EXTENSION_ID(byte)	(((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID)
-
-
-#define INTEGER     ASN_INTEGER
-#define STRING      ASN_OCTET_STR
-#define OBJID       ASN_OBJECT_ID
-#define NULLOBJ     ASN_NULL
-
-/* defined types (from the SMI, RFC 1065) */
-#define IPADDRESS   (ASN_APPLICATION | 0)
-#define COUNTER     (ASN_APPLICATION | 1)
-#define GAUGE       (ASN_APPLICATION | 2)
-#define TIMETICKS   (ASN_APPLICATION | 3)
-#define OPAQUE      (ASN_APPLICATION | 4)
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern u_char *asn_parse_int(u_char *, uint32_t *, u_char *, int32_t *, uint32_t , char *);
-extern u_char *asn_parse_unsigned_int(u_char *, uint32_t *, u_char *,
-			int32_t *, uint32_t, char *);
-extern u_char *asn_build_int(u_char *, uint32_t *, u_char, int32_t *, uint32_t, char *);
-extern u_char *asn_build_unsigned_int(u_char *, uint32_t *, u_char,
-			int32_t *, uint32_t, char *);
-extern u_char *asn_parse_string(u_char *, uint32_t *, u_char *, u_char *, uint32_t *, char *);
-extern u_char *asn_build_string(u_char *, uint32_t *, u_char, u_char *, uint32_t, char *);
-extern u_char *asn_parse_header(u_char *, uint32_t *, u_char *, char *);
-extern u_char *asn_build_header(u_char *, uint32_t *, u_char, uint32_t, char *);
-extern u_char *asn_parse_length(u_char *, uint32_t *, char *);
-extern u_char *asn_build_length(u_char *, uint32_t *, uint32_t, char *);
-extern u_char *asn_parse_objid(u_char *, uint32_t *, u_char *, Subid *, int32_t *, char *);
-extern u_char *asn_build_objid(u_char *, uint32_t *, u_char, Subid *, int32_t, char *);
-extern u_char *asn_parse_null(u_char *, uint32_t *, u_char *, char *);
-extern u_char *asn_build_null(u_char *, uint32_t *, u_char, char *);
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmplib/error.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <time.h>
-#include <syslog.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <libgen.h>
-
-
-#include "snmp_msg.h"
-#include "impl.h"
-#include "trace.h"
-#include "error.h"
-
-
-int error_size = DEFAULT_ERROR_SIZE;
-
-char error_label[1000] = "";
-
-
-static char *application_name = NULL;
-static void (*application_end)() = NULL;
-
-
-/*
- *	this function will exit on any error
- */
-
-void error_init(char *name, void end())
-{
-	char *ptr;
-
-
-	if(name == NULL)
-	{
-		(void)fprintf(stderr, "BUG: error_init(): name is NULL");
-		exit(1);
-	}
-
-	ptr = basename(name);
-	if(ptr == NULL)
-	{
-		(void)fprintf(stderr, "error_init(): bad application name: %s",
-			name);
-		exit(1);
-	}
-
-	application_name = strdup(ptr);
-	if(application_name == NULL)
-	{
-		(void)fprintf(stderr, ERR_MSG_ALLOC);
-		exit(1);
-	}
-
-	if(end == NULL)
-	{
-		(void)fprintf(stderr, "BUG: error_init(): end is NULL");
-		exit(1);
-	}
-
-	application_end = end;
-
-	openlog(name, LOG_CONS, LOG_DAEMON);
-}
-
-
-/* ARGSUSED */
-void error_open(char *filename)
-{
-	return;
-}
-
-
-void error_close_stderr()
-{
-	return;
-}
-
-void error(char *format, ...)
-{
-	va_list ap;
-	int32_t len;
-	char static_buffer[4096];
-
-	va_start(ap, format);
-
-	/* remove '\n's at the end of format */
-	/* LINTED */
-	len = (int32_t)strlen(format);
-	while((len > 0) && (format[len - 1] == '\n')) {
-		format[len - 1] = '\0';
-		len--;
-	}
-
-	(void) vsnprintf(static_buffer, sizeof (static_buffer), format, ap);
-	va_end(ap);
-
-	if(trace_level > 0)
-		trace("%s", static_buffer);
-
-	syslog(LOG_ERR, "%s", static_buffer);
-}
-
-
-void error_exit(char *format, ...)
-{
-	va_list ap;
-	int32_t len;
-	char static_buffer[4096];
-	
-	va_start(ap, format);
-
-	/* remove '\n's at the end of format */
-	/* LINTED */
-	len = (int32_t)strlen(format);
-	while((len > 0) && (format[len - 1] == '\n')) {
-		format[len - 1] = '\0';
-		len--;
-	}
-
-	(void) vsnprintf(static_buffer, sizeof (static_buffer), format, ap);
-	va_end(ap);
-
-	application_end();
-
-	if(trace_level > 0)
-		trace("%s", static_buffer);
-
-	syslog(LOG_ERR, "%s", static_buffer);
-
-	exit(1);
-}
-
-
-char *errno_string()
-{
-	static char buffer[100];
-
-	sprintf(buffer, "[errno: %s(%d)]",
-		strerror(errno), errno);
-
-	return buffer;
-}
-
-
-char *h_errno_string()
-{
-	static char buffer[100];
-	char *ptr = NULL;
-
-	switch(h_errno)
-	{
-		case HOST_NOT_FOUND:
-			ptr = "host not found";
-			break;
-		case TRY_AGAIN:
-			ptr = "try again";
-			break;
-		case NO_RECOVERY:
-			ptr = "no recovery";
-			break;
-		case NO_DATA:
-			ptr = "no data";
-			break;
-		default:
-			ptr = "???";
-			break;
-	}
-
-	sprintf(buffer, "[h_errno: %s(%d)]",
-		ptr, h_errno);
-
-	return buffer;
-}
-
-
--- a/usr/src/cmd/agents/snmp/snmplib/error.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
-
-#ifndef _ERROR_H_
-#define _ERROR_H_
-
-
-/***** GLOBAL CONSTANTS *****/
-
-#define DEFAULT_ERROR_SIZE	10000
-
-
-/***** GLOBAL VARIABLES *****/
-
-extern int error_size;
-
-extern char error_label[];
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern void error_init(char *name, void end());
-extern void error_open(char *filename);
-extern void error_close_stderr();
-
-extern void error(char *, ...);
-extern void error_exit(char *, ...);
-
-extern char *errno_string();
-extern char *h_errno_string();
-
-#endif
-
--- a/usr/src/cmd/agents/snmp/snmplib/i386/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 1998, 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../Makefile.com
-
-install: $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
--- a/usr/src/cmd/agents/snmp/snmplib/impl.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,805 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/utsname.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include "snmp_msg.h"
-#include "impl.h"
-#include "asn1.h"
-#include "snmp.h"
-#include "error.h"
- 
-
-/********************************************************************/
-
-char *pdu_type_string(u_char type)
-{
-	static char buffer[50];
-
-
-	switch(type)
-	{
-		case GET_REQ_MSG:
-			sprintf(buffer, "GET_REQ_MSG (0x%x)", type);
-			break;
-		case GETNEXT_REQ_MSG:
-			sprintf(buffer, "GETNEXT_REQ_MSG (0x%x)", type);
-			break;
-		case GET_RSP_MSG:
-			sprintf(buffer, "GET_RSP_MSG (0x%x)", type);
-			break;
-		case SET_REQ_MSG:
-			sprintf(buffer, "SET_REQ_MSG (0x%x)", type);
-			break;
-		case TRP_REQ_MSG:
-			sprintf(buffer, "TRP_MSG (0x%x)", type);
-			break;
-		default:
-			sprintf(buffer, "UNKNOWN! (0x%x)", type);
-			break;
-	}
-
-	return buffer;
-}
-
-
-/********************************************************************/
-
-char *asn1_type_string(u_char type)
-{
-	static char buffer[50];
-
-
-	switch(type)
-	{
-		case ASN_INTEGER:
-			sprintf(buffer, "INTEGER (0x%x)", type);
-			break;
-		case COUNTER:
-			sprintf(buffer, "COUNTER (0x%x)", type);
-			break;
-		case GAUGE:
-			sprintf(buffer, "GAUGE (0x%x)", type);
-			break;
-		case TIMETICKS:
-			sprintf(buffer, "TIMETICKS (0x%x)", type);
-			break;
-		case ASN_OCTET_STR:
-			sprintf(buffer, "OCTET STRING (0x%x)", type);
-			break;
-		case IPADDRESS:
-			sprintf(buffer, "IP ADDRESS (0x%x)", type);
-			break;
-		case OPAQUE:
-			sprintf(buffer, "OPAQUE (0x%x)", type);
-			break;
-		case ASN_OBJECT_ID:
-			sprintf(buffer, "OBJECT IDENTIFIER (0x%x)", type);
-			break;
-		case ASN_NULL:
-			sprintf(buffer, "NULL (0x%x)", type);
-			break;
-		default:
-			sprintf(buffer, "UNKNOWN! (0x%x)", type);
-			break;
-	}
-
-	return buffer;
-}
-
-
-/********************************************************************/
-
-char *error_status_string(int status)
-{
-	static char buffer[50];
-
-
-	switch(status)
-	{
-		case SNMP_ERR_NOERROR:
-			sprintf(buffer, "noError(%d)", status);
-			break;
-		case SNMP_ERR_TOOBIG:
-			sprintf(buffer, "tooBig(%d)", status);
-			break;
-		case SNMP_ERR_NOSUCHNAME:
-			sprintf(buffer, "noSuchName(%d)", status);
-			break;
-		case SNMP_ERR_BADVALUE:
-			sprintf(buffer, "badValue(%d)", status);
-			break;
-		case SNMP_ERR_READONLY:
-			sprintf(buffer, "readOnly(%d)", status);
-			break;
-		case SNMP_ERR_GENERR:
-			sprintf(buffer, "genErr(%d)", status);
-			break;
-		default:
-			sprintf(buffer, "UNKNOWN! (%d)", status);
-			break;
-	}
-
-	return buffer;
-}
-
-
-/********************************************************************/
-
-char *generic_trap_string(int generic)
-{
-	static char buffer[50];
-
-
-	switch(generic)
-	{
-		case SNMP_TRAP_COLDSTART:
-			sprintf(buffer, "coldStart(%d)", generic);
-			break;
-		case SNMP_TRAP_WARMSTART:
-			sprintf(buffer, "warmStart(%d)", generic);
-			break;
-		case SNMP_TRAP_LINKDOWN:
-			sprintf(buffer, "linkDown(%d)", generic);
-			break;
-		case SNMP_TRAP_LINKUP:
-			sprintf(buffer, "linkUp(%d)", generic);
-			break;
-		case SNMP_TRAP_AUTHFAIL:
-			sprintf(buffer, "authentificationFailure(%d)", generic);
-			break;
-		case SNMP_TRAP_EGPNEIGHBORLOSS:
-			sprintf(buffer, "egpNeighborLoss(%d)", generic);
-			break;
-		case SNMP_TRAP_ENTERPRISESPECIFIC:
-			sprintf(buffer, "enterpriseSpecific(%d)", generic);
-			break;
-		default:
-			sprintf(buffer, "UNKNOWN! (%d)", generic);
-			break;
-	}
-
-	return buffer;
-}
-
-
-/********************************************************************/
-
-/* we should check if the buffer is not too small */
-
-char *SSAOidString(Oid *oid)
-{
-	static char buffer[1000];
-	int i;
-	int32_t len;
-
-
-	if(oid == NULL)
-	{
-		sprintf(buffer, "oid is NULL!");
-		return buffer;
-	}
-
-	sprintf(buffer, "");
-
-	if(oid->len == 0)
-	{
-		return buffer;
-	}
-
-	for(i = 0; i < oid->len - 1; i++) {
-		/* LINTED */
-		len = (int32_t)strlen(buffer);
-		sprintf(&(buffer[len]), "%lu.", oid->subids[i]);
-	}
-	/* LINTED */
-	len = (int32_t)strlen(buffer);
-	sprintf(&(buffer[len]), "%lu", oid->subids[oid->len - 1]);
-
-	return buffer;
-}
-
-
-/********************************************************************/
-
-char *timeval_string(struct timeval *tv)
-{
-	static char buffer[50];
-
-
-	if(tv == NULL)
-	{
-		sprintf(buffer, "tv is NULL!");
-		return buffer;
-	}
-
-	sprintf(buffer, "%ld sec %ld usec", tv->tv_sec, tv->tv_usec);
-	return buffer;
-}
-
-
-/********************************************************************/
-
-char *ip_address_string(IPAddress *ip_address)
-{
-	static char buffer[50];
-	struct hostent *hp;
-
-
-	if(ip_address == NULL)
-	{
-		sprintf(buffer, "BUG: ip_address_string(): ip_address is NULL");
-		return buffer;
-	}
-
-	hp = gethostbyaddr((char *) &(ip_address->s_addr), 4, AF_INET);
-	if(hp)
-	{
-		sprintf(buffer, "%s", hp->h_name);
-	}
-	else
-	{
-		sprintf(buffer, "%s", inet_ntoa(*ip_address));
-	}
-
-	return buffer;
-}
-
-
-/********************************************************************/
-
-char *address_string(Address *address)
-{
-	static char buffer[50];
-	struct hostent *hp;
-
-
-	if(address == NULL)
-	{
-		sprintf(buffer, "BUG: address_string(): address is NULL");
-		return buffer;
-	}
-
-	hp = gethostbyaddr((char *) &(address->sin_addr.s_addr), 4, AF_INET);
-	if(hp)
-	{
-		sprintf(buffer, "%s.%d", hp->h_name, address->sin_port);
-	}
-	else
-	{
-		sprintf(buffer, "%s.%d", inet_ntoa(address->sin_addr), address->sin_port);
-	}
-
-	return buffer;
-}
-
-
-/********************************************************************/
-
-int SSAStringCpy(String *string1, String *string2, char *error_label)
-{
-	error_label[0] = '\0';
-
-	if(string1 == NULL)
-	{
-		sprintf(error_label, "BUG: SSAStringCpy(): string1 is NULL");
-		return -1;
-	}
-
-	if(string2 == NULL)
-	{
-		sprintf(error_label, "BUG: SSAStringCpy(): string2 is NULL");
-		return -1;
-	}
-
-	if(string1->chars)
-	{
-		sprintf(error_label, "BUG: SSAStringCpy(): string1->chars is not NULL");
-		return -1;
-	}
-
-	if(string1->len)
-	{
-		sprintf(error_label, "BUG: SSAStringCpy(): string1->len is not 0");
-		return -1;
-	}
-
-	if(string2->len == 0)
-	{
-		return 0;
-	}
-
-	string1->chars = (u_char *) malloc(string2->len);
-	if(string1->chars == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return -1;
-	}
-
-	memcpy(string1->chars, string2->chars, string2->len);
-	string1->len = string2->len;
-
-
-	return 0;
-}
-
-
-/********************************************************************/
-
-void SSAStringZero(String *string)
-{
-	if(string == NULL)
-	{
-		(void)fprintf(stderr, "BUG: SSAStringZero(): string is NULL");
-		return;
-	}
-
-	if(string->chars)
-	{
-		free(string->chars);
-		string->chars = NULL;
-	}
-	string->len = 0;
-
-
-	return;
-}
-
-
-/********************************************************************/
-
-int SSAStringInit(String *string, u_char *chars, int len, char *error_label)
-{
-	error_label[0] = '\0';
-
-	if(string == NULL)
-	{
-		sprintf(error_label, "BUG: SSAStringInit(): string is NULL");
-		return -1;
-	}
-
-	if(string->chars != NULL)
-	{
-		sprintf(error_label, "BUG: SSAStringInit(): string->chars is not NULL");
-		return -1;
-	}
-
-	if(string->len != 0)
-	{
-		sprintf(error_label, "BUG: SSAStringInit(): string->len is not 0");
-		return -1;
-	}
-
-	if(len != 0)
-	{
-		string->chars = (u_char *) malloc(len);
-		if(string->chars == NULL)
-		{
-			sprintf(error_label, ERR_MSG_ALLOC);
-			return -1;
-		}
-		memcpy(string->chars, chars, len);
-		string->len = len;
-	}
-
-
-	return 0;
-}
-
-
-/********************************************************************/
-
-/*
- *	SSAOidCmp() returns:
- *
- *		0 if oid1 == oid2
- *		1 if oid1 > oid2
- *		-1 if oid1 < oid2
- */
-
-int SSAOidCmp(Oid *oid1, Oid *oid2)
-{
-	int min;
-	int i;
-
-
-	if(oid1 == NULL)
-	{
-		(void)fprintf(stderr, "BUG: SSAOidCmp(): oid1 is NULL");
-		return -2;
-	}
-
-	if(oid2 == NULL)
-	{
-		(void)fprintf(stderr, "BUG: SSAOidCmp(): oid2 is NULL");
-		return -2;
-	}
-
-	min = MIN(oid1->len, oid2->len);
-
-	for(i = 0; i < min; i++)
-	{
-		if(oid1->subids[i] > oid2->subids[i])
-		{
-			return 1;
-		}
-
-		if(oid1->subids[i] < oid2->subids[i])
-		{
-			return -1;
-		}
-	}
-
-	if(oid1->len == oid2->len)
-	{
-		return 0;
-	}
-	else
-	if(oid1->len > oid2->len)
-	{
-		return 1;
-	}
-	else
-	{
-		return -1;
-	}
-}
-
-
-/********************************************************************/
-
-int SSAOidCpy(Oid *oid1, Oid *oid2, char *error_label)
-{
-	error_label[0] = '\0';
-
-	if(oid1 == NULL) {
-		(void)sprintf(error_label, "BUG: SSAOidCpy(): oid1 is NULL");
-		return -1;
-	}
-
-	if(oid2 == NULL) {
-		(void)sprintf(error_label, "BUG: SSAOidCpy(): oid2 is NULL");
-		return -1;
-	}
-
-	if(oid2->len == 0) {
-		return 0;
-	}
-
-	if(oid1->subids) {
-		(void)sprintf(error_label, "BUG: SSAOidCpy(): oid1->subids is not NULL");
-		return -1;
-	}
-
-	if(oid1->len) {
-		(void)sprintf(error_label, "BUG: SSAOidCpy(): oid1->len is not 0");
-		return -1;
-	}
-
-
-	oid1->subids = (Subid *) malloc(oid2->len * (int32_t)sizeof(Subid));
-	if(oid1->subids == NULL) {
-		(void)sprintf(error_label, ERR_MSG_ALLOC);
-		return -1;
-	}
-
-	(void)memcpy(oid1->subids, oid2->subids, oid2->len * (int32_t)sizeof(Subid));
-	oid1->len = oid2->len;
-
-	return 0;
-}
-
-
-/********************************************************************/
-
-Oid *SSAOidDup(Oid *oid, char *error_label)
-{
-	Oid *new = NULL;
-
-
-	error_label[0] = '\0';
-
-	if(oid == NULL)
-	{
-		sprintf(error_label, "BUG: SSAOidDup(): oid is NULL");
-		return NULL;
-	}
-
-	new = (Oid *) malloc(sizeof(Oid));
-	if(new == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(new, 0, sizeof(Oid));
-
-	if(SSAOidCpy(new, oid, error_label))
-	{
-		free(new);
-		return NULL;
-	}
-
-	return new;
-}
-
-
-/********************************************************************/
-
-Oid *SSAOidNew()
-{
- 	Oid *oid = NULL;
- 	oid = (Oid *) malloc(sizeof(Oid));
- 	oid->subids = NULL;
- 	oid->len = 0;
- 	return (oid); 
-}
-
-/********************************************************************/
-
-void SSAOidZero(Oid *oid)
-{
-	if(oid == NULL)
-	{
-		(void)fprintf(stderr, "BUG: SSAOidZero(): oid is NULL");
-		return;
-	}
-
-	if(oid->subids)
-	{
-		free(oid->subids);
-		oid->subids = NULL;
-	}
-	oid->len = 0;
-}
-
-
-/********************************************************************/
-
-void SSAOidFree(Oid *oid)
-{
-	if(oid == NULL) {
-		return;
-	}
-
-	SSAOidZero(oid);
-	free(oid);
-}
-
-
-/********************************************************************/
-
-int SSAOidInit(Oid *oid, Subid *subids, int len, char *error_label)
-{
-	error_label[0] = '\0';
-
-	if(oid == NULL)
-	{
-		sprintf(error_label, "BUG: SSAOidInit(): oid is NULL");
-		return -1;
-	}
-
-	if(oid->subids != NULL)
-	{
-		sprintf(error_label, "BUG: SSAOidInit(): oid->subids is not NULL");
-		return -1;
-	}
-
-	if(oid->len != 0)
-	{
-		sprintf(error_label, "BUG: SSAOidInit(): oid->len is not 0");
-		return -1;
-	}
-
-	if(len != 0)
-	{
-		oid->subids = (Subid *) malloc(len * (int32_t)sizeof(Subid));
-		if(oid->subids == NULL)
-		{
-			sprintf(error_label, ERR_MSG_ALLOC);
-			return -1;
-		}
-		(void)memcpy(oid->subids, subids, len * (int32_t)sizeof(Subid));
-		oid->len = len;
-	}
-
-
-	return 0;
-}
-
-
-/********************************************************************/
-
-int get_my_ip_address(IPAddress *my_ip_address, char *error_label)
-{
-	struct utsname name;
-	struct hostent *hp;
-
-
-	error_label[0] = '\0';
-
-	if(uname(&name) == -1)
-	{
-		sprintf(error_label, ERR_MSG_UNAME,
-			errno_string());
-		return -1;
-	}
-
-	if((hp = gethostbyname(name.nodename)) == NULL)
-	{
-		sprintf(error_label, ERR_MSG_GETHOSTBYNAME,
-			name.nodename, h_errno_string());
-		return -1;
-	}
-
-	if(hp->h_length != 4)
-	{
-		sprintf(error_label, ERR_MSG_HOSTENT_BAD_IP_LENGTH,
-			hp->h_length);
-		return -1;
-	}
-
-	if(*hp->h_addr_list == NULL)
-	{
-		sprintf(error_label, ERR_MSG_HOSTENT_MISSING_IP_ADDRESS);
-		return -1;
-	}
-
-	memcpy(&my_ip_address->s_addr, *hp->h_addr_list, 4);
-
-
-	return 0;
-}
-
-
-/********************************************************************/
-
-int name_to_ip_address(char *name, IPAddress *ip_address, char *error_label)
-{
-	error_label[0] = '\0';
-
-
-	if(name == NULL)
-	{
-		sprintf(error_label, "BUG: name_to_ip_address(): name is NULL");
-		return -1;
-	}
-
-	if(ip_address == NULL)
-	{
-		sprintf(error_label, "BUG: name_to_ip_address(): ip_address is NULL");
-		return -1;
-	}
-
-	/* try to find the IP address from the name */
-	if(isdigit(name[0]))
-	{
-		if((int) (ip_address->s_addr = inet_addr(name)) == -1)
-		{
-			sprintf(error_label, ERR_MSG_BAD_IP_ADDRESS, name);
-			return -1;
-		}
-	}
-	else
-	{
-		struct hostent *hp;
-
-
-		hp = gethostbyname(name);
-		if(hp == NULL)
-		{
-			sprintf(error_label, ERR_MSG_BAD_HOSTNAME, name);
-			return -1;
-		}
-
-		if(hp->h_length != 4)
-		{
-			sprintf(error_label, ERR_MSG_HOSTENT_BAD_IP_LENGTH,
-				hp->h_length);
-			return -1;
-		}
-
-		if(*hp->h_addr_list == NULL)
-		{
-			sprintf(error_label, ERR_MSG_HOSTENT_MISSING_IP_ADDRESS);
-			return -1;
-		}
-
-		memcpy(&(ip_address->s_addr), *hp->h_addr_list, 4);
-	}
-
-
-	return 0;
-}
-
-char *SSAStringToChar(String str)
-{
-  static char buffer[100];
-
-  buffer[0] = '\0';
-  memcpy(buffer,str.chars,str.len);
-  return buffer;
-}
-
-/* error return NULL, success return Oid ptr */
-Oid *SSAOidStrToOid (char *name, char *error_label)
-{
-        Oid *name_oid;
-        Subid *subids;
-        int len = 0;
-        int i;
-        char *num_c;
-         
-        for (i=0; name[i] != '\0'; i++) {
-      if (name[i] == '.')
-          len++;
-          else if (!isdigit(name[i])) {
-                  (void)fprintf(stderr, "%s is not a valid oid name\n",  name);
-                  return(NULL);
-          }
-        }
-
-        if (!len ) {
-                (void)fprintf(stderr,"%s is not a valid oid name\n",  name);
-                return (NULL); /* not a valid name */
-        }
-
-        len++;
-        subids = (Subid *) malloc(len * (int32_t)sizeof(Subid));
-        if (subids == NULL) {
-                (void)fprintf(stderr,"cannot malloc\n");
-                return (NULL) ;
-        }
-        if ((num_c = strtok(name, "."))== NULL) {
-                free(subids);
-                return (NULL);
-        }
-        i = 0;
-	/* LINTED */
-        subids[i] = (Subid) atol(num_c);
-        i++;
-        while (( num_c = strtok(NULL, ".")) != NULL ) {
-		/* LINTED */
-                subids[i] = (Subid) atol(num_c);
-                i++;
-        }
-
-        name_oid = SSAOidNew();
-        (void)SSAOidInit(name_oid, subids, len, error_label);
-        free(subids);
-        return(name_oid);
-}
-
--- a/usr/src/cmd/agents/snmp/snmplib/impl.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998, 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#ifndef _IMPL_H
-#define	_IMPL_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-
-/* Exported Constants */
-
-#ifndef	NULL
-#define	NULL 0
-#endif
-
-#ifndef	TRUE
-#define	TRUE	1
-#endif
-#ifndef	FALSE
-#define	FALSE	0
-#endif
-
-#ifndef	True
-#define	True	1
-#endif
-#ifndef	False
-#define	False	0
-#endif
-
-#ifndef	MIN
-#define	MIN(x, y)	((x) < (y)? (x) : (y))
-#endif
-#ifndef	MAX
-#define	MAX(x, y)	((x) > (y)? (x) : (y))
-#endif
-
-#define	NOT_IMPLEMENTED		-1
-#define	END_OF_TABLE		-2
-#define	OTHER_ERROR		-3
-
-#define	EXACT_ENTRY		1
-#define	FIRST_ENTRY		2
-#define	NEXT_ENTRY		3
-
-#define	FIRST_PASS		1
-#define	SECOND_PASS		2
-
-
-/* Exported Types */
-
-typedef int32_t Integer;
-
-
-typedef struct _String {
-	uchar_t *chars;
-	int len;
-} String;
-
-
-typedef uint32_t Subid;
-
-typedef struct _Oid {
-	Subid *subids;
-	int len;
-} Oid;
-
-typedef struct _IndexType {
-	int type;
-	int len;
-	int *value;
-} IndexType;
-
-typedef struct in_addr IPAddress;
-typedef struct sockaddr_in Address;
-
-
-/* Exported Functions */
-
-extern char *pdu_type_string(uchar_t type);
-extern char *asn1_type_string(uchar_t type);
-extern char *error_status_string(int status);
-extern char *generic_trap_string(int generic);
-extern char *SSAOidString(Oid *oid);
-extern char *timeval_string(struct timeval *tv);
-extern char *ip_address_string(IPAddress *ip_address);
-extern char *address_string(Address *address);
-
-/* Conversion Routines */
-extern char *SSAStringToChar(String str);
-extern Oid *SSAOidStrToOid(char *name, char *error_label);
-
-extern void SSAStringZero(String *string);
-extern int SSAStringInit(String *string, uchar_t *chars, int len,
-    char *error_label);
-extern int SSAStringCpy(String *string1, String *string2, char *error_label);
-
-extern Oid *SSAOidNew(void);
-extern void SSAOidZero(Oid *oid);
-extern void SSAOidFree(Oid *oid);
-extern int SSAOidInit(Oid *oid, Subid *subids, int len, char *error_label);
-extern int SSAOidCpy(Oid *oid1, Oid *oid2, char *error_label);
-extern Oid *SSAOidDup(Oid *oid, char *error_label);
-extern int SSAOidCmp(Oid *oid1, Oid *oid2);
-
-extern int name_to_ip_address(char *name, IPAddress *ip_address,
-    char *error_label);
-extern int get_my_ip_address(IPAddress *my_ip_address, char *error_label);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _IMPL_H */
--- a/usr/src/cmd/agents/snmp/snmplib/llib-lssasnmp	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/* LINTLIBRARY */
-/* PROTOLIB1 */
-
-/*
- * Strange as it seems, all of the public interfaces are in <impl.h>.
- */
-#include <impl.h>
--- a/usr/src/cmd/agents/snmp/snmplib/madman_api.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4479 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include "snmp_msg.h"
-#include "madman_api.h"
-
-/***** GLOBAL VARIABLES *****/
-
-/* SMTP */
-
-static Subid smtp_subids[] = { 1, 3, 6, 1, 2, 1, 27, 4, 25 };
-Oid smtp_name = { smtp_subids, 9 };
-char smtp_string[] = "1.3.6.1.2.1.27.4.25";
-
-/* P1 */
-
-static Subid id_ac_mts_transfer_subids[] = { 2, 6, 0, 1, 6 };
-Oid id_ac_mts_transfer_name = { id_ac_mts_transfer_subids, 5 };
-char id_ac_mts_transfer_string[] = "2.6.0.1.6";
-
-
-/* P3 */
-
-static Subid id_ac_mts_access_subids[] = { 2, 6, 0, 1, 0 };
-Oid id_ac_mts_access_name = { id_ac_mts_access_subids, 5 };
-
-static Subid id_ac_mts_forced_access_subids[] = { 2, 6, 0, 1, 1 };
-Oid id_ac_mts_forced_access_name = { id_ac_mts_forced_access_subids, 5 };
-
-static Subid id_ac_mts_reliable_access_subids[] = { 2, 6, 0, 1, 2 };
-Oid id_ac_mts_reliable_access_name = { id_ac_mts_reliable_access_subids, 5 };
-
-static Subid id_ac_mts_forced_reliable_access_subids[] = { 2, 6, 0, 1, 3 };
-Oid id_ac_mts_forced_reliable_access_name = { id_ac_mts_forced_reliable_access_subids, 5 };
-
-
-/* P7 */
-
-static Subid id_ac_ms_access_subids[] = { 2, 6, 0, 1, 4 };
-Oid id_ac_ms_access_name = { id_ac_ms_access_subids, 5 };
-
-static Subid id_ac_ms_reliable_access_subids[] = { 2, 6, 0, 1, 5 };
-Oid id_ac_ms_reliable_access_name = { id_ac_ms_reliable_access_subids, 5 };
-
-
-/***** LOCAL CONSTANTS *****/
-
-#define MAX_LABEL_LEN		50
-#define MAX_COLUMNS		30
-
-#define TO_INTEGER		1
-#define TO_STRING		2
-#define TO_ASCII		3
-#define TO_OID			4
-
-
-/***** LOCAL TYPES *****/
-
-typedef struct _SNMP_object {
-	char label[MAX_LABEL_LEN + 1];
-	Oid *name;
-	u_char type;
-	int translator;
-} SNMP_object;
-
-typedef struct _SNMP_column {
-	char label[MAX_LABEL_LEN + 1];
-	Oid *name;
-	u_char type;
-	int translator;
-} SNMP_column;
-
-typedef struct _SNMP_table {
-	int column_num;
-	SNMP_column *columns[MAX_COLUMNS];
-} SNMP_table;
-
-
-/***** LOCAL VARIABLES *****/
-
-
-/**********/
-/* MIB II */
-/**********/
-
-static Subid sysUpTime_subids[] = { 1, 3, 6, 1, 2, 1, 1, 3, 0 };
-static Oid sysUpTime_name = { sysUpTime_subids, 9 };
-
-static SNMP_object sysUpTime_object
-	= { "syUpTime", &sysUpTime_name, TIMETICKS, TO_INTEGER };
-
-
-/************/
-/* RFC 1565 */
-/************/
-
-static Subid applName_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 2 };
-static Oid applName_name = { applName_subids, 10 };
-
-static Subid applDirectoryName_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 3 };
-static Oid applDirectoryName_name = { applDirectoryName_subids, 10 };
-
-static Subid applVersion_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 4 };
-static Oid applVersion_name = { applVersion_subids, 10 };
-
-static Subid applUptime_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 5 };
-static Oid applUptime_name = { applUptime_subids, 10 };
-
-static Subid applOperStatus_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 6 };
-static Oid applOperStatus_name = { applOperStatus_subids, 10 };
-
-static Subid applLastChange_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 7 };
-static Oid applLastChange_name = { applLastChange_subids, 10 };
-
-static Subid applInboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 8 };
-static Oid applInboundAssociations_name = { applInboundAssociations_subids, 10 };
-
-static Subid applOutboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 9 };
-static Oid applOutboundAssociations_name = { applOutboundAssociations_subids, 10 };
-
-static Subid applAccumulatedInboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 10 };
-static Oid applAccumulatedInboundAssociations_name = { applAccumulatedInboundAssociations_subids, 10 };
-
-static Subid applAccumulatedOutboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 11 };
-static Oid applAccumulatedOutboundAssociations_name = { applAccumulatedOutboundAssociations_subids, 10 };
-
-static Subid applLastInboundActivity_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 12 };
-static Oid applLastInboundActivity_name = { applLastInboundActivity_subids, 10 };
-
-static Subid applLastOutboundActivity_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 13 };
-static Oid applLastOutboundActivity_name = { applLastOutboundActivity_subids, 10 };
-
-static Subid applRejectedInboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 14 };
-static Oid applRejectedInboundAssociations_name = { applRejectedInboundAssociations_subids, 10 };
-
-static Subid applFailedOutboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 15 };
-static Oid applFailedOutboundAssociations_name = { applFailedOutboundAssociations_subids, 10 };
-
-
-static SNMP_column applName_column
-	= { "applName", &applName_name, STRING, TO_ASCII };
-static SNMP_column applDirectoryName_column
-	= { "applDirecoryName", &applDirectoryName_name, STRING, TO_ASCII };
-static SNMP_column applVersion_column
-	= { "applVersion", &applVersion_name, STRING, TO_ASCII };
-static SNMP_column applUptime_column
-	= { "applUptime", &applUptime_name, TIMETICKS, TO_INTEGER };
-static SNMP_column applOperStatus_column
-	= { "applOperStatus", &applOperStatus_name, INTEGER, TO_INTEGER };
-static SNMP_column applLastChange_column
-	= { "applLastChange", &applLastChange_name, TIMETICKS, TO_INTEGER };
-static SNMP_column applInboundAssociations_column
-	= { "applInboundAssociations", &applInboundAssociations_name, GAUGE, TO_INTEGER };
-static SNMP_column applOutboundAssociations_column
-	= { "applOutboundAssociations", &applOutboundAssociations_name, GAUGE, TO_INTEGER };
-static SNMP_column applAccumulatedInboundAssociations_column
-	= { "applAccumulatedInboundAssociations", &applAccumulatedInboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column applAccumulatedOutboundAssociations_column
-	= { "applAccumulatedOutboundAssociations", &applAccumulatedOutboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column applLastInboundActivity_column
-	= { "applLastInboundActivity", &applLastInboundActivity_name, TIMETICKS, TO_INTEGER };
-static SNMP_column applLastOutboundActivity_column
-	= { "applLastOutboundActivity", &applLastOutboundActivity_name, TIMETICKS, TO_INTEGER };
-static SNMP_column applRejectedInboundAssociations_column
-	= { "applRejectedInboundAssociations", &applRejectedInboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column applFailedOutboundAssociations_column
-	= { "applFailedOutboundAssociations", &applFailedOutboundAssociations_name, COUNTER, TO_INTEGER };
-
-static SNMP_table applTable = {
-	14,
-	{
-		&applName_column,
-		&applDirectoryName_column,
-		&applVersion_column,
-		&applUptime_column,
-		&applOperStatus_column,
-		&applLastChange_column,
-		&applInboundAssociations_column,
-		&applOutboundAssociations_column,
-		&applAccumulatedInboundAssociations_column,
-		&applAccumulatedOutboundAssociations_column,
-		&applLastInboundActivity_column,
-		&applLastOutboundActivity_column,
-		&applRejectedInboundAssociations_column,
-		&applFailedOutboundAssociations_column
-	}
-};
-
-
-static Subid assocRemoteApplication_subids[] = { 1, 3, 6, 1, 2, 1, 27, 2, 1, 2 };
-static Oid assocRemoteApplication_name = { assocRemoteApplication_subids, 10 };
-
-static Subid assocApplicationProtocol_subids[] = { 1, 3, 6, 1, 2, 1, 27, 2, 1, 3 };
-static Oid assocApplicationProtocol_name = { assocApplicationProtocol_subids, 10 };
-
-static Subid assocApplicationType_subids[] = { 1, 3, 6, 1, 2, 1, 27, 2, 1, 4 };
-static Oid assocApplicationType_name = { assocApplicationType_subids, 10 };
-
-static Subid assocDuration_subids[] = { 1, 3, 6, 1, 2, 1, 27, 2, 1, 5 };
-static Oid assocDuration_name = { assocDuration_subids, 10 };
-
-static SNMP_column assocRemoteApplication_column
-	= { "assocRemoteApplication", &assocRemoteApplication_name, STRING, TO_ASCII };
-static SNMP_column assocApplicationProtocol_column
-	= { "assocApplicationProtocol", &assocApplicationProtocol_name, OBJID, TO_OID };
-static SNMP_column assocApplicationType_column
-	= { "assocApplicationType", &assocApplicationType_name, INTEGER, TO_INTEGER };
-static SNMP_column assocDuration_column
-	= { "assocDuration", &assocDuration_name, TIMETICKS, TO_INTEGER };
-
-static SNMP_table assocTable = {
-	4,
-	{
-		&assocRemoteApplication_column,
-		&assocApplicationProtocol_column,
-		&assocApplicationType_column,
-		&assocDuration_column,
-	}
-};
-
-
-/************/
-/* RFC 1566 */
-/************/
-
-static Subid mtaReceivedMessages_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 1 };
-static Oid mtaReceivedMessages_name = { mtaReceivedMessages_subids, 10 };
-
-static Subid mtaStoredMessages_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 2 };
-static Oid mtaStoredMessages_name = { mtaStoredMessages_subids, 10 };
-
-static Subid mtaTransmittedMessages_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 3 };
-static Oid mtaTransmittedMessages_name = { mtaTransmittedMessages_subids, 10 };
-
-static Subid mtaReceivedVolume_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 4 };
-static Oid mtaReceivedVolume_name = { mtaReceivedVolume_subids, 10 };
-
-static Subid mtaStoredVolume_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 5 };
-static Oid mtaStoredVolume_name = { mtaStoredVolume_subids, 10 };
-
-static Subid mtaTransmittedVolume_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 6 };
-static Oid mtaTransmittedVolume_name = { mtaTransmittedVolume_subids, 10 };
-
-static Subid mtaReceivedRecipients_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 7 };
-static Oid mtaReceivedRecipients_name = { mtaReceivedRecipients_subids, 10 };
-
-static Subid mtaStoredRecipients_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 8 };
-static Oid mtaStoredRecipients_name = { mtaStoredRecipients_subids, 10 };
-
-static Subid mtaTransmittedRecipients_subids[] = { 1, 3, 6, 1, 2, 1, 28, 1, 1, 9 };
-static Oid mtaTransmittedRecipients_name = { mtaTransmittedRecipients_subids, 10 };
-
-static SNMP_column mtaReceivedMessages_column
-	= { "mtaReceivedMessages", &mtaReceivedMessages_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaStoredMessages_column
-	= { "mtaStoredMessages", &mtaStoredMessages_name, GAUGE, TO_INTEGER };
-static SNMP_column mtaTransmittedMessages_column
-	= { "mtaTransmittedMessages", &mtaTransmittedMessages_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaReceivedVolume_column
-	= { "mtaReceivedVolume", &mtaReceivedVolume_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaStoredVolume_column
-	= { "mtaStoredVolume", &mtaStoredVolume_name, GAUGE, TO_INTEGER };
-static SNMP_column mtaTransmittedVolume_column
-	= { "mtaTransmittedVolume", &mtaTransmittedVolume_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaReceivedRecipients_column
-	= { "mtaReceivedRecipients", &mtaReceivedRecipients_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaStoredRecipients_column
-	= { "mtaStoredRecipients", &mtaStoredRecipients_name, GAUGE, TO_INTEGER };
-static SNMP_column mtaTransmittedRecipients_column
-	= { "mtaTransmittedRecipients", &mtaTransmittedRecipients_name, COUNTER, TO_INTEGER };
-
-static SNMP_table mtaTable = {
-	9,
-	{
-		&mtaReceivedMessages_column,
-		&mtaStoredMessages_column,
-		&mtaTransmittedMessages_column,
-		&mtaReceivedVolume_column,
-		&mtaStoredVolume_column,
-		&mtaTransmittedVolume_column,
-		&mtaReceivedRecipients_column,
-		&mtaStoredRecipients_column,
-		&mtaTransmittedRecipients_column
-	}
-};
-
-
-static Subid mtaGroupReceivedMessages_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 2 };
-static Oid mtaGroupReceivedMessages_name = { mtaGroupReceivedMessages_subids, 10 };
-
-static Subid mtaGroupRejectedMessages_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 3 };
-static Oid mtaGroupRejectedMessages_name = { mtaGroupRejectedMessages_subids, 10 };
-
-static Subid mtaGroupStoredMessages_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 4 };
-static Oid mtaGroupStoredMessages_name = { mtaGroupStoredMessages_subids, 10 };
-
-static Subid mtaGroupTransmittedMessages_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 5 };
-static Oid mtaGroupTransmittedMessages_name = { mtaGroupTransmittedMessages_subids, 10 };
-
-static Subid mtaGroupReceivedVolume_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 6 };
-static Oid mtaGroupReceivedVolume_name = { mtaGroupReceivedVolume_subids, 10 };
-
-static Subid mtaGroupStoredVolume_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 7 };
-static Oid mtaGroupStoredVolume_name = { mtaGroupStoredVolume_subids, 10 };
-
-static Subid mtaGroupTransmittedVolume_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 8 };
-static Oid mtaGroupTransmittedVolume_name = { mtaGroupTransmittedVolume_subids, 10 };
-
-static Subid mtaGroupReceivedRecipients_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 9 };
-static Oid mtaGroupReceivedRecipients_name = { mtaGroupReceivedRecipients_subids, 10 };
-
-static Subid mtaGroupStoredRecipients_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 10 };
-static Oid mtaGroupStoredRecipients_name = { mtaGroupStoredRecipients_subids, 10 };
-
-static Subid mtaGroupTransmittedRecipients_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 11 };
-static Oid mtaGroupTransmittedRecipients_name = { mtaGroupTransmittedRecipients_subids, 10 };
-
-static Subid mtaGroupOldestMessageStored_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 12 };
-static Oid mtaGroupOldestMessageStored_name = { mtaGroupOldestMessageStored_subids, 10 };
-
-static Subid mtaGroupInboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 13 };
-static Oid mtaGroupInboundAssociations_name = { mtaGroupInboundAssociations_subids, 10 };
-
-static Subid mtaGroupOutboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 14 };
-static Oid mtaGroupOutboundAssociations_name = { mtaGroupOutboundAssociations_subids, 10 };
-
-static Subid mtaGroupAccumulatedInboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 15 };
-static Oid mtaGroupAccumulatedInboundAssociations_name = { mtaGroupAccumulatedInboundAssociations_subids, 10 };
-
-static Subid mtaGroupAccumulatedOutboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 16 };
-static Oid mtaGroupAccumulatedOutboundAssociations_name = { mtaGroupAccumulatedOutboundAssociations_subids, 10 };
-
-static Subid mtaGroupLastInboundActivity_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 17 };
-static Oid mtaGroupLastInboundActivity_name = { mtaGroupLastInboundActivity_subids, 10 };
-
-static Subid mtaGroupLastOutboundActivity_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 18 };
-static Oid mtaGroupLastOutboundActivity_name = { mtaGroupLastOutboundActivity_subids, 10 };
-
-static Subid mtaGroupRejectedInboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 19 };
-static Oid mtaGroupRejectedInboundAssociations_name = { mtaGroupRejectedInboundAssociations_subids, 10 };
-
-static Subid mtaGroupFailedOutboundAssociations_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 20 };
-static Oid mtaGroupFailedOutboundAssociations_name = { mtaGroupFailedOutboundAssociations_subids, 10 };
-
-static Subid mtaGroupInboundRejectionReason_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 21 };
-static Oid mtaGroupInboundRejectionReason_name = { mtaGroupInboundRejectionReason_subids, 10 };
-
-static Subid mtaGroupOutboundConnectFailureReason_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 22 };
-static Oid mtaGroupOutboundConnectFailureReason_name = { mtaGroupOutboundConnectFailureReason_subids, 10 };
-
-static Subid mtaGroupScheduledRetry_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 23 };
-static Oid mtaGroupScheduledRetry_name = { mtaGroupScheduledRetry_subids, 10 };
-
-static Subid mtaGroupMailProtocol_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 24 };
-static Oid mtaGroupMailProtocol_name = { mtaGroupMailProtocol_subids, 10 };
-
-static Subid mtaGroupName_subids[] = { 1, 3, 6, 1, 2, 1, 28, 2, 1, 25 };
-static Oid mtaGroupName_name = { mtaGroupName_subids, 10 };
-
-static SNMP_column mtaGroupReceivedMessages_column
-	= { "mtaGroupReceivedMessages", &mtaGroupReceivedMessages_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupRejectedMessages_column
-	= { "mtaGroupRejectedMessages", &mtaGroupRejectedMessages_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupStoredMessages_column
-	= { "mtaGroupStoredMessages", &mtaGroupStoredMessages_name, GAUGE, TO_INTEGER };
-static SNMP_column mtaGroupTransmittedMessages_column
-	= { "mtaGroupTransmittedMessages", &mtaGroupTransmittedMessages_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupReceivedVolume_column
-	= { "mtaGroupReceivedVolume", &mtaGroupReceivedVolume_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupStoredVolume_column
-	= { "mtaGroupStoredVolume", &mtaGroupStoredVolume_name, GAUGE, TO_INTEGER };
-static SNMP_column mtaGroupTransmittedVolume_column
-	= { "mtaGroupTransmittedVolume", &mtaGroupTransmittedVolume_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupReceivedRecipients_column
-	= { "mtaGroupReceivedRecipients", &mtaGroupReceivedRecipients_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupStoredRecipients_column
-	= { "mtaGroupStoredRecipients", &mtaGroupStoredRecipients_name, GAUGE, TO_INTEGER };
-static SNMP_column mtaGroupTransmittedRecipients_column
-	= { "mtaGroupTransmittedRecipients", &mtaGroupTransmittedRecipients_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupOldestMessageStored_column
-	= { "mtaGroupOldestMessageStored", &mtaGroupOldestMessageStored_name, INTEGER, TO_INTEGER };
-static SNMP_column mtaGroupInboundAssociations_column
-	= { "mtaGroupInboundAssociations", &mtaGroupInboundAssociations_name, GAUGE, TO_INTEGER };
-static SNMP_column mtaGroupOutboundAssociations_column
-	= { "mtaGroupOutboundAssociations", &mtaGroupOutboundAssociations_name, GAUGE, TO_INTEGER };
-static SNMP_column mtaGroupAccumulatedInboundAssociations_column
-	= { "mtaGroupAccumulatedInboundAssociations", &mtaGroupAccumulatedInboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupAccumulatedOutboundAssociations_column
-	= { "mtaGroupAccumulatedOutboundAssociations", &mtaGroupAccumulatedOutboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupLastInboundActivity_column
-	= { "mtaGroupLastInboundActivity", &mtaGroupLastInboundActivity_name, INTEGER, TO_INTEGER };
-static SNMP_column mtaGroupLastOutboundActivity_column
-	= { "mtaGroupLastOutboundActivity", &mtaGroupLastOutboundActivity_name, INTEGER, TO_INTEGER };
-static SNMP_column mtaGroupRejectedInboundAssociations_column
-	= { "mtaGroupRejectedInboundAssociations", &mtaGroupRejectedInboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupFailedOutboundAssociations_column
-	= { "mtaGroupFailedOutboundAssociations", &mtaGroupFailedOutboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column mtaGroupInboundRejectionReason_column
-	= { "mtaGroupInboundRejectionReason", &mtaGroupInboundRejectionReason_name, STRING, TO_ASCII };
-static SNMP_column mtaGroupOutboundConnectFailureReason_column
-	= { "mtaGroupOutboundConnectFailureReason", &mtaGroupOutboundConnectFailureReason_name, STRING, TO_ASCII };
-static SNMP_column mtaGroupScheduledRetry_column
-	= { "mtaGroupScheduledRetry", &mtaGroupScheduledRetry_name, INTEGER, TO_INTEGER };
-static SNMP_column mtaGroupMailProtocol_column
-	= { "mtaGroupMailProtocol", &mtaGroupMailProtocol_name, OBJID, TO_OID };
-static SNMP_column mtaGroupName_column
-	= { "mtaGroupName", &mtaGroupName_name, STRING, TO_ASCII };
-
-
-static SNMP_table mtaGroupTable = {
-	24,
-	{
-		&mtaGroupReceivedMessages_column,
-		&mtaGroupRejectedMessages_column,
-		&mtaGroupStoredMessages_column,
-		&mtaGroupTransmittedMessages_column,
-		&mtaGroupReceivedVolume_column,
-		&mtaGroupStoredVolume_column,
-		&mtaGroupTransmittedVolume_column,
-		&mtaGroupReceivedRecipients_column,
-		&mtaGroupStoredRecipients_column,
-		&mtaGroupTransmittedRecipients_column,
-		&mtaGroupOldestMessageStored_column,
-		&mtaGroupInboundAssociations_column,
-		&mtaGroupOutboundAssociations_column,
-		&mtaGroupAccumulatedInboundAssociations_column,
-		&mtaGroupAccumulatedOutboundAssociations_column,
-		&mtaGroupLastInboundActivity_column,
-		&mtaGroupLastOutboundActivity_column,
-		&mtaGroupRejectedInboundAssociations_column,
-		&mtaGroupFailedOutboundAssociations_column,
-		&mtaGroupInboundRejectionReason_column,
-		&mtaGroupOutboundConnectFailureReason_column,
-		&mtaGroupScheduledRetry_column,
-		&mtaGroupMailProtocol_column,
-		&mtaGroupName_column
-	}
-};
-
-
-static Subid mtaGroupAssociationIndex_subids[] = { 1, 3, 6, 1, 2, 1, 28, 3, 1, 1 };
-static Oid mtaGroupAssociationIndex_name = { mtaGroupAssociationIndex_subids, 10 };
-
-static SNMP_column mtaGroupAssociationIndex_column
-	= { "mtaGroupAssociationIndex", &mtaGroupAssociationIndex_name, INTEGER, TO_INTEGER };
-
-static SNMP_table mtaGroupAssociationTable = {
-	1,
-	{
-		&mtaGroupAssociationIndex_column
-	}
-};
-
-
-/************/
-/* RFC 1567 */
-/************/
-
-static Subid dsaAnonymousBinds_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 1 };
-static Oid dsaAnonymousBinds_name = { dsaAnonymousBinds_subids, 10 };
-static Subid dsaUnauthBinds_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 2 };
-static Oid dsaUnauthBinds_name = { dsaUnauthBinds_subids, 10 };
-static Subid dsaSimpleAuthBinds_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 3 };
-static Oid dsaSimpleAuthBinds_name = { dsaSimpleAuthBinds_subids, 10 };
-static Subid dsaStrongAuthBinds_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 4 };
-static Oid dsaStrongAuthBinds_name = { dsaStrongAuthBinds_subids, 10 };
-static Subid dsaBindSecurityErrors_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 5 };
-static Oid dsaBindSecurityErrors_name = { dsaBindSecurityErrors_subids, 10 };
-static Subid dsaInOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 6 };
-static Oid dsaInOps_name = { dsaInOps_subids, 10 };
-static Subid dsaReadOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 7 };
-static Oid dsaReadOps_name = { dsaReadOps_subids, 10 };
-static Subid dsaCompareOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 8 };
-static Oid dsaCompareOps_name = { dsaCompareOps_subids, 10 };
-static Subid dsaAddEntryOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 9 };
-static Oid dsaAddEntryOps_name = { dsaAddEntryOps_subids, 10 };
-static Subid dsaRemoveEntryOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 10 };
-static Oid dsaRemoveEntryOps_name = { dsaRemoveEntryOps_subids, 10 };
-static Subid dsaModifyEntryOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 11 };
-static Oid dsaModifyEntryOps_name = { dsaModifyEntryOps_subids, 10 };
-static Subid dsaModifyRDNOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 12 };
-static Oid dsaModifyRDNOps_name = { dsaModifyRDNOps_subids, 10 };
-static Subid dsaListOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 13 };
-static Oid dsaListOps_name = { dsaListOps_subids, 10 };
-static Subid dsaSearchOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 14 };
-static Oid dsaSearchOps_name = { dsaSearchOps_subids, 10 };
-static Subid dsaOneLevelSearchOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 15 };
-static Oid dsaOneLevelSearchOps_name = { dsaOneLevelSearchOps_subids, 10 };
-static Subid dsaWholeTreeSearchOps_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 16 };
-static Oid dsaWholeTreeSearchOps_name = { dsaWholeTreeSearchOps_subids, 10 };
-static Subid dsaReferrals_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 17 };
-static Oid dsaReferrals_name = { dsaReferrals_subids, 10 };
-static Subid dsaChainings_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 18 };
-static Oid dsaChainings_name = { dsaChainings_subids, 10 };
-static Subid dsaSecurityErrors_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 19 };
-static Oid dsaSecurityErrors_name = { dsaSecurityErrors_subids, 10 };
-static Subid dsaErrors_subids[] = { 1, 3, 6, 1, 2, 1, 29, 1, 1, 20 };
-static Oid dsaErrors_name = { dsaErrors_subids, 10 };
-
-static SNMP_column dsaAnonymousBinds_column
-	= { "dsaAnonymousBinds", &dsaAnonymousBinds_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaUnauthBinds_column
-	= { "dsaUnauthBinds", &dsaUnauthBinds_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaSimpleAuthBinds_column
-	= { "dsaSimpleAuthBinds", &dsaSimpleAuthBinds_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaStrongAuthBinds_column
-	= { "dsaStrongAuthBinds", &dsaStrongAuthBinds_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaBindSecurityErrors_column
-	= { "dsaBindSecurityErrors", &dsaBindSecurityErrors_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaInOps_column
-	= { "dsaInOps", &dsaInOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaReadOps_column
-	= { "dsaReadOps", &dsaReadOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaCompareOps_column
-	= { "dsaCompareOps", &dsaCompareOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaAddEntryOps_column
-	= { "dsaAddEntryOps", &dsaAddEntryOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaRemoveEntryOps_column
-	= { "dsaRemoveEntryOps", &dsaRemoveEntryOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaModifyEntryOps_column
-	= { "dsaModifyEntryOps", &dsaModifyEntryOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaModifyRDNOps_column
-	= { "dsaModifyRDNOps", &dsaModifyRDNOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaListOps_column
-	= { "dsaListOps", &dsaListOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaSearchOps_column
-	= { "dsaSearchOps", &dsaSearchOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaOneLevelSearchOps_column
-	= { "dsaOneLevelSearchOps", &dsaOneLevelSearchOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaWholeTreeSearchOps_column
-	= { "dsaWholeTreeSearchOps", &dsaWholeTreeSearchOps_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaReferrals_column
-	= { "dsaReferrals", &dsaReferrals_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaChainings_column
-	= { "dsaChainings", &dsaChainings_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaSecurityErrors_column
-	= { "dsaSecurityErrors", &dsaSecurityErrors_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaErrors_column
-	= { "dsaErrors", &dsaErrors_name, COUNTER, TO_INTEGER };
-
-static SNMP_table dsaOpsTable = {
-	20,
-	{
-		&dsaAnonymousBinds_column,
-		&dsaUnauthBinds_column,
-		&dsaSimpleAuthBinds_column,
-		&dsaStrongAuthBinds_column,
-		&dsaBindSecurityErrors_column,
-		&dsaInOps_column,
-		&dsaReadOps_column,
-		&dsaCompareOps_column,
-		&dsaAddEntryOps_column,
-		&dsaRemoveEntryOps_column,
-		&dsaModifyEntryOps_column,
-		&dsaModifyRDNOps_column,
-		&dsaListOps_column,
-		&dsaSearchOps_column,
-		&dsaOneLevelSearchOps_column,
-		&dsaWholeTreeSearchOps_column,
-		&dsaReferrals_column,
-		&dsaChainings_column,
-		&dsaSecurityErrors_column,
-		&dsaErrors_column
-	}
-};
-
-
-static Subid dsaMasterEntries_subids[] = { 1, 3, 6, 1, 2, 1, 29, 2, 1, 1 };
-static Oid dsaMasterEntries_name = { dsaMasterEntries_subids, 10 };
-static Subid dsaCopyEntries_subids[] = { 1, 3, 6, 1, 2, 1, 29, 2, 1, 2 };
-static Oid dsaCopyEntries_name = { dsaCopyEntries_subids, 10 };
-static Subid dsaCacheEntries_subids[] = { 1, 3, 6, 1, 2, 1, 29, 2, 1, 3 };
-static Oid dsaCacheEntries_name = { dsaCacheEntries_subids, 10 };
-static Subid dsaCacheHits_subids[] = { 1, 3, 6, 1, 2, 1, 29, 2, 1, 4 };
-static Oid dsaCacheHits_name = { dsaCacheHits_subids, 10 };
-static Subid dsaSlaveHits_subids[] = { 1, 3, 6, 1, 2, 1, 29, 2, 1, 5 };
-static Oid dsaSlaveHits_name = { dsaSlaveHits_subids, 10 };
-
-static SNMP_column dsaMasterEntries_column
-	= { "dsaMasterEntries", &dsaMasterEntries_name, GAUGE, TO_INTEGER };
-static SNMP_column dsaCopyEntries_column
-	= { "dsaCopyEntries", &dsaCopyEntries_name, GAUGE, TO_INTEGER };
-static SNMP_column dsaCacheEntries_column
-	= { "dsaCacheEntries", &dsaCacheEntries_name, GAUGE, TO_INTEGER };
-static SNMP_column dsaCacheHits_column
-	= { "dsaCacheHits", &dsaCacheHits_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaSlaveHits_column
-	= { "dsaSlaveHits", &dsaSlaveHits_name, COUNTER, TO_INTEGER };
-
-static SNMP_table dsaEntriesTable = {
-	5,
-	{
-		&dsaMasterEntries_column,
-		&dsaCopyEntries_column,
-		&dsaCacheEntries_column,
-		&dsaCacheHits_column,
-		&dsaSlaveHits_column
-	}
-};
-
-
-static Subid dsaName_subids[] = { 1, 3, 6, 1, 2, 1, 29, 3, 1, 2 };
-static Oid dsaName_name = { dsaName_subids, 10 };
-static Subid dsaTimeOfCreation_subids[] = { 1, 3, 6, 1, 2, 1, 29, 3, 1, 3 };
-static Oid dsaTimeOfCreation_name = { dsaTimeOfCreation_subids, 10 };
-static Subid dsaTimeOfLastAttempt_subids[] = { 1, 3, 6, 1, 2, 1, 29, 3, 1, 4 };
-static Oid dsaTimeOfLastAttempt_name = { dsaTimeOfLastAttempt_subids, 10 };
-static Subid dsaTimeOfLastSuccess_subids[] = { 1, 3, 6, 1, 2, 1, 29, 3, 1, 5 };
-static Oid dsaTimeOfLastSuccess_name = { dsaTimeOfLastSuccess_subids, 10 };
-static Subid dsaFailuresSinceLastSuccess_subids[] = { 1, 3, 6, 1, 2, 1, 29, 3, 1, 6 };
-static Oid dsaFailuresSinceLastSuccess_name = { dsaFailuresSinceLastSuccess_subids, 10 };
-static Subid dsaFailures_subids[] = { 1, 3, 6, 1, 2, 1, 29, 3, 1, 7 };
-static Oid dsaFailures_name = { dsaFailures_subids, 10 };
-static Subid dsaSuccesses_subids[] = { 1, 3, 6, 1, 2, 1, 29, 3, 1, 8 };
-static Oid dsaSuccesses_name = { dsaSuccesses_subids, 10 };
-
-static SNMP_column dsaName_column
-	= { "dsaName", &dsaName_name, STRING, TO_ASCII };
-static SNMP_column dsaTimeOfCreation_column
-	= { "dsaTimeOfCreation", &dsaTimeOfCreation_name, TIMETICKS, TO_INTEGER };
-static SNMP_column dsaTimeOfLastAttempt_column
-	= { "dsaTimeOfLastAttempt", &dsaTimeOfLastAttempt_name, TIMETICKS, TO_INTEGER };
-static SNMP_column dsaTimeOfLastSuccess_column
-	= { "dsaTimeOfLastSuccess", &dsaTimeOfLastSuccess_name, TIMETICKS, TO_INTEGER };
-static SNMP_column dsaFailuresSinceLastSuccess_column
-	= { "dsaFailuresSinceLastSuccess", &dsaFailuresSinceLastSuccess_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaFailures_column
-	= { "dsaFailures", &dsaFailures_name, COUNTER, TO_INTEGER };
-static SNMP_column dsaSuccesses_column
-	= { "dsaSuccesses", &dsaSuccesses_name, COUNTER, TO_INTEGER };
-
-static SNMP_table dsaIntTable = {
-	7,
-	{
-		&dsaName_column,
-		&dsaTimeOfCreation_column,
-		&dsaTimeOfLastAttempt_column,
-		&dsaTimeOfLastSuccess_column,
-		&dsaFailuresSinceLastSuccess_column,
-		&dsaFailures_column,
-		&dsaSuccesses_column
-	}
-};
-
-
-/************/
-/* X4MS MIB */
-/************/
-
-static Subid x4msMtaName_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 1, 1, 2 };
-static Oid x4msMtaName_name = { x4msMtaName_subids, 14 };
-
-static SNMP_column x4msMtaName_column
-	= { "x4msMtaName", &x4msMtaName_name, STRING, TO_ASCII };
-
-static SNMP_table x4msMtaTable = {
-	1,
-	{
-		&x4msMtaName_column
-	}
-};
-
-
-static Subid x4msUserTotalMessages_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 2, 1, 2 };
-static Oid x4msUserTotalMessages_name = { x4msUserTotalMessages_subids, 14 };
-
-static Subid x4msUserTotalVolume_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 2, 1, 3 };
-static Oid x4msUserTotalVolume_name = { x4msUserTotalVolume_subids, 14 };
-
-static Subid x4msUserP3Associations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 2, 1, 4 };
-static Oid x4msUserP3Associations_name = { x4msUserP3Associations_subids, 14 };
-
-static Subid x4msUserP7Associations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 2, 1, 5 };
-static Oid x4msUserP7Associations_name = { x4msUserP7Associations_subids, 14 };
-
-static Subid x4msUserLastP7Association_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 2, 1, 6 };
-static Oid x4msUserLastP7Association_name = { x4msUserLastP7Association_subids, 14 };
-
-static Subid x4msUserAuthentificationFailures_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 2, 1, 7 };
-static Oid x4msUserAuthentificationFailures_name = { x4msUserAuthentificationFailures_subids, 14 };
-
-static Subid x4msUserAuthentificationFailureReason_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 2, 1, 8 };
-static Oid x4msUserAuthentificationFailureReason_name = { x4msUserAuthentificationFailureReason_subids, 14 };
-
-static Subid x4msUserName_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 2, 1, 9 };
-static Oid x4msUserName_name = { x4msUserName_subids, 14 };
-
-static SNMP_column x4msUserTotalMessages_column
-	= { "x4msUserTotalMessages", &x4msUserTotalMessages_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserTotalVolume_column
-	= { "x4msUserTotalVolume", &x4msUserTotalVolume_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserP3Associations_column
-	= { "x4msUserP3Associations", &x4msUserP3Associations_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserP7Associations_column
-	= { "x4msUserP7Associations", &x4msUserP7Associations_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserLastP7Association_column
-	= { "x4msUserLastP7Association", &x4msUserLastP7Association_name, INTEGER, TO_INTEGER };
-static SNMP_column x4msUserAuthentificationFailures_column
-	= { "x4msUserAuthentificationFailures", &x4msUserAuthentificationFailures_name, COUNTER, TO_INTEGER };
-static SNMP_column x4msUserAuthentificationFailureReason_column
-	= { "x4msUserAuthentificationFailureReason", &x4msUserAuthentificationFailureReason_name, STRING, TO_ASCII };
-static SNMP_column x4msUserName_column
-	= { "x4msUserName", &x4msUserName_name, STRING, TO_ASCII };
-
-static SNMP_table x4msUserTablePart1 = {
-	8,
-	{
-		&x4msUserTotalMessages_column,
-		&x4msUserTotalVolume_column,
-		&x4msUserP3Associations_column,
-		&x4msUserP7Associations_column,
-		&x4msUserLastP7Association_column,
-		&x4msUserAuthentificationFailures_column,
-		&x4msUserAuthentificationFailureReason_column,
-		&x4msUserName_column
-	}
-};
-
-
-static Subid x4msUserNewMessages_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 1 };
-static Oid x4msUserNewMessages_name = { x4msUserNewMessages_subids, 14 };
-
-static Subid x4msUserNewVolume_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 2 };
-static Oid x4msUserNewVolume_name = { x4msUserNewVolume_subids, 14 };
-
-static Subid x4msUserListedMessages_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 3 };
-static Oid x4msUserListedMessages_name = { x4msUserListedMessages_subids, 14 };
-
-static Subid x4msUserListedVolume_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 4 };
-static Oid x4msUserListedVolume_name = { x4msUserListedVolume_subids, 14 };
-
-static Subid x4msUserProcessedMessages_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 5 };
-static Oid x4msUserProcessedMessages_name = { x4msUserProcessedMessages_subids, 14 };
-
-static Subid x4msUserProcessedVolume_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 6 };
-static Oid x4msUserProcessedVolume_name = { x4msUserProcessedVolume_subids, 14 };
-
-static Subid x4msUserMessagesOlderThanWeek_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 7 };
-static Oid x4msUserMessagesOlderThanWeek_name = { x4msUserMessagesOlderThanWeek_subids, 14 };
-
-static Subid x4msUserVolumeOlderThanWeek_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 8 };
-static Oid x4msUserVolumeOlderThanWeek_name = { x4msUserVolumeOlderThanWeek_subids, 14 };
-
-static Subid x4msUserMessagesOlderThanMonth_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 9 };
-static Oid x4msUserMessagesOlderThanMonth_name = { x4msUserMessagesOlderThanMonth_subids, 14 };
-
-static Subid x4msUserVolumeOlderThanMonth_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 10 };
-static Oid x4msUserVolumeOlderThanMonth_name = { x4msUserVolumeOlderThanMonth_subids, 14 };
-
-static Subid x4msUserMessagesOlderThanYear_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 11 };
-static Oid x4msUserMessagesOlderThanYear_name = { x4msUserMessagesOlderThanYear_subids, 14 };
-
-static Subid x4msUserVolumeOlderThanYear_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 12 };
-static Oid x4msUserVolumeOlderThanYear_name = { x4msUserVolumeOlderThanYear_subids, 14 };
-
-static Subid x4msUserP3InboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 13 };
-static Oid x4msUserP3InboundAssociations_name = { x4msUserP3InboundAssociations_subids, 14 };
-
-static Subid x4msUserP7InboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 14 };
-static Oid x4msUserP7InboundAssociations_name = { x4msUserP7InboundAssociations_subids, 14 };
-
-static Subid x4msUserP3OutboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 15 };
-static Oid x4msUserP3OutboundAssociations_name = { x4msUserP3OutboundAssociations_subids, 14 };
-
-static Subid x4msUserAccumulatedP3InboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 16 };
-static Oid x4msUserAccumulatedP3InboundAssociations_name = { x4msUserAccumulatedP3InboundAssociations_subids, 14 };
-
-static Subid x4msUserAccumulatedP7InboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 17 };
-static Oid x4msUserAccumulatedP7InboundAssociations_name = { x4msUserAccumulatedP7InboundAssociations_subids, 14 };
-
-static Subid x4msUserAccumulatedP3OutboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 18 };
-static Oid x4msUserAccumulatedP3OutboundAssociations_name = { x4msUserAccumulatedP3OutboundAssociations_subids, 14 };
-
-static Subid x4msUserLastP3InboundActivity_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 19 };
-static Oid x4msUserLastP3InboundActivity_name = { x4msUserLastP3InboundActivity_subids, 14 };
-
-static Subid x4msUserLastP7InboundActivity_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 20 };
-static Oid x4msUserLastP7InboundActivity_name = { x4msUserLastP7InboundActivity_subids, 14 };
-
-static Subid x4msUserLastP3OutboundActivity_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 21 };
-static Oid x4msUserLastP3OutboundActivity_name = { x4msUserLastP3OutboundActivity_subids, 14 };
-
-static Subid x4msUserRejectedP3InboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 22 };
-static Oid x4msUserRejectedP3InboundAssociations_name = { x4msUserRejectedP3InboundAssociations_subids, 14 };
-
-static Subid x4msUserRejectedP7InboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 23 };
-static Oid x4msUserRejectedP7InboundAssociations_name = { x4msUserRejectedP7InboundAssociations_subids, 14 };
-
-static Subid x4msUserFailedP3OutboundAssociations_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 24 };
-static Oid x4msUserFailedP3OutboundAssociations_name = { x4msUserFailedP3OutboundAssociations_subids, 14 };
-
-static Subid x4msUserP3InboundRejectionReason_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 25 };
-static Oid x4msUserP3InboundRejectionReason_name = { x4msUserP3InboundRejectionReason_subids, 14 };
-
-static Subid x4msUserP7InboundRejectionReason_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 26 };
-static Oid x4msUserP7InboundRejectionReason_name = { x4msUserP7InboundRejectionReason_subids, 14 };
-
-static Subid x4msUserP3OutboundConnectFailureReason_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 27 };
-static Oid x4msUserP3OutboundConnectFailureReason_name = { x4msUserP3OutboundConnectFailureReason_subids, 14 };
-
-static Subid x4msUserMtaIndex_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 28 };
-static Oid x4msUserMtaIndex_name = { x4msUserMtaIndex_subids, 14 };
-
-static Subid x4msUserORName_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 3, 1, 29 };
-static Oid x4msUserORName_name = { x4msUserORName_subids, 14 };
-
-static SNMP_column x4msUserNewMessages_column
-	= { "x4msUserNewMessages", &x4msUserNewMessages_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserNewVolume_column
-	= { "x4msUserNewVolume", &x4msUserNewVolume_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserListedMessages_column
-	= { "x4msUserListedMessages", &x4msUserListedMessages_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserListedVolume_column
-	= { "x4msUserListedVolume", &x4msUserListedVolume_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserProcessedMessages_column
-	= { "x4msUserProcessedMessages", &x4msUserProcessedMessages_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserProcessedVolume_column
-	= { "x4msUserProcessedVolume", &x4msUserProcessedVolume_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserMessagesOlderThanWeek_column
-	= { "x4msUserMessagesOlderThanWeek", &x4msUserMessagesOlderThanWeek_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserVolumeOlderThanWeek_column
-	= { "x4msUserVolumeOlderThanWeek", &x4msUserVolumeOlderThanWeek_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserMessagesOlderThanMonth_column
-	= { "x4msUserMessagesOlderThanMonth", &x4msUserMessagesOlderThanMonth_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserVolumeOlderThanMonth_column
-	= { "x4msUserVolumeOlderThanMonth", &x4msUserVolumeOlderThanMonth_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserMessagesOlderThanYear_column
-	= { "x4msUserMessagesOlderThanYear", &x4msUserMessagesOlderThanYear_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserVolumeOlderThanYear_column
-	= { "x4msUserVolumeOlderThanYear", &x4msUserVolumeOlderThanYear_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserP3InboundAssociations_column
-	= { "x4msUserP3InboundAssociations", &x4msUserP3InboundAssociations_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserP7InboundAssociations_column
-	= { "x4msUserP7InboundAssociations", &x4msUserP7InboundAssociations_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserP3OutboundAssociations_column
-	= { "x4msUserP3OutboundAssociations", &x4msUserP3OutboundAssociations_name, GAUGE, TO_INTEGER };
-static SNMP_column x4msUserAccumulatedP3InboundAssociations_column
-	= { "x4msUserAccumulatedP3InboundAssociations", &x4msUserAccumulatedP3InboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column x4msUserAccumulatedP7InboundAssociations_column
-	= { "x4msUserAccumulatedP7InboundAssociations", &x4msUserAccumulatedP7InboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column x4msUserAccumulatedP3OutboundAssociations_column
-	= { "x4msUserAccumulatedP3OutboundAssociations", &x4msUserAccumulatedP3OutboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column x4msUserLastP3InboundActivity_column
-	= { "x4msUserLastP3InboundActivity", &x4msUserLastP3InboundActivity_name, INTEGER, TO_INTEGER };
-static SNMP_column x4msUserLastP7InboundActivity_column
-	= { "x4msUserLastP7InboundActivity", &x4msUserLastP7InboundActivity_name, INTEGER, TO_INTEGER };
-static SNMP_column x4msUserLastP3OutboundActivity_column
-	= { "x4msUserLastP3OutboundActivity", &x4msUserLastP3OutboundActivity_name, INTEGER, TO_INTEGER };
-static SNMP_column x4msUserRejectedP3InboundAssociations_column
-	= { "x4msUserRejectedP3InboundAssociations", &x4msUserRejectedP3InboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column x4msUserRejectedP7InboundAssociations_column
-	= { "x4msUserRejectedP7InboundAssociations", &x4msUserRejectedP7InboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column x4msUserFailedP3OutboundAssociations_column
-	= { "x4msUserFailedP3OutboundAssociations", &x4msUserFailedP3OutboundAssociations_name, COUNTER, TO_INTEGER };
-static SNMP_column x4msUserP3InboundRejectionReason_column
-	= { "x4msUserP3InboundRejectionReason", &x4msUserP3InboundRejectionReason_name, STRING, TO_ASCII };
-static SNMP_column x4msUserP7InboundRejectionReason_column
-	= { "x4msUserP7InboundRejectionReason", &x4msUserP7InboundRejectionReason_name, STRING, TO_ASCII };
-static SNMP_column x4msUserP3OutboundConnectFailureReason_column
-	= { "x4msUserP3OutboundConnectFailureReason", &x4msUserP3OutboundConnectFailureReason_name, STRING, TO_ASCII };
-static SNMP_column x4msUserMtaIndex_column
-	= { "x4msUserMtaIndex", &x4msUserMtaIndex_name, INTEGER, TO_INTEGER };
-static SNMP_column x4msUserORName_column
-	= { "x4msUserORName", &x4msUserORName_name, STRING, TO_ASCII };
-
-static SNMP_table x4msUserTablePart2 = {
-	29,
-	{
-		&x4msUserNewMessages_column,
-		&x4msUserNewVolume_column,
-		&x4msUserListedMessages_column,
-		&x4msUserListedVolume_column,
-		&x4msUserProcessedMessages_column,
-		&x4msUserProcessedVolume_column,
-		&x4msUserMessagesOlderThanWeek_column,
-		&x4msUserVolumeOlderThanWeek_column,
-		&x4msUserMessagesOlderThanMonth_column,
-		&x4msUserVolumeOlderThanMonth_column,
-		&x4msUserMessagesOlderThanYear_column,
-		&x4msUserVolumeOlderThanYear_column,
-		&x4msUserP3InboundAssociations_column,
-		&x4msUserP7InboundAssociations_column,
-		&x4msUserP3OutboundAssociations_column,
-		&x4msUserAccumulatedP3InboundAssociations_column,
-		&x4msUserAccumulatedP7InboundAssociations_column,
-		&x4msUserAccumulatedP3OutboundAssociations_column,
-		&x4msUserLastP3InboundActivity_column,
-		&x4msUserLastP7InboundActivity_column,
-		&x4msUserLastP3OutboundActivity_column,
-		&x4msUserRejectedP3InboundAssociations_column,
-		&x4msUserRejectedP7InboundAssociations_column,
-		&x4msUserFailedP3OutboundAssociations_column,
-		&x4msUserP3InboundRejectionReason_column,
-		&x4msUserP7InboundRejectionReason_column,
-		&x4msUserP3OutboundConnectFailureReason_column,
-		&x4msUserMtaIndex_column,
-		&x4msUserORName_column
-	}
-};
-
-
-static Subid x4msUserAssociationIndex_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 1, 4, 1, 1 };
-static Oid x4msUserAssociationIndex_name = { x4msUserAssociationIndex_subids, 14 };
-
-static SNMP_column x4msUserAssociationIndex_column
-	= { "x4msUserAssociationIndex", &x4msUserAssociationIndex_name, INTEGER, TO_INTEGER };
-
-static SNMP_table x4msUserAssociationTable = {
-	1,
-	{
-		&x4msUserAssociationIndex_column
-	}
-};
-
-
-/*************/
-/* X4GRP MIB */
-/*************/
-
-static Subid x4grpName_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 2, 1, 1, 2 };
-static Oid x4grpName_name = { x4grpName_subids, 14 };
-
-static SNMP_column x4grpName_column
-	= { "x4grpName", &x4grpName_name, STRING, TO_ASCII };
-
-static SNMP_table x4grpTable = {
-	1,
-	{
-		&x4grpName_column
-	}
-};
-
-
-static Subid x4grpMappingMSIndex_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 2, 2, 1, 1 };
-static Oid x4grpMappingMSIndex_name = { x4grpMappingMSIndex_subids, 14 };
-
-static Subid x4grpMappingMTAIndex_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 2, 2, 1, 2 };
-static Oid x4grpMappingMTAIndex_name = { x4grpMappingMTAIndex_subids, 14 };
-
-static SNMP_column x4grpMappingMSIndex_column
-	= { "x4grpMappingMSIndex", &x4grpMappingMSIndex_name, INTEGER, TO_INTEGER };
-static SNMP_column x4grpMappingMTAIndex_column
-	= { "x4grpMappingMTAIndex", &x4grpMappingMTAIndex_name, INTEGER, TO_INTEGER };
-
-static SNMP_table x4grpMappingTable = {
-	2,
-	{
-		&x4grpMappingMSIndex_column,
-		&x4grpMappingMTAIndex_column
-	}
-};
-
-
-/*************/
-/* X5DSA MIB */
-/*************/
-
-static Subid x5dsaReferenceType_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 4, 1, 1, 2 };
-static Oid x5dsaReferenceType_name = { x5dsaReferenceType_subids, 14 };
-static Subid x5dsaReferenceNamingContext_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 4, 1, 1, 3 };
-static Oid x5dsaReferenceNamingContext_name = { x5dsaReferenceNamingContext_subids, 14 };
-static Subid x5dsaReferenceSubordinate_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 4, 1, 1, 4 };
-static Oid x5dsaReferenceSubordinate_name = { x5dsaReferenceSubordinate_subids, 14 };
-static Subid x5dsaReferenceName_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 4, 1, 1, 5 };
-static Oid x5dsaReferenceName_name = { x5dsaReferenceName_subids, 14 };
-
-static SNMP_column x5dsaReferenceType_column
-	= { "x5dsaReferenceType", &x5dsaReferenceType_name, INTEGER, TO_INTEGER };
-static SNMP_column x5dsaReferenceNamingContext_column
-	= { "x5dsaReferenceNamingContext", &x5dsaReferenceNamingContext_name, STRING, TO_ASCII };
-static SNMP_column x5dsaReferenceSubordinate_column
-	= { "x5dsaReferenceSubordinate", &x5dsaReferenceSubordinate_name, STRING, TO_ASCII };
-static SNMP_column x5dsaReferenceName_column
-	= { "x5dsaReferenceName", &x5dsaReferenceName_name, STRING, TO_ASCII };
-
-static SNMP_table x5dsaReferenceTable = {
-	4,
-	{
-		&x5dsaReferenceType_column,
-		&x5dsaReferenceNamingContext_column,
-		&x5dsaReferenceSubordinate_column,
-		&x5dsaReferenceName_column
-	}
-};
-
-
-
-/***** LOCAL FUNCTIONS *****/
-
-static int translate_variable(SNMP_variable *variable, int translator,
-	uintptr_t pointer, char *error_label);
-static int extract_one_index_from_column(Oid *instance, Oid *object, int32_t * index);
-static int extract_two_indexes_from_column(Oid *instance, Oid *object,
-	int32_t *index1, int32_t *index2);
-static int extract_three_indexes_from_column(Oid *instance, Oid *object,
-	int32_t *index1, int32_t *index2, int32_t *index3);
-
-/***************************************************************/
-
-int sysUpTime_send_request(SNMP_session *session, char *error_label)
-{
-	SNMP_pdu *request;
-	SNMP_object *object = &sysUpTime_object;
-
-
-	error_label[0] = '\0';
-
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = GET_REQ_MSG;
-
-	if(snmp_pdu_append_null_variable(request, object->name, error_label) == NULL)
-	{
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-	if(snmp_session_send(session, SYSUPTIME_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-SysUpTime *sysUpTime_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	SysUpTime *sysUpTime;
-	SNMP_variable *variable;
-	SNMP_object *object = &sysUpTime_object;
-	uintptr_t pointer;
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: sysUpTime_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	sysUpTime = (SysUpTime *) malloc(sizeof(SysUpTime));
-	if(sysUpTime == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(sysUpTime, 0, sizeof(SysUpTime));
-
-	pointer = (uintptr_t)sysUpTime;
-	variable = response->first_variable;
-
-	if(variable == NULL)
-	{
-		sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-		sysUpTime_free(sysUpTime);
-		return NULL;
-	}
-
-	/* check oid */
-	if(SSAOidCmp(&(variable->name), object->name))
-	{
-		snmp_errno = SNMP_ERR_NOSUCHNAME;
-		sysUpTime_free(sysUpTime);
-		return NULL;
-	}
-
-	/* check type */
-	if(variable->type != object->type)
-	{
-		sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-			variable->type, object->label);
-		sysUpTime_free(sysUpTime);
-		return NULL;
-	}
-
-	if(translate_variable(variable, object->translator, pointer, error_label))
-	{
-		sysUpTime_free(sysUpTime);
-		return NULL;
-	}
-
-
-	return sysUpTime;
-}
-
-
-/***************************************************************/
-
-void sysUpTime_free(SysUpTime *sysUpTime)
-{
-	if(sysUpTime == NULL)
-	{
-		return;
-	}
-
-	free(sysUpTime);
-}
-
-
-/***************************************************************/
-
-void sysUpTime_print(SysUpTime *sysUpTime)
-{
-	printf("sysUpTime:                            %ld\n",
-		sysUpTime);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int applEntry_send_request(SNMP_session *session, u_char type, int32_t applIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: applEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < applTable.column_num; i++)
-	{
-		column = applTable.columns[i];
-
-		if(applIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = applIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, APPL_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-ApplEntry *applEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	ApplEntry *applEntry;
-	int32_t applIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: applEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	applEntry = (ApplEntry *) malloc(sizeof(ApplEntry));
-	if(applEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(applEntry, 0, sizeof(ApplEntry));
-
-	pointer = (uintptr_t)&(applEntry->applName);
-	variable = response->first_variable;
-	for(i = 0; i < applTable.column_num; i++)
-	{
-		column = applTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			applEntry_free(applEntry);
-			return NULL;
-		}
-
-		/* check oid and extract applIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &applIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			applEntry_free(applEntry);
-			return NULL;
-		}
-
-		/* check if all applIndex are equal ??? */
-		applEntry->applIndex = applIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			applEntry_free(applEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			applEntry_free(applEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return applEntry;
-}
-
-
-/***************************************************************/
-
-void applEntry_free(ApplEntry *applEntry)
-{
-	if(applEntry == NULL)
-	{
-		return;
-	}
-
-	if(applEntry->applName)
-	{
-		free(applEntry->applName);
-	}
-	if(applEntry->applDirectoryName)
-	{
-		free(applEntry->applDirectoryName);
-	}
-	if(applEntry->applVersion)
-	{
-		free(applEntry->applVersion);
-	}
-	free(applEntry);
-}
-
-
-/***************************************************************/
-
-void applEntry_print(ApplEntry *applEntry)
-{
-	printf("applIndex:                            %ld\n",
-		applEntry->applIndex);
-	printf("applName:                             %s\n",
-		applEntry->applName);
-	printf("applDirectoryName:                    %s\n",
-		applEntry->applDirectoryName);
-	printf("applVersion:                          %s\n",
-		applEntry->applVersion);
-	printf("applUptime:                           %ld\n",
-		applEntry->applUptime);
-	printf("applOperStatus:                       %s\n",
-		applOperStatus_string(applEntry->applOperStatus));
-	printf("applLastChange:                       %ld\n",
-		applEntry->applLastChange);
-	printf("applInboundAssociations:              %ld\n",
-		applEntry->applInboundAssociations);
-	printf("applOutboundAssociations:             %ld\n",
-		applEntry->applOutboundAssociations);
-	printf("applAccumulatedInboundAssociations:   %ld\n",
-		applEntry->applAccumulatedInboundAssociations);
-	printf("applAccumulatedOutboundAssociations:  %ld\n",
-		applEntry->applAccumulatedOutboundAssociations);
-	printf("applLastInboundActivity:              %ld\n",
-		applEntry->applLastInboundActivity);
-	printf("applLastOutboundActivity:             %ld\n",
-		applEntry->applLastOutboundActivity);
-	printf("applRejectedInboundAssociations:      %ld\n",
-		applEntry->applRejectedInboundAssociations);
-	printf("applFailedOutboundAssociations:       %ld\n",
-		applEntry->applFailedOutboundAssociations);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int
-assocEntry_send_request(SNMP_session *session, u_char type, int32_t applIndex, int32_t assocIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: assocEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < assocTable.column_num; i++)
-	{
-		column = assocTable.columns[i];
-
-		if(applIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = applIndex;
-			oid.len = column->name->len + 1;
-
-			if(assocIndex >= 0)
-			{
-				subids[column->name->len + 1] = assocIndex;
-				oid.len = column->name->len + 2;
-			}
-
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, ASSOC_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-AssocEntry *assocEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	AssocEntry *assocEntry;
-	int32_t applIndex;
-	int32_t assocIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: assocEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	assocEntry = (AssocEntry *) malloc(sizeof(AssocEntry));
-	if(assocEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(assocEntry, 0, sizeof(AssocEntry));
-
-	pointer = (uintptr_t)&(assocEntry->assocRemoteApplication);
-	variable = response->first_variable;
-	for(i = 0; i < assocTable.column_num; i++)
-	{
-		column = assocTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			assocEntry_free(assocEntry);
-			return NULL;
-		}
-
-		/* check oid and extract applIndex */
-		if(extract_two_indexes_from_column(&(variable->name), column->name, &applIndex, &assocIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			assocEntry_free(assocEntry);
-			return NULL;
-		}
-
-		/* check if all applIndex + assocIndex are equal ??? */
-		assocEntry->applIndex = applIndex;
-		assocEntry->assocIndex = assocIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			assocEntry_free(assocEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			assocEntry_free(assocEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return assocEntry;
-}
-
-
-/***************************************************************/
-
-void assocEntry_free(AssocEntry *assocEntry)
-{
-	if(assocEntry == NULL)
-	{
-		return;
-	}
-
-	if(assocEntry->assocRemoteApplication)
-	{
-		free(assocEntry->assocRemoteApplication);
-	}
-	if(assocEntry->assocApplicationProtocol)
-	{
-		SSAOidFree(assocEntry->assocApplicationProtocol);
-	}
-	free(assocEntry);
-}
-
-
-/***************************************************************/
-
-void assocEntry_print(AssocEntry *assocEntry)
-{
-	printf("applIndex:                            %ld\n",
-		assocEntry->applIndex);
-	printf("assocIndex:                           %ld\n",
-		assocEntry->assocIndex);
-	printf("assocRemoteApplication:               %s\n",
-		assocEntry->assocRemoteApplication);
-	printf("assocApplicationProtocol:             %s\n",
-		SSAOidString(assocEntry->assocApplicationProtocol));
-	printf("assocApplicationType:                 %s\n",
-		assocApplicationType_string(assocEntry->assocApplicationType));
-	printf("assocDuration:                        %ld\n",
-		assocEntry->assocDuration);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int
-mtaEntry_send_request(SNMP_session *session, u_char type, int32_t applIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: mtaEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < mtaTable.column_num; i++)
-	{
-		column = mtaTable.columns[i];
-
-		if(applIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = applIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, MTA_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-MtaEntry *mtaEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	MtaEntry *mtaEntry;
-	int32_t applIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: mtaEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	mtaEntry = (MtaEntry *) malloc(sizeof(MtaEntry));
-	if(mtaEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(mtaEntry, 0, sizeof(MtaEntry));
-
-	pointer = (uintptr_t)&(mtaEntry->mtaReceivedMessages);
-	variable = response->first_variable;
-	for(i = 0; i < mtaTable.column_num; i++)
-	{
-		column = mtaTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			mtaEntry_free(mtaEntry);
-			return NULL;
-		}
-
-		/* check oid and extract applIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &applIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			mtaEntry_free(mtaEntry);
-			return NULL;
-		}
-
-		/* check if all applIndex are equal ??? */
-		mtaEntry->applIndex = applIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			mtaEntry_free(mtaEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			mtaEntry_free(mtaEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return mtaEntry;
-}
-
-
-/***************************************************************/
-
-void mtaEntry_free(MtaEntry *mtaEntry)
-{
-	if(mtaEntry == NULL)
-	{
-		return;
-	}
-	free(mtaEntry);
-}
-
-
-/***************************************************************/
-
-void mtaEntry_print(MtaEntry *mtaEntry)
-{
-	printf("applIndex:                            %ld\n",
-		mtaEntry->applIndex);
-	printf("mtaReceivedMessages:                  %ld\n",
-		mtaEntry->mtaReceivedMessages);
-	printf("mtaStoredMessages:                    %ld\n",
-		mtaEntry->mtaStoredMessages);
-	printf("mtaTransmittedMessages:               %ld\n",
-		mtaEntry->mtaTransmittedMessages);
-	printf("mtaReceivedVolume:                    %ld\n",
-		mtaEntry->mtaReceivedVolume);
-	printf("mtaStoredVolume:                      %ld\n",
-		mtaEntry->mtaStoredVolume);
-	printf("mtaTransmittedVolume:                 %ld\n",
-		mtaEntry->mtaTransmittedVolume);
-	printf("mtaReceivedRecipients:                %ld\n",
-		mtaEntry->mtaReceivedRecipients);
-	printf("mtaStoredRecipients:                  %ld\n",
-		mtaEntry->mtaStoredRecipients);
-	printf("mtaTransmittedRecipients:             %ld\n",
-		mtaEntry->mtaTransmittedRecipients);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int mtaGroupEntry_send_request(SNMP_session *session, u_char type, int32_t applIndex, int32_t mtaGroupIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: mtaGroupEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < mtaGroupTable.column_num; i++)
-	{
-		column = mtaGroupTable.columns[i];
-
-		if(applIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = applIndex;
-			oid.len = column->name->len + 1;
-
-			if(mtaGroupIndex >= 0)
-			{
-				subids[column->name->len + 1] = mtaGroupIndex;
-				oid.len = column->name->len + 2;
-			}
-
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, MTA_GROUP_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-MtaGroupEntry *mtaGroupEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	MtaGroupEntry *mtaGroupEntry;
-	int32_t applIndex;
-	int32_t mtaGroupIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: mtaGroupEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	mtaGroupEntry = (MtaGroupEntry *) malloc(sizeof(MtaGroupEntry));
-	if(mtaGroupEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(mtaGroupEntry, 0, sizeof(MtaGroupEntry));
-
-	pointer = (uintptr_t)&(mtaGroupEntry->mtaGroupReceivedMessages);
-	variable = response->first_variable;
-	for(i = 0; i < mtaGroupTable.column_num; i++)
-	{
-		column = mtaGroupTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			mtaGroupEntry_free(mtaGroupEntry);
-			return NULL;
-		}
-
-		/* check oid and extract applIndex and mtaGroupIndex */
-		if(extract_two_indexes_from_column(&(variable->name), column->name, &applIndex, &mtaGroupIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			mtaGroupEntry_free(mtaGroupEntry);
-			return NULL;
-		}
-
-		/* check if all applIndex + mtaGroupIndex are equal ??? */
-		mtaGroupEntry->applIndex = applIndex;
-		mtaGroupEntry->mtaGroupIndex = mtaGroupIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			mtaGroupEntry_free(mtaGroupEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			mtaGroupEntry_free(mtaGroupEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return mtaGroupEntry;
-}
-
-
-/***************************************************************/
-
-void mtaGroupEntry_free(MtaGroupEntry *mtaGroupEntry)
-{
-	if(mtaGroupEntry == NULL)
-	{
-		return;
-	}
-
-	if(mtaGroupEntry->mtaGroupInboundRejectionReason)
-	{
-		free(mtaGroupEntry->mtaGroupInboundRejectionReason);
-	}
-	if(mtaGroupEntry->mtaGroupOutboundConnectFailureReason)
-	{
-		free(mtaGroupEntry->mtaGroupOutboundConnectFailureReason);
-	}
-	if(mtaGroupEntry->mtaGroupMailProtocol)
-	{
-		SSAOidFree(mtaGroupEntry->mtaGroupMailProtocol);
-	}
-	if(mtaGroupEntry->mtaGroupName)
-	{
-		free(mtaGroupEntry->mtaGroupName);
-	}
-	free(mtaGroupEntry);
-}
-
-
-/***************************************************************/
-
-void mtaGroupEntry_print(MtaGroupEntry *mtaGroupEntry)
-{
-	printf("applIndex:                            %ld\n",
-		mtaGroupEntry->applIndex);
-	printf("mtaGroupIndex:                        %ld\n",
-		mtaGroupEntry->mtaGroupIndex);
-	printf("mtaGroupReceivedMessages:             %ld\n",
-		mtaGroupEntry->mtaGroupReceivedMessages);
-	printf("mtaGroupRejectedMessages:             %ld\n",
-		mtaGroupEntry->mtaGroupRejectedMessages);
-	printf("mtaGroupStoredMessages:               %ld\n",
-		mtaGroupEntry->mtaGroupStoredMessages);
-	printf("mtaGroupTransmittedMessages:          %ld\n",
-		mtaGroupEntry->mtaGroupTransmittedMessages);
-	printf("mtaGroupReceivedVolume:               %ld\n",
-		mtaGroupEntry->mtaGroupReceivedVolume);
-	printf("mtaGroupStoredVolume:                 %ld\n",
-		mtaGroupEntry->mtaGroupStoredVolume);
-	printf("mtaGroupTransmittedVolume:            %ld\n",
-		mtaGroupEntry->mtaGroupTransmittedVolume);
-	printf("mtaGroupOldestMessageStored:          %ld\n",
-		mtaGroupEntry->mtaGroupOldestMessageStored);
-	printf("mtaGroupInboundAssociations:          %ld\n",
-		mtaGroupEntry->mtaGroupInboundAssociations);
-	printf("mtaGroupOutboundAssociations:         %ld\n",
-		mtaGroupEntry->mtaGroupOutboundAssociations);
-	printf("mtaGroupAccumulatedInboundAssoc.:     %ld\n",
-		mtaGroupEntry->mtaGroupAccumulatedInboundAssociations);
-	printf("mtaGroupAccumulatedOutboundAssoc.:    %ld\n",
-		mtaGroupEntry->mtaGroupAccumulatedOutboundAssociations);
-	printf("mtaGroupLastInboundActivity:          %ld\n",
-		mtaGroupEntry->mtaGroupLastInboundActivity);
-	printf("mtaGroupLastOutboundActivity:         %ld\n",
-		mtaGroupEntry->mtaGroupLastOutboundActivity);
-	printf("mtaGroupRejectedInboundAssociations:  %ld\n",
-		mtaGroupEntry->mtaGroupRejectedInboundAssociations);
-	printf("mtaGroupFailedOutboundAssociations:   %ld\n",
-		mtaGroupEntry->mtaGroupFailedOutboundAssociations);
-	printf("mtaGroupInboundRejectionReason:       %s\n",
-		mtaGroupEntry->mtaGroupInboundRejectionReason);
-	printf("mtaGroupOutboundConnectFailureReason: %s\n",
-		mtaGroupEntry->mtaGroupOutboundConnectFailureReason);
-	printf("mtaGroupScheduledRetry:               %ld\n",
-		mtaGroupEntry->mtaGroupScheduledRetry);
-	printf("mtaGroupMailProtocol:                 %s\n",
-		SSAOidString(mtaGroupEntry->mtaGroupMailProtocol));
-	printf("mtaGroupName:                         %s\n",
-		mtaGroupEntry->mtaGroupName);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int mtaGroupAssociationEntry_send_request(SNMP_session *session, u_char type, int32_t applIndex, int32_t mtaGroupIndex, int32_t mtaGroupAssociationIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: mtaGroupAssociationEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < mtaGroupAssociationTable.column_num; i++)
-	{
-		column = mtaGroupAssociationTable.columns[i];
-
-		if(applIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = applIndex;
-			oid.len = column->name->len + 1;
-
-			if(mtaGroupIndex >= 0)
-			{
-				subids[column->name->len + 1] = mtaGroupIndex;
-				oid.len = column->name->len + 2;
-
-				if(mtaGroupAssociationIndex >= 0)
-				{
-					subids[column->name->len + 2] = mtaGroupAssociationIndex;
-					oid.len = column->name->len + 3;
-				}
-			}
-
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, MTA_GROUP_ASSOCIATION_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-MtaGroupAssociationEntry *mtaGroupAssociationEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	MtaGroupAssociationEntry *mtaGroupAssociationEntry;
-	int32_t applIndex;
-	int32_t mtaGroupIndex;
-	int32_t mtaGroupAssociationIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: mtaGroupAssociationEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	mtaGroupAssociationEntry = (MtaGroupAssociationEntry *) malloc(sizeof(MtaGroupAssociationEntry));
-	if(mtaGroupAssociationEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(mtaGroupAssociationEntry, 0, sizeof(MtaGroupAssociationEntry));
-
-	pointer = (uintptr_t)&(mtaGroupAssociationEntry->mtaGroupAssociationIndex);
-	variable = response->first_variable;
-	for(i = 0; i < mtaGroupAssociationTable.column_num; i++)
-	{
-		column = mtaGroupAssociationTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			mtaGroupAssociationEntry_free(mtaGroupAssociationEntry);
-			return NULL;
-		}
-
-		/* check oid and extract applIndex and mtaGroupIndex */
-		if(extract_three_indexes_from_column(&(variable->name), column->name, &applIndex, &mtaGroupIndex, &mtaGroupAssociationIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			mtaGroupAssociationEntry_free(mtaGroupAssociationEntry);
-			return NULL;
-		}
-
-		/* check if all applIndex + mtaGroupIndex + mtaGroupAssociationIndex are equal ??? */
-		mtaGroupAssociationEntry->applIndex = applIndex;
-		mtaGroupAssociationEntry->mtaGroupIndex = mtaGroupIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			mtaGroupAssociationEntry_free(mtaGroupAssociationEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			mtaGroupAssociationEntry_free(mtaGroupAssociationEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return mtaGroupAssociationEntry;
-}
-
-
-/***************************************************************/
-
-void mtaGroupAssociationEntry_free(MtaGroupAssociationEntry *mtaGroupAssociationEntry)
-{
-	if(mtaGroupAssociationEntry == NULL)
-	{
-		return;
-	}
-
-	free(mtaGroupAssociationEntry);
-}
-
-
-/***************************************************************/
-
-void mtaGroupAssociationEntry_print(MtaGroupAssociationEntry *mtaGroupAssociationEntry)
-{
-	printf("applIndex:                            %ld\n",
-		mtaGroupAssociationEntry->applIndex);
-	printf("mtaGroupIndex:                        %ld\n",
-		mtaGroupAssociationEntry->mtaGroupIndex);
-	printf("mtaGroupAssociationIndex:             %ld\n",
-		mtaGroupAssociationEntry->mtaGroupAssociationIndex);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int dsaOpsEntry_send_request(SNMP_session *session, u_char type, int32_t applIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: dsaOpsEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < dsaOpsTable.column_num; i++)
-	{
-		column = dsaOpsTable.columns[i];
-
-		if(applIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = applIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, DSA_OPS_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-DsaOpsEntry *dsaOpsEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	DsaOpsEntry *dsaOpsEntry;
-	int32_t applIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: dsaOpsEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	dsaOpsEntry = (DsaOpsEntry *) malloc(sizeof(DsaOpsEntry));
-	if(dsaOpsEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(dsaOpsEntry, 0, sizeof(dsaOpsEntry));
-
-	pointer = (uintptr_t)&(dsaOpsEntry->dsaAnonymousBinds);
-	variable = response->first_variable;
-	for(i = 0; i < dsaOpsTable.column_num; i++)
-	{
-		column = dsaOpsTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			dsaOpsEntry_free(dsaOpsEntry);
-			return NULL;
-		}
-
-		/* check oid and extract applIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &applIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			dsaOpsEntry_free(dsaOpsEntry);
-			return NULL;
-		}
-
-		/* check if all applIndex are equal ??? */
-		dsaOpsEntry->applIndex = applIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			dsaOpsEntry_free(dsaOpsEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			dsaOpsEntry_free(dsaOpsEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return dsaOpsEntry;
-}
-
-
-/***************************************************************/
-
-void dsaOpsEntry_free(DsaOpsEntry *dsaOpsEntry)
-{
-	if(dsaOpsEntry == NULL)
-	{
-		return;
-	}
-
-	free(dsaOpsEntry);
-}
-
-
-/***************************************************************/
-
-void dsaOpsEntry_print(DsaOpsEntry *dsaOpsEntry)
-{
-	printf("applIndex:                            %ld\n",
-		dsaOpsEntry->applIndex);
-	printf("dsaAnonymousBinds:                    %ld\n",
-		dsaOpsEntry->dsaAnonymousBinds);
-	printf("dsaUnauthBinds:                       %ld\n",
-		dsaOpsEntry->dsaUnauthBinds);
-	printf("dsaSimpleAuthBinds:                   %ld\n",
-		dsaOpsEntry->dsaSimpleAuthBinds);
-	printf("dsaStrongAuthBinds:                   %ld\n",
-		dsaOpsEntry->dsaStrongAuthBinds);
-	printf("dsaBindSecurityErrors:                %ld\n",
-		dsaOpsEntry->dsaBindSecurityErrors);
-	printf("dsaInOps:                             %ld\n",
-		dsaOpsEntry->dsaInOps);
-	printf("dsaReadOps:                           %ld\n",
-		dsaOpsEntry->dsaReadOps);
-	printf("dsaCompareOps:                        %ld\n",
-		dsaOpsEntry->dsaCompareOps);
-	printf("dsaAddEntryOps:                       %ld\n",
-		dsaOpsEntry->dsaAddEntryOps);
-	printf("dsaRemoveEntryOps:                    %ld\n",
-		dsaOpsEntry->dsaRemoveEntryOps);
-	printf("dsaModifyEntryOps:                    %ld\n",
-		dsaOpsEntry->dsaModifyEntryOps);
-	printf("dsaModifyRDNOps:                      %ld\n",
-		dsaOpsEntry->dsaModifyRDNOps);
-	printf("dsaListOps:                           %ld\n",
-		dsaOpsEntry->dsaListOps);
-	printf("dsaSearchOps:                         %ld\n",
-		dsaOpsEntry->dsaSearchOps);
-	printf("dsaOneLevelSearchOps:                 %ld\n",
-		dsaOpsEntry->dsaOneLevelSearchOps);
-	printf("dsaWholeTreeSearchOps:                %ld\n",
-		dsaOpsEntry->dsaWholeTreeSearchOps);
-	printf("dsaReferrals:                         %ld\n",
-		dsaOpsEntry->dsaReferrals);
-	printf("dsaChainings:                         %ld\n",
-		dsaOpsEntry->dsaChainings);
-	printf("dsaSecurityErrors:                    %ld\n",
-		dsaOpsEntry->dsaSecurityErrors);
-	printf("dsaErrors:                            %ld\n",
-		dsaOpsEntry->dsaErrors);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int dsaEntriesEntry_send_request(SNMP_session *session, u_char type, int32_t applIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: dsaEntriesEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < dsaEntriesTable.column_num; i++)
-	{
-		column = dsaEntriesTable.columns[i];
-
-		if(applIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = applIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, DSA_ENTRIES_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-DsaEntriesEntry *dsaEntriesEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	DsaEntriesEntry *dsaEntriesEntry;
-	int32_t applIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: dsaEntriesEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	dsaEntriesEntry = (DsaEntriesEntry *) malloc(sizeof(DsaEntriesEntry));
-	if(dsaEntriesEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(dsaEntriesEntry, 0, sizeof(dsaEntriesEntry));
-
-	pointer = (uintptr_t)&(dsaEntriesEntry->dsaMasterEntries);
-	variable = response->first_variable;
-	for(i = 0; i < dsaEntriesTable.column_num; i++)
-	{
-		column = dsaEntriesTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			dsaEntriesEntry_free(dsaEntriesEntry);
-			return NULL;
-		}
-
-		/* check oid and extract applIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &applIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			dsaEntriesEntry_free(dsaEntriesEntry);
-			return NULL;
-		}
-
-		/* check if all applIndex are equal ??? */
-		dsaEntriesEntry->applIndex = applIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			dsaEntriesEntry_free(dsaEntriesEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			dsaEntriesEntry_free(dsaEntriesEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return dsaEntriesEntry;
-}
-
-
-/***************************************************************/
-
-void dsaEntriesEntry_free(DsaEntriesEntry *dsaEntriesEntry)
-{
-	if(dsaEntriesEntry == NULL)
-	{
-		return;
-	}
-
-	free(dsaEntriesEntry);
-}
-
-
-/***************************************************************/
-
-void dsaEntriesEntry_print(DsaEntriesEntry *dsaEntriesEntry)
-{
-	printf("applIndex:                            %ld\n",
-		dsaEntriesEntry->applIndex);
-	printf("dsaMasterEntries:                     %ld\n",
-		dsaEntriesEntry->dsaMasterEntries);
-	printf("dsaCopyEntries:                       %ld\n",
-		dsaEntriesEntry->dsaCopyEntries);
-	printf("dsaCacheEntries:                      %ld\n",
-		dsaEntriesEntry->dsaCacheEntries);
-	printf("dsaCacheHits:                         %ld\n",
-		dsaEntriesEntry->dsaCacheHits);
-	printf("dsaSlaveHits:                         %ld\n",
-		dsaEntriesEntry->dsaSlaveHits);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int dsaIntEntry_send_request(SNMP_session *session, u_char type, int32_t applIndex, int32_t dsaIntIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: dsaIntEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < dsaIntTable.column_num; i++)
-	{
-		column = dsaIntTable.columns[i];
-
-		if(applIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = applIndex;
-			oid.len = column->name->len + 1;
-
-			if(dsaIntIndex >= 0)
-			{
-				subids[column->name->len + 1] = dsaIntIndex;
-				oid.len = column->name->len + 2;
-			}
-
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, DSA_INT_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-DsaIntEntry *dsaIntEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	DsaIntEntry *dsaIntEntry;
-	int32_t applIndex;
-	int32_t dsaIntIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: dsaIntEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	dsaIntEntry = (DsaIntEntry *) malloc(sizeof(DsaIntEntry));
-	if(dsaIntEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(dsaIntEntry, 0, sizeof(DsaIntEntry));
-
-	pointer = (uintptr_t)&(dsaIntEntry->dsaName);
-	variable = response->first_variable;
-	for(i = 0; i < dsaIntTable.column_num; i++)
-	{
-		column = dsaIntTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			dsaIntEntry_free(dsaIntEntry);
-			return NULL;
-		}
-
-		/* check oid and extract applIndex and mtaGroupIndex */
-		if(extract_two_indexes_from_column(&(variable->name), column->name, &applIndex, &dsaIntIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			dsaIntEntry_free(dsaIntEntry);
-			return NULL;
-		}
-
-		/* check if all applIndex + dsaIntIndex are equal ??? */
-		dsaIntEntry->applIndex = applIndex;
-		dsaIntEntry->dsaIntIndex = dsaIntIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			dsaIntEntry_free(dsaIntEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			dsaIntEntry_free(dsaIntEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return dsaIntEntry;
-}
-
-
-/***************************************************************/
-
-void dsaIntEntry_free(DsaIntEntry *dsaIntEntry)
-{
-	if(dsaIntEntry == NULL)
-	{
-		return;
-	}
-
-	if(dsaIntEntry->dsaName)
-	{
-		free(dsaIntEntry->dsaName);
-	}
-	free(dsaIntEntry);
-}
-
-
-/***************************************************************/
-
-void dsaIntEntry_print(DsaIntEntry *dsaIntEntry)
-{
-	printf("applIndex:                            %ld\n",
-		dsaIntEntry->applIndex);
-	printf("dsaIntIndex:                          %ld\n",
-		dsaIntEntry->dsaIntIndex);
-	printf("dsaName:                              %s\n",
-		dsaIntEntry->dsaName);
-	printf("dsaTimeOfCreation:                    %s\n",
-		dsaIntEntry->dsaTimeOfCreation);
-	printf("dsaTimeOfLastAttempt:                 %ld\n",
-		dsaIntEntry->dsaTimeOfLastAttempt);
-	printf("dsaTimeOfLastSuccess:                 %ld\n",
-		dsaIntEntry->dsaTimeOfLastSuccess);
-	printf("dsaFailuresSinceLastSuccess:          %ld\n",
-		dsaIntEntry->dsaFailuresSinceLastSuccess);
-	printf("dsaFailures:                          %ld\n",
-		dsaIntEntry->dsaFailures);
-	printf("dsaSuccesses:                         %ld\n",
-		dsaIntEntry->dsaSuccesses);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int x4msMtaEntry_send_request(SNMP_session *session, u_char type, int32_t x4msMtaIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: x4msMtaEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < x4msMtaTable.column_num; i++)
-	{
-		column = x4msMtaTable.columns[i];
-
-		if(x4msMtaIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = x4msMtaIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, X4MS_MTA_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-X4msMtaEntry *x4msMtaEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	X4msMtaEntry *x4msMtaEntry;
-	int32_t x4msMtaIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: x4msMtaEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	x4msMtaEntry = (X4msMtaEntry *) malloc(sizeof(X4msMtaEntry));
-	if(x4msMtaEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(x4msMtaEntry, 0, sizeof(X4msMtaEntry));
-
-	pointer = (uintptr_t)&(x4msMtaEntry->x4msMtaName);
-	variable = response->first_variable;
-	for(i = 0; i < x4msMtaTable.column_num; i++)
-	{
-		column = x4msMtaTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			x4msMtaEntry_free(x4msMtaEntry);
-			return NULL;
-		}
-
-		/* check oid and extract x4msMtaIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &x4msMtaIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			x4msMtaEntry_free(x4msMtaEntry);
-			return NULL;
-		}
-
-		/* check if all x4msMtaIndex are equal ??? */
-		x4msMtaEntry->x4msMtaIndex = x4msMtaIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			x4msMtaEntry_free(x4msMtaEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			x4msMtaEntry_free(x4msMtaEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return x4msMtaEntry;
-}
-
-
-/***************************************************************/
-
-void x4msMtaEntry_free(X4msMtaEntry *x4msMtaEntry)
-{
-	if(x4msMtaEntry == NULL)
-	{
-		return;
-	}
-
-	if(x4msMtaEntry->x4msMtaName)
-	{
-		free(x4msMtaEntry->x4msMtaName);
-	}
-	free(x4msMtaEntry);
-}
-
-
-/***************************************************************/
-
-void x4msMtaEntry_print(X4msMtaEntry *x4msMtaEntry)
-{
-	printf("x4msMtaIndex:                         %ld\n",
-		x4msMtaEntry->x4msMtaIndex);
-	printf("x4msMtaName                           %s\n",
-		x4msMtaEntry->x4msMtaName);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-
-int x4msUserEntryPart1_send_request(SNMP_session *session, u_char type, int32_t x4msUserIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: x4msUserEntryPart1_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < x4msUserTablePart1.column_num; i++)
-	{
-		column = x4msUserTablePart1.columns[i];
-
-		if(x4msUserIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = x4msUserIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, X4MS_USER_ENTRY_PART1_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-/* ARGSUSED */
-X4msUserEntryPart1 *x4msUserEntryPart1_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	X4msUserEntryPart1 *x4msUserEntryPart1;
-	int32_t x4msUserIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: x4msUserEntryPart1_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	x4msUserEntryPart1 = (X4msUserEntryPart1 *) malloc(sizeof(X4msUserEntryPart1));
-	if(x4msUserEntryPart1 == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(x4msUserEntryPart1, 0, sizeof(X4msUserEntryPart1));
-
-	pointer = (uintptr_t) &(x4msUserEntryPart1->x4msUserTotalMessages);
-	variable = response->first_variable;
-	for(i = 0; i < x4msUserTablePart1.column_num; i++)
-	{
-		column = x4msUserTablePart1.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			x4msUserEntryPart1_free(x4msUserEntryPart1);
-			return NULL;
-		}
-
-		/* check oid and extract x4msMtaIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &x4msUserIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			x4msUserEntryPart1_free(x4msUserEntryPart1);
-			return NULL;
-		}
-
-		/* check if all x4msUserIndex are equal ??? */
-		x4msUserEntryPart1->x4msUserIndex = x4msUserIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			x4msUserEntryPart1_free(x4msUserEntryPart1);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			x4msUserEntryPart1_free(x4msUserEntryPart1);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return x4msUserEntryPart1;
-}
-
-
-/***************************************************************/
-
-void x4msUserEntryPart1_free(X4msUserEntryPart1 *x4msUserEntryPart1)
-{
-	if(x4msUserEntryPart1 == NULL)
-	{
-		return;
-	}
-
-	if(x4msUserEntryPart1->x4msUserAuthentificationFailureReason)
-	{
-		free(x4msUserEntryPart1->x4msUserAuthentificationFailureReason);
-	}
-	if(x4msUserEntryPart1->x4msUserName)
-	{
-		free(x4msUserEntryPart1->x4msUserName);
-	}
-	free(x4msUserEntryPart1);
-}
-
-
-/***************************************************************/
-
-void x4msUserEntryPart1_print(X4msUserEntryPart1 *x4msUserEntryPart1)
-{
-	printf("x4msUserIndex:                        %ld\n",
-		x4msUserEntryPart1->x4msUserIndex);
-	printf("x4msUserTotalMessages:                %ld\n",
-		x4msUserEntryPart1->x4msUserTotalMessages);
-	printf("x4msUserTotalVolume:                  %ld\n",
-		x4msUserEntryPart1->x4msUserTotalVolume);
-	printf("x4msUserP3Associations:               %ld\n",
-		x4msUserEntryPart1->x4msUserP3Associations);
-	printf("x4msUserP7Associations:               %ld\n",
-		x4msUserEntryPart1->x4msUserP7Associations);
-	printf("x4msUserLastP7Association:            %ld\n",
-		x4msUserEntryPart1->x4msUserLastP7Association);
-	printf("x4msUserAuthentificationFailures:     %ld\n",
-		x4msUserEntryPart1->x4msUserAuthentificationFailures);
-	printf("x4msUserAuthentificationFailureReason:%s\n",
-		x4msUserEntryPart1->x4msUserAuthentificationFailureReason);
-	printf("x4msUserName:                         %s\n",
-		x4msUserEntryPart1->x4msUserName);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-
-int x4msUserEntryPart2_send_request(SNMP_session *session, u_char type, int32_t x4msUserIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: x4msUserEntryPart2_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < x4msUserTablePart2.column_num; i++)
-	{
-		column = x4msUserTablePart2.columns[i];
-
-		if(x4msUserIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = x4msUserIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, X4MS_USER_ENTRY_PART2_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-/* ARGSUSED */
-X4msUserEntryPart2 *x4msUserEntryPart2_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	X4msUserEntryPart2 *x4msUserEntryPart2;
-	int32_t x4msUserIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: x4msUserEntryPart2_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	x4msUserEntryPart2 = (X4msUserEntryPart2 *) malloc(sizeof(X4msUserEntryPart2));
-	if(x4msUserEntryPart2 == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(x4msUserEntryPart2, 0, sizeof(X4msUserEntryPart2));
-
-	pointer = (uintptr_t) &(x4msUserEntryPart2->x4msUserNewMessages);
-	variable = response->first_variable;
-	for(i = 0; i < x4msUserTablePart2.column_num; i++)
-	{
-		column = x4msUserTablePart2.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			x4msUserEntryPart2_free(x4msUserEntryPart2);
-			return NULL;
-		}
-
-		/* check oid and extract x4msUserIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &x4msUserIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			x4msUserEntryPart2_free(x4msUserEntryPart2);
-			return NULL;
-		}
-
-		/* check if all x4msUserIndex are equal ??? */
-		x4msUserEntryPart2->x4msUserIndex = x4msUserIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			x4msUserEntryPart2_free(x4msUserEntryPart2);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			x4msUserEntryPart2_free(x4msUserEntryPart2);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return x4msUserEntryPart2;
-}
-
-
-/***************************************************************/
-
-void x4msUserEntryPart2_free(X4msUserEntryPart2 *x4msUserEntryPart2)
-{
-	if(x4msUserEntryPart2 == NULL)
-	{
-		return;
-	}
-
-	if(x4msUserEntryPart2->x4msUserP3InboundRejectionReason)
-	{
-		free(x4msUserEntryPart2->x4msUserP3InboundRejectionReason);
-	}
-	if(x4msUserEntryPart2->x4msUserP7InboundRejectionReason)
-	{
-		free(x4msUserEntryPart2->x4msUserP7InboundRejectionReason);
-	}
-	if(x4msUserEntryPart2->x4msUserP3OutboundConnectFailureReason)
-	{
-		free(x4msUserEntryPart2->x4msUserP3OutboundConnectFailureReason);
-	}
-	if(x4msUserEntryPart2->x4msUserORName)
-	{
-		free(x4msUserEntryPart2->x4msUserORName);
-	}
-	free(x4msUserEntryPart2);
-}
-
-
-/***************************************************************/
-
-void x4msUserEntryPart2_print(X4msUserEntryPart2 *x4msUserEntryPart2)
-{
-	printf("x4msUserIndex:                        %ld\n",
-		x4msUserEntryPart2->x4msUserIndex);
-	printf("x4msUserNewMessages:                  %ld\n",
-		x4msUserEntryPart2->x4msUserNewMessages);
-	printf("x4msUserNewVolume:                    %ld\n",
-		x4msUserEntryPart2->x4msUserNewVolume);
-	printf("x4msUserListedMessages:               %ld\n",
-		x4msUserEntryPart2->x4msUserListedMessages);
-	printf("x4msUserListedVolume:                 %ld\n",
-		x4msUserEntryPart2->x4msUserListedVolume);
-	printf("x4msUserProcessedMessages:            %ld\n",
-		x4msUserEntryPart2->x4msUserProcessedMessages);
-	printf("x4msUserProcessedVolume:              %ld\n",
-		x4msUserEntryPart2->x4msUserProcessedVolume);
-	printf("x4msUserMessagesOlderThanWeek:        %ld\n",
-		x4msUserEntryPart2->x4msUserMessagesOlderThanWeek);
-	printf("x4msUserVolumeOlderThanWeek:          %ld\n",
-		x4msUserEntryPart2->x4msUserVolumeOlderThanWeek);
-	printf("x4msUserMessagesOlderThanMonth:       %ld\n",
-		x4msUserEntryPart2->x4msUserMessagesOlderThanMonth);
-	printf("x4msUserVolumeOlderThanMonth:         %ld\n",
-		x4msUserEntryPart2->x4msUserVolumeOlderThanMonth);
-	printf("x4msUserMessagesOlderThanYear:        %ld\n",
-		x4msUserEntryPart2->x4msUserMessagesOlderThanYear);
-	printf("x4msUserP3InboundAssociations:        %ld\n",
-		x4msUserEntryPart2->x4msUserP3InboundAssociations);
-	printf("x4msUserP7InboundAssociations:        %ld\n",
-		x4msUserEntryPart2->x4msUserP7InboundAssociations);
-	printf("x4msUserP3OutboundAssociations:       %ld\n",
-		x4msUserEntryPart2->x4msUserP3OutboundAssociations);
-	printf("x4msUserAccumulatedP3InboundAssoc.:   %ld\n",
-		x4msUserEntryPart2->x4msUserAccumulatedP3InboundAssociations);
-	printf("x4msUserAccumulatedP7InboundAssoc.:   %ld\n",
-		x4msUserEntryPart2->x4msUserAccumulatedP7InboundAssociations);
-	printf("x4msUserAccumulatedP3OutboundAssoc.:  %ld\n",
-		x4msUserEntryPart2->x4msUserAccumulatedP3OutboundAssociations);
-	printf("x4msUserLastP3InboundActivity:        %ld\n",
-		x4msUserEntryPart2->x4msUserLastP3InboundActivity);
-	printf("x4msUserLastP7InboundActivity:        %ld\n",
-		x4msUserEntryPart2->x4msUserLastP7InboundActivity);
-	printf("x4msUserLastP3OutboundActivity:       %ld\n",
-		x4msUserEntryPart2->x4msUserLastP3OutboundActivity);
-	printf("x4msUserRejectedP3InboundAssoc.:      %ld\n",
-		x4msUserEntryPart2->x4msUserRejectedP3InboundAssociations);
-	printf("x4msUserRejectedP7InboundAssoc.:      %ld\n",
-		x4msUserEntryPart2->x4msUserRejectedP7InboundAssociations);
-	printf("x4msUserFailedP3OutboundAssociations: %ld\n",
-		x4msUserEntryPart2->x4msUserFailedP3OutboundAssociations);
-	printf("x4msUserP3InboundRejectionReason:     %s\n",
-		x4msUserEntryPart2->x4msUserP3InboundRejectionReason);
-	printf("x4msUserP7InboundRejectionReason:     %s\n",
-		x4msUserEntryPart2->x4msUserP7InboundRejectionReason);
-	printf("x4msUserP3OutboundConnectFailureRea.: %s\n",
-		x4msUserEntryPart2->x4msUserP3OutboundConnectFailureReason);
-	printf("x4msUserMtaIndex:                     %ld\n",
-		x4msUserEntryPart2->x4msUserMtaIndex);
-	printf("x4msUserORName:                       %s\n",
-		x4msUserEntryPart2->x4msUserORName);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-
-int x4msUserAssociationEntry_send_request(SNMP_session *session, u_char type, int32_t x4msUserIndex, int32_t x4msUserAssociationIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: x4msUserAssociationEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < x4msUserAssociationTable.column_num; i++)
-	{
-		column = x4msUserAssociationTable.columns[i];
-
-		if(x4msUserIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = x4msUserIndex;
-			oid.len = column->name->len + 1;
-
-			if(x4msUserAssociationIndex >= 0)
-			{
-				subids[column->name->len + 1] = x4msUserAssociationIndex;
-				oid.len = column->name->len + 2;
-			}
-
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, X4MS_USER_ASSOCIATION_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-/* ARGSUSED */
-X4msUserAssociationEntry *x4msUserAssociationEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	X4msUserAssociationEntry *x4msUserAssociationEntry;
-	int32_t x4msUserIndex;
-	int32_t x4msUserAssociationIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: x4msUserAssociationEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	x4msUserAssociationEntry = (X4msUserAssociationEntry *) malloc(sizeof(X4msUserAssociationEntry));
-	if(x4msUserAssociationEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(x4msUserAssociationEntry, 0, sizeof(X4msUserAssociationEntry));
-
-	pointer = (uintptr_t) &(x4msUserAssociationEntry->x4msUserAssociationIndex);
-	variable = response->first_variable;
-	for(i = 0; i < x4msUserAssociationTable.column_num; i++)
-	{
-		column = x4msUserAssociationTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			x4msUserAssociationEntry_free(x4msUserAssociationEntry);
-			return NULL;
-		}
-
-		/* check oid and extract x4msUserIndex and x4msUserAssociationIndex */
-		if(extract_two_indexes_from_column(&(variable->name), column->name, &x4msUserIndex, &x4msUserAssociationIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			x4msUserAssociationEntry_free(x4msUserAssociationEntry);
-			return NULL;
-		}
-
-		/* check if all x4msUserIndex are equal ??? */
-		x4msUserAssociationEntry->x4msUserIndex = x4msUserIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			x4msUserAssociationEntry_free(x4msUserAssociationEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			x4msUserAssociationEntry_free(x4msUserAssociationEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return x4msUserAssociationEntry;
-}
-
-
-/***************************************************************/
-
-void x4msUserAssociationEntry_free(X4msUserAssociationEntry *x4msUserAssociationEntry)
-{
-	if(x4msUserAssociationEntry == NULL)
-	{
-		return;
-	}
-
-	free(x4msUserAssociationEntry);
-}
-
-
-/***************************************************************/
-
-void x4msUserAssociationEntry_print(X4msUserAssociationEntry *x4msUserAssociationEntry)
-{
-	printf("x4msUserIndex:                        %ld\n",
-		x4msUserAssociationEntry->x4msUserIndex);
-	printf("x4msUserAssociationIndex:             %ld\n",
-		x4msUserAssociationEntry->x4msUserAssociationIndex);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int x4grpEntry_send_request(SNMP_session *session, u_char type, int32_t x4grpIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: x4grpEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < x4grpTable.column_num; i++)
-	{
-		column = x4grpTable.columns[i];
-
-		if(x4grpIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = x4grpIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, X4GRP_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-/* ARGSUSED */
-X4grpEntry *x4grpEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	X4grpEntry *x4grpEntry;
-	int32_t x4grpIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: x4grpEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	x4grpEntry = (X4grpEntry *) malloc(sizeof(X4grpEntry));
-	if(x4grpEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(x4grpEntry, 0, sizeof(X4grpEntry));
-
-	pointer = (uintptr_t) &(x4grpEntry->x4grpName);
-	variable = response->first_variable;
-	for(i = 0; i < x4grpTable.column_num; i++)
-	{
-		column = x4grpTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			x4grpEntry_free(x4grpEntry);
-			return NULL;
-		}
-
-		/* check oid and extract x4grpIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &x4grpIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			x4grpEntry_free(x4grpEntry);
-			return NULL;
-		}
-
-		/* check if all x4grpIndex are equal ??? */
-		x4grpEntry->x4grpIndex = x4grpIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			x4grpEntry_free(x4grpEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			x4grpEntry_free(x4grpEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return x4grpEntry;
-}
-
-
-/***************************************************************/
-
-void x4grpEntry_free(X4grpEntry *x4grpEntry)
-{
-	if(x4grpEntry == NULL)
-	{
-		return;
-	}
-
-	if(x4grpEntry->x4grpName)
-	{
-		free(x4grpEntry->x4grpName);
-	}
-	free(x4grpEntry);
-}
-
-
-/***************************************************************/
-
-void x4grpEntry_print(X4grpEntry *x4grpEntry)
-{
-	printf("x4grpIndex:                           %ld\n",
-		x4grpEntry->x4grpIndex);
-	printf("x4grpName:                            %s\n",
-		x4grpEntry->x4grpName);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int x4grpMappingEntry_send_request(SNMP_session *session, u_char type, int32_t x4grpIndex, int32_t x4grpMappingMSIndex, int32_t x4grpMappingMTAIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: x4grpMappingEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < x4grpMappingTable.column_num; i++)
-	{
-		column = x4grpMappingTable.columns[i];
-
-		if(x4grpIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = x4grpIndex;
-			oid.len = column->name->len + 1;
-
-			if(x4grpMappingMSIndex >= 0)
-			{
-				subids[column->name->len + 1] = x4grpMappingMSIndex;
-				oid.len = column->name->len + 2;
-
-				if(x4grpMappingMTAIndex >= 0)
-				{
-					subids[column->name->len + 2] = x4grpMappingMTAIndex;
-					oid.len = column->name->len + 3;
-				}
-			}
-
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, X4GRP_MAPPING_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-/* ARGSUSED */
-X4grpMappingEntry *x4grpMappingEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	X4grpMappingEntry *x4grpMappingEntry;
-	int32_t x4grpIndex;
-	int32_t x4grpMappingMSIndex;
-	int32_t x4grpMappingMTAIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: x4grpMappingEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	x4grpMappingEntry = (X4grpMappingEntry *) malloc(sizeof(X4grpMappingEntry));
-	if(x4grpMappingEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(x4grpMappingEntry, 0, sizeof(X4grpMappingEntry));
-
-	pointer = (uintptr_t) &(x4grpMappingEntry->x4grpMappingMSIndex);
-	variable = response->first_variable;
-	for(i = 0; i < x4grpMappingTable.column_num; i++)
-	{
-		column = x4grpMappingTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			x4grpMappingEntry_free(x4grpMappingEntry);
-			return NULL;
-		}
-
-		/* check oid and extract x4grpIndex, x4grpMappingMSIndex and x4grpMappingMTAIndex */
-		if(extract_three_indexes_from_column(&(variable->name), column->name, &x4grpIndex, &x4grpMappingMSIndex, &x4grpMappingMTAIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			x4grpMappingEntry_free(x4grpMappingEntry);
-			return NULL;
-		}
-
-		/* check if all x4grpIndex are equal ??? */
-		x4grpMappingEntry->x4grpIndex = x4grpIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			x4grpMappingEntry_free(x4grpMappingEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			x4grpMappingEntry_free(x4grpMappingEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return x4grpMappingEntry;
-}
-
-
-/***************************************************************/
-
-void x4grpMappingEntry_free(X4grpMappingEntry *x4grpMappingEntry)
-{
-	if(x4grpMappingEntry == NULL)
-	{
-		return;
-	}
-
-	free(x4grpMappingEntry);
-}
-
-
-/***************************************************************/
-
-void x4grpMappingEntry_print(X4grpMappingEntry *x4grpMappingEntry)
-{
-	printf("x4grpIndex:                           %ld\n",
-		x4grpMappingEntry->x4grpIndex);
-	printf("x4grpMappingMSIndex:                  %ld\n",
-		x4grpMappingEntry->x4grpMappingMSIndex);
-	printf("x4grpMappingMTAIndex:                 %ld\n",
-		x4grpMappingEntry->x4grpMappingMTAIndex);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-int x5dsaReferenceEntry_send_request(SNMP_session *session, u_char type, int32_t x5dsaReferenceIndex, char *error_label)
-{
-	SNMP_pdu *request;
-	int i;
-	SNMP_column *column;
-	Subid subids[100] = { 0 };
-	Oid oid;
-	Oid *oidp;
-
-
-	error_label[0] = '\0';
-
-	if( (type != GET_REQ_MSG) && (type != GETNEXT_REQ_MSG) )
-	{
-		sprintf(error_label, "BUG: x5dsaReferenceEntry_send_request(): bad type (0x%x)", type);
-		return -1;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-	request->type = type;
-
-	for(i = 0; i < x5dsaReferenceTable.column_num; i++)
-	{
-		column = x5dsaReferenceTable.columns[i];
-
-		if(x5dsaReferenceIndex >= 0)
-		{
-			memcpy(subids, column->name->subids, column->name->len*sizeof(Subid));
-			subids[column->name->len] = x5dsaReferenceIndex;
-			oid.len = column->name->len + 1;
-			oid.subids = subids;
-			oidp = &oid;
-		}
-		else
-		{
-			oidp = column->name;
-		}
-
-		if(snmp_pdu_append_null_variable(request, oidp, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return -1;
-		}
-	}
-
-	if(snmp_session_send(session, X5DSA_REFERENCE_ENTRY_REQ, request, error_label))
-	{
-		/* we have to free the request */
-
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-
-	return 0;
-}
-
-/* ARGSUSED */
-X5dsaReferenceEntry *x5dsaReferenceEntry_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label)
-{
-	X5dsaReferenceEntry *x5dsaReferenceEntry;
-	int32_t x5dsaReferenceIndex;
-	SNMP_variable *variable;
-	uintptr_t pointer;
-	int i;
-	SNMP_column *column;
-
-
-	snmp_errno = SNMP_ERR_NOERROR;
-	error_label[0] = '\0';
-
-	if(response == NULL)
-	{
-		sprintf(error_label, "BUG: x5dsaReferenceEntry_process_response(): response is NULL");
-		return NULL;
-	}
-
-	if(response->error_status != SNMP_ERR_NOERROR)
-	{
-		sprintf(error_label, ERR_MSG_ERROR_STATUS,
-			error_status_string(response->error_status),
-			response->error_index);
-		snmp_errno = response->error_status;
-		return NULL;
-	}
-
-	x5dsaReferenceEntry = (X5dsaReferenceEntry *) malloc(sizeof(X5dsaReferenceEntry));
-	if(x5dsaReferenceEntry == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(x5dsaReferenceEntry, 0, sizeof(X5dsaReferenceEntry));
-
-	pointer = (uintptr_t) &(x5dsaReferenceEntry->x5dsaReferenceType);
-	variable = response->first_variable;
-	for(i = 0; i < x5dsaReferenceTable.column_num; i++)
-	{
-		column = x5dsaReferenceTable.columns[i];
-
-		if(variable == NULL)
-		{
-			sprintf(error_label, ERR_MSG_MISSING_VARIABLES);
-			x5dsaReferenceEntry_free(x5dsaReferenceEntry);
-			return NULL;
-		}
-
-		/* check oid and extract x5dsaReferenceIndex */
-		if(extract_one_index_from_column(&(variable->name), column->name, &x5dsaReferenceIndex))
-		{
-			snmp_errno = SNMP_ERR_NOSUCHNAME;
-			x5dsaReferenceEntry_free(x5dsaReferenceEntry);
-			return NULL;
-		}
-
-		/* check if all x5dsaReferenceIndex are equal ??? */
-		x5dsaReferenceEntry->x5dsaReferenceIndex = x5dsaReferenceIndex;
-
-		/* check type */
-		if(variable->type != column->type)
-		{
-			sprintf(error_label, ERR_MSG_BAD_VARIABLE_TYPE,
-				variable->type, column->label);
-			x5dsaReferenceEntry_free(x5dsaReferenceEntry);
-			return NULL;
-		}
-
-		if(translate_variable(variable, column->translator, pointer, error_label))
-		{
-			x5dsaReferenceEntry_free(x5dsaReferenceEntry);
-			return NULL;
-		}
-
-		variable = variable->next_variable;
-		pointer++;
-	}
-
-
-	return x5dsaReferenceEntry;
-}
-
-
-/***************************************************************/
-
-void x5dsaReferenceEntry_free(X5dsaReferenceEntry *x5dsaReferenceEntry)
-{
-	if(x5dsaReferenceEntry == NULL)
-	{
-		return;
-	}
-
-	if(x5dsaReferenceEntry->x5dsaReferenceNamingContext)
-	{
-		free(x5dsaReferenceEntry->x5dsaReferenceNamingContext);
-	}
-	if(x5dsaReferenceEntry->x5dsaReferenceSubordinate)
-	{
-		free(x5dsaReferenceEntry->x5dsaReferenceSubordinate);
-	}
-	if(x5dsaReferenceEntry->x5dsaReferenceName)
-	{
-		free(x5dsaReferenceEntry->x5dsaReferenceName);
-	}
-	free(x5dsaReferenceEntry);
-}
-
-
-/***************************************************************/
-
-void x5dsaReferenceEntry_print(X5dsaReferenceEntry *x5dsaReferenceEntry)
-{
-	printf("x5dsaReferenceIndex:                  %ld\n",
-		x5dsaReferenceEntry->x5dsaReferenceIndex);
-	printf("x5dsaReferenceType:                   %s\n",
-		x5dsaReferenceType_string(x5dsaReferenceEntry->x5dsaReferenceType));
-	printf("x5dsaReferenceNamingContext:          %s\n",
-		x5dsaReferenceEntry->x5dsaReferenceNamingContext);
-	printf("x5dsaReferenceSubordinate:            %s\n",
-		x5dsaReferenceEntry->x5dsaReferenceSubordinate);
-	printf("x5dsaReferenceName:                   %s\n",
-		x5dsaReferenceEntry->x5dsaReferenceName);
-	printf("\n");
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-char *
-applOperStatus_string(int32_t applOperStatus)
-{
-	static char buffer[20];
-
-	switch(applOperStatus)
-	{
-		case APPL_UP:
-			sprintf(buffer, "up");
-			break;
-		case APPL_DOWN:
-			sprintf(buffer, "down");
-			break;
-		case APPL_HALTED:
-			sprintf(buffer, "halted");
-			break;
-		case APPL_CONGESTED:
-			sprintf(buffer, "congested");
-			break;
-		case APPL_RESTARTING:
-			sprintf(buffer, "restarting");
-			break;
-		default:
-			sprintf(buffer, "unknown(%ld)", applOperStatus);
-			break;
-	}
-
-	return buffer;
-}
-
-
-/***************************************************************/
-
-char *
-assocApplicationType_string(int32_t assocApplicationType)
-{
-	static char buffer[20];
-
-	switch(assocApplicationType)
-	{
-		case ASSOC_UA_INITIATOR:
-			sprintf(buffer, "ua-initiator");
-			break;
-		case ASSOC_UA_RESPONDER:
-			sprintf(buffer, "ua-responder");
-			break;
-		case ASSOC_PEER_INITIATOR:
-			sprintf(buffer, "peer-initiator");
-			break;
-		case ASSOC_PEER_RESPONDER:
-			sprintf(buffer, "peer-responder");
-			break;
-		default:
-			sprintf(buffer, "unknown(%ld)", assocApplicationType);
-			break;
-	}
-
-	return buffer;
-}
-
-
-/***************************************************************/
-
-char *x5dsaReferenceType_string(int32_t x5dsaReferenceType)
-{
-	static char buffer[30];
-
-	switch(x5dsaReferenceType)
-	{
-		case REFERENCE_SUPERIOR:
-			sprintf(buffer, "superior");
-			break;
-		case REFERENCE_CROSS:
-			sprintf(buffer, "cross");
-			break;
-		case REFERENCE_SUBORDINATE:
-			sprintf(buffer, "subordinate");
-			break;
-		case REFERENCE_NON_SPECIFIC_SUBORDINATE:
-			sprintf(buffer, "non-specific-subordinate");
-			break;
-		default:
-			sprintf(buffer, "unknown(%ld)", x5dsaReferenceType);
-			break;
-	}
-
-	return buffer;
-}
-
-
-/***************************************************************/
-/***************************************************************/
-/***************************************************************/
-
-char *predefined_request_string(int predefined_id)
-{
-	static char buffer[50];
-
-	switch(predefined_id)
-	{
-		case SYSUPTIME_REQ:
-			sprintf(buffer, "sysUpTime");
-			break;
-		case APPL_ENTRY_REQ:
-			sprintf(buffer, "applEntry");
-			break;
-		case ASSOC_ENTRY_REQ:
-			sprintf(buffer, "assocEntry");
-			break;
-		case MTA_ENTRY_REQ:
-			sprintf(buffer, "mtaEntry");
-			break;
-		case MTA_GROUP_ENTRY_REQ:
-			sprintf(buffer, "mtaGroupEntry");
-			break;
-		case MTA_GROUP_ASSOCIATION_ENTRY_REQ:
-			sprintf(buffer, "mtaGroupAssociationEntry");
-			break;
-		case DSA_OPS_ENTRY_REQ:
-			sprintf(buffer, "dsaOpsEntry");
-			break;
-		case DSA_ENTRIES_ENTRY_REQ:
-			sprintf(buffer, "dsaEntriesEntry");
-			break;
-		case DSA_INT_ENTRY_REQ:
-			sprintf(buffer, "dsaIntEntry");
-			break;
-		case X4MS_MTA_ENTRY_REQ:
-			sprintf(buffer, "x4msMtaEntry");
-			break;
-		case X4MS_USER_ENTRY_PART1_REQ:
-			sprintf(buffer, "x4msUserEntryPart1");
-			break;
-		case X4MS_USER_ENTRY_PART2_REQ:
-			sprintf(buffer, "x4msUserEntryPart2");
-			break;
-		case X4MS_USER_ASSOCIATION_ENTRY_REQ:
-			sprintf(buffer, "x4msUserAssociationEntry");
-			break;
-		case X4GRP_ENTRY_REQ:
-			sprintf(buffer, "x4grpEntry");
-			break;
-		case X4GRP_MAPPING_ENTRY_REQ:
-			sprintf(buffer, "x4grpMappingEntry");
-			break;
-		case X5DSA_REFERENCE_ENTRY_REQ:
-			sprintf(buffer, "x5dsaReferenceEntry");
-			break;
-		default:
-			sprintf(buffer, "error(%d)", predefined_id);
-			break;
-	}
-
-	return buffer;
-}
-
-static int
-translate_variable(SNMP_variable *variable, int translator, uintptr_t pointer, char *error_label)
-{
-	error_label[0] = '\0';
-
-	switch(translator)
-	{
-		case TO_INTEGER:
-			*(long *)pointer = (long) *(variable->val.integer);
-			break;
-
-		case TO_ASCII: {
-			char ** ptr = ((char **)pointer);
-
-			*ptr = malloc(variable->val_len + 1);
-			if(*ptr == NULL) {
-				sprintf(error_label, ERR_MSG_ALLOC);
-				return -1;
-			}
-			memcpy(*ptr, variable->val.string, variable->val_len);
-			((char *) (*ptr))[variable->val_len] = '\0';
-			if(variable->val.string)
-			{
-				free(variable->val.string);
-				variable->val.string = NULL;
-			}
-			variable->val_len = NULL;
-			}
-
-			break;
-
-		case TO_STRING: {
-			char ** ptr = ((char **)pointer);
-
-			*ptr = malloc(sizeof(String));
-			if(*ptr == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				return -1;
-			}
-			((String *) *ptr)->len = variable->val_len;
-			((String *) *ptr)->chars = variable->val.string;
-			variable->val_len = 0;
-			variable->val.string = NULL;
-			}
-
-			break;
-
-		case TO_OID: {
-			Oid ** ptr = (Oid **)pointer;
-			*ptr = (Oid *)malloc(sizeof(Oid));
-			if(*ptr == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				return -1;
-			}
-			((Oid *) *ptr)->len = (variable->val_len) /
-				(int32_t)sizeof(Subid);
-			((Oid *) *ptr)->subids = variable->val.objid;
-			variable->val_len = 0;
-			variable->val.string = NULL;
-			}
-
-			break;
-	}
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-static int
-extract_one_index_from_column(Oid *instance, Oid *object, int32_t * index)
-{
-	if(instance->len != object->len + 1)
-		return -1;
-
-	if(memcmp(instance->subids, object->subids, object->len * (int32_t)sizeof(Subid)))
-		return -1;
-
-	*index = instance->subids[object->len];
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-static int
-extract_two_indexes_from_column(Oid *instance, Oid *object, int32_t *index1, int32_t *index2)
-{
-	if(instance->len != object->len + 2)
-		return -1;
-
-	if(memcmp(instance->subids, object->subids, object->len * sizeof(Subid)))
-		return -1;
-
-	*index1 = instance->subids[object->len];
-	*index2 = instance->subids[object->len + 1];
-
-	return 0;
-}
-
-
-/***************************************************************/
-
-static int
-extract_three_indexes_from_column(Oid *instance, Oid *object, int32_t *index1, int32_t *index2, int32_t *index3)
-{
-	if(instance->len != object->len + 3)
-		return -1;
-
-	if(memcmp(instance->subids, object->subids, object->len * sizeof(Subid)))
-		return -1;
-
-	*index1 = instance->subids[object->len];
-	*index2 = instance->subids[object->len + 1];
-	*index3 = instance->subids[object->len + 2];
-
-	return 0;
-}
-
--- a/usr/src/cmd/agents/snmp/snmplib/madman_api.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,547 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _MADMAN_API_H_
-#define _MADMAN_API_H_
-
-#include <sys/types.h>
-#include "snmp_api.h"
-
-
-/***** GLOBAL CONSTANTS *****/
-
-
-/* predefined request values */
-
-#define SYSUPTIME_REQ			1
-
-#define APPL_ENTRY_REQ			11
-#define ASSOC_ENTRY_REQ			12
-
-#define MTA_ENTRY_REQ			21
-#define MTA_GROUP_ENTRY_REQ		22
-#define MTA_GROUP_ASSOCIATION_ENTRY_REQ	23
-
-#define DSA_OPS_ENTRY_REQ		31
-#define DSA_ENTRIES_ENTRY_REQ		32
-#define DSA_INT_ENTRY_REQ		33
-
-#define X4MS_MTA_ENTRY_REQ		101
-#define X4MS_USER_ENTRY_PART1_REQ	102
-#define X4MS_USER_ENTRY_PART2_REQ	103
-#define X4MS_USER_ASSOCIATION_ENTRY_REQ	104
-
-#define X4GRP_ENTRY_REQ			201
-#define X4GRP_MAPPING_ENTRY_REQ		202
-
-#define X5DSA_REFERENCE_ENTRY_REQ	401
-
-
-/* applStatus values */
-
-#define APPL_UP			1
-#define APPL_DOWN		2
-#define APPL_HALTED		3
-#define APPL_CONGESTED		4
-#define APPL_RESTARTING		5
-
-
-/* assocApplicationType values */
-
-#define ASSOC_UA_INITIATOR	1
-#define ASSOC_UA_RESPONDER	2
-#define ASSOC_PEER_INITIATOR	3
-#define ASSOC_PEER_RESPONDER	4
-
-
-/* x5dsaReferenceType values */
-
-#define REFERENCE_SUPERIOR			1
-#define REFERENCE_CROSS				2
-#define REFERENCE_SUBORDINATE			3
-#define REFERENCE_NON_SPECIFIC_SUBORDINATE	4
-
-
-/***** GLOBAL TYPES *****/
-
-/**********/
-/* MIB II */
-/**********/
-
-typedef int32_t SysUpTime;
-
-
-/************/
-/* RFC 1565 */
-/************/
-
-typedef struct _ApplEntry {
-	int32_t	applIndex;
-	char	*applName;
-	char	*applDirectoryName;
-	char	*applVersion;
-	int32_t	applUptime;
-	int32_t	applOperStatus;
-	int32_t	applLastChange;
-	int32_t	applInboundAssociations;
-	int32_t	applOutboundAssociations;
-	int32_t	applAccumulatedInboundAssociations;
-	int32_t	applAccumulatedOutboundAssociations;
-	int32_t	applLastInboundActivity;
-	int32_t	applLastOutboundActivity;
-	int32_t	applRejectedInboundAssociations;
-	int32_t	applFailedOutboundAssociations;
-} ApplEntry;
-
-typedef struct _AssocEntry {
-	int32_t	applIndex;
-	int32_t	assocIndex;
-	char	*assocRemoteApplication;
-	Oid	*assocApplicationProtocol;
-	int32_t	assocApplicationType;
-	int32_t	assocDuration;
-} AssocEntry;
-
-
-/************/
-/* RFC 1566 */
-/************/
-
-typedef struct _MtaEntry {
-	int32_t	applIndex;
-	int32_t	mtaReceivedMessages;
-	int32_t	mtaStoredMessages;
-	int32_t	mtaTransmittedMessages;
-	int32_t	mtaReceivedVolume;
-	int32_t	mtaStoredVolume;
-	int32_t	mtaTransmittedVolume;
-	int32_t	mtaReceivedRecipients;
-	int32_t	mtaStoredRecipients;
-	int32_t	mtaTransmittedRecipients;
-} MtaEntry;
-
-typedef struct _MtaGroupEntry {
-	int32_t	applIndex;
-	int32_t	mtaGroupIndex;
-	int32_t	mtaGroupReceivedMessages;
-	int32_t	mtaGroupRejectedMessages;
-	int32_t	mtaGroupStoredMessages;
-	int32_t	mtaGroupTransmittedMessages;
-	int32_t	mtaGroupReceivedVolume;
-	int32_t	mtaGroupStoredVolume;
-	int32_t	mtaGroupTransmittedVolume;
-	int32_t	mtaGroupReceivedRecipients;
-	int32_t	mtaGroupStoredRecipients;
-	int32_t	mtaGroupTransmittedRecipients;
-	int32_t	mtaGroupOldestMessageStored;
-	int32_t	mtaGroupInboundAssociations;
-	int32_t	mtaGroupOutboundAssociations;
-	int32_t	mtaGroupAccumulatedInboundAssociations;
-	int32_t	mtaGroupAccumulatedOutboundAssociations;
-	int32_t	mtaGroupLastInboundActivity;
-	int32_t	mtaGroupLastOutboundActivity;
-	int32_t	mtaGroupRejectedInboundAssociations;
-	int32_t	mtaGroupFailedOutboundAssociations;
-	char	*mtaGroupInboundRejectionReason;
-	char	*mtaGroupOutboundConnectFailureReason;
-	int32_t	mtaGroupScheduledRetry;
-	Oid	*mtaGroupMailProtocol;
-	char	*mtaGroupName;
-} MtaGroupEntry;
-
-typedef struct _MtaGroupAssociationEntry {
-	int32_t	applIndex;
-	int32_t	mtaGroupIndex;
-	int32_t	mtaGroupAssociationIndex;
-} MtaGroupAssociationEntry;
-
-
-/************/
-/* RFC 1567 */
-/************/
-
-typedef struct _DsaOpsEntry {
-	int32_t	applIndex;
-	int32_t	dsaAnonymousBinds;
-	int32_t	dsaUnauthBinds;
-	int32_t	dsaSimpleAuthBinds;
-	int32_t	dsaStrongAuthBinds;
-	int32_t	dsaBindSecurityErrors;
-	int32_t	dsaInOps;
-	int32_t	dsaReadOps;
-	int32_t	dsaCompareOps;
-	int32_t	dsaAddEntryOps;
-	int32_t	dsaRemoveEntryOps;
-	int32_t	dsaModifyEntryOps;
-	int32_t	dsaModifyRDNOps;
-	int32_t	dsaListOps;
-	int32_t	dsaSearchOps;
-	int32_t	dsaOneLevelSearchOps;
-	int32_t	dsaWholeTreeSearchOps;
-	int32_t	dsaReferrals;
-	int32_t	dsaChainings;
-	int32_t	dsaSecurityErrors;
-	int32_t	dsaErrors;
-} DsaOpsEntry;
-
-typedef struct _DsaEntriesEntry {
-	int32_t	applIndex;
-	int32_t	dsaMasterEntries;
-	int32_t	dsaCopyEntries;
-	int32_t	dsaCacheEntries;
-	int32_t	dsaCacheHits;
-	int32_t	dsaSlaveHits;
-} DsaEntriesEntry;
-
-typedef struct _DsaIntEntry {
-	int32_t	applIndex;
-	int32_t	dsaIntIndex;
-	char	*dsaName;
-	int32_t	dsaTimeOfCreation;
-	int32_t	dsaTimeOfLastAttempt;
-	int32_t	dsaTimeOfLastSuccess;
-	int32_t	dsaFailuresSinceLastSuccess;
-	int32_t	dsaFailures;
-	int32_t	dsaSuccesses;
-} DsaIntEntry;
-
-
-/************/
-/* X4MS MIB */
-/************/
-
-typedef struct _X4msMtaEntry {
-	int32_t	x4msMtaIndex;
-	char	*x4msMtaName;
-} X4msMtaEntry;
-
-
-typedef struct _X4msUserTablePart1 {
-	int32_t	x4msUserIndex;
-	int32_t	x4msUserTotalMessages;
-	int32_t	x4msUserTotalVolume;
-	int32_t	x4msUserP3Associations;
-	int32_t	x4msUserP7Associations;
-	int32_t	x4msUserLastP7Association;
-	int32_t	x4msUserAuthentificationFailures;
-	char	*x4msUserAuthentificationFailureReason;
-	char	*x4msUserName;
-} X4msUserEntryPart1;
-
-typedef struct _X4msUserEntryPart2 {
-	int32_t	x4msUserIndex;
-	int32_t	x4msUserNewMessages;
-	int32_t	x4msUserNewVolume;
-	int32_t	x4msUserListedMessages;
-	int32_t	x4msUserListedVolume;
-	int32_t	x4msUserProcessedMessages;
-	int32_t	x4msUserProcessedVolume;
-	int32_t	x4msUserMessagesOlderThanWeek;
-	int32_t	x4msUserVolumeOlderThanWeek;
-	int32_t	x4msUserMessagesOlderThanMonth;
-	int32_t	x4msUserVolumeOlderThanMonth;
-	int32_t	x4msUserMessagesOlderThanYear;
-	int32_t	x4msUserVolumeOlderThanYear;
-	int32_t	x4msUserP3InboundAssociations;
-	int32_t	x4msUserP7InboundAssociations;
-	int32_t	x4msUserP3OutboundAssociations;
-	int32_t	x4msUserAccumulatedP3InboundAssociations;
-	int32_t	x4msUserAccumulatedP7InboundAssociations;
-	int32_t	x4msUserAccumulatedP3OutboundAssociations;
-	int32_t	x4msUserLastP3InboundActivity;
-	int32_t	x4msUserLastP7InboundActivity;
-	int32_t	x4msUserLastP3OutboundActivity;
-	int32_t	x4msUserRejectedP3InboundAssociations;
-	int32_t	x4msUserRejectedP7InboundAssociations;
-	int32_t	x4msUserFailedP3OutboundAssociations;
-	char	*x4msUserP3InboundRejectionReason;
-	char	*x4msUserP7InboundRejectionReason;
-	char	*x4msUserP3OutboundConnectFailureReason;
-	int32_t	x4msUserMtaIndex;
-	char	*x4msUserORName;
-} X4msUserEntryPart2;
-
-typedef struct _X4msUserAssociationEntry {
-	int32_t	x4msUserIndex;
-	int32_t	x4msUserAssociationIndex;
-} X4msUserAssociationEntry;
-
-
-/*************/
-/* X4GRP MIB */
-/*************/
-
-typedef struct _X4grpEntry {
-	int32_t	x4grpIndex;
-	char	*x4grpName;
-} X4grpEntry;
-
-
-typedef struct _X4grpMappingEntry {
-	int32_t	x4grpIndex;
-	int32_t	x4grpMappingMSIndex;
-	int32_t	x4grpMappingMTAIndex;
-} X4grpMappingEntry;
-
-
-/*************/
-/* X5DSA MIB */
-/*************/
-
-typedef struct _X5dsaReferenceEntry {
-	int32_t	x5dsaReferenceIndex;
-	int32_t	x5dsaReferenceType;
-	char	*x5dsaReferenceNamingContext;
-	char	*x5dsaReferenceSubordinate;
-	char	*x5dsaReferenceName;
-} X5dsaReferenceEntry;
-
-
-/***** GLOBAL VARIABLES *****/
-
-/* SMTP */
-extern Oid smtp_name;
-extern char smtp_string[];
-
-/* P1 */
-extern Oid id_ac_mts_transfer_name;
-extern char id_ac_mts_transfer_string[];
-
-/* P3 */
-extern Oid id_ac_mts_access_name;
-extern Oid id_ac_mts_forced_access_name;
-extern Oid id_ac_mts_reliable_access_name;
-extern Oid id_ac_mts_forced_reliable_access_name;
-
-/* P7 */
-extern Oid id_ac_ms_access_name;
-extern Oid id_ac_ms_reliable_access_name;
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-/**********/
-/* MIB II */
-/**********/
-
-/* SysUpTime */
-
-int sysUpTime_send_request(SNMP_session *session, char *error_label);
-SysUpTime *sysUpTime_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void sysUpTime_free(SysUpTime *sysUpTime);
-void sysUpTime_print(SysUpTime *sysUpTime);
-
-
-/************/
-/* RFC 1565 */
-/************/
-
-/* ApplEntry */
-
-int applEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t applIndex, char *error_label);
-ApplEntry *applEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void applEntry_free(ApplEntry *applEntry);
-void applEntry_print(ApplEntry *applEntry);
-
-/* AssocEntry */
-
-int assocEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t applIndex, int32_t assocIndex, char *error_label);
-AssocEntry *assocEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void assocEntry_free(AssocEntry *assocEntry);
-void assocEntry_print(AssocEntry *assocEntry);
-
-/* miscellaneous */
-
-char *applOperStatus_string(int32_t applStatus);
-char *assocApplicationType_string(int32_t applStatus);
-
-
-/************/
-/* RFC 1566 */
-/************/
-
-/* MtaEntry */
-
-int mtaEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t applIndex, char *error_label);
-MtaEntry *mtaEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void mtaEntry_free(MtaEntry *mtaEntry);
-void mtaEntry_print(MtaEntry *mtaEntry);
-
-/* MtaGroupEntry */
-
-int mtaGroupEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t applIndex, int32_t mtaGroupIndex, char *error_label);
-MtaGroupEntry *mtaGroupEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void mtaGroupEntry_free(MtaGroupEntry *mtaGroupEntry);
-void mtaGroupEntry_print(MtaGroupEntry *mtaGroupEntry);
-
-/* MtaGroupAssociationEntry */
-
-int mtaGroupAssociationEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t applIndex, int32_t mtaGroupIndex,
-	int32_t mtaGroupAssociationIndex, char *error_label);
-MtaGroupAssociationEntry *mtaGroupAssociationEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void mtaGroupAssociationEntry_free(MtaGroupAssociationEntry *mtaGroupAssociationEntry);
-void mtaGroupAssociationEntry_print(MtaGroupAssociationEntry *mtaGroupAssociationEntry);
-
-
-/************/
-/* RFC 1567 */
-/************/
-
-/* DsaOpsEntry */
-
-int dsaOpsEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t applIndex, char *error_label);
-DsaOpsEntry *dsaOpsEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void dsaOpsEntry_free(DsaOpsEntry *dsaOpsEntry);
-void dsaOpsEntry_print(DsaOpsEntry *dsaOpsEntry);
-
-/* DsaEntriesEntry */
-
-int dsaEntriesEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t applIndex, char *error_label);
-DsaEntriesEntry *dsaEntriesEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void dsaEntriesEntry_free(DsaEntriesEntry *dsaEntriesEntry);
-void dsaEntriesEntry_print(DsaEntriesEntry *dsaEntriesEntry);
-
-/* DsaIntEntry */
-
-int dsaIntEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t applIndex, int32_t dsaIntIndex, char *error_label);
-DsaIntEntry *dsaIntEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void dsaIntEntry_free(DsaIntEntry *dsaIntEntry);
-void dsaIntEntry_print(DsaIntEntry *dsaIntEntry);
-
-
-/************/
-/* X4MS MIB */
-/************/
-
-/* X4msMtaEntry */
-
-int x4msMtaEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t x4msMtaIndex, char *error_label);
-X4msMtaEntry *x4msMtaEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void x4msMtaEntry_free(X4msMtaEntry *x4msMtaEntry);
-void x4msMtaEntry_print(X4msMtaEntry *x4msMtaEntry);
-
-/* X4msUserEntryPart1 */
-
-int x4msUserEntryPart1_send_request(SNMP_session *session,
-	u_char request_type, int32_t x4msUserIndex, char *error_label);
-X4msUserEntryPart1 *x4msUserEntryPart1_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void x4msUserEntryPart1_free(X4msUserEntryPart1 *x4msUserEntryPart1);
-void x4msUserEntryPart1_print(X4msUserEntryPart1 *x4msUserEntryPart1);
-
-
-/* X4msUserEntryPart2 */
-
-int x4msUserEntryPart2_send_request(SNMP_session *session,
-	u_char request_type, int32_t x4msUserIndex, char *error_label);
-X4msUserEntryPart2 *x4msUserEntryPart2_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void x4msUserEntryPart2_free(X4msUserEntryPart2 *x4msUserEntryPart2);
-void x4msUserEntryPart2_print(X4msUserEntryPart2 *x4msUserEntryPart2);
-
-
-/* X4msUserAssociationEntry */
-
-int x4msUserAssociationEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t x4msUserIndex, int32_t x4msUserAssociationIndex, char *error_label);
-X4msUserAssociationEntry *x4msUserAssociationEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void x4msUserAssociationEntry_free(X4msUserAssociationEntry *x4msUserAssociationEntry);
-void x4msUserAssociationEntry_print(X4msUserAssociationEntry *x4msUserAssociationEntry);
-
-
-/*************/
-/* X4GRP MIB */
-/*************/
-
-/* X4grpEntry */
-
-int x4grpEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t x4grpIndex, char *error_label);
-X4grpEntry *x4grpEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void x4grpEntry_free(X4grpEntry *x4grpEntry);
-void x4grpEntry_print(X4grpEntry *x4grpEntry);
-
-/* X4grpMappingEntry */
-
-int x4grpMappingEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t x4grpIndex, int32_t x4grpMappingMSIndex,
-	int32_t x4grpMappingMTAIndex, char *error_label);
-X4grpMappingEntry *x4grpMappingEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void x4grpMappingEntry_free(X4grpMappingEntry *x4grpMappingEntry);
-void x4grpMappingEntry_print(X4grpMappingEntry *x4grpMappingEntry);
-
-
-/*************/
-/* X5DSA MIB */
-/*************/
-
-/* X5dsaReferenceEntry */
-
-int x5dsaReferenceEntry_send_request(SNMP_session *session,
-	u_char request_type, int32_t x5dsaReferenceIndex, char *error_label);
-X5dsaReferenceEntry *x5dsaReferenceEntry_process_response(SNMP_session *session,
-	SNMP_pdu *response, char *error_label);
-void x5dsaReferenceEntry_free(X5dsaReferenceEntry *x5dsaReferenceEntry);
-void x5dsaReferenceEntry_print(X5dsaReferenceEntry *x5dsaReferenceEntry);
-
-/* miscellaneous */
-
-char *x5dsaReferenceType_string(int32_t x5dsaReferenceType);
-
-
-/*****************/
-/* miscellaneous */
-/*****************/
-
-char *predefined_request_string(int predefined_id);
-
-
-#endif
-
--- a/usr/src/cmd/agents/snmp/snmplib/madman_trap.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-#include "madman_trap.h"
-
-
-/***** LOCAL CONSTANTS *****/
-
-
-/***** LOCAL VARIABLES *****/
-
-static Subid applName_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 2, 0 };
-static Oid applName_name = { applName_subids, 11 };
-
-static Subid applOperStatus_subids[] = { 1, 3, 6, 1, 2, 1, 27, 1, 1, 6, 0 };
-static Oid applOperStatus_name = { applOperStatus_subids, 11 };
-
-static Subid alarmId_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 3, 1, 0 };
-static Oid alarmId_name = { alarmId_subids, 13 };
-
-static Subid alarmSeverity_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 3, 2, 0 };
-static Oid alarmSeverity_name = { alarmSeverity_subids, 13 };
-
-static Subid alarmDescr_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 2, 3, 3, 0 };
-static Oid alarmDescr_name = { alarmDescr_subids, 13 };
-
-
-/***********************************************************************/
-
-void send_trap_appl_status_changed(int applIndex, char *applName, int applOperStatus)
-{
-	SNMP_variable *list = NULL;
-        SNMP_value value;
-
-
-	/* applName */
-	value.v_string.chars = (u_char *) applName;
-	if(applName == NULL)
-		value.v_string.len = 0;
-	else
-		/* LINTED */
-		value.v_string.len = (int32_t)strlen(applName);
-	applName_name.subids[applName_name.len - 1] = applIndex;
-	list = snmp_typed_variable_append(list, &applName_name,
-		STRING, &value, error_label);
-	if(list == NULL)
-	{
-                error("send_trap_appl_status_changed(%d, %s, %d) failed: %s",
-			applIndex, applName, applOperStatus,
-			error_label);
-		return;
-	}
-
-
-	/* applOperStatus */
-	value.v_integer = applOperStatus;
-	applOperStatus_name.subids[applOperStatus_name.len - 1] = applIndex;
-	list = snmp_typed_variable_append(list, &applOperStatus_name,
-		INTEGER, &value, error_label);
-	if(list == NULL)
-	{
-                error("send_trap_appl_status_changed(%d, %s, %d) failed: %s",
-			applIndex, applName, applOperStatus,
-			error_label);
-		return;
-	}
-
-
-	if(trap_send_to_all_destinators(NULL,
-		SNMP_TRAP_ENTERPRISESPECIFIC, TRAP_APPL_ALARM,
-		list, error_label))
-        {
-                error("send_trap_appl_status_changed(%d, %s, %d) failed: %s",
-			applIndex, applName, applOperStatus,
-			error_label);
-        	snmp_variable_list_free(list);
-                return;
-        }
-        snmp_variable_list_free(list);
- 
- 
-        return;
-}
-
-
-/***********************************************************************/
-
-void send_trap_appl_alarm(int applIndex, char *applName, int alarmId, int alarmSeverity, char *alarmDescr)
-{
-	SNMP_variable *list = NULL;
-        SNMP_value value;
-
-
-	/* applName */
-	value.v_string.chars = (u_char *) applName;
-	if(applName == NULL)
-		value.v_string.len = 0;
-	else
-		/* LINTED */
-		value.v_string.len = (int32_t)strlen(applName);
-	applName_name.subids[applName_name.len - 1] = applIndex;
-	list = snmp_typed_variable_append(list, &applName_name,
-		STRING, &value, error_label);
-	if(list == NULL)
-	{
-                error("send_trap_appl_alarm(%d, %s, %d, %d, %s) failed: %s",
-			applIndex, applName, alarmId, alarmSeverity, alarmDescr,
-			error_label);
-		return;
-	}
-
-
-	/* alarmId */
-	value.v_integer = alarmId;
-	list = snmp_typed_variable_append(list, &alarmId_name,
-			INTEGER, &value, error_label);
-	if(list == NULL)
-	{
-                error("send_trap_appl_alarm(%d, %s, %d, %d, %s) failed: %s",
-			applIndex, applName, alarmId, alarmSeverity, alarmDescr,
-			error_label);
-		return;
-	}
-
-
-	/* alarmSeverity */
-	value.v_integer = alarmSeverity;
-	list = snmp_typed_variable_append(list, &alarmSeverity_name,
-		INTEGER, &value, error_label);
-	if(list == NULL)
-	{
-                error("send_trap_appl_alarm(%d, %s, %d, %d, %s) failed: %s",
-			applIndex, applName, alarmId, alarmSeverity, alarmDescr,
-			error_label);
-		return;
-	}
-
-
-	/* alarmDescr */
-	value.v_string.chars = (u_char *) alarmDescr;
-	if(alarmDescr == NULL)
-		value.v_string.len = 0;
-	else
-		/* LINTED */
-		value.v_string.len = (int32_t)strlen(alarmDescr);
-	list = snmp_typed_variable_append(list, &alarmDescr_name,
-		STRING, &value, error_label);
-	if(list == NULL)
-	{
-                error("send_trap_appl_alarm(%d, %s, %d, %d, %s) failed: %s",
-			applIndex, applName, alarmId, alarmSeverity, alarmDescr,
-			error_label);
-		return;
-	}
-
-
-	if(trap_send_to_all_destinators(NULL,
-		SNMP_TRAP_ENTERPRISESPECIFIC, TRAP_APPL_ALARM,
-		list, error_label))
-        {
-                error("send_trap_appl_alarm(%d, %s, %d, %d, %s) failed: %s",
-			applIndex, applName, alarmId, alarmSeverity, alarmDescr,
-			error_label);
-        	snmp_variable_list_free(list);
-                return;
-        }
-        snmp_variable_list_free(list);
- 
- 
-        return;
-}
-
-
-/***********************************************************************/
-
-char *alarmSeverity_string(int severity)
-{
-	static char buffer[20] = "";
-
-
-	switch(severity)
-	{
-		case SEVERITY_LOW:
-			sprintf(buffer, "low");
-			break;
-		case SEVERITY_MEDIUM:
-			sprintf(buffer, "medium");
-			break;
-		case SEVERITY_HIGH:
-			sprintf(buffer, "high");
-			break;
-		default:
-			sprintf(buffer, "unknown(%d)", severity);
-			break;
-	}
-
-	return buffer;
-}
-
-
--- a/usr/src/cmd/agents/snmp/snmplib/madman_trap.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MADMAN_TRAP_H_
-#define _MADMAN_TRAP_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/***** GLOBAL CONSTANTS *****/
-
-
-/* specific trap numbers */
-
-#define TRAP_APPL_ALARM			1
-#define TRAP_MTA_ALARM			2
-#define TRAP_MSG_ALARM			3
-
-
-/* alarm severity */
-
-#define SEVERITY_LOW			1
-#define SEVERITY_MEDIUM			2
-#define SEVERITY_HIGH			3
-
-
-/***** GLOBAL FUNCTIONS ******/
-
-extern void send_trap_appl_status_changed(int applIndex, char *applName, int applOperStatus);
-extern void send_trap_appl_alarm(int applIndex, char *applName, int alarmId, int alarmSeverity, char *alarmDescr);
-
-extern char *alarmSeverity_string(int severity);
-
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmplib/pdu.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1685 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <errno.h>
-#include <syslog.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <nlist.h>
-#include <sys/uio.h>
-#include "snmp_msg.h"
-#include "impl.h"
-#include "trace.h"
-#include "asn1.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "error.h"
-
-/***** LOCAL CONSTANTS *****/
-
-/*It is practically feasible to have a packet up to around 9k bytes (less than 9.5k).*/
-#define PACKET_LENGTH		9500             /* The SNMP recommendation is 1500! */
-#define COMMUNITY_LENGTH	128
-
-
-/***** LOCAL VARIABLES *****/
-
-static char static_error_label[500] = "";
-
-
-/***** LOCAL FUNCTIONS *****/
-
-static void trace_packet(u_char *packet, int length);
-static void trace_snmp_variable(SNMP_variable *variable);
-
-static SNMP_pdu *snmp_pdu_decode(u_char *packet, int length, char *error_label);
-static SNMP_variable *snmp_pdu_decode_variable(u_char **data, int *length, char *error_label);
-static int snmp_pdu_encode(SNMP_pdu *pdu, u_char *packet, int *length, char *error_label);
-static u_char *snmp_pdu_encode_variable(SNMP_variable *variable, u_char *data, int *length, char *error_label);
-
-static void shift_array(u_char *begin, int length, int shift_amount);
-
-
-/********************************************************************/
-
-SNMP_variable *snmp_variable_new(char *error_label)
-{
-	SNMP_variable *new;
-
-
-	error_label[0] = '\0';
-
-	new = (SNMP_variable *) malloc(sizeof(SNMP_variable));
-	if(new == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	memset(new, 0, sizeof(SNMP_variable));
-
-	return new;
-}
-
-
-/********************************************************************/
-
-SNMP_variable *snmp_typed_variable_new(Oid *name, u_char type, SNMP_value *value, char *error_label)
-{
-	SNMP_variable *new;
-
-
-	error_label[0] = '\0';
-
-	if(name == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_typed_variable_new(): name is NULL");
-		return NULL;
-	}
-
-	if(value == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_typed_variable_new(): value is NULL");
-		return NULL;
-	}
-
-	new = snmp_variable_new(error_label);
-	if(new == NULL)
-	{
-		return NULL;
-	}
-
-	/* name */
-	if(SSAOidCpy(&(new->name), name, error_label))
-	{
-		snmp_variable_free(new);
-		return NULL;
-	}
-
-	/* type */
-	new->type = type;
-
-	/* val, val_len */
-	switch(type)
-	{
-		case INTEGER:
-		case COUNTER:
-		case GAUGE:
-		case TIMETICKS:
-			new->val.integer = (int *) malloc(sizeof(int));
-			if(new->val.integer == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				snmp_variable_free(new);
-				return NULL;
-			}
-
-			*(new->val.integer) = value->v_integer;
-
-			new->val_len = sizeof(int32_t);
-
-			break;
-
-		case IPADDRESS:
-		case OPAQUE:
-		case STRING:
-			new->val.string = (u_char *) malloc(value->v_string.len);
-			if(new->val.string == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				snmp_variable_free(new);
-				return NULL;
-			}
-
-			memcpy(new->val.string,
-				value->v_string.chars,
-				value->v_string.len);
-
-			new->val_len = value->v_string.len;
-
-			break;
-
-		case OBJID:
-			new->val.objid = (Subid *) malloc(value->v_oid.len * sizeof(Subid));
-			if(new->val.objid == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				snmp_variable_free(new);
-				return NULL;
-			}
-
-/* Should * sizeof(Subid), yiru's fix*/
-			memcpy(new->val.objid,
-				value->v_oid.subids,
-				value->v_oid.len*sizeof(Subid));
-
-			new->val_len = value->v_oid.len * (int32_t)sizeof(Subid);
-
-			break;
-
-		default:
-			sprintf(error_label, "BUG: snmp_typed_variable_new(): unsupported type (0x%x)", type);
-			snmp_variable_free(new);
-			return NULL;
-	}
-
-
-	return new;
-}
-
-
-/********************************************************************/
-
-SNMP_variable *snmp_typed_variable_append(SNMP_variable *list, Oid *name, u_char type, SNMP_value *value, char *error_label)
-{
-	SNMP_variable *new;
-
-
-	error_label[0] = '\0';
-
-	new = snmp_typed_variable_new(name, type, value, error_label);
-	if(new == NULL)
-	{
-		snmp_variable_list_free(list);
-		return NULL;
-	}
-
-	if(list == NULL)
-	{
-		list = new;
-	}
-	else
-	{
-		SNMP_variable *last = NULL;
-		SNMP_variable *v;
-
-		
-		for(v = list; v; v = v->next_variable)
-		{
-			last = v;
-		}
-
-		last->next_variable = new;
-	}
-
-
-	return list;
-}
-
-
-/********************************************************************/
-
-SNMP_pdu *snmp_pdu_new(char *error_label)
-{
-	SNMP_pdu *new;
-
-
-	error_label[0] = '\0';
-
-	new = (SNMP_pdu *) malloc(sizeof(SNMP_pdu));
-	if(new == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	new->community = NULL;
-	new->enterprise.subids = NULL;
-	new->enterprise.len = 0;
-	new->first_variable = NULL;
-
-
-	new->version = 0;
-	new->type = 0;
-
-	new->request_id = 0;
-	new->error_status = 0;
-	new->error_index = 0;
-
-	new->ip_agent_addr.s_addr = 0;
-	new->generic = 0;
-	new->specific = 0;
-	new->time_stamp = 0;
-
-
-	return new;
-}
-
-
-/********************************************************************/
-
-SNMP_pdu *snmp_pdu_receive(int sd, Address *address, char *error_label)
-{
-	SNMP_pdu *pdu;
-	u_char * packet;
-	int length;
-	socklen_t address_length;
-	Address network_address;
-
-
-	error_label[0] = '\0';
-
-	packet = (u_char *) malloc (PACKET_LENGTH * sizeof (u_char));
-	if (packet == NULL) {
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return NULL;
-	}
-	address_length = (socklen_t) sizeof(Address);
-	/* LINTED */
-	length = (int)recvfrom(sd, (char *) packet, PACKET_LENGTH, 0,
-		(struct sockaddr *) &network_address, &address_length);
-	if(length == -1)
-	{
-		sprintf(error_label, ERR_MSG_RECVFROM, errno_string());
-		free (packet);
-		return NULL;
-	}
-	address->sin_family = network_address.sin_family;
-	address->sin_addr.s_addr = network_address.sin_addr.s_addr;
-	address->sin_port = htons(network_address.sin_port);
-
-	if(trace_flags & TRACE_TRAFFIC)
-	{
-		trace("<< received %d bytes from %s\n\n",
-			length, address_string(address));
-	}
-
-	if(trace_flags & TRACE_PACKET)
-	{
-		trace_packet(packet, length);
-	}
-
-	pdu = snmp_pdu_decode(packet, length, error_label);
-	free (packet);
-	if(pdu == NULL)
-	{
-		return NULL;
-	}
-
-	if(trace_flags & TRACE_PDU)
-	{
-		trace_snmp_pdu(pdu);
-	}
-
-
-	return pdu;
-}
-
-
-/********************************************************************/
-
-/* this function does not close sd and does not free pdu */
-
-int snmp_pdu_send(int sd, Address *address, SNMP_pdu *pdu, char *error_label)
-{
-	u_char *packet;
-	int length = PACKET_LENGTH;
-	int bytes;
-	Address network_address;
-
-
-	packet = (u_char *) malloc (PACKET_LENGTH * sizeof (u_char));
-	if (packet == NULL) {
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return -1;
-	}
-	error_label[0] = '\0';
-
-	if(pdu == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_pdu_send(): pdu is NULL");
-		return -1;
-	}
-
-	if(address == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_pdu_send(): address is NULL");
-		free (packet);
-		return -1;
-	}
-
-	if(trace_flags & TRACE_PDU)
-	{
-		trace_snmp_pdu(pdu);
-	}
-
-	if(snmp_pdu_encode(pdu, packet, &length, error_label))
-	{
-		free (packet);
-		return -1;
-	}
-
-	if(trace_flags & TRACE_PACKET)
-	{
-		trace_packet(packet, length);
-	}
-
-	network_address.sin_family = AF_INET;
-	network_address.sin_addr.s_addr = address->sin_addr.s_addr;
-	network_address.sin_port = htons(address->sin_port);
-
-	/* LINTED */
-	bytes = (int)sendto(sd, (char *) packet, length, 0,
-		(struct sockaddr *) &network_address, sizeof(Address));
-	free (packet);
-	if(bytes == -1)
-	{
-		sprintf(error_label, ERR_MSG_SENDTO);
-		return -1;
-	}
-
-	if(trace_flags & TRACE_TRAFFIC)
-	{
-		trace(">> sent %d bytes to %s\n\n",
-			length, address_string(address));
-	}
-
-
-	return 0;
-}
-
-
-/********************************************************************/
-
-void snmp_pdu_free(SNMP_pdu *pdu)
-{
-	if(pdu == NULL)
-	{
-		return;
-	}
-
-	if(pdu->community)
-	{
-		free(pdu->community);
-	}
-	if(pdu->enterprise.subids)
-	{
-		free(pdu->enterprise.subids);
-	}
-
-	snmp_variable_list_free(pdu->first_variable);
-
-	free(pdu);
-}
-
-
-/********************************************************************/
-
-void snmp_variable_list_free(SNMP_variable *variable_list)
-{
-	while(variable_list)
-	{
-		SNMP_variable *v;
-
-		v = variable_list->next_variable;
-		snmp_variable_free(variable_list);
-		variable_list = v;
-	}
-}
-
-
-/********************************************************************/
-
-void snmp_variable_free(SNMP_variable *variable)
-{
-	if(variable == NULL)
-	{
-		return;
-	}
-
-	if(variable->name.subids)
-	{
-		free(variable->name.subids);
-	}
-
-	if(variable->val.string)
-	{
-		free(variable->val.string);
-	}
-
-	free(variable);
-}
-
-
-/********************************************************************/
-
-static void trace_packet(u_char *packet, int length)
-{
-	int count;
-
-
-	trace("PACKET:\n");
-	trace("-------\n");
-	for(count = 0; count < length; count++)
-	{
-		trace("%02X ", packet[count]);
-		if((count % 16) == 15)
-		{
-			trace("\n");
-		}
-	}
-	trace("\n\n");
-}
-
-
-/********************************************************************/
-
-void trace_snmp_pdu(SNMP_pdu *pdu)
-{
-	SNMP_variable *variable;
-
-
-	trace("PDU:\n");
-	trace("----\n");
-	if(pdu == NULL)
-	{
-		trace("pdu is NULL!\n\n");
-		return;
-	}
-
-	trace("version:      %d\n", pdu->version);
-	trace("community:    %s\n", pdu->community? pdu->community: "NULL");
-
-	trace("type:         %s\n", pdu_type_string(pdu->type));
-
-	switch(pdu->type)
-	{
-		case GET_REQ_MSG:
-		case GETNEXT_REQ_MSG:
-		case GET_RSP_MSG:
-		case SET_REQ_MSG:
-			trace("request id:   %d\n", pdu->request_id);
-			trace("error status: %s\n",
-				error_status_string(pdu->error_status));
-			trace("error index:  %d\n", pdu->error_index);
-			break;
-
-		case TRP_REQ_MSG:
-			trace("enterprise:   %s\n",
-				SSAOidString(&(pdu->enterprise)));
-			trace("IP agent addr: %s\n",
-				ip_address_string(&(pdu->ip_agent_addr)));
-			trace("generic:      %s\n",
-				generic_trap_string(pdu->generic));
-			trace("specific:     %d\n", pdu->specific);
-			trace("time stamp:   %d\n", pdu->time_stamp);
-			break;
-
-		default:
-			trace("\n");
-			return;
-	}
-
-	variable = pdu->first_variable;
-	while(variable)
-	{
-		trace("--------------------------------------------------\n");
-		trace_snmp_variable(variable);
-		variable = variable->next_variable;
-	}
-	trace("--------------------------------------------------\n\n");
-}
-
-
-/********************************************************************/
-
-static void trace_snmp_variable(SNMP_variable *variable)
-{
-	Oid oid;
-	int i;
-
-
-	if(variable == NULL)
-	{
-		trace("variable is NULL\n");
-	}
-
-/*
-	trace("variable 0x%x\n", variable);
-	trace("next     0x%x\n", variable->next_variable);
-*/
-	trace("name:    %s\n", SSAOidString(&(variable->name)));
-	trace("type:    %s\n", asn1_type_string(variable->type));
-	trace("length:  %d\n", variable->val_len);
-	trace("value:   ");
-	switch(variable->type)
-	{
-		case INTEGER:
-		case COUNTER:
-		case GAUGE:
-		case TIMETICKS:
-			trace("%d\n", *(variable->val.integer));
-			break;
-
-
-		case IPADDRESS:
-			if(variable->val_len != 4)
-			{
-				trace("val_len should be 4! (%d)\n", variable->val_len);
-			}
-			else
-			{
-				IPAddress ip_address;
-
-				ip_address.s_addr = *(variable->val.integer);
-				trace("%s\n", ip_address_string(&ip_address));
-			}
-			break;
-
-		case OBJID:
-			oid.subids = variable->val.objid;
-			oid.len = variable->val_len / (int32_t)sizeof(Subid);
-			trace("%s\n", SSAOidString(&oid));
-			break;
-
-		case STRING:
-		case OPAQUE:
-		case NULLOBJ:
-		default:
-			for(i = 0; i < variable->val_len; i++)
-			{
-				trace("%c", variable->val.string[i]);
-			}
-			trace(" ( ");
-			for(i = 0; i < variable->val_len; i++)
-			{
-				trace("%02x ", variable->val.string[i]);
-			}
-			trace(")\n");
-			break;
-	}
-}
-
-
-/********************************************************************/
-
-/*
- *	Parses the packet and places the data into the pdu.
- *	If any errors are encountered, NULL is returned.
- */
-
-static SNMP_pdu *snmp_pdu_decode(u_char *packet, int packet_length, char *error_label)
-{
-	u_char *data = packet;
-	int length = packet_length;
-	u_char type;
-	int len;
-	Subid subids[MAX_OID_LEN];
-	SNMP_pdu *pdu;
-	SNMP_variable *last_variable = NULL;
-	char community[COMMUNITY_LENGTH + 1];
-
-
-	error_label[0] = '\0';
-
-	pdu = snmp_pdu_new(error_label);
-	if(pdu == NULL)
-	{
-		return NULL;
-	}
-
-/* header of message */
-	data = asn_parse_header(data, (uint32_t *)&length, &type, static_error_label);
-	if(data == NULL)
-	{
-		sprintf(error_label, "Decode the header of message failed: %s",
-			static_error_label);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-	if(type != (ASN_SEQUENCE | ASN_CONSTRUCTOR))
-	{
-		sprintf(error_label, "The message has a wrong header type (0x%x)", type);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-
-/* version */
-	data = asn_parse_int(data, (uint32_t *)&length, &type, (int32_t *) &pdu->version,
-		sizeof(pdu->version), static_error_label);
-	if(data == NULL)
-	{
-		sprintf(error_label, "Decode the version failed: %s",
-			static_error_label);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-	if(pdu->version != SNMP_VERSION_1)
-	{
-		sprintf(error_label, "The message has a wrong version (%d)",
-			pdu->version);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-
-/* parse community */
-	len = COMMUNITY_LENGTH;
-	data = asn_parse_string(data, (uint32_t *)&length, &type, (u_char *) community,
-		(uint32_t *)&len, static_error_label);
-	if(data == NULL)
-	{
-		sprintf(error_label, "Decode the community failed: %s",
-			static_error_label);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-	community[len] = '\0';
-	pdu->community = strdup(community);
-	if(pdu->community == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-
-/* header od pdu */
-	data = asn_parse_header(data, (uint32_t *)&length, &type, static_error_label);
-	if(data == NULL)
-	{
-		sprintf(error_label, "Decode the header of pdu failed: %s",
-			static_error_label);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-	pdu->type = type;
-
-
-	switch(pdu->type)
-	{
-		case GET_REQ_MSG:
-		case GETNEXT_REQ_MSG:
-		case GET_RSP_MSG:
-		case SET_REQ_MSG:
-
-		/* request id */
-			data = asn_parse_int(data, (uint32_t *)&length, &type, (int32_t *) &pdu->request_id,
-				sizeof(pdu->request_id), static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Decode the request id failed: %s",
-					static_error_label);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-
-		/* error status */
-			data = asn_parse_int(data, (uint32_t *)&length, &type, (int32_t *) &pdu->error_status,
-				sizeof(pdu->error_status), static_error_label);
-			if (data == NULL)
-			{
-				sprintf(error_label, "Decode the error status failed: %s",
-					static_error_label);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-
-		/* error index */
-			data = asn_parse_int(data, (uint32_t *)&length, &type, (int32_t *)&pdu->error_index,
-				sizeof(pdu->error_index), static_error_label);
-			if (data == NULL)
-			{
-				sprintf(error_label, "Decode the error index failed: %s",
-					static_error_label);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-
-			break;
-
-
-		case TRP_REQ_MSG:
-
-		/* enterprise */
-			pdu->enterprise.len = MAX_OID_LEN;
-			data = asn_parse_objid(data, (uint32_t *)&length, &type, subids,
-				&pdu->enterprise.len, static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Decode the enterprise failed: %s",
-					static_error_label);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-			pdu->enterprise.subids = (Subid *) malloc(pdu->enterprise.len * sizeof(Subid));
-			if(pdu->enterprise.subids == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-			memcpy(pdu->enterprise.subids, subids, pdu->enterprise.len * sizeof(Subid));
-
-		/* agent address */
-			len = 4;
-			data = asn_parse_string(data, (uint32_t *)&length, &type,
-				(u_char *)&pdu->ip_agent_addr.s_addr, (uint32_t *)&len, static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Decode the agent address failed: %s",
-					static_error_label);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-
-		/* generic trap */
-			data = asn_parse_int(data, (uint32_t *)&length, &type, (int32_t *)&pdu->generic,
-				sizeof(pdu->generic), static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Decode the generic trap failed: %s",
-					static_error_label);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-
-		/* specific trap */
-			data = asn_parse_int(data, (uint32_t *)&length, &type, (int32_t *)&pdu->specific,
-				sizeof(pdu->specific), static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Decode the specific trap failed: %s",
-					static_error_label);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-
-		/* time stamp */
-			data = asn_parse_unsigned_int(data, (uint32_t *)&length, &type, (int32_t *)&pdu->time_stamp,
-				sizeof(pdu->time_stamp), static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Decode the time stamp failed: %s",
-					static_error_label);
-				snmp_pdu_free(pdu);
-				return NULL;
-			}
-
-			break;
-
-
-		default:
-			sprintf(error_label, "The type of the pdu is wrong (%d)", pdu->type);
-			snmp_pdu_free(pdu);
-			return NULL;
-	}
-
-
-/* header of variables */
-	data = asn_parse_header(data, (uint32_t *)&length, &type, static_error_label);
-	if(data == NULL)
-	{
-		sprintf(error_label, "Decode the header of the variables failed: %s",
-			static_error_label);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-	if(type != (ASN_SEQUENCE | ASN_CONSTRUCTOR))
-	{
-		sprintf(error_label, "The header of the variables has a wrong type (%x)", type);
-		snmp_pdu_free(pdu);
-		return NULL;
-	}
-
-
-
-	while(length > 0)
-	{
-		SNMP_variable *variable;
-
-
-		variable = snmp_pdu_decode_variable(&data , &length, error_label);
-		if(variable == NULL)
-		{
-			snmp_pdu_free(pdu);
-			return NULL;
-		}
-
-		if(pdu->first_variable == NULL)
-		{
-			pdu->first_variable = variable;
-		}
-		else
-		{
-			last_variable->next_variable = variable;
-		}
-		last_variable = variable;
-
-	} /* while */
-
-
-	return pdu;
-}
-
-
-/********************************************************************/
-
-static SNMP_variable *snmp_pdu_decode_variable(u_char **data, int *length, char *error_label)
-{
-	u_char *d = *data;
-	u_char *value_start;
-	int len = *length;
-	SNMP_variable *variable;
-	u_char type;
-	Subid subids[MAX_OID_LEN];
-
-
-	error_label[0] = '\0';
-
-	variable = snmp_variable_new(error_label);
-	if(variable == NULL)
-	{
-		return NULL;
-	}
-
-
-/* header of variable */
-	d = asn_parse_header(d, (uint32_t *)&len, &type, static_error_label);
-	if(d == NULL)
-	{
-		sprintf(error_label, "Decode the header of a variable failed: %s",
-			static_error_label);
-		snmp_variable_free(variable);
-		return NULL;
-	}
-	if(type != (ASN_SEQUENCE | ASN_CONSTRUCTOR))
-	{
-		sprintf(error_label, "The header of a variable has a wrong type (%x)", type);
-		snmp_variable_free(variable);
-		return NULL;
-	}
-
-
-/* name */
-	variable->name.len = MAX_OID_LEN;
-	d = asn_parse_objid(d, (uint32_t *)&len, &type, subids, &(variable->name.len), static_error_label);
-	if(d == NULL)
-	{
-		sprintf(error_label, "Decode the name of a variable failed: %s",
-			static_error_label);
-		snmp_variable_free(variable);
-		return NULL;
-	}
-	if(type != (u_char) OBJID)
-	{
-		sprintf(error_label, "The name of a variable has wrong type (%x)", type);
-		snmp_variable_free(variable);
-		return NULL;
-	}
-	variable->name.subids = (Subid *) malloc(variable->name.len * sizeof(Subid));
-	if(variable->name.subids == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_variable_free(variable);
-		return NULL;
-	}
-	memcpy(variable->name.subids, subids, variable->name.len * sizeof(Subid));
-
-
-/* find out what type of object this is */
-	variable->val_len = len;
-	value_start = d;
-	d = asn_parse_header(d, (uint32_t *)&variable->val_len, &variable->type, static_error_label);
-	if(d == NULL)
-	{
-		sprintf(error_label, "Decode the type of a variable failed: %s",
-			static_error_label);
-		snmp_variable_free(variable);
-		return NULL;
-	}
-
-	switch(variable->type)
-	{
-		case INTEGER:
-		case COUNTER:
-		case GAUGE:
-		case TIMETICKS:
-			variable->val.integer = (int32_t *) malloc(sizeof(int32_t));
-			if(variable->val.integer == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				snmp_variable_free(variable);
-				return NULL;
-			}
-			variable->val_len = sizeof(int32_t);
-			d = asn_parse_unsigned_int(value_start, (uint32_t *)&len, &variable->type,
-				(int32_t *)variable->val.integer, sizeof(int32_t), static_error_label);
-			if(d == NULL)
-			{
-				sprintf(error_label, "Decode a variable of type integer failed: %s",
-					static_error_label);
-				snmp_variable_free(variable);
-				return NULL;
-			}
-			break;
-
-		case STRING:
-		case IPADDRESS:
-		case OPAQUE:
-			variable->val.string = (u_char *) malloc(variable->val_len);
-			if(variable->val.string == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				snmp_variable_free(variable);
-				return NULL;
-			}
-			d = asn_parse_string(value_start, (uint32_t *)&len, &variable->type,
-				variable->val.string, (uint32_t *)&variable->val_len, static_error_label);
-			if(d == NULL)
-			{
-				sprintf(error_label, "Decode a variable of type octet string failed: %s",
-					static_error_label);
-				snmp_variable_free(variable);
-				return NULL;
-			}
-			break;
-
-		case OBJID:
-			variable->val_len = MAX_OID_LEN;
-			d = asn_parse_objid(value_start, (uint32_t *)&len, &variable->type,
-				subids, &variable->val_len, static_error_label);
-			if(d == NULL)
-			{
-				sprintf(error_label, "Decode a variable of type object identifier failed: %s",
-					static_error_label);
-				snmp_variable_free(variable);
-				return NULL;
-			}
-			variable->val_len = variable->val_len * (int32_t)sizeof(Subid);
-			variable->val.objid = (Subid *) malloc(variable->val_len);
-			if(variable->val.objid == NULL)
-			{
-				sprintf(error_label, ERR_MSG_ALLOC);
-				snmp_variable_free(variable);
-				return NULL;
-			}
-			memcpy(variable->val.objid, subids, variable->val_len);
-			break;
-
-		case NULLOBJ:
-			break;
-
-		default:
-			sprintf(error_label, "A variable has a wrong type (%x)", variable->type);
-			snmp_variable_free(variable);
-			return NULL;
-	}
-
-	/* LINTED */
-	*length = *length - (uint32_t)(d - *data);
-	*data = d;
-
-
-	return variable;
-}
-
-
-/********************************************************************/
-
-/*
- *	Takes a pdu and serializes the ASN PDU into the area
- *	pointed to by packet.  length is the size of the data area available.
- *	Returns the length of the completed packet in length.  If any errors
- *	occur, -1 is returned.  If all goes well, 0 is returned.
- */
-
-static int snmp_pdu_encode(SNMP_pdu *pdu, u_char *packet, int *packet_length, char *error_label)
-{
-	u_char *buf;
-	int buf_len;
-	int len;
-	SNMP_variable *variable;
-	u_char *cp;
-	int32_t total_length;
-
-
-	buf = (u_char *) malloc (PACKET_LENGTH * sizeof (u_char));
-	if (buf == NULL) {
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return -1;
-	}
-	error_label[0] = '\0';
-
-	cp = packet;
-	len = *packet_length;
-
-/* encode the variables in packet */
-	for(variable = pdu->first_variable; variable; variable = variable->next_variable)
-	{
-		cp = snmp_pdu_encode_variable(variable, cp, &len, error_label);
-		if(cp == NULL) {
-			free (buf);
-			return -1;
-		}
-	}
-	/* LINTED */
-	total_length = (int32_t)(cp - packet); /* Better fit in 32 bits */
-
-/* encode the header for the variables in buf */
-	buf_len = PACKET_LENGTH;
-	cp = asn_build_header(buf, (uint32_t *)&buf_len, (u_char)(ASN_SEQUENCE | ASN_CONSTRUCTOR),
-		total_length, static_error_label);
-	if(cp == NULL)
-	{
-		sprintf(error_label, "Encode the header of the variables failed: %s",
-			static_error_label);
-		free (buf);
-		return -1;
-	}
-
-/* copy the encoded variables from packet to buf */
-	memcpy(cp, packet, total_length);
-	/* LINTED */
-	total_length += (int32_t)(cp - buf);
-
-
-/* encode the pdu in packet */
-	len = *packet_length;
-	switch(pdu->type)
-	{
-		case GET_REQ_MSG:
-		case GETNEXT_REQ_MSG:
-		case GET_RSP_MSG:
-		case SET_REQ_MSG:
-
-		/* request id */
-			cp = asn_build_int(packet, (uint32_t *)&len, (u_char) INTEGER,
-				(int32_t *) &pdu->request_id, sizeof(pdu->request_id),
-				static_error_label);
-			if(cp == NULL)
-			{
-				sprintf(error_label, "Encode the request id failed: %s",
-					static_error_label);
-				free (buf);
-				return -1;
-			}
-
-		/* error status */
-			cp = asn_build_int(cp, (uint32_t *)&len, (u_char) INTEGER,
-				(int32_t *) &pdu->error_status, sizeof(pdu->error_status),
-				static_error_label);
-			if(cp == NULL)
-			{
-				sprintf(error_label, "Encode the error status failed: %s",
-					static_error_label);
-				free (buf);
-				return -1;
-			}
-
-		/* error index */
-			cp = asn_build_int(cp, (uint32_t *)&len, (u_char) INTEGER,
-				(int32_t *) &pdu->error_index, sizeof(pdu->error_index),
-				static_error_label);
-			if(cp == NULL)
-			{
-				sprintf(error_label, "Encode the error index failed: %s",
-					static_error_label);
-				free (buf);
-				return -1;
-			}
-
-			break;
-
-
-		case TRP_REQ_MSG:
-
-		/* enterprise */
-			cp = asn_build_objid(packet, (uint32_t *)&len, (u_char) OBJID,
-				(Subid *) pdu->enterprise.subids, pdu->enterprise.len,
-				static_error_label);
-			if(cp == NULL)
-			{
-				sprintf(error_label, "Encode the enterprise failed: %s",
-					static_error_label);
-				free (buf);
-				return -1;
-			}
-
-		/* agent-addr */
-			cp = asn_build_string(cp, (uint32_t *)&len, (u_char) IPADDRESS,
-				(u_char *) &pdu->ip_agent_addr.s_addr,
-				sizeof(pdu->ip_agent_addr.s_addr),
-				static_error_label);
-			if(cp == NULL)
-			{
-				sprintf(error_label, "Encode the agent address failed: %s",
-					static_error_label);
-				free (buf);
-				return -1;
-			}
-
-		/* generic trap */
-			cp = asn_build_int(cp, (uint32_t *)&len, (u_char) INTEGER,
-				(int32_t *) &pdu->generic, sizeof(pdu->generic),
-				static_error_label);
-			if(cp == NULL)
-			{
-				sprintf(error_label, "Encode the generic trap failed: %s",
-					static_error_label);
-				free (buf);
-				return -1;
-			}
-
-		/* specific trap */
-			cp = asn_build_int(cp, (uint32_t *)&len, (u_char) INTEGER,
-				(int32_t *) &pdu->specific, sizeof(pdu->specific),
-				static_error_label);
-			if(cp == NULL)
-			{
-				sprintf(error_label, "Encode the specific trap failed: %s",
-					static_error_label);
-				free (buf);
-				return -1;
-			}
-
-		/* time stamp  */
-			cp = asn_build_unsigned_int(cp, (uint32_t *)&len, (u_char) TIMETICKS,
-				(int32_t *) &pdu->time_stamp, sizeof(pdu->time_stamp),
-				static_error_label);
-			if(cp == NULL)
-			{
-				sprintf(error_label, "Encode the time stamp failed: %s",
-					static_error_label);
-				free (buf);
-				return -1;
-			}
-
-			break;
-
-
-		default:
-			sprintf(error_label, "The pdu has a wrong type (%x)", pdu->type);
-			free (buf);
-			return -1;
-
-	} /* switch */
-
-
-/* copy the encoded variables and their header from buf to packet */
-	if(len < total_length)
-	{
-		sprintf(error_label, "The buffer is too small");
-		free (buf);
-		return -1;
-	}
-	memcpy(cp, buf, total_length);
-	/* LINTED */
-	total_length += (int32_t)(cp - packet);
-
-
-/* encode the header of the pdu in buf */
-	len = PACKET_LENGTH;
-	/* LINTED */
-	cp = asn_build_header(buf, (uint32_t *)&len, (u_char)pdu->type, 
-		total_length, static_error_label);
-	if(cp == NULL)
-	{
-		sprintf(error_label, "Encode the header of the pdu failed: %s",
-			static_error_label);
-		free (buf);
-		return -1;
-	}
-
-
-/* copy the pdu from packet to buf */
-	if(len < total_length)
-	{
-		sprintf(error_label, "The buffer is too small");
-		free (buf);
-		return -1;
-	}
-	memcpy(cp, packet, total_length);
-	/* LINTED */
-	total_length += (int32_t)(cp - buf);
-
-/* encode the message in packet */
-	len = *packet_length;
-
-	if(pdu->community == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_pdu_encode(): community is NULL");
-		free (buf);
-		return -1;
-	}
-
-	cp = asn_build_header(packet, (uint32_t *)&len, (u_char)(ASN_SEQUENCE | ASN_CONSTRUCTOR),
-		/* LINTED */
-		total_length + (int32_t)strlen(pdu->community) + 5,
-		static_error_label);
-	if(cp == NULL)
-	{
-		sprintf(error_label, "Encode the header of the message failed: %s",
-			static_error_label);
-		free (buf);
-		return -1;
-	}
-
-/* version */
-	cp = asn_build_int(cp, (uint32_t *)&len, (u_char) INTEGER,
-		(int32_t *) &pdu->version, sizeof(pdu->version),
-		static_error_label);
-	if(cp == NULL)
-	{
-		sprintf(error_label, "Encode the version failed: %s",
-			static_error_label);
-		free (buf);
-		return -1;
-	}
-
-/* community */
-	cp = asn_build_string(cp, (uint32_t *)&len, (u_char) STRING, 
-		/* LINTED */
-		(u_char *) pdu->community, (int32_t)strlen(pdu->community),
-		static_error_label);
-	if(cp == NULL)
-	{
-		sprintf(error_label, "Encode the community failed: %s",
-			static_error_label);
-		free (buf);
-		return -1;
-	}
-
-
-/* copy the pdu and its header from buf to packet */
-	if(len < total_length)
-	{
-		sprintf(error_label, "The buffer is too small");
-		free (buf);
-		return -1;
-	}
-
-	memcpy(cp, buf, total_length);
-	/* LINTED */
-	total_length += (int32_t)(cp - packet);
-	*packet_length = total_length;
-
-	free (buf);
-	return 0;
-}
-
-
-/********************************************************************/
-
-static u_char *snmp_pdu_encode_variable(SNMP_variable *variable, u_char *data, int *length, char *error_label)
-{
-	int dummy_len, header_len, header_shift;
-	u_char *data_ptr;
-
-
-	error_label[0] = '\0';
-
-	dummy_len = *length;
-	data_ptr = data;
-	data = asn_build_header(data, (uint32_t *)&dummy_len, (u_char)(ASN_SEQUENCE | ASN_CONSTRUCTOR), 0,
-		static_error_label);
-	if(data == NULL) {
-		sprintf(error_label, "Encode the header of a variable failed: %s",
-			static_error_label);
-		return NULL;
-	}
-
-	/* LINTED */
-	header_len = (int32_t)(data - data_ptr);
-	*length = *length - header_len;
-	data = asn_build_objid(data, (uint32_t *)length, (u_char) OBJID,
-	    variable->name.subids, variable->name.len, static_error_label);
-	if(data == NULL)
-	{
-		sprintf(error_label, "Encode the name of a variable failed: %s",
-			static_error_label);
-		return NULL;
-	}
-
-
-	switch(variable->type)
-	{
-		case INTEGER:
-		case GAUGE:
-		case COUNTER:
-		case TIMETICKS:
-			if (variable->type == TIMETICKS)
-	    			data = asn_build_unsigned_int(data, (uint32_t *)length, variable->type,
-					(int32_t *) variable->val.integer, variable->val_len, static_error_label);
-			else
-	    			data = asn_build_int(data, (uint32_t *)length, variable->type,
-					(int32_t *) variable->val.integer, variable->val_len, static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Encode a variable of type integer failed: %s",
-					static_error_label);
-				return NULL;
-			}
-			break;
-
-		case STRING:
-		case IPADDRESS:
-		case OPAQUE:
-			data = asn_build_string(data, (uint32_t *)length, variable->type,
-				variable->val.string, variable->val_len, static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Encode a variable of type octet string failed: %s",
-					static_error_label);
-				return NULL;
-			}
-			break;
-
-		case OBJID:
-			data = asn_build_objid(data, (uint32_t *)length, variable->type, variable->val.objid,
-				variable->val_len / (int32_t)sizeof(Subid), static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Encode a variable of type object identifier failed: %s",
-					static_error_label);
-				return NULL;
-			}
-			break;
-
-		case NULLOBJ:
-			data = asn_build_null(data, (uint32_t *)length, variable->type, static_error_label);
-			if(data == NULL)
-			{
-				sprintf(error_label, "Encode a variable of type null failed: %s",
-					static_error_label);
-				return NULL;
-			}
-			break;
-
-		default:
-			sprintf(error_label, "A variable has a wrong type (%x)", variable->type);
-			return NULL;
-	} /* switch */
-
-
-	/* LINTED */
-	dummy_len = (uint32_t)(data - data_ptr) - header_len;
-	header_shift = 0;
-	if(dummy_len >= 0x80)
-	{
-		header_shift++;
-		if(dummy_len > 0xFF)
-		{
-			header_shift++;
-		}
-	}
-
-
-	if(header_shift)
-	{
-		*length = *length - header_shift;
-		if(*length < 0)
-		{
-			sprintf(error_label, "The buffer is too small");
-			return NULL;
-		}
-		
-		shift_array(data_ptr + header_len, dummy_len, header_shift);
-		data = data + header_shift;
-		header_len = header_len + header_shift;
-	}
-
-
-	if(asn_build_header(data_ptr, (uint32_t *)&dummy_len, (u_char)(ASN_SEQUENCE | ASN_CONSTRUCTOR),
-		dummy_len, static_error_label) == NULL)
-	{
-		sprintf(error_label, "Encode the header of a variable failed: %s",
-			static_error_label);
-		return NULL;
-	}
-
-
-	return data;
-}
-
-
-/********************************************************************/
-
-static void shift_array(u_char *begin, int length, int shift_amount)
-{
-	register u_char	*old, *new;
-
-	if(shift_amount >= 0)
-	{
-		old = begin + length - 1;
-		new = old + shift_amount;
-
-		while(length--)
-		{
-			*new-- = *old--;
-		}
-	}
-	else
-	{
-		old = begin;
-		new = begin + shift_amount;
-
-		while(length--)
-		{
-			*new++ = *old++;
-		}
-	}
-}
-
-
-/********************************************************************/
-
-SNMP_pdu *snmp_pdu_dup(SNMP_pdu *pdu, char *error_label)
-{
-	SNMP_pdu *new;
-
-
-	error_label[0] = '\0';
-
-	new = snmp_pdu_new(error_label);
-	if(new == NULL)
-	{
-		return NULL;
-	}
-
-	new->version = pdu->version;
-	new->community = strdup(pdu->community);
-	if(new->community == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_pdu_free(new);
-		return NULL;
-	}
-
-	new->type = pdu->type;
-
-	new->request_id = pdu->request_id;
-	new->error_status = pdu->error_status;
-	new->error_index = pdu->error_index;
-
-	if(SSAOidCpy(&(new->enterprise), &(pdu->enterprise), error_label))
-	{
-		snmp_pdu_free(new);
-		return NULL;
-	}
-
-	memcpy(&(new->ip_agent_addr), &(pdu->ip_agent_addr), sizeof(IPAddress));
-	new->generic = pdu->generic;
-	new->specific = pdu->specific;
-	new->time_stamp = pdu->time_stamp;
-
-
-	return new;
-}
-
-
-/********************************************************************/
-
-SNMP_variable *
-snmp_variable_dup(SNMP_variable *variable, char *error_label)
-{
-	SNMP_variable *new;
-
-
-	error_label[0] = '\0';
-
-	new = snmp_variable_new(error_label);
-	if (new == NULL) {
-		return (NULL);
-	}
-
-	if (SSAOidCpy(&(new->name), &(variable->name), error_label)) {
-		snmp_variable_free(new);
-		return (NULL);
-	}
-
-	new->type = variable->type;
-	if (variable->val_len > 0) {
-		new->val.string = (uchar_t *)malloc(variable->val_len);
-		if (new->val.string == NULL) {
-			sprintf(error_label, ERR_MSG_ALLOC);
-			snmp_variable_free(new);
-			return (NULL);
-		}
-		memcpy(new->val.string, variable->val.string,
-			variable->val_len);
-	} else {
-		new->val.string = NULL;
-	}
-
-	new->val_len = variable->val_len;
-
-
-	return (new);
-}
-
-
-/********************************************************************/
-
-SNMP_variable *snmp_pdu_append_null_variable(SNMP_pdu *pdu, Oid *name, char *error_label)
-{
-	SNMP_variable *new;
-	SNMP_variable *current, *last;
-
-
-	error_label[0] = '\0';
-
-	if(pdu == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_pdu_append_null_variable(): pdu is NULL");
-		return NULL;
-	}
-
-	if(name == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_pdu_append_null_variable(): pdu is NULL");
-		return NULL;
-	}
-
-	new = snmp_variable_new(error_label);
-	if(new == NULL)
-	{
-		return NULL;
-	}
-
-	if(SSAOidCpy(&(new->name), name, error_label))
-	{
-		snmp_variable_free(new);
-		return NULL;
-	}
-
-	new->type = NULLOBJ;
-
-	last = NULL;
-	for(current = pdu->first_variable; current; current = current->next_variable)
-	{
-		last = current;
-	}
-
-	if(last)
-	{
-		last->next_variable = new;
-	}
-	else
-	{
-		pdu->first_variable = new;
-	}
-
-
-	return new;
-}
-
-SNMP_variable *ssa_append_integer_variable(SNMP_variable *list, Oid *oid, int num,char *error_label,u_char asn1_type)
-{
-  SNMP_value value;
- 
-  value.v_integer = num;
-  list = snmp_typed_variable_append(list,oid,asn1_type,&value,error_label);
-  if(list == NULL){
-        error("ssa_append_integer_variable failed: oid: %s, value: %d\n",
-                SSAOidString(oid),num);
-  }
-  return(list);
-}
-
-SNMP_variable *
-ssa_append_string_variable(SNMP_variable *list, Oid *oid, String str,
-	char *error_label)
-{
-	SNMP_value value;
-
-	if (str.chars == NULL)
-		return (NULL);
-	value.v_string.chars = (uchar_t *)str.chars;
-	value.v_string.len = str.len;
-	list = snmp_typed_variable_append(list, oid, STRING, &value,
-		error_label);
-	if (list == NULL) {
-		error("ssa_append_string_variable failed: oid: %s, \
-			value: %s\n", SSAOidString(oid), str);
-	}
-	return (list);
-}
-
-SNMP_variable *ssa_append_oid_variable(SNMP_variable *list, Oid *oid, Oid name, char *error_label)
-{
-  SNMP_value value;
-
-  if(oid == NULL || name.subids == NULL || name.len == 0) return NULL;
-  value.v_oid.subids = name.subids;
-  value.v_oid.len = name.len;
-  list = snmp_typed_variable_append(list,oid,OBJID,&value,error_label);
-  if(list == NULL){
-        error("ssa_append_oid_varaible(%s,%s) failed\n",
-                SSAOidString(oid),SSAOidString(&name));
-  }
-  return(list);
-}
-
-
-
-
-
-
--- a/usr/src/cmd/agents/snmp/snmplib/pdu.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _PDU_H_
-#define _PDU_H_
-
-#include <sys/types.h>
-#include "impl.h"
-
-
-/***** GLOBAL TYPES *****/
-
-typedef struct _SNMP_value {
-	union {
-		Integer integer;
-		String string;
-		Oid oid;
-	} val;
-} SNMP_value;
-
-#define v_integer val.integer
-#define v_string val.string
-#define v_oid val.oid
-
-	
-typedef struct _SNMP_variable {
-	struct _SNMP_variable *next_variable;/* NULL for last variable */
-	Oid		name;		/* Object identifier of variable */
-	u_char		type;		/* ASN.1 type of variable */
-	union {				/* value of variable */
-		int32_t	*integer;
-		u_char	*string;
-		Subid	*objid;
-	} val;
-	int		val_len;	/* size of the buffer val in bytes */
-} SNMP_variable;
-
-
-typedef struct _SNMP_pdu {
-	int version;
-	char *community;
-
-	int	type;			/* Type of this PDU */
-
-	uint32_t	request_id;		/* Request id */
-	uint32_t	error_status;		/* Error status */
-	uint32_t	error_index;		/* Error index */
-
-
-	/* Trap information */
-
-	Oid	enterprise;		/* System Object Identifier */
-	IPAddress ip_agent_addr;	/* Address of object generating trap */
-	int	generic;		/* Generic trap */
-	int	specific;		/* Specific trap */
-	uint32_t	time_stamp;		/* Time stamp */
-
-	SNMP_variable *first_variable;
-} SNMP_pdu;
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern SNMP_variable *snmp_pdu_append_null_variable(SNMP_pdu *pdu, Oid *name, char *error_label);
-extern SNMP_variable *snmp_pdu_append_typed_variable(SNMP_pdu *pdu, Oid *name,
-	u_char type, SNMP_value *value, char *error_label);
-
-
-extern SNMP_pdu *snmp_pdu_receive(int sd, Address *address, char *error_label);
-extern int snmp_pdu_send(int sd, Address *address, SNMP_pdu *pdu, char *error_label);
-
-extern void snmp_pdu_free(SNMP_pdu *pdu);
-extern void snmp_variable_free(SNMP_variable *variable);
-extern void snmp_variable_list_free(SNMP_variable *variable_list);
-
-
-extern SNMP_pdu *snmp_pdu_new(char *error_label);
-extern SNMP_variable *snmp_variable_new(char *error_label);
-extern SNMP_variable *snmp_typed_variable_new(Oid *name, u_char type, SNMP_value *value, char *error_label);
-
-extern SNMP_variable *snmp_typed_variable_append(SNMP_variable *list, Oid *name, u_char type, SNMP_value *value, char *error_label);
-
-extern SNMP_pdu *snmp_pdu_dup(SNMP_pdu *pdu, char *error_label);
-extern SNMP_variable *snmp_variable_dup(SNMP_variable *variable, char *error_label);
-
-extern SNMP_variable *ssa_append_integer_variable(SNMP_variable *list, Oid *oid,int num, char *error_label, u_char asn1_type); 
-extern SNMP_variable *ssa_append_string_variable(SNMP_variable *list, Oid *oid, String str, char *error_label);
-extern SNMP_variable *ssa_append_oid_variable(SNMP_variable *list, Oid *oid, Oid name, char *error_label); 
-
-
-
-extern void trace_snmp_pdu(SNMP_pdu *pdu);
-
-
-#endif
-
-
-
-
--- a/usr/src/cmd/agents/snmp/snmplib/request.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,444 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/times.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <errno.h>
-#include <syslog.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <nlist.h>
-
-#include "snmp_msg.h"
-#include "impl.h"
-#include "trace.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "request.h"
-#include "error.h"
-
-
-
-/***** GLOBAL VARIABLES *****/
-
-static Subid sysUptime_subids[] = { 1, 3, 6, 1, 2, 1, 1, 3, 0 };
-
-Oid sysUptime_name = { sysUptime_subids, 8 };
-Oid sysUptime_instance = { sysUptime_subids, 9 };
-
-
-/***** LOCAL VARIABLES *****/
-
-static uint32_t request_id = 0;
-
-static Subid snmpEnableAuthTraps_subids[] = { 1, 3, 6, 1, 2, 1, 11, 30, 0 };
-static Oid snmpEnableAuthTraps_name = { snmpEnableAuthTraps_subids, 9 };
-
-
-/********************************************************************/
-
-/* static */ SNMP_pdu *request_create(char *community, int type, char *error_label)
-{
-	SNMP_pdu *request;
-
-
-	error_label[0] = '\0';
-
-	switch(type)
-	{
-		case GET_REQ_MSG:
-		case GETNEXT_REQ_MSG:
-		case SET_REQ_MSG:
-			break;
-
-		default:
-			sprintf(error_label, "BUG: request_create(): bad type (0x%x)",
-				type);
-			return NULL;
-	}
-
-	request = snmp_pdu_new(error_label);
-	if(request == NULL)
-	{
-		return NULL;
-	}
-
-	request->version = SNMP_VERSION_1;
-	request->community = strdup(community);
-	if(request->community == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_pdu_free(request);
-		return NULL;
-	}
-	request->type = type;
-	request->request_id = request_id++;
-
-
-	return request;
-}
-
-
-/********************************************************************/
-
-SNMP_pdu *request_send_to_port_time_out_blocking(IPAddress *ip_address, int port,struct timeval *timeout,SNMP_pdu *request, char *error_label)
-{
-	int sd;
-	Address address;
-	SNMP_pdu *response;
-	Address me;
-	int numfds;
-	fd_set fdset;
-	int count;
-
-
-	error_label[0] = '\0';
-
-	if(request == NULL)
-	{
-		sprintf(error_label, "BUG: request_send_blocking(): request is NULL");
-		return NULL;
-	}
-
-	switch(request->type)
-	{
-		case GET_REQ_MSG:
-		case GETNEXT_REQ_MSG:
-		case SET_REQ_MSG:
-			break;
-
-		default:
-			sprintf(error_label, "BUG: request_send_blocking(): bad type (0x%x)",
-				request->type);
-			return NULL;
-	}
-
-	/* sd */
-	sd = socket(AF_INET, SOCK_DGRAM, 0);
-	if(sd < 0)
-	{
-		sprintf(error_label, ERR_MSG_SOCKET,
-			errno_string());
-		return (NULL);
-	}
-
-	memset(&me, 0, sizeof (Address));
-	me.sin_family = AF_INET;
-	if ((request->type) == SET_REQ_MSG)
-		me.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
-	else
-		me.sin_addr.s_addr = htonl(INADDR_ANY);
-	me.sin_port = htons(0);
-	if(bind(sd, (struct sockaddr *)&me, sizeof(me)) != 0)
-	{
-		sprintf(error_label, ERR_MSG_BIND,
-			errno_string());
-		(void)close(sd);
-		return NULL;
-	}
-
-	/* address */
-	memset(&address, 0, sizeof(Address));
-	address.sin_family = AF_INET;
-	/* LINTED */
-	address.sin_port = (short)port;
-	address.sin_addr.s_addr = ip_address->s_addr;
-
-	if(snmp_pdu_send(sd, &address, request, error_label))
-	{
-		(void)close(sd);
-		return NULL;
-	}
-
-
-	for (;;)
-	{
-		numfds = 0;
-		FD_ZERO(&fdset);
-
-		numfds = sd + 1;
-		FD_SET(sd, &fdset);
-
-		count = select(numfds, &fdset, 0, 0, timeout);
-		if(count > 0)
-		{
-			if(FD_ISSET(sd, &fdset))
-			{
-				response = snmp_pdu_receive(sd, &address, error_label);
-				if(response == NULL)
-				{
-					(void)close(sd);
-					return NULL;
-				}
-				(void)close(sd);
-
-				return response;
-			}
-		}
-		else
-		{
-			switch(count)
-			{
-				case 0:
-					sprintf(error_label, ERR_MSG_TIMEOUT);
-					(void)close(sd);
-					return NULL;
-
-				case -1:
-					if(errno == EINTR)
-					{
-						continue;
-					}
-					else
-					{
-						sprintf(error_label, ERR_MSG_SELECT,
-							errno_string());
-						(void)close(sd);
-						return NULL;
-					}
-			}
-		}
-	}
-	/* NOTREACHED */
-}
-
-
-SNMP_pdu *request_send_to_port_blocking(IPAddress *ip_address, int port,SNMP_pdu *request, char *error_label)
-{
-	struct timeval timeout;
-	
-	timeout.tv_sec = 100;
-	timeout.tv_usec = 0;
-	return(request_send_to_port_time_out_blocking
-		(ip_address,port,&timeout,request,error_label));
-}
-
-
-/*static*/ SNMP_pdu *request_send_blocking(IPAddress *ip_address, SNMP_pdu *request, char *error_label)
-{
-  return(request_send_to_port_blocking(ip_address,SNMP_PORT,request,error_label));
-}
-
-/********************************************************************/
-
-/*
- *	if the request failed, this function returns 0
- *	otherwise it returns sysUpTime
- */
-
-int32_t request_sysUpTime(char *error_label, char *community_name)
-{
-	static int my_ip_address_initialized = False;
-	static IPAddress my_ip_address;
-	SNMP_pdu *request;
-	SNMP_pdu *response;
-	SNMP_variable *variable;
-	static int32_t sysUpTime = 0;
-	static clock_t last = 0;
-	clock_t now;
-	struct tms buffer;
-
-
-	error_label[0] = '\0';
-
-	now = times(&buffer);
-	if( (last == 0) || ((now - last) > 360000) )	/* 1 hour */
-	{
-		if(my_ip_address_initialized == False)
-		{
-			if(get_my_ip_address(&my_ip_address, error_label))
-			{
-				return 0;
-			}
-
-			my_ip_address_initialized = True;
-		}
-
-		if(community_name == NULL)
-			request = request_create("public", GET_REQ_MSG, error_label);
-		else
-			request = request_create(community_name, GET_REQ_MSG, error_label);
-
-		if(request == NULL)
-		{
-			return 0;
-		}
-
-		if(snmp_pdu_append_null_variable(request, &sysUptime_instance, error_label) == NULL)
-		{
-			snmp_pdu_free(request);
-			return 0;
-		}
-
-		response = request_send_blocking(&my_ip_address, request, error_label);
-		if(response == NULL)
-		{
-			snmp_pdu_free(request);
-			return 0;
-		}
-		snmp_pdu_free(request);
-
-		if(response->error_status)
-		{
-			sprintf(error_label, "%s",
-				error_status_string(response->error_status));
-			snmp_pdu_free(response);
-			return 0;
-		}
-
-		variable = response->first_variable;
-		if(variable->next_variable
-			|| SSAOidCmp(&(variable->name), &sysUptime_instance)
-			|| (variable->type != TIMETICKS)
-			|| (variable->val.integer == NULL)
-			|| (variable->val_len != sizeof(int32_t)) )
-		{
-			sprintf(error_label, ERR_MSG_BAD_RESPONSE);
-			snmp_pdu_free(response);
-			return 0;
-		}
-		sysUpTime = *(variable->val.integer);
-		last = now;
-		snmp_pdu_free(response);
-
-		if(trace_level > 0)
-		{
-			trace("sysUpTime: %d\n\n", sysUpTime);
-		}
-
-		return sysUpTime;
-	}
-
-	/* LINTED */
-	return (sysUpTime + (int32_t)(now - last));
-}
-
-
-/********************************************************************/
-
-/*
- *	if the request failed, this function returns  -1
- *	otherwise it returns True or False accordind to the
- *	value of snmpEnableAuthTraps
- */
-
-int request_snmpEnableAuthTraps(char *error_label)
-{
-	static int my_ip_address_initialized = False;
-	static IPAddress my_ip_address;
-	SNMP_pdu *request;
-	SNMP_pdu *response;
-	SNMP_variable *variable;
-	int snmpEnableAuthTraps;
-	struct timeval timeout;
-
-	timeout.tv_sec = 5;
-	timeout.tv_usec = 0;
-
-
-	error_label[0] = '\0';
-
-	if(my_ip_address_initialized == False)
-	{
-		if(get_my_ip_address(&my_ip_address, error_label))
-		{
-			return -1;
-		}
-
-		my_ip_address_initialized = True;
-	}
-
-	request = request_create("public", GET_REQ_MSG, error_label);
-	if(request == NULL)
-	{
-		return -1;
-	}
-
-	if(snmp_pdu_append_null_variable(request, &snmpEnableAuthTraps_name, error_label) == NULL)
-	{
-		snmp_pdu_free(request);
-		return -1;
-	}
-
-	response = request_send_to_port_time_out_blocking(&my_ip_address, \
-		SNMP_PORT, &timeout, request, error_label);
-	if(response == NULL)
-	{
-		snmp_pdu_free(request);
-		return -1;
-	}
-	snmp_pdu_free(request);
-
-	if(response->error_status)
-	{
-		sprintf(error_label, "%s",
-			error_status_string(response->error_status));
-		snmp_pdu_free(response);
-		return -1;
-	}
-
-	variable = response->first_variable;
-	if(variable->next_variable
-		|| SSAOidCmp(&(variable->name), &snmpEnableAuthTraps_name)
-		|| (variable->type != INTEGER)
-		|| (variable->val.integer == NULL)
-		|| (variable->val_len != sizeof(int32_t)) )
-	{
-		sprintf(error_label, ERR_MSG_BAD_RESPONSE);
-		snmp_pdu_free(response);
-		return -1;
-	}
-	snmpEnableAuthTraps = *(variable->val.integer);
-	snmp_pdu_free(response);
-
-	if(trace_level > 0)
-	{
-		trace("snmpAuthTraps: %s\n\n",
-			(snmpEnableAuthTraps == 1)? "enabled(1)": "disabled(2)");
-	}
-
-	switch(snmpEnableAuthTraps)
-	{
-		case 1: /* enabled(1) */
-			return TRUE;
-		case 2: /* disable(2) */
-			return FALSE;
-		default:
-			sprintf(error_label, ERR_MSG_BAD_VALUE);
-			return -1;
-	}
-}
-
-
-/********************************************************************/
-
--- a/usr/src/cmd/agents/snmp/snmplib/request.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _REQUEST_H_
-#define _REQUEST_H_
-
-#include <sys/types.h>
-
-/***** GLOBAL VARIABLES *****/
-
-extern Oid sysUptime_name;
-extern Oid sysUptime_instance;
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern int32_t request_sysUpTime(char *error_label, char *community_name);
-extern int request_snmpEnableAuthTraps(char *error_label);
-extern SNMP_pdu *request_create(char *community, int type, char *error_label);
-extern SNMP_pdu *request_send_blocking(IPAddress *ip_address, SNMP_pdu *request, char *error_label);
-extern SNMP_pdu *request_send_to_port_blocking(IPAddress *ip_address, int port,SNMP_pdu *request, char *error_label);
-extern SNMP_pdu *request_send_to_port_time_out_blocking(IPAddress *ip_address, int port,struct timeval *timeout,SNMP_pdu *request, char *error_label);
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmplib/signals.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1998-2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <signal.h>
-#include <stdio.h>
-
-#include "snmp_msg.h"
-#include "signals.h"
-#include "error.h"
-
-/*
- *	SIGQUIT: do not trap it to be able to generate a core
- */
-
-int
-signals_init(void signals_sighup(), void signals_exit(), char *error_label)
-{
-
-	struct sigaction act;
-	act.sa_flags = 0;
-	error_label[0] = '\0';
-
-	act.sa_handler = signals_sighup;
-	if (sigaction(SIGHUP, &act, NULL) == -1) {
-		(void) sprintf(error_label, ERR_MSG_SIGACT, SIGHUP,
-		"signals_sighup()", errno_string());
-		return (-1);
-	} else {
-		act.sa_handler = signals_exit;
-		if (sigaction(SIGINT, &act, NULL) == -1) {
-			(void) sprintf(error_label, ERR_MSG_SIGACT, SIGINT,
-			"signals_exit()", errno_string());
-			return (-1);
-		} else if (sigaction(SIGTERM, &act, NULL)  == -1) {
-			(void) sprintf(error_label, ERR_MSG_SIGACT, SIGTERM,
-			"signals_exit()", errno_string());
-			return (-1);
-		} else if (sigaction(SIGUSR1, &act, NULL) == -1) {
-			(void) sprintf(error_label, ERR_MSG_SIGACT, SIGUSR1,
-			"signals_exit()", errno_string());
-			return (-1);
-		} else if (sigaction(SIGUSR2, &act, NULL) == -1) {
-			(void) sprintf(error_label, ERR_MSG_SIGACT, SIGUSR2,
-			"signals_exit()", errno_string());
-			return (-1);
-
-		} else {
-			act.sa_handler = SIG_IGN;
-			if (sigaction(SIGCHLD, &act, NULL) == -1) {
-				(void) sprintf(error_label, ERR_MSG_SIGACT,
-				SIGCHLD, "SIG_IGN", errno_string());
-				return (-1);
-			} else {
-				return (0);
-			}
-		}
-	}
-}
--- a/usr/src/cmd/agents/snmp/snmplib/signals.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SIGNALS_H_
-#define _SIGNALS_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern int signals_init(void signals_sighup(), void signals_exit(), char *error_label);
-
-
-#endif
-
--- a/usr/src/cmd/agents/snmp/snmplib/snmp-mapfile-vers	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-#
-# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-#	usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-$mapfile_version 2
-
-SYMBOL_VERSION SUNW_1.1 {
-	global:
-		SSAStringZero;
-		SSAStringInit;
-		SSAStringCpy;
-		SSAStringToChar;
-		SSAOidNew;
-		SSAOidZero;
-		SSAOidFree;
-		SSAOidInit;
-		SSAOidCpy;
-		SSAOidDup;
-		SSAOidCmp;
-		SSAOidStrToOid;
-		SSAOidString;
-	local:
-		*;
-};
-
-SYMBOL_VERSION SUNWprivate_1.1 {
-	global:
-	address_string; 
-	delete_trap_destinator_list; 
-	errno_string; 
-	error; 
-	error_close_stderr; 
-	error_exit; 
-	error_init; 
-	error_label; 
-	error_open; 
-	error_status_string; 
-	get_my_ip_address;  
-	ip_address_string; 
-	name_to_ip_address; 
-	request_create; 
-	request_send_to_port_time_out_blocking; 
-	request_snmpEnableAuthTraps; 
-	signals_init; 
-	snmp_pdu_append_null_variable; 
-	snmp_pdu_dup; 
-	snmp_pdu_free; 
-	snmp_pdu_new; 
-	snmp_pdu_receive; 
-	snmp_pdu_send; 
-	snmp_typed_variable_append; 
-	snmp_typed_variable_new; 
-	snmp_variable_dup; 
-	snmp_variable_free; 
-	snmp_variable_list_free; 
-	snmp_variable_new; 
-	ssa_append_integer_variable; 
-	ssa_append_oid_variable; 
-	ssa_append_string_variable; 
-	sun_oid; 
-	sysUptime_instance; 
-	sysUptime_name; 
-	timeval_string; 
-	trace; 
-	trace_level; 
-	trace_set; 
-	trace_snmp_pdu; 
-	trace_trap_destinators; 
-	trap_community; 
-	trap_send_raw; 
-	trap_send_with_more_para; 
-	trap_send_to_all_destinators; 
-
-	local:
-	*; 
-};
--- a/usr/src/cmd/agents/snmp/snmplib/snmp.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SNMP_H_
-#define _SNMP_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "asn1.h"
-
-
-/***** GLOBAL CONSTANTS *****/
-
-#define SNMP_PORT	    161
-#define SNMP_TRAP_PORT	    162
-
-#define SNMP_MAX_LEN	    484
-
-#define SNMP_VERSION_1	    0
-
-#define GET_REQ_MSG	    (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)
-#define GETNEXT_REQ_MSG	    (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1)
-#define GET_RSP_MSG	    (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2)
-#define SET_REQ_MSG	    (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x3)
-#define TRP_REQ_MSG	    (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4)
-
-#define SNMP_ERR_NOERROR    (0x0)
-#define SNMP_ERR_TOOBIG	    (0x1)
-#define SNMP_ERR_NOSUCHNAME (0x2)
-#define SNMP_ERR_BADVALUE   (0x3)
-#define SNMP_ERR_READONLY   (0x4)
-#define SNMP_ERR_GENERR	    (0x5)
-#define	SNMP_ERR_AUTHORIZATIONERROR	(0x10)
-
-#define SNMP_TRAP_COLDSTART		(0x0)
-#define SNMP_TRAP_WARMSTART		(0x1)
-#define SNMP_TRAP_LINKDOWN		(0x2)
-#define SNMP_TRAP_LINKUP		(0x3)
-#define SNMP_TRAP_AUTHFAIL		(0x4)
-#define SNMP_TRAP_EGPNEIGHBORLOSS	(0x5)
-#define SNMP_TRAP_ENTERPRISESPECIFIC	(0x6)
-
-
-#endif
-
--- a/usr/src/cmd/agents/snmp/snmplib/snmp_api.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1013 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "snmp_msg.h"
-#include "snmp_api.h"
-#include "error.h"
-
-
-/***** GLOBAL VARIABLES *****/
-
-int snmp_errno = 0;
-
-
-/***** LOCAL CONSTANTS *****/
-
-#define DEFAULT_COMMUNITY	"public"
-#define DEFAULT_RETRIES		4
-#define DEFAULT_TIMEOUT		1000000L
-#define DEFAULT_REMPORT		SNMP_PORT
-#define DEFAULT_LOCPORT		0
-#define DEFAULT_ENTERPRISE	&sun_oid
-
-
-/***** LOCAL TYPES *****/
-
-/*
- *	A list of all the outstanding requests
- *	for a particular session
- */
-
-typedef struct _SNMP_request_list {
-	struct _SNMP_request_list *next_request;
-	uint32_t request_id;	/* request id */
-	int	predefined_id;
-	int	retries;	/* Number of retries */
-	uint32_t	timeout;	/* length to wait for timeout in usec */
-	struct timeval time;	/* Time this request was made */
-	struct timeval expire;	/* time this request is due to expire */
-	SNMP_pdu *pdu;		/* The pdu for this request (saved so it can be retransmitted */
-} SNMP_request_list;
-
-
-/*
- *	Internal information about the state of the snmp session
- */
-
-typedef struct _SNMP_internal_session {
-	int		sd;		/* socket descriptor for this connection */
-	Address		address;	/* address of connected peer */
-	SNMP_request_list *requests;	/* Info about outstanding requests */
-} SNMP_internal_session;
-
-
-/*
- *	The list of active/open sessions.
- */
-
-typedef struct _SNMP_session_list {
-	struct _SNMP_session_list *next;
-	SNMP_session *session;
-	SNMP_internal_session *internal;
-} SNMP_session_list;
-
-
-/***** STATIC VARIABLES *****/
-
-static SNMP_session_list *first_session = NULL;
-
-static uint32_t static_request_id = 0;
-
-static char *snmp_api_errors[5] = {
-	"System error",
-	"Unknown session",
-	"Unknown host",
-	"Invalid local port",
-	"Unknown Error"
-};
-
-static char static_error_label[500] = "";
-
-
-/***** STATIC FUNCTIONS *****/
-
-static char *api_errstring(int snmp_errnumber);
-/*
-static init_snmp();
-*/
-static void free_request_list(SNMP_request_list *rp);
-static int snmp_session_read_loop(fd_set *fdset);
-static int snmp_session_timeout_loop();
-
-
-/*******************************************************************/
-
-static char *api_errstring(int snmp_errnumber)
-{
-	if(snmp_errnumber <= SNMPERR_SYSERR && snmp_errnumber >= SNMPERR_GENERR)
-	{
-		return snmp_api_errors[snmp_errnumber + 5];
-	}
-	else
-	{
-		return "Unknown Error";
-	}
-}
-
-
-/*******************************************************************/
-
-/*
- *	Gets initial request ID for all transactions
- */
-
-/*
-static init_snmp()
-{
-	struct timeval tv;
-
-	(void)gettimeofday(&tv, (struct timezone *) 0);
-	srandom(tv.tv_sec ^ tv.tv_usec);
-	static_request_id = random();
-}
-*/
-
-
-/*******************************************************************/
-
-SNMP_session *snmp_session_open_default(char *peername, void callback(), void *callback_magic, char *error_label)
-{
-	return snmp_session_open(peername,
-		NULL, SNMP_DEFAULT_RETRIES, SNMP_DEFAULT_TIMEOUT,
-		callback, callback_magic, error_label);
-}
-
-
-/*******************************************************************/
-
-SNMP_session *snmp_session_open(char *peername, char *community, int retries, int32_t timeout, void callback(), void *callback_magic, char *error_label)
-{
-	SNMP_session_list *slp;
-	SNMP_internal_session *isp;
-	SNMP_session *session;
-
-	char *peername_dup;
-	char *community_dup;
-
-	u_short remote_port = SNMP_DEFAULT_REMPORT;
-	u_short local_port = SNMP_DEFAULT_LOCPORT;
-
-	struct sockaddr_in me;
-	IPAddress ip_address;
-
-	error_label[0] = '\0';
-
-	if(peername == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_session_open(): peername is NULL");
-		return NULL;
-	}
-
-	if(callback == NULL)
-	{
-		sprintf(error_label, "BUG: snmp_session_open(): callback is NULL");
-		return NULL;
-	}
-
-
-	if(community == SNMP_DEFAULT_COMMUNITY)
-	{
-		community = DEFAULT_COMMUNITY;
-	}
-
-	if(retries == SNMP_DEFAULT_RETRIES)
-	{
-		retries = DEFAULT_RETRIES;
-	}
-
-	if(timeout == SNMP_DEFAULT_TIMEOUT)
-	{
-		timeout = DEFAULT_TIMEOUT;
-	}
-
-	if(remote_port == SNMP_DEFAULT_REMPORT)
-	{
-		remote_port = SNMP_PORT;
-	}
-
-	if(local_port == SNMP_DEFAULT_LOCPORT)
-	{
-		local_port = DEFAULT_LOCPORT;
-	}
-
-	if(name_to_ip_address(peername, &ip_address, error_label))
-	{
-		snmp_errno = SNMPERR_BAD_ADDRESS;
-		return NULL;
-	}
-
-
-	/****************************************/
-	/* 1) allocate the different structures */
-	/****************************************/
-
-	peername_dup = strdup(peername);
-	if(peername_dup == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_errno = SNMPERR_GENERR;
-		return NULL;
-	}
-
-	community_dup = strdup(community);
-	if(community_dup == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_errno = SNMPERR_GENERR;
-		free(peername_dup);
-		return NULL;
-	}
-
-	slp = (SNMP_session_list *) malloc(sizeof(SNMP_session_list));
-	if(slp == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_errno = SNMPERR_GENERR;
-		free(peername_dup);
-		free(community_dup);
-		return NULL;
-	}
-	memset(slp, 0, sizeof(SNMP_session_list));
-
-	isp = (SNMP_internal_session *) malloc(sizeof(SNMP_internal_session));
-	if(isp == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_errno = SNMPERR_GENERR;
-		free(peername_dup);
-		free(community_dup);
-		free(slp);
-		return NULL;
-	}
-	memset(isp, 0, sizeof(SNMP_internal_session));
-	slp->internal = isp;
-
-	slp->internal->sd = -1; /* mark it not set */
-	session = (SNMP_session *) malloc(sizeof(SNMP_session));
-	if(session == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_errno = SNMPERR_GENERR;
-		free(peername_dup);
-		free(community_dup);
-		free(slp);
-		free(isp);
-		return NULL;
-	}
-	memset(session, 0, sizeof(SNMP_session));
-	slp->session = session;
-
-
-	/*************************************/
-	/* 2) now link the SNMP_session_list */
-	/*************************************/
-
-	slp->next = first_session;
-	first_session = slp;
-
-
-	/***************************************/
-	/* 3) initialize SNMP_session */
-	/***************************************/
-
-	session->community = community_dup;
-	session->retries = retries;
-	session->timeout = timeout;
-	session->peername = peername_dup;
-	session->remote_port = remote_port;
-	session->local_port = local_port;
-	session->callback = callback;
-	session->callback_magic = callback_magic;
-
-
-	/***************************************/
-	/* 4) initialize SNMP_internal_session */
-	/***************************************/
-
-	/* Set up connections */
-	isp->sd = socket(AF_INET, SOCK_DGRAM, 0);
-	if(isp->sd < 0)
-	{
-		sprintf(error_label, ERR_MSG_SOCKET, errno_string());
-		snmp_errno = SNMPERR_SYSERR;
-		if(snmp_session_close(session, static_error_label))
-		{
-			(void)fprintf(stderr, ERR_MSG_CAN_NOT_ABORT_SESSION,
-				static_error_label, api_errstring(snmp_errno));
-			exit(1);
-		}
-		return NULL;
-	}
-
-	/* initialize address */
-	isp->address.sin_addr.s_addr = ip_address.s_addr;
-	isp->address.sin_family = AF_INET;
-	isp->address.sin_port = session->remote_port;	/* byte swap is done in pdu.c */
-
-	/* bind */
-	me.sin_family = AF_INET;
-	me.sin_addr.s_addr = INADDR_ANY;
-	me.sin_port = htons(session->local_port);
-	if(bind(isp->sd, (struct sockaddr *)&me, sizeof(me)) != 0)
-	{
-		sprintf(error_label, ERR_MSG_BIND, errno_string());
-		snmp_errno = SNMPERR_BAD_LOCPORT;
-		if(snmp_session_close(session, static_error_label))
-		{
-			(void)fprintf(stderr, ERR_MSG_CAN_NOT_ABORT_SESSION,
-				static_error_label, api_errstring(snmp_errno));
-			exit(1);
-		}
-		return NULL;
-	}
-
-	/* request list */
-	isp->requests = NULL;
-	session->sd = isp->sd;
-
-
-	return session;
-}
-
-
-/*******************************************************************/
-
-/*
- *	Free each element in the input request list.
- */
-
-static void free_request_list(SNMP_request_list *rp)
-{
-	SNMP_request_list *orp;
-
-
-	while(rp)
-	{
-		orp = rp;
-		rp = rp->next_request;
-		if(orp->pdu != NULL)
-		{
-			snmp_pdu_free(orp->pdu);
-		}
-		free(orp);
-	}
-
-	return;
-}
-
-
-/*******************************************************************/
-
-int snmp_session_close(SNMP_session *session, char *error_label)
-{
-	SNMP_session_list *slp = NULL;
-	SNMP_session_list *oslp = NULL;
-
-
-	error_label[0] = '\0';
-
-	if(first_session->session == session)
-	{
-		/* If first entry */
-		slp = first_session;
-		first_session = slp->next;
-	}
-	else
-	{
-		for(slp = first_session; slp; slp = slp->next)
-		{
-			if(slp->session == session)
-			{
-				if(oslp) /* if we found entry that points here */
-				{
-					oslp->next = slp->next;	/* link around this entry */
-				}
-				break;
-			}
-			oslp = slp;
-		}
-	}
-
-	/* If we found the session, free all data associated with it */
-	if(slp)
-	{
-		if(slp->session->community)
-		{
-			free(slp->session->community);
-		}
-		if(slp->session->peername)
-		{
-			free(slp->session->peername);
-		}
-		free(slp->session);
-		if(slp->internal->sd != -1)
-		{
-			if(close(slp->internal->sd) == -1)
-			{
-				(void)fprintf(stderr, "close(%s) failed %s\n",
-					slp->internal->sd, errno_string());
-			}
-		}
-		free_request_list(slp->internal->requests);
-		free((char *)slp->internal);
-		free((char *)slp);
-	}
-	else
-	{
-		snmp_errno = SNMPERR_BAD_SESSION;
-		return -1;
-	}
-
-	return 0;
-}
-
-
-/*******************************************************************/
-
-/*
- *	1) sends the input pdu on the specified session
- *	2) if this request is a pdu, add it to the request list
- *
- *	Upon success, 0 is returned.
- *	On any error, -1 is returned and error_label is set.
- *
- *	The pdu is freed by snmp_session_send() unless a failure occured.
- */
-
-int snmp_session_send(SNMP_session *session, int predefined_id, SNMP_pdu *pdu, char *error_label)
-{
-	SNMP_session_list *slp;
-	SNMP_internal_session *isp = NULL;
-	SNMP_request_list *rp;
-	struct timeval tv;
-
-
-	error_label[0] = '\0';
-
-	for(slp = first_session; slp; slp = slp->next)
-	{
-		if(slp->session == session)
-		{
-			isp = slp->internal;
-			break;
-		}
-	}
-	if(isp == NULL)
-	{
-		snmp_errno = SNMPERR_BAD_SESSION;
-		return -1;
-	}
-
-	if(pdu->community == NULL)
-	{
-		pdu->community = strdup(session->community);
-		if(pdu->community == NULL)
-		{
-			sprintf(error_label, ERR_MSG_ALLOC);
-			snmp_errno = SNMPERR_GENERR;
-			return -1;
-		}
-	}
-
-	if(pdu->type == GET_REQ_MSG || pdu->type == GETNEXT_REQ_MSG
-		|| pdu->type == GET_RSP_MSG || pdu->type == SET_REQ_MSG)
-	{
-		pdu->request_id = ++static_request_id;
-	}
-	else
-	{
-		pdu->request_id = 0;
-	}
-
-
-	if( (pdu->type == GET_REQ_MSG)
-		|| (pdu->type == GETNEXT_REQ_MSG)
-		|| (pdu->type == SET_REQ_MSG) )
-	{
-		/* set up to expect a response */
-
-		rp = (SNMP_request_list *) malloc(sizeof(SNMP_request_list));
-		if(rp == NULL)
-		{
-			sprintf(error_label, ERR_MSG_ALLOC);
-			snmp_errno = SNMPERR_GENERR;
-			return -1;
-		}
-		memset(rp, 0, sizeof(SNMP_request_list));
-	}
-
-	(void)gettimeofday(&tv, (struct timezone *) 0);
-	if(snmp_pdu_send(isp->sd, &(isp->address), pdu, error_label))
-	{
-		snmp_errno = SNMPERR_GENERR;
-		return -1;
-	}
-
-	if( (pdu->type == GET_REQ_MSG)
-		|| (pdu->type == GETNEXT_REQ_MSG)
-		|| (pdu->type == SET_REQ_MSG) )
-	{
-		rp->next_request = isp->requests;
-		isp->requests = rp;
-		rp->pdu = pdu;
-		rp->request_id = pdu->request_id;
-
-		rp->retries = 1;
-
-		rp->timeout = session->timeout;
-		rp->predefined_id = predefined_id;
-
-		rp->time.tv_sec = tv.tv_sec;
-		rp->time.tv_usec = tv.tv_usec;
-/*
-printf("%d NOW:    %d sec and %d usec\n",
-	rp->retries,
-	tv.tv_sec,
-	tv.tv_usec);
-*/
-
-		tv.tv_usec += rp->timeout;
-		tv.tv_sec += tv.tv_usec / 1000000L;
-		tv.tv_usec %= 1000000L;
-
-		rp->expire.tv_sec = tv.tv_sec;
-		rp->expire.tv_usec = tv.tv_usec;
-/*
-printf("%d EXPIRE: %d sec and %d usec\n\n",
-	rp->retries,
-	tv.tv_sec,
-	tv.tv_usec);
-*/
-	}
-	else
-	{
-		snmp_pdu_free(pdu);
-	}
-
-
-	return 0;
-}
-
-
-/*******************************************************************/
-
-void snmp_session_read(fd_set *fdset)
-{
-	while(snmp_session_read_loop(fdset));
-}
-
-/*
- *	We need this function because the user may close the session
- *	in the callback and then corrupt the session list
- */
-
-static int snmp_session_read_loop(fd_set *fdset)
-{
-	SNMP_session_list *slp;
-	SNMP_session *sp;
-	SNMP_internal_session *isp;
-	SNMP_pdu *pdu;
-	SNMP_request_list *rp, *orp;
-
-
-	for(slp = first_session; slp; slp = slp->next)
-	{
-		if(FD_ISSET(slp->internal->sd, fdset))
-		{
-			Address address;
-
-
-			FD_CLR(slp->internal->sd, fdset);
-
-			sp = slp->session;
-			isp = slp->internal;
-
-			pdu = snmp_pdu_receive(isp->sd, &address, static_error_label);
-			if(pdu == NULL)
-			{
-				(void)fprintf(stderr, ERR_MSG_RECEIVED_MANGLED_PACKET,
-					static_error_label);
-				return 0;
-			}
-
-			if(pdu->type == GET_RSP_MSG)
-			{
-				for(rp = isp->requests; rp; rp = rp->next_request)
-				{
-					if(rp->request_id == pdu->request_id)
-					{
-						/* delete request */
-
-						orp = rp;
-						if(isp->requests == orp)
-						{
-							/* first in list */
-
-							isp->requests = orp->next_request;
-						}
-						else
-						{
-							for(rp = isp->requests; rp; rp = rp->next_request)
-							{
-								if(rp->next_request == orp)
-								{
-									rp->next_request = orp->next_request; /* link around it */
-									break;
-								}
-							}
-						}
-
-						sp->callback(RECEIVED_MESSAGE, sp, pdu->request_id, orp->predefined_id, pdu, sp->callback_magic);
-
-						snmp_pdu_free(orp->pdu);
-						free(orp);
-
-						/*
-						 * Then we should return as soon as possible
-						 * because may have closed the session and
-						 * corrupted the pointers
-						 */
-
-						break;
-					}
-				}
-			}
-			else
-			if( (pdu->type == GET_REQ_MSG)
-				|| (pdu->type == GETNEXT_REQ_MSG)
-				|| (pdu->type == TRP_REQ_MSG)
-				|| (pdu->type == SET_REQ_MSG) )
-			{
-				sp->callback(RECEIVED_MESSAGE, sp, pdu->request_id, 0, pdu, sp->callback_magic);
-				/*
-				 * Then we should return as soon as possible
-				 * because may have closed the session and
-				 * corrupted the pointers
-				 */
-			}
-
-			snmp_pdu_free(pdu);
-
-			return 1;
-		}
-	}
-
-	return 0;
-}
-
-
-void snmp_session_read_2(int fd)
-{
-	SNMP_session_list *slp;
-	SNMP_session *sp;
-	SNMP_internal_session *isp;
-	SNMP_pdu *pdu;
-	SNMP_request_list *rp, *orp;
-
-
-	for(slp = first_session; slp; slp = slp->next)
-	{
-		if(slp->internal->sd == fd)
-		{
-			Address address;
-
-
-			sp = slp->session;
-			isp = slp->internal;
-
-			pdu = snmp_pdu_receive(isp->sd, &address, static_error_label);
-			if(pdu == NULL)
-			{
-				(void)fprintf(stderr, ERR_MSG_RECEIVED_MANGLED_PACKET,
-					static_error_label);
-				return;
-			}
-
-			if(pdu->type == GET_RSP_MSG)
-			{
-				for(rp = isp->requests; rp; rp = rp->next_request)
-				{
-					if(rp->request_id == pdu->request_id)
-					{
-						/* delete request */
-						orp = rp;
-						if(isp->requests == orp)
-						{
-							/* first in list */
-
-							isp->requests = orp->next_request;
-						}
-						else
-						{
-							for(rp = isp->requests; rp; rp = rp->next_request)
-							{
-								if(rp->next_request == orp)
-								{
-									rp->next_request = orp->next_request; /* link around it */
-									break;
-								}
-							}
-						}
-
-						sp->callback(RECEIVED_MESSAGE, sp, pdu->request_id, orp->predefined_id, pdu, sp->callback_magic);
-
-						snmp_pdu_free(orp->pdu);
-						free(orp);
-
-						/*
-						 * Then we should return as soon as possible
-						 * because may have closed the session and
-						 * corrupted the pointers
-						 */
-
-						break;
-					}
-				}
-			}
-			else
-			if( (pdu->type == GET_REQ_MSG)
-				|| (pdu->type == GETNEXT_REQ_MSG)
-				|| (pdu->type == TRP_REQ_MSG)
-				|| (pdu->type == SET_REQ_MSG) )
-			{
-				sp->callback(RECEIVED_MESSAGE, sp, pdu->request_id, 0, pdu, sp->callback_magic);
-				/*
-				 * Then we should return as soon as possible
-				 * because may have closed the session and
-				 * corrupted the pointers
-				 */
-			}
-
-			snmp_pdu_free(pdu);
-
-			return;
-		}
-	}
-
-	return;
-}
-
-
-/*******************************************************************/
-
-int snmp_session_select_info(int *numfds, fd_set *fdset, struct timeval *timeout)
-{
-	SNMP_session_list *slp;
-	SNMP_internal_session *isp;
-	SNMP_request_list *rp;
-	struct timeval now, earliest;
-	int active = 0, requests = 0;
-
-
-	timerclear(&earliest);
-
-	/*
-	 *	For each request outstanding, add it's socket to the fdset,
-	 *	and if it is the earliest timeout to expire, mark it as lowest.
-	 */
-	for(slp = first_session; slp; slp = slp->next)
-	{
-		active++;
-		isp = slp->internal;
-		if((isp->sd + 1) > *numfds)
-		{
-			*numfds = (isp->sd + 1);
-		}
-		FD_SET(isp->sd, fdset);
-
-		if(isp->requests)
-		{
-			/* found another session with outstanding requests */
-			for(rp = isp->requests; rp; rp = rp->next_request)
-			{
-				requests++;
-				if(!timerisset(&earliest) || timercmp(&rp->expire, &earliest, <))
-				{
-					earliest.tv_sec = rp->expire.tv_sec;
-					earliest.tv_usec = rp->expire.tv_usec;
-				}
-			}
-		}
-	}
-/*
-printf("NUM REQUESTS:     %d\n",
-	requests);
-*/
-
-	if(requests == 0)
-	{
-		/* if none are active, skip arithmetic */
-
-		return 0;
-	}
-/*
-printf("EARLIEST TIMEOUT: %d sec and %d usec\n\n",
-	earliest.tv_sec,
-	earliest.tv_usec);
-*/
-
-	/*
-	 *	Now find out how much time until the earliest timeout.  This
-	 *	transforms earliest from an absolute time into a delta time, the
-	 *	time left until the select should timeout.
-	 */
-	(void)gettimeofday(&now, (struct timezone *)0);
-	earliest.tv_sec--;	/* adjust time to make arithmetic easier */
-	earliest.tv_usec += 1000000L;
-	earliest.tv_sec -= now.tv_sec;
-	earliest.tv_usec -= now.tv_usec;
-	while(earliest.tv_usec >= 1000000L)
-	{
-		earliest.tv_usec -= 1000000L;
-		earliest.tv_sec += 1;
-	}
-	if(earliest.tv_sec < 0)
-	{
-		earliest.tv_sec = 0;
-		earliest.tv_usec = 0;
-	}
-	if((earliest.tv_sec == 0) && (earliest.tv_usec == 0))
-	{
-		earliest.tv_sec = 0;
-		earliest.tv_usec = 1;
-	}
-
-	if(timercmp(&earliest, timeout, <))
-	{
-		timeout->tv_sec = earliest.tv_sec;
-		timeout->tv_usec = earliest.tv_usec;
-	}
-	else
-	if((timeout->tv_sec == 0) && (timeout->tv_usec == 0))
-	{
-		timeout->tv_sec = earliest.tv_sec;
-		timeout->tv_usec = earliest.tv_usec;
-	}
-
-/*
-printf("NEW TIMEOUT: %d sec and %d usec\n\n",
-	timeout->tv_sec,
-	timeout->tv_usec);
-*/
-
-	return requests;
-}
-
-
-int snmp_session_itimeout_info(struct itimerval *itimeout)
-{
-	int numfds = 0;
-	fd_set fdset;
-
-
-	FD_ZERO(&fdset);
-
-	return snmp_session_select_info(&numfds, &fdset, &(itimeout->it_value));
-}
-
-
-/*******************************************************************/
-
-/*
- *	It may remain some bugs in this function
- *	because the user may close the session in the callback
- *	and then corrupt the list
- */
-
-void snmp_session_timeout()
-{
-	while(snmp_session_timeout_loop());
-}
-
-static int snmp_session_timeout_loop()
-{
-	SNMP_session_list *slp;
-	SNMP_session *sp;
-	SNMP_internal_session *isp;
-	SNMP_request_list *rp, *orp;
-	struct timeval now;
-
-
-	(void)gettimeofday(&now, (struct timezone *) 0);
-
-	/*
-	 *	For each request outstanding, check to see if it has expired.
-	*/
-
-	for(slp = first_session; slp; slp = slp->next)
-	{
-		sp = slp->session;
-		isp = slp->internal;
-		orp = NULL;
-		for(rp = isp->requests; rp; rp = rp->next_request)
-		{
-			if(timercmp(&rp->expire, &now, <))
-			{
-				/* this timer has expired */
-
-				if (rp->retries >= sp->retries)
-				{
-					/* No more chances, delete this entry */
-
-
-					if(orp == NULL)
-					{
-						isp->requests = rp->next_request;
-					}
-					else
-					{
-						orp->next_request = rp->next_request;
-					}
-
-					sp->callback(TIMED_OUT, sp, rp->pdu->request_id, rp->predefined_id, rp->pdu, sp->callback_magic);
-
-					snmp_pdu_free(rp->pdu);
-					free(rp);
-
-					return 1;
-				}
-				else
-				{
-					/* retransmit this pdu */
-
-					struct timeval tv;
-
-
-					rp->retries++;
-					rp->timeout <<= 1;
-
-					(void)gettimeofday(&tv, (struct timezone *) 0);
-					if(snmp_pdu_send(isp->sd, &(isp->address), rp->pdu, static_error_label))
-					{
-						(void)fprintf(stderr, "snmp_pdu_send() failed: %s\n",
-							static_error_label);
-					}
-
-					rp->time.tv_sec = tv.tv_sec;
-					rp->time.tv_usec = tv.tv_usec;
-/*
-printf("%d NOW:    %d sec and %d usec\n",
-	rp->retries,
-	tv.tv_sec,
-	tv.tv_usec);
-*/
-
-					tv.tv_usec += rp->timeout;
-					tv.tv_sec += tv.tv_usec / 1000000L;
-					tv.tv_usec %= 1000000L;
-
-					rp->expire.tv_sec = tv.tv_sec;
-					rp->expire.tv_usec = tv.tv_usec;
-/*
-printf("%d EXPIRE: %d sec and %d usec\n\n",
-	rp->retries,
-	tv.tv_sec,
-	tv.tv_usec);
-*/
-				}
-			}
-			orp = rp;
-		}
-	}
-
-	return 0;
-}
-
-
-
--- a/usr/src/cmd/agents/snmp/snmplib/snmp_api.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _SNMP_API_H_
-#define _SNMP_API_H_
-
-#include <sys/types.h>
-#include "impl.h"
-#include "snmp.h"
-#include "pdu.h"
-
-
-/***** NEW CONSTANTS *****/
-
-/*
- *	Set fields in session to the following to
- *	get a default or unconfigured value.
- */
-
-#define SNMP_DEFAULT_COMMUNITY		NULL
-#define SNMP_DEFAULT_RETRIES		-1
-#define SNMP_DEFAULT_TIMEOUT		-1
-#define SNMP_DEFAULT_REMPORT		0
-#define SNMP_DEFAULT_LOCPORT		0
-
-
-/*
- *	Error return values
- */
-
-#define SNMPERR_GENERR		-1
-#define SNMPERR_BAD_LOCPORT	-2  /* local port was already in use */
-#define SNMPERR_BAD_ADDRESS	-3
-#define SNMPERR_BAD_SESSION	-4
-#define SNMPERR_SYSERR		-5
-
-
-/*
- *	Operation values	(see callback())
- */
-
-#define RECEIVED_MESSAGE	1
-#define TIMED_OUT		2
-
-
-/***** NEW TYPES *****/
-
-/*
- *	community:	community for outgoing requests
- *	retries:	Number of retries before timeout 
- *	timeout:	Number of uS until first timeout, then exponential backoff
- *	peername:	Domain name or dotted IP address of default peer
- *	remote_port:	UDP port number of peer
- *	local_port:	My UDP port number, 0 for default, picked randomly
- *	callback:	Function to interpret incoming data
- *	callback_magic:	Pointer to data that the callback function may consider important
- *	sd:		socket descriptor associated with that session
- */
-
-typedef struct SNMP_session {
-	char	*community;
-	int	retries;
-	int32_t	timeout;
-	char	*peername;
-	u_short	remote_port;
-	u_short	local_port;
-	void	(*callback)();
-	void	*callback_magic;
-	int	sd;
-} SNMP_session;
-
-
-/***** GLOBAL VARIABLES *****/
-
-extern int snmp_errno;
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-/*
- *	snmp_session_open()
- * 
- *	Sets up the session with the information provided
- *	by the user. Then opens and binds the necessary UDP port.
- *	A handle to the created session is returned.
- *	On any error, NULL is returned
- *	and snmp_errno is set to the appropriate error code.
- */
-
-SNMP_session *snmp_session_open(char *peername, char *community, int retries, int32_t timeout, void callback(), void *callback_magic, char *error_label);
-
-SNMP_session *snmp_session_open_default(char *peername, void callback(), void *callback_magic, char *error_label);
-
-
-/*
- *	snmp_session_close()
- * 
- *	Close the input session.  Frees all data allocated for the session,
- *	dequeues any pending requests, and closes any sockets allocated for
- *	the session.  Returns 0 on sucess, -1 otherwise.
- */
-
-int snmp_session_close(SNMP_session *session, char *error_label);
-
-
-/*
- *	snmp_session_send()
- * 
- *	Sends the input pdu on the session.
- *	Add a request corresponding to this pdu to the list
- *	of outstanding requests on this session, then send the pdu.
- *	Returns 0 upon sucess.
- *	On any error, -1 is returned.
- *
- *	The pdu is freed by snmp_send() unless a failure occured.
- */
-
-int snmp_session_send(SNMP_session *session, int predefined_id, SNMP_pdu *pdu, char *error_label);
-
-
-/*
- *	snmp_session_read()
- * 
- *	Checks to see if any of the fd's set in the fdset belong to
- *	snmp. Each socket with it's fd set has a packet read from it
- *	The resulting pdu is passed to the callback routine for that session.
- */
-
-void snmp_session_read(fd_set *fdset);
-
-void snmp_session_read_2(int fd);
-
-
-/*
- *	snmp_session_select_info()
- *
- *	Returns info about what snmp requires from a select statement.
- *	numfds is the number of fds in the list that are significant.
- *	All file descriptors opened for SNMP are OR'd into the fdset.
- *	If activity occurs on any of these file descriptors, snmp_read
- *	should be called with that file descriptor set.
- *
- *	The timeout is the latest time that SNMP can wait for a timeout. The
- *	select should be done with the minimum time between timeout and any other
- *	timeouts necessary. This should be checked upon each invocation of select.
- *	If a timeout is received, snmp_timeout should be called to check if the
- *	timeout was for SNMP. (snmp_timeout is idempotent)
- *
- *	snmp_session_select_info returns the number of current requests.
- */
-
-int snmp_session_select_info(int *numfds, fd_set *fdset, struct timeval *timeout);
-
-int snmp_session_timeout_info(struct itimerval *itimeout);
-
-
-/*
- *	snmp_session_timeout()
- * 
- *	snmp_timeout should be called whenever the timeout from snmp_select_info expires,
- *	but it is idempotent, so snmp_timeout can be polled (probably a cpu expensive
- *	proposition). snmp_timeout checks to see if any of the sessions have an
- *	outstanding request that has timed out.  If it finds one (or more), and that
- *	pdu has more retries available, a new packet is formed from the pdu and is
- *	resent. If there are no more retries available, the callback for the session
- *	is used to alert the user of the timeout.
- */
-
-void snmp_session_timeout();
-
-
-/*
- *	This routine must be supplied by the application:
- *
- *	void callback(
- *		int operation,
- *		SNMP_session *session,	The session authenticated under.
- *		int request_id,		The request id of this pdu (0 for TRAP)
- *		int predefined_id,
- *		SNMP_pdu *pdu,		The pdu information.
- *		void *magic);		A link to the data for this routine.
- *
- *	Any data in the pdu must be copied because it will be freed elsewhere.
- *	Operations are defined above.
- */
-
-#endif
-
--- a/usr/src/cmd/agents/snmp/snmplib/snmp_msg.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996-2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
-#ifndef _SNMP_MSG_H_
-#define _SNMP_MSG_H_
-
-
-
-#define ERR_MSG_ALLOC			"cannot allocate memory"
-
-
-#define ERR_MSG_HOSTENT_BAD_IP_LENGTH		"length of IP address in the hostent structure is not 4: %d"
-#define ERR_MSG_HOSTENT_MISSING_IP_ADDRESS	"no IP address in the hostent structure"
-
-#define ERR_MSG_BAD_IP_ADDRESS		"%s is not a valid IP address"
-#define ERR_MSG_BAD_HOSTNAME		"%s is not a valid hostname"
-
-#define ERR_MSG_BAD_TRACE_LEVEL		"Bad trace level %d. Must be in (0..%d)"
-
-#define ERR_MSG_TRAP_DEST_DUP		"the trap destinator %s already exists"
-
-#define ERR_MSG_TIMEOUT			"timeout expired"
-#define ERR_MSG_BAD_RESPONSE		"bad response"
-#define ERR_MSG_BAD_VALUE		"bad value"
-
-
-/***** SYSTEM ERROR MESSAGES *****/
-
-#define	ERR_MSG_FILE_CREATION	"cannot create file %s %s"
-#define	ERR_MSG_FILE_OPEN		"cannot open file %s %s"
-#define	ERR_MSG_UNAME			"uname() failed %s"
-#define	ERR_MSG_SOCKET			"socket() failed %s"
-#define	ERR_MSG_BIND			"bind() failed %s"
-#define	ERR_MSG_RECVFROM		"recvfrom() failed %s"
-#define	ERR_MSG_SENDTO			"sendto() failed %s"
-#define	ERR_MSG_SELECT			"select() failed %s"
-#define	ERR_MSG_SIGACT			"sigaction() failed for %d %s with %s"
-
-
-/***** HOST ERROR MESSAGE *****/
-
-#define ERR_MSG_GETHOSTBYNAME		"gethostbyname(%s) failed %s"
-
-
-/***** CODING/DECODING ERROR MESSAGES *****/
-
-/* asn1.c */
-
-#define ERR_MSG_NOT_LONG		"not long"
-#define ERR_MSG_BAD_LENGTH		"bad length"
-#define ERR_MSG_OVERFLOW		"overflow of message"
-#define ERR_MSG_DONT_SUPPORT_LARGE_INT	"integers that large are not supported"
-#define ERR_MSG_BUILD_LENGTH		"build_length"
-#define ERR_MSG_SUBIDENTIFIER_TOO_LONG	"subidentifier too long"
-#define ERR_MSG_DONT_SUPPORT_LARGE_STR	"strings that long are not supported"
-#define ERR_MSG_DONT_SUPPORT_INDEF_LEN	"indefinite lengths are not supported"
-#define ERR_MSG_DONT_SUPPORT_SUCH_LEN	"data lengths that long are not supported"
-#define ERR_MSG_MALFORMED_NULL		"malformed NULL"
-#define ERR_MSG_ASN_LEN_TOO_LONG	"asn length too long"
-#define ERR_MSG_CANT_PROCESS_LONG_ID	"can't process ID >= 30"
-
-
-/* pdu.c */
-
-
-/***** SNMP API *****/
-
-#define ERR_MSG_CAN_NOT_ABORT_SESSION	"Couldn't abort session: %s %s. Exiting\n"
-#define ERR_MSG_RECEIVED_MANGLED_PACKET	"Received mangled SNMP packet: %s\n"
-
-
-/***** MADMAN API *****/
-
-#define ERR_MSG_ERROR_STATUS		"%s on the %dth variable"
-#define ERR_MSG_MISSING_VARIABLES	"missing some variables"
-#define ERR_MSG_BAD_VARIABLE_TYPE	"bad type (0x%x) for %s"
-
-
-/***** LOG *****/
-
-#define MSG_STARTED			"started\n"
-#define LOG_MSG_STARTED			"*** started ***"
-
-#define MSG_EXITING			"exiting\n"
-#define LOG_MSG_EXITING			"*** exiting ***"
-
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmplib/sparc/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 1998, 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../Makefile.com
-
-install: $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
--- a/usr/src/cmd/agents/snmp/snmplib/sparcv9/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../Makefile.com
-include $(SRC)/lib/Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
--- a/usr/src/cmd/agents/snmp/snmplib/test/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#######################################################
-#
-# Makefile for madman_api_test
-#
-#######################################################
-
-#
-# Makefile.vars
-#
-
-include ../../../Makefile.vars
-
-
-#
-# other variables
-#
-
-TARGET1=	$(BIN)/madman_api_test
-TARGET2=	$(BIN)/asn1_test
-TARGET3=	$(BIN)/error_test
-TARGET4=	$(BIN)/trap_test
-TARGET5=	$(BIN)/madman_trap_test
-TARGET6=	$(BIN)/madman_api_test_2
-
-
-.KEEP_STATE:
-
-SOURCES1.c= madman_api_test.c
-
-SOURCES2.c= asn1_test.c
-
-SOURCES3.c= error_test.c
-
-SOURCES4.c= trap_test.c
-
-SOURCES5.c= madman_trap_test.c
-
-SOURCES6.c= madman_api_test_2.c
-
-SOURCES.h=\
-	../snmp_msg.h\
-	../impl.h\
-	../error.h\
-	../trace.h\
-	../asn1.h\
-	../signals.h\
-	../snmp.h\
-	../pdu.h\
-	../request.h\
-	../snmp_api.h\
-	../madman_api.h
-
-OBJECTS1= $(SOURCES1.c:%.c=$(BIN)/%.o)
-OBJECTS2= $(SOURCES2.c:%.c=$(BIN)/%.o)
-OBJECTS3= $(SOURCES3.c:%.c=$(BIN)/%.o)
-OBJECTS4= $(SOURCES4.c:%.c=$(BIN)/%.o)
-OBJECTS5= $(SOURCES5.c:%.c=$(BIN)/%.o)
-OBJECTS6= $(SOURCES6.c:%.c=$(BIN)/%.o)
-
-OBJECTS= $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) $(OBJECTS4) \
-	 $(OBJECTS5) $(OBJECTS6)
-
-MYLIBS= ../$(MACH)/libssasnmp.a
-
-LIBS=	-lsocket -lnsl -lelf -lgen 
-
-CPPFLAGS += -I. -I.. -I${BIN}
-
-CFLAGS += -c
-
-LDFLAGS += $(LDLIBS)
-
-LINT=	lint
-
-PURIFY_HOME= /usr/soft/purify3.0
-
-PURIFY= $(PURIFY_HOME)/purify
-
-
-#######################################################
-
-#
-# all
-#
-
-all: $(SOURCES.h) $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5) $(TARGET6)
-
-$(TARGET1): $(BIN) $(OBJECTS1) $(MYLIBS)
-	@echo -------------- $@ linkink begins --------------
-	$(CC) -o $(TARGET1) $(LDFLAGS) $(OBJECTS1) $(MYLIBS) $(LIBS)
-	@echo -------------- $@ linkink ended ---------------
-
-$(TARGET2): $(BIN) $(OBJECTS2) $(MYLIBS)
-	@echo -------------- $@ linkink begins --------------
-	$(CC) -o $(TARGET2) $(LDFLAGS) $(OBJECTS2) $(MYLIBS) $(LIBS)
-	@echo -------------- $@ linkink ended ---------------
-
-$(TARGET3): $(BIN) $(OBJECTS3) $(MYLIBS)
-	@echo -------------- $@ linkink begins --------------
-	$(CC) -o $(TARGET3) $(LDFLAGS) $(OBJECTS3) $(MYLIBS) $(LIBS)
-	@echo -------------- $@ linkink ended ---------------
-
-$(TARGET4): $(BIN) $(OBJECTS4) $(MYLIBS)
-	@echo -------------- $@ linkink begins --------------
-	$(CC) -o $(TARGET4) $(LDFLAGS) $(OBJECTS4) $(MYLIBS) $(LIBS)
-	@echo -------------- $@ linkink ended ---------------
-
-$(TARGET5): $(BIN) $(OBJECTS5) $(MYLIBS)
-	@echo -------------- $@ linkink begins --------------
-	$(CC) -o $(TARGET5) $(LDFLAGS) $(OBJECTS5) $(MYLIBS) $(LIBS)
-	@echo -------------- $@ linkink ended ---------------
-
-$(TARGET6): $(BIN) $(OBJECTS6) $(MYLIBS)
-	@echo -------------- $@ linkink begins --------------
-	$(CC) -o $(TARGET6) $(LDFLAGS) $(OBJECTS6) $(MYLIBS) $(LIBS)
-	@echo -------------- $@ linkink ended ---------------
-
-$(BIN)/%.o: %.c
-	@echo -------------- $@ compile begins --------------
-	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $*.c -o $@
-	@echo -------------- $@ compile ended ---------------
-
-
-#
-# lint
-#
-
-lint:
-	@echo -------------- $@ begins ----------------------
-	$(LINT) $(LDFLAGS) $(CPPFLAGS) $(DEFINES) $(SOURCES.c) $(MYLIBS) $(LIBS)
-	@echo -------------- $@ ended -----------------------
-
-
-#
-# purify
-#
-
-purify:
-	@echo -------------- $@ begins ----------------------
-	$(PURIFY) $(CC) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(MYLIBS) $(LIBS)
-	@echo -------------- $@ ended -----------------------
-
-
-#
-# directories
-#
-
-$(BIN):
-	$(TEST) -d $@ || mkdir $@
-
-
-#
-# clean
-#
-
-clean:
-	rm -f $(OBJECTS)
-
-clobber: clean
--- a/usr/src/cmd/agents/snmp/snmplib/test/asn1_test.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "asn1.h"
-#include "error.h"
-#include "pdu.h"
-
-
-#define BUFFER_SZ	10
-
-static u_char static_buffer[] = { 0x41, 0x03, 0xF5, 0x1E, 0x5C };
-
-static void second_test(long value, u_char asn_type);
-static void third_test();
-
-
-main()
-{
-	u_char *p;
-	int len;
-	long integer = 0;
-	u_char type = 0;
-
-
-	/* 1st test */
-
-	len = sizeof(static_buffer);
-	integer = 0;
-	type = 0;
-	p = asn_parse_int(static_buffer, &len, &type, &integer, sizeof(long), error_label);
-	if(p == NULL)
-	{
-		fprintf(stderr, "asn_parse_int() failed: %s\n", error_label);
-		exit(1);
-	}
-	printf("type:    0x%x\n", type);
-	printf("integer: %ld\n", integer);
-	printf("\n");
-
-
-	/* 2nd test */
-
-	second_test(0xFF, COUNTER);
-	second_test(-0xFF, COUNTER);
-
-	second_test(0xFFFF, COUNTER);
-	second_test(-0xFFFF, COUNTER);
-
-	second_test(0xFFFFFF, COUNTER);
-	second_test(-0xFFFFFF, COUNTER);
-
-	second_test(16523569, COUNTER);
-	second_test(-1363058786, COUNTER);
-
-
-	/* 3rd test */
-
-	third_test();
-
-
-	exit(0);
-
-}
-
-
-static void second_test(long value, u_char asn_type)
-{
-	u_char *p;
-	int len;
-	long integer = 0;
-	u_char type = 0;
-	u_char buffer[BUFFER_SZ];
-	int i;
-
-
-	printf("VALUE: %ld - TYPE: 0x%x\n\n", value, asn_type);
-
-	integer = value;
-	type = asn_type;
-	memset(buffer, 0, sizeof(buffer));
-	len = BUFFER_SZ;
-	p = asn_build_int(buffer, &len, type, &integer, sizeof(long), error_label);
-	if(p == NULL)
-	{
-		fprintf(stderr, "asn_build_int() failed: %s\n", error_label);
-		exit(1);
-	}
-	printf("len:     %d\n", len);
-	printf("buffer: ");
-	for(i = 0; i < BUFFER_SZ; i++)
-	{
-		printf(" %02x", buffer[i]);
-	}
-	printf("\n");
-
-	integer = 0;
-	type = 0;
-	len = BUFFER_SZ;
-	p = asn_parse_int(buffer, &len, &type, &integer, sizeof(long), error_label);
-	if(p == NULL)
-	{
-		fprintf(stderr, "asn_parse_int() failed: %s\n", error_label);
-		exit(1);
-	}
-	printf("type:    0x%x\n", type);
-	printf("integer: %ld\n", integer);
-	printf("\n");
-}
-
-
-static void third_test()
-{
-	SNMP_pdu *pdu;
-
-	pdu = snmp_pdu_new(error_label);
-}
--- a/usr/src/cmd/agents/snmp/snmplib/test/error_test.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
-#include "error.h"
-
-
-static void application_end()
-{
-}
-
-
-main(int agrc, char *argv[])
-{
-	error_init(argv[0], application_end);
-
-	error("first message");
-	error("tata\n");
-	error("\n");
-	error("titi\n");
-	error("\n\n");
-	error("toto\n\n\n");
-	error("\n\n\n");
-
-	error_open("/tmp/error_test.log");
-
-	error("second message");
-	error("tata\n");
-	error("\n");
-	error("titi\n");
-	error("\n\n");
-	error("toto\n\n\n");
-	error("\n\n\n");
-
-/*
- *	error_close_stderr();
- */
-
-	error("third message");
-	error("tata\n");
-	error("\n");
-	error("titi\n");
-	error("\n\n");
-	error("toto\n\n\n");
-	error("\n\n\n");
-
-	error_exit("end of this sample program");
-}
--- a/usr/src/cmd/agents/snmp/snmplib/test/madman_api_test.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,935 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
-#include "stdio.h"
-#include "errno.h"
-#include "sys/types.h"
-#include "sys/socket.h"
-#include "netinet/in.h"
-
-#include "snmp_msg.h"
-#include "error.h"
-#include "trace.h"
-#include "madman_api.h"
-
-
-/***** NEW CONSTANTS *****/
-
-#define MSG_END_OF_TABLE	"end of table for request %s on %s\n\n"
-#define ERR_MSG_REQUEST_FAILED	"the request %s on %s failed: %s\n\n"
-
-
-/***** NEW TYPES *****/
-
-typedef struct _Target {
-	struct _Target *next_target;
-	char name[100];
-} Target;
-
-
-/***** STATIC VARIABLES *****/
-
-static int snmp_session_num = 0;
-
-static Target *first_target = NULL;
-
-
-/****** STATIC FUNCTIONS *****/
-
-static int target_add(char *name, char *error_label);
-
-
-/**************************************************************/
-
-static int target_add(char *name, char *error_label)
-{
-	Target *new;
-
-
-	error_label[0] = '\0';
-
-	if(name == NULL)
-	{
-		sprintf(error_label, "BUG: name is NULL");
-		return -1;
-	}
-
-	new = (Target *) malloc(sizeof(Target));
-	if(new == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return -1;
-	}
-
-	strcpy(new->name, name);
-
-	new->next_target = first_target;
-	first_target = new;
-
-	return 0;
-}
-
-
-/**************************************************************/
-/*
- *	do not free response!
- */
-
-static void snmp_callback(int operation, SNMP_session *session, int request_id, int predefined_id, SNMP_pdu *response, void *snmp_callback_magic)
-{
-	struct itimerval itimeout;
-	ApplEntry *applEntry = NULL;
-	AssocEntry *assocEntry = NULL;
-	MtaEntry *mtaEntry = NULL;
-	MtaGroupEntry *mtaGroupEntry = NULL;
-	MtaGroupAssociationEntry *mtaGroupAssociationEntry = NULL;
-	DsaOpsEntry *dsaOpsEntry = NULL;
-	DsaEntriesEntry *dsaEntriesEntry = NULL;
-	DsaIntEntry *dsaIntEntry = NULL;
-	X4msMtaEntry *x4msMtaEntry = NULL;
-	X4msUserEntryPart1 *x4msUserEntryPart1 = NULL;
-	X4msUserEntryPart2 *x4msUserEntryPart2 = NULL;
-	X4msUserAssociationEntry *x4msUserAssociationEntry = NULL;
-	X4grpEntry *x4grpEntry = NULL;
-	X4grpMappingEntry *x4grpMappingEntry = NULL;
-	X5dsaReferenceEntry *x5dsaReferenceEntry = NULL;
-	char *request_name = NULL;
-
-
-	request_name = predefined_request_string(predefined_id);
-
-	switch(operation)
-	{
-		case RECEIVED_MESSAGE:
-			switch(predefined_id)
-			{
-				case APPL_ENTRY_REQ:
-					applEntry = applEntry_process_response(session, response, error_label);
-					if(applEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(assocEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label))
-							{
-								fprintf(stderr, "assocEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						applEntry_print(applEntry);
-						if(applEntry_send_request(session, GETNEXT_REQ_MSG, applEntry->applIndex, error_label))
-						{
-							fprintf(stderr, "applEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						applEntry_free(applEntry);
-					}
-
-					break;
-
-
-				case ASSOC_ENTRY_REQ:
-					assocEntry = assocEntry_process_response(session, response, error_label);
-					if(assocEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(mtaEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "mtaEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						assocEntry_print(assocEntry);
-						if(assocEntry_send_request(session, GETNEXT_REQ_MSG, assocEntry->applIndex, assocEntry->assocIndex, error_label))
-						{
-							fprintf(stderr, "assocEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						assocEntry_free(assocEntry);
-					}
-
-					break;
-
-
-				case MTA_ENTRY_REQ:
-					mtaEntry = mtaEntry_process_response(session, response, error_label);
-					if(mtaEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(mtaGroupEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label))
-							{
-								fprintf(stderr, "mtaGroupEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						mtaEntry_print(mtaEntry);
-						if(mtaEntry_send_request(session, GETNEXT_REQ_MSG, mtaEntry->applIndex, error_label))
-						{
-							fprintf(stderr, "mtaEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						mtaEntry_free(mtaEntry);
-					}
-
-					break;
-
-
-				case MTA_GROUP_ENTRY_REQ:
-					mtaGroupEntry = mtaGroupEntry_process_response(session, response, error_label);
-					if(mtaGroupEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(mtaGroupAssociationEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, -1, error_label))
-							{
-								fprintf(stderr, "mtaGroupAssociationEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						mtaGroupEntry_print(mtaGroupEntry);
-						if(mtaGroupEntry_send_request(session, GETNEXT_REQ_MSG, mtaGroupEntry->applIndex, mtaGroupEntry->mtaGroupIndex, error_label))
-						{
-							fprintf(stderr, "mtaGroupEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						mtaGroupEntry_free(mtaGroupEntry);
-					}
-
-					break;
-
-
-				case MTA_GROUP_ASSOCIATION_ENTRY_REQ:
-					mtaGroupAssociationEntry = mtaGroupAssociationEntry_process_response(session, response, error_label);
-					if(mtaGroupAssociationEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(dsaOpsEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "dsaOpsEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						mtaGroupAssociationEntry_print(mtaGroupAssociationEntry);
-						if(mtaGroupAssociationEntry_send_request(session, GETNEXT_REQ_MSG, mtaGroupAssociationEntry->applIndex, mtaGroupAssociationEntry->mtaGroupIndex, mtaGroupAssociationEntry->mtaGroupAssociationIndex, error_label))
-						{
-							fprintf(stderr, "mtaGroupAssociationEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						mtaGroupAssociationEntry_free(mtaGroupAssociationEntry);
-					}
-
-					break;
-
-
-				case DSA_OPS_ENTRY_REQ:
-					dsaOpsEntry = dsaOpsEntry_process_response(session, response, error_label);
-					if(dsaOpsEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(dsaEntriesEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "dsaEntriesEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						dsaOpsEntry_print(dsaOpsEntry);
-						if(dsaOpsEntry_send_request(session, GETNEXT_REQ_MSG, dsaOpsEntry->applIndex, error_label))
-						{
-							fprintf(stderr, "dsaOpsEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						dsaOpsEntry_free(dsaOpsEntry);
-					}
-
-					break;
-
-
-				case DSA_ENTRIES_ENTRY_REQ:
-					dsaEntriesEntry = dsaEntriesEntry_process_response(session, response, error_label);
-					if(dsaEntriesEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(dsaIntEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label))
-							{
-								fprintf(stderr, "dsaIntEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						dsaEntriesEntry_print(dsaEntriesEntry);
-						if(dsaEntriesEntry_send_request(session, GETNEXT_REQ_MSG, dsaEntriesEntry->applIndex, error_label))
-						{
-							fprintf(stderr, "dsaEntriesEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						dsaEntriesEntry_free(dsaEntriesEntry);
-					}
-
-					break;
-
-
-				case DSA_INT_ENTRY_REQ:
-					dsaIntEntry = dsaIntEntry_process_response(session, response, error_label);
-					if(dsaIntEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4msMtaEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "x4msMtaEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						dsaIntEntry_print(dsaIntEntry);
-						if(dsaIntEntry_send_request(session, GETNEXT_REQ_MSG, dsaIntEntry->applIndex, dsaIntEntry->dsaIntIndex, error_label))
-						{
-							fprintf(stderr, "dsaIntEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						dsaIntEntry_free(dsaIntEntry);
-					}
-
-					break;
-
-
-				case X4MS_MTA_ENTRY_REQ:
-					x4msMtaEntry = x4msMtaEntry_process_response(session, response, error_label);
-					if(x4msMtaEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4msUserEntryPart1_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "x4msUserEntryPart1_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4msMtaEntry_print(x4msMtaEntry);
-						if(x4msMtaEntry_send_request(session, GETNEXT_REQ_MSG, x4msMtaEntry->x4msMtaIndex, error_label))
-						{
-							fprintf(stderr, "x4msMtaEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x4msMtaEntry_free(x4msMtaEntry);
-					}
-
-					break;
-
-
-				case X4MS_USER_ENTRY_PART1_REQ:
-					x4msUserEntryPart1 = x4msUserEntryPart1_process_response(session, response, error_label);
-					if(x4msUserEntryPart1 == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4msUserAssociationEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label))
-							{
-								fprintf(stderr, "x4msUserAssociationEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4msUserEntryPart1_print(x4msUserEntryPart1);
-
-						if(x4msUserEntryPart2_send_request(session, GET_REQ_MSG, x4msUserEntryPart1->x4msUserIndex, error_label))
-						{
-							fprintf(stderr, "x4msUserEntryPart2_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-
-						if(x4msUserEntryPart1_send_request(session, GETNEXT_REQ_MSG, x4msUserEntryPart1->x4msUserIndex, error_label))
-						{
-							fprintf(stderr, "x4msUserEntryPart1_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-
-						x4msUserEntryPart1_free(x4msUserEntryPart1);
-					}
-
-					break;
-
-
-				case X4MS_USER_ENTRY_PART2_REQ:
-					x4msUserEntryPart2 = x4msUserEntryPart2_process_response(session, response, error_label);
-					if(x4msUserEntryPart2 == NULL)
-					{
-						fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-							request_name, session->peername, error_label);
-						trace_snmp_pdu(response);
-
-						snmp_session_close(session, error_label);
-						snmp_session_num--;
-					}
-					else
-					{
-						x4msUserEntryPart2_print(x4msUserEntryPart2);
-						x4msUserEntryPart2_free(x4msUserEntryPart2);
-					}
-
-					break;
-
-
-				case X4MS_USER_ASSOCIATION_ENTRY_REQ:
-					x4msUserAssociationEntry = x4msUserAssociationEntry_process_response(session, response, error_label);
-					if(x4msUserAssociationEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4grpEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "x4grpEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4msUserAssociationEntry_print(x4msUserAssociationEntry);
-						if(x4msUserAssociationEntry_send_request(session, GETNEXT_REQ_MSG, x4msUserAssociationEntry->x4msUserIndex, x4msUserAssociationEntry->x4msUserAssociationIndex, error_label))
-						{
-							fprintf(stderr, "x4msUserAssociationEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x4msUserAssociationEntry_free(x4msUserAssociationEntry);
-					}
-
-					break;
-
-				case X4GRP_ENTRY_REQ:
-					x4grpEntry = x4grpEntry_process_response(session, response, error_label);
-					if(x4grpEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4grpMappingEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, -1, error_label))
-							{
-								fprintf(stderr, "x4grpMappingEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4grpEntry_print(x4grpEntry);
-						if(x4grpEntry_send_request(session, GETNEXT_REQ_MSG, x4grpEntry->x4grpIndex, error_label))
-						{
-							fprintf(stderr, "x4grpEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x4grpEntry_free(x4grpEntry);
-					}
-
-					break;
-
-
-				case X4GRP_MAPPING_ENTRY_REQ:
-					x4grpMappingEntry = x4grpMappingEntry_process_response(session, response, error_label);
-					if(x4grpMappingEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x5dsaReferenceEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "x5dsaReferenceEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4grpMappingEntry_print(x4grpMappingEntry);
-						if(x4grpMappingEntry_send_request(session, GETNEXT_REQ_MSG, x4grpMappingEntry->x4grpIndex, x4grpMappingEntry->x4grpMappingMSIndex, x4grpMappingEntry->x4grpMappingMTAIndex, error_label))
-						{
-							fprintf(stderr, "x4grpMappingEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x4grpMappingEntry_free(x4grpMappingEntry);
-					}
-
-					break;
-
-
-				case X5DSA_REFERENCE_ENTRY_REQ:
-					x5dsaReferenceEntry = x5dsaReferenceEntry_process_response(session, response, error_label);
-					if(x5dsaReferenceEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x5dsaReferenceEntry_print(x5dsaReferenceEntry);
-						if(x5dsaReferenceEntry_send_request(session, GETNEXT_REQ_MSG, x5dsaReferenceEntry->x5dsaReferenceIndex, error_label))
-						{
-							fprintf(stderr, "x5dsaReferenceEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x5dsaReferenceEntry_free(x5dsaReferenceEntry);
-					}
-
-					break;
-
-
-				default:
-					fprintf(stderr, "unknown pdu received %d from %s\n\n",
-						predefined_id, session->peername);
-
-					trace_snmp_pdu(response);
-
-					snmp_session_close(session, error_label);
-					snmp_session_num--;
-
-					break;
-			}
-
-			break;
-
-
-		case TIMED_OUT:
-			switch(predefined_id)
-			{
-				case APPL_ENTRY_REQ:
-				case ASSOC_ENTRY_REQ:
-				case MTA_ENTRY_REQ:
-				case MTA_GROUP_ENTRY_REQ:
-				case MTA_GROUP_ASSOCIATION_ENTRY_REQ:
-				case X4MS_MTA_ENTRY_REQ:
-				case X4MS_USER_ENTRY_PART1_REQ:
-				case X4MS_USER_ENTRY_PART2_REQ:
-				case X4MS_USER_ASSOCIATION_ENTRY_REQ:
-				case X4GRP_ENTRY_REQ:
-				case X4GRP_MAPPING_ENTRY_REQ:
-				case X5DSA_REFERENCE_ENTRY_REQ:
-					fprintf(stderr, "the request %s on %s TIMED OUT\n\n",
-						request_name, session->peername);
-					break;
-
-				default:
-					fprintf(stderr, "an unknown request %d on %s TIMED OUT\n\n",
-						predefined_id, session->peername);
-					break;
-			}
-
-			snmp_session_close(session, error_label);
-			snmp_session_num--;
-
-			break;
-	}
-
-	if(snmp_session_num == 0)
-	{
-		exit(0);
-	}
-}
-
-
-/**************************************************************/
-
-main(int argc, char **argv)
-{
-	int numfds;
-	fd_set fdset;
-	int count;
-	struct timeval timeout;
-	char targets[1000];
-	char target[1000];
-	char c;
-	char *ptr;
-	int i = 0;
-	Target *t;
-
-
-	while((c = getopt(argc, argv, "t:v"))!= -1)
-	{
-		switch(c)
-		{
-			case 't':
-				strcpy(targets, optarg);
-				break;
-			case 'v':
-				trace_flags = 0xFFFF;
-		}
-	}
-
-
-	i = 0;
-	for(ptr = targets; *ptr; ptr++)
-	{
-		if(isspace(*ptr))
-		{
-			if(i == 0)
-			{
-				continue;
-			}
-		}
-
-		target[i++] = *ptr;
-
-		if( (*(ptr + 1) == '\0') || isspace(*(ptr + 1)) )
-		{
-			target[i] = '\0';
-
-			if(target_add(target, error_label))
-			{
-				fprintf(stderr, "target_add(%s) failed: %s\n\n",
-					target, error_label);
-			}
-
-			i = 0;
-		}
-	}
-
-
-	for(t = first_target; t; t = t->next_target)
-	{
-		SNMP_session *session;
-
-
-		session = snmp_session_open_default(t->name, snmp_callback, NULL, error_label);
-		if(session == NULL)
-		{
-			fprintf(stderr, "snmp_session_open_default(%s) failed: %s\n\n",
-				t->name, error_label);
-			continue;
-		}
-		snmp_session_num++;
-
-		if(applEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-		{
-			fprintf(stderr, "applEntry_send_request(%s) failed: %s\n\n",
-				session->peername, error_label);
-			snmp_session_close(session, error_label);
-			snmp_session_num--;
-		}
-	}
-
-
-	if(snmp_session_num == 0)
-	{
-		exit(0);
-	}
-
-
-	while(1)
-	{
-		numfds = 0;
-		FD_ZERO(&fdset);
-
-		timeout.tv_sec = 10;
-		timeout.tv_usec = 0;
-
-		snmp_session_select_info(&numfds, &fdset, &timeout);
-
-		count = select(numfds, &fdset, 0, 0, &timeout);
-		if(count > 0)
-		{
-			snmp_session_read(&fdset);
-		}
-		else
-		{
-			switch(count)
-			{
-				case 0:
-					snmp_session_timeout();
-					break;
-
-				case -1:
-					if(errno == EINTR)
-					{
-						continue;
-					}
-					else
-					{
-						fprintf(stderr, "select() failed %s\n",
-							errno_string());
-					}
-			}
-		}
-	}
-}
-
-
--- a/usr/src/cmd/agents/snmp/snmplib/test/madman_api_test_2.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,920 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
-#include "stdio.h"
-#include "errno.h"
-#include "sys/types.h"
-#include "sys/socket.h"
-#include "netinet/in.h"
-
-#include "snmp_msg.h"
-#include "error.h"
-#include "trace.h"
-#include "madman_api.h"
-
-
-/***** NEW CONSTANTS *****/
-
-#define MSG_END_OF_TABLE	"end of table for request %s on %s\n\n"
-#define ERR_MSG_REQUEST_FAILED	"the request %s on %s failed: %s\n\n"
-
-
-/***** NEW TYPES *****/
-
-typedef struct _Target {
-	struct _Target *next_target;
-	char name[100];
-} Target;
-
-
-/***** STATIC VARIABLES *****/
-
-static int snmp_session_num = 0;
-
-static Target *first_target = NULL;
-
-
-/****** STATIC FUNCTIONS *****/
-
-static int target_add(char *name, char *error_label);
-
-
-/**************************************************************/
-
-static int target_add(char *name, char *error_label)
-{
-	Target *new;
-
-
-	error_label[0] = '\0';
-
-	if(name == NULL)
-	{
-		sprintf(error_label, "BUG: name is NULL");
-		return -1;
-	}
-
-	new = (Target *) malloc(sizeof(Target));
-	if(new == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return -1;
-	}
-
-	strcpy(new->name, name);
-
-	new->next_target = first_target;
-	first_target = new;
-
-	return 0;
-}
-
-
-/**************************************************************/
-/*
- *	do not free response!
- */
-
-static void snmp_callback(int operation, SNMP_session *session, int request_id, int predefined_id, SNMP_pdu *response, void *snmp_callback_magic)
-{
-	struct itimerval itimeout;
-	ApplEntry *applEntry = NULL;
-	AssocEntry *assocEntry = NULL;
-	MtaEntry *mtaEntry = NULL;
-	MtaGroupEntry *mtaGroupEntry = NULL;
-	MtaGroupAssociationEntry *mtaGroupAssociationEntry = NULL;
-	DsaOpsEntry *dsaOpsEntry = NULL;
-	DsaEntriesEntry *dsaEntriesEntry = NULL;
-	DsaIntEntry *dsaIntEntry = NULL;
-	X4msMtaEntry *x4msMtaEntry = NULL;
-	X4msUserEntryPart1 *x4msUserEntryPart1 = NULL;
-	X4msUserEntryPart2 *x4msUserEntryPart2 = NULL;
-	X4msUserAssociationEntry *x4msUserAssociationEntry = NULL;
-	X4grpEntry *x4grpEntry = NULL;
-	X4grpMappingEntry *x4grpMappingEntry = NULL;
-	X5dsaReferenceEntry *x5dsaReferenceEntry = NULL;
-	char *request_name = NULL;
-
-
-	request_name = predefined_request_string(predefined_id);
-
-	switch(operation)
-	{
-		case RECEIVED_MESSAGE:
-			switch(predefined_id)
-			{
-				case APPL_ENTRY_REQ:
-					applEntry = applEntry_process_response(session, response, error_label);
-					if(applEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(assocEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label))
-							{
-								fprintf(stderr, "assocEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						applEntry_print(applEntry);
-						if(applEntry_send_request(session, GETNEXT_REQ_MSG, applEntry->applIndex, error_label))
-						{
-							fprintf(stderr, "applEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						applEntry_free(applEntry);
-					}
-
-					break;
-
-
-				case ASSOC_ENTRY_REQ:
-					assocEntry = assocEntry_process_response(session, response, error_label);
-					if(assocEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(mtaEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "mtaEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						assocEntry_print(assocEntry);
-						if(assocEntry_send_request(session, GETNEXT_REQ_MSG, assocEntry->applIndex, assocEntry->assocIndex, error_label))
-						{
-							fprintf(stderr, "assocEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						assocEntry_free(assocEntry);
-					}
-
-					break;
-
-
-				case MTA_ENTRY_REQ:
-					mtaEntry = mtaEntry_process_response(session, response, error_label);
-					if(mtaEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(mtaGroupEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label))
-							{
-								fprintf(stderr, "mtaGroupEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						mtaEntry_print(mtaEntry);
-						if(mtaEntry_send_request(session, GETNEXT_REQ_MSG, mtaEntry->applIndex, error_label))
-						{
-							fprintf(stderr, "mtaEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						mtaEntry_free(mtaEntry);
-					}
-
-					break;
-
-
-				case MTA_GROUP_ENTRY_REQ:
-					mtaGroupEntry = mtaGroupEntry_process_response(session, response, error_label);
-					if(mtaGroupEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						mtaGroupEntry_print(mtaGroupEntry);
-						mtaGroupEntry_free(mtaGroupEntry);
-					}
-
-					break;
-
-
-				case MTA_GROUP_ASSOCIATION_ENTRY_REQ:
-					mtaGroupAssociationEntry = mtaGroupAssociationEntry_process_response(session, response, error_label);
-					if(mtaGroupAssociationEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(dsaOpsEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "dsaOpsEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						mtaGroupAssociationEntry_print(mtaGroupAssociationEntry);
-						if(mtaGroupAssociationEntry_send_request(session, GETNEXT_REQ_MSG, mtaGroupAssociationEntry->applIndex, mtaGroupAssociationEntry->mtaGroupIndex, mtaGroupAssociationEntry->mtaGroupAssociationIndex, error_label))
-						{
-							fprintf(stderr, "mtaGroupAssociationEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						mtaGroupAssociationEntry_free(mtaGroupAssociationEntry);
-					}
-
-					break;
-
-
-				case DSA_OPS_ENTRY_REQ:
-					dsaOpsEntry = dsaOpsEntry_process_response(session, response, error_label);
-					if(dsaOpsEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(dsaEntriesEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "dsaEntriesEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						dsaOpsEntry_print(dsaOpsEntry);
-						if(dsaOpsEntry_send_request(session, GETNEXT_REQ_MSG, dsaOpsEntry->applIndex, error_label))
-						{
-							fprintf(stderr, "dsaOpsEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						dsaOpsEntry_free(dsaOpsEntry);
-					}
-
-					break;
-
-
-				case DSA_ENTRIES_ENTRY_REQ:
-					dsaEntriesEntry = dsaEntriesEntry_process_response(session, response, error_label);
-					if(dsaEntriesEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(dsaIntEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label))
-							{
-								fprintf(stderr, "dsaIntEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						dsaEntriesEntry_print(dsaEntriesEntry);
-						if(dsaEntriesEntry_send_request(session, GETNEXT_REQ_MSG, dsaEntriesEntry->applIndex, error_label))
-						{
-							fprintf(stderr, "dsaEntriesEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						dsaEntriesEntry_free(dsaEntriesEntry);
-					}
-
-					break;
-
-
-				case DSA_INT_ENTRY_REQ:
-					dsaIntEntry = dsaIntEntry_process_response(session, response, error_label);
-					if(dsaIntEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4msMtaEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "x4msMtaEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						dsaIntEntry_print(dsaIntEntry);
-						if(dsaIntEntry_send_request(session, GETNEXT_REQ_MSG, dsaIntEntry->applIndex, dsaIntEntry->dsaIntIndex, error_label))
-						{
-							fprintf(stderr, "dsaIntEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						dsaIntEntry_free(dsaIntEntry);
-					}
-
-					break;
-
-
-				case X4MS_MTA_ENTRY_REQ:
-					x4msMtaEntry = x4msMtaEntry_process_response(session, response, error_label);
-					if(x4msMtaEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4msUserEntryPart1_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "x4msUserEntryPart1_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4msMtaEntry_print(x4msMtaEntry);
-						if(x4msMtaEntry_send_request(session, GETNEXT_REQ_MSG, x4msMtaEntry->x4msMtaIndex, error_label))
-						{
-							fprintf(stderr, "x4msMtaEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x4msMtaEntry_free(x4msMtaEntry);
-					}
-
-					break;
-
-
-				case X4MS_USER_ENTRY_PART1_REQ:
-					x4msUserEntryPart1 = x4msUserEntryPart1_process_response(session, response, error_label);
-					if(x4msUserEntryPart1 == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4msUserAssociationEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label))
-							{
-								fprintf(stderr, "x4msUserAssociationEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4msUserEntryPart1_print(x4msUserEntryPart1);
-
-						if(x4msUserEntryPart2_send_request(session, GET_REQ_MSG, x4msUserEntryPart1->x4msUserIndex, error_label))
-						{
-							fprintf(stderr, "x4msUserEntryPart2_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-
-						if(x4msUserEntryPart1_send_request(session, GETNEXT_REQ_MSG, x4msUserEntryPart1->x4msUserIndex, error_label))
-						{
-							fprintf(stderr, "x4msUserEntryPart1_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-
-						x4msUserEntryPart1_free(x4msUserEntryPart1);
-					}
-
-					break;
-
-
-				case X4MS_USER_ENTRY_PART2_REQ:
-					x4msUserEntryPart2 = x4msUserEntryPart2_process_response(session, response, error_label);
-					if(x4msUserEntryPart2 == NULL)
-					{
-						fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-							request_name, session->peername, error_label);
-						trace_snmp_pdu(response);
-
-						snmp_session_close(session, error_label);
-						snmp_session_num--;
-					}
-					else
-					{
-						x4msUserEntryPart2_print(x4msUserEntryPart2);
-						x4msUserEntryPart2_free(x4msUserEntryPart2);
-					}
-
-					break;
-
-
-				case X4MS_USER_ASSOCIATION_ENTRY_REQ:
-					x4msUserAssociationEntry = x4msUserAssociationEntry_process_response(session, response, error_label);
-					if(x4msUserAssociationEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4grpEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "x4grpEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4msUserAssociationEntry_print(x4msUserAssociationEntry);
-						if(x4msUserAssociationEntry_send_request(session, GETNEXT_REQ_MSG, x4msUserAssociationEntry->x4msUserIndex, x4msUserAssociationEntry->x4msUserAssociationIndex, error_label))
-						{
-							fprintf(stderr, "x4msUserAssociationEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x4msUserAssociationEntry_free(x4msUserAssociationEntry);
-					}
-
-					break;
-
-				case X4GRP_ENTRY_REQ:
-					x4grpEntry = x4grpEntry_process_response(session, response, error_label);
-					if(x4grpEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x4grpMappingEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, -1, error_label))
-							{
-								fprintf(stderr, "x4grpMappingEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4grpEntry_print(x4grpEntry);
-						if(x4grpEntry_send_request(session, GETNEXT_REQ_MSG, x4grpEntry->x4grpIndex, error_label))
-						{
-							fprintf(stderr, "x4grpEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x4grpEntry_free(x4grpEntry);
-					}
-
-					break;
-
-
-				case X4GRP_MAPPING_ENTRY_REQ:
-					x4grpMappingEntry = x4grpMappingEntry_process_response(session, response, error_label);
-					if(x4grpMappingEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							if(x5dsaReferenceEntry_send_request(session, GETNEXT_REQ_MSG, -1, error_label))
-							{
-								fprintf(stderr, "x5dsaReferenceEntry_send_request(%s) failed: %s\n\n",
-									session->peername, error_label);
-								snmp_session_close(session, error_label);
-								snmp_session_num--;
-							}
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x4grpMappingEntry_print(x4grpMappingEntry);
-						if(x4grpMappingEntry_send_request(session, GETNEXT_REQ_MSG, x4grpMappingEntry->x4grpIndex, x4grpMappingEntry->x4grpMappingMSIndex, x4grpMappingEntry->x4grpMappingMTAIndex, error_label))
-						{
-							fprintf(stderr, "x4grpMappingEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x4grpMappingEntry_free(x4grpMappingEntry);
-					}
-
-					break;
-
-
-				case X5DSA_REFERENCE_ENTRY_REQ:
-					x5dsaReferenceEntry = x5dsaReferenceEntry_process_response(session, response, error_label);
-					if(x5dsaReferenceEntry == NULL)
-					{
-						if(snmp_errno == SNMP_ERR_NOSUCHNAME)
-						{
-							fprintf(stderr, MSG_END_OF_TABLE,
-								request_name, session->peername);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						else
-						{
-							fprintf(stderr, ERR_MSG_REQUEST_FAILED,
-								request_name, session->peername, error_label);
-							trace_snmp_pdu(response);
-
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-					}
-					else
-					{
-						x5dsaReferenceEntry_print(x5dsaReferenceEntry);
-						if(x5dsaReferenceEntry_send_request(session, GETNEXT_REQ_MSG, x5dsaReferenceEntry->x5dsaReferenceIndex, error_label))
-						{
-							fprintf(stderr, "x5dsaReferenceEntry_send_request(%s) failed: %s\n\n",
-								session->peername, error_label);
-							snmp_session_close(session, error_label);
-							snmp_session_num--;
-						}
-						x5dsaReferenceEntry_free(x5dsaReferenceEntry);
-					}
-
-					break;
-
-
-				default:
-					fprintf(stderr, "unknown pdu received %d from %s\n\n",
-						predefined_id, session->peername);
-
-					trace_snmp_pdu(response);
-
-					snmp_session_close(session, error_label);
-					snmp_session_num--;
-
-					break;
-			}
-
-			break;
-
-
-		case TIMED_OUT:
-			switch(predefined_id)
-			{
-				case APPL_ENTRY_REQ:
-				case ASSOC_ENTRY_REQ:
-				case MTA_ENTRY_REQ:
-				case MTA_GROUP_ENTRY_REQ:
-				case MTA_GROUP_ASSOCIATION_ENTRY_REQ:
-				case X4MS_MTA_ENTRY_REQ:
-				case X4MS_USER_ENTRY_PART1_REQ:
-				case X4MS_USER_ENTRY_PART2_REQ:
-				case X4MS_USER_ASSOCIATION_ENTRY_REQ:
-				case X4GRP_ENTRY_REQ:
-				case X4GRP_MAPPING_ENTRY_REQ:
-				case X5DSA_REFERENCE_ENTRY_REQ:
-					fprintf(stderr, "the request %s on %s TIMED OUT\n\n",
-						request_name, session->peername);
-					break;
-
-				default:
-					fprintf(stderr, "an unknown request %d on %s TIMED OUT\n\n",
-						predefined_id, session->peername);
-					break;
-			}
-
-			snmp_session_close(session, error_label);
-			snmp_session_num--;
-
-			break;
-	}
-
-	if(snmp_session_num == 0)
-	{
-		exit(0);
-	}
-}
-
-
-/**************************************************************/
-
-main(int argc, char **argv)
-{
-	int numfds;
-	fd_set fdset;
-	int count;
-	struct timeval timeout;
-	char targets[1000];
-	char target[1000];
-	char c;
-	char *ptr;
-	int i = 0;
-	Target *t;
-
-
-	while((c = getopt(argc, argv, "t:v"))!= -1)
-	{
-		switch(c)
-		{
-			case 't':
-				strcpy(targets, optarg);
-				break;
-			case 'v':
-				trace_flags = 0xFFFF;
-		}
-	}
-
-
-	i = 0;
-	for(ptr = targets; *ptr; ptr++)
-	{
-		if(isspace(*ptr))
-		{
-			if(i == 0)
-			{
-				continue;
-			}
-		}
-
-		target[i++] = *ptr;
-
-		if( (*(ptr + 1) == '\0') || isspace(*(ptr + 1)) )
-		{
-			target[i] = '\0';
-
-			if(target_add(target, error_label))
-			{
-				fprintf(stderr, "target_add(%s) failed: %s\n\n",
-					target, error_label);
-			}
-
-			i = 0;
-		}
-	}
-
-
-	for(t = first_target; t; t = t->next_target)
-	{
-		SNMP_session *session;
-
-
-		session = snmp_session_open_default(t->name, snmp_callback, NULL, error_label);
-		if(session == NULL)
-		{
-			fprintf(stderr, "snmp_session_open_default(%s) failed: %s\n\n",
-				t->name, error_label);
-			continue;
-		}
-		snmp_session_num++;
-
-		if(mtaGroupEntry_send_request(session, GET_REQ_MSG, 1, 1009, error_label))
-		{
-			fprintf(stderr, "mtaGroupEntry_send_request(%s) failed: %s\n\n",
-					session->peername, error_label);
-			snmp_session_close(session, error_label);
-			snmp_session_num--;
-		}
-	}
-
-
-	if(snmp_session_num == 0)
-	{
-		exit(0);
-	}
-
-
-	while(1)
-	{
-		numfds = 0;
-		FD_ZERO(&fdset);
-
-		timeout.tv_sec = 10;
-		timeout.tv_usec = 0;
-
-		snmp_session_select_info(&numfds, &fdset, &timeout);
-
-		count = select(numfds, &fdset, 0, 0, &timeout);
-		if(count > 0)
-		{
-			snmp_session_read(&fdset);
-		}
-		else
-		{
-			switch(count)
-			{
-				case 0:
-					snmp_session_timeout();
-					break;
-
-				case -1:
-					if(errno == EINTR)
-					{
-						continue;
-					}
-					else
-					{
-						fprintf(stderr, "select() failed %s\n",
-							errno_string());
-					}
-			}
-		}
-	}
-}
-
-
--- a/usr/src/cmd/agents/snmp/snmplib/test/madman_trap_test.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <netinet/in.h>
-#include <sys/types.h>
-
-#include "error.h"
-#include "trace.h"
-#include "snmp.h"
-#include "madman_trap.h"
-
-
-
-#define BUF_SZ		1000
-
-
-static Subid agents_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 8, 1 };
-static Oid sysObjectID_value = { agents_subids, 10 };
-
-
-/******************************************************************/
-
-void test1()
-{
-	char buffer[BUF_SZ + 1];
-	int i, j;
-
-
-	for(i = 500; i < BUF_SZ; i++)
-	{
-		for(j = 0; j < i; j++)
-		{
-			buffer[j] = 'a';
-		}
-		buffer[i] = '\0';
-
-		send_trap_appl_alarm(99, "toto application name",
-			i, SEVERITY_LOW, buffer);
-	}
-}
-
-
-/******************************************************************/
-
-void test2()
-{
-	int i;
-
-
-	for(i = 0; i < 10000; i++)
-	{
-		fprintf(stderr, "%d\n", i);
-		send_trap_appl_alarm(1, "Solstice X.400 MTA:",
-			i, SEVERITY_LOW, "Just a test message");
-	}
-}
-
-
-/******************************************************************/
-
-void test3()
-{
-	send_trap_appl_alarm(1, "Solstice X.400 MTA:",
-		1, SEVERITY_LOW, "Just a test message: LOW");
-	sleep(5);
-
-	send_trap_appl_alarm(1, "Solstice X.400 MTA:",
-		2, SEVERITY_MEDIUM, "Just a test message: MEDIUM");
-	sleep(5);
-
-	send_trap_appl_alarm(1, "Solstice X.400 MTA:",
-		3, SEVERITY_HIGH, "Just a test message: HIGH");
-}
-
-
-/******************************************************************/
-
-main()
-{
-/*
-	trace_flags = 0xFFF;
-*/
-
-	if(trap_init(&sysObjectID_value, error_label))
-	{
-		fprintf(stderr, "trap_init() failed: %s\n", error_label);
-		exit(1);
-	}
-
-	if(trap_destinator_add("panda", error_label))
-	{
-		fprintf(stderr, "trap_destinator_add() failed: %s\n",
-			error_label);
-		exit(1);
-	}
-
-	test3();
-
-	exit(0);
-}
--- a/usr/src/cmd/agents/snmp/snmplib/test/trap_test.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <netinet/in.h>
-#include <sys/types.h>
-
-#include "error.h"
-#include "trace.h"
-#include "snmp.h"
-#include "trap.h"
-
-
-main()
-{
-	trace_flags = 0xFFF;
-
-	if(trap_destinator_add("panda", error_label))
-	{
-		fprintf(stderr, "trap_destinator_add() failed: %s\n",
-			error_label);
-		exit(1);
-	}
-
-	if(trap_send_to_all_destinators(NULL, SNMP_TRAP_WARMSTART, 0, NULL, error_label))
-	{
-		fprintf(stderr, "trap_send_to_alldestinators() failed: %s\n",
-			error_label);
-		exit(1);
-	}
-
-	exit(0);
-}
--- a/usr/src/cmd/agents/snmp/snmplib/trace.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include "snmp_msg.h"
-#include "error.h"
-#include "trace.h"
-
-
-/***** GLOBAL VARIABLES *****/
-
-int trace_level = 0;
-uint32_t trace_flags = 0;
-
-
-/***** STATIC VARIABLES *****/
-
-static FILE *trace_stream = stdout;
-
-
-/******************************************************************/
-
-void trace(char *format, ...)
-{
-	va_list ap;
-
-	if(trace_stream == NULL)
-	{
-		return;
-	}
-
-	va_start(ap, format);
-	(void)vfprintf(trace_stream, format, ap);
-	va_end(ap);
-}
-
-
-/******************************************************************/
-
-int trace_set(int level, char *error_label)
-{
-	error_label[0] = '\0';
-
-	if(level < 0 || level > TRACE_LEVEL_MAX)
-	{
-		sprintf(error_label, ERR_MSG_BAD_TRACE_LEVEL,
-			level, TRACE_LEVEL_MAX);
-		return (-1);
-	}
-
-	trace_level = level;
-
-	if(trace_level > 0)
-		trace_flags = trace_flags | TRACE_TRAFFIC;
-	else
-		trace_flags = trace_flags & (~TRACE_TRAFFIC);
-
-	if(trace_level > 2)
-		trace_flags = trace_flags | TRACE_PDU;
-	else
-		trace_flags = trace_flags & (~TRACE_PDU);
-
-	if(trace_level > 3)
-		trace_flags = trace_flags | TRACE_PACKET;
-	else
-		trace_flags = trace_flags & (~TRACE_PACKET);
-
-	return (0);
-}
-
-
-/******************************************************************/
-
-void trace_reset()
-{
-	(void)trace_set(0, error_label);
-}
-
-
-/******************************************************************/
-
-void trace_increment()
-{
-	if(trace_level < TRACE_LEVEL_MAX)
-		(void)trace_set(trace_level + 1, error_label);
-
-}
-
-
-/******************************************************************/
-
-void trace_decrement()
-{
-	if(trace_level > 0)
-		(void)trace_set(trace_level - 1, error_label);
-}
--- a/usr/src/cmd/agents/snmp/snmplib/trace.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _TRACE_H_
-#define _TRACE_H_
-
-
-/***** GLOBAL CONSTANTS *****/
-
-#define TRACE_LEVEL_MAX		4
-
-#define TRACE_TRAFFIC		0x1
-#define TRACE_PACKET		0x2
-#define TRACE_PDU		0x4
-
-
-/***** GLOBAL VARIABLES *****/
-
-extern int trace_level;		/* 0 ... TRACE_LEVEL_MAX */
-extern uint32_t trace_flags;
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern void trace(char *, ...);
-extern int trace_set(int level, char *error_label);
-extern void trace_reset();
-extern void trace_increment();
-extern void trace_decrement();
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmplib/trap.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,576 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <errno.h>
-#include <syslog.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <nlist.h>
-#include "snmp_msg.h"
-#include "impl.h"
-#include "trace.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "request.h"
-#include "trap.h"
-#include "error.h"
-
-
-/***** GLOBAL VARIABLES *****/
-
-char *trap_community = NULL;
-
-Subid sun_subids[] = { 1, 3, 6, 1, 4, 1, 42, 2, 1, 1 };
-Oid sun_oid = { sun_subids, 10 };
-
-
-/***** LOCAL TYPES *****/
-
-typedef struct _Trap_Destinator {
-	struct _Trap_Destinator	*next_trap_destinator;
-	char			*name;
-	IPAddress		ip_address;
-} Trap_Destinator;
-
-
-/***** LOCAL VARIABLES *****/
-
-static Oid *default_enterprise = NULL;
-
-static Trap_Destinator *first_trap_destinator = NULL;
-
-
-/********************************************************************/
-
-int trap_init(Oid *enterprise, char *error_label)
-{
-	error_label[0] = '\0';
-
-	if(enterprise == NULL)
-	{
-		sprintf(error_label, "BUG: trap_init(): enterprise is NULL");
-		return -1;
-	}
-
-	SSAOidFree(default_enterprise);
-	default_enterprise = NULL;
-
-	default_enterprise = SSAOidDup(enterprise, error_label);
-	if(default_enterprise == NULL)
-	{
-		return -1;
-	}
-
-	return 0;
-}
-
-
-/********************************************************************/
-
-int trap_send(IPAddress *ip_address, Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label)
-{
-	static int my_ip_address_initialized = False;
-	static IPAddress my_ip_address;
-	struct sockaddr_in me;
-	int sd;
-	Address address;
-	SNMP_pdu *pdu;
-	SNMP_variable *last_variable = NULL;
-	SNMP_variable *new_variable;
-
-
-	error_label[0] = '\0';
-
-	if(my_ip_address_initialized == False)
-	{
-		if(get_my_ip_address(&my_ip_address, error_label))
-		{
-			return -1;
-		}
-		
-		my_ip_address_initialized = True;
-	}
-
-	pdu = snmp_pdu_new(error_label);
-	if(pdu == NULL)
-	{
-		return -1;
-	}
-
-	/* version, community */
-	pdu->version = SNMP_VERSION_1;
-	if(trap_community == NULL)
-	{
-		pdu->community = strdup("public");
-	}
-	else
-	{
-		pdu->community = strdup(trap_community);
-	}
-	if(pdu->community == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_pdu_free(pdu);
-		return -1;
-	}
-
-	/* type */
-	pdu->type = TRP_REQ_MSG;
-
-	/* enterprise */
-	if(enterprise == NULL)
-	{
-		if(default_enterprise)
-		{
-			enterprise = default_enterprise;
-		}
-		else
-		{
-			enterprise = &sun_oid;
-		}
-	}
-	if(SSAOidCpy(&(pdu->enterprise), enterprise, error_label))
-	{
-		snmp_pdu_free(pdu);
-		return -1;
-	}
-
-	/* agent_addr */
-	pdu->ip_agent_addr.s_addr = my_ip_address.s_addr;
-
-	/* generic, specific */
-	pdu->generic = generic;
-	pdu->specific = specific;
-
-	/* time_stamp */
-	pdu->time_stamp = request_sysUpTime(error_label, NULL);
-
-	/* first_variable */
-	while(variables)
-	{
-		new_variable = snmp_variable_dup(variables, error_label);
-		if(new_variable == NULL)
-		{
-			snmp_pdu_free(pdu);
-			return -1;
-		}
-
-		if(last_variable)
-		{
-			last_variable->next_variable = new_variable;
-		}
-		else
-		{
-			pdu->first_variable = new_variable;
-		}
-		last_variable = new_variable;
-
-		variables = variables->next_variable;
-	}
-
-
-	/* sd */
-	sd = socket(AF_INET, SOCK_DGRAM, 0);
-	if(sd < 0)
-	{
-		sprintf(error_label, ERR_MSG_SOCKET, errno_string());
-		snmp_pdu_free(pdu);
-		return -1;
-	}
-	me.sin_family = AF_INET;
-	me.sin_addr.s_addr = INADDR_ANY;
-	me.sin_port = htons(0);
-	if(bind(sd, (struct sockaddr *)&me, sizeof(me)) != 0)
-	{
-		sprintf(error_label, ERR_MSG_BIND, errno_string());
-		snmp_pdu_free(pdu);
-		(void)close(sd);
-		return -1;
-	}
-
-
-	/* address */
-	address.sin_family = AF_INET;
-	address.sin_addr.s_addr = ip_address->s_addr;
-	address.sin_port = SNMP_TRAP_PORT;
-
-	if(snmp_pdu_send(sd, &address, pdu, error_label))
-	{
-		snmp_pdu_free(pdu);
-		(void)close(sd);
-		return -1;
-	}
-	snmp_pdu_free(pdu);
-	(void)close(sd);
-
-
-	return 0;
-}
-/**********************************************************************/
-
-int trap_send_raw(IPAddress *ip_address, IPAddress my_ip_addr, 
-	char* community,int i_flag,Oid *enterprise,int generic,
-	int specific,int trap_port,uint32_t time_stamp,
-	SNMP_variable *variables,char *error_label)
-{
-	static int my_ip_address_initialized = False;
-	static IPAddress my_ip_address; 
-	struct sockaddr_in me;
-	int sd;
-	Address address;
-	SNMP_pdu *pdu;
-	SNMP_variable *last_variable = NULL;
-	SNMP_variable *new_variable;
-
-
-	error_label[0] = '\0';
-
-	if (!i_flag) {
-		if(my_ip_address_initialized == False)
-		{
-			if(get_my_ip_address(&my_ip_address, error_label))
-			{
-				return -1;
-			}
-		
-			my_ip_address_initialized = True;
-		}
-	}
-
-	pdu = snmp_pdu_new(error_label);
-	if(pdu == NULL)
-	{
-		return -1;
-	}
-
-	/* version, community */
-	pdu->version = SNMP_VERSION_1;
-
-	if(community == NULL)
-	{
-		pdu->community = strdup("public");
-	}
-	else
-	{
-		pdu->community = strdup(community);
-	}
-	if(pdu->community == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		snmp_pdu_free(pdu);
-		return -1;
-	}
-
-	/* type */
-	pdu->type = TRP_REQ_MSG;
-
-	/* enterprise */
-	if(enterprise == NULL)
-	{
-		if(default_enterprise)
-		{
-			enterprise = default_enterprise;
-		}
-		else
-		{
-			enterprise = &sun_oid;
-		}
-	}
-	if(SSAOidCpy(&(pdu->enterprise), enterprise, error_label))
-	{
-		snmp_pdu_free(pdu);
-		return -1;
-	}
-
- 	/* agent_addr */
-	if (!i_flag) {
-		pdu->ip_agent_addr.s_addr = my_ip_address.s_addr;
-	}
-	else {
-		pdu->ip_agent_addr.s_addr = my_ip_addr.s_addr;	
-	}
-
-	/* generic, specific */
-
-	pdu->generic = generic;
-	pdu->specific = specific;
-
-	/* time_stamp */
-	if (time_stamp == -1U)
-		pdu->time_stamp = request_sysUpTime(error_label, community); /* default */
-	else
-		pdu->time_stamp = time_stamp; 
-
-	/* first_variable */
-	while(variables)
-	{
-		new_variable = snmp_variable_dup(variables, error_label);
-		if(new_variable == NULL)
-		{
-			snmp_pdu_free(pdu);
-			return -1;
-		}
-
-		if(last_variable)
-		{
-			last_variable->next_variable = new_variable;
-		}
-		else
-		{
-			pdu->first_variable = new_variable;
-		}
-		last_variable = new_variable;
-
-		variables = variables->next_variable;
-	}
-
-
-	/* sd */
-	sd = socket(AF_INET, SOCK_DGRAM, 0);
-	if(sd < 0)
-	{
-		sprintf(error_label, ERR_MSG_SOCKET, errno_string());
-		snmp_pdu_free(pdu);
-		return -1;
-	}
-	me.sin_family = AF_INET;
-	me.sin_addr.s_addr = INADDR_ANY;
-	me.sin_port = htons(0);
-	if(bind(sd, (struct sockaddr *)&me, sizeof(me)) != 0)
-	{
-		sprintf(error_label, ERR_MSG_BIND, errno_string());
-		snmp_pdu_free(pdu);
-		(void)close(sd);
-		return -1;
-	}
-
-
-	/* address */
-	address.sin_family = AF_INET;
-	address.sin_addr.s_addr = ip_address->s_addr;
-	if (trap_port == -1)
-		address.sin_port = SNMP_TRAP_PORT; /* default */
-	else
-		/* LINTED */
-		address.sin_port = (short)trap_port;
-
-	if(snmp_pdu_send(sd, &address, pdu, error_label))
-	{
-		snmp_pdu_free(pdu);
-		(void)close(sd);
-		return -1;
-	}
-	snmp_pdu_free(pdu);
-	(void)close(sd);
-
-
-	return 0;
-}
-
-/**********************************************************************/
-int trap_send_with_more_para(IPAddress *ip_address,
-							 IPAddress my_ip_addr,
-							 char *community,
-							 int i_flag,
-							 Oid *enterprise,
-							 int generic,
-							 int specific,
-							 int trap_port,
-							 uint32_t time_stamp,
-							 SNMP_variable *variables,
-							 char *error_label)
-{
- return(trap_send_raw(ip_address,my_ip_addr,community,i_flag,enterprise,generic,
-	specific,trap_port,time_stamp, variables,error_label));
-}
-
-
-
-/********************************************************************/
-
-/*
- *	returns 0 if OK
- *		1 if error
- *		-1 if fatal error
- */
-
-int trap_destinator_add(char *name, char *error_label)
-{
-	IPAddress ip_address;
-	Trap_Destinator *new;
-	Trap_Destinator *d;
-
-
-	error_label[0] = '\0';
-
-	if(name == NULL)
-	{
-		sprintf(error_label, "BUG: trap_destinator_add(): name is NULL");
-		return -1;
-	}
-
-	if(name_to_ip_address(name, &ip_address, error_label))
-	{
-		return 1;
-	}
-
-	/* check if this trap destinator does not already exist */
-	for(d = first_trap_destinator; d; d = d->next_trap_destinator)
-	{
-		if(ip_address.s_addr == d->ip_address.s_addr)
-		{
-			sprintf(error_label, ERR_MSG_TRAP_DEST_DUP,
-				name);
-			return 1;
-		}
-	}
-
-
-	/* allocate, initialize and link the new trap destinator */
-	new = (Trap_Destinator *) malloc(sizeof(Trap_Destinator));
-	if(new == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		return -1;
-	}
-	new->next_trap_destinator = NULL;
-	new->name = NULL;
-
-	new->name = strdup(name);
-	if(new->name == NULL)
-	{
-		sprintf(error_label, ERR_MSG_ALLOC);
-		free(new);
-		return -1;
-	}
-
-	new->ip_address.s_addr = ip_address.s_addr;
-
-	new->next_trap_destinator = first_trap_destinator;
-	first_trap_destinator = new;
-
-
-	return 0;
-}
-
-
-/********************************************************************/
-
-void delete_trap_destinator_list()
-{
-	Trap_Destinator *next;
-
-
-	while(first_trap_destinator)
-	{
-		next = first_trap_destinator->next_trap_destinator;
-
-		if(first_trap_destinator->name)
-		{
-			free(first_trap_destinator->name);
-		}
-
-		free(first_trap_destinator);
-
-		first_trap_destinator = next;
-	}
-
-	first_trap_destinator = NULL;
-}
-
-
-/********************************************************************/
-
-void trace_trap_destinators()
-{
-	Trap_Destinator *d;
-
-
-	trace("TRAP RECIPIENTS:\n");
-	trace("-----------------\n");
-	for(d = first_trap_destinator; d; d = d->next_trap_destinator)
-	{
-		trace("%-30s %-20s\n",
-			d->name,
-			inet_ntoa(d->ip_address));
-	}
-	trace("\n");
-}
-
-
-/********************************************************************/
-/* ARGSUSED */
-int trap_send_to_all_destinators7( int i_flag, Oid *enterprise, int generic,
-                                   int specific, uint32_t time_stamp,
-                                   SNMP_variable *variables, char *error_label)
-{
-        Trap_Destinator *d;
-        IPAddress my_ip_addr;
-
-	(void)memset(&my_ip_addr, 0, sizeof(IPAddress)); 
- 
-        error_label[0] = '\0';
- 
-        for(d = first_trap_destinator; d; d = d->next_trap_destinator)
-        {
-                if(trap_send_with_more_para(&(d->ip_address), my_ip_addr, NULL, 0,enterprise, generic, specific, SNMP_TRAP_PORT,time_stamp,variables, error_label))
-                {
-                        return -1;
-                }
-        }
-
-        return 0;
-}
- 
-
-
-int trap_send_to_all_destinators(Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label)
-{
-	Trap_Destinator *d;
-
-
-	error_label[0] = '\0';
-
-	for(d = first_trap_destinator; d; d = d->next_trap_destinator)
-	{
-		if(trap_send(&(d->ip_address), enterprise, generic, specific, variables, error_label))
-		{
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
--- a/usr/src/cmd/agents/snmp/snmplib/trap.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _TRAP_H_
-#define _TRAP_H_
-
-#include <sys/types.h>
-#include "pdu.h"
-
-/***** GLOBAL VARIABLES *****/
-
-extern char *trap_community;
-
-extern Subid sun_subids[];
-extern Oid sun_oid;
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern int trap_init(Oid *default_enterprise, char *error_label);
-
-extern int trap_send(IPAddress *ip_address, Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label);
-extern int trap_send_with_more_para(IPAddress *ip_address,
-									IPAddress my_ip_addr,
-									char *community,
-									int i_flag,
-									Oid *enterprise,
-									int generic,
-									int specific,
-									int trap_port,
-									uint32_t time_stamp,
-									SNMP_variable *variables,
-									char *error_label);
-extern int trap_destinator_add(char *name, char *error_label);
-extern void delete_trap_destinator_list();
-extern void trace_trap_destinators();
-extern int trap_send_to_all_destinators(Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label);
-extern int trap_send_to_all_destinators7(int i_flag, Oid *enterprise, int generic, int specific, uint32_t time_stamp, SNMP_variable *variables, char *error_label);
-extern int trap_send_raw(IPAddress *ip_address, IPAddress my_ip_addr,
-        char* community,int i_flag,Oid *enterprise,int generic,
-        int specific,int trap_port,uint32_t time_stamp,
-        SNMP_variable *variables,char *error_label);
-
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmprelayd/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../Makefile.vars
-
-MANIFEST = snmpdx.xml
-SVCMETHOD = svc-snmpdx
-
-include $(SRC)/cmd/Makefile.cmd
-
-#
-# In order to conform with the Solaris 2.6 way of packaging things,
-# we now need to put any deliverable that is specified in the
-# prototype file into a common "proto" area, so that their
-# packaging scheme knows where to obtain the input binaries.
-#
-
-AGENT = snmpdx
-BINPROG = $(AGENT)
-PROG=$(BINPROG)
-
-OPTBIN = $(ROOT)/usr/lib/snmp
-OPTPROG = $(PROG:%=$(OPTBIN)/%)
-
-$(OPTPROG):=	FILEMODE = 0755
-
-$(OPTBIN)/%: $(OPTBIN) %
-	$(INS.file)
-
-MYCONF = $(CONFIG_FILES)
-CONFLOC = $(ROOT)/etc/snmp/conf
-CONFRULE = $(MYCONF:%=$(CONFLOC)/%)
-
-$(CONFLOC)/%: $(CONFLOC) %
-	$(INS.file)
-
-$(OPTBIN) $(CONFLOC):
-	$(INS.dir)
-
-STUB.c = mib_handler.c $(AGENT)_tree.c $(AGENT)_appl.c $(AGENT)_trap.c
-STUB.h = $(AGENT)_stub.h
-
-SOURCES.c=\
-	agent.c\
-	subtree.c\
-	session.c\
-	dispatcher.c\
-	res.c\
-	sh_table.c\
-	$(STUB.c)
-
-SOURCES.h=\
-	../snmplib/impl.h\
-	../snmplib/error.h\
-	../snmplib/trace.h\
-	../snmplib/asn1.h\
-	../snmplib/signals.h\
-	../snmplib/snmp.h\
-	../snmplib/pdu.h\
-	../snmplib/request.h\
-	snmprelay_msg.h\
-	agent.h\
-	subtree.h\
-	session.h\
-	config.h\
-	dispatcher.h\
-	res.h\
-	$(STUB.h)\
-	../snmplib/trap.h\
-	../agent/access.h\
-	../agent/agent_msg.h\
-	sh_table.h\
-	name.h
-
-#
-# We need the config files to build the sacom directory,
-# so pull them out of SCCS.
-#
-
-CONFIG_FILES =\
-	mibiisa.rsrc-\
-	snmpdx.acl\
-	snmpdx.reg\
-	snmpdx.rsrc\
-	enterprises.oid
-
-OBJECTS= $(SOURCES.c:%.c=$(BIN)/%.o)
-
-EXT = 1
-MYLIBS=	../agent/$(MACH)/libssagent.so.$(EXT) ../snmplib/$(MACH)/libssasnmp.so.$(EXT)
-MYLINKLIBS += -L../agent/$(MACH) -lssagent -L../snmplib -lssasnmp
-
-LIBS=	-lsocket -lnsl -ll
-
-# snmpdx has a name clash with main() and libl.so.1.  However, snmpdx must
-# still export a number of "yy*" (libl) interfaces, and interfaces for
-# libssagent.so.1.  Reduce all other symbols to local scope.
-MAPFILES +=	$(MAPFILE.INT) $(MAPFILE.LEX) $(MAPFILE.NGB)
-MAPOPTS =	$(MAPFILES:%=-M%)
-
-CPPFLAGS +=	-I. -I../agent -I../snmplib -I../../include/netmgt -I${BIN}
-CFLAGS +=	-c -D$(TARG_SYS)
-LDFLAGS +=	$(MAPOPTS) $(LDLIBS)
-
-LINT=lint
-
-SNMP_ROOT= ..
-PARSER_HOME= $(SNMP_ROOT)/parser
-MIB_HOME= $(SNMP_ROOT)/mib
-PURIFY_HOME= /usr/soft/purify3.0
-
-
-MIBS= $(MIB_HOME)/mib_core.txt $(MIB_HOME)/snmpdx.mib
-PARSER= $(PARSER_HOME)/$(BIN)/mibcodegen
-
-.KEEP_STATE:
-
-#######################################################
-
-#
-# all
-#
-
-ROOTMANIFESTDIR = $(ROOTSVCAPPLICATIONMANAGEMENT)
-
-$(CONFRULE) := FILEMODE = 0644
-$(CONFLOC)/snmpdx.acl := FILEMODE = 0600
-
-CLOBBERFILES += y.tab.c $(BINPROG)
-
-all: $(SOURCES.h) $(BINPROG) $(CONFIG_FILES)
-
-install: all $(OPTPROG) $(CONFRULE) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
-
-check:	$(CHKMANIFEST)
-
-$(BINPROG): $(BIN) $(OBJECTS) $(BIN)/config.o $(MYLIBS) $(MAPFILES)
-	$(CC) -o $(BINPROG) $(LDFLAGS) $(OBJECTS) $(BIN)/config.o \
-	    $(MYLINKLIBS) $(LIBS)
-	$(POST_PROCESS)
-
-$(BIN)/%.o: %.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $*.c -o $@
-
-${BIN}/config.c: config.y
-	$(YACC.y) config.y
-	$(CAT) name.h y.tab.c > ${BIN}/config.c
-
-${BIN}/config.lex.c: config.l
-	$(LEX.l) config.l > ${BIN}/config.lex.c
-
-$(BIN)/config.o: ${BIN}/config.c ${BIN}/config.lex.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) ${BIN}/config.c -o $(BIN)/config.o
-
-
-#
-# parse
-#
-parse:	$(MIBS)
-	$(PARSER) -b $(AGENT) -f $(MIBS)
-
-#
-# lint
-#
-
-lint:
-	$(LINT) $(LDFLAGS) $(CPPFLAGS) $(DEFINES) $(SOURCES.c) $(MYLINKLIBS) $(LIBS)
-
-
-#
-# purify
-#
-
-purify:
-	$(PURIFY) $(CC) -o $(BINPROG) $(LDFLAGS) $(OBJECTS) $(MYLINKLIBS) $(LIBS)
-
-
-#
-# directories
-#
-
-$(BIN):
-	@$(TEST) -d $@ || mkdir $@
-
-
-#
-# clean
-#
-gen:	
-	$(RM) $(AGENT)_stub.h
-	$(RM) $(AGENT)_stub.c
-	$(RM) $(AGENT)_appl.c
-	$(RM) $(AGENT)_tree.c
-	$(RM) $(AGENT)_trap.c
-
-clean:
-	$(RM) $(OBJECTS)
-	$(RM) $(BIN)/config.lex.c $(BIN)/config.c $(BIN)/config.o
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/agents/snmp/snmprelayd/agent.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,320 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "pdu.h"
-
-#include "access.h"
-#include "agent.h"
-#include "subtree.h"
-#include "session.h"
-#include "sh_table.h"
-
-
-/***** STATIC VARIABLES *****/
-
-int sap_agent_id = 1;
-
-/* the agent list */
-Agent *first_agent = NULL;
-
-
-/****************************************************************/
-
-void trace_agents()
-{
-	Agent *ap;
-
-
-	trace("AGENTS:\n");
-	for(ap = first_agent; ap; ap = ap->next_agent)
-	{
-
-                trace("\t%X %-30s %-30s %8d %8d %8d %8d %X\n",
-			ap,
-                        ap->name?ap->name:"NO NAME",
-                        address_string(&(ap->address)),
-                        ap->timeout,ap->agentID,ap->agentStatus,
-                        ap->agentProcessID,
-			ap->first_manager);
-
-	}
-	trace("\n");
-}
-
-
-/****************************************************************/
-
-/* We must invoke subtree_list_delete() before invoking	*/
-/* this function because the first_agent_subtree member	*/
-/* of the agent structures should be NULL		*/
-
-void agent_list_delete()
-{
-	Agent *ap = first_agent;
-	Agent *next;
-
-
-	while(ap)
-	{
-		next = ap->next_agent;
-
-		agent_free(ap);
-
-		ap = next;
-	}
-
-	first_agent = NULL;
-
-	return;
-}
-
-
-/****************************************************************/
-
-static void free_string_content(String str)
-{
-  if(str.chars != NULL && str.len != 0){
-	free(str.chars);
-	str.chars = NULL;
-	str.len = 0;
-  }
-}
-
-/* The fisrt_agent_subtree member of the agent		*/
-/* structure should be NULL				*/
-
-void agent_free(Agent *ap)
-{
-	if(ap == NULL)
-	{
-		return;
-	}
-
-	if(ap->first_agent_subtree)
-	{
-		error("BUG: agent_free(): first_agent_subtree not NULL");
-	}
-
-	/* free the extra element */
-
-	free_string_content(ap->agentPersonalFile);
-	free_string_content(ap->agentConfigFile);
-	free_string_content(ap->agentExecutable);
-	free_string_content(ap->agentVersionNum);
-	free_string_content(ap->agentProtocol);
-	free_string_content(ap->agentName);
-	if(ap->name) free(ap->name);
-	free(ap);
-	ap =NULL;
-	return;
-}
-
-/****************************************************************/
-Agent *agent_find_by_id(int id)
-{
-	Agent *ap;
-
-
-	for(ap = first_agent; ap; ap = ap->next_agent)
-	{
-		if(ap->agentID == id)
-		{
-			return ap;
-		}
-	}
-
-	return NULL;
-}
-
-
-Agent *agent_find_by_name(char* name)
-{
-	Agent *ap;
-
-
-	for(ap = first_agent; ap; ap = ap->next_agent)
-	{
-		if(!strcmp(ap->name,name))
-		{
-			return ap;
-		}
-	}
-
-	return NULL;
-}
-
-/* agent_find() is used to check if we have not		*/
-/* two SNMP agents registered on the same UDP port	*/
-
-Agent *agent_find(Address *address)
-{
-	Agent *ap;
-
-
-	for(ap = first_agent; ap; ap = ap->next_agent)
-	{
-		if(ap->address.sin_port == address->sin_port)
-		{
-			return ap;
-		}
-	}
-
-	return NULL;
-}
-
-void agent_update_subtree(Agent* agent)
-{
-  Subtree *sp;
-  if(agent == NULL) return ;
-  sp = agent->first_agent_subtree;
-  for(;sp;sp=sp->next_agent_subtree){
-	sp->regTreeStatus = agent->agentStatus;
-  }
-}
-
-void agent_detach_from_list(Agent* agent)
-{
-	Agent *ap, *last=NULL;
-
-        if(agent == NULL) return;
-	for(ap = first_agent; ap ; ap = ap->next_agent)
-	{
-		if(ap == agent)
-			break;
-		last = ap;
-	}
-	if(ap==NULL) return;
-	if(last == NULL){
-		first_agent = ap->next_agent;
-	}else{
-		last->next_agent = ap->next_agent;
-	}
-	ap->next_agent = NULL;
-}
-
-
-void agent_destroy(Agent* agent)
-{
-  if(agent!=NULL){
-	if(agent->agentID==sap_agent_id-1)
-		sap_agent_id--;
-  }
-  agent_detach_from_list(agent);
-  agent_manager_list_free(agent->first_manager);
-  delete_all_table_from_agent(agent);
-  delete_all_subtree_from_agent(agent);
-  delete_agent_from_resource_list(agent); 
-  agent_free(agent);
-}
-
-/*
-** Maximum number of consecutive timeouts before snmpdx will purge the
-** subagent from the internal tables.
-*/
-
-static	int MaxFails	= 5 ; 
-
-int	SetFailThreshold ( int v )
-{
-	MaxFails = v ; 
-	return 0 ; 
-}
-
-
-	
-/****************************************************************/
-
-/* destroy hanging agent when no outstanding session which
-   relates to the agent */
-void destroy_hanging_agent()
-{
-	Agent *ap;
-	int rslt ; 
-
-	for (ap = first_agent; ap ; ap = ap->next_agent) {
-
-		if (ap->numOfFailRequest <= 5)
-			continue ; 
-
-		/* Even if the subagent isn't responding, we need to let the
-		** sessions timeout and rip-down thru the normal mechanism.
-		*/
-		if (!no_outstanding_session_for_the_agent (ap))
-			continue ; 
-
-		/* subagent is quiesced and not talking -- check proces */
-		if ( ap->agentProcessID != 0 && kill (ap->agentProcessID, 0) < 0) { 
-			error ("Subagent died: %s PID=%d -- deleted from the agent table",
-				ap->name, ap->agentProcessID ) ;	
-			agent_destroy (ap) ; 
-			return ; 		/* only kill one at a time */
-		}
-
-		/* subagent appears to be alive but hung and not responding */
-
-		if (MaxFails <= 0 || ap->numOfFailRequest < MaxFails)
-			continue ; 
-
-		/* If the subagent receives a request with a bad community string
-		// it is obliged to discard the string and _not_ respond.  This
-		// doesn't jive with our stateful relay model.  We timeout and
-		// can't distinguish a hung agent from an agent that is dropping
-		// packets because of the "bad" community strings.  Thus, before
-		// putting the ax to an agent we see if it's still alive.
-		// 
-		// The ssa_subagent_is_alive() routine "pings" the subagent with
-		// a valid but innocuous request packet.  Unfortunately the dummy
-		// we build has the community string set to "public".  If the subagent
-		// doesn't accept "public" requests it will ignore our ping attempt.
-		//
-		// Sunil indicated that snmpdx would pre-validate incoming community
-		// strings and only pass requests that would be accepted by the subagent.
-		// This doesn't appear to work as advertised.
-	 	*/
-
-		if (ssa_subagent_is_alive (ap)) {
-			error ("Agent %s appeared dead but responded to ping", ap->name) ; 
-			ap->numOfFailRequest = 0 ; 
-			continue ; 
-		}
-
-		error ("Agent not responding: %s -- deleted from the agent table", ap->name ) ; 
-		agent_destroy(ap);
-		return;
-	}
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/agent.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-/* HISTORY
- * 5-20-96	Jerry Yeung	add mib-handling data structure
- * 9-20-96	Jerry Yeung	change agent structure
- */
-
-#ifndef _AGENT_H_
-#define _AGENT_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "snmpdx_stub.h"
-
-#define SSA_OPER_STATUS_ACTIVE	1
-#define SSA_OPER_STATUS_NOT_IN_SERVICE	2
-#define SSA_OPER_STATUS_INIT 	3
-#define SSA_OPER_STATUS_LOAD	4
-#define SSA_OPER_STATUS_DESTROY	5
-
-typedef struct _Agent {
-
-	/* extra elements */
-        Integer agentID;
-        Integer agentStatus;
-        Integer agentTimeOut;
-        Integer agentPortNumber; /* same as address.sin_port */
-        String agentPersonalFile;
-        String agentConfigFile;
-        String agentExecutable;
-        String agentVersionNum;
-        Integer agentProcessID;
-        String agentName; /* it points to name */
-	Integer agentSystemUpTime;
-        Integer agentWatchDogTime;
-        String agentProtocol;
-
-	Integer	agentTreeIndex;
-	Integer	agentTblIndex;
-
-	struct _Manager	*first_manager;
-	struct _Agent	*next_agent;
-	Address		address;
-	char		*name;
-	u_long		timeout;
-	struct _Subtree	*first_agent_subtree;
-	int		numOfFailRequest;
-} Agent;
-
-extern int sap_agent_id;
-
-/* the agent list */
-extern Agent *first_agent;
-
-/* the address is a unique key for an agent */
-extern Agent *agent_find(Address *address);
-extern Agent *agent_find_by_name(char* name);
-extern Agent *agent_find_by_id(int id);
-
-/* We must invoke subtree_list_delete() before invoking */
-/* this function because the first_agent_subtree member */
-/* of the agent structures should be NULL               */
-extern void agent_list_delete();
-
-extern void agent_update_subtree(Agent* agent);
-
-extern void agent_detach_from_list(Agent* agent);
-
-extern void agent_destroy(Agent* agent);
-
-extern void trace_agents();
-extern void agent_free(Agent *ap);
-
-#endif
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/conf/dispatcher.conf	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Example of Configuration file of the SNMP Relay
-#
-
-
-##########
-# macros # 
-##########
-
-macros = {
-	default =		mib-2
-
-	application =		mib-2.27
-	mta =			mib-2.28
-	dsa =			mib-2.29
-
-	applTable =			application.1
-	assocTable =			application.2
-	mtaTable =			mta.1
-	mtaGroupTable =			mta.2
-	mtaGroupAssociationTable =	mta.3
-
-	transmission =		mib-2.10
-	x25 =			transmission.5
-
-	example =		sun.1000
-}
-
-
-##########
-# agents #
-##########
-
-agents =
-{
-	{
-		name = "snmpd"
-		subtrees = { mib-2, sun }
-		tables = { }
-		timeout = 2000000
-		port = 4000
-	}
-
-	{
-		name = "snmpx400d"
-		subtrees = { assocTable, mtaGroupTable, mtaGroupAssociationTable }
-		tables =
-		{
-			{
-				table = applTable
-				columns = [2-15]
-				indexs = 1
-			}
-			{
-				table = applTable
-				columns = [2-15]
-				indexs = 2
-			}
-			{
-				table = assocTable
-				columns = [2-5]
-				indexs = 1
-			}
-			{
-				table =	mtaTable
-				columns = [1-9]
-				indexs = 1
-			}
-			{
-				table =	mtaTable
-				columns = [1-9]
-				indexs = 2
-			}
-		}
-		timeout = 4000000
-		port = 5000
-	}
-
-	{
-		name = "snmpsendmaild"
-		tables =
-		{
-			{
-				table = applTable
-				columns = [2-15]
-				indexs = 3
-			}
-			{
-				table = assocTable
-				columns = [2-5]
-				indexs = 3
-			}
-			{
-				table = mtaTable
-				columns = [1-9]
-				indexs = 3
-			}
-		}
-		timeout = 4000000
-		port = 5001
-	}
-
-	{
-		name = "snmpx25d"
-		subtrees = { x25 }
-		tables = { }
-		timeout = 2000000
-		port = 6000
-	}
-
-	{
-		name = "snmpexampled"
-		subtrees = { example }
-		timeout = 2000000
-		port = 7000
-	}
-}
--- a/usr/src/cmd/agents/snmp/snmprelayd/conf/snmpd.snmprelay	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Configuration file of the SNMP Relay
-#  for the SNMP agent bundled with SNM
-#
-
-
-##########
-# agents #
-##########
-
-agents =
-{
-	{
-		name = "snmpd"
-		subtrees = { mib-2, sun }
-		timeout = 2000000
-		port = 4000
-	}
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/conf/snmprelayd.template	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#	A configuration file template for the SNMP Relay
-#	
-
-# IMPORTANT:
-# ----------
-#	So that the SNMP Relay will take into account
-#	your configuration file, you must:
-#	- rename this file with the ".snmprelay" extension
-#	  (for example: myagent.snmprelay)
-#	- check that this file is located in the configuration directory
-#	  for the SNMP Relay (by default: /opt/SUNWconn/snmprelay)
-
-
-##########
-# macros # 
-##########
-
-# The following 3 macros are predefined:
-#
-#	mib-2 =		1.3.6.1.2.1
-#	enterprise =	1.3.6.1.4.1
-#	sun =		1.3.6.1.4.1.42
-#
-# Your can define your own macros, so that you can
-# manipulate strings instead of OIDs in defining the agent.
-# See the "agent" section below.
-
-macros = {
-	application =		mib-2.27
-	mta =			mib-2.28
-	dsa =			mib-2.28
-
-	my-enterprise =	enterprise.n
-
-	my-subtree1 =		my-enterprise.1
-	my-subtree2 =		my-enterprise.2
-}
-
-# in enterprise.n, n is the number assigned to your company
-# by the Internet Assigned Numbers Authority.
-
-
-##########
-# agent #
-##########
-
-# You must fill in at least the following fields:
-#
-#	- name:		the name of your agent (for example, the executable
-#			file name of your agent)
-#
-#	- subtrees:	the list of OIDs / subtrees of OIDs your agent
-#			supports. The listed items must be separated by
-#			a coma.
-#
-#	- port:		the UDP port number on which you will start
-#			your agent
-#
-# You can also change the following fields:
-#
-#	- timeout:	the number of micro-seconds the SNMP Relay will
-#			wait for a reponse from your agent
-
-agents =
-{
-	{
-		name = "myagent"
-		subtrees = { my-subtree1, my-subtree2 }
-		timeout = 4000000
-		port = p
-	}
-}
-
-# In port = p, replace p by any unused port number above 1024.
-# You can use the command get_free_udp_port (default location
-# /opt/SUNWconn/mhs/bin) to find out the first unused udp port
-# number above 1024.
-
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/conf/snmpx400d.snmprelay	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Configuration file for the SNMP Relay
-#  for the X.400 SNMP agent
-#
-
-
-##########
-# macros # 
-##########
-
-macros = {
-	application =		mib-2.27
-	mta =			mib-2.28
-
-	applTable =			application.1
-	assocTable =			application.2
-	mtaTable =			mta.1
-	mtaGroupTable =			mta.2
-	mtaGroupAssociationTable =	mta.3
-}
-
-
-##########
-# agents #
-##########
-
-agents =
-{
-	{
-		name = "snmpx400d"
-		subtrees = { application, mta }
-		timeout = 4000000
-		port = 5000
-	}
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/config.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-/*
- * HISTORY
- * 5-13-96      Jerry Yeung     support security file
- */
-
-#ifndef _CONFIG_H_
-#define _CONFIG_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/***** GLOBAL VARIABLES *****/
-
-extern char config_file_4_res[];
-extern char default_sec_config_file[];
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern int config_init(char *dirname);
-
-/**** SNMP security(5-13-96) ***/
-extern int sec_config_init(char *filename);
-
-
-extern int personal_file_reading(char* dirname, char* filename, time_t *file_time);
-extern int resource_update(char *filename);
-extern int read_acl();
-#endif
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/config.l	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-%{
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*
- * HISTORY
- * Date		Developer	Comment
- * 5-13-96	Jerry Yeung	combine agent/config
- * 6-25-96      Jerry Yeung     trap handling
- * 7-03-96	Jerry Yeung	WatchDogTime,MaxPollInterval,MaxAgentTimeOut
- * 7-17-96	Jerry Yeung	change personal to registration_file
- */
-
-/*
-#define DEBUG_LEX printf("\tLEX: %s(%d) at line %d\n", yytext, yyval, yylineno);
-*/
-#define DEBUG_LEX
-
-
-#define QUOTED_STRING_SIZE	300
-
-static char quoted_string[QUOTED_STRING_SIZE];
-static int token_value;
-
-static void get_quoted_string();
-
-%}
-
-%%
-
-#.*\n					{ ; }
-[ \t\n]*				{ ; }
-\"					{ get_quoted_string();
-					  return QUOTEDSTRING;
-					}
-
-\{					{ DEBUG_LEX return OPENBRACKET; }
-\}					{ DEBUG_LEX return CLOSEBRACKET; }
-\.					{ DEBUG_LEX return DOT; }
-=					{ DEBUG_LEX return EQUAL; }
-\,					{ DEBUG_LEX return COMMA; }
-\[					{ DEBUG_LEX return OPENSQUAREBRACKET; }
-\]					{ DEBUG_LEX return CLOSESQUAREBRACKET; }
-\-					{ DEBUG_LEX return MINUS; }
-
-[0-9]+					{ DEBUG_LEX token_value = atoi(yytext);
-					  return NUMBER;
-					}
-
-[mM][aA][cC][rR][oO][sS]		{ DEBUG_LEX return MACROS; }
-[aA][gG][eE][nN][tT][sS]		{ DEBUG_LEX return AGENTS; }
-[nN][aA][mM][eE]			{ DEBUG_LEX return NAME; }
-[sS][uU][bB][tT][rR][eE][eE][sS]	{ DEBUG_LEX return SUBTREES; }
-[tT][aA][bB][lL][eE][sS]		{ DEBUG_LEX return TABLES; }
-[tT][aA][bB][lL][eE]			{ DEBUG_LEX return TABLE; }
-[cC][oO][lL][uU][mM][nN][sS]		{ DEBUG_LEX return COLUMNS; }
-[iI][nN][dD][eE][xX][sS]		{ DEBUG_LEX return INDEXS; }
-[iI][nN][dD][eE][xX][eE][sS]		{ DEBUG_LEX return INDEXS; }
-[tT][iI][mM][eE][oO][uU][tT]		{ DEBUG_LEX return TIMEOUT; }
-[pP][oO][rR][tT]			{ DEBUG_LEX return PORT; }
-[wW][aA][tT][cC][hH][-_][dD][o0][gG][-_][tT][iI][mM][eE] 	{ DEBUG_LEX return WATCHDOGTIME; }
-[pP][oO][lL][lL][-_][iI][nN][tT][eE][rR][vV][aA][lL] { DEBUG_LEX return POLLINTERVAL; }
-[mM][aA][xX][-_][aA][gG][eE][nN][tT][-_][tT][iI][mM][eE][oO][uU][tT] { DEBUG_LEX return MAXAGENTTIMEOUT; }
-[eE][nN][vV][iI][rR][oO][nN][mM][eE][nN][tT] 	{ DEBUG_LEX return ENVIRONMENT; }
-
-[cC][oO][mM][mM][uU][nN][iI][tT][iI][eE][sS] { DEBUG_LEX return COMMUNITIES; }
-[rR][eE][aA][dD][-_][oO][nN][lL][yY]     { DEBUG_LEX return READONLY; }
-[rR][eE][aA][dD][-_][wW][rR][iI][tT][eE] { DEBUG_LEX return READWRITE; }
-[mM][aA][nN][aA][gG][eE][rR][sS]        { DEBUG_LEX return MANAGERS; }
-[tT][rR][aA][pP] { DEBUG_LEX return TRAP; }
-[tT][rR][aA][pP][-_][nN][uU][mM] { DEBUG_LEX return TRAPNUM; }
-[tT][rR][aA][pP][-_][cC][oO][mM][mM][uU][nN][iI][tT][yY] { DEBUG_LEX return TRAPCOMMUNITY; }
-[tT][rR][aA][pP][-_][rR][eE][cC][iI][pP][iI][eE][nN][tT][sS] { DEBUG_LEX return TRAPDESTINATORS; }
-
-[aA][cC][lL]				{ DEBUG_LEX return ACL; }
-[aA][cC][cC][eE][sS][sS]		{ DEBUG_LEX return ACCESS; }
-[hH][oO][sS][tT][sS]                    { DEBUG_LEX return HOSTS; }
-
-[rR][eE][gG][iI][sS][tT][rR][aA][tT][iI][oO][nN][-_][fF][iI][lL][eE] { DEBUG_LEX	return REGISTRATION_FILE; }
-
-[sS][eE][cC][uU][rR][iI][tT][yY] { DEBUG_LEX return SECURITY; }
-[pP][oO][lL][iI][cC][yY] { DEBUG_LEX return POLICY; }
-[tT][yY][pP][eE]	{ DEBUG_LEX return TYPE; }
-[uU][sS][eE][rR]	{ DEBUG_LEX return USER; }
-[cC][oO][mM][mM][aA][nN][dD] { DEBUG_LEX return COMMAND; }
-[rR][eE][sS][oO][uU][rR][cC][eE] { DEBUG_LEX return RESOURCE; }
-[dD][iI][rR][eE][cC][tT][oO][rR][yY] { DEBUG_LEX return DIRECTORY; }
-
-mib-2					{ DEBUG_LEX return MIB2; }
-sun					{ DEBUG_LEX return SUN; }
-enterprise				{ DEBUG_LEX return ENTERPRISE; }
-
-([a-zA-Z\*]|[\_\?\-0-9\*+$#%^@!|~&=`<>\\']*[a-zA-Z])[_0-9a-zA-Z-]*	{ DEBUG_LEX return IDENTIFIER; }
-
-.					{ error_exit("syntax error in %s at line %d: the token %s is not valid",
-						config_file_4_res, yylineno, yytext);
-					}
-
-
-%%
-
-#undef input
-#undef unput
-#undef output
-
-/*
-# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
-# define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
-# define output(c) (void)putc(c,yyout)
-*/
-
-#define input() (((yytchar=*lexinput++)=='\n'?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
-#define unput(c) {yytchar= (c); if(yytchar=='\n')yylineno--;*--lexinput = yytchar;}
-#define output(c)
-
-/*************************************************************************/
-
-static void get_quoted_string()
-{
-	int i = 0;
-	int c;
-
-
-	c = input();
-	while( (c != 0) && (c != '"') )
-	{
-		if(c == '\n')
-		{
-			error_exit("syntax error at line %d: can not have a \\n in a quoted string", yylineno);
-		}
-
-		if(i < QUOTED_STRING_SIZE - 1)
-		{
-			quoted_string[i++] = c;
-		}
-
-		c = input();
-	}
-	quoted_string[i] = '\0';
-
-	if(c == 0)
-	{
-		error_exit("syntax error at line %d: have not found a quote before the end of file", yylineno);
-	}
-}
-
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/config.y	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2736 +0,0 @@
-%{
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*
- * HISTORY
- * 5-13-96	Jerry Yeung		parse security config. file
- * 6-25-96      Jerry Yeung             parse trap info.
- * 6-27-96 	Jerry Yeung		optional port stmt
- * 6-28-96	Jerry Yeung		add setuid support
- * 7-03-96	Jerry Yeung		add watchdog, maxAgentTimeOut
- *					    pollInterval
- * 7-13-96	Jerry Yeung		remove resource_name
- * 7-17-96	Jerry Yeung		change reg file suffix
- * 7-17-96	Jerry Yeung		change personal to registration_file
- */
-%}
-
-%start configuration
-
-%token NUMBER
-%token MACROS
-%token EQUAL
-%token OPENBRACKET
-%token CLOSEBRACKET
-%token IDENTIFIER
-%token MIB2
-%token SUN
-%token ENTERPRISE
-%token DOT
-%token AGENTS
-%token NAME
-%token SUBTREES
-%token TABLES
-%token TABLE
-%token COLUMNS
-%token INDEXS
-%token TIMEOUT
-%token PORT
-%token QUOTEDSTRING
-%token COMMA
-%token MINUS
-%token OPENSQUAREBRACKET
-%token CLOSESQUAREBRACKET
-%token WATCHDOGTIME
-%token MAXAGENTTIMEOUT
-%token POLLINTERVAL
-%token ENVIRONMENT
-
-/* support SNMP security(5-13-96) */
-%token COMMUNITIES
-%token READONLY
-%token READWRITE
-%token MANAGERS
-%token TRAPCOMMUNITY
-%token TRAPDESTINATORS
-%token ACL
-%token ACCESS
-%token TRAPNUM
-%token HOSTS
-%token TRAP
-
-/* support resource */
-%token RESOURCE
-%token REGISTRATION_FILE
-%token SECURITY
-%token POLICY
-%token TYPE
-%token COMMAND
-%token DIRECTORY
-%token USER
-
-%{
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <netinet/in.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <string.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "pdu.h"
-
-#include "snmprelay_msg.h"
-#include "agent.h"
-#include "subtree.h"
-#include "session.h"
-#include "dispatcher.h"
-
-/** SNMP security (5-13-96) */
-#include "trap.h"
-#include "access.h"
-
-#include "res.h"
-#include "sh_table.h"
-
-
-/***** DEFINE *****/
-
-/*
- #define DEBUG_YACC(string) printf("\t\tYACC: %s: %s at line %d\n", string, yytext, yylineno);
-*/
-
-#define DEBUG_YACC(string) 
-
-/*
-#define SNMPRELAY_SUFFIX	".snmprelay" 
-*/
-#define SNMPRELAY_SUFFIX	".reg"
-#define SNMPRESOURCE_SUFFIX	".rsrc"
-#define SNMPRELAY_REG_FILE	"snmpdx.reg"
-#define SNMPACL_SUFFIX		".acl"
-
-
-/***** TYPEDEF *****/
-
-typedef struct _Macro {
-	struct _Macro *next_macro;
-	char *label;
-	Oid name;
-} Macro;
-
-
-/***** GLOBAL VARIABLES *****/
-
-char config_file_4_res[300] = "";
-
-
-/***** STATIC VARIABLES AND FUNCTIONS *****/
-/*(6-18) reconfig */
-#define RES_PARSING_STATE_FROM_SCRATCH 0
-#define RES_PARSING_STATE_RE_READ 1
-static time_t last_res_modify_time=0;
-static int res_parsing_state =0; /* 0:init */
-
-/* access control(6-20-96) */
-static AccessServer *static_access_server=NULL;
-static AccessPolicy *static_access_policy=NULL;
-static Community *static_community=NULL;
-
-/* trap filter (6-25-96) */
-static SubMember *static_sub_member=NULL;
-static Manager *static_host=NULL;
-static EFilter *static_filter=NULL;
-static int static_trap_low=-1;
-static int static_trap_high=-1;
-
-/* snmp security(5-13-96) */
-static int community_type = 0;
-static char *current_filename = NULL;
-
-/* lexinput points to the current focus point in the config file */
-static char *lexinput;
-
-/* first_macro is the begining of the list	*/
-/* of the user defined macros			*/
-
-static Macro *first_macro = NULL;
-
-
-/* the boolean parsing_oid is used to		*/
-/* know if we are parsing an			*/
-/* object identifier or not.			*/
-
-static int parsing_oid = False;
-
-
-/* here are the values of the predifined macros	*/
-/* that can be used in the configuration file	*/
-
-static Subid subids_mib2[] = { 1, 3, 6, 1, 2, 1 };
-static int mib2_len = 6;
-static Subid subids_enterprise[] = { 1, 3, 6, 1, 4, 1 };
-static int enterprise_len = 6;
-static Subid subids_sun[] = { 1, 3, 6, 1, 4, 1, 42 };
-static int sun_len = 7;
-
-/* the 2 static variables static_subids and	*/
-/* static_len are used when parsing an	*/
-/* object identifier. Then the boolean		*/
-/* parsing_oid should be true. When a new sub-	*/
-/* identifier (or a list of sub-identifiers)	*/
-/* is found, we use the function		*/
-/* subids_cat to append it to the static_subids.*/
-
-static Subid *static_subids = NULL;
-static int static_len = 0;
-static int subids_cat(Subid *subids, int len);
-
-
-/* macro_add() is used to append a macro to	*/
-/* the macro list. macro_find is used to find	*/
-/* a macro in the macro list			*/
-
-static Macro *macro_add(char *label, Subid *subids, int len);
-static Macro *macro_find(char *label);
-static void macro_free(Macro *mp);
-static void macro_list_delete();
-static void trace_macros();
-
-
-/* static_label is used when parsing a macro	*/
-static char *static_label = NULL;
-
-/* static_agent is used when parsing an agent	*/
-static Agent *static_agent = NULL;
-
-/* resource support */
-static SapResource *static_res = NULL;
-
-/* static_table is used when parsing n table	*/
-static Table *static_table = NULL;
-Table *tmp_table;
-
-/* static_inf_value and static_max_value are	*/
-/* used when parsing a range			*/
-static int static_inf_value = -1;
-static int static_sup_value = -1;
-
-char *save_string = NULL;
-char *com_string = NULL;
-char *host_string = NULL;
-int found_dot=FALSE;
-int found_comma=FALSE;
-
-
-%}
-
-%%
-
-
-configuration :	agents | macros agents | snmp_security | environment resources
-		{
-			DEBUG_YACC("configuration")
-		}
-
-/******************* SNMP security (5-13-96) *********/
-snmp_security : acls trap_block /*trapcommunity trapdestinators*/
-                {
-                        DEBUG_YACC("security configuration")
-                }
-
-/***************/
-/* accesscontrol */
-/***************/
-
-acls :	/*empty*/ |t_acls t_equal t_openbracket acls_list t_closebracket
-	{
-		DEBUG_YACC("acls_list1")
-	}
-	| t_acls t_equal t_openbracket error t_closebracket
-	{
-	          DEBUG_YACC("acls_listError")	
-		  error("BUG: acl stmt parsing error at line %d",yylineno);
-                  if(static_access_policy != NULL){
-                        access_policy_list_free(static_access_policy);
-                        static_access_policy = NULL;
-		  }
-	}
-
-acls_list : /*empty*/ | acls_list acl_item 
-	{
-		DEBUG_YACC("acls_list2")
-	}
-
-acl_item : t_openbracket 
-	{
-		static_access_policy = calloc(1,sizeof(AccessPolicy));
-		if(static_access_policy == NULL)
-		{
-			error("malloc() failed");
-			YYERROR;
-		}
-	} communities_stmt acl_access
-	{
-		if(static_access_policy!=NULL)
-			static_access_policy->access_type = community_type;	
-	} hosts t_closebracket
-	{
-		/* create AccessServer */
-		/* put the AccessPolicy into AccessServer */
-		/* put AccessServer into corresponding manager */
-
-                {
-                        /* Hack to send last community string which is a dot string */
-
-                        if (com_string != NULL)
-                        {                  /* add community into AccessPolicy */
-                           static_community = calloc(1,sizeof(Community));
-                           if(static_community == NULL)
-                           {
-                              error("malloc() failed");
-                              YYERROR;
-                           }
-                           static_community->name = strdup(com_string);
-                           community_attach(static_access_policy,static_community);
-                           static_community = NULL;
-                           free(com_string);
-			   com_string=NULL;
-                           found_comma = FALSE;
-                        }
-                        /* Hack to send last manager host string which is a dot string */
-
-                        if (host_string != NULL)
-                        {
-                            Manager *res;
-
-                           res = manager_add(host_string, error_label);
-                           if(res==NULL){
-                               error("error in %s at line %d: %s",
-                                     current_filename? current_filename:
-"???",
-                                     yylineno, error_label);
-                           }
-                           static_access_server = calloc(1,sizeof(AccessServer));
-                           if(static_access_server == NULL)
-                           {
-                              error("malloc() failed");
-                              if(static_access_policy)
-                              access_policy_list_free(static_access_policy);
-                              YYERROR;
-                           }
-                              if(static_access_policy!=NULL)
-                              	static_access_policy->count++;
-                              static_access_server->first_acc_policy = static_access_policy;
-                              access_server_add_tail(res,static_access_server);
-                              static_access_server = NULL;
-			      free(host_string);
-		              host_string=NULL;	
-                   	      found_comma = FALSE;
-                        }
-                }
-                static_access_server = NULL;
-                static_access_policy = NULL;
-                static_community = NULL;
-                community_type = 0;
-	}
-
-communities_stmt :    t_communities t_equal communities_set
-	{
-		DEBUG_YACC("communities_stmt");
-	}
-
-communities_set : communities_set  t_comma community_elem | community_elem
-	{
-                DEBUG_YACC("communities_set");
-	}
-
-community_elem : community_elem  t_dot community_item | t_dot community_elem | community_item
-        {
-               DEBUG_YACC("community_elem")
-        }
-
-community_item : ct_identifier
- 	{
-		DEBUG_YACC("community_item")
-		if(static_access_policy==NULL){
-			error("acl statement error");
-			YYERROR;
-		}
-
-                if (found_comma && (com_string != NULL))
-                {
-		     static_community = calloc(1,sizeof(Community));
-                     if(static_community == NULL)
-                     {
-                        error("malloc() failed");
-                        YYERROR;
-                     }
-
-	             static_community->name = strdup(com_string);
-                     community_attach(static_access_policy,static_community);
-                     static_community = NULL;
-	             free(com_string);
-	             com_string=NULL;	
-                     found_comma=FALSE;
-                }
-                if (com_string == NULL && found_dot == FALSE)
-	        {
-                    /* com_string= strdup(save_string);*/
-                    /* first part of community string */
-                    com_string=malloc(50);
-                    if(com_string == NULL){
-                        error("malloc() failed");
-                        YYERROR;
-                    }
-                    strcpy(com_string,save_string);
-                    free(save_string);
-                }
-
-                 
-		if (found_dot )
-		{
-			if (com_string == NULL)
-				com_string = malloc(50);
-			strcat(com_string,".");
-					/* allow a dot in community string */
-			strcat(com_string,save_string);
-					/* add part after the dot    */
-			free(save_string);
-			found_dot=FALSE;
-		}
-	}
-
-acl_access :	t_access t_equal acl_access_type
-	{
-		DEBUG_YACC("acl_access")
-        }
-
-acl_access_type : t_readonly | t_readwrite
-		{
-			DEBUG_YACC("acl_access_type")      
-		}
-
-hosts : t_managers t_equal hosts_list
-	{
-		DEBUG_YACC("hosts")
-	}
-
-hosts_list : hosts_list t_comma host_elem | host_elem 
-	{
-		DEBUG_YACC("hosts_list");
-	}
-
-host_elem : host_elem t_dot host_item | host_item
-        {
-                DEBUG_YACC("host_elem");
-	}
-
-host_item :  ct_identifier 
-	{
-		/* add the host item to manager list */
-		/* it should return the pointer if exists */
-                Manager *res;
- 
-                DEBUG_YACC("manager_item")
-
-		if (found_comma && (host_string != NULL))
-		{
-                	res = manager_add(host_string, error_label);
-                	if(res==NULL)
-			{
-                                error("error in %s at line %d: %s",
-                                        current_filename? current_filename:
-"???",
-                                        yylineno, error_label);
-                	} 
-                	static_access_server = calloc(1,sizeof(AccessServer));
-                	if(static_access_server == NULL)
-                	{
-                        	error("malloc() failed");
-                        	if(static_access_policy)
-                          	access_policy_list_free(static_access_policy);
-                        	YYERROR;
-                	}
-                	if(static_access_policy!=NULL)
-                        	static_access_policy->count++;
-                	static_access_server->first_acc_policy = static_access_policy;
-			access_server_add_tail(res,static_access_server);
-			static_access_server = NULL;
-                        free(host_string);
-			host_string=NULL;
-			found_comma = FALSE;
-		}
-		if (host_string == NULL)
-                {
-		    /* host_string= strdup(save_string);*/
-                    /* first part of host string */
-                    host_string=malloc(50);
-                    if(host_string == NULL){
-                        error("malloc() failed");
-                        YYERROR;
-	            }	
-                    strcpy(host_string,save_string);
-                    free(save_string);
-                }
-                    
-
-                if (found_dot )
-                {
-                     strcat(host_string,".");           /* allow a dot in hoststring */
-                     strcat(host_string,save_string);   /* add part after the dot    */
-                     free(save_string);
-                     found_dot=FALSE;
-                }
-
-	}
-
-/***************/
-/* communities */
-/***************/
-
-/*
-
-communities :	t_communities t_equal t_openbracket communities_list t_closebracket
-		{
-			DEBUG_YACC("communities")
-		}
-		| t_communities t_equal t_openbracket error t_closebracket
-		{
-		  error("BUG: community stmt parsing error at line %d",yylineno);
-		  if(community_name != NULL) free(community_name);
-		}
-
-
-communities_list :  | communities_list community_item
-		{
-			DEBUG_YACC("communities_list")
-		}
-
-
-community_item : ct_identifier
-		{
-			DEBUG_YACC("community_item 1")
-
-			if(community_name)
-			{
-				error("BUG: community_name is not NULL in community_item");
-			}
-
-			community_name = strdup(yytext);
-			if(community_name == NULL)
-			{
-				error(ERR_MSG_ALLOC);
-				YYERROR;
-			}
-		}
-		communitytype
-		{
-			int res;
-
-			DEBUG_YACC("community_item 2")
-
-			if(community_name == NULL)
-			{
-				error("BUG: community_name is NULL in community_item");
-			}
-
-			res = community_add(community_name, community_type, error_label);
-			switch(res)
-			{
-				case 0:
-					break;
-
-				case 1:
-					error("error in %s at line %d: %s",
-						current_filename? current_filename: "???",
-						yylineno, error_label);
-					break;
-
-				default:
-					error("fatal error in %s at line %d: %s",
-						current_filename? current_filename: "???",
-						yylineno, error_label);
-					YYERROR;
-			}
-
-			free(community_name);
-			community_name = NULL;
-		}
-
-communitytype : t_readonly | t_readwrite
-		{
-			DEBUG_YACC("community_type")
-		}
-*/
-
-/************/
-/* managers */
-/************/
- 
-/*
-managers :      t_managers t_equal t_openbracket managers_list t_closebracket
-                {
-                        DEBUG_YACC("agents")
-                }
-	 	| t_managers t_equal t_openbracket error t_closebracket
-		{
-		  error("BUG: managers stmt parsing error at line %d",yylineno);
-		} 
- 
-managers_list :  | managers_list list_separator manager_item
-                {
-                        DEBUG_YACC("managers_list")
-                }
- 
-manager_item :  ct_identifier
-                {
-                        Manager *res;
- 
-                        DEBUG_YACC("manager_item")
- 
-                        res = manager_add(yytext, error_label);
-                        if(res==NULL){
-                                        error("error in %s at line %d: %s",
-                                                current_filename? current_filename:
-"???",
-                                                yylineno, error_label);
-                        } 
-                }
-*/
-
-/*** trap hanlding (6-25-96) */
-trap_block :    t_trap t_equal t_openbracket trap_list t_closebracket
-                {
-                        DEBUG_YACC("trap_block")
-			found_comma = FALSE;
-                }
-                | t_trap t_equal t_openbracket error t_closebracket
-                {
-                        /* clean up */
-                        if(static_sub_member != NULL){
-                          sub_member_free(static_sub_member);
-                          static_sub_member=NULL;
-                        }
-                }
-
-trap_list : /*empty*/ | trap_list trap_item
-        {
-                DEBUG_YACC("trap_list")
-        }
-
-trap_item : t_openbracket
-        {
-                /* create submember */
-                static_sub_member = calloc(1,sizeof(SubMember));
-                if(static_sub_member == NULL)
-                {
-                        error("malloc() failed");
-                        YYERROR;
-                }
-        } trap_community_string trap_interest_hosts
-        {
-                /* attach submember to subgroup */
-        } enterprise_list t_closebracket
-        {
-                static_sub_member = NULL;
-        }
- 
-trap_community_string : t_trapcommunity t_equal ct_identifier
-        {
-                /* set the community field in submember */
-                if(static_sub_member != NULL)
-                {
-                        static_sub_member->community_string = strdup(yytext);
-                        if(static_sub_member == NULL)
-                        {
-                                error(ERR_MSG_ALLOC);
-                                YYERROR;
-                        }
-                }else{
-                        error("BUG: missing trap community name");
-                }
-        }
- 
-trap_interest_hosts : t_hosts t_equal trap_interest_hosts_list
-        {
-                DEBUG_YACC("trap_interest_hosts")
-        }
- 
-trap_interest_hosts_list : trap_interest_hosts_list t_comma
-                 trap_interest_host_item | trap_interest_host_item
-        {
-                DEBUG_YACC("trap_interest_hosts_list")
-        }
- 
-trap_interest_host_item : ct_identifier
-        {
-                DEBUG_YACC("trap_interest_host_item")
-                /* attach host to the submember */
-                if(static_sub_member==NULL){
-                        error("trap statement error");
-                        YYERROR;
-                }else{
-                  static_host = calloc(1,sizeof(Manager));
-                  if(static_host == NULL)
-                  {
-                        error("malloc() failed");
-                        YYERROR;
-                  }
-                  static_host->name = strdup(yytext);
-                  if(name_to_ip_address(static_host->name,
-                        &static_host->ip_address,error_label)){
-                        error("unknown host %s",static_host->name);
-                        free(static_host);
-                        static_host=NULL;
-                        YYERROR;
-                  }
-                  static_host->next_manager = static_sub_member->first_manager;
-                  static_sub_member->first_manager=static_host;
-                  static_host=NULL;
-                }
-        }
- 
-enterprise_list : /* empty */ | enterprise_list enterprise_item
-        {
-                DEBUG_YACC("enterprise_list")
-        }
-
-enterprise_item : t_openbracket enterprise_stmt trap_number_stmt
-                  t_closebracket
-                {
-                        DEBUG_YACC("enterprise_item")
-                }
- 
-enterprise_stmt : ENTERPRISE t_equal t_quotedstring
-                {
-                        /* currently, it supports single enterprise */
- 
-                        DEBUG_YACC("enterprise_stmt")
-                        /* add or find the enterprise */
-                        static_filter = efilter_add(quoted_string,error_label);
-                        if(static_filter==NULL){
-                          error("error in %s at line %d: %s",
-                                current_filename?current_filename:"???",
-                                yylineno,error_label);
-                        }
-                }
- 
-trap_number_stmt : t_trap_num t_equal trap_number_list
-                {
-                        DEBUG_YACC("trap_number_stmt")
-                }
-
-trap_number_list : trap_number_item
-                {
-                        DEBUG_YACC("trap_number_list")
-                }
-                | trap_number_list t_comma trap_number_item
-                {
-                        DEBUG_YACC("trap_number_list")
-                }
-
-trap_number_item : trap_range
-	{
-			DEBUG_YACC("trap_number_item")
-                        /* for each trap, find/add to the
-                           enterprise, and add_tailthe subgroup
-                           to each trap */
- 
-                        if(static_filter!=NULL){
-                                /* expand the trap */
-                                mem_filter_join(static_trap_low,
-                                        static_trap_high,static_sub_member,
-                                        static_filter);
-                        }else{
-                                error("error in enterprise statement");
-                                YYERROR;
-                        }
-	
-	}
-
-trap_range :    NUMBER
-                {
-                        /* starting trap num */
-                        static_trap_low = token_value;
-                }
-                t_minus  NUMBER
-                {
-                        /* ending trap num */
-                        static_trap_high = token_value;
-                }
-                | NUMBER
-                {
-                        /* start & end num the same */
-                        DEBUG_YACC("trap_range")
-                        static_trap_low=static_trap_high=token_value;
-                }
- 
-/* 
-trapcommunity : t_trapcommunity t_equal ct_identifier
-                {
-                        DEBUG_YACC("trap_community")
-
-                        if(trap_community)
-                        {
-                                error("BUG: trap_community not NULL in trap_community");
-                        }
-
-                        trap_community = strdup(yytext);
-                        if(trap_community == NULL)
-                        {
-                                error(ERR_MSG_ALLOC);
-                                YYERROR;
-                        }
-                }
-*/
-
-/*******************/
-/* trapdestinators */
-/*******************/
-
-/*
-trapdestinators : t_trapdestinators t_equal t_openbracket trapdestinators_list t_closebracket
-                {
-                        DEBUG_YACC("trapdestinators")
-                }
-		| t_trapdestinators t_equal t_openbracket error t_closebracket
-		{
-		  error("BUG: trapdestinators stmt parsing error at line %d",yylineno);
-		}
-
-
-trapdestinators_list :  | trapdestinators_list list_separator trapdestinator_item
-                {
-                        DEBUG_YACC("trapdestinators_list")
-                }
-
-
-trapdestinator_item : ct_identifier
-                {
-                        int res; 
-
-                        DEBUG_YACC("trapdestinator_item")
- 
-                        res = trap_destinator_add(yytext, error_label);
-                        switch(res)
-                        {
-                                case 0:
-                                        break;
- 
-                                case 1:
-                                        error("error in %s at line %d: %s",
-                                                current_filename? current_filename:
-"???",
-                                                yylineno, error_label);
-                                        break;
- 
-                                default:
-                                        error("fatal error in %s at line %d: %s",
-                                                current_filename? current_filename:
-"???",
-                                                yylineno, error_label);
-                                        YYERROR;
-                        }
-                }
-
-*/
-
-/******************* SNMP security (5-13-96) *********/
-
-
-
-
-/**********/
-/* macros */
-/**********/
-
-macros :	t_macros t_equal t_openbracket macros_list t_closebracket
-		{
-			DEBUG_YACC("macros")
-		}
-		| t_macros t_equal t_openbracket error t_closebracket
-		{ error("BUG at line %d: macro-parsing error", yylineno); 
-			parsing_oid = False;
-			if(static_label != NULL) free(static_label);
-			static_label = NULL;
-			if(static_subids != NULL) free(static_subids);
-			static_subids = NULL;
-			static_len = 0;
-		}
-
-
-macros_list :	/* empty */ | macros_list macro_item
-		{
-			DEBUG_YACC("macros_list")
-		}
-
-
-macro_item :	label t_equal
-		{
-			if(parsing_oid != False)
-			{
-				error("BUG at line %d: parsing_oid not False in macro_item", yylineno);
-			}
-			parsing_oid = True;
-
-			if(static_subids != NULL)
-			{
-				error("BUG at line %d: static_subids not NULL in macro_item", yylineno);
-			}
-			if(static_len != 0)
-			{
-				error("BUG at line %d: static_len not 0 in macro_item", yylineno);
-			}
-		}
-		subids_list
-		{
-			DEBUG_YACC("macro_item")
-	
-			if(macro_add(static_label, static_subids, static_len) == NULL)
-			{
-				error("error at line %d", yylineno);
-				YYERROR;
-			}
-
-			parsing_oid = False;
-			free(static_label);
-			static_label = NULL;
-			free(static_subids);
-			static_subids = NULL;
-			static_len = 0;
-		}
-
-
-label :		t_identifier
-		{
-			DEBUG_YACC("label")
-
-			if(static_label != NULL)
-			{
-				error("BUG at line %d: static_label not NULL in label", yylineno);
-			}
-			static_label = strdup(yytext);
-			if(static_label == NULL)
-			{
-				error("malloc() failed");
-				YYERROR;
-			}
-		}
-
-/************/
-/* environment */
-/************/
-
-environment:	/*empty*/ | t_environment t_equal t_openbracket environment_list 
-		t_closebracket
-		{
-			DEBUG_YACC("environment")
-		}
-
-environment_list: /* empty */ | environment_list environment_item
-		{
-			DEBUG_YACC("environment_list")
-		}
-
-environment_item: 	poll_interval | max_agent_time_out
-		{
-			DEBUG_YACC("environment_item")
-		}
-
-poll_interval:	t_poll_interval t_equal NUMBER
-		{
-			DEBUG_YACC("poll_interval")
-			relay_agent_poll_interval = token_value;
-		}
-
-max_agent_time_out:	t_max_agent_time_out t_equal NUMBER
-		{
-			DEBUG_YACC("max_agent_time_out")
-			relay_agent_max_agent_time_out = token_value;
-		}
-			
-
-/***********/
-/* resouces */
-/************/
-
-resources:	/*empty*/ | t_resource t_equal t_openbracket resources_list t_closebracket
-		{
-			DEBUG_YACC("resources")
-		}
-
-resources_list:	/*empty*/ | resources_list resource_item
-			{
-				DEBUG_YACC("resources_list")
-			}
-resource_item:	t_openbracket
-		{
-		  if(static_res != NULL)
-			error("BUG at line%d: static_res not NULL",yylineno);
-		  static_res = malloc(sizeof(SapResource));
-		  if(static_res == NULL)
-		  {
-			error("malloc() failed");
-			YYERROR;
-		  }
-		  memset(static_res,0,sizeof(SapResource));
-		}
-		fileslist policy res_type user start_cmd t_closebracket
-		{
-			DEBUG_YACC("agent_item")
-		   if(res_parsing_state == RES_PARSING_STATE_RE_READ){
-			if(reconfig_first_res == NULL)
-			{
-				static_res->next_res = NULL;
-			}
-			else
-			{
-				static_res->next_res = reconfig_first_res;
-			}
-			reconfig_first_res = static_res;
-		   }else{
-			if(first_res == NULL)
-			{
-				static_res->next_res = NULL;
-			}
-			else
-			{
-				static_res->next_res = first_res;
-			}
-			first_res = static_res;
-		  }
-		  static_res = NULL;
-		}
-		| t_openbracket error t_closebracket
-		{ 
-			error("BUG at line %d: resource stmt error",yylineno);
-		   if(static_res != NULL){
-			if(static_res->dir_file != NULL)
-				free(static_res->dir_file);
-			if(static_res->personal_file != NULL)
-				free(static_res->personal_file);
-			if(static_res->sec_file != NULL)
-				free(static_res->sec_file);
-			if(static_res->policy != NULL)
-				free(static_res->policy);
-			if(static_res->type != NULL)
-				free(static_res->type);
-			if(static_res->start_cmd != NULL)
-				free(static_res->start_cmd);
-			free(static_res);
-		   }
-			static_res = NULL;
-		}
-	
-
-fileslist:	file_item | fileslist file_item
-		{
-			DEBUG_YACC("fileslist");
-		}
-file_item:	personal_file | sec_file | directory_file
-		{
-			DEBUG_YACC("file_item");
-		}
-
-personal_file:	t_registration_file t_equal t_quotedstring
-		{
-		  DEBUG_YACC("personal_file")
-		  if(static_res->personal_file != NULL) 
-			error("BUG at line %d: static_res->personal_file not NULL ",yylineno);
-		  static_res->personal_file = strdup(quoted_string);
-		  if(static_res->personal_file == NULL){
-			error("malloc() failed");
-			YYERROR;
-		  }			
-		}
-sec_file:	t_sec_fname t_equal t_quotedstring
-		{
-		  DEBUG_YACC("sec_file")
-		  if(static_res->sec_file != NULL) 
-			error("BUG at line %d: static_res->sec_file not NULL ",yylineno);
-		  static_res->sec_file = strdup(quoted_string);
-		  if(static_res->sec_file == NULL){
-			error("malloc() failed");
-			YYERROR;
-		  }			
-		}
-
-directory_file:	t_dir_fname t_equal t_quotedstring
-		{
-		  DEBUG_YACC("directory_file")
-		  if(static_res->dir_file != NULL) 
-			error("BUG at line %d: static_res->dir_file not NULL ",yylineno);
-		  static_res->dir_file = strdup(quoted_string);
-		  if(static_res->dir_file == NULL){
-			error("malloc() failed");
-			YYERROR;
-		  }			
-		}
-
-policy: 	/*empty*/ | t_policy t_equal t_quotedstring
-		{
-		  DEBUG_YACC("policy")
-		  if(static_res->policy != NULL) 
-			error("BUG at line %d: static_res->policy not NULL ",yylineno);
-		  static_res->policy = strdup(quoted_string);
-		  if(static_res->policy == NULL){
-			error("malloc() failed");
-			YYERROR;
-		  }
-		}
-
-
-user: 	/*empty*/ | t_user t_equal t_quotedstring
-		{
-		  DEBUG_YACC("user")
-		  if(static_res->user != NULL) 
-			error("BUG at line %d: static_res->user not NULL ",yylineno);
-		  static_res->user = strdup(quoted_string);
-		  if(static_res->user == NULL){
-			error("malloc() failed");
-			YYERROR;
-		  }
-		}
-
-res_type: 	/*empty*/ | t_res_type t_equal t_quotedstring
-		{
-		  DEBUG_YACC("res_type")
-		  if(static_res->type != NULL) 
-			error("BUG at line %d: static_res->type not NULL ",yylineno);
-		  static_res->type = strdup(quoted_string);
-		  if(static_res->type == NULL){
-			error("malloc() failed");
-			YYERROR;
-		  }
-		}
-
-
-
-start_cmd:	t_command t_equal t_quotedstring
-		{
-		  DEBUG_YACC("start_cmd")
-		  if(static_res->start_cmd != NULL) 
-			error("BUG at line %d: static_res->start_cmd not NULL ",yylineno);
-		  static_res->start_cmd = strdup(quoted_string);
-		  if(static_res->start_cmd == NULL){
-			error("malloc() failed");
-			YYERROR;
-		  }			
-		}
-
-t_resource:	RESOURCE
-		{
-			DEBUG_YACC("t_resource");
-		}
-
-t_registration_file:	REGISTRATION_FILE
-		{
-			DEBUG_YACC("t_registration_file");
-		}
-
-t_sec_fname:	SECURITY
-		{
-			DEBUG_YACC("t_sec_file");
-		}
-
-t_dir_fname:	DIRECTORY
-		{
-			DEBUG_YACC("t_dir_fname");
-		}
-
-t_policy:	POLICY
-		{
-			DEBUG_YACC("t_policy");
-		}
-
-t_res_type:	TYPE
-		{
-			DEBUG_YACC("t_res_type");
-		}
-
-t_user:		USER
-		{
-			DEBUG_YACC("t_user");
-		}
-
-t_command:	COMMAND
-		{
-			DEBUG_YACC("t_command");
-		}
-
-/**********/
-/* agents */
-/**********/
-
-agents :	t_agents t_equal t_openbracket agents_list t_closebracket
-		{
-			DEBUG_YACC("agents")
-		}
-
-
-agents_list :	/*empty */ | agents_list agent_item
-		{
-			DEBUG_YACC("agents_list")
-		}
-
-
-agent_item :		t_openbracket
-		{
-			if(static_agent != NULL)
-			{
-				error("BUG at line %d: static_agent not NULL in agent", yylineno);
-			}
-			static_agent = malloc(sizeof(Agent));
-			if(static_agent == NULL)
-			{
-				error("malloc() failed");
-				YYERROR;
-			}
-			memset(static_agent, 0, sizeof(Agent));
-			static_agent->agentID = sap_agent_id++;
-			/* Bug fix 4145620 - The subagents listen on the loopback driver */
-			static_agent->address.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
-			static_agent->agentStatus = SSA_OPER_STATUS_INIT;
-		}
-		name subtrees_tables timeout optional_watch_dog_time optional_port t_closebracket
-		{
-			DEBUG_YACC("agent_item");
-
-			if(first_agent == NULL)
-			{
-				static_agent->next_agent = NULL;
-			}
-			else
-			{
-				static_agent->next_agent = first_agent;
-			}
-			first_agent = static_agent;
-			static_agent = NULL;
-		}
-		| t_openbracket error t_closebracket
-		{ 
-			error("BUG at line %d: agent statement error",yylineno);
-			if(static_agent != NULL){ 
-				delete_all_subtree_from_agent(static_agent);
-				delete_all_tables_for_agent(static_agent);
-				if(static_agent->agentName.chars != NULL){
-				  free(static_agent->agentName.chars);
-				  static_agent->agentName.chars = NULL;
-				}
-				static_agent->agentName.len = 0;
-				if(static_agent->name != NULL){
-					free(static_agent->name);
-					static_agent->name = NULL;
-				}
-				free(static_agent);
-				static_agent = NULL;
-			}
-			/* clean up */
-		}
-
-
-name :		t_name t_equal t_quotedstring
-		{
-			DEBUG_YACC("name")
-
-			if(static_agent->name != NULL)
-			{
-				error("BUG at line %d: static_agent->name not NULL in name", yylineno);
-			}
-			static_agent->name = strdup(quoted_string);
-			(static_agent->agentName).chars = 
-				(u_char*)strdup(static_agent->name);
-			(static_agent->agentName).len = strlen(static_agent->name);
-
-			if(static_agent->name == NULL)
-			{
-				error("malloc() failed");
-				YYERROR;
-			}
-		}
-
-
-subtrees_tables :  subtrees tables | subtrees | tables
-		{
-			DEBUG_YACC("subtrees_tables")
-		}
-
-
-subtrees :	t_subtrees t_equal t_openbracket
-		{
-			if(parsing_oid != False)
-			{
-				error("BUG at line %d: parsing_oid is not False in subtrees", yylineno);
-			}
-			parsing_oid = True;
-
-			if(static_subids != NULL)
-			{
-				error("BUG at line %d: static_subids not NULL in subtrees", yylineno);
-			}
-			if(static_len != 0)
-			{
-				error("BUG at line %d: static_len not 0 in subtrees", yylineno);
-			}
-		}
-		subtrees_list t_closebracket
-		{
-			DEBUG_YACC("subtrees")
-
-			if(parsing_oid != True)
-			{
-				error("BUG at line %d: parsing_oid is not True in subtrees", yylineno);
-			}
-			parsing_oid = False;
-		}
-
-
-subtrees_list : /* empty */ | subtrees_list_comma_separated
-		{
-			DEBUG_YACC("subtrees_list")
-		}
-
-
-subtrees_list_comma_separated : subtree_item | subtrees_list_comma_separated t_comma subtree_item
-		{
-			DEBUG_YACC("subtrees_list_comma_separated")
-		}
-
-
-subtree_item : subids_list
-		{
-			Subtree *sp;
-
-
-			DEBUG_YACC("subtree_item")
-
-			if(parsing_oid != True)
-			{
-				error("BUG at line %d: parsing_oid is not True in subtree_item", yylineno);
-			}
-
-			if(subtree_add(static_agent, static_subids, static_len,NULL) == -1)
-			{
-				error("error at line %d", yylineno);
-				YYERROR;
-			}
-	
-			/* add the mirror table(mibpatch) */
-			/* assume that the subtree is the first agent
-			   subtree */
-			sp = static_agent->first_agent_subtree;
-			create_mirror_table_from_subtree(sp);
-
-			free(static_subids);
-			static_subids = NULL;
-			static_len = 0;
-			found_comma = FALSE;
-		}
-
-
-tables :	t_tables t_equal t_openbracket tables_list t_closebracket
-		{
-			DEBUG_YACC("tables")
-		}
-
-
-tables_list :	/* empty */ | tables_list table_item
-		{
-			DEBUG_YACC("tables_list")
-		}
-
-
-table_item :	t_openbracket
-		{
-			if(static_agent == NULL)
-			{
-				error("BUG at line %d: static_agent is NULL in table_item", yylineno);
-			}
-
-			if(static_table)
-			{
-				error("BUG at line %d: static_table not NULL in table_item", yylineno);
-			}
-
-			static_table = calloc(1,sizeof(Table));
-			if(static_table == NULL)
-			{
-				error("malloc() failed");
-				YYERROR;
-			}
-			static_table->regTblStatus = SSA_OPER_STATUS_ACTIVE;
-			static_table->next_table = NULL;
-			static_table->agent = static_agent;
-			static_table->regTblAgentID = static_agent->agentID;
-			static_table->regTblIndex = ++static_agent->agentTblIndex;
-			static_table->name.subids = NULL;
-			static_table->name.len = 0;
-			static_table->first_column_subid = 0;
-			static_table->last_column_subid = 0;
-/*
-			static_table->indexs.subids = NULL;
-			static_table->indexs.len = 0;
-*/
-		}
-		table columns indexs t_closebracket
-		{
-			DEBUG_YACC("table_item")
-
-			if(static_table == NULL)
-			{
-				error("BUG at line %d: static_table is NULL in table_item", yylineno);
-			}else{
-			  /* check for the validation of the table,
-		  	   * if insertion is ok, then put it into the 
-			   * table lists
-			   */
-			
-			  if(single_table_to_subtrees(TABLE_TO_OID_TRY,
-			    static_table,error_label) == -1){
-				/* may need more elaboration in error */
-				error("Table %d insertion failed",
-				(static_table->name.subids)?
-				SSAOidString(&(static_table->name)):"");
-				table_free(static_table);
-			  }
-			  if(single_table_to_subtrees(TABLE_TO_OID_GO,
-			    static_table,error_label) != -1){
-
-				if(first_table==NULL){
-				  first_table =static_table;
-				}else{
-				  for(tmp_table=first_table;tmp_table;
-				      tmp_table=tmp_table->next_table)
-					last_table = tmp_table;
-				  last_table->next_table = static_table;
-				}
-			  }
-			}
-			static_table = NULL;
-		}
-
-
-table :		t_table t_equal
-		{
-			if(parsing_oid != False)
-			{
-				error("BUG at line %d: parsing_oid is not False in tables", yylineno);
-			}
-
-			parsing_oid = True;
-		}
-		subids_list
-		{
-			DEBUG_YACC("table")
-
-			if(parsing_oid != True)
-			{
-				error("BUG at line %d: parsing_oid is not True in tables", yylineno);
-			}
-			parsing_oid = False;
-
-			if(static_table == NULL)
-			{
-				error_exit("BUG at line %d: static_table is NULL in table", yylineno);
-			}
-
-			static_table->name.subids = static_subids;
-			static_subids = NULL;
-			static_table->name.len = static_len;
-			static_len = 0;
-		}
-
-
-columns :	t_columns t_equal range
-		{
-			DEBUG_YACC("columns")
-
-			if(static_table == NULL)
-			{
-				error_exit("BUG at line %d: static_table is NULL in columns", yylineno);
-			}
-
-			static_table->first_column_subid = static_inf_value;
-			static_inf_value = -1;
-			static_table->last_column_subid = static_sup_value;
-			static_sup_value = -1;
-		}
-
-
-/*
-indexs :	t_indexs t_equal
-		{
-			if(parsing_oid != False)
-			{
-				error("BUG at line %d: parsing_oid is not False in indexs", yylineno);
-			}
-
-			parsing_oid = True;
-		}
-		subids_list
-		{
-			DEBUG_YACC("indexs")
-
-			if(parsing_oid != True)
-			{
-				error("BUG at line %d: parsing_oid is not True in indexs", yylineno);
-			}
-			parsing_oid = False;
-
-			if(static_table == NULL)
-			{
-				error_exit("BUG at line %d: static_table is NULL in indexs", yylineno);
-			}
-
-			static_table->indexs.subids = static_subids;
-			static_subids = NULL;
-			static_table->indexs.len = static_len;
-			static_len = 0;
-		}
-*/
-
-indexs :	t_indexs t_equal range
-		{
-			DEBUG_YACC("indexs")
-
-			if(static_inf_value == -1)
-			{
-				error("BUG at line %d: static_inf_value is -1", yylineno);
-			}
-			if(static_sup_value == -1)
-			{
-				error("BUG at line %d: static_sup_value is -1", yylineno);
-			}
-			static_table->first_index_subid = static_inf_value;
-			static_table->last_index_subid = static_sup_value;
-			static_inf_value = -1;
-			static_sup_value = -1;
-		}
-
-
-range :		t_opensquarebracket t_number
-		{
-			if(static_inf_value != -1)
-			{
-				error("BUG at line %d: static_inf_value (%d) is not -1 in range",
-					yylineno,
-					static_inf_value);
-			}
-
-			static_inf_value = token_value;
-		}
-		t_minus t_number
-		{
-			if(static_sup_value != -1)
-			{
-				error("BUG at line %d: static_sup_value (%d) is not -1 in range",
-					yylineno,
-					static_inf_value);
-			}
-
-			static_sup_value = token_value;
-		}
-		t_closesquarebracket
-		{
-			DEBUG_YACC("range")
-		}
-		| t_number
-		{
-			if(static_inf_value != -1)
-			{
-				error("BUG at line %d: static_inf_value (%d) is not -1 in range",
-					yylineno,
-					static_inf_value);
-			}
-			if(static_sup_value != -1)
-			{
-				error("BUG at line %d: static_sup_value (%d) is not -1 in range",
-					yylineno,
-					static_sup_value);
-			}
-
-			static_inf_value = token_value;
-			static_sup_value = token_value;
-		}
-
-
-timeout :	t_timeout t_equal t_number
-		{
-			DEBUG_YACC("subtree")
-
-			static_agent->agentTimeOut =static_agent->timeout = token_value;
-		}
-
-optional_watch_dog_time : /*empty*/ |	t_watch_dog_time t_equal NUMBER
-		{
-			DEBUG_YACC("optional_watch_dog_time")
-			static_agent->agentWatchDogTime = token_value;
-		}
-
-
-optional_port : /*empty*/ | port
-	{
-		DEBUG_YACC("optional_port")
-	}
-
-port :		t_port t_equal t_number
-		{
-			DEBUG_YACC("port")
-
-			if(token_value > 0xFFFF)
-			{
-				error("error at line %d: the port number (%d) should not be greater than %d", yylineno, token_value, 0xFFFF);
-				YYERROR;
-			}
-
-			static_agent->address.sin_port = (short) token_value;
-			static_agent->agentPortNumber = 
-				static_agent->address.sin_port;
-
-			if(agent_find(&(static_agent->address)))
-			{
-				error("error at line %d: the port number %d is already used by another agent", yylineno, token_value);
-				YYERROR;
-			}
-		}
-
-
-
-/***************/
-/* subids_list */
-/***************/
-
-subids_list :	subid | subids_list t_dot subid
-		{
-			DEBUG_YACC("subids_list")
-                        found_dot = FALSE;
-		}
-
-
-subid :		t_mib2 | t_sun | t_enterprise | t_identifier | t_number
-		{
-			DEBUG_YACC("subid")
-		}
-
-
-
-/*******************/
-/* terminal tokens */
-/*******************/
-
-/**************** SNMP security (5-13-96) ***/
-ct_identifier : IDENTIFIER
-		{
-			DEBUG_YACC("ct_indentifier")
-/*             
-                        if(save_string == NULL)
-                        {
-                           error("malloc() failed");
-                           YYERROR;
-                        }
-*/
-                        save_string = strdup(yytext);
-
-
-		}
-
-t_communities : COMMUNITIES
-                {
-                        DEBUG_YACC("t_communities")
-                }
-
-t_hosts : HOSTS
-        {
-                DEBUG_YACC("t_hosts")
-        }
-
-t_acls	: ACL
-	{
-		DEBUG_YACC("t_acls")
-	}
-
-t_access : ACCESS 
-        {
-                DEBUG_YACC("t_access") 
-        } 
-
-
-t_readonly :    READONLY
-                {
-                        DEBUG_YACC("t_readonly")
-
-                        community_type = READ_ONLY;
-                }
-
-t_readwrite :   READWRITE
-                {
-                        DEBUG_YACC("t_readwrite")
-
-                        community_type = READ_WRITE;
-                }
-
-t_managers :    MANAGERS
-                {
-                        DEBUG_YACC("t_managers")
-                }
-
-t_trap :        TRAP
-                {
-                        DEBUG_YACC("t_trap")
-                }
- 
-t_trap_num:     TRAPNUM
-                {
-                        DEBUG_YACC("t_trap_num")
-                }
-
-t_trapcommunity : TRAPCOMMUNITY
-                {
-                        DEBUG_YACC("t_trapcommunity")
-                }
-
-
-/*
-t_trapdestinators : TRAPDESTINATORS
-                {
-                        DEBUG_YACC("t_trapdestinators")
-                }
-
-list_separator :  | t_comma
-                {
-                        DEBUG_YACC("list_separator")
-                }
-*/
-
-
-/**************** SNMP security (5-13-96) ***/
-
-
-t_number :	NUMBER
-		{
-			DEBUG_YACC("t_number")
-
-			if(parsing_oid == True)
-			{
-				if(subids_cat((Subid *) &token_value, 1) == -1)
-				{
-					YYERROR;
-				}
-			}
-		}
-
-
-t_macros :	MACROS
-		{
-			DEBUG_YACC("t_macros")
-		}
-
-
-t_equal :	EQUAL
-		{
-			DEBUG_YACC("t_equal")
-		}
-
-
-t_minus :	MINUS
-		{
-			DEBUG_YACC("t_minus")
-		}
-
-
-t_openbracket :	OPENBRACKET
-		{
-			DEBUG_YACC("t_openbracket")
-		}
-
-
-t_closebracket : CLOSEBRACKET
-		{
-			DEBUG_YACC("t_closebracket")
-		}
-
-
-t_opensquarebracket : OPENSQUAREBRACKET
-		{
-			DEBUG_YACC("t_opensquarebracket")
-		}
-
-
-t_closesquarebracket : CLOSESQUAREBRACKET
-		{
-			DEBUG_YACC("t_closesquarebracket")
-		}
-
-
-t_identifier :	IDENTIFIER
-		{
-			DEBUG_YACC("t_identifier")
-
-			if(parsing_oid == True)
-			{
-				Macro *mp;
-
-
-				mp = macro_find(yytext);
-				if(mp == NULL)
-				{
-					error("error at line %d: %s is not a macro", yylineno, yytext);
-					YYERROR;
-				}
-
-				if(subids_cat(mp->name.subids, mp->name.len) == -1)
-				{
-					YYERROR;	
-				}
-			}
-		}
-
-
-t_mib2 :	MIB2
-		{
-			DEBUG_YACC("t_mib2")
-
-			if(parsing_oid == False)
-			{
-				error("BUG at line %d: parsing_oid not True in t_mib2", yylineno);
-			}
-			if(subids_cat(subids_mib2, mib2_len) == -1)
-			{
-				YYERROR;
-			}
-		}
-
-
-t_sun :		SUN
-		{
-			DEBUG_YACC("t_sun")
-
-			if(parsing_oid == False)
-			{
-				error("BUG at line %d: parsing_oid not True in t_sun", yylineno);
-			}
-			if(subids_cat(subids_sun, sun_len) == -1)
-			{
-				YYERROR;
-			}
-		}
-
-
-t_enterprise :	ENTERPRISE
-		{
-			DEBUG_YACC("t_enterprise")
-
-			if(parsing_oid == False)
-			{
-				error("BUG at line %d: parsing_oid not True in t_enterprise", yylineno);
-			}
-			if(subids_cat(subids_enterprise, enterprise_len) == -1)
-			{
-				YYERROR;
-			}
-		}
-
-t_dot :		DOT
-		{
-			DEBUG_YACC("t_dot")
-                        found_dot=TRUE;
-		}
-
-
-t_agents :	AGENTS
-		{
-			DEBUG_YACC("t_agents")
-		}
-
-
-t_name :	NAME
-		{
-			DEBUG_YACC("t_name")
-		}
-
-
-t_subtrees :	SUBTREES
-		{
-			DEBUG_YACC("t_subtrees")
-		}
-
-
-t_tables :	TABLES
-		{
-			DEBUG_YACC("t_tables")
-		}
-
-
-t_table :	TABLE
-		{
-			DEBUG_YACC("t_table")
-		}
-
-
-t_columns :	COLUMNS
-		{
-			DEBUG_YACC("t_columns")
-		}
-
-
-t_indexs :	INDEXS
-		{
-			DEBUG_YACC("t_indexs")
-		}
-
-
-t_timeout :	TIMEOUT
-		{
-			DEBUG_YACC("t_timeout")
-		}
-
-t_environment:	ENVIRONMENT
-		{
-			DEBUG_YACC("t_environment")
-		}
-
-t_watch_dog_time :	WATCHDOGTIME
-		{
-			DEBUG_YACC("t_watch_dog_time")
-		}
-
-t_poll_interval: 	POLLINTERVAL
-		{
-			DEBUG_YACC("t_poll_interval")
-		}
-
-t_max_agent_time_out:	MAXAGENTTIMEOUT
-		{
-			DEBUG_YACC("t_max_agent_time_out")
-		}
-
-
-t_port :	PORT
-		{
-			DEBUG_YACC("t_port")
-		}
-
-
-t_quotedstring : QUOTEDSTRING
-		{
-			DEBUG_YACC("t_quotedstring\n")
-		}
-
-
-t_comma :	COMMA
-		{
-			DEBUG_YACC("t_comma")
-                        found_comma=TRUE;
-		}
-%%
-
-#include "config.lex.c"
-
-/****************************************************************/
-
-static int subids_cat(Subid *subids, int len)
-{
-	Subid *new_subids;
-	int new_len;
-
-
-	new_len = static_len + len;
-	new_subids = (Subid *) malloc(new_len * sizeof(Subid));
-	if(new_subids == NULL)
-	{
-		error("malloc() failed");
-		if(static_subids)
-		{
-			free(static_subids);
-		}
-		static_subids = NULL;
-		static_len = 0;
-		return -1;
-	}
-	memcpy(new_subids, static_subids, static_len * sizeof(Subid));
-	memcpy(&(new_subids[static_len]), subids, len * sizeof(Subid));
-
-
-	if(static_subids)
-	{
-		free(static_subids);
-	}
-	static_subids = new_subids;
-	static_len = new_len;
-
-	return 0;
-}
-
-
-/****************************************************************/
-
-static Macro *macro_add(char *label, Subid *subids, int len)
-{
-	Macro *new;
-
-
-	if(macro_find(label) != NULL)
-	{
-		error("%s is already a macro", label);
-		return NULL;
-	}
-
-	new = (Macro *) malloc(sizeof(Macro));
-	if(new == NULL)
-	{
-		error("malloc() failed");
-		return NULL;
-	}
-	new->label = NULL;
-	new->name.subids = NULL;
-
-	new->label = strdup(label);
-	if(new->label == NULL)
-	{
-		error("malloc() failed");
-		macro_free(new);
-		return NULL;
-	}
-	new->name.subids = (Subid *) malloc(len * sizeof(Subid));
-	if(new->name.subids == NULL)
-	{
-		error("malloc() failed");
-		macro_free(new);
-		return NULL;
-	}
-	memcpy(new->name.subids, subids, len * sizeof(Subid));
-	new->name.len = len;
-	new->next_macro = first_macro;
-	first_macro = new;
-
-	return new;
-}
-
-
-/****************************************************************/
-
-static Macro *macro_find(char *label)
-{
-	Macro *mp;
-
-
-	for(mp = first_macro; mp; mp = mp->next_macro)
-	{
-		if(strcmp(mp->label, label) == 0)
-		{
-			return mp;
-		}
-	}
-
-	return NULL;
-}
-
-
-/****************************************************************/
-
-static void macro_free(Macro *mp)
-{
-	if(mp == NULL)
-	{
-		return;
-	}
-
-	if(mp->label)
-	{
-		free(mp->label);
-	}
-
-	if(mp->name.subids)
-	{
-		free(mp->name.subids);
-	}
-
-	free(mp);
-
-	return;
-}
-
-
-/****************************************************************/
-
-static void macro_list_delete()
-{
-	Macro *mp = first_macro;
-	Macro *next;
-
-
-	while(mp)
-	{
-		next = mp->next_macro;
-
-		macro_free(mp);
-
-		mp = next;
-	}
-
-	first_macro = NULL;
-
-	return;
-}
-
-
-/****************************************************************/
-
-static void trace_macros()
-{
-	Macro *mp;
-
-
-	trace("MACROS:\n");
-	for(mp = first_macro; mp; mp = mp->next_macro)
-	{
-		trace("\t%-30s %-30s\n",
-			mp->label,
-			SSAOidString(&(mp->name)));
-	}
-	trace("\n");
-}
-
-
-/****************************************************************/
-
-int yyerror(char *s)
-{
-	error("%s at line %d: %s", s, yylineno, yytext);
-	return (0);
-}
-
-
-/****************************************************************/
-
-/*
- * filename is the file to be read
- * file_time is the modified time of the file, this argument can be NULL
- */
-int parsing_file(char* filename,time_t *file_time)
-{
-  struct stat statb;
-  int fd;
-  char *fileaddr;
-  int error_free = TRUE;
-
-  yylineno = 1;
-  if((fd = open(filename, O_RDONLY)) < 0)
-  {
-	error(ERR_MSG_OPEN, filename, errno_string());
-	error_free = FALSE;
-	return (error_free);
-  }
-
-  /* 
-   * get the size of the file
-   */
-  if(fstat(fd, &statb) < 0 )
-  {
-	error(ERR_MSG_FSTAT, filename, errno_string());
-	error_free = FALSE;
-	return(error_free);
-   }
-
-  if(S_ISREG(statb.st_mode)==0)
-  {
-	error(" parsing file error: %s is not a file\n",filename);
-	error_free = FALSE;
-	return(error_free);
-   }
-
-   /* file time stamp */
-   if(file_time) *file_time = statb.st_mtime;
-
-   /* 
-    * and map it into my address space
-    */
-   if(statb.st_size)
-   {
-	if((fileaddr = (char *) mmap(0, statb.st_size, PROT_READ|PROT_WRITE,
-				MAP_PRIVATE, fd, 0)) <= (char *) 0)
-	{
-		error(ERR_MSG_MMAP, filename, errno_string());
-		error_free = FALSE;
-		return(error_free);
-	}
-
-	/*
-	 * set current lex focus on the file
-	 */
-
-	lexinput = fileaddr;
-
-	/*
-	 * and parse the file
-	 */
-
-	if(yyparse() == 1)
-	{
-		error("parsing %s failed", filename);
-		error_free = FALSE;
-	}
-
-	/*
-	 * Parsing is finished
-	 *
-	 * unmap the file and close it
-	 */
-
-	if(munmap(fileaddr, statb.st_size) == -1)
-	{
-		error(ERR_MSG_MUNMAP, errno_string());
-	}
-  } else {
-	/* empty file, ignore it */
-	error("empty configuration file %s", filename);
-	error_free = FALSE;
-  }
-
-  if(close(fd) == -1)
-  {
-	error(ERR_MSG_CLOSE, errno_string());
-  }
-
-  return(error_free);
-}
-
-
-int personal_file_reading(char* dirname, char* filename, time_t *file_time)
-{
-
-  static char file[100];
-  int error_free;
-
-	file[0] = '\0';
-	if(dirname != NULL)
-		sprintf(file, "%s/%s", dirname, filename);
-	else
-		sprintf(file, "%s", filename);
-
-        error_free = parsing_file(file,file_time);
-	macro_list_delete();
-	return(error_free);
-}
-
-/* If we have a serious problem, this function will	*/
-/* terminate (<==> exit) the program			*/
-/* now it won't call error_exit, call error only and
-   return FALSE */
-
-int config_init(char *dirname)
-{
-	DIR *dirp;
-	struct dirent *direntp;
-	int error_free = TRUE;
-	struct stat statbuf;
-
-
-	dirp = opendir(dirname);
-	if(dirp == NULL)
-	{
-		error(ERR_MSG_OPENDIR,
-			dirname, errno_string());
-		error_free = FALSE;
-		return error_free;
-	}
-
-	if(stat(dirname,&statbuf)>=0 &&
-	   S_ISDIR(statbuf.st_mode)==0)
-	{
-		error(ERR_MSG_OPENDIR,
-			dirname, errno_string());
-		error_free = FALSE;
-		return error_free;
-	}
-
-	while((direntp = readdir(dirp)) != NULL)
-	{
-
-
-		if(strcmp(direntp->d_name,SNMPRELAY_REG_FILE))
-			continue;
-
-		sprintf(config_file_4_res, "%s/%s", dirname, direntp->d_name);
-	
-		if(parsing_file(config_file_4_res,NULL) == FALSE){
-		  error_free = FALSE;
-		  continue;
-		}
-
-		macro_list_delete();
-
-		config_file_4_res[0] = '\0';
-	}
-
-	if(closedir(dirp) == -1)
-	{
-		error(ERR_MSG_CLOSEDIR, dirname, errno_string());
-	}
-
-/*
-	if(tables_to_subtrees(error_label))
-	{
-		error("tables_to_subtrees() failed: %s", error_label);
-		error_free = FALSE;
-	}
-	table_list_delete();
-*/
-
-
-	if(first_agent == NULL)
-	{
-		error("No SNMP agent configured");
-		error_free = FALSE;
-	}
-
-	if(trace_level > 0)
-	{
-		trace_subtrees();
-		trace_agents();
-	}
-	return(error_free);
-}
-
-
-
-/****************************************************************/
-/*
- * if pass is  TRY, see can we add all the subtrees of the table
- * if pass is GO, we really go ahead and add the subtrees
- */
-int single_table_to_subtrees(int pass,Table *tp, char* error_label)
-{
-  /* update the columnar object for the table */
-	Subtree *sp;
-	Subid one = 1;
-	Subid column;
-	Subid index;
-	TblTag *tbl_tag=NULL;
-
-
-	error_label[0] = '\0';
-
-	if(static_subids)
-	{
-		error("BUG: tables_to_subtrees(): static_subids not NULL");
-		free(static_subids);
-		static_subids = NULL;
-	}
-	if(static_len)
-	{
-		error("BUG: tables_to_subtrees(): static_len not 0");
-		static_len = 0;
-	}
-
-
-
-		for(index = tp->first_index_subid; index <= tp->last_index_subid; index++)
-		{
-			for(column = tp->first_column_subid; column <= tp->last_column_subid; column++)
-			{
-				if(pass == TABLE_TO_OID_GO){
-				  tbl_tag = (TblTag*)malloc(sizeof(TblTag));
-				  if(tbl_tag != NULL){
-				    tbl_tag->entry_index = tp->first_index_subid;
-				    tbl_tag->type = TBL_TAG_TYPE_LEAF;
-				    tbl_tag->table = tp;
-				  }
-				}
-				if(subids_cat(tp->name.subids, tp->name.len))
-				{
-					return -1;
-				}
-				if(subids_cat(&one, 1) == -1)
-				{
-					return -1;
-				}
-				if(subids_cat(&column, 1) == -1)
-				{
-					return -1;
-				}
-				if(subids_cat(&index, 1) == -1)
-				{
-					return -1;
-				}
-		
-				if(pass == TABLE_TO_OID_GO &&subtree_add(tp->agent, static_subids, static_len,tbl_tag) == -1)
-				{
-					sprintf(error_label, "subtree_add() failed for table %s for the agent %s",
-						SSAOidString(&(tp->name)),
-						tp->agent->name);
-					if(static_subids)
-					{
-						free(static_subids);
-					}
-					if(tbl_tag)
-						free(tbl_tag);
-					tbl_tag = NULL;
-					static_subids = NULL;
-					static_len = 0;
-					return -1;
-				}
-				if(pass == TABLE_TO_OID_TRY &&
-				   (sp=subtree_find(static_subids,static_len))
-				   != NULL){
-					return -1;
-				}
-
-				if(static_subids)
-				{
-					free(static_subids);
-				}
-				static_subids = NULL;
-				static_len = 0;
-				tbl_tag = NULL;
-			}
-		}
-
-
-	return 0;
-}
-
-/* This function translates the tables in subtrees	*/
-
-
-	
-/*********** SNMP security (5-13-96) ******/
-/* If we have a serious problem, this function will	*/
-/* terminate (<==> exit) the program			*/
-
-int sec_config_init(char *filename)
-{
-	int error_free = TRUE;
-	Manager *manager;
-
-
-	delete_manager_list();
-	delete_community_list();
-	if(trap_community)
-	{
-		free(trap_community);
-		trap_community = NULL;
-	}
-	delete_trap_destinator_list();
-
- 	error_free = parsing_file(filename,NULL);
-
-	if(trace_level > 0)
-	{
-		trace("\n");
-		trace_managers();
-		trace_filter();
-		trace_trap_destinators();
-	}
-
-	return(error_free);
-}
-
-int res_file_init(char *dirname,SapResource *sp)
-{
-	DIR *dirp;
-	struct dirent *direntp;
-	int error_free = TRUE;
-  	time_t file_time=0;
-
-
-	dirp = opendir(dirname);
-	if(dirp == NULL)
-	{
-		error(ERR_MSG_OPENDIR,
-			dirname, errno_string());
-		error_free = FALSE;
-		return error_free;
-	}
-
-	while((direntp = readdir(dirp)) != NULL)
-	{
-
-		int pos;
-
-		pos = strlen(direntp->d_name) - strlen(SNMPRESOURCE_SUFFIX);
-		if( (pos<0) ||
-		    strcmp(&(direntp->d_name[pos]),SNMPRESOURCE_SUFFIX))
-			continue;
-
-		sprintf(config_file_4_res, "%s/%s", dirname, direntp->d_name);
-	
-		if(parsing_file(config_file_4_res,&file_time) == FALSE){
-		  error_free = FALSE;
-		  continue;
-		}
-		if(sp!=NULL)
-			sp->rsrc_file_time = file_time;
-
-		config_file_4_res[0] = '\0';
-	}
-
-	if(closedir(dirp) == -1)
-	{
-		error(ERR_MSG_CLOSEDIR, dirname, errno_string());
-	}
-
-  return(error_free);
-}
-/*********** SNMP security (5-13-96) ******/
-
-void res_config_init(char *dirname)
-{
-	int error_free;
-   	SapResource *rp;
-
-	/* delete_resource_list() */
-
-	/* if recovery , delete all processes in the pid file */
-	read_pid_file(pid_file);
-
-	if(recovery_on == FALSE) kill_all_pid_rec_list();
-
-	/* MRF */
-	/* parsing the resource files in the default directory */
-	/* last_res_modify_time should be the largest one */
-	error_free = res_file_init(dirname,first_res);
-
-   	for(rp=first_res; rp ; rp=rp->next_res){
-		resource_handling(rp);
-	}
-	
-	read_acl();
-
-	if(recovery_on == TRUE) kill_part_pid_rec_list();
-
-	recovery_on = FALSE; /* recovery is done */
-	delete_pid_rec_list();
-
-	/* should update pid file */
-
-}
-
-int resource_update(char *dirname)
-{
-  time_t file_time;
-  int error_free = TRUE;
-
-	/* MRF: find out the largest latest time stamp of resource files */
-
-  /* mark the resouce element to be kept */
-  mark_all_resources_not_visit();
-  res_parsing_state = RES_PARSING_STATE_RE_READ;
-  reconfig_first_res = NULL;
-
-  delete_pid_rec_list();
-  read_pid_file(pid_file);
-
-	/* MRF: reading all resource file again */
-  /* parsing the resource file */
-  error_free = res_file_init(dirname,reconfig_first_res);
-
-  if(error_free==FALSE){
-	error("parsing error in reading the resouce file %s:%s",
-		dirname,error_label);
-	return FALSE;
-  }
-
-  merging_resource_list();
-
-  read_acl();
-
-  write_pid_file(pid_file);
-
-  res_parsing_state = RES_PARSING_STATE_FROM_SCRATCH;
-  
-  return TRUE;
-}
-
-int read_acl()
-{
-	SapResource * sp, * nextsp;
-	Agent *agent;
-	int error_free=TRUE;
-
-	sp = first_res;
-	while (sp) {
-		if (sp->agent && sp->agent->first_manager) {
-			agent_manager_list_free (sp->agent->first_manager);
-			sp->agent->first_manager = NULL;
-		}
-		sp = sp->next_res;
-	}
-	init_manager_set ();
-	sp = first_res;
-	while (sp) {
-		if (sp->sec_file) {
- 			error_free = parsing_file(sp->sec_file, NULL);
-
-			if(trace_level > 0)
-			{
-				trace("\n");
-				trace_agents();
-				trace_managers();
-				trace_filter();
-				trace_trap_destinators();
-			}
-
-			if (error_free) {
-				if (sp->agent)
-					sp->agent->first_manager = get_curr_manager_set();
-				init_manager_set ();
-			}
-
-		}
-		sp = sp->next_res;
-	}
-	return TRUE;
-}
-int read_agent_acl(SapResource * sp)
-{
-	Agent *agent;
-	int error_free=TRUE;
-
-	if (sp) {
-		if (sp->agent && sp->agent->first_manager) {
-			agent_manager_list_free (sp->agent->first_manager);
-			sp->agent->first_manager = NULL;
-		}
-	}
-	init_manager_set ();
-	if (sp) {
-		if (sp->sec_file) {
- 			error_free = parsing_file(sp->sec_file, NULL);
-
-			if(trace_level > 0)
-			{
-				trace("\n");
-				trace_agents();
-				trace_managers();
-				trace_filter();
-				trace_trap_destinators();
-			}
-
-			if (error_free) {
-				if (sp->agent)
-					sp->agent->first_manager = get_curr_manager_set();
-				init_manager_set ();
-			}
-
-		}
-	}
-	return TRUE;
-}
-
-int read_agent_files (Agent * ap)
-{
-	SapResource *sp, *firstguy, *next;
-	time_t file_time;
-
-	if (ap == NULL) {
-		return 1;
-	}
-	if (trace_level > 0)
-		trace ("read_agent_files() agent -%s- ipaddr %s timeout %d id %d status %d pid %d mgr %X\n",
-			ap->name ? ap->name : "NO NAME",
-			address_string (&(ap->address)),
-			ap->timeout, ap->agentID, ap->agentStatus,
-			ap->agentProcessID, ap->first_manager);
-	
-	if (ap->name == NULL || *(ap->name) == 0) {
-		return 1;
-	}
-	
-	/* find an existing SapResource - if found, update the acl
-	** for this agent
-	*/
-	sp = resource_find_by_name (ap->name);
-	if (sp) {
-		read_agent_acl (sp);
-		sp->agent = ap;
-		return 0;
-	}
-
-	firstguy = first_res;
-	first_res = NULL;
-	if (static_res) {
-		resource_free (static_res);
-	}
-	static_res = NULL;
-	/* see if the agent has a personal resource file - if found,
-	** create a new SapResource with this
-	** agentPersonalFile is the .reg file
-	** agentConfigFile is the .rsrc file
-	*/
-	res_parsing_state = RES_PARSING_STATE_FROM_SCRATCH;
-	if (ap->agentConfigFile.len) {
-		if (parsing_file((char *)(ap->agentConfigFile.chars),&file_time) == TRUE) {
-			first_res->next_res = firstguy;
-			first_res->agent = ap;
-			static_res = NULL;
-			return 0;
-		}
-	}
-
-	/* else, parse all the resource files in the default directory
-	** to find one whose agent name matches this one, and use it
-	*/
-	res_parsing_state = RES_PARSING_STATE_FROM_SCRATCH;
-	res_file_init (config_dir, NULL);
-	sp = first_res;
-	while (sp) {
-		if (sp->res_name && !strcmp (sp->res_name, ap->name))
-			break;
-		else if (sp->personal_file && ap->agentPersonalFile.chars && !strcmp (sp->personal_file, (char *) (ap->agentPersonalFile.chars)))
-			break;
-		else
-			sp = sp->next_res;
-	}
-	if (sp) {
-		resource_detach (sp);
-		sp->next_res = firstguy;
-		firstguy = sp;
-		firstguy->agent = ap;
-		if (firstguy->res_name == NULL)
-			firstguy->res_name = strdup (ap->name);
-	}
-
-	sp = first_res;
-	while (sp) {
-		next = sp->next_res;
-		resource_free (sp);
-		sp = next;
-	}
-	first_res = firstguy;
-	read_agent_acl (first_res);
-	return 0;
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/dispatcher.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,718 +0,0 @@
-/*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
-
-/***********************************************************
-	Copyright 1988, 1989 by Carnegie Mellon University
-
-                      All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of CMU not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-******************************************************************/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
-#include <errno.h>
-#include <syslog.h>
-#include <unistd.h>
-#include <signal.h>
-
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "signals.h"
-#include "snmp.h"
-#include "pdu.h"
-
-#include "snmprelay_msg.h"
-#include "agent.h"
-#include "subtree.h"
-#include "session.h"
-#include "config.h"
-#include "dispatcher.h"
-#include "res.h"
-
-#include "sea_i18n.h"
-
-/***** LOCAL CONSTANTS ******/
-
-/*
- *	select() will returned at least every
- *	POLL_INTERVAL seconds to test if some
- *	sessions have SNMP requests that have
- *	timeout (<==> the SNMP agnet has not
- *	responded)
- */
-
-#define POLL_INTERVAL		240
-
-
-/***** GLOBAL VARIABLES ******/
-
-IPAddress my_ip_address;
-
-int clients_sd = -1;	/* socket descriptor "connected" to SNMP application */
-int agents_sd = -1;	/* socket descriptor "connected" to SNMP agent */
-int trap_sd = -1; /* socket descriptor for receiving traps from agents */
-int relay_agent_trap_port = 162;
-
-char *relay_agent_name = NULL;
-char *sec_config_file ;
-char *pid_file;
-char *name_oid_file;
-
-int relay_agent_max_agent_time_out= 987654321;
-int relay_agent_poll_interval = POLL_INTERVAL;
-
-
-/*
- *	the name of the directory that
- *	contains the configuration files
- */
-
-char *config_dir = NULL;
-char *resource_file = NULL;
-
-/* There are two available modes to run the snmprelayd		*/
-/*	1) MODE_SPLIT: we send a request for each variable	*/
-/*	2) MODE_GROUP: we try to group the variables		*/
-int mode = MODE_GROUP;
-int recovery_on = FALSE;
-
-
-
-static int sighup = False;	/* if True, we received the SIGHUP signal */
-static int port = 0;	/* relay agent port */
-
-static char default_config_dir[] = "/etc/snmp/conf";
-static char default_resource_file[] = "/etc/snmp/conf/snmpdx.rsrc";
-static char default_error_file[] = "/var/snmp/snmpdx.log";
-static char default_relay_agent_name[] = "relay-agent";
-static char default_pid_file[] = "/var/snmp/snmpdx.st";
-static char default_name_oid_file[] = "/etc/snmp/conf/enterprises.oid";
-
-static void application_end();
-static void signals_sighup(int siq);
-static void signals_exit(int siq);
-static void signals_child(int siq);
-static void init_relay_agent();
-static void dispatcher_init();
-static void dispatcher_loop();
-static void print_usage();
-
-
-/*
- *	this function is called by error_exit()
- */
-static void
-application_end()
-{
-}
-
-
-static void
-signals_sighup(int siq)
-{
-	if(trace_level > 0)
-		trace("received signal %d\n\n", siq);
-
-	error(MSG_SIGHUP, siq);
-
-	sighup = True;
-}
-
-static void
-signals_exit(int sig)
-{
-	/*
-	 * SIGTERM is a normal exit, don't log it to console.
-	 */
-	if (sig != SIGTERM)
-		error_exit("received signal %d", sig);
-	else
-		syslog(LOG_INFO, "received signal %d\n", sig);
-
-	exit(sig);
-}
-
-
-static void
-init_relay_agent()
-{
-	/*
-	 * find agent matches the name, then modify
-	 * the process id, operstatus
-	 */
-
-	Agent *ap = agent_find_by_name(relay_agent_name);
-	if (ap == NULL)
-		return;
-
-	ap->agentProcessID = (int)getpid();
-	ap->agentStatus = SSA_OPER_STATUS_ACTIVE;
-	ap->first_manager = (struct _Manager *)get_curr_manager_set();
-	
-
-	if (port)
-		ap->agentPortNumber = port;
-	else if (ap->agentPortNumber)
-		port = ap->agentPortNumber;
-	else
-		port = ap->agentPortNumber = SNMP_PORT;
-
-	ap->address.sin_port = port;
-	/* init the subtrees of relay agent */
-	agent_update_subtree(ap);
-}
-
-static void
-dispatcher_init()
-{
-	struct sockaddr_in me;
-	socklen_t len;
-
-	/* init my_ip_address (we need it before parsing the config file) */
-
-	if(get_my_ip_address(&my_ip_address, error_label))
-		error_exit(ERR_MSG_MY_IP_ADDRESS,
-			error_label);
-
-	if(trace_level > 0)
-		trace("Local IP Addresss : %s\n\n",
-			inet_ntoa(my_ip_address));
-
-
-	/* init the config_dir pointer and then parse the configuration files */
-
-	if(config_dir == NULL)
-		config_dir = default_config_dir;
-
-	config_init(config_dir);
-
-	/* read enterprise name-oid file */
-	if(name_oid_file == NULL)
-		name_oid_file = default_name_oid_file;
-
-	load_enterprise_oid(name_oid_file);
-
-	/* set up the relay agent name */
-	if(sec_config_file == NULL)
-		sec_config_file = default_sec_config_file;
-
-	sec_config_init(sec_config_file);
-	if(relay_agent_name == NULL)
-		relay_agent_name = default_relay_agent_name;
-
-	init_relay_agent();
-
-	/* read the resource file */
-	if(resource_file == NULL)
-		resource_file = default_resource_file;
-	if(pid_file == NULL)
-		pid_file = default_pid_file;
-	write_pid_file1(pid_file);
-	res_config_init(config_dir);
-
-	/* init clients_sd and agents_sd */
-
-	clients_sd = socket(AF_INET, SOCK_DGRAM, 0);
-	if(clients_sd < 0)
-		error_exit(ERR_MSG_SOCKET, errno_string());
-
-	memset(&me, 0, sizeof(me));
-	me.sin_family = AF_INET;
-	me.sin_addr.s_addr = htonl(INADDR_ANY);
-	me.sin_port = htons(port);
-
-	if(trace_level > 0)
-		trace("Waiting for incoming SNMP requests on UDP port %d\n\n", port);
-
-	if (bind(clients_sd, (struct sockaddr *)&me, sizeof(me)) != 0)
-		error_exit(ERR_MSG_BIND, port, errno_string());
-
-	agents_sd = socket(AF_INET, SOCK_DGRAM, 0);
-	if (agents_sd < 0)
-		error_exit(ERR_MSG_SOCKET, errno_string());
-
-	me.sin_family = AF_INET;
-	me.sin_addr.s_addr = htonl(INADDR_ANY);
-	me.sin_port = htons(0);
-
-	if (bind(agents_sd, (struct sockaddr *)&me, sizeof(me)) != 0)
-		error_exit(ERR_MSG_BIND, 0, errno_string());
-
-	trap_sd = socket(AF_INET, SOCK_DGRAM, 0);
-	if (trap_sd < 0)
-		error_exit(ERR_MSG_SOCKET, errno_string());
-
-	me.sin_family = AF_INET;
-	me.sin_addr.s_addr = htonl(INADDR_ANY);
-	me.sin_port = htons(0);
-
-	if(bind(trap_sd, (struct sockaddr *)&me, sizeof(me)) != 0)
-		error_exit(ERR_MSG_BIND, 0, errno_string());
-
-
-	len = (socklen_t)sizeof(me);
-	if (getsockname(trap_sd, (struct sockaddr *)&me, &len) == -1)
-		error_exit(ERR_MSG_BIND, 0, errno_string());
-
-	relay_agent_trap_port = ntohs(me.sin_port);
-	write_pid_file(pid_file);
-}
-
-
-static void dispatcher_loop()
-{
-	int numfds;
-	fd_set fdset;
-	int count;
-	struct timeval timeout;
-
-
-	timeout.tv_usec = 0;
-
-	while(1)
-	{
-		if(sighup)
-		{
-			resource_update(config_dir);
-			sighup = False;
-		}
-
-		if(trace_level > 1)
-		{
-			trace_sessions();
-		}
-
-		numfds = 0;
-		FD_ZERO(&fdset);
-
-		numfds = MAX(clients_sd, agents_sd);
-		numfds = MAX(numfds,trap_sd);
-		numfds++;
-		FD_SET(clients_sd, &fdset);
-		FD_SET(agents_sd, &fdset);
-		FD_SET(trap_sd, &fdset);
-
-		timeout.tv_sec = relay_agent_poll_interval;
-
-		/* we compute the timeout according to the	*/
-		/* timeout of the pending requests		*/
-		session_select_info(&timeout);
-
-		count = select(numfds, &fdset, 0, 0, &timeout);
-		if(count > 0)
-		{
-			if(FD_ISSET(agents_sd, &fdset))
-			{
-				/* we read the responses of the agents */
-				session_read();
-				continue;
-				
-			}
-
-			if(FD_ISSET(trap_sd, &fdset))
-			{
-				/* working on the trap */
-				trap_processing();
-				continue;
-				
-			}
-
-			if(FD_ISSET(clients_sd, &fdset))
-			{
-				/* we dispatch the requests of the application */
-				session_dispatch();
-
-			        session_timeout();
-				continue;
-			}
-
-		}
-		else
-		{
-			switch(count)
-			{
-				case 0:
-					/* we check if some requests have timeout */
-					session_timeout();
-					  watch_dog_in_action();
-					break;
-
-				case -1:
-					if(errno == EINTR)
-					{
-						break;
-					}
-					else
-					{
-						error_exit(ERR_MSG_SELECT, errno_string());
-					}
-			}
-		}
-	}
-}
-
-
-/*
- *	\t[-m GROUP | SPLIT (default GROUP)]\n\
- */
-
-static void print_usage()
-{
-
-	fprintf(stderr, FGET("%s\n"),
-				MGET("Usage: snmpdx [-h]") );
-	fprintf(stderr, FGET("\t%s\n"),
-				MGET("[-h (to get help on usage)]") );
-	fprintf(stderr, FGET("\t%s%d%s\n"),
-				MGET("[-p port (default "),
-				SNMP_PORT,
-				MGET(")]"));
-
-	fprintf(stderr, FGET("\t%s%s%s\n"),
-				MGET("[-r resource-file (default "),
-				MGET(default_resource_file),
-				MGET(")]"));
-
-	fprintf(stderr, FGET("\t%s%s%s\n"),
-				MGET("[-a access-control-file (default "),
-				MGET(default_sec_config_file),
-				MGET(")]"));
-
-	fprintf(stderr, FGET("\t%s%s%s\n"),
-				MGET("[-c config-dir (default "),
-				MGET(default_config_dir),
-				MGET(")]"));
-
-	fprintf(stderr, FGET("\t%s%s%s\n"),
-				MGET("[-i pid-file (default "),
-				MGET(default_pid_file),
-				MGET(")]"));
-
-	fprintf(stderr, FGET("\t%s%s%s\n"),
-				MGET("[-o enterprise-oid-file (default "),
-				MGET(default_name_oid_file),
-				MGET(")]"));
-
-	fprintf(stderr, FGET("\t%s\n"),
-				MGET("[-y (to invoke recovery module)]"));
-
-	fprintf(stderr, FGET("\t%s\n"),
-				MGET("[-m GROUP | SPLIT (default GROUP)]"));
-
-	fprintf(stderr, FGET("\t%s%d%s%d%s\n\n"),
-				MGET("[-d trace-level (range 0.."),
-				TRACE_LEVEL_MAX,
-				MGET(", default "),
-				trace_level,
-				MGET(")]"));
-
-	exit(1);
-}
-
-int
-main(int argc, char *argv[])
-{
-	int arg;
-	int Fails ; 
-	char *str;
-	int level;
-	char *error_file = NULL;
-
- 	extern char *optarg;
-	extern int optind;
-	int opt;
-
-	error_init(argv[0], application_end);
-
-	optind = 1;
-
-
-	{
-        char domain_path[MAXPATHLEN];
-
-        setlocale(LC_ALL, "");
-
-        sprintf(domain_path, SEA_LOCALE_PATH);
-
-        bindtextdomain(DOMAIN_MGET, domain_path);
-        bindtextdomain(DOMAIN_SGET,   domain_path);
-        bindtextdomain(DOMAIN_LIBGET,   domain_path);
-        bindtextdomain(DOMAIN_LGET, domain_path);
-        bindtextdomain(DOMAIN_FGET,  domain_path);  /* formatting string */
-	}
-
-
-	/* parse arguments */
-	while((opt = getopt(argc,argv,"c:i:hr:m:o:p:a:d:yf:n:?"))!=EOF){
-		switch(opt){
-				case 'h':
-				case '?':
-					print_usage();
-					break;
-				case 'f':
-					Fails = strtol (optarg, &str, 10) ; 
-					if (optarg == str) { 
-						fprintf (stderr, "Invalid number following the -t option: %s\n", optarg ) ; 
-						print_usage () ; 
-					} else {
-						SetFailThreshold (Fails) ; 
-					}
-					break ; 	
-					
-
-				case 'y':
-					recovery_on=TRUE;
-					break;
-
-				case 'p':
-					port = strtol(optarg, &str, 10);
-					if(optarg == str)
-					{
-						fprintf(stderr, "Not a valid integer following the -p option: %s\n", optarg);
-						print_usage();
-					}
-
-					break;
-
-				case 'n':
-					relay_agent_name = strdup(optarg);
-					if(relay_agent_name == NULL)
-					{
-						fprintf(stderr, "%s\n", ERR_MSG_ALLOC);
-						exit(1);
-					}
-
-					break;
-
-				case 'o':
-					if(optind > argc)
-					{
-						fprintf(stderr, "must have the enterprise name-oid file\n");
-						print_usage();
-					}
-
-					name_oid_file= strdup(optarg);
-					if(name_oid_file == NULL)
-					{
-						fprintf(stderr, "%s\n", ERR_MSG_ALLOC);
-						exit(1);
-					}
-
-					break;
-
-				case 'c':
-					if(optind > argc)
-					{
-						fprintf(stderr, "Must have a configuration directory name following the -c option\n");
-						print_usage();
-					}
-
-					config_dir = strdup(optarg);
-					if(config_dir == NULL)
-					{
-						fprintf(stderr, "%s\n", ERR_MSG_ALLOC);
-						exit(1);
-					}
-
-					break;
-
-                                case 'a':
-                                        if(optind > argc)
-                                        {
-                                                fprintf(stderr, "Must have a access control filename following the -a option\n");
-                                                print_usage();
-                                        }
-
-                                        sec_config_file = strdup(optarg);
-                                        if(sec_config_file == NULL)
-                                        {
-                                                fprintf(stderr, "%s\n", ERR_MSG_ALLOC);
-                                                exit(1);
-                                        }
-
-                                        break;
-
-				case 'r':
-					if(optind > argc)
-					{
-						fprintf(stderr, "Must have a resource file name following the -r option\n");
-						print_usage();
-					}
-
-					resource_file = strdup(optarg);
-					if(resource_file == NULL)
-					{
-						fprintf(stderr, "%s\n", ERR_MSG_ALLOC);
-						exit(1);
-					}
-
-					break;
-
-				case 'i':
-					if(optind > argc)
-					{
-						fprintf(stderr, "Must have a pid file name following the -i option\n");
-						print_usage();
-					}
-
-					pid_file = strdup(optarg);
-					if(pid_file == NULL)
-					{
-						fprintf(stderr, "%s\n", ERR_MSG_ALLOC);
-						exit(1);
-					}
-
-					break;
-
-
-				case 'd':
-					if(optind> argc)
-					{
-						fprintf(stderr, "Must have a trace-level following the -d option\n");
-						print_usage();
-					}
-
-					level = strtol(optarg, &str, 10);
-					if(optarg == str)
-					{
-						fprintf(stderr, "Not a valid integer following the -d option: %s\n", optarg);
-						print_usage();
-					}
-
-					if(trace_set(level, error_label))
-					{
-						print_usage();
-					}
-
-					break;
-
-				case 'm':
-					if(optind > argc)
-					{
-						fprintf(stderr, "Must have GROUP or SPLIT following the -m option\n");
-						print_usage();
-					}
-
-					if(strcmp(optarg, "GROUP") == 0)
-					{
-						mode = MODE_GROUP;
-					}
-					else
-					if(strcmp(optarg, "SPLIT") == 0)
-					{
-						mode = MODE_SPLIT;
-					}
-					else
-					{
-						fprintf(stderr, "Invalid mode: %s\n", optarg);
-						print_usage();
-					}
-
-					break;
-
-				default:
-					fprintf(stderr, "Invalid Option: -%c\n", optarg);
-					print_usage();
-					break;
-			}
-		}
-
-
-/*
-	if(error_file == NULL)
-	{
-		error_file = default_error_file;
-	}
-	error_open(error_file);
-*/
-
-	if(trace_level == 0)
-	{
-		/* run the daemon in backgound */
-
-		int pid;
-
-		pid = fork();
-		switch(pid)
-		{
-			case -1:
-				error_exit(ERR_MSG_FORK, errno_string());
-				break;
-
-			case 0: /* child process */
-				break;
-
-			default: /* parent process */
-				exit(0);
-				break;
-		}
-	}
-
-	if(fclose(stdin) == EOF)
-	{
-		error(ERR_MSG_FCLOSE, "stdin", errno_string());
-	}
-
-	dispatcher_init();
-
-	if(signals_init(signals_sighup, signals_exit, error_label))
-	{
-		error_exit("signals_init() failed: %s", error_label);
-	}
-	
-	if(trace_level == 0)
-	{
-		if(fclose(stdout) == EOF)
-		{
-			error(ERR_MSG_FCLOSE, "stdout", errno_string());
-		}
-	}
-
-	if(trace_level == 0)
-	{
-		/* background */
-
-		if(chdir("/") == -1)
-		{
-			error(ERR_MSG_CHDIR, "/", errno_string());
-		}
-
-		/* set process group ID */
-		setpgrp();
-
-		error_close_stderr();
-	}
-
-	dispatcher_loop();
-
-	return (0);
-}
--- a/usr/src/cmd/agents/snmp/snmprelayd/dispatcher.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-/*
- * HISTORY
- * 5-14-96	Jerry Yeung	add relay agent name
- * 6-18-96	Jerry Yeung	add pid file
- * 7-3-96	Jerry Yeung	add poll_interval & max_time_out
- */
-
-#ifndef _DISPATCHER_H_
-#define _DISPATCHER_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/***** GLOBAL CONTANTS *****/
-
-/*
- *	the two modes of the SNMP Relay
- */
-
-#define MODE_GROUP	1
-#define MODE_SPLIT	2
-
-
-/***** GLOBAL VARIABLES *****/
-
-/*
- *	my IP address
- */
-
-extern IPAddress my_ip_address;
-
-extern char* relay_agent_name; /* (5-14-96) */
-
-/*
- *	the socket descriptor on which we receive/send
- *	SNMP requests from/to the SNMP applications
- */
-
-extern int clients_sd;
-
-
-/*
- *	the socket descriptor on which we receive/send
- *	SNMP requests from/to the SNMP agents
- */
-
-extern int agents_sd;
-
-extern int trap_sd;
-extern int relay_agent_trap_port;
-
-/*
- * max_agent_time_out
- * poll_internval
- */
-extern int relay_agent_max_agent_time_out;
-extern int relay_agent_poll_interval;
-
-
-/*
- *
- *	the name of the configuration directory
- */
-
-extern char *config_dir;
-extern char *pid_file;
-extern char *resource_file;
-
-/*
- *	the mode of the SNMP relay
- */
-
-extern int mode;
-extern int recovery_on;
-
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmprelayd/enterprises.oid	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,780 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-# enterprises.oid - SMI Network Management Private Enterprise Codes
-#
-
-# This file is used by the SunNet Manager build_oid(1) utility as
-# input in building an Object Identifier (OID) database for use by
-# SunNet Manager.
-
-# File format:
-#
-# The file is made up of many entries, each entry occupies one line
-# and consists of two quoted strings separated by white space.  The
-# first string contains the name of an enterprise or organisation,
-# the second the OID assigned to that enterprise in the Structure of
-# Management Information (SMI).  This version was generated from
-# publically available information in September 1993.
-#
-#
-# SunNet Manager users may update this file, however it is unnecessary
-# for them to do so.
-
-"Reserved"					"1.3.6.1.4.1.0"
-"Proteon"					"1.3.6.1.4.1.1"
-"IBM"						"1.3.6.1.4.1.2"
-"CMU"						"1.3.6.1.4.1.3"
-"Unix"						"1.3.6.1.4.1.4"
-"ACC"						"1.3.6.1.4.1.5"
-"TWG"						"1.3.6.1.4.1.6"
-"CAYMAN"					"1.3.6.1.4.1.7"
-"PSI"						"1.3.6.1.4.1.8"
-"cisco"						"1.3.6.1.4.1.9"
-"NSC"						"1.3.6.1.4.1.10"
-"HP"						"1.3.6.1.4.1.11"
-"Epilogue"					"1.3.6.1.4.1.12"
-"U of Tennessee" 			"1.3.6.1.4.1.13"
-"BBN"						"1.3.6.1.4.1.14"
-"Xylogics, Inc."			"1.3.6.1.4.1.15"
-"Timeplex"					"1.3.6.1.4.1.16"
-"Canstar"					"1.3.6.1.4.1.17"
-"Wellfleet"					"1.3.6.1.4.1.18"
-"TRW"						"1.3.6.1.4.1.19"
-"MIT"						"1.3.6.1.4.1.20"
-"EON"						"1.3.6.1.4.1.21"
-"Spartacus"					"1.3.6.1.4.1.22"
-"Novell"					"1.3.6.1.4.1.23"
-"Spider Systems"			"1.3.6.1.4.1.24"
-"NSFNET"					"1.3.6.1.4.1.25"
-"Hughes LAN Systems"		"1.3.6.1.4.1.26"
-"Intergraph"				"1.3.6.1.4.1.27"
-"Interlan"					"1.3.6.1.4.1.28"
-"Vitalink Communications"	"1.3.6.1.4.1.29"
-"Ulana"						"1.3.6.1.4.1.30"
-"NSWC"						"1.3.6.1.4.1.31"
-"Santa Cruz Operation"		"1.3.6.1.4.1.32"
-"Xyplex"					"1.3.6.1.4.1.33"
-"Cray"						"1.3.6.1.4.1.34"
-"Bell Northern Research"	"1.3.6.1.4.1.35"
-"DEC"						"1.3.6.1.4.1.36"
-"Touch"						"1.3.6.1.4.1.37"
-"Network Research Corp."	"1.3.6.1.4.1.38"
-"Baylor College of Medicine"	"1.3.6.1.4.1.39"
-"NMFECC-LLNL"					"1.3.6.1.4.1.40"
-"SRI"							"1.3.6.1.4.1.41"
-"Sun Microsystems"				"1.3.6.1.4.1.42"
-"3Com"							"1.3.6.1.4.1.43"
-"Rockwell/CMC"					"1.3.6.1.4.1.44"
-"SynOptics"						"1.3.6.1.4.1.45"
-"Cheyenne Software"				"1.3.6.1.4.1.46"
-"Prime Computer"				"1.3.6.1.4.1.47"
-"MCNC/North Carolina Data Network"	"1.3.6.1.4.1.48"
-"Chipcom"							"1.3.6.1.4.1.49"
-"Optical Data Systems"				"1.3.6.1.4.1.50"
-"gated"								"1.3.6.1.4.1.51"
-"Cabletron Systems"					"1.3.6.1.4.1.52"
-"Apollo Computers"					"1.3.6.1.4.1.53"
-"DeskTalk Systems, Inc."			"1.3.6.1.4.1.54"
-"SSDS"								"1.3.6.1.4.1.55"
-"Castle Rock Computing"				"1.3.6.1.4.1.56"
-"MIPS Computer Systems"				"1.3.6.1.4.1.57"
-"TGV, Inc."							"1.3.6.1.4.1.58"
-"Silicon Graphics, Inc."			"1.3.6.1.4.1.59"
-"University of British Columbia"	"1.3.6.1.4.1.60"
-"Merit       Bill Norton"			"1.3.6.1.4.1.61"
-"FiberCom    Eric Rubin"			"1.3.6.1.4.1.62"
-"Apple Computer Inc"				"1.3.6.1.4.1.63"
-"Gandalf"							"1.3.6.1.4.1.64"
-"Dartmouth"							"1.3.6.1.4.1.65"
-"David Systems"						"1.3.6.1.4.1.66"
-"Reuter"							"1.3.6.1.4.1.67"
-"Cornell"							"1.3.6.1.4.1.68"
-"LMS"								"1.3.6.1.4.1.69"
-"Locus Computing Corp."				"1.3.6.1.4.1.70"
-"NASA"								"1.3.6.1.4.1.71"
-"Retix"								"1.3.6.1.4.1.72"
-"Boeing"							"1.3.6.1.4.1.73"
-"AT&T"								"1.3.6.1.4.1.74"
-"Ungermann-Bass"					"1.3.6.1.4.1.75"
-"Digital Analysis Corp."			"1.3.6.1.4.1.76"
-"LAN Manager"						"1.3.6.1.4.1.77"
-"Netlabs"							"1.3.6.1.4.1.78"
-"ICL"								"1.3.6.1.4.1.79"
-"Auspex Systems"					"1.3.6.1.4.1.80"
-"Lannet Company"					"1.3.6.1.4.1.81"
-"Network Computing Devices"			"1.3.6.1.4.1.82"
-"Raycom Systems"					"1.3.6.1.4.1.83"
-"Pirelli Focom Ltd."				"1.3.6.1.4.1.84"
-"Datability Software Systems"		"1.3.6.1.4.1.85"
-"Network Application Technology"	"1.3.6.1.4.1.86"
-"LINK (Lokales Informatik-Netz Karlsruhe)"	"1.3.6.1.4.1.87"
-"NYU"								"1.3.6.1.4.1.88"
-"RND"								"1.3.6.1.4.1.89"
-"InterCon"							"1.3.6.1.4.1.90"
-"Coral Network Corporation"			"1.3.6.1.4.1.91"
-"Webster Computer Corp."			"1.3.6.1.4.1.92"
-"Frontier Technologies Corp."		"1.3.6.1.4.1.93"
-"Nokia Data Communications (Finland)"	"1.3.6.1.4.1.94"
-"Allen-Bradley Company, Inc."			"1.3.6.1.4.1.95"
-"CERN"								"1.3.6.1.4.1.96"
-"Sigma Network Systems, Inc."		"1.3.6.1.4.1.97"
-"Emerging Technologies, Inc."		"1.3.6.1.4.1.98"
-"SNMP Research"						"1.3.6.1.4.1.99"
-"Ohio State University"				"1.3.6.1.4.1.100"
-"Ultra Network Technologies"		"1.3.6.1.4.1.101"
-"Microcom"							"1.3.6.1.4.1.102"
-"Martin Marietta Astronautic Group"	"1.3.6.1.4.1.103"
-"Micro Technology"					"1.3.6.1.4.1.104"
-"Process Software Corporation"		"1.3.6.1.4.1.105"
-"Data General Corporation"			"1.3.6.1.4.1.106"
-"Bull Company"						"1.3.6.1.4.1.107"
-"Emulex Corporation"				"1.3.6.1.4.1.108"
-"Warwick University Computing Services"		"1.3.6.1.4.1.109"
-"Network General Corporation"		"1.3.6.1.4.1.110"
-"Oracle"							"1.3.6.1.4.1.111"
-"Control Data Corporation"			"1.3.6.1.4.1.112"
-"Hughes Aircraft Company"			"1.3.6.1.4.1.113"
-"Synernetics, Inc."					"1.3.6.1.4.1.114"
-"Mitre"								"1.3.6.1.4.1.115"
-"Hitachi, Ltd."						"1.3.6.1.4.1.116"
-"Telebit"							"1.3.6.1.4.1.117"
-"Salomon Technology Services"		"1.3.6.1.4.1.118"
-"NEC Corporation"					"1.3.6.1.4.1.119"
-"Fibermux"							"1.3.6.1.4.1.120"
-"FTP Software, Inc."				"1.3.6.1.4.1.121"
-"Sony"								"1.3.6.1.4.1.122"
-"Newbridge Networks Corporation"	"1.3.6.1.4.1.123"
-"Racal-Milgo Information Systems"	"1.3.6.1.4.1.124"
-"CR SYSTEMS"						"1.3.6.1.4.1.125"
-"DSET Corporation"					"1.3.6.1.4.1.126"
-"Computone"							"1.3.6.1.4.1.127"
-"Tektronix, Inc."					"1.3.6.1.4.1.128"
-"Interactive Systems Corporation"	"1.3.6.1.4.1.129"
-"Banyan Systems Inc."				"1.3.6.1.4.1.130"
-"Sintrom Datanet Limited"			"1.3.6.1.4.1.131"
-"Bell Canada"						"1.3.6.1.4.1.132"
-"Crosscomm Corporation"				"1.3.6.1.4.1.133"
-"Rice University"					"1.3.6.1.4.1.134"
-"T3Plus Networking, Inc."			"1.3.6.1.4.1.135"
-"Concurrent Computer Corp."			"1.3.6.1.4.1.136"
-"Basser"							"1.3.6.1.4.1.137"
-"Luxcom"							"1.3.6.1.4.1.138"
-"Artel"								"1.3.6.1.4.1.139"
-"Independence Technologies, Inc. (ITI)"		"1.3.6.1.4.1.140"
-"Frontier Software Development"		"1.3.6.1.4.1.141"
-"Digital Computer Limited"			"1.3.6.1.4.1.142"
-"Eyring, Inc."						"1.3.6.1.4.1.143"
-"Case Communications"				"1.3.6.1.4.1.144"
-"Penril DataComm, Inc."				"1.3.6.1.4.1.145"
-"American Airlines"					"1.3.6.1.4.1.146"
-"Sequent Computer Systems"			"1.3.6.1.4.1.147"
-"Bellcore  Kaj Tesink"				"1.3.6.1.4.1.148"
-"ConCord Communications"			"1.3.6.1.4.1.149"
-"University of Washington"			"1.3.6.1.4.1.150"
-"Develcon"							"1.3.6.1.4.1.151"
-"Solarix Systems"					"1.3.6.1.4.1.152"
-"Unifi Communications Corp."		"1.3.6.1.4.1.153"
-"Roadnet"							"1.3.6.1.4.1.154"
-"Network Systems Corp."				"1.3.6.1.4.1.155"
-"ENE (European Network Engineering)"	"1.3.6.1.4.1.156"
-"Dansk Data Elektronik A/S"			"1.3.6.1.4.1.157"
-"Morning Star Technologies"			"1.3.6.1.4.1.158"
-"Dupont EOP"						"1.3.6.1.4.1.159"
-"Legato Systems, Inc."				"1.3.6.1.4.1.160"
-"Motorola SPS"						"1.3.6.1.4.1.161"
-"European Space Agency (ESA)"		"1.3.6.1.4.1.162"
-"BIM"								"1.3.6.1.4.1.163"
-"Rad Data Communications Ltd."		"1.3.6.1.4.1.164"
-"Intellicom"						"1.3.6.1.4.1.165"
-"Shiva Corporation"					"1.3.6.1.4.1.166"
-"Fujikura America"					"1.3.6.1.4.1.167"
-"Xlnt Designs INC (XDI)"			"1.3.6.1.4.1.168"
-"Tandem Computers"					"1.3.6.1.4.1.169"
-"BICC"								"1.3.6.1.4.1.170"
-"D-Link Systems, Inc."				"1.3.6.1.4.1.171"
-"AMP, Inc."							"1.3.6.1.4.1.172"
-"Netlink"							"1.3.6.1.4.1.173"
-"C. Itoh Electronics"				"1.3.6.1.4.1.174"
-"Sumitomo Electric Industries (SEI)"	"1.3.6.1.4.1.175"
-"DHL Systems, Inc."					"1.3.6.1.4.1.176"
-"Network Equipment Technologies"	"1.3.6.1.4.1.177"
-"APTEC Computer Systems"			"1.3.6.1.4.1.178"
-"Schneider & Koch & Co. Datensysteme GmbH"	"1.3.6.1.4.1.179"
-"Hill Air Force Base"				"1.3.6.1.4.1.180"
-"ADC Kentrox"						"1.3.6.1.4.1.181"
-"Japan Radio Co."					"1.3.6.1.4.1.182"
-"Versitron"							"1.3.6.1.4.1.183"
-"Telecommunication Systems"			"1.3.6.1.4.1.184"
-"Interphase"						"1.3.6.1.4.1.185"
-"Toshiba Corporation"				"1.3.6.1.4.1.186"
-"Clearpoint Research Corp."			"1.3.6.1.4.1.187"
-"Ascom Gfeller Ltd."				"1.3.6.1.4.1.188"
-"Fujitsu America"					"1.3.6.1.4.1.189"
-"NetCom Solutions, Inc."			"1.3.6.1.4.1.190"
-"NCR"								"1.3.6.1.4.1.191"
-"Dr. Materna GmbH"					"1.3.6.1.4.1.192"
-"LM Ericsson AB"					"1.3.6.1.4.1.193"
-"Metaphor Computer Systems"			"1.3.6.1.4.1.194"
-"Patriot Partners"					"1.3.6.1.4.1.195"
-"The Software Group Limited (TSG)"	"1.3.6.1.4.1.196"
-"Kalpana, Inc."						"1.3.6.1.4.1.197"
-"University of Waterloo"			"1.3.6.1.4.1.198"
-"CCL/ITRI"							"1.3.6.1.4.1.199"
-"Coeur Postel"						"1.3.6.1.4.1.200"
-"Mitsubishi Cable Industries, Ltd."	"1.3.6.1.4.1.201"
-"SMC"								"1.3.6.1.4.1.202"
-"Crescendo Communication, Inc."		"1.3.6.1.4.1.203"
-"Goodall Software Engineering"		"1.3.6.1.4.1.204"
-"Intecom"							"1.3.6.1.4.1.205"
-"Victoria University of Wellington"	"1.3.6.1.4.1.206"
-"Allied Telesis, Inc."				"1.3.6.1.4.1.207"
-"Dowty Network Systems A/S"			"1.3.6.1.4.1.208"
-"Protools"							"1.3.6.1.4.1.209"
-"Nippon Telegraph and Telephone Corp."	"1.3.6.1.4.1.210"
-"Fujitsu Limited"					"1.3.6.1.4.1.211"
-"Network Peripherals Inc."			"1.3.6.1.4.1.212"
-"Netronix, Inc."					"1.3.6.1.4.1.213"
-"University of Wisconsin - Madison"	"1.3.6.1.4.1.214"
-"NetWorth, Inc."					"1.3.6.1.4.1.215"
-"Tandberg Data A/S"					"1.3.6.1.4.1.216"
-"Technically Elite Concepts, Inc."	"1.3.6.1.4.1.217"
-"Labtam Australia Pty. Ltd."		"1.3.6.1.4.1.218"
-"Republic Telcom Systems, Inc."		"1.3.6.1.4.1.219"
-"ADI Systems, Inc."					"1.3.6.1.4.1.220"
-"Microwave Bypass Systems, Inc."	"1.3.6.1.4.1.221"
-"Pyramid Technology Corp."			"1.3.6.1.4.1.222"
-"Unisys_Corp"						"1.3.6.1.4.1.223"
-"LANOPTICS LTD. Israel"				"1.3.6.1.4.1.224"
-"NKK Corporation"					"1.3.6.1.4.1.225"
-"MTrade UK Ltd."					"1.3.6.1.4.1.226"
-"Acals"								"1.3.6.1.4.1.227"
-"ASTEC, Inc."						"1.3.6.1.4.1.228"
-"Delmarva Power"					"1.3.6.1.4.1.229"
-"Telematics International, Inc."	"1.3.6.1.4.1.230"
-"Siemens Nixdorf Informationssyteme AG"	"1.3.6.1.4.1.231"
-"Compaq"							"1.3.6.1.4.1.232"
-"NetManage, Inc."					"1.3.6.1.4.1.233"
-"NCSU Computing Center"				"1.3.6.1.4.1.234"
-"Empirical Tools and Technologies"	"1.3.6.1.4.1.235"
-"Samsung Group"						"1.3.6.1.4.1.236"
-"Takaoka Electric Mfg. Co., Ltd."	"1.3.6.1.4.1.237"
-"Netrix Systems Corporation"		"1.3.6.1.4.1.238"
-"WINDATA"							"1.3.6.1.4.1.239"
-"RC International A/S"				"1.3.6.1.4.1.240"
-"Netexp Research"					"1.3.6.1.4.1.241"
-"Internode Systems Pty Ltd"			"1.3.6.1.4.1.242"
-"netCS Informationstechnik GmbH"	"1.3.6.1.4.1.243"
-"Lantronix  Rich Lyman"				"1.3.6.1.4.1.244"
-"Avatar Consultants"				"1.3.6.1.4.1.245"
-"Furukawa Electoric Co. Ltd."		"1.3.6.1.4.1.246"
-"AEG Electrocom"					"1.3.6.1.4.1.247"
-"Richard Hirschmann GmbH & Co."		"1.3.6.1.4.1.248"
-"G2R Inc."							"1.3.6.1.4.1.249"
-"University of Michigan"			"1.3.6.1.4.1.250"
-"Netcomm, Ltd."						"1.3.6.1.4.1.251"
-"Sable Technology Corporation"		"1.3.6.1.4.1.252"
-"Xerox"								"1.3.6.1.4.1.253"
-"Conware Computer Consulting GmbH"	"1.3.6.1.4.1.254"
-"Compatible Systems Corp."			"1.3.6.1.4.1.255"
-"Scitec Communications Systems Ltd."	"1.3.6.1.4.1.256"
-"Transarc Corporation"				"1.3.6.1.4.1.257"
-"Matsushita Electric Industrial Co., Ltd.""1.3.6.1.4.1.258"
-"ACCTON  Technology"				"1.3.6.1.4.1.259"
-"Star-Tek, Inc."					"1.3.6.1.4.1.260"
-"Codenoll Tech. Corp."				"1.3.6.1.4.1.261"
-"Formation, Inc."					"1.3.6.1.4.1.262"
-"Seiko Instruments, Inc. (SII)"		"1.3.6.1.4.1.263"
-"RCE (Reseaux de Communication d'Entreprise S.A.)"		"1.3.6.1.4.1.264"
-"Xenocom, Inc."						"1.3.6.1.4.1.265"
-"KABELRHEYDT"						"1.3.6.1.4.1.266"
-"Systech Computer Corporation"		"1.3.6.1.4.1.267"
-"Visual"							"1.3.6.1.4.1.268"
-"SDD (Scandinavian Airlines Data Denmark A/S)"	"1.3.6.1.4.1.269"
-"Zenith Electronics Corporation"	"1.3.6.1.4.1.270"
-"TELECOM FINLAND"					"1.3.6.1.4.1.271"
-"BinTec Computersystems"			"1.3.6.1.4.1.272"
-"EUnet Germany"						"1.3.6.1.4.1.273"
-"PictureTel Corporation"			"1.3.6.1.4.1.274"
-"Michigan State University"			"1.3.6.1.4.1.275"
-"GTE Telecom Incorporated"			"1.3.6.1.4.1.276"
-"Cascade Communications Corp."		"1.3.6.1.4.1.277"
-"Hitachi Cable, Ltd."				"1.3.6.1.4.1.278"
-"Olivetti  Marco Framba"			"1.3.6.1.4.1.279"
-"Vitacom Corporation"				"1.3.6.1.4.1.280"
-"INMOS  Graham Hudspith"			"1.3.6.1.4.1.281"
-"AIC Systems Laboratories Ltd."		"1.3.6.1.4.1.282"
-"Cameo Communications, Inc."		"1.3.6.1.4.1.283"
-"Diab Data AB"						"1.3.6.1.4.1.284"
-"Olicom A/S"						"1.3.6.1.4.1.285"
-"Digital-Kienzle Computersystems"	"1.3.6.1.4.1.286"
-"CSELT (Centro Studi E Laboratori Telecomunicazioni)"		"1.3.6.1.4.1.287"
-"Electronic Data Systems"			"1.3.6.1.4.1.288"
-"McData Corporation"				"1.3.6.1.4.1.289"
-"Harris Computer Systems Division (HCSD)"		"1.3.6.1.4.1.290"
-"Technology Dynamics, Inc."			"1.3.6.1.4.1.291"
-"DATAHOUSE Information Systems Ltd."	"1.3.6.1.4.1.292"
-"DSIR Network Group"				"1.3.6.1.4.1.293"
-"Texas Instruments"					"1.3.6.1.4.1.294"
-"PlainTree Systems Inc."			"1.3.6.1.4.1.295"
-"Hedemann Software Development"		"1.3.6.1.4.1.296"
-"Fuji Xerox Co., Ltd."				"1.3.6.1.4.1.297"
-"Asante Technology"					"1.3.6.1.4.1.298"
-"Stanford University"				"1.3.6.1.4.1.299"
-"Digital Link"						"1.3.6.1.4.1.300"
-"Raylan Corporation"				"1.3.6.1.4.1.301"
-"Datacraft"							"1.3.6.1.4.1.302"
-"Hughes"							"1.3.6.1.4.1.303"
-"Farallon Computing, Inc."			"1.3.6.1.4.1.304"
-"GE Information Services"			"1.3.6.1.4.1.305"
-"Gambit Computer Communications"	"1.3.6.1.4.1.306"
-"Livingston Enterprises, Inc."		"1.3.6.1.4.1.307"
-"Star Technologies"					"1.3.6.1.4.1.308"
-"Micronics Computers Inc."			"1.3.6.1.4.1.309"
-"Basis, Inc."						"1.3.6.1.4.1.310"
-"Microsoft"							"1.3.6.1.4.1.311"
-"US West Advance Technologies"		"1.3.6.1.4.1.312"
-"University College London"			"1.3.6.1.4.1.313"
-"Eastman Kodak Company"				"1.3.6.1.4.1.314"
-"Network Resources Corporation"		"1.3.6.1.4.1.315"
-"Atlas Telecom"						"1.3.6.1.4.1.316"
-"Bridgeway"							"1.3.6.1.4.1.317"
-"American Power Conversion Corp."	"1.3.6.1.4.1.318"
-"DOE Atmospheric Radiation Measurement Project"		"1.3.6.1.4.1.319"
-"VerSteeg CodeWorks"				"1.3.6.1.4.1.320"
-"Verilink Corp"						"1.3.6.1.4.1.321"
-"Sybus Corportation"				"1.3.6.1.4.1.322"
-"Tekelec"							"1.3.6.1.4.1.323"
-"NASA Ames Research Center"			"1.3.6.1.4.1.324"
-"Simon Fraser University"			"1.3.6.1.4.1.325"
-"Fore Systems, Inc."				"1.3.6.1.4.1.326"
-"Centrum Communications, Inc."		"1.3.6.1.4.1.327"
-"NeXT Computer, Inc."				"1.3.6.1.4.1.328"
-"Netcore, Inc."						"1.3.6.1.4.1.329"
-"Northwest Digital Systems"			"1.3.6.1.4.1.330"
-"Andrew Corporation"				"1.3.6.1.4.1.331"
-"DigiBoard  Dror Kessler"			"1.3.6.1.4.1.332"
-"Computer Network Technology Corp."	"1.3.6.1.4.1.333"
-"Lotus Development Corp."			"1.3.6.1.4.1.334"
-"MICOM Communication Corporation"	"1.3.6.1.4.1.335"
-"ASCII Corporation"					"1.3.6.1.4.1.336"
-"PUREDATA Research/USA"				"1.3.6.1.4.1.337"
-"NTT DATA"							"1.3.6.1.4.1.338"
-"Empros Systems International"		"1.3.6.1.4.1.339"
-"Kendall Square Research (KSR)"		"1.3.6.1.4.1.340"
-"Martin Marietta Energy Systems"	"1.3.6.1.4.1.341"
-"Network Innovations"				"1.3.6.1.4.1.342"
-"Intel Corporation"					"1.3.6.1.4.1.343"
-"Proxar"							"1.3.6.1.4.1.344"
-"Epson Research Center"				"1.3.6.1.4.1.345"
-"Fibernet"							"1.3.6.1.4.1.346"
-"Box Hill Systems Corporation"		"1.3.6.1.4.1.347"
-"American Express Travel Related Services"		"1.3.6.1.4.1.348"
-"Compu-Shack"						"1.3.6.1.4.1.349"
-"Parallan Computer, Inc."			"1.3.6.1.4.1.350"
-"Stratacom"							"1.3.6.1.4.1.351"
-"Open Networks Engineering, Inc."	"1.3.6.1.4.1.352"
-"ATM Forum"							"1.3.6.1.4.1.353"
-"SSD Management, Inc."				"1.3.6.1.4.1.354"
-"Automated Network Management, Inc."	"1.3.6.1.4.1.355"
-"Magnalink Communications Corporation"	"1.3.6.1.4.1.356"
-"TIL Systems, Ltd."					"1.3.6.1.4.1.357"
-"Skyline Technology, Inc."			"1.3.6.1.4.1.358"
-"Nu-Mega Technologies, Inc."		"1.3.6.1.4.1.359"
-"Morgan Stanley & Co. Inc."			"1.3.6.1.4.1.360"
-"Integrated Business Network"		"1.3.6.1.4.1.361"
-"L & N Technologies, Ltd."			"1.3.6.1.4.1.362"
-"Cincinnati Bell Information Systems, Inc."		"1.3.6.1.4.1.363"
-"OSCOM International"				"1.3.6.1.4.1.364"
-"MICROGNOSIS"						"1.3.6.1.4.1.365"
-"Datapoint Corporation"				"1.3.6.1.4.1.366"
-"RICOH Co. Ltd."					"1.3.6.1.4.1.367"
-"Axis Communications AB"			"1.3.6.1.4.1.368"
-"Pacer Software"					"1.3.6.1.4.1.369"
-"Axon Networks Inc."				"1.3.6.1.4.1.370"
-"Brixton Systems, Inc."				"1.3.6.1.4.1.371"
-"GSI  Etienne Demailly"				"1.3.6.1.4.1.372"
-"Tatung Co., Ltd."					"1.3.6.1.4.1.373"
-"DIS Research LTD"					"1.3.6.1.4.1.374"
-"Quotron Systems, Inc."				"1.3.6.1.4.1.375"
-"DASSAULT ELECTRONIQUE"				"1.3.6.1.4.1.376"
-"Corollary, Inc."					"1.3.6.1.4.1.377"
-"SEEL, Ltd."						"1.3.6.1.4.1.378"
-"Lexcel"							"1.3.6.1.4.1.379"
-"Sophisticated Technologies, Inc"	"1.3.6.1.4.1.380"
-"OST  A. Pele"						"1.3.6.1.4.1.381"
-"Megadata Pty Ltd."					"1.3.6.1.4.1.382"
-"LLNL Livermore Computer Center"	"1.3.6.1.4.1.383"
-"Dynatech Communications"			"1.3.6.1.4.1.384"
-"Symplex Communications Corp."		"1.3.6.1.4.1.385"
-"Tribe Computer Works"				"1.3.6.1.4.1.386"
-"Taligent, Inc."					"1.3.6.1.4.1.387"
-"Symbol Technologies, Inc."			"1.3.6.1.4.1.388"
-"Lancert"							"1.3.6.1.4.1.389"
-"Alantec"							"1.3.6.1.4.1.390"
-"Ridgeback Solutions"				"1.3.6.1.4.1.391"
-"Metrix, Inc."						"1.3.6.1.4.1.392"
-"Excutive Systems/XTree Company"	"1.3.6.1.4.1.393"
-"Naval Research Laboratory Communication Systems Branch"	"1.3.6.1.4.1.394"
-"I.D.E. Corporation"				"1.3.6.1.4.1.395"
-"Matsushita Electric Works, Ltd."	"1.3.6.1.4.1.396"
-"MegaPAC"							"1.3.6.1.4.1.397"
-"Kinmel Park"						"1.3.6.1.4.1.398"
-"Hitachi Computer Products (America), Inc."		"1.3.6.1.4.1.399"
-"METEO FRANCE"						"1.3.6.1.4.1.400"
-"PRC Inc."							"1.3.6.1.4.1.401"
-"Wal*Mart Stores, Inc."				"1.3.6.1.4.1.402"
-"Nissin Electric Company, Ltd."		"1.3.6.1.4.1.403"
-"Distributed Support Information Standard"		"1.3.6.1.4.1.404"
-"SMDS Interest Group (SIG)"			"1.3.6.1.4.1.405"
-"SolCom Systems Ltd."				"1.3.6.1.4.1.406"
-"Bell Atlantic"						"1.3.6.1.4.1.407"
-"Advanced Multiuser Technologies Corporation"		"1.3.6.1.4.1.408"
-"Mitsubishi Electric Corporation"	"1.3.6.1.4.1.409"
-"C.O.L. Systems, Inc."				"1.3.6.1.4.1.410"
-"University of Auckland"			"1.3.6.1.4.1.411"
-"Desktop Management Task Force (DMTF)"		"1.3.6.1.4.1.412"
-"Klever Computers, Inc."			"1.3.6.1.4.1.413"
-"Amdahl Corporation"				"1.3.6.1.4.1.414"
-"JTEC Pty, Ltd."					"1.3.6.1.4.1.415"
-"Matra Communcation"				"1.3.6.1.4.1.416"
-"HAL Computer Systems"				"1.3.6.1.4.1.417"
-"Lawrence Berkeley Laboratory"		"1.3.6.1.4.1.418"
-"Dale Computer Corporation"			"1.3.6.1.4.1.419"
-"IPTC, Universitaet of Tuebingen"	"1.3.6.1.4.1.420"
-"Bytex Corporation"					"1.3.6.1.4.1.421"
-"Cogwheel, Inc."					"1.3.6.1.4.1.422"
-"Lanwan Technologies"				"1.3.6.1.4.1.423"
-"Thomas-Conrad Corporation"			"1.3.6.1.4.1.424"
-"TxPort"							"1.3.6.1.4.1.425"
-"Compex, Inc."						"1.3.6.1.4.1.426"
-"Evergreen Systems, Inc."			"1.3.6.1.4.1.427"
-"HNV, Inc."							"1.3.6.1.4.1.428"
-"U.S. Robotics, Inc."				"1.3.6.1.4.1.429"
-"Canada Post Corporation"			"1.3.6.1.4.1.430"
-"Open Systems Solutions, Inc."		"1.3.6.1.4.1.431"
-"Toronto Stock Exchange"			"1.3.6.1.4.1.432"
-"Mamakos\TransSys Consulting"		"1.3.6.1.4.1.433"
-"EICON"								"1.3.6.1.4.1.434"
-"Jupiter Systems"					"1.3.6.1.4.1.435"
-"SSTI"								"1.3.6.1.4.1.436"
-"Grand Junction Networks"			"1.3.6.1.4.1.437"
-"Anasazi, Inc."						"1.3.6.1.4.1.438"
-"Edward D. Jones and Company"		"1.3.6.1.4.1.439"
-"Amnet, Inc."						"1.3.6.1.4.1.440"
-"Kevin Gage"						"1.3.6.1.4.1.441"
-"PEER Networks"						"1.3.6.1.4.1.442"
-"Gateway Communications, Inc."		"1.3.6.1.4.1.443"
-"Peregrine Systems"					"1.3.6.1.4.1.444"
-"Daewoo Telecom"					"1.3.6.1.4.1.445"
-"Norwegian Telecom Research"		"1.3.6.1.4.1.446"
-"WilTel"							"1.3.6.1.4.1.447"
-"Ericsson-Camtec"					"1.3.6.1.4.1.448"
-"Codex"								"1.3.6.1.4.1.449"
-"Basis"								"1.3.6.1.4.1.450"
-"AGE Logic"							"1.3.6.1.4.1.451"
-"INDE Electronics"					"1.3.6.1.4.1.452"
-"ISODE Consortium"					"1.3.6.1.4.1.453"
-"J.I. Case"							"1.3.6.1.4.1.454"
-"Trillium"							"1.3.6.1.4.1.455"
-"Bacchus Inc."						"1.3.6.1.4.1.456"
-"MCC"								"1.3.6.1.4.1.457"
-"Stratus Computer"					"1.3.6.1.4.1.458"
-"Quotron"							"1.3.6.1.4.1.459"
-"Beame & Whiteside"					"1.3.6.1.4.1.460"
-"Cellular Technical Services"		"1.3.6.1.4.1.461"
-"Shore Microsystems, Inc."			"1.3.6.1.4.1.462"
-"Telecommunications Techniques Corp."		"1.3.6.1.4.1.463"
-"DNPAP (Technical University Delft)"		"1.3.6.1.4.1.464"
-"Plexcom, Inc."						"1.3.6.1.4.1.465"
-"Tylink"							"1.3.6.1.4.1.466"
-"Brookhaven National Laboratory"	"1.3.6.1.4.1.467"
-"Computer Communication Systems"	"1.3.6.1.4.1.468"
-"Norand Corporation"				"1.3.6.1.4.1.469"
-"MUX-LAB"							"1.3.6.1.4.1.470"
-"Premisys Communications, Inc."		"1.3.6.1.4.1.471"
-"Bell South Telecommunications"		"1.3.6.1.4.1.472"
-"J. Stainsbury PLC"					"1.3.6.1.4.1.473"
-"Ki Research Inc."					"1.3.6.1.4.1.474"
-"Wandel and Goltermann Technologies"		"1.3.6.1.4.1.475"
-"Emerson Computer Power"			"1.3.6.1.4.1.476"
-"Network Software Associates"		"1.3.6.1.4.1.477"
-"Procter and Gamble"				"1.3.6.1.4.1.478"
-"Meridian Technology Corporation"	"1.3.6.1.4.1.479"
-"QMS, Inc."							"1.3.6.1.4.1.480"
-"Network Express"					"1.3.6.1.4.1.481"
-"LANcity Corporation"				"1.3.6.1.4.1.482"
-"Dayna Communications, Inc."		"1.3.6.1.4.1.483"
-"kn-X Ltd."							"1.3.6.1.4.1.484"
-"Sync Research, Inc."				"1.3.6.1.4.1.485"
-"PremNet"							"1.3.6.1.4.1.486"
-"SIAC"								"1.3.6.1.4.1.487"
-"New York Stock Exchange"			"1.3.6.1.4.1.488"
-"American Stock Exchange"			"1.3.6.1.4.1.489"
-"FCR Software, Inc."				"1.3.6.1.4.1.490"
-"National Medical Care, Inc."		"1.3.6.1.4.1.491"
-"Dialogue Communication Systemes"	"1.3.6.1.4.1.492"
-"NorTele"							"1.3.6.1.4.1.493"
-"Madge Networks, Inc."				"1.3.6.1.4.1.494"
-"Teleglobe Communications"			"1.3.6.1.4.1.495"
-"CTON  Nick Hennenfent"				"1.3.6.1.4.1.496"
-"Leap Technology, Inc."				"1.3.6.1.4.1.497"
-"General DataComm, Inc."			"1.3.6.1.4.1.498"
-"ACE Communications, Ltd."			"1.3.6.1.4.1.499"
-"Automatic Data Processing (ADP)"	"1.3.6.1.4.1.500"
-"Programa SPRITEL"					"1.3.6.1.4.1.501"
-"Adacom"							"1.3.6.1.4.1.502"
-"Metrodata Ltd"						"1.3.6.1.4.1.503"
-"Ellemtel Telecommunication Systems Laboratories"		"1.3.6.1.4.1.504"
-"Arizona Public Service"			"1.3.6.1.4.1.505"
-"NETWIZ, Ltd.,  Emanuel Wind"		"1.3.6.1.4.1.506"
-"Science and Engineering Research Council (SERC)"		"1.3.6.1.4.1.507"
-"The First Boston Corporation"		"1.3.6.1.4.1.508"
-"Hadax Electronics Inc."			"1.3.6.1.4.1.509"
-"VTKK"								"1.3.6.1.4.1.510"
-"North Hills Israel Ltd."			"1.3.6.1.4.1.511"
-"TECSIEL"							"1.3.6.1.4.1.512"
-"Bayerische Motoren Werke (BMW) AG"	"1.3.6.1.4.1.513"
-"CNET Technologies"					"1.3.6.1.4.1.514"
-"MCI"								"1.3.6.1.4.1.515"
-"Human Engineering AG (HEAG)"		"1.3.6.1.4.1.516"
-"FileNet Corporation"				"1.3.6.1.4.1.517"
-"NFT-Ericsson"						"1.3.6.1.4.1.518"
-"Dun & Bradstreet"					"1.3.6.1.4.1.519"
-"Intercomputer Communications"		"1.3.6.1.4.1.520"
-"Defense Intelligence Agency"		"1.3.6.1.4.1.521"
-"Telesystems SLW Inc"				"1.3.6.1.4.1.522"
-"APT Communications"				"1.3.6.1.4.1.523"
-"Delta Airlines"					"1.3.6.1.4.1.524"
-"California Microwave"				"1.3.6.1.4.1.525"
-"Avid Technology Inc"				"1.3.6.1.4.1.526"
-"Integro Advanced Computer Systems"	"1.3.6.1.4.1.527"
-"RPTI"								"1.3.6.1.4.1.528"
-"Ascend Communications Inc"			"1.3.6.1.4.1.529"
-"Eden Computer Systems Inc"			"1.3.6.1.4.1.530"
-"Kawasaki-Steel Corp  Tomoo Watanabe"		"1.3.6.1.4.1.531"
-"Barclays   Giles Todd"				"1.3.6.1.4.1.532"
-"B.U.G., Inc."						"1.3.6.1.4.1.533"
-"Exide Electronics"					"1.3.6.1.4.1.534"
-"Superconducting Supercollider Lab."		"1.3.6.1.4.1.535"
-"Triticom"		"1.3.6.1.4.1.536"
-"Universal Instruments Corp."		"1.3.6.1.4.1.537"
-"Information Resources, Inc."		"1.3.6.1.4.1.538"
-"Applied Innovation, Inc."			"1.3.6.1.4.1.539"
-"Crypto AG"							"1.3.6.1.4.1.540"
-"Infinite Networks, Ltd."			"1.3.6.1.4.1.541"
-"Rabbit Software"					"1.3.6.1.4.1.542"
-"Apertus Technologies"				"1.3.6.1.4.1.543"
-"Equinox Systems, Inc."				"1.3.6.1.4.1.544"
-"Hayes Microcomputer Products"		"1.3.6.1.4.1.545"
-"Empire Technologies Inc."			"1.3.6.1.4.1.546"
-"Glaxochem, Ltd."					"1.3.6.1.4.1.547"
-"KPY Network Partners, Corp."		"1.3.6.1.4.1.548"
-"Agent Technology, Inc."			"1.3.6.1.4.1.549"
-"Dornier GMBH"						"1.3.6.1.4.1.550"
-"Telxon Corporation"				"1.3.6.1.4.1.551"
-"Entergy Corporation"				"1.3.6.1.4.1.552"
-"Garrett Communications Inc."		"1.3.6.1.4.1.553"
-"Agile Networks, Inc."				"1.3.6.1.4.1.554"
-"Larscom"							"1.3.6.1.4.1.555"
-"Stock Equipment"					"1.3.6.1.4.1.556"
-"ITT Corporation"					"1.3.6.1.4.1.557"
-"Universal Data Systems, Inc."		"1.3.6.1.4.1.558"
-"Sonix Communications, Ltd."		"1.3.6.1.4.1.559"
-"Paul Freeman Associates, Inc."		"1.3.6.1.4.1.560"
-"John S. Barnes, Corp."				"1.3.6.1.4.1.561"
-"Northern Telecom"					"1.3.6.1.4.1.562"
-"CAP Debris"						"1.3.6.1.4.1.563"
-"Telco Systems NAC"					"1.3.6.1.4.1.564"
-"Tosco Refining Co"					"1.3.6.1.4.1.565"
-"Russell Info Sys"					"1.3.6.1.4.1.566"
-"University of Salford"				"1.3.6.1.4.1.567"
-"NetQuest Corp."					"1.3.6.1.4.1.568"
-"Armon Networking Ltd."				"1.3.6.1.4.1.569"
-"IA Corporation"					"1.3.6.1.4.1.570"
-"AU-System Communicaton AB"			"1.3.6.1.4.1.571"
-"GoldStar Information & Communications, Ltd."		"1.3.6.1.4.1.572"
-"SECTRA AB  Tommy Pedersen"			"1.3.6.1.4.1.573"
-"ONEAC Corporation"					"1.3.6.1.4.1.574"
-"Tree Technologies"					"1.3.6.1.4.1.575"
-"GTE Government Systems"			"1.3.6.1.4.1.576"
-"Denmac Systems, Inc."				"1.3.6.1.4.1.577"
-"Interlink Computer Sciences, Inc."	"1.3.6.1.4.1.578"
-"Bridge Information Systems, Inc."	"1.3.6.1.4.1.579"
-"Leeds and Northrup Australia (LNA)"	"1.3.6.1.4.1.580"
-"BHA Computer"						"1.3.6.1.4.1.581"
-"Newport Systems Solutions, Inc."	"1.3.6.1.4.1.582"
-"Atrium Technologies"				"1.3.6.1.4.1.583"
-"ROBOTIKER"							"1.3.6.1.4.1.584"
-"PeerLogic Inc."					"1.3.6.1.4.1.585"
-"Digital Transmittion Systems"		"1.3.6.1.4.1.586"
-"Far Point Communications"			"1.3.6.1.4.1.587"
-"Xircom"							"1.3.6.1.4.1.588"
-"Mead Data Central"					"1.3.6.1.4.1.589"
-"Royal Bank of Canada"				"1.3.6.1.4.1.590"
-"Advantis, Inc."					"1.3.6.1.4.1.591"
-"Chemical Banking Corp."			"1.3.6.1.4.1.592"
-"Eagle Technology"					"1.3.6.1.4.1.593"
-"British Telecom"					"1.3.6.1.4.1.594"
-"Radix"								"1.3.6.1.4.1.595"
-"TAINET Communication System Corp."	"1.3.6.1.4.1.596"
-"Comtek Services Inc.,"				"1.3.6.1.4.1.597"
-"Fair Issac"						"1.3.6.1.4.1.598"
-"AST Research Inc."					"1.3.6.1.4.1.599"
-"Soft*Star s.r.l.  Ing."			"1.3.6.1.4.1.600"
-"Bancomm"							"1.3.6.1.4.1.601"
-"Trusted Information Systems, Inc."	"1.3.6.1.4.1.602"
-"Harris & Jeffries, Inc."			"1.3.6.1.4.1.603"
-"Axel Technology Corp."				"1.3.6.1.4.1.604"
-"GN Navtel, Inc."					"1.3.6.1.4.1.605"
-"CAP debis"							"1.3.6.1.4.1.606"
-"Lachman Technology, Inc."			"1.3.6.1.4.1.607"
-"Galcom Networking Ltd"				"1.3.6.1.4.1.608"
-"BAZIS"								"1.3.6.1.4.1.609"
-"SYNAPTEL"							"1.3.6.1.4.1.610"
-"Investment Management Services, Inc."		"1.3.6.1.4.1.611"
-"Taiwan Telecommunication Lab"		"1.3.6.1.4.1.612"
-"Anagram Corporation"				"1.3.6.1.4.1.613"
-"Univel"							"1.3.6.1.4.1.614"
-"University of California, San Diego"		"1.3.6.1.4.1.615"
-"CompuServe"						"1.3.6.1.4.1.616"
-"Telstra - OTC Australia"			"1.3.6.1.4.1.617"
-"Westinghouse Electric Corp."		"1.3.6.1.4.1.618"
-"DGA Ltd."							"1.3.6.1.4.1.619"
-"Elegant Communications Inc."		"1.3.6.1.4.1.620"
-"Experdata"							"1.3.6.1.4.1.621"
-"Unisource Business Networks Sweden AB"		"1.3.6.1.4.1.622"
-"Molex, Inc."						"1.3.6.1.4.1.623"
-"Quay Financial Software"			"1.3.6.1.4.1.624"
-"VMX Inc."							"1.3.6.1.4.1.625"
-"Hypercom, Inc."					"1.3.6.1.4.1.626"
-"University of Guelph"				"1.3.6.1.4.1.627"
-"DIaLOGIKa"							"1.3.6.1.4.1.628"
-"NBASE Switch Communication"		"1.3.6.1.4.1.629"
-"Anchor Datacomm B.V."				"1.3.6.1.4.1.630"
-"PACDATA"							"1.3.6.1.4.1.631"
-"University of Colorado"			"1.3.6.1.4.1.632"
-"Tricom Communications Limited"		"1.3.6.1.4.1.633"
-"santix software GmbH"				"1.3.6.1.4.1.634"
-"FastComm Communications Corp"		"1.3.6.1.4.1.635"
-"The Georgia Institute of Technology"		"1.3.6.1.4.1.636"
-"Alcatel Data Networks"				"1.3.6.1.4.1.637"
-"GTECH Corporation"					"1.3.6.1.4.1.638"
-"UNOCAL Corporation"				"1.3.6.1.4.1.639"
-"First Pacific Network"				"1.3.6.1.4.1.640"
-"Lexmark International"				"1.3.6.1.4.1.641"
-"Qnix Computer"						"1.3.6.1.4.1.642"
-"Jigsaw Software Concepts (Pty) Ltd."		"1.3.6.1.4.1.643"
-"VIR, Inc."							"1.3.6.1.4.1.644"
-"SFA Datacomm Inc."					"1.3.6.1.4.1.645"
-"SEIKO Telecommunication Systems, Inc."		"1.3.6.1.4.1.646"
-"Unified Management"				"1.3.6.1.4.1.647"
-"RADLINX Ltd."						"1.3.6.1.4.1.648"
-"Microplex Systems Ltd."			"1.3.6.1.4.1.649"
-"Objecta Elektronik & Data AB"		"1.3.6.1.4.1.650"
-"Phoenix Microsystems"				"1.3.6.1.4.1.651"
-"Distributed Systems International, Incorporated"		"1.3.6.1.4.1.652"
-"Evolving Systems, Inc."			"1.3.6.1.4.1.653"
-"SAT GmbH"							"1.3.6.1.4.1.654"
-"CeLAN Technology, Inc."			"1.3.6.1.4.1.655"
-"Landmark Systems Corp."			"1.3.6.1.4.1.656"
-"Netone Systems Co., Ltd.."			"1.3.6.1.4.1.657"
-"Loral Data Systems"				"1.3.6.1.4.1.658"
-"Cellware Broadband Technology"		"1.3.6.1.4.1.659"
-"ccmail, Inc."						"1.3.6.1.4.1.660"
-"IMC Networks Corp."				"1.3.6.1.4.1.661"
-"Octel Communications Corp."		"1.3.6.1.4.1.662"
-"RIT Technologies LTD."				"1.3.6.1.4.1.663"
-"Adtran"							"1.3.6.1.4.1.664"
-"PowerPlay Technologies, Inc."		"1.3.6.1.4.1.665"
-"Oki Electric Industry Co., Ltd."	"1.3.6.1.4.1.666"
-"Specialix International"			"1.3.6.1.4.1.667"
-"INESC (Instituto de Engenharia de Sistemas e Computadores)"		"1.3.6.1.4.1.668"
-"Globalnet Communications"			"1.3.6.1.4.1.669"
-"Product Line Engineer SVEC Computer Corp."		"1.3.6.1.4.1.670"
-"Printer Systems Corp."				"1.3.6.1.4.1.671"
-"Contec Micro Electronics USA"		"1.3.6.1.4.1.672"
-"Unix Integration Services"			"1.3.6.1.4.1.673"
-"Dell Computer Corporation"			"1.3.6.1.4.1.674"
-"Whittaker Electronic Systems"		"1.3.6.1.4.1.675"
-"QPSX Communications"				"1.3.6.1.4.1.676"
-"Loral WDl"							"1.3.6.1.4.1.677"
-"Federal Express Corp."				"1.3.6.1.4.1.678"
-"E-COMMS Inc."						"1.3.6.1.4.1.679"
-"Software Clearing House"			"1.3.6.1.4.1.680"
-"Antlow Computers LTD."				"1.3.6.1.4.1.681"
-"Emcom Corp."						"1.3.6.1.4.1.682"
-"Extended Systems, Inc."			"1.3.6.1.4.1.683"
-"Sola Electric"						"1.3.6.1.4.1.684"
-"Esix Systems, Inc."				"1.3.6.1.4.1.685"
-"3M/MMM"							"1.3.6.1.4.1.686"
-"Cylink Corp."						"1.3.6.1.4.1.687"
-"Znyx Advanced Systems Division, Inc."		"1.3.6.1.4.1.688"
-"Texaco, Inc."						"1.3.6.1.4.1.689"
-"McCaw Cellular Communication Corp."		"1.3.6.1.4.1.690"
-"ASP Computer Product Inc."			"1.3.6.1.4.1.691"
-"HiPerformance Systems"				"1.3.6.1.4.1.692"
-"Regionales Rechenzentrum"			"1.3.6.1.4.1.693"
-"SAP AG"							"1.3.6.1.4.1.694"
-"ElectroSpace System Inc."			"1.3.6.1.4.1.695"
-"Central Point Software"			"1.3.6.1.4.1.696"
-"MultiPort Software"				"1.3.6.1.4.1.697"
-"Combinet, Inc."					"1.3.6.1.4.1.698"
-"TSCC"								"1.3.6.1.4.1.699"
-"Teleos Communications Inc."		"1.3.6.1.4.1.700"
-"Alta Research"						"1.3.6.1.4.1.701"
-"Independence Blue Cross"			"1.3.6.1.4.1.702"
-"ADACOM Station Interconnectivity LTD."		"1.3.6.1.4.1.703"
-"MIROR Systems"						"1.3.6.1.4.1.704"
-"Merlin Gerin"						"1.3.6.1.4.1.705"
-"Owen-Corning Fiberglas"			"1.3.6.1.4.1.706"
-"Talking Networks Inc."				"1.3.6.1.4.1.707"
-"Cubix Corporation"					"1.3.6.1.4.1.708"
-"Formation Inc."					"1.3.6.1.4.1.709"
-"Lannair Ltd"						"1.3.6.1.4.1.710"
-"LightStream Corp"					"1.3.6.1.4.1.711"
-"LANart Corp"						"1.3.6.1.4.1.712"
-"University of Stellenbosch"		"1.3.6.1.4.1.713"
-"Wyse Technology"					"1.3.6.1.4.1.714"
-"DSC Communications Corp."			"1.3.6.1.4.1.715"
-"NetEc"								"1.3.6.1.4.1.716"
-"Breltenbach Software Engineering"	"1.3.6.1.4.1.717"
-"Victor Company Of Japan,Limited"	"1.3.6.1.4.1.718"
-"Direx America"						"1.3.6.1.4.1.719"
-"NECSY Network Control Systems S.p.A."	"1.3.6.1.4.1.720"
-"ISDN Systems Corp."				"1.3.6.1.4.1.721"
-"Zero-One Technologies, LTD"		"1.3.6.1.4.1.722"
-"Radix Technologies, Inc."			"1.3.6.1.4.1.723"
-" National Institute of Standards and Technology"		"1.3.6.1.4.1.724"
-"Digital Technology Inc."			"1.3.6.1.4.1.725"
-"Castelle Corp."					"1.3.6.1.4.1.726"
-"Presticom Inc."					"1.3.6.1.4.1.727"
-"Showa Electric Wire & Cable Co., Ltd."		"1.3.6.1.4.1.728"
-"SpectraGraphics"					"1.3.6.1.4.1.729"
-"ACSYS Inc."						"1.3.6.1.4.1.730"
--- a/usr/src/cmd/agents/snmp/snmprelayd/mapfile-intf	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-#	usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-$mapfile_version 2
-
-# snmpdx provides a couple of libssagent.so.1 functions.
-SYMBOL_SCOPE {
-	global:
-		default_config_file;
-		default_error_file;
-		default_sec_config_file;
-		node_table;
-		agent_end;
-		agent_select_info;
-		agent_select_callback;
-		agent_loop;
-		agent_init;
-};
--- a/usr/src/cmd/agents/snmp/snmprelayd/mib_handler.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1832 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <stdlib.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-
-#include "snmpdx_stub.h"
-#include "agent.h"
-#include "subtree.h"
-#include "res.h"
-#include "sh_table.h"
-
-#include "dispatcher.h"
-
-
-typedef void (*SapDelFunc)(char* t);
-typedef char* (*SapAllocFunc)();
-typedef char* (*SapFirstEntryFunc)();
-typedef int (*SapChkEntryFunc)(char* t);
-typedef int (*SapModifyEntryFunc)(int pass,char* t,int offset,Integer num,String *str, Oid *name);
-typedef int (*SapAddEntryFunc)(char *t);
-typedef int (*SapMatchIndexFunc)(Integer index, char* t);
-typedef int (*SapMatchDoubleIndexFunc)(Integer index, Integer index2, char* t);
-typedef int (*SapIndexOffsetFunc)();
-typedef int (*SapIndexOffsetFunc2)();
-typedef char* (*SapAdvanceFunc)(char *t);
-typedef int (*SapIndexFunc)(char *t);
-typedef int (*SapIndexFunc2)(char *t);
-typedef char* (*SapCloneFunc)(char *t);
-
-#define SAP_ST_INACTIVE 0
-#define SAP_ST_ERR 1
-#define SAP_ST_ACTIVE 2
-
-#define DEFAULT_SAP_TBL_INC_SIZE 100
-#define SAP_TBL_SUCCESS 1
-#define SAP_TBL_FAIL 0
-#define SAP_INVALID_INDEX -1
-#define SAP_TBL_ENTRY_VALID 1
-
-extern int read_agent_acl (SapResource *);
-/** Table **/
-/** Current impl, fix array size */
-typedef struct _SapTable {
-	int size;
-	char *next;
-	char *first;
-	SapDelFunc del;
-	SapAllocFunc alloc;
-	SapCloneFunc clone;
-	SapFirstEntryFunc first_entry;
-	SapChkEntryFunc chk_entry;
-	SapAddEntryFunc	add_entry;
-	SapModifyEntryFunc modify_entry;
-	SapMatchIndexFunc match_index;
-	SapMatchDoubleIndexFunc match_double_index;
-	SapIndexOffsetFunc index_offset;
-	SapIndexOffsetFunc2 index_offset_2;
-	SapAdvanceFunc advance_entry;
-	SapIndexFunc index;
-	SapIndexFunc2 index_2;
-} SapTable;
-
-/****** AgentTable private Info *****/
-void free_Agent(char *t);
-char* alloc_Agent();
-char* clone_Agent();
-int chk_Agent(char* t);
-char* first_entry_Agent();
-int modify_entry_Agent(int pass,char *t,int offset, Integer num, String *str,
-				  Oid *name);
-int match_index_Agent(Integer index, char* t);
-int match_double_index_Agent(Integer index, Integer index2, char* t);
-int index_offset_agent();
-int index_offset_2_Agent();
-int add_entry_Agent(char* t);
-char* advance_entry_Agent(char* t);
-int index_agent(char *t);
-int index_2_Agent(char *t);
-static SapTable agent_tbl = { 0, 0, 0, 
-		free_Agent,alloc_Agent,clone_Agent,
-		first_entry_Agent,
-		chk_Agent,
-		add_entry_Agent,
-		modify_entry_Agent,
-		match_index_Agent,
-		match_double_index_Agent,
-		index_offset_agent, 
-		index_offset_2_Agent,
-		advance_entry_Agent,
-		index_agent, 
-		index_2_Agent};
-
-/***** AgentEntry Specific MACRO ****/
-#define OFFSET_AGENT_ID 1
-#define OFFSET_AGENT_STATUS 2
-#define OFFSET_AGENT_TIME_OUT 3
-#define OFFSET_AGENT_PORT_NUMBER 4
-#define OFFSET_AGENT_PERSONAL_FILE 5
-#define OFFSET_AGENT_CONFIG_FILE 6
-#define OFFSET_AGENT_EXECUTABLE 7
-#define OFFSET_AGENT_VERSION_NUM 8
-#define OFFSET_AGENT_PROCESS_ID 9
-#define OFFSET_AGENT_AGENT_NAME 10
-#define OFFSET_AGENT_SYSTEM_UP_TIME 11
-#define OFFSET_AGENT_WATCH_DOG_TIME 12
-/***** AgentEntry Specific MACRO ****/
-
-/****** AgentTable private Info *****/
-
-
-/****** RegTreeTable private Info *****/
-void free_Subtree(char *t);
-char* alloc_Subtree();
-char* clone_Subtree();
-int chk_Subtree(char* t);
-char* first_entry_Subtree();
-int modify_entry_Subtree(int pass,char *t,int offset, Integer num, String *str,
-				 Oid *name);
-int match_index_Subtree(Integer index, char* t);
-int match_double_index_Subtree(Integer index, Integer index2, char* t);
-int index_offset_Subtree();
-int index_offset_2_Subtree();
-int add_entry_Subtree(char* t);
-char* advance_entry_Subtree(char* t);
-int index_Subtree(char *t);
-int index_2_Subtree(char *t);
-static SapTable reg_tree_tbl = { 0, 0, 0, 
-		free_Subtree,alloc_Subtree,clone_Subtree,
-		first_entry_Subtree,
-		chk_Subtree,
-		add_entry_Subtree,
-		modify_entry_Subtree,
-		match_index_Subtree,
-		match_double_index_Subtree,
-		index_offset_Subtree, 
-		index_offset_2_Subtree,
-		advance_entry_Subtree,
-		index_Subtree, 
-		index_2_Subtree};
-
-/***** RegTreeTable Specific MACRO ****/
-#define OFFSET_REGTREE_INDEX 1
-#define OFFSET_REGTREE_ID	2
-#define OFFSET_REGTREE_OID	3
-#define OFFSET_REGTREE_STATUS	4
-/***** RegTreeTable Specific MACRO ****/
-
-/****** RegTblTable private Info *****/
-void free_Table(char *t);
-char* alloc_Table();
-char* clone_Table();
-int chk_Table(char* t);
-char* first_entry_Table();
-int modify_entry_Table(int pass,char *t,int offset, Integer num, String *str,
-				 Oid *name);
-int match_index_Table(Integer index, char* t);
-int match_double_index_Table(Integer index, Integer index2, char* t);
-int index_offset_Table();
-int index_offset_2_Table();
-int add_entry_Table(char* t);
-char* advance_entry_Table(char* t);
-int index_Table(char *t);
-int index_2_Table(char *t);
-static SapTable reg_tbl_tbl = { 0, 0, 0, 
-		free_Table,alloc_Table,clone_Table,
-		first_entry_Table,
-		chk_Table,
-		add_entry_Table,
-		modify_entry_Table,
-		match_index_Table,
-		match_double_index_Table,
-		index_offset_Table,
-		index_offset_2_Table,
-		advance_entry_Table,
-		index_Table,
-		index_2_Table};
-
-/***** RegTblTbl Specific MACRO ****/
-#define OFFSET_REG_TBL_INDEX	1
-#define OFFSET_REG_TBL_AGENT_ID	2
-#define OFFSET_REG_TBL_OID	3
-#define OFFSET_REG_TBL_SCOL	4
-#define OFFSET_REG_TBL_ECOL	5
-#define OFFSET_REG_TBL_SROW	6
-#define OFFSET_REG_TBL_EROW	7
-#define OFFSET_REG_TBL_STATUS	8
-/***** RegTblTbl Specific MACRO ****/
-
-
-
-/****** RegTreeTable private Info *****/
-
-/***********/
-
-int sync_agent_acl (Agent * agent)
-{
-	SapResource * rp;
-	if (agent == NULL) {
-		return 0;
-	}
-	read_agent_files (agent);
-	return 0;
-}
-
-/*** string equal ***/
-int string_equal(String *string1, String *string2)
-{
-  int i;
-  if(string1 == NULL && string2 == NULL) return 1;
-  if(string1 == NULL || string2 == NULL) return 0;
-  if(string1->len == string2->len){
-	for(i=0;i<string1->len;i++){
-		if(string1->chars[i] != string2->chars[i])
-			return 0;
-	}
-	return 1;
-  }
-  return 0;
-}
-
-int cpy_2_char_and_string(String* dst1, String *src, char** dst2)
-{
-  if(dst1->chars) free(dst1->chars);
-  dst1->chars = NULL;
-  dst1->len = 0;
-  if((*dst2)) free((*dst2));
-  *dst2 = NULL;
-  if(src->len !=0 && src->chars ){
-	if( (dst1->chars = (u_char *)malloc(src->len)) == NULL)
-		return 0;
-  	memcpy(dst1->chars,src->chars,src->len);
-	dst1->len = src->len;
-  	if( ((*dst2) = (char*)malloc((src->len+1)* sizeof(char))) == NULL )
-		return 0;
-  	strncpy((*dst2),(char*)src->chars,src->len);
-	(*dst2)[src->len]='\0';
-  }
-  return 1;	
-}
-
-int cpy_2_string(String* dst1, String *src)
-{
-  if(dst1->chars) free(dst1->chars);
-  dst1->chars = NULL;
-  dst1->len = 0;
-  if(src->len !=0 || src->chars ){
-	if( (dst1->chars = (u_char *)malloc(src->len)) == NULL)
-		return 0;
-  	memcpy(dst1->chars,src->chars,src->len);
-	dst1->len = src->len;
-  }
-  return 1;	
-}
-/************************/
-
-/***** AgentEntry Specific routines ****/
-
-char* first_entry_Agent()
-{
-  return((char*)first_agent);
-}
-
-int add_entry_Agent(char* t)
-{
-	Agent *entry = (Agent*) t;
-	Agent *last = NULL;
-
-	if (first_agent == NULL){
-		entry->next_agent = NULL;
-		first_agent = entry;
-	} else {
-		last = first_agent;
-		while (last->next_agent != NULL)
-			last = last->next_agent;
-		last->next_agent = entry;
-	}
-	return (SAP_TBL_SUCCESS);
-}
-
-/* a hack: assume the index is integer */
-int index_agent(char* t)
-{
-	Agent *entry = (Agent*) t;
-	if(entry==NULL) return 0;
-	return(entry->agentID);
-}
-
-int index_2_Agent(char *t)
-{
-	return 0;
-}
-
-int modify_entry_Agent(int pass,char *t, int offset, Integer num, String *str,
-				  Oid *name)
-{
-	int res=1;
-	Agent *entry = (Agent*) t;
- 	Subtree *sp;
-
-  	if(entry==NULL) return 0;
-
-	switch(offset){
-	  case OFFSET_AGENT_PORT_NUMBER: 
-	        if(pass==FIRST_PASS) return(res);
-		/* policy: once the port is bind, may not allow it
-		   to bind to another port. If allow, need unbind and
-		   rebind */
-		entry->agentPortNumber = entry->address.sin_port = num; 
-		/* Bug fix 4145620 - The subagents listen on the loopback driver */
-  		entry->address.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
-
-		break;
-	  case OFFSET_AGENT_AGENT_NAME:
-	        if(pass==FIRST_PASS) return(res);
-		res = cpy_2_char_and_string(&(entry->agentName),str,&(entry->name));
-		/* TODO: sync the agent's ACL with the resource list here */
-		sync_agent_acl (entry);
-		break;
-	  case OFFSET_AGENT_TIME_OUT: 
-		/* for timeout > relay_agent_max_agent_time_out
-	 	 * we reset it to relay_agent_max_agent_time_out
- 		 */
-	        if(pass==FIRST_PASS) return(res);
-		if(num>relay_agent_max_agent_time_out){
-			entry->agentTimeOut = entry->timeout = 
-				relay_agent_max_agent_time_out;
-		}else{
-			entry->agentTimeOut = entry->timeout = num; 
-		}
-		break;
-
-	  case OFFSET_AGENT_ID: 
-		/* may not be allowd to change */
-		entry->agentID = num; break;
-	  case OFFSET_AGENT_STATUS: 
-		/* valid state transistion for user:
-		 * inactive-> any state except inactive
-  		 * active-> inactive, destroy except active
-		 */
-		if(entry->agentStatus == num) break;
-		if(pass==SECOND_PASS){
-			entry->agentStatus = num; 
-			sync_subtrees_with_agent(entry);
-		}
-		if(num==SSA_OPER_STATUS_ACTIVE){
-		   	if(pass==SECOND_PASS)
-		 	  activate_table_for_agent(entry);
-		}else if(num==SSA_OPER_STATUS_NOT_IN_SERVICE){
-		}else if(num==SSA_OPER_STATUS_DESTROY){
-			/* destroy the table before the subtree */
-			if(pass==FIRST_PASS &&
-			   entry->agentStatus == SSA_OPER_STATUS_INIT)
-				return(0);
-		   	if(pass==SECOND_PASS)
-			  agent_destroy(entry);
-		}else return(0); 
-		break;
-	  case OFFSET_AGENT_PROCESS_ID: 
-	        if(pass==FIRST_PASS) return(res);
-		entry->agentProcessID = num; break;
-	  case OFFSET_AGENT_PERSONAL_FILE: 
-	        	if(pass==FIRST_PASS) return(res);
-			res = cpy_2_string(&(entry->agentPersonalFile),str);
-			break;
-	  case OFFSET_AGENT_CONFIG_FILE:
-	        	if(pass==FIRST_PASS) return(res);
-			res = cpy_2_string(&(entry->agentConfigFile),str);
-			break;
-	  case OFFSET_AGENT_EXECUTABLE:
-	        	if(pass==FIRST_PASS) return(res);
-			res = cpy_2_string(&(entry->agentExecutable),str);
-			break;
-	  case OFFSET_AGENT_VERSION_NUM:
-	        	if(pass==FIRST_PASS) return(res);
-			res = cpy_2_string(&(entry->agentVersionNum),str);
-			break;
-	  case OFFSET_AGENT_SYSTEM_UP_TIME:
-	        	if(pass==FIRST_PASS) return(res);
-			entry->agentSystemUpTime = num; break;
-	  case OFFSET_AGENT_WATCH_DOG_TIME:
-	        	if(pass==FIRST_PASS) return(res);
-			entry->agentWatchDogTime = num; break;
-	}
-	return res;
-}
-
-void free_Agent(char* t)
-{
-  Agent *tmp=(Agent *)t;
-  if(tmp==NULL) return;
-  free(tmp);
-}
-
-char* alloc_Agent()
-{
-  char* t;
-  if(t = (char*)calloc(1,sizeof(Agent))){
-	 ((Agent*)t)->agentStatus = SSA_OPER_STATUS_INIT;
-	 return t;
-  }
-  return NULL;
-}
-
-char* clone_Agent(char* orig)
-{
-  /* image copy */
-  char* t;
-  if(t = (char*)calloc(1,sizeof(Agent))){
-	 memcpy(t,orig,sizeof(Agent));
-	 return t;
-  }
-  return NULL;
-}
-
-int chk_Agent(char* t)
-{
-  Agent *entry=(Agent *)t;
-  if(entry == NULL) return SAP_TBL_FAIL;
-  return SAP_TBL_SUCCESS;
-}
-
-int match_index_Agent(Integer index, char* t)
-{
-  Agent *entry = (Agent *)t;
-  if(chk_Agent(t) == SAP_TBL_SUCCESS)
-	if(entry->agentID == index)
-		return SAP_TBL_SUCCESS;
-  return SAP_TBL_FAIL;
-}
-
-int match_double_index_Agent(Integer index1, Integer index2, char* t)
-{
-  return SAP_TBL_FAIL;
-}
-
-int index_offset_agent()
-{
-	return(OFFSET_AGENT_ID);
-}
-int index_offset_2_Agent()
-{
-	return(-1);
-}
-
-char* advance_entry_Agent(char* t)
-{
-  Agent *entry = (Agent*) t, *i;
-  if(entry==NULL) return (NULL);
-  for(i=entry->next_agent;i;i=i->next_agent){
-	if(chk_Agent((char*)i) == SAP_TBL_SUCCESS) return((char*)i);
-  }
-  return(NULL);
-}
-
-
-/***** AgentEntry Specific routines ****/
-
-/***** RegTreeEntry Specific routines ***/
-char* first_entry_Subtree()
-{
-  return((char*)first_subtree);
-}
-
-char* advance_entry_Subtree(char* t)
-{
-  Subtree *entry = (Subtree*) t, *i;
-  if(entry==NULL) return (NULL);
-  for(i=entry->next_subtree;i;i=i->next_subtree){
-	if(chk_Subtree((char*)i) == SAP_TBL_SUCCESS) return((char*)i);
-  }
-  return(NULL);
-}
-
-int add_entry_Subtree(char* t)
-{
-  /* can't register a subtree with agent */
-  Subtree *entry = (Subtree*) t, *sp, *last=NULL;
-  int ret;
-
-  if(entry == NULL ) return SAP_TBL_FAIL;
-  if(entry->agent == NULL && entry->regTreeAgentID > 0){
-	/* initialize the agent */
-	if( (entry->agent = agent_find_by_id(entry->regTreeAgentID))==NULL)
-		return SAP_TBL_FAIL;
-  }
-
-  /* if name not exist, insert is not allowed */
-
-        for(sp = first_subtree; sp; sp = sp->next_subtree)
-        {
-                ret = SSAOidCmp(&(entry->name), &(sp->name));
-                if(ret == 0)
-                {
-			/* for duplication registration of oid,
-			   replace the current one */
-			subtree_detach(sp);
-			subtree_free(sp);
-			break;
-                }
-                else
-                if(ret < 0)
-                {
-                        break;
-                }
- 
-                last = sp;
-        }
-
-
-  if(last == NULL){
-	entry->next_subtree = first_subtree;
-	first_subtree = entry;
-  }else{
-	entry->next_subtree = last->next_subtree;
-	last->next_subtree = entry;
-  }
-  return SAP_TBL_SUCCESS;
-}
-
-int index_Subtree(char *t)
-{
-	Subtree *entry = (Subtree*) t;
-	if(entry == NULL) return 0;
-	return(entry->regTreeAgentID);
-}
-
-int index_2_Subtree(char *t)
-{
-/* no longer used */
-	Subtree *entry = (Subtree*) t;
-	if(entry == NULL) return 0;
-	return(entry->regTreeIndex);
-}
-
-
-/*
- * If the pass is FIRST_PASS, this function is called when the entry
- * exits. It may not be allowed to overwrite some fields.
- */
-int modify_entry_Subtree(int pass, char *t,int offset, Integer num, String *str,
-				 Oid *name)
-{
-	int res = 1;
-	Subtree *entry = (Subtree*) t;
-	if(entry==NULL) return 0;
-	switch(offset){
-	  case OFFSET_REGTREE_ID: /* need to detach and reattach */
-	    if(pass==SECOND_PASS){
-		if(entry->agent && entry->agent->agentID != num){ /* detach */
-			subtree_remove_from_agent_list(entry);
-		}
-		if(entry->agent == NULL){ /*attach a new one */
-		  if( (entry->agent=agent_find_by_id(num)) != NULL){
-			entry->next_agent_subtree = entry->agent->first_agent_subtree;
-			entry->agent->first_agent_subtree = entry;
-		  }
-		}
-	    }
-	    entry->regTreeAgentID = num; break;
-	  case OFFSET_REGTREE_STATUS: 
-		if(pass==FIRST_PASS){ 
-			/* don't allow user to destroy tree object which
-			   belongs to table */
-			if(entry->tbl_tag !=NULL  &&
-			   entry->tbl_tag->table != NULL)
-				return 0;
-			if(entry->name.subids == NULL ||
-			   entry->name.len == 0)
-				return 0;
-			entry->regTreeStatus = num; 
-			break;
-		}
-		/* (mibpatch) if entry->mirrorTag == NULL
- 		   create a new mirror_table */
-		if(entry->mirror_tag==NULL)
-			create_mirror_table_from_subtree((Subtree*)entry);
-
-		/* if status is not-in-service, we may destroy
-		   this entry */
-		if(num==SSA_OPER_STATUS_NOT_IN_SERVICE){
-		   if(entry->regTreeStatus == SSA_OPER_STATUS_ACTIVE){
-			/* (mibpatch) delete the mirror_table, don't use
-			   delete_table call */
-			if(entry->mirror_tag!=NULL){
-			  if(entry->mirror_tag->table){
-				table_detach(entry->mirror_tag->table);
-				table_free(entry->mirror_tag->table);
-			  }
-			}
-			subtree_detach(entry);
-			subtree_free(entry);
-                        break;
-		   }
-		}
-		entry->regTreeStatus = num; 
-		/* (mibpatch) if there exists corresponding table,
-		 if(entry->mirrorTag!=NULL) update the table status */
-		if(entry->mirror_tag!=NULL && entry->mirror_tag->table!=NULL)
-			entry->mirror_tag->table->regTblStatus = num;
-		break;
-	  case OFFSET_REGTREE_INDEX: 
-	    if(pass==SECOND_PASS){
-		/* this may not be changed */
-		if(entry->agent != NULL) 
-		  entry->agent->agentTreeIndex = 
-			(num>entry->agent->agentTreeIndex? num :
-			 entry->agent->agentTreeIndex);
-	    }
-	    entry->regTreeIndex = num; break;
-	  case OFFSET_REGTREE_OID: 
-		/* don't allow to change any established oid */
-		if(entry->tbl_tag !=NULL  &&
-		   entry->tbl_tag->table != NULL)
-			return 0;
-		if(entry->name.subids != NULL &&
-		   entry->name.len != 0)
-			return 0;
-		SSAOidZero(&(entry->name));
-		SSAOidCpy(&(entry->name),name,error_label);
-		break;
-	}
-	return(res);
-}
-
-void free_Subtree(char* t)
-{
-  Subtree *tmp=(Subtree *)t;
-  if(tmp==NULL) return;
-  if(tmp->name.subids!=NULL && tmp->name.len!=0)
-  	SSAOidZero(&(tmp->name));
-  free(tmp);
-}
-
-char* alloc_Subtree()
-{
-  char* t;
-  if(t = (char*)calloc(1,sizeof(Subtree))){ 
-	((Subtree*)t)->regTreeStatus = SSA_OPER_STATUS_NOT_IN_SERVICE;
-	return t;
-  }
-  return NULL;
-}
-
-char* clone_Subtree(Subtree *tree)
-{
-  Subtree *t;
-  if(t = (Subtree *)calloc(1,sizeof(Subtree))){ 
-	memcpy(t,tree,sizeof(Subtree));
-	t->name.subids = NULL;
-	t->name.len = 0;
-	SSAOidCpy(&(t->name),&(tree->name),error_label);
-	return ((char *)t);
-  }
-  return NULL;
-}
-
-int chk_Subtree(char* t)
-{
-  Subtree *entry=(Subtree *)t;
-  if(entry == NULL) return SAP_TBL_FAIL;
-  return SAP_TBL_SUCCESS;
-}
-
-int match_index_Subtree(Integer index, char* t)
-{
-  Subtree *entry = (Subtree *)t;
-  if(chk_Subtree(t) == SAP_TBL_SUCCESS)
-        if(entry->regTreeIndex == index)
-                return SAP_TBL_SUCCESS;
-  return SAP_TBL_FAIL;
-}
-
-int match_double_index_Subtree(Integer index1, Integer index2,  char* t)
-{
-  Subtree *entry = (Subtree *)t;
-  if(chk_Subtree(t) == SAP_TBL_SUCCESS)
-        if(entry->regTreeAgentID == index1 && entry->regTreeIndex == index2)
-                return SAP_TBL_SUCCESS;
-  return SAP_TBL_FAIL;
-}
-
-int index_offset_Subtree()
-{
-	return(OFFSET_REGTREE_ID);
-}
-int index_offset_2_Subtree()
-{
-/* no longer used */
-	return(OFFSET_REGTREE_INDEX);
-}
-/***** RegTreeEntry Specific routines ***/
-
-
-/***** RegTblEntry Specific routines ***/
-char* first_entry_Table()
-{
-  return((char*)first_table);
-}
-
-char* advance_entry_Table(char* t)
-{
-  Table *entry = (Table*) t, *i;
-  if(entry==NULL) return (NULL);
-  for(i=entry->next_table;i;i=i->next_table){
-	if(chk_Table((char*)i) == SAP_TBL_SUCCESS) return((char*)i);
-  }
-  return(NULL);
-}
-
-static int tblcmp(Table* t1,Table* t2)
-{
-  if( 	(t1->first_column_subid == t2->first_column_subid) &&
-      	(t1->last_column_subid == t2->last_column_subid) &&
-	(t1->first_index_subid == t2->first_index_subid) &&
-	(t1->last_index_subid == t2->last_index_subid) )	      
-		return 0;
-  return 1;
-     
-}
-
-
-int add_entry_Table(char* t)
-{
-  Table *entry = (Table*) t, *sp, *last=NULL;
-  int ret;
-
-  if(entry == NULL ) return SAP_TBL_FAIL;
-  if(entry->agent == NULL && entry->regTblAgentID > 0){
-	/* initialize the agent */
-	if( (entry->agent = agent_find_by_id(entry->regTblAgentID))==NULL)
-		return SAP_TBL_FAIL;
-  }
-
-        for(sp = first_table; sp; sp = sp->next_table)
-        {
-		ret = tblcmp(entry,sp);
-                if(ret == 0)
-                {
-			/* for duplication registration of oid,
-			   replace the current one */
-			delete_table(sp);
-			break;
-                }
- 
-                last = sp;
-        }
-
-
-  if(last == NULL){
-	entry->next_table = first_table;
-	first_table = entry;
-  }else{
-	entry->next_table = last->next_table;
-	last->next_table = entry;
-  }
-
-  return SAP_TBL_SUCCESS;
-}
-
-int index_Table(char *t)
-{
-	Table *entry = (Table*) t;
-	if(entry == NULL) return 0;
-	return(entry->regTblAgentID);
-}
-
-int index_2_Table(char *t)
-{
-	Table *entry = (Table*) t;
-	if(entry == NULL) return 0;
-	return(entry->regTblIndex);
-}
-
-static int table_is_incomplete(Table *t)
-{
-  /* (mibpatch) don't know what to do */
-  if(t->mirror_flag==1) return FALSE;
-  if(t->first_column_subid==0 || t->last_column_subid==0 ||
-     t->first_index_subid==0 || t->last_index_subid==0)
-	return TRUE;
-  return FALSE;
-}
-
-/*
- * If the pass is FIRST_PASS, this function is called when the entry
- * exits. It may not be allowed to overwrite some fields.
- */
-int modify_entry_Table(int pass, char *t,int offset, Integer num, String *str,
-				 Oid *name)
-{
-	int res = 1;
-	Table *entry = (Table*) t;
-	if(entry==NULL) return 0;
-	switch(offset){
-
-	  case OFFSET_REG_TBL_INDEX: 
-		/* this may not be changed */
-		if(pass==SECOND_PASS){
-		  if(entry->agent != NULL) 
-		    entry->agent->agentTblIndex = 
-			(num>entry->agent->agentTblIndex? num :
-			 entry->agent->agentTblIndex);
-		}
-		entry->regTblIndex = num; break;
-
-	  case OFFSET_REG_TBL_AGENT_ID: /* need to detach and reattach */
-		if(pass==SECOND_PASS){ 
-		  if(entry->agent == NULL){ /*attach a new one */
-		    entry->agent=agent_find_by_id(num);
-		  }
-		}
-		entry->regTblAgentID = num; break;
-
-	  case OFFSET_REG_TBL_OID: 
-		/* this oid can be set up once, no replacement */
-		if(pass==FIRST_PASS){
-		  /* if table is complete, user can't change the table */
-		  if(entry->name.subids !=NULL &&
-		     entry->name.len !=0) return 0;
-		  if(table_is_incomplete(entry)==TRUE) return res;
-		  return 0;
-		}
-		if(pass==SECOND_PASS){ 
-		  SSAOidZero(&(entry->name));
-		  SSAOidCpy(&(entry->name),name,error_label);
-		}
-		break;
-
-	 case OFFSET_REG_TBL_SCOL:
-		if(table_is_incomplete(entry)){
-			entry->first_column_subid = num;
-		}else
-			return(0);
-		break;
-
-	 case OFFSET_REG_TBL_ECOL:
-		if(table_is_incomplete(entry)){
-			entry->last_column_subid = num;
-		}else
-			return(0);
-		break;
-
-	 case OFFSET_REG_TBL_SROW:
-		if(table_is_incomplete(entry)){
-			entry->first_index_subid = num;
-		}else
-			return(0);
-		break;
-
-	 case OFFSET_REG_TBL_EROW:
-		if(table_is_incomplete(entry)){
-			entry->last_index_subid = num;
-		}else
-			return(0);
-		break;
-
-
-	 case OFFSET_REG_TBL_STATUS: 
-		/* destroy the table or add the table */
-		if(pass==FIRST_PASS){
-		  if(table_is_incomplete(entry) == TRUE) return 0;
-		  if( entry->regTblStatus == SSA_OPER_STATUS_ACTIVE &&
-		       num==SSA_OPER_STATUS_ACTIVE ) return 0;
-		  if( (entry->regTblStatus == SSA_OPER_STATUS_ACTIVE &&
-		       num==SSA_OPER_STATUS_NOT_IN_SERVICE) ||
-		      (entry->regTblStatus==SSA_OPER_STATUS_NOT_IN_SERVICE &&
-		       num==SSA_OPER_STATUS_ACTIVE) )
-				return(res);
-		  if(single_table_to_subtrees(
-			TABLE_TO_OID_TRY,entry,error_label) != -1)
-				return(res);
-			return 0;
-		}
-
-		/* second pass */
-		if(num==SSA_OPER_STATUS_ACTIVE){
-		  if(entry->regTblStatus == SSA_OPER_STATUS_ACTIVE) return 0;
-		  if(single_table_to_subtrees
-		     (TABLE_TO_OID_TRY,entry,error_label) != -1 &&
-		     single_table_to_subtrees
-			(TABLE_TO_OID_GO,entry,error_label) != -1 &&
-		     activate_table(entry) != -1)
-		  {
-			/* (mibpatch) if table is mirror, set the
-			   subtree status to active */
-		  }
-		}else if(num==SSA_OPER_STATUS_NOT_IN_SERVICE){
-		  /* destroy the table */
-		  if(entry->regTblStatus == SSA_OPER_STATUS_ACTIVE)
-		  	delete_table(entry);
-		  else
-		     single_table_to_subtrees(TABLE_TO_OID_GO,entry,error_label);
-		}
-		entry->regTblStatus = num; 
-	}
-	return(res);
-}
-
-void free_Table(char* t)
-{
-  Table *tmp=(Table *)t;
-  if(tmp==NULL) return;
-  free(tmp);
-}
-
-char* alloc_Table()
-{
-  char* t;
-  if(t = (char*)calloc(1,sizeof(Table))){ 
-	((Table*)t)->regTblStatus = SSA_OPER_STATUS_NOT_IN_SERVICE;
-	return t;
-  }
-  return NULL;
-}
-
-char* clone_Table(char* table)
-{
-  char* t;
-  if(t = (char*)calloc(1,sizeof(Table))){ 
-	memcpy(t,table,sizeof(Table));
-	return t;
-  }
-  return NULL;
-}
-
-int chk_Table(char* t)
-{
-  Table *entry=(Table *)t;
-  if(entry == NULL) return SAP_TBL_FAIL;
-  return SAP_TBL_SUCCESS;
-}
-
-int match_index_Table(Integer index, char* t)
-{
-  Table *entry = (Table *)t;
-  if(chk_Table(t) == SAP_TBL_SUCCESS)
-        if(entry->regTblIndex == index)
-                return SAP_TBL_SUCCESS;
-  return SAP_TBL_FAIL;
-}
-
-int match_double_index_Table(Integer index1, Integer index2,  char* t)
-{
-  Table *entry = (Table *)t;
-  if(chk_Table(t) == SAP_TBL_SUCCESS)
-        if(entry->regTblAgentID == index1 && entry->regTblIndex == index2)
-                return SAP_TBL_SUCCESS;
-  return SAP_TBL_FAIL;
-}
-
-int index_offset_Table()
-{
-	return(OFFSET_REG_TBL_AGENT_ID);
-}
-int index_offset_2_Table()
-{
-	return(OFFSET_REG_TBL_INDEX);
-}
-
-
-/***** RegTblEntry Specific routines ***/
-
-
-/***********************************************************/
-void tbl_init(SapTable *this)
-{
-  if(this) this->first = (*this->first_entry)();
-  /* point to the first of the list */
-}
-
-void tbl_free(SapTable *this)
-{
-  if(this) (*this->del)((char*)this->first);
-  /* free out the list */
-}
-
-
-int tbl_add_entry(SapTable *this, char *entry)
-{
-  if(this == NULL) return SAP_TBL_FAIL;
-  if(this) tbl_init(this);
-  return((*this->add_entry)(entry));
- /* add entry to the list */
-}
-
-char *tbl_search(SapTable *this, Integer AgentID)
-{
-  char* t; 
-  if(this == NULL) return(NULL);
-  if(this) tbl_init(this);
-  for(t=this->first;t;){
-	if((*this->match_index)(AgentID,t) ==
-	   SAP_TBL_SUCCESS)
-		return t;
-	t = (*this->advance_entry)(t);
-  }
-  return(NULL);
-  /* call the search */
-}
-
-char *tbl_search_2(SapTable *this, Integer AgentID, Integer index2)
-{
-  char* t; 
-  if(this == NULL) return(NULL);
-  if(this) tbl_init(this);
-  for(t=this->first;t;){
-    if((*this->match_double_index)(AgentID,index2,t) ==
-	   SAP_TBL_SUCCESS)
-		return t;
-	t = (*this->advance_entry)(t);
-  }
-  return(NULL);
-  /* call the search2 */
-}
-
-int tbl_avail_index(SapTable *this)
-{
-	return -1;
-  /* not required */
-}
-
-char *tbl_next_entry(SapTable *this, Integer AgentID)
-{
-  char* t; 
-  if(this == NULL) return(NULL);
-  if(this) tbl_init(this);
-  for(t=this->first;t;){
-    if((*this->match_index)(AgentID,t) == SAP_TBL_SUCCESS){
-	if( (*this->chk_entry)(t) != SAP_TBL_SUCCESS) return NULL;
-	return((*this->advance_entry)(t));
-    }
-    t = (*this->advance_entry)(t);
-  }
-  return(NULL);
-  /* call the next_entry */
-}
-
-char *tbl_next_entry_2(SapTable *this, Integer AgentID, Integer index2)
-{
-  char* t; 
-  if(this == NULL) return(NULL);
-  if(this) tbl_init(this);
-  for(t=this->first;t;){
-    if((*this->match_double_index)(AgentID,index2,t) == SAP_TBL_SUCCESS){
-	if( (*this->chk_entry)(t) != SAP_TBL_SUCCESS) return NULL;
-	return((*this->advance_entry)(t));
-    }
-    t = (*this->advance_entry)(t);
-  }
-  return(NULL);
-  /* call the next_entry */
-}
-
-char *tbl_first_entry(SapTable *this)
-{
-  char *t;
-  if(this == NULL ) return (NULL);
-  if(this) tbl_init(this);
-  t=this->first;
-  if( (*this->chk_entry)(t) == SAP_TBL_SUCCESS ) return(this->first);
-  return( (*this->advance_entry)(t) );
-  /* head of the list */
-}
-
-char* get_tbl_entry(SapTable *this, int search_type, int *snmp_error, Integer *AgentID)
-{
-	char *entry=NULL;
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if((entry = tbl_first_entry(this))
-			    == NULL)
-				*snmp_error = END_OF_TABLE;
-			/* update the index */
-			*AgentID = (*this->index)(entry);
-			break;
-		
-		case NEXT_ENTRY:
-			if((entry =
-		            tbl_next_entry(this,*AgentID))
-			  == NULL)
-				*snmp_error = END_OF_TABLE;
-			/* update the index */
-			*AgentID = (*this->index)(entry);
-			break;
-
-		case EXACT_ENTRY:
-			if( (entry =
-			     tbl_search(this,*AgentID)) 
-			  == NULL)
-				*snmp_error = SNMP_ERR_NOSUCHNAME;
-			break;
-	}
- 	return entry;
-}
-
-char* get_tbl_entry_2(SapTable *this, int search_type, int *snmp_error, Integer *AgentID, Integer *index2)
-{
-	char *entry=NULL;
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if((entry = tbl_first_entry(this))
-			    == NULL)
-				*snmp_error = END_OF_TABLE;
-			/* update the index */
-			*AgentID = (*this->index)(entry);
-			*index2 = (*this->index_2)(entry);
-			break;
-		
-		case NEXT_ENTRY:
-			if((entry =
-		            tbl_next_entry_2(this,*AgentID,*index2))
-			  == NULL)
-				*snmp_error = END_OF_TABLE;
-			/* update the index */
-			*AgentID = (*this->index)(entry);
-			*index2 = (*this->index_2)(entry);
-			break;
-
-		case EXACT_ENTRY:
-			if( (entry =
-			     tbl_search_2(this,*AgentID,*index2)) 
-			  == NULL)
-				*snmp_error = SNMP_ERR_NOSUCHNAME;
-			break;
-	}
- 	return entry;
-}
-
-/* Assumption: second phase comes after successful first phase
-   in second phase cleanup the clone created in first phase, 
-   if first phase fails, the clone is cleanup before return */ 
-/* side effect, if index doesn't exist, add a new row */
-int set_table_entry_field(SapTable *this, Integer AgentID, int pass, 
-		  	Integer *num, String *str, Oid *name, int offset)
-{
-	static char* entry=NULL;
-	static char* first_pass_entry=NULL;
-
-	if( (pass==FIRST_PASS && first_pass_entry!=NULL &&
-	     (*this->match_index)(AgentID,first_pass_entry)==SAP_TBL_FAIL) ||
-	    (pass==SECOND_PASS && first_pass_entry!=NULL) )
-	{
-		(*this->del)((char*)first_pass_entry);
-		first_pass_entry = NULL;
-	}
-	/* here, if first_pass_entry is not NULL => it points to the desired
-	   entry */
-
-	if( first_pass_entry==NULL && (entry = tbl_search(this,AgentID))==NULL){
-	  if((entry = (*this->alloc)())==NULL)
-		  	return SNMP_ERR_NOSUCHNAME;
-	  if(pass==FIRST_PASS)
-		first_pass_entry = entry;
-	  if((*this->modify_entry)(pass,
-			(pass==FIRST_PASS)?first_pass_entry:entry,
-			(*this->index_offset)(), AgentID,
-			NULL,NULL) == 0 ||
-	     (*this->modify_entry)(pass,
-			(pass==FIRST_PASS)?first_pass_entry:entry,
-			offset,
-			num?*num:0,str,name)==0){
-		  (*this->del)((char*)
-			(pass==FIRST_PASS)?first_pass_entry:entry);
-		  first_pass_entry = NULL;
-		  return SNMP_ERR_GENERR;
-	  }
-	  if(pass==SECOND_PASS){
-	    if(tbl_add_entry(this,entry) == SAP_TBL_FAIL){
-		  	(*this->del)((char*)entry);
-		 	return SNMP_ERR_GENERR;
-	    }
-	  }
-	}else{
-	  /* entry exists, may need to do some clean up */
-	  /* made a duplication */
-	  if(pass==FIRST_PASS){
-		if(first_pass_entry == NULL){
-		  if( (first_pass_entry = (*this->clone)(entry)) == NULL)
-			return SNMP_ERR_GENERR;
-		}
-	  }
-	  if((*this->modify_entry)(pass,
-			(pass==FIRST_PASS)?first_pass_entry:entry,
-			offset,num?*num:0,str,name)==0){
-			if(pass==FIRST_PASS)
-		  	  (*this->del)((char*)first_pass_entry);
-			first_pass_entry = NULL;
-		  	return SNMP_ERR_GENERR;
-	  }
-	}
-	entry = NULL;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_table_entry_field_2(SapTable *this, Integer AgentID, Integer index2,
-	 int pass, Integer *num, String *str, Oid *name, int offset)
-{
-	static char* entry=NULL;
-        static char* first_pass_entry=NULL;
-
-        if( (pass==FIRST_PASS && first_pass_entry!=NULL &&
-             (*this->match_double_index)(AgentID,index2,first_pass_entry)==SAP_TBL_FAIL) ||
-            (pass==SECOND_PASS && first_pass_entry!=NULL) )
-        {
-                (*this->del)((char*)first_pass_entry);
-                first_pass_entry = NULL;
-        }
-        /* here, if first_pass_entry is not NULL => it points to the desired
-           entry */
-
-	if( first_pass_entry==NULL && 
-	    (entry = tbl_search_2(this,AgentID,index2))==NULL){
-  		if( (entry = (*this->alloc)())==NULL)
-		  return SNMP_ERR_NOSUCHNAME;
-		if(pass==FIRST_PASS)
-			first_pass_entry = entry;
-		if((*this->modify_entry)(pass,
-			(pass==FIRST_PASS)?first_pass_entry:entry,
-			(*this->index_offset)(), AgentID,
-			NULL,NULL)==0 ||
-		(*this->modify_entry)(pass,
-			(pass==FIRST_PASS)?first_pass_entry:entry,
-			(*this->index_offset_2)(),index2,NULL,
-			NULL)==0 ||
-		 (*this->modify_entry)(pass,
-			(pass==FIRST_PASS)?first_pass_entry:entry,
-			offset,num?*num:0,str,name)==0){
-		  (*this->del)((char*)
-                        (pass==FIRST_PASS)?first_pass_entry:entry);
-		  return SNMP_ERR_GENERR;
-		}
-		if(pass==SECOND_PASS){
-			if(tbl_add_entry(this,entry) == SAP_TBL_FAIL){
-	  			(*this->del)((char*)entry);
-				return SNMP_ERR_GENERR;
-			}
-		}
-	}else{
-	  /* entry exists, may need to do some clean up */
-	  if(pass==FIRST_PASS){
-		/* clone the entry */
-	    if(first_pass_entry == NULL){
-		if( (first_pass_entry = (*this->clone)(entry)) == NULL)
-			return SNMP_ERR_GENERR;
-		  }
-	  }
-	  if( (*this->modify_entry)(pass,
-                        (pass==FIRST_PASS)?first_pass_entry:entry,
-			offset,num?*num:0,str,name)==0){
-			if(pass==FIRST_PASS)
-		  	  (*this->del)((char*)first_pass_entry);
-			first_pass_entry = NULL;
-			return SNMP_ERR_GENERR;
-	  }
-	}
-	entry = NULL;
-	return SNMP_ERR_NOERROR;
-}
-
-/***********************************************************/
-
-int get_agentEntry(int search_type, AgentEntry_t **agentEntry_data, IndexType *index)
-{
-	int snmp_error;
-	Integer AgentID = index->value[0];
-	SapTable *tbl = &agent_tbl;
-	char* entry = get_tbl_entry(tbl,search_type,&snmp_error,&AgentID);
-	index->value[0] = AgentID;
-
-	*agentEntry_data = (AgentEntry_t *)entry;
-
-	return(snmp_error);
-}
-
-
-/***** AgentStatus       ********************************/
-
-int set_agentStatus(int pass, IndexType index, Integer *AgentStatus)
-{
-  /* set agent status, remember to set all the subtree belongs to it */
-	SapTable *tbl = &agent_tbl;
-	Integer AgentID = index.value[0];
-
-        int offset = OFFSET_AGENT_STATUS;
-	return(set_table_entry_field(tbl,AgentID,pass,AgentStatus,NULL,NULL,offset));
-}
-
-
-/***** AgentTimeOut      ********************************/
-
-int set_agentTimeOut(int pass, IndexType index, Integer *AgentTimeOut)
-{
-	SapTable *tbl = &agent_tbl;
-	Integer AgentID = index.value[0];
-
-        int offset = OFFSET_AGENT_TIME_OUT;
-	return(set_table_entry_field(tbl,AgentID,pass,AgentTimeOut,NULL,NULL,offset));
-}
-
-
-/***** AgentPortNumber   ********************************/
-
-int set_agentPortNumber(int pass, IndexType index, Integer *AgentPortNumber)
-{
-	SapTable *tbl = &agent_tbl;
-	Integer AgentID = index.value[0];
-
-        int offset = OFFSET_AGENT_PORT_NUMBER;
-	return(set_table_entry_field(tbl,AgentID,pass,AgentPortNumber,NULL,NULL,offset));
-}
-
-
-/***** AgentPersonalFile ********************************/
-
-int set_agentPersonalFile(int pass, IndexType index, String *AgentPersonalFile)
-{
-	SapTable *tbl = &agent_tbl;
-        int offset = OFFSET_AGENT_PERSONAL_FILE;
-	Integer AgentID = index.value[0];
-
-	return(set_table_entry_field(tbl,AgentID,pass,0,AgentPersonalFile,NULL,offset));
-}
-
-
-/***** AgentConfigFile   ********************************/
-
-int set_agentConfigFile(int pass, IndexType index, String *AgentConfigFile)
-{
-	SapTable *tbl = &agent_tbl;
-        int offset = OFFSET_AGENT_CONFIG_FILE;
-	Integer AgentID = index.value[0];
-
-	return(set_table_entry_field(tbl,AgentID,pass,0,AgentConfigFile,NULL,offset));
-}
-
-
-/***** AgentExecutable   ********************************/
-
-int set_agentExecutable(int pass, IndexType index, String *AgentExecutable)
-{
-	SapTable *tbl = &agent_tbl;
-        int offset = OFFSET_AGENT_EXECUTABLE;
-	Integer AgentID = index.value[0];
-
-	return(set_table_entry_field(tbl,AgentID,pass,0,AgentExecutable,NULL,offset));
-}
-
-
-/***** AgentVersionNum   ********************************/
-
-int set_agentVersionNum(int pass, IndexType index, String *AgentVersionNum)
-{
-	SapTable *tbl = &agent_tbl;
-        int offset = OFFSET_AGENT_VERSION_NUM;
-	Integer AgentID = index.value[0];
-
-	return(set_table_entry_field(tbl,AgentID,pass,0,AgentVersionNum,NULL,offset));
-}
-
-
-
-/***** AgentProcessID    ********************************/
-
-int set_agentProcessID(int pass, IndexType index, Integer *AgentProcessID)
-{
-	int ret;
-	SapTable *tbl = &agent_tbl;
-        int offset = OFFSET_AGENT_PROCESS_ID;
-	Integer AgentID = index.value[0];
-
-	ret = set_table_entry_field(tbl,AgentID,pass,AgentProcessID,NULL,NULL,offset);
-	return ret;
-}
-
-
-/***** AgentName         ********************************/
-
-int set_agentName(int pass, IndexType index, String *AgentName)
-{
-	SapTable *tbl = &agent_tbl;
-        int offset = OFFSET_AGENT_AGENT_NAME;
-	Integer AgentID = index.value[0];
-
-	return(set_table_entry_field(tbl,AgentID,pass,0,AgentName,NULL,offset));
-}
-
-/***** agentSystemUpTime    ********************************/ 
- 
-int set_agentSystemUpTime(int pass, IndexType index, Integer *agentSystemUpTime){        
-        SapTable *tbl = &agent_tbl;
-        int offset = OFFSET_AGENT_SYSTEM_UP_TIME;
-	Integer agentID = index.value[0];
-
-        return(set_table_entry_field(tbl,agentID,pass,agentSystemUpTime,NULL,NULL,offset));
-} 
-
-int set_agentWatchDogTime(int pass, IndexType index, Integer *agentWatchDogTime){
-        SapTable *tbl = &agent_tbl;
-        int offset = OFFSET_AGENT_WATCH_DOG_TIME;
-	Integer agentID = index.value[0];
-
-        return(set_table_entry_field(tbl,agentID,pass,agentWatchDogTime,NULL,NULL,offset));
-}
-
- 
-int get_agentTableIndex(Integer *AgentTableIndex)
-{
-	/* next available index to be used */
-	*AgentTableIndex = sap_agent_id;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentTableIndex(int pass, Integer *AgentTableIndex)
-{
-  switch(pass)
-  {
-	case FIRST_PASS:
-		if(*AgentTableIndex != sap_agent_id +1)
-	  		return SNMP_ERR_GENERR;
-		break;
-	case SECOND_PASS:
-		sap_agent_id++;
-  }
-  return SNMP_ERR_NOERROR;
-}
-
-/***** Subtree         ********************************/
-
-/***** regTreeEntry         ********************************/
-
-int get_regTreeEntry(int search_type, RegTreeEntry_t **regTreeEntry_data, IndexType *index)
-{
-	int snmp_error;
-	Integer regTreeAgentID = index->value[0];
-	Integer regTreeIndex = index->value[1];
-
-        SapTable *tbl = &reg_tree_tbl;
-        char* entry = get_tbl_entry_2(tbl,search_type,&snmp_error,&regTreeAgentID,&regTreeIndex);
-	index->value[0] = regTreeAgentID;
-	index->value[1] = regTreeIndex;
-	*regTreeEntry_data = (RegTreeEntry_t *)entry;
-	return(snmp_error);
-}
-
-/***** regTreeOID           ********************************/
-
-int set_regTreeOID(int pass, IndexType index, Oid *regTreeOID)
-{
-        SapTable *tbl = &reg_tree_tbl;
-        int offset = OFFSET_REGTREE_OID;
-	Integer regTreeAgentID = index.value[0];
-	Integer regTreeIndex = index.value[1];
-
-        return(set_table_entry_field_2(tbl,regTreeAgentID,regTreeIndex,pass,NULL,NULL,regTreeOID,offset));
-}
-
-
-
-/***** regTreeStatus        ********************************/
-
-int set_regTreeStatus(int pass, IndexType index, Integer *regTreeStatus)
-{
-        SapTable *tbl = &reg_tree_tbl;
-        int offset = OFFSET_REGTREE_STATUS;
-	Integer regTreeAgentID = index.value[0];
-	Integer regTreeIndex = index.value[1];
-
-        return(set_table_entry_field_2(tbl,regTreeAgentID,regTreeIndex,pass,regTreeStatus,NULL,NULL,offset));
-}
-
-
-
-int get_regTreeTableIndex(Integer *regTreeTableIndex)
-{
-	/* it may overflow */
-        *regTreeTableIndex = sap_reg_tree_index;
-        return SNMP_ERR_NOERROR;
-}
-
-/*********************************************************/
-
-/***** relayProcessIDFile   ********************************/
-
-int get_relayProcessIDFile(String *sunMasterAgentStatusFile)
-{
-	sunMasterAgentStatusFile->chars = (u_char*)pid_file;
-	sunMasterAgentStatusFile->len = strlen(pid_file);
-        return SNMP_ERR_NOERROR;
-}
-
-int set_relayProcessIDFile(int pass, String *sunMasterAgentStatusFile)
-{
-        return SNMP_ERR_NOERROR;
-}
-
-/***** regTblEntry          ********************************/
-
-int get_regTblEntry(int search_type, RegTblEntry_t **regTblEntry_data, IndexType *index)
-{
-	int snmp_error;
-        SapTable *tbl = &reg_tbl_tbl;
-	Integer regTblAgentID = index->value[0];
-	Integer regTblIndex = index->value[1];
-
-        char* entry = get_tbl_entry_2(tbl,search_type,&snmp_error,&regTblAgentID,&regTblIndex);
-	index->value[0] = regTblAgentID;
-	index->value[1] = regTblIndex;
-	*regTblEntry_data = (RegTblEntry_t *)entry;
-	return(snmp_error);
-}
- 
- 
-/***** regTblOID            ********************************/
- 
-int set_regTblOID(int pass, IndexType index, Oid *regTblOID)
-{
-        SapTable *tbl = &reg_tbl_tbl;
-        int offset = OFFSET_REG_TBL_OID;
-	Integer regTblAgentID = index.value[0];
-	Integer regTblIndex = index.value[1];
-
-        return(set_table_entry_field_2(tbl,regTblAgentID,regTblIndex,pass,NULL,NULL,regTblOID,offset));
-}
- 
-/***** regTblStartColumn    ********************************/
- 
-int set_regTblStartColumn(int pass, IndexType index,
-Integer *regTblStartColumn)
-{
-        SapTable *tbl = &reg_tbl_tbl;
-        int offset = OFFSET_REG_TBL_SCOL;
-	Integer regTblAgentID = index.value[0];
-	Integer regTblIndex = index.value[1];
-
-        return(set_table_entry_field_2(tbl,regTblAgentID,regTblIndex,pass,regTblStartColumn,NULL,NULL,offset));
-}
- 
- 
-/***** regTblEndColumn      ********************************/
- 
-int set_regTblEndColumn(int pass, IndexType index, Integer *regTblEndColumn)
-{
-        SapTable *tbl = &reg_tbl_tbl;
-        int offset = OFFSET_REG_TBL_ECOL;
-	Integer regTblAgentID = index.value[0];
-	Integer regTblIndex = index.value[1];
-
-        return(set_table_entry_field_2(tbl,regTblAgentID,regTblIndex,pass,regTblEndColumn,NULL,NULL,offset));
-}
- 
-/***** regTblStartRow       ********************************/
- 
-int set_regTblStartRow(int pass, IndexType index, Integer *regTblStartRow)
-{
-        SapTable *tbl = &reg_tbl_tbl;
-        int offset = OFFSET_REG_TBL_SROW;
-	Integer regTblAgentID = index.value[0];
-	Integer regTblIndex = index.value[1];
-
-        return(set_table_entry_field_2(tbl,regTblAgentID,regTblIndex,pass,regTblStartRow,NULL,NULL,offset));
-}
- 
- 
-/***** regTblEndRow         ********************************/
- 
-int set_regTblEndRow(int pass, IndexType index, Integer *regTblEndRow)
-{
-        SapTable *tbl = &reg_tbl_tbl;
-        int offset = OFFSET_REG_TBL_EROW;
-	Integer regTblAgentID = index.value[0];
-	Integer regTblIndex = index.value[1];
-
-        return(set_table_entry_field_2(tbl,regTblAgentID,regTblIndex,pass,regTblEndRow,NULL,NULL,offset));
-}
- 
- 
-/***** regTblStatus         ********************************/
- 
-int set_regTblStatus(int pass, IndexType index, Integer *regTblStatus)
-{
-        SapTable *tbl = &reg_tbl_tbl;
-        int offset = OFFSET_REG_TBL_STATUS;
-	Integer regTblAgentID = index.value[0];
-	Integer regTblIndex = index.value[1];
-
-        return(set_table_entry_field_2(tbl,regTblAgentID,regTblIndex,pass,regTblStatus,NULL,NULL,offset));
-}
-
-int get_regTblTableIndex(Integer *regTblTableIndex)
-{
-	*regTblTableIndex = 0;
-        return SNMP_ERR_NOERROR;
-}
-
-
-/***** relayResourceFile    ********************************/
-
-int get_relayResourceFile(String *sunMasterAgentResourceConfigFile)
-{
-	sunMasterAgentResourceConfigFile->chars = (u_char*)resource_file;
-	sunMasterAgentResourceConfigFile->len = strlen(resource_file);
-        return SNMP_ERR_NOERROR;
-}
-
-int set_relayResourceFile(int pass, String *sunMasterAgentResourceConfigFile)
-{
-        return SNMP_ERR_NOERROR;
-}
-
-
-/***** relayPersonalFileDir ********************************/
-
-int get_relayPersonalFileDir(String *relayPersonalFileDir)
-{
-	relayPersonalFileDir->chars = (u_char*)config_dir;
-	relayPersonalFileDir->len = strlen(config_dir);
-	return SNMP_ERR_NOERROR;
-}
-
-int set_relayPersonalFileDir(int pass, String *relayPersonalFileDir)
-{
-	return SNMP_ERR_NOERROR;
-}
-
-
-/***** relayLogFile         ********************************/
-
-int get_relayLogFile(String *relayLogFile)
-{
-	if (relayLogFile == NULL)
-		return SNMP_ERR_BADVALUE;
-	else
-		relayLogFile->len=0;
-
-	return SNMP_ERR_NOERROR;
-}
-
-int set_relayLogFile(int pass, String *relayLogFile)
-{
-	return SNMP_ERR_NOERROR;
-}
-
-
-/***** relayOperationStatus ********************************/
-
-int get_relayOperationStatus(Integer *relayOperationStatus)
-{
-	if (relayOperationStatus == NULL)
-		return SNMP_ERR_BADVALUE;
-	else
-		*relayOperationStatus=0;
-
-	return SNMP_ERR_NOERROR;
-}
-
-int set_relayOperationStatus(int pass, Integer *relayOperationStatus)
-{
-	return SNMP_ERR_NOERROR;
-}
-
-int get_relayTrapPort(Integer *relayTrapPort)
-{
-	*relayTrapPort = relay_agent_trap_port;
-	return SNMP_ERR_NOERROR;
-}
-
-/***** relayCheckPoint      ********************************/
- 
-int get_relayCheckPoint(String *relayCheckPoint)
-{
-	if (relayCheckPoint == NULL)
-		return SNMP_ERR_BADVALUE;
-	else
-		relayCheckPoint->len=0;
-
-	return SNMP_ERR_NOERROR;
-}
- 
-int set_relayCheckPoint(int pass, String *relayCheckPoint)
-{
-	/* check for dup. agent name */
-	char *buffer;
-	Agent *agent;
-
-	buffer = malloc(relayCheckPoint->len + 1);
-
-	if (buffer == NULL)
-		return SNMP_ERR_NOERROR;		/* No alternative */
-
-	memcpy(buffer,relayCheckPoint->chars,relayCheckPoint->len);
-	buffer[relayCheckPoint->len]='\0';
-        switch(pass)
-        {
-                case FIRST_PASS:
-                case SECOND_PASS:
-			if((agent=agent_find_by_name(buffer))!=NULL)
-			  agent_destroy(agent);
-        }
-	free(buffer);
-	return SNMP_ERR_NOERROR;
-}
- 
-int get_relayNSession(Integer *relayNSession)
-{
-        return NOT_IMPLEMENTED;
-}
- 
-int get_relayNSessionDiscards(Integer *relayNSessionDiscards)
-{
-        return NOT_IMPLEMENTED;
-}
-
-int get_relayPollInterval(Integer *relayPollInterval)
-{
-	*relayPollInterval = relay_agent_poll_interval;
-	return SNMP_ERR_NOERROR;
-}
- 
-int get_relayMaxAgentTimeOut(Integer *relayMaxAgentTimeOut)
-{
-	*relayMaxAgentTimeOut = relay_agent_max_agent_time_out;
-	return SNMP_ERR_NOERROR;
-}
-
-
-void free_agentEntry(AgentEntry_t *agentEntry)
-{
-}
-
-void free_agentPersonalFile(String *agentPersonalFile)
-{
-}
-
-void free_agentConfigFile(String *agentConfigFile)
-{
-}
-
-void free_agentExecutable(String *agentExecutable)
-{
-}
-
-void free_agentVersionNum(String *agentVersionNum)
-{
-}
-
-void free_agentProtocol(String *agentProtocol)
-{
-}
-
-void free_agentName(String *agentName)
-{
-}
-
-void free_regTreeEntry(RegTreeEntry_t *regTreeEntry)
-{
-}
-
-void free_regTreeOID(Oid *regTreeOID)
-{
-}
-
-void free_regTreeView(String *regTreeView)
-{
-}
-
-void free_relayProcessIDFile(String *relayProcessIDFile)
-{
-}
-
-void free_relayResourceFile(String *sunMasterAgentResourceConfigFile)
-{
-}
-
-void free_relayPersonalFileDir(String *relayPersonalFileDir)
-{
-}
-
-void free_relayLogFile(String *relayLogFile)
-{
-}
-
-void free_relayCheckPoint(String *relayCheckPoint)
-{
-}
-
-void free_regTblEntry(RegTblEntry_t *regTblEntry)
-{
-}
-
-void free_regTblOID(Oid *regTblOID)
-{
-}
-
-void free_regTblView(String *regTblView)
-{
-}
-
-
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/mibiisa.rsrc-	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-resource =
-{
-        {
-                registration_file = "/etc/snmp/conf/mibiisa.reg"
-                policy = "spawn"
-                type = "legacy"
-                command = "/usr/lib/snmp/mibiisa -r -p $PORT"
-
-        }
-
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/name.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SNMPDX_NAME_H
-#define	_SNMPDX_NAME_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#define	yyact mydbyyact
-#define	yypact mydbyypact
-#define	yychk mydbyychk
-#define	yyexca mydbyyexca
-#define	yydef mydbyydef
-#define	yypgo mydbyypgo
-#define	yyvstop mydbyyvstop
-#define	yycrank mydbyycrank
-#define	yysvec mydbyysvec
-#define	yyr1 mydbyyr1
-#define	yyr2 mydbyyr2
-
-#endif	/* _SNMPDX_NAME_H */
--- a/usr/src/cmd/agents/snmp/snmprelayd/relay.conf	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Configuration file of an SNMP agent
-#
-
-
-##################
-# access control # 
-##################
-
-# The list of community names needed for read/write access
-# to the entire MIB.
-# If the list is empty, the only valid community name is "public"
-# and its access type is read-only
-
-acl = {
-        {
-                communities = public, private, jerry
-                access = read-write
-                managers = *
-        }
-        {
-                communities = private, jerry, public
-                access = read-only
-                managers =  snowbell, nanak
-        }
-
-}
-
-
-#communities = {
-#public		read-write
-#	private		read-write
-#}
-
-# The list of hosts that can send SNMP queries.
-# If this list is empty, all the hosts are allowed to
-# send SNMP queries.
-
-#managers = {
-#}
-
-
-###################
-# trap parameters #
-###################
-
-trap = {
-  {
-	trap-community = SNMP-trap
-	hosts = hubble, snowbell
-	{
-	  enterprise = "sun"
-	  trap-num = 1, 2-5, 6
- 	}
-	{
-	  enterprise = "3Com"
-	  trap-num = 4
- 	}
-	{
-	  enterprise = "snmp"
-	  trap-num = 0, 2, 5
- 	}
-  }
-  {
-	trap-community = jerry-trap
-	hosts = jerry, nanak, hubble
-	{
-	  enterprise = "sun"
-	  trap-num = 1, 3
- 	}
-	{
-	  enterprise = "snmp"
-	  trap-num = 1-3
- 	}
-  }
-}
-
-# The community name to be used in traps.
-
-#trap-community = SNMP-trap
-
-# The list of hosts where traps should be sent.
-
-#trap-recipients =
-#{
-#hubble
-#}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/relay/relay.snmprelay	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Personal/Configuration file of the relay agent
-#
-
-
-##########
-# agents #
-##########
-
-agents =
-{
-	{
-		name = "relay-agent"
-		subtrees = { sun.2.15 }
-		timeout = 900000000
-		port = 161
-	}
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/res.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,987 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/times.h>
-#include <unistd.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <pwd.h>
-#include <errno.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "pdu.h"
-
-#include "agent.h"
-#include "subtree.h"
-#include "session.h"
-#include "res.h"
-#include "dispatcher.h"
-#include "snmprelay_msg.h"
-#include <pwd.h>
-
-SapResource *first_res = NULL;
-SapResource *reconfig_first_res = NULL;
-
-#define MAX_RES_NAME 128
-#define CLOCK_TICK 100
-
-typedef struct _PidRec {
-	struct _PidRec *next_pid;
-	char res_name[MAX_RES_NAME];
-	char agent_name[MAX_RES_NAME];
-	int pid;
-	int port;
-} PidRec;
-
-PidRec *first_pid = NULL;
-
-
-/****************************************************************/
-
-void mark_all_resources_not_visit()
-{
-  SapResource *ap;
-  for(ap=first_res; ap; ap=ap->next_res)
-	ap->mark = RES_NOT_VISIT;
-}
-
-
-void trace_resources()
-{
-	SapResource *ap;
-
-
-	trace("RESOURCES:\n");
-	for(ap = first_res; ap; ap = ap->next_res)
-	{
-
-                trace("\t%Name: %s Dir: %s Personal: %s Sec: %s Policy: %s Type: %s Cmd: %s Agent: %s\n",
-                        ap->res_name?ap->res_name:"NO NAME",
-			ap->dir_file?ap->dir_file:"",
-			ap->personal_file?ap->personal_file:"",
-			ap->sec_file?ap->sec_file:"",
-			ap->policy?ap->policy:"",
-			ap->type?ap->type:"",
-			ap->start_cmd?ap->start_cmd:"",
-                        ap->agent?(ap->agent->name?ap->agent->name:""):"");
-
-	}
-	trace("\n");
-}
-
-void resource_detach(SapResource *tgt)
-{
-  SapResource *sp, *last=NULL;
-
-        if(tgt == NULL) return;
-        for(sp = first_res; sp; sp = sp->next_res)
-        {
-                if(sp == tgt)
-                {
-                        break;
-                }
-
-                last = sp;
-        }
-	if(sp==NULL) return;
-
-        if(last == NULL)
-        {
-                first_res = tgt->next_res;
-                tgt->next_res = NULL;
-        }
-        else
-        {
-                last->next_res = tgt->next_res;
-                tgt->next_res = NULL;
-        }
-
-}
-
-
-
-/****************************************************************/
-
-/* We must invoke subtree_list_delete() before invoking	*/
-/* this function because the first_agent_subtree member	*/
-/* of the agent structures should be NULL		*/
-
-void resource_list_delete()
-{
-	SapResource *ap = first_res;
-	SapResource *next;
-
-
-	while(ap)
-	{
-		next = ap->next_res;
-
-		if(ap->agent)
-		  agent_destroy(ap->agent);
-
-		resource_free(ap);
-
-		ap = next;
-	}
-
-	first_res = NULL;
-
-	return;
-}
-
-
-/****************************************************************/
-
-
-void resource_free(SapResource *ap)
-{
-	if(ap == NULL)
-	{
-		return;
-	}
-
-	/* free the extra element */
-
-        if(ap->res_name) free(ap->res_name);
-	if(ap->dir_file) free(ap->dir_file);
-	if(ap->personal_file) free(ap->personal_file);
-	if(ap->sec_file) free(ap->sec_file);
-	if(ap->policy) free(ap->policy);
-	if(ap->type) free(ap->type);
-	if(ap->start_cmd) free(ap->start_cmd);
-	
-	free(ap);
-
-	return;
-}
-
-SapResource *resource_find_by_agent(Agent* agent)
-{
-  SapResource *ap;
- 
-  if(agent == NULL) return NULL;
-  for(ap=first_res;ap;ap=ap->next_res){
-	if(ap->agent == agent) return ap;
-  }	
-  return NULL;
-}
-
-SapResource *resource_find_by_name(char* name)
-{
-  SapResource *ap;
-  if(name == NULL) return NULL;
-  for(ap=first_res;ap;ap=ap->next_res){
-	if(ap->res_name!=NULL &&
-	   !strcmp(ap->res_name,name)) return ap;
-  }
-  return NULL;
-}
-
-SapResource *resource_find(SapResource *sp)
-{
-  SapResource *ap;
-
-  if(sp == NULL) return NULL;
-  for(ap=first_res;ap;ap=ap->next_res){
-	if(resource_cmp(ap,sp)==TRUE) return ap;
-  }
-  return NULL;
-}
-
-static char* expand_file_name(char *dir_name,char* file_name)
-{
-  static char fullname[256];
-  static char dirname[256];
-
-  fullname[0]='\0';
-  dirname[0]='\0';
-  if(file_name!=NULL){
-	if(dir_name!=NULL)
-	  sprintf(dirname,"%s/",dir_name);
-	sprintf(fullname,"%s%s",dirname,file_name);
-  }
-  return(fullname);
-}
-
-/* if two string are NULL, we treat them as equal */
-/* equal return 0, otherwise 1 */
-static int string_cmp(char *s1, char *s2)
-{
-  if( (s1 == NULL && s2 != NULL) ||	
-      (s1 != NULL && s2 == NULL) ||
-      (s1 != NULL && s2 != NULL 
-       && strcmp(s1,s2) ) ) return 1;
-  return 0;
-}
-
-/* return TRUE same, otherwise FALSE */
-/* s1 is the new one, s2 is old one */
-int resource_cmp(SapResource *s1, SapResource *s2)
-{
-  char fullname1[256], *name1;
-  char fullname2[256], *name2;
-  time_t filetime;
-
-  if(s1 == NULL || s2 == NULL) return FALSE;
-
-  /* res_name may be nil */
-  if(s1->res_name != NULL && s2->res_name != NULL &&
-     strcmp(s1->res_name, s2->res_name))  return FALSE;
-
-  if(string_cmp(s1->policy,s2->policy) ||
-     string_cmp(s1->start_cmd,s2->start_cmd) ||
-     string_cmp(s1->type,s2->type)) return FALSE;
-
-  name1 = expand_file_name(s1->dir_file,s1->personal_file); 
-  strcpy(fullname1,name1);
-  name2 = expand_file_name(s2->dir_file,s2->personal_file); 
-  strcpy(fullname2,name2);
-
-  if(strcmp(fullname1,fullname2)) return FALSE;
-
-  /* check the time stamp of the personal file */
-  if(fullname1!=NULL)
-    get_file_modify_time(fullname1,&filetime);
-
-  /* hack, somehow didnt't initialize */
-  if(fullname2!=NULL && s2->personal_file_time==0)
-    get_file_modify_time(fullname2,&(s2->personal_file_time));
-
-  if(filetime > s2->personal_file_time) return FALSE;
-
-  return TRUE;
-
-  /* same in name, personal_file, policy, start_cmd, type */
-}
-
-void get_file_modify_time(char* filename,time_t *file_time)
-{
-  struct stat statb;
-  int fd;
-
-  *file_time = 0;
-  if((fd = open(filename, O_RDONLY)) < 0)
-  {
-        error(ERR_MSG_OPEN, filename, errno_string());
-        return;
-  }
-
-  /*
-   * get the size of the file
-   */
-  if(fstat(fd, &statb) < 0)
-  {
-        error(ERR_MSG_FSTAT, filename, errno_string());
-	close(fd);
-        return;
-   }
-
-   /* file time stamp */
-   if(file_time) *file_time = statb.st_mtime;
-   close(fd);
-}
-
-
-
-
-/****************************************************************/
-void resource_handle_child_signal()
-{
-}
-
-int switch_to_user_id(char *user_name)
-{
-  struct passwd *sp;
-
-  if(user_name == NULL) return (FALSE);
-  sp = getpwnam(user_name);
-  if(sp != NULL && sp->pw_uid != 0){
-	setgid(sp->pw_gid);
-	setuid(sp->pw_uid);
-	return TRUE;
-  }else{
- 	return FALSE;
-  }
-}
-
-/*
- * try to get a port, 5 times
- */
-static int get_a_non_reserved_port()
-{
-  struct sockaddr_in me;
-  socklen_t len;
-  int on=1, cnt=0;
-  int sd;
-
-  sd = socket(AF_INET,SOCK_DGRAM,0);
-  if(sd<0) return 0;
-  me.sin_family = AF_INET;
-  me.sin_addr.s_addr = INADDR_ANY;
-
-  for(;cnt<5;cnt++){
-    me.sin_port = htons(0);
-    if(bind(sd,(struct sockaddr*)&me,sizeof(me))!=0)continue;
-    len = (socklen_t)sizeof(me);
-    if(getsockname(sd,(struct sockaddr*)&me, &len)==-1) continue;
-    close(sd);
-    return me.sin_port;
-  }
-  close(sd);
-  return 0;
-}
-
-/****************************************************************/
-Integer  systemUpTime()
-{
-  struct tms buffer;
-  return ((Integer)times(&buffer));
-}
-
-static int match_pattern_port(char* pat)
-{
- 	if(pat==NULL) return FALSE; 
-	if(pat[0]=='$' && !strcmp(&pat[1],"PORT")) return TRUE;
-	return FALSE;
-}
-	
-
-int spawn_child(SapResource *res)
-{
-  pid_t pid;
-  static char cmd_full_path[256];
-  static char port_str[100];
-  static char sec_str[100];
-  static char per_str[100];
-  char *cmd ;
-  static char *cmd_arg[10];
-  int num_of_args =0;
-  int i, offset, path_len;
-  char *sptr, *eptr, *last_ptr;
-
-  if(res->agent == NULL || res->agent->agentExecutable.len == 0) return -1;
-  cmd_full_path[0] = '\0';
-  port_str[0]='\0';
-  sec_str[0]='\0';
-  per_str[0]='\0';
-
-  memcpy(cmd_full_path,res->agent->agentExecutable.chars,
-	res->agent->agentExecutable.len);
-  cmd_full_path[res->agent->agentExecutable.len] = '\0';
-
-  memcpy(sec_str,res->agent->agentConfigFile.chars,
-	res->agent->agentConfigFile.len);
-  sec_str[res->agent->agentConfigFile.len] = '\0';
-  
-  if( (eptr=strchr(cmd_full_path,' ')) != NULL)
-	path_len = eptr - cmd_full_path;
-  else
-	path_len = strlen(cmd_full_path);
-   
-  for(i=path_len-1;i>=0 ;i--){
-	if(cmd_full_path[i] == '/') break;
-  }
-  if(i<0 || i+1>strlen(cmd_full_path)-1) return -1;
-  cmd = &cmd_full_path[i+1];
-
-  last_ptr = &cmd_full_path[strlen(cmd_full_path)];
-
-  sprintf(port_str,"%d",res->agent->address.sin_port);
-
-  if( (pid=fork()) < 0){
-	exit(1);
-  }else if( pid == 0) {
-		/* always check for $PORT */
-		for(eptr=NULL,sptr=cmd;(eptr=strchr(sptr,' '))!=NULL&&sptr<last_ptr;){
-			*eptr = '\0';
-			if(match_pattern_port(sptr)==TRUE)
-				cmd_arg[num_of_args++] = port_str;
-			else
-				cmd_arg[num_of_args++] = sptr;
-			sptr = eptr+1;
-			if(sptr >= last_ptr) break;
-		}
-		if(sptr==cmd){ /* only one argument */ 
-			cmd_arg[num_of_args++] = sptr;
-		}else if(sptr < last_ptr){
-			/* last argument */
-			if(match_pattern_port(sptr)==TRUE)
-				cmd_arg[num_of_args++] = port_str;
-			else
-				cmd_arg[num_of_args++] = sptr;
-		}
-
-		if(chdir("/") == -1)
-		{
-		  error(ERR_MSG_CHDIR,",",errno_string());
-		}
-          /*setsid();*/
-		if(res->user!=NULL)
-		  if(switch_to_user_id(res->user)==FALSE) exit(1);
-		execv(cmd_full_path,cmd_arg);
-		/* if the above function < 0, mark the agent dies */
-	exit(1);
-  }else{ /* parent */
-  	return pid;
-  }
-  exit(1);
-}
-
-PidRec *find_pid_rec_by_res_name(char *name)
-{
-  PidRec *ap;
-
-  for(ap=first_pid; ap; ap=ap->next_pid)
-	if(!strcmp(ap->res_name,name)) return ap;
-  return NULL;
-}
-
-int res_agent_is_alive(char *res_name)
-{
-  /* find the res_name in the pid_list, and send a get pdu to it */
-  PidRec *pp;
-  struct timeval timeout; 
- 
-  pp = find_pid_rec_by_res_name(res_name);
-  if(pp==NULL || pp->port<=0) return FALSE;
- 
-  /* assume community string is public, 
-   *        agent_address is localhost, 
-   *        timeout is 5 sec
-   */ 
-   timeout.tv_sec = 5;
-   timeout.tv_usec = 0; 
-   return(SSAAgentIsAlive(NULL,pp->port,NULL,&timeout));
-}
-
-/******** Resource handling (5-28-96) *********/
-void
-resource_handling(SapResource *rp)
-{
-	/*
-	*scan the resource list
-	*if the policy is legacy then
-	*read the personal file for the subagent.
-	*spawn the subagent with the given command and the required argument
-	*/
-
-	char fullname[1024];
-	char dirname[1024];
-	char buf[1024];
-	static Agent* prev_agent = NULL;
-	time_t file_time;
-	int error_free, port_num;
-	PidRec *pp;
-
-		/* read the config. file */
-		if (!rp->personal_file) {
-			error("NULL registration_file for %s", rp->start_cmd);
-			return;
-		}
-		error_free = personal_file_reading(rp->dir_file,
-			rp->personal_file, &file_time);
-		rp->personal_file_time = file_time;
-		/*
-		* assume that the personal file containing only one
-		* subagent, then first_agent will point to the previous
-		* formed subagent
-		*/
-	if (first_agent != NULL && first_agent != prev_agent) {
-		dirname[0] = '\0';
-		if (rp->dir_file != NULL)
-			sprintf(dirname, "%s/", rp->dir_file);
-		first_agent->agentStatus = SSA_OPER_STATUS_LOAD;
-		rp->agent = first_agent;
-		prev_agent = first_agent;
-
-		/* init the res_name as the agentName */
-
-		if (first_agent->agentName.chars != NULL) {
-			buf[0] = '\0';
-			memcpy(buf, first_agent->agentName.chars,
-				first_agent->agentName.len);
-			buf[first_agent->agentName.len] = '\0';
-			rp->res_name = strdup(buf);
-		}
-
-		if (rp->personal_file != NULL) {
-			fullname[0] = '\0';
-			sprintf(fullname, "%s%s", dirname, rp->personal_file);
-			(first_agent->agentPersonalFile).chars =
-				(uchar_t *)strdup(fullname);
-			(first_agent->agentPersonalFile).len =
-				strlen(fullname);
-		}
-
-		if (rp->sec_file != NULL) {
-			fullname[0] = '\0';
-			sprintf(fullname, "%s%s", dirname, rp->sec_file);
-			(first_agent->agentConfigFile).chars =
-				(uchar_t *)strdup(fullname);
-			(first_agent->agentConfigFile).len =
-				strlen(fullname);
-		}
-
-		if (rp->start_cmd != NULL) {
-			fullname[0] = '\0';
-			sprintf(fullname, "%s%s", dirname, rp->start_cmd);
-			(first_agent->agentExecutable).chars =
-				(uchar_t *)strdup(fullname);
-			(first_agent->agentExecutable).len =
-				strlen(fullname);
-		}
-
-		if (rp->policy && (strcmp(rp->policy, POLICY_SPAWN) == 0)) {
-		/*
-		* check the global flag recovery_on, to decide
-		* spawn or not, recovery flag should set then reset
-		*/
-		if (recovery_on == FALSE || (rp->agent != NULL &&
-			res_agent_is_alive(rp->res_name) == FALSE)) {
-			/*
-			* get the port if not exist
-			* and store it in rp and agent
-			*/
-			if (rp->agent->address.sin_port == 0 ||
-				rp->agent->agentPortNumber == 0) {
-				port_num = get_a_non_reserved_port();
-				rp->agent->agentPortNumber =
-				rp->agent->address.sin_port = (short)port_num;
-				if (port_num == 0)
-				error("can't find a valid port"
-					"for the agent %s",
-				(first_agent->name? first_agent->name:""));
-			}
-			first_agent ->agentProcessID = spawn_child(rp);
-			first_agent->agentSystemUpTime = systemUpTime();
-		} else {
-			pp = find_pid_rec_by_res_name(rp->res_name);
-			first_agent->agentProcessID = pp->pid;
-			if (first_agent->agentPortNumber == 0) {
-				first_agent->agentPortNumber =
-				first_agent->address.sin_port = (short)pp->port;
-			}
-		}
-		}
-
-		first_agent->agentStatus = SSA_OPER_STATUS_ACTIVE;
-		/* activate the agent, subtree, table */
-		sync_subtrees_with_agent(first_agent);
-		activate_table_for_agent(first_agent);
-	}
-
-	if (first_agent == NULL) {
-		error_exit("No SNMP agent configured");
-	}
-}
-
-int ssa_subagent_is_alive(Agent *agent)
-{
-  struct timeval timeout; 
- 
-  if(agent==NULL) return FALSE;
-  if(agent->agentPortNumber<0) return FALSE;
- 
-  /*
-   * assume community string is public
-   */ 
-   timeout.tv_sec = 5;
-   timeout.tv_usec = 0; 
-   return(SSAAgentIsAlive(&agent->address.sin_addr,
-	agent->agentPortNumber,NULL,&timeout));
-}
-
-void trace_pid_rec()
-{
-	PidRec *ap;
-
-
-	trace("PID_REC:\n");
-	for(ap = first_pid; ap; ap = ap->next_pid)
-	{
-
-                trace("\t%ResName: %s AgentName: %s Pid: %d Port: %d\n",
-                        ap->res_name?ap->res_name:"NO-NAME",
-			ap->agent_name?ap->agent_name:"NO-NAME",
-			ap->pid,ap->port);
-
-	}
-	trace("\n");
-}
-
-void delete_pid_rec_list()
-{
-	PidRec *ap = first_pid;
-	PidRec *next;
-
-
-	while(ap)
-	{
-		next = ap->next_pid;
-
-		free(ap);
-
-		ap = next;
-	}
-
-	first_pid = NULL;
-}
-
-
-void read_pid_file(char *filename)
-{
-  PidRec *pid;
-  struct stat statb;
-  FILE *file;
-  int res=4;
-
-  first_pid = NULL;
-  if((file = fopen(filename, "r")) == NULL)
-  {
-/* file not exist, ignore it
-        error(ERR_MSG_OPEN, filename, errno_string());
-*/
-	return;
-  }
-
-  while(res ==4)
-  {
-  	pid = calloc(1,sizeof(PidRec));
-  	if(pid == NULL){ 
-		error("malloc() failed");
-		fclose(file);
-		return;
-  	}
-        res =fscanf(file,"%s%s%d%d",
-	    pid->res_name,pid->agent_name,&(pid->pid),&(pid->port));
-	if(res==4){
-  	  if(first_pid==NULL){
-		pid->next_pid = NULL;
- 	   }else{
-		pid->next_pid = first_pid;
-  	  }
-  	  first_pid = pid;
-	}else{
-		free(pid);
-	}
-  }
-  
-}
-
-
-void
-write_pid_file(char *filename)
-{
-	char name[256];
-	FILE *fp;
-	SapResource *sp1;
-
-	umask(S_IWGRP | S_IWOTH);
-	fp = fopen(filename, "a+");
-	if (fp == NULL) {
-		error("can't open the file");
-		return;
-	}
-	/* write the tuple { resouce_name, agent_name, pid, port } */
-	for (sp1 = first_res; sp1; sp1 = sp1->next_res) {
-		if (sp1->policy == NULL || strcmp(sp1->policy, POLICY_SPAWN))
-			continue;
-		if (sp1->agent == NULL)
-			continue;
-		if (sp1->agent->agentName.chars != NULL) {
-			memcpy(name, sp1->agent->agentName.chars,
-				sp1->agent->agentName.len);
-			name[sp1->agent->agentName.len] = '\0';
-		} else {
-			strcpy(name, "UNKNOWN");
-		}
-		fprintf(fp, "%s %s %d %d\n",
-			(sp1->res_name != NULL ? sp1->res_name: "UNKNOWN"),
-			name,
-			sp1->agent->agentProcessID,
-			sp1->agent->agentPortNumber);
-	}
-fclose(fp);
-}
-
-/*
- * Add the port number and pid of relay agent to
- * /var/snmp/snmpdx.st file
- */
-void
-write_pid_file1(char *filename)
-{
-	struct stat buf;
-	char name[256];
-	FILE *fp;
-	Subtree *sp;
-
-	sprintf(name, "%s.old", filename);
-	if (filename == NULL)
-		return;
-	if (stat(filename, &buf) == 0) {
-		if (rename(filename, name) == -1)
-			error("can't save the pid file");
-	}
-
-	umask(S_IWGRP | S_IWOTH);
-	fp = fopen(filename, "w");
-	if (fp == NULL) {
-		error("can't open the file");
-		return;
-	}
-	for (sp = first_subtree; sp; sp = sp->next_subtree) {
-		if (sp->agent) {
-			if (strcmp(sp->agent->name, "relay-agent") == 0) {
-				fprintf(fp, "%s %s %d %d\n",
-					sp->agent->name,
-					sp->agent->name,
-					sp->agent->agentProcessID,
-					sp->agent->address.sin_port);
-			}
-		}
-	}
-fclose(fp);
-}
-
-void merging_resource_list()
-{
-  SapResource* sp, *match_sp, *next;
-  SapResource* merge_res_list=NULL;
-  int port_num;
-
-  /* scan the reconfig list, find same name resource,
-     if found, see difference, */
-  sp=reconfig_first_res;
-  while(sp){
-    next = sp->next_res;
-    if(sp!=NULL) match_sp = resource_find(sp);
-    if(match_sp != NULL){
-	/* exists before */
-	resource_detach(match_sp);
-	if(resource_cmp(sp,match_sp)==TRUE){
-	  /* no need to reread the personal file */
-	  /* spawn process ? */
-	  resource_free(sp);
-	  if(match_sp->policy && !strcmp(match_sp->policy,POLICY_SPAWN)){
-		if(match_sp->agent!=NULL && 
-		   ssa_subagent_is_alive(match_sp->agent) == FALSE)
-		{
-			/* get the port if not exist 
-			 * and store it in rp and agent */
-		  if(match_sp->agent->address.sin_port == 0 ||
-		     match_sp->agent->agentPortNumber ==0){
-			port_num = get_a_non_reserved_port();
-			match_sp->agent->agentPortNumber =
-			match_sp->agent->address.sin_port = (short)port_num;
-		  }
-	  	  match_sp->agent->agentProcessID = spawn_child(match_sp);
-		  match_sp->agent->agentSystemUpTime = systemUpTime();
-		}
-	  }
-	  sp=match_sp;
-	}else{
-	  /* new info for the agent */
-	  if(match_sp->agent!=NULL)
-	  	agent_destroy(match_sp->agent);
-	   if(match_sp->policy && !strcmp(match_sp->policy,POLICY_SPAWN)){
-		kill(match_sp->agent->agentProcessID,SIGTERM);
-	   }
-	   resource_free(match_sp);
-	   resource_handling(sp);
-	}
-    }else{
-	/* non-exist resource */
-	resource_handling(sp);
-    }
-    if(merge_res_list==NULL){
-	sp->next_res = NULL;
-    }else{
-	sp->next_res = merge_res_list;
-    }
-    merge_res_list = sp;
-	
-    sp=next;
-  }
-
-  resource_list_delete();
-  first_res = merge_res_list;
-  
-  /* update the PID file */
-}
-
-void  delete_agent_from_resource_list(Agent *agent)
-{
-  SapResource *sp, *last=NULL;
-
-  if(agent==NULL) return;
-  for(sp=first_res; sp; sp=sp->next_res)
-  {
-	if(sp->agent == agent) break;
-  	last = sp;
-  }
-  if(sp==NULL) return;
-  if(last==NULL)
-  {
-	first_res = sp->next_res;
-	sp->next_res = NULL;
-  }else{
-	last->next_res = sp->next_res;
-	sp->next_res = NULL;
-  }
-  resource_free(sp); 
-}
-
-
-int watch_dog_time_is_up(Agent *agent,int elapse_time)
-{
-  if(agent==NULL || agent->agentWatchDogTime==0) return FALSE;
-  if(elapse_time >= agent->agentWatchDogTime) return TRUE;
-  return FALSE;
-}
-
-
-
-void watch_dog_in_action()
-{
-  SapResource *rp;
-  int port_num;
-  static int start_time=0;
-  static int end_time=0;
-  int time_diff;
-  static struct tms buffer;
-
-  if(any_outstanding_session()==TRUE) return;
-  end_time = times(&buffer);
-  time_diff = (end_time - start_time)/CLOCK_TICK;
-
-  for(rp=first_res;rp;rp=rp->next_res){
-	  if(rp->policy && !strcmp(rp->policy,POLICY_SPAWN)){
-		if (rp->agent == NULL) {
-		    if (trace_level > 0)
-			trace("watch_dog: repopulating agent %s\n", rp->res_name);
-		    /* the agent was probably deleted by the timeout mechanism */
-		    resource_handling(rp);
-		    sync_agent_acl(rp->agent);
-		}
-		if(rp->agent != NULL && 
-		   watch_dog_time_is_up(rp->agent,time_diff) &&
-		   ssa_subagent_is_alive(rp->agent)==FALSE)
-		{
-			/* get the port if not exist 
-			 * and store it in rp and agent */
-			if(rp->agent->address.sin_port == 0 ||
-			   rp->agent->agentPortNumber ==0){
-				port_num = get_a_non_reserved_port();
-				rp->agent->agentPortNumber =
-				rp->agent->address.sin_port = (short)port_num;
-				if(port_num==0)
-				  error("can't find a valid port for the agent %s",(rp->agent->name? rp->agent->name:""));
-			}
-                        if (!already_bound_port(rp->agent->agentPortNumber)) {
-				rp->agent ->agentProcessID = spawn_child(rp);
-				if (trace_level > 0)
-					trace("watch_dog: restart agent %s pid %d\n", rp->res_name, rp->agent->agentProcessID);
-				rp->agent->agentSystemUpTime = systemUpTime();
-                        }
-		}
-	}
-  }
-  start_time = end_time;
-}
-
-int already_bound_port(int port_num) {
-
-int socket_handle;
-struct sockaddr_in in_addr;
-char errmsg[100];
-
-     socket_handle = socket(AF_INET,SOCK_DGRAM,0) ;
-     if (socket_handle < 0) {
-        error("Unable to open Datagram Socket error = %d",errno);
-        return 0;
-     }
-     in_addr.sin_addr.s_addr = htonl(INADDR_ANY) ;
-     in_addr.sin_family = AF_INET;
-     in_addr.sin_port = htons(port_num);
-     memset(in_addr.sin_zero,0,8 );
-
-     if (bind(socket_handle,(struct sockaddr *)&in_addr, sizeof(struct sockaddr))) {
-            close(socket_handle);
-            return 1;
-     }else {
-            close(socket_handle);
-            return 0;
-     }
-
-
-}
-
-void kill_all_pid_rec_list()
-{
-	PidRec *ap;
-	Agent *ag;
-	struct timeval timeout;
-
-   	timeout.tv_sec = 5;
-  	timeout.tv_usec = 0; 
-
-	for(ap=first_pid;ap;ap=ap->next_pid){
-	  if(ap->agent_name != NULL &&
-	     SSAAgentIsAlive(NULL,ap->port,NULL,&timeout)==TRUE){
-			kill(ap->pid,SIGTERM);
-	     		if(SSAAgentIsAlive(NULL,ap->port,NULL,&timeout)==TRUE)
-				kill(ap->pid,SIGKILL);
-	  }
-	}
-}
-
-void kill_part_pid_rec_list()
-{
-	PidRec *ap;
-	Agent *ag;
-	struct timeval timeout;
-
-   	timeout.tv_sec = 5;
-  	timeout.tv_usec = 0; 
-
-	for(ap=first_pid;ap;ap=ap->next_pid){
-	  if(ap->agent_name != NULL &&
-	     agent_find_by_name(ap->agent_name) == NULL &&
-	     SSAAgentIsAlive(NULL,ap->port,NULL,&timeout)==TRUE){
-			kill(ap->pid,SIGTERM);
-	  }
-	}
-}
--- a/usr/src/cmd/agents/snmp/snmprelayd/res.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _RES_H_
-#define _RES_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#define RES_NOT_VISIT 0
-#define RES_VISIT 1 
-
-#define TYPE_LEGACY_SUB_AGENT   "legacy"
-#define POLICY_SPAWN            "spawn"
-#define POLICY_LOAD     "load"
-
-/* resouce support */
-typedef struct _SapResource{
-        struct _SapResource* next_res;
-        char *res_name;
-        char *dir_file;
-        char *personal_file;
-        time_t personal_file_time;
-        char *sec_file;
-        time_t sec_file_time;
-        int invoke_mode; /* invoke it and keep it alive */
-        char* policy;
-	char* type;
-	char* user; 
-        char *start_cmd;
-        Agent* agent;
-	int mark; /* flag for visit */
-        time_t rsrc_file_time;
-} SapResource;
-
-extern SapResource *first_res;
-extern SapResource *reconfig_first_res;
-
-extern void resource_list_delete();
-extern void trace_resources();
-extern SapResource *resource_find_by_agent(Agent* agent);
-extern void mark_all_resources_not_visit();
-extern SapResource *resource_find_by_name(char* name);
-extern void get_file_modify_time(char* filename,time_t *file_time);
-extern void resource_free(SapResource *ap);
-extern void resource_detach(SapResource *tgt);
-extern void merging_resource_list();
-extern void resource_handling(SapResource *rp);
-extern int ssa_subagent_is_alive(Agent *agent);
-extern void delete_pid_rec_list();
-extern void delete_agent_from_resource_list(Agent *agent); 
-extern void write_pid_file(char* filename);
-extern void watch_dog_in_action();
-extern void kill_all_pid_rec_list();
-extern void kill_part_pid_rec_list();
-
-#endif
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/resource.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _RESOURCE_H_
-#define _RESOURCE_H_
-
-
-
-
-
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmprelayd/session.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1971 +0,0 @@
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/***********************************************************
-	Copyright 1989 by Carnegie Mellon University
-
-                      All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of CMU not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-******************************************************************/
-/************
- * HISTORY
- * 5-14-96	Jerry Yeung	add request filter
- * 5-28-96      Jerry Yeung     Three phase set protocol(Three Phase)
- * 9-18-96	Jerry Yeung	agent_process has wrong arg.
- ***********/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/times.h>
-#include <limits.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "asn1.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "request.h"
-
-#include "snmprelay_msg.h"
-#include "agent.h"
-#include "subtree.h"
-#include "access.h"
-#include "session.h"
-#include "dispatcher.h"
-#include "trap.h"
-
-
-
-/***** LOCAL CONSTANTS *****/
-
-#define SESSION_ID_MASK			0xffffff00
-#define SESSION_ID_INCREMENT_VALUE	256
-#define REQUEST_ID_MASK			0x000000ff
-#define	INVALID_ERROR_INDEX		0
-
-/***** LOCAL VARIABLES *****/
-
-Session *first_session = NULL;
-
-static u_long session_id = 0;
-
-static int session_internal_error = FALSE;	/* only used bu session_open() */
-
-/**** Three Phase ****/
-static Three_Phase three_phase;
-
-
-/***** LOCAL FUNCTIONS *****/
-
-static void trace_session(Session *session);
-static void trace_request(Request *request);
-
-static Session *session_open(Address *address, SNMP_pdu *pdu);
-void session_close(Session *session);
-
-static int session_build_request_list(Session *session, int index, SNMP_variable *variable, Subtree *subtree);
-static int session_build_local_sysUptime(Session *session, int index, SNMP_variable *variable);
-
-
-void session_remove_from_list(Session *session);
-
-void session_free(Session *session);
-void request_list_free(Request *request_list);
-void request_free(Request *request);
-
-static void session_respond(Session *session);
-static void session_respond_error(Session *session, int status, int index);
-
-static Session *session_find(Address *address, u_long request_id);
-
-static int session_send_request(Request *request);
-
-static Request *session_move_request(Request *request, Subtree *subtree);
-
-static int session_timeout_loop(struct timeval *now);
-
-/* (5-14-96) */
-static void session_process_response(SNMP_pdu *pdu_read,int doRespondHere);
-
-static int session_send_loopback_request(Request *request,int doRespondHere);
-
-static int community_check(Address * address, Agent* agent, int pdu_type, char * community);
-
-/* These 3 functions are used to prevent oscillations between	*/
-/* 2 agents when we try to retreive an empty table		*/
-/* Example:							*/
-/* 	Suppose that we have a table and the columns		*/
-/*	with an index 1.x are supported by agent A and the	*/
-/*	columns with an index 2.y are supporeted by agent B	*/
-/*	Suppose that in fact this table is empty and we send	*/
-/*	send the request Get-Next(columnA)			*/
-/*								*/
-/*	Here is the sequence:					*/
-/*	Get-Next(columnA) on subtree columnA ==> No Such Name	*/
-/*	Get-Next(columnA) on subtree columnA.2 ==> No Such Name	*/
-/*	Get-Next(columnA) on subtree columnB ==> No Such Name	*/
-/*	Get-Next(columnA) on subtree columnB.2 ==> No Such Name	*/
-/*	....							*/
-/*								*/
-/*	That is why we have to register which agents we have 	*/
-/*	already visited and not only the last one		*/
-
-static int request_add_visited_agent(Request *request, Agent *agent);
-static void agent_list_free(Agent_List *alp);
-static int is_in_agent_list(Agent_List *agent_list, Agent *agent);
-
-
-/************************************************************************/
-
-void trace_sessions()
-{
-	Session *sp;
-	int count = 0;
-
-
-	trace("SESSIONS:\n");
-	trace("---------\n");
-	for(sp = first_session; sp; sp = sp->next_session)
-	{
-		trace("session %d:\n", sp->session_id);
-
-		trace_session(sp);
-	
-		count++;
-	}
-	trace("NUMBER OF SESSIONS: %d\n", count);
-	trace("\n");
-}
-
-
-/************************************************************************/
-
-static void trace_session(Session *session)
-{
-	Request *request;
-
-
-	trace("\taddress:        %s\n",
-		address_string(&(session->address)));
-	if(trace_level > 2)
-	{
-		trace("\tn_variables:    %d\n", session->n_variables);
-		trace("\to_flags:        0x%x\n", session->o_flags);
-		trace("\ti_flags:        0x%x\n", session->i_flags);
-	}
-	for(request = session->first_request; request; request = request->next_request)
-	{
-		trace_request(request);
-	}
-}
-
-
-/************************************************************************/
-
-static void trace_request(Request *request)
-{
-	Session *session = request->session;
-	Subtree *subtree = request->subtree;
-	Agent *agent = NULL;
-	SNMP_variable *variable;
-
-
-	if(subtree)
-	{
-		agent = subtree->agent;
-	}
-
-	trace("\trequest %d:\n", request->request_id);
-	if(trace_level > 2)
-	{
-		trace("\t\tsession:     %d\n", session->session_id);
-	}
-	trace("\t\tsubtree:     %s\n", (subtree)? SSAOidString(&(subtree->name)): "NULL");
-	trace("\t\tvisited agents:\n");
-	if(trace_level > 2)
-	{
-		Agent_List *alp;
-
-
-		for(alp = request->visited_agent_list; alp; alp = alp->next)
-		{
-			trace("\t\t\t%s\n", alp->agent->name);
-		}
-	}
-	if(agent)
-	{
-		trace("\t\tagent:       %s (%s)\n",
-			agent->name,
-			address_string(&(agent->address)));
-	}
-	else
-	{
-		trace("\t\tagent:       %s\n", "NULL");
-	}
-	if(trace_level > 2)
-	{
-		trace("\t\tflags:       0x%x\n", request->flags);
-	}
-	trace("\t\tstate:       %d\n", request->state);
-	trace("\t\tvariables:\n");
-	for(variable = request->pdu->first_variable; variable; variable = variable->next_variable)
-	{
-		trace("\t\t\t%s\n", SSAOidString(&(variable->name)));
-	}
-
-	if(trace_level > 3)
-	{
-		trace("\t\ttime:        %s\n", timeval_string(&request->time));
-		trace("\t\texpire:      %s\n", timeval_string(&request->expire));
-	}
-}
-
-
-/************************************************************************/
-
-/* Three Phase: check for whether multiple agents are involved */
-int three_phase_protocol_in_action(SNMP_pdu *pdu)
-{
-  SNMP_variable *variable;
-  int local_access=0;
-  int subagent_access=0;
-  Subtree* subtree;
-  Agent *agent, *prev_agent=NULL;
-  
-  if( pdu->type != SET_REQ_MSG) return(FALSE);
-
-  for(variable=pdu->first_variable;variable;variable=variable->next_variable){
-	subtree=subtree_match(pdu->type,&(variable->name));
-	if(subtree != NULL){
-		if( (agent=subtree->agent) != NULL){
-			if(prev_agent == NULL){
-				prev_agent = agent; 
-			}else if(prev_agent != agent){
-				return(TRUE);
-			}
-		}
-	}
-  }
-  return(FALSE);
-}
-
-int any_outstanding_session()
-{
-  return(first_session!=NULL ? TRUE: FALSE);
-}
-
-int anyOutstandingSetRequestRunning()
-{
-  Session *s;
-  for(s=first_session;s;s=s->next_session){
-	if(s->pdu && s->pdu->type == SET_REQ_MSG) return(TRUE);
-  }
-  return(FALSE);
-}
-
-
-void session_dispatch()
-{
-	SNMP_pdu *pdu;
-	Address address;
-	Session *session;
-	SNMP_variable *variable;
-	static int VersionWarnings = 10 ; 
-
-	pdu = snmp_pdu_receive(clients_sd, &address, error_label);
-	if(pdu == NULL)
-	{
-
-	  /* To avoid flooding the console and log,  print trace "wrong version" messages */
-	  /* after 10 console messages. */
-		if (strncmp (error_label, "The message has a wrong version", 31) == 0 && --VersionWarnings >= 0 ) { 
-			error(ERR_MSG_PDU_RECEIVED,
-				address_string(&address),
-				error_label);
-		} else {
-			trace(ERR_MSG_PDU_RECEIVED,
-                                address_string(&address),
-                                error_label);
-		}
-		return;
-	}
-	if(pdu->type != GET_REQ_MSG
-		&& pdu->type != GETNEXT_REQ_MSG
-		&& pdu->type != SET_REQ_MSG)
-	{
-		error("bad PDU type (0x%x) received from %s",
-			pdu->type,
-			address_string(&address));
-		snmp_pdu_free(pdu);
-		return;
-	}
-	if(pdu->first_variable == NULL)
-	{
-		error("no variable in PDU received from %s",
-			address_string(&address));
-		snmp_pdu_free(pdu);
-		return;
-	}
-
-
-	session = session_find(&address, pdu->request_id);
-	if(session)
-	{
-		if(trace_level > 0)
-		{
-			trace("!! This request is already being processed by session %d\n\n",
-				session->session_id);
-		}
-		snmp_pdu_free(pdu);
-		return;
-	}
-
-
-	/* Three Phase: if the request across multi-subagents
-         * create the Three Phase object, pass the pdu from the
-         * session->three_phase->cur_pdu
-	 */
-	if(three_phase_protocol_in_action(pdu)){	
-		three_phase.origin_pdu = pdu;
-		/* create a corresponding get pdu */
-		three_phase.cur_pdu =  snmp_pdu_dup(pdu, error_label);
-		if(three_phase.cur_pdu == NULL)
-		{
-		  error("snmp_pdu_dup() failed: %s",error_label);
-		  snmp_pdu_free(pdu);
-		  three_phase.origin_pdu = NULL;
-		  return;
-		}
-		three_phase.cur_pdu->type = GET_REQ_MSG;
-		/* form a get variable list.
-		 * append to the cur_pdu */
-	 	for(variable=pdu->first_variable;variable;
-		    variable=variable->next_variable){
-		  if(snmp_pdu_append_null_variable(three_phase.cur_pdu,
-			&(variable->name),error_label) == NULL){
-			error("snmp_pdu_append_null_variable() failed: %s",
-				error_label);
-			snmp_pdu_free(pdu);
-		  }
-		}
-		pdu = three_phase.cur_pdu;
-		three_phase.state = PHASE_1;
-	}
-
-	session = session_open(&address, pdu);
-	if(session == NULL)
-	{
-		if(session_internal_error == TRUE)
-		{
-			error("session_open() failed for a pdu received from %s",
-				address_string(&address));
-		}
-		return;
-	}
-
-
-	if(session->i_flags == session->o_flags)
-	{
-		session_respond(session);
-	}
-
-
-	return;
-}
-
-/****** (5-14-96) ****/
-int local_agent(Agent *agent)
-{
-  return(!strcmp(agent->name,relay_agent_name)? 1 : 0);
-}
-
-int local_request(Request* request)
-{
-  Agent* agent;
-
-  if(request && request->subtree){
-        agent = request->subtree->agent;
-        return( local_agent(agent));
-  }
-  return(FALSE); /* NOT LOCAL */
-}
-
-
-/************************************************************************/
-
-/*
- *	If this function returns NULL and session_internal_error is
- *	TRUE, an internal error occured.
- *
- *	But if we succeed to answer the SNMP request before the
- *	end of this function, it returns NULL and session_errno
- *	is FALSE.
- *
- *
- *	The pdu must have at least one variable in
- *	its variable list. (This has to be checked before calling
- *	this function)
- *
- *	As the pdu is attached in a session structure,
- *	you must not free the pdu when this function
- *	returns whether the function succeeds or fails.
- */
-
-static Session *session_open(Address *address, SNMP_pdu *pdu)
-{
-	Session *session;
-	SNMP_variable *variable;
-	Request *request;
-	static Subid ent_subids[] = {1, 3, 6, 1, 4, 1, 42, 2, 1, 1};
-	static Oid ent_oid = {ent_subids, 10};
-	struct tms buffer;
-        u_long time_stamp;
-
-
-
-
-	if(trace_level > 1)
-	{
-		trace("## Open session %d\n\n", session_id);
-	}
-
-
-	session = (Session *) malloc(sizeof(Session));
-	if(session == NULL)
-	{
-		error("malloc() failed");
-		session_internal_error = TRUE;
-		return NULL;
-	}
-	session->next_session = NULL;
-	session->pdu = NULL;
-	session->first_request = NULL;
-
-
-	/* session_id */
-	session->session_id = session_id;
-	session_id = session_id + SESSION_ID_INCREMENT_VALUE;
-
-	/* address */
-	memcpy(&(session->address), address, sizeof(Address));
-
-	/* pdu, n_variables, o_falgs, i_flags */
-	session->pdu = pdu;
-	session->n_variables = 0;
-	session->o_flags = 0;
-	session->i_flags = 0;
-
-
-	/* insert session in the session list */
-	session->next_session = first_session;
-	first_session = session;
-
-
-	/* build the requests list */
-	for(variable = pdu->first_variable; variable; variable = variable->next_variable)
-	{
-		Subtree *subtree;
-
-
-		(session->n_variables)++;
-
-		if(session->n_variables > 32)
-		{
-			error(ERR_MSG_VARBIND_LIMIT);
-			session_close(session);
-			session_internal_error = TRUE;
-			return NULL;
-		}
-
-		if( (
-			( (pdu->type == GETNEXT_REQ_MSG) && (SSAOidCmp(&(variable->name), &sysUptime_name) == 0) )
-				|| 
-			( (pdu->type == GET_REQ_MSG) && (SSAOidCmp(&(variable->name), &sysUptime_instance) == 0) ) )
-			&&
-			(subtree_match(GET_REQ_MSG, &(variable->name)) == NULL) )
-		{
-			if(session_build_local_sysUptime(session, session->n_variables, variable) == -1)
-			{
-				error("session_build_local_sysUptime() failed");
-				session_close(session);
-				session_internal_error = TRUE;
-				return NULL;
-			}
-		}
-		else
-		{
-			subtree = subtree_match(pdu->type, &(variable->name));
-			if(subtree == NULL)
-			{
-				/* session_respond_error() closes the session */
-				session_respond_error(session, SNMP_ERR_NOSUCHNAME, session->n_variables);
-				session_internal_error = FALSE;
-				return NULL;
-			}
-
-			if (subtree->agent)
-				set_first_manager (subtree->agent->first_manager);
-			else
-				set_first_manager (NULL);
-			if (community_check(address, subtree->agent, pdu->type,
-				 pdu->community) == FALSE) {
-				    session_respond_error(session,
-				    SNMP_ERR_AUTHORIZATIONERROR,
-				    session->n_variables);
-                                /* send authentication trap after error response */
-                                time_stamp = (Integer) times(&buffer);
-                                trap_filter_action(&ent_oid,SNMP_TRAP_AUTHFAIL,0,time_stamp,NULL);
-
-/*
-				session_close(session);
-*/
-				session_internal_error = TRUE;
-				return NULL;
-			}
-			if(session_build_request_list(session, session->n_variables, variable, subtree) == -1)
-			{
-				error("session_build_request_list() failed");
-				session_close(session);
-				session_internal_error = TRUE;
-				return NULL;
-			}
-		}
-	}
-
-
-	if(trace_level > 1)
-	{
-		trace_session(session);
-		trace("\n");
-	}
-
-
-	/* send the requests */
-	for(request = session->first_request; request; request = request->next_request)
-	{
-		if(request->state == 0) /* request not sent/process yet */
-		{
-		  	if(local_request(request)){
-			  if(session_send_loopback_request(request,FALSE) == -1){
-				error("session_send_loopback_request() failed");
-				session_close(session);
-				session_internal_error = TRUE;
-				return NULL;
-			  }
-			}else if(session_send_request(request) == -1)
-			{
-				error("session_send_request() failed");
-				session_close(session);
-				session_internal_error = TRUE;
-				return NULL;
-			}
-		}
-	}
-
-
-	return session;
-}
-
-
-/************************************************************************/
-
-static int session_build_local_sysUptime(Session *session, int index, SNMP_variable *variable)
-{
-	Request *last_request = NULL;
-	Request *request;
-	u_long request_id = 0;
-	SNMP_value value;
-	struct tms buffer;
-
-
-	for(request = session->first_request; request; request = request->next_request)
-	{
-		request_id++;
-		last_request = request;
-	}
-
-
-	request = (Request *) malloc(sizeof(Request));
-	if(request == NULL)
-	{
-		error("malloc() failed");
-		return -1;
-	}
-	memset(request, 0, sizeof(Request));
-
-	request->session = session;
-	request->subtree = NULL;
-
-	request->request_id = request_id;
-
-	request->pdu = snmp_pdu_dup(session->pdu, error_label);
-	if(request->pdu == NULL)
-	{
-		error("snmp_pdu_dup() failed: %s", error_label);
-		request_free(request);
-		return -1;
-	}
-	request->pdu->request_id = session->session_id + request->request_id;
-
-	request->pdu->first_variable = snmp_variable_dup(variable, error_label);
-	if(request->pdu->first_variable == NULL)
-	{
-		error("snmp_variable_dup() failed: %s", error_label);
-		request_free(request);
-		return -1;
-	}
-
-	request->flags = (1 << (index - 1));
-	
-	request->state = 0;
-
-	/* append this request to the request	*/
-	/* list of the session			*/
-	if(last_request)
-	{
-		last_request->next_request = request;
-	}
-	else
-	{
-		session->first_request = request;
-	}
-
-	request->flags =  (1 << (index - 1));
-
-
-	/* now answer! */
-	request->response = snmp_pdu_dup(session->pdu, error_label);
-	if(request->response == NULL)
-	{
-		error("snmp_pdu_dup() failed: %s", error_label);
-		return -1;
-	}
-	request->response->type = GET_RSP_MSG;
-	request->response->request_id = session->session_id + request->request_id;
-
-	value.v_integer = (Integer) times(&buffer);
-	request->response->first_variable = snmp_typed_variable_new(&sysUptime_instance, TIMETICKS,
-		&value, error_label);
-	if(request->response->first_variable == NULL)
-	{
-		error("snmp_typed_variable_new() failed: %s", error_label);
-		return -1;
-	}
-
-	session->o_flags = session->o_flags | request->flags;
-
-	request->state = REQUEST_COMPLETED;
-	session->i_flags = session->i_flags | request->flags;
-
-
-	return 0;
-}
-
-
-/************************************************************************/
-
-static int session_build_request_list(Session *session, int index, SNMP_variable *variable, Subtree *subtree)
-{
-	Request *last_request = NULL;
-	Request *request;
-	u_long request_id = 0;
-	SNMP_variable *new_variable;
-
-
-	if(mode == MODE_GROUP)
-	{
-		for(request = session->first_request; request; request = request->next_request)
-		{
-			if(request->subtree && request->subtree->agent == subtree->agent)
-			{
-				break;
-			}
-
-			request_id++;
-			last_request = request;
-		}
-	}
-	else	/* MODE_SPLIT */
-	{
-		for(request = session->first_request; request; request = request->next_request)
-		{
-			request_id++;
-			last_request = request;
-		}
-	}
-
-
-	if(request == NULL)
-	{
-		request = (Request *) malloc(sizeof(Request));
-		if(request == NULL)
-		{
-			error("malloc() failed");
-			return -1;
-		}
-		request->next_request = NULL;
-		request->visited_agent_list = NULL;
-		request->pdu = NULL;
-		request->response = NULL;
-
-		request->session = session;
-		request->subtree = subtree;
-		if(request_add_visited_agent(request, subtree->agent) == -1)
-		{
-			request_free(request);
-			return -1;
-		}
-
-		request->request_id = request_id;
-
-		request->pdu = snmp_pdu_dup(session->pdu, error_label);
-		if(request->pdu == NULL)
-		{
-			error("snmp_pdu_dup() failed: %s", error_label);
-			request_free(request);
-			return -1;
-		}
-
-		request->flags = 0;
-		request->state = 0;
-
-		/* append this request to the request	*/
-		/* list of the session			*/
-		if(last_request)
-		{
-			last_request->next_request = request;
-		}
-		else
-		{
-			session->first_request = request;
-		}
-	}
-
-
-	new_variable = snmp_variable_dup(variable, error_label);
-	if(new_variable == NULL)
-	{
-		error("snmp_variable_dup() failed: %s", error_label);
-		return -1;
-	}
-
-	request->flags = request->flags | (1 << (index - 1));
-	
-
-	/* append the new variable to the variable list of request->pdu */
-	if(request->pdu->first_variable)
-	{
-		SNMP_variable *current_variable;
-		SNMP_variable *last_variable;
-
-	
-		for(current_variable = request->pdu->first_variable; current_variable; current_variable = current_variable->next_variable)
-		{
-			last_variable = current_variable;
-		}
-		last_variable->next_variable = new_variable;
-	}
-	else
-	{
-		request->pdu->first_variable = new_variable;
-	}
-
-
-	return 0;
-}
-
-
-/************************************************************************/
-
-void session_close(Session *session)
-{
-	Three_Phase *tp;
-
-	if(trace_level > 1)
-	{
-		trace("## Close session %d\n\n", session->session_id);
-	}
-
-	/* remove it from the session list */
-	session_remove_from_list(session);
-
-	/* free the space allocated for the session */
-	session_free(session);
-
-
-	return;
-}
-
-
-/************************************************************************/
-
-void session_list_delete()
-{
-	Session *sp = first_session;
-	Session *next;
-
-
-	while(sp)
-	{
-		next = sp->next_session;
-	
-		session_free(sp);
-
-		sp = next;
-	}
-
-	first_session = NULL;
-}
-
-
-/************************************************************************/
-
-void session_remove_from_list(Session *session)
-{
-	Session *sp;
-	Session *osp;
-
-
-	osp = NULL;
-	for(sp = first_session; sp; sp = sp->next_session)
-	{
-		if(sp == session)
-		{
-			break;
-		}
-
-		osp = sp;
-	}
-
-	if(sp == NULL)
-	{
-		error("session_remove_from_list() : session (0x%x) not found", session);
-		return;
-	}
-
-	if(osp == NULL)
-	{
-		first_session = sp->next_session;
-	}
-	else
-	{
-		osp->next_session = sp->next_session;
-	}
-
-
-	return;
-}
-
-
-/************************************************************************/
-
-void session_free(Session *session)
-{
-	if(session == NULL)
-	{
-		return;
-	}
-
-	snmp_pdu_free(session->pdu);
-
-	request_list_free(session->first_request);
-
-	free(session);
-
-
-	return;
-}
-
-
-/************************************************************************/
-
-void request_list_free(Request *request_list)
-{
-	Request *next_request;
-
-
-	while(request_list)
-	{
-		next_request = request_list->next_request;
-		request_free(request_list);
-		request_list = next_request;
-	}
-}
-
-
-/************************************************************************/
-
-/* This function will send a response and close the session	*/
-/* It should be invoked when o_flags == i_flags			 */
-
-static void session_respond(Session *session)
-{
-	SNMP_variable *first_variable = NULL;
-	SNMP_variable *variable;
-	SNMP_variable *last_variable;
-	Request *request;
-	int i;
-	SNMP_pdu *response;
-	Address address;
-
-	/* Three Phase:
-	 * If the session is the three_phase session, basing on the state
-  	 * we will have different process:
-	 * state is 1: if successful, store the variable list. close the
-	 *		 current session. The free the cur_pdu's variable
-	 *		 list, attach the variable list from get. 
-	 *	 	 change cur_pdu->type=SET_REQ_MSG. create a 
-	 *		 new session(session_open) for next state. the pdu 
-	 *		 is origin_pdu. 
-	 *		 state = PHASE_2;
-	 * state is PHASE_2: if successful. follows thru. else close the
-	 *		 current session. create a new session with the
-	 *		 cur_pdu. wait for response.
-	 *		 In addition, send error response to appl.
-	 *		 state = PHASE_3;
-	 * state is PHASE_3: 
-	 *		drop the response.
- 	 */
-
-	for(request = session->first_request; request; request = request->next_request)
-	{
-		if(request->state != REQUEST_COMPLETED)
-		{
-			error("BUG: session_respond() : session %d - request %d: state is not COMPLETED",
-				session->session_id,
-				request->request_id);
-		}
-	}
-
-
-
-	/* we will extract the variables from the request->reponse	*/
-	/* variable list and append them to the variable list		*/
-	/* pointed by first_variable					*/
-
-	for(i = 0; i < session->n_variables; i++)
-	{
-		for(request = session->first_request; request; request = request->next_request)
-		{
-			if(request->flags & (1 << i))
-			{
-				break;
-			}
-		}
-
-		if(request == NULL)
-		{
-			error("BUG: session_respond(): request is NULL");
-		}
-
-		if(request->response == NULL)
-		{
-			/* request timeout */
-			if(request->subtree != NULL &&
-			   request->subtree->agent !=NULL){
-				/*request->subtree->agent->numOfFailRequest++*/;
-			}
-
-			/* session_respond_error() closes the session */
-			session_respond_error(session, SNMP_ERR_NOSUCHNAME, i + 1);
-			snmp_variable_list_free(first_variable);
-			return;
-		}
-
-		if(request->response->error_status != SNMP_ERR_NOERROR)
-		{
-			int j;
-			int index = 0;
-
-
-			/* find the index in the variables list		*/
-			/* of the variable we are currently dealing with*/
-			for(j = 0; j <= i; j++)
-			{
-				if(request->flags & (1<< j))
-				{
-					index++;
-				}
-			}
-
-			if(request->response->error_index == index)
-			{
-				/* session_respond_error() closes the session */
-				session_respond_error(session, request->response->error_status, i + 1);
-				snmp_variable_list_free(first_variable);
-				return;
-			}
-
-			/*
-			 * error index should not be zero for a non-zero
-			 * error status
-			 */
-			if (request->response->error_index ==
-				INVALID_ERROR_INDEX) {
-				/* invalid error packet from  sub agent */
-				error("session_respond(): the agent %s \
-responded with zero error index, on error status : %d \n",
-				request->subtree->agent->name,
-				request->response->error_status);
-				snmp_variable_list_free(first_variable);
-				session_close(session);
-				return;
-			}
-			/* we are no more interested in building the	*/
-			/* variable list fist_variable			*/
-			continue;
-		}
-
-		/* remove the first variable from the request->response */
-		variable = request->response->first_variable;
-		if(variable == NULL)
-		{
-			error("session_respond(): the agent %s responded with less variables than it was asked",
-				request->subtree->agent->name);
-			session_close(session);
-			return;
-		}
-		request->response->first_variable = variable->next_variable;
-
-		if(first_variable == NULL)
-		{
-			first_variable = variable;
-			last_variable = variable;
-		}
-		else
-		{
-			last_variable->next_variable = variable;
-			last_variable = variable;
-		}
-	} /* for */
-
-	/* Three Phase: save the variable list */
-	if(three_phase.state == PHASE_1){
-		three_phase.variable = first_variable;
-		memcpy(&address,&(session->address),sizeof(Address));
-		session_close(session);
-		three_phase.cur_pdu = NULL;
-		three_phase.state = PHASE_2;
-		session_open(&address,three_phase.origin_pdu);
-		return;
-	}else if(three_phase.state == PHASE_2){
-		/* successful*/
-		three_phase.state = 0;
-		snmp_variable_list_free(three_phase.variable);
-		three_phase.variable = NULL;	
-		three_phase.origin_pdu = NULL;
-		/* follows thru */
-	}else if(three_phase.state == PHASE_3){
-		/* drop the response */
-		session_close(session);
-		return;
-	}
-
-	response = snmp_pdu_dup(session->pdu, error_label);
-	if(response == NULL)
-	{
-		error("snmp_pdu_dup() failed: %s", error_label);
-		/* return ??? */
-	}
-	response->type = GET_RSP_MSG;
-	response->first_variable = first_variable;
-	
-	if( (response->error_status != SNMP_ERR_NOERROR)
-		&& (response->error_status != SNMP_ERR_NOSUCHNAME) )
-	{
-		error(ERR_MSG_SNMP_ERROR,
-			error_status_string(response->error_status), response->error_index,
-			address_string(&(session->address)));
-	}
-
-	if(snmp_pdu_send(clients_sd, &(session->address), response, error_label))
-	{
-		error(ERR_MSG_PDU_SEND_BACK,
-			address_string(&(session->address)),
-			error_label);
-		snmp_pdu_free(response);
-		session_close(session);
-		return;
-	}
-	snmp_pdu_free(response);
-	session_close(session);
-
-
-	return;
-}
-
-
-/************************************************************************/
-
-/*
- *	This function sends a error response and closes the session
- */
-
-static void session_respond_error(Session *session, int status, int index)
-{
-	SNMP_pdu *pdu = session->pdu;
-	Address address;
-
-	/* Three Phase: if errors occurs with three phase undertaking. 
-	 * change the pdu to the three_phase->origin_pdu
-	 */
-	if(three_phase.state == PHASE_1){
-		/* clean up three_phase */
-		session->pdu = three_phase.origin_pdu;
-		pdu = session->pdu;
-		snmp_pdu_free(three_phase.cur_pdu);
-		three_phase.cur_pdu = NULL;
-		three_phase.origin_pdu = NULL;
-		three_phase.state = 0;
-	}else if(three_phase.state == PHASE_2){
-		/* set fail, the session->pdu pts to origin_pdu */
-		three_phase.state = PHASE_3;
-		/* rollback */
-		memcpy(&address,&(session->address),sizeof(Address));
-		three_phase.cur_pdu = snmp_pdu_dup(three_phase.origin_pdu,
-					error_label);
-		three_phase.origin_pdu = NULL;
-		if(three_phase.cur_pdu != NULL){
-			three_phase.cur_pdu->first_variable = 
-			  three_phase.variable;
-			session_open(&address,three_phase.cur_pdu);
-			three_phase.cur_pdu = NULL;
-		}
-	}else if(three_phase.state == PHASE_3){
-		/* drop the packet */
-		three_phase.state = 0;
-		session_close(session);
-		return;
-	}
-
-	pdu->type = GET_RSP_MSG;
-	pdu->error_status = status;
-	pdu->error_index = index;
-
-	if (pdu->error_status == SNMP_ERR_AUTHORIZATIONERROR) {
-		session_close(session);
-		return;
-	}
-
-	if( (pdu->error_status != SNMP_ERR_NOERROR)
-		&& (pdu->error_status != SNMP_ERR_NOSUCHNAME) )
-	{
-		error(ERR_MSG_SNMP_ERROR,
-			error_status_string(pdu->error_status), pdu->error_index,
-			address_string(&(session->address)));
-	}
-
-	if(snmp_pdu_send(clients_sd, &(session->address), pdu, error_label))
-	{
-		error(ERR_MSG_PDU_SEND_BACK,
-			address_string(&(session->address)),
-			error_label);
-		session_close(session);
-		return;
-	}
-	session_close(session);
-
-	return;
-}
-
-
-/************************************************************************/
-
-static Session *session_find(Address *address, u_long request_id)
-{
-	Session *session;
-
-
-	for(session = first_session; session; session = session->next_session)
-	{
-		if( (session->pdu->request_id == request_id)
-			&& (session->address.sin_port == address->sin_port)
-			&& (session->address.sin_addr.s_addr == address->sin_addr.s_addr) )
-		{
-			return session;
-		}
-	}
-
-
-	return NULL;
-}
-
-/* (5-14-96) */
-static int session_send_loopback_request(Request *request,int doRespondHere)
-{
-	Session *session = request->session;
-	SNMP_pdu *pdu;
-	Subtree *subtree = request->subtree;
-	Agent *agent;
-	struct timeval tv;
-	SNMP_variable *new_variable, *variable;
-
-	gettimeofday(&tv, (struct timezone *) 0);
-
-	if(subtree == NULL || request->pdu == NULL)
-	{
-		error("BUG: session_send_loopback_request(): subtree is NULL");
-		return -1;
-	}
-	agent = subtree->agent;
-
-
-	request->time = tv;
-	tv.tv_usec = tv.tv_usec + agent->timeout;
-	tv.tv_sec = tv.tv_sec + tv.tv_usec / 1000000L;
-	tv.tv_usec = tv.tv_usec % 1000000L;
-	request->expire = tv;
-
-	session->o_flags = session->o_flags | request->flags;
-	request->state = REQUEST_STARTED;
-	/* duplicate the pdu */
-	pdu = snmp_pdu_dup(request->pdu, error_label);
-	pdu->request_id = session->session_id + request->request_id;
-        
-	for(variable = request->pdu->first_variable; variable; 
-	    variable = variable->next_variable)
-        {
-		new_variable = snmp_variable_dup(variable, error_label);
-		if(pdu->first_variable)
-		{
-			SNMP_variable *current_variable;
-			SNMP_variable *last_variable;
-
-			for(current_variable = pdu->first_variable; 
-			    current_variable; 
-			    current_variable = current_variable->next_variable)
-			{
-				last_variable = current_variable;
-			}
-			last_variable->next_variable = new_variable;
-		}
-		else
-		{
-			pdu->first_variable = new_variable;
-		}
-	}
-
-	if (agent_process(&(session->address), pdu) == -1) {
-		if (trace_level > 1) {
-			trace("local pdu process error \n");
-		}
-		snmp_pdu_free(pdu);
-		return (-1);
-	}
-	/* pdu stores the response */
-   	session_process_response(pdu,doRespondHere);
-	
-  	return 1;
-}
-
-/************************************************************************/
-
-static int session_send_request(Request *request)
-{
-	Session *session = request->session;
-	SNMP_pdu *pdu = request->pdu;
-	Subtree *subtree = request->subtree;
-	Agent *agent;
-	struct timeval tv;
-
-
-	pdu->request_id = session->session_id + request->request_id;
-	gettimeofday(&tv, (struct timezone *) 0);
-
-	if(subtree == NULL)
-	{
-		error("BUG: session_send_request(): subtree is NULL");
-		return -1;
-	}
-	agent = subtree->agent;
-
-	if(snmp_pdu_send(agents_sd, &(agent->address), pdu, error_label))
-	{ 
-		error(ERR_MSG_PDU_SEND_TO,
-			address_string(&(agent->address)),
-			error_label);
-		return -1;
-	}
-
-	request->time = tv;
-	tv.tv_usec = tv.tv_usec + agent->timeout;
-	tv.tv_sec = tv.tv_sec + tv.tv_usec / 1000000L;
-	tv.tv_usec = tv.tv_usec % 1000000L;
-	request->expire = tv;
-
-	session->o_flags = session->o_flags | request->flags;
-	request->state = REQUEST_STARTED;
-
-
-	return 0;
-}
-
-
-/************************************************************************/
-
-static Request *session_move_request(Request *request, Subtree *subtree)
-{
-	Session *session = request->session;
-
-
-	if(trace_level > 0)
-	{
-		trace("!! session %d - request %d: trying another subtree %s supported by %s\n\n",
-			session->session_id,
-			request->request_id,
-			SSAOidString(&(subtree->name)),
-			subtree->agent->name);
-	}
-
-	request->subtree = subtree;
-	
-	if (subtree->agent->first_manager != NULL)
-		set_first_manager(subtree->agent->first_manager);
-	
-	if(request_add_visited_agent(request, subtree->agent) == -1)
-	{
-		error("request_add_visited_agent() failed");
-		return NULL;
-	}
-
-	if (local_request(request)) {
-		if (session_send_loopback_request(request, TRUE) == -1) {
-			if (trace_level > 1) {
-				trace("session_send_loopback_request() \
-failed\n");
-			}
-			return (NULL);
-		}
-	} else if(session_send_request(request) == -1) {
-		error("session_send_request() failed");
-		return NULL;
-	}
-
-	return request;
-}
-
-
-/************************************************************************/
-
-void request_free(Request *request)
-{
-	if(request == NULL)
-	{
-		return;
-	}
-
-	agent_list_free(request->visited_agent_list);
-
-	snmp_pdu_free(request->pdu);
-
-	snmp_pdu_free(request->response);
-
-	free(request);
-
-	return;
-}
-
-void trap_processing()
-{
-	Address address;
-	SNMP_pdu *trap_request;
-	struct tms buffer;
-	u_long time_stamp;
-
-	trap_request = snmp_pdu_receive(trap_sd, &address, error_label);
-	if(trap_request == NULL)
-	{
-		error(ERR_MSG_PDU_RECEIVED,
-			address_string(&address),
-			error_label);
-		return;
-	}
-
-
-	if(trap_request->type != TRP_REQ_MSG)
-	{
-		error("bad PDU type (0x%x) received from %s",
-			trap_request->type,
-			address_string(&address));
-		snmp_pdu_free(trap_request);
-		return;
-	}
-
-	/* filter the trap_request */
-	/* currently, base on the trap-community names to decide which
-	   are the list of target hosts */
-	time_stamp = (Integer) times(&buffer);
-
-	/* propagate those traps registered by managers */
-	trap_filter_action(&(trap_request->enterprise),
-	  trap_request->generic,trap_request->specific,time_stamp,
-	  trap_request->first_variable);
-
-	snmp_pdu_free(trap_request);
-	return;
-}
-
-
-static Subtree *forward_subtree_match(Subtree *subtree, Oid *name)
-{
-	Subtree *sp;
-	Subtree *last=NULL;
-	Subtree *first_valid_subtree;
-
-
-	if(name == NULL || subtree == NULL || first_subtree == NULL)
-	{
-		return NULL;
-	}
-
-	for(sp = subtree->next_subtree; sp; sp = sp->next_subtree)
-	{
-	 	/* subtree is invalid skip (vsb)*/
-		if(subtree_is_valid(sp)==FALSE) continue;
-
-		if(SSAOidCmp(name, &(sp->name)) >= 0  &&
-		   sp->agent !=0 && subtree->agent !=0 &&
-		   sp->agent != subtree->agent)
-		{
-			return sp;
-		}
-
-	}
-
-
-	return last;
-}
-
-/************************************************************************/
-/* (5-14-96) partition into two functions */
-/* pdu_read is not null, this routine is used for local response
-   there is a catch the session_respond is skipped, because, it will
-   be processed later in the session_open call */
-
-static void session_process_response(SNMP_pdu *pdu_read,int doRespondHere)
-{
-	Address address;
-	SNMP_pdu *response;
-	Session *session;
-	SNMP_pdu *pdu;
-	Subtree *subtree;
-	Subtree *sub;
-	Request *request;
-
-
-	if(pdu_read == NULL)
-	  response = snmp_pdu_receive(agents_sd, &address, error_label);
-	else
-	  response = pdu_read;	
-	
-	if(response == NULL)
-	{
-		error(ERR_MSG_PDU_RECEIVED,
-			address_string(&address),
-			error_label);
-		return;
-	}
-
-
-	if(response->type != GET_RSP_MSG)
-	{
-		error("bad PDU type (0x%x) received from %s",
-			response->type,
-			address_string(&address));
-		snmp_pdu_free(response);
-		return;
-	}
-
-
-	for(session = first_session; session; session = session->next_session)
-	{
-		if((response->request_id & SESSION_ID_MASK) == session->session_id)
-		{
-			break;
-		}
-	}
-	if(session == NULL)
-	{
-		Agent *agent;
-
-
-		agent = agent_find(&address);
-/*
-		error(ERR_MSG_UNKNOWN_FRAGMENT,
-			agent? agent->name: "???",
-			address_string(&address));
-*/
-		snmp_pdu_free(response);
-		return;
-	}
-
-
-	for(request = session->first_request; request; request = request->next_request)
-	{
-		if((response->request_id & REQUEST_ID_MASK) == request->request_id)
-		{
-			break;
-		}
-	}
-	if(request == NULL)
-	{
-		error("request not found for the session %d for a PDU received from %s",
-			session->session_id,
-			address_string(&address));
-		snmp_pdu_free(response);
-		return;
-	}
-	if(request->state == REQUEST_COMPLETED)
-	{
-		error("a PDU has been received from %s for session %d - request %d whereas the request is already completed",
-			address_string(&address),
-			session->session_id,
-			request->request_id);
-		snmp_pdu_free(response);
-		return;
-	}
-	if(request->response)
-	{
-		error("BUG: session_read(): response is not NULL");
-	}
-
-
-	pdu = session->pdu;
-	subtree = request->subtree;
-	if(subtree == NULL)
-	{
-		error("BUG: session_read(): subtree is NULL");
-		snmp_pdu_free(response);
-		return;
-	}
-
-	if (subtree->agent->numOfFailRequest > 0)
-		trace("Agent %s is now OK", subtree->agent->name) ; 
-        subtree->agent->numOfFailRequest=0;
-
-	if(pdu->type == GETNEXT_REQ_MSG)
-	{
-		if( (response->error_status == SNMP_ERR_NOSUCHNAME)
-			&& (response->error_index == 1)
-			&& (response->first_variable != NULL) )
-		{
-			if(trace_level > 0)
-			{
-				trace("!! session %d - request %d: the Get-Next returned No Such Name\n\n",
-					session->session_id,
-					request->request_id);
-			}
-
-			/* Check if another agent supports some */
-			/* variables greater than the first one */
-			/* of the PDU				*/
-
-			for(sub = subtree->next_subtree; sub; sub = sub->next_subtree)
-			{
-				/* skip invalid subtree (vsb) */
-				if(subtree_is_valid(sub)==FALSE) continue;
-				if(!is_in_agent_list(request->visited_agent_list, sub->agent))
-				{
-					session_move_request(request, sub);
-					snmp_pdu_free(response);
-					return;
-				}
-			}
-		}
-		else
-		if( (response->first_variable != NULL)
-/*&& ((sub = forward_subtree_match(subtree, &(response->first_variable->name))) != NULL)*/
-
-&& ((sub = subtree_match(GET_REQ_MSG, &(response->first_variable->name))) != NULL)
-
-			&& (sub != subtree) 
-&& (SSAOidCmp(&(subtree->name),&(sub->name)) < 0)
-/*
-&&(sub->agent!=NULL && subtree->agent!=NULL && sub->agent!=subtree->agent)
-*/
-)
-		{
-			/* we are in another subtree */
-
-			Subtree *s;
-
-
-			if(trace_level > 0)
-			{	
-				trace("!! session %d - request %d: the Get-Next issued in the subtree %s supported by %s",
-					session->session_id,
-					request->request_id,
-					SSAOidString(&(subtree->name)),
-					subtree->agent->name);
-				trace(" returned a response in the subtree %s supported by %s\n\n",
-					SSAOidString(&(sub->name)),
-					sub->agent->name);
-			}
-
-
-			/* Is there a subtree supported by another agent between */
-			/* subtree and sub ? */
-
-/* 12-19-96 snmpgetnext 
-			for(s = subtree->next_subtree; s; s = s->next_subtree)
-			{
-				if(subtree_is_valid(s)==FALSE) continue;
-				if(s == sub)
-				{
-					break;
-				}
-*/
-		s = sub;
-
-				if(subtree->agent !=  s->agent)
-				{
-					/* There is a subtree supported by another agent */
-					/* between subtree and sub */
-					
-					session_move_request(request, s);
-					snmp_pdu_free(response);
-					return;
-				}
-/*
-			}
-*/
-		}
-	}
-
-
-	/* we consider response a valid response for the request request */
-	if(request->response)
-	{
-		error("BUG: session_read(): request->response is not NULL");
-	}
-	request->response = response;
-	request->state = REQUEST_COMPLETED;
-	session->i_flags = session->i_flags | request->flags;
-
-
-	if(doRespondHere && session->i_flags == session->o_flags)
-	{
-		session_respond(session);
-	}
-
-	return;
-}
-
-void session_read()
-{
-   session_process_response(NULL,TRUE);
-
-}
-
-/************************************************************************/
-
-void session_select_info(struct timeval *timeout)
-{
-	Session *sp;
-	Request *rp;
-	struct timeval now, earliest;
-
-
-	if(first_session == NULL)
-	{
-		return;
-	}
-
-	/* For each request in each session, if it is the	*/
-	/* earliest timeout to expire, mark it as lowest.	*/
-
-	timerclear(&earliest);
-	for(sp = first_session; sp; sp = sp->next_session)
-	{
-		for(rp = sp->first_request; rp; rp = rp->next_request)
-		{
-			if(rp->state == REQUEST_COMPLETED)
-			{
-				continue;
-			}
-
-			if(!timerisset(&earliest) || timercmp(&rp->expire, &earliest, <))
-			{
-				earliest = rp->expire;
-			}
-		}
-	}
-
-
-	/* Now find out how much time until the earliest timeout.  This		*/
-	/* transforms earliest from an absolute time into a delta time, the	*/
-	/* time left until the select should timeout.				*/
-
-	gettimeofday(&now, (struct timezone *)0);
-	earliest.tv_sec--;	/* adjust time to make arithmetic easier */
-	earliest.tv_usec += 1000000L;
-	earliest.tv_sec -= now.tv_sec;
-	earliest.tv_usec -= now.tv_usec;
-	while (earliest.tv_usec >= 1000000L)
-	{
-		earliest.tv_usec -= 1000000L;
-		earliest.tv_sec += 1;
-	}
-	if(earliest.tv_sec < 0)
-	{
-		earliest.tv_sec = 0;
-		earliest.tv_usec = 0;
-	}
-
-	/* if our delta time is less, reset timeout */
-	if(timercmp(&earliest, timeout, <))
-	{
-		*timeout = earliest;
-	}
-
-
-	return;
-}
-
-
-/************************************************************************/
-
-void session_timeout()
-{
-	struct timeval now;
-
-
-	gettimeofday(&now, (struct timezone *)0);
-
-	while(session_timeout_loop(&now) == 1);
-	destroy_hanging_agent(); /* destroy one agent at a time */
-
-}
-
-
-/************************************************************************/
-
-int max_requests = 1000;
-
-static int session_timeout_loop(struct timeval *now)
-{
-	Session *sp;
-	Request *rp;
-	int nrequests = 0;
-
-
-	/* For each session outstanding, check to see if the timeout has expired. */
-
-	for(sp = first_session; sp; sp = sp->next_session)
-	{
-
-
-		for(rp = sp->first_request; rp; rp = rp->next_request)
-		{
-			nrequests ++;
-
-			if(rp->state == REQUEST_COMPLETED)
-			{
-				continue;
-			}
-
-			if(timercmp(&rp->expire, now, <) || nrequests > max_requests)
-			{
-				Subtree *subtree = rp->subtree;
-
-
-				if(subtree == NULL)
-				{
-					error("BUG: session_timeout_loop(): subtree is NULL");
-					/* session_respond_error() closes the session */
-					session_respond_error(sp, SNMP_ERR_GENERR, 1);
-					return 1;
-				}
-
-				if (subtree->agent->numOfFailRequest == 0 )
-					trace(ERR_MSG_AGENT_NOT_RESPONDING, subtree->agent->name);
-                                subtree->agent->numOfFailRequest++;
-
-				/* this timer has expired */
-				if(trace_level > 0)
-				{
-					trace("!! session %d - request %d: timeout\n\n",
-						sp->session_id,
-						rp->request_id);
-				}
-
-				if(sp->pdu->type == GETNEXT_REQ_MSG)
-				{
-					/* Check if there is a subtree supported	*/
-					/* by another agent after subtree		*/
-
-					Subtree *sub;
-
-
-					for(sub = subtree->next_subtree; sub; sub = sub->next_subtree)
-					{
-						if(!is_in_agent_list(rp->visited_agent_list, sub->agent))
-						{	
-							session_move_request(rp, sub);
-							return 1;
-						}
-					}
-				}
-
-
-				/* No Such Name */
-			
-				sp->i_flags = sp->i_flags | rp->flags;
-				rp->state = REQUEST_COMPLETED;
-
-				if(sp->i_flags == sp->o_flags)
-				{
-					session_respond(sp);
-					return 1;
-				}
-			}
-		}
-	}
-
-	return 0;
-}
-
-
-/************************************************************************/
-
-static int request_add_visited_agent(Request *request, Agent *agent)
-{
-	Agent_List *new;
-
-
-	if(request == NULL)
-	{
-		error("BUG: request_add_visited_agent(): request is NULL");
-		return -1;
-	}
-
-	if(agent == NULL)
-	{
-		error("BUG: request_add_visited_agent(): agent is NULL");
-		return -1;
-	}
-
-	new = (Agent_List *) malloc(sizeof(Agent_List));
-	if(new == NULL)
-	{
-		error("malloc() failed");
-		return -1;
-	}
-	new->next = request->visited_agent_list;
-	request->visited_agent_list = new;
-	new->agent = agent;
-
-
-	return 0;
-}
-
-
-/************************************************************************/
-
-static void agent_list_free(Agent_List *alp)
-{
-	Agent_List *next;
-
-
-	while(alp)
-	{
-		next = alp->next;
-		free(alp);
-		alp = next;
-	}
-}
-
-
-/************************************************************************/
-
-static int is_in_agent_list(Agent_List *agent_list, Agent *agent)
-{
-	Agent_List *alp;
-
-
-	for(alp = agent_list; alp; alp = alp->next)
-	{
-		if(alp->agent == agent)
-		{
-			return True;
-		}
-	}
-
-	return False;
-}
-
-int no_outstanding_session_for_the_agent(Agent* ap)
-{
-  Session *sp;
-  Request *rp;
-
-  for(sp = first_session; sp; sp = sp->next_session){
-	for(rp = sp->first_request; rp; rp = rp->next_request){
-	  if(rp->subtree && rp->subtree->agent==ap)
-		return 0;
-	}
-  }
-  
-  return 1;
-}
-
-
-static int community_check (Address * address, Agent * agent, int pdu_type, char * community)
-{
-	Manager *mgr;
-	int ret;
-
-
-	if (agent == NULL) {
-		return TRUE;
-	}
-	if (agent->first_manager == NULL) {
-		return TRUE;
-	}
-	/* check host */
-	
-	mgr = is_valid_manager(address, &mgr);
-
-	if(mgr == NULL)
-	{
-                error("community_check(): unauthorized manager (%s)",
-                	ip_address_string(&(address->sin_addr)));
-                return FALSE;
-        }
-
-	if (is_valid_community(community, pdu_type, mgr))
-                return TRUE;
-	else {
-        	error("community_check() : bad community from %s",
-               	ip_address_string(&(address->sin_addr)));
-		return FALSE;
-	}
-}
--- a/usr/src/cmd/agents/snmp/snmprelayd/session.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- */
-
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * HISTORY
- * 5-28-96      Jerry Yeung     Three phase set protocol(ThreePhase)
- */
-
-#ifndef _SESSION_H_
-#define _SESSION_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-typedef enum _Phase { PHASE_1=1, PHASE_2, PHASE_3} Phase;
-
-
-/***** GLOBAL CONSTANTS *****/
-
-/* states of a request */
-#define REQUEST_STARTED		1
-#define REQUEST_COMPLETED	2
-
-
-/***** GLOBAL TYPES *****/
-
-typedef struct _Agent_List {
-	struct _Agent_List	*next;
-	struct _Agent		*agent;
-} Agent_List;
-
-
-typedef struct _Request {
-	struct _Request *next_request;
-
-	struct _Session *session;
-	struct _Subtree *subtree;	/* associated subtree */
-	Agent_List *visited_agent_list; /* list of the agents visited so far */
-
-	u_long		request_id;
-
-	SNMP_pdu	*pdu;		/* SNMP request */
-
-	u_long		flags;		/* cf below */
-
-	int		state;		/* STARTED or COMPLETED */
-	SNMP_pdu	*response;	/* response of the agent to the pdu */
-
-	struct timeval  time;		/* time when the pdu was sent */
-	struct timeval  expire;		/* time when the Request will timeout */
-} Request;
-
-
-typedef struct _Session {
-	struct _Session	*next_session;
-
-	u_long		session_id;
-
-	Address		address;	/* the address of the SNMP application */
-
-	SNMP_pdu	*pdu;		/* the "original" SNMP request */
-
-	int		n_variables;	/* number of variables in the	*/
-					/* "original" SNMP request	*/
-
-	u_long		o_flags;	/* cf below */
-	u_long		i_flags;	/* cf below */
-
-	struct _Request *first_request; /* the request list of the session */
-
-} Session;
-
-/* Three Phase */
-typedef struct _Three_Phase {
-        SNMP_pdu *origin_pdu;
-        SNMP_pdu *cur_pdu;
-	Phase	state; 
-	SNMP_variable *variable;
-	Session* session;
-} Three_Phase;
-
-
-
-/* explanation for the flags:				*/
-/* --------------------------				*/
-/*							*/
-/* Each bit in a flags corresponds to a variable	*/
-/* in the "original" SNMP request.			*/
-/* For example, the o_flag 0x7 in the Session means	*/
-/* that the "original" SNMP request contains 3		*/
-/* variables, the flags 0x5 of the Request 0 means that */
-/* this Request handles the 1st and the 3rd		*/
-/* variable of the "original" SNMP request, the flags	*/
-/* 0x2 of the Request 1 means that this Request		*/
-/* handles the 2nd variable of the "original" SNMP	*/
-/* request. When a Request is completed, its flags	*/
-/* are ORed with the i_flags of its Session, so as soon */
-/* as o_flags == i_flags, we known that all the Requests*/
-/* are completed and we start to compute the response	*/
-/* of the "original" SNMP request.			*/
-
-
-/***** GLOBAL FUNCTIONS *****/
-
-extern void trace_sessions();
-
-/* session_list_delete() will delete the whole session list */
-extern void session_list_delete();
-
-extern void session_dispatch();
-extern void session_read();
-
-extern void session_select_info(struct timeval *tv);
-extern void session_timeout();
-
-extern int any_outstanding_session();
-
-extern void session_close(Session *session);
-extern void session_free(Session *session);
-extern void request_list_free(Request *request_list);
-extern void request_free(Request *request);
-
-#endif /* _SESSION_H_ */
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/sh_table.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,600 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "sh_table.h"
-#include "subtree.h"
-
-Table *first_table=NULL;
-Table *last_table=NULL;
-
-static Subid dst_subids[1024];
-static int dst_len;
-
-void trace_tables()
-{
-        Table *tp;
-
-
-        trace("TABLES:\n");
-        for(tp = first_table; tp; tp = tp->next_table)
-        {
-                trace("\t%-30s %-30s",
-                        tp->agent->name?tp->agent->name:"UNKNOWN",
-                        SSAOidString(&(tp->name)));
-
-                trace(" %[%d-%d] [%d-%d] view:%s status:%d\n",
-                        tp->first_column_subid,
-                        tp->last_column_subid,
-/*
-                        SSAOidString(&(tp->indexs)),
-*/
-                        tp->first_index_subid,
-                        tp->last_index_subid,
-			SSAStringToChar(tp->regTblView),
-			tp->regTblStatus);	
-/*
-        String  regTblView;
-        Integer regTblStatus;
-*/
-        }
-        trace("\n");
-}
- 
-	
-/****************************************************************/
-
-int is_first_entry(Table *table)
-{
-	Table *tp;
-
-
-	for(tp = first_table; tp; tp = tp->next_table)
-	{
-		if(table == tp)
-		{
-			continue;
-		}
-
-		if(SSAOidCmp(&(tp->name), &(table->name)) == 0)
-		{
-/*
-			if(SSAOidCmp(&(tp->indexs), &(table->indexs)) < 0)
-			{
-				return False;
-			}
-*/
-			if(tp->first_index_subid < table->first_index_subid)
-			{
-				return False;
-			}
-		}
-	}
-	
-	return True;
-}
-
-
-/****************************************************************/
-
-void table_list_delete()
-{
-	Table *next;
-
-	while(first_table)
-	{
-		next = first_table->next_table;
-		table_free(first_table);
-		first_table = next;
-	}
-
-	first_table = NULL;
-	last_table = NULL;
-}
-
-
-/****************************************************************/
-
-void table_free(Table *tp)
-{
-	if(tp == NULL)
-	{
-		return;
-	}
-
-	if(tp->name.subids)
-	{
-		free(tp->name.subids);
-	}
-	/* free the TblViewString */
-	if(tp->regTblView.chars != NULL &&
-	   tp->regTblView.len != 0)
-		free(tp->regTblView.chars);
-
-/*
-	if(tp->indexs.subids)
-	{
-		free(tp->indexs.subids);
-	}
-*/
-
-	free(tp);
-}
-
-void delete_all_tables_for_agent(Agent *agent)
-{
-        Table *tp = first_table;
-        Table *next, *last = NULL;
-
-        while(tp)
-        {
-                next = tp->next_table;
-                if(tp->agent == agent){
-                  if(last == NULL)
-                        first_table = next;
-                  else
-                        last->next_table = next;
-                  table_free(tp);
-                }else{
-                        last = tp;
-                }
-                tp = next;
-        }
-        last_table = last;
- 
-}
-
-void table_detach(Table *tgt)
-{
-  Table *sp, *last=NULL;
-
-        if(tgt == NULL) return;
-        for(sp = first_table; sp; sp = sp->next_table)
-        {
-                if(sp == tgt)
-                {
-                        break;
-                }
-
-                last = sp;
-        }
-
-	if(sp==NULL) return;
-        if(last == NULL)
-        {
-                first_table = tgt->next_table;
-                tgt->next_table = NULL;
-        }
-        else
-        {
-                last->next_table = tgt->next_table;
-                tgt->next_table = NULL;
-        }
-}
-
-static int subids_cat(Subid *subids, int len)
-{
-
-	if(subids == NULL) return -1;
-        memcpy(&(dst_subids[dst_len]), subids, len * sizeof(Subid));
-	dst_len += len;
-	return 0;
-}
-
-
-static int activate_table_oids(Table *tp, int type)
-{
-  Subid index;
-  Subid one = 1;
-  Subid column;
-  Subtree *sp;
-  TblTag *tbl_tag=NULL;
-
-
-
- for(index = tp->first_index_subid; index <= tp->last_index_subid; index++){
-  for(column = tp->first_column_subid; column <= tp->last_column_subid; column++)
-  {
-    dst_subids[0]='\0';
-    dst_len = 0;
-    if(subids_cat(tp->name.subids, tp->name.len) == -1)
-    {
-            return -1;
-    }
-    if(subids_cat(&one, 1) == -1)
-    {
-            return -1;
-    }
-    if(subids_cat(&column, 1) == -1)
-    {
-            return -1;
-    }
-    if(subids_cat(&index, 1) == -1)
-    {
-            return -1;
-    }
-    /* search , compare and/or replace(purge and add) */
-    sp=subtree_find(dst_subids,dst_len);
-    if(sp!=NULL) sp->regTreeStatus = type;
-  }
- }
-  return 0;
-}
-
-static int activate_table_col_obj(Table *tp)
-{
-  Subid one = 1;
-  Subid column;
-  Subid index;
-  Subtree *sp;
-  TblTag *tbl_tag=NULL;
-
-  
-  for(column = tp->first_column_subid; column <= tp->last_column_subid; column++)
-  {
-    dst_subids[0]='\0';
-    dst_len = 0;
-    if(subids_cat(tp->name.subids, tp->name.len) == -1)
-    {
-            return -1;
-    }
-     dst_subids[dst_len-1]++;
-/*
-    if(subids_cat(&one, 1) == -1)
-    {
-            return -1;
-    }
-*/
-    if(subids_cat(&column, 1) == -1)
-    {
-            return -1;
-    }
-    /* search , compare and/or replace(purge and add) */
-    sp=subtree_find(dst_subids,dst_len);
-
-    if(sp != NULL && sp->tbl_tag != NULL)
-    {
-       if(sp->tbl_tag->entry_index > tp->first_index_subid)
-            subtree_purge(dst_subids,dst_len);
-       else
-		continue;
-    }
-    tbl_tag = (TblTag*)calloc(1,sizeof(TblTag));
-    if(tbl_tag != NULL){
-      tbl_tag->entry_index = tp->first_index_subid;
-      tbl_tag->type = TBL_TAG_TYPE_COL;
-      tbl_tag->table = tp;
-    }
-    if(subtree_add(tp->agent, dst_subids, dst_len,tbl_tag) == -1)
-    {   
-      sprintf(error_label, "subtree_add() failed for table %s for the agent %s",           SSAOidString(&(tp->name)),
-      tp->agent&&tp->agent->name?tp->agent->name:"UNKNOWN");
-      dst_subids[0]='\0';
-      dst_len = 0;
-      if(tbl_tag) free(tbl_tag);
-      tbl_tag = NULL;
-      return -1;
-    }
-  }
-  return 0;
-}
-
-int activate_table(Table *tp)
-{
- if( activate_table_oids(tp,SSA_OPER_STATUS_ACTIVE)!=0 ||
-     activate_table_col_obj(tp)!=0 ) 
-	return -1;
- return 0;
-}
-
-int deactivate_table(Table *tp)
-{
- if( activate_table_oids(tp,SSA_OPER_STATUS_NOT_IN_SERVICE)!=0 ||
-      delete_table_col_obj(tp)!=0 ) return -1;
- return 0;
-}
-
-/* whether oid1 is substring of oid2 */
-static int is_suboid(Oid* oid1,Oid *oid2)
-{
-        int min;
-        int i;
-
-
-        if(oid1 == NULL)
-        {
-                fprintf(stderr, "BUG: SSAOidCmp(): oid1 is NULL");
-                return -2;
-        }
- 
-        if(oid2 == NULL)
-        {
-                fprintf(stderr, "BUG: SSAOidCmp(): oid2 is NULL");
-                return -2;
-        }
- 
-        min = MIN(oid1->len, oid2->len);
- 
-        for(i = 0; i < min; i++)
-        {
-                if(oid1->subids[i] > oid2->subids[i])
-                {
-                        return -1;
-                }
- 
-                if(oid1->subids[i] < oid2->subids[i])
-                {
-                        return -1;
-                }
-        }
-	if(oid1->len <= oid2->len) return 0;
-	return -1;
-}
-
-static Subtree* get_oid_in_col_container(Subtree* cur_subtree, int *elem_exist)
-{
-        Subtree *sp;
-        int ret;
-
-	*elem_exist = FALSE;
-        for(sp = cur_subtree; sp; sp = sp->next_subtree)
-        {
-		if(sp==cur_subtree) continue;
-		ret = is_suboid(&(cur_subtree->name),&(sp->name));
-                if(ret == 0)
-                {
-			*elem_exist = TRUE;
-			if(subtree_is_valid(sp)) return sp;
-			continue;
-                }
-        }
-
-        return NULL;
-
-} 
-
-int delete_table_oid(Table *tp)
-{
-  Subid index;
-  Subid one = 1;
-  Subid column;
-  Subtree *sp;
-  TblTag *tbl_tag=NULL;
-
-
-
- for(index = tp->first_index_subid; index <= tp->last_index_subid; index++){
-  for(column = tp->first_column_subid; column <= tp->last_column_subid; column++)
-  {
-    dst_subids[0]='\0';
-    dst_len = 0;
-    if(subids_cat(tp->name.subids, tp->name.len) == -1)
-    {
-            return -1;
-    }
-    if(subids_cat(&one, 1) == -1)
-    {
-            return -1;
-    }
-    if(subids_cat(&column, 1) == -1)
-    {
-            return -1;
-    }
-    if(subids_cat(&index, 1) == -1)
-    {
-            return -1;
-    }
-    if(subtree_purge(dst_subids,dst_len) == FALSE)
-	return -1;
-  }
- }
-  return 0;
-}
-
-int delete_table_col_obj(Table *tp)
-{
-  /* 1. delete the oids from the subtree list.
-     2. scan thru the columarn object, if matching the table, delete and
-	find a new one for it.
-   */
-  Subid one = 1;
-  Subid column;
-  Subid index;
-  Subtree *sp, *sp1;
-  TblTag *tbl_tag=NULL;
-  int elem_exist;
-
-  
-  for(column = tp->first_column_subid; column <= tp->last_column_subid; column++)
-  {
-    dst_subids[0]='\0';
-    dst_len = 0;
-    if(subids_cat(tp->name.subids, tp->name.len) == -1)
-    {
-            return -1;
-    }
-    if(subids_cat(&one, 1) == -1)
-    {
-            return -1;
-    }
-    if(subids_cat(&column, 1) == -1)
-    {
-            return -1;
-    }
-    /* search , compare and/or replace(purge and add) */
-    if((sp=subtree_find(dst_subids,dst_len)) != NULL)
-    {
-       if(sp->tbl_tag != NULL &&
-          sp->tbl_tag->entry_index == tp->first_index_subid &&
-	  sp->tbl_tag->table != NULL && sp->tbl_tag->table == tp)
-       {
-	    sp1 = get_oid_in_col_container(sp,&elem_exist);
-
-            subtree_purge(dst_subids,dst_len);
-
-	    /* find the right table or oid */
-	    if( sp1 != NULL &&
-		sp1->tbl_tag != NULL && sp1->tbl_tag->table != NULL && 
-		sp1->agent != NULL )
-	    {
-              tbl_tag = (TblTag*)calloc(1,sizeof(TblTag));
-              if(tbl_tag != NULL){
-                tbl_tag->type = TBL_TAG_TYPE_COL;
-                tbl_tag->entry_index = sp1->tbl_tag->table->first_index_subid;
-	        tbl_tag->table = sp1->tbl_tag->table;
-              }
-    	      if(subtree_add(sp1->agent, dst_subids, dst_len,tbl_tag) == -1)
-    	      {   
-            	sprintf(error_label, "subtree_add() failed for table %s for the agent %s",           
-                    SSAOidString(&(sp1->tbl_tag->table->name)),
-                    sp1->agent&&sp1->agent->name?sp1->agent->name:"UNKNOWN");
-		    dst_subids[0]='\0';
-		    dst_len = 0;
-            	    if(tbl_tag) free(tbl_tag);
-            	    tbl_tag = NULL;
-            	    return -1;
-    	      }
-	   }
-       }
-    }
-  }
-  return 0;
-}
-
-int delete_table(Table *tp)
-{
-  if(tp==NULL) return -1;
-  /* (mibpatch) don't call the following two lines, when
-     the table is mirror, delete the subtree */
-  if(tp->mirror_flag==1){
-	/* delete the subtree */
-     subtree_purge(tp->name.subids,tp->name.len);
-  }else{
-  	if( delete_table_oid(tp)!= 0 ||
-      	delete_table_col_obj(tp)!=0 ) return -1;
-  }
-  /*destroy the table */
-  table_detach(tp);
-  table_free(tp);
-  return 0;
-}
-
-int activate_table_for_agent(Agent* agent)
-{
-  Table *sp;
-
-  for(sp = first_table; sp; sp = sp->next_table)
-  {
-	if(sp->agent != NULL && sp->agent == agent){
-	  activate_table(sp);
-	  sp->regTblStatus = SSA_OPER_STATUS_ACTIVE;
-	}
-  }
-  return 0;
-}
-
-int deactivate_table_for_agent(Agent* agent)
-{
-  Table *sp;
-
-  for(sp = first_table; sp; sp = sp->next_table)
-  {
-	if(sp->agent != NULL && sp->agent == agent){
-	  deactivate_table(sp);
-	  sp->regTblStatus = SSA_OPER_STATUS_NOT_IN_SERVICE;
-	}
-  }
-  return 0;
-}
-
-void delete_all_table_from_agent(Agent *agent)
-{
-  Table *sp=first_table;
-  Table *next, *last=NULL;
-
-  while(sp)
-  {
-        next = sp->next_table;
-
-        if(sp->agent != NULL && sp->agent == agent){
-                if(last==NULL){
-                        first_table = next;
-                }else{
-                        last->next_table=next;
-                }
-                if( delete_table_oid(sp)!= 0 ||
-                    delete_table_col_obj(sp)!=0 ){
-                        error("table deletion error");
-                        return ;
-                }
-                table_free(sp);
-        }else{
-                last = sp;
-        }
-        sp = next;
-  }
-}
-
-void create_mirror_table_from_subtree(Subtree* subtree)
-{
-  Table *table, *tmp_table, *last_table;
-
-  if(subtree==NULL) return;
-  if((table=(Table*)calloc(1,sizeof(Table)))==NULL) return;
-  table->regTblStatus = subtree->regTreeStatus;
-  table->mirror_flag = 1;
-  if(subtree->agent!=NULL){
-  	table->regTblIndex = ++subtree->agent->agentTblIndex;
-  	table->regTblAgentID = subtree->agent->agentID;
-  }
-  SSAOidCpy(&(table->name),&(subtree->name),error_label);
-  table->agent = subtree->agent;
-  subtree->mirror_tag = (struct _MirrorTag *)calloc(1,sizeof(struct _MirrorTag));
-  if(subtree->mirror_tag!=NULL) subtree->mirror_tag->table = table;
-  
-  /* insert the table */
-  /* later sort it in order */
-  
-  if(first_table==NULL){
-	first_table = table;
-  }else{
-	last_table = NULL;
-	for(tmp_table=first_table;tmp_table;tmp_table=tmp_table->next_table){
-		if(tmp_table->regTblAgentID > table->regTblAgentID ||
-		   (tmp_table->regTblAgentID==table->regTblAgentID &&
-		    tmp_table->regTblIndex > table->regTblIndex))
-			break;
-		last_table = tmp_table;
-	}
-	if(last_table==NULL){
-		table->next_table = first_table;
-		first_table = table;
-	}else{
-		table->next_table = last_table->next_table;
-		last_table->next_table = table;
-	}
-  }
-}
--- a/usr/src/cmd/agents/snmp/snmprelayd/sh_table.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SH_TABLE_H_
-#define _SH_TABLE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <netinet/in.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <string.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "pdu.h"
-
-#include "snmprelay_msg.h"
-#include "agent.h"
-/*
-#ifndef _SUBTREE_H_
-#include "subtree.h"
-#endif
-*/
-
-#define TABLE_TO_OID_TRY 0
-#define TABLE_TO_OID_GO  1
-
-typedef struct _Table {
-	Integer regTblIndex;
-	Integer	regTblAgentID;
-        Oid name;
-        Subid first_column_subid; /* Subid may convert to Integer */
-        Subid last_column_subid;
-        Subid first_index_subid;
-        Subid last_index_subid;
-	Integer	regTblStatus;
-	String	regTblView;
-        Agent *agent;
-        struct _Table *next_table;
-	int mirror_flag;
-} Table;
-
-extern int is_first_entry(Table *table);
-extern void table_free(Table *tp);
-extern void table_list_delete();
-extern void trace_tables();
-extern void delete_all_tables_for_agent(Agent *agent);
-extern void table_detach(Table *tp);
-extern int activate_table(Table *tp);
-extern int delete_table(Table *tp);
-extern int activate_table_for_agent(Agent* agent);
-
-extern Table *first_table;
-extern Table *last_table;
-
-extern int single_table_to_subtrees(int pass,Table *tp, char* error_label);
-
-extern void delete_all_table_from_agent(Agent *agent);
-
-extern void create_mirror_table_from_subtree();
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx.acl	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Configuration file of an SNMP agent
-#
-
-
-##################
-# access control # 
-##################
-
-# The list of community names needed for read/write access
-# to the entire MIB.
-# If the list is empty, the only valid community name is "public"
-# and its access type is read-only
-
-acl = {
-        {
-                communities = public, private
-                access = read-write
-                managers = *
-        }
-
-}
-
-
-#communities = {
-#public		read-write
-#	private		read-write
-#}
-
-# The list of hosts that can send SNMP queries.
-# If this list is empty, all the hosts are allowed to
-# send SNMP queries.
-
-#managers = {
-#}
-
-
-###################
-# trap parameters #
-###################
-
-trap = {
-#  {
-#	trap-community = SNMP-trap
-#	hosts = hubble, snowbell
-#	{
-#	  enterprise = "sun"
-#	  trap-num = 0, 1, 2-5, 6-16
-# 	}
-#	{
-#	  enterprise = "3Com"
-#	  trap-num = 4
-# 	}
-#	{
-#	  enterprise = "snmp"
-#	  trap-num = 0, 2, 5
-# 	}
-#  }
-#  {
-#	trap-community = jerry-trap
-#	hosts = jerry, nanak, hubble
-#	{
-#	  enterprise = "sun"
-#	  trap-num = 1, 3
-# 	}
-#	{
-#	  enterprise = "snmp"
-#	  trap-num = 1-3
-# 	}
-#  }
-}
-
-# The community name to be used in traps.
-
-#trap-community = SNMP-trap
-
-# The list of hosts where traps should be sent.
-
-#trap-recipients =
-#{
-#hubble
-#}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx.reg	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Personal/Configuration file of the relay agent
-#
-
-
-##########
-# agents #
-##########
-
-agents =
-{
-	{
-		name = "relay-agent"
-		subtrees = { sun.2.15 }
-		timeout = 900000000
-		port = 161
-	}
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx.rsrc	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the 
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-#
-#  Configuration file of the SNMP Relay
-#  for the SNMP agent bundled with SNM
-#
-
-
-##########
-# agents #
-##########
-
-environment =
-{
-	max-agent-timeout = 999999999
-	poll-interval = 240
-}
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx.xml	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
-<!--
-    CDDL HEADER START
-   
-    The contents of this file are subject to the terms of the
-    Common Development and Distribution License (the "License").
-    You may not use this file except in compliance with the License.
-   
-    You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-    or http://www.opensolaris.org/os/licensing.
-    See the License for the specific language governing permissions
-    and limitations under the License.
-   
-    When distributing Covered Code, include this CDDL HEADER in each
-    file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-    If applicable, add the following below this CDDL HEADER, with the
-    fields enclosed by brackets "[]" replaced with your own identifying
-    information: Portions Copyright [yyyy] [name of copyright owner]
-   
-    CDDL HEADER END
-   
-    Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-    Use is subject to license terms.
-
-    Service manifest for the Sun Solstice Enterprise Master Agent
--->
-
-<service_bundle type='manifest' name='SUNWsasnm:snmpdx'>
-
-<service
-	name='application/management/snmpdx'
-	type='service'
-	version='1'>
-
-	<create_default_instance enabled='false' />
-
-	<single_instance />
-
-	<!-- 
-		seaport needs to run before we do in order to pick an 
-		available port for us to bind on
-	-->
-	<dependency
-		name='seaport'
-		grouping='require_all'
-		restart_on='none'
-		type='service'>
-			<service_fmri
-			    value='svc:/application/management/seaport' />
-	</dependency>
-
-	<!-- snmpdx writes its pid to /var, need writable /var -->
-	<dependency
-		name='writable-var'
-		grouping='require_all'
-		restart_on='none'
-		type='service'>
-			<service_fmri
-			    value='svc:/system/filesystem/minimal' />
-	</dependency>
-
-	<!-- conversion from rc3.d script: extending multi-user-server mode -->
-	<dependent
-		name='snmpdx_multi-user-server'
-		grouping='optional_all'
-		restart_on='none'>
-		<service_fmri value='svc:/milestone/multi-user-server' />
-	</dependent>
-
-	<exec_method
-        	type='method'
-		name='start'
-		exec='/lib/svc/method/svc-snmpdx %m'
-		timeout_seconds='60'>
-	</exec_method>
-
-	<exec_method
-        	type='method'
-		name='stop'
-		exec='/lib/svc/method/svc-snmpdx %m %{restarter/contract}'
-		timeout_seconds='30'>
-	</exec_method>
-
-	<property_group name='general' type='framework'>
-		<!-- to stop/start snmpdx -->
-		<propval name='action_authorization' type='astring'
-			value='solaris.smf.manage.snmpdx' />
-	</property_group>
-
-	<template>
-		<common_name>
-			<loctext xml:lang='C'>
-			Sun Solstice Enterprise Master Agent
-			</loctext>
-		</common_name>
-
-		<documentation>
-			<manpage title='snmpdx' section='1M' 
-			    manpath='/usr/share/man/' />
-		</documentation>
-
-	</template>
-
-</service>
-
-</service_bundle>
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx_agentEntry.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1120 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-#include "pdu.h"
-#include "node.h"
-
-#include "snmpdx_stub.h"
-
-
-
-/***** agentEntry           ********************************/
-
-extern int get_agentEntry(int search_type, AgentEntry_t **agentEntry_data, IndexType *index)
-{
-
-	int res;
-
-	*agentEntry_data = (AgentEntry_t*)calloc(1,sizeof(AgentEntry_t));
-	if(agentEntry_data == NULL) return SNMP_ERR_GENERR;
-
-	res = get_agentID(
-	        search_type,
-	        &((*agentEntry_data)->agentID),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentStatus(
-	        search_type,
-	        &((*agentEntry_data)->agentStatus),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentTimeOut(
-	        search_type,
-	        &((*agentEntry_data)->agentTimeOut),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentPortNumber(
-	        search_type,
-	        &((*agentEntry_data)->agentPortNumber),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentPersonalFile(
-	        search_type,
-	        &((*agentEntry_data)->agentPersonalFile),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentConfigFile(
-	        search_type,
-	        &((*agentEntry_data)->agentConfigFile),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentExecutable(
-	        search_type,
-	        &((*agentEntry_data)->agentExecutable),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentVersionNum(
-	        search_type,
-	        &((*agentEntry_data)->agentVersionNum),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentProcessID(
-	        search_type,
-	        &((*agentEntry_data)->agentProcessID),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentName(
-	        search_type,
-	        &((*agentEntry_data)->agentName),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentSystemUpTime(
-	        search_type,
-	        &((*agentEntry_data)->agentSystemUpTime),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_agentWatchDogTime(
-	        search_type,
-	        &((*agentEntry_data)->agentWatchDogTime),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	 return res;
-}
-
-
-void free_agentEntry(AgentEntry_t *agentEntry)
-{
-	free_agentPersonalFile(&(agentEntry->agentPersonalFile));
-	free_agentConfigFile(&(agentEntry->agentConfigFile));
-	free_agentExecutable(&(agentEntry->agentExecutable));
-	free_agentVersionNum(&(agentEntry->agentVersionNum));
-	free_agentName(&(agentEntry->agentName));
-}
-
-int get_agentID(int search_type, Integer *agentID, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*agentID = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_agentStatus(int search_type, Integer *agentStatus, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*agentStatus = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentStatus(int pass, IndexType index, Integer *agentStatus)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",agentStatus);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_agentTimeOut(int search_type, Integer *agentTimeOut, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*agentTimeOut = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentTimeOut(int pass, IndexType index, Integer *agentTimeOut)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",agentTimeOut);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_agentPortNumber(int search_type, Integer *agentPortNumber, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*agentPortNumber = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentPortNumber(int pass, IndexType index, Integer *agentPortNumber)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",agentPortNumber);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_agentPersonalFile(int search_type, String *agentPersonalFile, IndexType *index)
-{
-	u_char *str;
-	int len;
-
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	agentPersonalFile->chars = str;
-	agentPersonalFile->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentPersonalFile(int pass, IndexType index, String *agentPersonalFile)
-{
-	char buf[100];
-
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			memcpy(buf,agentPersonalFile->chars,agentPersonalFile->len);
-			buf[agentPersonalFile->len+1] = '\0';
-			printf("The new value is %s\n",buf);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_agentPersonalFile(String *agentPersonalFile)
-{
-	 if(agentPersonalFile->chars!=NULL && agentPersonalFile->len !=0)
-	{
-		free(agentPersonalFile->chars);
-		agentPersonalFile->len = 0;
-	}
-}
-
-int get_agentConfigFile(int search_type, String *agentConfigFile, IndexType *index)
-{
-	u_char *str;
-	int len;
-
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	agentConfigFile->chars = str;
-	agentConfigFile->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentConfigFile(int pass, IndexType index, String *agentConfigFile)
-{
-	char buf[100];
-
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			memcpy(buf,agentConfigFile->chars,agentConfigFile->len);
-			buf[agentConfigFile->len+1] = '\0';
-			printf("The new value is %s\n",buf);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_agentConfigFile(String *agentConfigFile)
-{
-	 if(agentConfigFile->chars!=NULL && agentConfigFile->len !=0)
-	{
-		free(agentConfigFile->chars);
-		agentConfigFile->len = 0;
-	}
-}
-
-int get_agentExecutable(int search_type, String *agentExecutable, IndexType *index)
-{
-	u_char *str;
-	int len;
-
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	agentExecutable->chars = str;
-	agentExecutable->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentExecutable(int pass, IndexType index, String *agentExecutable)
-{
-	char buf[100];
-
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			memcpy(buf,agentExecutable->chars,agentExecutable->len);
-			buf[agentExecutable->len+1] = '\0';
-			printf("The new value is %s\n",buf);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_agentExecutable(String *agentExecutable)
-{
-	 if(agentExecutable->chars!=NULL && agentExecutable->len !=0)
-	{
-		free(agentExecutable->chars);
-		agentExecutable->len = 0;
-	}
-}
-
-int get_agentVersionNum(int search_type, String *agentVersionNum, IndexType *index)
-{
-	u_char *str;
-	int len;
-
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	agentVersionNum->chars = str;
-	agentVersionNum->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentVersionNum(int pass, IndexType index, String *agentVersionNum)
-{
-	char buf[100];
-
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			memcpy(buf,agentVersionNum->chars,agentVersionNum->len);
-			buf[agentVersionNum->len+1] = '\0';
-			printf("The new value is %s\n",buf);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_agentVersionNum(String *agentVersionNum)
-{
-	 if(agentVersionNum->chars!=NULL && agentVersionNum->len !=0)
-	{
-		free(agentVersionNum->chars);
-		agentVersionNum->len = 0;
-	}
-}
-
-int get_agentProcessID(int search_type, Integer *agentProcessID, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*agentProcessID = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentProcessID(int pass, IndexType index, Integer *agentProcessID)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",agentProcessID);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_agentName(int search_type, String *agentName, IndexType *index)
-{
-	u_char *str;
-	int len;
-
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	agentName->chars = str;
-	agentName->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentName(int pass, IndexType index, String *agentName)
-{
-	char buf[100];
-
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			memcpy(buf,agentName->chars,agentName->len);
-			buf[agentName->len+1] = '\0';
-			printf("The new value is %s\n",buf);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_agentName(String *agentName)
-{
-	 if(agentName->chars!=NULL && agentName->len !=0)
-	{
-		free(agentName->chars);
-		agentName->len = 0;
-	}
-}
-
-int get_agentSystemUpTime(int search_type, Integer *agentSystemUpTime, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*agentSystemUpTime = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentSystemUpTime(int pass, IndexType index, Integer *agentSystemUpTime)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",agentSystemUpTime);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_agentWatchDogTime(int search_type, Integer *agentWatchDogTime, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*agentWatchDogTime = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentWatchDogTime(int pass, IndexType index, Integer *agentWatchDogTime)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",agentWatchDogTime);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx_appl.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-#include "pdu.h"
-#include "node.h"
-
-#include "snmpdx_stub.h"
-
-
-/***** GLOBAL VARIABLES *****/
-
-char default_config_file[] = "/etc/snmp/conf/snmpdx.reg";
-char default_sec_config_file[] = "/etc/snmp/conf/snmpdx.acl";
-char default_error_file[] = "/var/snmp/snmpdxd.log";
-
-
-/***********************************************************/
-
-void agent_init()
-{
-}
-
-
-/***********************************************************/
-
-void agent_end()
-{
-}
-
-
-/***********************************************************/
-
-void agent_loop()
-{
-	int condition=FALSE;
-
-	if(condition==TRUE){
-	}
-}
-
-
-/***********************************************************/
-
-void agent_select_info(fd_set *fdset, int *numfds)
-{
-}
-
-
-/***********************************************************/
-
-void agent_select_callback(fd_set *fdset)
-{
-}
-
-
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx_regTblEntry.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,661 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-#include "pdu.h"
-#include "node.h"
-
-#include "snmpdx_stub.h"
-
-
-
-/***** regTblEntry          ********************************/
-
-extern int get_regTblEntry(int search_type, RegTblEntry_t **regTblEntry_data, IndexType *index)
-{
-
-	int res;
-
-	*regTblEntry_data = (RegTblEntry_t*)calloc(1,sizeof(RegTblEntry_t));
-	if(regTblEntry_data == NULL) return SNMP_ERR_GENERR;
-
-	res = get_regTblIndex(
-	        search_type,
-	        &((*regTblEntry_data)->regTblIndex),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTblAgentID(
-	        search_type,
-	        &((*regTblEntry_data)->regTblAgentID),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTblOID(
-	        search_type,
-	        &((*regTblEntry_data)->regTblOID),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTblStartColumn(
-	        search_type,
-	        &((*regTblEntry_data)->regTblStartColumn),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTblEndColumn(
-	        search_type,
-	        &((*regTblEntry_data)->regTblEndColumn),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTblStartRow(
-	        search_type,
-	        &((*regTblEntry_data)->regTblStartRow),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTblEndRow(
-	        search_type,
-	        &((*regTblEntry_data)->regTblEndRow),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTblStatus(
-	        search_type,
-	        &((*regTblEntry_data)->regTblStatus),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	 return res;
-}
-
-
-void free_regTblEntry(RegTblEntry_t *regTblEntry)
-{
-	free_regTblOID(&(regTblEntry->regTblOID));
-}
-
-int get_regTblIndex(int search_type, Integer *regTblIndex, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTblIndex = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_regTblAgentID(int search_type, Integer *regTblAgentID, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTblAgentID = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_regTblOID(int search_type, Oid *regTblOID, IndexType *index)
-{
-	Subid *sub;
-	Subid fake_sub[] = {1,3,6,1,4,1,4,42};
-	int len;
-
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "1.3.6.1.4.1.42" is the value */
-	/* of the mib variable */
-	/* please change it to the real one */
-
-	/* 1.3.6.1.4.1.42 has 7 number separated by "." */
-
-	len =7 ;
-	sub = (Subid*)calloc(len,sizeof(Subid));
-	if(sub==NULL) return SNMP_ERR_GENERR;
-	memcpy(sub,fake_sub,len*sizeof(Subid));
-
-	/* fill in the contents of the argument */
-
-	regTblOID->subids = sub;
-	regTblOID->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_regTblOID(int pass, IndexType index, Oid *regTblOID)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %s\n",SSAOidString(regTblOID));
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_regTblOID(Oid *regTblOID)
-{
-	 if(regTblOID->subids!=NULL && regTblOID->len !=0)
-	{
-		free(regTblOID->subids);
-		regTblOID->len = 0;
-	}
-}
-
-int get_regTblStartColumn(int search_type, Integer *regTblStartColumn, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTblStartColumn = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_regTblStartColumn(int pass, IndexType index, Integer *regTblStartColumn)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",regTblStartColumn);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_regTblEndColumn(int search_type, Integer *regTblEndColumn, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTblEndColumn = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_regTblEndColumn(int pass, IndexType index, Integer *regTblEndColumn)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",regTblEndColumn);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_regTblStartRow(int search_type, Integer *regTblStartRow, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTblStartRow = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_regTblStartRow(int pass, IndexType index, Integer *regTblStartRow)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",regTblStartRow);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_regTblEndRow(int search_type, Integer *regTblEndRow, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTblEndRow = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_regTblEndRow(int pass, IndexType index, Integer *regTblEndRow)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",regTblEndRow);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_regTblStatus(int search_type, Integer *regTblStatus, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTblStatus = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_regTblStatus(int pass, IndexType index, Integer *regTblStatus)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",regTblStatus);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx_regTreeEntry.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,349 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-#include "pdu.h"
-#include "node.h"
-
-#include "snmpdx_stub.h"
-
-
-
-/***** regTreeEntry         ********************************/
-
-extern int get_regTreeEntry(int search_type, RegTreeEntry_t **regTreeEntry_data, IndexType *index)
-{
-
-	int res;
-
-	*regTreeEntry_data = (RegTreeEntry_t*)calloc(1,sizeof(RegTreeEntry_t));
-	if(regTreeEntry_data == NULL) return SNMP_ERR_GENERR;
-
-	res = get_regTreeIndex(
-	        search_type,
-	        &((*regTreeEntry_data)->regTreeIndex),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTreeAgentID(
-	        search_type,
-	        &((*regTreeEntry_data)->regTreeAgentID),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTreeOID(
-	        search_type,
-	        &((*regTreeEntry_data)->regTreeOID),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	res = get_regTreeStatus(
-	        search_type,
-	        &((*regTreeEntry_data)->regTreeStatus),
-	        index);
-	if(res != SNMP_ERR_NOERROR) return res;
-
-	 return res;
-}
-
-
-void free_regTreeEntry(RegTreeEntry_t *regTreeEntry)
-{
-	free_regTreeOID(&(regTreeEntry->regTreeOID));
-}
-
-int get_regTreeIndex(int search_type, Integer *regTreeIndex, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTreeIndex = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_regTreeAgentID(int search_type, Integer *regTreeAgentID, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTreeAgentID = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_regTreeOID(int search_type, Oid *regTreeOID, IndexType *index)
-{
-	Subid *sub;
-	Subid fake_sub[] = {1,3,6,1,4,1,4,42};
-	int len;
-
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "1.3.6.1.4.1.42" is the value */
-	/* of the mib variable */
-	/* please change it to the real one */
-
-	/* 1.3.6.1.4.1.42 has 7 number separated by "." */
-
-	len =7 ;
-	sub = (Subid*)calloc(len,sizeof(Subid));
-	if(sub==NULL) return SNMP_ERR_GENERR;
-	memcpy(sub,fake_sub,len*sizeof(Subid));
-
-	/* fill in the contents of the argument */
-
-	regTreeOID->subids = sub;
-	regTreeOID->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_regTreeOID(int pass, IndexType index, Oid *regTreeOID)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %s\n",SSAOidString(regTreeOID));
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_regTreeOID(Oid *regTreeOID)
-{
-	 if(regTreeOID->subids!=NULL && regTreeOID->len !=0)
-	{
-		free(regTreeOID->subids);
-		regTreeOID->len = 0;
-	}
-}
-
-int get_regTreeStatus(int search_type, Integer *regTreeStatus, IndexType *index)
-{
-	/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
-	/* this function should modify the index argument to the */
-	/* appropriate value */
-	switch(search_type)
-	{
-		case FIRST_ENTRY:
-			if(index->type == INTEGER){
-
-				/* assume 1 is the first index */
-
-				index->value[0] = 1;
-				index->len = 1;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[0] = 1;
-				index->value[1]= 1;
-				index->len = 2;
-			}
-			break;
-
-		case NEXT_ENTRY:
-			if(index->type == INTEGER){
-				index->value[0]++;
-			}else{
-
-				/* index type will be array of integer */
-				/* assume that there are two index */
-
-				index->value[index->len-1]++;
-			}
-			break;
-
-		case EXACT_ENTRY:
-			break;
-	}
-
-	/*assume that the mib variable has a value of 1 */
-
-	*regTreeStatus = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_regTreeStatus(int pass, IndexType index, Integer *regTreeStatus)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the existence of the element which */
-			/* corresponding to the given index and */
-			/* check the validity fo the input value */
-			/* if not valid or not exist, */
-
-			return SNMP_ERR_GENERR;
-
-		case SECOND_PASS:
-
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable of the given */
-			/* index */
-			printf("The new value is %d\n",regTreeStatus);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx_stub.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,336 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-#include "pdu.h"
-#include "node.h"
-
-#include "snmpdx_stub.h"
-
-
-
-int get_relayProcessIDFile(String *relayProcessIDFile)
-{
-	u_char *str;
-	int len;
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	relayProcessIDFile->chars = str;
-	relayProcessIDFile->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_relayProcessIDFile(int pass, String *relayProcessIDFile)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the validity of the input argument */
-			/* if not valid, return SNMP_GEN_ERROR */
-
-			return SNMP_ERR_NOERROR;
-
-		case SECOND_PASS:
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable */
-
-			printf("The new value is %.*s\n",
-			    relayProcessIDFile->len, relayProcessIDFile->chars);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_relayProcessIDFile(String *relayProcessIDFile)
-{
-	 if(relayProcessIDFile->chars!=NULL && relayProcessIDFile->len !=0)
-	{
-		free(relayProcessIDFile->chars);
-		relayProcessIDFile->len = 0;
-	}
-}
-
-int get_relayResourceFile(String *relayResourceFile)
-{
-	u_char *str;
-	int len;
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	relayResourceFile->chars = str;
-	relayResourceFile->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_relayResourceFile(int pass, String *relayResourceFile)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the validity of the input argument */
-			/* if not valid, return SNMP_GEN_ERROR */
-
-			return SNMP_ERR_NOERROR;
-
-		case SECOND_PASS:
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable */
-
-			printf("The new value is %.*s\n",
-				relayResourceFile->len, relayResourceFile->chars);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_relayResourceFile(String *relayResourceFile)
-{
-	 if(relayResourceFile->chars!=NULL && relayResourceFile->len !=0)
-	{
-		free(relayResourceFile->chars);
-		relayResourceFile->len = 0;
-	}
-}
-
-int get_relayPersonalFileDir(String *relayPersonalFileDir)
-{
-	u_char *str;
-	int len;
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	relayPersonalFileDir->chars = str;
-	relayPersonalFileDir->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_relayPersonalFileDir(int pass, String *relayPersonalFileDir)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the validity of the input argument */
-			/* if not valid, return SNMP_GEN_ERROR */
-
-			return SNMP_ERR_NOERROR;
-
-		case SECOND_PASS:
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable */
-
-			printf("The new value is %.*s\n",
-				relayPersonalFileDir->len, relayPersonalFileDir->chars);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_relayPersonalFileDir(String *relayPersonalFileDir)
-{
-	 if(relayPersonalFileDir->chars!=NULL && relayPersonalFileDir->len !=0)
-	{
-		free(relayPersonalFileDir->chars);
-		relayPersonalFileDir->len = 0;
-	}
-}
-
-int get_relayTrapPort(Integer *relayTrapPort)
-{
-	/* assume that the mib variable has a value of 1 */
-
-	*relayTrapPort = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_relayCheckPoint(String *relayCheckPoint)
-{
-	u_char *str;
-	int len;
-
-	/* It is required to allocate memory to the pointers */
-	/* inside the input argument */
-	/* Here, we assume that "hello" is the value of the mib variable */
-	/* please change it to the real one */
-
-	len = strlen("hello");
-	str = (u_char*)calloc(len,sizeof(char));
-	if(str==NULL){
-		return SNMP_ERR_GENERR;
-	}
-	memcpy(str,"hello",len);
-
-	/*fill in the contents of the argument */
-
-	relayCheckPoint->chars = str;
-	relayCheckPoint->len = len;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_relayCheckPoint(int pass, String *relayCheckPoint)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the validity of the input argument */
-			/* if not valid, return SNMP_GEN_ERROR */
-
-			return SNMP_ERR_NOERROR;
-
-		case SECOND_PASS:
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable */
-
-			printf("The new value is %.*s\n", relayCheckPoint->len,
-				relayCheckPoint->chars);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-void free_relayCheckPoint(String *relayCheckPoint)
-{
-	 if(relayCheckPoint->chars!=NULL && relayCheckPoint->len !=0)
-	{
-		free(relayCheckPoint->chars);
-		relayCheckPoint->len = 0;
-	}
-}
-
-int get_relayPollInterval(Integer *relayPollInterval)
-{
-	/* assume that the mib variable has a value of 1 */
-
-	*relayPollInterval = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_relayMaxAgentTimeOut(Integer *relayMaxAgentTimeOut)
-{
-	/* assume that the mib variable has a value of 1 */
-
-	*relayMaxAgentTimeOut = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_agentTableIndex(Integer *agentTableIndex)
-{
-	/* assume that the mib variable has a value of 1 */
-
-	*agentTableIndex = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int set_agentTableIndex(int pass, Integer *agentTableIndex)
-{
-	switch(pass)
-	{
-		case FIRST_PASS:
-
-			/* check the validity of the input argument */
-			/* if not valid, return SNMP_GEN_ERROR */
-
-			return SNMP_ERR_NOERROR;
-
-		case SECOND_PASS:
-			/* change the following coding, such that */
-			/* the input value will be stored in the */
-			/* corresponding mib variable */
-
-			printf("The new value is %d\n",agentTableIndex);
-			return SNMP_ERR_NOERROR;
-	}
-}
-
-
-int get_regTblTableIndex(Integer *regTblTableIndex)
-{
-	/* assume that the mib variable has a value of 1 */
-
-	*regTblTableIndex = 1;
-	return SNMP_ERR_NOERROR;
-}
-
-int get_regTreeTableIndex(Integer *regTreeTableIndex)
-{
-	/* assume that the mib variable has a value of 1 */
-
-	*regTreeTableIndex = 1;
-	return SNMP_ERR_NOERROR;
-}
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx_stub.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _SNMPDX_STUB_H_
-#define _SNMPDX_STUB_H_
-
-
-typedef struct _AgentEntry_t {
-	Integer agentID;
-	Integer agentStatus;
-	Integer agentTimeOut;
-	Integer agentPortNumber;
-	String agentPersonalFile;
-	String agentConfigFile;
-	String agentExecutable;
-	String agentVersionNum;
-	Integer agentProcessID;
-	String agentName;
-	Integer agentSystemUpTime;
-	Integer agentWatchDogTime;
-} AgentEntry_t;
-
-typedef struct _RegTblEntry_t {
-	Integer regTblIndex;
-	Integer regTblAgentID;
-	Oid regTblOID;
-	Integer regTblStartColumn;
-	Integer regTblEndColumn;
-	Integer regTblStartRow;
-	Integer regTblEndRow;
-	Integer regTblStatus;
-} RegTblEntry_t;
-
-typedef struct _RegTreeEntry_t {
-	Integer regTreeIndex;
-	Integer regTreeAgentID;
-	Oid regTreeOID;
-	Integer regTreeStatus;
-} RegTreeEntry_t;
-
-extern int get_relayProcessIDFile(String *relayProcessIDFile);
-extern int set_relayProcessIDFile(int pass, String *relayProcessIDFile);
-extern void free_relayProcessIDFile(String *relayProcessIDFile);
-extern int get_relayResourceFile(String *relayResourceFile);
-extern int set_relayResourceFile(int pass, String *relayResourceFile);
-extern void free_relayResourceFile(String *relayResourceFile);
-extern int get_relayPersonalFileDir(String *relayPersonalFileDir);
-extern int set_relayPersonalFileDir(int pass, String *relayPersonalFileDir);
-extern void free_relayPersonalFileDir(String *relayPersonalFileDir);
-extern int get_relayTrapPort(Integer *relayTrapPort);
-extern int get_relayCheckPoint(String *relayCheckPoint);
-extern int set_relayCheckPoint(int pass, String *relayCheckPoint);
-extern void free_relayCheckPoint(String *relayCheckPoint);
-extern int get_relayPollInterval(Integer *relayPollInterval);
-extern int get_relayMaxAgentTimeOut(Integer *relayMaxAgentTimeOut);
-extern int get_agentEntry(int search_type, AgentEntry_t **agentEntry_data, IndexType *index);
-extern void free_agentEntry(AgentEntry_t *agentEntry);
-extern int get_agentID(int search_type, Integer *agentID, IndexType *index);
-extern int get_agentStatus(int search_type, Integer *agentStatus, IndexType *index);
-extern int set_agentStatus(int pass, IndexType index, Integer *agentStatus);
-extern int get_agentTimeOut(int search_type, Integer *agentTimeOut, IndexType *index);
-extern int set_agentTimeOut(int pass, IndexType index, Integer *agentTimeOut);
-extern int get_agentPortNumber(int search_type, Integer *agentPortNumber, IndexType *index);
-extern int set_agentPortNumber(int pass, IndexType index, Integer *agentPortNumber);
-extern int get_agentPersonalFile(int search_type, String *agentPersonalFile, IndexType *index);
-extern int set_agentPersonalFile(int pass, IndexType index, String *agentPersonalFile);
-extern void free_agentPersonalFile(String *agentPersonalFile);
-extern int get_agentConfigFile(int search_type, String *agentConfigFile, IndexType *index);
-extern int set_agentConfigFile(int pass, IndexType index, String *agentConfigFile);
-extern void free_agentConfigFile(String *agentConfigFile);
-extern int get_agentExecutable(int search_type, String *agentExecutable, IndexType *index);
-extern int set_agentExecutable(int pass, IndexType index, String *agentExecutable);
-extern void free_agentExecutable(String *agentExecutable);
-extern int get_agentVersionNum(int search_type, String *agentVersionNum, IndexType *index);
-extern int set_agentVersionNum(int pass, IndexType index, String *agentVersionNum);
-extern void free_agentVersionNum(String *agentVersionNum);
-extern int get_agentProcessID(int search_type, Integer *agentProcessID, IndexType *index);
-extern int set_agentProcessID(int pass, IndexType index, Integer *agentProcessID);
-extern int get_agentName(int search_type, String *agentName, IndexType *index);
-extern int set_agentName(int pass, IndexType index, String *agentName);
-extern void free_agentName(String *agentName);
-extern int get_agentSystemUpTime(int search_type, Integer *agentSystemUpTime, IndexType *index);
-extern int set_agentSystemUpTime(int pass, IndexType index, Integer *agentSystemUpTime);
-extern int get_agentWatchDogTime(int search_type, Integer *agentWatchDogTime, IndexType *index);
-extern int set_agentWatchDogTime(int pass, IndexType index, Integer *agentWatchDogTime);
-extern int get_agentTableIndex(Integer *agentTableIndex);
-extern int set_agentTableIndex(int pass, Integer* agentTableIndex);
-extern int get_regTblEntry(int search_type, RegTblEntry_t **regTblEntry_data, IndexType *index);
-extern void free_regTblEntry(RegTblEntry_t *regTblEntry);
-extern int get_regTblIndex(int search_type, Integer *regTblIndex, IndexType *index);
-extern int get_regTblAgentID(int search_type, Integer *regTblAgentID, IndexType *index);
-extern int get_regTblOID(int search_type, Oid *regTblOID, IndexType *index);
-extern int set_regTblOID(int pass, IndexType index, Oid *regTblOID);
-extern void free_regTblOID(Oid *regTblOID);
-extern int get_regTblStartColumn(int search_type, Integer *regTblStartColumn, IndexType *index);
-extern int set_regTblStartColumn(int pass, IndexType index, Integer *regTblStartColumn);
-extern int get_regTblEndColumn(int search_type, Integer *regTblEndColumn, IndexType *index);
-extern int set_regTblEndColumn(int pass, IndexType index, Integer *regTblEndColumn);
-extern int get_regTblStartRow(int search_type, Integer *regTblStartRow, IndexType *index);
-extern int set_regTblStartRow(int pass, IndexType index, Integer *regTblStartRow);
-extern int get_regTblEndRow(int search_type, Integer *regTblEndRow, IndexType *index);
-extern int set_regTblEndRow(int pass, IndexType index, Integer *regTblEndRow);
-extern int get_regTblStatus(int search_type, Integer *regTblStatus, IndexType *index);
-extern int set_regTblStatus(int pass, IndexType index, Integer *regTblStatus);
-extern int get_regTblTableIndex(Integer *regTblTableIndex);
-extern int get_regTreeEntry(int search_type, RegTreeEntry_t **regTreeEntry_data, IndexType *index);
-extern void free_regTreeEntry(RegTreeEntry_t *regTreeEntry);
-extern int get_regTreeIndex(int search_type, Integer *regTreeIndex, IndexType *index);
-extern int get_regTreeAgentID(int search_type, Integer *regTreeAgentID, IndexType *index);
-extern int get_regTreeOID(int search_type, Oid *regTreeOID, IndexType *index);
-extern int set_regTreeOID(int pass, IndexType index, Oid *regTreeOID);
-extern void free_regTreeOID(Oid *regTreeOID);
-extern int get_regTreeStatus(int search_type, Integer *regTreeStatus, IndexType *index);
-extern int set_regTreeStatus(int pass, IndexType index, Integer *regTreeStatus);
-extern int get_regTreeTableIndex(Integer *regTreeTableIndex);
-
-extern int SSAGetTrapPort();
-#endif
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx_trap.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-#include "pdu.h"
-#include "node.h"
-
-#include "snmpdx_stub.h"
-
-
-struct CallbackItem genCallItem[10];
-int genNumCallItem=0;
-int genTrapTableMap[10];
-int genNumTrapElem=0;
-struct TrapHndlCxt genTrapBucket[10];
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmpdx_tree.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1999 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "node.h"
-
-#include "snmpdx_stub.h"
-
-
-Subid subid_table[] = {
-/*      0 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 1,
-/*     10 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 2,
-/*     20 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 3,
-/*     30 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 4,
-/*     40 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 5,
-/*     50 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 6,
-/*     60 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 7,
-/*     70 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 1,
-/*     82 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 2,
-/*     94 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 3,
-/*    106 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 4,
-/*    118 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 5,
-/*    130 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 6,
-/*    142 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 7,
-/*    154 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 8,
-/*    166 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 9,
-/*    178 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 10,
-/*    190 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 11,
-/*    202 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 8, 1, 12,
-/*    214 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 9,
-/*    224 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 10, 1, 1,
-/*    236 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 10, 1, 2,
-/*    248 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 10, 1, 3,
-/*    260 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 10, 1, 4,
-/*    272 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 10, 1, 5,
-/*    284 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 10, 1, 6,
-/*    296 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 10, 1, 7,
-/*    308 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 10, 1, 8,
-/*    320 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 11,
-/*    330 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 12, 1, 1,
-/*    342 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 12, 1, 2,
-/*    354 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 12, 1, 3,
-/*    366 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 12, 1, 4,
-/*    378 */ 1, 3, 6, 1, 4, 1, 42, 2, 15, 13,
-0
-};
-int subid_table_size = 388;
-
-Enum enum_table[] = {
-/*      0 */ { &enum_table[   1], "active", 1 },
-/*      1 */ { &enum_table[   2], "inactive", 2 },
-/*      2 */ { &enum_table[   3], "init", 3 },
-/*      3 */ { &enum_table[   4], "load", 4 },
-/*      4 */ {              NULL, "destroy", 5 },
-/*      5 */ { &enum_table[   6], "active", 1 },
-/*      6 */ {              NULL, "inactive", 2 },
-/*      7 */ { &enum_table[   8], "active", 1 },
-/*      8 */ {              NULL, "inactive", 2 },
-{ NULL, NULL, 0 }
-};
-int enum_table_size = 9;
-
-Object object_table[] = {
-/*      0 */ { { &subid_table[0], 10 }, STRING, NULL, READ_FLAG | WRITE_FLAG, 1, get_relayProcessIDFile, set_relayProcessIDFile,free_relayProcessIDFile },
-/*      1 */ { { &subid_table[10], 10 }, STRING, NULL, READ_FLAG | WRITE_FLAG, 1, get_relayResourceFile, set_relayResourceFile,free_relayResourceFile },
-/*      2 */ { { &subid_table[20], 10 }, STRING, NULL, READ_FLAG | WRITE_FLAG, 1, get_relayPersonalFileDir, set_relayPersonalFileDir,free_relayPersonalFileDir },
-/*      3 */ { { &subid_table[30], 10 }, INTEGER, NULL, READ_FLAG, 1, get_relayTrapPort, NULL,NULL },
-/*      4 */ { { &subid_table[40], 10 }, STRING, NULL, READ_FLAG | WRITE_FLAG,1, get_relayCheckPoint, set_relayCheckPoint,free_relayCheckPoint },
-/*      5 */ { { &subid_table[50], 10 }, INTEGER, NULL, READ_FLAG, 1, get_relayPollInterval, NULL,NULL },
-/*      6 */ { { &subid_table[60], 10 }, INTEGER, NULL, READ_FLAG, 1, get_relayMaxAgentTimeOut, NULL,NULL },
-/*      7 */ { { &subid_table[214], 10 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 1, get_agentTableIndex, set_agentTableIndex,NULL },
-/*      8 */ { { &subid_table[320], 10 }, INTEGER, NULL, READ_FLAG, 1, get_regTblTableIndex, NULL,NULL },
-/*      9 */ { { &subid_table[378], 10 }, INTEGER, NULL, READ_FLAG, 1, get_regTreeTableIndex, NULL,NULL },
-{ { NULL, 0}, 0, NULL, 0, NULL, NULL }
-};
-int object_table_size = 10;
-
-Index index_table[] = {
-/*      0 */ {              NULL, "agentID",3,0, &node_table[28] },
-/*      1 */ { &index_table[   2], "regTblAgentID",3,0, &node_table[44] },
-/*      2 */ {              NULL, "regTblIndex",3,0, &node_table[43] },
-/*      3 */ { &index_table[   4], "regTreeAgentID",3,0, &node_table[55] },
-/*      4 */ {              NULL, "regTreeIndex",3,0, &node_table[54] },
-{ NULL, NULL, NULL }
-};
-int index_table_size = 5;
-
-Entry entry_table[] = {
-/*      0 */ { &index_table[0], 1, get_agentEntry, free_agentEntry },
-/*      1 */ { &index_table[1], 2, get_regTblEntry, free_regTblEntry },
-/*      2 */ { &index_table[3], 2, get_regTreeEntry, free_regTreeEntry },
-{ NULL, 0, NULL }
-};
-int entry_table_size = 3;
-
-Column column_table[] = {
-/*      0 */ { { &subid_table[70], 12 }, INTEGER, NULL, READ_FLAG, 2, NULL, NULL,  &entry_table[0], 0 },
-/*      1 */ { { &subid_table[82], 12 }, INTEGER, &enum_table[0], READ_FLAG | WRITE_FLAG, 2, NULL, set_agentStatus, &entry_table[0], 4 },
-/*      2 */ { { &subid_table[94], 12 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_agentTimeOut, &entry_table[0], 8 },
-/*      3 */ { { &subid_table[106], 12 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_agentPortNumber, &entry_table[0], 12 },
-/*      4 */ { { &subid_table[118], 12 }, STRING, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_agentPersonalFile, &entry_table[0], 16 },
-/*      5 */ { { &subid_table[130], 12 }, STRING, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_agentConfigFile, &entry_table[0], 24 },
-/*      6 */ { { &subid_table[142], 12 }, STRING, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_agentExecutable, &entry_table[0], 32 },
-/*      7 */ { { &subid_table[154], 12 }, STRING, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_agentVersionNum, &entry_table[0], 40 },
-/*      8 */ { { &subid_table[166], 12 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 2, NULL,set_agentProcessID, &entry_table[0], 48 },
-/*      9 */ { { &subid_table[178], 12 }, STRING, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_agentName, &entry_table[0], 52 },
-/*     10 */ { { &subid_table[190], 12 }, TIMETICKS, NULL, READ_FLAG | WRITE_FLAG, 2, NULL,set_agentSystemUpTime, &entry_table[0], 60 },
-/*     11 */ { { &subid_table[202], 12 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_agentWatchDogTime, &entry_table[0], 64 },
-/*     12 */ { { &subid_table[224], 12 }, INTEGER, NULL, READ_FLAG, 2, NULL, NULL, &entry_table[1], 0 },
-/*     13 */ { { &subid_table[236], 12 }, INTEGER, NULL, READ_FLAG, 2, NULL, NULL, &entry_table[1], 4 },
-/*     14 */ { { &subid_table[248], 12 }, OBJID, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_regTblOID, &entry_table[1], 8 },
-/*     15 */ { { &subid_table[260], 12 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_regTblStartColumn, &entry_table[1], 16 },
-/*     16 */ { { &subid_table[272], 12 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_regTblEndColumn, &entry_table[1], 20 },
-/*     17 */ { { &subid_table[284], 12 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_regTblStartRow, &entry_table[1], 24 },
-/*     18 */ { { &subid_table[296], 12 }, INTEGER, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_regTblEndRow, &entry_table[1], 28 },
-/*     19 */ { { &subid_table[308], 12 }, INTEGER, &enum_table[5], READ_FLAG | WRITE_FLAG, 2, NULL, set_regTblStatus, &entry_table[1], 32 },
-/*     20 */ { { &subid_table[330], 12 }, INTEGER, NULL, READ_FLAG, 2, NULL, NULL, &entry_table[2], 0 },
-/*     21 */ { { &subid_table[342], 12 }, INTEGER, NULL, READ_FLAG, 2, NULL, NULL, &entry_table[2], 4 },
-/*     22 */ { { &subid_table[354], 12 }, OBJID, NULL, READ_FLAG | WRITE_FLAG, 2, NULL, set_regTreeOID, &entry_table[2], 8 },
-/*     23 */ { { &subid_table[366], 12 }, INTEGER, &enum_table[7], READ_FLAG | WRITE_FLAG, 2, NULL, set_regTreeStatus, &entry_table[2], 16 },
-{ { NULL, 0}, 0, NULL, 0, NULL, NULL, NULL , 0 }
-};
-int column_table_size = 24;
-
-Node node_table[] = {
-/*      0 */ {              NULL, &node_table[   1],              NULL, &node_table[  19], "iso", 1, NODE, NULL },
-/*      1 */ { &node_table[   0], &node_table[   2],              NULL, &node_table[  19], "org", 3, NODE, NULL },
-/*      2 */ { &node_table[   1], &node_table[   3],              NULL, &node_table[  19], "dod", 6, NODE, NULL },
-/*      3 */ { &node_table[   2], &node_table[   4],              NULL, &node_table[  19], "internet", 1, NODE, NULL },
-/*      4 */ { &node_table[   3],              NULL, &node_table[   5], &node_table[  19], "directory", 1, NODE, NULL },
-/*      5 */ { &node_table[   3], &node_table[   6], &node_table[   7], &node_table[  19], "mgmt", 2, NODE, NULL },
-/*      6 */ { &node_table[   5],              NULL,              NULL, &node_table[  19], "mib-2", 1, NODE, NULL },
-/*      7 */ { &node_table[   3],              NULL, &node_table[   8], &node_table[  19], "experimental", 3, NODE, NULL },
-/*      8 */ { &node_table[   3], &node_table[   9], &node_table[  61], &node_table[  19], "private", 4, NODE, NULL },
-/*      9 */ { &node_table[   8], &node_table[  10],              NULL, &node_table[  19], "enterprises", 1, NODE, NULL },
-/*     10 */ { &node_table[   9], &node_table[  11], &node_table[  60], &node_table[  19], "sun", 42, NODE, NULL },
-/*     11 */ { &node_table[  10], &node_table[  12], &node_table[  59], &node_table[  19], "products", 2, NODE, NULL },
-/*     12 */ { &node_table[  11], &node_table[  13], &node_table[  18], &node_table[  19], "messaging", 8, NODE, NULL },
-/*     13 */ { &node_table[  12], &node_table[  14], &node_table[  17], &node_table[  19], "agents", 1, NODE, NULL },
-/*     14 */ { &node_table[  13],              NULL, &node_table[  15], &node_table[  19], "snmpx400d", 1, NODE, NULL },
-/*     15 */ { &node_table[  13],              NULL, &node_table[  16], &node_table[  19], "snmpxapiad", 2, NODE, NULL },
-/*     16 */ { &node_table[  13],              NULL,              NULL, &node_table[  19], "snmpx500d", 3, NODE, NULL },
-/*     17 */ { &node_table[  12],              NULL,              NULL, &node_table[  19], "private-mibs", 2, NODE, NULL },
-/*     18 */ { &node_table[  11], &node_table[  19],              NULL, &node_table[  19], "relay-agent", 15, NODE, NULL },
-/*     19 */ { &node_table[  18],              NULL, &node_table[  20], &node_table[  20], "relayProcessIDFile", 1, OBJECT, (void *) &object_table[0] },
-/*     20 */ { &node_table[  18],              NULL, &node_table[  21], &node_table[  21], "relayResourceFile", 2, OBJECT, (void *) &object_table[1] },
-/*     21 */ { &node_table[  18],              NULL, &node_table[  22], &node_table[  22], "relayPersonalFileDir", 3, OBJECT, (void *) &object_table[2] },
-/*     22 */ { &node_table[  18],              NULL, &node_table[  23], &node_table[  23], "relayTrapPort", 4, OBJECT, (void *) &object_table[3] },
-/*     23 */ { &node_table[  18],              NULL, &node_table[  24], &node_table[  24], "relayCheckPoint", 5, OBJECT, (void *) &object_table[4] },
-/*     24 */ { &node_table[  18],              NULL, &node_table[  25], &node_table[  25], "relayPollInterval", 6, OBJECT, (void *) &object_table[5] },
-/*     25 */ { &node_table[  18],              NULL, &node_table[  26], &node_table[  28], "relayMaxAgentTimeOut", 7, OBJECT, (void *) &object_table[6] },
-/*     26 */ { &node_table[  18], &node_table[  27], &node_table[  40], &node_table[  28], "agentTable", 8, NODE, NULL },
-/*     27 */ { &node_table[  26], &node_table[  28],              NULL, &node_table[  28], "agentEntry", 1, NODE, NULL },
-/*     28 */ { &node_table[  27],              NULL, &node_table[  29], &node_table[  29], "agentID", 1, COLUMN, (void *) &column_table[0] },
-/*     29 */ { &node_table[  27],              NULL, &node_table[  30], &node_table[  30], "agentStatus", 2, COLUMN, (void *) &column_table[1] },
-/*     30 */ { &node_table[  27],              NULL, &node_table[  31], &node_table[  31], "agentTimeOut", 3, COLUMN, (void *) &column_table[2] },
-/*     31 */ { &node_table[  27],              NULL, &node_table[  32], &node_table[  32], "agentPortNumber", 4, COLUMN, (void *) &column_table[3] },
-/*     32 */ { &node_table[  27],              NULL, &node_table[  33], &node_table[  33], "agentPersonalFile", 5, COLUMN, (void *) &column_table[4] },
-/*     33 */ { &node_table[  27],              NULL, &node_table[  34], &node_table[  34], "agentConfigFile", 6, COLUMN, (void *) &column_table[5] },
-/*     34 */ { &node_table[  27],              NULL, &node_table[  35], &node_table[  35], "agentExecutable", 7, COLUMN, (void *) &column_table[6] },
-/*     35 */ { &node_table[  27],              NULL, &node_table[  36], &node_table[  36], "agentVersionNum", 8, COLUMN, (void *) &column_table[7] },
-/*     36 */ { &node_table[  27],              NULL, &node_table[  37], &node_table[  37], "agentProcessID", 9, COLUMN, (void *) &column_table[8] },
-/*     37 */ { &node_table[  27],              NULL, &node_table[  38], &node_table[  38], "agentName", 10, COLUMN, (void *) &column_table[9] },
-/*     38 */ { &node_table[  27],              NULL, &node_table[  39], &node_table[  39], "agentSystemUpTime", 11, COLUMN, (void *) &column_table[10] },
-/*     39 */ { &node_table[  27],              NULL,              NULL, &node_table[  40], "agentWatchDogTime", 12, COLUMN, (void *) &column_table[11] },
-/*     40 */ { &node_table[  18],              NULL, &node_table[  41], &node_table[  43], "agentTableIndex", 9, OBJECT, (void *) &object_table[7] },
-/*     41 */ { &node_table[  18], &node_table[  42], &node_table[  51], &node_table[  43], "regTblTable", 10, NODE, NULL },
-/*     42 */ { &node_table[  41], &node_table[  43],              NULL, &node_table[  43], "regTblEntry", 1, NODE, NULL },
-/*     43 */ { &node_table[  42],              NULL, &node_table[  44], &node_table[  44], "regTblIndex", 1, COLUMN, (void *) &column_table[12] },
-/*     44 */ { &node_table[  42],              NULL, &node_table[  45], &node_table[  45], "regTblAgentID", 2, COLUMN, (void *) &column_table[13] },
-/*     45 */ { &node_table[  42],              NULL, &node_table[  46], &node_table[  46], "regTblOID", 3, COLUMN, (void *) &column_table[14] },
-/*     46 */ { &node_table[  42],              NULL, &node_table[  47], &node_table[  47], "regTblStartColumn", 4, COLUMN, (void *) &column_table[15] },
-/*     47 */ { &node_table[  42],              NULL, &node_table[  48], &node_table[  48], "regTblEndColumn", 5, COLUMN, (void *) &column_table[16] },
-/*     48 */ { &node_table[  42],              NULL, &node_table[  49], &node_table[  49], "regTblStartRow", 6, COLUMN, (void *) &column_table[17] },
-/*     49 */ { &node_table[  42],              NULL, &node_table[  50], &node_table[  50], "regTblEndRow", 7, COLUMN, (void *) &column_table[18] },
-/*     50 */ { &node_table[  42],              NULL,              NULL, &node_table[  51], "regTblStatus", 8, COLUMN, (void *) &column_table[19] },
-/*     51 */ { &node_table[  18],              NULL, &node_table[  52], &node_table[  54], "regTblTableIndex", 11, OBJECT, (void *) &object_table[8] },
-/*     52 */ { &node_table[  18], &node_table[  53], &node_table[  58], &node_table[  54], "regTreeTable", 12, NODE, NULL },
-/*     53 */ { &node_table[  52], &node_table[  54],              NULL, &node_table[  54], "regTreeEntry", 1, NODE, NULL },
-/*     54 */ { &node_table[  53],              NULL, &node_table[  55], &node_table[  55], "regTreeIndex", 1, COLUMN, (void *) &column_table[20] },
-/*     55 */ { &node_table[  53],              NULL, &node_table[  56], &node_table[  56], "regTreeAgentID", 2, COLUMN, (void *) &column_table[21] },
-/*     56 */ { &node_table[  53],              NULL, &node_table[  57], &node_table[  57], "regTreeOID", 3, COLUMN, (void *) &column_table[22] },
-/*     57 */ { &node_table[  53],              NULL,              NULL, &node_table[  58], "regTreeStatus", 4, COLUMN, (void *) &column_table[23] },
-/*     58 */ { &node_table[  18],              NULL,              NULL,              NULL, "regTreeTableIndex", 13, OBJECT, (void *) &object_table[9] },
-/*     59 */ { &node_table[  10],              NULL,              NULL,              NULL, "products", 2, NODE, NULL },
-/*     60 */ { &node_table[   9],              NULL,              NULL,              NULL, "sun", 42, NODE, NULL },
-/*     61 */ { &node_table[   3],              NULL, &node_table[  62],              NULL, "security", 5, NODE, NULL },
-/*     62 */ { &node_table[   3], &node_table[  63],              NULL,              NULL, "snmpV2", 6, NODE, NULL },
-/*     63 */ { &node_table[  62],              NULL, &node_table[  64],              NULL, "snmpDomains", 1, NODE, NULL },
-/*     64 */ { &node_table[  62],              NULL, &node_table[  65],              NULL, "snmpProxys", 2, NODE, NULL },
-/*     65 */ { &node_table[  62],              NULL,              NULL,              NULL, "snmpModules", 3, NODE, NULL },
-{ NULL, NULL, NULL, NULL, NULL, 0, 0, NULL }
-};
-int node_table_size = 66;
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmprelay.appl.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "asn1.h"
-#include "error.h"
-#include "snmp.h"
-#include "trap.h"
-#include "pdu.h"
-
-#include "snmprelay.stub.h"
-
-
-/***** GLOBAL VARIABLES *****/
-
-char default_config_file[] = "/etc/snmprelayd.snmprelay";
-char default_sec_config_file[] = "/etc/snmprelayd.conf";
-char default_error_file[] = "/tmp/snmprelayd.log";
-
-
-/***********************************************************/
-
-void agent_init()
-{
-}
-
-
-/***********************************************************/
-
-void agent_end()
-{
-}
-
-
-/***********************************************************/
-
-void agent_loop()
-{
-	int condition=FALSE;
-
-	if(condition==TRUE){
-	}
-}
-
-
-/***********************************************************/
-
-void agent_select_info(fd_set *fdset, int *numfds)
-{
-}
-
-
-/***********************************************************/
-
-void agent_select_callback(fd_set *fdset)
-{
-}
-
-
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/snmprelay_msg.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-/*
- * HISTORY
- * 5-20-96		Jerry Yeung	merge with agent_msg.h
- */
-
-#ifndef _SNMPRELAY_MSG_H_
-#define _SNMPRELAY_MSG_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/***** TRACING MESSAGES *****/
-
-#define MSG_SIGHUP			"signal SIGHUP(%d) received"
-
-#define MSG_READING_CONFIG		"re-reading its configuration directory %s..."
-#define MSG_CONFIG_READED		"...configuration re-read"
-
-
-/***** PDU RELATED ERRORS *****/
-
-#define ERR_MSG_PDU_RECEIVED		"error while receiving a pdu from %s: %s"
-#define ERR_MSG_SNMP_ERROR		"SNMP error (%s, %lu) sent back to %s"
-#define ERR_MSG_PDU_SEND_BACK		"error while sending a pdu back to %s: %s"
-#define ERR_MSG_PDU_SEND_TO		"error while sending a pdu to %s: %s"
-
-
-/***** SYSTEM ERRORS *****/
-
-#define ERR_MSG_SOCKET			"socket() failed %s"
-#define ERR_MSG_BIND			"bind() failed on UDP port %d %s"
-#define ERR_MSG_SELECT			"select() failed %s"
-#define ERR_MSG_FORK			"fork() failed %s"
-#define ERR_MSG_FCLOSE			"fclose(%s) failed %s"
-#define ERR_MSG_CHDIR			"chdir(%s) failed %s"
-#define ERR_MSG_OPENDIR			"can't read the directory %s %s"
-#define ERR_MSG_OPEN			"can't open config file %s %s"
-#define ERR_MSG_FSTAT			"can't stat config file %s %s"
-#define ERR_MSG_MMAP			"can't mmap config file %s %s"
-#define ERR_MSG_MUNMAP			"munmap() failed %s"
-#define ERR_MSG_CLOSE			"close() failed %s"
-#define ERR_MSG_CLOSEDIR		"closedir(%s) failed %s"
-
-
-/***** MISCELLANEOUS ERRORS *****/
-
-#define ERR_MSG_ALLOC			"unable to allocate memory"
-
-#define ERR_MSG_MANAGER_DUP             "the manager %s already exists"
-#define ERR_MSG_COMMUNITY_DUP           "the community %s already exists"
-
-#define ERR_MSG_MY_IP_ADDRESS		"unable to get my IP address: %s"
-
-#define ERR_MSG_VARBIND_LIMIT		"unable to handle SNMP request with more than 32 variables"
-
-#define ERR_MSG_UNKNOWN_FRAGMENT	"unknown PDU fragment received from agent %s (%s)"
-#define ERR_MSG_AGENT_NOT_RESPONDING	"agent %s not responding"
-
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmprelayd/subtree.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,556 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- *
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*
- * HISTORY
- * 5-21-96	Jerry Yeung	export first_subtree
- * 5-24-96	Jerry Yeung	skip invalid subtree
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include "impl.h"
-#include "error.h"
-#include "trace.h"
-#include "asn1.h"
-#include "snmp.h"
-#include "pdu.h"
-
-#include "agent.h"
-#include "subtree.h"
-#include "session.h"
-
-
-extern Session *first_session;
-Subtree *first_subtree = NULL;
-int sap_reg_tree_index=1;
-
-
-void subtree_remove_from_agent_list(Subtree *subtree);
-
-
-static int longest_subtree_match (Oid * one, Oid * two)
-{
-	int	i, min;
-
-	if (one == NULL || two == NULL)
-		return (-1);
-
-	if (one->len > two->len)
-		return two->len - one->len;
-
-	for (i = 0;i < one->len;i ++) {
-		if (one->subids[i] > two->subids[i])
-			return (-1);
-		if (one->subids[i] < two->subids[i])
-			return (-1);
-	}
-	return two->len - one->len;
-}
-
-/****************************************************************/
-Subtree*  subtree_find(Subid *subids, int len)
-{
-	Subtree *sp;
-	int ret;
-	Oid name;
-
-
-	name.subids = (Subid *) malloc(len * sizeof(Subid));
-	if(name.subids == NULL)
-	{
-		error("malloc() failed");
-		return NULL;
-	}
-	memcpy(name.subids, subids, len * sizeof(Subid));
-	name.len = len;
-
-	for(sp = first_subtree; sp; sp = sp->next_subtree)
-	{
-		ret = SSAOidCmp(&(name), &(sp->name));
-		if(ret == 0)
-		{
-			free(name.subids);
-			name.subids=NULL;
-			return sp;
-		}
-		else
-		if(ret < 0)
-		{
-			break;
-		}
-
-	}
-
-	free(name.subids);
-	name.subids=NULL;
-	return NULL;
-}
-
-int subtree_purge(Subid *subids, int len)
-{
-	Subtree *sp;
-	int ret;
-	Oid name;
-
-
-	name.subids = (Subid *) malloc(len * sizeof(Subid));
-	if(name.subids == NULL)
-	{
-		error("malloc() failed");
-		return FALSE;
-	}
-	memcpy(name.subids, subids, len * sizeof(Subid));
-	name.len = len;
-
-	for(sp = first_subtree; sp; sp = sp->next_subtree)
-	{
-		ret = SSAOidCmp(&(name), &(sp->name));
-		if(ret == 0)
-		{
-			free(name.subids);
-			name.subids=NULL;
-			subtree_detach(sp);
-			subtree_free(sp);
-			return TRUE;
-		}
-		else
-		if(ret < 0)
-		{
-			break;
-		}
-
-	}
-	free(name.subids);
-	name.subids=NULL;
-
-	return TRUE;
-}
-
-
-int subtree_add(Agent *agent, Subid *subids, int len, TblTag *tbl_tag)
-{
-	Subtree *sp;
-	Subtree *new;
-	Subtree *last = NULL;
-	int ret;
-
-
-	if(agent == NULL)
-	{
-		error("BUG: subtree_add(): agent is NULL");
-		return -1;
-	}
-
-	new = (Subtree *) calloc(1,sizeof(Subtree));
-	if(new == NULL)
-	{
-		error("malloc() failed");
-		return -1;
-	}
-	new->next_subtree = NULL;
-	new->agent = agent;
-	new->next_agent_subtree = NULL;
-	new->name.subids = (Subid *) malloc(len * sizeof(Subid));
-	if(new->name.subids == NULL)
-	{
-		error("malloc() failed");
-		subtree_free(new);
-		return -1;
-	}
-	memcpy(new->name.subids, subids, len * sizeof(Subid));
-	new->name.len = len;
-
-  	new->regTreeAgentID = agent->agentID;
-	new->regTreeIndex = ++agent->agentTreeIndex;
-	new->regTreeStatus =  SSA_OPER_STATUS_ACTIVE;
-	new->tbl_tag = tbl_tag;
-
-	for(sp = first_subtree; sp; sp = sp->next_subtree)
-	{
-		ret = SSAOidCmp(&(new->name), &(sp->name));
-		if(ret == 0)
-		{
-			error("The subtree %s already belongs to the agent %s",
-				SSAOidString(&(sp->name)),
-				sp->agent->name);
-			subtree_free(new);
-			return -1;
-		}
-		else
-		if(ret < 0)
-		{
-			break;
-		}
-
-		last = sp;
-	}
-
-	if(last == NULL)
-	{
-		new->next_subtree = first_subtree;
-		first_subtree = new;
-	}
-	else
-	{
-		new->next_subtree = last->next_subtree;
-		last->next_subtree = new;
-	}
-
-	new->next_agent_subtree = agent->first_agent_subtree;
-	agent->first_agent_subtree = new;
-	
-
-	return 0;
-}
-
-
-/****************************************************************/
-
-Subtree *subtree_match(u_char type, Oid *name)
-{
-	Subtree *sp;
-	Subtree *last, *good;
-	Subtree *first_valid_subtree;
-	int ret;
-
-
-	if(name == NULL)
-	{
-		error("subtree_match(): name is NULL");
-		return NULL;
-	}
-
-	if(first_subtree == NULL)
-	{
-		if(trace_level > 1)
-		{
-			trace("subtree_match() returned NULL\n\n");
-		}
-
-		return NULL;
-	}
-
-
-	if(type == GETNEXT_REQ_MSG)
-	{
-		/* grep the first valid subtree (vsb)*/
-		if( (first_valid_subtree = subtree_next(first_subtree))
-			== NULL) return NULL;
-		if(SSAOidCmp(name, &(first_valid_subtree->name)) < 0)
-		{
-			if(trace_level > 1)
-			{
-				trace("subtree_match() returned %s supported by %s\n\n",
-					SSAOidString(&(first_subtree->name)),
-					first_subtree->agent->name);
-			}
-
-			return first_valid_subtree;
-		}
-	}
-
-	last = NULL;
-	good = NULL;
-	for (sp = first_subtree; sp; sp = sp->next_subtree) {
-	 	/* subtree is invalid skip (vsb)*/
-		if(subtree_is_valid (sp) == FALSE)
-			continue;
-		ret = longest_subtree_match (&(sp->name), name);
-		if (ret == 0) {
-			if (trace_level > 1)
-				trace("subtree_match() full match returned %s supported by %s\n\n",
-					SSAOidString(&(sp->name)),
-					sp->agent->name);
-			return sp;
-			
-		}
-		if (ret < 0)
-			continue;
-		if (good == NULL)
-			good = sp;
-		else if (good->name.len < sp->name.len)
-			good = sp;
-	}
-	if(trace_level > 1) {
-		if (good) {
-			trace("subtree_match() returned %s supported by %s\n\n",
-				SSAOidString(&(good->name)),
-				good->agent->name);
-		}
-		else {
-			trace("subtree_match() returned NULL\n\n");
-		}
-	}
-
-	return good;
-}
-
-
-/****************************************************************/
-
-void trace_subtrees()
-{
-	Subtree *sp;
-
-
-	trace("SUBTREES:\n");
-	for(sp = first_subtree; sp; sp = sp->next_subtree)
-	{
-		if(sp->agent)
-		{
-			trace("\t%-30s %d %d %-30s %d %d\n",
-				SSAOidString(&(sp->name)),
-				sp->regTreeIndex,
-				sp->regTreeStatus,
-				sp->agent->name,
-				sp->agent->address.sin_port,
-				sp->regTreeAgentID);
-		}
-		else
-		{
-			trace("\t%-30s %d %d %-30s\n",
-				SSAOidString(&(sp->name)),
-				sp->regTreeIndex,
-				sp->regTreeStatus,
-				"NO AGENT!");
-		}
-	}
-	trace("\n");
-}
-
-
-/****************************************************************/
-
-void subtree_free(Subtree *sp)
-{
-	if(sp == NULL)
-	{
-		return;
-	}
-
-	if(sp->name.subids)
-	{
-		free(sp->name.subids);
-		sp->name.subids=NULL;
-	}
-
-	if(sp->regTreeView.chars != NULL &&
-	   sp->regTreeView.len != 0 )
-		free(sp->regTreeView.chars);
-
-	if(sp->tbl_tag){
-		free(sp->tbl_tag);
-		sp->tbl_tag=NULL;
-	}
-
-	free(sp);
-}
-
-
-/****************************************************************/
-
-void subtree_list_delete()
-{
-	Subtree *sp = first_subtree;
-	Subtree *next;
-
-
-	while(sp)
-	{
-		next = sp->next_subtree;
-
-		subtree_remove_from_agent_list(sp);
-
-		subtree_free(sp);
-
-		sp = next;
-	}
-
-	first_subtree = NULL;
-
-	return;
-}
-
-
-/****************************************************************/
-/* the subtree  will be detached from both the agent_subtree list
- * and the main subtree list
- */
-void delete_all_subtree_from_agent(Agent* agent) 
-{
-	Subtree *sp = first_subtree;
-	Subtree *next, *last=NULL;
-	Session *spp;
-	Request *rp;
-
-	while(sp)
-	{
-		next = sp->next_subtree;
-
-		if(sp->agent != NULL && sp->agent == agent){
-			if(last == NULL){
-			  first_subtree = next;
-			}else{
-			  last->next_subtree = next;
-			}
-
-			for (spp = first_session; spp; spp = spp->next_session) {
-				for (rp = spp->first_request; rp; rp = rp->next_request) {
-					if (rp->subtree->agent == sp->agent)
-						session_close(spp);
-				}
-			}
-
-			subtree_remove_from_agent_list(sp);
-			subtree_free(sp);
-		}else{
-		  last = sp;
-		}
-
-		sp = next;
-	}
-
-   
-}
-
-void subtree_remove_from_agent_list(Subtree *subtree)
-{
-	Agent *agent = subtree->agent;
-	Subtree *sp;
-	Subtree *osp;
-	Table *table;
-
-
-        if(agent == NULL) return;
-	osp = NULL;
-	for(sp = agent->first_agent_subtree; sp; sp = sp->next_agent_subtree)
-	{
-		if(sp == subtree)
-		{
-			break;
-		}
-
-		osp = sp;
-	}
-
-	if(sp == NULL)
-	{
-		error("subtree_remove_from_agent_list() : subtree (0x%x) not found", subtree);
-		return;
-	}
-
-	if(osp == NULL)
-	{
-		agent->first_agent_subtree = sp->next_agent_subtree;
-	}
-	else
-	{
-		osp->next_agent_subtree = sp->next_agent_subtree;
-	}
-
-	subtree->agent = NULL;
-
-	/*(mibpatch) */
-	if(subtree->mirror_tag!=NULL){
-/*
-		table = subtree->mirror_tag->table;	
-		if(table!=NULL){
-			table_detach(table);
-			table_free(table);
-		}
-*/
-	}
-
-	return;
-}
-
-void subtree_detach(Subtree *tgt)
-{
-  Subtree *sp, *last=NULL;
-
-	if(tgt == NULL) return;
-	for(sp = first_subtree; sp; sp = sp->next_subtree)
-	{
-		if(sp == tgt)
-		{
-			break;
-		}
-
-		last = sp;
-	}
-	if(sp==NULL) return;
-
-	if(last == NULL)
-	{
-		first_subtree = tgt->next_subtree;
-		tgt->next_subtree = NULL;
-	}
-	else
-	{
-		last->next_subtree = tgt->next_subtree;
-		tgt->next_subtree = NULL;
-	}
-
-	subtree_remove_from_agent_list(tgt);
-
-}
-
-
-int subtree_is_valid(Subtree *t)
-{
-  if(t==NULL || t->agent==NULL || 
-     t->agent->agentStatus != SSA_OPER_STATUS_ACTIVE ||
-     t->regTreeStatus != SSA_OPER_STATUS_ACTIVE) return FALSE;
-  return TRUE;
-}
-
-Subtree *subtree_next(Subtree *subtree)
-{
-  Subtree* sp;
-  for(sp=subtree; sp; sp=sp->next_subtree){
-	if(subtree_is_valid(sp)) return sp;
-  }
-  return NULL;
-}
-
-int sync_subtrees_with_agent(Agent *agent)
-{
-  Subtree *sp;
-  if(agent == NULL) return -1;
-  for(sp=agent->first_agent_subtree;sp;sp=sp->next_agent_subtree)
-	sp->regTreeStatus = agent->agentStatus;
-
-  return 0;
-}
-
--- a/usr/src/cmd/agents/snmp/snmprelayd/subtree.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-/*
- * HISTORY
- * 5-21-96	Jerry Yeung	support MIB
- * 6-4-96	Jerry Yeung	support table
- */
-
-#ifndef _SUBTREE_H_
-#define _SUBTREE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifndef _SH_TABLE_H_
-#include "sh_table.h"
-#endif
-
-#define TBL_TAG_TYPE_UNKNOWN 0
-#define TBL_TAG_TYPE_COL 1
-#define TBL_TAG_TYPE_LEAF 2
-
-typedef struct _TblTag {
-	int entry_index; /* lowest row index of the table */
-	int type; /* col or leaf */
-	Table *table;
-} TblTag;
-
-typedef struct _MirrorTag {
-	Table *table;
-} MirrorTag;
-
-typedef struct _Subtree {
-        Integer regTreeIndex;
-        Integer regTreeAgentID;
-	Oid		name;
-/* rename regTreeOID to name, which has already used
-        Oid regTreeOID;
-*/
-        Integer regTreeStatus;
-	String regTreeView;
-        Integer regTreePriority;
-	struct _Subtree	*next_subtree;
-	struct _Agent	*agent;
-	struct _Subtree	*next_agent_subtree;
-	struct _TblTag *tbl_tag;
-	struct _MirrorTag *mirror_tag;
-
-/* things to be addeded 
- * char view_selected;
- * char bulk_selected;
- * int priority;
- */
-
-} Subtree;
-
-extern Subtree *first_subtree;
-
-extern int sap_reg_tree_index;
-
-int subtree_add(Agent *agent, Subid *subids, int len, TblTag *tbl_tag);
-
-/* if the the oid doesn't find, it will be created and inserted */
-Subtree* subtree_find(Subid *subids, int len);
-
-Subtree *subtree_match(u_char type, Oid *oid);
-
-void subtree_list_delete();
-
-void subtree_free(Subtree *sp); /* to be modified */
-
-void subtree_detach(Subtree *sp);
-
-void trace_subtrees();
-
-void subtree_remove_from_agent_list(Subtree *subtree);
-
-int subtree_is_valid(Subtree *subtree);
-
-Subtree* subtree_next(Subtree *subtree);
-
-void delete_all_subtree_from_agent(Agent* agent);
-
-int subtree_purge(Subid *subids, int len);
-
-int sync_subtrees_with_agent(Agent *agent);
-
-#endif
--- a/usr/src/cmd/agents/snmp/snmprelayd/svc-snmpdx	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-#!/sbin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# Start/Stop method script for the Sun Solstice Enterprise Master Agent
-#
-# Command line arguments
-# $1 = start/stop string
-# $2 = The primary process contract ID, if any, that under which the
-# service instance is executing.
-#
-
-. /lib/svc/share/smf_include.sh
-
-SNMP_CONFDIR=/etc/snmp/conf
-
-SNMP_RSRC=${SNMP_CONFDIR}/snmpdx.rsrc
-SNMP_BIN=/usr/lib/snmp/snmpdx
-
-case "$1" in
-    start)
-
-	if [ ! -f $SNMP_RSRC ]; then
-		echo "Configuration file $SNMP_RSRC does not exist. "\
-		    "Not starting snmpdx"
-		exit $SMF_EXIT_ERR_CONFIG
-	fi
-
-	if [ ! -x $SNMP_BIN ]; then
-		echo "$SNMP_BIN not found. Not starting snmpdx"
-		exit $SMF_EXIT_ERR_CONFIG
-	fi
-
-	if /usr/bin/egrep -sv '^[	  ]*(#|$)'\
-	    ${SNMP_RSRC} 2> /dev/null ; then
-		:
-	else
-		# Do not start snmpdx if snmpdx.rsrc contents are
-		# trivial.
-		echo "$SNMP_RSRC contains no definitions. Not starting snmpdx."
-		exit $SMF_EXIT_ERR_CONFIG
-	fi
-
-	#
-	# Since snmpdx isn't SMF_EXIT_*-aware, report any failures generically.
-	#
-	${SNMP_BIN} -y -c ${SNMP_CONFDIR} || exit $SMF_EXIT_ERR_FATAL
-	;;
-    stop)
-	# Kill any processes in the service contract
-	smf_kill_contract $2 TERM 1 5
-	ret=$?
-	[ $ret -eq 1 ] && exit $SMF_EXIT_ERR_FATAL
-
-	#
-	# Some processes in the contract may not handle SIGTERM.
-	# If the contract did not empty after TERM, move on to KILL.
-	#
-	if [ $ret -eq 2 ] ; then
-		smf_kill_contract $2 KILL 1
-		[ $? -ne 0 ] && exit $SMF_EXIT_ERR_FATAL
-	fi
-	;;
-    *)
-	echo "Usage: $0 { start | stop }"
-	exit $SMF_EXIT_ERR_FATAL
-	;;
-esac 
-
-exit $SMF_EXIT_OK
--- a/usr/src/cmd/agents/snmp/trapsend/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include ../../Makefile.vars
-
-include $(SRC)/cmd/Makefile.cmd
-
-#
-# In order to conform with the Solaris 2.6 way of packaging things,
-# we now need to put any deliverable that is specified in the
-# prototype file into a common "proto" area, so that their
-# packaging scheme knows where to obtain the input binaries.
-#
-
-AGENT =	snmp_trapsend
-BINPROG = $(AGENT)
-OPTBIN = $(ROOT)/usr/sbin
-OPTPROG = $(PROG:%=$(OPTBIN)/%)
-
-$(OPTBIN)/%: $(OPTBIN) %
-	$(INS.file)
-
-$(OPTBIN):
-	$(INS.dir)
-
-SOURCES.c=\
-	trapsend.c \
-	oid.c \
-	usage.c
-
-SOURCES.h=\
-	../snmplib/impl.h\
-	../snmplib/error.h\
-	../snmplib/trace.h\
-	../snmplib/asn1.h\
-	../snmplib/snmp.h\
-	../snmplib/pdu.h \
-	./oid.h \
-	./usage.h
-
-OBJECTS= $(SOURCES.c:%.c=$(BIN)/%.o)
-
-MYLINKLIBS += $(LDLIBS) -L../snmplib -lssasnmp
-
-LIBS=	-lnsl
-
-CPPFLAGS += -I. -I../snmplib -I../../include/netmgt -I${BIN}
-
-CFLAGS += -c
-
-LINT=lint
-
-.KEEP_STATE:
-
-#######################################################
-
-#
-# all
-#
-
-FILEMODE = 0755
-
-PROG=$(BINPROG)
-
-CLOBBERFILES=$(AGENT)
-
-all: $(SOURCES.h) $(BINPROG)
-
-install: all $(OPTPROG)
-
-
-$(BINPROG): $(BIN) $(OBJECTS)
-	$(CC) -o $(BINPROG) $(LDFLAGS) $(OBJECTS) $(MYLINKLIBS) $(LIBS)
-	$(POST_PROCESS)
-
-$(BIN)/%.o: %.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $*.c -o $@
-	$(POST_PROCESS_O)
-
-
-#
-# lint
-#
-
-lint:
-	$(LINT) $(LDFLAGS) $(CPPFLAGS) $(DEFINES) $(SOURCES.c) $(MYLINKLIBS) $(LIBS)
-
-
-#
-# purify
-#
-
-purify:
-	$(PURIFY) $(CC) -o $(BINPROG) $(LDFLAGS) $(OBJECTS) $(MYLINKLIBS) $(LIBS)
-
-
-#
-# directories
-#
-
-$(BIN):
-	@$(TEST) -d $@ || mkdir $@
-
-
-#
-# clean
-#
-
-clean:
-	$(RM) $(OBJECTS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/agents/snmp/trapsend/oid.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <errno.h>
-#include <syslog.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <nlist.h>
-
-#include "snmp_msg.h"
-#include "impl.h"
-#include "trace.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "trap.h"
-#include "error.h"
-
-#define BUFSIZE 256
-
-
-/* get_oid_from_file
-   it finds the first oid which enterprise string match the input.
-   */
-
-static Oid *get_oid_with_name(char *inbuf, char *enterprise_str)
-{
-	char *str;
-	char *name_ptr;
-	Oid  *oid = NULL; 
-
-	if ((inbuf== NULL) || (inbuf[0]== '#')) return (NULL);
-	
-	/* first "  for name */
-	if ((str = strchr(inbuf, '"')) == NULL) return (NULL);
-	*str++;
-	name_ptr = str; 
-
-		/* second " for name */
-	if ((str = strchr(str, '"')) == NULL) return (NULL);  
-	*str = '\0'; 
-
-	if (!strncasecmp(name_ptr, enterprise_str, strlen(enterprise_str))) {
-		*str++;
-		/* first " for oid_str*/
-		if ((str = strchr(str, '"')) == NULL)  return (NULL);  
-		*str++;
-		name_ptr = str;
-
-		/* second " for oid_str*/
-		if ((str = strchr(str, '"')) == NULL) return (NULL);  
-		*str = '\0';
-		oid = SSAOidStrToOid(name_ptr,error_label);
-	}
-
-	return(oid);
-	
-}
-
-Oid *get_oid(char *enterprise_str)
-{
-	char *snm_home;
-	Oid *oid = NULL;
-	FILE *fd;
-	char inbuf[BUFSIZE];
-	
-	if ((snm_home = getenv("SNMHOME")) == NULL ) {
-		sprintf(inbuf,
-				"/etc/snmp/conf/enterprises.oid");
-	}
-	else {
-		sprintf(inbuf,
-				"%s/agents/enterprise.oid", snm_home);
-	}
-
-    fd = fopen(inbuf, "r");
-    if (fd == NULL) {
-		fprintf(stderr, "Cannot open %s\n", inbuf);
-		return (NULL);
-    }
-	else {
-		if(trace_level > 0)	{
-			trace("Parsing %s\n", inbuf);
-		}
-    }
-
-	while (fgets(inbuf, BUFSIZE, fd)) {
-		oid = get_oid_with_name(inbuf, enterprise_str);
-		if (oid != NULL) {
-			fclose (fd);
-			return(oid);
-		}
-	}
-    fclose(fd);
-
-	return (oid); 
-}
-
-
-/* error return NULL,  success variable */
-SNMP_variable *get_variable(char *buf)
-{
-	char name[BUFSIZE];
-	char type_str[BUFSIZE];
-	u_char type; 
-	char value[BUFSIZE];
-	SNMP_value snmp_value; 
-	SNMP_variable *variable = NULL;
-	Oid *name_oid, *value_oid;
-	int count; 
-	
-	char *s;
-    int i;
-	
-    /* get the attribute name and the type */
-    if (sscanf(buf, "%s %s", name, type_str) != 2)
-      return(NULL);
-
-    /* get the value */
-    /* everything after the '(' is the value field */
-    if (!(s = (char *)strchr(buf, '(')))
-		return(NULL);
-    s++;
-	count = 1; 
-    
-    for (; *s && *s == ' '; s++); /* skip leading blanks */
-    for (i = 0; *s && count && i< BUFSIZE ; s++, i++) {
-		if (*s == ')')
-			count --;
-		if (*s == '(')
-			count ++;
-		if (count)
-			value[i] = *s;
-		else
-			value[i] = '\0';
-	}
-	
-	if (i>= BUFSIZE) {
-		fprintf(stderr, "object value is too long!\n");
-		usage(); 
-	}
-    value[i] = '\0';
-
-    if (strcmp(type_str, "STRING") == 0) {
-		type = STRING;
-		snmp_value.v_string.chars = (u_char *) value;
-		snmp_value.v_string.len = strlen(value);
-	}
-    else if (strcmp(type_str, "IPADDRESS") == 0) {
-		type = IPADDRESS;
-		snmp_value.v_string.chars = (u_char *) value;
-		snmp_value.v_string.len = strlen(value);
-	}
-    else if (strcmp(type_str, "OPAQUE") == 0) {
-		type = OPAQUE;
-		snmp_value.v_string.chars = (u_char *) value;
-		snmp_value.v_string.len = strlen(value);
-	}
-    else if (strcmp(type_str, "INTEGER") == 0) {
-		type = INTEGER;
-		snmp_value.v_integer = atoi(value);
-	}
-    else if (strcmp(type_str, "COUNTER") == 0) {
-		type = COUNTER;
-		snmp_value.v_integer = atoi(value);
-	}
-    else if (strcmp(type_str, "GAUGE") == 0) {
-		type = GAUGE;
-		snmp_value.v_integer = atoi(value);
-	}
-    else if (strcmp(type_str, "TIMETICKS") == 0) {
-		type = TIMETICKS;
-		snmp_value.v_integer = atoi(value);
-	}
-    else if (strcmp(type_str, "OBJECTID") == 0) {
-		type = OBJID;
-		if ((value_oid = SSAOidStrToOid(value,error_label)) == NULL) return (NULL) ;
-		snmp_value.v_oid.subids = value_oid->subids;
-		snmp_value.v_oid.len = value_oid->len; 
-	}
-	else return (NULL);
-
-
-	if ((name_oid = SSAOidStrToOid(name,error_label)) == NULL) return (NULL); 
-		
-	variable = snmp_typed_variable_new(name_oid, 
-									   type, &snmp_value, error_label);
-	SSAOidFree(name_oid);
-    return(variable);
-}  /* get_variable */
-
-
--- a/usr/src/cmd/agents/snmp/trapsend/oid.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _OID_H_
-#define _OID_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-extern Oid *get_oid(char *enterprise_str); 
-extern SNMP_variable *get_variable(char *buf); 
-
-#endif
--- a/usr/src/cmd/agents/snmp/trapsend/trapsend.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <errno.h>
-#include <syslog.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <nlist.h>
-
-#include "snmp_msg.h"
-#include "impl.h"
-#include "trace.h"
-#include "snmp.h"
-#include "pdu.h"
-#include "trap.h"
-#include "error.h"
-#include "oid.h"
-#include "usage.h"
-
-
-#include "sea_i18n.h"
-
-
-static int is_number (char *buf); 
-
-int
-main(int argc, char *argv[])
-{
-    extern char *optarg;
-	extern int optind;
-	int opt;
-
-	char hostname[MAXHOSTNAMELEN];
-	IPAddress ip_address;
-	IPAddress my_ip_addr;	
-	Oid *enterprise;
-	int generic, specific, level; 
-	SNMP_variable *variables;
-	struct hostent *hp;
-	int trap_port = -1;
-	u_long time_stamp = (u_long)-1;
-	int enterprise_flag= 0, a_flag = 0, i_flag = 0;
-	
-	optind = 1;
-	
-	/* the default host name is local host */
-	gethostname(hostname, sizeof(hostname)); 
-
-	/* default Oid for enterprise is sun */
-	enterprise = &sun_oid; 
-
-	/* generic, specific */
-	generic = 6; 
-	specific = 1;
-
-
-        {
-        char domain_path[MAXPATHLEN];
-
-        setlocale(LC_ALL, "");
-
-        sprintf(domain_path, SEA_LOCALE_PATH);
-
-        bindtextdomain(DOMAIN_MGET, domain_path);
-        bindtextdomain(DOMAIN_SGET,   domain_path);
-        bindtextdomain(DOMAIN_LIBGET,   domain_path);
-        bindtextdomain(DOMAIN_LGET, domain_path);
-        bindtextdomain(DOMAIN_FGET,  domain_path);  /* formatting string */
-        }
-
-
-	/* get command-line options */
-    while ((opt = getopt(argc, argv, "h:c:e:E:g:s:i:t:a:T:p:")) != EOF) {
-		switch (opt) {
-			case 'T':
-				level = atoi(optarg);
-				if(trace_set(level, error_label)){
-					fprintf(stderr, " %d is not a valid trace level!\n",
-							level); 
-					usage();
-				}
-				break; 
-			case 'h':		/* host to send trap to */
-				if (strlcpy(hostname, optarg, sizeof (hostname))
-					> MAXHOSTNAMELEN) {
-					fprintf(stderr, "%s: hostname too long!\
-						\n", optarg);
-					exit(1);
-				}
-			case 'c':
-				trap_community = optarg; 
-				break; 
-			case 'e':
-				if (enterprise_flag) {
-					usage();
-				}				  
-				enterprise = SSAOidStrToOid(optarg,error_label);
-				if (!enterprise){ /* error */
-					fprintf(stderr,
-							"%s: not a valid enterprise oid string!\n",
-							optarg);
-					usage();
-				}
-				enterprise_flag = 1; 
-				break; 
-			case 'E':
-				if (enterprise_flag) {
-					usage();
-				}
-				enterprise = get_oid(optarg);
-				if (!enterprise) {
-					usage();
-				}
-				enterprise_flag = 1; 
-				break; 
-			case 'g':         /* generic trap type */
-				if (is_number(optarg))
-					usage(); 
-				generic = atoi(optarg);
-				if ((generic > 6 ) || (generic < 0))
-					usage(); 
-				break;
-			case 's':         /* specific trap type */
-				if (is_number(optarg))
-					usage(); 
-				specific = atoi(optarg);
-				break;
-			case 'i':
-				if (name_to_ip_address(optarg,
-									   &my_ip_addr,
-									   error_label)) {
-					usage();
-				}
-				i_flag = 1; 
-				break; 
-			case 't': /* timestamp */
-				time_stamp = atol(optarg);
-				break;
-			case 'p':
-				if (is_number(optarg))
-					usage(); 
-				trap_port = atoi(optarg);
-				break; 
-			case 'a':         /* attribute information */
-				if ((variables = get_variable(optarg))== NULL){
-					fprintf(stderr,
-							"%s: not a valid variable!\n", optarg); 
-					usage();
-				}
-				a_flag = 1; 
-				break;
-			case '?':		/* usage help */
-				usage();
-				break; 
-			default:
-				usage();
-				break;
-		}  /* switch */
-	}/* while */
-
-	if ((optind != argc) || (!a_flag))
-		usage();
-   
-	if ((ip_address.s_addr = inet_addr(hostname)) == -1 ) {
-		if ((hp = gethostbyname(hostname)) == NULL) {
-			fprintf(stderr, "\n%s is not a valid hostname!\n\n", hostname);
-			usage(); 
-		}
-		memcpy(&(ip_address.s_addr), hp->h_addr, hp->h_length);
-	}
-
-
-
-	/* some trace message */
-	
-	if (trap_send_with_more_para(&ip_address,
-								 my_ip_addr, trap_community, i_flag,
-								 enterprise,
-								 generic,
-								 specific,
-								 trap_port,
-								 time_stamp,
-								 variables,
-								 error_label)) {
-		fprintf(stderr, "trap_send not success!\n\n");
-		return (-1);
-	} else {
-		return (0);
-	}
-
-/*	if (trap_send(&ip_address,
-				  enterprise,
-				  generic,
-				  specific,
-				  variables,
-				  error_label)) {
-		fprintf(stderr, "trap_send not success!\n\n");
-	}	 */
-}
-
-
-
-static int is_number (buf)
-char *buf;
-{
-	int len, i;
-
-	if (buf == NULL)
-		return (-1);
-	
-	len = strlen(buf);
-	for (i= 0; i < len; i++) 
-		if (!isdigit(buf[i])) {
-		fprintf(stderr, "\n%s is not a valid generic or specific trap type number!\n\n", buf);
-		return(-1);
-		}
-	return (0);
-}
-	
--- a/usr/src/cmd/agents/snmp/trapsend/usage.c	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "sea_i18n.h"
-
-void
-usage()
-{
-	fprintf(stderr, FGET("%s\n"),
-		MGET("Usage:"));
-
-	fprintf(stderr, FGET("%s\n"),
-		MGET("  trapsend"));
-	fprintf(stderr, FGET("%s\t\t%s\n"),
-		MGET("  [-h host]"),
-		MGET("(default = localhost)"));
-	fprintf(stderr, FGET("%s\t%s\n"),
-		MGET("  [-c community]"),
-		MGET("(default = public)")); 
-	fprintf(stderr, FGET("%s\t%s\n"),
-		MGET("  [-e enterprise | -E enterprise_str]"),
-		MGET("(default = 1.3.6.1.4.1.42)"));
-	fprintf(stderr, FGET("%s\t\t%s\n"),
-		MGET("  [-g generic#]"),
-		MGET("(range 0..6, default = 6)"));
-	fprintf(stderr, FGET("%s\t%s\n"),
-		MGET("  [-s specific#]"),
-		MGET("(default = 1)"));
-	fprintf(stderr, FGET("%s\t\t%s\n"),
-		MGET("  [-i ipaddr]"),
-		MGET("(default = localhost)"));
-	fprintf(stderr, FGET("%s\t%s\n"),
-		MGET("  [-p trap_port]"),
-		MGET("(default = 162)"));
-	fprintf(stderr, FGET("%s\t%s\n"),
-		MGET("  [-t timestamp]"),
-		MGET("(a time in unix-time format, default is uptime)"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("  -a \"object-id object-type ( object-value )\""));
-	fprintf(stderr, FGET("%s\t%s\n"),
-		MGET("  [-T trace-level]"),
-		MGET("(range 0..4, default = 0)\n")); 
-	fprintf(stderr, FGET("%s\n"),
-		MGET("  Note: Valid object types are:"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("           STRING"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("           INTEGER"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("           COUNTER"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("           GAUGE"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("           TIMETICKS"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("           OBJECTID"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("           IPADDRESS"));
-	fprintf(stderr, FGET("%s\n"),
-		MGET("           OPAQUE"));
-
-    exit(1);
-}  /* usage */
-
-
--- a/usr/src/cmd/agents/snmp/trapsend/usage.h	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the 
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _USAGE_H_
-#define _USAGE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-extern void usage(); 
-
-#endif
--- a/usr/src/cmd/initpkg/init.d/Makefile	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/cmd/initpkg/init.d/Makefile	Thu Nov 18 10:08:59 2010 -0800
@@ -34,7 +34,6 @@
 	devlinks	\
 	dhcp		\
 	drvconfig	\
-	init.snmpdx	\
 	ldap.client	\
 	mkdtab		\
 	nfs.server	\
--- a/usr/src/cmd/initpkg/init.d/init.snmpdx	Mon Nov 15 20:03:27 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#!/sbin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-
-case "$1" in
-'start')
-	svcadm enable -t svc:/application/management/snmpdx:default
-	;;
-
-'stop')
-	svcadm disable -t svc:/application/management/snmpdx:default
-	;;
-
-*)
-	echo "Usage: $0 { start | stop }"
-	exit 1
-	;;
-esac
-exit 0
--- a/usr/src/pkg/manifests/SUNWllc.mf	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/pkg/manifests/SUNWllc.mf	Thu Nov 18 10:08:59 2010 -0800
@@ -25,6 +25,6 @@
 
 # Was renamed to driver/network/llc2, both now obsolete
 
-set name=pkg.fmri value=pkg:/SUNWllc@$(PKGVERS)
+set name=pkg.fmri value=pkg:/SUNWllc@0.5.11,5.11-0.148
 set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
--- a/usr/src/pkg/manifests/SUNWmibii.mf	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/pkg/manifests/SUNWmibii.mf	Thu Nov 18 10:08:59 2010 -0800
@@ -23,7 +23,6 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/SUNWmibii@0.5.11,5.11-0.133
-set name=pkg.renamed value=true
+set name=pkg.fmri value=pkg:/SUNWmibii@0.5.11,5.11-0.148
+set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
-depend fmri=pkg:/service/network/snmp/mibiisa@0.5.11,5.11-0.133 type=require
--- a/usr/src/pkg/manifests/SUNWsasnm.mf	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/pkg/manifests/SUNWsasnm.mf	Thu Nov 18 10:08:59 2010 -0800
@@ -23,7 +23,6 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/SUNWsasnm@0.5.11,5.11-0.133
-set name=pkg.renamed value=true
+set name=pkg.fmri value=pkg:/SUNWsasnm@0.5.11,5.11-0.148
+set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
-depend fmri=pkg:/system/management/snmp/sea@0.5.11,5.11-0.133 type=require
--- a/usr/src/pkg/manifests/developer-library-lint.mf	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/pkg/manifests/developer-library-lint.mf	Thu Nov 18 10:08:59 2010 -0800
@@ -224,8 +224,6 @@
 file path=usr/lib/$(ARCH64)/llib-lsip.ln
 file path=usr/lib/$(ARCH64)/llib-lsldap.ln
 file path=usr/lib/$(ARCH64)/llib-lsmbios.ln
-file path=usr/lib/$(ARCH64)/llib-lssagent.ln
-file path=usr/lib/$(ARCH64)/llib-lssasnmp.ln
 $(sparc_ONLY)file path=usr/lib/$(ARCH64)/llib-lv12n.ln
 file path=usr/lib/$(ARCH64)/llib-lvolmgt.ln
 file path=usr/lib/$(ARCH64)/values-Xa.o
@@ -305,10 +303,6 @@
 file path=usr/lib/llib-lsldap.ln
 file path=usr/lib/llib-lsmbios
 file path=usr/lib/llib-lsmbios.ln
-file path=usr/lib/llib-lssagent
-file path=usr/lib/llib-lssagent.ln
-file path=usr/lib/llib-lssasnmp
-file path=usr/lib/llib-lssasnmp.ln
 $(sparc_ONLY)file path=usr/lib/llib-lv12n
 $(sparc_ONLY)file path=usr/lib/llib-lv12n.ln
 file path=usr/lib/llib-lvolmgt
--- a/usr/src/pkg/manifests/driver-network-llc2.mf	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/pkg/manifests/driver-network-llc2.mf	Thu Nov 18 10:08:59 2010 -0800
@@ -23,6 +23,6 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/driver/network/llc2@$(PKGVERS)
+set name=pkg.fmri value=pkg:/driver/network/llc2@0.5.11,5.11-0.148
 set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
--- a/usr/src/pkg/manifests/service-network-snmp-mibiisa.mf	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/pkg/manifests/service-network-snmp-mibiisa.mf	Thu Nov 18 10:08:59 2010 -0800
@@ -23,17 +23,6 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/service/network/snmp/mibiisa@$(PKGVERS)
-set name=pkg.description value="Solstice Enterprise Agents 1.0.3 snmp daemon"
-set name=pkg.summary value="Solstice Enterprise Agents 1.0.3 SNMP daemon"
-set name=info.classification \
-    value="org.opensolaris.category.2008:System/Enterprise Management"
+set name=pkg.fmri value=pkg:/service/network/snmp/mibiisa@0.5.11,5.11-0.148
+set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
-dir path=usr group=sys
-dir path=usr/lib
-dir path=usr/lib/snmp group=sys
-file path=usr/lib/snmp/mibiisa group=sys mode=0755
-legacy pkg=SUNWmibii desc="Solstice Enterprise Agents 1.0.3 snmp daemon" \
-    name="Solstice Enterprise Agents 1.0.3 SNMP daemon"
-license cr_Sun license=cr_Sun
-license lic_CDDL license=lic_CDDL
--- a/usr/src/pkg/manifests/system-management-snmp-sea-sea-config.mf	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/pkg/manifests/system-management-snmp-sea-sea-config.mf	Thu Nov 18 10:08:59 2010 -0800
@@ -23,6 +23,24 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
+#
+# This package is left in place solely to satisfy a dependency from
+# the SFW net-snmp package.  There is an argument to be made that the
+# dependency is actually "soft".  That is, that the net-snmp doesn't
+# really *need* the files that were formerly delivered by this
+# package.  Unfortunately, the packaging system doesn't realize this
+# and would refuse to install net-snmp, which would create problems
+# for FMA, if this package doesn't exist.
+#
+# There may be some fallout from this delivery for now, until the
+# net-snmp package is updated to remove the SEA hacks that Sun had
+# originally added to it.  For now it just deliveres a (duplicate)
+# reference to /etc.
+#
+# Once that is done, this package can be obsoleted.  Note that the
+# previous package, named SUNWsacom, would need to be removed at the
+# same time.
+#
 set name=pkg.fmri value=pkg:/system/management/snmp/sea/sea-config@$(PKGVERS)
 set name=pkg.description \
     value="Solstice Enterprise Agents 1.0.3 files for root file system"
@@ -32,41 +50,3 @@
     value="org.opensolaris.category.2008:System/Enterprise Management"
 set name=variant.arch value=$(ARCH)
 dir path=etc group=sys
-dir path=etc/init.d group=sys
-dir path=etc/snmp group=sys
-dir path=etc/snmp/conf group=sys
-dir path=lib
-dir path=lib/svc
-dir path=lib/svc/manifest group=sys
-dir path=lib/svc/manifest/application group=sys
-dir path=lib/svc/manifest/application/management group=sys
-dir path=lib/svc/method
-dir path=var group=sys
-dir path=var/snmp group=sys
-dir path=var/snmp/mib group=sys
-file path=etc/init.d/init.snmpdx group=sys mode=0744
-file path=etc/snmp/conf/enterprises.oid group=sys
-file path=etc/snmp/conf/mibiisa.reg group=sys \
-    original_name=SUNWsacom:etc/snmp/conf/mibiisa.reg preserve=true
-file path=etc/snmp/conf/mibiisa.rsrc- group=sys \
-    original_name=SUNWsacom:etc/snmp/conf/mibiisa.rsrc- preserve=true
-file path=etc/snmp/conf/snmpd.conf group=sys mode=0600 \
-    original_name=SUNWsacom:etc/snmp/conf/snmpd.conf preserve=true
-file path=etc/snmp/conf/snmpdx.acl group=sys mode=0600 \
-    original_name=SUNWsacom:etc/snmp/conf/snmpdx.acl preserve=true
-file path=etc/snmp/conf/snmpdx.reg group=sys \
-    original_name=SUNWsacom:etc/snmp/conf/snmpdx.reg preserve=true
-file path=etc/snmp/conf/snmpdx.rsrc group=sys \
-    original_name=SUNWsacom:etc/snmp/conf/snmpdx.rsrc preserve=true
-file path=lib/svc/manifest/application/management/snmpdx.xml group=sys \
-    mode=0444
-file path=lib/svc/method/svc-snmpdx mode=0555
-file path=var/snmp/mib/snmpdx.mib group=sys
-file path=var/snmp/mib/sun.mib group=sys
-legacy pkg=SUNWsacom \
-    desc="Solstice Enterprise Agents 1.0.3 files for root file system" \
-    name="Solstice Enterprise Agents 1.0.3 files for root file system"
-license cr_Sun license=cr_Sun
-license lic_CDDL license=lic_CDDL
-license lic_OSBL license=lic_OSBL
-license lic_OSBL_preamble license=lic_OSBL_preamble
--- a/usr/src/pkg/manifests/system-management-snmp-sea.mf	Mon Nov 15 20:03:27 2010 -0800
+++ b/usr/src/pkg/manifests/system-management-snmp-sea.mf	Thu Nov 18 10:08:59 2010 -0800
@@ -23,33 +23,6 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/system/management/snmp/sea@$(PKGVERS)
-set name=pkg.description \
-    value="Solstice Enterprise Agents 1.0.3 Simple Network Management Protocol"
-set name=pkg.summary \
-    value="Solstice Enterprise Agents 1.0.3 Simple Network Management Protocol"
-set name=info.classification \
-    value="org.opensolaris.category.2008:System/Enterprise Management"
+set name=pkg.fmri value=pkg:/system/management/snmp/sea@0.5.11,5.11-0.148
+set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
-dir path=usr group=sys
-dir path=usr/lib
-dir path=usr/lib/$(ARCH64)
-dir path=usr/lib/snmp group=sys
-dir path=usr/sbin
-file path=usr/lib/$(ARCH64)/libssagent.so.1
-file path=usr/lib/$(ARCH64)/libssasnmp.so.1
-file path=usr/lib/libssagent.so.1
-file path=usr/lib/libssasnmp.so.1
-file path=usr/lib/snmp/snmpdx group=sys mode=0755
-file path=usr/sbin/snmp_trapsend mode=0755
-legacy pkg=SUNWsasnm \
-    desc="Solstice Enterprise Agents 1.0.3 Simple Network Management Protocol" \
-    name="Solstice Enterprise Agents 1.0.3 Simple Network Management Protocol"
-license cr_Sun license=cr_Sun
-license lic_CDDL license=lic_CDDL
-license usr/src/cmd/agents/snmp/THIRDPARTYLICENSE \
-    license=usr/src/cmd/agents/snmp/THIRDPARTYLICENSE
-link path=usr/lib/$(ARCH64)/libssagent.so target=./libssagent.so.1
-link path=usr/lib/$(ARCH64)/libssasnmp.so target=./libssasnmp.so.1
-link path=usr/lib/libssagent.so target=./libssagent.so.1
-link path=usr/lib/libssasnmp.so target=./libssasnmp.so.1