--===============0804591861==
Content-Type: multipart/alternative; boundary="0-453967292-1170236907=:63434"
Content-Transfer-Encoding: 8bit

--0-453967292-1170236907=:63434
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit

> netsnmp_variable_list *
> exampleTable_get_first_data_point(...)
> {
> *my_loop_context = 0;
> return exampleTable_get_next_data_point(...);
> }


> netsnmp_variable_list *
> exampleTable_get_next_data_point(...)
> {
> int i = (int) *my_loop_context; // i.e. 0
> snmp_set_var_value(put_index_data, exampleTable_head[i].userIndex,...);
> *my_data_context = (void *) &exampleTable_head[i];

// i is still 0
> *my_loop_context = (void *) ++i; // i becomes 1
> return put_index_data;
> }


So the first row to be returned should be exampleTable_head[0]

Is that what you are seeing, or not?
It's not totally clear what you mean by an "empty row".

What is the exact data you are working with?
(i.e. the contents of the exampleTable_head array)
What results do you actually see?
(exact output please)

Dave
The exact data I am working with:

#define TABLESIZE 3
struct exampleTable_entry exampleTable_head[TABLESIZE] =
{/*int,char,int,int*/
{6, 'A', 100, 100},
{10, 'A', 100, 100},
{11, 'A', 100, 100}
};

Results I actually see when snmptable:

userIndex userStatus check monSet
0 0 0
6 A 100 100
10 A 100 100
11 A 100 100

The empty row i means is just as above:it is a additional row with system-initial datas.
Thank you very much for your help!

Best regards,
zhou


---------------------------------
עŻ-3.5G20M
--0-453967292-1170236907=:63434
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit

> netsnmp_variable_list *
> exampleTable_get_first_data_point(...)
> {
> *my_loop_context = 0;
> return exampleTable_get_next_data_point(...);
> }

> netsnmp_variable_list *
> exampleTable_get_next_data_point(...)
> {
> int i = (int) *my_loop_context; // i.e. 0
> snmp_set_var_value(put_index_data, exampleTable_head[i].userIndex,...);
> *my_data_context = (void *) &exampleTable_head[i];
// i is still 0
> *my_loop_context = (void *) ++i; // i becomes 1
> return put_index_data;
> }

So the first row to be returned should be exampleTable_head[0]

Is that what you are seeing, or not?
It's not totally clear what you mean by an "empty row".

What is the exact data you are working with?
(i.e. the contents of the exampleTable_head array)
What results do you
actually see?
(exact output please)

Dave
The exact data I am working with:
 
#define TABLESIZE 3
struct exampleTable_entry exampleTable_head[TABLESIZE] =
{/*int,char,int,int*/
 {6, 'A', 100, 100},
 {10, 'A', 100, 100},
 {11, 'A', 100, 100}
};
Results I actually see when snmptable:
 
userIndex userStatus  check  monSet
           0                           0            0

           6                A      100         100
         10                A      100        1 00
         11                A      100        100
 
The empty row i means is just as above:it is a additional row with system-initial datas.
Thank you very much for your help!
 
Best
regards,
zhou



עŻ-3.5G20M
--0-453967292-1170236907=:63434--


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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
--===============0804591861==
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

--===============0804591861==--