RE: Example of create

<[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi Dave,

Thanks for replying .I have written the code for create. I am able to
create and get. But I am not able to delete the row .I am using netsnmp
stack for storage. In create I am dong nothing. 

 

switch (*request->requestvb->val.integer) {

        case RS_CREATEANDGO:

        snmp_log (LOG_DEBUG,"INSIDE RS_CREATEANDGO\n");

 

 

 

  break;

       case RS_DESTROY:

       snmp_log (LOG_DEBUG,"INSIDE RS_DESTROY \n");

      break;      

       

With this code I am able to create but not delete.

 

I am attaching the result. Please help.

Thanks,

Somenath

 

 

CREATE

========================================================================
====

snmpset -v2c -c public localhost mclbModemNetworkCertificateName.3 s
"certifiacte3" mclbModemNetworkCertificateType.3 i 1
mclbModemNetworkCertificateFilename.3 s "ss"
mclbModemNetworkCertificateRowStatus.3 i 4

MCLB-MODEM-NETWORK-MIB::mclbModemNetworkCertificateName.3 = STRING:
certifiacte3

MCLB-MODEM-NETWORK-MIB::mclbModemNetworkCertificateType.3 = INTEGER:
ca(1)

MCLB-MODEM-NETWORK-MIB::mclbModemNetworkCertificateFilename.3 = STRING:
ss

MCLB-MODEM-NETWORK-MIB::mclbModemNetworkCertificateRowStatus.3 =
INTEGER: createAndGo(4)

 

 

SHOW

========================================================================
====

[root@Meenakshi mclb]# snmptable -v2c -c public localhost
mclbModemNetworkCertificateTable                                   SNMP
table: MCLB-MODEM-NETWORK-MIB::mclbModemNetworkCertificateTable

 

 mclbModemNetworkCertificateName mclbModemNetworkCertificateType
mclbModemNetworkCertificateFilename mclbModemNetworkCertificateRowStatus

                    certifiacte3                              ca
ss                          createAndGo

 

 

 

 

DELETE

========================================================================
====

 [root@Meenakshi mclb]# snmpset -v2c -c public localhost
mclbModemNetworkCertificateRowStatus.3 i 6

MCLB-MODEM-NETWORK-MIB::mclbModemNetworkCertificateRowStatus.3 =
INTEGER: destroy(6)

 

 

SHOW

========================================================================
====

[root@Meenakshi mclb]# snmptable -v2c -c public localhost
mclbModemNetworkCertificateTable

 

SNMP table: MCLB-MODEM-NETWORK-MIB::mclbModemNetworkCertificateTable

 

 mclbModemNetworkCertificateName mclbModemNetworkCertificateType
mclbModemNetworkCertificateFilename mclbModemNetworkCertificateRowStatus

                    certifiacte3                              ca
ss      

 

 

 

-----Original Message-----
From: Dave Shield [mailto:[email protected]] 
Sent: Friday, February 17, 2006 6:33 PM
To: Somenath Pal (WT01 - Broadband Networks)
Cc: [email protected]
Subject: Re: Example of create

 

On Fri, 2006-02-17 at 18:29 +0530, [email protected] wrote:

> Can any one help me by providing an example code for creating and

> removing table entry using NET-SNMP API.

 

Have you looked at the code under 'agent/mibgroup' ?

There are *plenty* of examples there, using a wide variety of

approaches.

 

 

Dave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.