~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to agent/helpers/table_iterator.c

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-05-16 21:01:27 UTC
  • mfrom: (1.2.4) (1.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20130516210127-y6meyeiobdx0131q
Tags: 5.7.2~dfsg-4ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/rules: Don't stop service in runlevels 0 and 6.
  - debian/snmpd.init: LSBify the init script.
  - debian/snmp.preinst, debian/snmp.prerm: Kill any/all processes owned
    by snmp user before install/uninstall.
  - Add apport hook.
* debian/patches/ubuntu-fix-lp-587828.patch: Drop. Fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
 
85
85
#include <net-snmp/net-snmp-config.h>
86
86
 
 
87
#include <net-snmp/net-snmp-features.h>
 
88
#include <net-snmp/net-snmp-includes.h>
 
89
#include <net-snmp/agent/net-snmp-agent-includes.h>
 
90
 
 
91
#include <net-snmp/agent/table_iterator.h>
 
92
 
87
93
#if HAVE_STRING_H
88
94
#include <string.h>
89
95
#else
90
96
#include <strings.h>
91
97
#endif
92
98
 
93
 
#include <net-snmp/net-snmp-includes.h>
94
 
#include <net-snmp/agent/net-snmp-agent-includes.h>
95
 
 
96
99
#include <net-snmp/agent/table.h>
97
100
#include <net-snmp/agent/serialize.h>
98
 
#include <net-snmp/agent/table_iterator.h>
99
101
#include <net-snmp/agent/stash_cache.h>
100
102
 
 
103
netsnmp_feature_child_of(table_iterator_all, mib_helpers)
 
104
 
 
105
netsnmp_feature_child_of(table_iterator_insert_context, table_iterator_all)
 
106
netsnmp_feature_child_of(table_iterator_create_table, table_iterator_all)
 
107
netsnmp_feature_child_of(table_iterator_row_first, table_iterator_all)
 
108
netsnmp_feature_child_of(table_iterator_row_count, table_iterator_all)
 
109
 
 
110
#ifdef NETSNMP_FEATURE_REQUIRE_STASH_CACHE
 
111
netsnmp_feature_require(data_list_get_list_node)
 
112
netsnmp_feature_require(oid_stash_add_data)
 
113
#endif /* NETSNMP_FEATURE_REQUIRE_STASH_CACHE */
 
114
 
101
115
/* ==================================
102
116
 *
103
117
 * Iterator API: Table maintenance
116
130
     *
117
131
     * Time will show whether this is a sensible approach or not.
118
132
     */
 
133
#ifndef NETSNMP_FEATURE_REMOVE_TABLE_ITERATOR_CREATE_TABLE
119
134
netsnmp_iterator_info *
120
135
netsnmp_iterator_create_table( Netsnmp_First_Data_Point *firstDP,
121
136
                               Netsnmp_Next_Data_Point  *nextDP,
136
151
 
137
152
    return iinfo;
138
153
}
 
154
#endif /* NETSNMP_FEATURE_REMOVE_TABLE_ITERATOR_CREATE_TABLE */
139
155
 
 
156
/** Free the memory that was allocated for a table iterator. */
140
157
void
141
158
netsnmp_iterator_delete_table( netsnmp_iterator_info *iinfo )
142
159
{
147
164
        snmp_free_varbind( iinfo->indexes );
148
165
        iinfo->indexes = NULL;
149
166
    }
 
167
    netsnmp_table_registration_info_free(iinfo->table_reginfo);
150
168
    SNMP_FREE( iinfo );
151
169
}
152
170
 
164
182
 *
165
183
 * ================================== */
166
184
 
167
 
/** returns a netsnmp_mib_handler object for the table_iterator helper */
 
185
static netsnmp_iterator_info *
 
186
netsnmp_iterator_ref(netsnmp_iterator_info *iinfo)
 
187
{
 
188
    iinfo->refcnt++;
 
189
    return iinfo;
 
190
}
 
191
 
 
192
static void
 
193
netsnmp_iterator_deref(netsnmp_iterator_info *iinfo)
 
194
{
 
195
    if (--iinfo->refcnt == 0)
 
196
        netsnmp_iterator_delete_table(iinfo);
 
197
}
 
198
 
 
199
void netsnmp_handler_owns_iterator_info(netsnmp_mib_handler *h)
 
