about snmpset and data_set.c notification.c

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; ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-13-2006
Clement Hsu
 
Posts: n/a
Default about snmpset and data_set.c notification.c

--===============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-&gt;mode)<br><br>&nbsp;&nbsp;&nbsp; switch (reqinfo-&gt;mode) {<br><br>&nbsp;&nbsp;&nbsp; case MODE_GET:
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; case MODE_SET_RESERVE1<br><br>&nbsp;&nbsp;&nbsp; case MODE_SET_RESERVE2:<br><br>&nbsp;&nbsp;&nbsp; case MODE_SET_FREE<br><br>&nbsp;&nbsp;&nbsp; case MODE_SET_ACTION:<br><br>&nbsp;&nbsp;&nbsp; case MODE_SET_COMMIT:<br><br>&nbsp;&nbsp;&nbsp; case MODE_SET_UNDO<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }
<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.&nbsp; In this situation, I don't know how to <br>develop my own mib. <br><br>Furthermore, the notification.c&nbsp; 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>&nbsp;<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==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:54 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0