Wanted: working snmp sample

I want to write an SNMP Manager in QNX4 and tried to to compile the
snmpget.c sample from the snmpv1.tgz. The sample uses several function which
are defined nowhere. Where can I find a complete workung sample showing the
usage of the SNMP API ?

Carlo

Hi Carlo,

You should be able to compile snmpget.c. You will have to modify the file so
that it looks
for the snmp specific headers in the /usr/include/snmp directory instead of
the local directory.
Then all you have to do is link against the socket and snmp libraries.
ie. # cc -osnmpget -lsocket -lsnmp snmpget.c

Regards,
Barry F.

Carlo Rafalski <carlo@scalacs.de> wrote in message
news:b92hu3$8g0$1@inn.qnx.com

I want to write an SNMP Manager in QNX4 and tried to to compile the
snmpget.c sample from the snmpv1.tgz. The sample uses several function
which
are defined nowhere. Where can I find a complete workung sample showing
the
usage of the SNMP API ?

Carlo

Hi Barry,

still get

snmpget.c(115): Warning! W301: No prototype found for ‘print_variable’
snmpget.c(103): Warning! W301: No prototype found for ‘read_objid’
snmpget.c(55): Warning! W301: No prototype found for ‘init_mib’
snmpget.c(124): Warning! W301: No prototype found for ‘print_objid’
snmpget.c(111): Warning! W301: No prototype found for ‘snmp_synch_response’
snmpget.c(107): Warning! W301: No prototype found for ‘snmp_add_null_var’
snmpget.c(92): Warning! W301: No prototype found for ‘snmp_synch_setup’

Thanks
Carlo


“OS Support” <os@qnx.com> schrieb im Newsbeitrag
news:b9qppf$k16$1@nntp.qnx.com

Hi Carlo,

You should be able to compile snmpget.c. You will have to modify the file
so
that it looks
for the snmp specific headers in the /usr/include/snmp directory instead
of
the local directory.
Then all you have to do is link against the socket and snmp libraries.
ie. # cc -osnmpget -lsocket -lsnmp snmpget.c

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:b92hu3$8g0$> 1@inn.qnx.com> …
I want to write an SNMP Manager in QNX4 and tried to to compile the
snmpget.c sample from the snmpv1.tgz. The sample uses several function
which
are defined nowhere. Where can I find a complete workung sample showing
the
usage of the SNMP API ?

Carlo

\

I assume you are using tcptk 4.25? The header files were private to the
library in tcp 4.25.
But in tcptk 5.0 the header files you need are public and should be in
/usr/include/snmp.
If you would like to try tcp 5.0 you can download it here:
http://www.qnx.com/developer/download/updates/qnx4/index.html

Regards,
Barry F.

Carlo Rafalski <carlo@scalacs.de> wrote in message
news:ba204o$cb0$1@inn.qnx.com

Hi Barry,

still get

snmpget.c(115): Warning! W301: No prototype found for ‘print_variable’
snmpget.c(103): Warning! W301: No prototype found for ‘read_objid’
snmpget.c(55): Warning! W301: No prototype found for ‘init_mib’
snmpget.c(124): Warning! W301: No prototype found for ‘print_objid’
snmpget.c(111): Warning! W301: No prototype found for
‘snmp_synch_response’
snmpget.c(107): Warning! W301: No prototype found for ‘snmp_add_null_var’
snmpget.c(92): Warning! W301: No prototype found for ‘snmp_synch_setup’

Thanks
Carlo


“OS Support” <> os@qnx.com> > schrieb im Newsbeitrag
news:b9qppf$k16$> 1@nntp.qnx.com> …
Hi Carlo,

You should be able to compile snmpget.c. You will have to modify the
file
so
that it looks
for the snmp specific headers in the /usr/include/snmp directory instead
of
the local directory.
Then all you have to do is link against the socket and snmp libraries.
ie. # cc -osnmpget -lsocket -lsnmp snmpget.c

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:b92hu3$8g0$> 1@inn.qnx.com> …
I want to write an SNMP Manager in QNX4 and tried to to compile the
snmpget.c sample from the snmpv1.tgz. The sample uses several function
which
are defined nowhere. Where can I find a complete workung sample
showing
the
usage of the SNMP API ?

