[snmp] bulk request
Birgit Arkesteijn
birgit at westhawk.co.uk
Thu Apr 10 14:50:19 BST 2008
Dear Ferry,
I think your right, this should work.
I just read the section in the rfc again, see
http://www.ietf.org/rfc/rfc3416.txt
4.2.3. The GetBulkRequest-PDU
Regarding the repetitions is says:
(2) If there is no (i)-th lexicographic successor, then the
corresponding variable binding produced in the Response-PDU has
its value field set to "endOfMibView", and its name field set
to either the last lexicographic successor, or if there are no
lexicographic successors, to the (N + r)-th variable binding's
name in the request.
(2) The response may also be generated with a lesser number of
variable bindings if for some value of iteration i, such that i
is greater than zero and less than or equal to M, that all of
the generated variable bindings have the value field set to
"endOfMibView". In this case, the variable bindings may be
truncated after the (N + (i * R))-th variable binding.
So, yes, it should either return a few "endOfMibView" or it should only
return the entries in the table that are available (but are less than
MaxRepetitions).
Either way, the agent is sending you an invalid response. There's
nothing the stack can do about it.
Pure speculation on my part, but what I thinking is happening is that
the agent calculates the length based on the value of MaxRepetitions,
but the actual varbind list is shorter.
Cheers, Birgit
On 10/04/08 12:42, Ferry Huberts wrote:
> Hi!
>
> I'm trying to send out a PDU for a bulk request. When there are less entries in the table I'm
> trying to retrieve than the MaxRepetitions it doesn't work and I get
>
>
> uk.co.westhawk.snmp.stack.DecodingException: Incorrect packet. No of bytes received less than
> packet length.
> at uk.co.westhawk.snmp.stack.Pdu.fillin(Pdu.java:914)
> at uk.co.westhawk.snmp.stack.SnmpContextv2c.processIncomingResponse(SnmpContextv2c.java:150) at
> uk.co.westhawk.snmp.stack.AbstractSnmpContext.run(AbstractSnmpContext.java:532) at
> java.lang.Thread.run(Thread.java:619)
>
> I would have thought that this would work, that it would just return the number of entries in the
> table. Am I misunderstanding functionality or is it a bug?
>
> I'm using v6.0
> --
> Ferry Huberts
--
-- Birgit Arkesteijn, birgit at westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
More information about the snmp
mailing list