1*05b00f60SXin Li# tcpdump installation notes 2*05b00f60SXin LiIf you have not built libpcap, and your system does not have libpcap 3*05b00f60SXin Liinstalled, install libpcap first. Your system might provide a version 4*05b00f60SXin Liof libpcap that can be installed; if so, to compile tcpdump you might 5*05b00f60SXin Lineed to install a "developer" version of libpcap as well as the 6*05b00f60SXin Li"run-time" version. You can also install tcpdump.org's version of 7*05b00f60SXin Lilibpcap; see [this file](README.md) for the location. 8*05b00f60SXin Li 9*05b00f60SXin LiYou will need a C99 compiler to build tcpdump. The build system 10*05b00f60SXin Liwill abort if your compiler is not C99 compliant. If this happens, use 11*05b00f60SXin Lithe generally available GNU C compiler (GCC) or Clang. 12*05b00f60SXin Li 13*05b00f60SXin LiAfter libpcap has been built (either install it with `make install` or 14*05b00f60SXin Limake sure both the libpcap and tcpdump source trees are in the same 15*05b00f60SXin Lidirectory), run `./configure` (a shell script). `configure` will 16*05b00f60SXin Lidetermine your system attributes and generate an appropriate `Makefile` 17*05b00f60SXin Lifrom `Makefile.in`. Now build tcpdump by running `make`. 18*05b00f60SXin Li 19*05b00f60SXin LiIf everything builds ok, `su` and type `make install`. This will install 20*05b00f60SXin Litcpdump and the manual entry. Any user will be able to use tcpdump to 21*05b00f60SXin Liread saved captures. Whether a user will be able to capture traffic 22*05b00f60SXin Lidepends on the OS and the configuration of the system; see the 23*05b00f60SXin Li[tcpdump man page](https://www.tcpdump.org/manpages/tcpdump.1.html) 24*05b00f60SXin Lifor details. DO NOT give untrusted users the ability to 25*05b00f60SXin Licapture traffic. If a user can capture traffic, he or she could use 26*05b00f60SXin Liutilities such as tcpdump to capture any traffic on your net, including 27*05b00f60SXin Lipasswords. 28*05b00f60SXin Li 29*05b00f60SXin LiNote that most systems ship tcpdump, but usually an older version. 30*05b00f60SXin LiBuilding tcpdump from source as explained above will usually install the 31*05b00f60SXin Libinary as `/usr/local/bin/tcpdump`. If your system has other tcpdump 32*05b00f60SXin Libinaries, you might need to deinstall these or to set the PATH environment 33*05b00f60SXin Livariable if you need the `tcpdump` command to run the new binary 34*05b00f60SXin Li(`tcpdump --version` can be used to tell different versions apart). 35*05b00f60SXin Li 36*05b00f60SXin LiIf your system is not one which we have tested tcpdump on, you may have 37*05b00f60SXin Lito modify the `configure` script and `Makefile.in`. Please 38*05b00f60SXin Li[send us patches](https://www.tcpdump.org/index.html#patches) 39*05b00f60SXin Lifor any modifications you need to make. 40*05b00f60SXin Li 41*05b00f60SXin LiPlease see [this file](README.md) for notes about tested platforms. 42*05b00f60SXin Li 43*05b00f60SXin Li 44*05b00f60SXin Li## Description of files 45*05b00f60SXin Li``` 46*05b00f60SXin LiCHANGES - description of differences between releases 47*05b00f60SXin LiCONTRIBUTING.md - guidelines for contributing 48*05b00f60SXin LiCREDITS - people that have helped tcpdump along 49*05b00f60SXin LiINSTALL.md - this file 50*05b00f60SXin LiLICENSE - the license under which tcpdump is distributed 51*05b00f60SXin LiMakefile.in - compilation rules (input to the configure script) 52*05b00f60SXin LiREADME.md - description of distribution 53*05b00f60SXin LiVERSION - version of this release 54*05b00f60SXin Liaclocal.m4 - autoconf macros 55*05b00f60SXin Liaddrtoname.c - address to hostname routines 56*05b00f60SXin Liaddrtoname.h - address to hostname definitions 57*05b00f60SXin Liaddrtostr.c - address to printable string routines 58*05b00f60SXin Liaddrtostr.h - address to printable string definitions 59*05b00f60SXin Liah.h - IPSEC Authentication Header definitions 60*05b00f60SXin Liappletalk.h - AppleTalk definitions 61*05b00f60SXin Liascii_strcasecmp.c - locale-independent case-independent string comparison 62*05b00f60SXin Li routines 63*05b00f60SXin Liatime.awk - TCP ack awk script 64*05b00f60SXin Liatm.h - ATM traffic type definitions 65*05b00f60SXin Libpf_dump.c - BPF program printing routines, in case libpcap doesn't 66*05b00f60SXin Li have them 67*05b00f60SXin Lichdlc.h - Cisco HDLC definitions 68*05b00f60SXin Licpack.c - functions to extract packed data 69*05b00f60SXin Licpack.h - declarations of functions to extract packed data 70*05b00f60SXin Liconfig.guess - autoconf support 71*05b00f60SXin Liconfig.h.in - autoconf input 72*05b00f60SXin Liconfig.sub - autoconf support 73*05b00f60SXin Liconfigure - configure script (run this first) 74*05b00f60SXin Liconfigure.ac - configure script source 75*05b00f60SXin Lidoc/README.* - some building documentation 76*05b00f60SXin Liethertype.h - Ethernet type value definitions 77*05b00f60SXin Liextract.h - alignment definitions 78*05b00f60SXin Ligmpls.c - GMPLS definitions 79*05b00f60SXin Ligmpls.h - GMPLS declarations 80*05b00f60SXin Liinstall-sh - BSD style install script 81*05b00f60SXin Liinterface.h - globals, prototypes and definitions 82*05b00f60SXin Liip.h - IP definitions 83*05b00f60SXin Liip6.h - IPv6 definitions 84*05b00f60SXin Liipproto.c - IP protocol type value-to-name table 85*05b00f60SXin Liipproto.h - IP protocol type value definitions 86*05b00f60SXin Lil2vpn.c - L2VPN encapsulation value-to-name table 87*05b00f60SXin Lil2vpn.h - L2VPN encapsulation definitions 88*05b00f60SXin Lilbl/os-*.h - OS-dependent defines and prototypes 89*05b00f60SXin Lillc.h - LLC definitions 90*05b00f60SXin Limachdep.c - machine dependent routines 91*05b00f60SXin Limachdep.h - machine dependent definitions 92*05b00f60SXin Limakemib - mib to header script 93*05b00f60SXin Limib.h - mib definitions 94*05b00f60SXin Limissing/* - replacements for missing library functions 95*05b00f60SXin Lintp.c - functions to handle ntp structs 96*05b00f60SXin Lintp.h - declarations of functions to handle ntp structs 97*05b00f60SXin Limkdep - construct Makefile dependency list 98*05b00f60SXin Limpls.h - MPLS definitions 99*05b00f60SXin Linameser.h - DNS definitions 100*05b00f60SXin Linetdissect.h - definitions and declarations for tcpdump-as-library 101*05b00f60SXin Li (under development) 102*05b00f60SXin Linfs.h - Network File System V2 definitions 103*05b00f60SXin Linfsfh.h - Network File System file handle definitions 104*05b00f60SXin Linlpid.c - OSI NLPID value-to-name table 105*05b00f60SXin Linlpid.h - OSI NLPID definitions 106*05b00f60SXin Liospf.h - Open Shortest Path First definitions 107*05b00f60SXin Lipacketdat.awk - TCP chunk summary awk script 108*05b00f60SXin Liparsenfsfh.c - Network File System file parser routines 109*05b00f60SXin Lipcap-missing.h - declarations of functions possibly missing from libpcap 110*05b00f60SXin Lippp.h - Point to Point Protocol definitions 111*05b00f60SXin Liprint.c - Top-level routines for protocol printing 112*05b00f60SXin Liprint-*.c - The netdissect printers 113*05b00f60SXin Lirpc_auth.h - definitions for ONC RPC authentication 114*05b00f60SXin Lirpc_msg.h - definitions for ONC RPC messages 115*05b00f60SXin Lisend-ack.awk - unidirectional tcp send/ack awk script 116*05b00f60SXin Lislcompress.h - SLIP/PPP Van Jacobson compression (RFC1144) definitions 117*05b00f60SXin Lismb.h - SMB/CIFS definitions 118*05b00f60SXin Lismbutil.c - SMB/CIFS utility routines 119*05b00f60SXin Listime.awk - TCP send awk script 120*05b00f60SXin Litcp.h - TCP definitions 121*05b00f60SXin Litcpdump.1 - manual entry 122*05b00f60SXin Litcpdump.c - main program 123*05b00f60SXin Litimeval-operations.h - timeval operations macros 124*05b00f60SXin Liudp.h - UDP definitions 125*05b00f60SXin Liutil-print.c - utility routines for protocol printers 126*05b00f60SXin Li``` 127