xref: /freebsd/contrib/libpcap/doc/README.haiku.md (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1# Compiling and using libpcap on Haiku
2
3Haiku R1/beta4 and earlier versions do not support packet capture on the
4loopback interface.  Using this version of libpcap, loopback capture works
5since Haiku revision hrev57585 and is expected to work in Haiku R1/beta5 when
6the latter becomes available.  Packet timestamping and filtering always occur
7in userland.  Wireless monitor mode is not supported.  The "any"
8pseudo-interface is not supported.
9[**pcap_set_buffer_size**](https://www.tcpdump.org/manpages/pcap_set_buffer_size.3pcap.html)(3PCAP)
10has no effect.
11[**pcap_setdirection**](https://www.tcpdump.org/manpages/pcap_setdirection.3pcap.html)(3PCAP)
12is not supported.
13[**pcap_inject**](https://www.tcpdump.org/manpages/pcap_inject.3pcap.html)(3PCAP)
14is not supported.
15
16The statistics reported by
17[**pcap_stats**](https://www.tcpdump.org/manpages/pcap_stats.3pcap.html)(3PCAP)
18on Haiku are as follows:
19* `ps_recv` is the number of packets successfully delivered by the kernel,
20  before libpcap applies a filter.
21* `ps_drop` is the number of packets rejected by the filter.
22* `ps_ifdrop` is the number of packets dropped by the network interface (as
23  seen via `SIOCGIFSTATS`) since the capture handle became active.
24
25## 64-bit x86 R1/beta4
26
27* Autoconf 2.71 works.
28* CMake 3.28.3 works.
29* GCC 13.2.0 works.
30* Clang 12.0.1 works with the latest llvm12_clang-12.0.1-5 version.
31* flex 2.6.4 works.
32* bison 3.8.2 works.
33
34The following command will install respective non-default packages:
35```
36pkgman install cmake llvm12_clang
37```
38
39For reference, the tests were done using a system installed from
40`haiku-r1beta4-x86_64-anyboot.iso`.
41
42## 32-bit x86 R1/beta4
43
44* Autoconf 2.71 works.
45* CMake 3.24.2 works.
46* GCC 11.2.0 works.
47* Clang does not work.
48* flex 2.6.4 works.
49* bison 3.0.5 works.
50
51The following command will install respective non-default packages:
52```
53pkgman install cmake_x86
54```
55
56For reference, the tests were done using a system installed from
57`haiku-r1beta4-x86_gcc2h-anyboot.iso`.
58