[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiling tcpdump 3.8.3 on hp-ux 11.23

In pcap-dlpi.c, get_dlpi_ppa() is declared (statically) and used if
/dev/dlpi exists (i.e., if HAVE_DEV_DLPI is defined).  However, the
function is only defined if either DL_HP_PPA_ACK_OBS (for hp-ux 10 and
11) or HAVE_HPUX9 (hp-ux 9) is defined.

The only file in which DL_HP_PPA_ACK_OBS is used is pcap-dlpi.c; it is
not defined anywhere, and 'configure' knows nothing of it.  However,
DL_HP_PPA_ACK is defined in /usr/include/sys/dlpi_ext.h.  Further
investigation notes that DL_HP_PPA_ACK_OBS _is_ defined in hp-ux 10.20
(and noted as obsolete), so this wasn't intended as a comment block.

The following kludge will solve the problem:
  % cd <libpcap_dir>
  % echo '#define DL_HP_PPA_ACK_OBS 1' >>config.h
  % rm -f pcap-dlpi.o && gmake
  % cd <tcpdump_dir>
  % gmake

Changing the checks to DL_HP_PPA_ACK instead of DL_HP_PPA_ACK_OBS will
work as well.

I should further note that i looked up CVS logs on this file, and, while
0.8.3 is the newest available release of libpcap, the cvs version has
been corrected, changing checks for DL_HP_PPA_ACK_OBS to DL_HP_PPA_REQ.
I'm not sure why an interface that was clearly marked as obsolete (the
relevant section of the header file in hp-ux 10.20 even states that no
applications in 10.0 or later should use it) would have been implemented
in libpcap in the first place.


edelkind-debug@episec.com wrote:

> Compiling tcpdump 3.8.3 on hp-ux 11.23 yields the following error:
> --------------------------------------------------------------
> gcc -O2 -O2 -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -I. -I./../libpcap-0.8.3  -I./missing  -o tcpdump addrtoname.o gmpls.o gmt2local.o machdep.o oui.o parsenfsfh.o print-802_11.o print-ap1394.o print-ah.o print-arcnet.o print-aodv.o print-arp.o print-ascii.o print-atalk.o print-atm.o print-beep.o print-bfd.o print-bgp.o print-bootp.o print-cdp.o print-chdlc.o print-cip.o print-cnfp.o print-decnet.o print-domain.o print-dvmrp.o print-enc.o print-egp.o print-esp.o print-ether.o print-fddi.o print-fr.o print-gre.o print-hsrp.o print-icmp.o print-igmp.o print-igrp.o print-ip.o print-ipcomp.o print-ipfc.o print-ipx.o print-isakmp.o print-isoclns.o print-krb.o print-l2tp.o print-lane.o print-ldp.o print-llc.o print-lwres.o print-mobile.o print-mpls.o print-msdp.o print-nfs.o print-ntp.o print-null.o print-ospf.o print-pflog.o print-pim.o print-ppp.o print-pppoe.o print-pptp.o print-radius.o print-raw.o print-rip.o print-rsvp.o print-rx.o print-sctp.o print-sl.o print-sll.o print-snmp.o print-stp.o print-sunatm.o print-sunrpc.o print-tcp.o print-telnet.o print-tftp.o print-timed.o print-token.o print-udp.o print-vjc.o print-vrrp.o print-wb.o print-zephyr.o setsignal.o tcpdump.o util.o version.o print-ip6.o print-ip6opts.o print-mobility.o print-ripng.o print-icmp6.o print-frag6.o print-rt6.o print-ospf6.o print-dhcp6.o print-smb.o smbutil.o  strlcat.o strlcpy.o strsep.o ./../libpcap-0.8.3/libpcap.a -lnsl 
> ld: Unsatisfied symbol "get_dlpi_ppa" in file ./../libpcap-0.8.3/libpcap.a[pcap-dlpi.o]
> 1 errors.
> collect2: ld returned 1 exit status
> gmake: *** [tcpdump] Error 1
> --------------------------------------------------------------
> It seems that libpcap.a (0.8.3) uses get_dlpi_ppa(), but does not define
> the function.  Researching.
> ari