tcpdump mailing list archives
HP-UX compiles - redux...
From: Rick Jones <rick.jones2 () hp com>
Date: Tue, 20 Jul 2004 13:46:31 -0700
since i botched the previous email...seeing the ocmpile issue with HP-UX 11.11, I went ahead and downloaded the "current" versions for libpcap and tcpdump. there were some rather simplistic errors that needed to be fixed to get pcap-dlpi.c to compile (HP ANSI C, HP-UX 11.11, no TOUR installed) with the following warnings:
cd /tmp/libpcap-2004.07.20/ $ make cleanrm -f pcap-dlpi.o fad-gifc.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o bpf_dump.o scanner.o grammar.o version.o libpcap.a scanner.c grammar.c version.c tokdefs.h version.h lex.yy.c libpcap*.dylib libpcap.so*
$ make
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./pcap-dlpi.c
cc: "pcap-dlpi.c", line 376: warning 611: Type conversion loses "const" qualifier.
cc: "pcap-dlpi.c", line 376: warning 563: Argument #2 is not the correct type.
cc: "pcap-dlpi.c", line 1411: warning 604: Pointers are not assignment-compatible.
cc: "pcap-dlpi.c", line 1415: warning 604: Pointers are not assignment-compatible.
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./fad-gifc.c
sed -e 's/.*/static const char pcap_version_string[] = "libpcap version
&";/' ./VERSION > version.h
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./pcap.c
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./inet.c
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./gencode.c
cc: "gencode.c", line 272: warning 871: "inline" is allowed only for a function.
cc: "gencode.c", line 285: warning 871: "inline" is allowed only for a function.
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./optimize.c
cc: "optimize.c", line 566: warning 871: "inline" is allowed only for a function.
cc: "optimize.c", line 636: warning 871: "inline" is allowed only for a function.
cc: "optimize.c", line 1513: warning 871: "inline" is allowed only for a function.
cc: "optimize.c", line 1678: warning 871: "inline" is allowed only for a function.
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./nametoaddr.c
cc: "nametoaddr.c", line 273: warning 871: "inline" is allowed only for a function.
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./etherent.c
cc: "etherent.c", line 52: warning 871: "inline" is allowed only for a function.
cc: "etherent.c", line 64: warning 871: "inline" is allowed only for a function.
cc: "etherent.c", line 77: warning 871: "inline" is allowed only for a function.
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./savefile.c
rm -f bpf_filter.c
ln -s ./bpf/net/bpf_filter.c bpf_filter.c
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c bpf_filter.c
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./bpf_image.c
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c ./bpf_dump.c
lex -t scanner.l > $$.scanner.c; mv $$.scanner.c scanner.c
5986/6000 nodes(%e), 21878/25000 positions(%p), 1292/2000 (%n), 47025
transitions, 3621/4000 packed char classes(%k), 14684/16000 packed
transitions(%a), 17206/19000 output slots(%o)
yacc -d grammar.y
mv y.tab.c grammar.c
mv y.tab.h tokdefs.h
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c scanner.c
cc: "pcap-int.h", line 217: warning 573: Parameter list is inconsistent for "yylex".
cc: "scanner.c", line 594: warning 871: "inline" is allowed only for a function.
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_=""
-Dyylval=pcap_lval -c grammar.c
sed -e 's/.*/char pcap_version[] = "&";/' ./VERSION > version.c
cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="" -c version.c
ar rc libpcap.a pcap-dlpi.o fad-gifc.o pcap.o inet.o gencode.o
optimize.o nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o
bpf_dump.o scanner.o grammar.o version.o
ranlib libpcap.a
here is the diff for pcap-dlpi.c:
$ diff -c pcap-dlpi.c.orig pcap-dlpi.c
*** pcap-dlpi.c.orig Tue Jul 20 13:17:25 2004
--- pcap-dlpi.c Tue Jul 20 13:27:44 2004
***************
*** 580,586 ****
* on Solaris, the lack of a DLPI device
* for the loopback interface is just a
* symptom of that inability.
! *
snprintf(ebuf, PCAP_ERRBUF_SIZE,
"%s: No DLPI device found", device);
} else {
--- 580,586 ----
* on Solaris, the lack of a DLPI device
* for the loopback interface is just a
* symptom of that inability.
! */
snprintf(ebuf, PCAP_ERRBUF_SIZE,
"%s: No DLPI device found", device);
} else {
***************
*** 611,618 ****
if (dl_doattach(p->fd, ppa, ebuf) < 0)
goto bad;
#ifdef DL_HP_RAWDLS
! if (send_fd >= 0) {
! if (dl_doattach(p->send_fd, ppa, ebuf) < 0) < 0)
goto bad;
}
#endif
--- 611,618 ----
if (dl_doattach(p->fd, ppa, ebuf) < 0)
goto bad;
#ifdef DL_HP_RAWDLS
! if (p->send_fd >= 0) {
! if (dl_doattach(p->send_fd, ppa, ebuf) < 0)
goto bad;
}
#endif
***************
*** 1415,1422 ****
--- 1415,1427 ----
data.buf = datap;
if (putmsg(fd, &ctl, &data, 0) < 0) {
+ /* only one small problem with this - ebuf is not a parm to
+ ldrawdatareq, and there is already something doing an
+ error up a level when this call fails... */
+ #ifdef bogus
snprintf(ebuf, PCAP_ERRBUF_SIZE,
"dlrawdatareq: putmsg: %s", pcap_strerror(errno));
+ #endif /* bogus */
return (-1);
}
return (0);
tcpdump-current went pretty wel until print-tcp.c:
cc: "print-tcp.c", line 750: error 1530: Undefined struct or union.
cc: "print-tcp.c", line 750: error 1555: Address operator requires an lvalue.
cc: "print-tcp.c", line 750: error 1527: Incompatible types in cast: Must cast
from scalar to scalar or to void type.
cc: "print-tcp.c", line 750: error 1530: Undefined struct or union.cc: "print-tcp.c", line 750: error 1594: The sizeof operator cannot be applied to types with unknown size.
cc: "print-tcp.c", line 751: error 1530: Undefined struct or union. cc: "print-tcp.c", line 751: error 1555: Address operator requires an lvalue.cc: "print-tcp.c", line 751: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.
cc: "print-tcp.c", line 751: error 1530: Undefined struct or union.cc: "print-tcp.c", line 751: error 1594: The sizeof operator cannot be applied to types with unknown size.
cc: "print-tcp.c", line 752: error 1530: Undefined struct or union.
cc: "print-tcp.c", line 780: warning 604: Pointers are not assignment-compatible.
cc: "print-tcp.c", line 780: warning 563: Argument #1 is not the correct type.
*** Error exit code 1
which appears to have something to do with ipv6 stuff:
} else if (IP_V(ip) == 6) {
ip6 = (struct ip6_hdr *)ip;
MD5_Update(&ctx, (char *)&ip6->ip6_src, sizeof(ip6->ip6_src));
MD5_Update(&ctx, (char *)&ip6->ip6_dst, sizeof(ip6->ip6_dst));
len32 = htonl(ntohs(ip6->ip6_plen));
now, there is an ip6_hdr in ip6.h. However, the inclusion of ip6.h is
conditional on INET6:
#ifdef INET6 #include "ip6.h" #endifbut none of that IPv6 stuff where the error hits is conditional on INET6. Without a TOUR installed, HP-UX 11.11 knows little to nothing about IPv6.
I'm not quite sure what to do to fix that code - if I should make it ifdef INET6 and return -1 as if it was an unknown IP version, or what.
rick jones - This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- HP-UX compiles - redux... Rick Jones (Jul 20)
- Re: HP-UX compiles - redux... Guy Harris (Jul 20)
- Re: HP-UX compiles - redux... Rick Jones (Jul 20)
- Re: HP-UX compiles - redux... Rick Jones (Jul 21)
- Re: HP-UX compiles - redux... Guy Harris (Jul 20)
