BER problem

Jochen Katz katz____agentpp.com
Fri Jun 27 23:15:20 CEST 2003


Hi,

> Essentially what it is objecting to is the fact that although the trap is less 
> than 127 bytes in length it is encoded the 'long' way with the extra 
> preceeding byte set to zero. Although I have subsequently found out that this 
> isn't illegal I have seen other SNMP implementations that change the encoding 
> depending on the length i.e. use the short form if less than 127 bytes.
> 
> At the moment it looks unlikely that the firewall can be changed.  I have
> considered changing the the source code used by the agents (probably only 
> option and not yet investigated) but I also wondered if there were any plans 
> to change this by yourselves in future versions?

currently I don't have plans to change this, as it is a pain to do it. 
Those who implemented the current encoding used the long version, as it 
is easier to do it that way.

To change this:
- either the length of each part of the message has to be calculated 
before starting to encode it
- or each part has to be encoded into a temporary buffer and later 
copied into the real buffer.

I would prefer the first solution, as since some time the classes Pdu, 
Vb, OctetStr,... have a method to get the length of the serialized 
message. And agent++ already uses these methods to limit the message 
size for GetBulk responses.

Regards,
   Jochen




More information about the AGENTPP mailing list