200
{
 
201
    netsnmp_assert(h);
 
202
    netsnmp_assert(h->myvoid);
 
203
    ((netsnmp_iterator_info *)(h->myvoid))->refcnt++;
 
204
    h->data_clone = (void *(*)(void *))netsnmp_iterator_ref;
 
205
    h->data_free  = (void(*)(void *))netsnmp_iterator_deref;
 
206
}
 
207
 
 
208
/**
 
209
 * Returns a netsnmp_mib_handler object for the table_iterator helper.
 
210
 *
 
211
 * The caller remains the owner of the iterator information object if
 
212
 * the flag NETSNMP_HANDLER_OWNS_IINFO has not been set, and the created
 
213
 * handler becomes the owner of the iterator information if the flag
 
214
 * NETSNMP_HANDLER_OWNS_IINFO has been set.
 
215
 */
168
216
netsnmp_mib_handler *
169
217
netsnmp_get_table_iterator_handler(netsnmp_iterator_info *iinfo)
170
218
{
181
229
        return NULL;
182
230
 
183
231
    me->myvoid = iinfo;
 
232
    if (iinfo->flags & NETSNMP_HANDLER_OWNS_IINFO)
 
233
        netsnmp_handler_owns_iterator_info(me);
184
234
    return me;
185
235
}
186
236
 
194
244
 *
195
245
 * @param reginfo is a pointer to a netsnmp_handler_registration struct
196
246
 *
197
 
 * @param iinfo is a pointer to a netsnmp_iterator_info struct
 
247
 * @param iinfo A pointer to a netsnmp_iterator_info struct. If the flag
 
248
 * NETSNMP_HANDLER_OWNS_IINFO is not set in iinfo->flags, the caller remains
 
249
 * the owner of this structure. And if the flag NETSNMP_HANDLER_OWNS_IINFO is
 
250
 * set in iinfo->flags, ownership of this data structure is passed to the
 
251
 * handler.
198
252
 *
199
253
 * @return MIB_REGISTERED_OK is returned if the registration was a success.
200
254
 *      Failures are MIB_REGISTRATION_FAILED, MIB_DUPLICATE_REGISTRATION.
205
259
netsnmp_register_table_iterator(netsnmp_handler_registration *reginfo,
206
260
                                netsnmp_iterator_info *iinfo)
207
261
{
 
262
#ifndef NETSNMP_FEATURE_REMOVE_STASH_CACHE
208
263
    reginfo->modes |= HANDLER_CAN_STASH;
 
264
#endif  /* NETSNMP_FEATURE_REMOVE_STASH_CACHE */
209
265
    netsnmp_inject_handler(reginfo,
210
266
                           netsnmp_get_table_iterator_handler(iinfo));
211
267
    if (!iinfo)
236
292
    return netsnmp_request_get_list_data(request, TABLE_ITERATOR_NAME);
237
293
}
238
294
 
 
295
#ifndef NETSNMP_FEATURE_REMOVE_TABLE_ITERATOR_INSERT_CONTEXT
239
296
/** inserts table_iterator specific data for a newly
240
297
 *  created row into a request */
241
298
NETSNMP_INLINE void
300
357
        }
301
358
    }
302
359
}
 
360
#endif /* NETSNMP_FEATURE_REMOVE_TABLE_ITERATOR_INSERT_CONTEXT */
303
361
 
304
362
#define TI_REQUEST_CACHE "ti_cache"
305
363
 
314
372
 
