HI,

First, fix your object definitions....
Index objects cannot have max access of "read-create". They should
be "not-accessible". The other writable objects in the table
should be "read-create" and not "read-write".


At 06:00 PM 6/18/2004 +0200, Maurizio RUBINI wrote:
>Hi,
>
>I have a problem with OCTET-STRING index.(Net-snmp rel. 5.1)
>
>My MIB is :
>
>        procEnabledTable        OBJECT-TYPE
>                SYNTAX          SEQUENCE  OF  ProcEnabledEntry
>                MAX-ACCESS      not-accessible
>                STATUS          current
>                DESCRIPTION     "Description"
>                ::=  { processi  2 }
>
>        procEnabledEntry        OBJECT-TYPE
>                SYNTAX          ProcEnabledEntry
>                MAX-ACCESS      not-accessible
>                STATUS          current
>                DESCRIPTION     "Row Description"
>                INDEX           {  procEnabledIndex  }
>                ::=  { procEnabledTable 1 }
>
>        ProcEnabledEntry  ::=  SEQUENCE {
>                procEnabledIndex  DisplayString,
>                procEnabledStatus  RowStatus,
>                procEnabledName  DisplayString,
>                monitoring  TruthValue
>                }
>
>
>        procEnabledIndex        OBJECT-TYPE
>                SYNTAX                  DisplayString
>                MAX-ACCESS              read-create
>                STATUS                  current
>                DESCRIPTION             "Column Description"
>                ::=  {  procEnabledEntry  1  }
>
>
>        procEnabledStatus       OBJECT-TYPE
>                SYNTAX                  RowStatus
>                MAX-ACCESS              read-create
>                STATUS                  current
>                DESCRIPTION             "Column Description"
>                ::=  {  procEnabledEntry  2  }
>
>
>        procEnabledName OBJECT-TYPE
>                SYNTAX                  DisplayString
>                MAX-ACCESS              read-write
>                STATUS                  current
>                DESCRIPTION             "Column Description"
>                ::=  {  procEnabledEntry  3  }
>
>
>        monitoring      OBJECT-TYPE
>                SYNTAX                  TruthValue  { true ( 1 ) , false ( 2 ) }
>                MAX-ACCESS              read-write
>                STATUS                  current
>                DESCRIPTION             "Column Description"
>                ::=  {  procEnabledEntry  4  }
>
>
>I have implemented the table with array-users.conf and i managed the index in the 
>following way:
>
>
>     char idxList[] ={"process1", "process2", "process3"}
>
>      /*First value of an index that is ASN_OCTET_STR is
>      the length of the string.*/
>     index_oid[0] = strlen(idxList[i]);
>
>     for (j = 0; j < index_oid[0];j++)
>     {
>       index_oid[j+1] = *(idxList[i]+j);
>     }
>
>     index.oids = (oid *) & index_oid;
>     index.len = index_oid[0]+1;
>
>When i type the command :
>
>snmpget -v2c -c public localhost procEnabledName.\"process3\"
>
>the result is :
>procEnabledName."process1": Unknown Object Identifier (Index out of range: "process1 
>(procEnabledIndex))
>
>and No trace DEBUG is generated by snmpd,
>
>
>
>when i type :
>snmpget -v2c -c public 10.106.123.87 -On procEnabledName.0.\"process1\"
>output:
>.1.3.6.1.4.1.1012.1.7.2.1.3.0.8.112.114.111.99.101.115.115.49 = No Such Instance 
>currently exists at this OID
>
>and the trace DEBUG is:
>
>///////////////////////////////////////////////////////////////////////////////////
>trace: receive(): snmpd.c, 1102:
>snmpd/select: returned, count = 1
>trace: netsnmp_udp_recv(): snmpUDPDomain.c, 117:
>netsnmp_udp: recvfrom fd 10 got 57 bytes (from 10.106.123.87)
>trace: _sess_process_packet(): snmp_api.c, 4840:
>sess_process_packet: session 0x80a2168 fd 10 pkt 0x80abe70 length 57
>dumpx_recv:02 01 01
>dumpv_recv:  Integer:   1 (0x01)
>trace: _snmp_parse(): snmp_api.c, 3903:
>snmp_api: Parsing SNMPv2 message...
>trace: _snmp_parse(): snmp_api.c, 3911:
>dumph_recv: SNMPv2c message
>
>trace: snmp_comstr_parse(): snmp_auth.c, 131:
>dumph_recv:   SNMP version
>dumpx_recv:    02 01 01
>dumpv_recv:      Integer:       1 (0x01)
>trace: snmp_comstr_parse(): snmp_auth.c, 143:
>dumph_recv:   community string
>dumpx_recv:    04 06 70 75 62 6C 69 63
>dumpv_recv:      String:        public
>trace: _snmp_parse(): snmp_api.c, 3952:
>dumph_recv:   PDU
>trace: snmp_pdu_parse(): snmp_api.c, 4141:
>dumph_recv:     request_id
>dumpx_recv:      02 04 79 2E F4 47
>dumpv_recv:        Integer:     2033120327 (0x792EF447)
>trace: snmp_pdu_parse(): snmp_api.c, 4152:
>dumph_recv:     error status
>dumpx_recv:      02 01 00
>dumpv_recv:        Integer:     0 (0x00)
>trace: snmp_pdu_parse(): snmp_api.c, 4163:
>dumph_recv:     error index
>dumpx_recv:      02 01 00
>dumpv_recv:        Integer:     0 (0x00)
>trace: snmp_pdu_parse(): snmp_api.c, 4175:
>dumph_recv:     VarBindList
>trace: snmp_pdu_parse(): snmp_api.c, 4205:
>dumph_recv:       VarBind
>trace: snmp_parse_var_op(): snmp.c, 166:
>dumph_recv:         Name
>dumpx_recv:          06 16 2B 06 01 04 01 87 74 01 07 02 01 03 00 08
>70 72 6F 63 65 73 73 31
>dumpv_recv:            ObjID: 
>OTE-MIB::procEnabledName."".8.112.114.111.99.101.115.115.49
>trace: snmp_pdu_parse(): snmp_api.c, 4214:
>dumph_recv:         Value
>trace: init_agent_snmp_session(): snmp_agent.c, 1078:
>snmp_agent: agent_sesion 0x80a2418 created
>trace: snmp_call_callbacks(): callback.c, 111:
>callback: START calling callbacks for maj=1 min=5
>trace: snmp_call_callbacks(): callback.c, 119:
>callback: calling a callback for maj=1 min=5
>trace: vacm_in_view(): mibII/vacm_vars.c, 734:
>mibII/vacm_vars: vacm_in_view: ver=1, community=public
>trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 727:
>netsnmp_udp_getSecName: resolve <"public", 0x577b6a0a>
>trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 732:
>netsnmp_udp_getSecName: compare <"public", 0x00000000/0x00000000>... SUCCESS
>trace: netsnmp_subtree_find_first(): agent_registry.c, 144:
>subtree: looking for subtree for context: ""
>trace: netsnmp_subtree_find_first(): agent_registry.c, 148:
>subtree: found one for: ""
>trace: vacm_in_view(): mibII/vacm_vars.c, 851:
>mibII/vacm_vars: vacm_in_view: sn=anonymousSecName000, gn=anonymousGroupName000, Done 
>checking setup
>trace: snmp_call_callbacks(): callback.c, 131:
>callback: END calling callbacks for maj=1 min=5 (1 called)
>trace: snmp_call_callbacks(): callback.c, 111:
>callback: START calling callbacks for maj=1 min=0
>trace: snmp_call_callbacks(): callback.c, 119:
>callback: calling a callback for maj=1 min=0
>trace: vacm_in_view(): mibII/vacm_vars.c, 734:
>mibII/vacm_vars: vacm_in_view: ver=1, community=public
>trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 727:
>netsnmp_udp_getSecName: resolve <"public", 0x577b6a0a>
>trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 732:
>netsnmp_udp_getSecName: compare <"public", 0x00000000/0x00000000>... SUCCESS
>trace: netsnmp_subtree_find_first(): agent_registry.c, 144:
>subtree: looking for subtree for context: ""
>trace: netsnmp_subtree_find_first(): agent_registry.c, 148:
>subtree: found one for: ""
>trace: vacm_in_view(): mibII/vacm_vars.c, 851:
>mibII/vacm_vars: vacm_in_view: sn=anonymousSecName000, gn=anonymousGroupName000, 
>vn=anonymousView000trace: vacm_getViewEntry(): vacm.c, 359:
>vacm:getView: , found
>, vt=1
>trace: snmp_call_callbacks(): callback.c, 131:
>callback: END calling callbacks for maj=1 min=0 (1 called)
>trace: netsnmp_add_varbind_to_cache(): snmp_agent.c, 1626:
>snmp_agent: add_vb_to_cache(0x80a2418, 1, 
>OTE-MIB::procEnabledName."".8.112.114.111.99.101.115.115.49, 0x809fe78)
>trace: netsnmp_add_varbind_to_cache(): snmp_agent.c, 1691:
>snmp_agent: tp->start OTE-MIB::procEnabledTable, tp->end OTE-MIB::processi.3,
>trace: netsnmp_call_handlers(): agent_handler.c, 371:
>handler:calling: main handler bulk_to_next
>trace: netsnmp_call_handler(): agent_handler.c, 309:
>handler:calling: calling handler bulk_to_next for mode GET
>trace: netsnmp_call_handler(): agent_handler.c, 309:
>handler:calling: calling handler table for mode GET
>trace: table_helper_handler(): table.c, 159:
>helper:table: Got request for handler table: base oid:OTE-MIB::procEnabledTable
>OTE-MIB::procEnabledName."".8.112.114.111.99.101.115.115.49
>trace: table_helper_handler(): table.c, 494:
>helper:table:   column: 3, indexes: 1trace: sprint_realloc_by_type(): mib.c, 1970:
>output: sprint_by_type, type 4
>  index: type=4(04), value=""
>trace: netsnmp_call_handler(): agent_handler.c, 317:
>handler:returned: handler table returned 0
>trace: netsnmp_call_handler(): agent_handler.c, 317:
>handler:returned: handler bulk_to_next returned 0
>trace: netsnmp_handle_request(): snmp_agent.c, 2760:
>results: request results (status = 0):
>trace: netsnmp_handle_request(): snmp_agent.c, 2763:
>results:        OTE-MIB::procEnabledName."".8.112.114.111.99.101.115.115.49 = No Such 
>Instance currently exists at this OID
>trace: _snmp_build(): snmp_api.c, 2753:
>snmp_send: Building SNMPv2 message...
>trace: _snmp_build(): snmp_api.c, 2756:
>dumph_send: PDU-RESPONSE
>trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3108:
>snmp_pdu_realloc_rbuild: starting
>trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3123:
>dumph_send:   VarBind
>trace: snmp_realloc_rbuild_var_op(): snmp.c, 337:
>dumph_send:     Value
>dumpx_send:      81 00
>dumpv_send:        NULL
>trace: snmp_realloc_rbuild_var_op(): snmp.c, 434:
>dumph_send:     Name
>dumpx_send:      06 16 2B 06 01 04 01 87 74 01 07 02 01 03 00 08
>70 72 6F 63 65 73 73 31
>dumpv_send:        ObjID: OTE-MIB::procEnabledName."".8.112.114.111.99.101.115.115.49
>trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3191:
>dumph_send: error index
>dumpx_send:  02 01 00
>dumpv_send:    Integer: 0 (0x00)
>trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3204:
>dumph_send: error status
>dumpx_send:  02 01 00
>dumpv_send:    Integer: 0 (0x00)
>trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3217:
>dumph_send: request_id
>dumpx_send:  02 04 79 2E F4 47
>dumpv_send:    Integer: 2033120327 (0x792EF447)
>trace: _snmp_build(): snmp_api.c, 2762:
>dumph_send: Community String
>dumpx_send:  04 06 70 75 62 6C 69 63
>dumpv_send:    String:  public
>trace: _snmp_build(): snmp_api.c, 2778:
>dumph_send: SNMP Version Number
>dumpx_send:  02 01 01
>dumpv_send:    Integer: 1 (0x01)
>trace: _snmp_build(): snmp_api.c, 2798:
>dumph_send: SNMPv2c Message
>trace: netsnmp_udp_send(): snmpUDPDomain.c, 150:
>netsnmp_udp: send 57 bytes from 0x80bcd2f to 10.106.123.87 on fd 10
>trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1486:
>snmp_agent: REMOVE session == 0x80a2418
>trace: free_agent_snmp_session(): snmp_agent.c, 1102:
>snmp_agent: agent_sesion 0x80a2418 released
>trace: handle_snmp_packet(): snmp_agent.c, 1614:
>snmp_agent: end of handle_snmp_packet, asp = 0x80a2418
>trace: _sess_read(): snmp_api.c, 5158:
>sess_read: not reading 8 (fdset 0xbfffe640 set 0)
>trace: _sess_read(): snmp_api.c, 5158:
>sess_read: not reading 9 (fdset 0xbfffe640 set 0)
>trace: _sess_read(): snmp_api.c, 5158:
>sess_read: not reading 6 (fdset 0xbfffe640 set 0)
>trace: _sess_read(): snmp_api.c, 5158:
>sess_read: not reading 4 (fdset 0xbfffe640 set 0)
>trace: snmp_sess_select_info(): snmp_api.c, 5570:
>sess_select: for all sessions: 10 8 9 6 4
>trace: receive(): snmpd.c, 1100:
>snmpd/select: select( numfds=11, ..., tvp=(nil))
>///////////////////////////////////////////////////////////////////////////////////////////////
>
>
>Why this behaviour ?
>What have i  wrong?
>
>thanks in advance
>
>regards.
>
>_________________________________________________________________
>Blocca le pop-up pubblicitarie con MSN Toolbar! http://toolbar.msn.it/
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
>Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
>Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
>REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
>_______________________________________________
>Net-snmp-coders mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/net-snmp-coders



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to