[SNMP4J] Re: Oid overlapping

Frank Fock fock at agentpp.com
Thu Mar 6 00:55:46 CET 2008


Hi Freddy,

Frediano Sorvino wrote:
> I think I have an answer to my question...the problem is that all the oids
> belong to the same table, just that in the second group I am specifying the
> interface as well.

A table may not contain another table or any instances other
than columnar objects.

> 
> Then I have another conflict that I can't understand:
> if I define the 2 scalars wich oids are:
> 
> 1.3.6.1.2.1.2.2.1.1
> 1.3.6.1.2.1.2.2.1.6.1

Scalar instances must have an OID that is composed
of the scalar object class OID and a .0 suffix!
> 
> well, even these 2 generate a conflict...can I do anything to solve it?

Use 1.3.6.1.2.1.2.2.1.1.0 and 1.3.6.1.2.1.2.2.1.6.1.0
and make sure that those OIDs are not registered elsewhere
in the agent.

> Moreover I should implement something that when asking for
> 1.3.6.1.2.1.2.2.1.1 with a snmpget it returns no value...but with a
> snmpgetnext returns an Integer. The question is how can I decide what to do
> in case of a getnext petition?

I think you are mis leaded here. Such an agent would
violate basic SNMP rules.

Best regards,
Frank

> 
> Thank you,
> Freddy
> 
> 
> On Wed, Mar 5, 2008 at 1:32 PM, Frediano Sorvino <sorfrena at gmail.com> wrote:
> 
>> Hi all!
>>
>> I am trying to create 2 tables:
>> the first 1 has these kinds of oids:
>> 1.3.6.1.2.1.2.2.1.1
>> 1.3.6.1.2.1.2.2.1.2
>> 1.3.6.1.2.1.2.2.1.3
>> 1.3.6.1.2.1.2.2.1.4
>> etc.
>>
>> and the 2nd one these:
>>
>> 1.3.6.1.2.1.2.2.1.1.1
>> 1.3.6.1.2.1.2.2.1.1.2
>> 1.3.6.1.2.1.2.2.1.1.3
>> 1.3.6.1.2.1.2.2.1.1.4
>> etc.
>>
>> I create the tables correctly but when trying to register on the server I
>> get
>>
>> org.snmp4j.agent.DuplicateRegistrationException:
>> org.snmp4j.agent.DefaultMOConte
>> xtScope[context=null,lowerBound=1.3.6.1.2.1.2.2.1
>> ,lowerIncluded=false,upperBound
>> =1.3.6.1.2.1.2.2.2,upperIncluded=false]
>>         at org.snmp4j.agent.DefaultMOServer.register(DefaultMOServer.java
>> :157)
>>         at org.snmp4j.agent.test.TestAgent.registerManagedObjects(
>> TestAgent.java
>> :120)
>>         at org.snmp4j.agent.BaseAgent.registerSnmpMIBs(BaseAgent.java:205)
>>         at org.snmp4j.agent.test.TestAgent.registerSnmpMIBs(TestAgent.java
>> :535)
>>         at org.snmp4j.agent.BaseAgent.init(BaseAgent.java:173)
>>         at org.snmp4j.agent.test.TestAgent.main(TestAgent.java:484)
>>
>> How can I do to register both these tables?
>> Thanks,
>> Freddy
>>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



More information about the SNMP4J mailing list