Carlo



\

Now I am totally confused. I installed tcp 5.0 runtime und toolkit. My old
programs can’t be compiled without errors any more. Even
/usr/demo/src/socket/tut2.c can’t be compiled. The comiler is complaining
about int8_t, uint16_t … not defined.

What have I missed ? Will my tcptk5.0 programs run under tcprt4.25 ?

Confused
Carlo


“OS Support” <os@qnx.com> schrieb im Newsbeitrag
news:ba2n18$fto$1@nntp.qnx.com

I assume you are using tcptk 4.25? The header files were private to the
library in tcp 4.25.
But in tcptk 5.0 the header files you need are public and should be in
/usr/include/snmp.
If you would like to try tcp 5.0 you can download it here:
http://www.qnx.com/developer/download/updates/qnx4/index.html

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:ba204o$cb0$> 1@inn.qnx.com> …
Hi Barry,

still get

snmpget.c(115): Warning! W301: No prototype found for ‘print_variable’
snmpget.c(103): Warning! W301: No prototype found for ‘read_objid’
snmpget.c(55): Warning! W301: No prototype found for ‘init_mib’
snmpget.c(124): Warning! W301: No prototype found for ‘print_objid’
snmpget.c(111): Warning! W301: No prototype found for
‘snmp_synch_response’
snmpget.c(107): Warning! W301: No prototype found for
‘snmp_add_null_var’
snmpget.c(92): Warning! W301: No prototype found for ‘snmp_synch_setup’

Thanks
Carlo


“OS Support” <> os@qnx.com> > schrieb im Newsbeitrag
news:b9qppf$k16$> 1@nntp.qnx.com> …
Hi Carlo,

You should be able to compile snmpget.c. You will have to modify the
file
so
that it looks
for the snmp specific headers in the /usr/include/snmp directory
instead
of
the local directory.
Then all you have to do is link against the socket and snmp libraries.
ie. # cc -osnmpget -lsocket -lsnmp snmpget.c

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:b92hu3$8g0$> 1@inn.qnx.com> …
I want to write an SNMP Manager in QNX4 and tried to to compile the
snmpget.c sample from the snmpv1.tgz. The sample uses several
function
which
are defined nowhere. Where can I find a complete workung sample
showing
the
usage of the SNMP API ?

Carlo





\

How did you install the updates? Did you do "install -u " from the
root directory?

Regards,
Barry F.

Carlo Rafalski <carlo@scalacs.de> wrote in message
news:ba3an3$16n$1@inn.qnx.com

Now I am totally confused. I installed tcp 5.0 runtime und toolkit. My old
programs can’t be compiled without errors any more. Even
/usr/demo/src/socket/tut2.c can’t be compiled. The comiler is complaining
about int8_t, uint16_t … not defined.

What have I missed ? Will my tcptk5.0 programs run under tcprt4.25 ?

Confused
Carlo


“OS Support” <> os@qnx.com> > schrieb im Newsbeitrag
news:ba2n18$fto$> 1@nntp.qnx.com> …
I assume you are using tcptk 4.25? The header files were private to the
library in tcp 4.25.
But in tcptk 5.0 the header files you need are public and should be in
/usr/include/snmp.
If you would like to try tcp 5.0 you can download it here:
http://www.qnx.com/developer/download/updates/qnx4/index.html

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:ba204o$cb0$> 1@inn.qnx.com> …
Hi Barry,

still get

snmpget.c(115): Warning! W301: No prototype found for ‘print_variable’
snmpget.c(103): Warning! W301: No prototype found for ‘read_objid’
snmpget.c(55): Warning! W301: No prototype found for ‘init_mib’
snmpget.c(124): Warning! W301: No prototype found for ‘print_objid’
snmpget.c(111): Warning! W301: No prototype found for
‘snmp_synch_response’
snmpget.c(107): Warning! W301: No prototype found for
‘snmp_add_null_var’
snmpget.c(92): Warning! W301: No prototype found for
‘snmp_synch_setup’

Thanks
Carlo


“OS Support” <> os@qnx.com> > schrieb im Newsbeitrag
news:b9qppf$k16$> 1@nntp.qnx.com> …
Hi Carlo,

