RE: Community string field in netsnmp-session structure gettingcorrupted.

<[email protected]>
Newsgroups gmane.network.net-snmp.devel,gmane.network.net-snmp.user
Message-ID <[email protected]>
Yes I did it . I also did a printing of the   session variables before
snmp_open and it was printing correctly but 
When I passed it to snmp_open and tried printing the variables there I
got NULL for trap community string and 
0 for trap community length.

-----Original Message-----
From: Roy M. Silvernail [mailto:[email protected]] 
Sent: Wednesday, March 26, 2008 6:28 PM
To: Singh Rajendra (WT01 - TES-Enterprise Networks)
Cc: [email protected];
[email protected]
Subject: Re: Community string field in netsnmp-session structure
gettingcorrupted.

On Wed, Mar 26, 2008 at 05:57:54PM +0530, [email protected]
wrote:
> Hi all,
> I am calling snmp_open(&session) in a C++ function. Before passing 
> session variable to snmp_open I have initialized it properly with the 
> value of peer name , version , community string. But if I print it 
> inside snmp_open() I am getting NULL for community string field but 
> for others ie version and peername I am getting the proper value. Can 
> you please think of something which I might be doing incorrectly ? 
> Thank you for your valuable time.

Did you remember to set the session.community_len member to the length
of the community string?
--
Roy M. Silvernail is [email protected], and you're not
   "A desperate disease requires a dangerous remedy."
                   - Guy Fawkes
            http://www.rant-central.com


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
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.