On Wed, Jan 03, 2001 at 11:12:53PM -1000, Loukas wrote:
> Hey guys,
> great work with libpcap and tcpdump.
> I've been trying to get libpcap to install on Darwin(MacOSX).
> I managed to get it to install (libpcap-0.5.2 install log), witha
> couple of small changes. tcpdump comes pre-installed on
> Darwin and i also installed snort (snort-1.6.3 install log).
> Now the problem is, i can sniff on en0 but not on ppp0
> (atest log). I thought you might find this interesting and
> could possibly add macosx support.
These are mostly problem reports, not patches, so they should go to
"tcpdump-workers", not "patches".
>From the configure log:
checking for gcc... no
checking for cc... cc
checking whether the C compiler (cc ) works... yes
checking whether the C compiler (cc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking gcc version...
./configure: parse error: condition expected: -gt [955]
That one is very odd; there's a clause in that code that does
if test $ac_cv_lbl_gcc_vers -gt 1 ; then
V_CCOPT="-O2"
fi
but unless, somehow, "$ac_cv_lbl_gcc_vers" was empty, that shouldn't
have had a problem.
Now, if somehow Apple insists on calling GCC "cc" but not "gcc", it
could be that the code got confused somehow.
What does "cc -v" print?
In the log of snort and tcpdump:
[lister:Library/Desktop/snort-1.6.3] root# tcpdump -v -i en0
tcpdump: listening on en0
<blah>
[lister:Library/Desktop/snort-1.6.3] root# tcpdump -v -i ppp0
tcpdump: ppp0: Device not configured
Well, *is* device ppp0 configured? What does "ifconfig -a" report (I'm
assuming - hoping - here that MacOS X has a modern "ifconfig" that
supports "-a")?
If it's configured, you might want to ask Apple why you can't attach a
BPF device to it, as that's probably the fault of MacOS X, not of
libpcap.
The changes mentioned were
cc -O -I. -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1
-DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1 -c ./pcap-bpf.c
./gencode.h:182: bad attribute specification, expecting identifier, found
`volatile'
./gencode.h:182: illegal function definition, found `)'
make: *** [pcap-bpf.o] Error 1
i got rid of this error by commenting out the following in gencode.h:
/*#if __STDC__
__dead void bpf_error(const char *, ...)
__attribute__((volatile, format (printf, 1, 2)));
#endif*/
after that make worked fine:
and
to get 'make install' to work, i had to create a user 'bin'
and mkdir /usr/local/lib
For the first one, the 0.6 code doesn't do the "__dead void" stuff, or
the "__attribute__" stuff, although it's a bit surprising that a
compiler that the configure script thought was GCC didn't accept them.
For the second one:
Makefile.in is wired, in 0.6, to use "bin" as the owner; we
may want to go back to making that platform-dependent.
Makefile.in doesn't create "$(DESTDIR)/$(LIBDEST) before
installing the libraries in it; I'll check in code to do so into
the main and x.6 branches.
> ps. I also tried recompiling tcpdump with the new libpcap
> installed, but i had no success. i have a log of that as well if
> youare interested
Yes, we'd want a log of that.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe