This is a multi-part message in MIME format.

--===============0422607989==
Content-Transfer-Encoding: 7bit
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C8A0B7.6BA8689C"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C8A0B7.6BA8689C
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I have created the following table subagent code. I am able to walk
objects in the table, but if I walk the entire table starting at the top
of the table I get no data returned.
Also, do the functions below work or should I be using the old style
code:
REGISTER_MIB("abc", abc_variables, variable4, variables_oid);
=20
So far I have spent days trying to get a mib walk to work with a very
simple table, using the many different variations of mib2c and nothing I
have done so far works.
=20
Please tell me what I could possibly doing wrong with this setup:
table_set =3D netsnmp_create_table_data_set("sysORTable");
table_set->allow_creation =3D 0;
=20
netsnmp_table_set_add_indexes(table_set, ASN_INTEGER, 0);
netsnmp_table_set_multi_add_default_row(table_set,
COLUMN_SYSORINDEX, ASN_INTEGER, 0, NULL, 0,=20
COLUMN_SYSORID, ASN_OBJECT_ID, 0, NULL, 0,
COLUMN_SYSORDESCR, ASN_OCTET_STR, 0, NULL, 0,=20
COLUMN_SYSORUPTIME, ASN_TIMETICKS, 0, NULL, 0, 0);
table_set->table->store_indexes =3D 1;
netsnmp_register_table_data_set(netsnmp_create_han dler_registration
("sysORTable", NULL,
sysORTable_oid,
OID_LENGTH(sysORTable_oid),
HANDLER_CAN_RONLY), table_set,
NULL);
row =3D netsnmp_create_table_data_row();
sysORIndex =3D 1;
netsnmp_table_row_add_index(row, ASN_INTEGER, &sysORIndex,
sizeof(sysORIndex));
netsnmp_set_row_column(row, COLUMN_SYSORID, ASN_OBJECT_ID,
(u_char *)sysOidSpec[0].id, sysOidSpec[0].len);
netsnmp_set_row_column(row, COLUMN_SYSORDESCR, ASN_OCTET_STR,
sysOidSpec[0].sysOidDesc,
strlen(sysOidSpec[0].sysOidDesc));
netsnmp_set_row_column(row, COLUMN_SYSORUPTIME, ASN_TIMETICKS,
ptr, sizeof(long));
netsnmp_table_dataset_add_row(table_set, row);
sysORIndex =3D 2;
row =3D netsnmp_create_table_data_row();
netsnmp_table_row_add_index(row, ASN_INTEGER, &sysORIndex,
sizeof(sysORIndex));
netsnmp_set_row_column(row, COLUMN_SYSORID, ASN_OBJECT_ID,
(u_char *)sysOidSpec[1].id, sysOidSpec[1].len);
netsnmp_set_row_column(row, COLUMN_SYSORDESCR, ASN_OCTET_STR,
sysOidSpec[1].sysOidDesc,
strlen(sysOidSpec[1].sysOidDesc));
netsnmp_set_row_column(row, COLUMN_SYSORUPTIME, ASN_TIMETICKS,
ptr, sizeof(long));
netsnmp_table_dataset_add_row(table_set, row);
=20
this creates 2 rows - and if I walk sysORDesc I get both rows, if I
start the walk at sysOrEntryTable I get nothing.
=20
Any help would be appreciated.
Thanks,
Joan

------_=_NextPart_001_01C8A0B7.6BA8689C
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable



charset=3Dus-ascii">


I have =
created the=20
following table subagent code. I am able to walk objects in the table, =
but if I=20
walk the entire table starting at the top of the table I get no data=20
returned.


Also, =
do the=20
functions below work or should I be using the old style=20
code:

size=3D2>      REGISTER_MIB("abc", =
abc_variables,=20
variable4, variables_oid);

size=3D2> 

So far =
I have spent=20
days trying to get a mib walk to work with a very simple table, using =
the many=20
different variations of mib2c and nothing I have done so far=20
works.

size=3D2> 

Please =
tell me what=20
I could possibly doing wrong with this setup:

