This is a discussion on Problem with sprint_realloc_iteger() within the SNMP Users forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --------------000307020406030803040508 Content-Type: text/plain; charset=us-ascii; format=flowed Content-...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a multi-part message in MIME format.
--------------000307020406030803040508 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I am implementing ethernetlike interface mib.I compiled the MIB file using mib2c iterate_access.conf. I have used ioctl calls to fetch the data and it is set in the get_first_data_item and get_next_data_item. The problem is, when i use snmptable command, the code fails at sprintf() statement in the sprint_realloc_integer() function. case MODE_GET: switch (table_info->colnum) { case COLUMN_DOT3STATSINDEX: { long *index; size_t len; index = getIndex(data_context,&len); smp_set_var_typed_value(var, ASN_INTEGER, (u_char *)index ,len); } break; i am using net-snmp version 5.1.3 Thanks, -Rashmi --------------000307020406030803040508 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="adobe-courier-iso10646-1">I am implementing ethernetlike interface mib.</font></font><font size="-1"><font face="adobe-courier-iso10646-1">I compiled the<br> MIB file using mib2c iterate_access.conf. I have used ioctl calls to<br> fetch the data and it is set in the get_first_data_item and get_next_data_item.<br> The problem is, when i use snmptable command, the code fails at<br> sprintf() statement in the sprint_realloc_integer() function.</font></font><font size="-1"><font face="adobe-courier-iso10646-1"> <br> <br> case MODE_GET:<br> &n bsp; switch (table_info->colnum) {<br> &n bsp; case COLUMN_DOT3STATSINDEX:<br> {<br> long *index;<br> size_t len;<br> index = getIndex(data_context,&len);<br> &n bsp; smp_set_var_typed_value(var, ASN_INTEGER,<br> &n bsp; &nbs p; &n bsp; (u_char *)index<br> &n bsp; &nbs p; &n bsp; ,len);<br> }<br> &n bsp; break;<br> <br> i am using net-snmp version 5.1.3<br> <br> Thanks,<br> -Rashmi</font></font> </body> </html> --------------000307020406030803040508-- ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=...720&dat=121642 _______________________________________________ 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 |