[AGENT++] build_vb and too many variables

Jacek Poplawski jacekp at s3group.com.pl
Tue Feb 7 09:36:52 CET 2006


Hello.

I am trying to fix GetBulk behaviour in our Agent.
When GetBulk produces big response, with many variables, they may not 
fit into PDU.
For example: PDU size is 2048, and 100 variables won't fit it.

 From RFC 3416:

   While the maximum number of variable bindings in the Response-PDU is
   bounded by N + (M * R), the response may be generated with a lesser
   number of variable bindings (possibly zero) for either of three
   reasons.

   (1)   If the size of the message encapsulating the Response-PDU
         containing the requested number of variable bindings would be
         greater than either a local constraint or the maximum message
         size of the originator, then the response is generated with a
         lesser number of variable bindings.  This lesser number is the
         ordered set of variable bindings with some of the variable
         bindings at the end of the set removed, such that the size of
         the message encapsulating the Response-PDU is approximately
         equal to but no greater than either a local constraint or the
         maximum message size of the originator.  Note that the number
         of variable bindings removed has no relationship to the values
         of N, M, or R.

my question is how to do it in snmp++, because in function build_vb 
(asn1.cpp) it just checks if variables fit buffer size, and if not - it 
retuns an error!
If I understand it correctly - correct behaviour is to put some 
variables into responce and cut others.
How to check how many variables will fit PDU?


The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications at s3group.com.
Thank You.



More information about the AGENTPP mailing list