[AGENT++]how to differentiate the GET and SET

益泸 欧 oyljerry at hotmail.com
Thu Jul 22 08:36:40 CEST 2004


hi all
  I have used the consoleExamples in the snmp++,and i compiled a simple 
program in msvc6(proxy.exe)  some code as below:
switch (req->get_type()) {
		   case (sNMP_PDU_GET): {
			   cout<<"your request is GET"<<endl;
			   break;
				}
		   case (sNMP_PDU_GETNEXT): {
               cout<<"your request is GETNEXT"<<endl;
               break;
				}
           case (sNMP_PDU_GETBULK): {
		       cout<<"your request is GETBULK"<<endl;
		       break;
				}
		   case (sNMP_PDU_SET): {
		       cout<<"your request is SET"<<endl;
			   break;	
                                          }
}
and when i use the GET to the proxy ,it shows" your request is GET",but 
when i use SET to the proxy ,it also shows "your request is GET". so i am 
puzzled with these
i do not konw whether my code is right or not ? and what should i do to 
differentiate the SNMP request(GET,GETNEXT,SET,GETBULK)?
any help will be appreciated!
                                                                           
Jerry

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  




More information about the AGENTPP mailing list