Re: Setting the sender address in outgoing SNMP trap packets

This is a discussion on Re: Setting the sender address in outgoing SNMP trap packets within the SNMP Coders forums, part of the Networking and Network Related category; If I do not set the value myself, I am unable to see the value added by build_snmp_pdu call. The ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-21-2005
Shobana Sampath
 
Posts: n/a
Default Re: Setting the sender address in outgoing SNMP trap packets

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 <D.T.Shield@csc.liv.ac.uk> 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/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0