I tried to add a varbind to set the snmpTrapAddress,
but no luck, the resulting pdu does not have the
agent_address set as they say in the RFC:

oid objid_snmpTrapAddress[] = { 1, 3, 6, 1, 6, 3, 18,
1, 3, 0 };     
snmp_add_var(pdu, objid_snmpTrapAddress,
             sizeof(objid_snmpTrapAddress) /
sizeof(oid), 'a', "10.86.160.102");

Thanks.
/Shobana

--- Dave Shield <[EMAIL PROTECTED]> wrote:
> On Thu, 2005-04-21 at 18:14, Shobana Sampath wrote:
> > The documentation says this agent_addr is for v1
> traps
> > and since I send out v2c traps
> 
> Well, SNMPv2 traps don't have the same structure as
> v1
> traps, so there isn't an 'agent_addr' header field
> at all.
> Inserting one would immediately break every SNMP
> trap
> handler on the planet!
> 
> Instead, SNMPv2 traps indicate the address of the
> trap
> generator by means of an additional
> 'snmpTrapAddress.0'
> varbind, appended to the main varbind list.
> 
> See RFC 3584 for details.
> 
> 
> Dave
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to