Hi Dave

I have read many RowStatus documentations and still not sure how to use
it.

My tables are actually kept in kernel, and not in agent itself and I use
"mib2c.raw-table.conf" to create their structure in mib2c.

After adding RowStatus column, mib2c created a c file with variables
with the names "xxxxxNotifyRowStatus" and "old_xxxxxNotifyRowStatus" but
without any type. I tried to define it as long - but still had issues. 
The value of the status is all rows is "0", which is not defined if I am
not mistaken. Setting it to other value cause TimeOut error.

Is there an example C file for such case? 

Thank you.
Naama


-----Original Message-----
From: dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] On Behalf Of
Dave Shield
Sent: Monday, July 23, 2012 10:35 AM
To: Naama Bar Menachem
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: How to delete/add line from raw table?

On 22 July 2012 06:54, Naama Bar Menachem
<naama.barmenac...@novelsat.com> wrote:
> Is there an example code?

Many of the tables under 'agent/mibgroup' include support for a
RowStatus column.   As does the template code generated by 'mib2c'.


> I did not understand how a "RowStatus" would help me provide the user 
> with the option to delete/add rows to a table.

That is the whole purpose of the RowStatus textual convention!
  Have you read the MIB definition of this type?
There is a long, long description clause, that explains exactly how a
user can use it to add/remove rows from the table.


> And what do you mean by " depends on how the MIB table is defined"?

You haven't said anything about what MIB table(s) you are implementing.
Whether these are tables that you have defined yourself, or whether you
are working with something that someone else has provided.

If the table is defined to include a RowStatus column, then this can be
used to add/delete rows.
   If it's defined without such a column, then the description of the
table needs to state how (and whether!) rows can be added or removed.

  For example, the TCP-MIB::tcpConnectionTable does not have a RowStatus
column, but the definition of the tcpConnectionState object describes
how it can be used to terminate a connection (and hence remove a row
from the table).
  You can't create a new row in this table via SNMP - since that would
imply creating a new connection between two arbitrary network ports.
That doesn't really make sense - so isn't supported in the table.

  Always remember - the SNMP information is designed to mimic the
underlying state of the computer your are trying to manage.   If one
side of this changes, that needs to trigger an equivalent change in the
other
   System->SNMP is no problem - just refresh the data being reported.
But SNMP->System implies a lot more work, and is not always possible.

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to