Hi everybody,

I'm new in this forum and I search for my problem, but I don't know
what to do to resolve this problem:

The snmpset and snmpget works well:

[EMAIL PROTECTED] ctable]# snmpset -v 2c -c private localhost
channelFreqOut.21 = 192,1 channelFreqBomb.21 = 0 channelPotOut.21 = 0
channelFreqIn.21 = 192,1 PUCCAMP-CONV-MIB::channelStatus.21 = 0
PUCCAMP-CONV-MIB::channelFreqOut.21 = STRING: "192,1"
PUCCAMP-CONV-MIB::channelFreqBomb.21 = STRING: "0"
PUCCAMP-CONV-MIB::channelPotOut.21 = STRING: "0"
PUCCAMP-CONV-MIB::channelFreqIn.21 = STRING: "192,1"
PUCCAMP-CONV-MIB::channelStatus.21 = INTEGER: 0


[EMAIL PROTECTED] ctable]#  snmpget -v 2c -c public localhost
channelFreqOut.21  channelFreqBomb.21  channelPotOut.21
channelFreqIn.21 PUCCAMP-CONV-MIB::channelStatus.21
PUCCAMP-CONV-MIB::channelFreqOut.21 = STRING: "192,1"
PUCCAMP-CONV-MIB::channelFreqBomb.21 = STRING: "0"
PUCCAMP-CONV-MIB::channelPotOut.21 = STRING: "0"
PUCCAMP-CONV-MIB::channelFreqIn.21 = STRING: "192,1"
PUCCAMP-CONV-MIB::channelStatus.21 = INTEGER: 0

But when execute snmptable not:

[EMAIL PROTECTED] ctable]# snmptable -v 2c -c public localhost
PUCCAMP-CONV-MIB::channelTable
PUCCAMP-CONV-MIB::channelTable: No entries

I,d appreciate any help

My MIB:

channelTable  OBJECT-TYPE
        SYNTAX SEQUENCE OF ChannelEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
                ""
        ::= { convCompWave 3 }

channelEntry  OBJECT-TYPE
        SYNTAX  ChannelEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
                ""
        INDEX { channelID }
        ::= { channelTable 1 }
ChannelEntry ::= SEQUENCE {
        channelID
                Integer32,
        channelFreqOut
                Integer32,
        channelFreqBomb
                Integer32,
        channelPotOut
                Integer32,
        channelFreqIn
                Integer32,
        channelStatus
                Integer32
}


channelID  OBJECT-TYPE
        SYNTAX     Integer32 (1..32)
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
                ""
        ::= { channelEntry 1 }

channelFreqOut  OBJECT-TYPE
        SYNTAX     OCTET STRING
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
                ""
        ::= { channelEntry 2 }

channelFreqBomb  OBJECT-TYPE
        SYNTAX     OCTET STRING
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
                ""
        ::= { channelEntry 3 }


channelPotOut  OBJECT-TYPE
        SYNTAX     OCTET STRING
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
                ""
        ::= { channelEntry 4 }

channelFreqIn  OBJECT-TYPE
        SYNTAX     OCTET STRING
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
                ""
        ::= { channelEntry 5 }

channelStatus  OBJECT-TYPE
        SYNTAX     Integer32
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
                ""
        ::= { channelEntry 6 }



My code:



[EMAIL PROTECTED] ctable]# cat channelTable.c
/*
 * Note: this file originally auto-generated by mib2c using
 *        : mib2c.create-dataset.conf,v 5.4 2004/02/02 19:06:53 rstory Exp $
 */

#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "channelTable.h"

/** Initialize the channelTable table by defining its contents and how
it's structured */
void
initialize_table_channelTable(void)
{
    static oid channelTable_oid[] = {1,3,6,1,4,1,23955,1,3};
    size_t channelTable_oid_len = OID_LENGTH(channelTable_oid);
    netsnmp_table_data_set *table_set;

    /* create the table structure itself */
    table_set = netsnmp_create_table_data_set("channelTable");

    /* comment this out or delete if you don't support creation of new rows */
    table_set->allow_creation = 1;

    /***************************************************
     * Adding indexes
     */
    DEBUGMSGTL(("initialize_table_channelTable",
                "adding indexes to table channelTable\n"));
    netsnmp_table_set_add_indexes(table_set,
                           ASN_INTEGER,  /* index: channelID */
                           0);

    DEBUGMSGTL(("initialize_table_channelTable",
                "adding column types to table channelTable\n"));
    netsnmp_table_set_multi_add_default_row(table_set,
                                            COLUMN_CHANNELID, ASN_INTEGER, 0,
                                            NULL, 0,
                                            COLUMN_CHANNELFREQOUT,
ASN_OCTET_STR, 1,
                                            NULL, 0,
                                            COLUMN_CHANNELFREQBOMB,
ASN_OCTET_STR, 1,
                                            NULL, 0,
                                            COLUMN_CHANNELPOTOUT,
ASN_OCTET_STR, 1,
                                            NULL, 0,
                                            COLUMN_CHANNELFREQIN,
ASN_OCTET_STR, 1,
                                            NULL, 0,
                                            COLUMN_CHANNELSTATUS,
ASN_INTEGER, 1,
                                            NULL, 0,
                              0);

    /* registering the table with the master agent */
    /* note: if you don't need a subhandler to deal with any aspects
       of the request, change channelTable_handler to "NULL" */
    
netsnmp_register_table_data_set(netsnmp_create_handler_registration("channelTable",
channelTable_handler,
                                                        channelTable_oid,
                                                        channelTable_oid_len,
                                                        HANDLER_CAN_RWRITE),
                            table_set, NULL);
}

/** Initializes the channelTable module */
void
init_channelTable(void)
{

  /* here we initialize all the tables we're planning on supporting */
    initialize_table_channelTable();
}

/** handles requests for the channelTable table, if anything else
needs to be done */
int
channelTable_handler(
    netsnmp_mib_handler               *handler,
    netsnmp_handler_registration      *reginfo,
    netsnmp_agent_request_info        *reqinfo,
    netsnmp_request_info              *requests) {
    /* perform anything here that you need to do.  The requests have
       already been processed by the master table_dataset handler, but
       this gives you chance to act on the request in some other way
       if need be. */
    return SNMP_ERR_NOERROR;
}

Thanks
-- 
Carlos Roberto Schimidt

-------------------------------------------------------------------------
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=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to