xref: /freebsd/contrib/libpcap/doc/README.aix (revision 9f23cbd6cae82fd77edfad7173432fa8dccd0a95)
1# Compiling libpcap on AIX
2
3* Autoconf is expected to work everywhere.
4* Neither AIX lex nor AIX yacc nor AIX m4 are suitable.
5
6## AIX 7.1
7
8* libpcap build fails with rpcapd enabled.
9* GNU M4 1.4.17 works.
10* flex 2.6.4 and GNU Bison 3.5.1 work.
11* CMake 3.16.0 works.
12* GCC 8.3.0 works, XL C 12.1.0 works.
13
14## AIX 7.2
15
16* libpcap build fails with rpcapd enabled.
17* GNU M4 1.4.17 works.
18* flex 2.5.35 and GNU Bison 3.0.4 work.
19* GCC 7.2.0 works, XL C 13.1.3 works.
20
21## Other AIX-related information
22
23Using BPF:
24
25(1) AIX 4.x's version of BPF is undocumented and somewhat unstandard; the
26    current BPF support code includes changes that should work around
27    that; it appears to compile and work on at least one AIX 4.3.3
28    machine.
29
30    Note that the BPF driver and the "/dev/bpf" devices might not exist
31    on your machine; AIX's tcpdump loads the driver and creates the
32    devices if they don't already exist.  Our libpcap should do the
33    same, and the configure script should detect that it's on an AIX
34    system and choose BPF even if the devices aren't there.
35
36    Also note that tcpdump _binary_ compiled on AIX 4 may have a problem
37    doing the initial loading of the BPF driver if copied to AIX 5 and
38    run there (GH #52). tcpdump binary natively compiled on AIX 5 should
39    not have this issue.
40
41(2) If libpcap doesn't compile on your machine when configured to use
42    BPF, or if the workarounds fail to make it work correctly, you
43    should send to tcpdump-workers@lists.tcpdump.org a detailed bug
44    report (if the compile fails, send us the compile error messages;
45    if it compiles but fails to work correctly, send us as detailed as
46    possible a description of the symptoms, including indications of the
47    network link-layer type being wrong or time stamps being wrong).
48
49    If you fix the problems yourself, please submit a patch by forking
50    the branch at
51
52	https://github.com/the-tcpdump-group/libpcap/tree/master
53
54    and issuing a pull request, so we can incorporate the fixes into the
55    next release.
56
57    If you don't fix the problems yourself, you can, as a workaround,
58    make libpcap use DLPI instead of BPF.
59
60    This can be done by specifying the flag:
61
62       --with-pcap=dlpi
63
64    to the "configure" script for libpcap.
65
66If you use DLPI:
67
68(1) It is a good idea to have the latest version of the DLPI driver on
69    your system, since certain versions may be buggy and cause your AIX
70    system to crash.  DLPI is included in the fileset bos.rte.tty.  I
71    found that the DLPI driver that came with AIX 4.3.2 was buggy, and
72    had to upgrade to bos.rte.tty 4.3.2.4:
73
74	    lslpp -l bos.rte.tty
75
76	    bos.rte.tty     4.3.2.4  COMMITTED  Base TTY Support and Commands
77
78    Updates for AIX filesets can be obtained from:
79    ftp://service.software.ibm.com/aix/fixes/
80
81    These updates can be installed with the smit program.
82
83(2) After compiling libpcap, you need to make sure that the DLPI driver
84    is loaded.  Type:
85
86	    strload -q -d dlpi
87
88    If the result is:
89
90	    dlpi: yes
91
92    then the DLPI driver is loaded correctly.
93
94    If it is:
95
96	    dlpi: no
97
98    Then you need to type:
99
100	    strload -f /etc/dlpi.conf
101
102    Check again with strload -q -d dlpi that the dlpi driver is loaded.
103
104    Alternatively, you can uncomment the lines for DLPI in
105    /etc/pse.conf and reboot the machine; this way DLPI will always
106    be loaded when you boot your system.
107
108(3) There appears to be a problem in the DLPI code in some versions of
109    AIX, causing a warning about DL_PROMISC_MULTI failing; this might
110    be responsible for DLPI not being able to capture outgoing packets.
111