Problem with multiple get

"girish" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
hi all,I'm using agent-subagent mode. In my subagent code i've a call back function where it will use snmp_set_var_typed_value function to respondto the master agent for snmpget operation. And I've used this as follows:case TYPE_STRING:&nbsp;&nbsp;&nbsp;&nbsp; snmp_set_var_typed_value(requestvb,ASN_OCTET_STR,(u_char *) ptrint, str_len);&nbsp;&nbsp;&nbsp;&nbsp; break;case TYPE_INT:&nbsp;&nbsp;&nbsp;&nbsp; snmp_set_var_typed_value(requestvb,ASN_INTEGER, (u_char *) ptrint, sizeof(INT));&nbsp;&nbsp;&nbsp;&nbsp; break;&nbsp;&nbsp;&nbsp; &nbsp;I'm able to get single attributes properly. But whenever I try getting multiple attributes then this gives some problem as:MY-MIB::MyLabel.0 = Wrong Type (should be OCTET STRING): INTEGER: 1BSR-MIB::MyId.0 = INTEGER: 1(The set operation is happening proper
 ly.)The 1st object always displays wrong type. By debugging I found that once the response comes to subagent(for the 1st attribute)the types and the values are proper. After calling the snmp
 _set_var_typed_value function once again it comes to this section of code where it recieves response for the 2nd attribute. For the 2nd attribute also the type and the values are proper. But when it comes for the displaying the response its giving the above error in the master agent side.What could be wrong in this case..??? Please give some inputs. 

Regards,
Girish

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.