$ dpkg -L sendip /. /usr /usr/bin /usr/bin/sendip /usr/share /usr/share/man /usr/share/man/man1 /usr/share/man/man1/sendip.1.gz /usr/share/doc /usr/share/doc/sendip /usr/share/doc/sendip/README.gz /usr/share/doc/sendip/copyright /usr/share/doc/sendip/changelog.Debian.gz /usr/share/doc/sendip/contrib /usr/share/doc/sendip/contrib/gmon.out.gz /usr/share/doc/sendip/contrib/wake.sh /usr/share/doc/sendip/TODO /usr/lib /usr/lib/sendip /usr/lib/sendip/rip.so /usr/lib/sendip/ipv6.so /usr/lib/sendip/ripng.so /usr/lib/sendip/bgp.so /usr/lib/sendip/udp.so /usr/lib/sendip/ntp.so /usr/lib/sendip/ipv4.so /usr/lib/sendip/icmp.so /usr/lib/sendip/tcp.so
$ man sendip
$ sudo gunzip /usr/share/doc/sendip/README.gz $ cat /usr/share/doc/sendip/README SendIP Author: Mike Ricketts <[email protected]> Web: http://www.earth.li/projectpurple/progs/sendip.html Part of Project Purple. (http://www.earth.li/projectpurple/) 1. Introduction SendIP is a tool to send completely arbitrary packets out over the network. In conjunction with PackPrint (see http://www.earth.li/projectpurple/progs/packprint.html), this makes an extremely powerful debugging tool for networks. 1.1 Home page All the latest news, documentation and versions of SendIP will be made available from http://www.earth.li/projectpurple/ or directly from the the author. Please, if you find SendIP useful, consider visiting making a donation at http://heaven.on.earth.li/donate. The more donations I get the more time I can afford to spend improving SendIP! 2. Protocols Here is a list of protocols that SendIP currently understands: * IPv4 (but see below section 7) * TCP * BGP * ICMP * UDP * RIP * NTP * IPv6 (except on solaris) * ICMPv6 * TCP * UDP * RIPng * NTP? Other protocols will be added in future versions, as and when I have time to add them. Of course, it is still possible to send packets using other protocols, but you have to construct the packet data and headers entirely by hand. 3. Usage instructions SendIP can take a huge number of commandline parameters. For this reason, future versions may have some sort of user interface...
Please read the man page or sendip -h for details. They are not documented here because they change often between versions and I can't be bothered to keep this up to date.
4. Installation make ; make install should work. You MUST use GNU make. On Solaris you need to use gcc-3.x or above, and GNU binutils. On other platforms, you probably need gcc-2.x or above.
If you have install problems on Solaris, try: make install INSTALL=/usr/ucb/install If you can't persuade it to compile or install, mail me with details of what goes wrong, and what system you are trying to install it on. By this I mean at least: - output of make -k veryclean all install - OS, including version - version of make, gcc, etc - version of sendip - anything else you think might be relevant You can change where it installs by changing BINDIR and/or PREFIX at the top of the Makefile. A .spec file is included to build RPMS, and source and binary RPMS are also available from the web page. Debian packages are also available, and sendip is included in the FreeBSD ports collection. 5. Problems, Bugs, and Comments If you have any comments, suggestions, or bug reports, please email me. Please, when sending bug reports include all the relevant information so I have a hope of reproducing or fixing the bug. I need at least: - output of make -k veryclean all install (if you installed from source) - OS, including version and platform - glibc version if you are on linux - sendip version - exact command line that fails - exact error messages, if any - exactly what you expected to happen that didn't, or what didn't happen that you expected - anything else that might be relevant Make sure you have read section 7 of this README first. The email address I currently use is [email protected] I am interested in any feedback in order to improve SendIP. 6. License SendIP is distributed under the GNU Public License a copy of which is included in this archive as LICENSE. 7. Note on IPv4 options Many operating systems rewrite some or all of the IP header when sending packets. Exactly which headers get rewritten depends on the OS. There is no portable way to bypass this that I am aware of. so some IP options do not work on some operating systems. Listed below are the ones I know about. This list is not by any means complete and what is here may not be accurate, and I would welcome more information. Linux, *BSD: - IP source address is rewritten if it is zero. - IP checksum is always rewritten to the correct value. - IP packet ID is rewritten (to a randomish value) if it is zero. - Total packet length is always rewritten to the number of bytes sent. - All other headers work as expected. Solaris: - IP source address is rewritten if it is zero. - IP header length works provided that the length given is not greater than the number of bytes in the packet. If it is, sendip will segfault. - IP don't fragment flag always set, other IP flags always cleared. - IP checksum is always rewritten to the correct value. - IP packet ID is rewritten (to a randomish value) if it is zero. - Total packet length is always rewritten to the number of bytes sent. - All other headers work as expected.
$ sendip -p ipv4 -is 192.168.1.81 -p udp -us 5070 -ud 5060 -d "Hello" -v 192.168.1.81
$ sendip -p ipv4 -is 192.168.2.100 -p udp -us 161 -ud 161 -d 0x302a020100040770726976617465a01c020430663cd4020100020100300e300c06082b060102010105000500 -v 192.168.2.150
sendip 192.168.1.21 -p ICMP -d "00000000c0a80115" -ct 0 -it 255 -iy 0x04 -ii 41101 â€“is 192.168.1.28 sendip 192.168.1.0 -p ICMP -d "00000000c0a80100" â€“sb 1 -it 240 -iy 0xC0 -ii 1206 -ct 8 -is 192.168.1.28 sendip 192.168.1.31 -p ICMP -d "00000000c0a8011F" -sb 1 -it 240 -iy 0xC0 -ii 1206 -ct 8 -is 192.168.1.28 sendip 192.168.0.1 -p UDP -ud 500 -us 500 -d F35C1DEA6E81CF0A00000000000000000110020000000000000000B000000094000000010000000100000088000100040300002000010000 800B0001800C0E10800100058002000280030001800400020300002001010000800B0001800C0E10800100058002000180030001800400020300002002010000800B0001800C0E10800100058002000180030001800400010000002003010000800B0001800C0E1080010005800200028003000180040001 sendip -v -p ipv4 -is 172.23.140.32 -p udp -us 34001 -ud 34002 22.214.171.124 sendip -v -p ipv4 -is 126.96.36.199 -p udp -us 34002 -ud 34001 188.8.131.52 sendip -p ipv4 -p tcp -is 10.1.17.1 -ts 1000 -td 1005 -tfs 1 -tn 17 10.1.17.90