diff options
-rw-r--r-- | INSTALL | 4 | ||||
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | README.aix | 265 | ||||
-rw-r--r-- | gtk/main.c | 3 |
4 files changed, 270 insertions, 3 deletions
@@ -18,13 +18,15 @@ Installation Checklist need to install a "gtk-devel" .rpm. [ ] 2. If you want to capture packets, make sure you have libpcap - installed. The latest version can be found at + installed. The latest "official" version can be found at ftp://ftp.ee.lbl.gov . Make sure you install the headers ('make install-incl') when you install the library. + New development of libpcap is occurring at www.tcpdump.org + If you installed libpcap from a binary package, you may have to install a "development" package; for example, there's apparently a "libpcap0" Debian package, but it just includes a @@ -29,6 +29,7 @@ Ethereal is known to compile and run on the following systems: - Sequent PTX v4.4.5 (Nick Williams <njw@sequent.com>) - Tru64 UNIX (formerly Digital UNIX) (3.2, 4.0) - Irix (version?) + - AIX (4.3.2, with a bit of work) It should run on other systems without too much trouble. diff --git a/README.aix b/README.aix new file mode 100644 index 0000000000..4015d2af8d --- /dev/null +++ b/README.aix @@ -0,0 +1,265 @@ +After much work and toil, Craig Rodrigues was able to compile libpcap and Ethereal +on AIX 4.3.2. His odyssey is document in various e-mails at +http://ethereal.zing.org/lists/ethereal-dev/199911/ + +Here are a few excerpts. + + + +Subject: Re: [ethereal-dev] Re: [ethereal-users] Problems compiling 0.7.7 under AIX 4.3.2 +From: Gilbert Ramirez <gram@xiexie.org> +Date: Fri, 5 Nov 1999 16:58:17 -0600 +To: Guy Harris <guy@netapp.com> +Cc: Craig Rodrigues <rodrigc@mediaone.net>, ethereal-dev@zing.org + + +On Fri, Nov 05, 1999 at 01:42:44PM -0600, Guy Harris wrote: +> +> +> Hmm. +> +> Looks suspiciously similar to the previous error; have you tried +> recompiling GTK+ with "xlc_r"? + +I believe glib and gtk+ should both be compiled with xlc_r. I haven't +compiled on AIX in a long time, but I think it's because glib is including +pthread stuff, so the re-entrant C library, libc_r, is needed. + + +Compiler Invocation + +When compiling a multi-threaded program, you should invoke the C compiler +using one of the following commands: + +xlc_r + Invokes the compiler with default language level of ansi. +cc_r + Invokes the compiler with default language level of extended. + + +These commands ensure that the adequate options and libraries are used to be +compliant with the X/Open Version 5 Standard. The POSIX Threads +Specification 1003.1c is a subset of the X/Open Specification. + +The following libraries are automatically linked with your program when using these commands: + +libpthreads.a + Threads library. +libc.a + Standard C library + + +For example, the following command compiles the foo.c multi-threaded C source file and produces the foo executable file: + +cc_r -o foo foo.c + +See the cc command for more information about C For AIX. + + +--gilbert + + +To: ethereal-users@zing.org +Subject: [ethereal-dev] AIX: gtk problem solved, now an ethereal problem +From: Craig Rodrigues <rodrigc@mediaone.net> +Date: Mon, 8 Nov 1999 10:46:25 -0500 +Cc: ethereal-dev@zing.org + + +Hi, + +After much sweat and toil, I have managed to get gtk 1.2.6 to +compile and not dump core under AIX. The solutions were to +(1) apply the attached patch to the configure.in in the glib-1.2.6 +subdirectory + +(2) In the file gtk+-1.2.6/gtk/Makefile, add a link flag -lgdk to link +in gdk. + +I have submitted (1) to the gtk-devel mailing list where it has been +accepted. (2) is an uglier problem, but for now, adding -lgdk by hand +seems to work. + +Now I have a problem....I compiled gtk, and that works. +I compiled ethereal (after some minor mods), and it starts, +but when I click on Capture -> Start, I get: + +"There are no network interfaces that can be opened." + +I am running as root, so I don't think permissions are a problem. + +Any ideas? + +Thanks. +-- +Craig Rodrigues +http://www.gis.net/~craigr +rodrigc@mediaone.net + +*** configure.in.old Thu Oct 7 17:27:43 1999 +--- configure.in Sun Nov 7 19:34:36 1999 +*************** +*** 795,809 **** + fi + if test "$ac_cv_func_getpwuid_r" = "yes"; then + AC_MSG_CHECKING(whether getpwuid_r is posix like) +! # getpwuid_r(0, NULL, NULL, 0) is the signature on +! # solaris, if that is not found, the prog below won't +! # compile, then the posix signature is assumed as +! # the default. +! AC_TRY_COMPILE([#include <pwd.h>], +! [getpwuid_r(0, NULL, NULL, 0);], +! [AC_MSG_RESULT(no)], +! [AC_MSG_RESULT(yes) +! AC_DEFINE(HAVE_GETPWUID_R_POSIX)]) + fi + fi + if test x"$have_threads" = xposix; then +--- 795,809 ---- + fi + if test "$ac_cv_func_getpwuid_r" = "yes"; then + AC_MSG_CHECKING(whether getpwuid_r is posix like) +! # The signature for the POSIX version is: +! # int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **) +! AC_TRY_COMPILE([#include <pwd.h> +! #include <sys/types.h> +! #include <stdlib.h>], +! [getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL);], +! [AC_DEFINE(HAVE_GETPWUID_R_POSIX) +! AC_MSG_RESULT(yes)], +! [AC_MSG_RESULT(no)]) + fi + fi + if test x"$have_threads" = xposix; then + + + +To: ethereal-dev@zing.org +Subject: Re: [ethereal-dev] AIX: gtk problem solved, now an ethereal problem +From: Craig Rodrigues <rodrigc@mediaone.net> +Date: Wed, 10 Nov 1999 12:18:47 -0500 + + + +Hi, + +OK, I'm getting closer and closer to this working on AIX. + +Things I've done: + +(1) In a bunch of places in the code I removed '//' style C++ comments +which the IBM C compiler didn't like. + +(2) I also found some places in the code like: + +enum some_enum { FOO, BAR, }; + +IBM C did not like the trailing "," after BAR. + +(3) In packet-ipv6.h, IPV6_VERSION is defined, but that is already +defined in <netinet/in.h> on AIX 4.3, so for now I just commented that out. + +(4) in packet-afs.c, when it sucks in <netinet/in.h>, in.h sucks in +<sys/machine.h> which defines LITTLE_ENDIAN. This conflicts with +LITTLE_ENDIAN in globals.h. So what I did was, in globals.h, I added: + +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif + +So after doing all these things, I can compile ethereal and run it. +I can list the +correct network interfaces on my system: lo0 and en0. However, +when I start capturing packets on en0, they are all of the protocol type +"TRMAC" and "TR". The only problem is, I'm not on a Token Ring network. + +Any ideas? + +No. Time Source Destination Protocol Info +1 0.000000 0a:30:a1:08:00:45 06:74:60:08:00:5a TR Token-Ring Unknown +2 0.210304 0a:30:a1:08:00:45 06:74:60:08:00:5a TR Token-Ring Unknown +3 0.926080 0a:30:a1:08:00:45 06:74:60:08:00:5a TR Token-Ring Unknown +4 0.4236416 0a:30:a1:08:00:45 06:74:60:08:00:5a TR Token-Ring Unknown +5 0.4712064 6f:06:74:60:08:00 5a:8a:30:a1:00:00 TR MAC Unknown Major Vector: 127 + + +--------------------- +It turns out that libpcap was using IFT_* numbers instead of DLT_* numbers for +link types. That has been fixed +--------------------- + + +To: tcpdump-workers@tcpdump.org +Subject: [ethereal-dev] Sucess with libpcap under AIX +From: Craig Rodrigues <rodrigc@mediaone.net> +Date: Sat, 20 Nov 1999 03:34:50 -0500 +Cc: ethereal-dev@zing.org + + +Hi, + +I have managed to successfully compile and use the latest +snapshot of libpcap under AIX using DLPI. bpf is majorly +brain-dead under AIX, and very unsupported. Rather than +find all the bugs in AIX's bpf, I decided to try using +dlpi, which is officially supported. + +The first step is to get the setup right. To determine if +you have the dlpi driver loaded correctly, type: +strload -q -d dlpi + +If the result is: +dlpi: yes + +then you are ready to use dlpi. + +If you get: +dlpi: no + +Then you need to type: +strload -f /etc/dlpi.conf + +Check again with strload -q -d dlpi that the dlpi driver is loaded. + +I had to make one minor code change to pcap-dlpi.c. Maybe someone +can explain it to me, because I am not familiar with dlpi or +streams programming. It took me hours to figure this out, because +I'm not familiar with dlpi. + +In pcap-dlpi.c, lines 316-320: +#if !defined(HAVE_HPUX9) && !defined(HAVE_HPUX10_20) && !defined(sinix) + if (dlbindreq(p->fd, 0, ebuf) < 0 || + dlbindack(p->fd, (char *)buf, ebuf) < 0) + goto bad; +#endif + +I changed it to: +#if !defined(HAVE_HPUX9) && !defined(HAVE_HPUX10_20) && !defined(sinix) + if (dlbindreq(p->fd, 1620, ebuf) < 0 || + dlbindack(p->fd, (char *)buf, ebuf) < 0) + goto bad; +#endif + +I picked the number 1620 out of thin air. The second parameter +to dlbindreq() sets the value of dl_sap. This dl_sap +value is then passed along to the DLPI driver through +the DL_BIND_REQ primitive. I guess that it cannot be 0 under +AIX, but I'm not sure. + +If someone knows anything about DLPI, I'd appreciate a clarification. +Basically, I am just using the DLPI specification at: +http://www.opengroup.org/onlinepubs/009638599/ which is pretty good. +The AIX documentation is not so well written. + +But basically, after I fixed up pcap-dlpi.c, I managed to get libpcap +working under AIX. This enabled me to successfully run Ethereal, +ie. all the packets on my Ethernet network correctly showed up +as Ethernet and not Token Ring in the Ethereal screen. + +YAY! +-- +Craig Rodrigues +http://www.gis.net/~craigr +rodrigc@mediaone.net + + diff --git a/gtk/main.c b/gtk/main.c index 8a66e81201..1bf91ad46a 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1,6 +1,6 @@ /* main.c * - * $Id: main.c,v 1.42 1999/11/22 06:24:54 gram Exp $ + * $Id: main.c,v 1.43 1999/11/23 03:50:40 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -26,7 +26,6 @@ * * To do: * - Graphs - * - Get AIX to work * - Check for end of packet in dissect_* routines. * - Playback window * - Multiple window support |