Burton: please find attached a copy of the man page for the AIX version of gethostbyaddr_r. as far as the first error is concerned the 2 types "crid_t" and "class_id_t" are #defined in /usr/include/sys/types.h.
Jim Lane Sr. Technical Consultant Network Services Toronto Hydro office: (416)-542-2820 cell: (416)-896-8576 >>> [EMAIL PROTECTED] 02-Jan-03 12:25:16 PM >>> Using AIX ... that's what's wrong. Although there is some coding for AIX 4, I'm not aware of anyone using ntop on it, post v1.3. I've asked and nobody has ever come back saying they were trying to use AIX 4. Means that what's there is probably broken... There are, IIRC one or two AIX 5 people. If you're willing to do the work, I'll help you get fixes in, with some caveats... 1. I Don't have access to an AIX box, so it's going to be you fixing things, sending me patches to include. I'll make suggestions, etc. but you're going to have to do the research and legwork. 2. Understand that it ultimately may never work or have issues (e.g. HPUX 10.20 runs ntop, but not multi-threaded). 3. It will have to be in the development versions, that is 2.1.54... I'm not going to backport or maintain 2.1.3... As a guess: /usr/include/sys/proc.h:203: parse error before `crid_t' /usr/include/sys/proc.h:203: warning: no semicolon at end of struct or union /usr/include/sys/proc.h:212: parse error before `p_class' /usr/include/sys/proc.h:212: warning: data definition has no type or storage class /usr/include/sys/proc.h:355: parse error before `}' Sounds like some kind of issue in the AIX library... it's often is missing (OS unique) include that has the definitions for the key structures. Grep in the library for crid_t and p_class, to fing out where they're defined and add the #include address.c: In function `resolveAddress': address.c:215: warning: passing arg 1 of `gethostbyaddr_r' discards qualifiers from pointer target type address.c:215: warning: passing arg 5 of `gethostbyaddr_r' from incompatible pointer type address.c:215: too many arguments to function `gethostbyaddr_r' address.c:215: warning: assignment makes pointer from integer without a cast Sounds like AIX's gethostbyaddr_r is different than others - need to compare man pages and fixup a wrapper or something. -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jim Lane Sent: Thursday, January 02, 2003 10:16 AM To: [EMAIL PROTECTED] Subject: [Ntop-dev] error compiling NTOP 2.1.3 on AIX 4.3.3 Hi, All i'm having a problem trying to compile ntop 2.1.3 on AIX 4.3.3. when i run a make i get errors as follows: make all-recursive Making all in . source='address.c' object='address.lo' libtool=yes depfile='.deps/address.Plo' tmpdepfile='.deps/address.TPlo' depmode=gcc /bin/sh ./depcomp /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -I/usr/local/include -I/home/lanej/ntop-2.1.3/gdchart0.94c -g -O2 -pipe -c -o address.lo `test -f 'address.c' || echo './'`address.c gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -I/usr/local/include -I/home/lanej/ntop-2.1.3/gdchart0.94c -g -O2 -pipe -c address.c -Wp,-MD,.deps/address.TPlo -DPIC -o address.lo In file included from ntop.h:376, from address.c:21: /usr/include/pthread.h:35: warning: `_THREAD_SAFE' redefined ntop.h:175: warning: this is the location of the previous definition In file included from /usr/include/sys/pri.h:29, from /usr/include/sys/sched.h:38, from /usr/include/sched.h:52, from ntop.h:359, from address.c:21: /usr/include/sys/proc.h:203: parse error before `crid_t' /usr/include/sys/proc.h:203: warning: no semicolon at end of struct or union /usr/include/sys/proc.h:212: parse error before `p_class' /usr/include/sys/proc.h:212: warning: data definition has no type or storage class /usr/include/sys/proc.h:355: parse error before `}' address.c: In function `resolveAddress': address.c:215: warning: passing arg 1 of `gethostbyaddr_r' discards qualifiers from pointer target type address.c:215: warning: passing arg 5 of `gethostbyaddr_r' from incompatible pointer type address.c:215: too many arguments to function `gethostbyaddr_r' address.c:215: warning: assignment makes pointer from integer without a cast make: 1254-004 The error code from the last command is 1. Stop. make: 1254-004 The error code from the last command is 1. Stop. make: 1254-004 The error code from the last command is 2. Stop. can anybody suggest what i may be doing wrong here. TIA Jim Lane Sr. Technical Consultant Network Services Toronto Hydro office: (416)-542-2820 cell: (416)-896-8576 _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop-dev _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop-devTitle: Technical Reference: Communications, Volume 2 - gethostbyaddr_r Subroutine
Technical Reference: Communications, Volume 2
gethostbyaddr_r Subroutine
Purpose
Gets network host entry by address.
Library
Standard C Library (libc.a) (libbind) (libnis) (liblocal)
Syntax
#include <netdb.h> int gethostbyadd_r(Addr, Len, Type, Htent, Ht_data) const char *Addr, size_t Len, int Type, struct hostent *Htent, struct hostent_data *Ht_data;
Description
This function internally calls the gethostbyaddr subroutine and stores the value returned by the gethostbyaddr subroutine to the hostent structure.
Parameters
| Addr | Points to the host address which is a constant string. |
| Len | Specifies the length of the address. |
| Type | Specifies the domain type of the host address. This works only on the address family AF_INET. |
| Htent | Points to a hostent structure which is used to store the return value of the gethostaddr subroutine. |
| Ht_data | Points to a hostent_data structure. |
Return Values
The function returns a 0 if successful and a -1 if unsuccessful.
Note
The return value of the gethostbyaddr
subroutine points to static data that is overwritten by subsequent calls.
This data must be copied at every call to be saved for use by subsequent calls.
The gethostbyaddr_r subroutine solves this problem.
If the Name parameter is a hostname, this subroutine searches for a machine with that name as an IP address. Because of this, use the gethostbyname_r subroutine.
Error Codes
The gethostbyaddr_r subroutine is unsuccessful if any of the following errors occur:
| HOST_NOT_FOUND | The host specified by the Name parameter was not found. |
| TRY_AGAIN | The local server did not receive a response from an authoritative server. Try again later. |
| NO_RECOVERY | Indicates an unrecoverable error occured. |
| NO_ADDRESS | The requested Name parameter is valid but does not have an Internet address at the name server. |
| SERVICE_UNAVAILABLE | None of the name services specified are running or available. |
| EINVAL | The hostent pointer is NULL |
Files
| /etc/hosts | Contains the host name data base. |
| /etc/resolv.conf | Contains the name server and domain name. |
| /etc/netsvc.conf | Contains the name services ordering. |
| /usr/include/netdb.h | Contains the network database structure. |
Related Information
endhostent_r Subroutine, gethostbyaddr_r Subroutine, gethostent_r Subroutine, and sethostent_r Subroutine.
