[AGENT++] snmp++v3.2.23 parse ans1 bug

Jochen Katz katz at agentpp.com
Mon Jul 21 23:34:49 CEST 2008


Hello,

I have problems to understand your mail. For my 64 bit linux system the 
line *length >>= (8 * ((sizeof(long)) - lengthbyte)); does the right 
thing. And here int is 4 byte and long 8 byte.

Is the line above on your system wrong? Can you enable the debug 
messages and send me the error message?

Regards,
   Jochen


> I use snmp++v3.2.23.tar and agent++v3.5.29.tar.  When Snmp get 6 or over 6
> oid, agent no response.
> 
>  
> 
>  
> 
> on aix 5.3 fixed:
> 
> asn1.cpp
> 
> unsigned char * asn_parse_length( unsigned char *data, unsigned long
> *length)
> 
> *length >>= (8 * ((sizeof(long)) - lengthbyte));
> 
>  
> 
> Note: sizeof(int)=4   sizeof(long)=8
> 
>  
> 
>  
> 
> on solaris fixed:
> 
> Machine hardware:   i86pc
> 
> OS version:         5.10
> 
> Processor type:     i386
> 
> Hardware:           i86pc
> 
>  
> 
> asn1.cpp
> 
> unsigned char * asn_parse_length( unsigned char *data, unsigned long
> *length)
> 
> *length >>= (8 * ((sizeof(int)) - lengthbyte));
> 
>  
> 
> Note: sizeof(int)=4  sizeof(long)=8
> 
>  
> 
>  



More information about the AGENTPP mailing list