If I do not set the value myself, I am unable to see
the value added by build_snmp_pdu call. The
documentation says this agent_addr is for v1 traps and
since I send out v2c traps, is it possible it is
ignoring this value.

Thanks.
/Shobana
--- Dave Shield <[EMAIL PROTECTED]> wrote:
> On Mon, 2005-04-18 at 15:55, Shobana Sampath wrote:
> > When I try to set the agent-addr using the code
> below,
> > I get the following error:
> 
> > I use the following code to add the agent-addr:
> > cp = asn_build_string(cp, out_length,
> >                     (u_char) (ASN_IPADDRESS |
> > ASN_PRIMITIVE),
> >                      (u_char *) pdu->agent_addr,
> 4);
> 
> But why on earth are you messing about with the code
> to build the packet in the first place?   The
> library
> already handles this.   If you tell it to add the
> same
> value twice, then it's not surprising if it throws
> an error!
> 
> All you have to do is set the required value
> in the 'agent_addr' field of the PDU structure.
> The library will do the rest.
> 
> Dave
> 
> 


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 


-------------------------------------------------------
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