I created a table (called localogTable) using mib2c. It works well when I
try to read values from it, but I keep getting log-error messages when doing
a SET operation. And the funny thing is, the SET operation works without any
problem (sans the log, of course!). This is the error message I get,
# snmpd -f -Lo
Created directory: /var/net-snmp
NET-SNMP version 5.6
unknown column 1 in _locallogTable_container_col_save
unknown column 1 in _locallogTable_container_col_save
I traced through and found the relevent function in a file called
"locallogTable_interface.c". Near the top of the file you'll find this line
as part of the comments - "THIS FILE DOES NOT CONTAIN ANY USER EDITABLE
CODE". I'm not really sure how the logic in the file works, but my "log
error" came from this for-loop (from function
_locallogTable_container_row_save() ),
for(i = LOCALLOGTABLE_MIN_COL; i <= LOCALLOGTABLE_MAX_COL; ++i ) {
Some tracing back, and I find that the static variables are defined in
"locallogTable_oids.h". Here is the snippet from said file,
#define COLUMN_LOCALLOGTARGET 1
#define COLUMN_LOCALLOGSEVERITY 2
#define COLUMN_LOCALLOGSEVERITY_FLAG (0x1 << 0)
#define COLUMN_LOCALLOGSTATUS 3
#define COLUMN_LOCALLOGSTATUS_FLAG (0x1 << 1)
#define LOCALLOGTABLE_MIN_COL COLUMN_LOCALLOGTARGET
#define LOCALLOGTABLE_MAX_COL COLUMN_LOCALLOGSTATUS
Now, while "locallogtarget" is a part of the table I created, it's also the
table index. From what I deduce, the log-error should vanish if I redefine
"LOCALLOGTABLE_MIN_COL" to point to "COLUMN_LOCALLOGSEVERITY".
I haven't tested it yet, but I wanted to ask - is there a reason for
including the index as part of the looping ? Or is this some limit-case for
mib2c with regards to Tables ?
Puzzled and curious,
Abraham V.
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders