This is a discussion on about snmpset and data_set.c notification.c within the SNMP Users forums, part of the Networking and Network Related category; --===============0026157094== Content-Type: multipart/alternative; boundary="----=_Part_101897_22757047.1165980520816" ------=_Part_101897_22757047.1165980520816 Content-Type: text/plain; charset=ISO-8859-1; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============0026157094==
Content-Type: multipart/alternative; boundary="----=_Part_101897_22757047.1165980520816" ------=_Part_101897_22757047.1165980520816 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear Dave: I am Clement. when I try to develop my own mib, I found I do not realize the c template after mib2c, why you using switch (reqinfo->mode) switch (reqinfo->mode) { case MODE_GET: case MODE_SET_RESERVE1 case MODE_SET_RESERVE2: case MODE_SET_FREE case MODE_SET_ACTION: case MODE_SET_COMMIT: case MODE_SET_UNDO } I don't understand what these cases do , and how to apply these to write my own function call even I have read snmpdemoapp and asyncapp, I still confused deeply. Take data_set.c for instance , the code structure seems different, it does not contains the above switch...case..., instead, I saw many API such like netsnmp_create_table_data_set, . ... and so on. In this situation, I don't know how to develop my own mib. Furthermore, the notification.c declare oid and oid_length first, but in snmpdemoapp, the first thing to do is creating snmp_session, then snmp_pdu, and variable_list. It looks like the session and pdu can be passed over, but that also make me more confused. Can you give me any advice about these problems? Any suggestion is high appreciated, thank you very much. Best Regards, Clement Hsu ------=_Part_101897_22757047.1165980520816 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear Dave:<br><br>I am Clement. when I try to develop my own mib, I found I do not <br>realize the c template after mib2c, why you using switch (reqinfo->mode)<br><br> switch (reqinfo->mode) {<br><br> case MODE_GET: <br><br> <br> case MODE_SET_RESERVE1<br><br> case MODE_SET_RESERVE2:<br><br> case MODE_SET_FREE<br><br> case MODE_SET_ACTION:<br><br> case MODE_SET_COMMIT:<br><br> case MODE_SET_UNDO<br> <br> } <br><br>I don't understand what these cases do , and how to apply these to write my own function call<br>even I have read snmpdemoapp and asyncapp, I still confused deeply. Take data_set.c for instance , <br>the code structure seems different, it does not contains the above switch...case..., instead, I saw many <br>API such like netsnmp_create_table_data_set, . ... and so on. In this situation, I don't know how to <br>develop my own mib. <br><br>Furthermore, the notification.c declare oid and oid_length first, but in snmpdemoapp, the first thing to do <br>is creating snmp_session, then snmp_pdu, and variable_list. It looks like the session and pdu can be <br>passed over, but that also make me more confused. Can you give me any advice about these problems?<br>Any suggestion is high appreciated, thank you very much. <br><br>Best Regards,<br>Clement Hsu<br><br> <br> ------=_Part_101897_22757047.1165980520816-- --===============0026157094== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?p...rge&CID=DEVDEV --===============0026157094== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0026157094==-- |