315
373
static void
316
374
netsnmp_free_ti_cache(void *it) {
317
 
    ti_cache_info *beer = it;
 
375
    ti_cache_info *beer = (ti_cache_info*)it;
318
376
    if (!it) return;
319
377
    if (beer->data_context && beer->free_context) {
320
378
            (beer->free_context)(beer->data_context, beer->iinfo);
340
398
        return NULL;
341
399
 
342
400
    /* extract existing cached state */
343
 
    ti_info = netsnmp_request_get_list_data(request, TI_REQUEST_CACHE);
 
401
    ti_info = (ti_cache_info*)netsnmp_request_get_list_data(request, TI_REQUEST_CACHE);
344
402
 
345
403
    /* no existing cached state.  make a new one. */
346
404
    if (!ti_info) {
347
405
        ti_info = SNMP_MALLOC_TYPEDEF(ti_cache_info);
 
406
        if (ti_info == NULL)
 
407
            return NULL;
348
408
        netsnmp_request_add_list_data(request,
349
409
                                      netsnmp_create_data_list
350
410
                                      (TI_REQUEST_CACHE,
400
460
    void           *callback_data_context = NULL;
401
461
    ti_cache_info  *ti_info = NULL;
402
462
    int             request_count = 0;
 
463
#ifndef NETSNMP_FEATURE_REMOVE_STASH_CACHE
403
464
    netsnmp_oid_stash_node **cinfo = NULL;
404
465
    netsnmp_variable_list *old_indexes = NULL, *vb;
405
466
    netsnmp_table_registration_info *table_reg_info = NULL;
406
467
    int i;
407
468
    netsnmp_data_list    *ldata = NULL;
408
 
    
 
469
#endif /* NETSNMP_FEATURE_REMOVE_STASH_CACHE */
 
470
 
409
471
    iinfo = (netsnmp_iterator_info *) handler->myvoid;
410
472
    if (!iinfo || !reginfo || !reqinfo)
411
 
        return SNMPERR_GENERR;
 
473
        return SNMP_ERR_GENERR;
412
474
 
413
475
    tbl_info = iinfo->table_reginfo;
414
476
 
431
493
 
432
494
    /* preliminary analysis */
433
495
    switch (reqinfo->mode) {
 
496
#ifndef NETSNMP_FEATURE_REMOVE_STASH_CACHE
434
497
    case MODE_GET_STASH:
435
498
        cinfo = netsnmp_extract_stash_cache(reqinfo);
436
499
        table_reg_info = netsnmp_find_table_registration_info(reginfo);
437
500
 
438
501
        /* XXX: move this malloc to stash_cache handler? */
439
502
        reqtmp = SNMP_MALLOC_TYPEDEF(netsnmp_request_info);
 
503
        if (reqtmp == NULL)
 
504
            return SNMP_ERR_GENERR;
440
505
        reqtmp->subtree = requests->subtree;
441
506
        table_info = netsnmp_extract_table_info(requests);
442
507
        netsnmp_request_add_list_data(reqtmp,
447
512
        /* remember the indexes that were originally parsed. */
448
513
        old_indexes = table_info->indexes;
449
514
        break;
 
515
#endif /* NETSNMP_FEATURE_REMOVE_STASH_CACHE */
450
516
 
451
517
    case MODE_GETNEXT:
452
518
        for(request = requests ; request; request = request->next) {
453
519
            if (request->processed)
454
520
                continue;
455
521
            table_info = netsnmp_extract_table_info(request);
 
522
            if (table_info == NULL) {
 
523
                /*
 
524
                 * Cleanup 
 
525
                 */
 
526
                if (free_this_index_search)
 
527
                    snmp_free_varbind(free_this_index_search);
 
528
                return SNMP_ERR_GENERR;
 
529
            }
456
530
            if (table_info->colnum < tbl_info->min_column - 1) {
457
531
                /* XXX: optimize better than this */
458
532
                /* for now, just increase to colnum-1 */
463
537
                request->processed = TABLE_ITERATOR_NOTAGAIN;
464
538
            }
465
539
 
466
 
            ti_info =
 
540
            ti_info = (ti_cache_info*)
467
541
                netsnmp_request_get_list_data(request, TI_REQUEST_CACHE);
468
542
            if (!ti_info) {
469
543
                ti_info = SNMP_MALLOC_TYPEDEF(ti_cache_info);
 
544
                if (ti_info == NULL) {
 
545
                    /*
 
546
                     * Cleanup 
 
547
                     */
 
548
                    if (free_this_index_search)
 
549
                        snmp_free_varbind(free_this_index_search);
 
550
                    return SNMP_ERR_GENERR;
 
551
                }
470
552
                netsnmp_request_add_list_data(request,
471
553
                                              netsnmp_create_data_list
472
554
                                              (TI_REQUEST_CACHE,
484
566
     */
485
567
    if (reqinfo->mode == MODE_GET ||
486
568
        reqinfo->mode == MODE_GETNEXT ||
487
 
        reqinfo->mode == MODE_GET_STASH ||
488
 
        reqinfo->mode == MODE_SET_RESERVE1) {
 
569
        reqinfo->mode == MODE_GET_STASH
 
570
#ifndef NETSNMP_NO_WRITE_SUPPORT
 
571
        || reqinfo->mode == MODE_SET_RESERVE1
 
572
#endif /* NETSNMP_NO_WRITE_SUPPORT */
 
573
        ) {
489
574
        /*
490
575
         * Count the number of request in the list,
491
576
         *   so that we'll know when we're finished
555
640
                    if (request->processed)
556
641
                        continue;
557
642
 
558
 
                    /* XXX: store in an array for faster retrival */
 
643
                    /* XXX: store in an array for faster retrieval */
559
644
                    table_info = netsnmp_extract_table_info(request);
 
645
                    if (table_info == NULL) {
 
646
                        /*
 
647
                         * Cleanup 
 
648
                         */
 
649
                        if (free_this_index_search)
 
650
                            snmp_free_varbind(free_this_index_search);
 
651
                        netsnmp_free_request_data_sets(reqtmp);
 
652
                        SNMP_FREE(reqtmp);
 
653
                        return SNMP_ERR_GENERR;
 
654
                    }
560
655
                    coloid[reginfo->rootoid_len + 1] = table_info->colnum;
561
656
 
562
 
                    ti_info =
 
657
                    ti_info = (ti_cache_info*)
563
658
                        netsnmp_request_get_list_data(request, TI_REQUEST_CACHE);
564
659
 
565
660
                    switch(reqinfo->mode) {
566
661
                    case MODE_GET:
 
662
#ifndef NETSNMP_NO_WRITE_SUPPORT
567
663
                    case MODE_SET_RESERVE1:
 
664
#endif /* NETSNMP_NO_WRITE_SUPPORT */
568
665
                        /* looking for exact matches */
569
666
                        build_oid_noalloc(myname, MAX_OID_LEN, &myname_len,
570
667
                                          coloid, coloid_len, index_search);
571
668
                        if (snmp_oid_compare(myname, myname_len,
572
669
                                             request->requestvb->name,
573
670
                                             request->requestvb->name_length) == 0) {
574
 
                            /* keep this */
575
 
                            netsnmp_iterator_remember(request,
576
 
                                                      myname, myname_len,
577
 
                                                      callback_data_context,
578
 
                                                      callback_loop_context, iinfo);
 
671
                            /* 
 
672
                             * keep this
 
673
                             */
 
674
                            if (netsnmp_iterator_remember(request,
 
675
                                                          myname,
 
676
                                                          myname_len,
 
677
                                                          callback_data_context,
 
678
                                                          callback_loop_context,
 
679
                                                          iinfo) == NULL) {
 
680
                                /*
 
681
                                 * Cleanup 
 
682
                                 */
 
683
                                if (free_this_index_search)
 
684
                                    snmp_free_varbind
 
685
                                        (free_this_index_search);
 
686
                                netsnmp_free_request_data_sets(reqtmp);
 
687
                                SNMP_FREE(reqtmp);
 
688
                                return SNMP_ERR_GENERR;
 
689
                            }
579
690
                            request_count--;   /* One less to look for */
580
691
                        } else {
581
692
                            if (iinfo->free_data_context && callback_data_context) {
585
696
                        }
586
697
                        break;
587
698
 
 
699
#ifndef NETSNMP_FEATURE_REMOVE_STASH_CACHE
588
700
                    case MODE_GET_STASH:
589
701
                        /* collect data for each column for every row */
590
702
                        build_oid_noalloc(myname, MAX_OID_LEN, &myname_len,
612
724
                            table_info->colnum = i;
613
725
                            vb = reqtmp->requestvb =
614
726
                                SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
 
727
                            if (vb == NULL) {
 
728
                                /*
 
729
                                 * Cleanup 
 
730
                                 */
 
731
                                if (free_this_index_search)
 
732
                                    snmp_free_varbind
 
733
                                        (free_this_index_search);
 
734
                                return SNMP_ERR_GENERR;
 
735
                            }
615
736
                            vb->type = ASN_NULL;
616
737
                            snmp_set_var_objid(vb, myname, myname_len);
617
738
                            netsnmp_call_next_handler(handler, reginfo,
627
748
                        }
628
749
                        reqinfo->mode = MODE_GET_STASH;
629
750
                        break;
 
751
#endif  /* NETSNMP_FEATURE_REMOVE_STASH_CACHE */
630
752
 
631
753
                    case MODE_GETNEXT:
632
754
                        /* looking for "next" matches */
633
755
                        if (netsnmp_check_getnext_reply
634
756
                            (request, coloid, coloid_len, index_search,
635
757
                             &ti_info->results)) {
636
 
                            netsnmp_iterator_remember(request,
637
 
                                                      ti_info->results->name,
638
 
                                                      ti_info->results->name_length,
639
 
                                                      callback_data_context,
640
 
                                                      callback_loop_context, iinfo);
 
758
                            if (netsnmp_iterator_remember(request,
 
759
                                                          ti_info->
 
760
                                                          results->name,
 
761
                                                          ti_info->
 
762
                                                          results->
 
763
                                                          name_length,
 
764
                                                          callback_data_context,
 
765
                                                          callback_loop_context,
 
766
                                                          iinfo) == NULL) {
 
767
                                /*
 
768
                                 * Cleanup 
 
769
                                 */
 
770
                                if (free_this_index_search)
 
771
                                    snmp_free_varbind
 
772
                                        (free_this_index_search);
 
773
                                return SNMP_ERR_GENERR;
 
774
                            }
641
775
                            /*
642
776
                             *  If we've been told that the rows are sorted,
643
777
                             *   then the first valid one we find
654
788
                        }
655
789
                        break;
656
790
 
 
791
#ifndef NETSNMP_NO_WRITE_SUPPORT
657
792
                    case MODE_SET_RESERVE2:
658
793
                    case MODE_SET_FREE:
659
794
                    case MODE_SET_UNDO:
660
795
                    case MODE_SET_COMMIT:
661
796
                        /* needed processing already done in RESERVE1 */
662
797
                        break;
 
798
#endif /* NETSNMP_NO_WRITE_SUPPORT */
663
799
 
664
800
                    default:
665
801
                        snmp_log(LOG_ERR,
697
833
                for(request = requests ; request; request = request->next) {
698
834
                    if (request->processed)
699
835
                        continue;
700
 
                    ti_info =
 
836
                    ti_info = (ti_cache_info*)
701
837
                        netsnmp_request_get_list_data(request,
702
838
                                                      TI_REQUEST_CACHE);
703
839
                    if (!ti_info->results) {
722
858
    }
723
859
 
724
860
    if (reqinfo->mode == MODE_GET ||
725
 
        reqinfo->mode == MODE_GETNEXT ||
726
 
        reqinfo->mode == MODE_SET_RESERVE1) {
 
861
        reqinfo->mode == MODE_GETNEXT
 
862
#ifndef NETSNMP_NO_WRITE_SUPPORT
 
863
        || reqinfo->mode == MODE_SET_RESERVE1
 
864
#endif /* NETSNMP_NO_WRITE_SUPPORT */
 
865
        ) {
727
866
        /* per request last minute processing */
728
867
        for(request = requests ; request; request = request->next) {
729
868
            if (request->processed)
730
869
                continue;
731
 
            ti_info =
 
870
            ti_info = (ti_cache_info*)
732
871
                netsnmp_request_get_list_data(request, TI_REQUEST_CACHE);
733
872
            table_info =
734
873
                netsnmp_extract_table_info(request);
759
898
                /* FALL THROUGH */
760
899
 
761
900
            case MODE_GET:
 
901
#ifndef NETSNMP_NO_WRITE_SUPPORT
762
902
            case MODE_SET_RESERVE1:
 
903
#endif /* NETSNMP_NO_WRITE_SUPPORT */
763
904
                if (ti_info->data_context)
764
905
                    /* we don't add a free pointer, since it's in the
765
906
                       TI_REQUEST_CACHE instead */
782
923
        if (reqinfo->mode == MODE_GETNEXT) {
783
924
            reqinfo->mode = MODE_GET;
784
925
        }
 
926
#ifndef NETSNMP_FEATURE_REMOVE_STASH_CACHE
785
927
    } else if (reqinfo->mode == MODE_GET_STASH) {
786
928
        netsnmp_free_request_data_sets(reqtmp);
787
929
        SNMP_FREE(reqtmp);
788
930
        table_info->indexes = old_indexes;
 
931
#endif  /* NETSNMP_FEATURE_REMOVE_STASH_CACHE */
789
932
    }
790
933
 
791
934
 
816
959
 *
817
960
 * ================================== */
818
961
 
 
962
#ifndef NETSNMP_FEATURE_REMOVE_TABLE_ITERATOR_ROW_FIRST
819
963
void *
820
964
netsnmp_iterator_row_first( netsnmp_iterator_info *iinfo ) {
821
965
    netsnmp_variable_list *vp1, *vp2;
834
978
    snmp_free_varbind( vp1 );
835
979
    return ctx2;  /* or *ctx2 ?? */
836
980
}
 
981
#endif /* NETSNMP_FEATURE_REMOVE_TABLE_ITERATOR_ROW_FIRST */
837
982
 
838
983
void *
839
984
netsnmp_iterator_row_get( netsnmp_iterator_info *iinfo, void *row )
945
1090
 
946
1091
    vp1 = snmp_clone_varbind(iinfo->indexes);
947
1092
    vp2 = iinfo->get_first_data_point( &ctx1, &ctx2, vp1, iinfo );
948
 
    DEBUGMSGTL(("table:iterator:get", "first DP: %x %x %x\n",
 
1093
    DEBUGMSGTL(("table:iterator:get", "first DP: %p %p %p\n",
949
1094
                                       ctx1, ctx2, vp2));
950
1095
 
951
1096
    /* XXX - free context ? */
964
1109
        }
965
1110
        
966
1111
        vp2 = iinfo->get_next_data_point( &ctx1, &ctx2, vp2, iinfo );
967
 
        DEBUGMSGTL(("table:iterator:get", "next DP: %x %x %x\n",
 
1112
        DEBUGMSGTL(("table:iterator:get", "next DP: %p %p %p\n",
968
1113
                                           ctx1, ctx2, vp2));
969
1114
        /* XXX - free context ? */
970
1115
    }
994
1139
 
995
1140
    vp1 = snmp_clone_varbind(iinfo->indexes);
996
1141
    vp2 = iinfo->get_first_data_point( &ctx1, &ctx2, vp1, iinfo );
997
 
    DEBUGMSGTL(("table:iterator:get", "first DP: %x %x %x\n",
 
1142
    DEBUGMSGTL(("table:iterator:get", "first DP: %p %p %p\n",
998
1143
                                       ctx1, ctx2, vp2));
999
1144
 
1000
1145
    if ( !instance || !len ) {
1031
1176
        }
1032
1177
        
1033
1178
        vp2 = iinfo->get_next_data_point( &ctx1, &ctx2, vp2, iinfo );
1034
 
        DEBUGMSGTL(("table:iterator:get", "next DP: %x %x %x\n",
 
1179
        DEBUGMSGTL(("table:iterator:get", "next DP: %p %p %p\n",
1035
1180
                                           ctx1, ctx2, vp2));
1036
1181
        /* XXX - free context ? */
1037
1182
    }
1042
1187
    return ( vp2 ? ctx2 : NULL );
1043
1188
}
1044
1189
 
 
1190
#ifndef NETSNMP_FEATURE_REMOVE_TABLE_ITERATOR_ROW_COUNT
1045
1191
int
1046
1192
netsnmp_iterator_row_count( netsnmp_iterator_info *iinfo )
1047
1193
{
1060
1206
        return 0;
1061
1207
    }
1062
1208
    
1063
 
    DEBUGMSGTL(("table:iterator:count", "first DP: %x %x %x\n",
 
1209
    DEBUGMSGTL(("table:iterator:count", "first DP: %p %p %p\n",
1064
1210
                                         ctx1, ctx2, vp2));
1065
1211
 
1066
1212
    /* XXX - free context ? */
1068
1214
    while (vp2) {
1069
1215
        i++;
1070
1216
        vp2 = iinfo->get_next_data_point( &ctx1, &ctx2, vp2, iinfo );
1071
 
        DEBUGMSGTL(("table:iterator:count", "next DP: %x %x %x (%d)\n",
 
1217
        DEBUGMSGTL(("table:iterator:count", "next DP: %p %p %p (%d)\n",
1072
1218
                                             ctx1, ctx2, vp2, i));
1073
1219
        /* XXX - free context ? */
1074
1220
    }
1077
1223
    snmp_free_varbind( vp1 );
1078
1224
    return i;
1079
1225
}
 
1226
#endif /* NETSNMP_FEATURE_REMOVE_TABLE_ITERATOR_ROW_COUNT */
1080
1227
 
1081
1228
 
1082
1229
/* ==================================