Agent++/Snmp++ on Solaris8 64bit

Bettendorf, Cristian Cristian.Bettendorf____softwareag.com
Tue Feb 19 10:22:31 CET 2002


Hello Frank,

you are right, updating to snmp++ 3.1.5 solve this compatibility problem.
The stuff works on a Solaris8 compiled for 64 bit using the WorkShop
Compilers 5.0 98/12/15 C++ 5.0. The old 3.1.1 was not 64bit compatible.

Rgs Cristian 

-----Original Message-----
From: Bettendorf, Cristian [mailto:Cristian.Bettendorf____softwareag.com]
Sent: Donnerstag, 14. Februar 2002 08:45
To: 'Frank.Fock____t-online.de'
Cc: agentpp-dl____agentpp.com
Subject: RE: Agent++/Snmp++ on Solaris8 64bit


Hi Frank,

yes, I used snmp++ 3.1.1 (timestamp: Sun Apr 15 14:53:20 MEST 2001 )
in file snmpmsg.h we have here: 	unsigned long bufflen;

I will update my project with the latest changes, and repeat all tests

Thanks for the hint
Rgs Cristian

-----Original Message-----
From: Frank.Fock____t-online.de [mailto:Frank.Fock____t-online.de]
Sent: Wednesday, February 13, 2002 8:46 PM
To: Bettendorf, Cristian
Cc: 'Frank.Fock____t-online.de'; agentpp-dl____agentpp.com
Subject: Re: Agent++/Snmp++ on Solaris8 64bit


Hello Christian,

In SNMP++v3.1.5 the SnmpMessage::bufflen member is defined
as "unsigned int". So this should be no problem. Are you sure that
is is defined as "unsigned long"? If so, this is the source of the problem
and explains why Bruce did not had a problem.

Best regards,
Frank

"Bettendorf, Cristian" wrote:

