marcopaganini / sock

W. Richard Stevens' sock program (cleaned and ported to Linux)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

W. Richard Steven's sock program

This is a port of W. Richard Steven's "sock" program. This program is extensively used for exercises in his excellent TCP/IP Illustrated book (I don't make any money if you purchased this book, I'm just a fan).

The original port of sock was done by Mike Borella but didn't compile on my system (gcc 4.8.4+). I fixed all the errors and warnings and used [GNU indent] (https://www.gnu.org/software/indent/manual/indent.html) to reformat the source code consistently.

Please note that I do not hold the Copyright over this program. The program is copyrighted by Mr. Stevens, but allowed free use as long as properly attributed (see the LICENSE) file for details.

Compiling

To compile the program, just type:

$ ./configure
$ make
$ sudo make install

Pull requests

Times change, and so do compilers and systems. If you manage to patch a problem in this program, send me a pull request and I will incorporate it back into the repository. I recommend using GNU indent to reformat your sources before opening the pull request. The recommended indent invocation is:

indent -l128 --no-tabs --tab-size4 --indent-level4 --braces-on-if-line \
       --cuddle-else --braces-on-func-def-line --braces-on-struct-decl-line \
       --cuddle-do-while --no-space-after-function-call-names \ 
       --no-space-after-parentheses --dont-break-procedure-type *.c

About

W. Richard Stevens' sock program (cleaned and ported to Linux)

License:Other


Languages

Language:C 70.5%Language:Makefile 16.7%Language:Shell 10.3%Language:M4 2.5%