xref: /netbsd-src/external/bsd/libpcap/dist/doc/README.aix (revision 748408ed59e7aef1b0dd2f652356b3c051bb3440)
1*748408edSchristos# Compiling libpcap on AIX
2*748408edSchristos
3*748408edSchristos* Autoconf is expected to work everywhere.
4*748408edSchristos* Neither AIX lex nor AIX yacc nor AIX m4 are suitable.
5*748408edSchristos
6*748408edSchristos## AIX 7.1
7*748408edSchristos
8*748408edSchristos* libpcap build fails with rpcapd enabled.
9*748408edSchristos* GNU M4 1.4.17 works.
10*748408edSchristos* flex 2.6.4 and GNU Bison 3.5.1 work.
11*748408edSchristos* CMake 3.16.0 works.
12*748408edSchristos* GCC 8.3.0 works, XL C 12.1.0 works.
13*748408edSchristos
14*748408edSchristos## AIX 7.2
15*748408edSchristos
16*748408edSchristos* libpcap build fails with rpcapd enabled.
17*748408edSchristos* GNU M4 1.4.17 works.
18*748408edSchristos* flex 2.5.35 and GNU Bison 3.0.4 work.
19*748408edSchristos* GCC 7.2.0 works, XL C 13.1.3 works.
20*748408edSchristos
21*748408edSchristos## Other AIX-related information
22*748408edSchristos
239185e895SchristosUsing BPF:
249185e895Schristos
259185e895Schristos(1) AIX 4.x's version of BPF is undocumented and somewhat unstandard; the
269185e895Schristos    current BPF support code includes changes that should work around
279185e895Schristos    that; it appears to compile and work on at least one AIX 4.3.3
289185e895Schristos    machine.
299185e895Schristos
309185e895Schristos    Note that the BPF driver and the "/dev/bpf" devices might not exist
319185e895Schristos    on your machine; AIX's tcpdump loads the driver and creates the
329185e895Schristos    devices if they don't already exist.  Our libpcap should do the
339185e895Schristos    same, and the configure script should detect that it's on an AIX
349185e895Schristos    system and choose BPF even if the devices aren't there.
359185e895Schristos
369185e895Schristos    Also note that tcpdump _binary_ compiled on AIX 4 may have a problem
379185e895Schristos    doing the initial loading of the BPF driver if copied to AIX 5 and
389185e895Schristos    run there (GH #52). tcpdump binary natively compiled on AIX 5 should
399185e895Schristos    not have this issue.
409185e895Schristos
419185e895Schristos(2) If libpcap doesn't compile on your machine when configured to use
429185e895Schristos    BPF, or if the workarounds fail to make it work correctly, you
439185e895Schristos    should send to tcpdump-workers@lists.tcpdump.org a detailed bug
449185e895Schristos    report (if the compile fails, send us the compile error messages;
459185e895Schristos    if it compiles but fails to work correctly, send us as detailed as
469185e895Schristos    possible a description of the symptoms, including indications of the
479185e895Schristos    network link-layer type being wrong or time stamps being wrong).
489185e895Schristos
499185e895Schristos    If you fix the problems yourself, please submit a patch by forking
509185e895Schristos    the branch at
519185e895Schristos
52*748408edSchristos	https://github.com/the-tcpdump-group/libpcap/tree/master
539185e895Schristos
549185e895Schristos    and issuing a pull request, so we can incorporate the fixes into the
559185e895Schristos    next release.
569185e895Schristos
579185e895Schristos    If you don't fix the problems yourself, you can, as a workaround,
589185e895Schristos    make libpcap use DLPI instead of BPF.
599185e895Schristos
609185e895Schristos    This can be done by specifying the flag:
619185e895Schristos
629185e895Schristos       --with-pcap=dlpi
639185e895Schristos
649185e895Schristos    to the "configure" script for libpcap.
659185e895Schristos
669185e895SchristosIf you use DLPI:
679185e895Schristos
689185e895Schristos(1) It is a good idea to have the latest version of the DLPI driver on
699185e895Schristos    your system, since certain versions may be buggy and cause your AIX
709185e895Schristos    system to crash.  DLPI is included in the fileset bos.rte.tty.  I
719185e895Schristos    found that the DLPI driver that came with AIX 4.3.2 was buggy, and
729185e895Schristos    had to upgrade to bos.rte.tty 4.3.2.4:
739185e895Schristos
749185e895Schristos	    lslpp -l bos.rte.tty
759185e895Schristos
769185e895Schristos	    bos.rte.tty     4.3.2.4  COMMITTED  Base TTY Support and Commands
779185e895Schristos
789185e895Schristos    Updates for AIX filesets can be obtained from:
799185e895Schristos    ftp://service.software.ibm.com/aix/fixes/
809185e895Schristos
819185e895Schristos    These updates can be installed with the smit program.
829185e895Schristos
839185e895Schristos(2) After compiling libpcap, you need to make sure that the DLPI driver
849185e895Schristos    is loaded.  Type:
859185e895Schristos
869185e895Schristos	    strload -q -d dlpi
879185e895Schristos
889185e895Schristos    If the result is:
899185e895Schristos
909185e895Schristos	    dlpi: yes
919185e895Schristos
929185e895Schristos    then the DLPI driver is loaded correctly.
939185e895Schristos
949185e895Schristos    If it is:
959185e895Schristos
969185e895Schristos	    dlpi: no
979185e895Schristos
989185e895Schristos    Then you need to type:
999185e895Schristos
1009185e895Schristos	    strload -f /etc/dlpi.conf
1019185e895Schristos
1029185e895Schristos    Check again with strload -q -d dlpi that the dlpi driver is loaded.
1039185e895Schristos
1049185e895Schristos    Alternatively, you can uncomment the lines for DLPI in
1059185e895Schristos    /etc/pse.conf and reboot the machine; this way DLPI will always
1069185e895Schristos    be loaded when you boot your system.
1079185e895Schristos
1089185e895Schristos(3) There appears to be a problem in the DLPI code in some versions of
1099185e895Schristos    AIX, causing a warning about DL_PROMISC_MULTI failing; this might
1109185e895Schristos    be responsible for DLPI not being able to capture outgoing packets.
111