RE: SNMP Set is getting Failed
"Kumar Sanjay-XJD784" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks Dave
Now I am able to do the SNMPSET operation
[RESERVE1 is not required until data is currect in snmpset request]
But I am facing a new problem =>>>
SET request is modifying the "existing row" instead of adding a new
enrty ?
I feel, I am making some mistake while adding the new entry in RESERVE2
====>>>
struct ccAuditLoggingCfgTable_entry *table_row = NULL;
==>>table_row is locally defined in _handler function
if (table_row) {
netsnmp_insert_iterator_context(request,
table_row);
} else {
Any input ??
Thanks,
Sanjay
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dave Shield
Sent: Tuesday, January 18, 2011 4:57 PM
To: Kumar Sanjay-XJD784
Cc: Net-snmp-users
Subject: Re: SNMP Set is getting Failed
On 18 January 2011 10:57, Kumar Sanjay-XJD784
<[email protected]> wrote:
> I am able to get the correct "table_info"
> but "table_entry" is NULL
Yes.
Remember, 'table_entry' points to the row of the table (as it stands
*before* processing the request) that the request is referring to.
Now, think about what you are doing here.
You are trying to create a row in the table.
A *NEW* row, not an existing row.
So what will the table look like *before* you've processed the request?
What row structure would you expect this call to return?
(Remembering that it's working with the table as it stands,
i.e. before processing the row creation request, not afterwards)
> Hope function =>> table_entry =
> netsnmp_extract_iterator_context(request);
> Is not able to get the correct table information(indexes and values)
from "request"
> Which are send from snmpset request
No - I strongly suspect that it *is* retrieving the correct index
information from the request.
> I am trying to figure out how extract the table_entry from "request
PDU"
You are missing the point.
What table_entry (i.e. which row) do you expect it to extract?
It can't retrieve a row until that row has first been created.
(which you won't do until the RESERVE2 pass) So why do you expect it
to exist during the RESERVE1 pass?
Dave
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
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