--===============0327910464==
Content-Type: multipart/alternative;
boundary="----=_Part_83372_739728.1156933649985"

------=_Part_83372_739728.1156933649985
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

table_entry = (struct notePCTable_entry *)
netsnmp_extract_iterator_context(request);
table_info = netsnmp_extract_table_info(request)
switch (table_info->colnum)
{
case COLUMN_NOTEPCNAME:
printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCNAME \n");

break;
case COLUMN_NOTEPCNUMBER:
printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCNUMBER \n");
NumberTemp=(int *)request->requestvb->val.integer;
printf("\nNumberTemp=%d\n", NumberTemp);
//here is the problem, NumberTemp can not be printed
properly.Maybebecause it is integer, and if string, it is OK
//I have tried "NumberTemp=(long *)request->requestvb->val.integer;"
the same error
break;
case COLUMN_NOTEPCUSER:
printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCUSER \n");
strcpy(UserTemp, request->requestvb->val.string);//here notePCUser is
string, so it is OK
break;
table_row = notePCTable_createEntry(table_info->indexes->val.string,
NumberTemp, UserTemp);
netsnmp_insert_table_row(request, table_row);


Thank you for your help~


On 8/30/06, Dave Shield wrote:
>
> On 30/08/06, Zhang Chuan wrote:
> > I have gengerated the myTable.c and myTable.h by mib2c.iterate.conf
> > automaticly. And I modified some code to make it can response to "set"

> or
> > "get". But whenever I set a integer value to "myNumber" , the agent can

> not
> > set the exactly value but a very large number.

>
> So what is the code that you've got for handling the SET of myNumber?
>
> Dave
>




--
you jump, I jump,she jump 3

------=_Part_83372_739728.1156933649985
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

table_entry = (struct notePCTable_entry *) netsnmp_extract_iterator_context(request);
  table_info = netsnmp_extract_table_info(request)
           switch (table_info->colnum)
           {
                case COLUMN_NOTEPCNAME:

                 printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCNAME \n");


break;
         case COLUMN_NOTEPCNUMBER:
          printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCNUMBER \n");
   NumberTemp=(int *)request->requestvb->val.integer;
       printf("\nNumberTemp=%d\n", NumberTemp);  

   //here is the problem, NumberTemp can not be printed properly.Maybe because it is integer, and if string, it is OK
         //I have tried "NumberTemp=(long *)request->requestvb->
val.integer;" the same error
break;
case COLUMN_NOTEPCUSER:
printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCUSER \n");
strcpy(UserTemp, request->requestvb->val.string);//here notePCUser is string, so it is OK

break;


table_row = notePCTable_createEntry(table_info->indexes->val.string, NumberTemp, UserTemp);
netsnmp_insert_table_row(request, table_row);

 

 

Thank you for your help~



On 8/30/06, Dave Shield <.T.Shield@csc.liv.ac.uk">D.T.Shield@csc.liv.ac.uk> wrote:
On 30/08/06, Zhang Chuan <chuanzhang@gmail.com> wrote:

> I have gengerated the myTable.c and myTable.h by mib2c.iterate.conf
> automaticly. And I modified some code to make it can response to "set" or
> "get". But whenever I set a integer value to "myNumber" , the agent can not

> set the exactly value but a very large number.

So what is the code that you've got for handling the SET of myNumber?

Dave



--
you jump, I jump,she jump 3

------=_Part_83372_739728.1156933649985--


--===============0327910464==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642
--===============0327910464==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============0327910464==--