On 20/09/06, Toth, Gregory S <[EMAIL PROTECTED]> wrote:
> I got it to work finally. For some reason, doing the snprintf as
> described in my previous post did not always work:
>
> snprintf(this_index, strlen((char *)*my_loop_context),
>"%s",(const char*)*my_loop_context);
I doubt it's
{
return NULL;
}
-Original Message-
From: Toth, Gregory S
Sent: Tuesday, September 19, 2006 1:48 PM
Cc: [email protected]
Subject: RE: How to index a table with a string
That worked better for the bookTable_get_first_data_point method. Now I
am trying
On 20/09/06, Daniel Chuang <[EMAIL PROTECTED]> wrote:
> netsnmp_table_helper_add_indexes(table_info,
>ASN_OCTET_STR, /* index: ExampleDataName */
>0);
> How can you use 'IMPLIED" index without the len before it ?
ASN_PRIV_IMPLIED_OCTE
One extra question related to this one, when I registered
the index with:
netsnmp_table_helper_add_indexes(table_info,
ASN_OCTET_STR, /* index: ExampleDataName */
0);
It will always append the length of string before the oid
when it is be
On 19/09/06, Toth, Gregory S <[EMAIL PROTECTED]> wrote:
> bookTable_get_first_data_point()
> {
> char this_index[SPRINT_MAX_LEN] = "title1";
which is a local variable, and so the memory will be discarded when
the routine exits.
> *my_loop_context = (void *)this_index;
> *my_data_
to increment to the next datapoint.
-Original Message-
From: Dave Shield [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 19, 2006 11:08 AM
To: Toth, Gregory S
Cc: [email protected]
Subject: Re: How to index a table with a string
On 19/09/06, Toth, Gregory S <[EMAIL PRO
On 19/09/06, Toth, Gregory S <[EMAIL PROTECTED]> wrote:
> char this_index[SPRINT_MAX_LEN] = "title1";
> snmp_set_var_value(vptr, (u_char *) &this_index ,
>sizeof(this_index) );
try
snmp_set_var_value( vptr, this_index, strlen(this_index));
The size of 'thi
Title: Message
I am attempting to implement a mib module where there
is a table indexed by a string (version 5.0.6). For demo purposes, it is
currently a table of books indexed by titles.
I have attempted to implement the
bookTable_get_first_data_point and bookTable_get_next_data_point metho