> Hello Frank,
>
> My short investigation, shows that the code is not 64bit compatible.
Please
> take a look and give me feedback.
>
> 1. the code works on Tru64 /Digital UX but this is a positive side effect
> and shows only that the serialization looks to be ok, not the full code...
>
> 2. the Tru64 use a little endian hardware architecture, this hide the real
> problems in the code
>
> 3. the Sol8 64bit use a big endian hardware architecture, sizes here
> (identical with Tru64):
> long      : 8
> pointer   : 8
> short     : 2
> int       : 4
> char      : 1
> long long : 8
>
> Now I have analysed why the snmpGet don't work and find a type cast into
the
> code
> file: snmp++/src/snmpmsg.cpp, fct int SnmpMessage::load(...)
>
> (int *) &bufflen
>
> Now, buflen is defined as 'unsigned long', this cast here to the high 4
> bytes of the buflen! Then other calls will break with error since the
value
> is wrong...
> On win32, solaris 32bit the sizeof int == size of long == 4 bytes, also
> identical -> no problem; on tru64 due the little endian architecture the
> cast works too since get the 4 low bytes from buflen and the value can be
> represented only using this 4 bytes.
>
> I have stopped here the analysis since this is the first problem which
kill
> snmpGet.
>
> Do I miss something?
>
> Cristian
>
> -----Original Message-----
> From: Bettendorf, Cristian
> Sent: Freitag, 8. Februar 2002 20:25
> To: Bettendorf, Cristian; 'Frank.Fock____t-online.de'
> Cc: 'bjcarter____asapit.com'; agentpp-dl____agentpp.com
> Subject: RE: Agent++/Snmp++ on Solaris8 64bit
>
> Hi,
>
> ok, I have compiled the test utility snmpget on OSF1 4.0 and here looks to
> work...
>
> Cristian
>
> -----Original Message-----
> From: Bettendorf, Cristian [mailto:Cristian.Bettendorf____softwareag.com]
> Sent: Freitag, 8. Februar 2002 19:27
> To: 'Frank.Fock____t-online.de'
> Cc: 'bjcarter____asapit.com'; agentpp-dl____agentpp.com
> Subject: RE: Agent++/Snmp++ on Solaris8 64bit
>
> Hi Frank,
>
> which flags are used to compile on OSF1? (Digital Unix 4.0 or True64 5.0 )
> I can made a quick test...
>
> Cristian
>
> -----Original Message-----
> From: Frank.Fock____t-online.de [mailto:Frank.Fock____t-online.de]
> Sent: Freitag, 8. Februar 2002 18:29
> To: Bettendorf, Cristian
> Cc: 'bjcarter____asapit.com'; agentpp-dl____agentpp.com
> Subject: Re: Agent++/Snmp++ on Solaris8 64bit
>
> Hi Christian,
>
> The AGENT++ and SNMP++v3.x code works on Digital Unix
> (True64) which is a true 64bit system. SNMP++v2.x will not work
> on 64bit systems! If you have used SNMP++v3.x please check
> compiler settings that may turn off 64bit compatibility. Code that
> may be affected by 64bit is located in snmp++/src/asn1.cpp
>
> Hope this helps.
>
> Best regards,
> Frank
>
> "Bettendorf, Cristian" wrote:
>
> > Hi,
> >
> > I don't understand exactly what you mean. I use this compiler to build a
> lot
> > of projects on this machine in 64bit mode and all works fine, e.g. the
> full
> > Microsoft DCOM stuff ported to UNIX (our EXX DCOM product). This all
> include
> > C++ and network low level code, all works fine.
> >
> > As I sad, the compile and link step was OK, the module was built and
it's
> > starting and not produce segmentation errors.
> >
> > But I had the feeling that the error could be produced due the new data
> size
> > used for all basic types in a 64bit native environment. Maybye somebody
> had
> > done the analysis and could point me in the right direction.
> >
> > Cristian
> >
> > -----Original Message-----
> > From: Bruce J. Carter [mailto:bjcarter____asapit.com]
> > Sent: Donnerstag, 7. Februar 2002 18:48
> > To: Bettendorf, Cristian
> > Cc: agentpp-dl____agentpp.com
> > Subject: Re: Agent++/Snmp++ on Solaris8 64bit
> >
> > I had this same problem and Frank pointed me in the correct direction.
> > Check your version of workshop, if you are indeed running workshop 5,
> > then you lose. You have to upgrade to Workshop 6 update 2. Solaris 8 on
> > Sparc is not supported by Workshop 5... Check the inside front cover of
> > the Workshop, or the release notes under system requirements.
> >
> > Bettendorf, Cristian wrote:
> >
> > > Hi,
> > >
> > > has somebody compiled & used the stuff on a Solaris 8 machine in 64
bit
> > > mode?
> > >
> > > I started a short test and it looks that the stuff is not working and
> must
> > > be ported to native 64bit platforms.
> > >
> > > OS: SunOS 5.8 Generic_108528-04 sun4u sparc SUNW,Ultra-80
> > > CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
> > >
> > > I tested first only the snmpget example from the snmp++ package, the
> > > compile+link step was OK, here the used options: -D_XPG4_EXTENDED
-Dsun
> > > -D__unix -pta -xtarget=ultra  -xarch=v9  -KPIC -mt  -g
> > > -D_POSIX_PTHREAD_SEMANTICS
> > >
> > > Now a short test run return errors:
> > >
> > > $snmpget 127.0.0.1
> > > Get from 127.0.0.1/161 SNMPV1 Retries=1 Timeout=100ms Community=public
> > > Get error, SNMP: Response PDU Too Big
> > >
> > >
> > > Compiled as 32bit stuff, all works fine. Any hints?
> > >
> > > Thanks in advance
> > > Cristian
> > >
> > >
> > >
> >
> > --
> > Bruce J. Carter
> > ASAP
> > 1771 International Pkwy #129
> > Richardson, TX. 75081
> > phone: 972.783.1000x17
> > fax:   972.783.1166
> > email: bjcarter____asapit.com



More information about the AGENTPP mailing list