class=3D171160718-17042008>  =20
table_set =3D =
netsnmp_create_table_data_set("sysORTable");
   =20
table_set->allow_creation =3D 0;

 

class=3D171160718-17042008>   =20
netsnmp_table_set_add_indexes(table_set, ASN_INTEGER, =
0);
   =20
netsnmp_table_set_multi_add_default_row(table_set,
   &=
nbsp;        =20
COLUMN_SYSORINDEX, ASN_INTEGER, 0, NULL, 0,=20

           &nb=
sp;=20
COLUMN_SYSORID,    ASN_OBJECT_ID, 0, NULL,=20
0,
           &=
nbsp;=20
COLUMN_SYSORDESCR, ASN_OCTET_STR, 0, NULL, 0,=20

           &nb=
sp;=20
COLUMN_SYSORUPTIME, ASN_TIMETICKS, 0, NULL, 0, 0);
    =

table_set->table->store_indexes =3D 1;
   =20
netsnmp_register_table_data_set(netsnmp_create_han dler_registration
&n=
bsp;           &nb=
sp;           &nbs=
p;          =20
("sysORTable", =20
NULL,
          &nbs=
p;           &nbsp=
;            =
 =20
sysORTable_oid,
         =
            &=
nbsp;           &n=
bsp;  =20
OID_LENGTH(sysORTable_oid),
       =
            &=
nbsp;           &n=
bsp;    =20
HANDLER_CAN_RONLY), table_set, NULL);


size=3D2>    row =3D=20
netsnmp_create_table_data_row();
    sysORIndex =3D=20
1;
    netsnmp_table_row_add_index(row, ASN_INTEGER,=20
&sysORIndex,  sizeof(sysORIndex));

    =
netsnmp_set_row_column(row,=20
COLUMN_SYSORID,=20
ASN_OBJECT_ID,
         &=
nbsp;  =20
(u_char *)sysOidSpec[0].id, sysOidSpec[0].len);
   =20
netsnmp_set_row_column(row, COLUMN_SYSORDESCR,=20
ASN_OCTET_STR,
         &=
nbsp;  =20
sysOidSpec[0].sysOidDesc,=20
strlen(sysOidSpec[0].sysOidDesc));
   =20
netsnmp_set_row_column(row, COLUMN_SYSORUPTIME, =
ASN_TIMETICKS,   =20
ptr, sizeof(long));
   =20
netsnmp_table_dataset_add_row(table_set, row);

    sysORIndex =3D=20
2;
    row =3D=20
netsnmp_create_table_data_row();
   =20
netsnmp_table_row_add_index(row, ASN_INTEGER, =
&sysORIndex,  =20
sizeof(sysORIndex));

    =
netsnmp_set_row_column(row,=20
COLUMN_SYSORID,=20
ASN_OBJECT_ID,
         &=
nbsp;  =20
(u_char *)sysOidSpec[1].id, sysOidSpec[1].len);
   =20
netsnmp_set_row_column(row, COLUMN_SYSORDESCR,=20
ASN_OCTET_STR,
         &=
nbsp;  =20
sysOidSpec[1].sysOidDesc,=20
strlen(sysOidSpec[1].sysOidDesc));
   =20
netsnmp_set_row_column(row, COLUMN_SYSORUPTIME,=20
ASN_TIMETICKS,       ptr,=20
sizeof(long));
    =
netsnmp_table_dataset_add_row(table_set,=20
row);

 

this =
creates 2 rows=20
- and if I walk sysORDesc I get both rows, if I start the walk at=20
sysOrEntryTable I get nothing.

size=3D2> 

Any =
help would be=20
appreciated.

size=3D2>Thanks,

size=3D2>Joan

Overture Networks =
Inc.
The information contained in this message is privileged, confidential, =
and non-binding and is intended for use by the intended recipient or =
entity. All other uses, including distribution to third parties, are =
prohibited. Please notify the sender if you have received this message =
in error.

Thank You,=20
Overture Networks.

------_=_NextPart_001_01C8A0B7.6BA8689C--


--===============0422607989==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757...un.com/javaone
--===============0422607989==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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/...net-snmp-users

--===============0422607989==--