]> The Tcpdump Group git mirrors - tcpdump/blob - INSTALL.md
CI: Add warning exemptions for Sun C (suncc-5.14) on Solaris 10
[tcpdump] / INSTALL.md
1 # tcpdump installation notes
2
3 ## Installing libpcap
4
5 Tcpdump requires libpcap.
6
7 ### On UN*Xes
8
9 Your system might provide a version of libpcap that can be installed, or
10 that is installed by default; if so, to compile tcpdump you might need
11 to install a "developer" version of libpcap as well as the "run-time"
12 version, even if the "run-time" version has already been installed.
13
14 If your system does not provide libpcap, or provides a version that does
15 not support all of the libpcap 1.0 APIs, you will need to download the
16 source for The Tcpdump Group version of libpcap; see [this
17 file](README.md) for the location, and build and install that version.
18 Either install libpcap with `make install` or make sure both the libpcap
19 and tcpdump source trees are in the same directory.
20
21 ### On Windows
22
23 You will need to install both Npcap and the Npcap SDK; see [this
24 file](doc/README.windows.md) for information on that.
25
26 ## Building tcpdump
27
28 You will need a C99 compiler to build tcpdump and, if necessary, to
29 build libpcap. The build system will abort if your compiler is not C99
30 compliant. If this happens, use the generally available GNU C compiler
31 (GCC) or Clang.
32
33 Once you have a version of libpcap with which you can build tcpdump, do
34 the following steps:
35
36 * If you build from a git clone rather than from a release archive,
37 run `./autogen.sh` (a shell script). The autogen.sh script will
38 build the `configure` and `config.h.in` files.
39
40 On some system, you may need to set the `AUTORECONF` variable, like:
41 `AUTORECONF=autoreconf-2.69 ./autogen.sh`
42 to select the `autoreconf` version you want to use.
43
44 * Run `./configure` (a shell script). The configure script will
45 determine your system attributes and generate an appropriate `Makefile`
46 from `Makefile.in`. The configure script has a number of options to
47 control the configuration of tcpdump; `./configure --help` will show
48 them.
49
50 * Next, build tcpdump by running `make`.
51
52 On OpenBSD, you may need to set, before the `make`, the `AUTOCONF_VERSION`
53 variable like:
54 `AUTOCONF_VERSION=2.69 make`
55
56 If everything builds fine, `su` and type `make install`. This will install
57 tcpdump and the manual entry. Any user will be able to use tcpdump to
58 read saved captures. Whether a user will be able to capture traffic
59 depends on the OS and the configuration of the system; see the
60 [tcpdump man page](https://www.tcpdump.org/manpages/tcpdump.1.html)
61 for details. Do **NOT** give untrusted users the ability to
62 capture traffic. If a user can capture traffic, he or she could use
63 utilities such as tcpdump to capture any traffic on your net, including
64 passwords.
65
66 Note that most systems ship tcpdump, but usually an older version.
67 Building tcpdump from source as explained above will usually install the
68 binary as `/usr/local/bin/tcpdump`. If your system has other tcpdump
69 binaries, you might need to deinstall these or to set the `PATH` environment
70 variable if you need the `tcpdump` command to run the new binary
71 (`tcpdump --version` can be used to tell different versions apart).
72
73 If your system is not one that we have tested tcpdump on, you may have
74 to modify the `configure` script and `Makefile.in`. Please
75 [send us patches](https://www.tcpdump.org/index.html#patches)
76 for any modifications you need to make.
77
78 Please see [this file](README.md) for notes about tested platforms.
79
80
81 ## Description of files
82 ```
83 CHANGES - description of differences between releases
84 CONTRIBUTING.md - guidelines for contributing
85 CREDITS - people that have helped tcpdump along
86 INSTALL.md - this file
87 LICENSE - the license under which tcpdump is distributed
88 Makefile.in - compilation rules (input to the configure script)
89 README.md - description of distribution
90 VERSION - version of this release
91 aclocal.m4 - autoconf macros
92 addrtoname.c - address to hostname routines
93 addrtoname.h - address to hostname definitions
94 addrtostr.c - address to printable string routines
95 addrtostr.h - address to printable string definitions
96 ah.h - IPSEC Authentication Header definitions
97 appletalk.h - AppleTalk definitions
98 ascii_strcasecmp.c - locale-independent case-independent string comparison
99 routines
100 atime.awk - TCP ack awk script
101 atm.h - ATM traffic type definitions
102 autogen.sh - build configure and config.h.in (run this first)
103 bpf_dump.c - BPF program printing routines, in case libpcap doesn't
104 have them. A known example is OpenBSD libpcap.
105 chdlc.h - Cisco HDLC definitions
106 cpack.c - functions to extract packed data
107 cpack.h - declarations of functions to extract packed data
108 config.guess - autoconf support
109 config.sub - autoconf support
110 configure.ac - configure script source
111 doc/README.* - some building documentation
112 ethertype.h - Ethernet type value definitions
113 extract.h - alignment definitions
114 gmpls.c - GMPLS definitions
115 gmpls.h - GMPLS declarations
116 gre.h - GRE definitions
117 install-sh - BSD style install script
118 interface.h - globals, prototypes and definitions
119 ip.h - IP definitions
120 ip6.h - IPv6 definitions
121 ipproto.c - IP protocol type value-to-name table
122 ipproto.h - IP protocol type value definitions
123 l2vpn.c - L2VPN encapsulation value-to-name table
124 l2vpn.h - L2VPN encapsulation definitions
125 lbl/os-*.h - OS-dependent defines and prototypes (currently none)
126 llc.h - LLC definitions
127 makemib - mib to header script
128 mib.h - mib definitions
129 missing/* - replacements for missing library functions
130 ntp.c - functions to handle ntp structs
131 ntp.h - declarations of functions to handle ntp structs
132 mkdep - construct Makefile dependency list
133 mpls.h - MPLS definitions
134 nameser.h - DNS definitions
135 netdissect.h - definitions and declarations for tcpdump-as-library
136 (under development)
137 nfs.h - Network File System V2 definitions
138 nfsfh.h - Network File System file handle definitions
139 nlpid.c - OSI NLPID value-to-name table
140 nlpid.h - OSI NLPID definitions
141 ospf.h - Open Shortest Path First definitions
142 packetdat.awk - TCP chunk summary awk script
143 parsenfsfh.c - Network File System file parser routines
144 ppp.h - Point to Point Protocol definitions
145 print.c - Top-level routines for protocol printing
146 print-*.c - The netdissect printers
147 rpc_auth.h - definitions for ONC RPC authentication
148 rpc_msg.h - definitions for ONC RPC messages
149 send-ack.awk - unidirectional tcp send/ack awk script
150 slcompress.h - SLIP/PPP Van Jacobson compression (RFC1144) definitions
151 smb.h - SMB/CIFS definitions
152 smbutil.c - SMB/CIFS utility routines
153 stime.awk - TCP send awk script
154 tcp.h - TCP definitions
155 tcpdump.1 - manual entry
156 tcpdump.c - main program
157 timeval-operations.h - timeval operations macros
158 udp.h - UDP definitions
159 util-print.c - utility routines for protocol printers
160 ```