You should be able to compile snmpget.c. You will have to modify the
file
so
that it looks
for the snmp specific headers in the /usr/include/snmp directory
instead
of
the local directory.
Then all you have to do is link against the socket and snmp
libraries.
ie. # cc -osnmpget -lsocket -lsnmp snmpget.c

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:b92hu3$8g0$> 1@inn.qnx.com> …
I want to write an SNMP Manager in QNX4 and tried to to compile
the
snmpget.c sample from the snmpv1.tgz. The sample uses several
function
which
are defined nowhere. Where can I find a complete workung sample
showing
the
usage of the SNMP API ?

Carlo







\

Yes. The 5.0 directories are all there. I have directories

/usr/tcprt/4.25
/usr/tcprt/5.0
usr/tcprt/currrent → /usr/tcprt/5.0

The same for tcptk

Regards
Carlo


“OS Support” <os@qnx.com> schrieb im Newsbeitrag
news:ba3gej$fhn$1@nntp.qnx.com

How did you install the updates? Did you do "install -u " from
the
root directory?

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:ba3an3$16n$> 1@inn.qnx.com> …
Now I am totally confused. I installed tcp 5.0 runtime und toolkit. My
old
programs can’t be compiled without errors any more. Even
/usr/demo/src/socket/tut2.c can’t be compiled. The comiler is
complaining
about int8_t, uint16_t … not defined.

What have I missed ? Will my tcptk5.0 programs run under tcprt4.25 ?

Confused
Carlo


“OS Support” <> os@qnx.com> > schrieb im Newsbeitrag
news:ba2n18$fto$> 1@nntp.qnx.com> …
I assume you are using tcptk 4.25? The header files were private to
the
library in tcp 4.25.
But in tcptk 5.0 the header files you need are public and should be in
/usr/include/snmp.
If you would like to try tcp 5.0 you can download it here:
http://www.qnx.com/developer/download/updates/qnx4/index.html

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:ba204o$cb0$> 1@inn.qnx.com> …
Hi Barry,

still get

snmpget.c(115): Warning! W301: No prototype found for
‘print_variable’
snmpget.c(103): Warning! W301: No prototype found for ‘read_objid’
snmpget.c(55): Warning! W301: No prototype found for ‘init_mib’
snmpget.c(124): Warning! W301: No prototype found for ‘print_objid’
snmpget.c(111): Warning! W301: No prototype found for
‘snmp_synch_response’
snmpget.c(107): Warning! W301: No prototype found for
‘snmp_add_null_var’
snmpget.c(92): Warning! W301: No prototype found for
‘snmp_synch_setup’

Thanks
Carlo


“OS Support” <> os@qnx.com> > schrieb im Newsbeitrag
news:b9qppf$k16$> 1@nntp.qnx.com> …
Hi Carlo,

You should be able to compile snmpget.c. You will have to modify
the
file
so
that it looks
for the snmp specific headers in the /usr/include/snmp directory
instead
of
the local directory.
Then all you have to do is link against the socket and snmp
libraries.
ie. # cc -osnmpget -lsocket -lsnmp snmpget.c

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:b92hu3$8g0$> 1@inn.qnx.com> …
I want to write an SNMP Manager in QNX4 and tried to to compile
the
snmpget.c sample from the snmpv1.tgz. The sample uses several
function
which
are defined nowhere. Where can I find a complete workung sample
showing
the
usage of the SNMP API ?

Carlo









\

If I set back /usr/tcptk/current → /usr/tcptk/4.25
/usr/demo/src/socket/tut2.c can be compiled.

Regards
Carlo


“OS Support” <os@qnx.com> schrieb im Newsbeitrag
news:ba3gej$fhn$1@nntp.qnx.com

How did you install the updates? Did you do "install -u " from
the
root directory?

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:ba3an3$16n$> 1@inn.qnx.com> …
Now I am totally confused. I installed tcp 5.0 runtime und toolkit. My
old
programs can’t be compiled without errors any more. Even
/usr/demo/src/socket/tut2.c can’t be compiled. The comiler is
complaining
about int8_t, uint16_t … not defined.

What have I missed ? Will my tcptk5.0 programs run under tcprt4.25 ?

Confused
Carlo


