From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from web33009.mail.mud.yahoo.com (web33009.mail.mud.yahoo.com [209.191.69.124]) by ozlabs.org (Postfix) with SMTP id F398EDDE34 for ; Wed, 3 Jan 2007 00:33:31 +1100 (EST) Date: Wed, 3 Jan 2007 00:33:29 +1100 (EST) From: tran vanle Subject: ELDK4.0 net-snmp can not work with trapsink To: linuxppc-embedded@ozlabs.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1456742139-1167744809=:55876" Message-ID: <732221.55876.qm@web33009.mail.mud.yahoo.com> List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --0-1456742139-1167744809=:55876 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi all I use net-snmp package in ELDK4.0 with board TQM8xxL . I config it ./configure \ --host=$RPM_ARCH-linux \ --enable-static --enable-shared \ --with-cflags="$RPM_OPT_FLAGS -lcrypto" \ --with-ldflags="$LDFLAGS" \ --with-sys-location="Unknown" \ --with-logfile="/var/log/snmpd.log" \ --with-persistent-directory="/var/net-snmp" \ --with-endianness=$endianess \ --with-default-snmp-version="2" \ --with-mib-modules="host agentx smux "\ %if %{tcp_wrappers} --with-libwrap=%{_libdir} \ %endif --sysconfdir=%{_sysconfdir} \ --enable-ucd-snmp-compatibility \ --with-openssl \ --with-pic \ --with-sys-contact="root@localhost" If I run snmpd with basic config file in /etc/snmp/snmpd.conf it run ok But when I want to use trapsink , I add these line to /etc/snmp/snmpd.conf //////////////////////////////////// # arguments: 1 | 2 (1 = yes, 2 = no) authtrapenable 1 # trapcommunity: Default trap sink community to use # arguments: community-string trapcommunity abc # trapsink: A SNMPv1 trap receiver # arguments: host [community] [portnum] trapsink 192.168.1.7 # informsink: A SNMPv2c inform (acknowledged trap) receiver # arguments: host [community] [portnum] informsink 192.168.1.15 # trap2sink: A SNMPv2c trap receiver # arguments: host [community] [portnum] trap2sink 192.168.1.7 /////////////////////////////////// and run snmpd with debug I receive ....... ...... snmp_clean_persistent: removing old config file: /var/net-snmp/snmpd.0.conf trace: netsnmp_send_traps(): agent_trap.c, 616: trap: send_trap 0 0 NET-SNMP-MIB::netSnmpAgentOIDs.10trace: netsnmp_send_traps(): agent_trap.c, 618: trap: trace: snmp_call_callbacks(): callback.c, 209: callback: START calling callbacks for maj=1 min=6 trace: snmp_call_callbacks(): callback.c, 223: callback: calling a callback for maj=1 min=6 trace: send_notifications(): notification/snmpNotifyTable.c, 95: send_notifications: starting: pdu=8086740, vars=0 Segmentation fault What error I had and How can I fix it? Thanks for all Send instant messages to your online friends http://au.messenger.yahoo.com --0-1456742139-1167744809=:55876 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi all
I use net-snmp package in ELDK4.0 with board TQM8xxL .
I config it
    ./configure \
        --host=$RPM_ARCH-linux                          \
        --enable-static --enable-shared                 \
        --with-cflags="$RPM_OPT_FLAGS -lcrypto"         \
        --with-ldflags="$LDFLAGS"                       \
        --with-sys-location="Unknown"                   \
        --with-logfile="/var/log/snmpd.log"             \
        --with-persistent-directory="/var/net-snmp"     \
        --with-endianness=$endianess                    \
        --with-default-snmp-version="2"                 \

        --with-mib-modules="host agentx smux "\

%if %{tcp_wrappers}
        --with-libwrap=%{_libdir}                       \
%endif
        --sysconfdir=%{_sysconfdir}                     \
        --enable-ucd-snmp-compatibility                 \
        --with-openssl                                  \
        --with-pic                                      \
        --with-sys-contact="root@localhost"

If I run snmpd with basic config file in /etc/snmp/snmpd.conf it run ok
But when I want to use trapsink , I add these line to /etc/snmp/snmpd.conf
////////////////////////////////////
       #   arguments: 1 | 2   (1 = yes, 2 = no)
authtrapenable 1
# trapcommunity: Default trap sink community to use
#   arguments: community-string
trapcommunity abc
# trapsink: A SNMPv1 trap receiver
#   arguments: host [community] [portnum]
trapsink 192.168.1.7
# informsink: A SNMPv2c inform (acknowledged trap) receiver
#   arguments: host [community] [portnum]
informsink 192.168.1.15
# trap2sink: A SNMPv2c trap receiver
#   arguments: host [community] [portnum]
trap2sink 192.168.1.7
///////////////////////////////////
    and run snmpd with debug I receive
.......
......
snmp_clean_persistent:  removing old config file: /var/net-snmp/snmpd.0.conf
trace: netsnmp_send_traps(): agent_trap.c, 616:
trap: send_trap 0 0 NET-SNMP-MIB::netSnmpAgentOIDs.10trace: netsnmp_send_traps(): agent_trap.c, 618:
trap:
trace: snmp_call_callbacks(): callback.c, 209:
callback: START calling callbacks for maj=1 min=6
trace: snmp_call_callbacks(): callback.c, 223:
callback: calling a callback for maj=1 min=6
trace: send_notifications(): notification/snmpNotifyTable.c, 95:
send_notifications: starting: pdu=8086740, vars=0
Segmentation fault

What error I had and How can I fix it?

Thanks for all

Send instant messages to your online friends http://au.messenger.yahoo.com --0-1456742139-1167744809=:55876--