I've found several problems (and made some improvements) to mib2c.iterate.conf for 5.3:
- a return was missing from _get_next_data_point
- the LL head needs to be init to zero (or static)
- the column data fields don't have array syntax and _len fields as needed (like table_data)
- the snmp_set_var_value call is wrong for integers
- other snmp_set_var_* calls need to be different for array data (like table_data)
Here's a diff of my changes:
85c85
< table_info->min_column = XXX; /* lowest _accessible_ column (OID suffix) */
---
> table_info->min_column = XXX;
109,112d108
< @if $idx.needlength@
< $idx.decl $idx[NNN];
< size_t ${idx}_len;
< @else@
114d109
< @end@
120,123d114
< @if $c.needlength@
< $c.decl $c[NNN];
< size_t ${c}_len;
< @else@
125d115
< @end@
128,131d117
< @if $c.needlength@
< $c.decl old_$c[NNN];
< size_t old_${c}_len;
< @else@
133d118
< @end@
144c129
< static struct ${i}_entry *${i}_head;
---
> struct ${i}_entry *${i}_head;
246,251c231,232
< @if $c.needlength@
< snmp_set_var_typed_integer( idx, $idx.type, (u_char*) entry->${idx}, entry->${idx}_len );
< @else@
< snmp_set_var_typed_integer( idx, $idx.type, entry->${idx} );
< @end@
< idx = idx->next_variable; /* can delete for last idx */
---
> snmp_set_var_value( idx, entry->${idx}, sizeof(entry->${idx}) );
> idx = idx->next_variable;
255d235
< return put_index_data;
288d267
< @if $c.needlength@
290,294c269,271
< (u_char*)table_entry->$c,
< table_entry->${c}_len);
< @else@
< snmp_set_var_typed_integer( request->requestvb, $c.type,
< table_entry->$c);
---
> table_entry->$c,
> sizeof(table_entry->$c));
> break;
297d273
< @end@
