⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.txt

📁 Windows XP下的抓包程序实现
💻 TXT
📖 第 1 页 / 共 2 页
字号:
@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.12.2.1 2005/06/20 21:30:14 guy Exp $ (LBL)To build libpcap, run "./configure" (a shell script). The configurescript will determine your system attributes and generate anappropriate Makefile from Makefile.in. Next run "make". If everythinggoes well you can su to root and run "make install". However, you neednot install libpcap if you just want to build tcpdump; just make surethe tcpdump and libpcap directory trees have the same parentdirectory.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://ftp.gnu.org/pub/gnu/gcc/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 {DEC OSF/1, Digital UNIX, Tru64 UNIX}, packet capture must beenabled before it can be used.  For instructions on how to enable packetfilter support, see:	ftp://ftp.digital.com/pub/Digital/dec-faq/Digital-UNIXLook for the "How do I configure the Berkeley Packet Filter and capturetcpdump traces?" item.Once 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.The DLPI streams package is standard starting with 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 promiscuous mode at a time.It is impossible to capture outbound packets on HP-UX 9.  To do so onHP-UX 10, you will, apparently, need a late "LAN products cumulativepatch" (at one point, it was claimed that this would be PHNE_18173 fors700/10.20; at another point, it was claimed that the required patcheswere PHNE_20892, PHNE_20725 and PHCO_10947, or newer patches), and to doso on HP-UX 11 you will, apparently, need the latest lancommon/DLPIpatches and the latest driver patch for the interface(s) in use on HP-UX11 (at one point, it was claimed that patches PHNE_19766, PHNE_19826,PHNE_20008, and PHNE_20735 did the trick).Furthermore, on HP-UX 10, you will need to turn on a kernel switch bydoing	echo 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/memYou would have to arrange that this happen on reboots; the right way todo that would probably be to put it into an executable script file"/sbin/init.d/outbound_promisc" and making"/sbin/rc2.d/S350outbound_promisc" a symbolic link to that script.Finally, testing shows that there can't be more than one simultaneousDLPI user per network interface.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, on a system with a 2.0.X kernel, cancause problems since promiscuous mode is implemented by twiddling theinterface flags from the libpcap application; the packet capturemechanism in the 2.2 and later kernels doesn't have this problem.  Also,packet timestamps aren't very good.  This appears to be due to haphazardhandling 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 neither the Network Research Group at LBNLnor the Tcpdump Group ever generated a release with this version number. The LBNL Network Research Group notes with interest that a standardcracker trick to get people to install trojans is to distribute bogus

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -