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

📄 readme

📁 TCP_IP协议第一卷的源码,下载下来可以直接编译
💻
字号:
	This directory contains versions of traceroute that (a) implementpath MTU discovery (traceroute.pmtu.c) and (b) allow for either loose orstrict source routing (traceroute.lsrr.c).  A diff will reveal the twoprograms are nearly identical, and they could probably be combined intoone program with another option.	Both are derived from the Berkeley sources, and therefore carry thecorresponding Berkeley copyright.	The file LSRR.patches is the file that I used to put in the sourcerouting option.*****   YOU MUST HAVE SUPERUSER PRIVILEGES TO RUN EITHER OF THESE PROGRAMS.They both use raw sockets, which require superuser privilege to create.*****   Solaris 2.x WARNING:  The traceroute.pmtu program behaves strangelyunder Solaris 2.x, since the kernel supports path MTU discovery.  What I'veseen is the first run of the program is OK, but when the ICMP too-big erroris returned, not only does traceroute.pmtu look at it, but so does the kernel,and the kernel saves the information.  On second and subsequent runs, thekernel will "helpfully" fragment the UDP datagram being sent (using theinformation it saved in its routing table), so this program won't appearto be working.  You have to wait for the kernel's pmtu information totimeout before you can duplicate the first run of the program.*****   SVR4 WARNING:  The traceroute.pmtu program determines the MTU ofthe outgoing interface by sending the first datagram assuming an MTU of17914, getting an EMSGSIZE error back, and then stepping down the tableof MTUs until the sendto() doesn't return an error.  Every TCP/IPimplementation that I've seen has a simple test: if the IP datagram islarger than the outgoing MTU *and* the don't fragment bit is set, returnthe error EMSGSIZE.  Some interaction with the streams subsystem underSVR4 (including Solaris 2.x) prevents IP from returning the error EMSGSIZEwhen this occurs.  This causes really large UDP datagrams to be sentinitially by this program (I've seen 17914-byte datagrams from Solaris 2.xand 8166-byte datagrams from SVR4 on a 386).  The solution is to changethe line (approx. line 305) in traceroute.pmtu.c:	int *mtuptr = &mtus[0];changing the subscript [0] to [7] (assuming an Ethernet).  This will causethe first datagram to be 1500 bytes, instead of 17914.  Alternately you canspecify the starting size as a program option.*****	SOURCE ROUTING LIMITATION:  The traceroute.lsrr.c program onlyworks for me under SunOS 4.1.x and vanilla SVR4.  It *does not* work underBSD/386, 4.4BSD, or Solaris 2.x.  The reason is as follows: traceroutesets the source route correctly using the IP_OPTIONS socket option andthen sets the IP_HDRINCL socket option to allow it to pass a complete IPheader (with its desired value of the TTL).  But newer systems do notinsert the IP options specified by IP_OPTIONS if IP_HDRINCL is also set(for a SOCK_RAW Internet socket), meaning the source route option is neverused by the kernel!  The only way around this appears to be for tracerouteitself to set the correct source route options in the IP header, beforedoing the sendto(), essentially emulating what the kernel does when itinserts IP options prior to output.  This is nontrivial and I haven'ttried to do it.

⌨️ 快捷键说明

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