📄 install
字号:
@(#) $Header: INSTALL,v 1.42 98/03/20 18:49:16 vern Exp $ (LBL)To build libpcap, first customize any paths in Makefile.in, then run"./configure" (a shell script). The configure script will determineyour system attributes and generate an appropriate Makefile fromMakefile.in. Next run "make". If everything goes well you can su toroot and run "make install", "make install-incl" and "makeinstall-man". However, you need not install libpcap if you just want tobuild tcpdump; just make sure the tcpdump and libpcap directory treeshave the same parent directory.If configure says: configure: warning: cannot determine packet capture interface configure: warning: (see INSTALL for more info)then your system either does not support packet capture or your systemdoes support packet capture but libpcap does not support thatparticular type. (If you have HP-UX, see below.) If your system uses apacket capture not supported by libpcap, please send us patches; don'tforget to include an autoconf fragment suitable for use inconfigure.in.It is possible to override the default packet capture type, althoughthe circumstance where this works are limited. For example if you haveinstalled bpf under SunOS 4 and wish to build a snit libpcap: ./configure --with-pcap=snitAnother example is to force a supported packet capture type in the casewhere the configure scripts fails to detect it.You will need an ANSI C compiler to build libpcap. The configure scriptwill abort if your compiler is not ANSI compliant. If this happens, usethe GNU C compiler, available via anonymous ftp: ftp://prep.ai.mit.edu/pub/gnu/gcc-*.tar.gzNote well: If you use gcc, you may need to run its "fixincludes"script. Running fixincludes is not required with later versions of gccand in some cases (e.g. Solaris 2.5) causes problems when run. Theconfigure script will abort with: checking for ANSI ioctl definitions... yes configure: error: see the INSTALL for more infoif it detects if the fixincludes needs to be run. If the fixincludestest in configure passes, you're probably ok.If you use flex, you must use version 2.4.6 or higher. The configurescript automatically detects the version of flex and will not use itunless it is new enough. You can use "flex -V" to see what version youhave (unless it's really old). The current version of flex is availablevia anonymous ftp: ftp://ftp.ee.lbl.gov/flex-*.tar.ZAs of this writing, the current version is 2.5.4.If you use bison, you must use flex (and visa versa). The configurescript automatically falls back to lex and yacc if both flex and bisonare not found.Sometimes the stock C compiler does not interact well with flex andbison. The list of problems includes undefined references for alloca.You can get around this by installing gcc or manually disabling flexand bison with: ./configure --without-flex --without-bisonIf your system only has AT&T lex, this is okay unless your libpcapprogram uses other lex/yacc generated code. (Although it's possible tomap the yy* identifiers with a script, we use flex and bison so wedon't feel this is necessary.)Some systems support the Berkeley Packet Filter natively; for exampleout of the box OSF and BSD/OS have bpf. If your system does not supportbpf, you will need to pick up: ftp://ftp.ee.lbl.gov/bpf-*.tar.ZNote well: you MUST have kernel source for your operating system inorder to install bpf. An exception is SunOS 4; the bpf distributionincludes replacement kernel objects for some of the standard SunOS 4network device drivers. See the bpf INSTALL document for moreinformation.If you use Solaris, there is a bug with bufmod(7) that is fixed inSolaris 2.3.2 (aka SunOS 5.3.2). Setting a snapshot length with thebroken bufmod(7) results in data be truncated from the FRONT of thepacket instead of the end. The work around is to not set a snapshotlength but this results in performance problems since the entire packetis copied to user space. If you must run an older version of Solaris,there is a patch available from Sun; ask for bugid 1149065. Afterinstalling the patch, use "setenv BUFMOD_FIXED" to enable use ofbufmod(7). However, we recommend you run a more current release ofSolaris.If you use the SPARCompiler, you must be careful to not use the/usr/ucb/cc interface. If you do, you will get bogus warnings andperhaps errors. Either make sure your path has /opt/SUNWspro/binbefore /usr/ucb or else: setenv CC /opt/SUNWspro/bin/ccbefore running configure. (You might have to do a "make distclean"if you already ran configure once).Also note that "make depend" won't work; while all of the knownuniverse uses -M, the SPARCompiler uses -xM to generate makefiledependencies.If you are trying to do packet capture with a FORE ATM card, you may ormay not be able to. They usually only release their driver in objectcode so unless their driver supports packet capture, there's not muchlibpcap can do.If you get an error like: tcpdump: recv_ack: bind error 0x???when using DLPI, look for the DL_ERROR_ACK error return values, usuallyin /usr/include/sys/dlpi.h, and find the corresponding value.Under OSF, packet capture must be enabled before it can be used. Forinstructions on how to enable packet filter support, see: ftp://ftp.digital.com/pub/Digital/dec-faq/Digital-UNIXOnce you enable packet filter support, your OSF system will support bpfnatively.Under Ultrix, packet capture must be enabled before it can be used. Forinstructions on how to enable packet filter support, see: ftp://ftp.digital.com/pub/Digital/dec-faq/ultrixIf you use HP-UX, you must have at least version 9 and either theversion of cc that supports ANSI C (cc -Aa) or else use the GNU Ccompiler. You must also buy the optional streams package. If you don'thave: /usr/include/sys/dlpi.h /usr/include/sys/dlpi_ext.hthen you don't have the streams package. In addition, we believe youneed to install the "9.X LAN and DLPI drivers cumulative" patch(PHNE_6855) to make the version 9 DLPI work with libpcap.It's been reported that the DLPI streams package is standard startingwith HP-UX 10.The HP implementation of DLPI is a little bit eccentric. UnlikeSolaris, you must attach /dev/dlpi instead of the specific /dev/*network pseudo device entry in order to capture packets. The ppa isbased on the ifnet "index" number. Under HP-UX 9, it is necessary toread /dev/kmem and the kernel symbol file (/hp-ux). Under HP-UX 10,dlpi can provide information for determining the ppa. It does not seemto be possible to trace the loopback interface. Unlike other DLPIimplementations, PHYS implies MULTI and SAP and you get an error if youtry to enable more than one promiscous more than one promiscuous modeat a time. Finally, testing shows that there can't be more than onesimultaneous dlpi user per network interface and you cannot captureoutbound packets.If you use Linux, this version of libpcap is known to compile and rununder Red Hat 4.0 with the 2.0.25 kernel. It may work with earlier 2.Xversions but is guaranteed not to work with 1.X kernels. Running morethan one libpcap program at a time can cause problems since promiscuousmode is implemented by twiddlin the interface flags from the libpcapapplication. Also, packet timestamps aren't very good. This appears tobe due to haphazard handling of the timestamp in the kernel.Note well: there is rumoured to be a version of tcpdump floating aroundcalled 3.0.3 that includes libpcap and is supposed to support Linux.You should be advised that the Network Research Group at LBNL nevergenerated a release with this version number. We note with interestthat a standard cracker trick to get people to install trojans is todistribute bogus packages that have a version number higher than thecurrent release. We also note with annoyance that 90% of the Linuxrelated bug reports we get are due to changes made to unofficialversions of our page. If you are having trouble but aren't using aversion that came from ftp.ee.lbl.gov, please try that beforesubmitting a bug report!If you use AIX, you may not be able to build libpcap from this release.Although AIX 4 ships with tcpdump, it is an old version that predateslibpcap. We do not have an AIX system in house so it's impossible forus to test AIX patches submitted to us. We are told that you must linkagainst /lib/pse.exp, that you must use AIX cc or a GNU C compilernewer than 2.7.2 and that you may need to run strload before running alibpcap application. Also, it may be necessary to run the configurescript as root in order for it to detect that bpf is available. Anotherworkaround is to use: ./configure --with-pcap=bpfIf you use NeXTSTEP, you will not be able to build libpcap from thisrelease. We hope to support this operating system in some futurerelease of libpcap.If you use SINIX, you should be able to build libpcap from thisrelease. It is known to compile and run on SINIX-Y/N 5.42 with the C-DSV1.0 or V1.1 compiler. But note that in some releases of SINIX, yaccemits incorrect code; if grammar.y fails to compile, change everyoccurence of: #ifdef YYDEBUGto: #if YYDEBUGAnother workaround is to use flex and bison.If you use SCO, you might have trouble building libpcap from thisrelease. We do not have a machine running SCO and have not had reportsof anyone successfully building on it. Since SCO apparently supportsdlpi, it's possible the current version works. Meanwhile, sco providesa tcpdump binary as part of their "Network/Security Tools" package: http://www.sco.com/technology/internet/goodies/#SECURITYThere is also a README that explains how to enable packet capture.If you use UnixWare, you will not be able to build libpcap from thisrelease. We hope to support this operating system in some futurerelease of libpcap. Meanwhile, there appears to be an UnixWare port oflibpcap 0.0 (and tcpdump 3.0) in: ftp://ftp1.freebird.org/pub/mirror/freebird/internet/systools/UnixWare appears to use a hacked version of DLPI.If linking tcpdump fails with "Undefined: _alloca" when using bison ona Sun4, your version of bison is broken. In any case version 1.16 orhigher is recommended (1.14 is known to cause problems 1.16 is known towork). Either pick up a current version from: ftp://prep.ai.mit.edu/pub/gnu/bison.tar.gzor hack around it by inserting the lines: #ifdef __GNUC__ #define alloca __builtin_alloca #else #ifdef sparc #include <alloca.h> #else char *alloca (); #endif #endifright after the (100 line!) GNU license comment in bison.simple, removegrammar.[co] and fire up make again.If you use SunOS 4, your kernel must support streams NIT. If you run alibpcap program and it dies with: /dev/nit: No such deviceYou must add streams NIT support to your kernel configuration, runconfig and boot the new kernel.If you are running a version of SunOS earlier than 4.1, you will needto replace the Sun supplied /sys/sun{3,4,4c}/OBJ/nit_if.o with theappropriate version from this distribution's SUNOS4 subdirectory andbuild a new kernel: nit_if.o.sun3-sunos4 (any flavor of sun3) nit_if.o.sun4c-sunos4.0.3c (SS1, SS1+, IPC, SLC, etc.) nit_if.o.sun4-sunos4 (Sun4's not covered by nit_if.o.sun4c-sunos4.0.3c)These nit replacements fix a bug that makes nit essentially unusable inpre-SunOS 4.1. In addition, our sun4c-sunos4.0.3c nit gives youtimestamps to the resolution of the SS-1 clock (1 us) rather than thelousy 20ms timestamps Sun gives you (tcpdump will print out the fulltimestamp resolution if it finds it's running on a SS-1).FILES-----CHANGES - description of differences between releasesFILES - list of files exported as part of the distributionINSTALL - this fileMakefile.in - compilation rules (input to the configure script)README - description of distributionSUNOS4 - pre-SunOS 4.1 replacement kernel nit modulesVERSION - version of this releaseaclocal.m4 - autoconf macrosbpf/net - copies of bpf_filter.c and bpf.hbpf_filter.c - symlink to bpf/net/bpf_filter.cbpf_image.c - bpf disassembly routineconfig.guess - autoconf supportconfig.sub - autoconf supportconfigure - configure script (run this first)configure.in - configure script sourceetherent.c - /etc/ethers support routinesethertype.h - ethernet protocol types and names definitionsgencode.c - bpf code generation routinesgencode.h - bpf code generation definitionsgrammar.y - filter string grammarinet.c - network routinesinstall-sh - BSD style install scriptlbl/gnuc.h - gcc macros and defineslbl/os-*.h - os dependent defines and prototypeslinux-include/* - network include files missing on Linuxmkdep - construct Makefile dependency listnametoaddr.c - hostname to address routinesnet - symlink to bpf/netoptimize.c - bpf optimization routinespcap-bpf.c - BSD Packet Filter supportpcap-dlpi.c - Data Link Provider Interface supportpcap-enet.c - enet supportpcap-int.h - internal libpcap definitionspcap-namedb.h - public libpcap name database definitionspcap-nit.c - Network Interface Tap supportpcap-nit.h - Network Interface Tap definitionspcap-null.c - dummy monitor support (allows offline use of libpcap)pcap-pf.c - Packet Filter supportpcap-pf.h - Packet Filter definitionspcap-snit.c - Streams based Network Interface Tap supportpcap-snoop.c - Snoop network monitoring supportpcap.3 - manual entrypcap.c - pcap utility routinespcap.h - public libpcap definitionsppp.h - Point to Point Protocol definitionssavefile.c - offline supportscanner.l - filter string scanner
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -