1*6f9cba8fSJoseph Mingrone# Compiling libpcap on AIX 2*6f9cba8fSJoseph Mingrone 3*6f9cba8fSJoseph Mingrone* Autoconf is expected to work everywhere. 4*6f9cba8fSJoseph Mingrone* Neither AIX lex nor AIX yacc nor AIX m4 are suitable. 5*6f9cba8fSJoseph Mingrone 6*6f9cba8fSJoseph Mingrone## AIX 7.1 7*6f9cba8fSJoseph Mingrone 8*6f9cba8fSJoseph Mingrone* libpcap build fails with rpcapd enabled. 9*6f9cba8fSJoseph Mingrone* GNU M4 1.4.17 works. 10*6f9cba8fSJoseph Mingrone* flex 2.6.4 and GNU Bison 3.5.1 work. 11*6f9cba8fSJoseph Mingrone* CMake 3.16.0 works. 12*6f9cba8fSJoseph Mingrone* GCC 8.3.0 works, XL C 12.1.0 works. 13*6f9cba8fSJoseph Mingrone 14*6f9cba8fSJoseph Mingrone## AIX 7.2 15*6f9cba8fSJoseph Mingrone 16*6f9cba8fSJoseph Mingrone* libpcap build fails with rpcapd enabled. 17*6f9cba8fSJoseph Mingrone* GNU M4 1.4.17 works. 18*6f9cba8fSJoseph Mingrone* flex 2.5.35 and GNU Bison 3.0.4 work. 19*6f9cba8fSJoseph Mingrone* GCC 7.2.0 works, XL C 13.1.3 works. 20*6f9cba8fSJoseph Mingrone 21*6f9cba8fSJoseph Mingrone## Other AIX-related information 22*6f9cba8fSJoseph Mingrone 2357e22627SCy SchubertUsing BPF: 2457e22627SCy Schubert 2557e22627SCy Schubert(1) AIX 4.x's version of BPF is undocumented and somewhat unstandard; the 2657e22627SCy Schubert current BPF support code includes changes that should work around 2757e22627SCy Schubert that; it appears to compile and work on at least one AIX 4.3.3 2857e22627SCy Schubert machine. 2957e22627SCy Schubert 3057e22627SCy Schubert Note that the BPF driver and the "/dev/bpf" devices might not exist 3157e22627SCy Schubert on your machine; AIX's tcpdump loads the driver and creates the 3257e22627SCy Schubert devices if they don't already exist. Our libpcap should do the 3357e22627SCy Schubert same, and the configure script should detect that it's on an AIX 3457e22627SCy Schubert system and choose BPF even if the devices aren't there. 3557e22627SCy Schubert 3657e22627SCy Schubert Also note that tcpdump _binary_ compiled on AIX 4 may have a problem 3757e22627SCy Schubert doing the initial loading of the BPF driver if copied to AIX 5 and 3857e22627SCy Schubert run there (GH #52). tcpdump binary natively compiled on AIX 5 should 3957e22627SCy Schubert not have this issue. 4057e22627SCy Schubert 4157e22627SCy Schubert(2) If libpcap doesn't compile on your machine when configured to use 4257e22627SCy Schubert BPF, or if the workarounds fail to make it work correctly, you 4357e22627SCy Schubert should send to tcpdump-workers@lists.tcpdump.org a detailed bug 4457e22627SCy Schubert report (if the compile fails, send us the compile error messages; 4557e22627SCy Schubert if it compiles but fails to work correctly, send us as detailed as 4657e22627SCy Schubert possible a description of the symptoms, including indications of the 4757e22627SCy Schubert network link-layer type being wrong or time stamps being wrong). 4857e22627SCy Schubert 4957e22627SCy Schubert If you fix the problems yourself, please submit a patch by forking 5057e22627SCy Schubert the branch at 5157e22627SCy Schubert 52*6f9cba8fSJoseph Mingrone https://github.com/the-tcpdump-group/libpcap/tree/master 5357e22627SCy Schubert 5457e22627SCy Schubert and issuing a pull request, so we can incorporate the fixes into the 5557e22627SCy Schubert next release. 5657e22627SCy Schubert 5757e22627SCy Schubert If you don't fix the problems yourself, you can, as a workaround, 5857e22627SCy Schubert make libpcap use DLPI instead of BPF. 5957e22627SCy Schubert 6057e22627SCy Schubert This can be done by specifying the flag: 6157e22627SCy Schubert 6257e22627SCy Schubert --with-pcap=dlpi 6357e22627SCy Schubert 6457e22627SCy Schubert to the "configure" script for libpcap. 6557e22627SCy Schubert 6657e22627SCy SchubertIf you use DLPI: 6757e22627SCy Schubert 6857e22627SCy Schubert(1) It is a good idea to have the latest version of the DLPI driver on 6957e22627SCy Schubert your system, since certain versions may be buggy and cause your AIX 7057e22627SCy Schubert system to crash. DLPI is included in the fileset bos.rte.tty. I 7157e22627SCy Schubert found that the DLPI driver that came with AIX 4.3.2 was buggy, and 7257e22627SCy Schubert had to upgrade to bos.rte.tty 4.3.2.4: 7357e22627SCy Schubert 7457e22627SCy Schubert lslpp -l bos.rte.tty 7557e22627SCy Schubert 7657e22627SCy Schubert bos.rte.tty 4.3.2.4 COMMITTED Base TTY Support and Commands 7757e22627SCy Schubert 7857e22627SCy Schubert Updates for AIX filesets can be obtained from: 7957e22627SCy Schubert ftp://service.software.ibm.com/aix/fixes/ 8057e22627SCy Schubert 8157e22627SCy Schubert These updates can be installed with the smit program. 8257e22627SCy Schubert 8357e22627SCy Schubert(2) After compiling libpcap, you need to make sure that the DLPI driver 8457e22627SCy Schubert is loaded. Type: 8557e22627SCy Schubert 8657e22627SCy Schubert strload -q -d dlpi 8757e22627SCy Schubert 8857e22627SCy Schubert If the result is: 8957e22627SCy Schubert 9057e22627SCy Schubert dlpi: yes 9157e22627SCy Schubert 9257e22627SCy Schubert then the DLPI driver is loaded correctly. 9357e22627SCy Schubert 9457e22627SCy Schubert If it is: 9557e22627SCy Schubert 9657e22627SCy Schubert dlpi: no 9757e22627SCy Schubert 9857e22627SCy Schubert Then you need to type: 9957e22627SCy Schubert 10057e22627SCy Schubert strload -f /etc/dlpi.conf 10157e22627SCy Schubert 10257e22627SCy Schubert Check again with strload -q -d dlpi that the dlpi driver is loaded. 10357e22627SCy Schubert 10457e22627SCy Schubert Alternatively, you can uncomment the lines for DLPI in 10557e22627SCy Schubert /etc/pse.conf and reboot the machine; this way DLPI will always 10657e22627SCy Schubert be loaded when you boot your system. 10757e22627SCy Schubert 10857e22627SCy Schubert(3) There appears to be a problem in the DLPI code in some versions of 10957e22627SCy Schubert AIX, causing a warning about DL_PROMISC_MULTI failing; this might 11057e22627SCy Schubert be responsible for DLPI not being able to capture outgoing packets. 111