“OS Support” <> os@qnx.com> > schrieb im Newsbeitrag
news:ba2n18$fto$> 1@nntp.qnx.com> …
I assume you are using tcptk 4.25? The header files were private to
the
library in tcp 4.25.
But in tcptk 5.0 the header files you need are public and should be in
/usr/include/snmp.
If you would like to try tcp 5.0 you can download it here:
http://www.qnx.com/developer/download/updates/qnx4/index.html

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:ba204o$cb0$> 1@inn.qnx.com> …
Hi Barry,

still get

snmpget.c(115): Warning! W301: No prototype found for
‘print_variable’
snmpget.c(103): Warning! W301: No prototype found for ‘read_objid’
snmpget.c(55): Warning! W301: No prototype found for ‘init_mib’
snmpget.c(124): Warning! W301: No prototype found for ‘print_objid’
snmpget.c(111): Warning! W301: No prototype found for
‘snmp_synch_response’
snmpget.c(107): Warning! W301: No prototype found for
‘snmp_add_null_var’
snmpget.c(92): Warning! W301: No prototype found for
‘snmp_synch_setup’

Thanks
Carlo


“OS Support” <> os@qnx.com> > schrieb im Newsbeitrag
news:b9qppf$k16$> 1@nntp.qnx.com> …
Hi Carlo,

You should be able to compile snmpget.c. You will have to modify
the
file
so
that it looks
for the snmp specific headers in the /usr/include/snmp directory
instead
of
the local directory.
Then all you have to do is link against the socket and snmp
libraries.
ie. # cc -osnmpget -lsocket -lsnmp snmpget.c

Regards,
Barry F.

Carlo Rafalski <> carlo@scalacs.de> > wrote in message
news:b92hu3$8g0$> 1@inn.qnx.com> …
I want to write an SNMP Manager in QNX4 and tried to to compile
the
snmpget.c sample from the snmpv1.tgz. The sample uses several
function
which
are defined nowhere. Where can I find a complete workung sample
showing
the
usage of the SNMP API ?

Carlo









\

Is there anybody out there ? Still can’t compile the snmp samples !

Regards
Carlo

Did you read the release notes that came with teh TCP/IP 5.0 release?
Here’s the 1st paragraph of the 1st section…

;***************************************************************************


SECTION I: Enhancements
;***************************************************************************


TCP/IP 5.0 release constitutes a change from the BSD 4.3reno source
base to the BSD 4.4 source base. In some cases the semantics of certain
API calls have changed. In many cases we will be able to provide
backwards compatability but that shouldn’t be assumed. The following
utilities are not backwards compatable with TCP 4.25: arp, ifconfig,
netstat, pppd, route, slattach, sliplogin, snmpd, sysctl, dhcp.client.

Given that it says API call shave changed, and not to assume backwards
compatability why do you think that tcp/ip 4.25 sample code should compile?

-Martin.


“Carlo Rafalski” <carlo@scalacs.de> wrote in message
news:bb4akb$jd8$1@inn.qnx.com

Is there anybody out there ? Still can’t compile the snmp samples !

Regards
Carlo

Hi!
I’ve done this.
QNX4.25 with tcp/ip5.0.
There were minor problems in some examples. But all (except snmpd) was
compiled.
Now I am working on my own snmp-agent.
Also there were minor problems with installing tcp/ip5.0. Follow instructions
and simple check after installation that there are correct links to all
headers and libraries in /usr/include and /usr/lib directories. Also modify
your startup config files. Replace Socket/Socklet on TcpIp.
Good luck! :wink:


Roman [SYSTEMPROM]. The best only for you!
“Carlo Rafalski”

Is there anybody out there ? Still can’t compile the snmp samples !

Regards
Carlo

If I compile snmpget.c the compiler complains about not defined type e.g.
int8_t. In fact this type is nowhere defined. I looked at
/usr/watcom/10.6/usr/include/sys/types.h and found it from beeing from April
1996. I think it must have to do with my watcom 10.6 header files. Also my
installer /ect/install is from July 1997 and a qnx web page states it must
be at least from 1999. So my questions are:

How can I update my QNX 4.25 Watcom10.6 system ?

Best Regards
Carlo

After re-installing watcom C 10.6 patch level B I could compile without
errors, because the missing typedefs are now in inttypes.h.

Thanks for helping
Carlo