Re: [Rpcap-users] Re: rtdump won't compile...
Status: Alpha
Brought to you by:
sri_krishnan
|
From: S. K. <sri...@ya...> - 2002-11-02 22:42:57
|
OK, Matt, Looks like the problem is with pcap.h. The problem is with Red Hat's pcap.h install, which is in /usr/include/pcap/pcap.h, and which I kind of accepted by default while building the code. I guess your Debian install is elsewhere. The rtdump.c headers look for pcap.h as "#include <pcap.h>", and so look for it in only the standard places. Unfortunately, I have so far built and tested both rpcap and rtdump on Red Hat systems only. Could you please open rtdump.c and replace the "#include <pcap.h>" line with something like "#include "/usr/local/include/pcap.h", or whatever is appropriate for your pcap install, and see if that fixes things? In any case, the entire autoconf pcap header detection thing in both rpcap and rtdump is broken, and I will look into fixing it this week itself. I will mail as soon as I get a proper fix. Please let me know if this kludge works. Regards, Krishnan --- Mattt <ma...@ab...> wrote: > On Sat, 2002-11-02 at 05:59, S. Krishnan wrote: > > It looks like rtdump is not able to link to librpcap. > > Yes, that's what I thought. I've played around a bit with it, but > can't > make it budge... > > > - Which platform (H/W, OS) and OS version are you using? > > I originally tried (without success) to build rpcap locally, on my > Debian Sarge (testing) box, K6II/500, 128mb/RAM, debian libpcap-dev > package. > > I then shifted over to a Sid (unstable) unstable box I'm running as a > collector and analysis box (loghost, snort, etc, etc). This one has > an > IDT Winchip 200mhz CPU (ix86 compat), and 64mb/RAM. After a short > play > with the Debian libpcap-dev package, I built pcap from source, and > installed it. > > rpcap was still complaining about the lack of pcap/pcap.h, and after > some trial and error, I managed to build rpcap from clean source by > adjusting some paths (/usr/local/lib and /usr/lib) in rpcap and > copying > /usr/local/lib/pcap.h to /usr/local/lib/pcap/pcap.h - I'm guessing > (having not tested the probe yet) that this is where the problem > lies. > > > - What problems did you encounter with building and installing > rpcap, > > since an improper rpcap install would cause the error messages that > you > > encountered? It would be nice to have a copy of the configure > logfile > > that running ./configure would have generated in the build > directory. > > As described abovely, rpcap is now built and installed on the > collector > machine (the probes won't be run from there, but for the purpose of > the > build....). I haven't run the executable yet, as I don't have a > client > to listen... config.log is attached. > > > - Do you see any librpcap libraries in your install directory (the > > default is /usr/local/lib, unless you have changed it)? > > Yes. librcap-dev.so librpcap.a librpcap.la librpcap.so (libpcap.a is > also there). > > > - Could you also see if you could mail a copy of the configure log > file > > for rtdump too? > > Certainly. Done ;-) > > > Also, would it be possible for you to subscribe to the rpcap-users > > mailing list (you can find it on the sourceforge project page, at > > Of course. I only failed to this time as it was empty. Now subscribed > ;-) > > > --- Mattt <ma...@ab...> wrote: > > > Greetings, > > > > > > Finally arm-wrestled rpcap into building (although as yet > untested) - > > > now can't get rtdump to compile. It fails with : > > > > > > > > > > > > ====================================================================== > > > gcc -O2 -DHAVE_CONFIG_H -I. -I./missing -I/usr/include > > > -I/usr/include/openssl -L/usr/lib -o > > > rtd ump rtdump.o > > > print-arp.o print-atalk.o print-atm.o print-bootp.o > print-decnet.o > > > print-domain.o pr > > > int-dvmrp.o print-egp.o print-ether.o print-fddi.o print-gre.o > > > print-icmp.o print-igmp.o > > > print-ig rp.o > > > print-ip.o > > > print-ipx.o print-isoclns.o print-krb.o print-llc.o print-nfs.o > > > print-ntp.o print > > > -null.o > > > print-ospf.o print-pim.o print-ppp.o print-raw.o print-rip.o > > > print-sl.o > > > print-snmp.o prin > > > t-stp.o > > > print-sunrpc.o print-tcp.o print-tftp.o print-udp.o print-wb.o > > > addrtoname.o gmt2local.o m > > > > > > > achdep.o parsenfsfh.o util.o savestr.o setsignal.o print-esp.o > > > print-ah.o print-vjc.o > > > print-isakm p.o > > > print-chdlc.o print-ipcomp.o print-mobile.o print-l2tp.o > print-bgp.o > > > print-rx.o print-lane.o > > > > > > > print-cip.o print-pppoe.o print-lcp.o print-smb.o smbutil.o > > > print-ascii.o print-telnet.o > > > print-cn fp.o > > > print-vrrp.o > > > print-cdp.o print-token.o print-bxxp.o print-timed.o > print-radius.o > > > print-sll.o > > > str_utils.o > > > version.o strlcat.o strlcpy.o bpf_dump.o -lcrypto -lrpcap -lnsl > > > rtdump.o(.text+0x52c): In function `main': > > > : undefined reference to `pcap_open_offline' > > > rtdump.o(.text+0x94e): In function `main': > > > : undefined reference to `pcap_dump_open' > > > rtdump.o(.text+0x976): In function `main': > > > : undefined reference to `pcap_dump' > > > rtdump.o(.text+0xa65): In function `cleanup': > > > : undefined reference to `pcap_file' > > > rtdump.o(.text+0xbe1): In function `usage': > > > : undefined reference to `pcap_version' > > > addrtoname.o(.text+0x938): In function `init_eprotoarray': > > > : undefined reference to `eproto_db' > > > addrtoname.o(.text+0x93e): In function `init_eprotoarray': > > > : undefined reference to `eproto_db' > > > addrtoname.o(.text+0x99e): In function `init_eprotoarray': > > > : undefined reference to `eproto_db' > > > addrtoname.o(.text+0x9c8): In function `init_protoidarray': > > > : undefined reference to `eproto_db' > > > addrtoname.o(.text+0x9ce): In function `init_protoidarray': > > > : undefined reference to `eproto_db' > > > addrtoname.o(.text+0xa79): more undefined references to > `eproto_db' > > > follow > > > util.o(.text+0x566): In function `read_infile': > > > : undefined reference to `pcap_strerror' > > > util.o(.text+0x59a): In function `read_infile': > > > : undefined reference to `pcap_strerror' > > > util.o(.text+0x5e1): In function `read_infile': > > > : undefined reference to `pcap_strerror' > > > bpf_dump.o(.text+0xaf): In function `bpf_dump': > > > : undefined reference to `bpf_image' > > > collect2: ld returned 1 exit status > > > make: *** [rtdump] Error 1 > > > direwolf:/usr/local/src/rtdump# > > > > > > ======================================================================== > > > > > > Any ideas? > > -- > Cheers, > Mattt. icq : 117539757 > aboveNetworks tel : 0438 749 962 > ma...@ab... (mail/jabber) www : www.above.nq4u.net > > There are only 10 kinds of people. > Those who understand binary, and those who don't. > > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > > configure:642: checking host system type > configure:663: checking target system type > configure:681: checking build system type > configure:770: checking for gcc > configure:883: checking whether the C compiler (gcc ) works > configure:899: gcc -o conftest conftest.c 1>&5 > configure:925: checking whether the C compiler (gcc ) is a > cross-compiler > configure:930: checking whether we are using GNU C > configure:958: checking whether gcc accepts -g > configure:995: checking gcc version > configure:1138: checking for inline > configure:1179: checking for __attribute__ > configure:1224: checking how to run the C preprocessor > configure:1307: checking for fcntl.h > configure:1307: checking for rpc/rpcent.h > configure:1307: checking for netinet/if_ether.h > configure:1344: checking whether time.h and sys/time.h may both be > included > configure:1383: checking Linux kernel version > configure:1418: checking for smi.h > configure:1455: checking for smiInit in -lsmi > configure:1502: checking whether to enable libsmi > configure:1530: gcc -o conftest -g -O2 conftest.c 1>&5 > configure:1511: smi.h: No such file or directory > configure: failed program was: > #line 1509 "configure" > #include "confdefs.h" > /* libsmi available check */ > #include <smi.h> > main() > { > int current, revision, age, n; > const int required = 2; > if (smiInit("")) > exit(1); > if (strcmp(SMI_LIBRARY_VERSION, smi_library_version)) > exit(2); > n = sscanf(smi_library_version, "%d:%d:%d", ¤t, &revision, > &age); > if (n != 3) > exit(3); > if (required < current - age || required > current) > exit(4); > exit(0); > } > > configure:1552: checking whether to enable ipv6 > configure:1591: gcc -o conftest -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len conftest.c 1>&5 > configure: failed program was: > #line 1577 "configure" > #include "confdefs.h" > /* AF_INET6 available check */ > #include <sys/types.h> > #include <sys/socket.h> > main() > { > if (socket(AF_INET6, SOCK_STREAM, 0) < 0) > exit(1); > else > exit(0); > } > > configure:2030: checking for inet_ntop > configure:2043: gcc -c -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len conftest.c 1>&5 > configure:2111: checking for inet_pton > configure:2124: gcc -c -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len conftest.c 1>&5 > configure:2192: checking for inet_aton > configure:2205: gcc -c -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len conftest.c 1>&5 > configure:2275: checking if sockaddr struct has sa_len member > configure:2314: checking size of char > configure:2353: checking size of short > configure:2392: checking size of int > configure:2431: checking size of long > configure:2473: checking for addrinfo > configure:2517: checking for NI_MAXSERV > configure:2555: checking for NI_NAMEREQD > configure:2593: checking for sockaddr_storage > configure:2634: checking for INADDRSZ > configure:2669: checking for IN6ADDRSZ > configure:2710: checking for RES_USE_INET6 > configure:2751: checking for res_state_ext > configure:2793: checking for nsort in res_state > configure:2839: checking for vfprintf > configure:2839: checking for strcasecmp > configure:2839: checking for strlcat > configure:2839: checking for strlcpy > configure:2896: checking for ether_ntohost > configure:2896: checking for setlinebuf > configure:2953: checking for getipnodebyname > configure:2953: checking for getipnodebyaddr > configure:2953: checking for freeaddrinfo > configure:3017: checking for vsnprintf > configure:3017: checking for snprintf > configure:3075: checking whether byte ordering is bigendian > configure:3166: checking for main in -ldnet > configure:3209: checking for main in -lrpc > configure:3252: checking for getrpcbynumber in -lnsl > configure:3301: checking return type of signal handlers > configure:3365: checking for sigset > configure:3481: checking for gethostbyname > configure:3715: checking for socket > configure:3851: checking for putmsg in -lstr > configure:3963: checking for local rpcap library > configure:3982: checking for pcap_open_live in -lrpcap > configure:4052: checking for bpf_dump > configure:4137: checking for u_int8_t using gcc > configure:4175: checking for int16_t using gcc > configure:4213: checking for u_int16_t using gcc > configure:4251: checking for int32_t using gcc > configure:4289: checking for u_int32_t using gcc > configure:4367: checking if sockaddr struct has sa_len member > configure:4402: checking if unaligned accesses fail > configure:4467: checking for h_errno > configure:4509: checking for SSLeay > configure:4541: checking for des_cbc_encrypt in -lcrypto > configure:4594: checking for cast.h > configure:4633: checking for buggy CAST128 > configure:4657: gcc -o conftest -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len -I$(srcdir)/missing -I$(srcdir)/missing > -I/usr/include -I/usr/include/openssl -L/usr/lib conftest.c -lcrypto > -lrpcap -lnsl 1>&5 > configure: failed program was: > #line 4638 "configure" > #include "confdefs.h" > > #include <cast.h> > main() > { > unsigned char key[] = {0x01,0x23,0x45,0x67,0x12}; > unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF}; > unsigned char out[sizeof(in)]; > unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E}; > CAST_KEY ks; > CAST_set_key(&ks, sizeof(key), key); > CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT); > if (memcmp(out, ok, sizeof(ok)) != 0) > return 0; > else > return 1; > } > configure:4689: checking for rc5.h > configure:4744: checking for a BSD compatible install > > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > > configure:642: checking host system type > configure:663: checking target system type > configure:681: checking build system type > configure:770: checking for gcc > configure:883: checking whether the C compiler (gcc ) works > configure:899: gcc -o conftest conftest.c 1>&5 > configure:925: checking whether the C compiler (gcc ) is a > cross-compiler > configure:930: checking whether we are using GNU C > configure:958: checking whether gcc accepts -g > configure:995: checking gcc version > configure:1138: checking for inline > configure:1179: checking for __attribute__ > configure:1224: checking how to run the C preprocessor > configure:1307: checking for fcntl.h > configure:1307: checking for rpc/rpcent.h > configure:1307: checking for netinet/if_ether.h > configure:1344: checking whether time.h and sys/time.h may both be > included > configure:1383: checking Linux kernel version > configure:1418: checking for smi.h > configure:1455: checking for smiInit in -lsmi > configure:1502: checking whether to enable libsmi > configure:1530: gcc -o conftest -g -O2 conftest.c 1>&5 > configure:1511: smi.h: No such file or directory > configure: failed program was: > #line 1509 "configure" > #include "confdefs.h" > /* libsmi available check */ > #include <smi.h> > main() > { > int current, revision, age, n; > const int required = 2; > if (smiInit("")) > exit(1); > if (strcmp(SMI_LIBRARY_VERSION, smi_library_version)) > exit(2); > n = sscanf(smi_library_version, "%d:%d:%d", ¤t, &revision, > &age); > if (n != 3) > exit(3); > if (required < current - age || required > current) > exit(4); > exit(0); > } > > configure:1552: checking whether to enable ipv6 > configure:1591: gcc -o conftest -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len conftest.c 1>&5 > configure: failed program was: > #line 1577 "configure" > #include "confdefs.h" > /* AF_INET6 available check */ > #include <sys/types.h> > #include <sys/socket.h> > main() > { > if (socket(AF_INET6, SOCK_STREAM, 0) < 0) > exit(1); > else > exit(0); > } > > configure:2030: checking for inet_ntop > configure:2043: gcc -c -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len conftest.c 1>&5 > configure:2111: checking for inet_pton > configure:2124: gcc -c -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len conftest.c 1>&5 > configure:2192: checking for inet_aton > configure:2205: gcc -c -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len conftest.c 1>&5 > configure:2275: checking if sockaddr struct has sa_len member > configure:2314: checking size of char > configure:2353: checking size of short > configure:2392: checking size of int > configure:2431: checking size of long > configure:2473: checking for addrinfo > configure:2517: checking for NI_MAXSERV > configure:2555: checking for NI_NAMEREQD > configure:2593: checking for sockaddr_storage > configure:2634: checking for INADDRSZ > configure:2669: checking for IN6ADDRSZ > configure:2710: checking for RES_USE_INET6 > configure:2751: checking for res_state_ext > configure:2793: checking for nsort in res_state > configure:2839: checking for vfprintf > configure:2839: checking for strcasecmp > configure:2839: checking for strlcat > configure:2839: checking for strlcpy > configure:2896: checking for ether_ntohost > configure:2896: checking for setlinebuf > configure:2953: checking for getipnodebyname > configure:2953: checking for getipnodebyaddr > configure:2953: checking for freeaddrinfo > configure:3017: checking for vsnprintf > configure:3017: checking for snprintf > configure:3075: checking whether byte ordering is bigendian > configure:3166: checking for main in -ldnet > configure:3209: checking for main in -lrpc > configure:3252: checking for getrpcbynumber in -lnsl > configure:3301: checking return type of signal handlers > configure:3365: checking for sigset > configure:3481: checking for gethostbyname > configure:3715: checking for socket > configure:3851: checking for putmsg in -lstr > configure:3963: checking for local rpcap library > configure:3982: checking for pcap_open_live in -lrpcap > configure:4052: checking for bpf_dump > configure:4137: checking for u_int8_t using gcc > configure:4175: checking for int16_t using gcc > configure:4213: checking for u_int16_t using gcc > configure:4251: checking for int32_t using gcc > configure:4289: checking for u_int32_t using gcc > configure:4367: checking if sockaddr struct has sa_len member > configure:4402: checking if unaligned accesses fail > configure:4467: checking for h_errno > configure:4509: checking for SSLeay > configure:4541: checking for des_cbc_encrypt in -lcrypto > configure:4594: checking for cast.h > configure:4633: checking for buggy CAST128 > configure:4657: gcc -o conftest -g -O2 -Dss_family=__ss_family > -Dss_len=__ss_len -I$(srcdir)/missing -I$(srcdir)/missing > -I/usr/include -I/usr/include/openssl -L/usr/lib conftest.c -lcrypto > -lrpcap -lnsl 1>&5 > configure: failed program was: > #line 4638 "configure" > #include "confdefs.h" > > #include <cast.h> > main() > { > unsigned char key[] = {0x01,0x23,0x45,0x67,0x12}; > unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF}; > unsigned char out[sizeof(in)]; > unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E}; > CAST_KEY ks; > CAST_set_key(&ks, sizeof(key), key); > CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT); > if (memcmp(out, ok, sizeof(ok)) != 0) > return 0; > else > return 1; > } > configure:4689: checking for rc5.h > configure:4744: checking for a BSD compatible install > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ |