Thanks Dave,
I ran my sub agent through GDB and it seems program falls at memcpy() from
/lib/libc.so.6(get SIGSEGV signal) which gets call by memdup and memdup by
net_snmp_table_set_add_default_row(table_set=0x869f138,column=13760608,type =
Variable "type" is not variable) at table_dataset.c
Any idea what might cause that?
At below I added the code
Thanks and Regards,
Reza
:
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "dot3ChannelInfo1Table.h"
/** Initialize the dot3ChannelInfo1Table table by defining its contents and
how it's structured */
void
initialize_table_dot3ChannelInfo1Table(void)
{
static oid dot3ChannelInfo1Table_oid[] =
{ 1, 3, 6, 1, 4, 1, 16735, 21, 4, 1 };
size_t dot3ChannelInfo1Table_oid_len =
OID_LENGTH(dot3ChannelInfo1Table_oid);
netsnmp_table_data_set *table_set;
netsnmp_table_row *row;
/*
* create the table structure itself
*/
table_set = netsnmp_create_table_data_set("dot3ChannelInfo1Table");
/*
* comment this out or delete if you don't support creation of new rows
*/
table_set->allow_creation = 1;
printf ("111111111111 \n");
/***************************************************
* Adding indexes
*/
DEBUGMSGTL(("initialize_table_dot3ChannelInfo1Table",
"adding indexes to table dot3ChannelInfo1Table\n"));
netsnmp_table_set_add_indexes(table_set, /* index: dot3CitIndex */
ASN_INTEGER);
printf ("bbbbbbbbbbbbbbbbb \n");
DEBUGMSGTL(("initialize_table_dot3ChannelInfo1Table",
"adding column types to table dot3ChannelInfo1Table\n"));
netsnmp_table_set_multi_add_default_row(table_set,
COLUMN_DOT3CITINDEX, 0,
NULL, 0,
COLUMN_DOT3CITCHANNELNUMBER,
ASN_INTEGER, 0, NULL, 0,
COLUMN_DOT3CITDATARATE,
ASN_INTEGER, 0, NULL, 0,
COLUMN_DOT3CITTXPOWER,
ASN_INTEGER, 0, NULL, 0, 0);
Note: forwarded message attached.
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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