Author:
-------

Marcelo Gornstein (mgornstein@usa.net)1.5



Send Packet Copyright (c) 1999 Marcelo Gornstein
	    ------------------------------------------------
		    contact me at: mgornstein@usa.net
		    ---------------------------------

Introduction
------------
Well, following the Easy Sniffer philosophy, i made Send Packet.
I mean, Send Packet is not a sniffer, but you can compile it
via modules. Modifying config.h will determine the features you
may use in the future and the ones you won't. Thus, varying the 
size and speed of the compiled program.

What is Send Packet?
--------------------
Send Packet is a very simple and practical program designed to test
networks. Ever need to watch how your network responds to a specific
packet? Got it! With Send Packet you can make your own packet modifying
the IP, ICMP, TCP, and UDP headers. 
You can set the default options for the sniffer and then, when needed,
specify new options via arguments. These arguments will override the
default ones.

What can I set in the headers?
------------------------------
Almost anything. Here's a list:

* IP header: 	Source IP address.
		Destiny IP address.
		Time To Live (TTL).
* TCP header:	Source port.
		Destiny port.
		Sequence number.
		ACK secuence number.
		Window size.
		Flags of the packet.
* UDP header:	Source port.
		Destiny port.
* ICMP header:	type of ICMP message and 'optional' options.

Which platforms are supported?
------------------------------
Well, I used the program in my box only. A Slackware linux 2.2.9 with
glibc 2.0.6 and with gcc 2.8.1 with binutils 2.9.1.

Notes:
-----
Send Packet is under the GNU/GPL license. See COPYING file for details.
You have to be root to run this program. DO NOT set the SUID bit on this
program. At least not when root is the owner. I use strcpy instead of strncpy
a lot! So, you've been warned. ;)
I (Marcelo Gornstein), take no responsability for the actions and or 
consequences derived from your use of Send Packet.
Please send me any comments, bug-reports or whatever you want. If you want
to port Send Packet or want to be in the project, feel free to contact me.
cat flames > /dev/null ;)

Regards,
Marcelo Gornstein
mgornstein@usa.netfor version 2.0
---------------

* Add ARP support.
* Add ipv6 support.
* Permit IP options.
* Include an option to choose the device to send the packet to.
* It would be nice to have a ncurses or X interface. The fact is that
I can't even make a window in any of them. Anyone interested in 
doing it? ;)
* Comment the code.	    Send Packet Copyright (c) 1999 Marcelo Gornstein
	    ------------------------------------------------
		    contact me at: mgornstein@usa.net
		    ---------------------------------

The usage of Send Packet is pretty easy. As you can see, you can set
the default behavior of the program, that is, when no arguments are
passed to Send Packet in the file config.h.
However, you can modify, in any time you want, this options via the
command line options below:

-size <n>: Will specify the buffer length. That is, the maximum ammount of
	   octets in the packet.
-src <ip>: Source IP address of the packet to send.
-dst <ip>: Destiny IP address of the packet to send.	 
-sprt <n>: Source port of the packet to send. (Only applied to udp and
	   tcp packets).
-dprt <n>: Destiny port of the packet to send. (Only applied to udp and
	   tcp packets).
-sname <host>: Use this option instead of -src if you do know the source
	       hostname but not the IP address. Send Packet will try to
	       'guess' the IP address.
-dname <host>: Use this option instead of -dst if you do know the destiny
	       hostname but not the IP address. Send Packet will try to
	       'guess' the IP address.
-seq <n>: Send tcp packet with sequence number 'n'. Only for TCP.
-ack <n>: Send tcp packet with an ack sequence number of 'n'. Only for TCP.
-w <n>: Sets window size to 'n'. Only for TCP.
-f  <flag>: TCP flag. flag can be any of: "ack", "syn", "fin", "urg", "psh"
	    "rst". Only for TCP.
-ttl <n>: Send ip protocol with a time to live 'n'.
-proto <p>: Use protocol "p" as default. p can take any of the 
	    following values: "tcp", "udp", or "icmp" (without the quotes).
-msg <msg>: Send icmp message "msg". msg can be: "echo", "echoreply",
	    "destunreach", "srcquench", "redirect", "timexceeded", 
	    "parameterprob", "timestamp", "timestampreply", "inforequest",
	    "inforeply", "address", "addressreply". Only for ICMP.
-code <n>: n can be 0-12 and is used with msg types: "destunreach",
	   "srcquench", "redirect", "timexceeded". The meaning of n is
	   different for each kind of message. See <netinet/ip_icmp.h>
	   for details. Only for ICMP.
-to <ip>: IP address. i.e: Needed when sending a destination for an icmp 
	  redirect. Only for ICMP.
-host <ip>: Used with ICMP to specify wich host reported the msg or problem.
	    i.e: icmp redirect "host" to "to". 
-file <file>: Location of the file to be used as data-file.
-sendfile: sends the content of the data file too.
-h: Help, options, and copyright info.

NOTE: If you ommit any of the above options, Send Packet will use its
default values at the time of compiling.
