On 23 July 2012 16:48, Naama Bar Menachem
<naama.barmenac...@novelsat.com> wrote:
> I have a table with 4 indices, 3 of them are of type ipAddress


> On the “get-next” function
>
> * I receive the indices
> * get the information from server
> * updated the table’s row
> *updated the indices (idx->val.integer) with new value (next)

I've only had a very quick look, but it appears that you're updating
all four of the new index values:

>                     idx = indexes;
>                     *(idx->val.integer) = key_pointer->dest_ip;
>                     idx = idx->next_variable;
>                     *(idx->val.integer) = key_pointer->dest_subnet;
>                     idx = idx->next_variable;
>                     *(idx->val.integer) = key_pointer->next_hop_ip;
>                     idx = idx->next_variable;
>                     *(idx->val.integer) = key_pointer->table_id;


 but then building the response OID with only one of them:


>                     build_space_len = reginfo->rootoid_len;
>                     build_space[build_space_len++] = 1; /* entry */
>                     build_space[build_space_len++] = column;    /* column */
>                     build_oid_noalloc(build_space + build_space_len,
>                                       MAX_OID_LEN - build_space_len, 
> &index_oid_len,
>                                       NULL, 0, indexes);

   I would have thought you need to extend the OID to include the
values of the subnet, next hop and table ID as well.

>                     snmp_set_var_objid(request->requestvb, build_space,
>                                        build_space_len + index_oid_len);


Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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/listinfo/net-snmp-users

Reply via email to