traps (send_v2trap()) and AgentX sub-agents

"jeff magder" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Has anyone ever successfully sent a trap from an AgentX sub-agent on the
NetSNMP platform?  For whatever reason, whenever I call sent_v2trap(), no
trap is sent.  To check, I have been capturing IP packets with tcpdump.
When I start up NetSNMP, I notice the following packet:

# tcpdump -XX -vvv -i lo
tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
16:35:46.139710 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP
(17), length: 128) localhost.33253 > localhost.snmp-trap:  { SNMPv2c
C=publicThree { V2Trap(80) R=1219153473  system.sysUpTime.0=32 [|snmp] } }
        0x0000:  0000 0000 0000 0000 0000 0000 0800 4500  ..............E.
        0x0010:  0080 0000 4000 4011 3c6b 7f00 0001 7f00  ....@.@.<k......
        0x0020:  0001 81e5 00a2 006c fe7f 3062 0201 0104  .......l..0b....
        0x0030:  0b70 7562 6c69 6354 6872 6565 a750 0204  .publicThree.P..
        0x0040:  48aa ce41 0201 0002 0100 3042 300d 0608  H..A......0B0...
        0x0050:  2b06 0102 0101 0300 4301 2030 1706 0a2b  +.......C..0...+

That packet is generated by the NetSNMP master agent (snmpd) upon startup.
However, when my AgentX subagent calls send_v2trap(), there is no indication
of it.  I am certain that normal AgentX functionality is working in my
application, as I am able to query many OIDs which my application has
implemented.   Is there somewhere I am supposed to configure a given AgentX
subagent to send its traps to a a particular destination?  My current
configuration file for the subagent contains the following single line:

agentXSocket tcp:localhost:705

Since no packets are being sent out on the localhost:705 interface, I won't
bother posting my master agent snmpd.conf configuration.  My current
assumption is that all AgentX traffic (including traps) is supposed to be
sent out on localhost:705 as shown above.   But obviously my assumptions are
wrong somewhere. :-)

Many thanks for whatever help anyone can offer.

Cheers!

- JM

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.