|
Hello
I'm trying to cross-compile net-snmp-5.3.2 with my personal library I included my personal library in install script but I know it is not proper way.
So I put my library source code in the agent/mibgroup directory.
My library source is below ============================================================================================== nex_dtag.h nex_dtag.c nex_pme.h nex_pme.c nex_efmoam.h nex_efmoam.c nex_port.h nex_port.c bdFlashCommon.h common.h nex_fan.h nex_fan.c nex_qos.h nex_qos.c nex_filter.h nex_filter.c crc32.h crc32.c nex_snmp.h nex_snmp.c dsl_api.h efmoam.h esw_api.h net_http.h nex_http.c nex_sntp.h nex_sntp.c nex_igmp.h nex_igmp.c nex_sntp.h nex_sntp.c filter.h nex_system.h nex_system.c iocmd.h nex_image.h nex_image.c nex_tm.h nex_tm.c nex_interface.h nex_interface.c nex_vlan.h nex_vlan.c nex_common.h nex_common.c nex_log.h nex_log.c nex_module.h nex_module.c nex_vlan.h nex_vlan.c nex_config.h nex_config.c qos.h nexpassword.h nex_password.c snmp_agent.h vlan.h nex_cpe.h nex_cpe.c Add my source code in "with-mib-module" like below
================================================================================================
./configure --host=i386-linux --build=ppc-linux --target=ppc-linux --prefix=/usr --exec-prefix=/usr --enable-shared --disable-debugging --enable-mini-agent --with-mibs="IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB:NEXCOMM-FAN-MIB:NEXCOMM-LOG-MIB:NEXCOMM-SMI:NEXCOMM-MODULE-MIB" --with-mib-modules="agentx ucd-snmp/dlmod nex_common nex_config nex_dtag nex_fan nex_filter nex_http nex_igmp nex_image nex_interface nex_log nex_module nex_password nex_pme nex_port nex_qos nex_snmp nex_sntp nex_system nex_tm nex_vlan nex_efmoam nex_cpe crc32 snmp_fan snmp_log snmp_module" --with-enterprise-notification-oid=.1.3.6.1.4.1.5927.99.12.1 --sysconfdir=/etc --localstatedir=/var --enable-internal-md5 --enable-snmpv1 --enable-snmpv2c --disable-embedded-perl --with-cc=ppc_82xx-gcc --with-linkcc=ppc_82xx-gcc --with-ar=ppc_82xx-ar --with-endianness=big --with-install-prefix=/home/psyche/sychoi/install --without-rpm | tee snmp.config.log
make | tee snmp.config.log
perl -pi -e "s|^prefix=/usr|prefix=/home/psyche/sychoi/install/usr|" net-snmp-config
perl -pi -e "s|^exec_prefix=/usr|exec_prefix=/home/psyche/sychoi/install/usr|" net-snmp-config
make install | tee snmp.intall.log
=================================================================================================
but I couldn't add header file like this ones : common.h , dsl_api.h, efmoam.h , esw_api.h, filter.h etc
How can i add this header file in"with-mib-modules"?
I add this files(header file like this : dsl_api.h, efmoam.h, filter.h, esw_api.h) to the Makefile using CFLAGS
=============================================================================
CFLAGS="-I/home/psyche/sychoi/net-snmp-5.3.2/agent/mibgroup/nexlib
EXTRACPPFLAGS = -x c
LDFLAGS =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
EXEEXT
==============================================================================
But when i installed snmp, the result is below
=================================================================================================
[r...@localhost net-snmp-5.3.2]# snmpwalk -v 1 -c public 172.16.0.100 system
SNMPv2-MIB::sysDescr.0 = STRING: n5000
SNMPv2-MIB::sysObjectID.0 = OID: NEXCOMM-SMI::n5000
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1372) 0:00:13.72
SNMPv2-MIB::sysContact.0 = STRING: http://www.nexcomm.com
SNMPv2-MIB::sysName.0 = STRING: N5000
SNMPv2-MIB::sysLocation.0 = STRING: nexcomm systems Inc.
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.5 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.3 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.5 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (3) 0:00:00.03
[r...@localhost net-snmp-5.3.2]# snmpwalk -v 1 -c public 172.16.0.100 snmp
SNMPv2-MIB::snmpInPkts.0 = Counter32: 24
SNMPv2-MIB::snmpOutPkts.0 = Counter32: 24
SNMPv2-MIB::snmpInBadVersions.0 = Counter32: 0
SNMPv2-MIB::snmpInBadCommunityNames.0 = Counter32: 0
SNMPv2-MIB::snmpInBadCommunityUses.0 = Counter32: 0
SNMPv2-MIB::snmpInASNParseErrs.0 = Counter32: 0
SNMPv2-MIB::snmpInTooBigs.0 = Counter32: 0
SNMPv2-MIB::snmpInNoSuchNames.0 = Counter32: 0
SNMPv2-MIB::snmpInBadValues.0 = Counter32: 0
SNMPv2-MIB::snmpInReadOnlys.0 = Counter32: 0
SNMPv2-MIB::snmpInGenErrs.0 = Counter32: 0
SNMPv2-MIB::snmpInTotalReqVars.0 = Counter32: 34
SNMPv2-MIB::snmpInTotalSetVars.0 = Counter32: 0
SNMPv2-MIB::snmpInGetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpInGetNexts.0 = Counter32: 38
SNMPv2-MIB::snmpInSetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpInGetResponses.0 = Counter32: 0
SNMPv2-MIB::snmpInTraps.0 = Counter32: 0
SNMPv2-MIB::snmpOutTooBigs.0 = Counter32: 0
SNMPv2-MIB::snmpOutNoSuchNames.0 = Counter32: 0
SNMPv2-MIB::snmpOutBadValues.0 = Counter32: 0
SNMPv2-MIB::snmpOutGenErrs.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetNexts.0 = Counter32: 0
SNMPv2-MIB::snmpOutSetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetResponses.0 = Counter32: 48
SNMPv2-MIB::snmpOutTraps.0 = Counter32: 0
SNMPv2-MIB::snmpEnableAuthenTraps.0 = INTEGER: disabled(2)
SNMPv2-MIB::snmpSilentDrops.0 = Counter32: 0
SNMPv2-MIB::snmpProxyDrops.0 = Counter32: 0
[r...@localhost net-snmp-5.3.2]# snmpwalk -v 1 -c public 172.16.0.100 fan
[r...@localhost net-snmp-5.3.2]# snmpwalk -v 1 -c public 172.16.0.100 log
[r...@localhost net-snmp-5.3.2]# snmpwalk -v 1 -c public 172.16.0.100 module
================================================================================================
I want to know how can i add these header file in my install script...
and How can i compile snmp without personal library though personal library is needed...
please help me...
|
|
|
|
------------------------------------------------------------------------------
_______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
