Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#9 AIX machine considered as a printer

open
nobody
None
5
2002-03-25
2002-03-25
Anonymous
No

An IBM PowerPC machine running AIX OS is wrongly
considered as a printer. I would expect npadmin to
skip this machine with the msg

Warning: <IP Addr> does not appear to be a printer.
Skipping.

In the routine do_general_get( ) (npahelpers.C)

gpi.sysDesc has the following string:

"IBM PowerPC CHRP Computer\nMachine Type: 0x0800004c
Processor id: 000C6A7D4C00\nBase Operating System
Runtime AIX version: 04.03.0003.0000\nTCP/IP Client
Support version: 04.03.0003.0000"

Because of this, the following check (at line 528) in
do_general_get()

} else if(!strncmp(gpi.sysDesc,IBMSTR,3)) {

succeeds, and so the AIX machine is wrongly assumed as
a printer.

I am running npadmin 0.8.7 on FreeBSD.

BTW, is it correct to use a "!" in every condition
(line 607 in npahelpers.C)?

} else if(!strstr(gpi.sysDesc,"HP-UX") ||
!strstr(gpi.sysDesc,"HPUX") ||
!strstr(gpi.sysDesc,"Windows NT") ||
!strstr(gpi.sysDesc,"Sun SNMP Agent") ||
!strstr(gpi.sysDesc,"SunOS") ||
!strstr(gpi.sysDesc,"Macintosh") ||
!strstr(gpi.sysDesc,"UNIX")){

Should it not be
if (strstr (HP-UX) || strstr(HPUX) ....)?

Discussion