Snmp4j Agent handling of getnext

I have a basic agent using snmp4j.

i have added 28 scalar OIDs via this call snmpagent.registerManagedObject(scalar);

I can write to these and read from them.

On a remote linux box when i run snmpwalk i can see in wireshark only 2 requests.

First request is a get-next -request for say oid 1.3.6.1.4.1.X.18.3.0
with a response of 1.3.6.1.4.1.X.18.4.0

then a get request for 1.3.6.1.4.1.X.18.3.0 and a response for 1.3.6.1.4.1.X.18.3.0

I did some overrideing of getValue, prepare and commit but i dont understand why the get-next doesnt keep ‘walking’ down from 1.3.6.1.4.1.X.18.3.0 to 1.3.6.1.4.1.x.18.29.0

All the oids work if i do snmpgets on them.

What OiD and other parameters are you using for your „snmpwalk“?
(This is not a NET-SNMP forum, so on the usage of that tool you would get better help on their forum)

snmpwalk -v 2c -c mycommunity 192.168.1.117 .1.3.6.1.4.1.X.18.3

i use this command on other snmp agents we have written but in C and they work.
I don’t see anything about the snmpwalk command that is incorrect, but i could be wrong.

i am not sure if i need to do anything different other than just manually adding new OIDs in a loop.

for the view setup i did this:

vacm.addViewTreeFamily(new OctetString("fullReadView"), new OID("1.3"),
                new OctetString(), VacmMIB.vacmViewIncluded,
                StorageType.nonVolatile);
vacm.addViewTreeFamily(new OctetString("fullReadView"), new OID("1.3.6.1.4.1.X.18"),
                new OctetString(), VacmMIB.vacmViewIncluded,
                StorageType.nonVolatile);

The above code is useless. The first line is already sufficient.
The snmpwalk works as expected. You simply need to provide the OID that matches your expected sub-tree. For the one you provided, you get the correct results.

OK i tried it again and it is working. thanks for the help.
i guess i had the expected using x.18.1 would go down list of 18.2, 18.3 etc…
but it works when i try walking X.18

i appreciate the help.