NAME mynetcat SYNOPSIS mynetcat [-v] [-b file] [-D n] port mynetcat [-p port] [-b file] [-D n] host port DESCRIPTION In the first form, mynetcat listens on the given port for UDP packets and writes them to standard out. In the second form data is taken from stdin and sends the data as a UDP packet to the given port and host. The host can be either a raw IP address or a DNS name. The port number is in decimal. Optionally, the host and port can be specified as host:port. OPTIONS The -p option specifies the "send from" port. The -v option gives verbose output, including port numbers and IP addresses of UDP packets. The -D option gives debugging level, with higher numbers n giving more detailed debugging, and is not necessarily implemented. The -b option specifies that the data is in binary, and taken from or written to the file, not stdin/stdout. The entire file will be sent as a single packet. Without the -b the data is assumed to be ASCII, and each line will be sent as a packet, without the line delimiter, immediately as the line is finished. In this mode, it will be written as ASCII, with the line delimiter replaced, immediately on receiving the packet. In ASCII mode, any non-printable character will truncate the packet and terminate the server. Any non-printable other than a line delimiter will terminate the client. EXAMPLE To transfer an ASCII file from hostA to hostB (a "net cat"), complete with adjusting the line delimiter character: hostA> cat file.out | mynetcat hostB 3333 hostB> mynetcat 3333 > file.out NOTES The specifications should provide that the client, on an End Of Text (control-D) sends a control-D in the packet. On this condition, both the client and server exit, and all printable-bytes are correctly sent. Note that UDP has a maximum size for payload. This implies a maximum size for a binary file (or ASCII line) that can be sent. REVISED 11 Feb 2013